@sms-frontend/components
Version:
SMS Design React UI Library.
198 lines (175 loc) • 3.08 MB
JavaScript
/*!
* ArcoDesign v1.0.5
*
* Copyright 2019-present, Bytedance, Inc.
* All rights reserved.
*
*/
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("react"), require("react-dom"));
else if(typeof define === 'function' && define.amd)
define(["react", "react-dom"], factory);
else if(typeof exports === 'object')
exports["arco"] = factory(require("react"), require("react-dom"));
else
root["arco"] = factory(root["React"], root["ReactDOM"]);
})(window, function(__WEBPACK_EXTERNAL_MODULE_react__, __WEBPACK_EXTERNAL_MODULE_react_dom__) {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = "./components/index.tsx");
/******/ })
/************************************************************************/
/******/ ({
/***/ "./components/Affix/index.tsx":
/*!************************************!*\
!*** ./components/Affix/index.tsx ***!
\************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _util_throttleByRaf__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_util/throttleByRaf */ \"./components/_util/throttleByRaf.ts\");\n/* harmony import */ var _util_classNames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../_util/classNames */ \"./components/_util/classNames.ts\");\n/* harmony import */ var _ConfigProvider__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../ConfigProvider */ \"./components/ConfigProvider/index.tsx\");\n/* harmony import */ var _util_dom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../_util/dom */ \"./components/_util/dom.ts\");\n/* harmony import */ var _util_resizeObserver__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../_util/resizeObserver */ \"./components/_util/resizeObserver.tsx\");\n/* harmony import */ var _util_is__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../_util/is */ \"./components/_util/is.ts\");\n/* harmony import */ var _util_hooks_useIsomorphicLayoutEffect__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../_util/hooks/useIsomorphicLayoutEffect */ \"./components/_util/hooks/useIsomorphicLayoutEffect.ts\");\n/* harmony import */ var _util_hooks_useMergeProps__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../_util/hooks/useMergeProps */ \"./components/_util/hooks/useMergeProps.ts\");\nvar __assign = undefined && undefined.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n }\n\n return t;\n };\n\n return __assign.apply(this, arguments);\n};\n\nvar __read = undefined && undefined.__read || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o),\n r,\n ar = [],\n e;\n\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {\n ar.push(r.value);\n }\n } catch (error) {\n e = {\n error: error\n };\n } finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n } finally {\n if (e) throw e.error;\n }\n }\n\n return ar;\n};\n\n\n\n\n\n\n\n\n\n\n\nfunction getTargetRect(target) {\n return Object(_util_is__WEBPACK_IMPORTED_MODULE_6__[\"isWindow\"])(target) ? {\n top: 0,\n bottom: window.innerHeight\n } : target.getBoundingClientRect();\n}\n\nvar defaultProps = {\n offsetTop: 0,\n target: function target() {\n return window;\n }\n};\n\nfunction Affix(baseProps, ref) {\n var _a;\n\n var _b = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useContext\"])(_ConfigProvider__WEBPACK_IMPORTED_MODULE_3__[\"ConfigContext\"]),\n getPrefixCls = _b.getPrefixCls,\n componentConfig = _b.componentConfig;\n\n var props = Object(_util_hooks_useMergeProps__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(baseProps, defaultProps, componentConfig === null || componentConfig === void 0 ? void 0 : componentConfig.Affix);\n var className = props.className,\n style = props.style,\n affixClassName = props.affixClassName,\n affixStyle = props.affixStyle,\n offsetTop = props.offsetTop,\n offsetBottom = props.offsetBottom,\n target = props.target,\n targetContainer = props.targetContainer,\n children = props.children,\n onChange = props.onChange;\n\n var _c = __read(Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])({\n status: 'MEASURE_DONE',\n isFixed: false,\n sizeStyles: {},\n fixedStyles: {}\n }), 2),\n state = _c[0],\n setState = _c[1];\n\n var isFixed = state.isFixed,\n sizeStyles = state.sizeStyles,\n fixedStyles = state.fixedStyles;\n var lastIsFixed = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"])(isFixed);\n var prefixCls = getPrefixCls('affix');\n var classNames = Object(_util_classNames__WEBPACK_IMPORTED_MODULE_2__[\"default\"])((_a = {}, _a[prefixCls] = isFixed, _a), affixClassName);\n var wrapperRef = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"])(null);\n var targetRef = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"])(null);\n var updatePosition = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useCallback\"])(Object(_util_throttleByRaf__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(function () {\n setState({\n status: 'MEASURE_START',\n isFixed: false,\n fixedStyles: {},\n sizeStyles: {}\n });\n }), []);\n Object(_util_hooks_useIsomorphicLayoutEffect__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(function () {\n var status = state.status;\n if (status !== 'MEASURE_START' || !wrapperRef.current || !targetRef.current) return;\n var offsetType = Object(_util_is__WEBPACK_IMPORTED_MODULE_6__[\"isUndefined\"])(offsetBottom) ? 'top' : 'bottom';\n var wrapperRect = wrapperRef.current.getBoundingClientRect();\n var targetRect = getTargetRect(targetRef.current);\n var newIsFixed = false;\n var newFixedStyles = {};\n\n if (offsetType === 'top') {\n newIsFixed = wrapperRect.top - targetRect.top < (offsetTop || 0);\n newFixedStyles = newIsFixed ? {\n position: 'fixed',\n top: targetRect.top + (offsetTop || 0)\n } : {};\n } else {\n newIsFixed = targetRect.bottom - wrapperRect.bottom < (offsetBottom || 0);\n newFixedStyles = newIsFixed ? {\n position: 'fixed',\n bottom: window.innerHeight - targetRect.bottom + (offsetBottom || 0)\n } : {};\n }\n\n var newSizeStyles = newIsFixed ? {\n width: wrapperRef.current.offsetWidth,\n height: wrapperRef.current.offsetHeight\n } : {};\n setState({\n status: 'MEASURE_DONE',\n isFixed: newIsFixed,\n sizeStyles: newSizeStyles,\n fixedStyles: __assign(__assign({}, newFixedStyles), newSizeStyles)\n });\n\n if (newIsFixed !== lastIsFixed.current) {\n lastIsFixed.current = newIsFixed;\n Object(_util_is__WEBPACK_IMPORTED_MODULE_6__[\"isFunction\"])(onChange) && onChange(newIsFixed);\n }\n }, [state, offsetBottom, offsetTop, onChange]);\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(function () {\n updatePosition();\n }, [target, targetContainer, offsetBottom, offsetTop, updatePosition]); // listen to scroll and resize event of target and update position correspondingly\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(function () {\n targetRef.current = target && Object(_util_is__WEBPACK_IMPORTED_MODULE_6__[\"isFunction\"])(target) ? target() : null;\n\n if (targetRef.current) {\n Object(_util_dom__WEBPACK_IMPORTED_MODULE_4__[\"on\"])(targetRef.current, 'scroll', updatePosition);\n Object(_util_dom__WEBPACK_IMPORTED_MODULE_4__[\"on\"])(targetRef.current, 'resize', updatePosition);\n return function () {\n Object(_util_dom__WEBPACK_IMPORTED_MODULE_4__[\"off\"])(targetRef.current, 'scroll', updatePosition);\n Object(_util_dom__WEBPACK_IMPORTED_MODULE_4__[\"off\"])(targetRef.current, 'resize', updatePosition);\n };\n }\n }, [target, updatePosition]);\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(function () {\n var container = targetContainer && Object(_util_is__WEBPACK_IMPORTED_MODULE_6__[\"isFunction\"])(targetContainer) ? targetContainer() : null; // listen to scroll event of container if target is not window\n\n if (targetRef.current !== window && container) {\n Object(_util_dom__WEBPACK_IMPORTED_MODULE_4__[\"on\"])(container, 'scroll', updatePosition);\n return function () {\n Object(_util_dom__WEBPACK_IMPORTED_MODULE_4__[\"off\"])(container, 'scroll', updatePosition);\n };\n }\n }, [targetContainer, updatePosition]);\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useImperativeHandle\"])(ref, function () {\n return {\n updatePosition: updatePosition\n };\n });\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_util_resizeObserver__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n onResize: updatePosition\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: Object(_util_classNames__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(className),\n style: style,\n ref: wrapperRef\n }, isFixed && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n style: sizeStyles\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: classNames,\n style: __assign(__assign({}, fixedStyles), Object(_util_is__WEBPACK_IMPORTED_MODULE_6__[\"isObject\"])(affixStyle) ? affixStyle : {})\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_util_resizeObserver__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n onResize: updatePosition\n }, children || /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null)))));\n}\n\nvar AffixComponent = /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_0__[\"forwardRef\"])(Affix);\nAffixComponent.displayName = 'Affix';\n/* harmony default export */ __webpack_exports__[\"default\"] = (AffixComponent);\n\n//# sourceURL=webpack://%5Bname%5D/./components/Affix/index.tsx?");
/***/ }),
/***/ "./components/Alert/index.tsx":
/*!************************************!*\
!*** ./components/Alert/index.tsx ***!
\************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react_transition_group__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-transition-group */ \"./node_modules/react-transition-group/esm/index.js\");\n/* harmony import */ var _icon_react_icon_IconCheckCircleFill__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../icon/react-icon/IconCheckCircleFill */ \"./icon/react-icon/IconCheckCircleFill/index.js\");\n/* harmony import */ var _icon_react_icon_IconCloseCircleFill__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../icon/react-icon/IconCloseCircleFill */ \"./icon/react-icon/IconCloseCircleFill/index.js\");\n/* harmony import */ var _icon_react_icon_IconInfoCircleFill__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../icon/react-icon/IconInfoCircleFill */ \"./icon/react-icon/IconInfoCircleFill/index.js\");\n/* harmony import */ var _icon_react_icon_IconExclamationCircleFill__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../icon/react-icon/IconExclamationCircleFill */ \"./icon/react-icon/IconExclamationCircleFill/index.js\");\n/* harmony import */ var _icon_react_icon_IconClose__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../icon/react-icon/IconClose */ \"./icon/react-icon/IconClose/index.js\");\n/* harmony import */ var _util_classNames__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../_util/classNames */ \"./components/_util/classNames.ts\");\n/* harmony import */ var _ConfigProvider__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../ConfigProvider */ \"./components/ConfigProvider/index.tsx\");\n/* harmony import */ var _util_hooks_useMergeProps__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../_util/hooks/useMergeProps */ \"./components/_util/hooks/useMergeProps.ts\");\nvar __read = undefined && undefined.__read || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o),\n r,\n ar = [],\n e;\n\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {\n ar.push(r.value);\n }\n } catch (error) {\n e = {\n error: error\n };\n } finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n } finally {\n if (e) throw e.error;\n }\n }\n\n return ar;\n};\n\n\n\n\n\n\n\n\n\n\n\nvar defaultProps = {\n showIcon: true,\n type: 'info'\n};\n\nfunction Alert(baseProps, ref) {\n var _a;\n\n var _b = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useContext\"])(_ConfigProvider__WEBPACK_IMPORTED_MODULE_8__[\"ConfigContext\"]),\n getPrefixCls = _b.getPrefixCls,\n componentConfig = _b.componentConfig;\n\n var props = Object(_util_hooks_useMergeProps__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(baseProps, defaultProps, componentConfig === null || componentConfig === void 0 ? void 0 : componentConfig.Alert);\n var style = props.style,\n className = props.className,\n action = props.action,\n _c = props.type,\n type = _c === void 0 ? 'info' : _c,\n title = props.title,\n content = props.content,\n icon = props.icon,\n showIcon = props.showIcon,\n closable = props.closable,\n closeable = props.closeable,\n afterClose = props.afterClose,\n onClose = props.onClose,\n closeElement = props.closeElement,\n banner = props.banner;\n var prefixCls = getPrefixCls('alert');\n\n var _d = __read(Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(true), 2),\n visible = _d[0],\n setVisible = _d[1];\n\n function renderIcon(type) {\n if (icon) {\n return icon;\n }\n\n switch (type) {\n case 'info':\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_icon_react_icon_IconInfoCircleFill__WEBPACK_IMPORTED_MODULE_4__[\"default\"], null);\n\n case 'success':\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_icon_react_icon_IconCheckCircleFill__WEBPACK_IMPORTED_MODULE_2__[\"default\"], null);\n\n case 'warning':\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_icon_react_icon_IconExclamationCircleFill__WEBPACK_IMPORTED_MODULE_5__[\"default\"], null);\n\n case 'error':\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_icon_react_icon_IconCloseCircleFill__WEBPACK_IMPORTED_MODULE_3__[\"default\"], null);\n\n default:\n return null;\n }\n }\n\n function onHandleClose(e) {\n setVisible(false);\n onClose && onClose(e);\n }\n\n var classNames = Object(_util_classNames__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(prefixCls, prefixCls + \"-\" + type, (_a = {}, _a[prefixCls + \"-with-title\"] = title, _a[prefixCls + \"-banner\"] = banner, _a), className);\n\n var _closable = 'closeable' in props ? closeable : closable;\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react_transition_group__WEBPACK_IMPORTED_MODULE_1__[\"CSSTransition\"], {\n \"in\": visible,\n timeout: 300,\n classNames: \"zoomInTop\",\n unmountOnExit: true,\n onExited: function onExited() {\n afterClose && afterClose();\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n ref: ref,\n style: style,\n className: classNames\n }, showIcon && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: prefixCls + \"-icon-wrapper\"\n }, renderIcon(type)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: prefixCls + \"-content-wrapper\"\n }, title && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: prefixCls + \"-title\"\n }, title), content && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: prefixCls + \"-content\"\n }, content)), action && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: prefixCls + \"-action\"\n }, action), _closable && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n onClick: onHandleClose,\n className: prefixCls + \"-close-btn\"\n }, closeElement || /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_icon_react_icon_IconClose__WEBPACK_IMPORTED_MODULE_6__[\"default\"], null))));\n}\n\nvar AlertComponent = /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_0__[\"forwardRef\"])(Alert);\nAlertComponent.displayName = 'Alert';\n/* harmony default export */ __webpack_exports__[\"default\"] = (AlertComponent);\n\n//# sourceURL=webpack://%5Bname%5D/./components/Alert/index.tsx?");
/***/ }),
/***/ "./components/Anchor/anchor.tsx":
/*!**************************************!*\
!*** ./components/Anchor/anchor.tsx ***!
\**************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash_throttle__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/throttle */ \"./node_modules/lodash/throttle.js\");\n/* harmony import */ var lodash_throttle__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_throttle__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var compute_scroll_into_view__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! compute-scroll-into-view */ \"./node_modules/compute-scroll-into-view/es/index.js\");\n/* harmony import */ var scroll_into_view_if_needed__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! scroll-into-view-if-needed */ \"./node_modules/scroll-into-view-if-needed/es/index.js\");\n/* harmony import */ var _util_is__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../_util/is */ \"./components/_util/is.ts\");\n/* harmony import */ var _util_dom__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../_util/dom */ \"./components/_util/dom.ts\");\n/* harmony import */ var _util_classNames__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../_util/classNames */ \"./components/_util/classNames.ts\");\n/* harmony import */ var _util_hooks_useIsFirstRender__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../_util/hooks/useIsFirstRender */ \"./components/_util/hooks/useIsFirstRender.ts\");\n/* harmony import */ var _Affix__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Affix */ \"./components/Affix/index.tsx\");\n/* harmony import */ var _ConfigProvider__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../ConfigProvider */ \"./components/ConfigProvider/index.tsx\");\n/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./context */ \"./components/Anchor/context.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./utils */ \"./components/Anchor/utils.ts\");\n/* harmony import */ var _util_hooks_useStateWithPromise__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../_util/hooks/useStateWithPromise */ \"./components/_util/hooks/useStateWithPromise.ts\");\n/* harmony import */ var _link__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./link */ \"./components/Anchor/link.tsx\");\n/* harmony import */ var _util_hooks_useMergeProps__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../_util/hooks/useMergeProps */ \"./components/_util/hooks/useMergeProps.ts\");\nvar __read = undefined && undefined.__read || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o),\n r,\n ar = [],\n e;\n\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {\n ar.push(r.value);\n }\n } catch (error) {\n e = {\n error: error\n };\n } finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n } finally {\n if (e) throw e.error;\n }\n }\n\n return ar;\n};\n\nvar __spreadArray = undefined && undefined.__spreadArray || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar defaultProps = {\n animation: true,\n affix: true,\n hash: true,\n boundary: 'start'\n};\n\nfunction Anchor(baseProps, ref) {\n var _a;\n\n var _b = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useContext\"])(_ConfigProvider__WEBPACK_IMPORTED_MODULE_9__[\"ConfigContext\"]),\n getPrefixCls = _b.getPrefixCls,\n componentConfig = _b.componentConfig;\n\n var props = Object(_util_hooks_useMergeProps__WEBPACK_IMPORTED_MODULE_14__[\"default\"])(baseProps, defaultProps, componentConfig === null || componentConfig === void 0 ? void 0 : componentConfig.Anchor);\n var className = props.className,\n style = props.style,\n propScrollContainer = props.scrollContainer,\n _c = props.animation,\n animation = _c === void 0 ? true : _c,\n lineless = props.lineless,\n _d = props.affix,\n affix = _d === void 0 ? true : _d,\n affixStyle = props.affixStyle,\n offsetBottom = props.offsetBottom,\n offsetTop = props.offsetTop,\n _e = props.hash,\n willChangeHash = _e === void 0 ? true : _e,\n _f = props.boundary,\n boundary = _f === void 0 ? 'start' : _f,\n targetOffset = props.targetOffset,\n children = props.children,\n onSelect = props.onSelect,\n onChange = props.onChange;\n var prefixCls = getPrefixCls('anchor');\n var classNames = Object(_util_classNames__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(prefixCls, className, (_a = {}, _a[prefixCls + \"-lineless\"] = lineless, _a));\n var wrapperRef = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"])(null);\n var sliderLineRef = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"])(null);\n var linkMap = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"])(new Map());\n var isScrolling = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"])(false);\n\n var _g = __read(Object(_util_hooks_useStateWithPromise__WEBPACK_IMPORTED_MODULE_12__[\"default\"])(''), 2),\n currentLink = _g[0],\n setCurrentLink = _g[1];\n\n var isFirstRender = Object(_util_hooks_useIsFirstRender__WEBPACK_IMPORTED_MODULE_7__[\"default\"])();\n var scrollContainer = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"])(null);\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(function () {\n var container = Object(_utils__WEBPACK_IMPORTED_MODULE_11__[\"getContainer\"])(propScrollContainer);\n scrollContainer.current = container;\n }, [propScrollContainer]);\n var getAffixTarget = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useCallback\"])(function () {\n return Object(_utils__WEBPACK_IMPORTED_MODULE_11__[\"getContainer\"])(propScrollContainer);\n }, [propScrollContainer]);\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useImperativeHandle\"])(ref, function () {\n return {\n dom: wrapperRef.current\n };\n }, []);\n\n function addLink(hash, element) {\n if (hash) {\n linkMap.current.set(hash, element);\n }\n }\n\n function removeLink(hash) {\n linkMap.current[\"delete\"](hash);\n }\n\n var setActiveLink = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useCallback\"])(function (hash) {\n if (!hash || !wrapperRef.current) return; // Try to add when there is no corresponding link\n\n if (!linkMap.current.has(hash)) {\n var node_1 = Object(_utils__WEBPACK_IMPORTED_MODULE_11__[\"findNode\"])(wrapperRef.current, \"a[data-href='\" + hash + \"']\");\n node_1 && addLink(hash, node_1);\n }\n\n var node = linkMap.current.get(hash);\n\n if (node && hash !== currentLink) {\n Object(scroll_into_view_if_needed__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(node, {\n behavior: 'instant',\n block: 'nearest',\n scrollMode: 'if-needed',\n boundary: wrapperRef.current\n });\n setCurrentLink(hash).then(function () {\n Object(_util_is__WEBPACK_IMPORTED_MODULE_4__[\"isFunction\"])(onChange) && onChange(hash, currentLink);\n });\n }\n }, [currentLink, onChange]);\n var getEleInViewport = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useCallback\"])(function () {\n var result;\n var startTop = Object(_util_is__WEBPACK_IMPORTED_MODULE_4__[\"isNumber\"])(boundary) ? boundary : 0;\n var container = scrollContainer.current;\n var containerElement = Object(_utils__WEBPACK_IMPORTED_MODULE_11__[\"getContainerElement\"])(container);\n var containerRect = containerElement.getBoundingClientRect();\n var documentHeight = document.documentElement.clientHeight;\n\n __spreadArray([], __read(linkMap.current.keys()), false).some(function (hash) {\n var element = Object(_utils__WEBPACK_IMPORTED_MODULE_11__[\"findNode\"])(document, hash);\n var inView = false;\n\n if (element) {\n var top_1 = element.getBoundingClientRect().top;\n\n if (Object(_util_is__WEBPACK_IMPORTED_MODULE_4__[\"isWindow\"])(container)) {\n inView = top_1 >= startTop && top_1 <= (targetOffset !== null && targetOffset !== void 0 ? targetOffset : documentHeight / 2);\n } else {\n var offsetTop_1 = top_1 - containerRect.top - startTop;\n inView = offsetTop_1 >= 0 && offsetTop_1 <= (targetOffset !== null && targetOffset !== void 0 ? targetOffset : containerRect.height / 2);\n }\n\n if (inView) {\n result = element;\n }\n }\n\n return inView;\n });\n\n return result;\n }, [boundary, targetOffset]);\n var onScroll = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useCallback\"])(lodash_throttle__WEBPACK_IMPORTED_MODULE_1___default()(function () {\n if (isScrolling.current) return;\n var element = getEleInViewport();\n\n if (element && element.id) {\n var hash = \"#\" + element.id;\n setActiveLink(hash);\n }\n }, 30, {\n trailing: true\n }), [getEleInViewport, setActiveLink]);\n\n function scrollIntoView(hash) {\n if (!hash) return;\n\n try {\n var element = Object(_utils__WEBPACK_IMPORTED_MODULE_11__[\"findNode\"])(document, hash);\n if (!element) return;\n var block = Object(_util_is__WEBPACK_IMPORTED_MODULE_4__[\"isNumber\"])(boundary) ? 'start' : boundary;\n var offset = Object(_util_is__WEBPACK_IMPORTED_MODULE_4__[\"isNumber\"])(boundary) ? boundary : 0;\n var actions = Object(compute_scroll_into_view__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(element, {\n block: block\n });\n if (!actions.length) return;\n var _a = actions[0],\n el = _a.el,\n top_2 = _a.top;\n var targetTop = top_2 - offset;\n\n if (!animation) {\n // Manually trigger scrolling as browser's default action is prevented when `props.hash` is false\n if (!willChangeHash) {\n el.scrollTop = targetTop;\n }\n\n return;\n }\n\n Object(_utils__WEBPACK_IMPORTED_MODULE_11__[\"slide\"])(el, targetTop, function () {\n isScrolling.current = false;\n });\n isScrolling.current = true;\n } catch (e) {\n console.error(e);\n }\n }\n\n function onLinkClick(e, hash) {\n if (!willChangeHash) {\n e.preventDefault();\n }\n\n setActiveLink(hash);\n scrollIntoView(hash);\n Object(_util_is__WEBPACK_IMPORTED_MODULE_4__[\"isFunction\"])(onSelect) && onSelect(hash, currentLink);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(function () {\n var hash = decodeURIComponent(location.hash);\n\n if (hash) {\n setActiveLink(hash);\n scrollIntoView(hash);\n } else {\n // compute current active anchor\n onScroll();\n }\n }, []);\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(function () {\n if (!isFirstRender) {\n onScroll();\n }\n\n Object(_util_dom__WEBPACK_IMPORTED_MODULE_5__[\"on\"])(scrollContainer.current, 'scroll', onScroll);\n return function () {\n Object(_util_dom__WEBPACK_IMPORTED_MODULE_5__[\"off\"])(scrollContainer.current, 'scroll', onScroll);\n };\n }, [propScrollContainer, onScroll]);\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(function () {\n var link = linkMap.current.get(currentLink);\n\n if (link && !lineless && sliderLineRef.current) {\n sliderLineRef.current.style.top = link.offsetTop + \"px\";\n }\n }, [currentLink, lineless]);\n var content = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: classNames,\n style: style,\n ref: wrapperRef\n }, !lineless && currentLink && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: prefixCls + \"-line-slider\",\n ref: sliderLineRef\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_context__WEBPACK_IMPORTED_MODULE_10__[\"default\"].Provider, {\n value: {\n currentLink: currentLink,\n addLink: addLink,\n removeLink: removeLink,\n onLinkClick: onLinkClick\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: prefixCls + \"-list\"\n }, children)));\n return affix ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Affix__WEBPACK_IMPORTED_MODULE_8__[\"default\"], {\n offsetTop: offsetTop,\n offsetBottom: offsetBottom,\n style: affixStyle,\n target: getAffixTarget\n }, content) : content;\n}\n\nvar ForwardRefAnchor = /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_0__[\"forwardRef\"])(Anchor);\nvar AnchorComponent = ForwardRefAnchor;\nAnchorComponent.displayName = 'Anchor';\nAnchorComponent.Link = _link__WEBPACK_IMPORTED_MODULE_13__[\"default\"];\n/* harmony default export */ __webpack_exports__[\"default\"] = (AnchorComponent);\n\n//# sourceURL=webpack://%5Bname%5D/./components/Anchor/anchor.tsx?");
/***/ }),
/***/ "./components/Anchor/context.ts":
/*!**************************************!*\
!*** ./components/Anchor/context.ts ***!
\**************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (/*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_0__[\"createContext\"])({\n currentLink: '',\n onLinkClick: function onLinkClick() {},\n addLink: function addLink() {},\n removeLink: function removeLink() {}\n}));\n\n//# sourceURL=webpack://%5Bname%5D/./components/Anchor/context.ts?");
/***/ }),
/***/ "./components/Anchor/index.tsx":
/*!*************************************!*\
!*** ./components/Anchor/index.tsx ***!
\*************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _anchor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./anchor */ \"./components/Anchor/anchor.tsx\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_anchor__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n//# sourceURL=webpack://%5Bname%5D/./components/Anchor/index.tsx?");
/***/ }),
/***/ "./components/Anchor/link.tsx":
/*!************************************!*\
!*** ./components/Anchor/link.tsx ***!
\************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./context */ \"./components/Anchor/context.ts\");\n/* harmony import */ var _ConfigProvider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../ConfigProvider */ \"./components/ConfigProvider/index.tsx\");\n/* harmony import */ var _util_classNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../_util/classNames */ \"./components/_util/classNames.ts\");\n/* harmony import */ var _util_is__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../_util/is */ \"./components/_util/is.ts\");\n/* harmony import */ var _util_hooks_useMergeProps__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../_util/hooks/useMergeProps */ \"./components/_util/hooks/useMergeProps.ts\");\n\n\n\n\n\n\nvar DISPLAY_NAME = 'AnchorLink';\nvar defaultProps = {\n href: '#'\n};\n\nfunction isNamedComponent(type) {\n return Object(_util_is__WEBPACK_IMPORTED_MODULE_4__[\"isObject\"])(type) && type.hasOwnProperty('displayName');\n}\n\nfunction Link(baseProps, ref) {\n var _a;\n\n var _b = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useContext\"])(_ConfigProvider__WEBPACK_IMPORTED_MODULE_2__[\"ConfigContext\"]),\n getPrefixCls = _b.getPrefixCls,\n componentConfig = _b.componentConfig;\n\n var _c = Object(_util_hooks_useMergeProps__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(baseProps, defaultProps, componentConfig === null || componentConfig === void 0 ? void 0 : componentConfig['Anchor.Link']),\n className = _c.className,\n style = _c.style,\n href = _c.href,\n title = _c.title,\n children = _c.children;\n\n var anchorContext = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useContext\"])(_context__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n var currentLink = anchorContext.currentLink,\n addLink = anchorContext.addLink,\n removeLink = anchorContext.removeLink,\n onLinkClick = anchorContext.onLinkClick;\n var prefixCls = getPrefixCls('anchor-link');\n var classNames = Object(_util_classNames__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(prefixCls, (_a = {}, _a[prefixCls + \"-active\"] = currentLink === href, _a), className);\n var linkRef = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"])(null);\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useImperativeHandle\"])(ref, function () {\n return linkRef.current;\n }, []);\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(function () {\n addLink && addLink(href, linkRef.current);\n return function () {\n removeLink && removeLink(href);\n };\n }, [href]);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: classNames,\n style: style,\n ref: linkRef\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: prefixCls + \"-title\",\n title: Object(_util_is__WEBPACK_IMPORTED_MODULE_4__[\"isString\"])(title) ? title : '',\n href: href,\n \"data-href\": href,\n onClick: function onClick(e) {\n onLinkClick && onLinkClick(e, href);\n }\n }, title), children && react__WEBPACK_IMPORTED_MODULE_0___default.a.Children.map(children, function (item) {\n return /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_0__[\"isValidElement\"])(item) && isNamedComponent(item.type) && item.type.displayName === DISPLAY_NAME && item;\n }));\n}\n\nvar AnchorLinkComponent = /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_0__[\"forwardRef\"])(Link);\nAnchorLinkComponent.displayName = DISPLAY_NAME;\n/* harmony default export */ __webpack_exports__[\"default\"] = (AnchorLinkComponent);\n\n//# sourceURL=webpack://%5Bname%5D/./components/Anchor/link.tsx?");
/***/ }),
/***/ "./components/Anchor/utils.ts":
/*!************************************!*\
!*** ./components/Anchor/utils.ts ***!
\************************************/
/*! exports provided: findNode, slide, getContainer, getContainerElement */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"findNode\", function() { return findNode; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"slide\", function() { return slide; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getContainer\", function() { return getContainer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getContainerElement\", function() { return getContainerElement; });\n/* harmony import */ var b_tween__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! b-tween */ \"./node_modules/b-tween/dist/b-tween.es.js\");\n/* harmony import */ var _util_is__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_util/is */ \"./components/_util/is.ts\");\n\n\nfunction findNode(dom, selector) {\n // handle id start with number\n // e.g. id #123\n var s = Object(_util_is__WEBPACK_IMPORTED_MODULE_1__[\"isString\"])(selector) && selector[0] === '#' ? \"[id='\" + selector.replace('#', '') + \"']\" : selector;\n\n try {\n return dom.querySelector(s);\n } catch (e) {\n console.error(e);\n return null;\n }\n}\nfunction slide(el, top, cb) {\n var tween = new b_tween__WEBPACK_IMPORTED_MODULE_0__[\"default\"]({\n from: {\n scrollTop: el.scrollTop\n },\n to: {\n scrollTop: top\n },\n easing: 'quartOut',\n duration: 300,\n onUpdate: function onUpdate(keys) {\n el.scrollTop = keys.scrollTop;\n },\n onFinish: function onFinish() {\n cb && cb();\n }\n });\n tween.start();\n}\nfunction getContainer(targetContainer) {\n if (Object(_util_is__WEBPACK_IMPORTED_MODULE_1__[\"isString\"])(targetContainer)) {\n return findNode(document, targetContainer);\n }\n\n return targetContainer || window;\n}\nfunction getContainerElement(scrollContainer) {\n return Object(_util_is__WEBPACK_IMPORTED_MODULE_1__[\"isWindow\"])(scrollContainer) ? document.documentElement || document.body : scrollContainer;\n}\n\n//# sourceURL=webpack://%5Bname%5D/./components/Anchor/utils.ts?");
/***/ }),
/***/ "./components/AutoComplete/index.tsx":
/*!*******************************************!*\
!*** ./components/AutoComplete/index.tsx ***!
\*******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/typeof */ \"./node_modules/@babel/runtime/helpers/typeof.js\");\n/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _util_classNames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../_util/classNames */ \"./components/_util/classNames.ts\");\n/* harmony import */ var _Input__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Input */ \"./components/Input/index.tsx\");\n/* harmony import */ var _ConfigProvider__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../ConfigProvider */ \"./components/ConfigProvider/index.tsx\");\n/* harmony import */ var _util_hooks_useMergeValue__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../_util/hooks/useMergeValue */ \"./components/_util/hooks/useMergeValue.ts\");\n/* harmony import */ var _Select_select__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Select/select */ \"./components/Select/select.tsx\");\n/* harmony import */ var _Select_utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Select/utils */ \"./components/Select/utils.tsx\");\n/* harmony import */ var _util_keycode__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../_util/keycode */ \"./components/_util/keycode.ts\");\n/* harmony import */ var _util_omit__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../_util/omit */ \"./components/_util/omit.ts\");\n/* harmony import */ var _icon_react_icon_IconLoading__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../icon/react-icon/IconLoading */ \"./icon/react-icon/IconLoading/index.js\");\n/* harmony import */ var _util_hooks_useMergeProps__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../_util/hooks/useMergeProps */ \"./components/_util/hooks/useMergeProps.ts\");\n\n\nvar __assign = undefined && undefined.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n }\n\n return t;\n };\n\n return __assign.apply(this, arguments);\n};\n\nvar __read = undefined && undefined.__read || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o),\n r,\n ar = [],\n e;\n\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {\n ar.push(r.value);\n }\n } catch (error) {\n e = {\n error: error\n };\n } finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n } finally {\n if (e) throw e.error;\n }\n }\n\n return ar;\n};\n\n\n\n\n\n\n\n\n\n\n\n\nvar IMPOSSIBLE_VALUE = \"Autocomplete_\" + Math.random();\nvar Option = _Select_select__WEBPACK_IMPORTED_MODULE_6__[\"default\"].Option;\nvar defaultProps = {\n defaultActiveFirstOption: true,\n triggerElement: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_Input__WEBPACK_IMPORTED_MODULE_3__[\"default\"], null)\n};\n\nfunction AutoComplete(baseProps, ref) {\n var _a = Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useContext\"])(_ConfigProvider__WEBPACK_IMPORTED_MODULE_4__[\"ConfigContext\"]),\n getPrefixCls = _a.getPrefixCls,\n componentConfig = _a.componentConfig;\n\n var props = Object(_util_hooks_useMergeProps__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(baseProps, defaultProps, componentConfig === null || componentConfig === void 0 ? void 0 : componentConfig.AutoComplete);\n var style = props.style,\n className = props.className,\n children = props.children,\n data = props.data,\n defaultValue = props.defaultValue,\n propValue = props.value,\n placeholder = props.placeholder,\n error = props.error,\n disabled = props.disabled,\n strict = props.strict,\n allowClear = props.allowClear,\n loading = props.loading,\n defaultActiveFirstOption = props.defaultActiveFirstOption,\n triggerElement = props.triggerElement,\n getPopupContainer = props.getPopupContainer,\n dropdownRender = props.dropdownRender,\n virtualListProps = props.virtualListProps,\n _onFocus = props.onFocus,\n _onBlur = props.onBlur,\n _onChange = props.onChange,\n onSearch = props.onSearch,\n onSelect = props.onSelect,\n onPressEnter = props.onPressEnter,\n inputProps = props.inputProps;\n\n var _b = __read(Object(_util_hooks_useMergeValue__WEBPACK_IMPORTED_MODULE_5__[\"default\"])('', {\n defaultValue: defaultValue,\n value: propValue\n }), 2),\n value = _b[0],\n setValue = _b[1];\n\n var _c = __read(Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useState\"])(false), 2),\n isFocused = _c[0],\n setIsFocused = _c[1];\n\n var refInput = Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useRef\"])(null);\n var refSelect = Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useRef\"])(null);\n var prefixCls = getPrefixCls('autocomplete');\n var filterOption = 'filterOption' in props ? props.filterOption : function (inputValue, option) {\n if (strict) {\n return option.props.value.indexOf(inputValue) > -1;\n }\n\n return option.props.value.toLowerCase().indexOf(inputValue.toLowerCase()) > -1;\n };\n var childNodes = react__WEBPACK_IMPORTED_MODULE_1___default.a.Children.toArray(children);\n var selectChildren = null;\n\n if