| @@ -1,4 +1,4 @@ | ||
| 1 | 1 | /******/ (() => { // webpackBootstrap |
| 2 | 2 | /******/ var __webpack_modules__ = ({ |
| 3 | 3 | |
| 4 | 4 | /***/ "../assets/dev/js/editor/utils/is-instanceof.js": |
| @@ -4329,9 +4329,9 @@ | ||
| 4329 | 4329 | var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); |
| 4330 | 4330 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 4331 | 4331 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 4332 | 4332 | var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); |
| 4333 | -var _toolkit = __webpack_require__(/*! @reduxjs/toolkit */ "../node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js"); | |
| 4333 | +var _toolkit = __webpack_require__(/*! @reduxjs/toolkit */ "@reduxjs/toolkit"); | |
| 4334 | 4334 | function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } |
| 4335 | 4335 | function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } |
| 4336 | 4336 | /** |
| 4337 | 4337 | * @typedef {import('@reduxjs/toolkit').Slice} Slice |
| @@ -5903,9 +5903,9 @@ | ||
| 5903 | 5903 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 5904 | 5904 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 5905 | 5905 | var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); |
| 5906 | 5906 | var _commandCallbackBase = _interopRequireDefault(__webpack_require__(/*! elementor-api/modules/command-callback-base */ "../modules/web-cli/assets/js/modules/command-callback-base.js")); |
| 5907 | -var _toolkit = __webpack_require__(/*! @reduxjs/toolkit */ "../node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js"); | |
| 5907 | +var _toolkit = __webpack_require__(/*! @reduxjs/toolkit */ "@reduxjs/toolkit"); | |
| 5908 | 5908 | var _module = _interopRequireDefault(__webpack_require__(/*! elementor/assets/dev/js/modules/imports/module.js */ "../assets/dev/js/modules/imports/module.js")); |
| 5909 | 5909 | var _forceMethodImplementation = _interopRequireDefault(__webpack_require__(/*! ../utils/force-method-implementation */ "../modules/web-cli/assets/js/utils/force-method-implementation.js")); |
| 5910 | 5910 | var _deprecation = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/deprecation */ "../modules/web-cli/assets/js/utils/deprecation.js")); |
| 5911 | 5911 | function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } |
| @@ -7675,145 +7675,8 @@ | ||
| 7675 | 7675 | module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 7676 | 7676 | |
| 7677 | 7677 | /***/ }), |
| 7678 | 7678 | |
| 7679 | -/***/ "../node_modules/@babel/runtime/helpers/esm/defineProperty.js": | |
| 7680 | -/*!********************************************************************!*\ | |
| 7681 | - !*** ../node_modules/@babel/runtime/helpers/esm/defineProperty.js ***! | |
| 7682 | - \********************************************************************/ | |
| 7683 | -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { | |
| 7684 | - | |
| 7685 | -"use strict"; | |
| 7686 | -__webpack_require__.r(__webpack_exports__); | |
| 7687 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 7688 | -/* harmony export */ "default": () => (/* binding */ _defineProperty) | |
| 7689 | -/* harmony export */ }); | |
| 7690 | -/* harmony import */ var _toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js"); | |
| 7691 | - | |
| 7692 | -function _defineProperty(e, r, t) { | |
| 7693 | - return (r = (0,_toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__["default"])(r)) in e ? Object.defineProperty(e, r, { | |
| 7694 | - value: t, | |
| 7695 | - enumerable: !0, | |
| 7696 | - configurable: !0, | |
| 7697 | - writable: !0 | |
| 7698 | - }) : e[r] = t, e; | |
| 7699 | -} | |
| 7700 | - | |
| 7701 | - | |
| 7702 | -/***/ }), | |
| 7703 | - | |
| 7704 | -/***/ "../node_modules/@babel/runtime/helpers/esm/objectSpread2.js": | |
| 7705 | -/*!*******************************************************************!*\ | |
| 7706 | - !*** ../node_modules/@babel/runtime/helpers/esm/objectSpread2.js ***! | |
| 7707 | - \*******************************************************************/ | |
| 7708 | -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { | |
| 7709 | - | |
| 7710 | -"use strict"; | |
| 7711 | -__webpack_require__.r(__webpack_exports__); | |
| 7712 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 7713 | -/* harmony export */ "default": () => (/* binding */ _objectSpread2) | |
| 7714 | -/* harmony export */ }); | |
| 7715 | -/* harmony import */ var _defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defineProperty.js */ "../node_modules/@babel/runtime/helpers/esm/defineProperty.js"); | |
| 7716 | - | |
| 7717 | -function ownKeys(e, r) { | |
| 7718 | - var t = Object.keys(e); | |
| 7719 | - if (Object.getOwnPropertySymbols) { | |
| 7720 | - var o = Object.getOwnPropertySymbols(e); | |
| 7721 | - r && (o = o.filter(function (r) { | |
| 7722 | - return Object.getOwnPropertyDescriptor(e, r).enumerable; | |
| 7723 | - })), t.push.apply(t, o); | |
| 7724 | - } | |
| 7725 | - return t; | |
| 7726 | -} | |
| 7727 | -function _objectSpread2(e) { | |
| 7728 | - for (var r = 1; r < arguments.length; r++) { | |
| 7729 | - var t = null != arguments[r] ? arguments[r] : {}; | |
| 7730 | - r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { | |
| 7731 | - (0,_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__["default"])(e, r, t[r]); | |
| 7732 | - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { | |
| 7733 | - Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); | |
| 7734 | - }); | |
| 7735 | - } | |
| 7736 | - return e; | |
| 7737 | -} | |
| 7738 | - | |
| 7739 | - | |
| 7740 | -/***/ }), | |
| 7741 | - | |
| 7742 | -/***/ "../node_modules/@babel/runtime/helpers/esm/toPrimitive.js": | |
| 7743 | -/*!*****************************************************************!*\ | |
| 7744 | - !*** ../node_modules/@babel/runtime/helpers/esm/toPrimitive.js ***! | |
| 7745 | - \*****************************************************************/ | |
| 7746 | -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { | |
| 7747 | - | |
| 7748 | -"use strict"; | |
| 7749 | -__webpack_require__.r(__webpack_exports__); | |
| 7750 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 7751 | -/* harmony export */ "default": () => (/* binding */ toPrimitive) | |
| 7752 | -/* harmony export */ }); | |
| 7753 | -/* harmony import */ var _typeof_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/esm/typeof.js"); | |
| 7754 | - | |
| 7755 | -function toPrimitive(t, r) { | |
| 7756 | - if ("object" != (0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(t) || !t) return t; | |
| 7757 | - var e = t[Symbol.toPrimitive]; | |
| 7758 | - if (void 0 !== e) { | |
| 7759 | - var i = e.call(t, r || "default"); | |
| 7760 | - if ("object" != (0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(i)) return i; | |
| 7761 | - throw new TypeError("@@toPrimitive must return a primitive value."); | |
| 7762 | - } | |
| 7763 | - return ("string" === r ? String : Number)(t); | |
| 7764 | -} | |
| 7765 | - | |
| 7766 | - | |
| 7767 | -/***/ }), | |
| 7768 | - | |
| 7769 | -/***/ "../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js": | |
| 7770 | -/*!*******************************************************************!*\ | |
| 7771 | - !*** ../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js ***! | |
| 7772 | - \*******************************************************************/ | |
| 7773 | -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { | |
| 7774 | - | |
| 7775 | -"use strict"; | |
| 7776 | -__webpack_require__.r(__webpack_exports__); | |
| 7777 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 7778 | -/* harmony export */ "default": () => (/* binding */ toPropertyKey) | |
| 7779 | -/* harmony export */ }); | |
| 7780 | -/* harmony import */ var _typeof_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/esm/typeof.js"); | |
| 7781 | -/* harmony import */ var _toPrimitive_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./toPrimitive.js */ "../node_modules/@babel/runtime/helpers/esm/toPrimitive.js"); | |
| 7782 | - | |
| 7783 | - | |
| 7784 | -function toPropertyKey(t) { | |
| 7785 | - var i = (0,_toPrimitive_js__WEBPACK_IMPORTED_MODULE_1__["default"])(t, "string"); | |
| 7786 | - return "symbol" == (0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(i) ? i : i + ""; | |
| 7787 | -} | |
| 7788 | - | |
| 7789 | - | |
| 7790 | -/***/ }), | |
| 7791 | - | |
| 7792 | -/***/ "../node_modules/@babel/runtime/helpers/esm/typeof.js": | |
| 7793 | -/*!************************************************************!*\ | |
| 7794 | - !*** ../node_modules/@babel/runtime/helpers/esm/typeof.js ***! | |
| 7795 | - \************************************************************/ | |
| 7796 | -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { | |
| 7797 | - | |
| 7798 | -"use strict"; | |
| 7799 | -__webpack_require__.r(__webpack_exports__); | |
| 7800 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 7801 | -/* harmony export */ "default": () => (/* binding */ _typeof) | |
| 7802 | -/* harmony export */ }); | |
| 7803 | -function _typeof(o) { | |
| 7804 | - "@babel/helpers - typeof"; | |
| 7805 | - | |
| 7806 | - return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { | |
| 7807 | - return typeof o; | |
| 7808 | - } : function (o) { | |
| 7809 | - return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; | |
| 7810 | - }, _typeof(o); | |
| 7811 | -} | |
| 7812 | - | |
| 7813 | - | |
| 7814 | -/***/ }), | |
| 7815 | - | |
| 7816 | 7679 | /***/ "../node_modules/@babel/runtime/helpers/get.js": |
| 7817 | 7680 | /*!*****************************************************!*\ |
| 7818 | 7681 | !*** ../node_modules/@babel/runtime/helpers/get.js ***! |
| 7819 | 7682 | \*****************************************************/ |
| @@ -8518,3215 +8381,17 @@ | ||
| 8518 | 8381 | |
| 8519 | 8382 | |
| 8520 | 8383 | /***/ }), |
| 8521 | 8384 | |
| 8522 | -/***/ "../node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js": | |
| 8523 | -/*!******************************************************************!*\ | |
| 8524 | - !*** ../node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js ***! | |
| 8525 | - \******************************************************************/ | |
| 8526 | -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | |
| 8527 | - | |
| 8528 | -"use strict"; | |
| 8529 | -__webpack_require__.r(__webpack_exports__); | |
| 8530 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 8531 | -/* harmony export */ EnhancerArray: () => (/* binding */ EnhancerArray), | |
| 8532 | -/* harmony export */ MiddlewareArray: () => (/* binding */ MiddlewareArray), | |
| 8533 | -/* harmony export */ SHOULD_AUTOBATCH: () => (/* binding */ SHOULD_AUTOBATCH), | |
| 8534 | -/* harmony export */ TaskAbortError: () => (/* binding */ TaskAbortError), | |
| 8535 | -/* harmony export */ __DO_NOT_USE__ActionTypes: () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_1__.__DO_NOT_USE__ActionTypes), | |
| 8536 | -/* harmony export */ addListener: () => (/* binding */ addListener), | |
| 8537 | -/* harmony export */ applyMiddleware: () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_1__.applyMiddleware), | |
| 8538 | -/* harmony export */ autoBatchEnhancer: () => (/* binding */ autoBatchEnhancer), | |
| 8539 | -/* harmony export */ bindActionCreators: () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_1__.bindActionCreators), | |
| 8540 | -/* harmony export */ clearAllListeners: () => (/* binding */ clearAllListeners), | |
| 8541 | -/* harmony export */ combineReducers: () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_1__.combineReducers), | |
| 8542 | -/* harmony export */ compose: () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_1__.compose), | |
| 8543 | -/* harmony export */ configureStore: () => (/* binding */ configureStore), | |
| 8544 | -/* harmony export */ createAction: () => (/* binding */ createAction), | |
| 8545 | -/* harmony export */ createActionCreatorInvariantMiddleware: () => (/* binding */ createActionCreatorInvariantMiddleware), | |
| 8546 | -/* harmony export */ createAsyncThunk: () => (/* binding */ createAsyncThunk), | |
| 8547 | -/* harmony export */ createDraftSafeSelector: () => (/* binding */ createDraftSafeSelector), | |
| 8548 | -/* harmony export */ createEntityAdapter: () => (/* binding */ createEntityAdapter), | |
| 8549 | -/* harmony export */ createImmutableStateInvariantMiddleware: () => (/* binding */ createImmutableStateInvariantMiddleware), | |
| 8550 | -/* harmony export */ createListenerMiddleware: () => (/* binding */ createListenerMiddleware), | |
| 8551 | -/* harmony export */ createNextState: () => (/* reexport safe */ immer__WEBPACK_IMPORTED_MODULE_0__["default"]), | |
| 8552 | -/* harmony export */ createReducer: () => (/* binding */ createReducer), | |
| 8553 | -/* harmony export */ createSelector: () => (/* reexport safe */ reselect__WEBPACK_IMPORTED_MODULE_2__.createSelector), | |
| 8554 | -/* harmony export */ createSerializableStateInvariantMiddleware: () => (/* binding */ createSerializableStateInvariantMiddleware), | |
| 8555 | -/* harmony export */ createSlice: () => (/* binding */ createSlice), | |
| 8556 | -/* harmony export */ createStore: () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_1__.createStore), | |
| 8557 | -/* harmony export */ current: () => (/* reexport safe */ immer__WEBPACK_IMPORTED_MODULE_0__.current), | |
| 8558 | -/* harmony export */ findNonSerializableValue: () => (/* binding */ findNonSerializableValue), | |
| 8559 | -/* harmony export */ freeze: () => (/* reexport safe */ immer__WEBPACK_IMPORTED_MODULE_0__.freeze), | |
| 8560 | -/* harmony export */ getDefaultMiddleware: () => (/* binding */ getDefaultMiddleware), | |
| 8561 | -/* harmony export */ getType: () => (/* binding */ getType), | |
| 8562 | -/* harmony export */ isAction: () => (/* binding */ isAction), | |
| 8563 | -/* harmony export */ isActionCreator: () => (/* binding */ isActionCreator), | |
| 8564 | -/* harmony export */ isAllOf: () => (/* binding */ isAllOf), | |
| 8565 | -/* harmony export */ isAnyOf: () => (/* binding */ isAnyOf), | |
| 8566 | -/* harmony export */ isAsyncThunkAction: () => (/* binding */ isAsyncThunkAction), | |
| 8567 | -/* harmony export */ isDraft: () => (/* reexport safe */ immer__WEBPACK_IMPORTED_MODULE_0__.isDraft), | |
| 8568 | -/* harmony export */ isFluxStandardAction: () => (/* binding */ isFSA), | |
| 8569 | -/* harmony export */ isFulfilled: () => (/* binding */ isFulfilled), | |
| 8570 | -/* harmony export */ isImmutableDefault: () => (/* binding */ isImmutableDefault), | |
| 8571 | -/* harmony export */ isPending: () => (/* binding */ isPending), | |
| 8572 | -/* harmony export */ isPlain: () => (/* binding */ isPlain), | |
| 8573 | -/* harmony export */ isPlainObject: () => (/* binding */ isPlainObject), | |
| 8574 | -/* harmony export */ isRejected: () => (/* binding */ isRejected), | |
| 8575 | -/* harmony export */ isRejectedWithValue: () => (/* binding */ isRejectedWithValue), | |
| 8576 | -/* harmony export */ legacy_createStore: () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_1__.legacy_createStore), | |
| 8577 | -/* harmony export */ miniSerializeError: () => (/* binding */ miniSerializeError), | |
| 8578 | -/* harmony export */ nanoid: () => (/* binding */ nanoid), | |
| 8579 | -/* harmony export */ original: () => (/* reexport safe */ immer__WEBPACK_IMPORTED_MODULE_0__.original), | |
| 8580 | -/* harmony export */ prepareAutoBatched: () => (/* binding */ prepareAutoBatched), | |
| 8581 | -/* harmony export */ removeListener: () => (/* binding */ removeListener), | |
| 8582 | -/* harmony export */ unwrapResult: () => (/* binding */ unwrapResult) | |
| 8583 | -/* harmony export */ }); | |
| 8584 | -/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! immer */ "../node_modules/immer/dist/immer.esm.mjs"); | |
| 8585 | -/* harmony import */ var redux__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! redux */ "../node_modules/redux/es/redux.js"); | |
| 8586 | -/* harmony import */ var reselect__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! reselect */ "../node_modules/reselect/es/index.js"); | |
| 8587 | -/* harmony import */ var redux_thunk__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! redux-thunk */ "../node_modules/redux-thunk/es/index.js"); | |
| 8588 | -var __extends = (undefined && undefined.__extends) || (function () { | |
| 8589 | - var extendStatics = function (d, b) { | |
| 8590 | - extendStatics = Object.setPrototypeOf || | |
| 8591 | - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | |
| 8592 | - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | |
| 8593 | - return extendStatics(d, b); | |
| 8594 | - }; | |
| 8595 | - return function (d, b) { | |
| 8596 | - if (typeof b !== "function" && b !== null) | |
| 8597 | - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | |
| 8598 | - extendStatics(d, b); | |
| 8599 | - function __() { this.constructor = d; } | |
| 8600 | - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | |
| 8601 | - }; | |
| 8602 | -})(); | |
| 8603 | -var __generator = (undefined && undefined.__generator) || function (thisArg, body) { | |
| 8604 | - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; | |
| 8605 | - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; | |
| 8606 | - function verb(n) { return function (v) { return step([n, v]); }; } | |
| 8607 | - function step(op) { | |
| 8608 | - if (f) throw new TypeError("Generator is already executing."); | |
| 8609 | - while (_) try { | |
| 8610 | - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; | |
| 8611 | - if (y = 0, t) op = [op[0] & 2, t.value]; | |
| 8612 | - switch (op[0]) { | |
| 8613 | - case 0: case 1: t = op; break; | |
| 8614 | - case 4: _.label++; return { value: op[1], done: false }; | |
| 8615 | - case 5: _.label++; y = op[1]; op = [0]; continue; | |
| 8616 | - case 7: op = _.ops.pop(); _.trys.pop(); continue; | |
| 8617 | - default: | |
| 8618 | - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } | |
| 8619 | - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } | |
| 8620 | - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } | |
| 8621 | - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } | |
| 8622 | - if (t[2]) _.ops.pop(); | |
| 8623 | - _.trys.pop(); continue; | |
| 8624 | - } | |
| 8625 | - op = body.call(thisArg, _); | |
| 8626 | - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } | |
| 8627 | - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; | |
| 8628 | - } | |
| 8629 | -}; | |
| 8630 | -var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from) { | |
| 8631 | - for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) | |
| 8632 | - to[j] = from[i]; | |
| 8633 | - return to; | |
| 8634 | -}; | |
| 8635 | -var __defProp = Object.defineProperty; | |
| 8636 | -var __defProps = Object.defineProperties; | |
| 8637 | -var __getOwnPropDescs = Object.getOwnPropertyDescriptors; | |
| 8638 | -var __getOwnPropSymbols = Object.getOwnPropertySymbols; | |
| 8639 | -var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 8640 | -var __propIsEnum = Object.prototype.propertyIsEnumerable; | |
| 8641 | -var __defNormalProp = function (obj, key, value) { return key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value: value }) : obj[key] = value; }; | |
| 8642 | -var __spreadValues = function (a, b) { | |
| 8643 | - for (var prop in b || (b = {})) | |
| 8644 | - if (__hasOwnProp.call(b, prop)) | |
| 8645 | - __defNormalProp(a, prop, b[prop]); | |
| 8646 | - if (__getOwnPropSymbols) | |
| 8647 | - for (var _i = 0, _c = __getOwnPropSymbols(b); _i < _c.length; _i++) { | |
| 8648 | - var prop = _c[_i]; | |
| 8649 | - if (__propIsEnum.call(b, prop)) | |
| 8650 | - __defNormalProp(a, prop, b[prop]); | |
| 8651 | - } | |
| 8652 | - return a; | |
| 8653 | -}; | |
| 8654 | -var __spreadProps = function (a, b) { return __defProps(a, __getOwnPropDescs(b)); }; | |
| 8655 | -var __async = function (__this, __arguments, generator) { | |
| 8656 | - return new Promise(function (resolve, reject) { | |
| 8657 | - var fulfilled = function (value) { | |
| 8658 | - try { | |
| 8659 | - step(generator.next(value)); | |
| 8660 | - } | |
| 8661 | - catch (e) { | |
| 8662 | - reject(e); | |
| 8663 | - } | |
| 8664 | - }; | |
| 8665 | - var rejected = function (value) { | |
| 8666 | - try { | |
| 8667 | - step(generator.throw(value)); | |
| 8668 | - } | |
| 8669 | - catch (e) { | |
| 8670 | - reject(e); | |
| 8671 | - } | |
| 8672 | - }; | |
| 8673 | - var step = function (x) { return x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected); }; | |
| 8674 | - step((generator = generator.apply(__this, __arguments)).next()); | |
| 8675 | - }); | |
| 8676 | -}; | |
| 8677 | -// src/index.ts | |
| 8678 | - | |
| 8679 | - | |
| 8680 | - | |
| 8681 | - | |
| 8682 | -// src/createDraftSafeSelector.ts | |
| 8683 | - | |
| 8684 | - | |
| 8685 | -var createDraftSafeSelector = function () { | |
| 8686 | - var args = []; | |
| 8687 | - for (var _i = 0; _i < arguments.length; _i++) { | |
| 8688 | - args[_i] = arguments[_i]; | |
| 8689 | - } | |
| 8690 | - var selector = reselect__WEBPACK_IMPORTED_MODULE_2__.createSelector.apply(void 0, args); | |
| 8691 | - var wrappedSelector = function (value) { | |
| 8692 | - var rest = []; | |
| 8693 | - for (var _i = 1; _i < arguments.length; _i++) { | |
| 8694 | - rest[_i - 1] = arguments[_i]; | |
| 8695 | - } | |
| 8696 | - return selector.apply(void 0, __spreadArray([(0,immer__WEBPACK_IMPORTED_MODULE_0__.isDraft)(value) ? (0,immer__WEBPACK_IMPORTED_MODULE_0__.current)(value) : value], rest)); | |
| 8697 | - }; | |
| 8698 | - return wrappedSelector; | |
| 8699 | -}; | |
| 8700 | -// src/configureStore.ts | |
| 8701 | - | |
| 8702 | -// src/devtoolsExtension.ts | |
| 8703 | - | |
| 8704 | -var composeWithDevTools = typeof window !== "undefined" && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ : function () { | |
| 8705 | - if (arguments.length === 0) | |
| 8706 | - return void 0; | |
| 8707 | - if (typeof arguments[0] === "object") | |
| 8708 | - return redux__WEBPACK_IMPORTED_MODULE_1__.compose; | |
| 8709 | - return redux__WEBPACK_IMPORTED_MODULE_1__.compose.apply(null, arguments); | |
| 8710 | -}; | |
| 8711 | -var devToolsEnhancer = typeof window !== "undefined" && window.__REDUX_DEVTOOLS_EXTENSION__ ? window.__REDUX_DEVTOOLS_EXTENSION__ : function () { | |
| 8712 | - return function (noop2) { | |
| 8713 | - return noop2; | |
| 8714 | - }; | |
| 8715 | -}; | |
| 8716 | -// src/isPlainObject.ts | |
| 8717 | -function isPlainObject(value) { | |
| 8718 | - if (typeof value !== "object" || value === null) | |
| 8719 | - return false; | |
| 8720 | - var proto = Object.getPrototypeOf(value); | |
| 8721 | - if (proto === null) | |
| 8722 | - return true; | |
| 8723 | - var baseProto = proto; | |
| 8724 | - while (Object.getPrototypeOf(baseProto) !== null) { | |
| 8725 | - baseProto = Object.getPrototypeOf(baseProto); | |
| 8726 | - } | |
| 8727 | - return proto === baseProto; | |
| 8728 | -} | |
| 8729 | -// src/getDefaultMiddleware.ts | |
| 8730 | - | |
| 8731 | -// src/tsHelpers.ts | |
| 8732 | -var hasMatchFunction = function (v) { | |
| 8733 | - return v && typeof v.match === "function"; | |
| 8734 | -}; | |
| 8735 | -// src/createAction.ts | |
| 8736 | -function createAction(type, prepareAction) { | |
| 8737 | - function actionCreator() { | |
| 8738 | - var args = []; | |
| 8739 | - for (var _i = 0; _i < arguments.length; _i++) { | |
| 8740 | - args[_i] = arguments[_i]; | |
| 8741 | - } | |
| 8742 | - if (prepareAction) { | |
| 8743 | - var prepared = prepareAction.apply(void 0, args); | |
| 8744 | - if (!prepared) { | |
| 8745 | - throw new Error("prepareAction did not return an object"); | |
| 8746 | - } | |
| 8747 | - return __spreadValues(__spreadValues({ | |
| 8748 | - type: type, | |
| 8749 | - payload: prepared.payload | |
| 8750 | - }, "meta" in prepared && { meta: prepared.meta }), "error" in prepared && { error: prepared.error }); | |
| 8751 | - } | |
| 8752 | - return { type: type, payload: args[0] }; | |
| 8753 | - } | |
| 8754 | - actionCreator.toString = function () { return "" + type; }; | |
| 8755 | - actionCreator.type = type; | |
| 8756 | - actionCreator.match = function (action) { return action.type === type; }; | |
| 8757 | - return actionCreator; | |
| 8758 | -} | |
| 8759 | -function isAction(action) { | |
| 8760 | - return isPlainObject(action) && "type" in action; | |
| 8761 | -} | |
| 8762 | -function isActionCreator(action) { | |
| 8763 | - return typeof action === "function" && "type" in action && hasMatchFunction(action); | |
| 8764 | -} | |
| 8765 | -function isFSA(action) { | |
| 8766 | - return isAction(action) && typeof action.type === "string" && Object.keys(action).every(isValidKey); | |
| 8767 | -} | |
| 8768 | -function isValidKey(key) { | |
| 8769 | - return ["type", "payload", "error", "meta"].indexOf(key) > -1; | |
| 8770 | -} | |
| 8771 | -function getType(actionCreator) { | |
| 8772 | - return "" + actionCreator; | |
| 8773 | -} | |
| 8774 | -// src/actionCreatorInvariantMiddleware.ts | |
| 8775 | -function getMessage(type) { | |
| 8776 | - var splitType = type ? ("" + type).split("/") : []; | |
| 8777 | - var actionName = splitType[splitType.length - 1] || "actionCreator"; | |
| 8778 | - return "Detected an action creator with type \"" + (type || "unknown") + "\" being dispatched. \nMake sure you're calling the action creator before dispatching, i.e. `dispatch(" + actionName + "())` instead of `dispatch(" + actionName + ")`. This is necessary even if the action has no payload."; | |
| 8779 | -} | |
| 8780 | -function createActionCreatorInvariantMiddleware(options) { | |
| 8781 | - if (options === void 0) { options = {}; } | |
| 8782 | - if (false) // removed by dead control flow | |
| 8783 | -{} | |
| 8784 | - var _c = options.isActionCreator, isActionCreator2 = _c === void 0 ? isActionCreator : _c; | |
| 8785 | - return function () { return function (next) { return function (action) { | |
| 8786 | - if (isActionCreator2(action)) { | |
| 8787 | - console.warn(getMessage(action.type)); | |
| 8788 | - } | |
| 8789 | - return next(action); | |
| 8790 | - }; }; }; | |
| 8791 | -} | |
| 8792 | -// src/utils.ts | |
| 8793 | - | |
| 8794 | -function getTimeMeasureUtils(maxDelay, fnName) { | |
| 8795 | - var elapsed = 0; | |
| 8796 | - return { | |
| 8797 | - measureTime: function (fn) { | |
| 8798 | - var started = Date.now(); | |
| 8799 | - try { | |
| 8800 | - return fn(); | |
| 8801 | - } | |
| 8802 | - finally { | |
| 8803 | - var finished = Date.now(); | |
| 8804 | - elapsed += finished - started; | |
| 8805 | - } | |
| 8806 | - }, | |
| 8807 | - warnIfExceeded: function () { | |
| 8808 | - if (elapsed > maxDelay) { | |
| 8809 | - console.warn(fnName + " took " + elapsed + "ms, which is more than the warning threshold of " + maxDelay + "ms. \nIf your state or actions are very large, you may want to disable the middleware as it might cause too much of a slowdown in development mode. See https://redux-toolkit.js.org/api/getDefaultMiddleware for instructions.\nIt is disabled in production builds, so you don't need to worry about that."); | |
| 8810 | - } | |
| 8811 | - } | |
| 8812 | - }; | |
| 8813 | -} | |
| 8814 | -var MiddlewareArray = /** @class */ (function (_super) { | |
| 8815 | - __extends(MiddlewareArray, _super); | |
| 8816 | - function MiddlewareArray() { | |
| 8817 | - var args = []; | |
| 8818 | - for (var _i = 0; _i < arguments.length; _i++) { | |
| 8819 | - args[_i] = arguments[_i]; | |
| 8820 | - } | |
| 8821 | - var _this = _super.apply(this, args) || this; | |
| 8822 | - Object.setPrototypeOf(_this, MiddlewareArray.prototype); | |
| 8823 | - return _this; | |
| 8824 | - } | |
| 8825 | - Object.defineProperty(MiddlewareArray, Symbol.species, { | |
| 8826 | - get: function () { | |
| 8827 | - return MiddlewareArray; | |
| 8828 | - }, | |
| 8829 | - enumerable: false, | |
| 8830 | - configurable: true | |
| 8831 | - }); | |
| 8832 | - MiddlewareArray.prototype.concat = function () { | |
| 8833 | - var arr = []; | |
| 8834 | - for (var _i = 0; _i < arguments.length; _i++) { | |
| 8835 | - arr[_i] = arguments[_i]; | |
| 8836 | - } | |
| 8837 | - return _super.prototype.concat.apply(this, arr); | |
| 8838 | - }; | |
| 8839 | - MiddlewareArray.prototype.prepend = function () { | |
| 8840 | - var arr = []; | |
| 8841 | - for (var _i = 0; _i < arguments.length; _i++) { | |
| 8842 | - arr[_i] = arguments[_i]; | |
| 8843 | - } | |
| 8844 | - if (arr.length === 1 && Array.isArray(arr[0])) { | |
| 8845 | - return new (MiddlewareArray.bind.apply(MiddlewareArray, __spreadArray([void 0], arr[0].concat(this))))(); | |
| 8846 | - } | |
| 8847 | - return new (MiddlewareArray.bind.apply(MiddlewareArray, __spreadArray([void 0], arr.concat(this))))(); | |
| 8848 | - }; | |
| 8849 | - return MiddlewareArray; | |
| 8850 | -}(Array)); | |
| 8851 | -var EnhancerArray = /** @class */ (function (_super) { | |
| 8852 | - __extends(EnhancerArray, _super); | |
| 8853 | - function EnhancerArray() { | |
| 8854 | - var args = []; | |
| 8855 | - for (var _i = 0; _i < arguments.length; _i++) { | |
| 8856 | - args[_i] = arguments[_i]; | |
| 8857 | - } | |
| 8858 | - var _this = _super.apply(this, args) || this; | |
| 8859 | - Object.setPrototypeOf(_this, EnhancerArray.prototype); | |
| 8860 | - return _this; | |
| 8861 | - } | |
| 8862 | - Object.defineProperty(EnhancerArray, Symbol.species, { | |
| 8863 | - get: function () { | |
| 8864 | - return EnhancerArray; | |
| 8865 | - }, | |
| 8866 | - enumerable: false, | |
| 8867 | - configurable: true | |
| 8868 | - }); | |
| 8869 | - EnhancerArray.prototype.concat = function () { | |
| 8870 | - var arr = []; | |
| 8871 | - for (var _i = 0; _i < arguments.length; _i++) { | |
| 8872 | - arr[_i] = arguments[_i]; | |
| 8873 | - } | |
| 8874 | - return _super.prototype.concat.apply(this, arr); | |
| 8875 | - }; | |
| 8876 | - EnhancerArray.prototype.prepend = function () { | |
| 8877 | - var arr = []; | |
| 8878 | - for (var _i = 0; _i < arguments.length; _i++) { | |
| 8879 | - arr[_i] = arguments[_i]; | |
| 8880 | - } | |
| 8881 | - if (arr.length === 1 && Array.isArray(arr[0])) { | |
| 8882 | - return new (EnhancerArray.bind.apply(EnhancerArray, __spreadArray([void 0], arr[0].concat(this))))(); | |
| 8883 | - } | |
| 8884 | - return new (EnhancerArray.bind.apply(EnhancerArray, __spreadArray([void 0], arr.concat(this))))(); | |
| 8885 | - }; | |
| 8886 | - return EnhancerArray; | |
| 8887 | -}(Array)); | |
| 8888 | -function freezeDraftable(val) { | |
| 8889 | - return (0,immer__WEBPACK_IMPORTED_MODULE_0__.isDraftable)(val) ? (0,immer__WEBPACK_IMPORTED_MODULE_0__["default"])(val, function () { | |
| 8890 | - }) : val; | |
| 8891 | -} | |
| 8892 | -// src/immutableStateInvariantMiddleware.ts | |
| 8893 | -var isProduction = "development" === "production"; | |
| 8894 | -var prefix = "Invariant failed"; | |
| 8895 | -function invariant(condition, message) { | |
| 8896 | - if (condition) { | |
| 8897 | - return; | |
| 8898 | - } | |
| 8899 | - if (isProduction) { | |
| 8900 | - throw new Error(prefix); | |
| 8901 | - } | |
| 8902 | - throw new Error(prefix + ": " + (message || "")); | |
| 8903 | -} | |
| 8904 | -function stringify(obj, serializer, indent, decycler) { | |
| 8905 | - return JSON.stringify(obj, getSerialize(serializer, decycler), indent); | |
| 8906 | -} | |
| 8907 | -function getSerialize(serializer, decycler) { | |
| 8908 | - var stack = [], keys = []; | |
| 8909 | - if (!decycler) | |
| 8910 | - decycler = function (_, value) { | |
| 8911 | - if (stack[0] === value) | |
| 8912 | - return "[Circular ~]"; | |
| 8913 | - return "[Circular ~." + keys.slice(0, stack.indexOf(value)).join(".") + "]"; | |
| 8914 | - }; | |
| 8915 | - return function (key, value) { | |
| 8916 | - if (stack.length > 0) { | |
| 8917 | - var thisPos = stack.indexOf(this); | |
| 8918 | - ~thisPos ? stack.splice(thisPos + 1) : stack.push(this); | |
| 8919 | - ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key); | |
| 8920 | - if (~stack.indexOf(value)) | |
| 8921 | - value = decycler.call(this, key, value); | |
| 8922 | - } | |
| 8923 | - else | |
| 8924 | - stack.push(value); | |
| 8925 | - return serializer == null ? value : serializer.call(this, key, value); | |
| 8926 | - }; | |
| 8927 | -} | |
| 8928 | -function isImmutableDefault(value) { | |
| 8929 | - return typeof value !== "object" || value == null || Object.isFrozen(value); | |
| 8930 | -} | |
| 8931 | -function trackForMutations(isImmutable, ignorePaths, obj) { | |
| 8932 | - var trackedProperties = trackProperties(isImmutable, ignorePaths, obj); | |
| 8933 | - return { | |
| 8934 | - detectMutations: function () { | |
| 8935 | - return detectMutations(isImmutable, ignorePaths, trackedProperties, obj); | |
| 8936 | - } | |
| 8937 | - }; | |
| 8938 | -} | |
| 8939 | -function trackProperties(isImmutable, ignorePaths, obj, path, checkedObjects) { | |
| 8940 | - if (ignorePaths === void 0) { ignorePaths = []; } | |
| 8941 | - if (path === void 0) { path = ""; } | |
| 8942 | - if (checkedObjects === void 0) { checkedObjects = new Set(); } | |
| 8943 | - var tracked = { value: obj }; | |
| 8944 | - if (!isImmutable(obj) && !checkedObjects.has(obj)) { | |
| 8945 | - checkedObjects.add(obj); | |
| 8946 | - tracked.children = {}; | |
| 8947 | - for (var key in obj) { | |
| 8948 | - var childPath = path ? path + "." + key : key; | |
| 8949 | - if (ignorePaths.length && ignorePaths.indexOf(childPath) !== -1) { | |
| 8950 | - continue; | |
| 8951 | - } | |
| 8952 | - tracked.children[key] = trackProperties(isImmutable, ignorePaths, obj[key], childPath); | |
| 8953 | - } | |
| 8954 | - } | |
| 8955 | - return tracked; | |
| 8956 | -} | |
| 8957 | -function detectMutations(isImmutable, ignoredPaths, trackedProperty, obj, sameParentRef, path) { | |
| 8958 | - if (ignoredPaths === void 0) { ignoredPaths = []; } | |
| 8959 | - if (sameParentRef === void 0) { sameParentRef = false; } | |
| 8960 | - if (path === void 0) { path = ""; } | |
| 8961 | - var prevObj = trackedProperty ? trackedProperty.value : void 0; | |
| 8962 | - var sameRef = prevObj === obj; | |
| 8963 | - if (sameParentRef && !sameRef && !Number.isNaN(obj)) { | |
| 8964 | - return { wasMutated: true, path: path }; | |
| 8965 | - } | |
| 8966 | - if (isImmutable(prevObj) || isImmutable(obj)) { | |
| 8967 | - return { wasMutated: false }; | |
| 8968 | - } | |
| 8969 | - var keysToDetect = {}; | |
| 8970 | - for (var key in trackedProperty.children) { | |
| 8971 | - keysToDetect[key] = true; | |
| 8972 | - } | |
| 8973 | - for (var key in obj) { | |
| 8974 | - keysToDetect[key] = true; | |
| 8975 | - } | |
| 8976 | - var hasIgnoredPaths = ignoredPaths.length > 0; | |
| 8977 | - var _loop_1 = function (key) { | |
| 8978 | - var nestedPath = path ? path + "." + key : key; | |
| 8979 | - if (hasIgnoredPaths) { | |
| 8980 | - var hasMatches = ignoredPaths.some(function (ignored) { | |
| 8981 | - if (ignored instanceof RegExp) { | |
| 8982 | - return ignored.test(nestedPath); | |
| 8983 | - } | |
| 8984 | - return nestedPath === ignored; | |
| 8985 | - }); | |
| 8986 | - if (hasMatches) { | |
| 8987 | - return "continue"; | |
| 8988 | - } | |
| 8989 | - } | |
| 8990 | - var result = detectMutations(isImmutable, ignoredPaths, trackedProperty.children[key], obj[key], sameRef, nestedPath); | |
| 8991 | - if (result.wasMutated) { | |
| 8992 | - return { value: result }; | |
| 8993 | - } | |
| 8994 | - }; | |
| 8995 | - for (var key in keysToDetect) { | |
| 8996 | - var state_1 = _loop_1(key); | |
| 8997 | - if (typeof state_1 === "object") | |
| 8998 | - return state_1.value; | |
| 8999 | - } | |
| 9000 | - return { wasMutated: false }; | |
| 9001 | -} | |
| 9002 | -function createImmutableStateInvariantMiddleware(options) { | |
| 9003 | - if (options === void 0) { options = {}; } | |
| 9004 | - if (false) // removed by dead control flow | |
| 9005 | -{} | |
| 9006 | - var _c = options.isImmutable, isImmutable = _c === void 0 ? isImmutableDefault : _c, ignoredPaths = options.ignoredPaths, _d = options.warnAfter, warnAfter = _d === void 0 ? 32 : _d, ignore = options.ignore; | |
| 9007 | - ignoredPaths = ignoredPaths || ignore; | |
| 9008 | - var track = trackForMutations.bind(null, isImmutable, ignoredPaths); | |
| 9009 | - return function (_c) { | |
| 9010 | - var getState = _c.getState; | |
| 9011 | - var state = getState(); | |
| 9012 | - var tracker = track(state); | |
| 9013 | - var result; | |
| 9014 | - return function (next) { return function (action) { | |
| 9015 | - var measureUtils = getTimeMeasureUtils(warnAfter, "ImmutableStateInvariantMiddleware"); | |
| 9016 | - measureUtils.measureTime(function () { | |
| 9017 | - state = getState(); | |
| 9018 | - result = tracker.detectMutations(); | |
| 9019 | - tracker = track(state); | |
| 9020 | - invariant(!result.wasMutated, "A state mutation was detected between dispatches, in the path '" + (result.path || "") + "'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)"); | |
| 9021 | - }); | |
| 9022 | - var dispatchedAction = next(action); | |
| 9023 | - measureUtils.measureTime(function () { | |
| 9024 | - state = getState(); | |
| 9025 | - result = tracker.detectMutations(); | |
| 9026 | - tracker = track(state); | |
| 9027 | - result.wasMutated && invariant(!result.wasMutated, "A state mutation was detected inside a dispatch, in the path: " + (result.path || "") + ". Take a look at the reducer(s) handling the action " + stringify(action) + ". (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)"); | |
| 9028 | - }); | |
| 9029 | - measureUtils.warnIfExceeded(); | |
| 9030 | - return dispatchedAction; | |
| 9031 | - }; }; | |
| 9032 | - }; | |
| 9033 | -} | |
| 9034 | -// src/serializableStateInvariantMiddleware.ts | |
| 9035 | -function isPlain(val) { | |
| 9036 | - var type = typeof val; | |
| 9037 | - return val == null || type === "string" || type === "boolean" || type === "number" || Array.isArray(val) || isPlainObject(val); | |
| 9038 | -} | |
| 9039 | -function findNonSerializableValue(value, path, isSerializable, getEntries, ignoredPaths, cache) { | |
| 9040 | - if (path === void 0) { path = ""; } | |
| 9041 | - if (isSerializable === void 0) { isSerializable = isPlain; } | |
| 9042 | - if (ignoredPaths === void 0) { ignoredPaths = []; } | |
| 9043 | - var foundNestedSerializable; | |
| 9044 | - if (!isSerializable(value)) { | |
| 9045 | - return { | |
| 9046 | - keyPath: path || "<root>", | |
| 9047 | - value: value | |
| 9048 | - }; | |
| 9049 | - } | |
| 9050 | - if (typeof value !== "object" || value === null) { | |
| 9051 | - return false; | |
| 9052 | - } | |
| 9053 | - if (cache == null ? void 0 : cache.has(value)) | |
| 9054 | - return false; | |
| 9055 | - var entries = getEntries != null ? getEntries(value) : Object.entries(value); | |
| 9056 | - var hasIgnoredPaths = ignoredPaths.length > 0; | |
| 9057 | - var _loop_2 = function (key, nestedValue) { | |
| 9058 | - var nestedPath = path ? path + "." + key : key; | |
| 9059 | - if (hasIgnoredPaths) { | |
| 9060 | - var hasMatches = ignoredPaths.some(function (ignored) { | |
| 9061 | - if (ignored instanceof RegExp) { | |
| 9062 | - return ignored.test(nestedPath); | |
| 9063 | - } | |
| 9064 | - return nestedPath === ignored; | |
| 9065 | - }); | |
| 9066 | - if (hasMatches) { | |
| 9067 | - return "continue"; | |
| 9068 | - } | |
| 9069 | - } | |
| 9070 | - if (!isSerializable(nestedValue)) { | |
| 9071 | - return { value: { | |
| 9072 | - keyPath: nestedPath, | |
| 9073 | - value: nestedValue | |
| 9074 | - } }; | |
| 9075 | - } | |
| 9076 | - if (typeof nestedValue === "object") { | |
| 9077 | - foundNestedSerializable = findNonSerializableValue(nestedValue, nestedPath, isSerializable, getEntries, ignoredPaths, cache); | |
| 9078 | - if (foundNestedSerializable) { | |
| 9079 | - return { value: foundNestedSerializable }; | |
| 9080 | - } | |
| 9081 | - } | |
| 9082 | - }; | |
| 9083 | - for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) { | |
| 9084 | - var _c = entries_1[_i], key = _c[0], nestedValue = _c[1]; | |
| 9085 | - var state_2 = _loop_2(key, nestedValue); | |
| 9086 | - if (typeof state_2 === "object") | |
| 9087 | - return state_2.value; | |
| 9088 | - } | |
| 9089 | - if (cache && isNestedFrozen(value)) | |
| 9090 | - cache.add(value); | |
| 9091 | - return false; | |
| 9092 | -} | |
| 9093 | -function isNestedFrozen(value) { | |
| 9094 | - if (!Object.isFrozen(value)) | |
| 9095 | - return false; | |
| 9096 | - for (var _i = 0, _c = Object.values(value); _i < _c.length; _i++) { | |
| 9097 | - var nestedValue = _c[_i]; | |
| 9098 | - if (typeof nestedValue !== "object" || nestedValue === null) | |
| 9099 | - continue; | |
| 9100 | - if (!isNestedFrozen(nestedValue)) | |
| 9101 | - return false; | |
| 9102 | - } | |
| 9103 | - return true; | |
| 9104 | -} | |
| 9105 | -function createSerializableStateInvariantMiddleware(options) { | |
| 9106 | - if (options === void 0) { options = {}; } | |
| 9107 | - if (false) // removed by dead control flow | |
| 9108 | -{} | |
| 9109 | - var _c = options.isSerializable, isSerializable = _c === void 0 ? isPlain : _c, getEntries = options.getEntries, _d = options.ignoredActions, ignoredActions = _d === void 0 ? [] : _d, _e = options.ignoredActionPaths, ignoredActionPaths = _e === void 0 ? ["meta.arg", "meta.baseQueryMeta"] : _e, _f = options.ignoredPaths, ignoredPaths = _f === void 0 ? [] : _f, _g = options.warnAfter, warnAfter = _g === void 0 ? 32 : _g, _h = options.ignoreState, ignoreState = _h === void 0 ? false : _h, _j = options.ignoreActions, ignoreActions = _j === void 0 ? false : _j, _k = options.disableCache, disableCache = _k === void 0 ? false : _k; | |
| 9110 | - var cache = !disableCache && WeakSet ? new WeakSet() : void 0; | |
| 9111 | - return function (storeAPI) { return function (next) { return function (action) { | |
| 9112 | - var result = next(action); | |
| 9113 | - var measureUtils = getTimeMeasureUtils(warnAfter, "SerializableStateInvariantMiddleware"); | |
| 9114 | - if (!ignoreActions && !(ignoredActions.length && ignoredActions.indexOf(action.type) !== -1)) { | |
| 9115 | - measureUtils.measureTime(function () { | |
| 9116 | - var foundActionNonSerializableValue = findNonSerializableValue(action, "", isSerializable, getEntries, ignoredActionPaths, cache); | |
| 9117 | - if (foundActionNonSerializableValue) { | |
| 9118 | - var keyPath = foundActionNonSerializableValue.keyPath, value = foundActionNonSerializableValue.value; | |
| 9119 | - console.error("A non-serializable value was detected in an action, in the path: `" + keyPath + "`. Value:", value, "\nTake a look at the logic that dispatched this action: ", action, "\n(See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)", "\n(To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)"); | |
| 9120 | - } | |
| 9121 | - }); | |
| 9122 | - } | |
| 9123 | - if (!ignoreState) { | |
| 9124 | - measureUtils.measureTime(function () { | |
| 9125 | - var state = storeAPI.getState(); | |
| 9126 | - var foundStateNonSerializableValue = findNonSerializableValue(state, "", isSerializable, getEntries, ignoredPaths, cache); | |
| 9127 | - if (foundStateNonSerializableValue) { | |
| 9128 | - var keyPath = foundStateNonSerializableValue.keyPath, value = foundStateNonSerializableValue.value; | |
| 9129 | - console.error("A non-serializable value was detected in the state, in the path: `" + keyPath + "`. Value:", value, "\nTake a look at the reducer(s) handling this action type: " + action.type + ".\n(See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)"); | |
| 9130 | - } | |
| 9131 | - }); | |
| 9132 | - measureUtils.warnIfExceeded(); | |
| 9133 | - } | |
| 9134 | - return result; | |
| 9135 | - }; }; }; | |
| 9136 | -} | |
| 9137 | -// src/getDefaultMiddleware.ts | |
| 9138 | -function isBoolean(x) { | |
| 9139 | - return typeof x === "boolean"; | |
| 9140 | -} | |
| 9141 | -function curryGetDefaultMiddleware() { | |
| 9142 | - return function curriedGetDefaultMiddleware(options) { | |
| 9143 | - return getDefaultMiddleware(options); | |
| 9144 | - }; | |
| 9145 | -} | |
| 9146 | -function getDefaultMiddleware(options) { | |
| 9147 | - if (options === void 0) { options = {}; } | |
| 9148 | - var _c = options.thunk, thunk = _c === void 0 ? true : _c, _d = options.immutableCheck, immutableCheck = _d === void 0 ? true : _d, _e = options.serializableCheck, serializableCheck = _e === void 0 ? true : _e, _f = options.actionCreatorCheck, actionCreatorCheck = _f === void 0 ? true : _f; | |
| 9149 | - var middlewareArray = new MiddlewareArray(); | |
| 9150 | - if (thunk) { | |
| 9151 | - if (isBoolean(thunk)) { | |
| 9152 | - middlewareArray.push(redux_thunk__WEBPACK_IMPORTED_MODULE_3__["default"]); | |
| 9153 | - } | |
| 9154 | - else { | |
| 9155 | - middlewareArray.push(redux_thunk__WEBPACK_IMPORTED_MODULE_3__["default"].withExtraArgument(thunk.extraArgument)); | |
| 9156 | - } | |
| 9157 | - } | |
| 9158 | - if (true) { | |
| 9159 | - if (immutableCheck) { | |
| 9160 | - var immutableOptions = {}; | |
| 9161 | - if (!isBoolean(immutableCheck)) { | |
| 9162 | - immutableOptions = immutableCheck; | |
| 9163 | - } | |
| 9164 | - middlewareArray.unshift(createImmutableStateInvariantMiddleware(immutableOptions)); | |
| 9165 | - } | |
| 9166 | - if (serializableCheck) { | |
| 9167 | - var serializableOptions = {}; | |
| 9168 | - if (!isBoolean(serializableCheck)) { | |
| 9169 | - serializableOptions = serializableCheck; | |
| 9170 | - } | |
| 9171 | - middlewareArray.push(createSerializableStateInvariantMiddleware(serializableOptions)); | |
| 9172 | - } | |
| 9173 | - if (actionCreatorCheck) { | |
| 9174 | - var actionCreatorOptions = {}; | |
| 9175 | - if (!isBoolean(actionCreatorCheck)) { | |
| 9176 | - actionCreatorOptions = actionCreatorCheck; | |
| 9177 | - } | |
| 9178 | - middlewareArray.unshift(createActionCreatorInvariantMiddleware(actionCreatorOptions)); | |
| 9179 | - } | |
| 9180 | - } | |
| 9181 | - return middlewareArray; | |
| 9182 | -} | |
| 9183 | -// src/configureStore.ts | |
| 9184 | -var IS_PRODUCTION = "development" === "production"; | |
| 9185 | -function configureStore(options) { | |
| 9186 | - var curriedGetDefaultMiddleware = curryGetDefaultMiddleware(); | |
| 9187 | - var _c = options || {}, _d = _c.reducer, reducer = _d === void 0 ? void 0 : _d, _e = _c.middleware, middleware = _e === void 0 ? curriedGetDefaultMiddleware() : _e, _f = _c.devTools, devTools = _f === void 0 ? true : _f, _g = _c.preloadedState, preloadedState = _g === void 0 ? void 0 : _g, _h = _c.enhancers, enhancers = _h === void 0 ? void 0 : _h; | |
| 9188 | - var rootReducer; | |
| 9189 | - if (typeof reducer === "function") { | |
| 9190 | - rootReducer = reducer; | |
| 9191 | - } | |
| 9192 | - else if (isPlainObject(reducer)) { | |
| 9193 | - rootReducer = (0,redux__WEBPACK_IMPORTED_MODULE_1__.combineReducers)(reducer); | |
| 9194 | - } | |
| 9195 | - else { | |
| 9196 | - throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers'); | |
| 9197 | - } | |
| 9198 | - var finalMiddleware = middleware; | |
| 9199 | - if (typeof finalMiddleware === "function") { | |
| 9200 | - finalMiddleware = finalMiddleware(curriedGetDefaultMiddleware); | |
| 9201 | - if (!IS_PRODUCTION && !Array.isArray(finalMiddleware)) { | |
| 9202 | - throw new Error("when using a middleware builder function, an array of middleware must be returned"); | |
| 9203 | - } | |
| 9204 | - } | |
| 9205 | - if (!IS_PRODUCTION && finalMiddleware.some(function (item) { return typeof item !== "function"; })) { | |
| 9206 | - throw new Error("each middleware provided to configureStore must be a function"); | |
| 9207 | - } | |
| 9208 | - var middlewareEnhancer = redux__WEBPACK_IMPORTED_MODULE_1__.applyMiddleware.apply(void 0, finalMiddleware); | |
| 9209 | - var finalCompose = redux__WEBPACK_IMPORTED_MODULE_1__.compose; | |
| 9210 | - if (devTools) { | |
| 9211 | - finalCompose = composeWithDevTools(__spreadValues({ | |
| 9212 | - trace: !IS_PRODUCTION | |
| 9213 | - }, typeof devTools === "object" && devTools)); | |
| 9214 | - } | |
| 9215 | - var defaultEnhancers = new EnhancerArray(middlewareEnhancer); | |
| 9216 | - var storeEnhancers = defaultEnhancers; | |
| 9217 | - if (Array.isArray(enhancers)) { | |
| 9218 | - storeEnhancers = __spreadArray([middlewareEnhancer], enhancers); | |
| 9219 | - } | |
| 9220 | - else if (typeof enhancers === "function") { | |
| 9221 | - storeEnhancers = enhancers(defaultEnhancers); | |
| 9222 | - } | |
| 9223 | - var composedEnhancer = finalCompose.apply(void 0, storeEnhancers); | |
| 9224 | - return (0,redux__WEBPACK_IMPORTED_MODULE_1__.createStore)(rootReducer, preloadedState, composedEnhancer); | |
| 9225 | -} | |
| 9226 | -// src/createReducer.ts | |
| 9227 | - | |
| 9228 | -// src/mapBuilders.ts | |
| 9229 | -function executeReducerBuilderCallback(builderCallback) { | |
| 9230 | - var actionsMap = {}; | |
| 9231 | - var actionMatchers = []; | |
| 9232 | - var defaultCaseReducer; | |
| 9233 | - var builder = { | |
| 9234 | - addCase: function (typeOrActionCreator, reducer) { | |
| 9235 | - if (true) { | |
| 9236 | - if (actionMatchers.length > 0) { | |
| 9237 | - throw new Error("`builder.addCase` should only be called before calling `builder.addMatcher`"); | |
| 9238 | - } | |
| 9239 | - if (defaultCaseReducer) { | |
| 9240 | - throw new Error("`builder.addCase` should only be called before calling `builder.addDefaultCase`"); | |
| 9241 | - } | |
| 9242 | - } | |
| 9243 | - var type = typeof typeOrActionCreator === "string" ? typeOrActionCreator : typeOrActionCreator.type; | |
| 9244 | - if (!type) { | |
| 9245 | - throw new Error("`builder.addCase` cannot be called with an empty action type"); | |
| 9246 | - } | |
| 9247 | - if (type in actionsMap) { | |
| 9248 | - throw new Error("`builder.addCase` cannot be called with two reducers for the same action type"); | |
| 9249 | - } | |
| 9250 | - actionsMap[type] = reducer; | |
| 9251 | - return builder; | |
| 9252 | - }, | |
| 9253 | - addMatcher: function (matcher, reducer) { | |
| 9254 | - if (true) { | |
| 9255 | - if (defaultCaseReducer) { | |
| 9256 | - throw new Error("`builder.addMatcher` should only be called before calling `builder.addDefaultCase`"); | |
| 9257 | - } | |
| 9258 | - } | |
| 9259 | - actionMatchers.push({ matcher: matcher, reducer: reducer }); | |
| 9260 | - return builder; | |
| 9261 | - }, | |
| 9262 | - addDefaultCase: function (reducer) { | |
| 9263 | - if (true) { | |
| 9264 | - if (defaultCaseReducer) { | |
| 9265 | - throw new Error("`builder.addDefaultCase` can only be called once"); | |
| 9266 | - } | |
| 9267 | - } | |
| 9268 | - defaultCaseReducer = reducer; | |
| 9269 | - return builder; | |
| 9270 | - } | |
| 9271 | - }; | |
| 9272 | - builderCallback(builder); | |
| 9273 | - return [actionsMap, actionMatchers, defaultCaseReducer]; | |
| 9274 | -} | |
| 9275 | -// src/createReducer.ts | |
| 9276 | -function isStateFunction(x) { | |
| 9277 | - return typeof x === "function"; | |
| 9278 | -} | |
| 9279 | -var hasWarnedAboutObjectNotation = false; | |
| 9280 | -function createReducer(initialState, mapOrBuilderCallback, actionMatchers, defaultCaseReducer) { | |
| 9281 | - if (actionMatchers === void 0) { actionMatchers = []; } | |
| 9282 | - if (true) { | |
| 9283 | - if (typeof mapOrBuilderCallback === "object") { | |
| 9284 | - if (!hasWarnedAboutObjectNotation) { | |
| 9285 | - hasWarnedAboutObjectNotation = true; | |
| 9286 | - console.warn("The object notation for `createReducer` is deprecated, and will be removed in RTK 2.0. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer"); | |
| 9287 | - } | |
| 9288 | - } | |
| 9289 | - } | |
| 9290 | - var _c = typeof mapOrBuilderCallback === "function" ? executeReducerBuilderCallback(mapOrBuilderCallback) : [mapOrBuilderCallback, actionMatchers, defaultCaseReducer], actionsMap = _c[0], finalActionMatchers = _c[1], finalDefaultCaseReducer = _c[2]; | |
| 9291 | - var getInitialState; | |
| 9292 | - if (isStateFunction(initialState)) { | |
| 9293 | - getInitialState = function () { return freezeDraftable(initialState()); }; | |
| 9294 | - } | |
| 9295 | - else { | |
| 9296 | - var frozenInitialState_1 = freezeDraftable(initialState); | |
| 9297 | - getInitialState = function () { return frozenInitialState_1; }; | |
| 9298 | - } | |
| 9299 | - function reducer(state, action) { | |
| 9300 | - if (state === void 0) { state = getInitialState(); } | |
| 9301 | - var caseReducers = __spreadArray([ | |
| 9302 | - actionsMap[action.type] | |
| 9303 | - ], finalActionMatchers.filter(function (_c) { | |
| 9304 | - var matcher = _c.matcher; | |
| 9305 | - return matcher(action); | |
| 9306 | - }).map(function (_c) { | |
| 9307 | - var reducer2 = _c.reducer; | |
| 9308 | - return reducer2; | |
| 9309 | - })); | |
| 9310 | - if (caseReducers.filter(function (cr) { return !!cr; }).length === 0) { | |
| 9311 | - caseReducers = [finalDefaultCaseReducer]; | |
| 9312 | - } | |
| 9313 | - return caseReducers.reduce(function (previousState, caseReducer) { | |
| 9314 | - if (caseReducer) { | |
| 9315 | - if ((0,immer__WEBPACK_IMPORTED_MODULE_0__.isDraft)(previousState)) { | |
| 9316 | - var draft = previousState; | |
| 9317 | - var result = caseReducer(draft, action); | |
| 9318 | - if (result === void 0) { | |
| 9319 | - return previousState; | |
| 9320 | - } | |
| 9321 | - return result; | |
| 9322 | - } | |
| 9323 | - else if (!(0,immer__WEBPACK_IMPORTED_MODULE_0__.isDraftable)(previousState)) { | |
| 9324 | - var result = caseReducer(previousState, action); | |
| 9325 | - if (result === void 0) { | |
| 9326 | - if (previousState === null) { | |
| 9327 | - return previousState; | |
| 9328 | - } | |
| 9329 | - throw Error("A case reducer on a non-draftable value must not return undefined"); | |
| 9330 | - } | |
| 9331 | - return result; | |
| 9332 | - } | |
| 9333 | - else { | |
| 9334 | - return (0,immer__WEBPACK_IMPORTED_MODULE_0__["default"])(previousState, function (draft) { | |
| 9335 | - return caseReducer(draft, action); | |
| 9336 | - }); | |
| 9337 | - } | |
| 9338 | - } | |
| 9339 | - return previousState; | |
| 9340 | - }, state); | |
| 9341 | - } | |
| 9342 | - reducer.getInitialState = getInitialState; | |
| 9343 | - return reducer; | |
| 9344 | -} | |
| 9345 | -// src/createSlice.ts | |
| 9346 | -var hasWarnedAboutObjectNotation2 = false; | |
| 9347 | -function getType2(slice, actionKey) { | |
| 9348 | - return slice + "/" + actionKey; | |
| 9349 | -} | |
| 9350 | -function createSlice(options) { | |
| 9351 | - var name = options.name; | |
| 9352 | - if (!name) { | |
| 9353 | - throw new Error("`name` is a required option for createSlice"); | |
| 9354 | - } | |
| 9355 | - if (typeof process !== "undefined" && "development" === "development") { | |
| 9356 | - if (options.initialState === void 0) { | |
| 9357 | - console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`"); | |
| 9358 | - } | |
| 9359 | - } | |
| 9360 | - var initialState = typeof options.initialState == "function" ? options.initialState : freezeDraftable(options.initialState); | |
| 9361 | - var reducers = options.reducers || {}; | |
| 9362 | - var reducerNames = Object.keys(reducers); | |
| 9363 | - var sliceCaseReducersByName = {}; | |
| 9364 | - var sliceCaseReducersByType = {}; | |
| 9365 | - var actionCreators = {}; | |
| 9366 | - reducerNames.forEach(function (reducerName) { | |
| 9367 | - var maybeReducerWithPrepare = reducers[reducerName]; | |
| 9368 | - var type = getType2(name, reducerName); | |
| 9369 | - var caseReducer; | |
| 9370 | - var prepareCallback; | |
| 9371 | - if ("reducer" in maybeReducerWithPrepare) { | |
| 9372 | - caseReducer = maybeReducerWithPrepare.reducer; | |
| 9373 | - prepareCallback = maybeReducerWithPrepare.prepare; | |
| 9374 | - } | |
| 9375 | - else { | |
| 9376 | - caseReducer = maybeReducerWithPrepare; | |
| 9377 | - } | |
| 9378 | - sliceCaseReducersByName[reducerName] = caseReducer; | |
| 9379 | - sliceCaseReducersByType[type] = caseReducer; | |
| 9380 | - actionCreators[reducerName] = prepareCallback ? createAction(type, prepareCallback) : createAction(type); | |
| 9381 | - }); | |
| 9382 | - function buildReducer() { | |
| 9383 | - if (true) { | |
| 9384 | - if (typeof options.extraReducers === "object") { | |
| 9385 | - if (!hasWarnedAboutObjectNotation2) { | |
| 9386 | - hasWarnedAboutObjectNotation2 = true; | |
| 9387 | - console.warn("The object notation for `createSlice.extraReducers` is deprecated, and will be removed in RTK 2.0. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice"); | |
| 9388 | - } | |
| 9389 | - } | |
| 9390 | - } | |
| 9391 | - var _c = typeof options.extraReducers === "function" ? executeReducerBuilderCallback(options.extraReducers) : [options.extraReducers], _d = _c[0], extraReducers = _d === void 0 ? {} : _d, _e = _c[1], actionMatchers = _e === void 0 ? [] : _e, _f = _c[2], defaultCaseReducer = _f === void 0 ? void 0 : _f; | |
| 9392 | - var finalCaseReducers = __spreadValues(__spreadValues({}, extraReducers), sliceCaseReducersByType); | |
| 9393 | - return createReducer(initialState, function (builder) { | |
| 9394 | - for (var key in finalCaseReducers) { | |
| 9395 | - builder.addCase(key, finalCaseReducers[key]); | |
| 9396 | - } | |
| 9397 | - for (var _i = 0, actionMatchers_1 = actionMatchers; _i < actionMatchers_1.length; _i++) { | |
| 9398 | - var m = actionMatchers_1[_i]; | |
| 9399 | - builder.addMatcher(m.matcher, m.reducer); | |
| 9400 | - } | |
| 9401 | - if (defaultCaseReducer) { | |
| 9402 | - builder.addDefaultCase(defaultCaseReducer); | |
| 9403 | - } | |
| 9404 | - }); | |
| 9405 | - } | |
| 9406 | - var _reducer; | |
| 9407 | - return { | |
| 9408 | - name: name, | |
| 9409 | - reducer: function (state, action) { | |
| 9410 | - if (!_reducer) | |
| 9411 | - _reducer = buildReducer(); | |
| 9412 | - return _reducer(state, action); | |
| 9413 | - }, | |
| 9414 | - actions: actionCreators, | |
| 9415 | - caseReducers: sliceCaseReducersByName, | |
| 9416 | - getInitialState: function () { | |
| 9417 | - if (!_reducer) | |
| 9418 | - _reducer = buildReducer(); | |
| 9419 | - return _reducer.getInitialState(); | |
| 9420 | - } | |
| 9421 | - }; | |
| 9422 | -} | |
| 9423 | -// src/entities/entity_state.ts | |
| 9424 | -function getInitialEntityState() { | |
| 9425 | - return { | |
| 9426 | - ids: [], | |
| 9427 | - entities: {} | |
| 9428 | - }; | |
| 9429 | -} | |
| 9430 | -function createInitialStateFactory() { | |
| 9431 | - function getInitialState(additionalState) { | |
| 9432 | - if (additionalState === void 0) { additionalState = {}; } | |
| 9433 | - return Object.assign(getInitialEntityState(), additionalState); | |
| 9434 | - } | |
| 9435 | - return { getInitialState: getInitialState }; | |
| 9436 | -} | |
| 9437 | -// src/entities/state_selectors.ts | |
| 9438 | -function createSelectorsFactory() { | |
| 9439 | - function getSelectors(selectState) { | |
| 9440 | - var selectIds = function (state) { return state.ids; }; | |
| 9441 | - var selectEntities = function (state) { return state.entities; }; | |
| 9442 | - var selectAll = createDraftSafeSelector(selectIds, selectEntities, function (ids, entities) { return ids.map(function (id) { return entities[id]; }); }); | |
| 9443 | - var selectId = function (_, id) { return id; }; | |
| 9444 | - var selectById = function (entities, id) { return entities[id]; }; | |
| 9445 | - var selectTotal = createDraftSafeSelector(selectIds, function (ids) { return ids.length; }); | |
| 9446 | - if (!selectState) { | |
| 9447 | - return { | |
| 9448 | - selectIds: selectIds, | |
| 9449 | - selectEntities: selectEntities, | |
| 9450 | - selectAll: selectAll, | |
| 9451 | - selectTotal: selectTotal, | |
| 9452 | - selectById: createDraftSafeSelector(selectEntities, selectId, selectById) | |
| 9453 | - }; | |
| 9454 | - } | |
| 9455 | - var selectGlobalizedEntities = createDraftSafeSelector(selectState, selectEntities); | |
| 9456 | - return { | |
| 9457 | - selectIds: createDraftSafeSelector(selectState, selectIds), | |
| 9458 | - selectEntities: selectGlobalizedEntities, | |
| 9459 | - selectAll: createDraftSafeSelector(selectState, selectAll), | |
| 9460 | - selectTotal: createDraftSafeSelector(selectState, selectTotal), | |
| 9461 | - selectById: createDraftSafeSelector(selectGlobalizedEntities, selectId, selectById) | |
| 9462 | - }; | |
| 9463 | - } | |
| 9464 | - return { getSelectors: getSelectors }; | |
| 9465 | -} | |
| 9466 | -// src/entities/state_adapter.ts | |
| 9467 | - | |
| 9468 | -function createSingleArgumentStateOperator(mutator) { | |
| 9469 | - var operator = createStateOperator(function (_, state) { return mutator(state); }); | |
| 9470 | - return function operation(state) { | |
| 9471 | - return operator(state, void 0); | |
| 9472 | - }; | |
| 9473 | -} | |
| 9474 | -function createStateOperator(mutator) { | |
| 9475 | - return function operation(state, arg) { | |
| 9476 | - function isPayloadActionArgument(arg2) { | |
| 9477 | - return isFSA(arg2); | |
| 9478 | - } | |
| 9479 | - var runMutator = function (draft) { | |
| 9480 | - if (isPayloadActionArgument(arg)) { | |
| 9481 | - mutator(arg.payload, draft); | |
| 9482 | - } | |
| 9483 | - else { | |
| 9484 | - mutator(arg, draft); | |
| 9485 | - } | |
| 9486 | - }; | |
| 9487 | - if ((0,immer__WEBPACK_IMPORTED_MODULE_0__.isDraft)(state)) { | |
| 9488 | - runMutator(state); | |
| 9489 | - return state; | |
| 9490 | - } | |
| 9491 | - else { | |
| 9492 | - return (0,immer__WEBPACK_IMPORTED_MODULE_0__["default"])(state, runMutator); | |
| 9493 | - } | |
| 9494 | - }; | |
| 9495 | -} | |
| 9496 | -// src/entities/utils.ts | |
| 9497 | -function selectIdValue(entity, selectId) { | |
| 9498 | - var key = selectId(entity); | |
| 9499 | - if ( true && key === void 0) { | |
| 9500 | - console.warn("The entity passed to the `selectId` implementation returned undefined.", "You should probably provide your own `selectId` implementation.", "The entity that was passed:", entity, "The `selectId` implementation:", selectId.toString()); | |
| 9501 | - } | |
| 9502 | - return key; | |
| 9503 | -} | |
| 9504 | -function ensureEntitiesArray(entities) { | |
| 9505 | - if (!Array.isArray(entities)) { | |
| 9506 | - entities = Object.values(entities); | |
| 9507 | - } | |
| 9508 | - return entities; | |
| 9509 | -} | |
| 9510 | -function splitAddedUpdatedEntities(newEntities, selectId, state) { | |
| 9511 | - newEntities = ensureEntitiesArray(newEntities); | |
| 9512 | - var added = []; | |
| 9513 | - var updated = []; | |
| 9514 | - for (var _i = 0, newEntities_1 = newEntities; _i < newEntities_1.length; _i++) { | |
| 9515 | - var entity = newEntities_1[_i]; | |
| 9516 | - var id = selectIdValue(entity, selectId); | |
| 9517 | - if (id in state.entities) { | |
| 9518 | - updated.push({ id: id, changes: entity }); | |
| 9519 | - } | |
| 9520 | - else { | |
| 9521 | - added.push(entity); | |
| 9522 | - } | |
| 9523 | - } | |
| 9524 | - return [added, updated]; | |
| 9525 | -} | |
| 9526 | -// src/entities/unsorted_state_adapter.ts | |
| 9527 | -function createUnsortedStateAdapter(selectId) { | |
| 9528 | - function addOneMutably(entity, state) { | |
| 9529 | - var key = selectIdValue(entity, selectId); | |
| 9530 | - if (key in state.entities) { | |
| 9531 | - return; | |
| 9532 | - } | |
| 9533 | - state.ids.push(key); | |
| 9534 | - state.entities[key] = entity; | |
| 9535 | - } | |
| 9536 | - function addManyMutably(newEntities, state) { | |
| 9537 | - newEntities = ensureEntitiesArray(newEntities); | |
| 9538 | - for (var _i = 0, newEntities_2 = newEntities; _i < newEntities_2.length; _i++) { | |
| 9539 | - var entity = newEntities_2[_i]; | |
| 9540 | - addOneMutably(entity, state); | |
| 9541 | - } | |
| 9542 | - } | |
| 9543 | - function setOneMutably(entity, state) { | |
| 9544 | - var key = selectIdValue(entity, selectId); | |
| 9545 | - if (!(key in state.entities)) { | |
| 9546 | - state.ids.push(key); | |
| 9547 | - } | |
| 9548 | - state.entities[key] = entity; | |
| 9549 | - } | |
| 9550 | - function setManyMutably(newEntities, state) { | |
| 9551 | - newEntities = ensureEntitiesArray(newEntities); | |
| 9552 | - for (var _i = 0, newEntities_3 = newEntities; _i < newEntities_3.length; _i++) { | |
| 9553 | - var entity = newEntities_3[_i]; | |
| 9554 | - setOneMutably(entity, state); | |
| 9555 | - } | |
| 9556 | - } | |
| 9557 | - function setAllMutably(newEntities, state) { | |
| 9558 | - newEntities = ensureEntitiesArray(newEntities); | |
| 9559 | - state.ids = []; | |
| 9560 | - state.entities = {}; | |
| 9561 | - addManyMutably(newEntities, state); | |
| 9562 | - } | |
| 9563 | - function removeOneMutably(key, state) { | |
| 9564 | - return removeManyMutably([key], state); | |
| 9565 | - } | |
| 9566 | - function removeManyMutably(keys, state) { | |
| 9567 | - var didMutate = false; | |
| 9568 | - keys.forEach(function (key) { | |
| 9569 | - if (key in state.entities) { | |
| 9570 | - delete state.entities[key]; | |
| 9571 | - didMutate = true; | |
| 9572 | - } | |
| 9573 | - }); | |
| 9574 | - if (didMutate) { | |
| 9575 | - state.ids = state.ids.filter(function (id) { return id in state.entities; }); | |
| 9576 | - } | |
| 9577 | - } | |
| 9578 | - function removeAllMutably(state) { | |
| 9579 | - Object.assign(state, { | |
| 9580 | - ids: [], | |
| 9581 | - entities: {} | |
| 9582 | - }); | |
| 9583 | - } | |
| 9584 | - function takeNewKey(keys, update, state) { | |
| 9585 | - var original2 = state.entities[update.id]; | |
| 9586 | - var updated = Object.assign({}, original2, update.changes); | |
| 9587 | - var newKey = selectIdValue(updated, selectId); | |
| 9588 | - var hasNewKey = newKey !== update.id; | |
| 9589 | - if (hasNewKey) { | |
| 9590 | - keys[update.id] = newKey; | |
| 9591 | - delete state.entities[update.id]; | |
| 9592 | - } | |
| 9593 | - state.entities[newKey] = updated; | |
| 9594 | - return hasNewKey; | |
| 9595 | - } | |
| 9596 | - function updateOneMutably(update, state) { | |
| 9597 | - return updateManyMutably([update], state); | |
| 9598 | - } | |
| 9599 | - function updateManyMutably(updates, state) { | |
| 9600 | - var newKeys = {}; | |
| 9601 | - var updatesPerEntity = {}; | |
| 9602 | - updates.forEach(function (update) { | |
| 9603 | - if (update.id in state.entities) { | |
| 9604 | - updatesPerEntity[update.id] = { | |
| 9605 | - id: update.id, | |
| 9606 | - changes: __spreadValues(__spreadValues({}, updatesPerEntity[update.id] ? updatesPerEntity[update.id].changes : null), update.changes) | |
| 9607 | - }; | |
| 9608 | - } | |
| 9609 | - }); | |
| 9610 | - updates = Object.values(updatesPerEntity); | |
| 9611 | - var didMutateEntities = updates.length > 0; | |
| 9612 | - if (didMutateEntities) { | |
| 9613 | - var didMutateIds = updates.filter(function (update) { return takeNewKey(newKeys, update, state); }).length > 0; | |
| 9614 | - if (didMutateIds) { | |
| 9615 | - state.ids = Object.keys(state.entities); | |
| 9616 | - } | |
| 9617 | - } | |
| 9618 | - } | |
| 9619 | - function upsertOneMutably(entity, state) { | |
| 9620 | - return upsertManyMutably([entity], state); | |
| 9621 | - } | |
| 9622 | - function upsertManyMutably(newEntities, state) { | |
| 9623 | - var _c = splitAddedUpdatedEntities(newEntities, selectId, state), added = _c[0], updated = _c[1]; | |
| 9624 | - updateManyMutably(updated, state); | |
| 9625 | - addManyMutably(added, state); | |
| 9626 | - } | |
| 9627 | - return { | |
| 9628 | - removeAll: createSingleArgumentStateOperator(removeAllMutably), | |
| 9629 | - addOne: createStateOperator(addOneMutably), | |
| 9630 | - addMany: createStateOperator(addManyMutably), | |
| 9631 | - setOne: createStateOperator(setOneMutably), | |
| 9632 | - setMany: createStateOperator(setManyMutably), | |
| 9633 | - setAll: createStateOperator(setAllMutably), | |
| 9634 | - updateOne: createStateOperator(updateOneMutably), | |
| 9635 | - updateMany: createStateOperator(updateManyMutably), | |
| 9636 | - upsertOne: createStateOperator(upsertOneMutably), | |
| 9637 | - upsertMany: createStateOperator(upsertManyMutably), | |
| 9638 | - removeOne: createStateOperator(removeOneMutably), | |
| 9639 | - removeMany: createStateOperator(removeManyMutably) | |
| 9640 | - }; | |
| 9641 | -} | |
| 9642 | -// src/entities/sorted_state_adapter.ts | |
| 9643 | -function createSortedStateAdapter(selectId, sort) { | |
| 9644 | - var _c = createUnsortedStateAdapter(selectId), removeOne = _c.removeOne, removeMany = _c.removeMany, removeAll = _c.removeAll; | |
| 9645 | - function addOneMutably(entity, state) { | |
| 9646 | - return addManyMutably([entity], state); | |
| 9647 | - } | |
| 9648 | - function addManyMutably(newEntities, state) { | |
| 9649 | - newEntities = ensureEntitiesArray(newEntities); | |
| 9650 | - var models = newEntities.filter(function (model) { return !(selectIdValue(model, selectId) in state.entities); }); | |
| 9651 | - if (models.length !== 0) { | |
| 9652 | - merge(models, state); | |
| 9653 | - } | |
| 9654 | - } | |
| 9655 | - function setOneMutably(entity, state) { | |
| 9656 | - return setManyMutably([entity], state); | |
| 9657 | - } | |
| 9658 | - function setManyMutably(newEntities, state) { | |
| 9659 | - newEntities = ensureEntitiesArray(newEntities); | |
| 9660 | - if (newEntities.length !== 0) { | |
| 9661 | - merge(newEntities, state); | |
| 9662 | - } | |
| 9663 | - } | |
| 9664 | - function setAllMutably(newEntities, state) { | |
| 9665 | - newEntities = ensureEntitiesArray(newEntities); | |
| 9666 | - state.entities = {}; | |
| 9667 | - state.ids = []; | |
| 9668 | - addManyMutably(newEntities, state); | |
| 9669 | - } | |
| 9670 | - function updateOneMutably(update, state) { | |
| 9671 | - return updateManyMutably([update], state); | |
| 9672 | - } | |
| 9673 | - function updateManyMutably(updates, state) { | |
| 9674 | - var appliedUpdates = false; | |
| 9675 | - for (var _i = 0, updates_1 = updates; _i < updates_1.length; _i++) { | |
| 9676 | - var update = updates_1[_i]; | |
| 9677 | - var entity = state.entities[update.id]; | |
| 9678 | - if (!entity) { | |
| 9679 | - continue; | |
| 9680 | - } | |
| 9681 | - appliedUpdates = true; | |
| 9682 | - Object.assign(entity, update.changes); | |
| 9683 | - var newId = selectId(entity); | |
| 9684 | - if (update.id !== newId) { | |
| 9685 | - delete state.entities[update.id]; | |
| 9686 | - state.entities[newId] = entity; | |
| 9687 | - } | |
| 9688 | - } | |
| 9689 | - if (appliedUpdates) { | |
| 9690 | - resortEntities(state); | |
| 9691 | - } | |
| 9692 | - } | |
| 9693 | - function upsertOneMutably(entity, state) { | |
| 9694 | - return upsertManyMutably([entity], state); | |
| 9695 | - } | |
| 9696 | - function upsertManyMutably(newEntities, state) { | |
| 9697 | - var _c = splitAddedUpdatedEntities(newEntities, selectId, state), added = _c[0], updated = _c[1]; | |
| 9698 | - updateManyMutably(updated, state); | |
| 9699 | - addManyMutably(added, state); | |
| 9700 | - } | |
| 9701 | - function areArraysEqual(a, b) { | |
| 9702 | - if (a.length !== b.length) { | |
| 9703 | - return false; | |
| 9704 | - } | |
| 9705 | - for (var i = 0; i < a.length && i < b.length; i++) { | |
| 9706 | - if (a[i] === b[i]) { | |
| 9707 | - continue; | |
| 9708 | - } | |
| 9709 | - return false; | |
| 9710 | - } | |
| 9711 | - return true; | |
| 9712 | - } | |
| 9713 | - function merge(models, state) { | |
| 9714 | - models.forEach(function (model) { | |
| 9715 | - state.entities[selectId(model)] = model; | |
| 9716 | - }); | |
| 9717 | - resortEntities(state); | |
| 9718 | - } | |
| 9719 | - function resortEntities(state) { | |
| 9720 | - var allEntities = Object.values(state.entities); | |
| 9721 | - allEntities.sort(sort); | |
| 9722 | - var newSortedIds = allEntities.map(selectId); | |
| 9723 | - var ids = state.ids; | |
| 9724 | - if (!areArraysEqual(ids, newSortedIds)) { | |
| 9725 | - state.ids = newSortedIds; | |
| 9726 | - } | |
| 9727 | - } | |
| 9728 | - return { | |
| 9729 | - removeOne: removeOne, | |
| 9730 | - removeMany: removeMany, | |
| 9731 | - removeAll: removeAll, | |
| 9732 | - addOne: createStateOperator(addOneMutably), | |
| 9733 | - updateOne: createStateOperator(updateOneMutably), | |
| 9734 | - upsertOne: createStateOperator(upsertOneMutably), | |
| 9735 | - setOne: createStateOperator(setOneMutably), | |
| 9736 | - setMany: createStateOperator(setManyMutably), | |
| 9737 | - setAll: createStateOperator(setAllMutably), | |
| 9738 | - addMany: createStateOperator(addManyMutably), | |
| 9739 | - updateMany: createStateOperator(updateManyMutably), | |
| 9740 | - upsertMany: createStateOperator(upsertManyMutably) | |
| 9741 | - }; | |
| 9742 | -} | |
| 9743 | -// src/entities/create_adapter.ts | |
| 9744 | -function createEntityAdapter(options) { | |
| 9745 | - if (options === void 0) { options = {}; } | |
| 9746 | - var _c = __spreadValues({ | |
| 9747 | - sortComparer: false, | |
| 9748 | - selectId: function (instance) { return instance.id; } | |
| 9749 | - }, options), selectId = _c.selectId, sortComparer = _c.sortComparer; | |
| 9750 | - var stateFactory = createInitialStateFactory(); | |
| 9751 | - var selectorsFactory = createSelectorsFactory(); | |
| 9752 | - var stateAdapter = sortComparer ? createSortedStateAdapter(selectId, sortComparer) : createUnsortedStateAdapter(selectId); | |
| 9753 | - return __spreadValues(__spreadValues(__spreadValues({ | |
| 9754 | - selectId: selectId, | |
| 9755 | - sortComparer: sortComparer | |
| 9756 | - }, stateFactory), selectorsFactory), stateAdapter); | |
| 9757 | -} | |
| 9758 | -// src/nanoid.ts | |
| 9759 | -var urlAlphabet = "ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"; | |
| 9760 | -var nanoid = function (size) { | |
| 9761 | - if (size === void 0) { size = 21; } | |
| 9762 | - var id = ""; | |
| 9763 | - var i = size; | |
| 9764 | - while (i--) { | |
| 9765 | - id += urlAlphabet[Math.random() * 64 | 0]; | |
| 9766 | - } | |
| 9767 | - return id; | |
| 9768 | -}; | |
| 9769 | -// src/createAsyncThunk.ts | |
| 9770 | -var commonProperties = [ | |
| 9771 | - "name", | |
| 9772 | - "message", | |
| 9773 | - "stack", | |
| 9774 | - "code" | |
| 9775 | -]; | |
| 9776 | -var RejectWithValue = /** @class */ (function () { | |
| 9777 | - function RejectWithValue(payload, meta) { | |
| 9778 | - this.payload = payload; | |
| 9779 | - this.meta = meta; | |
| 9780 | - } | |
| 9781 | - return RejectWithValue; | |
| 9782 | -}()); | |
| 9783 | -var FulfillWithMeta = /** @class */ (function () { | |
| 9784 | - function FulfillWithMeta(payload, meta) { | |
| 9785 | - this.payload = payload; | |
| 9786 | - this.meta = meta; | |
| 9787 | - } | |
| 9788 | - return FulfillWithMeta; | |
| 9789 | -}()); | |
| 9790 | -var miniSerializeError = function (value) { | |
| 9791 | - if (typeof value === "object" && value !== null) { | |
| 9792 | - var simpleError = {}; | |
| 9793 | - for (var _i = 0, commonProperties_1 = commonProperties; _i < commonProperties_1.length; _i++) { | |
| 9794 | - var property = commonProperties_1[_i]; | |
| 9795 | - if (typeof value[property] === "string") { | |
| 9796 | - simpleError[property] = value[property]; | |
| 9797 | - } | |
| 9798 | - } | |
| 9799 | - return simpleError; | |
| 9800 | - } | |
| 9801 | - return { message: String(value) }; | |
| 9802 | -}; | |
| 9803 | -var createAsyncThunk = (function () { | |
| 9804 | - function createAsyncThunk2(typePrefix, payloadCreator, options) { | |
| 9805 | - var fulfilled = createAction(typePrefix + "/fulfilled", function (payload, requestId, arg, meta) { return ({ | |
| 9806 | - payload: payload, | |
| 9807 | - meta: __spreadProps(__spreadValues({}, meta || {}), { | |
| 9808 | - arg: arg, | |
| 9809 | - requestId: requestId, | |
| 9810 | - requestStatus: "fulfilled" | |
| 9811 | - }) | |
| 9812 | - }); }); | |
| 9813 | - var pending = createAction(typePrefix + "/pending", function (requestId, arg, meta) { return ({ | |
| 9814 | - payload: void 0, | |
| 9815 | - meta: __spreadProps(__spreadValues({}, meta || {}), { | |
| 9816 | - arg: arg, | |
| 9817 | - requestId: requestId, | |
| 9818 | - requestStatus: "pending" | |
| 9819 | - }) | |
| 9820 | - }); }); | |
| 9821 | - var rejected = createAction(typePrefix + "/rejected", function (error, requestId, arg, payload, meta) { return ({ | |
| 9822 | - payload: payload, | |
| 9823 | - error: (options && options.serializeError || miniSerializeError)(error || "Rejected"), | |
| 9824 | - meta: __spreadProps(__spreadValues({}, meta || {}), { | |
| 9825 | - arg: arg, | |
| 9826 | - requestId: requestId, | |
| 9827 | - rejectedWithValue: !!payload, | |
| 9828 | - requestStatus: "rejected", | |
| 9829 | - aborted: (error == null ? void 0 : error.name) === "AbortError", | |
| 9830 | - condition: (error == null ? void 0 : error.name) === "ConditionError" | |
| 9831 | - }) | |
| 9832 | - }); }); | |
| 9833 | - var displayedWarning = false; | |
| 9834 | - var AC = typeof AbortController !== "undefined" ? AbortController : /** @class */ (function () { | |
| 9835 | - function class_1() { | |
| 9836 | - this.signal = { | |
| 9837 | - aborted: false, | |
| 9838 | - addEventListener: function () { | |
| 9839 | - }, | |
| 9840 | - dispatchEvent: function () { | |
| 9841 | - return false; | |
| 9842 | - }, | |
| 9843 | - onabort: function () { | |
| 9844 | - }, | |
| 9845 | - removeEventListener: function () { | |
| 9846 | - }, | |
| 9847 | - reason: void 0, | |
| 9848 | - throwIfAborted: function () { | |
| 9849 | - } | |
| 9850 | - }; | |
| 9851 | - } | |
| 9852 | - class_1.prototype.abort = function () { | |
| 9853 | - if (true) { | |
| 9854 | - if (!displayedWarning) { | |
| 9855 | - displayedWarning = true; | |
| 9856 | - console.info("This platform does not implement AbortController. \nIf you want to use the AbortController to react to `abort` events, please consider importing a polyfill like 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only'."); | |
| 9857 | - } | |
| 9858 | - } | |
| 9859 | - }; | |
| 9860 | - return class_1; | |
| 9861 | - }()); | |
| 9862 | - function actionCreator(arg) { | |
| 9863 | - return function (dispatch, getState, extra) { | |
| 9864 | - var requestId = (options == null ? void 0 : options.idGenerator) ? options.idGenerator(arg) : nanoid(); | |
| 9865 | - var abortController = new AC(); | |
| 9866 | - var abortReason; | |
| 9867 | - var started = false; | |
| 9868 | - function abort(reason) { | |
| 9869 | - abortReason = reason; | |
| 9870 | - abortController.abort(); | |
| 9871 | - } | |
| 9872 | - var promise2 = function () { | |
| 9873 | - return __async(this, null, function () { | |
| 9874 | - var _a, _b, finalAction, conditionResult, abortedPromise, err_1, skipDispatch; | |
| 9875 | - return __generator(this, function (_c) { | |
| 9876 | - switch (_c.label) { | |
| 9877 | - case 0: | |
| 9878 | - _c.trys.push([0, 4, , 5]); | |
| 9879 | - conditionResult = (_a = options == null ? void 0 : options.condition) == null ? void 0 : _a.call(options, arg, { getState: getState, extra: extra }); | |
| 9880 | - if (!isThenable(conditionResult)) return [3 /*break*/, 2]; | |
| 9881 | - return [4 /*yield*/, conditionResult]; | |
| 9882 | - case 1: | |
| 9883 | - conditionResult = _c.sent(); | |
| 9884 | - _c.label = 2; | |
| 9885 | - case 2: | |
| 9886 | - if (conditionResult === false || abortController.signal.aborted) { | |
| 9887 | - throw { | |
| 9888 | - name: "ConditionError", | |
| 9889 | - message: "Aborted due to condition callback returning false." | |
| 9890 | - }; | |
| 9891 | - } | |
| 9892 | - started = true; | |
| 9893 | - abortedPromise = new Promise(function (_, reject) { return abortController.signal.addEventListener("abort", function () { return reject({ | |
| 9894 | - name: "AbortError", | |
| 9895 | - message: abortReason || "Aborted" | |
| 9896 | - }); }); }); | |
| 9897 | - dispatch(pending(requestId, arg, (_b = options == null ? void 0 : options.getPendingMeta) == null ? void 0 : _b.call(options, { requestId: requestId, arg: arg }, { getState: getState, extra: extra }))); | |
| 9898 | - return [4 /*yield*/, Promise.race([ | |
| 9899 | - abortedPromise, | |
| 9900 | - Promise.resolve(payloadCreator(arg, { | |
| 9901 | - dispatch: dispatch, | |
| 9902 | - getState: getState, | |
| 9903 | - extra: extra, | |
| 9904 | - requestId: requestId, | |
| 9905 | - signal: abortController.signal, | |
| 9906 | - abort: abort, | |
| 9907 | - rejectWithValue: function (value, meta) { | |
| 9908 | - return new RejectWithValue(value, meta); | |
| 9909 | - }, | |
| 9910 | - fulfillWithValue: function (value, meta) { | |
| 9911 | - return new FulfillWithMeta(value, meta); | |
| 9912 | - } | |
| 9913 | - })).then(function (result) { | |
| 9914 | - if (result instanceof RejectWithValue) { | |
| 9915 | - throw result; | |
| 9916 | - } | |
| 9917 | - if (result instanceof FulfillWithMeta) { | |
| 9918 | - return fulfilled(result.payload, requestId, arg, result.meta); | |
| 9919 | - } | |
| 9920 | - return fulfilled(result, requestId, arg); | |
| 9921 | - }) | |
| 9922 | - ])]; | |
| 9923 | - case 3: | |
| 9924 | - finalAction = _c.sent(); | |
| 9925 | - return [3 /*break*/, 5]; | |
| 9926 | - case 4: | |
| 9927 | - err_1 = _c.sent(); | |
| 9928 | - finalAction = err_1 instanceof RejectWithValue ? rejected(null, requestId, arg, err_1.payload, err_1.meta) : rejected(err_1, requestId, arg); | |
| 9929 | - return [3 /*break*/, 5]; | |
| 9930 | - case 5: | |
| 9931 | - skipDispatch = options && !options.dispatchConditionRejection && rejected.match(finalAction) && finalAction.meta.condition; | |
| 9932 | - if (!skipDispatch) { | |
| 9933 | - dispatch(finalAction); | |
| 9934 | - } | |
| 9935 | - return [2 /*return*/, finalAction]; | |
| 9936 | - } | |
| 9937 | - }); | |
| 9938 | - }); | |
| 9939 | - }(); | |
| 9940 | - return Object.assign(promise2, { | |
| 9941 | - abort: abort, | |
| 9942 | - requestId: requestId, | |
| 9943 | - arg: arg, | |
| 9944 | - unwrap: function () { | |
| 9945 | - return promise2.then(unwrapResult); | |
| 9946 | - } | |
| 9947 | - }); | |
| 9948 | - }; | |
| 9949 | - } | |
| 9950 | - return Object.assign(actionCreator, { | |
| 9951 | - pending: pending, | |
| 9952 | - rejected: rejected, | |
| 9953 | - fulfilled: fulfilled, | |
| 9954 | - typePrefix: typePrefix | |
| 9955 | - }); | |
| 9956 | - } | |
| 9957 | - createAsyncThunk2.withTypes = function () { return createAsyncThunk2; }; | |
| 9958 | - return createAsyncThunk2; | |
| 9959 | -})(); | |
| 9960 | -function unwrapResult(action) { | |
| 9961 | - if (action.meta && action.meta.rejectedWithValue) { | |
| 9962 | - throw action.payload; | |
| 9963 | - } | |
| 9964 | - if (action.error) { | |
| 9965 | - throw action.error; | |
| 9966 | - } | |
| 9967 | - return action.payload; | |
| 9968 | -} | |
| 9969 | -function isThenable(value) { | |
| 9970 | - return value !== null && typeof value === "object" && typeof value.then === "function"; | |
| 9971 | -} | |
| 9972 | -// src/matchers.ts | |
| 9973 | -var matches = function (matcher, action) { | |
| 9974 | - if (hasMatchFunction(matcher)) { | |
| 9975 | - return matcher.match(action); | |
| 9976 | - } | |
| 9977 | - else { | |
| 9978 | - return matcher(action); | |
| 9979 | - } | |
| 9980 | -}; | |
| 9981 | -function isAnyOf() { | |
| 9982 | - var matchers = []; | |
| 9983 | - for (var _i = 0; _i < arguments.length; _i++) { | |
| 9984 | - matchers[_i] = arguments[_i]; | |
| 9985 | - } | |
| 9986 | - return function (action) { | |
| 9987 | - return matchers.some(function (matcher) { return matches(matcher, action); }); | |
| 9988 | - }; | |
| 9989 | -} | |
| 9990 | -function isAllOf() { | |
| 9991 | - var matchers = []; | |
| 9992 | - for (var _i = 0; _i < arguments.length; _i++) { | |
| 9993 | - matchers[_i] = arguments[_i]; | |
| 9994 | - } | |
| 9995 | - return function (action) { | |
| 9996 | - return matchers.every(function (matcher) { return matches(matcher, action); }); | |
| 9997 | - }; | |
| 9998 | -} | |
| 9999 | -function hasExpectedRequestMetadata(action, validStatus) { | |
| 10000 | - if (!action || !action.meta) | |
| 10001 | - return false; | |
| 10002 | - var hasValidRequestId = typeof action.meta.requestId === "string"; | |
| 10003 | - var hasValidRequestStatus = validStatus.indexOf(action.meta.requestStatus) > -1; | |
| 10004 | - return hasValidRequestId && hasValidRequestStatus; | |
| 10005 | -} | |
| 10006 | -function isAsyncThunkArray(a) { | |
| 10007 | - return typeof a[0] === "function" && "pending" in a[0] && "fulfilled" in a[0] && "rejected" in a[0]; | |
| 10008 | -} | |
| 10009 | -function isPending() { | |
| 10010 | - var asyncThunks = []; | |
| 10011 | - for (var _i = 0; _i < arguments.length; _i++) { | |
| 10012 | - asyncThunks[_i] = arguments[_i]; | |
| 10013 | - } | |
| 10014 | - if (asyncThunks.length === 0) { | |
| 10015 | - return function (action) { return hasExpectedRequestMetadata(action, ["pending"]); }; | |
| 10016 | - } | |
| 10017 | - if (!isAsyncThunkArray(asyncThunks)) { | |
| 10018 | - return isPending()(asyncThunks[0]); | |
| 10019 | - } | |
| 10020 | - return function (action) { | |
| 10021 | - var matchers = asyncThunks.map(function (asyncThunk) { return asyncThunk.pending; }); | |
| 10022 | - var combinedMatcher = isAnyOf.apply(void 0, matchers); | |
| 10023 | - return combinedMatcher(action); | |
| 10024 | - }; | |
| 10025 | -} | |
| 10026 | -function isRejected() { | |
| 10027 | - var asyncThunks = []; | |
| 10028 | - for (var _i = 0; _i < arguments.length; _i++) { | |
| 10029 | - asyncThunks[_i] = arguments[_i]; | |
| 10030 | - } | |
| 10031 | - if (asyncThunks.length === 0) { | |
| 10032 | - return function (action) { return hasExpectedRequestMetadata(action, ["rejected"]); }; | |
| 10033 | - } | |
| 10034 | - if (!isAsyncThunkArray(asyncThunks)) { | |
| 10035 | - return isRejected()(asyncThunks[0]); | |
| 10036 | - } | |
| 10037 | - return function (action) { | |
| 10038 | - var matchers = asyncThunks.map(function (asyncThunk) { return asyncThunk.rejected; }); | |
| 10039 | - var combinedMatcher = isAnyOf.apply(void 0, matchers); | |
| 10040 | - return combinedMatcher(action); | |
| 10041 | - }; | |
| 10042 | -} | |
| 10043 | -function isRejectedWithValue() { | |
| 10044 | - var asyncThunks = []; | |
| 10045 | - for (var _i = 0; _i < arguments.length; _i++) { | |
| 10046 | - asyncThunks[_i] = arguments[_i]; | |
| 10047 | - } | |
| 10048 | - var hasFlag = function (action) { | |
| 10049 | - return action && action.meta && action.meta.rejectedWithValue; | |
| 10050 | - }; | |
| 10051 | - if (asyncThunks.length === 0) { | |
| 10052 | - return function (action) { | |
| 10053 | - var combinedMatcher = isAllOf(isRejected.apply(void 0, asyncThunks), hasFlag); | |
| 10054 | - return combinedMatcher(action); | |
| 10055 | - }; | |
| 10056 | - } | |
| 10057 | - if (!isAsyncThunkArray(asyncThunks)) { | |
| 10058 | - return isRejectedWithValue()(asyncThunks[0]); | |
| 10059 | - } | |
| 10060 | - return function (action) { | |
| 10061 | - var combinedMatcher = isAllOf(isRejected.apply(void 0, asyncThunks), hasFlag); | |
| 10062 | - return combinedMatcher(action); | |
| 10063 | - }; | |
| 10064 | -} | |
| 10065 | -function isFulfilled() { | |
| 10066 | - var asyncThunks = []; | |
| 10067 | - for (var _i = 0; _i < arguments.length; _i++) { | |
| 10068 | - asyncThunks[_i] = arguments[_i]; | |
| 10069 | - } | |
| 10070 | - if (asyncThunks.length === 0) { | |
| 10071 | - return function (action) { return hasExpectedRequestMetadata(action, ["fulfilled"]); }; | |
| 10072 | - } | |
| 10073 | - if (!isAsyncThunkArray(asyncThunks)) { | |
| 10074 | - return isFulfilled()(asyncThunks[0]); | |
| 10075 | - } | |
| 10076 | - return function (action) { | |
| 10077 | - var matchers = asyncThunks.map(function (asyncThunk) { return asyncThunk.fulfilled; }); | |
| 10078 | - var combinedMatcher = isAnyOf.apply(void 0, matchers); | |
| 10079 | - return combinedMatcher(action); | |
| 10080 | - }; | |
| 10081 | -} | |
| 10082 | -function isAsyncThunkAction() { | |
| 10083 | - var asyncThunks = []; | |
| 10084 | - for (var _i = 0; _i < arguments.length; _i++) { | |
| 10085 | - asyncThunks[_i] = arguments[_i]; | |
| 10086 | - } | |
| 10087 | - if (asyncThunks.length === 0) { | |
| 10088 | - return function (action) { return hasExpectedRequestMetadata(action, ["pending", "fulfilled", "rejected"]); }; | |
| 10089 | - } | |
| 10090 | - if (!isAsyncThunkArray(asyncThunks)) { | |
| 10091 | - return isAsyncThunkAction()(asyncThunks[0]); | |
| 10092 | - } | |
| 10093 | - return function (action) { | |
| 10094 | - var matchers = []; | |
| 10095 | - for (var _i = 0, asyncThunks_1 = asyncThunks; _i < asyncThunks_1.length; _i++) { | |
| 10096 | - var asyncThunk = asyncThunks_1[_i]; | |
| 10097 | - matchers.push(asyncThunk.pending, asyncThunk.rejected, asyncThunk.fulfilled); | |
| 10098 | - } | |
| 10099 | - var combinedMatcher = isAnyOf.apply(void 0, matchers); | |
| 10100 | - return combinedMatcher(action); | |
| 10101 | - }; | |
| 10102 | -} | |
| 10103 | -// src/listenerMiddleware/utils.ts | |
| 10104 | -var assertFunction = function (func, expected) { | |
| 10105 | - if (typeof func !== "function") { | |
| 10106 | - throw new TypeError(expected + " is not a function"); | |
| 10107 | - } | |
| 10108 | -}; | |
| 10109 | -var noop = function () { | |
| 10110 | -}; | |
| 10111 | -var catchRejection = function (promise2, onError) { | |
| 10112 | - if (onError === void 0) { onError = noop; } | |
| 10113 | - promise2.catch(onError); | |
| 10114 | - return promise2; | |
| 10115 | -}; | |
| 10116 | -var addAbortSignalListener = function (abortSignal, callback) { | |
| 10117 | - abortSignal.addEventListener("abort", callback, { once: true }); | |
| 10118 | - return function () { return abortSignal.removeEventListener("abort", callback); }; | |
| 10119 | -}; | |
| 10120 | -var abortControllerWithReason = function (abortController, reason) { | |
| 10121 | - var signal = abortController.signal; | |
| 10122 | - if (signal.aborted) { | |
| 10123 | - return; | |
| 10124 | - } | |
| 10125 | - if (!("reason" in signal)) { | |
| 10126 | - Object.defineProperty(signal, "reason", { | |
| 10127 | - enumerable: true, | |
| 10128 | - value: reason, | |
| 10129 | - configurable: true, | |
| 10130 | - writable: true | |
| 10131 | - }); | |
| 10132 | - } | |
| 10133 | - ; | |
| 10134 | - abortController.abort(reason); | |
| 10135 | -}; | |
| 10136 | -// src/listenerMiddleware/exceptions.ts | |
| 10137 | -var task = "task"; | |
| 10138 | -var listener = "listener"; | |
| 10139 | -var completed = "completed"; | |
| 10140 | -var cancelled = "cancelled"; | |
| 10141 | -var taskCancelled = "task-" + cancelled; | |
| 10142 | -var taskCompleted = "task-" + completed; | |
| 10143 | -var listenerCancelled = listener + "-" + cancelled; | |
| 10144 | -var listenerCompleted = listener + "-" + completed; | |
| 10145 | -var TaskAbortError = /** @class */ (function () { | |
| 10146 | - function TaskAbortError(code) { | |
| 10147 | - this.code = code; | |
| 10148 | - this.name = "TaskAbortError"; | |
| 10149 | - this.message = task + " " + cancelled + " (reason: " + code + ")"; | |
| 10150 | - } | |
| 10151 | - return TaskAbortError; | |
| 10152 | -}()); | |
| 10153 | -// src/listenerMiddleware/task.ts | |
| 10154 | -var validateActive = function (signal) { | |
| 10155 | - if (signal.aborted) { | |
| 10156 | - throw new TaskAbortError(signal.reason); | |
| 10157 | - } | |
| 10158 | -}; | |
| 10159 | -function raceWithSignal(signal, promise2) { | |
| 10160 | - var cleanup = noop; | |
| 10161 | - return new Promise(function (resolve, reject) { | |
| 10162 | - var notifyRejection = function () { return reject(new TaskAbortError(signal.reason)); }; | |
| 10163 | - if (signal.aborted) { | |
| 10164 | - notifyRejection(); | |
| 10165 | - return; | |
| 10166 | - } | |
| 10167 | - cleanup = addAbortSignalListener(signal, notifyRejection); | |
| 10168 | - promise2.finally(function () { return cleanup(); }).then(resolve, reject); | |
| 10169 | - }).finally(function () { | |
| 10170 | - cleanup = noop; | |
| 10171 | - }); | |
| 10172 | -} | |
| 10173 | -var runTask = function (task2, cleanUp) { return __async(void 0, null, function () { | |
| 10174 | - var value, error_1; | |
| 10175 | - return __generator(this, function (_c) { | |
| 10176 | - switch (_c.label) { | |
| 10177 | - case 0: | |
| 10178 | - _c.trys.push([0, 3, 4, 5]); | |
| 10179 | - return [4 /*yield*/, Promise.resolve()]; | |
| 10180 | - case 1: | |
| 10181 | - _c.sent(); | |
| 10182 | - return [4 /*yield*/, task2()]; | |
| 10183 | - case 2: | |
| 10184 | - value = _c.sent(); | |
| 10185 | - return [2 /*return*/, { | |
| 10186 | - status: "ok", | |
| 10187 | - value: value | |
| 10188 | - }]; | |
| 10189 | - case 3: | |
| 10190 | - error_1 = _c.sent(); | |
| 10191 | - return [2 /*return*/, { | |
| 10192 | - status: error_1 instanceof TaskAbortError ? "cancelled" : "rejected", | |
| 10193 | - error: error_1 | |
| 10194 | - }]; | |
| 10195 | - case 4: | |
| 10196 | - cleanUp == null ? void 0 : cleanUp(); | |
| 10197 | - return [7 /*endfinally*/]; | |
| 10198 | - case 5: return [2 /*return*/]; | |
| 10199 | - } | |
| 10200 | - }); | |
| 10201 | -}); }; | |
| 10202 | -var createPause = function (signal) { | |
| 10203 | - return function (promise2) { | |
| 10204 | - return catchRejection(raceWithSignal(signal, promise2).then(function (output) { | |
| 10205 | - validateActive(signal); | |
| 10206 | - return output; | |
| 10207 | - })); | |
| 10208 | - }; | |
| 10209 | -}; | |
| 10210 | -var createDelay = function (signal) { | |
| 10211 | - var pause = createPause(signal); | |
| 10212 | - return function (timeoutMs) { | |
| 10213 | - return pause(new Promise(function (resolve) { return setTimeout(resolve, timeoutMs); })); | |
| 10214 | - }; | |
| 10215 | -}; | |
| 10216 | -// src/listenerMiddleware/index.ts | |
| 10217 | -var assign = Object.assign; | |
| 10218 | -var INTERNAL_NIL_TOKEN = {}; | |
| 10219 | -var alm = "listenerMiddleware"; | |
| 10220 | -var createFork = function (parentAbortSignal, parentBlockingPromises) { | |
| 10221 | - var linkControllers = function (controller) { return addAbortSignalListener(parentAbortSignal, function () { return abortControllerWithReason(controller, parentAbortSignal.reason); }); }; | |
| 10222 | - return function (taskExecutor, opts) { | |
| 10223 | - assertFunction(taskExecutor, "taskExecutor"); | |
| 10224 | - var childAbortController = new AbortController(); | |
| 10225 | - linkControllers(childAbortController); | |
| 10226 | - var result = runTask(function () { return __async(void 0, null, function () { | |
| 10227 | - var result2; | |
| 10228 | - return __generator(this, function (_c) { | |
| 10229 | - switch (_c.label) { | |
| 10230 | - case 0: | |
| 10231 | - validateActive(parentAbortSignal); | |
| 10232 | - validateActive(childAbortController.signal); | |
| 10233 | - return [4 /*yield*/, taskExecutor({ | |
| 10234 | - pause: createPause(childAbortController.signal), | |
| 10235 | - delay: createDelay(childAbortController.signal), | |
| 10236 | - signal: childAbortController.signal | |
| 10237 | - })]; | |
| 10238 | - case 1: | |
| 10239 | - result2 = _c.sent(); | |
| 10240 | - validateActive(childAbortController.signal); | |
| 10241 | - return [2 /*return*/, result2]; | |
| 10242 | - } | |
| 10243 | - }); | |
| 10244 | - }); }, function () { return abortControllerWithReason(childAbortController, taskCompleted); }); | |
| 10245 | - if (opts == null ? void 0 : opts.autoJoin) { | |
| 10246 | - parentBlockingPromises.push(result); | |
| 10247 | - } | |
| 10248 | - return { | |
| 10249 | - result: createPause(parentAbortSignal)(result), | |
| 10250 | - cancel: function () { | |
| 10251 | - abortControllerWithReason(childAbortController, taskCancelled); | |
| 10252 | - } | |
| 10253 | - }; | |
| 10254 | - }; | |
| 10255 | -}; | |
| 10256 | -var createTakePattern = function (startListening, signal) { | |
| 10257 | - var take = function (predicate, timeout) { return __async(void 0, null, function () { | |
| 10258 | - var unsubscribe, tuplePromise, promises, output; | |
| 10259 | - return __generator(this, function (_c) { | |
| 10260 | - switch (_c.label) { | |
| 10261 | - case 0: | |
| 10262 | - validateActive(signal); | |
| 10263 | - unsubscribe = function () { | |
| 10264 | - }; | |
| 10265 | - tuplePromise = new Promise(function (resolve, reject) { | |
| 10266 | - var stopListening = startListening({ | |
| 10267 | - predicate: predicate, | |
| 10268 | - effect: function (action, listenerApi) { | |
| 10269 | - listenerApi.unsubscribe(); | |
| 10270 | - resolve([ | |
| 10271 | - action, | |
| 10272 | - listenerApi.getState(), | |
| 10273 | - listenerApi.getOriginalState() | |
| 10274 | - ]); | |
| 10275 | - } | |
| 10276 | - }); | |
| 10277 | - unsubscribe = function () { | |
| 10278 | - stopListening(); | |
| 10279 | - reject(); | |
| 10280 | - }; | |
| 10281 | - }); | |
| 10282 | - promises = [ | |
| 10283 | - tuplePromise | |
| 10284 | - ]; | |
| 10285 | - if (timeout != null) { | |
| 10286 | - promises.push(new Promise(function (resolve) { return setTimeout(resolve, timeout, null); })); | |
| 10287 | - } | |
| 10288 | - _c.label = 1; | |
| 10289 | - case 1: | |
| 10290 | - _c.trys.push([1, , 3, 4]); | |
| 10291 | - return [4 /*yield*/, raceWithSignal(signal, Promise.race(promises))]; | |
| 10292 | - case 2: | |
| 10293 | - output = _c.sent(); | |
| 10294 | - validateActive(signal); | |
| 10295 | - return [2 /*return*/, output]; | |
| 10296 | - case 3: | |
| 10297 | - unsubscribe(); | |
| 10298 | - return [7 /*endfinally*/]; | |
| 10299 | - case 4: return [2 /*return*/]; | |
| 10300 | - } | |
| 10301 | - }); | |
| 10302 | - }); }; | |
| 10303 | - return function (predicate, timeout) { return catchRejection(take(predicate, timeout)); }; | |
| 10304 | -}; | |
| 10305 | -var getListenerEntryPropsFrom = function (options) { | |
| 10306 | - var type = options.type, actionCreator = options.actionCreator, matcher = options.matcher, predicate = options.predicate, effect = options.effect; | |
| 10307 | - if (type) { | |
| 10308 | - predicate = createAction(type).match; | |
| 10309 | - } | |
| 10310 | - else if (actionCreator) { | |
| 10311 | - type = actionCreator.type; | |
| 10312 | - predicate = actionCreator.match; | |
| 10313 | - } | |
| 10314 | - else if (matcher) { | |
| 10315 | - predicate = matcher; | |
| 10316 | - } | |
| 10317 | - else if (predicate) { | |
| 10318 | - } | |
| 10319 | - else { | |
| 10320 | - throw new Error("Creating or removing a listener requires one of the known fields for matching an action"); | |
| 10321 | - } | |
| 10322 | - assertFunction(effect, "options.listener"); | |
| 10323 | - return { predicate: predicate, type: type, effect: effect }; | |
| 10324 | -}; | |
| 10325 | -var createListenerEntry = function (options) { | |
| 10326 | - var _c = getListenerEntryPropsFrom(options), type = _c.type, predicate = _c.predicate, effect = _c.effect; | |
| 10327 | - var id = nanoid(); | |
| 10328 | - var entry = { | |
| 10329 | - id: id, | |
| 10330 | - effect: effect, | |
| 10331 | - type: type, | |
| 10332 | - predicate: predicate, | |
| 10333 | - pending: new Set(), | |
| 10334 | - unsubscribe: function () { | |
| 10335 | - throw new Error("Unsubscribe not initialized"); | |
| 10336 | - } | |
| 10337 | - }; | |
| 10338 | - return entry; | |
| 10339 | -}; | |
| 10340 | -var cancelActiveListeners = function (entry) { | |
| 10341 | - entry.pending.forEach(function (controller) { | |
| 10342 | - abortControllerWithReason(controller, listenerCancelled); | |
| 10343 | - }); | |
| 10344 | -}; | |
| 10345 | -var createClearListenerMiddleware = function (listenerMap) { | |
| 10346 | - return function () { | |
| 10347 | - listenerMap.forEach(cancelActiveListeners); | |
| 10348 | - listenerMap.clear(); | |
| 10349 | - }; | |
| 10350 | -}; | |
| 10351 | -var safelyNotifyError = function (errorHandler, errorToNotify, errorInfo) { | |
| 10352 | - try { | |
| 10353 | - errorHandler(errorToNotify, errorInfo); | |
| 10354 | - } | |
| 10355 | - catch (errorHandlerError) { | |
| 10356 | - setTimeout(function () { | |
| 10357 | - throw errorHandlerError; | |
| 10358 | - }, 0); | |
| 10359 | - } | |
| 10360 | -}; | |
| 10361 | -var addListener = createAction(alm + "/add"); | |
| 10362 | -var clearAllListeners = createAction(alm + "/removeAll"); | |
| 10363 | -var removeListener = createAction(alm + "/remove"); | |
| 10364 | -var defaultErrorHandler = function () { | |
| 10365 | - var args = []; | |
| 10366 | - for (var _i = 0; _i < arguments.length; _i++) { | |
| 10367 | - args[_i] = arguments[_i]; | |
| 10368 | - } | |
| 10369 | - console.error.apply(console, __spreadArray([alm + "/error"], args)); | |
| 10370 | -}; | |
| 10371 | -function createListenerMiddleware(middlewareOptions) { | |
| 10372 | - var _this = this; | |
| 10373 | - if (middlewareOptions === void 0) { middlewareOptions = {}; } | |
| 10374 | - var listenerMap = new Map(); | |
| 10375 | - var extra = middlewareOptions.extra, _c = middlewareOptions.onError, onError = _c === void 0 ? defaultErrorHandler : _c; | |
| 10376 | - assertFunction(onError, "onError"); | |
| 10377 | - var insertEntry = function (entry) { | |
| 10378 | - entry.unsubscribe = function () { return listenerMap.delete(entry.id); }; | |
| 10379 | - listenerMap.set(entry.id, entry); | |
| 10380 | - return function (cancelOptions) { | |
| 10381 | - entry.unsubscribe(); | |
| 10382 | - if (cancelOptions == null ? void 0 : cancelOptions.cancelActive) { | |
| 10383 | - cancelActiveListeners(entry); | |
| 10384 | - } | |
| 10385 | - }; | |
| 10386 | - }; | |
| 10387 | - var findListenerEntry = function (comparator) { | |
| 10388 | - for (var _i = 0, _c = Array.from(listenerMap.values()); _i < _c.length; _i++) { | |
| 10389 | - var entry = _c[_i]; | |
| 10390 | - if (comparator(entry)) { | |
| 10391 | - return entry; | |
| 10392 | - } | |
| 10393 | - } | |
| 10394 | - return void 0; | |
| 10395 | - }; | |
| 10396 | - var startListening = function (options) { | |
| 10397 | - var entry = findListenerEntry(function (existingEntry) { return existingEntry.effect === options.effect; }); | |
| 10398 | - if (!entry) { | |
| 10399 | - entry = createListenerEntry(options); | |
| 10400 | - } | |
| 10401 | - return insertEntry(entry); | |
| 10402 | - }; | |
| 10403 | - var stopListening = function (options) { | |
| 10404 | - var _c = getListenerEntryPropsFrom(options), type = _c.type, effect = _c.effect, predicate = _c.predicate; | |
| 10405 | - var entry = findListenerEntry(function (entry2) { | |
| 10406 | - var matchPredicateOrType = typeof type === "string" ? entry2.type === type : entry2.predicate === predicate; | |
| 10407 | - return matchPredicateOrType && entry2.effect === effect; | |
| 10408 | - }); | |
| 10409 | - if (entry) { | |
| 10410 | - entry.unsubscribe(); | |
| 10411 | - if (options.cancelActive) { | |
| 10412 | - cancelActiveListeners(entry); | |
| 10413 | - } | |
| 10414 | - } | |
| 10415 | - return !!entry; | |
| 10416 | - }; | |
| 10417 | - var notifyListener = function (entry, action, api, getOriginalState) { return __async(_this, null, function () { | |
| 10418 | - var internalTaskController, take, autoJoinPromises, listenerError_1; | |
| 10419 | - return __generator(this, function (_c) { | |
| 10420 | - switch (_c.label) { | |
| 10421 | - case 0: | |
| 10422 | - internalTaskController = new AbortController(); | |
| 10423 | - take = createTakePattern(startListening, internalTaskController.signal); | |
| 10424 | - autoJoinPromises = []; | |
| 10425 | - _c.label = 1; | |
| 10426 | - case 1: | |
| 10427 | - _c.trys.push([1, 3, 4, 6]); | |
| 10428 | - entry.pending.add(internalTaskController); | |
| 10429 | - return [4 /*yield*/, Promise.resolve(entry.effect(action, assign({}, api, { | |
| 10430 | - getOriginalState: getOriginalState, | |
| 10431 | - condition: function (predicate, timeout) { return take(predicate, timeout).then(Boolean); }, | |
| 10432 | - take: take, | |
| 10433 | - delay: createDelay(internalTaskController.signal), | |
| 10434 | - pause: createPause(internalTaskController.signal), | |
| 10435 | - extra: extra, | |
| 10436 | - signal: internalTaskController.signal, | |
| 10437 | - fork: createFork(internalTaskController.signal, autoJoinPromises), | |
| 10438 | - unsubscribe: entry.unsubscribe, | |
| 10439 | - subscribe: function () { | |
| 10440 | - listenerMap.set(entry.id, entry); | |
| 10441 | - }, | |
| 10442 | - cancelActiveListeners: function () { | |
| 10443 | - entry.pending.forEach(function (controller, _, set) { | |
| 10444 | - if (controller !== internalTaskController) { | |
| 10445 | - abortControllerWithReason(controller, listenerCancelled); | |
| 10446 | - set.delete(controller); | |
| 10447 | - } | |
| 10448 | - }); | |
| 10449 | - } | |
| 10450 | - })))]; | |
| 10451 | - case 2: | |
| 10452 | - _c.sent(); | |
| 10453 | - return [3 /*break*/, 6]; | |
| 10454 | - case 3: | |
| 10455 | - listenerError_1 = _c.sent(); | |
| 10456 | - if (!(listenerError_1 instanceof TaskAbortError)) { | |
| 10457 | - safelyNotifyError(onError, listenerError_1, { | |
| 10458 | - raisedBy: "effect" | |
| 10459 | - }); | |
| 10460 | - } | |
| 10461 | - return [3 /*break*/, 6]; | |
| 10462 | - case 4: return [4 /*yield*/, Promise.allSettled(autoJoinPromises)]; | |
| 10463 | - case 5: | |
| 10464 | - _c.sent(); | |
| 10465 | - abortControllerWithReason(internalTaskController, listenerCompleted); | |
| 10466 | - entry.pending.delete(internalTaskController); | |
| 10467 | - return [7 /*endfinally*/]; | |
| 10468 | - case 6: return [2 /*return*/]; | |
| 10469 | - } | |
| 10470 | - }); | |
| 10471 | - }); }; | |
| 10472 | - var clearListenerMiddleware = createClearListenerMiddleware(listenerMap); | |
| 10473 | - var middleware = function (api) { return function (next) { return function (action) { | |
| 10474 | - if (!isAction(action)) { | |
| 10475 | - return next(action); | |
| 10476 | - } | |
| 10477 | - if (addListener.match(action)) { | |
| 10478 | - return startListening(action.payload); | |
| 10479 | - } | |
| 10480 | - if (clearAllListeners.match(action)) { | |
| 10481 | - clearListenerMiddleware(); | |
| 10482 | - return; | |
| 10483 | - } | |
| 10484 | - if (removeListener.match(action)) { | |
| 10485 | - return stopListening(action.payload); | |
| 10486 | - } | |
| 10487 | - var originalState = api.getState(); | |
| 10488 | - var getOriginalState = function () { | |
| 10489 | - if (originalState === INTERNAL_NIL_TOKEN) { | |
| 10490 | - throw new Error(alm + ": getOriginalState can only be called synchronously"); | |
| 10491 | - } | |
| 10492 | - return originalState; | |
| 10493 | - }; | |
| 10494 | - var result; | |
| 10495 | - try { | |
| 10496 | - result = next(action); | |
| 10497 | - if (listenerMap.size > 0) { | |
| 10498 | - var currentState = api.getState(); | |
| 10499 | - var listenerEntries = Array.from(listenerMap.values()); | |
| 10500 | - for (var _i = 0, listenerEntries_1 = listenerEntries; _i < listenerEntries_1.length; _i++) { | |
| 10501 | - var entry = listenerEntries_1[_i]; | |
| 10502 | - var runListener = false; | |
| 10503 | - try { | |
| 10504 | - runListener = entry.predicate(action, currentState, originalState); | |
| 10505 | - } | |
| 10506 | - catch (predicateError) { | |
| 10507 | - runListener = false; | |
| 10508 | - safelyNotifyError(onError, predicateError, { | |
| 10509 | - raisedBy: "predicate" | |
| 10510 | - }); | |
| 10511 | - } | |
| 10512 | - if (!runListener) { | |
| 10513 | - continue; | |
| 10514 | - } | |
| 10515 | - notifyListener(entry, action, api, getOriginalState); | |
| 10516 | - } | |
| 10517 | - } | |
| 10518 | - } | |
| 10519 | - finally { | |
| 10520 | - originalState = INTERNAL_NIL_TOKEN; | |
| 10521 | - } | |
| 10522 | - return result; | |
| 10523 | - }; }; }; | |
| 10524 | - return { | |
| 10525 | - middleware: middleware, | |
| 10526 | - startListening: startListening, | |
| 10527 | - stopListening: stopListening, | |
| 10528 | - clearListeners: clearListenerMiddleware | |
| 10529 | - }; | |
| 10530 | -} | |
| 10531 | -// src/autoBatchEnhancer.ts | |
| 10532 | -var SHOULD_AUTOBATCH = "RTK_autoBatch"; | |
| 10533 | -var prepareAutoBatched = function () { return function (payload) { | |
| 10534 | - var _c; | |
| 10535 | - return ({ | |
| 10536 | - payload: payload, | |
| 10537 | - meta: (_c = {}, _c[SHOULD_AUTOBATCH] = true, _c) | |
| 10538 | - }); | |
| 10539 | -}; }; | |
| 10540 | -var promise; | |
| 10541 | -var queueMicrotaskShim = typeof queueMicrotask === "function" ? queueMicrotask.bind(typeof window !== "undefined" ? window : typeof __webpack_require__.g !== "undefined" ? __webpack_require__.g : globalThis) : function (cb) { return (promise || (promise = Promise.resolve())).then(cb).catch(function (err) { return setTimeout(function () { | |
| 10542 | - throw err; | |
| 10543 | -}, 0); }); }; | |
| 10544 | -var createQueueWithTimer = function (timeout) { | |
| 10545 | - return function (notify) { | |
| 10546 | - setTimeout(notify, timeout); | |
| 10547 | - }; | |
| 10548 | -}; | |
| 10549 | -var rAF = typeof window !== "undefined" && window.requestAnimationFrame ? window.requestAnimationFrame : createQueueWithTimer(10); | |
| 10550 | -var autoBatchEnhancer = function (options) { | |
| 10551 | - if (options === void 0) { options = { type: "raf" }; } | |
| 10552 | - return function (next) { return function () { | |
| 10553 | - var args = []; | |
| 10554 | - for (var _i = 0; _i < arguments.length; _i++) { | |
| 10555 | - args[_i] = arguments[_i]; | |
| 10556 | - } | |
| 10557 | - var store = next.apply(void 0, args); | |
| 10558 | - var notifying = true; | |
| 10559 | - var shouldNotifyAtEndOfTick = false; | |
| 10560 | - var notificationQueued = false; | |
| 10561 | - var listeners = new Set(); | |
| 10562 | - var queueCallback = options.type === "tick" ? queueMicrotaskShim : options.type === "raf" ? rAF : options.type === "callback" ? options.queueNotification : createQueueWithTimer(options.timeout); | |
| 10563 | - var notifyListeners = function () { | |
| 10564 | - notificationQueued = false; | |
| 10565 | - if (shouldNotifyAtEndOfTick) { | |
| 10566 | - shouldNotifyAtEndOfTick = false; | |
| 10567 | - listeners.forEach(function (l) { return l(); }); | |
| 10568 | - } | |
| 10569 | - }; | |
| 10570 | - return Object.assign({}, store, { | |
| 10571 | - subscribe: function (listener2) { | |
| 10572 | - var wrappedListener = function () { return notifying && listener2(); }; | |
| 10573 | - var unsubscribe = store.subscribe(wrappedListener); | |
| 10574 | - listeners.add(listener2); | |
| 10575 | - return function () { | |
| 10576 | - unsubscribe(); | |
| 10577 | - listeners.delete(listener2); | |
| 10578 | - }; | |
| 10579 | - }, | |
| 10580 | - dispatch: function (action) { | |
| 10581 | - var _a; | |
| 10582 | - try { | |
| 10583 | - notifying = !((_a = action == null ? void 0 : action.meta) == null ? void 0 : _a[SHOULD_AUTOBATCH]); | |
| 10584 | - shouldNotifyAtEndOfTick = !notifying; | |
| 10585 | - if (shouldNotifyAtEndOfTick) { | |
| 10586 | - if (!notificationQueued) { | |
| 10587 | - notificationQueued = true; | |
| 10588 | - queueCallback(notifyListeners); | |
| 10589 | - } | |
| 10590 | - } | |
| 10591 | - return store.dispatch(action); | |
| 10592 | - } | |
| 10593 | - finally { | |
| 10594 | - notifying = true; | |
| 10595 | - } | |
| 10596 | - } | |
| 10597 | - }); | |
| 10598 | - }; }; | |
| 10599 | -}; | |
| 10600 | -// src/index.ts | |
| 10601 | -(0,immer__WEBPACK_IMPORTED_MODULE_0__.enableES5)(); | |
| 10602 | - | |
| 10603 | -//# sourceMappingURL=redux-toolkit.esm.js.map | |
| 10604 | - | |
| 10605 | -/***/ }), | |
| 10606 | - | |
| 10607 | -/***/ "../node_modules/immer/dist/immer.esm.mjs": | |
| 8385 | +/***/ "@reduxjs/toolkit": | |
| 10608 | 8386 | /*!************************************************!*\ |
| 10609 | - !*** ../node_modules/immer/dist/immer.esm.mjs ***! | |
| 8387 | + !*** external "elementorVendors.reduxToolkit" ***! | |
| 10610 | 8388 | \************************************************/ |
| 10611 | -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { | |
| 8389 | +/***/ ((module) => { | |
| 10612 | 8390 | |
| 10613 | 8391 | "use strict"; |
| 10614 | -__webpack_require__.r(__webpack_exports__); | |
| 10615 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 10616 | -/* harmony export */ Immer: () => (/* binding */ un), | |
| 10617 | -/* harmony export */ applyPatches: () => (/* binding */ pn), | |
| 10618 | -/* harmony export */ castDraft: () => (/* binding */ K), | |
| 10619 | -/* harmony export */ castImmutable: () => (/* binding */ $), | |
| 10620 | -/* harmony export */ createDraft: () => (/* binding */ ln), | |
| 10621 | -/* harmony export */ current: () => (/* binding */ R), | |
| 10622 | -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), | |
| 10623 | -/* harmony export */ enableAllPlugins: () => (/* binding */ J), | |
| 10624 | -/* harmony export */ enableES5: () => (/* binding */ F), | |
| 10625 | -/* harmony export */ enableMapSet: () => (/* binding */ C), | |
| 10626 | -/* harmony export */ enablePatches: () => (/* binding */ T), | |
| 10627 | -/* harmony export */ finishDraft: () => (/* binding */ dn), | |
| 10628 | -/* harmony export */ freeze: () => (/* binding */ d), | |
| 10629 | -/* harmony export */ immerable: () => (/* binding */ L), | |
| 10630 | -/* harmony export */ isDraft: () => (/* binding */ r), | |
| 10631 | -/* harmony export */ isDraftable: () => (/* binding */ t), | |
| 10632 | -/* harmony export */ nothing: () => (/* binding */ H), | |
| 10633 | -/* harmony export */ original: () => (/* binding */ e), | |
| 10634 | -/* harmony export */ produce: () => (/* binding */ fn), | |
| 10635 | -/* harmony export */ produceWithPatches: () => (/* binding */ cn), | |
| 10636 | -/* harmony export */ setAutoFreeze: () => (/* binding */ sn), | |
| 10637 | -/* harmony export */ setUseProxies: () => (/* binding */ vn) | |
| 10638 | -/* harmony export */ }); | |
| 10639 | -function n(n){for(var r=arguments.length,t=Array(r>1?r-1:0),e=1;e<r;e++)t[e-1]=arguments[e];if(true){var i=Y[n],o=i?"function"==typeof i?i.apply(null,t):i:"unknown error nr: "+n;throw Error("[Immer] "+o)}// removed by dead control flow | |
| 10640 | -}function r(n){return!!n&&!!n[Q]}function t(n){var r;return!!n&&(function(n){if(!n||"object"!=typeof n)return!1;var r=Object.getPrototypeOf(n);if(null===r)return!0;var t=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;return t===Object||"function"==typeof t&&Function.toString.call(t)===Z}(n)||Array.isArray(n)||!!n[L]||!!(null===(r=n.constructor)||void 0===r?void 0:r[L])||s(n)||v(n))}function e(t){return r(t)||n(23,t),t[Q].t}function i(n,r,t){void 0===t&&(t=!1),0===o(n)?(t?Object.keys:nn)(n).forEach((function(e){t&&"symbol"==typeof e||r(e,n[e],n)})):n.forEach((function(t,e){return r(e,t,n)}))}function o(n){var r=n[Q];return r?r.i>3?r.i-4:r.i:Array.isArray(n)?1:s(n)?2:v(n)?3:0}function u(n,r){return 2===o(n)?n.has(r):Object.prototype.hasOwnProperty.call(n,r)}function a(n,r){return 2===o(n)?n.get(r):n[r]}function f(n,r,t){var e=o(n);2===e?n.set(r,t):3===e?n.add(t):n[r]=t}function c(n,r){return n===r?0!==n||1/n==1/r:n!=n&&r!=r}function s(n){return X&&n instanceof Map}function v(n){return q&&n instanceof Set}function p(n){return n.o||n.t}function l(n){if(Array.isArray(n))return Array.prototype.slice.call(n);var r=rn(n);delete r[Q];for(var t=nn(r),e=0;e<t.length;e++){var i=t[e],o=r[i];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(r[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:n[i]})}return Object.create(Object.getPrototypeOf(n),r)}function d(n,e){return void 0===e&&(e=!1),y(n)||r(n)||!t(n)||(o(n)>1&&(n.set=n.add=n.clear=n.delete=h),Object.freeze(n),e&&i(n,(function(n,r){return d(r,!0)}),!0)),n}function h(){n(2)}function y(n){return null==n||"object"!=typeof n||Object.isFrozen(n)}function b(r){var t=tn[r];return t||n(18,r),t}function m(n,r){tn[n]||(tn[n]=r)}function _(){return false||U||n(0),U}function j(n,r){r&&(b("Patches"),n.u=[],n.s=[],n.v=r)}function g(n){O(n),n.p.forEach(S),n.p=null}function O(n){n===U&&(U=n.l)}function w(n){return U={p:[],l:U,h:n,m:!0,_:0}}function S(n){var r=n[Q];0===r.i||1===r.i?r.j():r.g=!0}function P(r,e){e._=e.p.length;var i=e.p[0],o=void 0!==r&&r!==i;return e.h.O||b("ES5").S(e,r,o),o?(i[Q].P&&(g(e),n(4)),t(r)&&(r=M(e,r),e.l||x(e,r)),e.u&&b("Patches").M(i[Q].t,r,e.u,e.s)):r=M(e,i,[]),g(e),e.u&&e.v(e.u,e.s),r!==H?r:void 0}function M(n,r,t){if(y(r))return r;var e=r[Q];if(!e)return i(r,(function(i,o){return A(n,e,r,i,o,t)}),!0),r;if(e.A!==n)return r;if(!e.P)return x(n,e.t,!0),e.t;if(!e.I){e.I=!0,e.A._--;var o=4===e.i||5===e.i?e.o=l(e.k):e.o,u=o,a=!1;3===e.i&&(u=new Set(o),o.clear(),a=!0),i(u,(function(r,i){return A(n,e,o,r,i,t,a)})),x(n,o,!1),t&&n.u&&b("Patches").N(e,t,n.u,n.s)}return e.o}function A(e,i,o,a,c,s,v){if( true&&c===o&&n(5),r(c)){var p=M(e,c,s&&i&&3!==i.i&&!u(i.R,a)?s.concat(a):void 0);if(f(o,a,p),!r(p))return;e.m=!1}else v&&o.add(c);if(t(c)&&!y(c)){if(!e.h.D&&e._<1)return;M(e,c),i&&i.A.l||x(e,c)}}function x(n,r,t){void 0===t&&(t=!1),!n.l&&n.h.D&&n.m&&d(r,t)}function z(n,r){var t=n[Q];return(t?p(t):n)[r]}function I(n,r){if(r in n)for(var t=Object.getPrototypeOf(n);t;){var e=Object.getOwnPropertyDescriptor(t,r);if(e)return e;t=Object.getPrototypeOf(t)}}function k(n){n.P||(n.P=!0,n.l&&k(n.l))}function E(n){n.o||(n.o=l(n.t))}function N(n,r,t){var e=s(r)?b("MapSet").F(r,t):v(r)?b("MapSet").T(r,t):n.O?function(n,r){var t=Array.isArray(n),e={i:t?1:0,A:r?r.A:_(),P:!1,I:!1,R:{},l:r,t:n,k:null,o:null,j:null,C:!1},i=e,o=en;t&&(i=[e],o=on);var u=Proxy.revocable(i,o),a=u.revoke,f=u.proxy;return e.k=f,e.j=a,f}(r,t):b("ES5").J(r,t);return(t?t.A:_()).p.push(e),e}function R(e){return r(e)||n(22,e),function n(r){if(!t(r))return r;var e,u=r[Q],c=o(r);if(u){if(!u.P&&(u.i<4||!b("ES5").K(u)))return u.t;u.I=!0,e=D(r,c),u.I=!1}else e=D(r,c);return i(e,(function(r,t){u&&a(u.t,r)===t||f(e,r,n(t))})),3===c?new Set(e):e}(e)}function D(n,r){switch(r){case 2:return new Map(n);case 3:return Array.from(n)}return l(n)}function F(){function t(n,r){var t=s[n];return t?t.enumerable=r:s[n]=t={configurable:!0,enumerable:r,get:function(){var r=this[Q];return true&&f(r),en.get(r,n)},set:function(r){var t=this[Q]; true&&f(t),en.set(t,n,r)}},t}function e(n){for(var r=n.length-1;r>=0;r--){var t=n[r][Q];if(!t.P)switch(t.i){case 5:a(t)&&k(t);break;case 4:o(t)&&k(t)}}}function o(n){for(var r=n.t,t=n.k,e=nn(t),i=e.length-1;i>=0;i--){var o=e[i];if(o!==Q){var a=r[o];if(void 0===a&&!u(r,o))return!0;var f=t[o],s=f&&f[Q];if(s?s.t!==a:!c(f,a))return!0}}var v=!!r[Q];return e.length!==nn(r).length+(v?0:1)}function a(n){var r=n.k;if(r.length!==n.t.length)return!0;var t=Object.getOwnPropertyDescriptor(r,r.length-1);if(t&&!t.get)return!0;for(var e=0;e<r.length;e++)if(!r.hasOwnProperty(e))return!0;return!1}function f(r){r.g&&n(3,JSON.stringify(p(r)))}var s={};m("ES5",{J:function(n,r){var e=Array.isArray(n),i=function(n,r){if(n){for(var e=Array(r.length),i=0;i<r.length;i++)Object.defineProperty(e,""+i,t(i,!0));return e}var o=rn(r);delete o[Q];for(var u=nn(o),a=0;a<u.length;a++){var f=u[a];o[f]=t(f,n||!!o[f].enumerable)}return Object.create(Object.getPrototypeOf(r),o)}(e,n),o={i:e?5:4,A:r?r.A:_(),P:!1,I:!1,R:{},l:r,t:n,k:i,o:null,g:!1,C:!1};return Object.defineProperty(i,Q,{value:o,writable:!0}),i},S:function(n,t,o){o?r(t)&&t[Q].A===n&&e(n.p):(n.u&&function n(r){if(r&&"object"==typeof r){var t=r[Q];if(t){var e=t.t,o=t.k,f=t.R,c=t.i;if(4===c)i(o,(function(r){r!==Q&&(void 0!==e[r]||u(e,r)?f[r]||n(o[r]):(f[r]=!0,k(t)))})),i(e,(function(n){void 0!==o[n]||u(o,n)||(f[n]=!1,k(t))}));else if(5===c){if(a(t)&&(k(t),f.length=!0),o.length<e.length)for(var s=o.length;s<e.length;s++)f[s]=!1;else for(var v=e.length;v<o.length;v++)f[v]=!0;for(var p=Math.min(o.length,e.length),l=0;l<p;l++)o.hasOwnProperty(l)||(f[l]=!0),void 0===f[l]&&n(o[l])}}}}(n.p[0]),e(n.p))},K:function(n){return 4===n.i?o(n):a(n)}})}function T(){function e(n){if(!t(n))return n;if(Array.isArray(n))return n.map(e);if(s(n))return new Map(Array.from(n.entries()).map((function(n){return[n[0],e(n[1])]})));if(v(n))return new Set(Array.from(n).map(e));var r=Object.create(Object.getPrototypeOf(n));for(var i in n)r[i]=e(n[i]);return u(n,L)&&(r[L]=n[L]),r}function f(n){return r(n)?e(n):n}var c="add";m("Patches",{$:function(r,t){return t.forEach((function(t){for(var i=t.path,u=t.op,f=r,s=0;s<i.length-1;s++){var v=o(f),p=i[s];"string"!=typeof p&&"number"!=typeof p&&(p=""+p),0!==v&&1!==v||"__proto__"!==p&&"constructor"!==p||n(24),"function"==typeof f&&"prototype"===p&&n(24),"object"!=typeof(f=a(f,p))&&n(15,i.join("/"))}var l=o(f),d=e(t.value),h=i[i.length-1];switch(u){case"replace":switch(l){case 2:return f.set(h,d);case 3:n(16);default:return f[h]=d}case c:switch(l){case 1:return"-"===h?f.push(d):f.splice(h,0,d);case 2:return f.set(h,d);case 3:return f.add(d);default:return f[h]=d}case"remove":switch(l){case 1:return f.splice(h,1);case 2:return f.delete(h);case 3:return f.delete(t.value);default:return delete f[h]}default:n(17,u)}})),r},N:function(n,r,t,e){switch(n.i){case 0:case 4:case 2:return function(n,r,t,e){var o=n.t,s=n.o;i(n.R,(function(n,i){var v=a(o,n),p=a(s,n),l=i?u(o,n)?"replace":c:"remove";if(v!==p||"replace"!==l){var d=r.concat(n);t.push("remove"===l?{op:l,path:d}:{op:l,path:d,value:p}),e.push(l===c?{op:"remove",path:d}:"remove"===l?{op:c,path:d,value:f(v)}:{op:"replace",path:d,value:f(v)})}}))}(n,r,t,e);case 5:case 1:return function(n,r,t,e){var i=n.t,o=n.R,u=n.o;if(u.length<i.length){var a=[u,i];i=a[0],u=a[1];var s=[e,t];t=s[0],e=s[1]}for(var v=0;v<i.length;v++)if(o[v]&&u[v]!==i[v]){var p=r.concat([v]);t.push({op:"replace",path:p,value:f(u[v])}),e.push({op:"replace",path:p,value:f(i[v])})}for(var l=i.length;l<u.length;l++){var d=r.concat([l]);t.push({op:c,path:d,value:f(u[l])})}i.length<u.length&&e.push({op:"replace",path:r.concat(["length"]),value:i.length})}(n,r,t,e);case 3:return function(n,r,t,e){var i=n.t,o=n.o,u=0;i.forEach((function(n){if(!o.has(n)){var i=r.concat([u]);t.push({op:"remove",path:i,value:n}),e.unshift({op:c,path:i,value:n})}u++})),u=0,o.forEach((function(n){if(!i.has(n)){var o=r.concat([u]);t.push({op:c,path:o,value:n}),e.unshift({op:"remove",path:o,value:n})}u++}))}(n,r,t,e)}},M:function(n,r,t,e){t.push({op:"replace",path:[],value:r===H?void 0:r}),e.push({op:"replace",path:[],value:n})}})}function C(){function r(n,r){function t(){this.constructor=n}a(n,r),n.prototype=(t.prototype=r.prototype,new t)}function e(n){n.o||(n.R=new Map,n.o=new Map(n.t))}function o(n){n.o||(n.o=new Set,n.t.forEach((function(r){if(t(r)){var e=N(n.A.h,r,n);n.p.set(r,e),n.o.add(e)}else n.o.add(r)})))}function u(r){r.g&&n(3,JSON.stringify(p(r)))}var a=function(n,r){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var t in r)r.hasOwnProperty(t)&&(n[t]=r[t])})(n,r)},f=function(){function n(n,r){return this[Q]={i:2,l:r,A:r?r.A:_(),P:!1,I:!1,o:void 0,R:void 0,t:n,k:this,C:!1,g:!1},this}r(n,Map);var o=n.prototype;return Object.defineProperty(o,"size",{get:function(){return p(this[Q]).size}}),o.has=function(n){return p(this[Q]).has(n)},o.set=function(n,r){var t=this[Q];return u(t),p(t).has(n)&&p(t).get(n)===r||(e(t),k(t),t.R.set(n,!0),t.o.set(n,r),t.R.set(n,!0)),this},o.delete=function(n){if(!this.has(n))return!1;var r=this[Q];return u(r),e(r),k(r),r.t.has(n)?r.R.set(n,!1):r.R.delete(n),r.o.delete(n),!0},o.clear=function(){var n=this[Q];u(n),p(n).size&&(e(n),k(n),n.R=new Map,i(n.t,(function(r){n.R.set(r,!1)})),n.o.clear())},o.forEach=function(n,r){var t=this;p(this[Q]).forEach((function(e,i){n.call(r,t.get(i),i,t)}))},o.get=function(n){var r=this[Q];u(r);var i=p(r).get(n);if(r.I||!t(i))return i;if(i!==r.t.get(n))return i;var o=N(r.A.h,i,r);return e(r),r.o.set(n,o),o},o.keys=function(){return p(this[Q]).keys()},o.values=function(){var n,r=this,t=this.keys();return(n={})[V]=function(){return r.values()},n.next=function(){var n=t.next();return n.done?n:{done:!1,value:r.get(n.value)}},n},o.entries=function(){var n,r=this,t=this.keys();return(n={})[V]=function(){return r.entries()},n.next=function(){var n=t.next();if(n.done)return n;var e=r.get(n.value);return{done:!1,value:[n.value,e]}},n},o[V]=function(){return this.entries()},n}(),c=function(){function n(n,r){return this[Q]={i:3,l:r,A:r?r.A:_(),P:!1,I:!1,o:void 0,t:n,k:this,p:new Map,g:!1,C:!1},this}r(n,Set);var t=n.prototype;return Object.defineProperty(t,"size",{get:function(){return p(this[Q]).size}}),t.has=function(n){var r=this[Q];return u(r),r.o?!!r.o.has(n)||!(!r.p.has(n)||!r.o.has(r.p.get(n))):r.t.has(n)},t.add=function(n){var r=this[Q];return u(r),this.has(n)||(o(r),k(r),r.o.add(n)),this},t.delete=function(n){if(!this.has(n))return!1;var r=this[Q];return u(r),o(r),k(r),r.o.delete(n)||!!r.p.has(n)&&r.o.delete(r.p.get(n))},t.clear=function(){var n=this[Q];u(n),p(n).size&&(o(n),k(n),n.o.clear())},t.values=function(){var n=this[Q];return u(n),o(n),n.o.values()},t.entries=function(){var n=this[Q];return u(n),o(n),n.o.entries()},t.keys=function(){return this.values()},t[V]=function(){return this.values()},t.forEach=function(n,r){for(var t=this.values(),e=t.next();!e.done;)n.call(r,e.value,e.value,this),e=t.next()},n}();m("MapSet",{F:function(n,r){return new f(n,r)},T:function(n,r){return new c(n,r)}})}function J(){F(),C(),T()}function K(n){return n}function $(n){return n}var G,U,W="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),X="undefined"!=typeof Map,q="undefined"!=typeof Set,B="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,H=W?Symbol.for("immer-nothing"):((G={})["immer-nothing"]=!0,G),L=W?Symbol.for("immer-draftable"):"__$immer_draftable",Q=W?Symbol.for("immer-state"):"__$immer_state",V="undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator",Y={0:"Illegal state",1:"Immer drafts cannot have computed properties",2:"This object has been frozen and should not be mutated",3:function(n){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+n},4:"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.",5:"Immer forbids circular references",6:"The first or second argument to `produce` must be a function",7:"The third argument to `produce` must be a function or undefined",8:"First argument to `createDraft` must be a plain object, an array, or an immerable object",9:"First argument to `finishDraft` must be a draft returned by `createDraft`",10:"The given draft is already finalized",11:"Object.defineProperty() cannot be used on an Immer draft",12:"Object.setPrototypeOf() cannot be used on an Immer draft",13:"Immer only supports deleting array indices",14:"Immer only supports setting array indices and the 'length' property",15:function(n){return"Cannot apply patch, path doesn't resolve: "+n},16:'Sets cannot have "replace" patches.',17:function(n){return"Unsupported patch operation: "+n},18:function(n){return"The plugin for '"+n+"' has not been loaded into Immer. To enable the plugin, import and call `enable"+n+"()` when initializing your application."},20:"Cannot use proxies if Proxy, Proxy.revocable or Reflect are not available",21:function(n){return"produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '"+n+"'"},22:function(n){return"'current' expects a draft, got: "+n},23:function(n){return"'original' expects a draft, got: "+n},24:"Patching reserved attributes like __proto__, prototype and constructor is not allowed"},Z=""+Object.prototype.constructor,nn="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(n){return Object.getOwnPropertyNames(n).concat(Object.getOwnPropertySymbols(n))}:Object.getOwnPropertyNames,rn=Object.getOwnPropertyDescriptors||function(n){var r={};return nn(n).forEach((function(t){r[t]=Object.getOwnPropertyDescriptor(n,t)})),r},tn={},en={get:function(n,r){if(r===Q)return n;var e=p(n);if(!u(e,r))return function(n,r,t){var e,i=I(r,t);return i?"value"in i?i.value:null===(e=i.get)||void 0===e?void 0:e.call(n.k):void 0}(n,e,r);var i=e[r];return n.I||!t(i)?i:i===z(n.t,r)?(E(n),n.o[r]=N(n.A.h,i,n)):i},has:function(n,r){return r in p(n)},ownKeys:function(n){return Reflect.ownKeys(p(n))},set:function(n,r,t){var e=I(p(n),r);if(null==e?void 0:e.set)return e.set.call(n.k,t),!0;if(!n.P){var i=z(p(n),r),o=null==i?void 0:i[Q];if(o&&o.t===t)return n.o[r]=t,n.R[r]=!1,!0;if(c(t,i)&&(void 0!==t||u(n.t,r)))return!0;E(n),k(n)}return n.o[r]===t&&(void 0!==t||r in n.o)||Number.isNaN(t)&&Number.isNaN(n.o[r])||(n.o[r]=t,n.R[r]=!0),!0},deleteProperty:function(n,r){return void 0!==z(n.t,r)||r in n.t?(n.R[r]=!1,E(n),k(n)):delete n.R[r],n.o&&delete n.o[r],!0},getOwnPropertyDescriptor:function(n,r){var t=p(n),e=Reflect.getOwnPropertyDescriptor(t,r);return e?{writable:!0,configurable:1!==n.i||"length"!==r,enumerable:e.enumerable,value:t[r]}:e},defineProperty:function(){n(11)},getPrototypeOf:function(n){return Object.getPrototypeOf(n.t)},setPrototypeOf:function(){n(12)}},on={};i(en,(function(n,r){on[n]=function(){return arguments[0]=arguments[0][0],r.apply(this,arguments)}})),on.deleteProperty=function(r,t){return true&&isNaN(parseInt(t))&&n(13),on.set.call(this,r,t,void 0)},on.set=function(r,t,e){return true&&"length"!==t&&isNaN(parseInt(t))&&n(14),en.set.call(this,r[0],t,e,r[0])};var un=function(){function e(r){var e=this;this.O=B,this.D=!0,this.produce=function(r,i,o){if("function"==typeof r&&"function"!=typeof i){var u=i;i=r;var a=e;return function(n){var r=this;void 0===n&&(n=u);for(var t=arguments.length,e=Array(t>1?t-1:0),o=1;o<t;o++)e[o-1]=arguments[o];return a.produce(n,(function(n){var t;return(t=i).call.apply(t,[r,n].concat(e))}))}}var f;if("function"!=typeof i&&n(6),void 0!==o&&"function"!=typeof o&&n(7),t(r)){var c=w(e),s=N(e,r,void 0),v=!0;try{f=i(s),v=!1}finally{v?g(c):O(c)}return"undefined"!=typeof Promise&&f instanceof Promise?f.then((function(n){return j(c,o),P(n,c)}),(function(n){throw g(c),n})):(j(c,o),P(f,c))}if(!r||"object"!=typeof r){if(void 0===(f=i(r))&&(f=r),f===H&&(f=void 0),e.D&&d(f,!0),o){var p=[],l=[];b("Patches").M(r,f,p,l),o(p,l)}return f}n(21,r)},this.produceWithPatches=function(n,r){if("function"==typeof n)return function(r){for(var t=arguments.length,i=Array(t>1?t-1:0),o=1;o<t;o++)i[o-1]=arguments[o];return e.produceWithPatches(r,(function(r){return n.apply(void 0,[r].concat(i))}))};var t,i,o=e.produce(n,r,(function(n,r){t=n,i=r}));return"undefined"!=typeof Promise&&o instanceof Promise?o.then((function(n){return[n,t,i]})):[o,t,i]},"boolean"==typeof(null==r?void 0:r.useProxies)&&this.setUseProxies(r.useProxies),"boolean"==typeof(null==r?void 0:r.autoFreeze)&&this.setAutoFreeze(r.autoFreeze)}var i=e.prototype;return i.createDraft=function(e){t(e)||n(8),r(e)&&(e=R(e));var i=w(this),o=N(this,e,void 0);return o[Q].C=!0,O(i),o},i.finishDraft=function(r,t){var e=r&&r[Q]; true&&(e&&e.C||n(9),e.I&&n(10));var i=e.A;return j(i,t),P(void 0,i)},i.setAutoFreeze=function(n){this.D=n},i.setUseProxies=function(r){r&&!B&&n(20),this.O=r},i.applyPatches=function(n,t){var e;for(e=t.length-1;e>=0;e--){var i=t[e];if(0===i.path.length&&"replace"===i.op){n=i.value;break}}e>-1&&(t=t.slice(e+1));var o=b("Patches").$;return r(n)?o(n,t):this.produce(n,(function(n){return o(n,t)}))},e}(),an=new un,fn=an.produce,cn=an.produceWithPatches.bind(an),sn=an.setAutoFreeze.bind(an),vn=an.setUseProxies.bind(an),pn=an.applyPatches.bind(an),ln=an.createDraft.bind(an),dn=an.finishDraft.bind(an);/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (fn); | |
| 10641 | -//# sourceMappingURL=immer.esm.js.map | |
| 8392 | +module.exports = elementorVendors.reduxToolkit; | |
| 10642 | 8393 | |
| 10643 | - | |
| 10644 | -/***/ }), | |
| 10645 | - | |
| 10646 | -/***/ "../node_modules/redux-thunk/es/index.js": | |
| 10647 | -/*!***********************************************!*\ | |
| 10648 | - !*** ../node_modules/redux-thunk/es/index.js ***! | |
| 10649 | - \***********************************************/ | |
| 10650 | -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | |
| 10651 | - | |
| 10652 | -"use strict"; | |
| 10653 | -__webpack_require__.r(__webpack_exports__); | |
| 10654 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 10655 | -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) | |
| 10656 | -/* harmony export */ }); | |
| 10657 | -/** A function that accepts a potential "extra argument" value to be injected later, | |
| 10658 | - * and returns an instance of the thunk middleware that uses that value | |
| 10659 | - */ | |
| 10660 | -function createThunkMiddleware(extraArgument) { | |
| 10661 | - // Standard Redux middleware definition pattern: | |
| 10662 | - // See: https://redux.js.org/tutorials/fundamentals/part-4-store#writing-custom-middleware | |
| 10663 | - var middleware = function middleware(_ref) { | |
| 10664 | - var dispatch = _ref.dispatch, | |
| 10665 | - getState = _ref.getState; | |
| 10666 | - return function (next) { | |
| 10667 | - return function (action) { | |
| 10668 | - // The thunk middleware looks for any functions that were passed to `store.dispatch`. | |
| 10669 | - // If this "action" is really a function, call it and return the result. | |
| 10670 | - if (typeof action === 'function') { | |
| 10671 | - // Inject the store's `dispatch` and `getState` methods, as well as any "extra arg" | |
| 10672 | - return action(dispatch, getState, extraArgument); | |
| 10673 | - } // Otherwise, pass the action down the middleware chain as usual | |
| 10674 | - | |
| 10675 | - | |
| 10676 | - return next(action); | |
| 10677 | - }; | |
| 10678 | - }; | |
| 10679 | - }; | |
| 10680 | - | |
| 10681 | - return middleware; | |
| 10682 | -} | |
| 10683 | - | |
| 10684 | -var thunk = createThunkMiddleware(); // Attach the factory function so users can create a customized version | |
| 10685 | -// with whatever "extra arg" they want to inject into their thunks | |
| 10686 | - | |
| 10687 | -thunk.withExtraArgument = createThunkMiddleware; | |
| 10688 | -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (thunk); | |
| 10689 | - | |
| 10690 | -/***/ }), | |
| 10691 | - | |
| 10692 | -/***/ "../node_modules/redux/es/redux.js": | |
| 10693 | -/*!*****************************************!*\ | |
| 10694 | - !*** ../node_modules/redux/es/redux.js ***! | |
| 10695 | - \*****************************************/ | |
| 10696 | -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | |
| 10697 | - | |
| 10698 | -"use strict"; | |
| 10699 | -__webpack_require__.r(__webpack_exports__); | |
| 10700 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 10701 | -/* harmony export */ __DO_NOT_USE__ActionTypes: () => (/* binding */ ActionTypes), | |
| 10702 | -/* harmony export */ applyMiddleware: () => (/* binding */ applyMiddleware), | |
| 10703 | -/* harmony export */ bindActionCreators: () => (/* binding */ bindActionCreators), | |
| 10704 | -/* harmony export */ combineReducers: () => (/* binding */ combineReducers), | |
| 10705 | -/* harmony export */ compose: () => (/* binding */ compose), | |
| 10706 | -/* harmony export */ createStore: () => (/* binding */ createStore), | |
| 10707 | -/* harmony export */ legacy_createStore: () => (/* binding */ legacy_createStore) | |
| 10708 | -/* harmony export */ }); | |
| 10709 | -/* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ "../node_modules/@babel/runtime/helpers/esm/objectSpread2.js"); | |
| 10710 | - | |
| 10711 | - | |
| 10712 | -/** | |
| 10713 | - * Adapted from React: https://github.com/facebook/react/blob/master/packages/shared/formatProdErrorMessage.js | |
| 10714 | - * | |
| 10715 | - * Do not require this module directly! Use normal throw error calls. These messages will be replaced with error codes | |
| 10716 | - * during build. | |
| 10717 | - * @param {number} code | |
| 10718 | - */ | |
| 10719 | -function formatProdErrorMessage(code) { | |
| 10720 | - return "Minified Redux error #" + code + "; visit https://redux.js.org/Errors?code=" + code + " for the full message or " + 'use the non-minified dev environment for full errors. '; | |
| 10721 | -} | |
| 10722 | - | |
| 10723 | -// Inlined version of the `symbol-observable` polyfill | |
| 10724 | -var $$observable = (function () { | |
| 10725 | - return typeof Symbol === 'function' && Symbol.observable || '@@observable'; | |
| 10726 | -})(); | |
| 10727 | - | |
| 10728 | -/** | |
| 10729 | - * These are private action types reserved by Redux. | |
| 10730 | - * For any unknown actions, you must return the current state. | |
| 10731 | - * If the current state is undefined, you must return the initial state. | |
| 10732 | - * Do not reference these action types directly in your code. | |
| 10733 | - */ | |
| 10734 | -var randomString = function randomString() { | |
| 10735 | - return Math.random().toString(36).substring(7).split('').join('.'); | |
| 10736 | -}; | |
| 10737 | - | |
| 10738 | -var ActionTypes = { | |
| 10739 | - INIT: "@@redux/INIT" + randomString(), | |
| 10740 | - REPLACE: "@@redux/REPLACE" + randomString(), | |
| 10741 | - PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() { | |
| 10742 | - return "@@redux/PROBE_UNKNOWN_ACTION" + randomString(); | |
| 10743 | - } | |
| 10744 | -}; | |
| 10745 | - | |
| 10746 | -/** | |
| 10747 | - * @param {any} obj The object to inspect. | |
| 10748 | - * @returns {boolean} True if the argument appears to be a plain object. | |
| 10749 | - */ | |
| 10750 | -function isPlainObject(obj) { | |
| 10751 | - if (typeof obj !== 'object' || obj === null) return false; | |
| 10752 | - var proto = obj; | |
| 10753 | - | |
| 10754 | - while (Object.getPrototypeOf(proto) !== null) { | |
| 10755 | - proto = Object.getPrototypeOf(proto); | |
| 10756 | - } | |
| 10757 | - | |
| 10758 | - return Object.getPrototypeOf(obj) === proto; | |
| 10759 | -} | |
| 10760 | - | |
| 10761 | -// Inlined / shortened version of `kindOf` from https://github.com/jonschlinkert/kind-of | |
| 10762 | -function miniKindOf(val) { | |
| 10763 | - if (val === void 0) return 'undefined'; | |
| 10764 | - if (val === null) return 'null'; | |
| 10765 | - var type = typeof val; | |
| 10766 | - | |
| 10767 | - switch (type) { | |
| 10768 | - case 'boolean': | |
| 10769 | - case 'string': | |
| 10770 | - case 'number': | |
| 10771 | - case 'symbol': | |
| 10772 | - case 'function': | |
| 10773 | - { | |
| 10774 | - return type; | |
| 10775 | - } | |
| 10776 | - } | |
| 10777 | - | |
| 10778 | - if (Array.isArray(val)) return 'array'; | |
| 10779 | - if (isDate(val)) return 'date'; | |
| 10780 | - if (isError(val)) return 'error'; | |
| 10781 | - var constructorName = ctorName(val); | |
| 10782 | - | |
| 10783 | - switch (constructorName) { | |
| 10784 | - case 'Symbol': | |
| 10785 | - case 'Promise': | |
| 10786 | - case 'WeakMap': | |
| 10787 | - case 'WeakSet': | |
| 10788 | - case 'Map': | |
| 10789 | - case 'Set': | |
| 10790 | - return constructorName; | |
| 10791 | - } // other | |
| 10792 | - | |
| 10793 | - | |
| 10794 | - return type.slice(8, -1).toLowerCase().replace(/\s/g, ''); | |
| 10795 | -} | |
| 10796 | - | |
| 10797 | -function ctorName(val) { | |
| 10798 | - return typeof val.constructor === 'function' ? val.constructor.name : null; | |
| 10799 | -} | |
| 10800 | - | |
| 10801 | -function isError(val) { | |
| 10802 | - return val instanceof Error || typeof val.message === 'string' && val.constructor && typeof val.constructor.stackTraceLimit === 'number'; | |
| 10803 | -} | |
| 10804 | - | |
| 10805 | -function isDate(val) { | |
| 10806 | - if (val instanceof Date) return true; | |
| 10807 | - return typeof val.toDateString === 'function' && typeof val.getDate === 'function' && typeof val.setDate === 'function'; | |
| 10808 | -} | |
| 10809 | - | |
| 10810 | -function kindOf(val) { | |
| 10811 | - var typeOfVal = typeof val; | |
| 10812 | - | |
| 10813 | - if (true) { | |
| 10814 | - typeOfVal = miniKindOf(val); | |
| 10815 | - } | |
| 10816 | - | |
| 10817 | - return typeOfVal; | |
| 10818 | -} | |
| 10819 | - | |
| 10820 | -/** | |
| 10821 | - * @deprecated | |
| 10822 | - * | |
| 10823 | - * **We recommend using the `configureStore` method | |
| 10824 | - * of the `@reduxjs/toolkit` package**, which replaces `createStore`. | |
| 10825 | - * | |
| 10826 | - * Redux Toolkit is our recommended approach for writing Redux logic today, | |
| 10827 | - * including store setup, reducers, data fetching, and more. | |
| 10828 | - * | |
| 10829 | - * **For more details, please read this Redux docs page:** | |
| 10830 | - * **https://redux.js.org/introduction/why-rtk-is-redux-today** | |
| 10831 | - * | |
| 10832 | - * `configureStore` from Redux Toolkit is an improved version of `createStore` that | |
| 10833 | - * simplifies setup and helps avoid common bugs. | |
| 10834 | - * | |
| 10835 | - * You should not be using the `redux` core package by itself today, except for learning purposes. | |
| 10836 | - * The `createStore` method from the core `redux` package will not be removed, but we encourage | |
| 10837 | - * all users to migrate to using Redux Toolkit for all Redux code. | |
| 10838 | - * | |
| 10839 | - * If you want to use `createStore` without this visual deprecation warning, use | |
| 10840 | - * the `legacy_createStore` import instead: | |
| 10841 | - * | |
| 10842 | - * `import { legacy_createStore as createStore} from 'redux'` | |
| 10843 | - * | |
| 10844 | - */ | |
| 10845 | - | |
| 10846 | -function createStore(reducer, preloadedState, enhancer) { | |
| 10847 | - var _ref2; | |
| 10848 | - | |
| 10849 | - if (typeof preloadedState === 'function' && typeof enhancer === 'function' || typeof enhancer === 'function' && typeof arguments[3] === 'function') { | |
| 10850 | - throw new Error( false ? 0 : 'It looks like you are passing several store enhancers to ' + 'createStore(). This is not supported. Instead, compose them ' + 'together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.'); | |
| 10851 | - } | |
| 10852 | - | |
| 10853 | - if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') { | |
| 10854 | - enhancer = preloadedState; | |
| 10855 | - preloadedState = undefined; | |
| 10856 | - } | |
| 10857 | - | |
| 10858 | - if (typeof enhancer !== 'undefined') { | |
| 10859 | - if (typeof enhancer !== 'function') { | |
| 10860 | - throw new Error( false ? 0 : "Expected the enhancer to be a function. Instead, received: '" + kindOf(enhancer) + "'"); | |
| 10861 | - } | |
| 10862 | - | |
| 10863 | - return enhancer(createStore)(reducer, preloadedState); | |
| 10864 | - } | |
| 10865 | - | |
| 10866 | - if (typeof reducer !== 'function') { | |
| 10867 | - throw new Error( false ? 0 : "Expected the root reducer to be a function. Instead, received: '" + kindOf(reducer) + "'"); | |
| 10868 | - } | |
| 10869 | - | |
| 10870 | - var currentReducer = reducer; | |
| 10871 | - var currentState = preloadedState; | |
| 10872 | - var currentListeners = []; | |
| 10873 | - var nextListeners = currentListeners; | |
| 10874 | - var isDispatching = false; | |
| 10875 | - /** | |
| 10876 | - * This makes a shallow copy of currentListeners so we can use | |
| 10877 | - * nextListeners as a temporary list while dispatching. | |
| 10878 | - * | |
| 10879 | - * This prevents any bugs around consumers calling | |
| 10880 | - * subscribe/unsubscribe in the middle of a dispatch. | |
| 10881 | - */ | |
| 10882 | - | |
| 10883 | - function ensureCanMutateNextListeners() { | |
| 10884 | - if (nextListeners === currentListeners) { | |
| 10885 | - nextListeners = currentListeners.slice(); | |
| 10886 | - } | |
| 10887 | - } | |
| 10888 | - /** | |
| 10889 | - * Reads the state tree managed by the store. | |
| 10890 | - * | |
| 10891 | - * @returns {any} The current state tree of your application. | |
| 10892 | - */ | |
| 10893 | - | |
| 10894 | - | |
| 10895 | - function getState() { | |
| 10896 | - if (isDispatching) { | |
| 10897 | - throw new Error( false ? 0 : 'You may not call store.getState() while the reducer is executing. ' + 'The reducer has already received the state as an argument. ' + 'Pass it down from the top reducer instead of reading it from the store.'); | |
| 10898 | - } | |
| 10899 | - | |
| 10900 | - return currentState; | |
| 10901 | - } | |
| 10902 | - /** | |
| 10903 | - * Adds a change listener. It will be called any time an action is dispatched, | |
| 10904 | - * and some part of the state tree may potentially have changed. You may then | |
| 10905 | - * call `getState()` to read the current state tree inside the callback. | |
| 10906 | - * | |
| 10907 | - * You may call `dispatch()` from a change listener, with the following | |
| 10908 | - * caveats: | |
| 10909 | - * | |
| 10910 | - * 1. The subscriptions are snapshotted just before every `dispatch()` call. | |
| 10911 | - * If you subscribe or unsubscribe while the listeners are being invoked, this | |
| 10912 | - * will not have any effect on the `dispatch()` that is currently in progress. | |
| 10913 | - * However, the next `dispatch()` call, whether nested or not, will use a more | |
| 10914 | - * recent snapshot of the subscription list. | |
| 10915 | - * | |
| 10916 | - * 2. The listener should not expect to see all state changes, as the state | |
| 10917 | - * might have been updated multiple times during a nested `dispatch()` before | |
| 10918 | - * the listener is called. It is, however, guaranteed that all subscribers | |
| 10919 | - * registered before the `dispatch()` started will be called with the latest | |
| 10920 | - * state by the time it exits. | |
| 10921 | - * | |
| 10922 | - * @param {Function} listener A callback to be invoked on every dispatch. | |
| 10923 | - * @returns {Function} A function to remove this change listener. | |
| 10924 | - */ | |
| 10925 | - | |
| 10926 | - | |
| 10927 | - function subscribe(listener) { | |
| 10928 | - if (typeof listener !== 'function') { | |
| 10929 | - throw new Error( false ? 0 : "Expected the listener to be a function. Instead, received: '" + kindOf(listener) + "'"); | |
| 10930 | - } | |
| 10931 | - | |
| 10932 | - if (isDispatching) { | |
| 10933 | - throw new Error( false ? 0 : 'You may not call store.subscribe() while the reducer is executing. ' + 'If you would like to be notified after the store has been updated, subscribe from a ' + 'component and invoke store.getState() in the callback to access the latest state. ' + 'See https://redux.js.org/api/store#subscribelistener for more details.'); | |
| 10934 | - } | |
| 10935 | - | |
| 10936 | - var isSubscribed = true; | |
| 10937 | - ensureCanMutateNextListeners(); | |
| 10938 | - nextListeners.push(listener); | |
| 10939 | - return function unsubscribe() { | |
| 10940 | - if (!isSubscribed) { | |
| 10941 | - return; | |
| 10942 | - } | |
| 10943 | - | |
| 10944 | - if (isDispatching) { | |
| 10945 | - throw new Error( false ? 0 : 'You may not unsubscribe from a store listener while the reducer is executing. ' + 'See https://redux.js.org/api/store#subscribelistener for more details.'); | |
| 10946 | - } | |
| 10947 | - | |
| 10948 | - isSubscribed = false; | |
| 10949 | - ensureCanMutateNextListeners(); | |
| 10950 | - var index = nextListeners.indexOf(listener); | |
| 10951 | - nextListeners.splice(index, 1); | |
| 10952 | - currentListeners = null; | |
| 10953 | - }; | |
| 10954 | - } | |
| 10955 | - /** | |
| 10956 | - * Dispatches an action. It is the only way to trigger a state change. | |
| 10957 | - * | |
| 10958 | - * The `reducer` function, used to create the store, will be called with the | |
| 10959 | - * current state tree and the given `action`. Its return value will | |
| 10960 | - * be considered the **next** state of the tree, and the change listeners | |
| 10961 | - * will be notified. | |
| 10962 | - * | |
| 10963 | - * The base implementation only supports plain object actions. If you want to | |
| 10964 | - * dispatch a Promise, an Observable, a thunk, or something else, you need to | |
| 10965 | - * wrap your store creating function into the corresponding middleware. For | |
| 10966 | - * example, see the documentation for the `redux-thunk` package. Even the | |
| 10967 | - * middleware will eventually dispatch plain object actions using this method. | |
| 10968 | - * | |
| 10969 | - * @param {Object} action A plain object representing “what changed”. It is | |
| 10970 | - * a good idea to keep actions serializable so you can record and replay user | |
| 10971 | - * sessions, or use the time travelling `redux-devtools`. An action must have | |
| 10972 | - * a `type` property which may not be `undefined`. It is a good idea to use | |
| 10973 | - * string constants for action types. | |
| 10974 | - * | |
| 10975 | - * @returns {Object} For convenience, the same action object you dispatched. | |
| 10976 | - * | |
| 10977 | - * Note that, if you use a custom middleware, it may wrap `dispatch()` to | |
| 10978 | - * return something else (for example, a Promise you can await). | |
| 10979 | - */ | |
| 10980 | - | |
| 10981 | - | |
| 10982 | - function dispatch(action) { | |
| 10983 | - if (!isPlainObject(action)) { | |
| 10984 | - throw new Error( false ? 0 : "Actions must be plain objects. Instead, the actual type was: '" + kindOf(action) + "'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples."); | |
| 10985 | - } | |
| 10986 | - | |
| 10987 | - if (typeof action.type === 'undefined') { | |
| 10988 | - throw new Error( false ? 0 : 'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.'); | |
| 10989 | - } | |
| 10990 | - | |
| 10991 | - if (isDispatching) { | |
| 10992 | - throw new Error( false ? 0 : 'Reducers may not dispatch actions.'); | |
| 10993 | - } | |
| 10994 | - | |
| 10995 | - try { | |
| 10996 | - isDispatching = true; | |
| 10997 | - currentState = currentReducer(currentState, action); | |
| 10998 | - } finally { | |
| 10999 | - isDispatching = false; | |
| 11000 | - } | |
| 11001 | - | |
| 11002 | - var listeners = currentListeners = nextListeners; | |
| 11003 | - | |
| 11004 | - for (var i = 0; i < listeners.length; i++) { | |
| 11005 | - var listener = listeners[i]; | |
| 11006 | - listener(); | |
| 11007 | - } | |
| 11008 | - | |
| 11009 | - return action; | |
| 11010 | - } | |
| 11011 | - /** | |
| 11012 | - * Replaces the reducer currently used by the store to calculate the state. | |
| 11013 | - * | |
| 11014 | - * You might need this if your app implements code splitting and you want to | |
| 11015 | - * load some of the reducers dynamically. You might also need this if you | |
| 11016 | - * implement a hot reloading mechanism for Redux. | |
| 11017 | - * | |
| 11018 | - * @param {Function} nextReducer The reducer for the store to use instead. | |
| 11019 | - * @returns {void} | |
| 11020 | - */ | |
| 11021 | - | |
| 11022 | - | |
| 11023 | - function replaceReducer(nextReducer) { | |
| 11024 | - if (typeof nextReducer !== 'function') { | |
| 11025 | - throw new Error( false ? 0 : "Expected the nextReducer to be a function. Instead, received: '" + kindOf(nextReducer)); | |
| 11026 | - } | |
| 11027 | - | |
| 11028 | - currentReducer = nextReducer; // This action has a similiar effect to ActionTypes.INIT. | |
| 11029 | - // Any reducers that existed in both the new and old rootReducer | |
| 11030 | - // will receive the previous state. This effectively populates | |
| 11031 | - // the new state tree with any relevant data from the old one. | |
| 11032 | - | |
| 11033 | - dispatch({ | |
| 11034 | - type: ActionTypes.REPLACE | |
| 11035 | - }); | |
| 11036 | - } | |
| 11037 | - /** | |
| 11038 | - * Interoperability point for observable/reactive libraries. | |
| 11039 | - * @returns {observable} A minimal observable of state changes. | |
| 11040 | - * For more information, see the observable proposal: | |
| 11041 | - * https://github.com/tc39/proposal-observable | |
| 11042 | - */ | |
| 11043 | - | |
| 11044 | - | |
| 11045 | - function observable() { | |
| 11046 | - var _ref; | |
| 11047 | - | |
| 11048 | - var outerSubscribe = subscribe; | |
| 11049 | - return _ref = { | |
| 11050 | - /** | |
| 11051 | - * The minimal observable subscription method. | |
| 11052 | - * @param {Object} observer Any object that can be used as an observer. | |
| 11053 | - * The observer object should have a `next` method. | |
| 11054 | - * @returns {subscription} An object with an `unsubscribe` method that can | |
| 11055 | - * be used to unsubscribe the observable from the store, and prevent further | |
| 11056 | - * emission of values from the observable. | |
| 11057 | - */ | |
| 11058 | - subscribe: function subscribe(observer) { | |
| 11059 | - if (typeof observer !== 'object' || observer === null) { | |
| 11060 | - throw new Error( false ? 0 : "Expected the observer to be an object. Instead, received: '" + kindOf(observer) + "'"); | |
| 11061 | - } | |
| 11062 | - | |
| 11063 | - function observeState() { | |
| 11064 | - if (observer.next) { | |
| 11065 | - observer.next(getState()); | |
| 11066 | - } | |
| 11067 | - } | |
| 11068 | - | |
| 11069 | - observeState(); | |
| 11070 | - var unsubscribe = outerSubscribe(observeState); | |
| 11071 | - return { | |
| 11072 | - unsubscribe: unsubscribe | |
| 11073 | - }; | |
| 11074 | - } | |
| 11075 | - }, _ref[$$observable] = function () { | |
| 11076 | - return this; | |
| 11077 | - }, _ref; | |
| 11078 | - } // When a store is created, an "INIT" action is dispatched so that every | |
| 11079 | - // reducer returns their initial state. This effectively populates | |
| 11080 | - // the initial state tree. | |
| 11081 | - | |
| 11082 | - | |
| 11083 | - dispatch({ | |
| 11084 | - type: ActionTypes.INIT | |
| 11085 | - }); | |
| 11086 | - return _ref2 = { | |
| 11087 | - dispatch: dispatch, | |
| 11088 | - subscribe: subscribe, | |
| 11089 | - getState: getState, | |
| 11090 | - replaceReducer: replaceReducer | |
| 11091 | - }, _ref2[$$observable] = observable, _ref2; | |
| 11092 | -} | |
| 11093 | -/** | |
| 11094 | - * Creates a Redux store that holds the state tree. | |
| 11095 | - * | |
| 11096 | - * **We recommend using `configureStore` from the | |
| 11097 | - * `@reduxjs/toolkit` package**, which replaces `createStore`: | |
| 11098 | - * **https://redux.js.org/introduction/why-rtk-is-redux-today** | |
| 11099 | - * | |
| 11100 | - * The only way to change the data in the store is to call `dispatch()` on it. | |
| 11101 | - * | |
| 11102 | - * There should only be a single store in your app. To specify how different | |
| 11103 | - * parts of the state tree respond to actions, you may combine several reducers | |
| 11104 | - * into a single reducer function by using `combineReducers`. | |
| 11105 | - * | |
| 11106 | - * @param {Function} reducer A function that returns the next state tree, given | |
| 11107 | - * the current state tree and the action to handle. | |
| 11108 | - * | |
| 11109 | - * @param {any} [preloadedState] The initial state. You may optionally specify it | |
| 11110 | - * to hydrate the state from the server in universal apps, or to restore a | |
| 11111 | - * previously serialized user session. | |
| 11112 | - * If you use `combineReducers` to produce the root reducer function, this must be | |
| 11113 | - * an object with the same shape as `combineReducers` keys. | |
| 11114 | - * | |
| 11115 | - * @param {Function} [enhancer] The store enhancer. You may optionally specify it | |
| 11116 | - * to enhance the store with third-party capabilities such as middleware, | |
| 11117 | - * time travel, persistence, etc. The only store enhancer that ships with Redux | |
| 11118 | - * is `applyMiddleware()`. | |
| 11119 | - * | |
| 11120 | - * @returns {Store} A Redux store that lets you read the state, dispatch actions | |
| 11121 | - * and subscribe to changes. | |
| 11122 | - */ | |
| 11123 | - | |
| 11124 | -var legacy_createStore = createStore; | |
| 11125 | - | |
| 11126 | -/** | |
| 11127 | - * Prints a warning in the console if it exists. | |
| 11128 | - * | |
| 11129 | - * @param {String} message The warning message. | |
| 11130 | - * @returns {void} | |
| 11131 | - */ | |
| 11132 | -function warning(message) { | |
| 11133 | - /* eslint-disable no-console */ | |
| 11134 | - if (typeof console !== 'undefined' && typeof console.error === 'function') { | |
| 11135 | - console.error(message); | |
| 11136 | - } | |
| 11137 | - /* eslint-enable no-console */ | |
| 11138 | - | |
| 11139 | - | |
| 11140 | - try { | |
| 11141 | - // This error was thrown as a convenience so that if you enable | |
| 11142 | - // "break on all exceptions" in your console, | |
| 11143 | - // it would pause the execution at this line. | |
| 11144 | - throw new Error(message); | |
| 11145 | - } catch (e) {} // eslint-disable-line no-empty | |
| 11146 | - | |
| 11147 | -} | |
| 11148 | - | |
| 11149 | -function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) { | |
| 11150 | - var reducerKeys = Object.keys(reducers); | |
| 11151 | - var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer'; | |
| 11152 | - | |
| 11153 | - if (reducerKeys.length === 0) { | |
| 11154 | - return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.'; | |
| 11155 | - } | |
| 11156 | - | |
| 11157 | - if (!isPlainObject(inputState)) { | |
| 11158 | - return "The " + argumentName + " has unexpected type of \"" + kindOf(inputState) + "\". Expected argument to be an object with the following " + ("keys: \"" + reducerKeys.join('", "') + "\""); | |
| 11159 | - } | |
| 11160 | - | |
| 11161 | - var unexpectedKeys = Object.keys(inputState).filter(function (key) { | |
| 11162 | - return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key]; | |
| 11163 | - }); | |
| 11164 | - unexpectedKeys.forEach(function (key) { | |
| 11165 | - unexpectedKeyCache[key] = true; | |
| 11166 | - }); | |
| 11167 | - if (action && action.type === ActionTypes.REPLACE) return; | |
| 11168 | - | |
| 11169 | - if (unexpectedKeys.length > 0) { | |
| 11170 | - return "Unexpected " + (unexpectedKeys.length > 1 ? 'keys' : 'key') + " " + ("\"" + unexpectedKeys.join('", "') + "\" found in " + argumentName + ". ") + "Expected to find one of the known reducer keys instead: " + ("\"" + reducerKeys.join('", "') + "\". Unexpected keys will be ignored."); | |
| 11171 | - } | |
| 11172 | -} | |
| 11173 | - | |
| 11174 | -function assertReducerShape(reducers) { | |
| 11175 | - Object.keys(reducers).forEach(function (key) { | |
| 11176 | - var reducer = reducers[key]; | |
| 11177 | - var initialState = reducer(undefined, { | |
| 11178 | - type: ActionTypes.INIT | |
| 11179 | - }); | |
| 11180 | - | |
| 11181 | - if (typeof initialState === 'undefined') { | |
| 11182 | - throw new Error( false ? 0 : "The slice reducer for key \"" + key + "\" returned undefined during initialization. " + "If the state passed to the reducer is undefined, you must " + "explicitly return the initial state. The initial state may " + "not be undefined. If you don't want to set a value for this reducer, " + "you can use null instead of undefined."); | |
| 11183 | - } | |
| 11184 | - | |
| 11185 | - if (typeof reducer(undefined, { | |
| 11186 | - type: ActionTypes.PROBE_UNKNOWN_ACTION() | |
| 11187 | - }) === 'undefined') { | |
| 11188 | - throw new Error( false ? 0 : "The slice reducer for key \"" + key + "\" returned undefined when probed with a random type. " + ("Don't try to handle '" + ActionTypes.INIT + "' or other actions in \"redux/*\" ") + "namespace. They are considered private. Instead, you must return the " + "current state for any unknown actions, unless it is undefined, " + "in which case you must return the initial state, regardless of the " + "action type. The initial state may not be undefined, but can be null."); | |
| 11189 | - } | |
| 11190 | - }); | |
| 11191 | -} | |
| 11192 | -/** | |
| 11193 | - * Turns an object whose values are different reducer functions, into a single | |
| 11194 | - * reducer function. It will call every child reducer, and gather their results | |
| 11195 | - * into a single state object, whose keys correspond to the keys of the passed | |
| 11196 | - * reducer functions. | |
| 11197 | - * | |
| 11198 | - * @param {Object} reducers An object whose values correspond to different | |
| 11199 | - * reducer functions that need to be combined into one. One handy way to obtain | |
| 11200 | - * it is to use ES6 `import * as reducers` syntax. The reducers may never return | |
| 11201 | - * undefined for any action. Instead, they should return their initial state | |
| 11202 | - * if the state passed to them was undefined, and the current state for any | |
| 11203 | - * unrecognized action. | |
| 11204 | - * | |
| 11205 | - * @returns {Function} A reducer function that invokes every reducer inside the | |
| 11206 | - * passed object, and builds a state object with the same shape. | |
| 11207 | - */ | |
| 11208 | - | |
| 11209 | - | |
| 11210 | -function combineReducers(reducers) { | |
| 11211 | - var reducerKeys = Object.keys(reducers); | |
| 11212 | - var finalReducers = {}; | |
| 11213 | - | |
| 11214 | - for (var i = 0; i < reducerKeys.length; i++) { | |
| 11215 | - var key = reducerKeys[i]; | |
| 11216 | - | |
| 11217 | - if (true) { | |
| 11218 | - if (typeof reducers[key] === 'undefined') { | |
| 11219 | - warning("No reducer provided for key \"" + key + "\""); | |
| 11220 | - } | |
| 11221 | - } | |
| 11222 | - | |
| 11223 | - if (typeof reducers[key] === 'function') { | |
| 11224 | - finalReducers[key] = reducers[key]; | |
| 11225 | - } | |
| 11226 | - } | |
| 11227 | - | |
| 11228 | - var finalReducerKeys = Object.keys(finalReducers); // This is used to make sure we don't warn about the same | |
| 11229 | - // keys multiple times. | |
| 11230 | - | |
| 11231 | - var unexpectedKeyCache; | |
| 11232 | - | |
| 11233 | - if (true) { | |
| 11234 | - unexpectedKeyCache = {}; | |
| 11235 | - } | |
| 11236 | - | |
| 11237 | - var shapeAssertionError; | |
| 11238 | - | |
| 11239 | - try { | |
| 11240 | - assertReducerShape(finalReducers); | |
| 11241 | - } catch (e) { | |
| 11242 | - shapeAssertionError = e; | |
| 11243 | - } | |
| 11244 | - | |
| 11245 | - return function combination(state, action) { | |
| 11246 | - if (state === void 0) { | |
| 11247 | - state = {}; | |
| 11248 | - } | |
| 11249 | - | |
| 11250 | - if (shapeAssertionError) { | |
| 11251 | - throw shapeAssertionError; | |
| 11252 | - } | |
| 11253 | - | |
| 11254 | - if (true) { | |
| 11255 | - var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache); | |
| 11256 | - | |
| 11257 | - if (warningMessage) { | |
| 11258 | - warning(warningMessage); | |
| 11259 | - } | |
| 11260 | - } | |
| 11261 | - | |
| 11262 | - var hasChanged = false; | |
| 11263 | - var nextState = {}; | |
| 11264 | - | |
| 11265 | - for (var _i = 0; _i < finalReducerKeys.length; _i++) { | |
| 11266 | - var _key = finalReducerKeys[_i]; | |
| 11267 | - var reducer = finalReducers[_key]; | |
| 11268 | - var previousStateForKey = state[_key]; | |
| 11269 | - var nextStateForKey = reducer(previousStateForKey, action); | |
| 11270 | - | |
| 11271 | - if (typeof nextStateForKey === 'undefined') { | |
| 11272 | - var actionType = action && action.type; | |
| 11273 | - throw new Error( false ? 0 : "When called with an action of type " + (actionType ? "\"" + String(actionType) + "\"" : '(unknown type)') + ", the slice reducer for key \"" + _key + "\" returned undefined. " + "To ignore an action, you must explicitly return the previous state. " + "If you want this reducer to hold no value, you can return null instead of undefined."); | |
| 11274 | - } | |
| 11275 | - | |
| 11276 | - nextState[_key] = nextStateForKey; | |
| 11277 | - hasChanged = hasChanged || nextStateForKey !== previousStateForKey; | |
| 11278 | - } | |
| 11279 | - | |
| 11280 | - hasChanged = hasChanged || finalReducerKeys.length !== Object.keys(state).length; | |
| 11281 | - return hasChanged ? nextState : state; | |
| 11282 | - }; | |
| 11283 | -} | |
| 11284 | - | |
| 11285 | -function bindActionCreator(actionCreator, dispatch) { | |
| 11286 | - return function () { | |
| 11287 | - return dispatch(actionCreator.apply(this, arguments)); | |
| 11288 | - }; | |
| 11289 | -} | |
| 11290 | -/** | |
| 11291 | - * Turns an object whose values are action creators, into an object with the | |
| 11292 | - * same keys, but with every function wrapped into a `dispatch` call so they | |
| 11293 | - * may be invoked directly. This is just a convenience method, as you can call | |
| 11294 | - * `store.dispatch(MyActionCreators.doSomething())` yourself just fine. | |
| 11295 | - * | |
| 11296 | - * For convenience, you can also pass an action creator as the first argument, | |
| 11297 | - * and get a dispatch wrapped function in return. | |
| 11298 | - * | |
| 11299 | - * @param {Function|Object} actionCreators An object whose values are action | |
| 11300 | - * creator functions. One handy way to obtain it is to use ES6 `import * as` | |
| 11301 | - * syntax. You may also pass a single function. | |
| 11302 | - * | |
| 11303 | - * @param {Function} dispatch The `dispatch` function available on your Redux | |
| 11304 | - * store. | |
| 11305 | - * | |
| 11306 | - * @returns {Function|Object} The object mimicking the original object, but with | |
| 11307 | - * every action creator wrapped into the `dispatch` call. If you passed a | |
| 11308 | - * function as `actionCreators`, the return value will also be a single | |
| 11309 | - * function. | |
| 11310 | - */ | |
| 11311 | - | |
| 11312 | - | |
| 11313 | -function bindActionCreators(actionCreators, dispatch) { | |
| 11314 | - if (typeof actionCreators === 'function') { | |
| 11315 | - return bindActionCreator(actionCreators, dispatch); | |
| 11316 | - } | |
| 11317 | - | |
| 11318 | - if (typeof actionCreators !== 'object' || actionCreators === null) { | |
| 11319 | - throw new Error( false ? 0 : "bindActionCreators expected an object or a function, but instead received: '" + kindOf(actionCreators) + "'. " + "Did you write \"import ActionCreators from\" instead of \"import * as ActionCreators from\"?"); | |
| 11320 | - } | |
| 11321 | - | |
| 11322 | - var boundActionCreators = {}; | |
| 11323 | - | |
| 11324 | - for (var key in actionCreators) { | |
| 11325 | - var actionCreator = actionCreators[key]; | |
| 11326 | - | |
| 11327 | - if (typeof actionCreator === 'function') { | |
| 11328 | - boundActionCreators[key] = bindActionCreator(actionCreator, dispatch); | |
| 11329 | - } | |
| 11330 | - } | |
| 11331 | - | |
| 11332 | - return boundActionCreators; | |
| 11333 | -} | |
| 11334 | - | |
| 11335 | -/** | |
| 11336 | - * Composes single-argument functions from right to left. The rightmost | |
| 11337 | - * function can take multiple arguments as it provides the signature for | |
| 11338 | - * the resulting composite function. | |
| 11339 | - * | |
| 11340 | - * @param {...Function} funcs The functions to compose. | |
| 11341 | - * @returns {Function} A function obtained by composing the argument functions | |
| 11342 | - * from right to left. For example, compose(f, g, h) is identical to doing | |
| 11343 | - * (...args) => f(g(h(...args))). | |
| 11344 | - */ | |
| 11345 | -function compose() { | |
| 11346 | - for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) { | |
| 11347 | - funcs[_key] = arguments[_key]; | |
| 11348 | - } | |
| 11349 | - | |
| 11350 | - if (funcs.length === 0) { | |
| 11351 | - return function (arg) { | |
| 11352 | - return arg; | |
| 11353 | - }; | |
| 11354 | - } | |
| 11355 | - | |
| 11356 | - if (funcs.length === 1) { | |
| 11357 | - return funcs[0]; | |
| 11358 | - } | |
| 11359 | - | |
| 11360 | - return funcs.reduce(function (a, b) { | |
| 11361 | - return function () { | |
| 11362 | - return a(b.apply(void 0, arguments)); | |
| 11363 | - }; | |
| 11364 | - }); | |
| 11365 | -} | |
| 11366 | - | |
| 11367 | -/** | |
| 11368 | - * Creates a store enhancer that applies middleware to the dispatch method | |
| 11369 | - * of the Redux store. This is handy for a variety of tasks, such as expressing | |
| 11370 | - * asynchronous actions in a concise manner, or logging every action payload. | |
| 11371 | - * | |
| 11372 | - * See `redux-thunk` package as an example of the Redux middleware. | |
| 11373 | - * | |
| 11374 | - * Because middleware is potentially asynchronous, this should be the first | |
| 11375 | - * store enhancer in the composition chain. | |
| 11376 | - * | |
| 11377 | - * Note that each middleware will be given the `dispatch` and `getState` functions | |
| 11378 | - * as named arguments. | |
| 11379 | - * | |
| 11380 | - * @param {...Function} middlewares The middleware chain to be applied. | |
| 11381 | - * @returns {Function} A store enhancer applying the middleware. | |
| 11382 | - */ | |
| 11383 | - | |
| 11384 | -function applyMiddleware() { | |
| 11385 | - for (var _len = arguments.length, middlewares = new Array(_len), _key = 0; _key < _len; _key++) { | |
| 11386 | - middlewares[_key] = arguments[_key]; | |
| 11387 | - } | |
| 11388 | - | |
| 11389 | - return function (createStore) { | |
| 11390 | - return function () { | |
| 11391 | - var store = createStore.apply(void 0, arguments); | |
| 11392 | - | |
| 11393 | - var _dispatch = function dispatch() { | |
| 11394 | - throw new Error( false ? 0 : 'Dispatching while constructing your middleware is not allowed. ' + 'Other middleware would not be applied to this dispatch.'); | |
| 11395 | - }; | |
| 11396 | - | |
| 11397 | - var middlewareAPI = { | |
| 11398 | - getState: store.getState, | |
| 11399 | - dispatch: function dispatch() { | |
| 11400 | - return _dispatch.apply(void 0, arguments); | |
| 11401 | - } | |
| 11402 | - }; | |
| 11403 | - var chain = middlewares.map(function (middleware) { | |
| 11404 | - return middleware(middlewareAPI); | |
| 11405 | - }); | |
| 11406 | - _dispatch = compose.apply(void 0, chain)(store.dispatch); | |
| 11407 | - return (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__["default"])((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__["default"])({}, store), {}, { | |
| 11408 | - dispatch: _dispatch | |
| 11409 | - }); | |
| 11410 | - }; | |
| 11411 | - }; | |
| 11412 | -} | |
| 11413 | - | |
| 11414 | - | |
| 11415 | - | |
| 11416 | - | |
| 11417 | -/***/ }), | |
| 11418 | - | |
| 11419 | -/***/ "../node_modules/reselect/es/defaultMemoize.js": | |
| 11420 | -/*!*****************************************************!*\ | |
| 11421 | - !*** ../node_modules/reselect/es/defaultMemoize.js ***! | |
| 11422 | - \*****************************************************/ | |
| 11423 | -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | |
| 11424 | - | |
| 11425 | -"use strict"; | |
| 11426 | -__webpack_require__.r(__webpack_exports__); | |
| 11427 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 11428 | -/* harmony export */ createCacheKeyComparator: () => (/* binding */ createCacheKeyComparator), | |
| 11429 | -/* harmony export */ defaultEqualityCheck: () => (/* binding */ defaultEqualityCheck), | |
| 11430 | -/* harmony export */ defaultMemoize: () => (/* binding */ defaultMemoize) | |
| 11431 | -/* harmony export */ }); | |
| 11432 | -// Cache implementation based on Erik Rasmussen's `lru-memoize`: | |
| 11433 | -// https://github.com/erikras/lru-memoize | |
| 11434 | -var NOT_FOUND = 'NOT_FOUND'; | |
| 11435 | - | |
| 11436 | -function createSingletonCache(equals) { | |
| 11437 | - var entry; | |
| 11438 | - return { | |
| 11439 | - get: function get(key) { | |
| 11440 | - if (entry && equals(entry.key, key)) { | |
| 11441 | - return entry.value; | |
| 11442 | - } | |
| 11443 | - | |
| 11444 | - return NOT_FOUND; | |
| 11445 | - }, | |
| 11446 | - put: function put(key, value) { | |
| 11447 | - entry = { | |
| 11448 | - key: key, | |
| 11449 | - value: value | |
| 11450 | - }; | |
| 11451 | - }, | |
| 11452 | - getEntries: function getEntries() { | |
| 11453 | - return entry ? [entry] : []; | |
| 11454 | - }, | |
| 11455 | - clear: function clear() { | |
| 11456 | - entry = undefined; | |
| 11457 | - } | |
| 11458 | - }; | |
| 11459 | -} | |
| 11460 | - | |
| 11461 | -function createLruCache(maxSize, equals) { | |
| 11462 | - var entries = []; | |
| 11463 | - | |
| 11464 | - function get(key) { | |
| 11465 | - var cacheIndex = entries.findIndex(function (entry) { | |
| 11466 | - return equals(key, entry.key); | |
| 11467 | - }); // We found a cached entry | |
| 11468 | - | |
| 11469 | - if (cacheIndex > -1) { | |
| 11470 | - var entry = entries[cacheIndex]; // Cached entry not at top of cache, move it to the top | |
| 11471 | - | |
| 11472 | - if (cacheIndex > 0) { | |
| 11473 | - entries.splice(cacheIndex, 1); | |
| 11474 | - entries.unshift(entry); | |
| 11475 | - } | |
| 11476 | - | |
| 11477 | - return entry.value; | |
| 11478 | - } // No entry found in cache, return sentinel | |
| 11479 | - | |
| 11480 | - | |
| 11481 | - return NOT_FOUND; | |
| 11482 | - } | |
| 11483 | - | |
| 11484 | - function put(key, value) { | |
| 11485 | - if (get(key) === NOT_FOUND) { | |
| 11486 | - // TODO Is unshift slow? | |
| 11487 | - entries.unshift({ | |
| 11488 | - key: key, | |
| 11489 | - value: value | |
| 11490 | - }); | |
| 11491 | - | |
| 11492 | - if (entries.length > maxSize) { | |
| 11493 | - entries.pop(); | |
| 11494 | - } | |
| 11495 | - } | |
| 11496 | - } | |
| 11497 | - | |
| 11498 | - function getEntries() { | |
| 11499 | - return entries; | |
| 11500 | - } | |
| 11501 | - | |
| 11502 | - function clear() { | |
| 11503 | - entries = []; | |
| 11504 | - } | |
| 11505 | - | |
| 11506 | - return { | |
| 11507 | - get: get, | |
| 11508 | - put: put, | |
| 11509 | - getEntries: getEntries, | |
| 11510 | - clear: clear | |
| 11511 | - }; | |
| 11512 | -} | |
| 11513 | - | |
| 11514 | -var defaultEqualityCheck = function defaultEqualityCheck(a, b) { | |
| 11515 | - return a === b; | |
| 11516 | -}; | |
| 11517 | -function createCacheKeyComparator(equalityCheck) { | |
| 11518 | - return function areArgumentsShallowlyEqual(prev, next) { | |
| 11519 | - if (prev === null || next === null || prev.length !== next.length) { | |
| 11520 | - return false; | |
| 11521 | - } // Do this in a for loop (and not a `forEach` or an `every`) so we can determine equality as fast as possible. | |
| 11522 | - | |
| 11523 | - | |
| 11524 | - var length = prev.length; | |
| 11525 | - | |
| 11526 | - for (var i = 0; i < length; i++) { | |
| 11527 | - if (!equalityCheck(prev[i], next[i])) { | |
| 11528 | - return false; | |
| 11529 | - } | |
| 11530 | - } | |
| 11531 | - | |
| 11532 | - return true; | |
| 11533 | - }; | |
| 11534 | -} | |
| 11535 | -// defaultMemoize now supports a configurable cache size with LRU behavior, | |
| 11536 | -// and optional comparison of the result value with existing values | |
| 11537 | -function defaultMemoize(func, equalityCheckOrOptions) { | |
| 11538 | - var providedOptions = typeof equalityCheckOrOptions === 'object' ? equalityCheckOrOptions : { | |
| 11539 | - equalityCheck: equalityCheckOrOptions | |
| 11540 | - }; | |
| 11541 | - var _providedOptions$equa = providedOptions.equalityCheck, | |
| 11542 | - equalityCheck = _providedOptions$equa === void 0 ? defaultEqualityCheck : _providedOptions$equa, | |
| 11543 | - _providedOptions$maxS = providedOptions.maxSize, | |
| 11544 | - maxSize = _providedOptions$maxS === void 0 ? 1 : _providedOptions$maxS, | |
| 11545 | - resultEqualityCheck = providedOptions.resultEqualityCheck; | |
| 11546 | - var comparator = createCacheKeyComparator(equalityCheck); | |
| 11547 | - var cache = maxSize === 1 ? createSingletonCache(comparator) : createLruCache(maxSize, comparator); // we reference arguments instead of spreading them for performance reasons | |
| 11548 | - | |
| 11549 | - function memoized() { | |
| 11550 | - var value = cache.get(arguments); | |
| 11551 | - | |
| 11552 | - if (value === NOT_FOUND) { | |
| 11553 | - // @ts-ignore | |
| 11554 | - value = func.apply(null, arguments); | |
| 11555 | - | |
| 11556 | - if (resultEqualityCheck) { | |
| 11557 | - var entries = cache.getEntries(); | |
| 11558 | - var matchingEntry = entries.find(function (entry) { | |
| 11559 | - return resultEqualityCheck(entry.value, value); | |
| 11560 | - }); | |
| 11561 | - | |
| 11562 | - if (matchingEntry) { | |
| 11563 | - value = matchingEntry.value; | |
| 11564 | - } | |
| 11565 | - } | |
| 11566 | - | |
| 11567 | - cache.put(arguments, value); | |
| 11568 | - } | |
| 11569 | - | |
| 11570 | - return value; | |
| 11571 | - } | |
| 11572 | - | |
| 11573 | - memoized.clearCache = function () { | |
| 11574 | - return cache.clear(); | |
| 11575 | - }; | |
| 11576 | - | |
| 11577 | - return memoized; | |
| 11578 | -} | |
| 11579 | - | |
| 11580 | -/***/ }), | |
| 11581 | - | |
| 11582 | -/***/ "../node_modules/reselect/es/index.js": | |
| 11583 | -/*!********************************************!*\ | |
| 11584 | - !*** ../node_modules/reselect/es/index.js ***! | |
| 11585 | - \********************************************/ | |
| 11586 | -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | |
| 11587 | - | |
| 11588 | -"use strict"; | |
| 11589 | -__webpack_require__.r(__webpack_exports__); | |
| 11590 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 11591 | -/* harmony export */ createSelector: () => (/* binding */ createSelector), | |
| 11592 | -/* harmony export */ createSelectorCreator: () => (/* binding */ createSelectorCreator), | |
| 11593 | -/* harmony export */ createStructuredSelector: () => (/* binding */ createStructuredSelector), | |
| 11594 | -/* harmony export */ defaultEqualityCheck: () => (/* reexport safe */ _defaultMemoize__WEBPACK_IMPORTED_MODULE_0__.defaultEqualityCheck), | |
| 11595 | -/* harmony export */ defaultMemoize: () => (/* reexport safe */ _defaultMemoize__WEBPACK_IMPORTED_MODULE_0__.defaultMemoize) | |
| 11596 | -/* harmony export */ }); | |
| 11597 | -/* harmony import */ var _defaultMemoize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultMemoize */ "../node_modules/reselect/es/defaultMemoize.js"); | |
| 11598 | - | |
| 11599 | - | |
| 11600 | - | |
| 11601 | -function getDependencies(funcs) { | |
| 11602 | - var dependencies = Array.isArray(funcs[0]) ? funcs[0] : funcs; | |
| 11603 | - | |
| 11604 | - if (!dependencies.every(function (dep) { | |
| 11605 | - return typeof dep === 'function'; | |
| 11606 | - })) { | |
| 11607 | - var dependencyTypes = dependencies.map(function (dep) { | |
| 11608 | - return typeof dep === 'function' ? "function " + (dep.name || 'unnamed') + "()" : typeof dep; | |
| 11609 | - }).join(', '); | |
| 11610 | - throw new Error("createSelector expects all input-selectors to be functions, but received the following types: [" + dependencyTypes + "]"); | |
| 11611 | - } | |
| 11612 | - | |
| 11613 | - return dependencies; | |
| 11614 | -} | |
| 11615 | - | |
| 11616 | -function createSelectorCreator(memoize) { | |
| 11617 | - for (var _len = arguments.length, memoizeOptionsFromArgs = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { | |
| 11618 | - memoizeOptionsFromArgs[_key - 1] = arguments[_key]; | |
| 11619 | - } | |
| 11620 | - | |
| 11621 | - var createSelector = function createSelector() { | |
| 11622 | - for (var _len2 = arguments.length, funcs = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { | |
| 11623 | - funcs[_key2] = arguments[_key2]; | |
| 11624 | - } | |
| 11625 | - | |
| 11626 | - var _recomputations = 0; | |
| 11627 | - | |
| 11628 | - var _lastResult; // Due to the intricacies of rest params, we can't do an optional arg after `...funcs`. | |
| 11629 | - // So, start by declaring the default value here. | |
| 11630 | - // (And yes, the words 'memoize' and 'options' appear too many times in this next sequence.) | |
| 11631 | - | |
| 11632 | - | |
| 11633 | - var directlyPassedOptions = { | |
| 11634 | - memoizeOptions: undefined | |
| 11635 | - }; // Normally, the result func or "output selector" is the last arg | |
| 11636 | - | |
| 11637 | - var resultFunc = funcs.pop(); // If the result func is actually an _object_, assume it's our options object | |
| 11638 | - | |
| 11639 | - if (typeof resultFunc === 'object') { | |
| 11640 | - directlyPassedOptions = resultFunc; // and pop the real result func off | |
| 11641 | - | |
| 11642 | - resultFunc = funcs.pop(); | |
| 11643 | - } | |
| 11644 | - | |
| 11645 | - if (typeof resultFunc !== 'function') { | |
| 11646 | - throw new Error("createSelector expects an output function after the inputs, but received: [" + typeof resultFunc + "]"); | |
| 11647 | - } // Determine which set of options we're using. Prefer options passed directly, | |
| 11648 | - // but fall back to options given to createSelectorCreator. | |
| 11649 | - | |
| 11650 | - | |
| 11651 | - var _directlyPassedOption = directlyPassedOptions, | |
| 11652 | - _directlyPassedOption2 = _directlyPassedOption.memoizeOptions, | |
| 11653 | - memoizeOptions = _directlyPassedOption2 === void 0 ? memoizeOptionsFromArgs : _directlyPassedOption2; // Simplifying assumption: it's unlikely that the first options arg of the provided memoizer | |
| 11654 | - // is an array. In most libs I've looked at, it's an equality function or options object. | |
| 11655 | - // Based on that, if `memoizeOptions` _is_ an array, we assume it's a full | |
| 11656 | - // user-provided array of options. Otherwise, it must be just the _first_ arg, and so | |
| 11657 | - // we wrap it in an array so we can apply it. | |
| 11658 | - | |
| 11659 | - var finalMemoizeOptions = Array.isArray(memoizeOptions) ? memoizeOptions : [memoizeOptions]; | |
| 11660 | - var dependencies = getDependencies(funcs); | |
| 11661 | - var memoizedResultFunc = memoize.apply(void 0, [function recomputationWrapper() { | |
| 11662 | - _recomputations++; // apply arguments instead of spreading for performance. | |
| 11663 | - | |
| 11664 | - return resultFunc.apply(null, arguments); | |
| 11665 | - }].concat(finalMemoizeOptions)); // If a selector is called with the exact same arguments we don't need to traverse our dependencies again. | |
| 11666 | - | |
| 11667 | - var selector = memoize(function dependenciesChecker() { | |
| 11668 | - var params = []; | |
| 11669 | - var length = dependencies.length; | |
| 11670 | - | |
| 11671 | - for (var i = 0; i < length; i++) { | |
| 11672 | - // apply arguments instead of spreading and mutate a local list of params for performance. | |
| 11673 | - // @ts-ignore | |
| 11674 | - params.push(dependencies[i].apply(null, arguments)); | |
| 11675 | - } // apply arguments instead of spreading for performance. | |
| 11676 | - | |
| 11677 | - | |
| 11678 | - _lastResult = memoizedResultFunc.apply(null, params); | |
| 11679 | - return _lastResult; | |
| 11680 | - }); | |
| 11681 | - Object.assign(selector, { | |
| 11682 | - resultFunc: resultFunc, | |
| 11683 | - memoizedResultFunc: memoizedResultFunc, | |
| 11684 | - dependencies: dependencies, | |
| 11685 | - lastResult: function lastResult() { | |
| 11686 | - return _lastResult; | |
| 11687 | - }, | |
| 11688 | - recomputations: function recomputations() { | |
| 11689 | - return _recomputations; | |
| 11690 | - }, | |
| 11691 | - resetRecomputations: function resetRecomputations() { | |
| 11692 | - return _recomputations = 0; | |
| 11693 | - } | |
| 11694 | - }); | |
| 11695 | - return selector; | |
| 11696 | - }; // @ts-ignore | |
| 11697 | - | |
| 11698 | - | |
| 11699 | - return createSelector; | |
| 11700 | -} | |
| 11701 | -var createSelector = /* #__PURE__ */createSelectorCreator(_defaultMemoize__WEBPACK_IMPORTED_MODULE_0__.defaultMemoize); | |
| 11702 | -// Manual definition of state and output arguments | |
| 11703 | -var createStructuredSelector = function createStructuredSelector(selectors, selectorCreator) { | |
| 11704 | - if (selectorCreator === void 0) { | |
| 11705 | - selectorCreator = createSelector; | |
| 11706 | - } | |
| 11707 | - | |
| 11708 | - if (typeof selectors !== 'object') { | |
| 11709 | - throw new Error('createStructuredSelector expects first argument to be an object ' + ("where each property is a selector, instead received a " + typeof selectors)); | |
| 11710 | - } | |
| 11711 | - | |
| 11712 | - var objectKeys = Object.keys(selectors); | |
| 11713 | - var resultSelector = selectorCreator( // @ts-ignore | |
| 11714 | - objectKeys.map(function (key) { | |
| 11715 | - return selectors[key]; | |
| 11716 | - }), function () { | |
| 11717 | - for (var _len3 = arguments.length, values = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { | |
| 11718 | - values[_key3] = arguments[_key3]; | |
| 11719 | - } | |
| 11720 | - | |
| 11721 | - return values.reduce(function (composition, value, index) { | |
| 11722 | - composition[objectKeys[index]] = value; | |
| 11723 | - return composition; | |
| 11724 | - }, {}); | |
| 11725 | - }); | |
| 11726 | - return resultSelector; | |
| 11727 | -}; | |
| 11728 | - | |
| 11729 | 8394 | /***/ }) |
| 11730 | 8395 | |
| 11731 | 8396 | /******/ }); |
| 11732 | 8397 | /************************************************************************/ |
| @@ -11752,49 +8417,8 @@ | ||
| 11752 | 8417 | /******/ |
| 11753 | 8418 | /******/ // Return the exports of the module |
| 11754 | 8419 | /******/ return module.exports; |
| 11755 | 8420 | /******/ } |
| 11756 | -/******/ | |
| 11757 | -/************************************************************************/ | |
| 11758 | -/******/ /* webpack/runtime/define property getters */ | |
| 11759 | -/******/ (() => { | |
| 11760 | -/******/ // define getter functions for harmony exports | |
| 11761 | -/******/ __webpack_require__.d = (exports, definition) => { | |
| 11762 | -/******/ for(var key in definition) { | |
| 11763 | -/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { | |
| 11764 | -/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); | |
| 11765 | -/******/ } | |
| 11766 | -/******/ } | |
| 11767 | -/******/ }; | |
| 11768 | -/******/ })(); | |
| 11769 | -/******/ | |
| 11770 | -/******/ /* webpack/runtime/global */ | |
| 11771 | -/******/ (() => { | |
| 11772 | -/******/ __webpack_require__.g = (function() { | |
| 11773 | -/******/ if (typeof globalThis === 'object') return globalThis; | |
| 11774 | -/******/ try { | |
| 11775 | -/******/ return this || new Function('return this')(); | |
| 11776 | -/******/ } catch (e) { | |
| 11777 | -/******/ if (typeof window === 'object') return window; | |
| 11778 | -/******/ } | |
| 11779 | -/******/ })(); | |
| 11780 | -/******/ })(); | |
| 11781 | -/******/ | |
| 11782 | -/******/ /* webpack/runtime/hasOwnProperty shorthand */ | |
| 11783 | -/******/ (() => { | |
| 11784 | -/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) | |
| 11785 | -/******/ })(); | |
| 11786 | -/******/ | |
| 11787 | -/******/ /* webpack/runtime/make namespace object */ | |
| 11788 | -/******/ (() => { | |
| 11789 | -/******/ // define __esModule on exports | |
| 11790 | -/******/ __webpack_require__.r = (exports) => { | |
| 11791 | -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { | |
| 11792 | -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); | |
| 11793 | -/******/ } | |
| 11794 | -/******/ Object.defineProperty(exports, '__esModule', { value: true }); | |
| 11795 | -/******/ }; | |
| 11796 | -/******/ })(); | |
| 11797 | 8421 | /******/ |
| 11798 | 8422 | /************************************************************************/ |
| 11799 | 8423 | var __webpack_exports__ = {}; |
| 11800 | 8424 | // This entry needs to be wrapped in an IIFE because it needs to be in strict mode. |