You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/p__User__Detail__id.c676a45...

1514 lines
65 KiB

(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[261],{
/***/ "55Ip":
/*!***************************************************************!*\
!*** ./node_modules/react-router-dom/esm/react-router-dom.js ***!
\***************************************************************/
/*! exports provided: MemoryRouter, Prompt, Redirect, Route, Router, StaticRouter, Switch, generatePath, matchPath, useHistory, useLocation, useParams, useRouteMatch, withRouter, BrowserRouter, HashRouter, Link, NavLink */
/*! exports used: Link, NavLink */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* unused harmony export BrowserRouter */
/* unused harmony export HashRouter */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Link; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return NavLink; });
/* harmony import */ var react_router__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react-router */ "Ty5D");
/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inheritsLoose */ "dI71");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "cDcd");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var history__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! history */ "YS25");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ "17x9");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "wx14");
/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ "zLVn");
/* harmony import */ var tiny_invariant__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! tiny-invariant */ "9R94");
/**
* The public API for a <Router> that uses HTML5 history.
*/
var BrowserRouter =
/*#__PURE__*/
function (_React$Component) {
Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(BrowserRouter, _React$Component);
function BrowserRouter() {
var _this;
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
_this.history = Object(history__WEBPACK_IMPORTED_MODULE_3__[/* createBrowserHistory */ "a"])(_this.props);
return _this;
}
var _proto = BrowserRouter.prototype;
_proto.render = function render() {
return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(react_router__WEBPACK_IMPORTED_MODULE_0__[/* Router */ "c"], {
history: this.history,
children: this.props.children
});
};
return BrowserRouter;
}(react__WEBPACK_IMPORTED_MODULE_2___default.a.Component);
if (false) {}
/**
* The public API for a <Router> that uses window.location.hash.
*/
var HashRouter =
/*#__PURE__*/
function (_React$Component) {
Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(HashRouter, _React$Component);
function HashRouter() {
var _this;
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
_this.history = Object(history__WEBPACK_IMPORTED_MODULE_3__[/* createHashHistory */ "b"])(_this.props);
return _this;
}
var _proto = HashRouter.prototype;
_proto.render = function render() {
return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(react_router__WEBPACK_IMPORTED_MODULE_0__[/* Router */ "c"], {
history: this.history,
children: this.props.children
});
};
return HashRouter;
}(react__WEBPACK_IMPORTED_MODULE_2___default.a.Component);
if (false) {}
var resolveToLocation = function resolveToLocation(to, currentLocation) {
return typeof to === "function" ? to(currentLocation) : to;
};
var normalizeToLocation = function normalizeToLocation(to, currentLocation) {
return typeof to === "string" ? Object(history__WEBPACK_IMPORTED_MODULE_3__[/* createLocation */ "c"])(to, null, null, currentLocation) : to;
};
var forwardRefShim = function forwardRefShim(C) {
return C;
};
var forwardRef = react__WEBPACK_IMPORTED_MODULE_2___default.a.forwardRef;
if (typeof forwardRef === "undefined") {
forwardRef = forwardRefShim;
}
function isModifiedEvent(event) {
return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);
}
var LinkAnchor = forwardRef(function (_ref, forwardedRef) {
var innerRef = _ref.innerRef,
navigate = _ref.navigate,
_onClick = _ref.onClick,
rest = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_ref, ["innerRef", "navigate", "onClick"]);
var target = rest.target;
var props = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])({}, rest, {
onClick: function onClick(event) {
try {
if (_onClick) _onClick(event);
} catch (ex) {
event.preventDefault();
throw ex;
}
if (!event.defaultPrevented && // onClick prevented default
event.button === 0 && ( // ignore everything but left clicks
!target || target === "_self") && // let browser handle "target=_blank" etc.
!isModifiedEvent(event) // ignore clicks with modifier keys
) {
event.preventDefault();
navigate();
}
}
}); // React 15 compat
if (forwardRefShim !== forwardRef) {
props.ref = forwardedRef || innerRef;
} else {
props.ref = innerRef;
}
/* eslint-disable-next-line jsx-a11y/anchor-has-content */
return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement("a", props);
});
if (false) {}
/**
* The public API for rendering a history-aware <a>.
*/
var Link = forwardRef(function (_ref2, forwardedRef) {
var _ref2$component = _ref2.component,
component = _ref2$component === void 0 ? LinkAnchor : _ref2$component,
replace = _ref2.replace,
to = _ref2.to,
innerRef = _ref2.innerRef,
rest = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_ref2, ["component", "replace", "to", "innerRef"]);
return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(react_router__WEBPACK_IMPORTED_MODULE_0__[/* __RouterContext */ "e"].Consumer, null, function (context) {
!context ? false ? undefined : Object(tiny_invariant__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])(false) : void 0;
var history = context.history;
var location = normalizeToLocation(resolveToLocation(to, context.location), context.location);
var href = location ? history.createHref(location) : "";
var props = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])({}, rest, {
href: href,
navigate: function navigate() {
var location = resolveToLocation(to, context.location);
var method = replace ? history.replace : history.push;
method(location);
}
}); // React 15 compat
if (forwardRefShim !== forwardRef) {
props.ref = forwardedRef || innerRef;
} else {
props.innerRef = innerRef;
}
return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(component, props);
});
});
if (false) { var refType, toType; }
var forwardRefShim$1 = function forwardRefShim(C) {
return C;
};
var forwardRef$1 = react__WEBPACK_IMPORTED_MODULE_2___default.a.forwardRef;
if (typeof forwardRef$1 === "undefined") {
forwardRef$1 = forwardRefShim$1;
}
function joinClassnames() {
for (var _len = arguments.length, classnames = new Array(_len), _key = 0; _key < _len; _key++) {
classnames[_key] = arguments[_key];
}
return classnames.filter(function (i) {
return i;
}).join(" ");
}
/**
* A <Link> wrapper that knows if it's "active" or not.
*/
var NavLink = forwardRef$1(function (_ref, forwardedRef) {
var _ref$ariaCurrent = _ref["aria-current"],
ariaCurrent = _ref$ariaCurrent === void 0 ? "page" : _ref$ariaCurrent,
_ref$activeClassName = _ref.activeClassName,
activeClassName = _ref$activeClassName === void 0 ? "active" : _ref$activeClassName,
activeStyle = _ref.activeStyle,
classNameProp = _ref.className,
exact = _ref.exact,
isActiveProp = _ref.isActive,
locationProp = _ref.location,
sensitive = _ref.sensitive,
strict = _ref.strict,
styleProp = _ref.style,
to = _ref.to,
innerRef = _ref.innerRef,
rest = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_ref, ["aria-current", "activeClassName", "activeStyle", "className", "exact", "isActive", "location", "sensitive", "strict", "style", "to", "innerRef"]);
return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(react_router__WEBPACK_IMPORTED_MODULE_0__[/* __RouterContext */ "e"].Consumer, null, function (context) {
!context ? false ? undefined : Object(tiny_invariant__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])(false) : void 0;
var currentLocation = locationProp || context.location;
var toLocation = normalizeToLocation(resolveToLocation(to, currentLocation), currentLocation);
var path = toLocation.pathname; // Regex taken from: https://github.com/pillarjs/path-to-regexp/blob/master/index.js#L202
var escapedPath = path && path.replace(/([.+*?=^!:${}()[\]|/\\])/g, "\\$1");
var match = escapedPath ? Object(react_router__WEBPACK_IMPORTED_MODULE_0__[/* matchPath */ "f"])(currentLocation.pathname, {
path: escapedPath,
exact: exact,
sensitive: sensitive,
strict: strict
}) : null;
var isActive = !!(isActiveProp ? isActiveProp(match, currentLocation) : match);
var className = isActive ? joinClassnames(classNameProp, activeClassName) : classNameProp;
var style = isActive ? Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])({}, styleProp, {}, activeStyle) : styleProp;
var props = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])({
"aria-current": isActive && ariaCurrent || null,
className: className,
style: style,
to: toLocation
}, rest); // React 15 compat
if (forwardRefShim$1 !== forwardRef$1) {
props.ref = forwardedRef || innerRef;
} else {
props.innerRef = innerRef;
}
return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(Link, props);
});
});
if (false) { var ariaCurrentType; }
//# sourceMappingURL=react-router-dom.js.map
/***/ }),
/***/ "5Lld":
/*!*********************************************************!*\
!*** ./src/pages/User/Detail/Banner/index.less?modules ***!
\*********************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
// extracted by mini-css-extract-plugin
module.exports = {"flex_box_center":"flex_box_center___3QNoF","flex_space_between":"flex_space_between___1V2h0","flex_box_vertical_center":"flex_box_vertical_center___2NIZD","flex_box_center_end":"flex_box_center_end___1daQk","flex_box_column":"flex_box_column___1OYLh","banner":"banner___2ShvM","wrap":"wrap___2LlrN","contentWrap":"contentWrap___aj24j","avatarWrap":"avatarWrap___1e9Ap","avatar":"avatar___3S91M","leftWrap":"leftWrap___9S3me","username":"username___2n4Ae","colorB8":"colorB8___iT6bs","color98EBFF":"color98EBFF___L0xDV","rightWrap":"rightWrap___3cIAT","countWrap":"countWrap___18atC","count":"count___1n5NP","grade":"grade___2Ucym","signed":"signed___1JBiI","bcFF8E02":"bcFF8E02___2seA2","bcCC":"bcCC___2Spe7","nav":"nav___2Z4mt","active":"active___1tNUz","search":"search___N__9i","active2":"active2___1gmg5"};
/***/ }),
/***/ "Y1PL":
/*!**********************************************************!*\
!*** ./node_modules/rc-textarea/es/index.js + 7 modules ***!
\**********************************************************/
/*! exports provided: ResizableTextArea, default */
/*! all exports used */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/extends.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Children/toArray.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/findDOMNode.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/omit.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/ref.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js (<- Module uses injected variables (global)) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/shallowequal/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with external "window.React" (<- Module is not an ECMAScript module) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, "ResizableTextArea", function() { return /* reexport */ es_ResizableTextArea; });
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
var esm_extends = __webpack_require__("wx14");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
var classCallCheck = __webpack_require__("1OyB");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
var createClass = __webpack_require__("vuIU");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
var inherits = __webpack_require__("Ji7U");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createSuper.js + 1 modules
var createSuper = __webpack_require__("LK+K");
// EXTERNAL MODULE: external "window.React"
var external_window_React_ = __webpack_require__("cDcd");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("VTBJ");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
var defineProperty = __webpack_require__("rePB");
// EXTERNAL MODULE: ./node_modules/rc-util/es/Children/toArray.js
var toArray = __webpack_require__("Zm9Q");
// EXTERNAL MODULE: ./node_modules/rc-util/es/warning.js
var warning = __webpack_require__("Kwbf");
// EXTERNAL MODULE: ./node_modules/rc-util/es/ref.js
var ref = __webpack_require__("c+Xe");
// EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/findDOMNode.js
var findDOMNode = __webpack_require__("m+aA");
// EXTERNAL MODULE: ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js
var ResizeObserver_es = __webpack_require__("bdgK");
// CONCATENATED MODULE: ./node_modules/rc-textarea/node_modules/rc-resize-observer/es/utils/observerUtil.js
// =============================== Const ===============================
var elementListeners = new Map();
function observerUtil_onResize(entities) {
entities.forEach(function (entity) {
var _elementListeners$get;
var target = entity.target;
(_elementListeners$get = elementListeners.get(target)) === null || _elementListeners$get === void 0 ? void 0 : _elementListeners$get.forEach(function (listener) {
return listener(target);
});
});
} // Note: ResizeObserver polyfill not support option to measure border-box resize
var resizeObserver = new ResizeObserver_es["default"](observerUtil_onResize); // Dev env only
var _el = false ? undefined : null; // eslint-disable-line
var _rs = false ? undefined : null; // eslint-disable-line
// ============================== Observe ==============================
function observe(element, callback) {
if (!elementListeners.has(element)) {
elementListeners.set(element, new Set());
resizeObserver.observe(element);
}
elementListeners.get(element).add(callback);
}
function unobserve(element, callback) {
if (elementListeners.has(element)) {
elementListeners.get(element).delete(callback);
if (!elementListeners.get(element).size) {
resizeObserver.unobserve(element);
elementListeners.delete(element);
}
}
}
// CONCATENATED MODULE: ./node_modules/rc-textarea/node_modules/rc-resize-observer/es/SingleObserver/DomWrapper.js
/**
* Fallback to findDOMNode if origin ref do not provide any dom element
*/
var DomWrapper_DomWrapper = /*#__PURE__*/function (_React$Component) {
Object(inherits["a" /* default */])(DomWrapper, _React$Component);
var _super = Object(createSuper["a" /* default */])(DomWrapper);
function DomWrapper() {
Object(classCallCheck["a" /* default */])(this, DomWrapper);
return _super.apply(this, arguments);
}
Object(createClass["a" /* default */])(DomWrapper, [{
key: "render",
value: function render() {
return this.props.children;
}
}]);
return DomWrapper;
}(external_window_React_["Component"]);
// CONCATENATED MODULE: ./node_modules/rc-textarea/node_modules/rc-resize-observer/es/Collection.js
var CollectionContext = /*#__PURE__*/external_window_React_["createContext"](null);
/**
* Collect all the resize event from children ResizeObserver
*/
function Collection(_ref) {
var children = _ref.children,
onBatchResize = _ref.onBatchResize;
var resizeIdRef = external_window_React_["useRef"](0);
var resizeInfosRef = external_window_React_["useRef"]([]);
var onCollectionResize = external_window_React_["useContext"](CollectionContext);
var onResize = external_window_React_["useCallback"](function (size, element, data) {
resizeIdRef.current += 1;
var currentId = resizeIdRef.current;
resizeInfosRef.current.push({
size: size,
element: element,
data: data
});
Promise.resolve().then(function () {
if (currentId === resizeIdRef.current) {
onBatchResize === null || onBatchResize === void 0 ? void 0 : onBatchResize(resizeInfosRef.current);
resizeInfosRef.current = [];
}
}); // Continue bubbling if parent exist
onCollectionResize === null || onCollectionResize === void 0 ? void 0 : onCollectionResize(size, element, data);
}, [onBatchResize, onCollectionResize]);
return /*#__PURE__*/external_window_React_["createElement"](CollectionContext.Provider, {
value: onResize
}, children);
}
// CONCATENATED MODULE: ./node_modules/rc-textarea/node_modules/rc-resize-observer/es/SingleObserver/index.js
function SingleObserver(props) {
var children = props.children,
disabled = props.disabled;
var elementRef = external_window_React_["useRef"](null);
var wrapperRef = external_window_React_["useRef"](null);
var onCollectionResize = external_window_React_["useContext"](CollectionContext); // ============================= Size =============================
var sizeRef = external_window_React_["useRef"]({
width: -1,
height: -1,
offsetWidth: -1,
offsetHeight: -1
}); // ============================= Ref ==============================
var canRef = /*#__PURE__*/external_window_React_["isValidElement"](children) && Object(ref["c" /* supportRef */])(children);
var originRef = canRef ? children.ref : null;
var mergedRef = external_window_React_["useMemo"](function () {
return Object(ref["a" /* composeRef */])(originRef, elementRef);
}, [originRef, elementRef]); // =========================== Observe ============================
var propsRef = external_window_React_["useRef"](props);
propsRef.current = props; // Handler
var onInternalResize = external_window_React_["useCallback"](function (target) {
var _propsRef$current = propsRef.current,
onResize = _propsRef$current.onResize,
data = _propsRef$current.data;
var _target$getBoundingCl = target.getBoundingClientRect(),
width = _target$getBoundingCl.width,
height = _target$getBoundingCl.height;
var offsetWidth = target.offsetWidth,
offsetHeight = target.offsetHeight;
/**
* Resize observer trigger when content size changed.
* In most case we just care about element size,
* let's use `boundary` instead of `contentRect` here to avoid shaking.
*/
var fixedWidth = Math.floor(width);
var fixedHeight = Math.floor(height);
if (sizeRef.current.width !== fixedWidth || sizeRef.current.height !== fixedHeight || sizeRef.current.offsetWidth !== offsetWidth || sizeRef.current.offsetHeight !== offsetHeight) {
var size = {
width: fixedWidth,
height: fixedHeight,
offsetWidth: offsetWidth,
offsetHeight: offsetHeight
};
sizeRef.current = size; // IE is strange, right?
var mergedOffsetWidth = offsetWidth === Math.round(width) ? width : offsetWidth;
var mergedOffsetHeight = offsetHeight === Math.round(height) ? height : offsetHeight;
var sizeInfo = Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, size), {}, {
offsetWidth: mergedOffsetWidth,
offsetHeight: mergedOffsetHeight
}); // Let collection know what happened
onCollectionResize === null || onCollectionResize === void 0 ? void 0 : onCollectionResize(sizeInfo, target, data);
if (onResize) {
// defer the callback but not defer to next frame
Promise.resolve().then(function () {
onResize(sizeInfo, target);
});
}
}
}, []); // Dynamic observe
external_window_React_["useEffect"](function () {
var currentElement = Object(findDOMNode["a" /* default */])(elementRef.current) || Object(findDOMNode["a" /* default */])(wrapperRef.current);
if (currentElement && !disabled) {
observe(currentElement, onInternalResize);
}
return function () {
return unobserve(currentElement, onInternalResize);
};
}, [elementRef.current, disabled]); // ============================ Render ============================
return /*#__PURE__*/external_window_React_["createElement"](DomWrapper_DomWrapper, {
ref: wrapperRef
}, canRef ? /*#__PURE__*/external_window_React_["cloneElement"](children, {
ref: mergedRef
}) : children);
}
// CONCATENATED MODULE: ./node_modules/rc-textarea/node_modules/rc-resize-observer/es/index.js
var INTERNAL_PREFIX_KEY = 'rc-observer-key';
function ResizeObserver(props) {
var children = props.children;
var childNodes = Object(toArray["a" /* default */])(children);
if (false) {}
return childNodes.map(function (child, index) {
var key = (child === null || child === void 0 ? void 0 : child.key) || "".concat(INTERNAL_PREFIX_KEY, "-").concat(index);
return /*#__PURE__*/external_window_React_["createElement"](SingleObserver, Object(esm_extends["a" /* default */])({}, props, {
key: key
}), child);
});
}
ResizeObserver.Collection = Collection;
/* harmony default export */ var es = (ResizeObserver);
// EXTERNAL MODULE: ./node_modules/rc-util/es/omit.js
var omit = __webpack_require__("bT9E");
// EXTERNAL MODULE: ./node_modules/classnames/index.js
var classnames = __webpack_require__("TSYQ");
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
// CONCATENATED MODULE: ./node_modules/rc-textarea/es/calculateNodeHeight.js
// Thanks to https://github.com/andreypopp/react-textarea-autosize/
/**
* calculateNodeHeight(uiTextNode, useCache = false)
*/
var HIDDEN_TEXTAREA_STYLE = "\n min-height:0 !important;\n max-height:none !important;\n height:0 !important;\n visibility:hidden !important;\n overflow:hidden !important;\n position:absolute !important;\n z-index:-1000 !important;\n top:0 !important;\n right:0 !important\n";
var SIZING_STYLE = ['letter-spacing', 'line-height', 'padding-top', 'padding-bottom', 'font-family', 'font-weight', 'font-size', 'font-variant', 'text-rendering', 'text-transform', 'width', 'text-indent', 'padding-left', 'padding-right', 'border-width', 'box-sizing', 'word-break'];
var computedStyleCache = {};
var hiddenTextarea;
function calculateNodeStyling(node) {
var useCache = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
var nodeRef = node.getAttribute('id') || node.getAttribute('data-reactid') || node.getAttribute('name');
if (useCache && computedStyleCache[nodeRef]) {
return computedStyleCache[nodeRef];
}
var style = window.getComputedStyle(node);
var boxSizing = style.getPropertyValue('box-sizing') || style.getPropertyValue('-moz-box-sizing') || style.getPropertyValue('-webkit-box-sizing');
var paddingSize = parseFloat(style.getPropertyValue('padding-bottom')) + parseFloat(style.getPropertyValue('padding-top'));
var borderSize = parseFloat(style.getPropertyValue('border-bottom-width')) + parseFloat(style.getPropertyValue('border-top-width'));
var sizingStyle = SIZING_STYLE.map(function (name) {
return "".concat(name, ":").concat(style.getPropertyValue(name));
}).join(';');
var nodeInfo = {
sizingStyle: sizingStyle,
paddingSize: paddingSize,
borderSize: borderSize,
boxSizing: boxSizing
};
if (useCache && nodeRef) {
computedStyleCache[nodeRef] = nodeInfo;
}
return nodeInfo;
}
function calculateNodeHeight(uiTextNode) {
var useCache = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
var minRows = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
var maxRows = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
if (!hiddenTextarea) {
hiddenTextarea = document.createElement('textarea');
hiddenTextarea.setAttribute('tab-index', '-1');
hiddenTextarea.setAttribute('aria-hidden', 'true');
document.body.appendChild(hiddenTextarea);
} // Fix wrap="off" issue
// https://github.com/ant-design/ant-design/issues/6577
if (uiTextNode.getAttribute('wrap')) {
hiddenTextarea.setAttribute('wrap', uiTextNode.getAttribute('wrap'));
} else {
hiddenTextarea.removeAttribute('wrap');
} // Copy all CSS properties that have an impact on the height of the content in
// the textbox
var _calculateNodeStyling = calculateNodeStyling(uiTextNode, useCache),
paddingSize = _calculateNodeStyling.paddingSize,
borderSize = _calculateNodeStyling.borderSize,
boxSizing = _calculateNodeStyling.boxSizing,
sizingStyle = _calculateNodeStyling.sizingStyle; // Need to have the overflow attribute to hide the scrollbar otherwise
// text-lines will not calculated properly as the shadow will technically be
// narrower for content
hiddenTextarea.setAttribute('style', "".concat(sizingStyle, ";").concat(HIDDEN_TEXTAREA_STYLE));
hiddenTextarea.value = uiTextNode.value || uiTextNode.placeholder || '';
var minHeight = Number.MIN_SAFE_INTEGER;
var maxHeight = Number.MAX_SAFE_INTEGER;
var height = hiddenTextarea.scrollHeight;
var overflowY;
if (boxSizing === 'border-box') {
// border-box: add border, since height = content + padding + border
height += borderSize;
} else if (boxSizing === 'content-box') {
// remove padding, since height = content
height -= paddingSize;
}
if (minRows !== null || maxRows !== null) {
// measure height of a textarea with a single row
hiddenTextarea.value = ' ';
var singleRowHeight = hiddenTextarea.scrollHeight - paddingSize;
if (minRows !== null) {
minHeight = singleRowHeight * minRows;
if (boxSizing === 'border-box') {
minHeight = minHeight + paddingSize + borderSize;
}
height = Math.max(minHeight, height);
}
if (maxRows !== null) {
maxHeight = singleRowHeight * maxRows;
if (boxSizing === 'border-box') {
maxHeight = maxHeight + paddingSize + borderSize;
}
overflowY = height > maxHeight ? '' : 'hidden';
height = Math.min(maxHeight, height);
}
}
return {
height: height,
minHeight: minHeight,
maxHeight: maxHeight,
overflowY: overflowY,
resize: 'none'
};
}
// EXTERNAL MODULE: ./node_modules/shallowequal/index.js
var shallowequal = __webpack_require__("Gytx");
var shallowequal_default = /*#__PURE__*/__webpack_require__.n(shallowequal);
// CONCATENATED MODULE: ./node_modules/rc-textarea/es/ResizableTextArea.js
// eslint-disable-next-line @typescript-eslint/naming-convention
var RESIZE_STATUS;
(function (RESIZE_STATUS) {
RESIZE_STATUS[RESIZE_STATUS["NONE"] = 0] = "NONE";
RESIZE_STATUS[RESIZE_STATUS["RESIZING"] = 1] = "RESIZING";
RESIZE_STATUS[RESIZE_STATUS["RESIZED"] = 2] = "RESIZED";
})(RESIZE_STATUS || (RESIZE_STATUS = {}));
var ResizableTextArea_ResizableTextArea = /*#__PURE__*/function (_React$Component) {
Object(inherits["a" /* default */])(ResizableTextArea, _React$Component);
var _super = Object(createSuper["a" /* default */])(ResizableTextArea);
function ResizableTextArea(props) {
var _this;
Object(classCallCheck["a" /* default */])(this, ResizableTextArea);
_this = _super.call(this, props);
_this.nextFrameActionId = void 0;
_this.resizeFrameId = void 0;
_this.textArea = void 0;
_this.saveTextArea = function (textArea) {
_this.textArea = textArea;
};
_this.handleResize = function (size) {
var resizeStatus = _this.state.resizeStatus;
var _this$props = _this.props,
autoSize = _this$props.autoSize,
onResize = _this$props.onResize;
if (resizeStatus !== RESIZE_STATUS.NONE) {
return;
}
if (typeof onResize === 'function') {
onResize(size);
}
if (autoSize) {
_this.resizeOnNextFrame();
}
};
_this.resizeOnNextFrame = function () {
cancelAnimationFrame(_this.nextFrameActionId);
_this.nextFrameActionId = requestAnimationFrame(_this.resizeTextarea);
};
_this.resizeTextarea = function () {
var autoSize = _this.props.autoSize;
if (!autoSize || !_this.textArea) {
return;
}
var minRows = autoSize.minRows,
maxRows = autoSize.maxRows;
var textareaStyles = calculateNodeHeight(_this.textArea, false, minRows, maxRows);
_this.setState({
textareaStyles: textareaStyles,
resizeStatus: RESIZE_STATUS.RESIZING
}, function () {
cancelAnimationFrame(_this.resizeFrameId);
_this.resizeFrameId = requestAnimationFrame(function () {
_this.setState({
resizeStatus: RESIZE_STATUS.RESIZED
}, function () {
_this.resizeFrameId = requestAnimationFrame(function () {
_this.setState({
resizeStatus: RESIZE_STATUS.NONE
});
_this.fixFirefoxAutoScroll();
});
});
});
});
};
_this.renderTextArea = function () {
var _this$props2 = _this.props,
_this$props2$prefixCl = _this$props2.prefixCls,
prefixCls = _this$props2$prefixCl === void 0 ? 'rc-textarea' : _this$props2$prefixCl,
autoSize = _this$props2.autoSize,
onResize = _this$props2.onResize,
className = _this$props2.className,
disabled = _this$props2.disabled;
var _this$state = _this.state,
textareaStyles = _this$state.textareaStyles,
resizeStatus = _this$state.resizeStatus;
var otherProps = Object(omit["a" /* default */])(_this.props, ['prefixCls', 'onPressEnter', 'autoSize', 'defaultValue', 'onResize']);
var cls = classnames_default()(prefixCls, className, Object(defineProperty["a" /* default */])({}, "".concat(prefixCls, "-disabled"), disabled)); // Fix https://github.com/ant-design/ant-design/issues/6776
// Make sure it could be reset when using form.getFieldDecorator
if ('value' in otherProps) {
otherProps.value = otherProps.value || '';
}
var style = Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, _this.props.style), textareaStyles), resizeStatus === RESIZE_STATUS.RESIZING ? // React will warning when mix `overflow` & `overflowY`.
// We need to define this separately.
{
overflowX: 'hidden',
overflowY: 'hidden'
} : null);
return /*#__PURE__*/external_window_React_["createElement"](es, {
onResize: _this.handleResize,
disabled: !(autoSize || onResize)
}, /*#__PURE__*/external_window_React_["createElement"]("textarea", Object(esm_extends["a" /* default */])({}, otherProps, {
className: cls,
style: style,
ref: _this.saveTextArea
})));
};
_this.state = {
textareaStyles: {},
resizeStatus: RESIZE_STATUS.NONE
};
return _this;
}
Object(createClass["a" /* default */])(ResizableTextArea, [{
key: "componentDidUpdate",
value: function componentDidUpdate(prevProps) {
// Re-render with the new content or new autoSize property then recalculate the height as required.
if (prevProps.value !== this.props.value || !shallowequal_default()(prevProps.autoSize, this.props.autoSize)) {
this.resizeTextarea();
}
}
}, {
key: "componentWillUnmount",
value: function componentWillUnmount() {
cancelAnimationFrame(this.nextFrameActionId);
cancelAnimationFrame(this.resizeFrameId);
} // https://github.com/ant-design/ant-design/issues/21870
}, {
key: "fixFirefoxAutoScroll",
value: function fixFirefoxAutoScroll() {
try {
if (document.activeElement === this.textArea) {
var currentStart = this.textArea.selectionStart;
var currentEnd = this.textArea.selectionEnd;
this.textArea.setSelectionRange(currentStart, currentEnd);
}
} catch (e) {// Fix error in Chrome:
// Failed to read the 'selectionStart' property from 'HTMLInputElement'
// http://stackoverflow.com/q/21177489/3040605
}
}
}, {
key: "render",
value: function render() {
return this.renderTextArea();
}
}]);
return ResizableTextArea;
}(external_window_React_["Component"]);
/* harmony default export */ var es_ResizableTextArea = (ResizableTextArea_ResizableTextArea);
// CONCATENATED MODULE: ./node_modules/rc-textarea/es/index.js
var es_TextArea = /*#__PURE__*/function (_React$Component) {
Object(inherits["a" /* default */])(TextArea, _React$Component);
var _super = Object(createSuper["a" /* default */])(TextArea);
function TextArea(props) {
var _this;
Object(classCallCheck["a" /* default */])(this, TextArea);
_this = _super.call(this, props);
_this.resizableTextArea = void 0;
_this.focus = function () {
_this.resizableTextArea.textArea.focus();
};
_this.saveTextArea = function (resizableTextArea) {
_this.resizableTextArea = resizableTextArea;
};
_this.handleChange = function (e) {
var onChange = _this.props.onChange;
_this.setValue(e.target.value, function () {
_this.resizableTextArea.resizeTextarea();
});
if (onChange) {
onChange(e);
}
};
_this.handleKeyDown = function (e) {
var _this$props = _this.props,
onPressEnter = _this$props.onPressEnter,
onKeyDown = _this$props.onKeyDown;
if (e.keyCode === 13 && onPressEnter) {
onPressEnter(e);
}
if (onKeyDown) {
onKeyDown(e);
}
};
var value = typeof props.value === 'undefined' || props.value === null ? props.defaultValue : props.value;
_this.state = {
value: value
};
return _this;
}
Object(createClass["a" /* default */])(TextArea, [{
key: "setValue",
value: function setValue(value, callback) {
if (!('value' in this.props)) {
this.setState({
value: value
}, callback);
}
}
}, {
key: "blur",
value: function blur() {
this.resizableTextArea.textArea.blur();
}
}, {
key: "render",
value: function render() {
return /*#__PURE__*/external_window_React_["createElement"](es_ResizableTextArea, Object(esm_extends["a" /* default */])({}, this.props, {
value: this.state.value,
onKeyDown: this.handleKeyDown,
onChange: this.handleChange,
ref: this.saveTextArea
}));
}
}], [{
key: "getDerivedStateFromProps",
value: function getDerivedStateFromProps(nextProps) {
if ('value' in nextProps) {
return {
value: nextProps.value
};
}
return null;
}
}]);
return TextArea;
}(external_window_React_["Component"]);
/* harmony default export */ var rc_textarea_es = __webpack_exports__["default"] = (es_TextArea);
/***/ }),
/***/ "bT9E":
/*!*****************************************!*\
!*** ./node_modules/rc-util/es/omit.js ***!
\*****************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return omit; });
/* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ "VTBJ");
function omit(obj, fields) {
var clone = Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, obj);
if (Array.isArray(fields)) {
fields.forEach(function (key) {
delete clone[key];
});
}
return clone;
}
/***/ }),
/***/ "bp/9":
/*!****************************************************!*\
!*** ./src/pages/User/Detail/[id].tsx + 1 modules ***!
\****************************************************/
/*! exports provided: default */
/*! all exports used */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/User/Detail/Banner/index.less?modules (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/.umi-production/core/umiExports.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/mediator.js */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/authority.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/env.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/dropdown/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/dropdown/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/menu/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/menu/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tooltip/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tooltip/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-router-dom/esm/react-router-dom.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-router/esm/react-router.js */
/*! ModuleConcatenation bailout: Cannot concat with external "window.React" (<- Module is not an ECMAScript module) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js + 1 modules
var objectWithoutProperties = __webpack_require__("PpiC");
// EXTERNAL MODULE: external "window.React"
var external_window_React_ = __webpack_require__("cDcd");
var external_window_React_default = /*#__PURE__*/__webpack_require__.n(external_window_React_);
// EXTERNAL MODULE: ./src/.umi-production/core/umiExports.ts + 17 modules
var umiExports = __webpack_require__("9kvl");
// EXTERNAL MODULE: ./node_modules/antd/es/dropdown/style/index.js
var style = __webpack_require__("qVdP");
// EXTERNAL MODULE: ./node_modules/antd/es/dropdown/index.js
var dropdown = __webpack_require__("jsC+");
// EXTERNAL MODULE: ./node_modules/antd/es/tooltip/style/index.js
var tooltip_style = __webpack_require__("5Dmo");
// EXTERNAL MODULE: ./node_modules/antd/es/tooltip/index.js + 1 modules
var tooltip = __webpack_require__("3S7+");
// EXTERNAL MODULE: ./node_modules/antd/es/menu/style/index.js
var menu_style = __webpack_require__("lUTK");
// EXTERNAL MODULE: ./node_modules/antd/es/menu/index.js + 3 modules
var es_menu = __webpack_require__("BvKs");
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
var asyncToGenerator = __webpack_require__("9og8");
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
var slicedToArray = __webpack_require__("tJVT");
// EXTERNAL MODULE: ./node_modules/antd/es/input/style/index.js
var input_style = __webpack_require__("5NDa");
// EXTERNAL MODULE: ./node_modules/antd/es/input/index.js + 3 modules
var input = __webpack_require__("5rEg");
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator/index.js
var regenerator = __webpack_require__("WmNS");
var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);
// EXTERNAL MODULE: ./node_modules/react-router/esm/react-router.js
var react_router = __webpack_require__("Ty5D");
// EXTERNAL MODULE: ./node_modules/react-router-dom/esm/react-router-dom.js
var react_router_dom = __webpack_require__("55Ip");
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__("m3rI");
// EXTERNAL MODULE: ./src/components/mediator.js
var mediator = __webpack_require__("dhSg");
// EXTERNAL MODULE: ./src/pages/User/Detail/Banner/index.less?modules
var Bannermodules = __webpack_require__("5Lld");
var Bannermodules_default = /*#__PURE__*/__webpack_require__.n(Bannermodules);
// EXTERNAL MODULE: ./src/utils/authority.ts
var authority = __webpack_require__("xKgJ");
// CONCATENATED MODULE: ./src/pages/User/Detail/Banner/index.tsx
var Search = input["a" /* default */].Search;
var NavType;
(function (NavType) {
NavType["Classrooms"] = "classrooms";
NavType["Shixuns"] = "shixuns";
NavType["Paths"] = "paths";
NavType["Projects"] = "projects";
NavType["Videos"] = "videos";
NavType["Topics"] = "topics";
NavType["Teach"] = "teach-group";
NavType["CreateImg"] = "experiment-img";
NavType["Certificate"] = "certificate";
NavType["OtherResources"] = "other-resources";
NavType["UserPortrait"] = "userPortrait";
NavType["LearningPath"] = "learningPath";
NavType["virtualSpaces"] = "virtual_spaces";
})(NavType || (NavType = {}));
var showSearchMapping = [{
name: 'classrooms',
placeholder: '请搜索课堂/课程名称'
}, {
name: 'shixuns',
placeholder: '搜索实践项目'
}, {
name: 'paths',
placeholder: '搜索实践课程'
}, {
name: 'videos',
placeholder: '搜索视频'
}];
var Banner_Banner = function Banner(_ref) {
var _user$userInfo, _location$pathname$sp3, _user$userInfo2, _user$userInfo3, _user$userInfo4, _userDetail$homepageI, _userDetail$homepageI2, _userDetail$homepageI3, _userDetail$homepageI4, _userDetail$homepageI5, _userDetail$homepageI6, _userDetail$homepageI7, _userDetail$homepageI8, _userDetail$homepageI9, _userDetail$homepageI10, _user$userInfo5, _userDetail$homepageI11, _find, _globalSetting$settin, _find2, _globalSetting$settin2, _find3, _globalSetting$settin3, _user$userInfo6, _globalSetting$settin4, _user$userInfo7, _globalSetting$settin5, _user$userInfo8, _user$userInfo9, _user$userInfo10, _user$userInfo11, _showSearchMapping$fi;
var userDetail = _ref.userDetail,
user = _ref.user,
globalSetting = _ref.globalSetting,
loading = _ref.loading,
dispatch = _ref.dispatch,
props = Object(objectWithoutProperties["a" /* default */])(_ref, ["userDetail", "user", "globalSetting", "loading", "dispatch"]);
var location = Object(react_router["h" /* useLocation */])();
var username = Object(external_window_React_["useRef"])();
var _useState = Object(external_window_React_["useState"])(),
_useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
activeKey = _useState2[0],
setActiveKey = _useState2[1];
var _useState3 = Object(external_window_React_["useState"])(),
_useState4 = Object(slicedToArray["a" /* default */])(_useState3, 2),
searchValue = _useState4[0],
setSearchValue = _useState4[1];
var params = Object(react_router["i" /* useParams */])(); // console.log('-----',useParams());
Object(external_window_React_["useEffect"])(function () {
var _location$pathname$sp, _location$pathname$sp2;
username.current = (_location$pathname$sp = location.pathname.split('/')) === null || _location$pathname$sp === void 0 ? void 0 : _location$pathname$sp[2];
var active = (_location$pathname$sp2 = location.pathname.split('/')) === null || _location$pathname$sp2 === void 0 ? void 0 : _location$pathname$sp2[3];
setActiveKey(active || NavType.Classrooms);
setSearchValue(null);
}, [location.pathname]);
var handleSigned = /*#__PURE__*/function () {
var _ref2 = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee() {
var res;
return regenerator_default.a.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return dispatch({
type: 'userDetail/signed'
});
case 2:
res = _context.sent;
if (res) {
dispatch({
type: 'userDetail/getHomepageInfo',
payload: {
username: username.current
}
});
}
case 4:
case "end":
return _context.stop();
}
}
}, _callee);
}));
return function handleSigned() {
return _ref2.apply(this, arguments);
};
}();
var isCurrent = ((_user$userInfo = user.userInfo) === null || _user$userInfo === void 0 ? void 0 : _user$userInfo.login) === username.current;
var currentTabName = ((_location$pathname$sp3 = location.pathname.split('/')) === null || _location$pathname$sp3 === void 0 ? void 0 : _location$pathname$sp3[3]) || 'classrooms';
var handleSearch = function handleSearch(value) {
mediator["a" /* default */].publish('user-detail-search', {
currentTabName: currentTabName,
value: value
});
};
var menu = /*#__PURE__*/external_window_React_default.a.createElement(es_menu["a" /* default */], null, /*#__PURE__*/external_window_React_default.a.createElement(es_menu["a" /* default */].Item, null, /*#__PURE__*/external_window_React_default.a.createElement("li", {
className: "".concat(activeKey === NavType.virtualSpaces ? Bannermodules_default.a.active2 : '')
}, /*#__PURE__*/external_window_React_default.a.createElement(react_router_dom["a" /* Link */], {
to: "/users/".concat(username.current, "/vspaces"),
onClick: function onClick() {
return setActiveKey(NavType.virtualSpaces);
},
className: "c-grey-333"
}, "\u865A\u62DF\u793E\u533A"))), ((_user$userInfo2 = user.userInfo) === null || _user$userInfo2 === void 0 ? void 0 : _user$userInfo2.login) === (params === null || params === void 0 ? void 0 : params.username) && ((_user$userInfo3 = user.userInfo) === null || _user$userInfo3 === void 0 ? void 0 : _user$userInfo3.is_mirror_marker) && /*#__PURE__*/external_window_React_default.a.createElement(es_menu["a" /* default */].Item, null, /*#__PURE__*/external_window_React_default.a.createElement("li", {
className: "".concat(activeKey === NavType.CreateImg ? Bannermodules_default.a.active2 : '')
}, /*#__PURE__*/external_window_React_default.a.createElement(react_router_dom["a" /* Link */], {
to: "/users/".concat(username.current, "/experiment-img"),
onClick: function onClick() {
return setActiveKey(NavType.CreateImg);
},
className: "c-grey-333"
}, "\u5B9E\u9A8C\u955C\u50CF"))), /*#__PURE__*/external_window_React_default.a.createElement(es_menu["a" /* default */].Item, null, /*#__PURE__*/external_window_React_default.a.createElement("li", {
className: "".concat(activeKey === NavType.Certificate ? Bannermodules_default.a.active2 : '')
}, /*#__PURE__*/external_window_React_default.a.createElement(react_router_dom["a" /* Link */], {
to: "/users/".concat(username.current, "/certificate"),
onClick: function onClick() {
return setActiveKey(NavType.Certificate);
},
className: "c-grey-333"
}, "\u8BC1\u4E66\u7BA1\u7406"))), ((_user$userInfo4 = user.userInfo) === null || _user$userInfo4 === void 0 ? void 0 : _user$userInfo4.login) === (params === null || params === void 0 ? void 0 : params.username) && /*#__PURE__*/external_window_React_default.a.createElement(es_menu["a" /* default */].Item, null, /*#__PURE__*/external_window_React_default.a.createElement("li", {
className: "".concat(activeKey === NavType.Teach ? Bannermodules_default.a.active2 : '')
}, /*#__PURE__*/external_window_React_default.a.createElement(react_router_dom["a" /* Link */], {
to: "/users/".concat(username.current, "/teach-group"),
onClick: function onClick() {
return setActiveKey(NavType.Teach);
},
className: "c-grey-333"
}, "\u6559\u7814\u56E2\u961F"))), /*#__PURE__*/external_window_React_default.a.createElement(es_menu["a" /* default */].Item, null, /*#__PURE__*/external_window_React_default.a.createElement("li", {
className: "".concat(activeKey === NavType.OtherResources ? Bannermodules_default.a.active2 : '')
}, /*#__PURE__*/external_window_React_default.a.createElement(react_router_dom["a" /* Link */], {
to: "/users/".concat(username.current, "/otherResources"),
onClick: function onClick() {
return setActiveKey(NavType.OtherResources);
},
className: "c-grey-333"
}, "\u5176\u4ED6\u5E73\u53F0\u8D44\u6E90"))));
return /*#__PURE__*/external_window_React_default.a.createElement("section", null, /*#__PURE__*/external_window_React_default.a.createElement("aside", {
className: Bannermodules_default.a.banner
}, /*#__PURE__*/external_window_React_default.a.createElement("aside", {
className: Bannermodules_default.a.wrap
}, /*#__PURE__*/external_window_React_default.a.createElement("div", {
className: Bannermodules_default.a.contentWrap
}, /*#__PURE__*/external_window_React_default.a.createElement("div", {
className: Bannermodules_default.a.leftWrap
}, /*#__PURE__*/external_window_React_default.a.createElement("p", {
className: Bannermodules_default.a.avatarWrap
}, ((_userDetail$homepageI = userDetail.homepageInfo) === null || _userDetail$homepageI === void 0 ? void 0 : _userDetail$homepageI.avatar_url) && /*#__PURE__*/external_window_React_default.a.createElement("img", {
className: Bannermodules_default.a.avatar,
alt: "\u5934\u50CF",
src: "".concat(env["a" /* default */].IMG_SERVER, "/images/").concat((_userDetail$homepageI2 = userDetail.homepageInfo) === null || _userDetail$homepageI2 === void 0 ? void 0 : _userDetail$homepageI2.avatar_url)
})), /*#__PURE__*/external_window_React_default.a.createElement("div", null, /*#__PURE__*/external_window_React_default.a.createElement("p", {
className: "mb0 mt20"
}, /*#__PURE__*/external_window_React_default.a.createElement("span", {
className: Bannermodules_default.a.username
}, (_userDetail$homepageI3 = userDetail.homepageInfo) === null || _userDetail$homepageI3 === void 0 ? void 0 : _userDetail$homepageI3.name)), /*#__PURE__*/external_window_React_default.a.createElement("p", {
className: "mb0 mt15"
}, /*#__PURE__*/external_window_React_default.a.createElement(tooltip["a" /* default */], {
placement: "bottom",
title: (_userDetail$homepageI4 = userDetail.homepageInfo) !== null && _userDetail$homepageI4 !== void 0 && _userDetail$homepageI4.professional_certification ? '已职业认证' : '未职业认证'
}, /*#__PURE__*/external_window_React_default.a.createElement("i", {
className: (_userDetail$homepageI5 = userDetail.homepageInfo) !== null && _userDetail$homepageI5 !== void 0 && _userDetail$homepageI5.professional_certification ? "iconfont icon-shenfenzhenghaomaguizheng font18 mr20 ml2 ".concat(Bannermodules_default.a.color98EBFF) : "iconfont icon-shenfenzhenghaomaguizheng font18 mr20 ml2 ".concat(Bannermodules_default.a.colorB8)
})), /*#__PURE__*/external_window_React_default.a.createElement(tooltip["a" /* default */], {
placement: "bottom",
title: (_userDetail$homepageI6 = userDetail.homepageInfo) !== null && _userDetail$homepageI6 !== void 0 && _userDetail$homepageI6.authentication ? '已实名认证' : '未实名认证'
}, /*#__PURE__*/external_window_React_default.a.createElement("i", {
className: (_userDetail$homepageI7 = userDetail.homepageInfo) !== null && _userDetail$homepageI7 !== void 0 && _userDetail$homepageI7.authentication ? "iconfont icon-renzhengshangjia font18 ".concat(Bannermodules_default.a.color98EBFF) : "iconfont icon-renzhengshangjia font18 ".concat(Bannermodules_default.a.colorB8)
}))))), /*#__PURE__*/external_window_React_default.a.createElement("div", {
className: Bannermodules_default.a.rightWrap
}, /*#__PURE__*/external_window_React_default.a.createElement("div", {
className: "mt20 ".concat(Bannermodules_default.a.countWrap)
}, /*#__PURE__*/external_window_React_default.a.createElement("div", {
className: Bannermodules_default.a.count
}, /*#__PURE__*/external_window_React_default.a.createElement("span", null, isCurrent ? '我' : 'TA', "\u7684\u7ECF\u9A8C\u503C"), /*#__PURE__*/external_window_React_default.a.createElement("a", null, (_userDetail$homepageI8 = userDetail.homepageInfo) === null || _userDetail$homepageI8 === void 0 ? void 0 : _userDetail$homepageI8.experience)), /*#__PURE__*/external_window_React_default.a.createElement("div", {
className: "".concat(Bannermodules_default.a.count, " ").concat(Bannermodules_default.a.grade)
}, /*#__PURE__*/external_window_React_default.a.createElement("span", null, isCurrent ? '我' : 'TA', "\u7684\u91D1\u5E01"), /*#__PURE__*/external_window_React_default.a.createElement("a", null, (_userDetail$homepageI9 = userDetail.homepageInfo) === null || _userDetail$homepageI9 === void 0 ? void 0 : _userDetail$homepageI9.grade))), /*#__PURE__*/external_window_React_default.a.createElement("span", {
className: "mt35 ml60"
}, isCurrent ? /*#__PURE__*/external_window_React_default.a.createElement(external_window_React_default.a.Fragment, null, (_userDetail$homepageI10 = userDetail.homepageInfo) !== null && _userDetail$homepageI10 !== void 0 && _userDetail$homepageI10.attendance_signed ? /*#__PURE__*/external_window_React_default.a.createElement("span", {
className: "".concat(Bannermodules_default.a.bcCC, " ").concat(Bannermodules_default.a.signed)
}, "\u5DF2\u7B7E\u5230") : /*#__PURE__*/external_window_React_default.a.createElement("a", {
className: "".concat(Bannermodules_default.a.bcFF8E02, " ").concat(Bannermodules_default.a.signed),
onClick: handleSigned
}, "\u7B7E\u5230")) : /*#__PURE__*/external_window_React_default.a.createElement(react_router_dom["a" /* Link */], {
className: "".concat(Bannermodules_default.a.bcFF8E02, " ").concat(Bannermodules_default.a.signed),
to: "/messages/".concat((_user$userInfo5 = user.userInfo) === null || _user$userInfo5 === void 0 ? void 0 : _user$userInfo5.login, "/message_detail?target_ids=").concat((_userDetail$homepageI11 = userDetail.homepageInfo) === null || _userDetail$homepageI11 === void 0 ? void 0 : _userDetail$homepageI11.id)
}, "\u79C1\u4FE1")))), /*#__PURE__*/external_window_React_default.a.createElement("div", {
className: Bannermodules_default.a.nav
}, !((_find = (((_globalSetting$settin = globalSetting.setting) === null || _globalSetting$settin === void 0 ? void 0 : _globalSetting$settin.navbar) || []).find(function (item) {
return item.link === "/".concat(NavType.Classrooms);
})) !== null && _find !== void 0 && _find.hidden) && /*#__PURE__*/external_window_React_default.a.createElement("li", {
className: "".concat(activeKey === NavType.Classrooms ? Bannermodules_default.a.active : '')
}, /*#__PURE__*/external_window_React_default.a.createElement(react_router_dom["a" /* Link */], {
to: "/users/".concat(username.current, "/classrooms"),
onClick: function onClick() {
return setActiveKey(NavType.Classrooms);
}
}, "\u6559\u5B66\u8BFE\u5802")), !((_find2 = (((_globalSetting$settin2 = globalSetting.setting) === null || _globalSetting$settin2 === void 0 ? void 0 : _globalSetting$settin2.navbar) || []).find(function (item) {
return item.link === "/".concat(NavType.Shixuns);
})) !== null && _find2 !== void 0 && _find2.hidden) && /*#__PURE__*/external_window_React_default.a.createElement("li", {
className: "".concat(activeKey === NavType.Shixuns ? Bannermodules_default.a.active : '')
}, /*#__PURE__*/external_window_React_default.a.createElement(react_router_dom["a" /* Link */], {
to: "/users/".concat(username.current, "/shixuns"),
onClick: function onClick() {
return setActiveKey(NavType.Shixuns);
}
}, "\u5B9E\u8DF5\u9879\u76EE")), !((_find3 = (((_globalSetting$settin3 = globalSetting.setting) === null || _globalSetting$settin3 === void 0 ? void 0 : _globalSetting$settin3.navbar) || []).find(function (item) {
return item.link === "/".concat(NavType.Paths);
})) !== null && _find3 !== void 0 && _find3.hidden) && /*#__PURE__*/external_window_React_default.a.createElement("li", {
className: "".concat(activeKey === NavType.Paths ? Bannermodules_default.a.active : '')
}, /*#__PURE__*/external_window_React_default.a.createElement(react_router_dom["a" /* Link */], {
to: "/users/".concat(username.current, "/paths"),
onClick: function onClick() {
return setActiveKey(NavType.Paths);
}
}, "\u5B9E\u8DF5\u8BFE\u7A0B")), ((_user$userInfo6 = user.userInfo) === null || _user$userInfo6 === void 0 ? void 0 : _user$userInfo6.main_site) && !((_globalSetting$settin4 = globalSetting.setting) !== null && _globalSetting$settin4 !== void 0 && _globalSetting$settin4.is_local) && /*#__PURE__*/external_window_React_default.a.createElement("li", {
className: "".concat(activeKey === NavType.Projects ? Bannermodules_default.a.active : '')
}, /*#__PURE__*/external_window_React_default.a.createElement(react_router_dom["a" /* Link */], {
to: "/users/".concat(username.current, "/projects"),
onClick: function onClick() {
return setActiveKey(NavType.Projects);
}
}, "\u5F00\u53D1\u9879\u76EE")), ((_user$userInfo7 = user.userInfo) === null || _user$userInfo7 === void 0 ? void 0 : _user$userInfo7.main_site) && !((_globalSetting$settin5 = globalSetting.setting) !== null && _globalSetting$settin5 !== void 0 && _globalSetting$settin5.is_local) && (isCurrent && ((_user$userInfo8 = user.userInfo) === null || _user$userInfo8 === void 0 ? void 0 : _user$userInfo8.is_teacher) || ((_user$userInfo9 = user.userInfo) === null || _user$userInfo9 === void 0 ? void 0 : _user$userInfo9.admin)) && /*#__PURE__*/external_window_React_default.a.createElement("li", {
className: "".concat(activeKey === NavType.Videos ? Bannermodules_default.a.active : '')
}, /*#__PURE__*/external_window_React_default.a.createElement(react_router_dom["a" /* Link */], {
to: "/users/".concat(username.current, "/videos"),
onClick: function onClick() {
return setActiveKey(NavType.Videos);
}
}, "\u89C6\u9891")), ((_user$userInfo10 = user.userInfo) === null || _user$userInfo10 === void 0 ? void 0 : _user$userInfo10.main_site) && isCurrent && ((_user$userInfo11 = user.userInfo) === null || _user$userInfo11 === void 0 ? void 0 : _user$userInfo11.is_teacher) && /*#__PURE__*/external_window_React_default.a.createElement("li", {
className: "".concat(activeKey === NavType.Topics ? Bannermodules_default.a.active : '')
}, /*#__PURE__*/external_window_React_default.a.createElement(react_router_dom["a" /* Link */], {
to: "/users/".concat(username.current, "/topics/personal"),
onClick: function onClick() {
return setActiveKey(NavType.Topics);
}
}, "\u8BFE\u5802\u8D44\u6E90")), Object(authority["n" /* isCommonSuperAdmin */])() && /*#__PURE__*/external_window_React_default.a.createElement("li", {
className: "".concat(activeKey === NavType.LearningPath ? Bannermodules_default.a.active : '')
}, /*#__PURE__*/external_window_React_default.a.createElement(react_router_dom["a" /* Link */], {
to: "/users/".concat(username.current, "/learningPath"),
onClick: function onClick() {
return setActiveKey(NavType.LearningPath);
}
}, "\u5B66\u4E60\u8DEF\u5F84")), Object(authority["n" /* isCommonSuperAdmin */])() && /*#__PURE__*/external_window_React_default.a.createElement("li", {
className: "".concat(activeKey === NavType.UserPortrait ? Bannermodules_default.a.active : '')
}, /*#__PURE__*/external_window_React_default.a.createElement(react_router_dom["a" /* Link */], {
to: "/users/".concat(username.current, "/userPortrait"),
onClick: function onClick() {
return setActiveKey(NavType.UserPortrait);
}
}, "\u7528\u6237\u753B\u50CF")), /*#__PURE__*/external_window_React_default.a.createElement(dropdown["a" /* default */], {
overlay: menu,
placement: "bottomCenter"
}, /*#__PURE__*/external_window_React_default.a.createElement("li", {
className: "font16"
}, "\u66F4\u591A")), showSearchMapping.find(function (x) {
return x.name === currentTabName;
}) && /*#__PURE__*/external_window_React_default.a.createElement("div", {
className: Bannermodules_default.a.search
}, /*#__PURE__*/external_window_React_default.a.createElement(Search, {
placeholder: (_showSearchMapping$fi = showSearchMapping.find(function (x) {
return x.name === currentTabName;
})) === null || _showSearchMapping$fi === void 0 ? void 0 : _showSearchMapping$fi.placeholder,
style: {
width: 200
},
allowClear: true,
value: searchValue,
onChange: function onChange(e) {
return setSearchValue(e.target.value);
},
onSearch: handleSearch
}))))));
};
/* harmony default export */ var Detail_Banner = (Object(umiExports["a" /* connect */])(function (_ref3) {
var user = _ref3.user,
userDetail = _ref3.userDetail,
loading = _ref3.loading,
globalSetting = _ref3.globalSetting;
return {
user: user,
userDetail: userDetail,
globalSetting: globalSetting,
loading: loading.models.index
};
})(Banner_Banner));
// CONCATENATED MODULE: ./src/pages/User/Detail/[id].tsx
var _id_UserDetailPage = function UserDetailPage(_ref) {
var userDetail = _ref.userDetail,
globalSetting = _ref.globalSetting,
loading = _ref.loading,
dispatch = _ref.dispatch,
props = Object(objectWithoutProperties["a" /* default */])(_ref, ["userDetail", "globalSetting", "loading", "dispatch"]);
var username = Object(external_window_React_["useRef"])();
Object(external_window_React_["useEffect"])(function () {
username.current = props.match.params.username; // dispatch({
// type: 'userDetail/getSystemUpdate',
// })
dispatch({
type: 'userDetail/getHomepageInfo',
payload: {
username: username.current
}
});
}, [props.match.params]);
return /*#__PURE__*/external_window_React_default.a.createElement("section", null, /*#__PURE__*/external_window_React_default.a.createElement(Detail_Banner, null), props.children);
};
/* harmony default export */ var _id_ = __webpack_exports__["default"] = (Object(umiExports["a" /* connect */])(function (_ref2) {
var userDetail = _ref2.userDetail,
loading = _ref2.loading,
globalSetting = _ref2.globalSetting;
return {
userDetail: userDetail,
globalSetting: globalSetting,
loading: loading.models.index
};
})(_id_UserDetailPage));
/***/ })
}]);