var ProUtils = /******/ (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 = 123); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, exports) { module.exports = React; /***/ }), /* 1 */ /***/ (function(module, exports) { function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } module.exports = _interopRequireDefault; /***/ }), /* 2 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // EXPORTS __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _toConsumableArray; }); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js var arrayLikeToArray = __webpack_require__(22); // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return Object(arrayLikeToArray["a" /* default */])(arr); } // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); } // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js var unsupportedIterableToArray = __webpack_require__(24); // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || Object(unsupportedIterableToArray["a" /* default */])(arr) || _nonIterableSpread(); } /***/ }), /* 3 */ /***/ (function(module, exports, __webpack_require__) { var _typeof = __webpack_require__(25); function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } module.exports = _interopRequireWildcard; /***/ }), /* 4 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _defineProperty; }); function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } /***/ }), /* 5 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* unused harmony export warning */ /* unused harmony export note */ /* unused harmony export resetWarned */ /* unused harmony export call */ /* unused harmony export warningOnce */ /* unused harmony export noteOnce */ /* eslint-disable no-console */ var warned = {}; function warning(valid, message) { // Support uglify if (false) {} } function note(valid, message) { // Support uglify if (false) {} } function resetWarned() { warned = {}; } function call(method, valid, message) { if (!valid && !warned[message]) { method(false, message); warned[message] = true; } } function warningOnce(valid, message) { call(warning, valid, message); } function noteOnce(valid, message) { call(note, valid, message); } /* harmony default export */ __webpack_exports__["a"] = (warningOnce); /* eslint-enable */ /***/ }), /* 6 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } /*! Copyright (c) 2017 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ /* global define */ (function () { 'use strict'; var hasOwn = {}.hasOwnProperty; function classNames() { var classes = []; for (var i = 0; i < arguments.length; i++) { var arg = arguments[i]; if (!arg) continue; var argType = _typeof(arg); if (argType === 'string' || argType === 'number') { classes.push(arg); } else if (Array.isArray(arg) && arg.length) { var inner = classNames.apply(null, arg); if (inner) { classes.push(inner); } } else if (argType === 'object') { for (var key in arg) { if (hasOwn.call(arg, key) && arg[key]) { classes.push(key); } } } } return classes.join(' '); } if ( true && module.exports) { classNames.default = classNames; module.exports = classNames; } else if ( true && _typeof(__webpack_require__(45)) === 'object' && __webpack_require__(45)) { // register as 'classnames', consistent with npm package name !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () { return classNames; }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else { window.classNames = classNames; } })(); /***/ }), /* 7 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // EXPORTS __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _objectWithoutProperties; }); // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } /***/ }), /* 8 */ /***/ (function(module, exports) { function _extends() { module.exports = _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } module.exports = _extends; /***/ }), /* 9 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _typeof; }); function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } /***/ }), /* 10 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireWildcard = __webpack_require__(3); var _interopRequireDefault = __webpack_require__(1); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _slicedToArray2 = _interopRequireDefault(__webpack_require__(21)); var _defineProperty2 = _interopRequireDefault(__webpack_require__(18)); var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(49)); var React = _interopRequireWildcard(__webpack_require__(0)); var _classnames = _interopRequireDefault(__webpack_require__(6)); var _IconBase = _interopRequireDefault(__webpack_require__(50)); var _twoTonePrimaryColor = __webpack_require__(85); var _utils = __webpack_require__(29); // Initial setting // should move it to antd main repo? (0, _twoTonePrimaryColor.setTwoToneColor)('#1890ff'); var Icon = React.forwardRef(function (props, ref) { var className = props.className, icon = props.icon, spin = props.spin, rotate = props.rotate, tabIndex = props.tabIndex, onClick = props.onClick, twoToneColor = props.twoToneColor, restProps = (0, _objectWithoutProperties2.default)(props, ["className", "icon", "spin", "rotate", "tabIndex", "onClick", "twoToneColor"]); var classString = (0, _classnames.default)('anticon', (0, _defineProperty2.default)({}, "anticon-".concat(icon.name), Boolean(icon.name)), className); var svgClassString = (0, _classnames.default)({ 'anticon-spin': !!spin || icon.name === 'loading' }); var iconTabIndex = tabIndex; if (iconTabIndex === undefined && onClick) { iconTabIndex = -1; } var svgStyle = rotate ? { msTransform: "rotate(".concat(rotate, "deg)"), transform: "rotate(".concat(rotate, "deg)") } : undefined; var _normalizeTwoToneColo = (0, _utils.normalizeTwoToneColors)(twoToneColor), _normalizeTwoToneColo2 = (0, _slicedToArray2.default)(_normalizeTwoToneColo, 2), primaryColor = _normalizeTwoToneColo2[0], secondaryColor = _normalizeTwoToneColo2[1]; return React.createElement("span", Object.assign({ role: "img", "aria-label": icon.name }, restProps, { ref: ref, tabIndex: iconTabIndex, onClick: onClick, className: classString }), React.createElement(_IconBase.default, { className: svgClassString, icon: icon, primaryColor: primaryColor, secondaryColor: secondaryColor, style: svgStyle })); }); Icon.displayName = 'AntdIcon'; Icon.getTwoToneColor = _twoTonePrimaryColor.getTwoToneColor; Icon.setTwoToneColor = _twoTonePrimaryColor.setTwoToneColor; var _default = Icon; exports.default = _default; /***/ }), /* 11 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _classCallCheck; }); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } /***/ }), /* 12 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // EXPORTS __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _slicedToArray; }); // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js var unsupportedIterableToArray = __webpack_require__(24); // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || Object(unsupportedIterableToArray["a" /* default */])(arr, i) || _nonIterableRest(); } /***/ }), /* 13 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _getPrototypeOf; }); function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } /***/ }), /* 14 */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(59); /***/ }), /* 15 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireWildcard = __webpack_require__(3); var _interopRequireDefault = __webpack_require__(1); Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "ConfigConsumer", { enumerable: true, get: function get() { return _context.ConfigConsumer; } }); Object.defineProperty(exports, "ConfigContext", { enumerable: true, get: function get() { return _context.ConfigContext; } }); exports["default"] = exports.configConsumerProps = void 0; var _extends2 = _interopRequireDefault(__webpack_require__(8)); var React = _interopRequireWildcard(__webpack_require__(0)); var _rcFieldForm = __webpack_require__(124); var _localeProvider = _interopRequireWildcard(__webpack_require__(60)); var _LocaleReceiver = _interopRequireDefault(__webpack_require__(44)); var _context = __webpack_require__(70); var _SizeContext = __webpack_require__(75); var _message = _interopRequireDefault(__webpack_require__(46)); var _notification = _interopRequireDefault(__webpack_require__(104)); // TODO: remove this lint // SFC has specified a displayName, but not worked. /* eslint-disable react/display-name */ var configConsumerProps = ['getTargetContainer', 'getPopupContainer', 'rootPrefixCls', 'getPrefixCls', 'renderEmpty', 'csp', 'autoInsertSpaceInButton', 'locale', 'pageHeader']; exports.configConsumerProps = configConsumerProps; var ConfigProvider = function ConfigProvider(props) { React.useEffect(function () { if (props.direction) { _message["default"].config({ rtl: props.direction === 'rtl' }); _notification["default"].config({ rtl: props.direction === 'rtl' }); } }, [props.direction]); var getPrefixClsWrapper = function getPrefixClsWrapper(context) { return function (suffixCls, customizePrefixCls) { var prefixCls = props.prefixCls; if (customizePrefixCls) return customizePrefixCls; var mergedPrefixCls = prefixCls || context.getPrefixCls(''); return suffixCls ? "".concat(mergedPrefixCls, "-").concat(suffixCls) : mergedPrefixCls; }; }; var renderProvider = function renderProvider(context, legacyLocale) { var children = props.children, getTargetContainer = props.getTargetContainer, getPopupContainer = props.getPopupContainer, renderEmpty = props.renderEmpty, csp = props.csp, autoInsertSpaceInButton = props.autoInsertSpaceInButton, form = props.form, input = props.input, locale = props.locale, pageHeader = props.pageHeader, componentSize = props.componentSize, direction = props.direction, space = props.space, virtual = props.virtual, dropdownMatchSelectWidth = props.dropdownMatchSelectWidth; var config = (0, _extends2["default"])((0, _extends2["default"])({}, context), { getPrefixCls: getPrefixClsWrapper(context), csp: csp, autoInsertSpaceInButton: autoInsertSpaceInButton, locale: locale || legacyLocale, direction: direction, space: space, virtual: virtual, dropdownMatchSelectWidth: dropdownMatchSelectWidth }); if (getTargetContainer) { config.getTargetContainer = getTargetContainer; } if (getPopupContainer) { config.getPopupContainer = getPopupContainer; } if (renderEmpty) { config.renderEmpty = renderEmpty; } if (pageHeader) { config.pageHeader = pageHeader; } if (input) { config.input = input; } var childNode = children; // Additional Form provider var validateMessages = {}; if (locale && locale.Form && locale.Form.defaultValidateMessages) { validateMessages = locale.Form.defaultValidateMessages; } if (form && form.validateMessages) { validateMessages = (0, _extends2["default"])((0, _extends2["default"])({}, validateMessages), form.validateMessages); } if (Object.keys(validateMessages).length > 0) { childNode = /*#__PURE__*/React.createElement(_rcFieldForm.FormProvider, { validateMessages: validateMessages }, children); } return /*#__PURE__*/React.createElement(_SizeContext.SizeContextProvider, { size: componentSize }, /*#__PURE__*/React.createElement(_context.ConfigContext.Provider, { value: config }, /*#__PURE__*/React.createElement(_localeProvider["default"], { locale: locale || legacyLocale, _ANT_MARK__: _localeProvider.ANT_MARK }, childNode))); }; return /*#__PURE__*/React.createElement(_LocaleReceiver["default"], null, function (_, __, legacyLocale) { return /*#__PURE__*/React.createElement(_context.ConfigConsumer, null, function (context) { return renderProvider(context, legacyLocale); }); }); }; var _default = ConfigProvider; exports["default"] = _default; /***/ }), /* 16 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _createClass; }); function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } /***/ }), /* 17 */ /***/ (function(module, exports) { module.exports = ReactDOM; /***/ }), /* 18 */ /***/ (function(module, exports) { function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } module.exports = _defineProperty; /***/ }), /* 19 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // EXPORTS __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _inherits; }); // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } /***/ }), /* 20 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // EXPORTS __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _possibleConstructorReturn; }); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js var esm_typeof = __webpack_require__(9); // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js function _possibleConstructorReturn(self, call) { if (call && (Object(esm_typeof["a" /* default */])(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } /***/ }), /* 21 */ /***/ (function(module, exports, __webpack_require__) { var arrayWithHoles = __webpack_require__(79); var iterableToArrayLimit = __webpack_require__(80); var unsupportedIterableToArray = __webpack_require__(47); var nonIterableRest = __webpack_require__(81); function _slicedToArray(arr, i) { return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest(); } module.exports = _slicedToArray; /***/ }), /* 22 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayLikeToArray; }); function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } /***/ }), /* 23 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {var isNode = typeof process !== 'undefined' && process.versions != null && process.versions.node != null; var isBrowser = function isBrowser() { return typeof window !== 'undefined' && typeof window.document !== 'undefined' && !isNode; }; /* harmony default export */ __webpack_exports__["a"] = (isBrowser); /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(35))) /***/ }), /* 24 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _unsupportedIterableToArray; }); /* harmony import */ var _arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(22); function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return Object(_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Object(_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen); } /***/ }), /* 25 */ /***/ (function(module, exports) { function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { module.exports = _typeof = function _typeof(obj) { return typeof obj; }; } else { module.exports = _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } module.exports = _typeof; /***/ }), /* 26 */ /***/ (function(module, exports) { function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } module.exports = _classCallCheck; /***/ }), /* 27 */ /***/ (function(module, exports) { function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } module.exports = _createClass; /***/ }), /* 28 */ /***/ (function(module, exports, __webpack_require__) { var setPrototypeOf = __webpack_require__(61); function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) setPrototypeOf(subClass, superClass); } module.exports = _inherits; /***/ }), /* 29 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireWildcard = __webpack_require__(3); var _interopRequireDefault = __webpack_require__(1); Object.defineProperty(exports, "__esModule", { value: true }); exports.warning = warning; exports.isIconDefinition = isIconDefinition; exports.normalizeAttrs = normalizeAttrs; exports.generate = generate; exports.getSecondaryColor = getSecondaryColor; exports.normalizeTwoToneColors = normalizeTwoToneColors; exports.useInsertStyles = exports.iconStyles = exports.svgBaseProps = void 0; var _objectSpread2 = _interopRequireDefault(__webpack_require__(51)); var _typeof2 = _interopRequireDefault(__webpack_require__(25)); var _colors = __webpack_require__(30); var _react = _interopRequireWildcard(__webpack_require__(0)); var _warning = _interopRequireDefault(__webpack_require__(39)); var _insertCss = __webpack_require__(31); function warning(valid, message) { (0, _warning.default)(valid, "[@ant-design/icons] ".concat(message)); } function isIconDefinition(target) { return (0, _typeof2.default)(target) === 'object' && typeof target.name === 'string' && typeof target.theme === 'string' && ((0, _typeof2.default)(target.icon) === 'object' || typeof target.icon === 'function'); } function normalizeAttrs() { var attrs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; return Object.keys(attrs).reduce(function (acc, key) { var val = attrs[key]; switch (key) { case 'class': acc.className = val; delete acc.class; break; default: acc[key] = val; } return acc; }, {}); } function generate(node, key, rootProps) { if (!rootProps) { return _react.default.createElement(node.tag, (0, _objectSpread2.default)({ key: key }, normalizeAttrs(node.attrs)), (node.children || []).map(function (child, index) { return generate(child, "".concat(key, "-").concat(node.tag, "-").concat(index)); })); } return _react.default.createElement(node.tag, (0, _objectSpread2.default)((0, _objectSpread2.default)({ key: key }, normalizeAttrs(node.attrs)), rootProps), (node.children || []).map(function (child, index) { return generate(child, "".concat(key, "-").concat(node.tag, "-").concat(index)); })); } function getSecondaryColor(primaryColor) { // choose the second color return (0, _colors.generate)(primaryColor)[0]; } function normalizeTwoToneColors(twoToneColor) { if (!twoToneColor) { return []; } return Array.isArray(twoToneColor) ? twoToneColor : [twoToneColor]; } // These props make sure that the SVG behaviours like general text. // Reference: https://blog.prototypr.io/align-svg-icons-to-text-and-say-goodbye-to-font-icons-d44b3d7b26b4 var svgBaseProps = { width: '1em', height: '1em', fill: 'currentColor', 'aria-hidden': 'true', focusable: 'false' }; exports.svgBaseProps = svgBaseProps; var iconStyles = "\n.anticon {\n display: inline-block;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n"; exports.iconStyles = iconStyles; var cssInjectedFlag = false; var useInsertStyles = function useInsertStyles() { var styleStr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : iconStyles; (0, _react.useEffect)(function () { if (!cssInjectedFlag) { (0, _insertCss.insertCss)(styleStr, { prepend: true }); cssInjectedFlag = true; } }, []); }; exports.useInsertStyles = useInsertStyles; /***/ }), /* 30 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var __importDefault = this && this.__importDefault || function (mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); var generate_1 = __importDefault(__webpack_require__(83)); exports.generate = generate_1.default; var presetPrimaryColors = { red: '#F5222D', volcano: '#FA541C', orange: '#FA8C16', gold: '#FAAD14', yellow: '#FADB14', lime: '#A0D911', green: '#52C41A', cyan: '#13C2C2', blue: '#1890FF', geekblue: '#2F54EB', purple: '#722ED1', magenta: '#EB2F96', grey: '#666666' }; exports.presetPrimaryColors = presetPrimaryColors; var presetPalettes = {}; exports.presetPalettes = presetPalettes; Object.keys(presetPrimaryColors).forEach(function (key) { presetPalettes[key] = generate_1.default(presetPrimaryColors[key]); presetPalettes[key].primary = presetPalettes[key][5]; }); var red = presetPalettes.red; exports.red = red; var volcano = presetPalettes.volcano; exports.volcano = volcano; var gold = presetPalettes.gold; exports.gold = gold; var orange = presetPalettes.orange; exports.orange = orange; var yellow = presetPalettes.yellow; exports.yellow = yellow; var lime = presetPalettes.lime; exports.lime = lime; var green = presetPalettes.green; exports.green = green; var cyan = presetPalettes.cyan; exports.cyan = cyan; var blue = presetPalettes.blue; exports.blue = blue; var geekblue = presetPalettes.geekblue; exports.geekblue = geekblue; var purple = presetPalettes.purple; exports.purple = purple; var magenta = presetPalettes.magenta; exports.magenta = magenta; var grey = presetPalettes.grey; exports.grey = grey; /***/ }), /* 31 */ /***/ (function(module, exports) { var containers = []; // will store container HTMLElement references var styleElements = []; // will store {prepend: HTMLElement, append: HTMLElement} var usage = 'insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).'; function insertCss(css, options) { options = options || {}; if (css === undefined) { throw new Error(usage); } var position = options.prepend === true ? 'prepend' : 'append'; var container = options.container !== undefined ? options.container : document.querySelector('head'); var containerId = containers.indexOf(container); // first time we see this container, create the necessary entries if (containerId === -1) { containerId = containers.push(container) - 1; styleElements[containerId] = {}; } // try to get the correponding container + position styleElement, create it otherwise var styleElement; if (styleElements[containerId] !== undefined && styleElements[containerId][position] !== undefined) { styleElement = styleElements[containerId][position]; } else { styleElement = styleElements[containerId][position] = createStyleElement(); if (position === 'prepend') { container.insertBefore(styleElement, container.childNodes[0]); } else { container.appendChild(styleElement); } } // strip potential UTF-8 BOM if css was read from a file if (css.charCodeAt(0) === 0xFEFF) { css = css.substr(1, css.length); } // actually add the stylesheet if (styleElement.styleSheet) { styleElement.styleSheet.cssText += css; } else { styleElement.textContent += css; } return styleElement; } ; function createStyleElement() { var styleElement = document.createElement('style'); styleElement.setAttribute('type', 'text/css'); return styleElement; } module.exports = insertCss; module.exports.insertCss = insertCss; /***/ }), /* 32 */ /***/ (function(module, exports) { module.exports = antd; /***/ }), /* 33 */ /***/ (function(module, exports) { module.exports = moment; /***/ }), /* 34 */ /***/ (function(module, exports) { module.exports = function (module) { if (!module.webpackPolyfill) { module.deprecate = function () {}; module.paths = []; // module.parent = undefined by default if (!module.children) module.children = []; Object.defineProperty(module, "loaded", { enumerable: true, get: function get() { return module.l; } }); Object.defineProperty(module, "id", { enumerable: true, get: function get() { return module.i; } }); module.webpackPolyfill = 1; } return module; }; /***/ }), /* 35 */ /***/ (function(module, exports) { // shim for using process in browser var process = module.exports = {}; // cached from whatever global is present so that test runners that stub it // don't break things. But we need to wrap it in a try catch in case it is // wrapped in strict mode code which doesn't define any globals. It's inside a // function because try/catches deoptimize in certain engines. var cachedSetTimeout; var cachedClearTimeout; function defaultSetTimout() { throw new Error('setTimeout has not been defined'); } function defaultClearTimeout() { throw new Error('clearTimeout has not been defined'); } (function () { try { if (typeof setTimeout === 'function') { cachedSetTimeout = setTimeout; } else { cachedSetTimeout = defaultSetTimout; } } catch (e) { cachedSetTimeout = defaultSetTimout; } try { if (typeof clearTimeout === 'function') { cachedClearTimeout = clearTimeout; } else { cachedClearTimeout = defaultClearTimeout; } } catch (e) { cachedClearTimeout = defaultClearTimeout; } })(); function runTimeout(fun) { if (cachedSetTimeout === setTimeout) { //normal enviroments in sane situations return setTimeout(fun, 0); } // if setTimeout wasn't available but was latter defined if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { cachedSetTimeout = setTimeout; return setTimeout(fun, 0); } try { // when when somebody has screwed with setTimeout but no I.E. maddness return cachedSetTimeout(fun, 0); } catch (e) { try { // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally return cachedSetTimeout.call(null, fun, 0); } catch (e) { // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error return cachedSetTimeout.call(this, fun, 0); } } } function runClearTimeout(marker) { if (cachedClearTimeout === clearTimeout) { //normal enviroments in sane situations return clearTimeout(marker); } // if clearTimeout wasn't available but was latter defined if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { cachedClearTimeout = clearTimeout; return clearTimeout(marker); } try { // when when somebody has screwed with setTimeout but no I.E. maddness return cachedClearTimeout(marker); } catch (e) { try { // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally return cachedClearTimeout.call(null, marker); } catch (e) { // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. // Some versions of I.E. have different rules for clearTimeout vs setTimeout return cachedClearTimeout.call(this, marker); } } } var queue = []; var draining = false; var currentQueue; var queueIndex = -1; function cleanUpNextTick() { if (!draining || !currentQueue) { return; } draining = false; if (currentQueue.length) { queue = currentQueue.concat(queue); } else { queueIndex = -1; } if (queue.length) { drainQueue(); } } function drainQueue() { if (draining) { return; } var timeout = runTimeout(cleanUpNextTick); draining = true; var len = queue.length; while (len) { currentQueue = queue; queue = []; while (++queueIndex < len) { if (currentQueue) { currentQueue[queueIndex].run(); } } queueIndex = -1; len = queue.length; } currentQueue = null; draining = false; runClearTimeout(timeout); } process.nextTick = function (fun) { var args = new Array(arguments.length - 1); if (arguments.length > 1) { for (var i = 1; i < arguments.length; i++) { args[i - 1] = arguments[i]; } } queue.push(new Item(fun, args)); if (queue.length === 1 && !draining) { runTimeout(drainQueue); } }; // v8 likes predictible objects function Item(fun, array) { this.fun = fun; this.array = array; } Item.prototype.run = function () { this.fun.apply(null, this.array); }; process.title = 'browser'; process.browser = true; process.env = {}; process.argv = []; process.version = ''; // empty string to avoid regexp issues process.versions = {}; function noop() {} process.on = noop; process.addListener = noop; process.once = noop; process.off = noop; process.removeListener = noop; process.removeAllListeners = noop; process.emit = noop; process.prependListener = noop; process.prependOnceListener = noop; process.listeners = function (name) { return []; }; process.binding = function (name) { throw new Error('process.binding is not supported'); }; process.cwd = function () { return '/'; }; process.chdir = function (dir) { throw new Error('process.chdir is not supported'); }; process.umask = function () { return 0; }; /***/ }), /* 36 */ /***/ (function(module, exports, __webpack_require__) { var getPrototypeOf = __webpack_require__(37); var isNativeReflectConstruct = __webpack_require__(62); var possibleConstructorReturn = __webpack_require__(38); function _createSuper(Derived) { var hasNativeReflectConstruct = isNativeReflectConstruct(); return function _createSuperInternal() { var Super = getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn(this, result); }; } module.exports = _createSuper; /***/ }), /* 37 */ /***/ (function(module, exports) { function _getPrototypeOf(o) { module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } module.exports = _getPrototypeOf; /***/ }), /* 38 */ /***/ (function(module, exports, __webpack_require__) { var _typeof = __webpack_require__(25); var assertThisInitialized = __webpack_require__(63); function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return assertThisInitialized(self); } module.exports = _possibleConstructorReturn; /***/ }), /* 39 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.warning = warning; exports.note = note; exports.resetWarned = resetWarned; exports.call = call; exports.warningOnce = warningOnce; exports.noteOnce = noteOnce; exports.default = void 0; /* eslint-disable no-console */ var warned = {}; function warning(valid, message) { // Support uglify if (false) {} } function note(valid, message) { // Support uglify if (false) {} } function resetWarned() { warned = {}; } function call(method, valid, message) { if (!valid && !warned[message]) { method(false, message); warned[message] = true; } } function warningOnce(valid, message) { call(warning, valid, message); } function noteOnce(valid, message) { call(note, valid, message); } var _default = warningOnce; /* eslint-enable */ exports.default = _default; /***/ }), /* 40 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(1); Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _en_US = _interopRequireDefault(__webpack_require__(66)); var _en_US2 = _interopRequireDefault(__webpack_require__(41)); var _en_US3 = _interopRequireDefault(__webpack_require__(42)); var _en_US4 = _interopRequireDefault(__webpack_require__(68)); /* eslint-disable no-template-curly-in-string */ var typeTemplate = '${label} is not a valid ${type}'; var localeValues = { locale: 'en', Pagination: _en_US["default"], DatePicker: _en_US2["default"], TimePicker: _en_US3["default"], Calendar: _en_US4["default"], global: { placeholder: 'Please select' }, Table: { filterTitle: 'Filter menu', filterConfirm: 'OK', filterReset: 'Reset', filterEmptyText: 'No filters', emptyText: 'No data', selectAll: 'Select current page', selectInvert: 'Invert current page', selectionAll: 'Select all data', sortTitle: 'Sort', expand: 'Expand row', collapse: 'Collapse row', triggerDesc: 'Click sort by descend', triggerAsc: 'Click sort by ascend', cancelSort: 'Click to cancel sort' }, Modal: { okText: 'OK', cancelText: 'Cancel', justOkText: 'OK' }, Popconfirm: { okText: 'OK', cancelText: 'Cancel' }, Transfer: { titles: ['', ''], searchPlaceholder: 'Search here', itemUnit: 'item', itemsUnit: 'items', remove: 'Remove', selectCurrent: 'Select current page', removeCurrent: 'Remove current page', selectAll: 'Select all data', removeAll: 'Remove all data', selectInvert: 'Invert current page' }, Upload: { uploading: 'Uploading...', removeFile: 'Remove file', uploadError: 'Upload error', previewFile: 'Preview file', downloadFile: 'Download file' }, Empty: { description: 'No Data' }, Icon: { icon: 'icon' }, Text: { edit: 'Edit', copy: 'Copy', copied: 'Copied', expand: 'Expand' }, PageHeader: { back: 'Back' }, Form: { defaultValidateMessages: { "default": 'Field validation error ${label}', required: 'Please enter ${label}', "enum": '${label} must be one of [${enum}]', whitespace: '${label} cannot be a blank character', date: { format: '${label} date format is invalid', parse: '${label} cannot be converted to a date', invalid: '${label} is an invalid date' }, types: { string: typeTemplate, method: typeTemplate, array: typeTemplate, object: typeTemplate, number: typeTemplate, date: typeTemplate, "boolean": typeTemplate, integer: typeTemplate, "float": typeTemplate, regexp: typeTemplate, email: typeTemplate, url: typeTemplate, hex: typeTemplate }, string: { len: '${label} must be ${len} characters', min: '${label} at least ${min} characters', max: '${label} up to ${max} characters', range: '${label} must be between ${min}-${max} characters' }, number: { len: '${label} must be equal to ${len}', min: '${label} minimum value is ${min}', max: '${label} maximum value is ${max}', range: '${label} must be between ${min}-${max}' }, array: { len: 'Must be ${len} ${label}', min: 'At least ${min} ${label}', max: 'At most ${max} ${label}', range: 'The amount of ${label} must be between ${min}-${max}' }, pattern: { mismatch: '${label} does not match the pattern ${pattern}' } } } }; var _default = localeValues; exports["default"] = _default; /***/ }), /* 41 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(1); Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _extends2 = _interopRequireDefault(__webpack_require__(8)); var _en_US = _interopRequireDefault(__webpack_require__(67)); var _en_US2 = _interopRequireDefault(__webpack_require__(42)); // Merge into a locale object var locale = { lang: (0, _extends2["default"])({ placeholder: 'Select date', yearPlaceholder: 'Select year', quarterPlaceholder: 'Select quarter', monthPlaceholder: 'Select month', weekPlaceholder: 'Select week', rangePlaceholder: ['Start date', 'End date'], rangeYearPlaceholder: ['Start year', 'End year'], rangeMonthPlaceholder: ['Start month', 'End month'], rangeWeekPlaceholder: ['Start week', 'End week'] }, _en_US["default"]), timePickerLocale: (0, _extends2["default"])({}, _en_US2["default"]) }; // All settings at: // https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json var _default = locale; exports["default"] = _default; /***/ }), /* 42 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var locale = { placeholder: 'Select time', rangePlaceholder: ['Start time', 'End time'] }; var _default = locale; exports["default"] = _default; /***/ }), /* 43 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _react = __webpack_require__(0); var LocaleContext = /*#__PURE__*/(0, _react.createContext)(undefined); var _default = LocaleContext; exports["default"] = _default; /***/ }), /* 44 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireWildcard = __webpack_require__(3); var _interopRequireDefault = __webpack_require__(1); Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _extends2 = _interopRequireDefault(__webpack_require__(8)); var _classCallCheck2 = _interopRequireDefault(__webpack_require__(26)); var _createClass2 = _interopRequireDefault(__webpack_require__(27)); var _inherits2 = _interopRequireDefault(__webpack_require__(28)); var _createSuper2 = _interopRequireDefault(__webpack_require__(36)); var React = _interopRequireWildcard(__webpack_require__(0)); var _default = _interopRequireDefault(__webpack_require__(69)); var _context = _interopRequireDefault(__webpack_require__(43)); var LocaleReceiver = /*#__PURE__*/function (_React$Component) { (0, _inherits2["default"])(LocaleReceiver, _React$Component); var _super = (0, _createSuper2["default"])(LocaleReceiver); function LocaleReceiver() { (0, _classCallCheck2["default"])(this, LocaleReceiver); return _super.apply(this, arguments); } (0, _createClass2["default"])(LocaleReceiver, [{ key: "getLocale", value: function getLocale() { var _this$props = this.props, componentName = _this$props.componentName, defaultLocale = _this$props.defaultLocale; var locale = defaultLocale || _default["default"][componentName || 'global']; var antLocale = this.context; var localeFromContext = componentName && antLocale ? antLocale[componentName] : {}; return (0, _extends2["default"])((0, _extends2["default"])({}, typeof locale === 'function' ? locale() : locale), localeFromContext || {}); } }, { key: "getLocaleCode", value: function getLocaleCode() { var antLocale = this.context; var localeCode = antLocale && antLocale.locale; // Had use LocaleProvide but didn't set locale if (antLocale && antLocale.exist && !localeCode) { return _default["default"].locale; } return localeCode; } }, { key: "render", value: function render() { return this.props.children(this.getLocale(), this.getLocaleCode(), this.context); } }]); return LocaleReceiver; }(React.Component); exports["default"] = LocaleReceiver; LocaleReceiver.defaultProps = { componentName: 'global' }; LocaleReceiver.contextType = _context["default"]; /***/ }), /* 45 */ /***/ (function(module, exports) { /* WEBPACK VAR INJECTION */(function(__webpack_amd_options__) {/* globals __webpack_amd_options__ */ module.exports = __webpack_amd_options__; /* WEBPACK VAR INJECTION */}.call(this, {})) /***/ }), /* 46 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireWildcard = __webpack_require__(3); var _interopRequireDefault = __webpack_require__(1); Object.defineProperty(exports, "__esModule", { value: true }); exports.getKeyThenIncreaseKey = getKeyThenIncreaseKey; exports.attachTypeApi = attachTypeApi; exports["default"] = void 0; var _extends2 = _interopRequireDefault(__webpack_require__(8)); var _defineProperty2 = _interopRequireDefault(__webpack_require__(18)); var React = _interopRequireWildcard(__webpack_require__(0)); var _classnames = _interopRequireDefault(__webpack_require__(6)); var _rcNotification = _interopRequireDefault(__webpack_require__(53)); var _LoadingOutlined = _interopRequireDefault(__webpack_require__(76)); var _ExclamationCircleFilled = _interopRequireDefault(__webpack_require__(86)); var _CloseCircleFilled = _interopRequireDefault(__webpack_require__(89)); var _CheckCircleFilled = _interopRequireDefault(__webpack_require__(92)); var _InfoCircleFilled = _interopRequireDefault(__webpack_require__(95)); var _useMessage = _interopRequireDefault(__webpack_require__(98)); var messageInstance; var defaultDuration = 3; var defaultTop; var key = 1; var localPrefixCls = 'ant-message'; var transitionName = 'move-up'; var getContainer; var maxCount; var rtl = false; function getKeyThenIncreaseKey() { return key++; } function setMessageConfig(options) { if (options.top !== undefined) { defaultTop = options.top; messageInstance = null; // delete messageInstance for new defaultTop } if (options.duration !== undefined) { defaultDuration = options.duration; } if (options.prefixCls !== undefined) { localPrefixCls = options.prefixCls; } if (options.getContainer !== undefined) { getContainer = options.getContainer; } if (options.transitionName !== undefined) { transitionName = options.transitionName; messageInstance = null; // delete messageInstance for new transitionName } if (options.maxCount !== undefined) { maxCount = options.maxCount; messageInstance = null; } if (options.rtl !== undefined) { rtl = options.rtl; } } function getRCNotificationInstance(args, callback) { var prefixCls = args.prefixCls || localPrefixCls; if (messageInstance) { callback({ prefixCls: prefixCls, instance: messageInstance }); return; } _rcNotification["default"].newInstance({ prefixCls: prefixCls, transitionName: transitionName, style: { top: defaultTop }, getContainer: getContainer, maxCount: maxCount }, function (instance) { if (messageInstance) { callback({ prefixCls: prefixCls, instance: messageInstance }); return; } messageInstance = instance; callback({ prefixCls: prefixCls, instance: instance }); }); } var typeToIcon = { info: _InfoCircleFilled["default"], success: _CheckCircleFilled["default"], error: _CloseCircleFilled["default"], warning: _ExclamationCircleFilled["default"], loading: _LoadingOutlined["default"] }; function getRCNoticeProps(args, prefixCls) { var _classNames; var duration = args.duration !== undefined ? args.duration : defaultDuration; var IconComponent = typeToIcon[args.type]; var messageClass = (0, _classnames["default"])("".concat(prefixCls, "-custom-content"), (_classNames = {}, (0, _defineProperty2["default"])(_classNames, "".concat(prefixCls, "-").concat(args.type), args.type), (0, _defineProperty2["default"])(_classNames, "".concat(prefixCls, "-rtl"), rtl === true), _classNames)); return { key: args.key, duration: duration, style: args.style || {}, className: args.className, content: /*#__PURE__*/React.createElement("div", { className: messageClass }, args.icon || IconComponent && /*#__PURE__*/React.createElement(IconComponent, null), /*#__PURE__*/React.createElement("span", null, args.content)), onClose: args.onClose }; } function notice(args) { var target = args.key || key++; var closePromise = new Promise(function (resolve) { var callback = function callback() { if (typeof args.onClose === 'function') { args.onClose(); } return resolve(true); }; getRCNotificationInstance(args, function (_ref) { var prefixCls = _ref.prefixCls, instance = _ref.instance; instance.notice(getRCNoticeProps((0, _extends2["default"])((0, _extends2["default"])({}, args), { key: target, onClose: callback }), prefixCls)); }); }); var result = function result() { if (messageInstance) { messageInstance.removeNotice(target); } }; result.then = function (filled, rejected) { return closePromise.then(filled, rejected); }; result.promise = closePromise; return result; } function isArgsProps(content) { return Object.prototype.toString.call(content) === '[object Object]' && !!content.content; } var api = { open: notice, config: setMessageConfig, destroy: function destroy() { if (messageInstance) { messageInstance.destroy(); messageInstance = null; } } }; function attachTypeApi(originalApi, type) { originalApi[type] = function (content, duration, onClose) { if (isArgsProps(content)) { return originalApi.open((0, _extends2["default"])((0, _extends2["default"])({}, content), { type: type })); } if (typeof duration === 'function') { onClose = duration; duration = undefined; } return originalApi.open({ content: content, duration: duration, type: type, onClose: onClose }); }; } ['success', 'info', 'warning', 'error', 'loading'].forEach(function (type) { return attachTypeApi(api, type); }); api.warn = api.warning; api.useMessage = (0, _useMessage["default"])(getRCNotificationInstance, getRCNoticeProps); var _default = api; exports["default"] = _default; /***/ }), /* 47 */ /***/ (function(module, exports, __webpack_require__) { var arrayLikeToArray = __webpack_require__(48); function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen); } module.exports = _unsupportedIterableToArray; /***/ }), /* 48 */ /***/ (function(module, exports) { function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } module.exports = _arrayLikeToArray; /***/ }), /* 49 */ /***/ (function(module, exports, __webpack_require__) { var objectWithoutPropertiesLoose = __webpack_require__(82); function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } module.exports = _objectWithoutProperties; /***/ }), /* 50 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(1); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(49)); var _objectSpread2 = _interopRequireDefault(__webpack_require__(51)); var _utils = __webpack_require__(29); var twoToneColorPalette = { primaryColor: '#333', secondaryColor: '#E6E6E6', calculated: false }; function setTwoToneColors(_ref) { var primaryColor = _ref.primaryColor, secondaryColor = _ref.secondaryColor; twoToneColorPalette.primaryColor = primaryColor; twoToneColorPalette.secondaryColor = secondaryColor || (0, _utils.getSecondaryColor)(primaryColor); twoToneColorPalette.calculated = !!secondaryColor; } function getTwoToneColors() { return (0, _objectSpread2.default)({}, twoToneColorPalette); } var IconBase = function IconBase(props) { var icon = props.icon, className = props.className, onClick = props.onClick, style = props.style, primaryColor = props.primaryColor, secondaryColor = props.secondaryColor, restProps = (0, _objectWithoutProperties2.default)(props, ["icon", "className", "onClick", "style", "primaryColor", "secondaryColor"]); var colors = twoToneColorPalette; if (primaryColor) { colors = { primaryColor: primaryColor, secondaryColor: secondaryColor || (0, _utils.getSecondaryColor)(primaryColor) }; } (0, _utils.useInsertStyles)(); (0, _utils.warning)((0, _utils.isIconDefinition)(icon), "icon should be icon definiton, but got ".concat(icon)); if (!(0, _utils.isIconDefinition)(icon)) { return null; } var target = icon; if (target && typeof target.icon === 'function') { target = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, target), {}, { icon: target.icon(colors.primaryColor, colors.secondaryColor) }); } return (0, _utils.generate)(target.icon, "svg-".concat(target.name), (0, _objectSpread2.default)({ className: className, onClick: onClick, style: style, 'data-icon': target.name, width: '1em', height: '1em', fill: 'currentColor', 'aria-hidden': 'true' }, restProps)); }; IconBase.displayName = 'IconReact'; IconBase.getTwoToneColors = getTwoToneColors; IconBase.setTwoToneColors = setTwoToneColors; var _default = IconBase; exports.default = _default; /***/ }), /* 51 */ /***/ (function(module, exports, __webpack_require__) { var defineProperty = __webpack_require__(18); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread2(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } module.exports = _objectSpread2; /***/ }), /* 52 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireWildcard = __webpack_require__(3); var _interopRequireDefault = __webpack_require__(1); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = useNotification; var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(99)); var _slicedToArray2 = _interopRequireDefault(__webpack_require__(21)); var React = _interopRequireWildcard(__webpack_require__(0)); var _Notice = _interopRequireDefault(__webpack_require__(103)); function useNotification(notificationInstance) { var createdRef = React.useRef({}); var _React$useState = React.useState([]), _React$useState2 = (0, _slicedToArray2.default)(_React$useState, 2), elements = _React$useState2[0], setElements = _React$useState2[1]; function notify(noticeProps) { notificationInstance.add(noticeProps, function (div, props) { var key = props.key; if (div && !createdRef.current[key]) { var noticeEle = React.createElement(_Notice.default, Object.assign({}, props, { holder: div })); createdRef.current[key] = noticeEle; setElements(function (originElements) { return [].concat((0, _toConsumableArray2.default)(originElements), [noticeEle]); }); } }); } return [notify, React.createElement(React.Fragment, null, elements)]; } /***/ }), /* 53 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js + 1 modules var objectWithoutProperties = __webpack_require__(7); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js var defineProperty = __webpack_require__(4); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js var classCallCheck = __webpack_require__(11); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js var createClass = __webpack_require__(16); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js + 1 modules var inherits = __webpack_require__(19); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js + 1 modules var possibleConstructorReturn = __webpack_require__(20); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js var getPrototypeOf = __webpack_require__(13); // EXTERNAL MODULE: external "React" var external_React_ = __webpack_require__(0); var external_React_default = /*#__PURE__*/__webpack_require__.n(external_React_); // EXTERNAL MODULE: external "ReactDOM" var external_ReactDOM_ = __webpack_require__(17); var external_ReactDOM_default = /*#__PURE__*/__webpack_require__.n(external_ReactDOM_); // CONCATENATED MODULE: ./node_modules/rc-util/es/unsafeLifecyclesPolyfill.js var unsafeLifecyclesPolyfill_unsafeLifecyclesPolyfill = function unsafeLifecyclesPolyfill(Component) { var prototype = Component.prototype; if (!prototype || !prototype.isReactComponent) { throw new Error('Can only polyfill class components'); } // only handle componentWillReceiveProps if (typeof prototype.componentWillReceiveProps !== 'function') { return Component; } // In React 16.9, React.Profiler was introduced together with UNSAFE_componentWillReceiveProps // https://reactjs.org/blog/2019/08/08/react-v16.9.0.html#performance-measurements-with-reactprofiler if (!external_React_default.a.Profiler) { return Component; } // Here polyfill get started prototype.UNSAFE_componentWillReceiveProps = prototype.componentWillReceiveProps; delete prototype.componentWillReceiveProps; return Component; }; /* harmony default export */ var es_unsafeLifecyclesPolyfill = (unsafeLifecyclesPolyfill_unsafeLifecyclesPolyfill); // CONCATENATED MODULE: ./node_modules/rc-animate/es/ChildrenUtils.js function toArrayChildren(children) { var ret = []; external_React_default.a.Children.forEach(children, function (child) { ret.push(child); }); return ret; } function findChildInChildrenByKey(children, key) { var ret = null; if (children) { children.forEach(function (child) { if (ret) { return; } if (child && child.key === key) { ret = child; } }); } return ret; } function findShownChildInChildrenByKey(children, key, showProp) { var ret = null; if (children) { children.forEach(function (child) { if (child && child.key === key && child.props[showProp]) { if (ret) { throw new Error('two child with same key for children'); } ret = child; } }); } return ret; } function findHiddenChildInChildrenByKey(children, key, showProp) { var found = 0; if (children) { children.forEach(function (child) { if (found) { return; } found = child && child.key === key && !child.props[showProp]; }); } return found; } function isSameChildren(c1, c2, showProp) { var same = c1.length === c2.length; if (same) { c1.forEach(function (child, index) { var child2 = c2[index]; if (child && child2) { if (child && !child2 || !child && child2) { same = false; } else if (child.key !== child2.key) { same = false; } else if (showProp && child.props[showProp] !== child2.props[showProp]) { same = false; } } }); } return same; } function mergeChildren(prev, next) { var ret = []; // For each key of `next`, the list of keys to insert before that key in // the combined list var nextChildrenPending = {}; var pendingChildren = []; prev.forEach(function (child) { if (child && findChildInChildrenByKey(next, child.key)) { if (pendingChildren.length) { nextChildrenPending[child.key] = pendingChildren; pendingChildren = []; } } else { pendingChildren.push(child); } }); next.forEach(function (child) { if (child && Object.prototype.hasOwnProperty.call(nextChildrenPending, child.key)) { ret = ret.concat(nextChildrenPending[child.key]); } ret.push(child); }); ret = ret.concat(pendingChildren); return ret; } // CONCATENATED MODULE: ./node_modules/@ant-design/css-animation/es/Event.js var START_EVENT_NAME_MAP = { transitionstart: { transition: 'transitionstart', WebkitTransition: 'webkitTransitionStart', MozTransition: 'mozTransitionStart', OTransition: 'oTransitionStart', msTransition: 'MSTransitionStart' }, animationstart: { animation: 'animationstart', WebkitAnimation: 'webkitAnimationStart', MozAnimation: 'mozAnimationStart', OAnimation: 'oAnimationStart', msAnimation: 'MSAnimationStart' } }; var END_EVENT_NAME_MAP = { transitionend: { transition: 'transitionend', WebkitTransition: 'webkitTransitionEnd', MozTransition: 'mozTransitionEnd', OTransition: 'oTransitionEnd', msTransition: 'MSTransitionEnd' }, animationend: { animation: 'animationend', WebkitAnimation: 'webkitAnimationEnd', MozAnimation: 'mozAnimationEnd', OAnimation: 'oAnimationEnd', msAnimation: 'MSAnimationEnd' } }; var startEvents = []; var endEvents = []; function detectEvents() { var testEl = document.createElement('div'); var style = testEl.style; if (!('AnimationEvent' in window)) { delete START_EVENT_NAME_MAP.animationstart.animation; delete END_EVENT_NAME_MAP.animationend.animation; } if (!('TransitionEvent' in window)) { delete START_EVENT_NAME_MAP.transitionstart.transition; delete END_EVENT_NAME_MAP.transitionend.transition; } function process(EVENT_NAME_MAP, events) { for (var baseEventName in EVENT_NAME_MAP) { if (EVENT_NAME_MAP.hasOwnProperty(baseEventName)) { var baseEvents = EVENT_NAME_MAP[baseEventName]; for (var styleName in baseEvents) { if (styleName in style) { events.push(baseEvents[styleName]); break; } } } } } process(START_EVENT_NAME_MAP, startEvents); process(END_EVENT_NAME_MAP, endEvents); } if (typeof window !== 'undefined' && typeof document !== 'undefined') { detectEvents(); } function addEventListener(node, eventName, eventListener) { node.addEventListener(eventName, eventListener, false); } function removeEventListener(node, eventName, eventListener) { node.removeEventListener(eventName, eventListener, false); } var TransitionEvents = { // Start events startEvents: startEvents, addStartEventListener: function addStartEventListener(node, eventListener) { if (startEvents.length === 0) { window.setTimeout(eventListener, 0); return; } startEvents.forEach(function (startEvent) { addEventListener(node, startEvent, eventListener); }); }, removeStartEventListener: function removeStartEventListener(node, eventListener) { if (startEvents.length === 0) { return; } startEvents.forEach(function (startEvent) { removeEventListener(node, startEvent, eventListener); }); }, // End events endEvents: endEvents, addEndEventListener: function addEndEventListener(node, eventListener) { if (endEvents.length === 0) { window.setTimeout(eventListener, 0); return; } endEvents.forEach(function (endEvent) { addEventListener(node, endEvent, eventListener); }); }, removeEndEventListener: function removeEndEventListener(node, eventListener) { if (endEvents.length === 0) { return; } endEvents.forEach(function (endEvent) { removeEventListener(node, endEvent, eventListener); }); } }; /* harmony default export */ var Event = (TransitionEvents); // CONCATENATED MODULE: ./node_modules/@ant-design/css-animation/es/index.js function _typeof2(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); } var _typeof = typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol" ? function (obj) { return _typeof2(obj); } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj); }; var isCssAnimationSupported = Event.endEvents.length !== 0; var capitalPrefixes = ['Webkit', 'Moz', 'O', // ms is special .... ! 'ms']; var prefixes = ['-webkit-', '-moz-', '-o-', 'ms-', '']; function getStyleProperty(node, name) { // old ff need null, https://developer.mozilla.org/en-US/docs/Web/API/Window/getComputedStyle var style = window.getComputedStyle(node, null); var ret = ''; for (var i = 0; i < prefixes.length; i++) { ret = style.getPropertyValue(prefixes[i] + name); if (ret) { break; } } return ret; } function fixBrowserByTimeout(node) { if (isCssAnimationSupported) { var transitionDelay = parseFloat(getStyleProperty(node, 'transition-delay')) || 0; var transitionDuration = parseFloat(getStyleProperty(node, 'transition-duration')) || 0; var animationDelay = parseFloat(getStyleProperty(node, 'animation-delay')) || 0; var animationDuration = parseFloat(getStyleProperty(node, 'animation-duration')) || 0; var time = Math.max(transitionDuration + transitionDelay, animationDuration + animationDelay); // sometimes, browser bug node.rcEndAnimTimeout = setTimeout(function () { node.rcEndAnimTimeout = null; if (node.rcEndListener) { node.rcEndListener(); } }, time * 1000 + 200); } } function clearBrowserBugTimeout(node) { if (node.rcEndAnimTimeout) { clearTimeout(node.rcEndAnimTimeout); node.rcEndAnimTimeout = null; } } var es_cssAnimation = function cssAnimation(node, transitionName, endCallback) { var nameIsObj = (typeof transitionName === 'undefined' ? 'undefined' : _typeof(transitionName)) === 'object'; var className = nameIsObj ? transitionName.name : transitionName; var activeClassName = nameIsObj ? transitionName.active : transitionName + '-active'; var end = endCallback; var start = void 0; var active = void 0; if (endCallback && Object.prototype.toString.call(endCallback) === '[object Object]') { end = endCallback.end; start = endCallback.start; active = endCallback.active; } if (node.rcEndListener) { node.rcEndListener(); } node.rcEndListener = function (e) { if (e && e.target !== node) { return; } if (node.rcAnimTimeout) { clearTimeout(node.rcAnimTimeout); node.rcAnimTimeout = null; } clearBrowserBugTimeout(node); node.classList.remove(className); node.classList.remove(activeClassName); Event.removeEndEventListener(node, node.rcEndListener); node.rcEndListener = null; // Usually this optional end is used for informing an owner of // a leave animation and telling it to remove the child. if (end) { end(); } }; Event.addEndEventListener(node, node.rcEndListener); if (start) { start(); } node.classList.add(className); node.rcAnimTimeout = setTimeout(function () { node.rcAnimTimeout = null; node.classList.add(activeClassName); if (active) { active(); } fixBrowserByTimeout(node); }, 0); return { stop: function stop() { if (node.rcEndListener) { node.rcEndListener(); } } }; }; es_cssAnimation.style = function (node, style, callback) { if (node.rcEndListener) { node.rcEndListener(); } node.rcEndListener = function (e) { if (e && e.target !== node) { return; } if (node.rcAnimTimeout) { clearTimeout(node.rcAnimTimeout); node.rcAnimTimeout = null; } clearBrowserBugTimeout(node); Event.removeEndEventListener(node, node.rcEndListener); node.rcEndListener = null; // Usually this optional callback is used for informing an owner of // a leave animation and telling it to remove the child. if (callback) { callback(); } }; Event.addEndEventListener(node, node.rcEndListener); node.rcAnimTimeout = setTimeout(function () { for (var s in style) { if (style.hasOwnProperty(s)) { node.style[s] = style[s]; } } node.rcAnimTimeout = null; fixBrowserByTimeout(node); }, 0); }; es_cssAnimation.setTransition = function (node, p, value) { var property = p; var v = value; if (value === undefined) { v = property; property = ''; } property = property || ''; capitalPrefixes.forEach(function (prefix) { node.style[prefix + 'Transition' + property] = v; }); }; es_cssAnimation.isCssAnimationSupported = isCssAnimationSupported; /* harmony default export */ var es = (es_cssAnimation); // CONCATENATED MODULE: ./node_modules/rc-animate/es/util/animate.js var util = { isAppearSupported: function isAppearSupported(props) { return props.transitionName && props.transitionAppear || props.animation.appear; }, isEnterSupported: function isEnterSupported(props) { return props.transitionName && props.transitionEnter || props.animation.enter; }, isLeaveSupported: function isLeaveSupported(props) { return props.transitionName && props.transitionLeave || props.animation.leave; }, allowAppearCallback: function allowAppearCallback(props) { return props.transitionAppear || props.animation.appear; }, allowEnterCallback: function allowEnterCallback(props) { return props.transitionEnter || props.animation.enter; }, allowLeaveCallback: function allowLeaveCallback(props) { return props.transitionLeave || props.animation.leave; } }; /* harmony default export */ var animate = (util); // CONCATENATED MODULE: ./node_modules/rc-animate/es/AnimateChild.js function AnimateChild_typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { AnimateChild_typeof = function _typeof(obj) { return typeof obj; }; } else { AnimateChild_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return AnimateChild_typeof(obj); } var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (AnimateChild_typeof(call) === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + AnimateChild_typeof(superClass)); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /* eslint react/prop-types: 0 */ var transitionMap = { enter: 'transitionEnter', appear: 'transitionAppear', leave: 'transitionLeave' }; var AnimateChild_AnimateChild = function (_React$Component) { _inherits(AnimateChild, _React$Component); function AnimateChild() { _classCallCheck(this, AnimateChild); return _possibleConstructorReturn(this, (AnimateChild.__proto__ || Object.getPrototypeOf(AnimateChild)).apply(this, arguments)); } _createClass(AnimateChild, [{ key: 'componentWillUnmount', value: function componentWillUnmount() { this.stop(); } }, { key: 'componentWillEnter', value: function componentWillEnter(done) { if (animate.isEnterSupported(this.props)) { this.transition('enter', done); } else { done(); } } }, { key: 'componentWillAppear', value: function componentWillAppear(done) { if (animate.isAppearSupported(this.props)) { this.transition('appear', done); } else { done(); } } }, { key: 'componentWillLeave', value: function componentWillLeave(done) { if (animate.isLeaveSupported(this.props)) { this.transition('leave', done); } else { // always sync, do not interupt with react component life cycle // update hidden -> animate hidden -> // didUpdate -> animate leave -> unmount (if animate is none) done(); } } }, { key: 'transition', value: function transition(animationType, finishCallback) { var _this2 = this; var node = external_ReactDOM_default.a.findDOMNode(this); var props = this.props; var transitionName = props.transitionName; var nameIsObj = AnimateChild_typeof(transitionName) === 'object'; this.stop(); var end = function end() { _this2.stopper = null; finishCallback(); }; if ((isCssAnimationSupported || !props.animation[animationType]) && transitionName && props[transitionMap[animationType]]) { var name = nameIsObj ? transitionName[animationType] : transitionName + '-' + animationType; var activeName = name + '-active'; if (nameIsObj && transitionName[animationType + 'Active']) { activeName = transitionName[animationType + 'Active']; } this.stopper = es(node, { name: name, active: activeName }, end); } else { this.stopper = props.animation[animationType](node, end); } } }, { key: 'stop', value: function stop() { var stopper = this.stopper; if (stopper) { this.stopper = null; stopper.stop(); } } }, { key: 'render', value: function render() { return this.props.children; } }]); return AnimateChild; }(external_React_default.a.Component); /* harmony default export */ var es_AnimateChild = (AnimateChild_AnimateChild); // CONCATENATED MODULE: ./node_modules/rc-animate/es/Animate.js function Animate_typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { Animate_typeof = function _typeof(obj) { return typeof obj; }; } else { Animate_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return Animate_typeof(obj); } var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var Animate_createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function Animate_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function Animate_possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (Animate_typeof(call) === "object" || typeof call === "function") ? call : self; } function Animate_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + Animate_typeof(superClass)); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /* eslint react/prop-types: 0 */ var defaultKey = 'rc_animate_' + Date.now(); function getChildrenFromProps(props) { var children = props.children; if ( /*#__PURE__*/external_React_default.a.isValidElement(children)) { if (!children.key) { return /*#__PURE__*/external_React_default.a.cloneElement(children, { key: defaultKey }); } } return children; } function noop() {} var Animate_Animate = function (_React$Component) { Animate_inherits(Animate, _React$Component); function Animate(props) { Animate_classCallCheck(this, Animate); var _this = Animate_possibleConstructorReturn(this, (Animate.__proto__ || Object.getPrototypeOf(Animate)).call(this, props)); Animate_initialiseProps.call(_this); _this.currentlyAnimatingKeys = {}; _this.keysToEnter = []; _this.keysToLeave = []; _this.state = { children: toArrayChildren(getChildrenFromProps(props)) }; _this.childrenRefs = {}; return _this; } // eslint-disable-line Animate_createClass(Animate, [{ key: 'componentDidMount', value: function componentDidMount() { var _this2 = this; var showProp = this.props.showProp; var children = this.state.children; if (showProp) { children = children.filter(function (child) { return !!child.props[showProp]; }); } children.forEach(function (child) { if (child) { _this2.performAppear(child.key); } }); } }, { key: 'componentWillReceiveProps', value: function componentWillReceiveProps(nextProps) { var _this3 = this; this.nextProps = nextProps; var nextChildren = toArrayChildren(getChildrenFromProps(nextProps)); var props = this.props; // exclusive needs immediate response if (props.exclusive) { Object.keys(this.currentlyAnimatingKeys).forEach(function (key) { _this3.stop(key); }); } var showProp = props.showProp; var currentlyAnimatingKeys = this.currentlyAnimatingKeys; // last props children if exclusive var currentChildren = props.exclusive ? toArrayChildren(getChildrenFromProps(props)) : this.state.children; // in case destroy in showProp mode var newChildren = []; if (showProp) { currentChildren.forEach(function (currentChild) { var nextChild = currentChild && findChildInChildrenByKey(nextChildren, currentChild.key); var newChild = void 0; if ((!nextChild || !nextChild.props[showProp]) && currentChild.props[showProp]) { newChild = /*#__PURE__*/external_React_default.a.cloneElement(nextChild || currentChild, _defineProperty({}, showProp, true)); } else { newChild = nextChild; } if (newChild) { newChildren.push(newChild); } }); nextChildren.forEach(function (nextChild) { if (!nextChild || !findChildInChildrenByKey(currentChildren, nextChild.key)) { newChildren.push(nextChild); } }); } else { newChildren = mergeChildren(currentChildren, nextChildren); } // need render to avoid update this.setState({ children: newChildren }); nextChildren.forEach(function (child) { var key = child && child.key; if (child && currentlyAnimatingKeys[key]) { return; } var hasPrev = child && findChildInChildrenByKey(currentChildren, key); if (showProp) { var showInNext = child.props[showProp]; if (hasPrev) { var showInNow = findShownChildInChildrenByKey(currentChildren, key, showProp); if (!showInNow && showInNext) { _this3.keysToEnter.push(key); } } else if (showInNext) { _this3.keysToEnter.push(key); } } else if (!hasPrev) { _this3.keysToEnter.push(key); } }); currentChildren.forEach(function (child) { var key = child && child.key; if (child && currentlyAnimatingKeys[key]) { return; } var hasNext = child && findChildInChildrenByKey(nextChildren, key); if (showProp) { var showInNow = child.props[showProp]; if (hasNext) { var showInNext = findShownChildInChildrenByKey(nextChildren, key, showProp); if (!showInNext && showInNow) { _this3.keysToLeave.push(key); } } else if (showInNow) { _this3.keysToLeave.push(key); } } else if (!hasNext) { _this3.keysToLeave.push(key); } }); } }, { key: 'componentDidUpdate', value: function componentDidUpdate() { var keysToEnter = this.keysToEnter; this.keysToEnter = []; keysToEnter.forEach(this.performEnter); var keysToLeave = this.keysToLeave; this.keysToLeave = []; keysToLeave.forEach(this.performLeave); } }, { key: 'isValidChildByKey', value: function isValidChildByKey(currentChildren, key) { var showProp = this.props.showProp; if (showProp) { return findShownChildInChildrenByKey(currentChildren, key, showProp); } return findChildInChildrenByKey(currentChildren, key); } }, { key: 'stop', value: function stop(key) { delete this.currentlyAnimatingKeys[key]; var component = this.childrenRefs[key]; if (component) { component.stop(); } } }, { key: 'render', value: function render() { var _this4 = this; var props = this.props; this.nextProps = props; var stateChildren = this.state.children; var children = null; if (stateChildren) { children = stateChildren.map(function (child) { if (child === null || child === undefined) { return child; } if (!child.key) { throw new Error('must set key for children'); } return /*#__PURE__*/external_React_default.a.createElement(es_AnimateChild, { key: child.key, ref: function ref(node) { _this4.childrenRefs[child.key] = node; }, animation: props.animation, transitionName: props.transitionName, transitionEnter: props.transitionEnter, transitionAppear: props.transitionAppear, transitionLeave: props.transitionLeave }, child); }); } var Component = props.component; if (Component) { var passedProps = props; if (typeof Component === 'string') { passedProps = _extends({ className: props.className, style: props.style }, props.componentProps); } return /*#__PURE__*/external_React_default.a.createElement(Component, passedProps, children); } return children[0] || null; } }]); return Animate; }(external_React_default.a.Component); Animate_Animate.isAnimate = true; Animate_Animate.defaultProps = { animation: {}, component: 'span', componentProps: {}, transitionEnter: true, transitionLeave: true, transitionAppear: false, onEnd: noop, onEnter: noop, onLeave: noop, onAppear: noop }; var Animate_initialiseProps = function _initialiseProps() { var _this5 = this; this.performEnter = function (key) { // may already remove by exclusive if (_this5.childrenRefs[key]) { _this5.currentlyAnimatingKeys[key] = true; _this5.childrenRefs[key].componentWillEnter(_this5.handleDoneAdding.bind(_this5, key, 'enter')); } }; this.performAppear = function (key) { if (_this5.childrenRefs[key]) { _this5.currentlyAnimatingKeys[key] = true; _this5.childrenRefs[key].componentWillAppear(_this5.handleDoneAdding.bind(_this5, key, 'appear')); } }; this.handleDoneAdding = function (key, type) { var props = _this5.props; delete _this5.currentlyAnimatingKeys[key]; // if update on exclusive mode, skip check if (props.exclusive && props !== _this5.nextProps) { return; } var currentChildren = toArrayChildren(getChildrenFromProps(props)); if (!_this5.isValidChildByKey(currentChildren, key)) { // exclusive will not need this _this5.performLeave(key); } else if (type === 'appear') { if (animate.allowAppearCallback(props)) { props.onAppear(key); props.onEnd(key, true); } } else if (animate.allowEnterCallback(props)) { props.onEnter(key); props.onEnd(key, true); } }; this.performLeave = function (key) { // may already remove by exclusive if (_this5.childrenRefs[key]) { _this5.currentlyAnimatingKeys[key] = true; _this5.childrenRefs[key].componentWillLeave(_this5.handleDoneLeaving.bind(_this5, key)); } }; this.handleDoneLeaving = function (key) { var props = _this5.props; delete _this5.currentlyAnimatingKeys[key]; // if update on exclusive mode, skip check if (props.exclusive && props !== _this5.nextProps) { return; } var currentChildren = toArrayChildren(getChildrenFromProps(props)); // in case state change is too fast if (_this5.isValidChildByKey(currentChildren, key)) { _this5.performEnter(key); } else { var end = function end() { if (animate.allowLeaveCallback(props)) { props.onLeave(key); props.onEnd(key, false); } }; if (!isSameChildren(_this5.state.children, currentChildren, props.showProp)) { _this5.setState({ children: currentChildren }, end); } else { end(); } } }; }; /* harmony default export */ var es_Animate = (es_unsafeLifecyclesPolyfill(Animate_Animate)); // CONCATENATED MODULE: ./node_modules/rc-util/es/createChainedFunction.js /** * Safe chained function * * Will only create a new function if needed, * otherwise will pass back existing functions or null. * * @returns {function|null} */ function createChainedFunction() { var args = [].slice.call(arguments, 0); if (args.length === 1) { return args[0]; } return function chainedFunction() { for (var i = 0; i < args.length; i++) { if (args[i] && args[i].apply) { args[i].apply(this, arguments); } } }; } // EXTERNAL MODULE: ./node_modules/classnames/index.js var classnames = __webpack_require__(6); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); // CONCATENATED MODULE: ./node_modules/rc-notification/es/Notice.js function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function () { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = Object(getPrototypeOf["a" /* default */])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Object(possibleConstructorReturn["a" /* default */])(this, result); }; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } var Notice_Notice = /*#__PURE__*/function (_Component) { Object(inherits["a" /* default */])(Notice, _Component); var _super = _createSuper(Notice); function Notice() { var _this; Object(classCallCheck["a" /* default */])(this, Notice); _this = _super.apply(this, arguments); _this.closeTimer = null; _this.close = function (e) { if (e) { e.stopPropagation(); } _this.clearCloseTimer(); var onClose = _this.props.onClose; if (onClose) { onClose(); } }; _this.startCloseTimer = function () { if (_this.props.duration) { _this.closeTimer = window.setTimeout(function () { _this.close(); }, _this.props.duration * 1000); } }; _this.clearCloseTimer = function () { if (_this.closeTimer) { clearTimeout(_this.closeTimer); _this.closeTimer = null; } }; return _this; } Object(createClass["a" /* default */])(Notice, [{ key: "componentDidMount", value: function componentDidMount() { this.startCloseTimer(); } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps) { if (this.props.duration !== prevProps.duration || this.props.update) { this.restartCloseTimer(); } } }, { key: "componentWillUnmount", value: function componentWillUnmount() { this.clearCloseTimer(); } }, { key: "restartCloseTimer", value: function restartCloseTimer() { this.clearCloseTimer(); this.startCloseTimer(); } }, { key: "render", value: function render() { var _this2 = this; var _this$props = this.props, prefixCls = _this$props.prefixCls, className = _this$props.className, closable = _this$props.closable, closeIcon = _this$props.closeIcon, style = _this$props.style, onClick = _this$props.onClick, children = _this$props.children, holder = _this$props.holder; var componentClass = "".concat(prefixCls, "-notice"); var dataOrAriaAttributeProps = Object.keys(this.props).reduce(function (acc, key) { if (key.substr(0, 5) === 'data-' || key.substr(0, 5) === 'aria-' || key === 'role') { acc[key] = _this2.props[key]; } return acc; }, {}); var node = /*#__PURE__*/external_React_default.a.createElement("div", Object.assign({ className: classnames_default()(componentClass, className, Object(defineProperty["a" /* default */])({}, "".concat(componentClass, "-closable"), closable)), style: style, onMouseEnter: this.clearCloseTimer, onMouseLeave: this.startCloseTimer, onClick: onClick }, dataOrAriaAttributeProps), /*#__PURE__*/external_React_default.a.createElement("div", { className: "".concat(componentClass, "-content") }, children), closable ? /*#__PURE__*/external_React_default.a.createElement("a", { tabIndex: 0, onClick: this.close, className: "".concat(componentClass, "-close") }, closeIcon || /*#__PURE__*/external_React_default.a.createElement("span", { className: "".concat(componentClass, "-close-x") })) : null); if (holder) { return /*#__PURE__*/external_ReactDOM_default.a.createPortal(node, holder); } return node; } }]); return Notice; }(external_React_["Component"]); Notice_Notice.defaultProps = { onClose: function onClose() {}, duration: 1.5, style: { right: '50%' } }; // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 3 modules var toConsumableArray = __webpack_require__(2); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 3 modules var slicedToArray = __webpack_require__(12); // CONCATENATED MODULE: ./node_modules/rc-notification/es/useNotification.js function useNotification_useNotification(notificationInstance) { var createdRef = external_React_["useRef"]({}); var _React$useState = external_React_["useState"]([]), _React$useState2 = Object(slicedToArray["a" /* default */])(_React$useState, 2), elements = _React$useState2[0], setElements = _React$useState2[1]; function notify(noticeProps) { notificationInstance.add(noticeProps, function (div, props) { var key = props.key; if (div && !createdRef.current[key]) { var noticeEle = /*#__PURE__*/external_React_["createElement"](Notice_Notice, Object.assign({}, props, { holder: div })); createdRef.current[key] = noticeEle; setElements(function (originElements) { return [].concat(Object(toConsumableArray["a" /* default */])(originElements), [noticeEle]); }); } }); } return [notify, /*#__PURE__*/external_React_["createElement"](external_React_["Fragment"], null, elements)]; } // CONCATENATED MODULE: ./node_modules/rc-notification/es/Notification.js function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function Notification_createSuper(Derived) { var hasNativeReflectConstruct = Notification_isNativeReflectConstruct(); return function () { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = Object(getPrototypeOf["a" /* default */])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Object(possibleConstructorReturn["a" /* default */])(this, result); }; } function Notification_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } var seed = 0; var now = Date.now(); function getUuid() { var id = seed; seed += 1; return "rcNotification_".concat(now, "_").concat(id); } var Notification_Notification = /*#__PURE__*/function (_Component) { Object(inherits["a" /* default */])(Notification, _Component); var _super = Notification_createSuper(Notification); function Notification() { var _this; Object(classCallCheck["a" /* default */])(this, Notification); _this = _super.apply(this, arguments); _this.state = { notices: [] }; _this.hookRefs = new Map(); _this.add = function (notice, holderCallback) { // eslint-disable-next-line no-param-reassign notice.key = notice.key || getUuid(); var key = notice.key; var maxCount = _this.props.maxCount; _this.setState(function (previousState) { var notices = previousState.notices; var noticeIndex = notices.map(function (v) { return v.notice.key; }).indexOf(key); var updatedNotices = notices.concat(); if (noticeIndex !== -1) { updatedNotices.splice(noticeIndex, 1, { notice: notice, holderCallback: holderCallback }); } else { if (maxCount && notices.length >= maxCount) { // XXX, use key of first item to update new added (let React to move exsiting // instead of remove and mount). Same key was used before for both a) external // manual control and b) internal react 'key' prop , which is not that good. // eslint-disable-next-line no-param-reassign notice.updateKey = updatedNotices[0].notice.updateKey || updatedNotices[0].notice.key; updatedNotices.shift(); } updatedNotices.push({ notice: notice, holderCallback: holderCallback }); } return { notices: updatedNotices }; }); }; _this.remove = function (key) { _this.setState(function (previousState) { return { notices: previousState.notices.filter(function (_ref) { var notice = _ref.notice; return notice.key !== key; }) }; }); }; return _this; } Object(createClass["a" /* default */])(Notification, [{ key: "getTransitionName", value: function getTransitionName() { var _this$props = this.props, prefixCls = _this$props.prefixCls, animation = _this$props.animation; var transitionName = this.props.transitionName; if (!transitionName && animation) { transitionName = "".concat(prefixCls, "-").concat(animation); } return transitionName; } }, { key: "render", value: function render() { var _this2 = this; var notices = this.state.notices; var _this$props2 = this.props, prefixCls = _this$props2.prefixCls, className = _this$props2.className, closeIcon = _this$props2.closeIcon, style = _this$props2.style; var noticeNodes = notices.map(function (_ref2, index) { var notice = _ref2.notice, holderCallback = _ref2.holderCallback; var update = Boolean(index === notices.length - 1 && notice.updateKey); var key = notice.updateKey ? notice.updateKey : notice.key; var onClose = createChainedFunction(_this2.remove.bind(_this2, notice.key), notice.onClose); var noticeProps = _objectSpread(_objectSpread(_objectSpread({ prefixCls: prefixCls, closeIcon: closeIcon }, notice), notice.props), {}, { key: key, update: update, onClose: onClose, onClick: notice.onClick, children: notice.content }); if (holderCallback) { return /*#__PURE__*/external_React_default.a.createElement("div", { key: key, className: "".concat(prefixCls, "-hook-holder"), ref: function ref(div) { if (typeof key === 'undefined') { return; } if (div) { _this2.hookRefs.set(key, div); holderCallback(div, noticeProps); } else { _this2.hookRefs.delete(key); } } }); } return /*#__PURE__*/external_React_default.a.createElement(Notice_Notice, Object.assign({}, noticeProps)); }); return /*#__PURE__*/external_React_default.a.createElement("div", { className: classnames_default()(prefixCls, className), style: style }, /*#__PURE__*/external_React_default.a.createElement(es_Animate, { transitionName: this.getTransitionName() }, noticeNodes)); } }]); return Notification; }(external_React_["Component"]); Notification_Notification.defaultProps = { prefixCls: 'rc-notification', animation: 'fade', style: { top: 65, left: '50%' } }; Notification_Notification.newInstance = function newNotificationInstance(properties, callback) { var _ref3 = properties || {}, getContainer = _ref3.getContainer, props = Object(objectWithoutProperties["a" /* default */])(_ref3, ["getContainer"]); var div = document.createElement('div'); if (getContainer) { var root = getContainer(); root.appendChild(div); } else { document.body.appendChild(div); } var called = false; function ref(notification) { if (called) { return; } called = true; callback({ notice: function notice(noticeProps) { notification.add(noticeProps); }, removeNotice: function removeNotice(key) { notification.remove(key); }, component: notification, destroy: function destroy() { external_ReactDOM_default.a.unmountComponentAtNode(div); if (div.parentNode) { div.parentNode.removeChild(div); } }, // Hooks useNotification: function useNotification() { return useNotification_useNotification(notification); } }); } // Only used for test case usage if (false) {} external_ReactDOM_default.a.render( /*#__PURE__*/external_React_default.a.createElement(Notification_Notification, Object.assign({}, props, { ref: ref })), div); }; /* harmony default export */ var es_Notification = (Notification_Notification); // CONCATENATED MODULE: ./node_modules/rc-notification/es/index.js /* harmony default export */ var rc_notification_es = __webpack_exports__["default"] = (es_Notification); /***/ }), /* 54 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; if (true) { module.exports = __webpack_require__(58); } else {} /***/ }), /* 55 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); } function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; } function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); } /* eslint no-console:0 */ var formatRegExp = /%[sdj%]/g; var warning = function warning() {}; // don't print warning message when in production env or node runtime if (typeof process !== 'undefined' && process.env && "production" !== 'production' && typeof window !== 'undefined' && typeof document !== 'undefined') { warning = function warning(type, errors) { if (typeof console !== 'undefined' && console.warn) { if (errors.every(function (e) { return typeof e === 'string'; })) { console.warn(type, errors); } } }; } function convertFieldsError(errors) { if (!errors || !errors.length) return null; var fields = {}; errors.forEach(function (error) { var field = error.field; fields[field] = fields[field] || []; fields[field].push(error); }); return fields; } function format() { for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } var i = 1; var f = args[0]; var len = args.length; if (typeof f === 'function') { return f.apply(null, args.slice(1)); } if (typeof f === 'string') { var str = String(f).replace(formatRegExp, function (x) { if (x === '%%') { return '%'; } if (i >= len) { return x; } switch (x) { case '%s': return String(args[i++]); case '%d': return Number(args[i++]); case '%j': try { return JSON.stringify(args[i++]); } catch (_) { return '[Circular]'; } break; default: return x; } }); return str; } return f; } function isNativeStringType(type) { return type === 'string' || type === 'url' || type === 'hex' || type === 'email' || type === 'date' || type === 'pattern'; } function isEmptyValue(value, type) { if (value === undefined || value === null) { return true; } if (type === 'array' && Array.isArray(value) && !value.length) { return true; } if (isNativeStringType(type) && typeof value === 'string' && !value) { return true; } return false; } function asyncParallelArray(arr, func, callback) { var results = []; var total = 0; var arrLength = arr.length; function count(errors) { results.push.apply(results, errors); total++; if (total === arrLength) { callback(results); } } arr.forEach(function (a) { func(a, count); }); } function asyncSerialArray(arr, func, callback) { var index = 0; var arrLength = arr.length; function next(errors) { if (errors && errors.length) { callback(errors); return; } var original = index; index = index + 1; if (original < arrLength) { func(arr[original], next); } else { callback([]); } } next([]); } function flattenObjArr(objArr) { var ret = []; Object.keys(objArr).forEach(function (k) { ret.push.apply(ret, objArr[k]); }); return ret; } var AsyncValidationError = /*#__PURE__*/function (_Error) { _inheritsLoose(AsyncValidationError, _Error); function AsyncValidationError(errors, fields) { var _this; _this = _Error.call(this, 'Async Validation Error') || this; _this.errors = errors; _this.fields = fields; return _this; } return AsyncValidationError; }( /*#__PURE__*/_wrapNativeSuper(Error)); function asyncMap(objArr, option, func, callback) { if (option.first) { var _pending = new Promise(function (resolve, reject) { var next = function next(errors) { callback(errors); return errors.length ? reject(new AsyncValidationError(errors, convertFieldsError(errors))) : resolve(); }; var flattenArr = flattenObjArr(objArr); asyncSerialArray(flattenArr, func, next); }); _pending["catch"](function (e) { return e; }); return _pending; } var firstFields = option.firstFields || []; if (firstFields === true) { firstFields = Object.keys(objArr); } var objArrKeys = Object.keys(objArr); var objArrLength = objArrKeys.length; var total = 0; var results = []; var pending = new Promise(function (resolve, reject) { var next = function next(errors) { results.push.apply(results, errors); total++; if (total === objArrLength) { callback(results); return results.length ? reject(new AsyncValidationError(results, convertFieldsError(results))) : resolve(); } }; if (!objArrKeys.length) { callback(results); resolve(); } objArrKeys.forEach(function (key) { var arr = objArr[key]; if (firstFields.indexOf(key) !== -1) { asyncSerialArray(arr, func, next); } else { asyncParallelArray(arr, func, next); } }); }); pending["catch"](function (e) { return e; }); return pending; } function complementError(rule) { return function (oe) { if (oe && oe.message) { oe.field = oe.field || rule.fullField; return oe; } return { message: typeof oe === 'function' ? oe() : oe, field: oe.field || rule.fullField }; }; } function deepMerge(target, source) { if (source) { for (var s in source) { if (source.hasOwnProperty(s)) { var value = source[s]; if (_typeof(value) === 'object' && _typeof(target[s]) === 'object') { target[s] = _extends(_extends({}, target[s]), value); } else { target[s] = value; } } } } return target; } /** * Rule for validating required fields. * * @param rule The validation rule. * @param value The value of the field on the source object. * @param source The source object being validated. * @param errors An array of errors that this rule may add * validation errors to. * @param options The validation options. * @param options.messages The validation messages. */ function required(rule, value, source, errors, options, type) { if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue(value, type || rule.type))) { errors.push(format(options.messages.required, rule.fullField)); } } /** * Rule for validating whitespace. * * @param rule The validation rule. * @param value The value of the field on the source object. * @param source The source object being validated. * @param errors An array of errors that this rule may add * validation errors to. * @param options The validation options. * @param options.messages The validation messages. */ function whitespace(rule, value, source, errors, options) { if (/^\s+$/.test(value) || value === '') { errors.push(format(options.messages.whitespace, rule.fullField)); } } /* eslint max-len:0 */ var pattern = { // http://emailregex.com/ email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/, url: new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$", 'i'), hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i }; var types = { integer: function integer(value) { return types.number(value) && parseInt(value, 10) === value; }, "float": function float(value) { return types.number(value) && !types.integer(value); }, array: function array(value) { return Array.isArray(value); }, regexp: function regexp(value) { if (value instanceof RegExp) { return true; } try { return !!new RegExp(value); } catch (e) { return false; } }, date: function date(value) { return typeof value.getTime === 'function' && typeof value.getMonth === 'function' && typeof value.getYear === 'function' && !isNaN(value.getTime()); }, number: function number(value) { if (isNaN(value)) { return false; } return typeof value === 'number'; }, object: function object(value) { return _typeof(value) === 'object' && !types.array(value); }, method: function method(value) { return typeof value === 'function'; }, email: function email(value) { return typeof value === 'string' && !!value.match(pattern.email) && value.length < 255; }, url: function url(value) { return typeof value === 'string' && !!value.match(pattern.url); }, hex: function hex(value) { return typeof value === 'string' && !!value.match(pattern.hex); } }; /** * Rule for validating the type of a value. * * @param rule The validation rule. * @param value The value of the field on the source object. * @param source The source object being validated. * @param errors An array of errors that this rule may add * validation errors to. * @param options The validation options. * @param options.messages The validation messages. */ function type(rule, value, source, errors, options) { if (rule.required && value === undefined) { required(rule, value, source, errors, options); return; } var custom = ['integer', 'float', 'array', 'regexp', 'object', 'method', 'email', 'number', 'date', 'url', 'hex']; var ruleType = rule.type; if (custom.indexOf(ruleType) > -1) { if (!types[ruleType](value)) { errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type)); } // straight typeof check } else if (ruleType && _typeof(value) !== rule.type) { errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type)); } } /** * Rule for validating minimum and maximum allowed values. * * @param rule The validation rule. * @param value The value of the field on the source object. * @param source The source object being validated. * @param errors An array of errors that this rule may add * validation errors to. * @param options The validation options. * @param options.messages The validation messages. */ function range(rule, value, source, errors, options) { var len = typeof rule.len === 'number'; var min = typeof rule.min === 'number'; var max = typeof rule.max === 'number'; // 正则匹配码点范围从U+010000一直到U+10FFFF的文字(补充平面Supplementary Plane) var spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g; var val = value; var key = null; var num = typeof value === 'number'; var str = typeof value === 'string'; var arr = Array.isArray(value); if (num) { key = 'number'; } else if (str) { key = 'string'; } else if (arr) { key = 'array'; } // if the value is not of a supported type for range validation // the validation rule rule should use the // type property to also test for a particular type if (!key) { return false; } if (arr) { val = value.length; } if (str) { // 处理码点大于U+010000的文字length属性不准确的bug,如"𠮷𠮷𠮷".lenght !== 3 val = value.replace(spRegexp, '_').length; } if (len) { if (val !== rule.len) { errors.push(format(options.messages[key].len, rule.fullField, rule.len)); } } else if (min && !max && val < rule.min) { errors.push(format(options.messages[key].min, rule.fullField, rule.min)); } else if (max && !min && val > rule.max) { errors.push(format(options.messages[key].max, rule.fullField, rule.max)); } else if (min && max && (val < rule.min || val > rule.max)) { errors.push(format(options.messages[key].range, rule.fullField, rule.min, rule.max)); } } var ENUM = 'enum'; /** * Rule for validating a value exists in an enumerable list. * * @param rule The validation rule. * @param value The value of the field on the source object. * @param source The source object being validated. * @param errors An array of errors that this rule may add * validation errors to. * @param options The validation options. * @param options.messages The validation messages. */ function enumerable(rule, value, source, errors, options) { rule[ENUM] = Array.isArray(rule[ENUM]) ? rule[ENUM] : []; if (rule[ENUM].indexOf(value) === -1) { errors.push(format(options.messages[ENUM], rule.fullField, rule[ENUM].join(', '))); } } /** * Rule for validating a regular expression pattern. * * @param rule The validation rule. * @param value The value of the field on the source object. * @param source The source object being validated. * @param errors An array of errors that this rule may add * validation errors to. * @param options The validation options. * @param options.messages The validation messages. */ function pattern$1(rule, value, source, errors, options) { if (rule.pattern) { if (rule.pattern instanceof RegExp) { // if a RegExp instance is passed, reset `lastIndex` in case its `global` // flag is accidentally set to `true`, which in a validation scenario // is not necessary and the result might be misleading rule.pattern.lastIndex = 0; if (!rule.pattern.test(value)) { errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern)); } } else if (typeof rule.pattern === 'string') { var _pattern = new RegExp(rule.pattern); if (!_pattern.test(value)) { errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern)); } } } } var rules = { required: required, whitespace: whitespace, type: type, range: range, "enum": enumerable, pattern: pattern$1 }; /** * Performs validation for string types. * * @param rule The validation rule. * @param value The value of the field on the source object. * @param callback The callback function. * @param source The source object being validated. * @param options The validation options. * @param options.messages The validation messages. */ function string(rule, value, callback, source, options) { var errors = []; var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if (isEmptyValue(value, 'string') && !rule.required) { return callback(); } rules.required(rule, value, source, errors, options, 'string'); if (!isEmptyValue(value, 'string')) { rules.type(rule, value, source, errors, options); rules.range(rule, value, source, errors, options); rules.pattern(rule, value, source, errors, options); if (rule.whitespace === true) { rules.whitespace(rule, value, source, errors, options); } } } callback(errors); } /** * Validates a function. * * @param rule The validation rule. * @param value The value of the field on the source object. * @param callback The callback function. * @param source The source object being validated. * @param options The validation options. * @param options.messages The validation messages. */ function method(rule, value, callback, source, options) { var errors = []; var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if (isEmptyValue(value) && !rule.required) { return callback(); } rules.required(rule, value, source, errors, options); if (value !== undefined) { rules.type(rule, value, source, errors, options); } } callback(errors); } /** * Validates a number. * * @param rule The validation rule. * @param value The value of the field on the source object. * @param callback The callback function. * @param source The source object being validated. * @param options The validation options. * @param options.messages The validation messages. */ function number(rule, value, callback, source, options) { var errors = []; var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if (value === '') { value = undefined; } if (isEmptyValue(value) && !rule.required) { return callback(); } rules.required(rule, value, source, errors, options); if (value !== undefined) { rules.type(rule, value, source, errors, options); rules.range(rule, value, source, errors, options); } } callback(errors); } /** * Validates a boolean. * * @param rule The validation rule. * @param value The value of the field on the source object. * @param callback The callback function. * @param source The source object being validated. * @param options The validation options. * @param options.messages The validation messages. */ function _boolean(rule, value, callback, source, options) { var errors = []; var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if (isEmptyValue(value) && !rule.required) { return callback(); } rules.required(rule, value, source, errors, options); if (value !== undefined) { rules.type(rule, value, source, errors, options); } } callback(errors); } /** * Validates the regular expression type. * * @param rule The validation rule. * @param value The value of the field on the source object. * @param callback The callback function. * @param source The source object being validated. * @param options The validation options. * @param options.messages The validation messages. */ function regexp(rule, value, callback, source, options) { var errors = []; var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if (isEmptyValue(value) && !rule.required) { return callback(); } rules.required(rule, value, source, errors, options); if (!isEmptyValue(value)) { rules.type(rule, value, source, errors, options); } } callback(errors); } /** * Validates a number is an integer. * * @param rule The validation rule. * @param value The value of the field on the source object. * @param callback The callback function. * @param source The source object being validated. * @param options The validation options. * @param options.messages The validation messages. */ function integer(rule, value, callback, source, options) { var errors = []; var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if (isEmptyValue(value) && !rule.required) { return callback(); } rules.required(rule, value, source, errors, options); if (value !== undefined) { rules.type(rule, value, source, errors, options); rules.range(rule, value, source, errors, options); } } callback(errors); } /** * Validates a number is a floating point number. * * @param rule The validation rule. * @param value The value of the field on the source object. * @param callback The callback function. * @param source The source object being validated. * @param options The validation options. * @param options.messages The validation messages. */ function floatFn(rule, value, callback, source, options) { var errors = []; var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if (isEmptyValue(value) && !rule.required) { return callback(); } rules.required(rule, value, source, errors, options); if (value !== undefined) { rules.type(rule, value, source, errors, options); rules.range(rule, value, source, errors, options); } } callback(errors); } /** * Validates an array. * * @param rule The validation rule. * @param value The value of the field on the source object. * @param callback The callback function. * @param source The source object being validated. * @param options The validation options. * @param options.messages The validation messages. */ function array(rule, value, callback, source, options) { var errors = []; var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if (isEmptyValue(value, 'array') && !rule.required) { return callback(); } rules.required(rule, value, source, errors, options, 'array'); if (!isEmptyValue(value, 'array')) { rules.type(rule, value, source, errors, options); rules.range(rule, value, source, errors, options); } } callback(errors); } /** * Validates an object. * * @param rule The validation rule. * @param value The value of the field on the source object. * @param callback The callback function. * @param source The source object being validated. * @param options The validation options. * @param options.messages The validation messages. */ function object(rule, value, callback, source, options) { var errors = []; var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if (isEmptyValue(value) && !rule.required) { return callback(); } rules.required(rule, value, source, errors, options); if (value !== undefined) { rules.type(rule, value, source, errors, options); } } callback(errors); } var ENUM$1 = 'enum'; /** * Validates an enumerable list. * * @param rule The validation rule. * @param value The value of the field on the source object. * @param callback The callback function. * @param source The source object being validated. * @param options The validation options. * @param options.messages The validation messages. */ function enumerable$1(rule, value, callback, source, options) { var errors = []; var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if (isEmptyValue(value) && !rule.required) { return callback(); } rules.required(rule, value, source, errors, options); if (value !== undefined) { rules[ENUM$1](rule, value, source, errors, options); } } callback(errors); } /** * Validates a regular expression pattern. * * Performs validation when a rule only contains * a pattern property but is not declared as a string type. * * @param rule The validation rule. * @param value The value of the field on the source object. * @param callback The callback function. * @param source The source object being validated. * @param options The validation options. * @param options.messages The validation messages. */ function pattern$2(rule, value, callback, source, options) { var errors = []; var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if (isEmptyValue(value, 'string') && !rule.required) { return callback(); } rules.required(rule, value, source, errors, options); if (!isEmptyValue(value, 'string')) { rules.pattern(rule, value, source, errors, options); } } callback(errors); } function date(rule, value, callback, source, options) { // console.log('integer rule called %j', rule); var errors = []; var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); // console.log('validate on %s value', value); if (validate) { if (isEmptyValue(value, 'date') && !rule.required) { return callback(); } rules.required(rule, value, source, errors, options); if (!isEmptyValue(value, 'date')) { var dateObject; if (value instanceof Date) { dateObject = value; } else { dateObject = new Date(value); } rules.type(rule, dateObject, source, errors, options); if (dateObject) { rules.range(rule, dateObject.getTime(), source, errors, options); } } } callback(errors); } function required$1(rule, value, callback, source, options) { var errors = []; var type = Array.isArray(value) ? 'array' : _typeof(value); rules.required(rule, value, source, errors, options, type); callback(errors); } function type$1(rule, value, callback, source, options) { var ruleType = rule.type; var errors = []; var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if (isEmptyValue(value, ruleType) && !rule.required) { return callback(); } rules.required(rule, value, source, errors, options, ruleType); if (!isEmptyValue(value, ruleType)) { rules.type(rule, value, source, errors, options); } } callback(errors); } /** * Performs validation for any type. * * @param rule The validation rule. * @param value The value of the field on the source object. * @param callback The callback function. * @param source The source object being validated. * @param options The validation options. * @param options.messages The validation messages. */ function any(rule, value, callback, source, options) { var errors = []; var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if (isEmptyValue(value) && !rule.required) { return callback(); } rules.required(rule, value, source, errors, options); } callback(errors); } var validators = { string: string, method: method, number: number, "boolean": _boolean, regexp: regexp, integer: integer, "float": floatFn, array: array, object: object, "enum": enumerable$1, pattern: pattern$2, date: date, url: type$1, hex: type$1, email: type$1, required: required$1, any: any }; function newMessages() { return { "default": 'Validation error on field %s', required: '%s is required', "enum": '%s must be one of %s', whitespace: '%s cannot be empty', date: { format: '%s date %s is invalid for format %s', parse: '%s date could not be parsed, %s is invalid ', invalid: '%s date %s is invalid' }, types: { string: '%s is not a %s', method: '%s is not a %s (function)', array: '%s is not an %s', object: '%s is not an %s', number: '%s is not a %s', date: '%s is not a %s', "boolean": '%s is not a %s', integer: '%s is not an %s', "float": '%s is not a %s', regexp: '%s is not a valid %s', email: '%s is not a valid %s', url: '%s is not a valid %s', hex: '%s is not a valid %s' }, string: { len: '%s must be exactly %s characters', min: '%s must be at least %s characters', max: '%s cannot be longer than %s characters', range: '%s must be between %s and %s characters' }, number: { len: '%s must equal %s', min: '%s cannot be less than %s', max: '%s cannot be greater than %s', range: '%s must be between %s and %s' }, array: { len: '%s must be exactly %s in length', min: '%s cannot be less than %s in length', max: '%s cannot be greater than %s in length', range: '%s must be between %s and %s in length' }, pattern: { mismatch: '%s value %s does not match pattern %s' }, clone: function clone() { var cloned = JSON.parse(JSON.stringify(this)); cloned.clone = this.clone; return cloned; } }; } var messages = newMessages(); /** * Encapsulates a validation schema. * * @param descriptor An object declaring validation rules * for this schema. */ function Schema(descriptor) { this.rules = null; this._messages = messages; this.define(descriptor); } Schema.prototype = { messages: function messages(_messages) { if (_messages) { this._messages = deepMerge(newMessages(), _messages); } return this._messages; }, define: function define(rules) { if (!rules) { throw new Error('Cannot configure a schema with no rules'); } if (_typeof(rules) !== 'object' || Array.isArray(rules)) { throw new Error('Rules must be an object'); } this.rules = {}; var z; var item; for (z in rules) { if (rules.hasOwnProperty(z)) { item = rules[z]; this.rules[z] = Array.isArray(item) ? item : [item]; } } }, validate: function validate(source_, o, oc) { var _this = this; if (o === void 0) { o = {}; } if (oc === void 0) { oc = function oc() {}; } var source = source_; var options = o; var callback = oc; if (typeof options === 'function') { callback = options; options = {}; } if (!this.rules || Object.keys(this.rules).length === 0) { if (callback) { callback(); } return Promise.resolve(); } function complete(results) { var i; var errors = []; var fields = {}; function add(e) { if (Array.isArray(e)) { var _errors; errors = (_errors = errors).concat.apply(_errors, e); } else { errors.push(e); } } for (i = 0; i < results.length; i++) { add(results[i]); } if (!errors.length) { errors = null; fields = null; } else { fields = convertFieldsError(errors); } callback(errors, fields); } if (options.messages) { var messages$1 = this.messages(); if (messages$1 === messages) { messages$1 = newMessages(); } deepMerge(messages$1, options.messages); options.messages = messages$1; } else { options.messages = this.messages(); } var arr; var value; var series = {}; var keys = options.keys || Object.keys(this.rules); keys.forEach(function (z) { arr = _this.rules[z]; value = source[z]; arr.forEach(function (r) { var rule = r; if (typeof rule.transform === 'function') { if (source === source_) { source = _extends({}, source); } value = source[z] = rule.transform(value); } if (typeof rule === 'function') { rule = { validator: rule }; } else { rule = _extends({}, rule); } rule.validator = _this.getValidationMethod(rule); rule.field = z; rule.fullField = rule.fullField || z; rule.type = _this.getType(rule); if (!rule.validator) { return; } series[z] = series[z] || []; series[z].push({ rule: rule, value: value, source: source, field: z }); }); }); var errorFields = {}; return asyncMap(series, options, function (data, doIt) { var rule = data.rule; var deep = (rule.type === 'object' || rule.type === 'array') && (_typeof(rule.fields) === 'object' || _typeof(rule.defaultField) === 'object'); deep = deep && (rule.required || !rule.required && data.value); rule.field = data.field; function addFullfield(key, schema) { return _extends(_extends({}, schema), {}, { fullField: rule.fullField + "." + key }); } function cb(e) { if (e === void 0) { e = []; } var errors = e; if (!Array.isArray(errors)) { errors = [errors]; } if (!options.suppressWarning && errors.length) { Schema.warning('async-validator:', errors); } if (errors.length && rule.message) { errors = [].concat(rule.message); } errors = errors.map(complementError(rule)); if (options.first && errors.length) { errorFields[rule.field] = 1; return doIt(errors); } if (!deep) { doIt(errors); } else { // if rule is required but the target object // does not exist fail at the rule level and don't // go deeper if (rule.required && !data.value) { if (rule.message) { errors = [].concat(rule.message).map(complementError(rule)); } else if (options.error) { errors = [options.error(rule, format(options.messages.required, rule.field))]; } return doIt(errors); } var fieldsSchema = {}; if (rule.defaultField) { for (var k in data.value) { if (data.value.hasOwnProperty(k)) { fieldsSchema[k] = rule.defaultField; } } } fieldsSchema = _extends(_extends({}, fieldsSchema), data.rule.fields); for (var f in fieldsSchema) { if (fieldsSchema.hasOwnProperty(f)) { var fieldSchema = Array.isArray(fieldsSchema[f]) ? fieldsSchema[f] : [fieldsSchema[f]]; fieldsSchema[f] = fieldSchema.map(addFullfield.bind(null, f)); } } var schema = new Schema(fieldsSchema); schema.messages(options.messages); if (data.rule.options) { data.rule.options.messages = options.messages; data.rule.options.error = options.error; } schema.validate(data.value, data.rule.options || options, function (errs) { var finalErrors = []; if (errors && errors.length) { finalErrors.push.apply(finalErrors, errors); } if (errs && errs.length) { finalErrors.push.apply(finalErrors, errs); } doIt(finalErrors.length ? finalErrors : null); }); } } var res; if (rule.asyncValidator) { res = rule.asyncValidator(rule, data.value, cb, data.source, options); } else if (rule.validator) { res = rule.validator(rule, data.value, cb, data.source, options); if (res === true) { cb(); } else if (res === false) { cb(rule.message || rule.field + " fails"); } else if (res instanceof Array) { cb(res); } else if (res instanceof Error) { cb(res.message); } } if (res && res.then) { res.then(function () { return cb(); }, function (e) { return cb(e); }); } }, function (results) { complete(results); }); }, getType: function getType(rule) { if (rule.type === undefined && rule.pattern instanceof RegExp) { rule.type = 'pattern'; } if (typeof rule.validator !== 'function' && rule.type && !validators.hasOwnProperty(rule.type)) { throw new Error(format('Unknown rule type %s', rule.type)); } return rule.type || 'string'; }, getValidationMethod: function getValidationMethod(rule) { if (typeof rule.validator === 'function') { return rule.validator; } var keys = Object.keys(rule); var messageIndex = keys.indexOf('message'); if (messageIndex !== -1) { keys.splice(messageIndex, 1); } if (keys.length === 1 && keys[0] === 'required') { return validators.required; } return validators[this.getType(rule)] || false; } }; Schema.register = function register(type, validator) { if (typeof validator !== 'function') { throw new Error('Cannot register a validator by type, validator is not a function'); } validators[type] = validator; }; Schema.warning = warning; Schema.messages = messages; Schema.validators = validators; /* harmony default export */ __webpack_exports__["a"] = (Schema); /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(35))) /***/ }), /* 56 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global, module) {function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } /** * Lodash (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright JS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */ /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; /** Used to stand-in for `undefined` hash values. */ var HASH_UNDEFINED = '__lodash_hash_undefined__'; /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; /** Used as references for various `Number` constants. */ var MAX_SAFE_INTEGER = 9007199254740991; /** `Object#toString` result references. */ var argsTag = '[object Arguments]', arrayTag = '[object Array]', asyncTag = '[object AsyncFunction]', boolTag = '[object Boolean]', dateTag = '[object Date]', errorTag = '[object Error]', funcTag = '[object Function]', genTag = '[object GeneratorFunction]', mapTag = '[object Map]', numberTag = '[object Number]', nullTag = '[object Null]', objectTag = '[object Object]', promiseTag = '[object Promise]', proxyTag = '[object Proxy]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', symbolTag = '[object Symbol]', undefinedTag = '[object Undefined]', weakMapTag = '[object WeakMap]'; var arrayBufferTag = '[object ArrayBuffer]', dataViewTag = '[object DataView]', float32Tag = '[object Float32Array]', float64Tag = '[object Float64Array]', int8Tag = '[object Int8Array]', int16Tag = '[object Int16Array]', int32Tag = '[object Int32Array]', uint8Tag = '[object Uint8Array]', uint8ClampedTag = '[object Uint8ClampedArray]', uint16Tag = '[object Uint16Array]', uint32Tag = '[object Uint32Array]'; /** * Used to match `RegExp` * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). */ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; /** Used to detect host constructors (Safari). */ var reIsHostCtor = /^\[object .+?Constructor\]$/; /** Used to detect unsigned integer values. */ var reIsUint = /^(?:0|[1-9]\d*)$/; /** Used to identify `toStringTag` values of typed arrays. */ var typedArrayTags = {}; typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; /** Detect free variable `global` from Node.js. */ var freeGlobal = (typeof global === "undefined" ? "undefined" : _typeof(global)) == 'object' && global && global.Object === Object && global; /** Detect free variable `self`. */ var freeSelf = (typeof self === "undefined" ? "undefined" : _typeof(self)) == 'object' && self && self.Object === Object && self; /** Used as a reference to the global object. */ var root = freeGlobal || freeSelf || Function('return this')(); /** Detect free variable `exports`. */ var freeExports = ( false ? undefined : _typeof(exports)) == 'object' && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ var freeModule = freeExports && ( false ? undefined : _typeof(module)) == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule.exports === freeExports; /** Detect free variable `process` from Node.js. */ var freeProcess = moduleExports && freeGlobal.process; /** Used to access faster Node.js helpers. */ var nodeUtil = function () { try { return freeProcess && freeProcess.binding && freeProcess.binding('util'); } catch (e) {} }(); /* Node.js helper references. */ var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; /** * A specialized version of `_.filter` for arrays without support for * iteratee shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {Array} Returns the new filtered array. */ function arrayFilter(array, predicate) { var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = []; while (++index < length) { var value = array[index]; if (predicate(value, index, array)) { result[resIndex++] = value; } } return result; } /** * Appends the elements of `values` to `array`. * * @private * @param {Array} array The array to modify. * @param {Array} values The values to append. * @returns {Array} Returns `array`. */ function arrayPush(array, values) { var index = -1, length = values.length, offset = array.length; while (++index < length) { array[offset + index] = values[index]; } return array; } /** * A specialized version of `_.some` for arrays without support for iteratee * shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {boolean} Returns `true` if any element passes the predicate check, * else `false`. */ function arraySome(array, predicate) { var index = -1, length = array == null ? 0 : array.length; while (++index < length) { if (predicate(array[index], index, array)) { return true; } } return false; } /** * The base implementation of `_.times` without support for iteratee shorthands * or max array length checks. * * @private * @param {number} n The number of times to invoke `iteratee`. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the array of results. */ function baseTimes(n, iteratee) { var index = -1, result = Array(n); while (++index < n) { result[index] = iteratee(index); } return result; } /** * The base implementation of `_.unary` without support for storing metadata. * * @private * @param {Function} func The function to cap arguments for. * @returns {Function} Returns the new capped function. */ function baseUnary(func) { return function (value) { return func(value); }; } /** * Checks if a `cache` value for `key` exists. * * @private * @param {Object} cache The cache to query. * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function cacheHas(cache, key) { return cache.has(key); } /** * Gets the value at `key` of `object`. * * @private * @param {Object} [object] The object to query. * @param {string} key The key of the property to get. * @returns {*} Returns the property value. */ function getValue(object, key) { return object == null ? undefined : object[key]; } /** * Converts `map` to its key-value pairs. * * @private * @param {Object} map The map to convert. * @returns {Array} Returns the key-value pairs. */ function mapToArray(map) { var index = -1, result = Array(map.size); map.forEach(function (value, key) { result[++index] = [key, value]; }); return result; } /** * Creates a unary function that invokes `func` with its argument transformed. * * @private * @param {Function} func The function to wrap. * @param {Function} transform The argument transform. * @returns {Function} Returns the new function. */ function overArg(func, transform) { return function (arg) { return func(transform(arg)); }; } /** * Converts `set` to an array of its values. * * @private * @param {Object} set The set to convert. * @returns {Array} Returns the values. */ function setToArray(set) { var index = -1, result = Array(set.size); set.forEach(function (value) { result[++index] = value; }); return result; } /** Used for built-in method references. */ var arrayProto = Array.prototype, funcProto = Function.prototype, objectProto = Object.prototype; /** Used to detect overreaching core-js shims. */ var coreJsData = root['__core-js_shared__']; /** Used to resolve the decompiled source of functions. */ var funcToString = funcProto.toString; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** Used to detect methods masquerading as native. */ var maskSrcKey = function () { var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); return uid ? 'Symbol(src)_1.' + uid : ''; }(); /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var nativeObjectToString = objectProto.toString; /** Used to detect if a method is native. */ var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'); /** Built-in value references. */ var Buffer = moduleExports ? root.Buffer : undefined, _Symbol = root.Symbol, Uint8Array = root.Uint8Array, propertyIsEnumerable = objectProto.propertyIsEnumerable, splice = arrayProto.splice, symToStringTag = _Symbol ? _Symbol.toStringTag : undefined; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeGetSymbols = Object.getOwnPropertySymbols, nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, nativeKeys = overArg(Object.keys, Object); /* Built-in method references that are verified to be native. */ var DataView = getNative(root, 'DataView'), Map = getNative(root, 'Map'), Promise = getNative(root, 'Promise'), Set = getNative(root, 'Set'), WeakMap = getNative(root, 'WeakMap'), nativeCreate = getNative(Object, 'create'); /** Used to detect maps, sets, and weakmaps. */ var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map), promiseCtorString = toSource(Promise), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap); /** Used to convert symbols to primitives and strings. */ var symbolProto = _Symbol ? _Symbol.prototype : undefined, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; /** * Creates a hash object. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function Hash(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } /** * Removes all key-value entries from the hash. * * @private * @name clear * @memberOf Hash */ function hashClear() { this.__data__ = nativeCreate ? nativeCreate(null) : {}; this.size = 0; } /** * Removes `key` and its value from the hash. * * @private * @name delete * @memberOf Hash * @param {Object} hash The hash to modify. * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function hashDelete(key) { var result = this.has(key) && delete this.__data__[key]; this.size -= result ? 1 : 0; return result; } /** * Gets the hash value for `key`. * * @private * @name get * @memberOf Hash * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function hashGet(key) { var data = this.__data__; if (nativeCreate) { var result = data[key]; return result === HASH_UNDEFINED ? undefined : result; } return hasOwnProperty.call(data, key) ? data[key] : undefined; } /** * Checks if a hash value for `key` exists. * * @private * @name has * @memberOf Hash * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function hashHas(key) { var data = this.__data__; return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); } /** * Sets the hash `key` to `value`. * * @private * @name set * @memberOf Hash * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the hash instance. */ function hashSet(key, value) { var data = this.__data__; this.size += this.has(key) ? 0 : 1; data[key] = nativeCreate && value === undefined ? HASH_UNDEFINED : value; return this; } // Add methods to `Hash`. Hash.prototype.clear = hashClear; Hash.prototype['delete'] = hashDelete; Hash.prototype.get = hashGet; Hash.prototype.has = hashHas; Hash.prototype.set = hashSet; /** * Creates an list cache object. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function ListCache(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } /** * Removes all key-value entries from the list cache. * * @private * @name clear * @memberOf ListCache */ function listCacheClear() { this.__data__ = []; this.size = 0; } /** * Removes `key` and its value from the list cache. * * @private * @name delete * @memberOf ListCache * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function listCacheDelete(key) { var data = this.__data__, index = assocIndexOf(data, key); if (index < 0) { return false; } var lastIndex = data.length - 1; if (index == lastIndex) { data.pop(); } else { splice.call(data, index, 1); } --this.size; return true; } /** * Gets the list cache value for `key`. * * @private * @name get * @memberOf ListCache * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function listCacheGet(key) { var data = this.__data__, index = assocIndexOf(data, key); return index < 0 ? undefined : data[index][1]; } /** * Checks if a list cache value for `key` exists. * * @private * @name has * @memberOf ListCache * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function listCacheHas(key) { return assocIndexOf(this.__data__, key) > -1; } /** * Sets the list cache `key` to `value`. * * @private * @name set * @memberOf ListCache * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the list cache instance. */ function listCacheSet(key, value) { var data = this.__data__, index = assocIndexOf(data, key); if (index < 0) { ++this.size; data.push([key, value]); } else { data[index][1] = value; } return this; } // Add methods to `ListCache`. ListCache.prototype.clear = listCacheClear; ListCache.prototype['delete'] = listCacheDelete; ListCache.prototype.get = listCacheGet; ListCache.prototype.has = listCacheHas; ListCache.prototype.set = listCacheSet; /** * Creates a map cache object to store key-value pairs. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function MapCache(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } /** * Removes all key-value entries from the map. * * @private * @name clear * @memberOf MapCache */ function mapCacheClear() { this.size = 0; this.__data__ = { 'hash': new Hash(), 'map': new (Map || ListCache)(), 'string': new Hash() }; } /** * Removes `key` and its value from the map. * * @private * @name delete * @memberOf MapCache * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function mapCacheDelete(key) { var result = getMapData(this, key)['delete'](key); this.size -= result ? 1 : 0; return result; } /** * Gets the map value for `key`. * * @private * @name get * @memberOf MapCache * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function mapCacheGet(key) { return getMapData(this, key).get(key); } /** * Checks if a map value for `key` exists. * * @private * @name has * @memberOf MapCache * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function mapCacheHas(key) { return getMapData(this, key).has(key); } /** * Sets the map `key` to `value`. * * @private * @name set * @memberOf MapCache * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the map cache instance. */ function mapCacheSet(key, value) { var data = getMapData(this, key), size = data.size; data.set(key, value); this.size += data.size == size ? 0 : 1; return this; } // Add methods to `MapCache`. MapCache.prototype.clear = mapCacheClear; MapCache.prototype['delete'] = mapCacheDelete; MapCache.prototype.get = mapCacheGet; MapCache.prototype.has = mapCacheHas; MapCache.prototype.set = mapCacheSet; /** * * Creates an array cache object to store unique values. * * @private * @constructor * @param {Array} [values] The values to cache. */ function SetCache(values) { var index = -1, length = values == null ? 0 : values.length; this.__data__ = new MapCache(); while (++index < length) { this.add(values[index]); } } /** * Adds `value` to the array cache. * * @private * @name add * @memberOf SetCache * @alias push * @param {*} value The value to cache. * @returns {Object} Returns the cache instance. */ function setCacheAdd(value) { this.__data__.set(value, HASH_UNDEFINED); return this; } /** * Checks if `value` is in the array cache. * * @private * @name has * @memberOf SetCache * @param {*} value The value to search for. * @returns {number} Returns `true` if `value` is found, else `false`. */ function setCacheHas(value) { return this.__data__.has(value); } // Add methods to `SetCache`. SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; SetCache.prototype.has = setCacheHas; /** * Creates a stack cache object to store key-value pairs. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function Stack(entries) { var data = this.__data__ = new ListCache(entries); this.size = data.size; } /** * Removes all key-value entries from the stack. * * @private * @name clear * @memberOf Stack */ function stackClear() { this.__data__ = new ListCache(); this.size = 0; } /** * Removes `key` and its value from the stack. * * @private * @name delete * @memberOf Stack * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function stackDelete(key) { var data = this.__data__, result = data['delete'](key); this.size = data.size; return result; } /** * Gets the stack value for `key`. * * @private * @name get * @memberOf Stack * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function stackGet(key) { return this.__data__.get(key); } /** * Checks if a stack value for `key` exists. * * @private * @name has * @memberOf Stack * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function stackHas(key) { return this.__data__.has(key); } /** * Sets the stack `key` to `value`. * * @private * @name set * @memberOf Stack * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the stack cache instance. */ function stackSet(key, value) { var data = this.__data__; if (data instanceof ListCache) { var pairs = data.__data__; if (!Map || pairs.length < LARGE_ARRAY_SIZE - 1) { pairs.push([key, value]); this.size = ++data.size; return this; } data = this.__data__ = new MapCache(pairs); } data.set(key, value); this.size = data.size; return this; } // Add methods to `Stack`. Stack.prototype.clear = stackClear; Stack.prototype['delete'] = stackDelete; Stack.prototype.get = stackGet; Stack.prototype.has = stackHas; Stack.prototype.set = stackSet; /** * Creates an array of the enumerable property names of the array-like `value`. * * @private * @param {*} value The value to query. * @param {boolean} inherited Specify returning inherited property names. * @returns {Array} Returns the array of property names. */ function arrayLikeKeys(value, inherited) { var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length; for (var key in value) { if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && ( // Safari 9 has enumerable `arguments.length` in strict mode. key == 'length' || // Node.js 0.10 has enumerable non-index properties on buffers. isBuff && (key == 'offset' || key == 'parent') || // PhantomJS 2 has enumerable non-index properties on typed arrays. isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset') || // Skip index properties. isIndex(key, length)))) { result.push(key); } } return result; } /** * Gets the index at which the `key` is found in `array` of key-value pairs. * * @private * @param {Array} array The array to inspect. * @param {*} key The key to search for. * @returns {number} Returns the index of the matched value, else `-1`. */ function assocIndexOf(array, key) { var length = array.length; while (length--) { if (eq(array[length][0], key)) { return length; } } return -1; } /** * The base implementation of `getAllKeys` and `getAllKeysIn` which uses * `keysFunc` and `symbolsFunc` to get the enumerable property names and * symbols of `object`. * * @private * @param {Object} object The object to query. * @param {Function} keysFunc The function to get the keys of `object`. * @param {Function} symbolsFunc The function to get the symbols of `object`. * @returns {Array} Returns the array of property names and symbols. */ function baseGetAllKeys(object, keysFunc, symbolsFunc) { var result = keysFunc(object); return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); } /** * The base implementation of `getTag` without fallbacks for buggy environments. * * @private * @param {*} value The value to query. * @returns {string} Returns the `toStringTag`. */ function baseGetTag(value) { if (value == null) { return value === undefined ? undefinedTag : nullTag; } return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value); } /** * The base implementation of `_.isArguments`. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an `arguments` object, */ function baseIsArguments(value) { return isObjectLike(value) && baseGetTag(value) == argsTag; } /** * The base implementation of `_.isEqual` which supports partial comparisons * and tracks traversed objects. * * @private * @param {*} value The value to compare. * @param {*} other The other value to compare. * @param {boolean} bitmask The bitmask flags. * 1 - Unordered comparison * 2 - Partial comparison * @param {Function} [customizer] The function to customize comparisons. * @param {Object} [stack] Tracks traversed `value` and `other` objects. * @returns {boolean} Returns `true` if the values are equivalent, else `false`. */ function baseIsEqual(value, other, bitmask, customizer, stack) { if (value === other) { return true; } if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) { return value !== value && other !== other; } return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); } /** * A specialized version of `baseIsEqual` for arrays and objects which performs * deep comparisons and tracks traversed objects enabling objects with circular * references to be compared. * * @private * @param {Object} object The object to compare. * @param {Object} other The other object to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} [stack] Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : getTag(object), othTag = othIsArr ? arrayTag : getTag(other); objTag = objTag == argsTag ? objectTag : objTag; othTag = othTag == argsTag ? objectTag : othTag; var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag; if (isSameTag && isBuffer(object)) { if (!isBuffer(other)) { return false; } objIsArr = true; objIsObj = false; } if (isSameTag && !objIsObj) { stack || (stack = new Stack()); return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); } if (!(bitmask & COMPARE_PARTIAL_FLAG)) { var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); if (objIsWrapped || othIsWrapped) { var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other; stack || (stack = new Stack()); return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); } } if (!isSameTag) { return false; } stack || (stack = new Stack()); return equalObjects(object, other, bitmask, customizer, equalFunc, stack); } /** * The base implementation of `_.isNative` without bad shim checks. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a native function, * else `false`. */ function baseIsNative(value) { if (!isObject(value) || isMasked(value)) { return false; } var pattern = isFunction(value) ? reIsNative : reIsHostCtor; return pattern.test(toSource(value)); } /** * The base implementation of `_.isTypedArray` without Node.js optimizations. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. */ function baseIsTypedArray(value) { return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; } /** * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */ function baseKeys(object) { if (!isPrototype(object)) { return nativeKeys(object); } var result = []; for (var key in Object(object)) { if (hasOwnProperty.call(object, key) && key != 'constructor') { result.push(key); } } return result; } /** * A specialized version of `baseIsEqualDeep` for arrays with support for * partial deep comparisons. * * @private * @param {Array} array The array to compare. * @param {Array} other The other array to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} stack Tracks traversed `array` and `other` objects. * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. */ function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array.length, othLength = other.length; if (arrLength != othLength && !(isPartial && othLength > arrLength)) { return false; } // Assume cyclic values are equal. var stacked = stack.get(array); if (stacked && stack.get(other)) { return stacked == other; } var index = -1, result = true, seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : undefined; stack.set(array, other); stack.set(other, array); // Ignore non-index properties. while (++index < arrLength) { var arrValue = array[index], othValue = other[index]; if (customizer) { var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack); } if (compared !== undefined) { if (compared) { continue; } result = false; break; } // Recursively compare arrays (susceptible to call stack limits). if (seen) { if (!arraySome(other, function (othValue, othIndex) { if (!cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { return seen.push(othIndex); } })) { result = false; break; } } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { result = false; break; } } stack['delete'](array); stack['delete'](other); return result; } /** * A specialized version of `baseIsEqualDeep` for comparing objects of * the same `toStringTag`. * * **Note:** This function only supports comparing values with tags of * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. * * @private * @param {Object} object The object to compare. * @param {Object} other The other object to compare. * @param {string} tag The `toStringTag` of the objects to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} stack Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { switch (tag) { case dataViewTag: if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) { return false; } object = object.buffer; other = other.buffer; case arrayBufferTag: if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array(object), new Uint8Array(other))) { return false; } return true; case boolTag: case dateTag: case numberTag: // Coerce booleans to `1` or `0` and dates to milliseconds. // Invalid dates are coerced to `NaN`. return eq(+object, +other); case errorTag: return object.name == other.name && object.message == other.message; case regexpTag: case stringTag: // Coerce regexes to strings and treat strings, primitives and objects, // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring // for more details. return object == other + ''; case mapTag: var convert = mapToArray; case setTag: var isPartial = bitmask & COMPARE_PARTIAL_FLAG; convert || (convert = setToArray); if (object.size != other.size && !isPartial) { return false; } // Assume cyclic values are equal. var stacked = stack.get(object); if (stacked) { return stacked == other; } bitmask |= COMPARE_UNORDERED_FLAG; // Recursively compare objects (susceptible to call stack limits). stack.set(object, other); var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); stack['delete'](object); return result; case symbolTag: if (symbolValueOf) { return symbolValueOf.call(object) == symbolValueOf.call(other); } } return false; } /** * A specialized version of `baseIsEqualDeep` for objects with support for * partial deep comparisons. * * @private * @param {Object} object The object to compare. * @param {Object} other The other object to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} stack Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { var isPartial = bitmask & COMPARE_PARTIAL_FLAG, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length; if (objLength != othLength && !isPartial) { return false; } var index = objLength; while (index--) { var key = objProps[index]; if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { return false; } } // Assume cyclic values are equal. var stacked = stack.get(object); if (stacked && stack.get(other)) { return stacked == other; } var result = true; stack.set(object, other); stack.set(other, object); var skipCtor = isPartial; while (++index < objLength) { key = objProps[index]; var objValue = object[key], othValue = other[key]; if (customizer) { var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack); } // Recursively compare objects (susceptible to call stack limits). if (!(compared === undefined ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) { result = false; break; } skipCtor || (skipCtor = key == 'constructor'); } if (result && !skipCtor) { var objCtor = object.constructor, othCtor = other.constructor; // Non `Object` object instances with different constructors are not equal. if (objCtor != othCtor && 'constructor' in object && 'constructor' in other && !(typeof objCtor == 'function' && objCtor instanceof objCtor && typeof othCtor == 'function' && othCtor instanceof othCtor)) { result = false; } } stack['delete'](object); stack['delete'](other); return result; } /** * Creates an array of own enumerable property names and symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names and symbols. */ function getAllKeys(object) { return baseGetAllKeys(object, keys, getSymbols); } /** * Gets the data for `map`. * * @private * @param {Object} map The map to query. * @param {string} key The reference key. * @returns {*} Returns the map data. */ function getMapData(map, key) { var data = map.__data__; return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map; } /** * Gets the native function at `key` of `object`. * * @private * @param {Object} object The object to query. * @param {string} key The key of the method to get. * @returns {*} Returns the function if it's native, else `undefined`. */ function getNative(object, key) { var value = getValue(object, key); return baseIsNative(value) ? value : undefined; } /** * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. * * @private * @param {*} value The value to query. * @returns {string} Returns the raw `toStringTag`. */ function getRawTag(value) { var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag]; try { value[symToStringTag] = undefined; var unmasked = true; } catch (e) {} var result = nativeObjectToString.call(value); if (unmasked) { if (isOwn) { value[symToStringTag] = tag; } else { delete value[symToStringTag]; } } return result; } /** * Creates an array of the own enumerable symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of symbols. */ var getSymbols = !nativeGetSymbols ? stubArray : function (object) { if (object == null) { return []; } object = Object(object); return arrayFilter(nativeGetSymbols(object), function (symbol) { return propertyIsEnumerable.call(object, symbol); }); }; /** * Gets the `toStringTag` of `value`. * * @private * @param {*} value The value to query. * @returns {string} Returns the `toStringTag`. */ var getTag = baseGetTag; // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag || Promise && getTag(Promise.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) { getTag = function getTag(value) { var result = baseGetTag(value), Ctor = result == objectTag ? value.constructor : undefined, ctorString = Ctor ? toSource(Ctor) : ''; if (ctorString) { switch (ctorString) { case dataViewCtorString: return dataViewTag; case mapCtorString: return mapTag; case promiseCtorString: return promiseTag; case setCtorString: return setTag; case weakMapCtorString: return weakMapTag; } } return result; }; } /** * Checks if `value` is a valid array-like index. * * @private * @param {*} value The value to check. * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. */ function isIndex(value, length) { length = length == null ? MAX_SAFE_INTEGER : length; return !!length && (typeof value == 'number' || reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length; } /** * Checks if `value` is suitable for use as unique object key. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is suitable, else `false`. */ function isKeyable(value) { var type = _typeof(value); return type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean' ? value !== '__proto__' : value === null; } /** * Checks if `func` has its source masked. * * @private * @param {Function} func The function to check. * @returns {boolean} Returns `true` if `func` is masked, else `false`. */ function isMasked(func) { return !!maskSrcKey && maskSrcKey in func; } /** * Checks if `value` is likely a prototype object. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. */ function isPrototype(value) { var Ctor = value && value.constructor, proto = typeof Ctor == 'function' && Ctor.prototype || objectProto; return value === proto; } /** * Converts `value` to a string using `Object.prototype.toString`. * * @private * @param {*} value The value to convert. * @returns {string} Returns the converted string. */ function objectToString(value) { return nativeObjectToString.call(value); } /** * Converts `func` to its source code. * * @private * @param {Function} func The function to convert. * @returns {string} Returns the source code. */ function toSource(func) { if (func != null) { try { return funcToString.call(func); } catch (e) {} try { return func + ''; } catch (e) {} } return ''; } /** * Performs a * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * comparison between two values to determine if they are equivalent. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to compare. * @param {*} other The other value to compare. * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * * var object = { 'a': 1 }; * var other = { 'a': 1 }; * * _.eq(object, object); * // => true * * _.eq(object, other); * // => false * * _.eq('a', 'a'); * // => true * * _.eq('a', Object('a')); * // => false * * _.eq(NaN, NaN); * // => true */ function eq(value, other) { return value === other || value !== value && other !== other; } /** * Checks if `value` is likely an `arguments` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an `arguments` object, * else `false`. * @example * * _.isArguments(function() { return arguments; }()); * // => true * * _.isArguments([1, 2, 3]); * // => false */ var isArguments = baseIsArguments(function () { return arguments; }()) ? baseIsArguments : function (value) { return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); }; /** * Checks if `value` is classified as an `Array` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an array, else `false`. * @example * * _.isArray([1, 2, 3]); * // => true * * _.isArray(document.body.children); * // => false * * _.isArray('abc'); * // => false * * _.isArray(_.noop); * // => false */ var isArray = Array.isArray; /** * Checks if `value` is array-like. A value is considered array-like if it's * not a function and has a `value.length` that's an integer greater than or * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is array-like, else `false`. * @example * * _.isArrayLike([1, 2, 3]); * // => true * * _.isArrayLike(document.body.children); * // => true * * _.isArrayLike('abc'); * // => true * * _.isArrayLike(_.noop); * // => false */ function isArrayLike(value) { return value != null && isLength(value.length) && !isFunction(value); } /** * Checks if `value` is a buffer. * * @static * @memberOf _ * @since 4.3.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. * @example * * _.isBuffer(new Buffer(2)); * // => true * * _.isBuffer(new Uint8Array(2)); * // => false */ var isBuffer = nativeIsBuffer || stubFalse; /** * Performs a deep comparison between two values to determine if they are * equivalent. * * **Note:** This method supports comparing arrays, array buffers, booleans, * date objects, error objects, maps, numbers, `Object` objects, regexes, * sets, strings, symbols, and typed arrays. `Object` objects are compared * by their own, not inherited, enumerable properties. Functions and DOM * nodes are compared by strict equality, i.e. `===`. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to compare. * @param {*} other The other value to compare. * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * * var object = { 'a': 1 }; * var other = { 'a': 1 }; * * _.isEqual(object, other); * // => true * * object === other; * // => false */ function isEqual(value, other) { return baseIsEqual(value, other); } /** * Checks if `value` is classified as a `Function` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a function, else `false`. * @example * * _.isFunction(_); * // => true * * _.isFunction(/abc/); * // => false */ function isFunction(value) { if (!isObject(value)) { return false; } // The use of `Object#toString` avoids issues with the `typeof` operator // in Safari 9 which returns 'object' for typed arrays and other constructors. var tag = baseGetTag(value); return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; } /** * Checks if `value` is a valid array-like length. * * **Note:** This method is loosely based on * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. * @example * * _.isLength(3); * // => true * * _.isLength(Number.MIN_VALUE); * // => false * * _.isLength(Infinity); * // => false * * _.isLength('3'); * // => false */ function isLength(value) { return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; } /** * Checks if `value` is the * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an object, else `false`. * @example * * _.isObject({}); * // => true * * _.isObject([1, 2, 3]); * // => true * * _.isObject(_.noop); * // => true * * _.isObject(null); * // => false */ function isObject(value) { var type = _typeof(value); return value != null && (type == 'object' || type == 'function'); } /** * Checks if `value` is object-like. A value is object-like if it's not `null` * and has a `typeof` result of "object". * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is object-like, else `false`. * @example * * _.isObjectLike({}); * // => true * * _.isObjectLike([1, 2, 3]); * // => true * * _.isObjectLike(_.noop); * // => false * * _.isObjectLike(null); * // => false */ function isObjectLike(value) { return value != null && _typeof(value) == 'object'; } /** * Checks if `value` is classified as a typed array. * * @static * @memberOf _ * @since 3.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. * @example * * _.isTypedArray(new Uint8Array); * // => true * * _.isTypedArray([]); * // => false */ var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; /** * Creates an array of the own enumerable property names of `object`. * * **Note:** Non-object values are coerced to objects. See the * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) * for more details. * * @static * @since 0.1.0 * @memberOf _ * @category Object * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.keys(new Foo); * // => ['a', 'b'] (iteration order is not guaranteed) * * _.keys('hi'); * // => ['0', '1'] */ function keys(object) { return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); } /** * This method returns a new empty array. * * @static * @memberOf _ * @since 4.13.0 * @category Util * @returns {Array} Returns the new empty array. * @example * * var arrays = _.times(2, _.stubArray); * * console.log(arrays); * // => [[], []] * * console.log(arrays[0] === arrays[1]); * // => false */ function stubArray() { return []; } /** * This method returns `false`. * * @static * @memberOf _ * @since 4.13.0 * @category Util * @returns {boolean} Returns `false`. * @example * * _.times(2, _.stubFalse); * // => [false, false] */ function stubFalse() { return false; } module.exports = isEqual; /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(121), __webpack_require__(34)(module))) /***/ }), /* 57 */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /* 58 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** @license React v16.13.1 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } var b = "function" === typeof Symbol && Symbol.for, c = b ? Symbol.for("react.element") : 60103, d = b ? Symbol.for("react.portal") : 60106, e = b ? Symbol.for("react.fragment") : 60107, f = b ? Symbol.for("react.strict_mode") : 60108, g = b ? Symbol.for("react.profiler") : 60114, h = b ? Symbol.for("react.provider") : 60109, k = b ? Symbol.for("react.context") : 60110, l = b ? Symbol.for("react.async_mode") : 60111, m = b ? Symbol.for("react.concurrent_mode") : 60111, n = b ? Symbol.for("react.forward_ref") : 60112, p = b ? Symbol.for("react.suspense") : 60113, q = b ? Symbol.for("react.suspense_list") : 60120, r = b ? Symbol.for("react.memo") : 60115, t = b ? Symbol.for("react.lazy") : 60116, v = b ? Symbol.for("react.block") : 60121, w = b ? Symbol.for("react.fundamental") : 60117, x = b ? Symbol.for("react.responder") : 60118, y = b ? Symbol.for("react.scope") : 60119; function z(a) { if ("object" === _typeof(a) && null !== a) { var u = a.$$typeof; switch (u) { case c: switch (a = a.type, a) { case l: case m: case e: case g: case f: case p: return a; default: switch (a = a && a.$$typeof, a) { case k: case n: case t: case r: case h: return a; default: return u; } } case d: return u; } } } function A(a) { return z(a) === m; } exports.AsyncMode = l; exports.ConcurrentMode = m; exports.ContextConsumer = k; exports.ContextProvider = h; exports.Element = c; exports.ForwardRef = n; exports.Fragment = e; exports.Lazy = t; exports.Memo = r; exports.Portal = d; exports.Profiler = g; exports.StrictMode = f; exports.Suspense = p; exports.isAsyncMode = function (a) { return A(a) || z(a) === l; }; exports.isConcurrentMode = A; exports.isContextConsumer = function (a) { return z(a) === k; }; exports.isContextProvider = function (a) { return z(a) === h; }; exports.isElement = function (a) { return "object" === _typeof(a) && null !== a && a.$$typeof === c; }; exports.isForwardRef = function (a) { return z(a) === n; }; exports.isFragment = function (a) { return z(a) === e; }; exports.isLazy = function (a) { return z(a) === t; }; exports.isMemo = function (a) { return z(a) === r; }; exports.isPortal = function (a) { return z(a) === d; }; exports.isProfiler = function (a) { return z(a) === g; }; exports.isStrictMode = function (a) { return z(a) === f; }; exports.isSuspense = function (a) { return z(a) === p; }; exports.isValidElementType = function (a) { return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === _typeof(a) && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v); }; exports.typeOf = z; /***/ }), /* 59 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } /** * Copyright (c) 2014-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var runtime = function (exports) { "use strict"; var Op = Object.prototype; var hasOwn = Op.hasOwnProperty; var undefined; // More compressible than void 0. var $Symbol = typeof Symbol === "function" ? Symbol : {}; var iteratorSymbol = $Symbol.iterator || "@@iterator"; var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator"; var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); return obj[key]; } try { // IE 8 has a broken Object.defineProperty that only works on DOM objects. define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator. var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; var generator = Object.create(protoGenerator.prototype); var context = new Context(tryLocsList || []); // The ._invoke method unifies the implementations of the .next, // .throw, and .return methods. generator._invoke = makeInvokeMethod(innerFn, self, context); return generator; } exports.wrap = wrap; // Try/catch helper to minimize deoptimizations. Returns a completion // record like context.tryEntries[i].completion. This interface could // have been (and was previously) designed to take a closure to be // invoked without arguments, but in all the cases we care about we // already have an existing method we want to call, so there's no need // to create a new function object. We can even get away with assuming // the method takes exactly one argument, since that happens to be true // in every case, so we don't have to touch the arguments object. The // only additional allocation required is the completion record, which // has a stable shape and so hopefully should be cheap to allocate. function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } var GenStateSuspendedStart = "suspendedStart"; var GenStateSuspendedYield = "suspendedYield"; var GenStateExecuting = "executing"; var GenStateCompleted = "completed"; // Returning this object from the innerFn has the same effect as // breaking out of the dispatch switch statement. var ContinueSentinel = {}; // Dummy constructor functions that we use as the .constructor and // .constructor.prototype properties for functions that return Generator // objects. For full spec compliance, you may wish to configure your // minifier not to mangle the names of these two functions. function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} // This is a polyfill for %IteratorPrototype% for environments that // don't natively support it. var IteratorPrototype = {}; IteratorPrototype[iteratorSymbol] = function () { return this; }; var getProto = Object.getPrototypeOf; var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); if (NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) { // This environment has a native %IteratorPrototype%; use it instead // of the polyfill. IteratorPrototype = NativeIteratorPrototype; } var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; GeneratorFunctionPrototype.constructor = GeneratorFunction; GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"); // Helper for defining the .next, .throw, and .return methods of the // Iterator interface in terms of a single ._invoke method. function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } exports.isGeneratorFunction = function (genFun) { var ctor = typeof genFun === "function" && genFun.constructor; return ctor ? ctor === GeneratorFunction || // For the native GeneratorFunction constructor, the best we can // do is to check its .name property. (ctor.displayName || ctor.name) === "GeneratorFunction" : false; }; exports.mark = function (genFun) { if (Object.setPrototypeOf) { Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); } else { genFun.__proto__ = GeneratorFunctionPrototype; define(genFun, toStringTagSymbol, "GeneratorFunction"); } genFun.prototype = Object.create(Gp); return genFun; }; // Within the body of any async function, `await x` is transformed to // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test // `hasOwn.call(value, "__await")` to determine if the yielded value is // meant to be awaited. exports.awrap = function (arg) { return { __await: arg }; }; function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if (record.type === "throw") { reject(record.arg); } else { var result = record.arg; var value = result.value; if (value && _typeof(value) === "object" && hasOwn.call(value, "__await")) { return PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }); } return PromiseImpl.resolve(value).then(function (unwrapped) { // When a yielded Promise is resolved, its final value becomes // the .value of the Promise<{value,done}> result for the // current iteration. result.value = unwrapped; resolve(result); }, function (error) { // If a rejected Promise was yielded, throw the rejection back // into the async generator function so it can be handled there. return invoke("throw", error, resolve, reject); }); } } var previousPromise; function enqueue(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = // If enqueue has been called before, then we want to wait until // all previous Promises have been resolved before calling invoke, // so that results are always delivered in the correct order. If // enqueue has not been called before, then it is important to // call invoke immediately, without waiting on a callback to fire, // so that the async generator function has the opportunity to do // any necessary setup in a predictable way. This predictability // is why the Promise constructor synchronously invokes its // executor callback, and why async functions synchronously // execute code before the first await. Since we implement simple // async functions in terms of async generators, it is especially // important to get this right, even though it requires care. previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, // Avoid propagating failures to Promises returned by later // invocations of the iterator. callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } // Define the unified helper method that is used to implement .next, // .throw, and .return (see defineIteratorMethods). this._invoke = enqueue; } defineIteratorMethods(AsyncIterator.prototype); AsyncIterator.prototype[asyncIteratorSymbol] = function () { return this; }; exports.AsyncIterator = AsyncIterator; // Note that simple async functions are implemented on top of // AsyncIterator objects; they just return a Promise for the value of // the final result produced by the iterator. exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { if (PromiseImpl === void 0) PromiseImpl = Promise; var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter // If outerFn is a generator, return the full iterator. : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }; function makeInvokeMethod(innerFn, self, context) { var state = GenStateSuspendedStart; return function invoke(method, arg) { if (state === GenStateExecuting) { throw new Error("Generator is already running"); } if (state === GenStateCompleted) { if (method === "throw") { throw arg; } // Be forgiving, per 25.3.3.3.3 of the spec: // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume return doneResult(); } context.method = method; context.arg = arg; while (true) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if (context.method === "next") { // Setting context._sent for legacy support of Babel's // function.sent implementation. context.sent = context._sent = context.arg; } else if (context.method === "throw") { if (state === GenStateSuspendedStart) { state = GenStateCompleted; throw context.arg; } context.dispatchException(context.arg); } else if (context.method === "return") { context.abrupt("return", context.arg); } state = GenStateExecuting; var record = tryCatch(innerFn, self, context); if (record.type === "normal") { // If an exception is thrown from innerFn, we leave state === // GenStateExecuting and loop back for another invocation. state = context.done ? GenStateCompleted : GenStateSuspendedYield; if (record.arg === ContinueSentinel) { continue; } return { value: record.arg, done: context.done }; } else if (record.type === "throw") { state = GenStateCompleted; // Dispatch the exception by looping back around to the // context.dispatchException(context.arg) call above. context.method = "throw"; context.arg = record.arg; } } }; } // Call delegate.iterator[context.method](context.arg) and handle the // result, either by returning a { value, done } result from the // delegate iterator, or by modifying context.method and context.arg, // setting context.delegate to null, and returning the ContinueSentinel. function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (method === undefined) { // A .throw or .return when the delegate iterator has no .throw // method always terminates the yield* loop. context.delegate = null; if (context.method === "throw") { // Note: ["return"] must be used for ES3 parsing compatibility. if (delegate.iterator["return"]) { // If the delegate iterator has a return method, give it a // chance to clean up. context.method = "return"; context.arg = undefined; maybeInvokeDelegate(delegate, context); if (context.method === "throw") { // If maybeInvokeDelegate(context) changed context.method from // "return" to "throw", let that override the TypeError below. return ContinueSentinel; } } context.method = "throw"; context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if (record.type === "throw") { context.method = "throw"; context.arg = record.arg; context.delegate = null; return ContinueSentinel; } var info = record.arg; if (!info) { context.method = "throw"; context.arg = new TypeError("iterator result is not an object"); context.delegate = null; return ContinueSentinel; } if (info.done) { // Assign the result of the finished delegate to the temporary // variable specified by delegate.resultName (see delegateYield). context[delegate.resultName] = info.value; // Resume execution at the desired location (see delegateYield). context.next = delegate.nextLoc; // If context.method was "throw" but the delegate handled the // exception, let the outer generator proceed normally. If // context.method was "next", forget context.arg since it has been // "consumed" by the delegate iterator. If context.method was // "return", allow the original .return call to continue in the // outer generator. if (context.method !== "return") { context.method = "next"; context.arg = undefined; } } else { // Re-yield the result returned by the delegate method. return info; } // The delegate iterator is finished, so forget it and continue with // the outer generator. context.delegate = null; return ContinueSentinel; } // Define Generator.prototype.{next,throw,return} in terms of the // unified ._invoke helper method. defineIteratorMethods(Gp); define(Gp, toStringTagSymbol, "Generator"); // A Generator should always return itself as the iterator object when the // @@iterator function is called on it. Some browsers' implementations of the // iterator prototype chain incorrectly implement this, causing the Generator // object to not be returned from this call. This ensures that doesn't happen. // See https://github.com/facebook/regenerator/issues/274 for more details. Gp[iteratorSymbol] = function () { return this; }; Gp.toString = function () { return "[object Generator]"; }; function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; if (1 in locs) { entry.catchLoc = locs[1]; } if (2 in locs) { entry.finallyLoc = locs[2]; entry.afterLoc = locs[3]; } this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal"; delete record.arg; entry.completion = record; } function Context(tryLocsList) { // The root entry object (effectively a try statement without a catch // or a finally block) gives us a place to store values thrown from // locations where there is no enclosing try statement. this.tryEntries = [{ tryLoc: "root" }]; tryLocsList.forEach(pushTryEntry, this); this.reset(true); } exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } keys.reverse(); // Rather than returning an object with a next method, we keep // things simple and return the next function itself. return function next() { while (keys.length) { var key = keys.pop(); if (key in object) { next.value = key; next.done = false; return next; } } // To avoid creating an additional object, we just hang the .value // and .done properties off the next function object itself. This // also ensures that the minifier will not anonymize the function. next.done = true; return next; }; }; function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) { return iteratorMethod.call(iterable); } if (typeof iterable.next === "function") { return iterable; } if (!isNaN(iterable.length)) { var i = -1, next = function next() { while (++i < iterable.length) { if (hasOwn.call(iterable, i)) { next.value = iterable[i]; next.done = false; return next; } } next.value = undefined; next.done = true; return next; }; return next.next = next; } } // Return an iterator with no values. return { next: doneResult }; } exports.values = values; function doneResult() { return { value: undefined, done: true }; } Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { this.prev = 0; this.next = 0; // Resetting context._sent for legacy support of Babel's // function.sent implementation. this.sent = this._sent = undefined; this.done = false; this.delegate = null; this.method = "next"; this.arg = undefined; this.tryEntries.forEach(resetTryEntry); if (!skipTempReset) { for (var name in this) { // Not sure about the optimal order of these conditions: if (name.charAt(0) === "t" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) { this[name] = undefined; } } } }, stop: function stop() { this.done = true; var rootEntry = this.tryEntries[0]; var rootRecord = rootEntry.completion; if (rootRecord.type === "throw") { throw rootRecord.arg; } return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) { throw exception; } var context = this; function handle(loc, caught) { record.type = "throw"; record.arg = exception; context.next = loc; if (caught) { // If the dispatched exception was caught by a catch block, // then let that catch block handle the exception normally. context.method = "next"; context.arg = undefined; } return !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; var record = entry.completion; if (entry.tryLoc === "root") { // Exception thrown outside of any try block that could handle // it, so set the completion value of the entire function to // throw the exception. return handle("end"); } if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"); var hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) { return handle(entry.catchLoc, true); } else if (this.prev < entry.finallyLoc) { return handle(entry.finallyLoc); } } else if (hasCatch) { if (this.prev < entry.catchLoc) { return handle(entry.catchLoc, true); } } else if (hasFinally) { if (this.prev < entry.finallyLoc) { return handle(entry.finallyLoc); } } else { throw new Error("try statement without catch or finally"); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } if (finallyEntry && (type === "break" || type === "continue") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) { // Ignore the finally entry if control is not jumping to a // location outside the try/catch block. finallyEntry = null; } var record = finallyEntry ? finallyEntry.completion : {}; record.type = type; record.arg = arg; if (finallyEntry) { this.method = "next"; this.next = finallyEntry.finallyLoc; return ContinueSentinel; } return this.complete(record); }, complete: function complete(record, afterLoc) { if (record.type === "throw") { throw record.arg; } if (record.type === "break" || record.type === "continue") { this.next = record.arg; } else if (record.type === "return") { this.rval = this.arg = record.arg; this.method = "return"; this.next = "end"; } else if (record.type === "normal" && afterLoc) { this.next = afterLoc; } return ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) { this.complete(entry.completion, entry.afterLoc); resetTryEntry(entry); return ContinueSentinel; } } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if (record.type === "throw") { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } // The context.catch method must only be called with a location // argument that corresponds to a known catch block. throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }; if (this.method === "next") { // Deliberately forget the last sent value so that we don't // accidentally pass it on to the delegate. this.arg = undefined; } return ContinueSentinel; } }; // Regardless of whether this script is executing as a CommonJS module // or not, return the runtime object so that we can declare the variable // regeneratorRuntime in the outer scope, which allows this module to be // injected easily by `bin/regenerator --include-runtime script.js`. return exports; }( // If this script is executing as a CommonJS module, use module.exports // as the regeneratorRuntime namespace. Otherwise create a new empty // object. Either way, the resulting object will be used to initialize // the regeneratorRuntime variable at the top of this file. ( false ? undefined : _typeof(module)) === "object" ? module.exports : {}); try { regeneratorRuntime = runtime; } catch (accidentalStrictMode) { // This module should not be running in strict mode, so the above // assignment should always work unless something is misconfigured. Just // in case runtime.js accidentally runs in strict mode, we can escape // strict mode using a global Function call. This could conceivably fail // if a Content Security Policy forbids using Function, but in that case // the proper solution is to fix the accidental strict mode problem. If // you've misconfigured your bundler to force strict mode and applied a // CSP to forbid Function, and you're not willing to fix either of those // problems, please detail your unique predicament in a GitHub issue. Function("r", "regeneratorRuntime = r")(runtime); } /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(34)(module))) /***/ }), /* 60 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireWildcard = __webpack_require__(3); var _interopRequireDefault = __webpack_require__(1); Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = exports.ANT_MARK = void 0; var _extends2 = _interopRequireDefault(__webpack_require__(8)); var _classCallCheck2 = _interopRequireDefault(__webpack_require__(26)); var _createClass2 = _interopRequireDefault(__webpack_require__(27)); var _inherits2 = _interopRequireDefault(__webpack_require__(28)); var _createSuper2 = _interopRequireDefault(__webpack_require__(36)); var React = _interopRequireWildcard(__webpack_require__(0)); var _devWarning = _interopRequireDefault(__webpack_require__(64)); var _locale = __webpack_require__(65); var _context = _interopRequireDefault(__webpack_require__(43)); var ANT_MARK = 'internalMark'; exports.ANT_MARK = ANT_MARK; var LocaleProvider = /*#__PURE__*/function (_React$Component) { (0, _inherits2["default"])(LocaleProvider, _React$Component); var _super = (0, _createSuper2["default"])(LocaleProvider); function LocaleProvider(props) { var _this; (0, _classCallCheck2["default"])(this, LocaleProvider); _this = _super.call(this, props); (0, _locale.changeConfirmLocale)(props.locale && props.locale.Modal); (0, _devWarning["default"])(props._ANT_MARK__ === ANT_MARK, 'LocaleProvider', '`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead: http://u.ant.design/locale'); return _this; } (0, _createClass2["default"])(LocaleProvider, [{ key: "componentDidUpdate", value: function componentDidUpdate(prevProps) { var locale = this.props.locale; if (prevProps.locale !== locale) { (0, _locale.changeConfirmLocale)(locale && locale.Modal); } } }, { key: "componentWillUnmount", value: function componentWillUnmount() { (0, _locale.changeConfirmLocale)(); } }, { key: "render", value: function render() { var _this$props = this.props, locale = _this$props.locale, children = _this$props.children; return /*#__PURE__*/React.createElement(_context["default"].Provider, { value: (0, _extends2["default"])((0, _extends2["default"])({}, locale), { exist: true }) }, children); } }]); return LocaleProvider; }(React.Component); exports["default"] = LocaleProvider; LocaleProvider.defaultProps = { locale: {} }; /***/ }), /* 61 */ /***/ (function(module, exports) { function _setPrototypeOf(o, p) { module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } module.exports = _setPrototypeOf; /***/ }), /* 62 */ /***/ (function(module, exports) { function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } module.exports = _isNativeReflectConstruct; /***/ }), /* 63 */ /***/ (function(module, exports) { function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } module.exports = _assertThisInitialized; /***/ }), /* 64 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireWildcard = __webpack_require__(3); Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "resetWarned", { enumerable: true, get: function get() { return _warning.resetWarned; } }); exports["default"] = void 0; var _warning = _interopRequireWildcard(__webpack_require__(39)); var _default = function _default(valid, component, message) { (0, _warning["default"])(valid, "[antd: ".concat(component, "] ").concat(message)); }; exports["default"] = _default; /***/ }), /* 65 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(1); Object.defineProperty(exports, "__esModule", { value: true }); exports.changeConfirmLocale = changeConfirmLocale; exports.getConfirmLocale = getConfirmLocale; var _extends2 = _interopRequireDefault(__webpack_require__(8)); var _default = _interopRequireDefault(__webpack_require__(40)); var runtimeLocale = (0, _extends2["default"])({}, _default["default"].Modal); function changeConfirmLocale(newLocale) { if (newLocale) { runtimeLocale = (0, _extends2["default"])((0, _extends2["default"])({}, runtimeLocale), newLocale); } else { runtimeLocale = (0, _extends2["default"])({}, _default["default"].Modal); } } function getConfirmLocale() { return runtimeLocale; } /***/ }), /* 66 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _default = { // Options.jsx items_per_page: '/ page', jump_to: 'Go to', jump_to_confirm: 'confirm', page: '', // Pagination.jsx prev_page: 'Previous Page', next_page: 'Next Page', prev_5: 'Previous 5 Pages', next_5: 'Next 5 Pages', prev_3: 'Previous 3 Pages', next_3: 'Next 3 Pages' }; exports.default = _default; /***/ }), /* 67 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var locale = { locale: 'en_US', today: 'Today', now: 'Now', backToToday: 'Back to today', ok: 'Ok', clear: 'Clear', month: 'Month', year: 'Year', timeSelect: 'select time', dateSelect: 'select date', weekSelect: 'Choose a week', monthSelect: 'Choose a month', yearSelect: 'Choose a year', decadeSelect: 'Choose a decade', yearFormat: 'YYYY', dateFormat: 'M/D/YYYY', dayFormat: 'D', dateTimeFormat: 'M/D/YYYY HH:mm:ss', monthBeforeYear: true, previousMonth: 'Previous month (PageUp)', nextMonth: 'Next month (PageDown)', previousYear: 'Last year (Control + left)', nextYear: 'Next year (Control + right)', previousDecade: 'Last decade', nextDecade: 'Next decade', previousCentury: 'Last century', nextCentury: 'Next century' }; var _default = locale; exports.default = _default; /***/ }), /* 68 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(1); Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _en_US = _interopRequireDefault(__webpack_require__(41)); var _default = _en_US["default"]; exports["default"] = _default; /***/ }), /* 69 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(1); Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _default2 = _interopRequireDefault(__webpack_require__(40)); var _default = _default2["default"]; exports["default"] = _default; /***/ }), /* 70 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireWildcard = __webpack_require__(3); var _interopRequireDefault = __webpack_require__(1); Object.defineProperty(exports, "__esModule", { value: true }); exports.withConfigConsumer = withConfigConsumer; exports.ConfigConsumer = exports.ConfigContext = void 0; var _extends2 = _interopRequireDefault(__webpack_require__(8)); var React = _interopRequireWildcard(__webpack_require__(0)); var _renderEmpty = _interopRequireDefault(__webpack_require__(71)); var ConfigContext = /*#__PURE__*/React.createContext({ // We provide a default function for Context without provider getPrefixCls: function getPrefixCls(suffixCls, customizePrefixCls) { if (customizePrefixCls) return customizePrefixCls; return suffixCls ? "ant-".concat(suffixCls) : 'ant'; }, renderEmpty: _renderEmpty["default"] }); exports.ConfigContext = ConfigContext; var ConfigConsumer = ConfigContext.Consumer; exports.ConfigConsumer = ConfigConsumer; function withConfigConsumer(config) { return function withConfigConsumerFunc(Component) { // Wrap with ConfigConsumer. Since we need compatible with react 15, be care when using ref methods var SFC = function SFC(props) { return /*#__PURE__*/React.createElement(ConfigConsumer, null, function (configProps) { var basicPrefixCls = config.prefixCls; var getPrefixCls = configProps.getPrefixCls; var customizePrefixCls = props.prefixCls; var prefixCls = getPrefixCls(basicPrefixCls, customizePrefixCls); return /*#__PURE__*/React.createElement(Component, (0, _extends2["default"])({}, configProps, props, { prefixCls: prefixCls })); }); }; var cons = Component.constructor; var name = cons && cons.displayName || Component.name || 'Component'; SFC.displayName = "withConfigConsumer(".concat(name, ")"); return SFC; }; } /***/ }), /* 71 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(1); var _interopRequireWildcard = __webpack_require__(3); Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var React = _interopRequireWildcard(__webpack_require__(0)); var _empty = _interopRequireDefault(__webpack_require__(72)); var _ = __webpack_require__(15); var renderEmpty = function renderEmpty(componentName) { return /*#__PURE__*/React.createElement(_.ConfigConsumer, null, function (_ref) { var getPrefixCls = _ref.getPrefixCls; var prefix = getPrefixCls('empty'); switch (componentName) { case 'Table': case 'List': return /*#__PURE__*/React.createElement(_empty["default"], { image: _empty["default"].PRESENTED_IMAGE_SIMPLE }); case 'Select': case 'TreeSelect': case 'Cascader': case 'Transfer': case 'Mentions': return /*#__PURE__*/React.createElement(_empty["default"], { image: _empty["default"].PRESENTED_IMAGE_SIMPLE, className: "".concat(prefix, "-small") }); default: return /*#__PURE__*/React.createElement(_empty["default"], null); } }); }; var _default = renderEmpty; exports["default"] = _default; /***/ }), /* 72 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireWildcard = __webpack_require__(3); var _interopRequireDefault = __webpack_require__(1); Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _extends2 = _interopRequireDefault(__webpack_require__(8)); var _defineProperty2 = _interopRequireDefault(__webpack_require__(18)); var React = _interopRequireWildcard(__webpack_require__(0)); var _classnames = _interopRequireDefault(__webpack_require__(6)); var _configProvider = __webpack_require__(15); var _LocaleReceiver = _interopRequireDefault(__webpack_require__(44)); var _empty = _interopRequireDefault(__webpack_require__(73)); var _simple = _interopRequireDefault(__webpack_require__(74)); var __rest = void 0 && (void 0).__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var defaultEmptyImg = /*#__PURE__*/React.createElement(_empty["default"], null); var simpleEmptyImg = /*#__PURE__*/React.createElement(_simple["default"], null); var Empty = function Empty(props) { return /*#__PURE__*/React.createElement(_configProvider.ConfigConsumer, null, function (_ref) { var getPrefixCls = _ref.getPrefixCls, direction = _ref.direction; var className = props.className, customizePrefixCls = props.prefixCls, _props$image = props.image, image = _props$image === void 0 ? defaultEmptyImg : _props$image, description = props.description, children = props.children, imageStyle = props.imageStyle, restProps = __rest(props, ["className", "prefixCls", "image", "description", "children", "imageStyle"]); return /*#__PURE__*/React.createElement(_LocaleReceiver["default"], { componentName: "Empty" }, function (locale) { var _classNames; var prefixCls = getPrefixCls('empty', customizePrefixCls); var des = typeof description !== 'undefined' ? description : locale.description; var alt = typeof des === 'string' ? des : 'empty'; var imageNode = null; if (typeof image === 'string') { imageNode = /*#__PURE__*/React.createElement("img", { alt: alt, src: image }); } else { imageNode = image; } return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({ className: (0, _classnames["default"])(prefixCls, (_classNames = {}, (0, _defineProperty2["default"])(_classNames, "".concat(prefixCls, "-normal"), image === simpleEmptyImg), (0, _defineProperty2["default"])(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), _classNames), className) }, restProps), /*#__PURE__*/React.createElement("div", { className: "".concat(prefixCls, "-image"), style: imageStyle }, imageNode), des && /*#__PURE__*/React.createElement("p", { className: "".concat(prefixCls, "-description") }, des), children && /*#__PURE__*/React.createElement("div", { className: "".concat(prefixCls, "-footer") }, children)); }); }); }; Empty.PRESENTED_IMAGE_DEFAULT = defaultEmptyImg; Empty.PRESENTED_IMAGE_SIMPLE = simpleEmptyImg; var _default = Empty; exports["default"] = _default; /***/ }), /* 73 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireWildcard = __webpack_require__(3); Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var React = _interopRequireWildcard(__webpack_require__(0)); var _configProvider = __webpack_require__(15); var Empty = function Empty() { var _React$useContext = React.useContext(_configProvider.ConfigContext), getPrefixCls = _React$useContext.getPrefixCls; var prefixCls = getPrefixCls('empty-img-default'); return /*#__PURE__*/React.createElement("svg", { className: prefixCls, width: "184", height: "152", viewBox: "0 0 184 152", xmlns: "http://www.w3.org/2000/svg" }, /*#__PURE__*/React.createElement("g", { fill: "none", fillRule: "evenodd" }, /*#__PURE__*/React.createElement("g", { transform: "translate(24 31.67)" }, /*#__PURE__*/React.createElement("ellipse", { className: "".concat(prefixCls, "-ellipse"), cx: "67.797", cy: "106.89", rx: "67.797", ry: "12.668" }), /*#__PURE__*/React.createElement("path", { className: "".concat(prefixCls, "-path-1"), d: "M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z" }), /*#__PURE__*/React.createElement("path", { className: "".concat(prefixCls, "-path-2"), d: "M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z", transform: "translate(13.56)" }), /*#__PURE__*/React.createElement("path", { className: "".concat(prefixCls, "-path-3"), d: "M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z" }), /*#__PURE__*/React.createElement("path", { className: "".concat(prefixCls, "-path-4"), d: "M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z" })), /*#__PURE__*/React.createElement("path", { className: "".concat(prefixCls, "-path-5"), d: "M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z" }), /*#__PURE__*/React.createElement("g", { className: "".concat(prefixCls, "-g"), transform: "translate(149.65 15.383)" }, /*#__PURE__*/React.createElement("ellipse", { cx: "20.654", cy: "3.167", rx: "2.849", ry: "2.815" }), /*#__PURE__*/React.createElement("path", { d: "M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z" })))); }; var _default = Empty; exports["default"] = _default; /***/ }), /* 74 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireWildcard = __webpack_require__(3); Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var React = _interopRequireWildcard(__webpack_require__(0)); var _configProvider = __webpack_require__(15); var Simple = function Simple() { var _React$useContext = React.useContext(_configProvider.ConfigContext), getPrefixCls = _React$useContext.getPrefixCls; var prefixCls = getPrefixCls('empty-img-simple'); return /*#__PURE__*/React.createElement("svg", { className: prefixCls, width: "64", height: "41", viewBox: "0 0 64 41", xmlns: "http://www.w3.org/2000/svg" }, /*#__PURE__*/React.createElement("g", { transform: "translate(0 1)", fill: "none", fillRule: "evenodd" }, /*#__PURE__*/React.createElement("ellipse", { className: "".concat(prefixCls, "-ellipse"), cx: "32", cy: "33", rx: "32", ry: "7" }), /*#__PURE__*/React.createElement("g", { className: "".concat(prefixCls, "-g"), fillRule: "nonzero" }, /*#__PURE__*/React.createElement("path", { d: "M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z" }), /*#__PURE__*/React.createElement("path", { d: "M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z", className: "".concat(prefixCls, "-path") })))); }; var _default = Simple; exports["default"] = _default; /***/ }), /* 75 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireWildcard = __webpack_require__(3); Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = exports.SizeContextProvider = void 0; var React = _interopRequireWildcard(__webpack_require__(0)); var SizeContext = /*#__PURE__*/React.createContext(undefined); var SizeContextProvider = function SizeContextProvider(_ref) { var children = _ref.children, size = _ref.size; return /*#__PURE__*/React.createElement(SizeContext.Consumer, null, function (originSize) { return /*#__PURE__*/React.createElement(SizeContext.Provider, { value: size || originSize }, children); }); }; exports.SizeContextProvider = SizeContextProvider; var _default = SizeContext; exports["default"] = _default; /***/ }), /* 76 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _LoadingOutlined = _interopRequireDefault(__webpack_require__(77)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _default = _LoadingOutlined; exports.default = _default; module.exports = _default; /***/ }), /* 77 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(1); var _interopRequireWildcard = __webpack_require__(3); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var React = _interopRequireWildcard(__webpack_require__(0)); var _LoadingOutlined = _interopRequireDefault(__webpack_require__(78)); var _AntdIcon = _interopRequireDefault(__webpack_require__(10)); // GENERATE BY ./scripts/generate.ts // DON NOT EDIT IT MANUALLY var LoadingOutlined = function LoadingOutlined(props, ref) { return React.createElement(_AntdIcon.default, Object.assign({}, props, { ref: ref, icon: _LoadingOutlined.default })); }; LoadingOutlined.displayName = 'LoadingOutlined'; var _default = React.forwardRef(LoadingOutlined); exports.default = _default; /***/ }), /* 78 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; // This icon file is generated automatically. Object.defineProperty(exports, "__esModule", { value: true }); var LoadingOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z" } }] }, "name": "loading", "theme": "outlined" }; exports.default = LoadingOutlined; /***/ }), /* 79 */ /***/ (function(module, exports) { function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } module.exports = _arrayWithHoles; /***/ }), /* 80 */ /***/ (function(module, exports) { function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } module.exports = _iterableToArrayLimit; /***/ }), /* 81 */ /***/ (function(module, exports) { function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } module.exports = _nonIterableRest; /***/ }), /* 82 */ /***/ (function(module, exports) { function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } module.exports = _objectWithoutPropertiesLoose; /***/ }), /* 83 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var __importDefault = this && this.__importDefault || function (mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); var tinycolor2_1 = __importDefault(__webpack_require__(84)); var hueStep = 2; // 色相阶梯 var saturationStep = 16; // 饱和度阶梯,浅色部分 var saturationStep2 = 5; // 饱和度阶梯,深色部分 var brightnessStep1 = 5; // 亮度阶梯,浅色部分 var brightnessStep2 = 15; // 亮度阶梯,深色部分 var lightColorCount = 5; // 浅色数量,主色上 var darkColorCount = 4; // 深色数量,主色下 function getHue(hsv, i, light) { var hue; // 根据色相不同,色相转向不同 if (Math.round(hsv.h) >= 60 && Math.round(hsv.h) <= 240) { hue = light ? Math.round(hsv.h) - hueStep * i : Math.round(hsv.h) + hueStep * i; } else { hue = light ? Math.round(hsv.h) + hueStep * i : Math.round(hsv.h) - hueStep * i; } if (hue < 0) { hue += 360; } else if (hue >= 360) { hue -= 360; } return hue; } function getSaturation(hsv, i, light) { // grey color don't change saturation if (hsv.h === 0 && hsv.s === 0) { return hsv.s; } var saturation; if (light) { saturation = Math.round(hsv.s * 100) - saturationStep * i; } else if (i === darkColorCount) { saturation = Math.round(hsv.s * 100) + saturationStep; } else { saturation = Math.round(hsv.s * 100) + saturationStep2 * i; } // 边界值修正 if (saturation > 100) { saturation = 100; } // 第一格的 s 限制在 6-10 之间 if (light && i === lightColorCount && saturation > 10) { saturation = 10; } if (saturation < 6) { saturation = 6; } return saturation; } function getValue(hsv, i, light) { if (light) { return Math.round(hsv.v * 100) + brightnessStep1 * i; } return Math.round(hsv.v * 100) - brightnessStep2 * i; } function generate(color) { var patterns = []; var pColor = tinycolor2_1.default(color); for (var i = lightColorCount; i > 0; i -= 1) { var hsv = pColor.toHsv(); var colorString = tinycolor2_1.default({ h: getHue(hsv, i, true), s: getSaturation(hsv, i, true), v: getValue(hsv, i, true) }).toHexString(); patterns.push(colorString); } patterns.push(pColor.toHexString()); for (var i = 1; i <= darkColorCount; i += 1) { var hsv = pColor.toHsv(); var colorString = tinycolor2_1.default({ h: getHue(hsv, i), s: getSaturation(hsv, i), v: getValue(hsv, i) }).toHexString(); patterns.push(colorString); } return patterns; } exports.default = generate; /***/ }), /* 84 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } // TinyColor v1.4.1 // https://github.com/bgrins/TinyColor // Brian Grinstead, MIT License (function (Math) { var trimLeft = /^\s+/, trimRight = /\s+$/, tinyCounter = 0, mathRound = Math.round, mathMin = Math.min, mathMax = Math.max, mathRandom = Math.random; function tinycolor(color, opts) { color = color ? color : ''; opts = opts || {}; // If input is already a tinycolor, return itself if (color instanceof tinycolor) { return color; } // If we are called as a function, call using new instead if (!(this instanceof tinycolor)) { return new tinycolor(color, opts); } var rgb = inputToRGB(color); this._originalInput = color, this._r = rgb.r, this._g = rgb.g, this._b = rgb.b, this._a = rgb.a, this._roundA = mathRound(100 * this._a) / 100, this._format = opts.format || rgb.format; this._gradientType = opts.gradientType; // Don't let the range of [0,255] come back in [0,1]. // Potentially lose a little bit of precision here, but will fix issues where // .5 gets interpreted as half of the total, instead of half of 1 // If it was supposed to be 128, this was already taken care of by `inputToRgb` if (this._r < 1) { this._r = mathRound(this._r); } if (this._g < 1) { this._g = mathRound(this._g); } if (this._b < 1) { this._b = mathRound(this._b); } this._ok = rgb.ok; this._tc_id = tinyCounter++; } tinycolor.prototype = { isDark: function isDark() { return this.getBrightness() < 128; }, isLight: function isLight() { return !this.isDark(); }, isValid: function isValid() { return this._ok; }, getOriginalInput: function getOriginalInput() { return this._originalInput; }, getFormat: function getFormat() { return this._format; }, getAlpha: function getAlpha() { return this._a; }, getBrightness: function getBrightness() { //http://www.w3.org/TR/AERT#color-contrast var rgb = this.toRgb(); return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000; }, getLuminance: function getLuminance() { //http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef var rgb = this.toRgb(); var RsRGB, GsRGB, BsRGB, R, G, B; RsRGB = rgb.r / 255; GsRGB = rgb.g / 255; BsRGB = rgb.b / 255; if (RsRGB <= 0.03928) { R = RsRGB / 12.92; } else { R = Math.pow((RsRGB + 0.055) / 1.055, 2.4); } if (GsRGB <= 0.03928) { G = GsRGB / 12.92; } else { G = Math.pow((GsRGB + 0.055) / 1.055, 2.4); } if (BsRGB <= 0.03928) { B = BsRGB / 12.92; } else { B = Math.pow((BsRGB + 0.055) / 1.055, 2.4); } return 0.2126 * R + 0.7152 * G + 0.0722 * B; }, setAlpha: function setAlpha(value) { this._a = boundAlpha(value); this._roundA = mathRound(100 * this._a) / 100; return this; }, toHsv: function toHsv() { var hsv = rgbToHsv(this._r, this._g, this._b); return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this._a }; }, toHsvString: function toHsvString() { var hsv = rgbToHsv(this._r, this._g, this._b); var h = mathRound(hsv.h * 360), s = mathRound(hsv.s * 100), v = mathRound(hsv.v * 100); return this._a == 1 ? "hsv(" + h + ", " + s + "%, " + v + "%)" : "hsva(" + h + ", " + s + "%, " + v + "%, " + this._roundA + ")"; }, toHsl: function toHsl() { var hsl = rgbToHsl(this._r, this._g, this._b); return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this._a }; }, toHslString: function toHslString() { var hsl = rgbToHsl(this._r, this._g, this._b); var h = mathRound(hsl.h * 360), s = mathRound(hsl.s * 100), l = mathRound(hsl.l * 100); return this._a == 1 ? "hsl(" + h + ", " + s + "%, " + l + "%)" : "hsla(" + h + ", " + s + "%, " + l + "%, " + this._roundA + ")"; }, toHex: function toHex(allow3Char) { return rgbToHex(this._r, this._g, this._b, allow3Char); }, toHexString: function toHexString(allow3Char) { return '#' + this.toHex(allow3Char); }, toHex8: function toHex8(allow4Char) { return rgbaToHex(this._r, this._g, this._b, this._a, allow4Char); }, toHex8String: function toHex8String(allow4Char) { return '#' + this.toHex8(allow4Char); }, toRgb: function toRgb() { return { r: mathRound(this._r), g: mathRound(this._g), b: mathRound(this._b), a: this._a }; }, toRgbString: function toRgbString() { return this._a == 1 ? "rgb(" + mathRound(this._r) + ", " + mathRound(this._g) + ", " + mathRound(this._b) + ")" : "rgba(" + mathRound(this._r) + ", " + mathRound(this._g) + ", " + mathRound(this._b) + ", " + this._roundA + ")"; }, toPercentageRgb: function toPercentageRgb() { return { r: mathRound(bound01(this._r, 255) * 100) + "%", g: mathRound(bound01(this._g, 255) * 100) + "%", b: mathRound(bound01(this._b, 255) * 100) + "%", a: this._a }; }, toPercentageRgbString: function toPercentageRgbString() { return this._a == 1 ? "rgb(" + mathRound(bound01(this._r, 255) * 100) + "%, " + mathRound(bound01(this._g, 255) * 100) + "%, " + mathRound(bound01(this._b, 255) * 100) + "%)" : "rgba(" + mathRound(bound01(this._r, 255) * 100) + "%, " + mathRound(bound01(this._g, 255) * 100) + "%, " + mathRound(bound01(this._b, 255) * 100) + "%, " + this._roundA + ")"; }, toName: function toName() { if (this._a === 0) { return "transparent"; } if (this._a < 1) { return false; } return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false; }, toFilter: function toFilter(secondColor) { var hex8String = '#' + rgbaToArgbHex(this._r, this._g, this._b, this._a); var secondHex8String = hex8String; var gradientType = this._gradientType ? "GradientType = 1, " : ""; if (secondColor) { var s = tinycolor(secondColor); secondHex8String = '#' + rgbaToArgbHex(s._r, s._g, s._b, s._a); } return "progid:DXImageTransform.Microsoft.gradient(" + gradientType + "startColorstr=" + hex8String + ",endColorstr=" + secondHex8String + ")"; }, toString: function toString(format) { var formatSet = !!format; format = format || this._format; var formattedString = false; var hasAlpha = this._a < 1 && this._a >= 0; var needsAlphaFormat = !formatSet && hasAlpha && (format === "hex" || format === "hex6" || format === "hex3" || format === "hex4" || format === "hex8" || format === "name"); if (needsAlphaFormat) { // Special case for "transparent", all other non-alpha formats // will return rgba when there is transparency. if (format === "name" && this._a === 0) { return this.toName(); } return this.toRgbString(); } if (format === "rgb") { formattedString = this.toRgbString(); } if (format === "prgb") { formattedString = this.toPercentageRgbString(); } if (format === "hex" || format === "hex6") { formattedString = this.toHexString(); } if (format === "hex3") { formattedString = this.toHexString(true); } if (format === "hex4") { formattedString = this.toHex8String(true); } if (format === "hex8") { formattedString = this.toHex8String(); } if (format === "name") { formattedString = this.toName(); } if (format === "hsl") { formattedString = this.toHslString(); } if (format === "hsv") { formattedString = this.toHsvString(); } return formattedString || this.toHexString(); }, clone: function clone() { return tinycolor(this.toString()); }, _applyModification: function _applyModification(fn, args) { var color = fn.apply(null, [this].concat([].slice.call(args))); this._r = color._r; this._g = color._g; this._b = color._b; this.setAlpha(color._a); return this; }, lighten: function lighten() { return this._applyModification(_lighten, arguments); }, brighten: function brighten() { return this._applyModification(_brighten, arguments); }, darken: function darken() { return this._applyModification(_darken, arguments); }, desaturate: function desaturate() { return this._applyModification(_desaturate, arguments); }, saturate: function saturate() { return this._applyModification(_saturate, arguments); }, greyscale: function greyscale() { return this._applyModification(_greyscale, arguments); }, spin: function spin() { return this._applyModification(_spin, arguments); }, _applyCombination: function _applyCombination(fn, args) { return fn.apply(null, [this].concat([].slice.call(args))); }, analogous: function analogous() { return this._applyCombination(_analogous, arguments); }, complement: function complement() { return this._applyCombination(_complement, arguments); }, monochromatic: function monochromatic() { return this._applyCombination(_monochromatic, arguments); }, splitcomplement: function splitcomplement() { return this._applyCombination(_splitcomplement, arguments); }, triad: function triad() { return this._applyCombination(_triad, arguments); }, tetrad: function tetrad() { return this._applyCombination(_tetrad, arguments); } }; // If input is an object, force 1 into "1.0" to handle ratios properly // String input requires "1.0" as input, so 1 will be treated as 1 tinycolor.fromRatio = function (color, opts) { if (_typeof(color) == "object") { var newColor = {}; for (var i in color) { if (color.hasOwnProperty(i)) { if (i === "a") { newColor[i] = color[i]; } else { newColor[i] = convertToPercentage(color[i]); } } } color = newColor; } return tinycolor(color, opts); }; // Given a string or object, convert that input to RGB // Possible string inputs: // // "red" // "#f00" or "f00" // "#ff0000" or "ff0000" // "#ff000000" or "ff000000" // "rgb 255 0 0" or "rgb (255, 0, 0)" // "rgb 1.0 0 0" or "rgb (1, 0, 0)" // "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1" // "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1" // "hsl(0, 100%, 50%)" or "hsl 0 100% 50%" // "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1" // "hsv(0, 100%, 100%)" or "hsv 0 100% 100%" // function inputToRGB(color) { var rgb = { r: 0, g: 0, b: 0 }; var a = 1; var s = null; var v = null; var l = null; var ok = false; var format = false; if (typeof color == "string") { color = stringInputToObject(color); } if (_typeof(color) == "object") { if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) { rgb = rgbToRgb(color.r, color.g, color.b); ok = true; format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb"; } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) { s = convertToPercentage(color.s); v = convertToPercentage(color.v); rgb = hsvToRgb(color.h, s, v); ok = true; format = "hsv"; } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) { s = convertToPercentage(color.s); l = convertToPercentage(color.l); rgb = hslToRgb(color.h, s, l); ok = true; format = "hsl"; } if (color.hasOwnProperty("a")) { a = color.a; } } a = boundAlpha(a); return { ok: ok, format: color.format || format, r: mathMin(255, mathMax(rgb.r, 0)), g: mathMin(255, mathMax(rgb.g, 0)), b: mathMin(255, mathMax(rgb.b, 0)), a: a }; } // Conversion Functions // -------------------- // `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from: // // `rgbToRgb` // Handle bounds / percentage checking to conform to CSS color spec // // *Assumes:* r, g, b in [0, 255] or [0, 1] // *Returns:* { r, g, b } in [0, 255] function rgbToRgb(r, g, b) { return { r: bound01(r, 255) * 255, g: bound01(g, 255) * 255, b: bound01(b, 255) * 255 }; } // `rgbToHsl` // Converts an RGB color value to HSL. // *Assumes:* r, g, and b are contained in [0, 255] or [0, 1] // *Returns:* { h, s, l } in [0,1] function rgbToHsl(r, g, b) { r = bound01(r, 255); g = bound01(g, 255); b = bound01(b, 255); var max = mathMax(r, g, b), min = mathMin(r, g, b); var h, s, l = (max + min) / 2; if (max == min) { h = s = 0; // achromatic } else { var d = max - min; s = l > 0.5 ? d / (2 - max - min) : d / (max + min); switch (max) { case r: h = (g - b) / d + (g < b ? 6 : 0); break; case g: h = (b - r) / d + 2; break; case b: h = (r - g) / d + 4; break; } h /= 6; } return { h: h, s: s, l: l }; } // `hslToRgb` // Converts an HSL color value to RGB. // *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100] // *Returns:* { r, g, b } in the set [0, 255] function hslToRgb(h, s, l) { var r, g, b; h = bound01(h, 360); s = bound01(s, 100); l = bound01(l, 100); function hue2rgb(p, q, t) { if (t < 0) t += 1; if (t > 1) t -= 1; if (t < 1 / 6) return p + (q - p) * 6 * t; if (t < 1 / 2) return q; if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6; return p; } if (s === 0) { r = g = b = l; // achromatic } else { var q = l < 0.5 ? l * (1 + s) : l + s - l * s; var p = 2 * l - q; r = hue2rgb(p, q, h + 1 / 3); g = hue2rgb(p, q, h); b = hue2rgb(p, q, h - 1 / 3); } return { r: r * 255, g: g * 255, b: b * 255 }; } // `rgbToHsv` // Converts an RGB color value to HSV // *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1] // *Returns:* { h, s, v } in [0,1] function rgbToHsv(r, g, b) { r = bound01(r, 255); g = bound01(g, 255); b = bound01(b, 255); var max = mathMax(r, g, b), min = mathMin(r, g, b); var h, s, v = max; var d = max - min; s = max === 0 ? 0 : d / max; if (max == min) { h = 0; // achromatic } else { switch (max) { case r: h = (g - b) / d + (g < b ? 6 : 0); break; case g: h = (b - r) / d + 2; break; case b: h = (r - g) / d + 4; break; } h /= 6; } return { h: h, s: s, v: v }; } // `hsvToRgb` // Converts an HSV color value to RGB. // *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100] // *Returns:* { r, g, b } in the set [0, 255] function hsvToRgb(h, s, v) { h = bound01(h, 360) * 6; s = bound01(s, 100); v = bound01(v, 100); var i = Math.floor(h), f = h - i, p = v * (1 - s), q = v * (1 - f * s), t = v * (1 - (1 - f) * s), mod = i % 6, r = [v, q, p, p, t, v][mod], g = [t, v, v, q, p, p][mod], b = [p, p, t, v, v, q][mod]; return { r: r * 255, g: g * 255, b: b * 255 }; } // `rgbToHex` // Converts an RGB color to hex // Assumes r, g, and b are contained in the set [0, 255] // Returns a 3 or 6 character hex function rgbToHex(r, g, b, allow3Char) { var hex = [pad2(mathRound(r).toString(16)), pad2(mathRound(g).toString(16)), pad2(mathRound(b).toString(16))]; // Return a 3 character hex if possible if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) { return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0); } return hex.join(""); } // `rgbaToHex` // Converts an RGBA color plus alpha transparency to hex // Assumes r, g, b are contained in the set [0, 255] and // a in [0, 1]. Returns a 4 or 8 character rgba hex function rgbaToHex(r, g, b, a, allow4Char) { var hex = [pad2(mathRound(r).toString(16)), pad2(mathRound(g).toString(16)), pad2(mathRound(b).toString(16)), pad2(convertDecimalToHex(a))]; // Return a 4 character hex if possible if (allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1)) { return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0); } return hex.join(""); } // `rgbaToArgbHex` // Converts an RGBA color to an ARGB Hex8 string // Rarely used, but required for "toFilter()" function rgbaToArgbHex(r, g, b, a) { var hex = [pad2(convertDecimalToHex(a)), pad2(mathRound(r).toString(16)), pad2(mathRound(g).toString(16)), pad2(mathRound(b).toString(16))]; return hex.join(""); } // `equals` // Can be called with any tinycolor input tinycolor.equals = function (color1, color2) { if (!color1 || !color2) { return false; } return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString(); }; tinycolor.random = function () { return tinycolor.fromRatio({ r: mathRandom(), g: mathRandom(), b: mathRandom() }); }; // Modification Functions // ---------------------- // Thanks to less.js for some of the basics here // function _desaturate(color, amount) { amount = amount === 0 ? 0 : amount || 10; var hsl = tinycolor(color).toHsl(); hsl.s -= amount / 100; hsl.s = clamp01(hsl.s); return tinycolor(hsl); } function _saturate(color, amount) { amount = amount === 0 ? 0 : amount || 10; var hsl = tinycolor(color).toHsl(); hsl.s += amount / 100; hsl.s = clamp01(hsl.s); return tinycolor(hsl); } function _greyscale(color) { return tinycolor(color).desaturate(100); } function _lighten(color, amount) { amount = amount === 0 ? 0 : amount || 10; var hsl = tinycolor(color).toHsl(); hsl.l += amount / 100; hsl.l = clamp01(hsl.l); return tinycolor(hsl); } function _brighten(color, amount) { amount = amount === 0 ? 0 : amount || 10; var rgb = tinycolor(color).toRgb(); rgb.r = mathMax(0, mathMin(255, rgb.r - mathRound(255 * -(amount / 100)))); rgb.g = mathMax(0, mathMin(255, rgb.g - mathRound(255 * -(amount / 100)))); rgb.b = mathMax(0, mathMin(255, rgb.b - mathRound(255 * -(amount / 100)))); return tinycolor(rgb); } function _darken(color, amount) { amount = amount === 0 ? 0 : amount || 10; var hsl = tinycolor(color).toHsl(); hsl.l -= amount / 100; hsl.l = clamp01(hsl.l); return tinycolor(hsl); } // Spin takes a positive or negative amount within [-360, 360] indicating the change of hue. // Values outside of this range will be wrapped into this range. function _spin(color, amount) { var hsl = tinycolor(color).toHsl(); var hue = (hsl.h + amount) % 360; hsl.h = hue < 0 ? 360 + hue : hue; return tinycolor(hsl); } // Combination Functions // --------------------- // Thanks to jQuery xColor for some of the ideas behind these // function _complement(color) { var hsl = tinycolor(color).toHsl(); hsl.h = (hsl.h + 180) % 360; return tinycolor(hsl); } function _triad(color) { var hsl = tinycolor(color).toHsl(); var h = hsl.h; return [tinycolor(color), tinycolor({ h: (h + 120) % 360, s: hsl.s, l: hsl.l }), tinycolor({ h: (h + 240) % 360, s: hsl.s, l: hsl.l })]; } function _tetrad(color) { var hsl = tinycolor(color).toHsl(); var h = hsl.h; return [tinycolor(color), tinycolor({ h: (h + 90) % 360, s: hsl.s, l: hsl.l }), tinycolor({ h: (h + 180) % 360, s: hsl.s, l: hsl.l }), tinycolor({ h: (h + 270) % 360, s: hsl.s, l: hsl.l })]; } function _splitcomplement(color) { var hsl = tinycolor(color).toHsl(); var h = hsl.h; return [tinycolor(color), tinycolor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l }), tinycolor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l })]; } function _analogous(color, results, slices) { results = results || 6; slices = slices || 30; var hsl = tinycolor(color).toHsl(); var part = 360 / slices; var ret = [tinycolor(color)]; for (hsl.h = (hsl.h - (part * results >> 1) + 720) % 360; --results;) { hsl.h = (hsl.h + part) % 360; ret.push(tinycolor(hsl)); } return ret; } function _monochromatic(color, results) { results = results || 6; var hsv = tinycolor(color).toHsv(); var h = hsv.h, s = hsv.s, v = hsv.v; var ret = []; var modification = 1 / results; while (results--) { ret.push(tinycolor({ h: h, s: s, v: v })); v = (v + modification) % 1; } return ret; } // Utility Functions // --------------------- tinycolor.mix = function (color1, color2, amount) { amount = amount === 0 ? 0 : amount || 50; var rgb1 = tinycolor(color1).toRgb(); var rgb2 = tinycolor(color2).toRgb(); var p = amount / 100; var rgba = { r: (rgb2.r - rgb1.r) * p + rgb1.r, g: (rgb2.g - rgb1.g) * p + rgb1.g, b: (rgb2.b - rgb1.b) * p + rgb1.b, a: (rgb2.a - rgb1.a) * p + rgb1.a }; return tinycolor(rgba); }; // Readability Functions // --------------------- // false // tinycolor.isReadable("#000", "#111",{level:"AA",size:"large"}) => false tinycolor.isReadable = function (color1, color2, wcag2) { var readability = tinycolor.readability(color1, color2); var wcag2Parms, out; out = false; wcag2Parms = validateWCAG2Parms(wcag2); switch (wcag2Parms.level + wcag2Parms.size) { case "AAsmall": case "AAAlarge": out = readability >= 4.5; break; case "AAlarge": out = readability >= 3; break; case "AAAsmall": out = readability >= 7; break; } return out; }; // `mostReadable` // Given a base color and a list of possible foreground or background // colors for that base, returns the most readable color. // Optionally returns Black or White if the most readable color is unreadable. // *Example* // tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:false}).toHexString(); // "#112255" // tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:true}).toHexString(); // "#ffffff" // tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"large"}).toHexString(); // "#faf3f3" // tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"small"}).toHexString(); // "#ffffff" tinycolor.mostReadable = function (baseColor, colorList, args) { var bestColor = null; var bestScore = 0; var readability; var includeFallbackColors, level, size; args = args || {}; includeFallbackColors = args.includeFallbackColors; level = args.level; size = args.size; for (var i = 0; i < colorList.length; i++) { readability = tinycolor.readability(baseColor, colorList[i]); if (readability > bestScore) { bestScore = readability; bestColor = tinycolor(colorList[i]); } } if (tinycolor.isReadable(baseColor, bestColor, { "level": level, "size": size }) || !includeFallbackColors) { return bestColor; } else { args.includeFallbackColors = false; return tinycolor.mostReadable(baseColor, ["#fff", "#000"], args); } }; // Big List of Colors // ------------------ // var names = tinycolor.names = { aliceblue: "f0f8ff", antiquewhite: "faebd7", aqua: "0ff", aquamarine: "7fffd4", azure: "f0ffff", beige: "f5f5dc", bisque: "ffe4c4", black: "000", blanchedalmond: "ffebcd", blue: "00f", blueviolet: "8a2be2", brown: "a52a2a", burlywood: "deb887", burntsienna: "ea7e5d", cadetblue: "5f9ea0", chartreuse: "7fff00", chocolate: "d2691e", coral: "ff7f50", cornflowerblue: "6495ed", cornsilk: "fff8dc", crimson: "dc143c", cyan: "0ff", darkblue: "00008b", darkcyan: "008b8b", darkgoldenrod: "b8860b", darkgray: "a9a9a9", darkgreen: "006400", darkgrey: "a9a9a9", darkkhaki: "bdb76b", darkmagenta: "8b008b", darkolivegreen: "556b2f", darkorange: "ff8c00", darkorchid: "9932cc", darkred: "8b0000", darksalmon: "e9967a", darkseagreen: "8fbc8f", darkslateblue: "483d8b", darkslategray: "2f4f4f", darkslategrey: "2f4f4f", darkturquoise: "00ced1", darkviolet: "9400d3", deeppink: "ff1493", deepskyblue: "00bfff", dimgray: "696969", dimgrey: "696969", dodgerblue: "1e90ff", firebrick: "b22222", floralwhite: "fffaf0", forestgreen: "228b22", fuchsia: "f0f", gainsboro: "dcdcdc", ghostwhite: "f8f8ff", gold: "ffd700", goldenrod: "daa520", gray: "808080", green: "008000", greenyellow: "adff2f", grey: "808080", honeydew: "f0fff0", hotpink: "ff69b4", indianred: "cd5c5c", indigo: "4b0082", ivory: "fffff0", khaki: "f0e68c", lavender: "e6e6fa", lavenderblush: "fff0f5", lawngreen: "7cfc00", lemonchiffon: "fffacd", lightblue: "add8e6", lightcoral: "f08080", lightcyan: "e0ffff", lightgoldenrodyellow: "fafad2", lightgray: "d3d3d3", lightgreen: "90ee90", lightgrey: "d3d3d3", lightpink: "ffb6c1", lightsalmon: "ffa07a", lightseagreen: "20b2aa", lightskyblue: "87cefa", lightslategray: "789", lightslategrey: "789", lightsteelblue: "b0c4de", lightyellow: "ffffe0", lime: "0f0", limegreen: "32cd32", linen: "faf0e6", magenta: "f0f", maroon: "800000", mediumaquamarine: "66cdaa", mediumblue: "0000cd", mediumorchid: "ba55d3", mediumpurple: "9370db", mediumseagreen: "3cb371", mediumslateblue: "7b68ee", mediumspringgreen: "00fa9a", mediumturquoise: "48d1cc", mediumvioletred: "c71585", midnightblue: "191970", mintcream: "f5fffa", mistyrose: "ffe4e1", moccasin: "ffe4b5", navajowhite: "ffdead", navy: "000080", oldlace: "fdf5e6", olive: "808000", olivedrab: "6b8e23", orange: "ffa500", orangered: "ff4500", orchid: "da70d6", palegoldenrod: "eee8aa", palegreen: "98fb98", paleturquoise: "afeeee", palevioletred: "db7093", papayawhip: "ffefd5", peachpuff: "ffdab9", peru: "cd853f", pink: "ffc0cb", plum: "dda0dd", powderblue: "b0e0e6", purple: "800080", rebeccapurple: "663399", red: "f00", rosybrown: "bc8f8f", royalblue: "4169e1", saddlebrown: "8b4513", salmon: "fa8072", sandybrown: "f4a460", seagreen: "2e8b57", seashell: "fff5ee", sienna: "a0522d", silver: "c0c0c0", skyblue: "87ceeb", slateblue: "6a5acd", slategray: "708090", slategrey: "708090", snow: "fffafa", springgreen: "00ff7f", steelblue: "4682b4", tan: "d2b48c", teal: "008080", thistle: "d8bfd8", tomato: "ff6347", turquoise: "40e0d0", violet: "ee82ee", wheat: "f5deb3", white: "fff", whitesmoke: "f5f5f5", yellow: "ff0", yellowgreen: "9acd32" }; // Make it easy to access colors via `hexNames[hex]` var hexNames = tinycolor.hexNames = flip(names); // Utilities // --------- // `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }` function flip(o) { var flipped = {}; for (var i in o) { if (o.hasOwnProperty(i)) { flipped[o[i]] = i; } } return flipped; } // Return a valid alpha value [0,1] with all invalid values being set to 1 function boundAlpha(a) { a = parseFloat(a); if (isNaN(a) || a < 0 || a > 1) { a = 1; } return a; } // Take input from [0, n] and return it as [0, 1] function bound01(n, max) { if (isOnePointZero(n)) { n = "100%"; } var processPercent = isPercentage(n); n = mathMin(max, mathMax(0, parseFloat(n))); // Automatically convert percentage into number if (processPercent) { n = parseInt(n * max, 10) / 100; } // Handle floating point rounding errors if (Math.abs(n - max) < 0.000001) { return 1; } // Convert into [0, 1] range if it isn't already return n % max / parseFloat(max); } // Force a number between 0 and 1 function clamp01(val) { return mathMin(1, mathMax(0, val)); } // Parse a base-16 hex value into a base-10 integer function parseIntFromHex(val) { return parseInt(val, 16); } // Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1 // function isOnePointZero(n) { return typeof n == "string" && n.indexOf('.') != -1 && parseFloat(n) === 1; } // Check to see if string passed in is a percentage function isPercentage(n) { return typeof n === "string" && n.indexOf('%') != -1; } // Force a hex value to have 2 characters function pad2(c) { return c.length == 1 ? '0' + c : '' + c; } // Replace a decimal with it's percentage value function convertToPercentage(n) { if (n <= 1) { n = n * 100 + "%"; } return n; } // Converts a decimal to a hex value function convertDecimalToHex(d) { return Math.round(parseFloat(d) * 255).toString(16); } // Converts a hex value to a decimal function convertHexToDecimal(h) { return parseIntFromHex(h) / 255; } var matchers = function () { // var CSS_INTEGER = "[-\\+]?\\d+%?"; // var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?"; // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome. var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")"; // Actual matching. // Parentheses and commas are optional, but not required. // Whitespace can take the place of commas or opening paren var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?"; var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?"; return { CSS_UNIT: new RegExp(CSS_UNIT), rgb: new RegExp("rgb" + PERMISSIVE_MATCH3), rgba: new RegExp("rgba" + PERMISSIVE_MATCH4), hsl: new RegExp("hsl" + PERMISSIVE_MATCH3), hsla: new RegExp("hsla" + PERMISSIVE_MATCH4), hsv: new RegExp("hsv" + PERMISSIVE_MATCH3), hsva: new RegExp("hsva" + PERMISSIVE_MATCH4), hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/, hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/ }; }(); // `isValidCSSUnit` // Take in a single string / number and check to see if it looks like a CSS unit // (see `matchers` above for definition). function isValidCSSUnit(color) { return !!matchers.CSS_UNIT.exec(color); } // `stringInputToObject` // Permissive string parsing. Take in a number of formats, and output an object // based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}` function stringInputToObject(color) { color = color.replace(trimLeft, '').replace(trimRight, '').toLowerCase(); var named = false; if (names[color]) { color = names[color]; named = true; } else if (color == 'transparent') { return { r: 0, g: 0, b: 0, a: 0, format: "name" }; } // Try to match string input using regular expressions. // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360] // Just return an object and let the conversion functions handle that. // This way the result will be the same whether the tinycolor is initialized with string or object. var match; if (match = matchers.rgb.exec(color)) { return { r: match[1], g: match[2], b: match[3] }; } if (match = matchers.rgba.exec(color)) { return { r: match[1], g: match[2], b: match[3], a: match[4] }; } if (match = matchers.hsl.exec(color)) { return { h: match[1], s: match[2], l: match[3] }; } if (match = matchers.hsla.exec(color)) { return { h: match[1], s: match[2], l: match[3], a: match[4] }; } if (match = matchers.hsv.exec(color)) { return { h: match[1], s: match[2], v: match[3] }; } if (match = matchers.hsva.exec(color)) { return { h: match[1], s: match[2], v: match[3], a: match[4] }; } if (match = matchers.hex8.exec(color)) { return { r: parseIntFromHex(match[1]), g: parseIntFromHex(match[2]), b: parseIntFromHex(match[3]), a: convertHexToDecimal(match[4]), format: named ? "name" : "hex8" }; } if (match = matchers.hex6.exec(color)) { return { r: parseIntFromHex(match[1]), g: parseIntFromHex(match[2]), b: parseIntFromHex(match[3]), format: named ? "name" : "hex" }; } if (match = matchers.hex4.exec(color)) { return { r: parseIntFromHex(match[1] + '' + match[1]), g: parseIntFromHex(match[2] + '' + match[2]), b: parseIntFromHex(match[3] + '' + match[3]), a: convertHexToDecimal(match[4] + '' + match[4]), format: named ? "name" : "hex8" }; } if (match = matchers.hex3.exec(color)) { return { r: parseIntFromHex(match[1] + '' + match[1]), g: parseIntFromHex(match[2] + '' + match[2]), b: parseIntFromHex(match[3] + '' + match[3]), format: named ? "name" : "hex" }; } return false; } function validateWCAG2Parms(parms) { // return valid WCAG2 parms for isReadable. // If input parms are invalid, return {"level":"AA", "size":"small"} var level, size; parms = parms || { "level": "AA", "size": "small" }; level = (parms.level || "AA").toUpperCase(); size = (parms.size || "small").toLowerCase(); if (level !== "AA" && level !== "AAA") { level = "AA"; } if (size !== "small" && size !== "large") { size = "small"; } return { "level": level, "size": size }; } // Node: Export function if ( true && module.exports) { module.exports = tinycolor; } // AMD/requirejs: Define the module else if (true) { !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () { return tinycolor; }).call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } // Browser: Expose to window else {} })(Math); /***/ }), /* 85 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(1); Object.defineProperty(exports, "__esModule", { value: true }); exports.setTwoToneColor = setTwoToneColor; exports.getTwoToneColor = getTwoToneColor; var _slicedToArray2 = _interopRequireDefault(__webpack_require__(21)); var _IconBase = _interopRequireDefault(__webpack_require__(50)); var _utils = __webpack_require__(29); function setTwoToneColor(twoToneColor) { var _normalizeTwoToneColo = (0, _utils.normalizeTwoToneColors)(twoToneColor), _normalizeTwoToneColo2 = (0, _slicedToArray2.default)(_normalizeTwoToneColo, 2), primaryColor = _normalizeTwoToneColo2[0], secondaryColor = _normalizeTwoToneColo2[1]; return _IconBase.default.setTwoToneColors({ primaryColor: primaryColor, secondaryColor: secondaryColor }); } function getTwoToneColor() { var colors = _IconBase.default.getTwoToneColors(); if (!colors.calculated) { return colors.primaryColor; } return [colors.primaryColor, colors.secondaryColor]; } /***/ }), /* 86 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _ExclamationCircleFilled = _interopRequireDefault(__webpack_require__(87)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _default = _ExclamationCircleFilled; exports.default = _default; module.exports = _default; /***/ }), /* 87 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(1); var _interopRequireWildcard = __webpack_require__(3); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var React = _interopRequireWildcard(__webpack_require__(0)); var _ExclamationCircleFilled = _interopRequireDefault(__webpack_require__(88)); var _AntdIcon = _interopRequireDefault(__webpack_require__(10)); // GENERATE BY ./scripts/generate.ts // DON NOT EDIT IT MANUALLY var ExclamationCircleFilled = function ExclamationCircleFilled(props, ref) { return React.createElement(_AntdIcon.default, Object.assign({}, props, { ref: ref, icon: _ExclamationCircleFilled.default })); }; ExclamationCircleFilled.displayName = 'ExclamationCircleFilled'; var _default = React.forwardRef(ExclamationCircleFilled); exports.default = _default; /***/ }), /* 88 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; // This icon file is generated automatically. Object.defineProperty(exports, "__esModule", { value: true }); var ExclamationCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, "name": "exclamation-circle", "theme": "filled" }; exports.default = ExclamationCircleFilled; /***/ }), /* 89 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _CloseCircleFilled = _interopRequireDefault(__webpack_require__(90)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _default = _CloseCircleFilled; exports.default = _default; module.exports = _default; /***/ }), /* 90 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(1); var _interopRequireWildcard = __webpack_require__(3); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var React = _interopRequireWildcard(__webpack_require__(0)); var _CloseCircleFilled = _interopRequireDefault(__webpack_require__(91)); var _AntdIcon = _interopRequireDefault(__webpack_require__(10)); // GENERATE BY ./scripts/generate.ts // DON NOT EDIT IT MANUALLY var CloseCircleFilled = function CloseCircleFilled(props, ref) { return React.createElement(_AntdIcon.default, Object.assign({}, props, { ref: ref, icon: _CloseCircleFilled.default })); }; CloseCircleFilled.displayName = 'CloseCircleFilled'; var _default = React.forwardRef(CloseCircleFilled); exports.default = _default; /***/ }), /* 91 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; // This icon file is generated automatically. Object.defineProperty(exports, "__esModule", { value: true }); var CloseCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z" } }] }, "name": "close-circle", "theme": "filled" }; exports.default = CloseCircleFilled; /***/ }), /* 92 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _CheckCircleFilled = _interopRequireDefault(__webpack_require__(93)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _default = _CheckCircleFilled; exports.default = _default; module.exports = _default; /***/ }), /* 93 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(1); var _interopRequireWildcard = __webpack_require__(3); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var React = _interopRequireWildcard(__webpack_require__(0)); var _CheckCircleFilled = _interopRequireDefault(__webpack_require__(94)); var _AntdIcon = _interopRequireDefault(__webpack_require__(10)); // GENERATE BY ./scripts/generate.ts // DON NOT EDIT IT MANUALLY var CheckCircleFilled = function CheckCircleFilled(props, ref) { return React.createElement(_AntdIcon.default, Object.assign({}, props, { ref: ref, icon: _CheckCircleFilled.default })); }; CheckCircleFilled.displayName = 'CheckCircleFilled'; var _default = React.forwardRef(CheckCircleFilled); exports.default = _default; /***/ }), /* 94 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; // This icon file is generated automatically. Object.defineProperty(exports, "__esModule", { value: true }); var CheckCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z" } }] }, "name": "check-circle", "theme": "filled" }; exports.default = CheckCircleFilled; /***/ }), /* 95 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _InfoCircleFilled = _interopRequireDefault(__webpack_require__(96)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _default = _InfoCircleFilled; exports.default = _default; module.exports = _default; /***/ }), /* 96 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(1); var _interopRequireWildcard = __webpack_require__(3); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var React = _interopRequireWildcard(__webpack_require__(0)); var _InfoCircleFilled = _interopRequireDefault(__webpack_require__(97)); var _AntdIcon = _interopRequireDefault(__webpack_require__(10)); // GENERATE BY ./scripts/generate.ts // DON NOT EDIT IT MANUALLY var InfoCircleFilled = function InfoCircleFilled(props, ref) { return React.createElement(_AntdIcon.default, Object.assign({}, props, { ref: ref, icon: _InfoCircleFilled.default })); }; InfoCircleFilled.displayName = 'InfoCircleFilled'; var _default = React.forwardRef(InfoCircleFilled); exports.default = _default; /***/ }), /* 97 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; // This icon file is generated automatically. Object.defineProperty(exports, "__esModule", { value: true }); var InfoCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, "name": "info-circle", "theme": "filled" }; exports.default = InfoCircleFilled; /***/ }), /* 98 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireWildcard = __webpack_require__(3); var _interopRequireDefault = __webpack_require__(1); Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = createUseMessage; var _extends2 = _interopRequireDefault(__webpack_require__(8)); var _slicedToArray2 = _interopRequireDefault(__webpack_require__(21)); var React = _interopRequireWildcard(__webpack_require__(0)); var _useNotification = _interopRequireDefault(__webpack_require__(52)); var _configProvider = __webpack_require__(15); var _ = __webpack_require__(46); function createUseMessage(getRcNotificationInstance, getRCNoticeProps) { var useMessage = function useMessage() { // We can only get content by render var getPrefixCls; // We create a proxy to handle delay created instance var innerInstance = null; var proxy = { add: function add(noticeProps, holderCallback) { innerInstance === null || innerInstance === void 0 ? void 0 : innerInstance.component.add(noticeProps, holderCallback); } }; var _useRCNotification = (0, _useNotification["default"])(proxy), _useRCNotification2 = (0, _slicedToArray2["default"])(_useRCNotification, 2), hookNotify = _useRCNotification2[0], holder = _useRCNotification2[1]; function notify(args) { var customizePrefixCls = args.prefixCls; var mergedPrefixCls = getPrefixCls('message', customizePrefixCls); var target = args.key || (0, _.getKeyThenIncreaseKey)(); var closePromise = new Promise(function (resolve) { var callback = function callback() { if (typeof args.onClose === 'function') { args.onClose(); } return resolve(true); }; getRcNotificationInstance((0, _extends2["default"])((0, _extends2["default"])({}, args), { prefixCls: mergedPrefixCls }), function (_ref) { var prefixCls = _ref.prefixCls, instance = _ref.instance; innerInstance = instance; hookNotify(getRCNoticeProps((0, _extends2["default"])((0, _extends2["default"])({}, args), { key: target, onClose: callback }), prefixCls)); }); }); var result = function result() { if (innerInstance) { innerInstance.removeNotice(target); } }; result.then = function (filled, rejected) { return closePromise.then(filled, rejected); }; result.promise = closePromise; return result; } // Fill functions var hookApiRef = React.useRef({}); hookApiRef.current.open = notify; ['success', 'info', 'warning', 'error', 'loading'].forEach(function (type) { return (0, _.attachTypeApi)(hookApiRef.current, type); }); return [hookApiRef.current, /*#__PURE__*/React.createElement(_configProvider.ConfigConsumer, { key: "holder" }, function (context) { getPrefixCls = context.getPrefixCls; return holder; })]; }; return useMessage; } /***/ }), /* 99 */ /***/ (function(module, exports, __webpack_require__) { var arrayWithoutHoles = __webpack_require__(100); var iterableToArray = __webpack_require__(101); var unsupportedIterableToArray = __webpack_require__(47); var nonIterableSpread = __webpack_require__(102); function _toConsumableArray(arr) { return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread(); } module.exports = _toConsumableArray; /***/ }), /* 100 */ /***/ (function(module, exports, __webpack_require__) { var arrayLikeToArray = __webpack_require__(48); function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return arrayLikeToArray(arr); } module.exports = _arrayWithoutHoles; /***/ }), /* 101 */ /***/ (function(module, exports) { function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); } module.exports = _iterableToArray; /***/ }), /* 102 */ /***/ (function(module, exports) { function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } module.exports = _nonIterableSpread; /***/ }), /* 103 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireWildcard = __webpack_require__(3); var _interopRequireDefault = __webpack_require__(1); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _defineProperty2 = _interopRequireDefault(__webpack_require__(18)); var _classCallCheck2 = _interopRequireDefault(__webpack_require__(26)); var _createClass2 = _interopRequireDefault(__webpack_require__(27)); var _inherits2 = _interopRequireDefault(__webpack_require__(28)); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(38)); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(37)); var _react = _interopRequireWildcard(__webpack_require__(0)); var _reactDom = _interopRequireDefault(__webpack_require__(17)); var _classnames = _interopRequireDefault(__webpack_require__(6)); function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function () { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } var Notice = /*#__PURE__*/function (_Component) { (0, _inherits2.default)(Notice, _Component); var _super = _createSuper(Notice); function Notice() { var _this; (0, _classCallCheck2.default)(this, Notice); _this = _super.apply(this, arguments); _this.closeTimer = null; _this.close = function (e) { if (e) { e.stopPropagation(); } _this.clearCloseTimer(); var onClose = _this.props.onClose; if (onClose) { onClose(); } }; _this.startCloseTimer = function () { if (_this.props.duration) { _this.closeTimer = window.setTimeout(function () { _this.close(); }, _this.props.duration * 1000); } }; _this.clearCloseTimer = function () { if (_this.closeTimer) { clearTimeout(_this.closeTimer); _this.closeTimer = null; } }; return _this; } (0, _createClass2.default)(Notice, [{ key: "componentDidMount", value: function componentDidMount() { this.startCloseTimer(); } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps) { if (this.props.duration !== prevProps.duration || this.props.update) { this.restartCloseTimer(); } } }, { key: "componentWillUnmount", value: function componentWillUnmount() { this.clearCloseTimer(); } }, { key: "restartCloseTimer", value: function restartCloseTimer() { this.clearCloseTimer(); this.startCloseTimer(); } }, { key: "render", value: function render() { var _this2 = this; var _this$props = this.props, prefixCls = _this$props.prefixCls, className = _this$props.className, closable = _this$props.closable, closeIcon = _this$props.closeIcon, style = _this$props.style, onClick = _this$props.onClick, children = _this$props.children, holder = _this$props.holder; var componentClass = "".concat(prefixCls, "-notice"); var dataOrAriaAttributeProps = Object.keys(this.props).reduce(function (acc, key) { if (key.substr(0, 5) === 'data-' || key.substr(0, 5) === 'aria-' || key === 'role') { acc[key] = _this2.props[key]; } return acc; }, {}); var node = _react.default.createElement("div", Object.assign({ className: (0, _classnames.default)(componentClass, className, (0, _defineProperty2.default)({}, "".concat(componentClass, "-closable"), closable)), style: style, onMouseEnter: this.clearCloseTimer, onMouseLeave: this.startCloseTimer, onClick: onClick }, dataOrAriaAttributeProps), _react.default.createElement("div", { className: "".concat(componentClass, "-content") }, children), closable ? _react.default.createElement("a", { tabIndex: 0, onClick: this.close, className: "".concat(componentClass, "-close") }, closeIcon || _react.default.createElement("span", { className: "".concat(componentClass, "-close-x") })) : null); if (holder) { return _reactDom.default.createPortal(node, holder); } return node; } }]); return Notice; }(_react.Component); exports.default = Notice; Notice.defaultProps = { onClose: function onClose() {}, duration: 1.5, style: { right: '50%' } }; /***/ }), /* 104 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireWildcard = __webpack_require__(3); var _interopRequireDefault = __webpack_require__(1); Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _extends2 = _interopRequireDefault(__webpack_require__(8)); var _defineProperty2 = _interopRequireDefault(__webpack_require__(18)); var React = _interopRequireWildcard(__webpack_require__(0)); var _rcNotification = _interopRequireDefault(__webpack_require__(53)); var _CloseOutlined = _interopRequireDefault(__webpack_require__(105)); var _classnames = _interopRequireDefault(__webpack_require__(6)); var _CheckCircleOutlined = _interopRequireDefault(__webpack_require__(108)); var _CloseCircleOutlined = _interopRequireDefault(__webpack_require__(111)); var _ExclamationCircleOutlined = _interopRequireDefault(__webpack_require__(114)); var _InfoCircleOutlined = _interopRequireDefault(__webpack_require__(117)); var _useNotification = _interopRequireDefault(__webpack_require__(120)); var notificationInstance = {}; var defaultDuration = 4.5; var defaultTop = 24; var defaultBottom = 24; var defaultPrefixCls = 'ant-notification'; var defaultPlacement = 'topRight'; var defaultGetContainer; var defaultCloseIcon; var rtl = false; function setNotificationConfig(options) { var duration = options.duration, placement = options.placement, bottom = options.bottom, top = options.top, getContainer = options.getContainer, closeIcon = options.closeIcon, prefixCls = options.prefixCls; if (prefixCls !== undefined) { defaultPrefixCls = prefixCls; } if (duration !== undefined) { defaultDuration = duration; } if (placement !== undefined) { defaultPlacement = placement; } else if (options.rtl) { defaultPlacement = 'topLeft'; } if (bottom !== undefined) { defaultBottom = bottom; } if (top !== undefined) { defaultTop = top; } if (getContainer !== undefined) { defaultGetContainer = getContainer; } if (closeIcon !== undefined) { defaultCloseIcon = closeIcon; } if (options.rtl !== undefined) { rtl = options.rtl; } } function getPlacementStyle(placement) { var top = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultTop; var bottom = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultBottom; var style; switch (placement) { case 'topLeft': style = { left: 0, top: top, bottom: 'auto' }; break; case 'topRight': style = { right: 0, top: top, bottom: 'auto' }; break; case 'bottomLeft': style = { left: 0, top: 'auto', bottom: bottom }; break; default: style = { right: 0, top: 'auto', bottom: bottom }; break; } return style; } function getNotificationInstance(args, callback) { var _args$placement = args.placement, placement = _args$placement === void 0 ? defaultPlacement : _args$placement, top = args.top, bottom = args.bottom, _args$getContainer = args.getContainer, getContainer = _args$getContainer === void 0 ? defaultGetContainer : _args$getContainer, _args$closeIcon = args.closeIcon, closeIcon = _args$closeIcon === void 0 ? defaultCloseIcon : _args$closeIcon; var outerPrefixCls = args.prefixCls || defaultPrefixCls; var prefixCls = "".concat(outerPrefixCls, "-notice"); var cacheKey = "".concat(outerPrefixCls, "-").concat(placement); var cacheInstance = notificationInstance[cacheKey]; if (cacheInstance) { Promise.resolve(cacheInstance).then(function (instance) { callback({ prefixCls: prefixCls, instance: instance }); }); return; } var closeIconToRender = /*#__PURE__*/React.createElement("span", { className: "".concat(outerPrefixCls, "-close-x") }, closeIcon || /*#__PURE__*/React.createElement(_CloseOutlined["default"], { className: "".concat(outerPrefixCls, "-close-icon") })); var notificationClass = (0, _classnames["default"])("".concat(outerPrefixCls, "-").concat(placement), (0, _defineProperty2["default"])({}, "".concat(outerPrefixCls, "-rtl"), rtl === true)); notificationInstance[cacheKey] = new Promise(function (resolve) { _rcNotification["default"].newInstance({ prefixCls: outerPrefixCls, className: notificationClass, style: getPlacementStyle(placement, top, bottom), getContainer: getContainer, closeIcon: closeIconToRender }, function (notification) { resolve(notification); callback({ prefixCls: prefixCls, instance: notification }); }); }); } var typeToIcon = { success: _CheckCircleOutlined["default"], info: _InfoCircleOutlined["default"], error: _CloseCircleOutlined["default"], warning: _ExclamationCircleOutlined["default"] }; function getRCNoticeProps(args, prefixCls) { var duration = args.duration === undefined ? defaultDuration : args.duration; var iconNode = null; if (args.icon) { iconNode = /*#__PURE__*/React.createElement("span", { className: "".concat(prefixCls, "-icon") }, args.icon); } else if (args.type) { iconNode = /*#__PURE__*/React.createElement(typeToIcon[args.type] || null, { className: "".concat(prefixCls, "-icon ").concat(prefixCls, "-icon-").concat(args.type) }); } var autoMarginTag = !args.description && iconNode ? /*#__PURE__*/React.createElement("span", { className: "".concat(prefixCls, "-message-single-line-auto-margin") }) : null; return { content: /*#__PURE__*/React.createElement("div", { className: iconNode ? "".concat(prefixCls, "-with-icon") : '', role: "alert" }, iconNode, /*#__PURE__*/React.createElement("div", { className: "".concat(prefixCls, "-message") }, autoMarginTag, args.message), /*#__PURE__*/React.createElement("div", { className: "".concat(prefixCls, "-description") }, args.description), args.btn ? /*#__PURE__*/React.createElement("span", { className: "".concat(prefixCls, "-btn") }, args.btn) : null), duration: duration, closable: true, onClose: args.onClose, onClick: args.onClick, key: args.key, style: args.style || {}, className: args.className }; } function notice(args) { getNotificationInstance(args, function (_ref) { var prefixCls = _ref.prefixCls, instance = _ref.instance; instance.notice(getRCNoticeProps(args, prefixCls)); }); } var api = { open: notice, close: function close(key) { Object.keys(notificationInstance).forEach(function (cacheKey) { return Promise.resolve(notificationInstance[cacheKey]).then(function (instance) { instance.removeNotice(key); }); }); }, config: setNotificationConfig, destroy: function destroy() { Object.keys(notificationInstance).forEach(function (cacheKey) { Promise.resolve(notificationInstance[cacheKey]).then(function (instance) { instance.destroy(); }); delete notificationInstance[cacheKey]; // lgtm[js/missing-await] }); } }; ['success', 'info', 'warning', 'error'].forEach(function (type) { api[type] = function (args) { return api.open((0, _extends2["default"])((0, _extends2["default"])({}, args), { type: type })); }; }); api.warn = api.warning; api.useNotification = (0, _useNotification["default"])(getNotificationInstance, getRCNoticeProps); var _default = api; exports["default"] = _default; /***/ }), /* 105 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _CloseOutlined = _interopRequireDefault(__webpack_require__(106)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _default = _CloseOutlined; exports.default = _default; module.exports = _default; /***/ }), /* 106 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(1); var _interopRequireWildcard = __webpack_require__(3); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var React = _interopRequireWildcard(__webpack_require__(0)); var _CloseOutlined = _interopRequireDefault(__webpack_require__(107)); var _AntdIcon = _interopRequireDefault(__webpack_require__(10)); // GENERATE BY ./scripts/generate.ts // DON NOT EDIT IT MANUALLY var CloseOutlined = function CloseOutlined(props, ref) { return React.createElement(_AntdIcon.default, Object.assign({}, props, { ref: ref, icon: _CloseOutlined.default })); }; CloseOutlined.displayName = 'CloseOutlined'; var _default = React.forwardRef(CloseOutlined); exports.default = _default; /***/ }), /* 107 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; // This icon file is generated automatically. Object.defineProperty(exports, "__esModule", { value: true }); var CloseOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z" } }] }, "name": "close", "theme": "outlined" }; exports.default = CloseOutlined; /***/ }), /* 108 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _CheckCircleOutlined = _interopRequireDefault(__webpack_require__(109)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _default = _CheckCircleOutlined; exports.default = _default; module.exports = _default; /***/ }), /* 109 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(1); var _interopRequireWildcard = __webpack_require__(3); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var React = _interopRequireWildcard(__webpack_require__(0)); var _CheckCircleOutlined = _interopRequireDefault(__webpack_require__(110)); var _AntdIcon = _interopRequireDefault(__webpack_require__(10)); // GENERATE BY ./scripts/generate.ts // DON NOT EDIT IT MANUALLY var CheckCircleOutlined = function CheckCircleOutlined(props, ref) { return React.createElement(_AntdIcon.default, Object.assign({}, props, { ref: ref, icon: _CheckCircleOutlined.default })); }; CheckCircleOutlined.displayName = 'CheckCircleOutlined'; var _default = React.forwardRef(CheckCircleOutlined); exports.default = _default; /***/ }), /* 110 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; // This icon file is generated automatically. Object.defineProperty(exports, "__esModule", { value: true }); var CheckCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z" } }, { "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }] }, "name": "check-circle", "theme": "outlined" }; exports.default = CheckCircleOutlined; /***/ }), /* 111 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _CloseCircleOutlined = _interopRequireDefault(__webpack_require__(112)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _default = _CloseCircleOutlined; exports.default = _default; module.exports = _default; /***/ }), /* 112 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(1); var _interopRequireWildcard = __webpack_require__(3); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var React = _interopRequireWildcard(__webpack_require__(0)); var _CloseCircleOutlined = _interopRequireDefault(__webpack_require__(113)); var _AntdIcon = _interopRequireDefault(__webpack_require__(10)); // GENERATE BY ./scripts/generate.ts // DON NOT EDIT IT MANUALLY var CloseCircleOutlined = function CloseCircleOutlined(props, ref) { return React.createElement(_AntdIcon.default, Object.assign({}, props, { ref: ref, icon: _CloseCircleOutlined.default })); }; CloseCircleOutlined.displayName = 'CloseCircleOutlined'; var _default = React.forwardRef(CloseCircleOutlined); exports.default = _default; /***/ }), /* 113 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; // This icon file is generated automatically. Object.defineProperty(exports, "__esModule", { value: true }); var CloseCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M685.4 354.8c0-4.4-3.6-8-8-8l-66 .3L512 465.6l-99.3-118.4-66.1-.3c-4.4 0-8 3.5-8 8 0 1.9.7 3.7 1.9 5.2l130.1 155L340.5 670a8.32 8.32 0 00-1.9 5.2c0 4.4 3.6 8 8 8l66.1-.3L512 564.4l99.3 118.4 66 .3c4.4 0 8-3.5 8-8 0-1.9-.7-3.7-1.9-5.2L553.5 515l130.1-155c1.2-1.4 1.8-3.3 1.8-5.2z" } }, { "tag": "path", "attrs": { "d": "M512 65C264.6 65 64 265.6 64 513s200.6 448 448 448 448-200.6 448-448S759.4 65 512 65zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }] }, "name": "close-circle", "theme": "outlined" }; exports.default = CloseCircleOutlined; /***/ }), /* 114 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _ExclamationCircleOutlined = _interopRequireDefault(__webpack_require__(115)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _default = _ExclamationCircleOutlined; exports.default = _default; module.exports = _default; /***/ }), /* 115 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(1); var _interopRequireWildcard = __webpack_require__(3); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var React = _interopRequireWildcard(__webpack_require__(0)); var _ExclamationCircleOutlined = _interopRequireDefault(__webpack_require__(116)); var _AntdIcon = _interopRequireDefault(__webpack_require__(10)); // GENERATE BY ./scripts/generate.ts // DON NOT EDIT IT MANUALLY var ExclamationCircleOutlined = function ExclamationCircleOutlined(props, ref) { return React.createElement(_AntdIcon.default, Object.assign({}, props, { ref: ref, icon: _ExclamationCircleOutlined.default })); }; ExclamationCircleOutlined.displayName = 'ExclamationCircleOutlined'; var _default = React.forwardRef(ExclamationCircleOutlined); exports.default = _default; /***/ }), /* 116 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; // This icon file is generated automatically. Object.defineProperty(exports, "__esModule", { value: true }); var ExclamationCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { "tag": "path", "attrs": { "d": "M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z" } }] }, "name": "exclamation-circle", "theme": "outlined" }; exports.default = ExclamationCircleOutlined; /***/ }), /* 117 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _InfoCircleOutlined = _interopRequireDefault(__webpack_require__(118)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _default = _InfoCircleOutlined; exports.default = _default; module.exports = _default; /***/ }), /* 118 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(1); var _interopRequireWildcard = __webpack_require__(3); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var React = _interopRequireWildcard(__webpack_require__(0)); var _InfoCircleOutlined = _interopRequireDefault(__webpack_require__(119)); var _AntdIcon = _interopRequireDefault(__webpack_require__(10)); // GENERATE BY ./scripts/generate.ts // DON NOT EDIT IT MANUALLY var InfoCircleOutlined = function InfoCircleOutlined(props, ref) { return React.createElement(_AntdIcon.default, Object.assign({}, props, { ref: ref, icon: _InfoCircleOutlined.default })); }; InfoCircleOutlined.displayName = 'InfoCircleOutlined'; var _default = React.forwardRef(InfoCircleOutlined); exports.default = _default; /***/ }), /* 119 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; // This icon file is generated automatically. Object.defineProperty(exports, "__esModule", { value: true }); var InfoCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { "tag": "path", "attrs": { "d": "M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z" } }] }, "name": "info-circle", "theme": "outlined" }; exports.default = InfoCircleOutlined; /***/ }), /* 120 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireWildcard = __webpack_require__(3); var _interopRequireDefault = __webpack_require__(1); Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = createUseNotification; var _extends2 = _interopRequireDefault(__webpack_require__(8)); var _slicedToArray2 = _interopRequireDefault(__webpack_require__(21)); var React = _interopRequireWildcard(__webpack_require__(0)); var _useNotification = _interopRequireDefault(__webpack_require__(52)); var _configProvider = __webpack_require__(15); function createUseNotification(getNotificationInstance, getRCNoticeProps) { var useNotification = function useNotification() { // We can only get content by render var getPrefixCls; // We create a proxy to handle delay created instance var innerInstance = null; var proxy = { add: function add(noticeProps, holderCallback) { innerInstance === null || innerInstance === void 0 ? void 0 : innerInstance.component.add(noticeProps, holderCallback); } }; var _useRCNotification = (0, _useNotification["default"])(proxy), _useRCNotification2 = (0, _slicedToArray2["default"])(_useRCNotification, 2), hookNotify = _useRCNotification2[0], holder = _useRCNotification2[1]; function notify(args) { var customizePrefixCls = args.prefixCls; var mergedPrefixCls = getPrefixCls('notification', customizePrefixCls); getNotificationInstance((0, _extends2["default"])((0, _extends2["default"])({}, args), { prefixCls: mergedPrefixCls }), function (_ref) { var prefixCls = _ref.prefixCls, instance = _ref.instance; innerInstance = instance; hookNotify(getRCNoticeProps(args, prefixCls)); }); } // Fill functions var hookApiRef = React.useRef({}); hookApiRef.current.open = notify; ['success', 'info', 'warning', 'error'].forEach(function (type) { hookApiRef.current[type] = function (args) { return hookApiRef.current.open((0, _extends2["default"])((0, _extends2["default"])({}, args), { type: type })); }; }); return [hookApiRef.current, /*#__PURE__*/React.createElement(_configProvider.ConfigConsumer, { key: "holder" }, function (context) { getPrefixCls = context.getPrefixCls; return holder; })]; }; return useNotification; } /***/ }), /* 121 */ /***/ (function(module, exports) { function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } var g; // This works in non-strict mode g = function () { return this; }(); try { // This works if eval is allowed (see CSP) g = g || new Function("return this")(); } catch (e) { // This works if the window reference is available if ((typeof window === "undefined" ? "undefined" : _typeof(window)) === "object") g = window; } // g can still be undefined, but nothing to do about it... // We return undefined, instead of nothing here, so it's // easier to handle this case. if(!global) { ...} module.exports = g; /***/ }), /* 122 */ /***/ (function(module, exports) { /***/ }), /* 123 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, "LabelIconTip", function() { return /* reexport */ src_components_LabelIconTip; }); __webpack_require__.d(__webpack_exports__, "conversionSubmitValue", function() { return /* reexport */ src_conversionSubmitValue; }); __webpack_require__.d(__webpack_exports__, "useDocumentTitle", function() { return /* reexport */ hooks_useDocumentTitle; }); __webpack_require__.d(__webpack_exports__, "isImg", function() { return /* reexport */ src_isImg; }); __webpack_require__.d(__webpack_exports__, "pickUndefined", function() { return /* reexport */ src_pickUndefined; }); __webpack_require__.d(__webpack_exports__, "pickUndefinedAndArray", function() { return /* reexport */ pickUndefinedAndArray; }); __webpack_require__.d(__webpack_exports__, "isUrl", function() { return /* reexport */ src_isUrl; }); __webpack_require__.d(__webpack_exports__, "isBrowser", function() { return /* reexport */ isBrowser["a" /* default */]; }); __webpack_require__.d(__webpack_exports__, "usePrevious", function() { return /* reexport */ hooks_usePrevious; }); __webpack_require__.d(__webpack_exports__, "useDebounceFn", function() { return /* reexport */ hooks_useDebounceFn; }); __webpack_require__.d(__webpack_exports__, "pickProProps", function() { return /* reexport */ pickProProps; }); __webpack_require__.d(__webpack_exports__, "useDeepCompareEffect", function() { return /* reexport */ hooks_useDeepCompareEffect; }); // EXTERNAL MODULE: external "React" var external_React_ = __webpack_require__(0); var external_React_default = /*#__PURE__*/__webpack_require__.n(external_React_); // CONCATENATED MODULE: ./node_modules/@ant-design/icons-svg/es/asn/InfoCircleOutlined.js // This icon file is generated automatically. var InfoCircleOutlined_InfoCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { "tag": "path", "attrs": { "d": "M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z" } }] }, "name": "info-circle", "theme": "outlined" }; /* harmony default export */ var asn_InfoCircleOutlined = (InfoCircleOutlined_InfoCircleOutlined); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 3 modules var slicedToArray = __webpack_require__(12); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js var defineProperty = __webpack_require__(4); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js + 1 modules var objectWithoutProperties = __webpack_require__(7); // EXTERNAL MODULE: ./node_modules/classnames/index.js var classnames = __webpack_require__(6); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread2(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js var esm_typeof = __webpack_require__(9); // EXTERNAL MODULE: ./node_modules/@ant-design/colors/lib/index.js var lib = __webpack_require__(30); // EXTERNAL MODULE: ./node_modules/rc-util/es/warning.js var warning = __webpack_require__(5); // EXTERNAL MODULE: ./node_modules/insert-css/index.js var insert_css = __webpack_require__(31); // CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/utils.js function utils_warning(valid, message) { Object(warning["a" /* default */])(valid, "[@ant-design/icons] ".concat(message)); } function isIconDefinition(target) { return Object(esm_typeof["a" /* default */])(target) === 'object' && typeof target.name === 'string' && typeof target.theme === 'string' && (Object(esm_typeof["a" /* default */])(target.icon) === 'object' || typeof target.icon === 'function'); } function normalizeAttrs() { var attrs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; return Object.keys(attrs).reduce(function (acc, key) { var val = attrs[key]; switch (key) { case 'class': acc.className = val; delete acc.class; break; default: acc[key] = val; } return acc; }, {}); } function generate(node, key, rootProps) { if (!rootProps) { return /*#__PURE__*/external_React_default.a.createElement(node.tag, _objectSpread2({ key: key }, normalizeAttrs(node.attrs)), (node.children || []).map(function (child, index) { return generate(child, "".concat(key, "-").concat(node.tag, "-").concat(index)); })); } return /*#__PURE__*/external_React_default.a.createElement(node.tag, _objectSpread2(_objectSpread2({ key: key }, normalizeAttrs(node.attrs)), rootProps), (node.children || []).map(function (child, index) { return generate(child, "".concat(key, "-").concat(node.tag, "-").concat(index)); })); } function getSecondaryColor(primaryColor) { // choose the second color return Object(lib["generate"])(primaryColor)[0]; } function normalizeTwoToneColors(twoToneColor) { if (!twoToneColor) { return []; } return Array.isArray(twoToneColor) ? twoToneColor : [twoToneColor]; } // These props make sure that the SVG behaviours like general text. // Reference: https://blog.prototypr.io/align-svg-icons-to-text-and-say-goodbye-to-font-icons-d44b3d7b26b4 var svgBaseProps = { width: '1em', height: '1em', fill: 'currentColor', 'aria-hidden': 'true', focusable: 'false' }; var iconStyles = "\n.anticon {\n display: inline-block;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n"; var cssInjectedFlag = false; var utils_useInsertStyles = function useInsertStyles() { var styleStr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : iconStyles; Object(external_React_["useEffect"])(function () { if (!cssInjectedFlag) { Object(insert_css["insertCss"])(styleStr, { prepend: true }); cssInjectedFlag = true; } }, []); }; // CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/components/IconBase.js var twoToneColorPalette = { primaryColor: '#333', secondaryColor: '#E6E6E6', calculated: false }; function setTwoToneColors(_ref) { var primaryColor = _ref.primaryColor, secondaryColor = _ref.secondaryColor; twoToneColorPalette.primaryColor = primaryColor; twoToneColorPalette.secondaryColor = secondaryColor || getSecondaryColor(primaryColor); twoToneColorPalette.calculated = !!secondaryColor; } function getTwoToneColors() { return _objectSpread2({}, twoToneColorPalette); } var IconBase_IconBase = function IconBase(props) { var icon = props.icon, className = props.className, onClick = props.onClick, style = props.style, primaryColor = props.primaryColor, secondaryColor = props.secondaryColor, restProps = Object(objectWithoutProperties["a" /* default */])(props, ["icon", "className", "onClick", "style", "primaryColor", "secondaryColor"]); var colors = twoToneColorPalette; if (primaryColor) { colors = { primaryColor: primaryColor, secondaryColor: secondaryColor || getSecondaryColor(primaryColor) }; } utils_useInsertStyles(); utils_warning(isIconDefinition(icon), "icon should be icon definiton, but got ".concat(icon)); if (!isIconDefinition(icon)) { return null; } var target = icon; if (target && typeof target.icon === 'function') { target = _objectSpread2(_objectSpread2({}, target), {}, { icon: target.icon(colors.primaryColor, colors.secondaryColor) }); } return generate(target.icon, "svg-".concat(target.name), _objectSpread2({ className: className, onClick: onClick, style: style, 'data-icon': target.name, width: '1em', height: '1em', fill: 'currentColor', 'aria-hidden': 'true' }, restProps)); }; IconBase_IconBase.displayName = 'IconReact'; IconBase_IconBase.getTwoToneColors = getTwoToneColors; IconBase_IconBase.setTwoToneColors = setTwoToneColors; /* harmony default export */ var components_IconBase = (IconBase_IconBase); // CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/components/twoTonePrimaryColor.js function setTwoToneColor(twoToneColor) { var _normalizeTwoToneColo = normalizeTwoToneColors(twoToneColor), _normalizeTwoToneColo2 = Object(slicedToArray["a" /* default */])(_normalizeTwoToneColo, 2), primaryColor = _normalizeTwoToneColo2[0], secondaryColor = _normalizeTwoToneColo2[1]; return components_IconBase.setTwoToneColors({ primaryColor: primaryColor, secondaryColor: secondaryColor }); } function getTwoToneColor() { var colors = components_IconBase.getTwoToneColors(); if (!colors.calculated) { return colors.primaryColor; } return [colors.primaryColor, colors.secondaryColor]; } // CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/components/AntdIcon.js // Initial setting // should move it to antd main repo? setTwoToneColor('#1890ff'); var Icon = /*#__PURE__*/external_React_["forwardRef"](function (props, ref) { var className = props.className, icon = props.icon, spin = props.spin, rotate = props.rotate, tabIndex = props.tabIndex, onClick = props.onClick, twoToneColor = props.twoToneColor, restProps = Object(objectWithoutProperties["a" /* default */])(props, ["className", "icon", "spin", "rotate", "tabIndex", "onClick", "twoToneColor"]); var classString = classnames_default()('anticon', Object(defineProperty["a" /* default */])({}, "anticon-".concat(icon.name), Boolean(icon.name)), className); var svgClassString = classnames_default()({ 'anticon-spin': !!spin || icon.name === 'loading' }); var iconTabIndex = tabIndex; if (iconTabIndex === undefined && onClick) { iconTabIndex = -1; } var svgStyle = rotate ? { msTransform: "rotate(".concat(rotate, "deg)"), transform: "rotate(".concat(rotate, "deg)") } : undefined; var _normalizeTwoToneColo = normalizeTwoToneColors(twoToneColor), _normalizeTwoToneColo2 = Object(slicedToArray["a" /* default */])(_normalizeTwoToneColo, 2), primaryColor = _normalizeTwoToneColo2[0], secondaryColor = _normalizeTwoToneColo2[1]; return /*#__PURE__*/external_React_["createElement"]("span", Object.assign({ role: "img", "aria-label": icon.name }, restProps, { ref: ref, tabIndex: iconTabIndex, onClick: onClick, className: classString }), /*#__PURE__*/external_React_["createElement"](components_IconBase, { className: svgClassString, icon: icon, primaryColor: primaryColor, secondaryColor: secondaryColor, style: svgStyle })); }); Icon.displayName = 'AntdIcon'; Icon.getTwoToneColor = getTwoToneColor; Icon.setTwoToneColor = setTwoToneColor; /* harmony default export */ var AntdIcon = (Icon); // CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/icons/InfoCircleOutlined.js // GENERATE BY ./scripts/generate.ts // DON NOT EDIT IT MANUALLY var icons_InfoCircleOutlined_InfoCircleOutlined = function InfoCircleOutlined(props, ref) { return /*#__PURE__*/external_React_["createElement"](AntdIcon, Object.assign({}, props, { ref: ref, icon: asn_InfoCircleOutlined })); }; icons_InfoCircleOutlined_InfoCircleOutlined.displayName = 'InfoCircleOutlined'; /* harmony default export */ var icons_InfoCircleOutlined = (/*#__PURE__*/external_React_["forwardRef"](icons_InfoCircleOutlined_InfoCircleOutlined)); // EXTERNAL MODULE: external "antd" var external_antd_ = __webpack_require__(32); // EXTERNAL MODULE: ./node_modules/antd/lib/config-provider/index.js var config_provider = __webpack_require__(15); // EXTERNAL MODULE: ./packages/utils/src/components/LabelIconTip/index.less var components_LabelIconTip = __webpack_require__(57); // CONCATENATED MODULE: ./packages/utils/src/components/LabelIconTip/index.tsx /** * 在 form 的 label 后面增加一个 tips 来展示一些说明文案 * @param props */ var LabelIconTip_LabelIconTip = function LabelIconTip(props) { var label = props.label, tip = props.tip; var _useContext = Object(external_React_["useContext"])(config_provider["ConfigContext"]), getPrefixCls = _useContext.getPrefixCls; // 如果 tip 不存在直接使用了 label if (!tip) { return /*#__PURE__*/external_React_default.a.createElement(external_React_default.a.Fragment, null, label); } var className = getPrefixCls('pro-core-label-tip'); var tooltipProps = typeof tip === 'string' ? { title: tip } : tip; return /*#__PURE__*/external_React_default.a.createElement(external_antd_["Space"], { size: 4, className: className }, label, /*#__PURE__*/external_React_default.a.createElement(external_antd_["Tooltip"], tooltipProps, /*#__PURE__*/external_React_default.a.createElement(icons_InfoCircleOutlined, { className: className + "-icon" }))); }; /* harmony default export */ var src_components_LabelIconTip = (LabelIconTip_LabelIconTip); // EXTERNAL MODULE: ./packages/utils/src/isBrowser/index.ts var isBrowser = __webpack_require__(23); // CONCATENATED MODULE: ./packages/utils/src/isImg/index.ts /** 判断是否是图片链接 */ function isImg(path) { return /\w.(png|jpg|jpeg|svg|webp|gif|bmp)$/i.test(path); } /* harmony default export */ var src_isImg = (isImg); // CONCATENATED MODULE: ./packages/utils/src/isUrl/index.ts /* eslint no-useless-escape:0 import/prefer-default-export:0 */ var reg = /(((^https?:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[\w]*))?)$/; var isUrl = function isUrl(path) { return reg.test(path); }; /* harmony default export */ var src_isUrl = (isUrl); // CONCATENATED MODULE: ./packages/utils/src/pickProProps/index.tsx var proFieldProps = "valueType request mode plain renderFormItem render text formItemProps valueEnum"; var proFormProps = "fieldProps secondary colSize groupProps contentRender submitterProps submitter"; function pickProProps(props) { var propList = (proFieldProps + " " + proFormProps).split(/[\s\n]+/); var attrs = {}; Object.keys(props || {}).forEach(function (key) { if (propList.includes(key)) { return; } attrs[key] = props[key]; }); return attrs; } // CONCATENATED MODULE: ./packages/utils/src/pickUndefined/index.ts var pickUndefined = function pickUndefined(obj) { var newObj = {}; Object.keys(obj).forEach(function (key) { if (obj[key] !== undefined) { newObj[key] = obj[key]; } }); return newObj; }; /* harmony default export */ var src_pickUndefined = (pickUndefined); // CONCATENATED MODULE: ./packages/utils/src/pickUndefinedAndArray/index.ts var pickUndefinedAndArray_pickUndefined = function pickUndefined(obj) { var newObj = {}; Object.keys(obj).forEach(function (key) { var _obj$key; if (obj[key] !== undefined && ((_obj$key = obj[key]) == null ? void 0 : _obj$key.length) !== 0) { newObj[key] = obj[key]; } }); return newObj; }; /* harmony default export */ var pickUndefinedAndArray = (pickUndefinedAndArray_pickUndefined); // CONCATENATED MODULE: ./packages/utils/src/hooks/useDebounceFn/index.ts var useDebounceFn_useUpdateEffect = function useUpdateEffect(effect, deps) { var isMounted = Object(external_React_["useRef"])(false); Object(external_React_["useEffect"])(function () { if (!isMounted.current) { isMounted.current = true; } else { return effect(); } return function () { return undefined; }; }, deps); }; function useDebounceFn(fn, deps, wait) { // eslint-disable-next-line no-underscore-dangle var hooksDeps = Array.isArray(deps) ? deps : []; // eslint-disable-next-line no-underscore-dangle var hookWait = typeof deps === 'number' ? deps : wait || 0; var timer = Object(external_React_["useRef"])(); var fnRef = Object(external_React_["useRef"])(fn); fnRef.current = fn; var cancel = Object(external_React_["useCallback"])(function () { if (timer.current) { clearTimeout(timer.current); } }, []); var run = Object(external_React_["useCallback"])(function () { for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } cancel(); timer.current = setTimeout(function () { fnRef.current.apply(fnRef, args); }, hookWait); }, [hookWait, cancel]); useDebounceFn_useUpdateEffect(function () { run(); return cancel; }, [].concat(hooksDeps, [run])); Object(external_React_["useEffect"])(function () { return cancel; }, []); return { run: run, cancel: cancel }; } /* harmony default export */ var hooks_useDebounceFn = (useDebounceFn); // CONCATENATED MODULE: ./packages/utils/src/hooks/usePrevious/index.ts var usePrevious_usePrevious = function usePrevious(state) { var ref = Object(external_React_["useRef"])(); Object(external_React_["useEffect"])(function () { ref.current = state; }); return ref.current; }; /* harmony default export */ var hooks_usePrevious = (usePrevious_usePrevious); // EXTERNAL MODULE: external "moment" var external_moment_ = __webpack_require__(33); var external_moment_default = /*#__PURE__*/__webpack_require__.n(external_moment_); // CONCATENATED MODULE: ./packages/utils/src/conversionSubmitValue/index.ts var dateFormatterMap = { time: 'HH:mm:ss', timeRange: 'HH:mm:ss', date: 'YYYY-MM-DD', dateRange: 'YYYY-MM-DD', dateTime: 'YYYY-MM-DD HH:mm:ss', dateTimeRange: 'YYYY-MM-DD HH:mm:ss' }; /** * 根据不同的格式转化 moment * @param value * @param dateFormatter * @param valueType */ var conversionSubmitValue_conversionMoment = function conversionMoment(value, dateFormatter, valueType) { if (valueType === void 0) { valueType = 'dateTime'; } if (!dateFormatter) { return value; } if (external_moment_default.a.isMoment(value) && !Array.isArray(value)) { if (dateFormatter === 'number') { return value.valueOf(); } return value.format(dateFormatterMap[valueType] || 'YYYY-MM-DD HH:mm:ss'); } if (Array.isArray(value)) { return value.map(function (item) { if (external_moment_default.a.isMoment(item)) { if (dateFormatter === 'number') { return item.valueOf(); } return item.format(dateFormatterMap[valueType] || 'YYYY-MM-DD HH:mm:ss'); } return item; }); } return value; }; /** * 这里主要是来转化一下数据 * 将 moment 转化为 string * 将 all 默认删除 * @param value * @param dateFormatter * @param proColumnsMap */ var conversionSubmitValue = function conversionSubmitValue(value, dateFormatter, valueTypeMap) { var tmpValue = {}; Object.keys(value).forEach(function (key) { var valueType = valueTypeMap[key] || 'text'; var itemValue = value[key]; if (!itemValue) { return; } // 都没命中,原样返回 tmpValue[key] = conversionSubmitValue_conversionMoment(itemValue, dateFormatter, valueType); }); return tmpValue; }; /* harmony default export */ var src_conversionSubmitValue = (conversionSubmitValue); // EXTERNAL MODULE: ./node_modules/lodash.isequal/index.js var lodash_isequal = __webpack_require__(56); var lodash_isequal_default = /*#__PURE__*/__webpack_require__.n(lodash_isequal); // CONCATENATED MODULE: ./packages/utils/src/hooks/useDeepCompareEffect/index.ts function deepCompareEquals(a, b) { return lodash_isequal_default()(a, b); } function useDeepCompareMemoize(value) { var ref = Object(external_React_["useRef"])(); // it can be done by using useMemo as well // but useRef is rather cleaner and easier if (!deepCompareEquals(value, ref.current)) { ref.current = value; } return ref.current; } function useDeepCompareEffect(effect, dependencies) { Object(external_React_["useEffect"])(effect, useDeepCompareMemoize(dependencies)); } /* harmony default export */ var hooks_useDeepCompareEffect = (useDeepCompareEffect); // CONCATENATED MODULE: ./packages/utils/src/hooks/useDocumentTitle/index.ts function useDocumentTitle(titleInfo, appDefaultTitle) { var titleText = typeof titleInfo.pageName === 'string' ? titleInfo.title : appDefaultTitle; Object(external_React_["useEffect"])(function () { if (Object(isBrowser["a" /* default */])() && titleText) { document.title = titleText; } }, [titleInfo.title]); } /* harmony default export */ var hooks_useDocumentTitle = (useDocumentTitle); // EXTERNAL MODULE: ./packages/utils/src/typing.ts var typing = __webpack_require__(122); // CONCATENATED MODULE: ./packages/utils/src/index.tsx /** * hooks */ /** * type */ /***/ }), /* 124 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, "Field", function() { return /* reexport */ es_Field; }); __webpack_require__.d(__webpack_exports__, "List", function() { return /* reexport */ es_List; }); __webpack_require__.d(__webpack_exports__, "useForm", function() { return /* reexport */ es_useForm; }); __webpack_require__.d(__webpack_exports__, "FormProvider", function() { return /* reexport */ FormContext_FormProvider; }); // EXTERNAL MODULE: external "React" var external_React_ = __webpack_require__(0); var external_React_default = /*#__PURE__*/__webpack_require__.n(external_React_); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js + 1 modules var objectWithoutProperties = __webpack_require__(7); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js var defineProperty = __webpack_require__(4); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 3 modules var toConsumableArray = __webpack_require__(2); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js var classCallCheck = __webpack_require__(11); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js var createClass = __webpack_require__(16); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js + 1 modules var inherits = __webpack_require__(19); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js + 1 modules var possibleConstructorReturn = __webpack_require__(20); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js var getPrototypeOf = __webpack_require__(13); // EXTERNAL MODULE: ./node_modules/react-is/index.js var react_is = __webpack_require__(54); // CONCATENATED MODULE: ./node_modules/rc-util/es/Children/toArray.js function toArray(children) { var ret = []; external_React_default.a.Children.forEach(children, function (child) { if (child === undefined || child === null) { return; } if (Array.isArray(child)) { ret = ret.concat(toArray(child)); } else if (Object(react_is["isFragment"])(child) && child.props) { ret = ret.concat(toArray(child.props.children)); } else { ret.push(child); } }); return ret; } // EXTERNAL MODULE: ./node_modules/rc-util/es/warning.js var warning = __webpack_require__(5); // CONCATENATED MODULE: ./node_modules/rc-field-form/es/FieldContext.js var HOOK_MARK = 'RC_FORM_INTERNAL_HOOKS'; // eslint-disable-next-line @typescript-eslint/no-explicit-any var FieldContext_warningFunc = function warningFunc() { Object(warning["a" /* default */])(false, 'Can not find FormContext. Please make sure you wrap Field under Form.'); }; var Context = /*#__PURE__*/external_React_["createContext"]({ getFieldValue: FieldContext_warningFunc, getFieldsValue: FieldContext_warningFunc, getFieldError: FieldContext_warningFunc, getFieldsError: FieldContext_warningFunc, isFieldsTouched: FieldContext_warningFunc, isFieldTouched: FieldContext_warningFunc, isFieldValidating: FieldContext_warningFunc, isFieldsValidating: FieldContext_warningFunc, resetFields: FieldContext_warningFunc, setFields: FieldContext_warningFunc, setFieldsValue: FieldContext_warningFunc, validateFields: FieldContext_warningFunc, submit: FieldContext_warningFunc, getInternalHooks: function getInternalHooks() { FieldContext_warningFunc(); return { dispatch: FieldContext_warningFunc, registerField: FieldContext_warningFunc, useSubscribe: FieldContext_warningFunc, setInitialValues: FieldContext_warningFunc, setCallbacks: FieldContext_warningFunc, getFields: FieldContext_warningFunc, setValidateMessages: FieldContext_warningFunc, setPreserve: FieldContext_warningFunc }; } }); /* harmony default export */ var FieldContext = (Context); // CONCATENATED MODULE: ./node_modules/rc-field-form/es/utils/typeUtil.js function typeUtil_toArray(value) { if (value === undefined || value === null) { return []; } return Array.isArray(value) ? value : [value]; } // EXTERNAL MODULE: ./node_modules/@babel/runtime/regenerator/index.js var regenerator = __webpack_require__(14); var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator); // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js var esm_typeof = __webpack_require__(9); // EXTERNAL MODULE: ./node_modules/async-validator/dist-web/index.js var dist_web = __webpack_require__(55); // CONCATENATED MODULE: ./node_modules/rc-util/es/utils/get.js function get_get(entity, path) { var current = entity; for (var i = 0; i < path.length; i += 1) { if (current === null || current === undefined) { return undefined; } current = current[path[i]]; } return current; } // CONCATENATED MODULE: ./node_modules/rc-util/es/utils/set.js function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } function _toArray(arr) { return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function set_set(entity, paths, value) { if (!paths.length) { return value; } var _paths = _toArray(paths), path = _paths[0], restPath = _paths.slice(1); var clone; if (!entity && typeof path === 'number') { clone = []; } else if (Array.isArray(entity)) { clone = _toConsumableArray(entity); } else { clone = _objectSpread({}, entity); } clone[path] = set_set(clone[path], restPath, value); return clone; } // CONCATENATED MODULE: ./node_modules/rc-field-form/es/utils/valueUtil.js function valueUtil_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function valueUtil_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { valueUtil_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { valueUtil_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } /** * Convert name to internal supported format. * This function should keep since we still thinking if need support like `a.b.c` format. * 'a' => ['a'] * 123 => [123] * ['a', 123] => ['a', 123] */ function getNamePath(path) { return typeUtil_toArray(path); } function getValue(store, namePath) { var value = get_get(store, namePath); return value; } function setValue(store, namePath, value) { var newStore = set_set(store, namePath, value); return newStore; } function cloneByNamePathList(store, namePathList) { var newStore = {}; namePathList.forEach(function (namePath) { var value = getValue(store, namePath); newStore = setValue(newStore, namePath, value); }); return newStore; } function containsNamePath(namePathList, namePath) { return namePathList && namePathList.some(function (path) { return matchNamePath(path, namePath); }); } function isObject(obj) { return Object(esm_typeof["a" /* default */])(obj) === 'object' && obj !== null && Object.getPrototypeOf(obj) === Object.prototype; } /** * Copy values into store and return a new values object * ({ a: 1, b: { c: 2 } }, { a: 4, b: { d: 5 } }) => { a: 4, b: { c: 2, d: 5 } } */ function internalSetValues(store, values) { var newStore = Array.isArray(store) ? Object(toConsumableArray["a" /* default */])(store) : valueUtil_objectSpread({}, store); if (!values) { return newStore; } Object.keys(values).forEach(function (key) { var prevValue = newStore[key]; var value = values[key]; // If both are object (but target is not array), we use recursion to set deep value var recursive = isObject(prevValue) && isObject(value); newStore[key] = recursive ? internalSetValues(prevValue, value || {}) : value; }); return newStore; } function setValues(store) { for (var _len = arguments.length, restValues = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { restValues[_key - 1] = arguments[_key]; } return restValues.reduce(function (current, newStore) { return internalSetValues(current, newStore); }, store); } function matchNamePath(namePath, changedNamePath) { if (!namePath || !changedNamePath || namePath.length !== changedNamePath.length) { return false; } return namePath.every(function (nameUnit, i) { return changedNamePath[i] === nameUnit; }); } function isSimilar(source, target) { if (source === target) { return true; } if (!source && target || source && !target) { return false; } if (!source || !target || Object(esm_typeof["a" /* default */])(source) !== 'object' || Object(esm_typeof["a" /* default */])(target) !== 'object') { return false; } var sourceKeys = Object.keys(source); var targetKeys = Object.keys(target); var keys = new Set([].concat(Object(toConsumableArray["a" /* default */])(sourceKeys), Object(toConsumableArray["a" /* default */])(targetKeys))); return Object(toConsumableArray["a" /* default */])(keys).every(function (key) { var sourceValue = source[key]; var targetValue = target[key]; if (typeof sourceValue === 'function' && typeof targetValue === 'function') { return true; } return sourceValue === targetValue; }); } function defaultGetValueFromEvent(valuePropName) { var event = arguments.length <= 1 ? undefined : arguments[1]; if (event && event.target && valuePropName in event.target) { return event.target[valuePropName]; } return event; } /** * Moves an array item from one position in an array to another. * * Note: This is a pure function so a new array will be returned, instead * of altering the array argument. * * @param array Array in which to move an item. (required) * @param moveIndex The index of the item to move. (required) * @param toIndex The index to move item at moveIndex to. (required) */ function valueUtil_move(array, moveIndex, toIndex) { var length = array.length; if (moveIndex < 0 || moveIndex >= length || toIndex < 0 || toIndex >= length) { return array; } var item = array[moveIndex]; var diff = moveIndex - toIndex; if (diff > 0) { // move left return [].concat(Object(toConsumableArray["a" /* default */])(array.slice(0, toIndex)), [item], Object(toConsumableArray["a" /* default */])(array.slice(toIndex, moveIndex)), Object(toConsumableArray["a" /* default */])(array.slice(moveIndex + 1, length))); } if (diff < 0) { // move right return [].concat(Object(toConsumableArray["a" /* default */])(array.slice(0, moveIndex)), Object(toConsumableArray["a" /* default */])(array.slice(moveIndex + 1, toIndex + 1)), [item], Object(toConsumableArray["a" /* default */])(array.slice(toIndex + 1, length))); } return array; } // CONCATENATED MODULE: ./node_modules/rc-field-form/es/utils/messages.js var typeTemplate = "'${name}' is not a valid ${type}"; var defaultValidateMessages = { default: "Validation error on field '${name}'", required: "'${name}' is required", enum: "'${name}' must be one of [${enum}]", whitespace: "'${name}' cannot be empty", date: { format: "'${name}' is invalid for format date", parse: "'${name}' could not be parsed as date", invalid: "'${name}' is invalid date" }, types: { string: typeTemplate, method: typeTemplate, array: typeTemplate, object: typeTemplate, number: typeTemplate, date: typeTemplate, boolean: typeTemplate, integer: typeTemplate, float: typeTemplate, regexp: typeTemplate, email: typeTemplate, url: typeTemplate, hex: typeTemplate }, string: { len: "'${name}' must be exactly ${len} characters", min: "'${name}' must be at least ${min} characters", max: "'${name}' cannot be longer than ${max} characters", range: "'${name}' must be between ${min} and ${max} characters" }, number: { len: "'${name}' must equal ${len}", min: "'${name}' cannot be less than ${min}", max: "'${name}' cannot be greater than ${max}", range: "'${name}' must be between ${min} and ${max}" }, array: { len: "'${name}' must be exactly ${len} in length", min: "'${name}' cannot be less than ${min} in length", max: "'${name}' cannot be greater than ${max} in length", range: "'${name}' must be between ${min} and ${max} in length" }, pattern: { mismatch: "'${name}' does not match pattern ${pattern}" } }; // CONCATENATED MODULE: ./node_modules/rc-field-form/es/utils/validateUtil.js function validateUtil_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function validateUtil_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { validateUtil_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { validateUtil_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } // Remove incorrect original ts define var AsyncValidator = dist_web["a" /* default */]; /** * Replace with template. * `I'm ${name}` + { name: 'bamboo' } = I'm bamboo */ function replaceMessage(template, kv) { return template.replace(/\$\{\w+\}/g, function (str) { var key = str.slice(2, -1); return kv[key]; }); } /** * We use `async-validator` to validate rules. So have to hot replace the message with validator. * { required: '${name} is required' } => { required: () => 'field is required' } */ function convertMessages(messages, name, rule, messageVariables) { var kv = validateUtil_objectSpread({}, rule, { name: name, enum: (rule.enum || []).join(', ') }); var replaceFunc = function replaceFunc(template, additionalKV) { return function () { return replaceMessage(template, validateUtil_objectSpread({}, kv, {}, additionalKV)); }; }; /* eslint-disable no-param-reassign */ function fillTemplate(source) { var target = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; Object.keys(source).forEach(function (ruleName) { var value = source[ruleName]; if (typeof value === 'string') { target[ruleName] = replaceFunc(value, messageVariables); } else if (value && Object(esm_typeof["a" /* default */])(value) === 'object') { target[ruleName] = {}; fillTemplate(value, target[ruleName]); } else { target[ruleName] = value; } }); return target; } /* eslint-enable */ return fillTemplate(setValues({}, defaultValidateMessages, messages)); } function validateRule(_x, _x2, _x3, _x4, _x5) { return _validateRule.apply(this, arguments); } /** * We use `async-validator` to validate the value. * But only check one value in a time to avoid namePath validate issue. */ function _validateRule() { _validateRule = _asyncToGenerator( /*#__PURE__*/regenerator_default.a.mark(function _callee2(name, value, rule, options, messageVariables) { var cloneRule, subRuleField, validator, messages, result, subResults; return regenerator_default.a.wrap(function _callee2$(_context2) { while (1) { switch (_context2.prev = _context2.next) { case 0: cloneRule = validateUtil_objectSpread({}, rule); // We should special handle array validate subRuleField = null; if (cloneRule && cloneRule.type === 'array' && cloneRule.defaultField) { subRuleField = cloneRule.defaultField; delete cloneRule.defaultField; } validator = new AsyncValidator(Object(defineProperty["a" /* default */])({}, name, [cloneRule])); messages = convertMessages(options.validateMessages, name, cloneRule, messageVariables); validator.messages(messages); result = []; _context2.prev = 7; _context2.next = 10; return Promise.resolve(validator.validate(Object(defineProperty["a" /* default */])({}, name, value), validateUtil_objectSpread({}, options))); case 10: _context2.next = 15; break; case 12: _context2.prev = 12; _context2.t0 = _context2["catch"](7); if (_context2.t0.errors) { result = _context2.t0.errors.map(function (_ref2, index) { var message = _ref2.message; return (// Wrap ReactNode with `key` /*#__PURE__*/ external_React_["isValidElement"](message) ? /*#__PURE__*/external_React_["cloneElement"](message, { key: "error_".concat(index) }) : message ); }); } else { console.error(_context2.t0); result = [messages.default()]; } case 15: if (!(!result.length && subRuleField)) { _context2.next = 20; break; } _context2.next = 18; return Promise.all(value.map(function (subValue, i) { return validateRule("".concat(name, ".").concat(i), subValue, subRuleField, options, messageVariables); })); case 18: subResults = _context2.sent; return _context2.abrupt("return", subResults.reduce(function (prev, errors) { return [].concat(Object(toConsumableArray["a" /* default */])(prev), Object(toConsumableArray["a" /* default */])(errors)); }, [])); case 20: return _context2.abrupt("return", result); case 21: case "end": return _context2.stop(); } } }, _callee2, null, [[7, 12]]); })); return _validateRule.apply(this, arguments); } function validateRules(namePath, value, rules, options, validateFirst, messageVariables) { var name = namePath.join('.'); // Fill rule with context var filledRules = rules.map(function (currentRule) { var originValidatorFunc = currentRule.validator; if (!originValidatorFunc) { return currentRule; } return validateUtil_objectSpread({}, currentRule, { validator: function validator(rule, val, callback) { var hasPromise = false; // Wrap callback only accept when promise not provided var wrappedCallback = function wrappedCallback() { for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } // Wait a tick to make sure return type is a promise Promise.resolve().then(function () { Object(warning["a" /* default */])(!hasPromise, 'Your validator function has already return a promise. `callback` will be ignored.'); if (!hasPromise) { callback.apply(void 0, args); } }); }; // Get promise var promise = originValidatorFunc(rule, val, wrappedCallback); hasPromise = promise && typeof promise.then === 'function' && typeof promise.catch === 'function'; /** * 1. Use promise as the first priority. * 2. If promise not exist, use callback with warning instead */ Object(warning["a" /* default */])(hasPromise, '`callback` is deprecated. Please return a promise instead.'); if (hasPromise) { promise.then(function () { callback(); }).catch(function (err) { callback(err); }); } } }); }); var summaryPromise; if (validateFirst === true) { // >>>>> Validate by serialization summaryPromise = new Promise( /*#__PURE__*/function () { var _ref = _asyncToGenerator( /*#__PURE__*/regenerator_default.a.mark(function _callee(resolve) { var i, errors; return regenerator_default.a.wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: i = 0; case 1: if (!(i < filledRules.length)) { _context.next = 11; break; } _context.next = 4; return validateRule(name, value, filledRules[i], options, messageVariables); case 4: errors = _context.sent; if (!errors.length) { _context.next = 8; break; } resolve(errors); return _context.abrupt("return"); case 8: i += 1; _context.next = 1; break; case 11: /* eslint-enable */ resolve([]); case 12: case "end": return _context.stop(); } } }, _callee); })); return function (_x6) { return _ref.apply(this, arguments); }; }()); } else { // >>>>> Validate by parallel var rulePromises = filledRules.map(function (rule) { return validateRule(name, value, rule, options, messageVariables); }); summaryPromise = (validateFirst ? finishOnFirstFailed(rulePromises) : finishOnAllFailed(rulePromises)).then(function (errors) { if (!errors.length) { return []; } return Promise.reject(errors); }); } // Internal catch error to avoid console error log. summaryPromise.catch(function (e) { return e; }); return summaryPromise; } function finishOnAllFailed(_x7) { return _finishOnAllFailed.apply(this, arguments); } function _finishOnAllFailed() { _finishOnAllFailed = _asyncToGenerator( /*#__PURE__*/regenerator_default.a.mark(function _callee3(rulePromises) { return regenerator_default.a.wrap(function _callee3$(_context3) { while (1) { switch (_context3.prev = _context3.next) { case 0: return _context3.abrupt("return", Promise.all(rulePromises).then(function (errorsList) { var _ref3; var errors = (_ref3 = []).concat.apply(_ref3, Object(toConsumableArray["a" /* default */])(errorsList)); return errors; })); case 1: case "end": return _context3.stop(); } } }, _callee3); })); return _finishOnAllFailed.apply(this, arguments); } function finishOnFirstFailed(_x8) { return _finishOnFirstFailed.apply(this, arguments); } function _finishOnFirstFailed() { _finishOnFirstFailed = _asyncToGenerator( /*#__PURE__*/regenerator_default.a.mark(function _callee4(rulePromises) { var count; return regenerator_default.a.wrap(function _callee4$(_context4) { while (1) { switch (_context4.prev = _context4.next) { case 0: count = 0; return _context4.abrupt("return", new Promise(function (resolve) { rulePromises.forEach(function (promise) { promise.then(function (errors) { if (errors.length) { resolve(errors); } count += 1; if (count === rulePromises.length) { resolve([]); } }); }); })); case 2: case "end": return _context4.stop(); } } }, _callee4); })); return _finishOnFirstFailed.apply(this, arguments); } // CONCATENATED MODULE: ./node_modules/rc-field-form/es/Field.js function Field_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function Field_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { Field_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { Field_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _createSuper(Derived) { return function () { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = Object(getPrototypeOf["a" /* default */])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Object(possibleConstructorReturn["a" /* default */])(this, result); }; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function requireUpdate(shouldUpdate, prev, next, prevValue, nextValue, info) { if (typeof shouldUpdate === 'function') { return shouldUpdate(prev, next, 'source' in info ? { source: info.source } : {}); } return prevValue !== nextValue; } // We use Class instead of Hooks here since it will cost much code by using Hooks. var Field_Field = /*#__PURE__*/function (_React$Component) { Object(inherits["a" /* default */])(Field, _React$Component); var _super = _createSuper(Field); function Field() { var _this; Object(classCallCheck["a" /* default */])(this, Field); _this = _super.apply(this, arguments); _this.state = { resetCount: 0 }; _this.cancelRegisterFunc = null; _this.destroy = false; /** * Follow state should not management in State since it will async update by React. * This makes first render of form can not get correct state value. */ _this.touched = false; /** Mark when touched & validated. Currently only used for `dependencies` */ _this.dirty = false; _this.validatePromise = null; _this.errors = []; _this.cancelRegister = function () { var preserve = _this.props.preserve; if (_this.cancelRegisterFunc) { _this.cancelRegisterFunc(preserve); } _this.cancelRegisterFunc = null; }; // ================================== Utils ================================== _this.getNamePath = function () { var name = _this.props.name; var _this$context$prefixN = _this.context.prefixName, prefixName = _this$context$prefixN === void 0 ? [] : _this$context$prefixN; return name !== undefined ? [].concat(Object(toConsumableArray["a" /* default */])(prefixName), Object(toConsumableArray["a" /* default */])(name)) : []; }; _this.getRules = function () { var _this$props$rules = _this.props.rules, rules = _this$props$rules === void 0 ? [] : _this$props$rules; return rules.map(function (rule) { if (typeof rule === 'function') { return rule(_this.context); } return rule; }); }; _this.refresh = function () { if (_this.destroy) return; /** * Clean up current node. */ _this.setState(function (_ref) { var resetCount = _ref.resetCount; return { resetCount: resetCount + 1 }; }); }; // ========================= Field Entity Interfaces ========================= // Trigger by store update. Check if need update the component _this.onStoreChange = function (prevStore, namePathList, info) { var _this$props = _this.props, shouldUpdate = _this$props.shouldUpdate, _this$props$dependenc = _this$props.dependencies, dependencies = _this$props$dependenc === void 0 ? [] : _this$props$dependenc, onReset = _this$props.onReset; var store = info.store; var namePath = _this.getNamePath(); var prevValue = _this.getValue(prevStore); var curValue = _this.getValue(store); var namePathMatch = namePathList && containsNamePath(namePathList, namePath); // `setFieldsValue` is a quick access to update related status if (info.type === 'valueUpdate' && info.source === 'external' && prevValue !== curValue) { _this.touched = true; _this.dirty = true; _this.validatePromise = null; _this.errors = []; } switch (info.type) { case 'reset': if (!namePathList || namePathMatch) { // Clean up state _this.touched = false; _this.dirty = false; _this.validatePromise = null; _this.errors = []; if (onReset) { onReset(); } _this.refresh(); return; } break; case 'setField': { if (namePathMatch) { var data = info.data; if ('touched' in data) { _this.touched = data.touched; } if ('validating' in data && !('originRCField' in data)) { _this.validatePromise = data.validating ? Promise.resolve([]) : null; } if ('errors' in data) { _this.errors = data.errors || []; } _this.dirty = true; _this.reRender(); return; } // Handle update by `setField` with `shouldUpdate` if (shouldUpdate && !namePath.length && requireUpdate(shouldUpdate, prevStore, store, prevValue, curValue, info)) { _this.reRender(); return; } break; } case 'dependenciesUpdate': { /** * Trigger when marked `dependencies` updated. Related fields will all update */ var dependencyList = dependencies.map(getNamePath); // No need for `namePathMath` check and `shouldUpdate` check, since `valueUpdate` will be // emitted earlier and they will work there // If set it may cause unnecessary twice rerendering if (dependencyList.some(function (dependency) { return containsNamePath(info.relatedFields, dependency); })) { _this.reRender(); return; } break; } default: // 1. If `namePath` exists in `namePathList`, means it's related value and should update // For example // If `namePathList` is [['list']] (List value update), Field should be updated // If `namePathList` is [['list', 0]] (Field value update), List shouldn't be updated // 2. // 2.1 If `dependencies` is set, `name` is not set and `shouldUpdate` is not set, // don't use `shouldUpdate`. `dependencies` is view as a shortcut if `shouldUpdate` // is not provided // 2.2 If `shouldUpdate` provided, use customize logic to update the field // else to check if value changed if (namePathMatch || (!dependencies.length || namePath.length || shouldUpdate) && requireUpdate(shouldUpdate, prevStore, store, prevValue, curValue, info)) { _this.reRender(); return; } break; } if (shouldUpdate === true) { _this.reRender(); } }; _this.validateRules = function (options) { var _this$props2 = _this.props, _this$props2$validate = _this$props2.validateFirst, validateFirst = _this$props2$validate === void 0 ? false : _this$props2$validate, messageVariables = _this$props2.messageVariables; var _ref2 = options || {}, triggerName = _ref2.triggerName; var namePath = _this.getNamePath(); var filteredRules = _this.getRules(); if (triggerName) { filteredRules = filteredRules.filter(function (rule) { var validateTrigger = rule.validateTrigger; if (!validateTrigger) { return true; } var triggerList = typeUtil_toArray(validateTrigger); return triggerList.includes(triggerName); }); } var promise = validateRules(namePath, _this.getValue(), filteredRules, options, validateFirst, messageVariables); _this.dirty = true; _this.validatePromise = promise; _this.errors = []; promise.catch(function (e) { return e; }).then(function () { var errors = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; if (_this.validatePromise === promise) { _this.validatePromise = null; _this.errors = errors; _this.reRender(); } }); return promise; }; _this.isFieldValidating = function () { return !!_this.validatePromise; }; _this.isFieldTouched = function () { return _this.touched; }; _this.isFieldDirty = function () { return _this.dirty; }; _this.getErrors = function () { return _this.errors; }; // ============================= Child Component ============================= _this.getMeta = function () { // Make error & validating in cache to save perf _this.prevValidating = _this.isFieldValidating(); var meta = { touched: _this.isFieldTouched(), validating: _this.prevValidating, errors: _this.errors, name: _this.getNamePath() }; return meta; }; // Only return validate child node. If invalidate, will do nothing about field. _this.getOnlyChild = function (children) { // Support render props if (typeof children === 'function') { var meta = _this.getMeta(); return Field_objectSpread({}, _this.getOnlyChild(children(_this.getControlled(), meta, _this.context)), { isFunction: true }); } // Filed element only var childList = toArray(children); if (childList.length !== 1 || ! /*#__PURE__*/external_React_["isValidElement"](childList[0])) { return { child: childList, isFunction: false }; } return { child: childList[0], isFunction: false }; }; // ============================== Field Control ============================== _this.getValue = function (store) { var getFieldsValue = _this.context.getFieldsValue; var namePath = _this.getNamePath(); return getValue(store || getFieldsValue(true), namePath); }; _this.getControlled = function () { var childProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var _this$props3 = _this.props, trigger = _this$props3.trigger, validateTrigger = _this$props3.validateTrigger, getValueFromEvent = _this$props3.getValueFromEvent, normalize = _this$props3.normalize, valuePropName = _this$props3.valuePropName, getValueProps = _this$props3.getValueProps; var mergedValidateTrigger = validateTrigger !== undefined ? validateTrigger : _this.context.validateTrigger; var namePath = _this.getNamePath(); var _this$context = _this.context, getInternalHooks = _this$context.getInternalHooks, getFieldsValue = _this$context.getFieldsValue; var _getInternalHooks = getInternalHooks(HOOK_MARK), dispatch = _getInternalHooks.dispatch; var value = _this.getValue(); var mergedGetValueProps = getValueProps || function (val) { return Object(defineProperty["a" /* default */])({}, valuePropName, val); }; // eslint-disable-next-line @typescript-eslint/no-explicit-any var originTriggerFunc = childProps[trigger]; var control = Field_objectSpread({}, childProps, {}, mergedGetValueProps(value)); // Add trigger control[trigger] = function () { // Mark as touched _this.touched = true; _this.dirty = true; var newValue; for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } if (getValueFromEvent) { newValue = getValueFromEvent.apply(void 0, args); } else { newValue = defaultGetValueFromEvent.apply(void 0, [valuePropName].concat(args)); } if (normalize) { newValue = normalize(newValue, value, getFieldsValue(true)); } dispatch({ type: 'updateValue', namePath: namePath, value: newValue }); if (originTriggerFunc) { originTriggerFunc.apply(void 0, args); } }; // Add validateTrigger var validateTriggerList = typeUtil_toArray(mergedValidateTrigger || []); validateTriggerList.forEach(function (triggerName) { // Wrap additional function of component, so that we can get latest value from store var originTrigger = control[triggerName]; control[triggerName] = function () { if (originTrigger) { originTrigger.apply(void 0, arguments); } // Always use latest rules var rules = _this.props.rules; if (rules && rules.length) { // We dispatch validate to root, // since it will update related data with other field with same name dispatch({ type: 'validateField', namePath: namePath, triggerName: triggerName }); } }; }); return control; }; return _this; } // ============================== Subscriptions ============================== Object(createClass["a" /* default */])(Field, [{ key: "componentDidMount", value: function componentDidMount() { var shouldUpdate = this.props.shouldUpdate; var getInternalHooks = this.context.getInternalHooks; var _getInternalHooks2 = getInternalHooks(HOOK_MARK), registerField = _getInternalHooks2.registerField; this.cancelRegisterFunc = registerField(this); // One more render for component in case fields not ready if (shouldUpdate === true) { this.reRender(); } } }, { key: "componentWillUnmount", value: function componentWillUnmount() { this.cancelRegister(); this.destroy = true; } }, { key: "reRender", value: function reRender() { if (this.destroy) return; this.forceUpdate(); } }, { key: "render", value: function render() { var resetCount = this.state.resetCount; var children = this.props.children; var _this$getOnlyChild = this.getOnlyChild(children), child = _this$getOnlyChild.child, isFunction = _this$getOnlyChild.isFunction; // Not need to `cloneElement` since user can handle this in render function self var returnChildNode; if (isFunction) { returnChildNode = child; } else if ( /*#__PURE__*/external_React_["isValidElement"](child)) { returnChildNode = /*#__PURE__*/external_React_["cloneElement"](child, this.getControlled(child.props)); } else { Object(warning["a" /* default */])(!child, '`children` of Field is not validate ReactElement.'); returnChildNode = child; } return /*#__PURE__*/external_React_["createElement"](external_React_["Fragment"], { key: resetCount }, returnChildNode); } }]); return Field; }(external_React_["Component"]); Field_Field.contextType = FieldContext; Field_Field.defaultProps = { trigger: 'onChange', valuePropName: 'value' }; var Field_WrapperField = function WrapperField(_ref4) { var name = _ref4.name, isListField = _ref4.isListField, restProps = Object(objectWithoutProperties["a" /* default */])(_ref4, ["name", "isListField"]); var namePath = name !== undefined ? getNamePath(name) : undefined; var key = 'keep'; if (!isListField) { key = "_".concat((namePath || []).join('_')); } return /*#__PURE__*/external_React_["createElement"](Field_Field, Object.assign({ key: key, name: namePath }, restProps)); }; /* harmony default export */ var es_Field = (Field_WrapperField); // CONCATENATED MODULE: ./node_modules/rc-field-form/es/List.js function List_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function List_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { List_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { List_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } var List_List = function List(_ref) { var name = _ref.name, children = _ref.children; var context = external_React_["useContext"](FieldContext); var keyRef = external_React_["useRef"]({ keys: [], id: 0 }); var keyManager = keyRef.current; // User should not pass `children` as other type. if (typeof children !== 'function') { Object(warning["a" /* default */])(false, 'Form.List only accepts function as children.'); return null; } var parentPrefixName = getNamePath(context.prefixName) || []; var prefixName = [].concat(Object(toConsumableArray["a" /* default */])(parentPrefixName), Object(toConsumableArray["a" /* default */])(getNamePath(name))); var shouldUpdate = function shouldUpdate(prevValue, nextValue, _ref2) { var source = _ref2.source; if (source === 'internal') { return false; } return prevValue !== nextValue; }; return /*#__PURE__*/external_React_["createElement"](FieldContext.Provider, { value: List_objectSpread({}, context, { prefixName: prefixName }) }, /*#__PURE__*/external_React_["createElement"](es_Field, { name: [], shouldUpdate: shouldUpdate }, function (_ref3) { var _ref3$value = _ref3.value, value = _ref3$value === void 0 ? [] : _ref3$value, onChange = _ref3.onChange; var getFieldValue = context.getFieldValue; var getNewValue = function getNewValue() { var values = getFieldValue(prefixName || []); return values || []; }; /** * Always get latest value in case user update fields by `form` api. */ var operations = { add: function add(defaultValue) { // Mapping keys keyManager.keys = [].concat(Object(toConsumableArray["a" /* default */])(keyManager.keys), [keyManager.id]); keyManager.id += 1; var newValue = getNewValue(); onChange([].concat(Object(toConsumableArray["a" /* default */])(newValue), [defaultValue])); }, remove: function remove(index) { var newValue = getNewValue(); var indexSet = new Set(Array.isArray(index) ? index : [index]); if (indexSet.size <= 0) { return; } keyManager.keys = keyManager.keys.filter(function (_, keysIndex) { return !indexSet.has(keysIndex); }); // Trigger store change onChange(newValue.filter(function (_, valueIndex) { return !indexSet.has(valueIndex); })); }, move: function move(from, to) { if (from === to) { return; } var newValue = getNewValue(); // Do not handle out of range if (from < 0 || from >= newValue.length || to < 0 || to >= newValue.length) { return; } keyManager.keys = valueUtil_move(keyManager.keys, from, to); // Trigger store change onChange(valueUtil_move(newValue, from, to)); } }; return children(value.map(function (__, index) { var key = keyManager.keys[index]; if (key === undefined) { keyManager.keys[index] = keyManager.id; key = keyManager.keys[index]; keyManager.id += 1; } return { name: index, key: key, isListField: true }; }), operations); })); }; /* harmony default export */ var es_List = (List_List); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 3 modules var slicedToArray = __webpack_require__(12); // CONCATENATED MODULE: ./node_modules/rc-field-form/es/utils/asyncUtil.js function allPromiseFinish(promiseList) { var hasError = false; var count = promiseList.length; var results = []; if (!promiseList.length) { return Promise.resolve([]); } return new Promise(function (resolve, reject) { promiseList.forEach(function (promise, index) { promise.catch(function (e) { hasError = true; return e; }).then(function (result) { count -= 1; results[index] = result; if (count > 0) { return; } if (hasError) { reject(results); } resolve(results); }); }); }); } // CONCATENATED MODULE: ./node_modules/rc-field-form/es/utils/NameMap.js /** * NameMap like a `Map` but accepts `string[]` as key. */ var NameMap_NameMap = /*#__PURE__*/function () { function NameMap() { Object(classCallCheck["a" /* default */])(this, NameMap); this.list = []; } Object(createClass["a" /* default */])(NameMap, [{ key: "set", value: function set(key, value) { var index = this.list.findIndex(function (item) { return matchNamePath(item.key, key); }); if (index !== -1) { this.list[index].value = value; } else { this.list.push({ key: key, value: value }); } } }, { key: "get", value: function get(key) { var result = this.list.find(function (item) { return matchNamePath(item.key, key); }); return result && result.value; } }, { key: "update", value: function update(key, updater) { var origin = this.get(key); var next = updater(origin); if (!next) { this.delete(key); } else { this.set(key, next); } } }, { key: "delete", value: function _delete(key) { this.list = this.list.filter(function (item) { return !matchNamePath(item.key, key); }); } }, { key: "map", value: function map(callback) { return this.list.map(callback); } }, { key: "toJSON", value: function toJSON() { var json = {}; this.map(function (_ref) { var key = _ref.key, value = _ref.value; json[key.join('.')] = value; return null; }); return json; } }]); return NameMap; }(); /* harmony default export */ var utils_NameMap = (NameMap_NameMap); // CONCATENATED MODULE: ./node_modules/rc-field-form/es/useForm.js function useForm_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function useForm_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { useForm_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { useForm_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } var useForm_FormStore = function FormStore(forceRootUpdate) { var _this = this; Object(classCallCheck["a" /* default */])(this, FormStore); this.formHooked = false; this.subscribable = true; this.store = {}; this.fieldEntities = []; this.initialValues = {}; this.callbacks = {}; this.validateMessages = null; this.preserve = null; this.lastValidatePromise = null; this.getForm = function () { return { getFieldValue: _this.getFieldValue, getFieldsValue: _this.getFieldsValue, getFieldError: _this.getFieldError, getFieldsError: _this.getFieldsError, isFieldsTouched: _this.isFieldsTouched, isFieldTouched: _this.isFieldTouched, isFieldValidating: _this.isFieldValidating, isFieldsValidating: _this.isFieldsValidating, resetFields: _this.resetFields, setFields: _this.setFields, setFieldsValue: _this.setFieldsValue, validateFields: _this.validateFields, submit: _this.submit, getInternalHooks: _this.getInternalHooks }; }; // ======================== Internal Hooks ======================== this.getInternalHooks = function (key) { if (key === HOOK_MARK) { _this.formHooked = true; return { dispatch: _this.dispatch, registerField: _this.registerField, useSubscribe: _this.useSubscribe, setInitialValues: _this.setInitialValues, setCallbacks: _this.setCallbacks, setValidateMessages: _this.setValidateMessages, getFields: _this.getFields, setPreserve: _this.setPreserve }; } Object(warning["a" /* default */])(false, '`getInternalHooks` is internal usage. Should not call directly.'); return null; }; this.useSubscribe = function (subscribable) { _this.subscribable = subscribable; }; /** * First time `setInitialValues` should update store with initial value */ this.setInitialValues = function (initialValues, init) { _this.initialValues = initialValues || {}; if (init) { _this.store = setValues({}, initialValues, _this.store); } }; this.getInitialValue = function (namePath) { return getValue(_this.initialValues, namePath); }; this.setCallbacks = function (callbacks) { _this.callbacks = callbacks; }; this.setValidateMessages = function (validateMessages) { _this.validateMessages = validateMessages; }; this.setPreserve = function (preserve) { _this.preserve = preserve; }; // ========================== Dev Warning ========================= this.timeoutId = null; this.warningUnhooked = function () { if (false) {} }; // ============================ Fields ============================ /** * Get registered field entities. * @param pure Only return field which has a `name`. Default: false */ this.getFieldEntities = function () { var pure = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; if (!pure) { return _this.fieldEntities; } return _this.fieldEntities.filter(function (field) { return field.getNamePath().length; }); }; this.getFieldsMap = function () { var pure = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; var cache = new utils_NameMap(); _this.getFieldEntities(pure).forEach(function (field) { var namePath = field.getNamePath(); cache.set(namePath, field); }); return cache; }; this.getFieldEntitiesForNamePathList = function (nameList) { if (!nameList) { return _this.getFieldEntities(true); } var cache = _this.getFieldsMap(true); return nameList.map(function (name) { var namePath = getNamePath(name); return cache.get(namePath) || { INVALIDATE_NAME_PATH: getNamePath(name) }; }); }; this.getFieldsValue = function (nameList, filterFunc) { _this.warningUnhooked(); if (nameList === true && !filterFunc) { return _this.store; } var fieldEntities = _this.getFieldEntitiesForNamePathList(Array.isArray(nameList) ? nameList : null); var filteredNameList = []; fieldEntities.forEach(function (entity) { var namePath = 'INVALIDATE_NAME_PATH' in entity ? entity.INVALIDATE_NAME_PATH : entity.getNamePath(); if (!filterFunc) { filteredNameList.push(namePath); } else { var meta = 'getMeta' in entity ? entity.getMeta() : null; if (filterFunc(meta)) { filteredNameList.push(namePath); } } }); return cloneByNamePathList(_this.store, filteredNameList.map(getNamePath)); }; this.getFieldValue = function (name) { _this.warningUnhooked(); var namePath = getNamePath(name); return getValue(_this.store, namePath); }; this.getFieldsError = function (nameList) { _this.warningUnhooked(); var fieldEntities = _this.getFieldEntitiesForNamePathList(nameList); return fieldEntities.map(function (entity, index) { if (entity && !('INVALIDATE_NAME_PATH' in entity)) { return { name: entity.getNamePath(), errors: entity.getErrors() }; } return { name: getNamePath(nameList[index]), errors: [] }; }); }; this.getFieldError = function (name) { _this.warningUnhooked(); var namePath = getNamePath(name); var fieldError = _this.getFieldsError([namePath])[0]; return fieldError.errors; }; this.isFieldsTouched = function () { _this.warningUnhooked(); for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } var arg0 = args[0], arg1 = args[1]; var namePathList; var isAllFieldsTouched = false; if (args.length === 0) { namePathList = null; } else if (args.length === 1) { if (Array.isArray(arg0)) { namePathList = arg0.map(getNamePath); isAllFieldsTouched = false; } else { namePathList = null; isAllFieldsTouched = arg0; } } else { namePathList = arg0.map(getNamePath); isAllFieldsTouched = arg1; } var testTouched = function testTouched(field) { // Not provide `nameList` will check all the fields if (!namePathList) { return field.isFieldTouched(); } var fieldNamePath = field.getNamePath(); if (containsNamePath(namePathList, fieldNamePath)) { return field.isFieldTouched(); } return isAllFieldsTouched; }; return isAllFieldsTouched ? _this.getFieldEntities(true).every(testTouched) : _this.getFieldEntities(true).some(testTouched); }; this.isFieldTouched = function (name) { _this.warningUnhooked(); return _this.isFieldsTouched([name]); }; this.isFieldsValidating = function (nameList) { _this.warningUnhooked(); var fieldEntities = _this.getFieldEntities(); if (!nameList) { return fieldEntities.some(function (testField) { return testField.isFieldValidating(); }); } var namePathList = nameList.map(getNamePath); return fieldEntities.some(function (testField) { var fieldNamePath = testField.getNamePath(); return containsNamePath(namePathList, fieldNamePath) && testField.isFieldValidating(); }); }; this.isFieldValidating = function (name) { _this.warningUnhooked(); return _this.isFieldsValidating([name]); }; /** * Reset Field with field `initialValue` prop. * Can pass `entities` or `namePathList` or just nothing. */ this.resetWithFieldInitialValue = function () { var info = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; // Create cache var cache = new utils_NameMap(); var fieldEntities = _this.getFieldEntities(true); fieldEntities.forEach(function (field) { var initialValue = field.props.initialValue; var namePath = field.getNamePath(); // Record only if has `initialValue` if (initialValue !== undefined) { var records = cache.get(namePath) || new Set(); records.add({ entity: field, value: initialValue }); cache.set(namePath, records); } }); // Reset var resetWithFields = function resetWithFields(entities) { entities.forEach(function (field) { var initialValue = field.props.initialValue; if (initialValue !== undefined) { var namePath = field.getNamePath(); var formInitialValue = _this.getInitialValue(namePath); if (formInitialValue !== undefined) { // Warning if conflict with form initialValues and do not modify value Object(warning["a" /* default */])(false, "Form already set 'initialValues' with path '".concat(namePath.join('.'), "'. Field can not overwrite it.")); } else { var records = cache.get(namePath); if (records && records.size > 1) { // Warning if multiple field set `initialValue`and do not modify value Object(warning["a" /* default */])(false, "Multiple Field with path '".concat(namePath.join('.'), "' set 'initialValue'. Can not decide which one to pick.")); } else if (records) { var originValue = _this.getFieldValue(namePath); // Set `initialValue` if (!info.skipExist || originValue === undefined) { _this.store = setValue(_this.store, namePath, Object(toConsumableArray["a" /* default */])(records)[0].value); } } } } }); }; var requiredFieldEntities; if (info.entities) { requiredFieldEntities = info.entities; } else if (info.namePathList) { requiredFieldEntities = []; info.namePathList.forEach(function (namePath) { var records = cache.get(namePath); if (records) { var _requiredFieldEntitie; (_requiredFieldEntitie = requiredFieldEntities).push.apply(_requiredFieldEntitie, Object(toConsumableArray["a" /* default */])(Object(toConsumableArray["a" /* default */])(records).map(function (r) { return r.entity; }))); } }); } else { requiredFieldEntities = fieldEntities; } resetWithFields(requiredFieldEntities); }; this.resetFields = function (nameList) { _this.warningUnhooked(); var prevStore = _this.store; if (!nameList) { _this.store = setValues({}, _this.initialValues); _this.resetWithFieldInitialValue(); _this.notifyObservers(prevStore, null, { type: 'reset' }); return; } // Reset by `nameList` var namePathList = nameList.map(getNamePath); namePathList.forEach(function (namePath) { var initialValue = _this.getInitialValue(namePath); _this.store = setValue(_this.store, namePath, initialValue); }); _this.resetWithFieldInitialValue({ namePathList: namePathList }); _this.notifyObservers(prevStore, namePathList, { type: 'reset' }); }; this.setFields = function (fields) { _this.warningUnhooked(); var prevStore = _this.store; fields.forEach(function (fieldData) { var name = fieldData.name, errors = fieldData.errors, data = Object(objectWithoutProperties["a" /* default */])(fieldData, ["name", "errors"]); var namePath = getNamePath(name); // Value if ('value' in data) { _this.store = setValue(_this.store, namePath, data.value); } _this.notifyObservers(prevStore, [namePath], { type: 'setField', data: fieldData }); }); }; this.getFields = function () { var entities = _this.getFieldEntities(true); var fields = entities.map(function (field) { var namePath = field.getNamePath(); var meta = field.getMeta(); var fieldData = useForm_objectSpread({}, meta, { name: namePath, value: _this.getFieldValue(namePath) }); Object.defineProperty(fieldData, 'originRCField', { value: true }); return fieldData; }); return fields; }; // =========================== Observer =========================== this.registerField = function (entity) { _this.fieldEntities.push(entity); // Set initial values if (entity.props.initialValue !== undefined) { var prevStore = _this.store; _this.resetWithFieldInitialValue({ entities: [entity], skipExist: true }); _this.notifyObservers(prevStore, [entity.getNamePath()], { type: 'valueUpdate', source: 'internal' }); } // un-register field callback return function (preserve) { _this.fieldEntities = _this.fieldEntities.filter(function (item) { return item !== entity; }); // Clean up store value if preserve var mergedPreserve = preserve !== undefined ? preserve : _this.preserve; if (mergedPreserve === false) { var namePath = entity.getNamePath(); if (_this.getFieldValue(namePath) !== undefined) { _this.store = setValue(_this.store, namePath, undefined); } } }; }; this.dispatch = function (action) { switch (action.type) { case 'updateValue': { var namePath = action.namePath, value = action.value; _this.updateValue(namePath, value); break; } case 'validateField': { var _namePath = action.namePath, triggerName = action.triggerName; _this.validateFields([_namePath], { triggerName: triggerName }); break; } default: // Currently we don't have other action. Do nothing. } }; this.notifyObservers = function (prevStore, namePathList, info) { if (_this.subscribable) { var mergedInfo = useForm_objectSpread({}, info, { store: _this.getFieldsValue(true) }); _this.getFieldEntities().forEach(function (_ref) { var onStoreChange = _ref.onStoreChange; onStoreChange(prevStore, namePathList, mergedInfo); }); } else { _this.forceRootUpdate(); } }; this.updateValue = function (name, value) { var namePath = getNamePath(name); var prevStore = _this.store; _this.store = setValue(_this.store, namePath, value); _this.notifyObservers(prevStore, [namePath], { type: 'valueUpdate', source: 'internal' }); // Notify dependencies children with parent update var childrenFields = _this.getDependencyChildrenFields(namePath); _this.validateFields(childrenFields); _this.notifyObservers(prevStore, childrenFields, { type: 'dependenciesUpdate', relatedFields: [namePath].concat(Object(toConsumableArray["a" /* default */])(childrenFields)) }); // trigger callback function var onValuesChange = _this.callbacks.onValuesChange; if (onValuesChange) { var changedValues = cloneByNamePathList(_this.store, [namePath]); onValuesChange(changedValues, _this.store); } _this.triggerOnFieldsChange([namePath].concat(Object(toConsumableArray["a" /* default */])(childrenFields))); }; // Let all child Field get update. this.setFieldsValue = function (store) { _this.warningUnhooked(); var prevStore = _this.store; if (store) { _this.store = setValues(_this.store, store); } _this.notifyObservers(prevStore, null, { type: 'valueUpdate', source: 'external' }); }; this.getDependencyChildrenFields = function (rootNamePath) { var children = new Set(); var childrenFields = []; var dependencies2fields = new utils_NameMap(); /** * Generate maps * Can use cache to save perf if user report performance issue with this */ _this.getFieldEntities().forEach(function (field) { var dependencies = field.props.dependencies; (dependencies || []).forEach(function (dependency) { var dependencyNamePath = getNamePath(dependency); dependencies2fields.update(dependencyNamePath, function () { var fields = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new Set(); fields.add(field); return fields; }); }); }); var fillChildren = function fillChildren(namePath) { var fields = dependencies2fields.get(namePath) || new Set(); fields.forEach(function (field) { if (!children.has(field)) { children.add(field); var fieldNamePath = field.getNamePath(); if (field.isFieldDirty() && fieldNamePath.length) { childrenFields.push(fieldNamePath); fillChildren(fieldNamePath); } } }); }; fillChildren(rootNamePath); return childrenFields; }; this.triggerOnFieldsChange = function (namePathList, filedErrors) { var onFieldsChange = _this.callbacks.onFieldsChange; if (onFieldsChange) { var fields = _this.getFields(); /** * Fill errors since `fields` may be replaced by controlled fields */ if (filedErrors) { var cache = new utils_NameMap(); filedErrors.forEach(function (_ref2) { var name = _ref2.name, errors = _ref2.errors; cache.set(name, errors); }); fields.forEach(function (field) { // eslint-disable-next-line no-param-reassign field.errors = cache.get(field.name) || field.errors; }); } var changedFields = fields.filter(function (_ref3) { var fieldName = _ref3.name; return containsNamePath(namePathList, fieldName); }); onFieldsChange(changedFields, fields); } }; // =========================== Validate =========================== this.validateFields = function (nameList, options) { _this.warningUnhooked(); var provideNameList = !!nameList; var namePathList = provideNameList ? nameList.map(getNamePath) : []; // Collect result in promise list var promiseList = []; _this.getFieldEntities(true).forEach(function (field) { // Add field if not provide `nameList` if (!provideNameList) { namePathList.push(field.getNamePath()); } // Skip if without rule if (!field.props.rules || !field.props.rules.length) { return; } var fieldNamePath = field.getNamePath(); // Add field validate rule in to promise list if (!provideNameList || containsNamePath(namePathList, fieldNamePath)) { var promise = field.validateRules(useForm_objectSpread({ validateMessages: useForm_objectSpread({}, defaultValidateMessages, {}, _this.validateMessages) }, options)); // Wrap promise with field promiseList.push(promise.then(function () { return { name: fieldNamePath, errors: [] }; }).catch(function (errors) { return Promise.reject({ name: fieldNamePath, errors: errors }); })); } }); var summaryPromise = allPromiseFinish(promiseList); _this.lastValidatePromise = summaryPromise; // Notify fields with rule that validate has finished and need update summaryPromise.catch(function (results) { return results; }).then(function (results) { var resultNamePathList = results.map(function (_ref4) { var name = _ref4.name; return name; }); _this.notifyObservers(_this.store, resultNamePathList, { type: 'validateFinish' }); _this.triggerOnFieldsChange(resultNamePathList, results); }); var returnPromise = summaryPromise.then(function () { if (_this.lastValidatePromise === summaryPromise) { return Promise.resolve(_this.getFieldsValue(namePathList)); } return Promise.reject([]); }).catch(function (results) { var errorList = results.filter(function (result) { return result && result.errors.length; }); return Promise.reject({ values: _this.getFieldsValue(namePathList), errorFields: errorList, outOfDate: _this.lastValidatePromise !== summaryPromise }); }); // Do not throw in console returnPromise.catch(function (e) { return e; }); return returnPromise; }; // ============================ Submit ============================ this.submit = function () { _this.warningUnhooked(); _this.validateFields().then(function (values) { var onFinish = _this.callbacks.onFinish; if (onFinish) { try { onFinish(values); } catch (err) { // Should print error if user `onFinish` callback failed console.error(err); } } }).catch(function (e) { var onFinishFailed = _this.callbacks.onFinishFailed; if (onFinishFailed) { onFinishFailed(e); } }); }; this.forceRootUpdate = forceRootUpdate; }; function useForm(form) { var formRef = external_React_["useRef"](); var _React$useState = external_React_["useState"](), _React$useState2 = Object(slicedToArray["a" /* default */])(_React$useState, 2), forceUpdate = _React$useState2[1]; if (!formRef.current) { if (form) { formRef.current = form; } else { // Create a new FormStore if not provided var forceReRender = function forceReRender() { forceUpdate({}); }; var formStore = new useForm_FormStore(forceReRender); formRef.current = formStore.getForm(); } } return [formRef.current]; } /* harmony default export */ var es_useForm = (useForm); // CONCATENATED MODULE: ./node_modules/rc-field-form/es/FormContext.js function FormContext_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function FormContext_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { FormContext_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { FormContext_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } var FormContext = /*#__PURE__*/external_React_["createContext"]({ triggerFormChange: function triggerFormChange() {}, triggerFormFinish: function triggerFormFinish() {}, registerForm: function registerForm() {}, unregisterForm: function unregisterForm() {} }); var FormContext_FormProvider = function FormProvider(_ref) { var validateMessages = _ref.validateMessages, onFormChange = _ref.onFormChange, onFormFinish = _ref.onFormFinish, children = _ref.children; var formContext = external_React_["useContext"](FormContext); var formsRef = external_React_["useRef"]({}); return /*#__PURE__*/external_React_["createElement"](FormContext.Provider, { value: FormContext_objectSpread({}, formContext, { validateMessages: FormContext_objectSpread({}, formContext.validateMessages, {}, validateMessages), // ========================================================= // = Global Form Control = // ========================================================= triggerFormChange: function triggerFormChange(name, changedFields) { if (onFormChange) { onFormChange(name, { changedFields: changedFields, forms: formsRef.current }); } formContext.triggerFormChange(name, changedFields); }, triggerFormFinish: function triggerFormFinish(name, values) { if (onFormFinish) { onFormFinish(name, { values: values, forms: formsRef.current }); } formContext.triggerFormFinish(name, values); }, registerForm: function registerForm(name, form) { if (name) { formsRef.current = FormContext_objectSpread({}, formsRef.current, Object(defineProperty["a" /* default */])({}, name, form)); } formContext.registerForm(name, form); }, unregisterForm: function unregisterForm(name) { var newForms = FormContext_objectSpread({}, formsRef.current); delete newForms[name]; formsRef.current = newForms; formContext.unregisterForm(name); } }) }, children); }; /* harmony default export */ var es_FormContext = (FormContext); // CONCATENATED MODULE: ./node_modules/rc-field-form/es/Form.js function Form_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function Form_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { Form_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { Form_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } var Form_Form = function Form(_ref, ref) { var name = _ref.name, initialValues = _ref.initialValues, fields = _ref.fields, form = _ref.form, preserve = _ref.preserve, children = _ref.children, _ref$component = _ref.component, Component = _ref$component === void 0 ? 'form' : _ref$component, validateMessages = _ref.validateMessages, _ref$validateTrigger = _ref.validateTrigger, validateTrigger = _ref$validateTrigger === void 0 ? 'onChange' : _ref$validateTrigger, onValuesChange = _ref.onValuesChange, _onFieldsChange = _ref.onFieldsChange, _onFinish = _ref.onFinish, onFinishFailed = _ref.onFinishFailed, restProps = Object(objectWithoutProperties["a" /* default */])(_ref, ["name", "initialValues", "fields", "form", "preserve", "children", "component", "validateMessages", "validateTrigger", "onValuesChange", "onFieldsChange", "onFinish", "onFinishFailed"]); var formContext = external_React_["useContext"](es_FormContext); // We customize handle event since Context will makes all the consumer re-render: // https://reactjs.org/docs/context.html#contextprovider var _useForm = es_useForm(form), _useForm2 = Object(slicedToArray["a" /* default */])(_useForm, 1), formInstance = _useForm2[0]; var _formInstance$getInte = formInstance.getInternalHooks(HOOK_MARK), useSubscribe = _formInstance$getInte.useSubscribe, setInitialValues = _formInstance$getInte.setInitialValues, setCallbacks = _formInstance$getInte.setCallbacks, setValidateMessages = _formInstance$getInte.setValidateMessages, setPreserve = _formInstance$getInte.setPreserve; // Pass ref with form instance external_React_["useImperativeHandle"](ref, function () { return formInstance; }); // Register form into Context external_React_["useEffect"](function () { formContext.registerForm(name, formInstance); return function () { formContext.unregisterForm(name); }; }, [formContext, formInstance, name]); // Pass props to store setValidateMessages(Form_objectSpread({}, formContext.validateMessages, {}, validateMessages)); setCallbacks({ onValuesChange: onValuesChange, onFieldsChange: function onFieldsChange(changedFields) { formContext.triggerFormChange(name, changedFields); if (_onFieldsChange) { for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { rest[_key - 1] = arguments[_key]; } _onFieldsChange.apply(void 0, [changedFields].concat(rest)); } }, onFinish: function onFinish(values) { formContext.triggerFormFinish(name, values); if (_onFinish) { _onFinish(values); } }, onFinishFailed: onFinishFailed }); setPreserve(preserve); // Set initial value, init store value when first mount var mountRef = external_React_["useRef"](null); setInitialValues(initialValues, !mountRef.current); if (!mountRef.current) { mountRef.current = true; } // Prepare children by `children` type var childrenNode = children; var childrenRenderProps = typeof children === 'function'; if (childrenRenderProps) { var values = formInstance.getFieldsValue(true); childrenNode = children(values, formInstance); } // Not use subscribe when using render props useSubscribe(!childrenRenderProps); // Listen if fields provided. We use ref to save prev data here to avoid additional render var prevFieldsRef = external_React_["useRef"](); external_React_["useEffect"](function () { if (!isSimilar(prevFieldsRef.current || [], fields || [])) { formInstance.setFields(fields || []); } prevFieldsRef.current = fields; }, [fields, formInstance]); var formContextValue = external_React_["useMemo"](function () { return Form_objectSpread({}, formInstance, { validateTrigger: validateTrigger }); }, [formInstance, validateTrigger]); var wrapperNode = /*#__PURE__*/external_React_["createElement"](FieldContext.Provider, { value: formContextValue }, childrenNode); if (Component === false) { return wrapperNode; } return /*#__PURE__*/external_React_["createElement"](Component, Object.assign({}, restProps, { onSubmit: function onSubmit(event) { event.preventDefault(); event.stopPropagation(); formInstance.submit(); } }), wrapperNode); }; /* harmony default export */ var es_Form = (Form_Form); // CONCATENATED MODULE: ./node_modules/rc-field-form/es/index.js var InternalForm = /*#__PURE__*/external_React_["forwardRef"](es_Form); var RefForm = InternalForm; RefForm.FormProvider = FormContext_FormProvider; RefForm.Field = es_Field; RefForm.List = es_List; RefForm.useForm = es_useForm; /* harmony default export */ var es = __webpack_exports__["default"] = (RefForm); /***/ }) /******/ ])["default"];