| @@ -1,6867 +1,2621 @@ | ||
| 1 | -/******/ (() => { // webpackBootstrap | |
| 2 | -/******/ var __webpack_modules__ = ({ | |
| 1 | +(function(_reduxjs_toolkit) { | |
| 3 | 2 | |
| 4 | -/***/ "../app/modules/import-export-customization/assets/js/shared/registry/base.js": | |
| 5 | -/*!************************************************************************************!*\ | |
| 6 | - !*** ../app/modules/import-export-customization/assets/js/shared/registry/base.js ***! | |
| 7 | - \************************************************************************************/ | |
| 8 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 3 | +//#region \0rolldown/runtime.js | |
| 4 | + var __create = Object.create; | |
| 5 | + var __defProp = Object.defineProperty; | |
| 6 | + var __name = (target, value) => __defProp(target, "name", { | |
| 7 | + value, | |
| 8 | + configurable: true | |
| 9 | + }); | |
| 10 | + var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 11 | + var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 12 | + var __getProtoOf = Object.getPrototypeOf; | |
| 13 | + var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 14 | + var __esmMin = (fn, res, err) => () => { | |
| 15 | + if (err) throw err[0]; | |
| 16 | + try { | |
| 17 | + return fn && (res = fn(fn = 0)), res; | |
| 18 | + } catch (e) { | |
| 19 | + throw err = [e], e; | |
| 20 | + } | |
| 21 | + }; | |
| 22 | + var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports); | |
| 23 | + var __exportAll = (all, no_symbols) => { | |
| 24 | + let target = {}; | |
| 25 | + for (var name in all) { | |
| 26 | + __defProp(target, name, { | |
| 27 | + get: all[name], | |
| 28 | + enumerable: true | |
| 29 | + }); | |
| 30 | + } | |
| 31 | + if (!no_symbols) { | |
| 32 | + __defProp(target, Symbol.toStringTag, { value: "Module" }); | |
| 33 | + } | |
| 34 | + return target; | |
| 35 | + }; | |
| 36 | + var __copyProps = (to, from, except, desc) => { | |
| 37 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 38 | + for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) { | |
| 39 | + key = keys[i]; | |
| 40 | + if (!__hasOwnProp.call(to, key) && key !== except) { | |
| 41 | + __defProp(to, key, { | |
| 42 | + get: ((k) => from[k]).bind(null, key), | |
| 43 | + enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable | |
| 44 | + }); | |
| 45 | + } | |
| 46 | + } | |
| 47 | + } | |
| 48 | + return to; | |
| 49 | + }; | |
| 50 | + var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { | |
| 51 | + value: mod, | |
| 52 | + enumerable: true | |
| 53 | + }) : target, mod)); | |
| 9 | 54 | |
| 10 | -"use strict"; | |
| 55 | +//#endregion | |
| 11 | 56 | |
| 57 | +//#region node_modules/@babel/runtime/helpers/esm/typeof.js | |
| 58 | + function _typeof(o) { | |
| 59 | + "@babel/helpers - typeof"; | |
| 60 | + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) { | |
| 61 | + return typeof o; | |
| 62 | + } : function(o) { | |
| 63 | + return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; | |
| 64 | + }, _typeof(o); | |
| 65 | + } | |
| 66 | + var init_typeof = __esmMin((() => {})); | |
| 12 | 67 | |
| 13 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 14 | -Object.defineProperty(exports, "__esModule", ({ | |
| 15 | - value: true | |
| 16 | -})); | |
| 17 | -exports.BaseRegistry = void 0; | |
| 18 | -var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "../node_modules/@babel/runtime/helpers/toConsumableArray.js")); | |
| 19 | -var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); | |
| 20 | -var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ "../node_modules/@babel/runtime/helpers/objectWithoutProperties.js")); | |
| 21 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 22 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 23 | -var _excluded = ["children"]; | |
| 24 | -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; } | |
| 25 | -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; } | |
| 26 | -var BaseRegistry = exports.BaseRegistry = /*#__PURE__*/function () { | |
| 27 | - function BaseRegistry() { | |
| 28 | - (0, _classCallCheck2.default)(this, BaseRegistry); | |
| 29 | - this.sections = new Map(); | |
| 30 | - } | |
| 31 | - return (0, _createClass2.default)(BaseRegistry, [{ | |
| 32 | - key: "register", | |
| 33 | - value: function register(section) { | |
| 34 | - var _this = this; | |
| 35 | - if (!section.key || !section.title) { | |
| 36 | - throw new Error('Template type must have key and title'); | |
| 37 | - } | |
| 38 | - var existingSection = this.get(section.key); | |
| 39 | - var formattedSection = existingSection || this.formatSection(section); | |
| 40 | - if (section.children) { | |
| 41 | - // If existing section has children, merge them with new children | |
| 42 | - if (formattedSection.children) { | |
| 43 | - var existingChildrenMap = new Map(formattedSection.children.map(function (child) { | |
| 44 | - return [child.key, child]; | |
| 45 | - })); | |
| 68 | +//#endregion | |
| 69 | +//#region assets/dev/js/modules/imports/module.js | |
| 70 | + var require_module = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 71 | + init_typeof(); | |
| 72 | + var Module = function Module() { | |
| 73 | + var $ = jQuery; | |
| 74 | + var instanceParams = arguments; | |
| 75 | + var self = this; | |
| 76 | + var events = {}; | |
| 77 | + var settings; | |
| 78 | + var ensureClosureMethods = function ensureClosureMethods() { | |
| 79 | + $.each(self, function(methodName) { | |
| 80 | + var oldMethod = self[methodName]; | |
| 81 | + if ("function" !== typeof oldMethod) return; | |
| 82 | + self[methodName] = function() { | |
| 83 | + return oldMethod.apply(self, arguments); | |
| 84 | + }; | |
| 85 | + }); | |
| 86 | + }; | |
| 87 | + var initSettings = function initSettings() { | |
| 88 | + settings = self.getDefaultSettings(); | |
| 89 | + var instanceSettings = instanceParams[0]; | |
| 90 | + if (instanceSettings) $.extend(true, settings, instanceSettings); | |
| 91 | + }; | |
| 92 | + var init = function init() { | |
| 93 | + self.__construct.apply(self, instanceParams); | |
| 94 | + ensureClosureMethods(); | |
| 95 | + initSettings(); | |
| 96 | + self.trigger("init"); | |
| 97 | + }; | |
| 98 | + this.getItems = function(items, itemKey) { | |
| 99 | + if (itemKey) { | |
| 100 | + var keyStack = itemKey.split("."); | |
| 101 | + var currentKey = keyStack.splice(0, 1); | |
| 102 | + if (!keyStack.length) return items[currentKey]; | |
| 103 | + if (!items[currentKey]) return; | |
| 104 | + return this.getItems(items[currentKey], keyStack.join(".")); | |
| 105 | + } | |
| 106 | + return items; | |
| 107 | + }; | |
| 108 | + this.getSettings = function(setting) { | |
| 109 | + return this.getItems(settings, setting); | |
| 110 | + }; | |
| 111 | + this.setSettings = function(settingKey, value, settingsContainer) { | |
| 112 | + if (!settingsContainer) settingsContainer = settings; | |
| 113 | + if ("object" === _typeof(settingKey)) { | |
| 114 | + $.extend(settingsContainer, settingKey); | |
| 115 | + return self; | |
| 116 | + } | |
| 117 | + var keyStack = settingKey.split("."); | |
| 118 | + var currentKey = keyStack.splice(0, 1); | |
| 119 | + if (!keyStack.length) { | |
| 120 | + settingsContainer[currentKey] = value; | |
| 121 | + return self; | |
| 122 | + } | |
| 123 | + if (!settingsContainer[currentKey]) settingsContainer[currentKey] = {}; | |
| 124 | + return self.setSettings(keyStack.join("."), value, settingsContainer[currentKey]); | |
| 125 | + }; | |
| 126 | + this.getErrorMessage = function(type, functionName) { | |
| 127 | + var message; | |
| 128 | + switch (type) { | |
| 129 | + case "forceMethodImplementation": | |
| 130 | + message = "The method '".concat(functionName, "' must to be implemented in the inheritor child."); | |
| 131 | + break; | |
| 132 | + default: message = "An error occurs"; | |
| 133 | + } | |
| 134 | + return message; | |
| 135 | + }; | |
| 136 | + this.forceMethodImplementation = function(functionName) { | |
| 137 | + throw new Error(this.getErrorMessage("forceMethodImplementation", functionName)); | |
| 138 | + }; | |
| 139 | + this.on = function(eventName, callback) { | |
| 140 | + if ("object" === _typeof(eventName)) { | |
| 141 | + $.each(eventName, function(singleEventName) { | |
| 142 | + self.on(singleEventName, this); | |
| 143 | + }); | |
| 144 | + return self; | |
| 145 | + } | |
| 146 | + eventName.split(" ").forEach(function(singleEventName) { | |
| 147 | + if (!events[singleEventName]) events[singleEventName] = []; | |
| 148 | + events[singleEventName].push(callback); | |
| 149 | + }); | |
| 150 | + return self; | |
| 151 | + }; | |
| 152 | + this.off = function(eventName, callback) { | |
| 153 | + if (!events[eventName]) return self; | |
| 154 | + if (!callback) { | |
| 155 | + delete events[eventName]; | |
| 156 | + return self; | |
| 157 | + } | |
| 158 | + var callbackIndex = events[eventName].indexOf(callback); | |
| 159 | + if (-1 !== callbackIndex) { | |
| 160 | + delete events[eventName][callbackIndex]; | |
| 161 | + events[eventName] = events[eventName].filter(function(val) { | |
| 162 | + return val; | |
| 163 | + }); | |
| 164 | + } | |
| 165 | + return self; | |
| 166 | + }; | |
| 167 | + this.trigger = function(eventName) { | |
| 168 | + var methodName = "on" + eventName[0].toUpperCase() + eventName.slice(1); | |
| 169 | + var params = Array.prototype.slice.call(arguments, 1); | |
| 170 | + if (self[methodName]) self[methodName].apply(self, params); | |
| 171 | + var callbacks = events[eventName]; | |
| 172 | + if (!callbacks) return self; | |
| 173 | + $.each(callbacks, function(index, callback) { | |
| 174 | + callback.apply(self, params); | |
| 175 | + }); | |
| 176 | + return self; | |
| 177 | + }; | |
| 178 | + init(); | |
| 179 | + }; | |
| 180 | + Module.prototype.__construct = function() {}; | |
| 181 | + Module.prototype.getDefaultSettings = function() { | |
| 182 | + return {}; | |
| 183 | + }; | |
| 184 | + Module.prototype.getConstructorID = function() { | |
| 185 | + return this.constructor.name; | |
| 186 | + }; | |
| 187 | + Module.extend = function(properties) { | |
| 188 | + var $ = jQuery; | |
| 189 | + var parent = this; | |
| 190 | + var child = function child() { | |
| 191 | + return parent.apply(this, arguments); | |
| 192 | + }; | |
| 193 | + $.extend(child, parent); | |
| 194 | + child.prototype = Object.create($.extend({}, parent.prototype, properties)); | |
| 195 | + child.prototype.constructor = child; | |
| 196 | + child.__super__ = parent.prototype; | |
| 197 | + return child; | |
| 198 | + }; | |
| 199 | + module.exports = Module; | |
| 200 | + })); | |
| 46 | 201 | |
| 47 | - // Override existing children with new ones and add new children | |
| 48 | - section.children.forEach(function (childSection) { | |
| 49 | - var formattedChild = _this.formatSection(childSection); | |
| 50 | - existingChildrenMap.set(childSection.key, formattedChild); | |
| 51 | - }); | |
| 52 | - formattedSection.children = Array.from(existingChildrenMap.values()); | |
| 53 | - } else { | |
| 54 | - formattedSection.children = section.children.map(function (childSection) { | |
| 55 | - return _this.formatSection(childSection); | |
| 56 | - }); | |
| 57 | - } | |
| 58 | - } | |
| 59 | - this.sections.set(section.key, formattedSection); | |
| 60 | - } | |
| 61 | - }, { | |
| 62 | - key: "formatSection", | |
| 63 | - value: function formatSection(_ref) { | |
| 64 | - var children = _ref.children, | |
| 65 | - section = (0, _objectWithoutProperties2.default)(_ref, _excluded); | |
| 66 | - return _objectSpread({ | |
| 67 | - key: section.key, | |
| 68 | - title: section.title, | |
| 69 | - description: section.description || '', | |
| 70 | - useParentDefault: section.useParentDefault !== false, | |
| 71 | - getInitialState: section.getInitialState || null, | |
| 72 | - component: section.component || null, | |
| 73 | - order: section.order || 10, | |
| 74 | - isAvailable: section.isAvailable || function () { | |
| 75 | - return true; | |
| 76 | - } | |
| 77 | - }, section); | |
| 78 | - } | |
| 79 | - }, { | |
| 80 | - key: "getAll", | |
| 81 | - value: function getAll() { | |
| 82 | - return Array.from(this.sections.values()).filter(function (type) { | |
| 83 | - return type.isAvailable(); | |
| 84 | - }).map(function (type) { | |
| 85 | - if (type.children) { | |
| 86 | - return _objectSpread(_objectSpread({}, type), {}, { | |
| 87 | - children: (0, _toConsumableArray2.default)(type.children).sort(function (a, b) { | |
| 88 | - return a.order - b.order; | |
| 89 | - }) | |
| 90 | - }); | |
| 91 | - } | |
| 92 | - return type; | |
| 93 | - }).sort(function (a, b) { | |
| 94 | - return a.order - b.order; | |
| 95 | - }); | |
| 96 | - } | |
| 97 | - }, { | |
| 98 | - key: "get", | |
| 99 | - value: function get(key) { | |
| 100 | - return this.sections.get(key); | |
| 101 | - } | |
| 102 | - }]); | |
| 103 | -}(); | |
| 202 | +//#endregion | |
| 203 | +//#region assets/dev/js/modules/imports/view-module.js | |
| 204 | + var import_module = /* @__PURE__ */ __toESM(require_module()); | |
| 205 | + var view_module_default = import_module.default.extend({ | |
| 206 | + elements: null, | |
| 207 | + getDefaultElements: function getDefaultElements() { | |
| 208 | + return {}; | |
| 209 | + }, | |
| 210 | + bindEvents: function bindEvents() {}, | |
| 211 | + onInit: function onInit() { | |
| 212 | + this.initElements(); | |
| 213 | + this.bindEvents(); | |
| 214 | + }, | |
| 215 | + initElements: function initElements() { | |
| 216 | + this.elements = this.getDefaultElements(); | |
| 217 | + } | |
| 218 | + }); | |
| 104 | 219 | |
| 105 | -/***/ }), | |
| 220 | +//#endregion | |
| 221 | +//#region node_modules/@babel/runtime/helpers/esm/classCallCheck.js | |
| 222 | + function _classCallCheck(a, n) { | |
| 223 | + if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); | |
| 224 | + } | |
| 106 | 225 | |
| 107 | -/***/ "../app/modules/import-export-customization/assets/js/shared/registry/customization-dialogs.js": | |
| 108 | -/*!*****************************************************************************************************!*\ | |
| 109 | - !*** ../app/modules/import-export-customization/assets/js/shared/registry/customization-dialogs.js ***! | |
| 110 | - \*****************************************************************************************************/ | |
| 111 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 226 | +//#endregion | |
| 227 | +//#region node_modules/@babel/runtime/helpers/esm/toPrimitive.js | |
| 228 | + init_typeof(); | |
| 229 | + function toPrimitive(t, r) { | |
| 230 | + if ("object" != _typeof(t) || !t) return t; | |
| 231 | + var e = t[Symbol.toPrimitive]; | |
| 232 | + if (void 0 !== e) { | |
| 233 | + var i = e.call(t, r || "default"); | |
| 234 | + if ("object" != _typeof(i)) return i; | |
| 235 | + throw new TypeError("@@toPrimitive must return a primitive value."); | |
| 236 | + } | |
| 237 | + return ("string" === r ? String : Number)(t); | |
| 238 | + } | |
| 112 | 239 | |
| 113 | -"use strict"; | |
| 240 | +//#endregion | |
| 241 | +//#region node_modules/@babel/runtime/helpers/esm/toPropertyKey.js | |
| 242 | + init_typeof(); | |
| 243 | + function toPropertyKey(t) { | |
| 244 | + var i = toPrimitive(t, "string"); | |
| 245 | + return "symbol" == _typeof(i) ? i : i + ""; | |
| 246 | + } | |
| 114 | 247 | |
| 248 | +//#endregion | |
| 249 | +//#region node_modules/@babel/runtime/helpers/esm/createClass.js | |
| 250 | + function _defineProperties(e, r) { | |
| 251 | + for (var t = 0; t < r.length; t++) { | |
| 252 | + var o = r[t]; | |
| 253 | + o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o); | |
| 254 | + } | |
| 255 | + } | |
| 256 | + function _createClass(e, r, t) { | |
| 257 | + return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; | |
| 258 | + } | |
| 115 | 259 | |
| 116 | -Object.defineProperty(exports, "__esModule", ({ | |
| 117 | - value: true | |
| 118 | -})); | |
| 119 | -exports.customizationDialogsRegistry = void 0; | |
| 120 | -var _base = __webpack_require__(/*! ./base */ "../app/modules/import-export-customization/assets/js/shared/registry/base.js"); | |
| 121 | -var customizationDialogsRegistry = exports.customizationDialogsRegistry = new _base.BaseRegistry(); | |
| 260 | +//#endregion | |
| 261 | +//#region node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js | |
| 262 | + function _assertThisInitialized(e) { | |
| 263 | + if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
| 264 | + return e; | |
| 265 | + } | |
| 122 | 266 | |
| 123 | -/***/ }), | |
| 267 | +//#endregion | |
| 268 | +//#region node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js | |
| 269 | + init_typeof(); | |
| 270 | + function _possibleConstructorReturn(t, e) { | |
| 271 | + if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; | |
| 272 | + if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); | |
| 273 | + return _assertThisInitialized(t); | |
| 274 | + } | |
| 124 | 275 | |
| 125 | -/***/ "../app/modules/import-export-customization/assets/js/shared/utils/template-registry-helpers.js": | |
| 126 | -/*!******************************************************************************************************!*\ | |
| 127 | - !*** ../app/modules/import-export-customization/assets/js/shared/utils/template-registry-helpers.js ***! | |
| 128 | - \******************************************************************************************************/ | |
| 129 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 276 | +//#endregion | |
| 277 | +//#region node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js | |
| 278 | + function _getPrototypeOf(t) { | |
| 279 | + return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) { | |
| 280 | + return t.__proto__ || Object.getPrototypeOf(t); | |
| 281 | + }, _getPrototypeOf(t); | |
| 282 | + } | |
| 130 | 283 | |
| 131 | -"use strict"; | |
| 284 | +//#endregion | |
| 285 | +//#region node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js | |
| 286 | + function _setPrototypeOf(t, e) { | |
| 287 | + return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, e) { | |
| 288 | + return t.__proto__ = e, t; | |
| 289 | + }, _setPrototypeOf(t, e); | |
| 290 | + } | |
| 132 | 291 | |
| 292 | +//#endregion | |
| 293 | +//#region node_modules/@babel/runtime/helpers/esm/inherits.js | |
| 294 | + function _inherits(t, e) { | |
| 295 | + if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); | |
| 296 | + t.prototype = Object.create(e && e.prototype, { constructor: { | |
| 297 | + value: t, | |
| 298 | + writable: !0, | |
| 299 | + configurable: !0 | |
| 300 | + } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); | |
| 301 | + } | |
| 133 | 302 | |
| 134 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 135 | -Object.defineProperty(exports, "__esModule", ({ | |
| 136 | - value: true | |
| 137 | -})); | |
| 138 | -exports.createGetInitialState = createGetInitialState; | |
| 139 | -var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); | |
| 140 | -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; } | |
| 141 | -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; } | |
| 142 | -function createGetInitialState(exportGroup) { | |
| 143 | - var additionalProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; | |
| 144 | - return function (data, parentInitialState) { | |
| 145 | - var isEnabled = parentInitialState; | |
| 146 | - var isImport = data.hasOwnProperty('uploadedData'); | |
| 147 | - if (isImport) { | |
| 148 | - var _elementorAppConfig; | |
| 149 | - isEnabled = false; | |
| 150 | - var templates = data.uploadedData.manifest.templates; | |
| 151 | - var exportGroups = ((_elementorAppConfig = elementorAppConfig) === null || _elementorAppConfig === void 0 || (_elementorAppConfig = _elementorAppConfig['import-export-customization']) === null || _elementorAppConfig === void 0 ? void 0 : _elementorAppConfig.exportGroups) || {}; | |
| 152 | - for (var templateId in templates) { | |
| 153 | - var template = templates[templateId]; | |
| 154 | - var templateExportGroup = exportGroups[template.doc_type]; | |
| 155 | - if (templateExportGroup === exportGroup) { | |
| 156 | - isEnabled = true; | |
| 157 | - break; | |
| 158 | - } | |
| 159 | - } | |
| 160 | - } | |
| 161 | - return _objectSpread({ | |
| 162 | - enabled: isEnabled | |
| 163 | - }, additionalProps); | |
| 164 | - }; | |
| 165 | -} | |
| 303 | +//#endregion | |
| 304 | +//#region node_modules/@babel/runtime/helpers/esm/superPropBase.js | |
| 305 | + function _superPropBase(t, o) { | |
| 306 | + for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t));); | |
| 307 | + return t; | |
| 308 | + } | |
| 166 | 309 | |
| 167 | -/***/ }), | |
| 310 | +//#endregion | |
| 311 | +//#region node_modules/@babel/runtime/helpers/esm/get.js | |
| 312 | + function _get() { | |
| 313 | + return _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function(e, t, r) { | |
| 314 | + var p = _superPropBase(e, t); | |
| 315 | + if (p) { | |
| 316 | + var n = Object.getOwnPropertyDescriptor(p, t); | |
| 317 | + return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; | |
| 318 | + } | |
| 319 | + }, _get.apply(null, arguments); | |
| 320 | + } | |
| 168 | 321 | |
| 169 | -/***/ "../assets/dev/js/editor/utils/is-instanceof.js": | |
| 170 | -/*!******************************************************!*\ | |
| 171 | - !*** ../assets/dev/js/editor/utils/is-instanceof.js ***! | |
| 172 | - \******************************************************/ | |
| 173 | -/***/ ((__unused_webpack_module, exports) => { | |
| 322 | +//#endregion | |
| 323 | +//#region assets/dev/js/modules/imports/instance-type.js | |
| 324 | + function _superPropGet$1(t, o, e, r) { | |
| 325 | + var p = _get(_getPrototypeOf(1 & r ? t.prototype : t), o, e); | |
| 326 | + return 2 & r && "function" == typeof p ? function(t) { | |
| 327 | + return p.apply(e, t); | |
| 328 | + } : p; | |
| 329 | + } | |
| 330 | + __name(_superPropGet$1, "_superPropGet"); | |
| 331 | + var InstanceType = /*#__PURE__*/ function() { | |
| 332 | + function InstanceType() { | |
| 333 | + var _this = this; | |
| 334 | + _classCallCheck(this, InstanceType); | |
| 335 | + var target = this instanceof InstanceType ? this.constructor : void 0; | |
| 336 | + var prototypes = []; | |
| 337 | + while (target.__proto__ && target.__proto__.name) { | |
| 338 | + prototypes.push(target.__proto__); | |
| 339 | + target = target.__proto__; | |
| 340 | + } | |
| 341 | + prototypes.reverse().forEach(function(proto) { | |
| 342 | + return _this instanceof proto; | |
| 343 | + }); | |
| 344 | + } | |
| 345 | + return _createClass(InstanceType, null, [{ | |
| 346 | + key: Symbol.hasInstance, | |
| 347 | + value: function value(target) { | |
| 348 | + /** | |
| 349 | + * This is function extending being called each time JS uses instanceOf, since babel use it each time it create new class | |
| 350 | + * its give's opportunity to mange capabilities of instanceOf operator. | |
| 351 | + * saving current class each time will give option later to handle instanceOf manually. | |
| 352 | + */ | |
| 353 | + var result = _superPropGet$1(InstanceType, Symbol.hasInstance, this, 2)([target]); | |
| 354 | + if (target && !target.constructor.getInstanceType) return result; | |
| 355 | + if (target) { | |
| 356 | + if (!target.instanceTypes) target.instanceTypes = []; | |
| 357 | + if (!result) { | |
| 358 | + if (this.getInstanceType() === target.constructor.getInstanceType()) result = true; | |
| 359 | + } | |
| 360 | + if (result) { | |
| 361 | + var name = this.getInstanceType === InstanceType.getInstanceType ? "BaseInstanceType" : this.getInstanceType(); | |
| 362 | + if (-1 === target.instanceTypes.indexOf(name)) target.instanceTypes.push(name); | |
| 363 | + } | |
| 364 | + } | |
| 365 | + if (!result && target) result = target.instanceTypes && Array.isArray(target.instanceTypes) && -1 !== target.instanceTypes.indexOf(this.getInstanceType()); | |
| 366 | + return result; | |
| 367 | + } | |
| 368 | + }, { | |
| 369 | + key: "getInstanceType", | |
| 370 | + value: function getInstanceType() { | |
| 371 | + elementorModules.ForceMethodImplementation(); | |
| 372 | + } | |
| 373 | + }]); | |
| 374 | + }(); | |
| 174 | 375 | |
| 175 | -"use strict"; | |
| 376 | +//#endregion | |
| 377 | +//#region assets/dev/js/editor/utils/is-instanceof.js | |
| 378 | + function _createForOfIteratorHelper(r, e) { | |
| 379 | + var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; | |
| 380 | + if (!t) { | |
| 381 | + if (Array.isArray(r) || (t = _unsupportedIterableToArray$1(r)) || e && r && "number" == typeof r.length) { | |
| 382 | + t && (r = t); | |
| 383 | + var _n = 0; | |
| 384 | + var F = function F() {}; | |
| 385 | + return { | |
| 386 | + s: F, | |
| 387 | + n: function n() { | |
| 388 | + return _n >= r.length ? { done: !0 } : { | |
| 389 | + done: !1, | |
| 390 | + value: r[_n++] | |
| 391 | + }; | |
| 392 | + }, | |
| 393 | + e: function e(r) { | |
| 394 | + throw r; | |
| 395 | + }, | |
| 396 | + f: F | |
| 397 | + }; | |
| 398 | + } | |
| 399 | + throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | |
| 400 | + } | |
| 401 | + var o; | |
| 402 | + var a = !0; | |
| 403 | + var u = !1; | |
| 404 | + return { | |
| 405 | + s: function s() { | |
| 406 | + t = t.call(r); | |
| 407 | + }, | |
| 408 | + n: function n() { | |
| 409 | + var r = t.next(); | |
| 410 | + return a = r.done, r; | |
| 411 | + }, | |
| 412 | + e: function e(r) { | |
| 413 | + u = !0, o = r; | |
| 414 | + }, | |
| 415 | + f: function f() { | |
| 416 | + try { | |
| 417 | + a || null == t.return || t.return(); | |
| 418 | + } finally { | |
| 419 | + if (u) throw o; | |
| 420 | + } | |
| 421 | + } | |
| 422 | + }; | |
| 423 | + } | |
| 424 | + function _unsupportedIterableToArray$1(r, a) { | |
| 425 | + if (r) { | |
| 426 | + if ("string" == typeof r) return _arrayLikeToArray$1(r, a); | |
| 427 | + var t = {}.toString.call(r).slice(8, -1); | |
| 428 | + return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$1(r, a) : void 0; | |
| 429 | + } | |
| 430 | + } | |
| 431 | + __name(_unsupportedIterableToArray$1, "_unsupportedIterableToArray"); | |
| 432 | + function _arrayLikeToArray$1(r, a) { | |
| 433 | + (null == a || a > r.length) && (a = r.length); | |
| 434 | + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; | |
| 435 | + return n; | |
| 436 | + } | |
| 437 | + __name(_arrayLikeToArray$1, "_arrayLikeToArray"); | |
| 438 | + /** | |
| 439 | + * Some FileAPI objects such as FileList, DataTransferItem and DataTransferItemList has inconsistency with the retrieved | |
| 440 | + * object (from events, etc.) and the actual JavaScript object so a regular instanceof doesn't work. This function can | |
| 441 | + * check whether it's instanceof by using the objects constructor and prototype names. | |
| 442 | + * | |
| 443 | + * @param object | |
| 444 | + * @param constructors | |
| 445 | + * @return {boolean} | |
| 446 | + */ | |
| 447 | + var is_instanceof_default = /* @__PURE__ */ __name((function(object, constructors) { | |
| 448 | + constructors = Array.isArray(constructors) ? constructors : [constructors]; | |
| 449 | + var _iterator = _createForOfIteratorHelper(constructors); | |
| 450 | + var _step; | |
| 451 | + try { | |
| 452 | + for (_iterator.s(); !(_step = _iterator.n()).done;) { | |
| 453 | + var constructor = _step.value; | |
| 454 | + if (object.constructor.name === constructor.prototype[Symbol.toStringTag]) return true; | |
| 455 | + } | |
| 456 | + } catch (err) { | |
| 457 | + _iterator.e(err); | |
| 458 | + } finally { | |
| 459 | + _iterator.f(); | |
| 460 | + } | |
| 461 | + return false; | |
| 462 | + }), "default"); | |
| 176 | 463 | |
| 464 | +//#endregion | |
| 465 | +//#region assets/dev/js/modules/imports/args-object.js | |
| 466 | + init_typeof(); | |
| 467 | + function _callSuper$15(t, o, e) { | |
| 468 | + return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$16() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 469 | + } | |
| 470 | + __name(_callSuper$15, "_callSuper"); | |
| 471 | + function _isNativeReflectConstruct$16() { | |
| 472 | + try { | |
| 473 | + var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 474 | + } catch (t) {} | |
| 475 | + return (_isNativeReflectConstruct$16 = function _isNativeReflectConstruct() { | |
| 476 | + return !!t; | |
| 477 | + })(); | |
| 478 | + } | |
| 479 | + __name(_isNativeReflectConstruct$16, "_isNativeReflectConstruct"); | |
| 480 | + var ArgsObject = /*#__PURE__*/ function(_InstanceType) { | |
| 481 | + /** | |
| 482 | + * Function constructor(). | |
| 483 | + * | |
| 484 | + * Create ArgsObject. | |
| 485 | + * | |
| 486 | + * @param {{}} args | |
| 487 | + */ | |
| 488 | + function ArgsObject(args) { | |
| 489 | + var _this; | |
| 490 | + _classCallCheck(this, ArgsObject); | |
| 491 | + _this = _callSuper$15(this, ArgsObject); | |
| 492 | + _this.args = args; | |
| 493 | + return _this; | |
| 494 | + } | |
| 495 | + /** | |
| 496 | + * Function requireArgument(). | |
| 497 | + * | |
| 498 | + * Validate property in args. | |
| 499 | + * | |
| 500 | + * @param {string} property | |
| 501 | + * @param {{}} args | |
| 502 | + * | |
| 503 | + * @throws {Error} | |
| 504 | + */ | |
| 505 | + _inherits(ArgsObject, _InstanceType); | |
| 506 | + return _createClass(ArgsObject, [ | |
| 507 | + { | |
| 508 | + key: "requireArgument", | |
| 509 | + value: function requireArgument(property) { | |
| 510 | + var args = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.args; | |
| 511 | + if (!Object.prototype.hasOwnProperty.call(args, property)) throw Error("".concat(property, " is required.")); | |
| 512 | + } | |
| 513 | + }, | |
| 514 | + { | |
| 515 | + key: "requireArgumentType", | |
| 516 | + value: function requireArgumentType(property, type) { | |
| 517 | + var args = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : this.args; | |
| 518 | + this.requireArgument(property, args); | |
| 519 | + if (_typeof(args[property]) !== type) throw Error("".concat(property, " invalid type: ").concat(type, ".")); | |
| 520 | + } | |
| 521 | + }, | |
| 522 | + { | |
| 523 | + key: "requireArgumentInstance", | |
| 524 | + value: function requireArgumentInstance(property, instance) { | |
| 525 | + var args = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : this.args; | |
| 526 | + this.requireArgument(property, args); | |
| 527 | + if (!(args[property] instanceof instance) && !is_instanceof_default(args[property], instance)) throw Error("".concat(property, " invalid instance.")); | |
| 528 | + } | |
| 529 | + }, | |
| 530 | + { | |
| 531 | + key: "requireArgumentConstructor", | |
| 532 | + value: function requireArgumentConstructor(property, type) { | |
| 533 | + var args = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : this.args; | |
| 534 | + this.requireArgument(property, args); | |
| 535 | + if (args[property].constructor.toString() !== type.prototype.constructor.toString()) throw Error("".concat(property, " invalid constructor type.")); | |
| 536 | + } | |
| 537 | + } | |
| 538 | + ], [{ | |
| 539 | + key: "getInstanceType", | |
| 540 | + value: function getInstanceType() { | |
| 541 | + return "ArgsObject"; | |
| 542 | + } | |
| 543 | + }]); | |
| 544 | + }(InstanceType); | |
| 177 | 545 | |
| 178 | -Object.defineProperty(exports, "__esModule", ({ | |
| 179 | - value: true | |
| 180 | -})); | |
| 181 | -exports["default"] = void 0; | |
| 182 | -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; } | |
| 183 | -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } | |
| 184 | -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } | |
| 185 | -/** | |
| 186 | - * Some FileAPI objects such as FileList, DataTransferItem and DataTransferItemList has inconsistency with the retrieved | |
| 187 | - * object (from events, etc.) and the actual JavaScript object so a regular instanceof doesn't work. This function can | |
| 188 | - * check whether it's instanceof by using the objects constructor and prototype names. | |
| 189 | - * | |
| 190 | - * @param object | |
| 191 | - * @param constructors | |
| 192 | - * @return {boolean} | |
| 193 | - */ | |
| 194 | -var _default = exports["default"] = function _default(object, constructors) { | |
| 195 | - constructors = Array.isArray(constructors) ? constructors : [constructors]; | |
| 196 | - var _iterator = _createForOfIteratorHelper(constructors), | |
| 197 | - _step; | |
| 198 | - try { | |
| 199 | - for (_iterator.s(); !(_step = _iterator.n()).done;) { | |
| 200 | - var constructor = _step.value; | |
| 201 | - if (object.constructor.name === constructor.prototype[Symbol.toStringTag]) { | |
| 202 | - return true; | |
| 203 | - } | |
| 204 | - } | |
| 205 | - } catch (err) { | |
| 206 | - _iterator.e(err); | |
| 207 | - } finally { | |
| 208 | - _iterator.f(); | |
| 209 | - } | |
| 210 | - return false; | |
| 211 | -}; | |
| 546 | +//#endregion | |
| 547 | +//#region assets/dev/js/modules/imports/utils/masonry.js | |
| 548 | + var masonry_default = view_module_default.extend({ | |
| 549 | + getDefaultSettings: function getDefaultSettings() { | |
| 550 | + return { | |
| 551 | + container: null, | |
| 552 | + items: null, | |
| 553 | + columnsCount: 3, | |
| 554 | + verticalSpaceBetween: 30 | |
| 555 | + }; | |
| 556 | + }, | |
| 557 | + getDefaultElements: function getDefaultElements() { | |
| 558 | + return { | |
| 559 | + $container: jQuery(this.getSettings("container")), | |
| 560 | + $items: jQuery(this.getSettings("items")) | |
| 561 | + }; | |
| 562 | + }, | |
| 563 | + run: function run() { | |
| 564 | + var heights = []; | |
| 565 | + var distanceFromTop = this.elements.$container.position().top; | |
| 566 | + var settings = this.getSettings(); | |
| 567 | + var columnsCount = settings.columnsCount; | |
| 568 | + distanceFromTop += parseInt(this.elements.$container.css("margin-top"), 10); | |
| 569 | + this.elements.$items.each(function(index) { | |
| 570 | + var row = Math.floor(index / columnsCount); | |
| 571 | + var $item = jQuery(this); | |
| 572 | + var itemHeight = $item[0].getBoundingClientRect().height + settings.verticalSpaceBetween; | |
| 573 | + if (row) { | |
| 574 | + var itemPosition = $item.position(); | |
| 575 | + var indexAtRow = index % columnsCount; | |
| 576 | + var pullHeight = itemPosition.top - distanceFromTop - heights[indexAtRow]; | |
| 577 | + pullHeight -= parseInt($item.css("margin-top"), 10); | |
| 578 | + pullHeight *= -1; | |
| 579 | + $item.css("margin-top", pullHeight + "px"); | |
| 580 | + heights[indexAtRow] += itemHeight; | |
| 581 | + } else heights.push(itemHeight); | |
| 582 | + }); | |
| 583 | + } | |
| 584 | + }); | |
| 212 | 585 | |
| 213 | -/***/ }), | |
| 586 | +//#endregion | |
| 587 | +//#region assets/dev/js/modules/imports/utils/scroll.js | |
| 588 | + var Scroll = /*#__PURE__*/ function() { | |
| 589 | + function Scroll() { | |
| 590 | + _classCallCheck(this, Scroll); | |
| 591 | + } | |
| 592 | + return _createClass(Scroll, null, [ | |
| 593 | + { | |
| 594 | + key: "scrollObserver", | |
| 595 | + value: function scrollObserver(obj) { | |
| 596 | + var lastScrollY = 0; | |
| 597 | + var options = { | |
| 598 | + root: obj.root || null, | |
| 599 | + rootMargin: obj.offset || "0px", | |
| 600 | + threshold: function buildThresholds() { | |
| 601 | + var sensitivityPercentage = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0; | |
| 602 | + var thresholds = []; | |
| 603 | + if (sensitivityPercentage > 0 && sensitivityPercentage <= 100) { | |
| 604 | + var increment = 100 / sensitivityPercentage; | |
| 605 | + for (var i = 0; i <= 100; i += increment) thresholds.push(i / 100); | |
| 606 | + } else thresholds.push(0); | |
| 607 | + return thresholds; | |
| 608 | + }(obj.sensitivity) | |
| 609 | + }; | |
| 610 | + function handleIntersect(entries) { | |
| 611 | + var currentScrollY = entries[0].boundingClientRect.y; | |
| 612 | + var isInViewport = entries[0].isIntersecting; | |
| 613 | + var intersectionScrollDirection = currentScrollY < lastScrollY ? "down" : "up"; | |
| 614 | + var scrollPercentage = Math.abs(parseFloat((entries[0].intersectionRatio * 100).toFixed(2))); | |
| 615 | + obj.callback({ | |
| 616 | + sensitivity: obj.sensitivity, | |
| 617 | + isInViewport, | |
| 618 | + scrollPercentage, | |
| 619 | + intersectionScrollDirection | |
| 620 | + }); | |
| 621 | + lastScrollY = currentScrollY; | |
| 622 | + } | |
| 623 | + return new IntersectionObserver(handleIntersect, options); | |
| 624 | + } | |
| 625 | + }, | |
| 626 | + { | |
| 627 | + key: "getElementViewportPercentage", | |
| 628 | + value: function getElementViewportPercentage($element) { | |
| 629 | + var offsetObj = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; | |
| 630 | + var elementOffset = $element[0].getBoundingClientRect(); | |
| 631 | + var offsetStart = offsetObj.start || 0; | |
| 632 | + var offsetEnd = offsetObj.end || 0; | |
| 633 | + var windowStartOffset = window.innerHeight * offsetStart / 100; | |
| 634 | + var windowEndOffset = window.innerHeight * offsetEnd / 100; | |
| 635 | + var y1 = elementOffset.top - window.innerHeight; | |
| 636 | + var y2 = elementOffset.top + windowStartOffset + $element.height(); | |
| 637 | + var startPosition = 0 - y1 + windowStartOffset; | |
| 638 | + var endPosition = y2 - y1 + windowEndOffset; | |
| 639 | + var percent = Math.max(0, Math.min(startPosition / endPosition, 1)); | |
| 640 | + return parseFloat((percent * 100).toFixed(2)); | |
| 641 | + } | |
| 642 | + }, | |
| 643 | + { | |
| 644 | + key: "getPageScrollPercentage", | |
| 645 | + value: function getPageScrollPercentage() { | |
| 646 | + var offsetObj = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; | |
| 647 | + var limitPageHeight = arguments.length > 1 ? arguments[1] : void 0; | |
| 648 | + var offsetStart = offsetObj.start || 0; | |
| 649 | + var offsetEnd = offsetObj.end || 0; | |
| 650 | + var initialPageHeight = limitPageHeight || document.documentElement.scrollHeight - document.documentElement.clientHeight; | |
| 651 | + var heightOffset = initialPageHeight * offsetStart / 100; | |
| 652 | + var pageRange = initialPageHeight + heightOffset + initialPageHeight * offsetEnd / 100; | |
| 653 | + return (document.documentElement.scrollTop + document.body.scrollTop + heightOffset) / pageRange * 100; | |
| 654 | + } | |
| 655 | + } | |
| 656 | + ]); | |
| 657 | + }(); | |
| 214 | 658 | |
| 215 | -/***/ "../assets/dev/js/modules/imports/args-object.js": | |
| 216 | -/*!*******************************************************!*\ | |
| 217 | - !*** ../assets/dev/js/modules/imports/args-object.js ***! | |
| 218 | - \*******************************************************/ | |
| 219 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 659 | +//#endregion | |
| 660 | +//#region node_modules/@babel/runtime/helpers/esm/isNativeFunction.js | |
| 661 | + function _isNativeFunction(t) { | |
| 662 | + try { | |
| 663 | + return -1 !== Function.toString.call(t).indexOf("[native code]"); | |
| 664 | + } catch (n) { | |
| 665 | + return "function" == typeof t; | |
| 666 | + } | |
| 667 | + } | |
| 220 | 668 | |
| 221 | -"use strict"; | |
| 669 | +//#endregion | |
| 670 | +//#region node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js | |
| 671 | + function _isNativeReflectConstruct$15() { | |
| 672 | + try { | |
| 673 | + var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 674 | + } catch (t) {} | |
| 675 | + return (_isNativeReflectConstruct$15 = function _isNativeReflectConstruct() { | |
| 676 | + return !!t; | |
| 677 | + })(); | |
| 678 | + } | |
| 679 | + __name(_isNativeReflectConstruct$15, "_isNativeReflectConstruct"); | |
| 222 | 680 | |
| 681 | +//#endregion | |
| 682 | +//#region node_modules/@babel/runtime/helpers/esm/construct.js | |
| 683 | + function _construct(t, e, r) { | |
| 684 | + if (_isNativeReflectConstruct$15()) return Reflect.construct.apply(null, arguments); | |
| 685 | + var o = [null]; | |
| 686 | + o.push.apply(o, e); | |
| 687 | + var p = new (t.bind.apply(t, o))(); | |
| 688 | + return r && _setPrototypeOf(p, r.prototype), p; | |
| 689 | + } | |
| 223 | 690 | |
| 224 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 225 | -Object.defineProperty(exports, "__esModule", ({ | |
| 226 | - value: true | |
| 227 | -})); | |
| 228 | -exports["default"] = void 0; | |
| 229 | -var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js")); | |
| 230 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 231 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 232 | -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 233 | -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 234 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 235 | -var _instanceType = _interopRequireDefault(__webpack_require__(/*! ./instance-type */ "../assets/dev/js/modules/imports/instance-type.js")); | |
| 236 | -var _isInstanceof = _interopRequireDefault(__webpack_require__(/*! ../../editor/utils/is-instanceof */ "../assets/dev/js/editor/utils/is-instanceof.js")); | |
| 237 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 238 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 239 | -var ArgsObject = exports["default"] = /*#__PURE__*/function (_InstanceType) { | |
| 240 | - /** | |
| 241 | - * Function constructor(). | |
| 242 | - * | |
| 243 | - * Create ArgsObject. | |
| 244 | - * | |
| 245 | - * @param {{}} args | |
| 246 | - */ | |
| 247 | - function ArgsObject(args) { | |
| 248 | - var _this; | |
| 249 | - (0, _classCallCheck2.default)(this, ArgsObject); | |
| 250 | - _this = _callSuper(this, ArgsObject); | |
| 251 | - _this.args = args; | |
| 252 | - return _this; | |
| 253 | - } | |
| 691 | +//#endregion | |
| 692 | +//#region node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js | |
| 693 | + function _wrapNativeSuper(t) { | |
| 694 | + var r = "function" == typeof Map ? /* @__PURE__ */ new Map() : void 0; | |
| 695 | + return _wrapNativeSuper = function _wrapNativeSuper(t) { | |
| 696 | + if (null === t || !_isNativeFunction(t)) return t; | |
| 697 | + if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function"); | |
| 698 | + if (void 0 !== r) { | |
| 699 | + if (r.has(t)) return r.get(t); | |
| 700 | + r.set(t, Wrapper); | |
| 701 | + } | |
| 702 | + function Wrapper() { | |
| 703 | + return _construct(t, arguments, _getPrototypeOf(this).constructor); | |
| 704 | + } | |
| 705 | + return Wrapper.prototype = Object.create(t.prototype, { constructor: { | |
| 706 | + value: Wrapper, | |
| 707 | + enumerable: !1, | |
| 708 | + writable: !0, | |
| 709 | + configurable: !0 | |
| 710 | + } }), _setPrototypeOf(Wrapper, t); | |
| 711 | + }, _wrapNativeSuper(t); | |
| 712 | + } | |
| 254 | 713 | |
| 255 | - /** | |
| 256 | - * Function requireArgument(). | |
| 257 | - * | |
| 258 | - * Validate property in args. | |
| 259 | - * | |
| 260 | - * @param {string} property | |
| 261 | - * @param {{}} args | |
| 262 | - * | |
| 263 | - * @throws {Error} | |
| 264 | - */ | |
| 265 | - (0, _inherits2.default)(ArgsObject, _InstanceType); | |
| 266 | - return (0, _createClass2.default)(ArgsObject, [{ | |
| 267 | - key: "requireArgument", | |
| 268 | - value: function requireArgument(property) { | |
| 269 | - var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.args; | |
| 270 | - if (!Object.prototype.hasOwnProperty.call(args, property)) { | |
| 271 | - throw Error("".concat(property, " is required.")); | |
| 272 | - } | |
| 273 | - } | |
| 714 | +//#endregion | |
| 715 | +//#region assets/dev/js/modules/imports/force-method-implementation.js | |
| 716 | + function _callSuper$14(t, o, e) { | |
| 717 | + return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$14() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 718 | + } | |
| 719 | + __name(_callSuper$14, "_callSuper"); | |
| 720 | + function _isNativeReflectConstruct$14() { | |
| 721 | + try { | |
| 722 | + var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 723 | + } catch (t) {} | |
| 724 | + return (_isNativeReflectConstruct$14 = function _isNativeReflectConstruct() { | |
| 725 | + return !!t; | |
| 726 | + })(); | |
| 727 | + } | |
| 728 | + __name(_isNativeReflectConstruct$14, "_isNativeReflectConstruct"); | |
| 729 | + var ForceMethodImplementation$1 = /*#__PURE__*/ function(_Error) { | |
| 730 | + function ForceMethodImplementation() { | |
| 731 | + var _this; | |
| 732 | + var info = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; | |
| 733 | + var args = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; | |
| 734 | + _classCallCheck(this, ForceMethodImplementation); | |
| 735 | + _this = _callSuper$14(this, ForceMethodImplementation, ["".concat(info.isStatic ? "static " : "").concat(info.fullName, "() should be implemented, please provide '").concat(info.functionName || info.fullName, "' functionality."), args]); | |
| 736 | + if (Object.keys(args).length) console.error(args); | |
| 737 | + Error.captureStackTrace(_this, ForceMethodImplementation); | |
| 738 | + return _this; | |
| 739 | + } | |
| 740 | + _inherits(ForceMethodImplementation, _Error); | |
| 741 | + return _createClass(ForceMethodImplementation); | |
| 742 | + }(/*#__PURE__*/ _wrapNativeSuper(Error)); | |
| 743 | + var force_method_implementation_default$1 = /* @__PURE__ */ __name((function(args) { | |
| 744 | + var caller = Error().stack.split("\n")[2].trim(); | |
| 745 | + var callerName = caller.startsWith("at new") ? "constructor" : caller.split(" ")[1]; | |
| 746 | + var info = {}; | |
| 747 | + info.functionName = callerName; | |
| 748 | + info.fullName = callerName; | |
| 749 | + if (info.functionName.includes(".")) { | |
| 750 | + var parts = info.functionName.split("."); | |
| 751 | + info.className = parts[0]; | |
| 752 | + info.functionName = parts[1]; | |
| 753 | + } else info.isStatic = true; | |
| 754 | + throw new ForceMethodImplementation$1(info, args); | |
| 755 | + }), "default"); | |
| 274 | 756 | |
| 275 | - /** | |
| 276 | - * Function requireArgumentType(). | |
| 277 | - * | |
| 278 | - * Validate property in args using `type === typeof(args.whatever)`. | |
| 279 | - * | |
| 280 | - * @param {string} property | |
| 281 | - * @param {string} type | |
| 282 | - * @param {{}} args | |
| 283 | - * | |
| 284 | - * @throws {Error} | |
| 285 | - */ | |
| 286 | - }, { | |
| 287 | - key: "requireArgumentType", | |
| 288 | - value: function requireArgumentType(property, type) { | |
| 289 | - var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.args; | |
| 290 | - this.requireArgument(property, args); | |
| 291 | - if ((0, _typeof2.default)(args[property]) !== type) { | |
| 292 | - throw Error("".concat(property, " invalid type: ").concat(type, ".")); | |
| 293 | - } | |
| 294 | - } | |
| 757 | +//#endregion | |
| 758 | +//#region node_modules/@babel/runtime/helpers/esm/defineProperty.js | |
| 759 | + function _defineProperty(e, r, t) { | |
| 760 | + return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, { | |
| 761 | + value: t, | |
| 762 | + enumerable: !0, | |
| 763 | + configurable: !0, | |
| 764 | + writable: !0 | |
| 765 | + }) : e[r] = t, e; | |
| 766 | + } | |
| 295 | 767 | |
| 296 | - /** | |
| 297 | - * Function requireArgumentInstance(). | |
| 298 | - * | |
| 299 | - * Validate property in args using `args.whatever instanceof instance`. | |
| 300 | - * | |
| 301 | - * @param {string} property | |
| 302 | - * @param {*} instance | |
| 303 | - * @param {{}} args | |
| 304 | - * | |
| 305 | - * @throws {Error} | |
| 306 | - */ | |
| 307 | - }, { | |
| 308 | - key: "requireArgumentInstance", | |
| 309 | - value: function requireArgumentInstance(property, instance) { | |
| 310 | - var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.args; | |
| 311 | - this.requireArgument(property, args); | |
| 312 | - if (!(args[property] instanceof instance) && !(0, _isInstanceof.default)(args[property], instance)) { | |
| 313 | - throw Error("".concat(property, " invalid instance.")); | |
| 314 | - } | |
| 315 | - } | |
| 768 | +//#endregion | |
| 769 | +//#region app/modules/import-export-customization/assets/js/shared/utils/template-registry-helpers.js | |
| 770 | + function ownKeys$2(e, r) { | |
| 771 | + var t = Object.keys(e); | |
| 772 | + if (Object.getOwnPropertySymbols) { | |
| 773 | + var o = Object.getOwnPropertySymbols(e); | |
| 774 | + r && (o = o.filter(function(r) { | |
| 775 | + return Object.getOwnPropertyDescriptor(e, r).enumerable; | |
| 776 | + })), t.push.apply(t, o); | |
| 777 | + } | |
| 778 | + return t; | |
| 779 | + } | |
| 780 | + __name(ownKeys$2, "ownKeys"); | |
| 781 | + function _objectSpread$2(e) { | |
| 782 | + for (var r = 1; r < arguments.length; r++) { | |
| 783 | + var t = null != arguments[r] ? arguments[r] : {}; | |
| 784 | + r % 2 ? ownKeys$2(Object(t), !0).forEach(function(r) { | |
| 785 | + _defineProperty(e, r, t[r]); | |
| 786 | + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function(r) { | |
| 787 | + Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); | |
| 788 | + }); | |
| 789 | + } | |
| 790 | + return e; | |
| 791 | + } | |
| 792 | + __name(_objectSpread$2, "_objectSpread"); | |
| 793 | + function createGetInitialState(exportGroup) { | |
| 794 | + var additionalProps = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; | |
| 795 | + return function(data, parentInitialState) { | |
| 796 | + var isEnabled = parentInitialState; | |
| 797 | + if (data.hasOwnProperty("uploadedData")) { | |
| 798 | + var _elementorAppConfig; | |
| 799 | + isEnabled = false; | |
| 800 | + var templates = data.uploadedData.manifest.templates; | |
| 801 | + var exportGroups = ((_elementorAppConfig = elementorAppConfig) === null || _elementorAppConfig === void 0 || (_elementorAppConfig = _elementorAppConfig["import-export-customization"]) === null || _elementorAppConfig === void 0 ? void 0 : _elementorAppConfig.exportGroups) || {}; | |
| 802 | + for (var templateId in templates) if (exportGroups[templates[templateId].doc_type] === exportGroup) { | |
| 803 | + isEnabled = true; | |
| 804 | + break; | |
| 805 | + } | |
| 806 | + } | |
| 807 | + return _objectSpread$2({ enabled: isEnabled }, additionalProps); | |
| 808 | + }; | |
| 809 | + } | |
| 316 | 810 | |
| 317 | - /** | |
| 318 | - * Function requireArgumentConstructor(). | |
| 319 | - * | |
| 320 | - * Validate property in args using `type === args.whatever.constructor`. | |
| 321 | - * | |
| 322 | - * @param {string} property | |
| 323 | - * @param {*} type | |
| 324 | - * @param {{}} args | |
| 325 | - * | |
| 326 | - * @throws {Error} | |
| 327 | - */ | |
| 328 | - }, { | |
| 329 | - key: "requireArgumentConstructor", | |
| 330 | - value: function requireArgumentConstructor(property, type) { | |
| 331 | - var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.args; | |
| 332 | - this.requireArgument(property, args); | |
| 811 | +//#endregion | |
| 812 | +//#region node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js | |
| 813 | + function _arrayLikeToArray(r, a) { | |
| 814 | + (null == a || a > r.length) && (a = r.length); | |
| 815 | + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; | |
| 816 | + return n; | |
| 817 | + } | |
| 333 | 818 | |
| 334 | - // Note: Converting the constructor to string in order to avoid equation issues | |
| 335 | - // due to different memory addresses between iframes (window.Object !== window.top.Object). | |
| 336 | - if (args[property].constructor.toString() !== type.prototype.constructor.toString()) { | |
| 337 | - throw Error("".concat(property, " invalid constructor type.")); | |
| 338 | - } | |
| 339 | - } | |
| 340 | - }], [{ | |
| 341 | - key: "getInstanceType", | |
| 342 | - value: function getInstanceType() { | |
| 343 | - return 'ArgsObject'; | |
| 344 | - } | |
| 345 | - }]); | |
| 346 | -}(_instanceType.default); | |
| 819 | +//#endregion | |
| 820 | +//#region node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js | |
| 821 | + function _arrayWithoutHoles(r) { | |
| 822 | + if (Array.isArray(r)) return _arrayLikeToArray(r); | |
| 823 | + } | |
| 347 | 824 | |
| 348 | -/***/ }), | |
| 825 | +//#endregion | |
| 826 | +//#region node_modules/@babel/runtime/helpers/esm/iterableToArray.js | |
| 827 | + function _iterableToArray(r) { | |
| 828 | + if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); | |
| 829 | + } | |
| 349 | 830 | |
| 350 | -/***/ "../assets/dev/js/modules/imports/force-method-implementation.js": | |
| 351 | -/*!***********************************************************************!*\ | |
| 352 | - !*** ../assets/dev/js/modules/imports/force-method-implementation.js ***! | |
| 353 | - \***********************************************************************/ | |
| 354 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 831 | +//#endregion | |
| 832 | +//#region node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js | |
| 833 | + function _unsupportedIterableToArray(r, a) { | |
| 834 | + if (r) { | |
| 835 | + if ("string" == typeof r) return _arrayLikeToArray(r, a); | |
| 836 | + var t = {}.toString.call(r).slice(8, -1); | |
| 837 | + return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; | |
| 838 | + } | |
| 839 | + } | |
| 355 | 840 | |
| 356 | -"use strict"; | |
| 841 | +//#endregion | |
| 842 | +//#region node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js | |
| 843 | + function _nonIterableSpread() { | |
| 844 | + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | |
| 845 | + } | |
| 357 | 846 | |
| 847 | +//#endregion | |
| 848 | +//#region node_modules/@babel/runtime/helpers/esm/toConsumableArray.js | |
| 849 | + function _toConsumableArray(r) { | |
| 850 | + return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); | |
| 851 | + } | |
| 358 | 852 | |
| 359 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 360 | -Object.defineProperty(exports, "__esModule", ({ | |
| 361 | - value: true | |
| 362 | -})); | |
| 363 | -exports["default"] = exports.ForceMethodImplementation = void 0; | |
| 364 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 365 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 366 | -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 367 | -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 368 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 369 | -var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/wrapNativeSuper */ "../node_modules/@babel/runtime/helpers/wrapNativeSuper.js")); | |
| 370 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 371 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 372 | -// TODO: Wrong location used as `elementorModules.ForceMethodImplementation(); should be` `elementorUtils.forceMethodImplementation()`; | |
| 373 | -var ForceMethodImplementation = exports.ForceMethodImplementation = /*#__PURE__*/function (_Error) { | |
| 374 | - function ForceMethodImplementation() { | |
| 375 | - var _this; | |
| 376 | - var info = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 377 | - var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; | |
| 378 | - (0, _classCallCheck2.default)(this, ForceMethodImplementation); | |
| 379 | - _this = _callSuper(this, ForceMethodImplementation, ["".concat(info.isStatic ? 'static ' : '').concat(info.fullName, "() should be implemented, please provide '").concat(info.functionName || info.fullName, "' functionality."), args]); | |
| 853 | +//#endregion | |
| 854 | +//#region node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js | |
| 855 | + function _objectWithoutPropertiesLoose(r, e) { | |
| 856 | + if (null == r) return {}; | |
| 857 | + var t = {}; | |
| 858 | + for (var n in r) if ({}.hasOwnProperty.call(r, n)) { | |
| 859 | + if (-1 !== e.indexOf(n)) continue; | |
| 860 | + t[n] = r[n]; | |
| 861 | + } | |
| 862 | + return t; | |
| 863 | + } | |
| 380 | 864 | |
| 381 | - // Allow to pass custom properties to the error. | |
| 382 | - if (Object.keys(args).length) { | |
| 383 | - // eslint-disable-next-line no-console | |
| 384 | - console.error(args); | |
| 385 | - } | |
| 386 | - Error.captureStackTrace(_this, ForceMethodImplementation); | |
| 387 | - return _this; | |
| 388 | - } | |
| 389 | - (0, _inherits2.default)(ForceMethodImplementation, _Error); | |
| 390 | - return (0, _createClass2.default)(ForceMethodImplementation); | |
| 391 | -}(/*#__PURE__*/(0, _wrapNativeSuper2.default)(Error)); | |
| 392 | -var _default = exports["default"] = function _default(args) { | |
| 393 | - var stack = Error().stack, | |
| 394 | - caller = stack.split('\n')[2].trim(), | |
| 395 | - callerName = caller.startsWith('at new') ? 'constructor' : caller.split(' ')[1], | |
| 396 | - info = {}; | |
| 397 | - info.functionName = callerName; | |
| 398 | - info.fullName = callerName; | |
| 399 | - if (info.functionName.includes('.')) { | |
| 400 | - var parts = info.functionName.split('.'); | |
| 401 | - info.className = parts[0]; | |
| 402 | - info.functionName = parts[1]; | |
| 403 | - } else { | |
| 404 | - info.isStatic = true; | |
| 405 | - } | |
| 406 | - throw new ForceMethodImplementation(info, args); | |
| 407 | -}; | |
| 865 | +//#endregion | |
| 866 | +//#region node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js | |
| 867 | + function _objectWithoutProperties(e, t) { | |
| 868 | + if (null == e) return {}; | |
| 869 | + var o; | |
| 870 | + var r; | |
| 871 | + var i = _objectWithoutPropertiesLoose(e, t); | |
| 872 | + if (Object.getOwnPropertySymbols) { | |
| 873 | + var n = Object.getOwnPropertySymbols(e); | |
| 874 | + for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); | |
| 875 | + } | |
| 876 | + return i; | |
| 877 | + } | |
| 408 | 878 | |
| 409 | -/***/ }), | |
| 879 | +//#endregion | |
| 880 | +//#region app/modules/import-export-customization/assets/js/shared/registry/base.js | |
| 881 | + var _excluded = ["children"]; | |
| 882 | + function ownKeys$1(e, r) { | |
| 883 | + var t = Object.keys(e); | |
| 884 | + if (Object.getOwnPropertySymbols) { | |
| 885 | + var o = Object.getOwnPropertySymbols(e); | |
| 886 | + r && (o = o.filter(function(r) { | |
| 887 | + return Object.getOwnPropertyDescriptor(e, r).enumerable; | |
| 888 | + })), t.push.apply(t, o); | |
| 889 | + } | |
| 890 | + return t; | |
| 891 | + } | |
| 892 | + __name(ownKeys$1, "ownKeys"); | |
| 893 | + function _objectSpread$1(e) { | |
| 894 | + for (var r = 1; r < arguments.length; r++) { | |
| 895 | + var t = null != arguments[r] ? arguments[r] : {}; | |
| 896 | + r % 2 ? ownKeys$1(Object(t), !0).forEach(function(r) { | |
| 897 | + _defineProperty(e, r, t[r]); | |
| 898 | + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function(r) { | |
| 899 | + Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); | |
| 900 | + }); | |
| 901 | + } | |
| 902 | + return e; | |
| 903 | + } | |
| 904 | + __name(_objectSpread$1, "_objectSpread"); | |
| 905 | + var BaseRegistry = /*#__PURE__*/ function() { | |
| 906 | + function BaseRegistry() { | |
| 907 | + _classCallCheck(this, BaseRegistry); | |
| 908 | + this.sections = /* @__PURE__ */ new Map(); | |
| 909 | + } | |
| 910 | + return _createClass(BaseRegistry, [ | |
| 911 | + { | |
| 912 | + key: "register", | |
| 913 | + value: function register(section) { | |
| 914 | + var _this = this; | |
| 915 | + if (!section.key || !section.title) throw new Error("Template type must have key and title"); | |
| 916 | + var formattedSection = this.get(section.key) || this.formatSection(section); | |
| 917 | + if (section.children) if (formattedSection.children) { | |
| 918 | + var existingChildrenMap = new Map(formattedSection.children.map(function(child) { | |
| 919 | + return [child.key, child]; | |
| 920 | + })); | |
| 921 | + section.children.forEach(function(childSection) { | |
| 922 | + var formattedChild = _this.formatSection(childSection); | |
| 923 | + existingChildrenMap.set(childSection.key, formattedChild); | |
| 924 | + }); | |
| 925 | + formattedSection.children = Array.from(existingChildrenMap.values()); | |
| 926 | + } else formattedSection.children = section.children.map(function(childSection) { | |
| 927 | + return _this.formatSection(childSection); | |
| 928 | + }); | |
| 929 | + this.sections.set(section.key, formattedSection); | |
| 930 | + } | |
| 931 | + }, | |
| 932 | + { | |
| 933 | + key: "formatSection", | |
| 934 | + value: function formatSection(_ref) { | |
| 935 | + _ref.children; | |
| 936 | + var section = _objectWithoutProperties(_ref, _excluded); | |
| 937 | + return _objectSpread$1({ | |
| 938 | + key: section.key, | |
| 939 | + title: section.title, | |
| 940 | + description: section.description || "", | |
| 941 | + useParentDefault: section.useParentDefault !== false, | |
| 942 | + getInitialState: section.getInitialState || null, | |
| 943 | + component: section.component || null, | |
| 944 | + order: section.order || 10, | |
| 945 | + isAvailable: section.isAvailable || function() { | |
| 946 | + return true; | |
| 947 | + } | |
| 948 | + }, section); | |
| 949 | + } | |
| 950 | + }, | |
| 951 | + { | |
| 952 | + key: "getAll", | |
| 953 | + value: function getAll() { | |
| 954 | + return Array.from(this.sections.values()).filter(function(type) { | |
| 955 | + return type.isAvailable(); | |
| 956 | + }).map(function(type) { | |
| 957 | + if (type.children) return _objectSpread$1(_objectSpread$1({}, type), {}, { children: _toConsumableArray(type.children).sort(function(a, b) { | |
| 958 | + return a.order - b.order; | |
| 959 | + }) }); | |
| 960 | + return type; | |
| 961 | + }).sort(function(a, b) { | |
| 962 | + return a.order - b.order; | |
| 963 | + }); | |
| 964 | + } | |
| 965 | + }, | |
| 966 | + { | |
| 967 | + key: "get", | |
| 968 | + value: function get(key) { | |
| 969 | + return this.sections.get(key); | |
| 970 | + } | |
| 971 | + } | |
| 972 | + ]); | |
| 973 | + }(); | |
| 410 | 974 | |
| 411 | -/***/ "../assets/dev/js/modules/imports/instance-type.js": | |
| 412 | -/*!*********************************************************!*\ | |
| 413 | - !*** ../assets/dev/js/modules/imports/instance-type.js ***! | |
| 414 | - \*********************************************************/ | |
| 415 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 975 | +//#endregion | |
| 976 | +//#region app/modules/import-export-customization/assets/js/shared/registry/customization-dialogs.js | |
| 977 | + var customizationDialogsRegistry = new BaseRegistry(); | |
| 416 | 978 | |
| 417 | -"use strict"; | |
| 979 | +//#endregion | |
| 980 | +//#region assets/dev/js/modules/modules.js | |
| 981 | + var baseModules = { | |
| 982 | + Module: import_module.default, | |
| 983 | + ViewModule: view_module_default, | |
| 984 | + ArgsObject, | |
| 985 | + ForceMethodImplementation: force_method_implementation_default$1, | |
| 986 | + utils: { | |
| 987 | + Masonry: masonry_default, | |
| 988 | + Scroll | |
| 989 | + }, | |
| 990 | + importExport: { | |
| 991 | + createGetInitialState, | |
| 992 | + customizationDialogsRegistry | |
| 993 | + } | |
| 994 | + }; | |
| 995 | + if (!window.elementorModules) window.elementorModules = baseModules; | |
| 996 | + else Object.assign(window.elementorModules, baseModules); | |
| 997 | + var modules_default = window.elementorModules; | |
| 418 | 998 | |
| 999 | +//#endregion | |
| 1000 | +//#region core/common/assets/js/views/modal/header.js | |
| 1001 | + function _callSuper$13(t, o, e) { | |
| 1002 | + return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$13() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 1003 | + } | |
| 1004 | + __name(_callSuper$13, "_callSuper"); | |
| 1005 | + function _isNativeReflectConstruct$13() { | |
| 1006 | + try { | |
| 1007 | + var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 1008 | + } catch (t) {} | |
| 1009 | + return (_isNativeReflectConstruct$13 = function _isNativeReflectConstruct() { | |
| 1010 | + return !!t; | |
| 1011 | + })(); | |
| 1012 | + } | |
| 1013 | + __name(_isNativeReflectConstruct$13, "_isNativeReflectConstruct"); | |
| 1014 | + var _default$3 = /*#__PURE__*/ function(_Marionette$LayoutVie) { | |
| 1015 | + function _default() { | |
| 1016 | + _classCallCheck(this, _default); | |
| 1017 | + return _callSuper$13(this, _default, arguments); | |
| 1018 | + } | |
| 1019 | + _inherits(_default, _Marionette$LayoutVie); | |
| 1020 | + return _createClass(_default, [ | |
| 1021 | + { | |
| 1022 | + key: "tagName", | |
| 1023 | + value: function tagName() { | |
| 1024 | + return "header"; | |
| 1025 | + } | |
| 1026 | + }, | |
| 1027 | + { | |
| 1028 | + key: "className", | |
| 1029 | + value: function className() { | |
| 1030 | + return "elementor-templates-modal__header"; | |
| 1031 | + } | |
| 1032 | + }, | |
| 1033 | + { | |
| 1034 | + key: "getTemplate", | |
| 1035 | + value: function getTemplate() { | |
| 1036 | + return "#tmpl-elementor-templates-modal__header"; | |
| 1037 | + } | |
| 1038 | + }, | |
| 1039 | + { | |
| 1040 | + key: "regions", | |
| 1041 | + value: function regions() { | |
| 1042 | + return { | |
| 1043 | + logoArea: ".elementor-templates-modal__header__logo-area", | |
| 1044 | + tools: "#elementor-template-library-header-tools", | |
| 1045 | + menuArea: ".elementor-templates-modal__header__menu-area" | |
| 1046 | + }; | |
| 1047 | + } | |
| 1048 | + }, | |
| 1049 | + { | |
| 1050 | + key: "ui", | |
| 1051 | + value: function ui() { | |
| 1052 | + return { closeModal: ".elementor-templates-modal__header__close" }; | |
| 1053 | + } | |
| 1054 | + }, | |
| 1055 | + { | |
| 1056 | + key: "events", | |
| 1057 | + value: function events() { | |
| 1058 | + return { "click @ui.closeModal": "onCloseModalClick" }; | |
| 1059 | + } | |
| 1060 | + }, | |
| 1061 | + { | |
| 1062 | + key: "onRender", | |
| 1063 | + value: function onRender() { | |
| 1064 | + this.bindEscapeKey(); | |
| 1065 | + } | |
| 1066 | + }, | |
| 1067 | + { | |
| 1068 | + key: "bindEscapeKey", | |
| 1069 | + value: function bindEscapeKey() { | |
| 1070 | + var _this = this; | |
| 1071 | + this.onDocumentKeyDown = function(event) { | |
| 1072 | + if ("Escape" === event.key) _this.onCloseModalClick(); | |
| 1073 | + }; | |
| 1074 | + document.addEventListener("keydown", this.onDocumentKeyDown); | |
| 1075 | + } | |
| 1076 | + }, | |
| 1077 | + { | |
| 1078 | + key: "onDestroy", | |
| 1079 | + value: function onDestroy() { | |
| 1080 | + if (this.onDocumentKeyDown) document.removeEventListener("keydown", this.onDocumentKeyDown); | |
| 1081 | + } | |
| 1082 | + }, | |
| 1083 | + { | |
| 1084 | + key: "templateHelpers", | |
| 1085 | + value: function templateHelpers() { | |
| 1086 | + return { closeType: this.getOption("closeType") }; | |
| 1087 | + } | |
| 1088 | + }, | |
| 1089 | + { | |
| 1090 | + key: "onCloseModalClick", | |
| 1091 | + value: function onCloseModalClick() { | |
| 1092 | + this._parent._parent._parent.hideModal(); | |
| 1093 | + var documentType = this.getDocumentType(); | |
| 1094 | + var customEvent = new CustomEvent("core/modal/close/".concat(documentType)); | |
| 1095 | + window.dispatchEvent(customEvent); | |
| 1096 | + if (this.isFloatingButtonLibraryClose()) { | |
| 1097 | + $e.internal("document/save/set-is-modified", { status: false }); | |
| 1098 | + window.location.href = elementor.config.admin_floating_button_admin_url; | |
| 1099 | + } | |
| 1100 | + } | |
| 1101 | + }, | |
| 1102 | + { | |
| 1103 | + key: "getDocumentType", | |
| 1104 | + value: function getDocumentType() { | |
| 1105 | + var _elementor$config$doc; | |
| 1106 | + var _elementor; | |
| 1107 | + var DEFAULT_TYPE = "default"; | |
| 1108 | + if ("undefined" === typeof window.elementor) return DEFAULT_TYPE; | |
| 1109 | + return (_elementor$config$doc = (_elementor = elementor) === null || _elementor === void 0 || (_elementor = _elementor.config) === null || _elementor === void 0 || (_elementor = _elementor.document) === null || _elementor === void 0 ? void 0 : _elementor.type) !== null && _elementor$config$doc !== void 0 ? _elementor$config$doc : DEFAULT_TYPE; | |
| 1110 | + } | |
| 1111 | + }, | |
| 1112 | + { | |
| 1113 | + key: "isFloatingButtonLibraryClose", | |
| 1114 | + value: function isFloatingButtonLibraryClose() { | |
| 1115 | + var _elementor$config; | |
| 1116 | + var _elementor$config2; | |
| 1117 | + return window.elementor && ((_elementor$config = elementor.config) === null || _elementor$config === void 0 ? void 0 : _elementor$config.admin_floating_button_admin_url) && "floating-buttons" === ((_elementor$config2 = elementor.config) === null || _elementor$config2 === void 0 || (_elementor$config2 = _elementor$config2.document) === null || _elementor$config2 === void 0 ? void 0 : _elementor$config2.type) && (this.$el.closest(".dialog-lightbox-widget-content").find(".elementor-template-library-template-floating_button").length || this.$el.closest(".dialog-lightbox-widget-content").find("#elementor-template-library-preview").length || this.$el.closest(".dialog-lightbox-widget-content").find("#elementor-template-library-templates-empty").length); | |
| 1118 | + } | |
| 1119 | + } | |
| 1120 | + ]); | |
| 1121 | + }(Marionette.LayoutView); | |
| 419 | 1122 | |
| 420 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 421 | -Object.defineProperty(exports, "__esModule", ({ | |
| 422 | - value: true | |
| 423 | -})); | |
| 424 | -exports["default"] = void 0; | |
| 425 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 426 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 427 | -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 428 | -var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js")); | |
| 429 | -function _superPropGet(t, o, e, r) { var p = (0, _get2.default)((0, _getPrototypeOf2.default)(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; } | |
| 430 | -var InstanceType = exports["default"] = /*#__PURE__*/function () { | |
| 431 | - function InstanceType() { | |
| 432 | - var _this = this; | |
| 433 | - (0, _classCallCheck2.default)(this, InstanceType); | |
| 434 | - // Since anonymous classes sometimes do not get validated by babel, do it manually. | |
| 435 | - var target = this instanceof InstanceType ? this.constructor : void 0; | |
| 436 | - var prototypes = []; | |
| 437 | - while (target.__proto__ && target.__proto__.name) { | |
| 438 | - prototypes.push(target.__proto__); | |
| 439 | - target = target.__proto__; | |
| 440 | - } | |
| 441 | - prototypes.reverse().forEach(function (proto) { | |
| 442 | - return _this instanceof proto; | |
| 443 | - }); | |
| 444 | - } | |
| 445 | - return (0, _createClass2.default)(InstanceType, null, [{ | |
| 446 | - key: Symbol.hasInstance, | |
| 447 | - value: function value(target) { | |
| 448 | - /** | |
| 449 | - * This is function extending being called each time JS uses instanceOf, since babel use it each time it create new class | |
| 450 | - * its give's opportunity to mange capabilities of instanceOf operator. | |
| 451 | - * saving current class each time will give option later to handle instanceOf manually. | |
| 452 | - */ | |
| 453 | - var result = _superPropGet(InstanceType, Symbol.hasInstance, this, 2)([target]); | |
| 1123 | +//#endregion | |
| 1124 | +//#region core/common/assets/js/views/modal/logo.js | |
| 1125 | + function _callSuper$12(t, o, e) { | |
| 1126 | + return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$12() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 1127 | + } | |
| 1128 | + __name(_callSuper$12, "_callSuper"); | |
| 1129 | + function _isNativeReflectConstruct$12() { | |
| 1130 | + try { | |
| 1131 | + var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 1132 | + } catch (t) {} | |
| 1133 | + return (_isNativeReflectConstruct$12 = function _isNativeReflectConstruct() { | |
| 1134 | + return !!t; | |
| 1135 | + })(); | |
| 1136 | + } | |
| 1137 | + __name(_isNativeReflectConstruct$12, "_isNativeReflectConstruct"); | |
| 1138 | + var _default$2 = /*#__PURE__*/ function(_Marionette$ItemView) { | |
| 1139 | + function _default() { | |
| 1140 | + _classCallCheck(this, _default); | |
| 1141 | + return _callSuper$12(this, _default, arguments); | |
| 1142 | + } | |
| 1143 | + _inherits(_default, _Marionette$ItemView); | |
| 1144 | + return _createClass(_default, [ | |
| 1145 | + { | |
| 1146 | + key: "getTemplate", | |
| 1147 | + value: function getTemplate() { | |
| 1148 | + return "#tmpl-elementor-templates-modal__header__logo"; | |
| 1149 | + } | |
| 1150 | + }, | |
| 1151 | + { | |
| 1152 | + key: "className", | |
| 1153 | + value: function className() { | |
| 1154 | + return "elementor-templates-modal__header__logo"; | |
| 1155 | + } | |
| 1156 | + }, | |
| 1157 | + { | |
| 1158 | + key: "events", | |
| 1159 | + value: function events() { | |
| 1160 | + return { click: "onClick" }; | |
| 1161 | + } | |
| 1162 | + }, | |
| 1163 | + { | |
| 1164 | + key: "templateHelpers", | |
| 1165 | + value: function templateHelpers() { | |
| 1166 | + return { title: this.getOption("title") }; | |
| 1167 | + } | |
| 1168 | + }, | |
| 1169 | + { | |
| 1170 | + key: "onClick", | |
| 1171 | + value: function onClick() { | |
| 1172 | + var clickCallback = this.getOption("click"); | |
| 1173 | + if (clickCallback) clickCallback(); | |
| 1174 | + } | |
| 1175 | + } | |
| 1176 | + ]); | |
| 1177 | + }(Marionette.ItemView); | |
| 454 | 1178 | |
| 455 | - // Act normal when validate a class, which does not have instance type. | |
| 456 | - if (target && !target.constructor.getInstanceType) { | |
| 457 | - return result; | |
| 458 | - } | |
| 459 | - if (target) { | |
| 460 | - if (!target.instanceTypes) { | |
| 461 | - target.instanceTypes = []; | |
| 462 | - } | |
| 463 | - if (!result) { | |
| 464 | - if (this.getInstanceType() === target.constructor.getInstanceType()) { | |
| 465 | - result = true; | |
| 466 | - } | |
| 467 | - } | |
| 468 | - if (result) { | |
| 469 | - var name = this.getInstanceType === InstanceType.getInstanceType ? 'BaseInstanceType' : this.getInstanceType(); | |
| 470 | - if (-1 === target.instanceTypes.indexOf(name)) { | |
| 471 | - target.instanceTypes.push(name); | |
| 472 | - } | |
| 473 | - } | |
| 474 | - } | |
| 475 | - if (!result && target) { | |
| 476 | - // Check if the given 'target', is instance of known types. | |
| 477 | - result = target.instanceTypes && Array.isArray(target.instanceTypes) && -1 !== target.instanceTypes.indexOf(this.getInstanceType()); | |
| 478 | - } | |
| 479 | - return result; | |
| 480 | - } | |
| 481 | - }, { | |
| 482 | - key: "getInstanceType", | |
| 483 | - value: function getInstanceType() { | |
| 484 | - elementorModules.ForceMethodImplementation(); | |
| 485 | - } | |
| 486 | - }]); | |
| 487 | -}(); | |
| 1179 | +//#endregion | |
| 1180 | +//#region core/common/assets/js/views/modal/loading.js | |
| 1181 | + function _callSuper$11(t, o, e) { | |
| 1182 | + return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$11() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 1183 | + } | |
| 1184 | + __name(_callSuper$11, "_callSuper"); | |
| 1185 | + function _isNativeReflectConstruct$11() { | |
| 1186 | + try { | |
| 1187 | + var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 1188 | + } catch (t) {} | |
| 1189 | + return (_isNativeReflectConstruct$11 = function _isNativeReflectConstruct() { | |
| 1190 | + return !!t; | |
| 1191 | + })(); | |
| 1192 | + } | |
| 1193 | + __name(_isNativeReflectConstruct$11, "_isNativeReflectConstruct"); | |
| 1194 | + var _default$1 = /*#__PURE__*/ function(_Marionette$ItemView) { | |
| 1195 | + function _default() { | |
| 1196 | + _classCallCheck(this, _default); | |
| 1197 | + return _callSuper$11(this, _default, arguments); | |
| 1198 | + } | |
| 1199 | + _inherits(_default, _Marionette$ItemView); | |
| 1200 | + return _createClass(_default, [{ | |
| 1201 | + key: "id", | |
| 1202 | + value: function id() { | |
| 1203 | + return "elementor-template-library-loading"; | |
| 1204 | + } | |
| 1205 | + }, { | |
| 1206 | + key: "getTemplate", | |
| 1207 | + value: function getTemplate() { | |
| 1208 | + return "#tmpl-elementor-template-library-loading"; | |
| 1209 | + } | |
| 1210 | + }]); | |
| 1211 | + }(Marionette.ItemView); | |
| 488 | 1212 | |
| 489 | -/***/ }), | |
| 1213 | +//#endregion | |
| 1214 | +//#region core/common/assets/js/views/modal/layout.js | |
| 1215 | + function _callSuper$10(t, o, e) { | |
| 1216 | + return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$10() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 1217 | + } | |
| 1218 | + __name(_callSuper$10, "_callSuper"); | |
| 1219 | + function _isNativeReflectConstruct$10() { | |
| 1220 | + try { | |
| 1221 | + var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 1222 | + } catch (t) {} | |
| 1223 | + return (_isNativeReflectConstruct$10 = function _isNativeReflectConstruct() { | |
| 1224 | + return !!t; | |
| 1225 | + })(); | |
| 1226 | + } | |
| 1227 | + __name(_isNativeReflectConstruct$10, "_isNativeReflectConstruct"); | |
| 1228 | + var _default = /*#__PURE__*/ function(_Marionette$LayoutVie) { | |
| 1229 | + function _default() { | |
| 1230 | + _classCallCheck(this, _default); | |
| 1231 | + return _callSuper$10(this, _default, arguments); | |
| 1232 | + } | |
| 1233 | + _inherits(_default, _Marionette$LayoutVie); | |
| 1234 | + return _createClass(_default, [ | |
| 1235 | + { | |
| 1236 | + key: "el", | |
| 1237 | + value: function el() { | |
| 1238 | + return this.getModal().getElements("widget"); | |
| 1239 | + } | |
| 1240 | + }, | |
| 1241 | + { | |
| 1242 | + key: "regions", | |
| 1243 | + value: function regions() { | |
| 1244 | + return { | |
| 1245 | + modalHeader: ".dialog-header", | |
| 1246 | + modalContent: ".dialog-lightbox-content", | |
| 1247 | + modalLoading: ".dialog-lightbox-loading" | |
| 1248 | + }; | |
| 1249 | + } | |
| 1250 | + }, | |
| 1251 | + { | |
| 1252 | + key: "initialize", | |
| 1253 | + value: function initialize() { | |
| 1254 | + this.modalHeader.show(new _default$3(this.getHeaderOptions())); | |
| 1255 | + } | |
| 1256 | + }, | |
| 1257 | + { | |
| 1258 | + key: "getModal", | |
| 1259 | + value: function getModal() { | |
| 1260 | + if (!this.modal) this.initModal(); | |
| 1261 | + return this.modal; | |
| 1262 | + } | |
| 1263 | + }, | |
| 1264 | + { | |
| 1265 | + key: "initModal", | |
| 1266 | + value: function initModal() { | |
| 1267 | + var modalOptions = { | |
| 1268 | + className: "elementor-templates-modal", | |
| 1269 | + closeButton: false, | |
| 1270 | + draggable: false, | |
| 1271 | + hide: { | |
| 1272 | + onOutsideClick: false, | |
| 1273 | + onEscKeyPress: false | |
| 1274 | + } | |
| 1275 | + }; | |
| 1276 | + jQuery.extend(true, modalOptions, this.getModalOptions()); | |
| 1277 | + this.modal = elementorCommon.dialogsManager.createWidget("lightbox", modalOptions); | |
| 1278 | + this.modal.getElements("message").append(this.modal.addElement("content"), this.modal.addElement("loading")); | |
| 1279 | + if (modalOptions.draggable) this.draggableModal(); | |
| 1280 | + } | |
| 1281 | + }, | |
| 1282 | + { | |
| 1283 | + key: "showModal", | |
| 1284 | + value: function showModal() { | |
| 1285 | + this.getModal().show(); | |
| 1286 | + } | |
| 1287 | + }, | |
| 1288 | + { | |
| 1289 | + key: "hideModal", | |
| 1290 | + value: function hideModal() { | |
| 1291 | + this.getModal().hide(); | |
| 1292 | + } | |
| 1293 | + }, | |
| 1294 | + { | |
| 1295 | + key: "draggableModal", | |
| 1296 | + value: function draggableModal() { | |
| 1297 | + var $modalWidgetContent = this.getModal().getElements("widgetContent"); | |
| 1298 | + $modalWidgetContent.draggable({ | |
| 1299 | + containment: "parent", | |
| 1300 | + stop: function stop() { | |
| 1301 | + $modalWidgetContent.height(""); | |
| 1302 | + } | |
| 1303 | + }); | |
| 1304 | + $modalWidgetContent.css("position", "absolute"); | |
| 1305 | + } | |
| 1306 | + }, | |
| 1307 | + { | |
| 1308 | + key: "getModalOptions", | |
| 1309 | + value: function getModalOptions() { | |
| 1310 | + return {}; | |
| 1311 | + } | |
| 1312 | + }, | |
| 1313 | + { | |
| 1314 | + key: "getLogoOptions", | |
| 1315 | + value: function getLogoOptions() { | |
| 1316 | + return {}; | |
| 1317 | + } | |
| 1318 | + }, | |
| 1319 | + { | |
| 1320 | + key: "getHeaderOptions", | |
| 1321 | + value: function getHeaderOptions() { | |
| 1322 | + return { closeType: "normal" }; | |
| 1323 | + } | |
| 1324 | + }, | |
| 1325 | + { | |
| 1326 | + key: "getHeaderView", | |
| 1327 | + value: function getHeaderView() { | |
| 1328 | + return this.modalHeader.currentView; | |
| 1329 | + } | |
| 1330 | + }, | |
| 1331 | + { | |
| 1332 | + key: "showLoadingView", | |
| 1333 | + value: function showLoadingView() { | |
| 1334 | + this.modalLoading.show(new _default$1()); | |
| 1335 | + this.modalLoading.$el.show(); | |
| 1336 | + this.modalContent.$el.hide(); | |
| 1337 | + } | |
| 1338 | + }, | |
| 1339 | + { | |
| 1340 | + key: "hideLoadingView", | |
| 1341 | + value: function hideLoadingView() { | |
| 1342 | + this.modalContent.$el.show(); | |
| 1343 | + this.modalLoading.$el.hide(); | |
| 1344 | + } | |
| 1345 | + }, | |
| 1346 | + { | |
| 1347 | + key: "showLogo", | |
| 1348 | + value: function showLogo() { | |
| 1349 | + this.getHeaderView().logoArea.show(new _default$2(this.getLogoOptions())); | |
| 1350 | + } | |
| 1351 | + } | |
| 1352 | + ]); | |
| 1353 | + }(Marionette.LayoutView); | |
| 490 | 1354 | |
| 491 | -/***/ "../assets/dev/js/modules/imports/module.js": | |
| 492 | -/*!**************************************************!*\ | |
| 493 | - !*** ../assets/dev/js/modules/imports/module.js ***! | |
| 494 | - \**************************************************/ | |
| 495 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1355 | +//#endregion | |
| 1356 | +//#region node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js | |
| 1357 | + function _arrayWithHoles(r) { | |
| 1358 | + if (Array.isArray(r)) return r; | |
| 1359 | + } | |
| 496 | 1360 | |
| 497 | -"use strict"; | |
| 1361 | +//#endregion | |
| 1362 | +//#region node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js | |
| 1363 | + function _iterableToArrayLimit(r, l) { | |
| 1364 | + var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; | |
| 1365 | + if (null != t) { | |
| 1366 | + var e; | |
| 1367 | + var n; | |
| 1368 | + var i; | |
| 1369 | + var u; | |
| 1370 | + var a = []; | |
| 1371 | + var f = !0; | |
| 1372 | + var o = !1; | |
| 1373 | + try { | |
| 1374 | + if (i = (t = t.call(r)).next, 0 === l) { | |
| 1375 | + if (Object(t) !== t) return; | |
| 1376 | + f = !1; | |
| 1377 | + } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); | |
| 1378 | + } catch (r) { | |
| 1379 | + o = !0, n = r; | |
| 1380 | + } finally { | |
| 1381 | + try { | |
| 1382 | + if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; | |
| 1383 | + } finally { | |
| 1384 | + if (o) throw n; | |
| 1385 | + } | |
| 1386 | + } | |
| 1387 | + return a; | |
| 1388 | + } | |
| 1389 | + } | |
| 498 | 1390 | |
| 1391 | +//#endregion | |
| 1392 | +//#region node_modules/@babel/runtime/helpers/esm/nonIterableRest.js | |
| 1393 | + function _nonIterableRest() { | |
| 1394 | + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | |
| 1395 | + } | |
| 499 | 1396 | |
| 500 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 501 | -var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js")); | |
| 502 | -var Module = function Module() { | |
| 503 | - var $ = jQuery, | |
| 504 | - instanceParams = arguments, | |
| 505 | - self = this, | |
| 506 | - events = {}; | |
| 507 | - var settings; | |
| 508 | - var ensureClosureMethods = function ensureClosureMethods() { | |
| 509 | - $.each(self, function (methodName) { | |
| 510 | - var oldMethod = self[methodName]; | |
| 511 | - if ('function' !== typeof oldMethod) { | |
| 512 | - return; | |
| 513 | - } | |
| 514 | - self[methodName] = function () { | |
| 515 | - return oldMethod.apply(self, arguments); | |
| 516 | - }; | |
| 517 | - }); | |
| 518 | - }; | |
| 519 | - var initSettings = function initSettings() { | |
| 520 | - settings = self.getDefaultSettings(); | |
| 521 | - var instanceSettings = instanceParams[0]; | |
| 522 | - if (instanceSettings) { | |
| 523 | - $.extend(true, settings, instanceSettings); | |
| 524 | - } | |
| 525 | - }; | |
| 526 | - var init = function init() { | |
| 527 | - self.__construct.apply(self, instanceParams); | |
| 528 | - ensureClosureMethods(); | |
| 529 | - initSettings(); | |
| 530 | - self.trigger('init'); | |
| 531 | - }; | |
| 532 | - this.getItems = function (items, itemKey) { | |
| 533 | - if (itemKey) { | |
| 534 | - var keyStack = itemKey.split('.'), | |
| 535 | - currentKey = keyStack.splice(0, 1); | |
| 536 | - if (!keyStack.length) { | |
| 537 | - return items[currentKey]; | |
| 538 | - } | |
| 539 | - if (!items[currentKey]) { | |
| 540 | - return; | |
| 541 | - } | |
| 542 | - return this.getItems(items[currentKey], keyStack.join('.')); | |
| 543 | - } | |
| 544 | - return items; | |
| 545 | - }; | |
| 546 | - this.getSettings = function (setting) { | |
| 547 | - return this.getItems(settings, setting); | |
| 548 | - }; | |
| 549 | - this.setSettings = function (settingKey, value, settingsContainer) { | |
| 550 | - if (!settingsContainer) { | |
| 551 | - settingsContainer = settings; | |
| 552 | - } | |
| 553 | - if ('object' === (0, _typeof2.default)(settingKey)) { | |
| 554 | - $.extend(settingsContainer, settingKey); | |
| 555 | - return self; | |
| 556 | - } | |
| 557 | - var keyStack = settingKey.split('.'), | |
| 558 | - currentKey = keyStack.splice(0, 1); | |
| 559 | - if (!keyStack.length) { | |
| 560 | - settingsContainer[currentKey] = value; | |
| 561 | - return self; | |
| 562 | - } | |
| 563 | - if (!settingsContainer[currentKey]) { | |
| 564 | - settingsContainer[currentKey] = {}; | |
| 565 | - } | |
| 566 | - return self.setSettings(keyStack.join('.'), value, settingsContainer[currentKey]); | |
| 567 | - }; | |
| 568 | - this.getErrorMessage = function (type, functionName) { | |
| 569 | - var message; | |
| 570 | - switch (type) { | |
| 571 | - case 'forceMethodImplementation': | |
| 572 | - message = "The method '".concat(functionName, "' must to be implemented in the inheritor child."); | |
| 573 | - break; | |
| 574 | - default: | |
| 575 | - message = 'An error occurs'; | |
| 576 | - } | |
| 577 | - return message; | |
| 578 | - }; | |
| 1397 | +//#endregion | |
| 1398 | +//#region node_modules/@babel/runtime/helpers/esm/slicedToArray.js | |
| 1399 | + function _slicedToArray(r, e) { | |
| 1400 | + return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); | |
| 1401 | + } | |
| 579 | 1402 | |
| 580 | - // TODO: This function should be deleted ?. | |
| 581 | - this.forceMethodImplementation = function (functionName) { | |
| 582 | - throw new Error(this.getErrorMessage('forceMethodImplementation', functionName)); | |
| 583 | - }; | |
| 584 | - this.on = function (eventName, callback) { | |
| 585 | - if ('object' === (0, _typeof2.default)(eventName)) { | |
| 586 | - $.each(eventName, function (singleEventName) { | |
| 587 | - self.on(singleEventName, this); | |
| 588 | - }); | |
| 589 | - return self; | |
| 590 | - } | |
| 591 | - var eventNames = eventName.split(' '); | |
| 592 | - eventNames.forEach(function (singleEventName) { | |
| 593 | - if (!events[singleEventName]) { | |
| 594 | - events[singleEventName] = []; | |
| 595 | - } | |
| 596 | - events[singleEventName].push(callback); | |
| 597 | - }); | |
| 598 | - return self; | |
| 599 | - }; | |
| 600 | - this.off = function (eventName, callback) { | |
| 601 | - if (!events[eventName]) { | |
| 602 | - return self; | |
| 603 | - } | |
| 604 | - if (!callback) { | |
| 605 | - delete events[eventName]; | |
| 606 | - return self; | |
| 607 | - } | |
| 608 | - var callbackIndex = events[eventName].indexOf(callback); | |
| 609 | - if (-1 !== callbackIndex) { | |
| 610 | - delete events[eventName][callbackIndex]; | |
| 1403 | +//#endregion | |
| 1404 | +//#region modules/web-cli/assets/js/utils/console.js | |
| 1405 | + var Console = /*#__PURE__*/ function() { | |
| 1406 | + function Console() { | |
| 1407 | + _classCallCheck(this, Console); | |
| 1408 | + } | |
| 1409 | + return _createClass(Console, null, [{ | |
| 1410 | + key: "error", | |
| 1411 | + value: function error(message) { | |
| 1412 | + if ($e.devTools) $e.devTools.log.error(message); | |
| 1413 | + if (!(message instanceof $e.modules.HookBreak)) console.error(message); | |
| 1414 | + } | |
| 1415 | + }, { | |
| 1416 | + key: "warn", | |
| 1417 | + value: function warn() { | |
| 1418 | + var _console; | |
| 1419 | + var style = "font-size: 12px; background-image: url(\"".concat(elementorWebCliConfig.urls.assets, "images/logo-icon.png\"); background-repeat: no-repeat; background-size: contain;"); | |
| 1420 | + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key]; | |
| 1421 | + args.unshift("%c %c", style, ""); | |
| 1422 | + (_console = console).warn.apply(_console, args); | |
| 1423 | + } | |
| 1424 | + }]); | |
| 1425 | + }(); | |
| 611 | 1426 | |
| 612 | - // Reset array index (for next off on same event). | |
| 613 | - events[eventName] = events[eventName].filter(function (val) { | |
| 614 | - return val; | |
| 615 | - }); | |
| 616 | - } | |
| 617 | - return self; | |
| 618 | - }; | |
| 619 | - this.trigger = function (eventName) { | |
| 620 | - var methodName = 'on' + eventName[0].toUpperCase() + eventName.slice(1), | |
| 621 | - params = Array.prototype.slice.call(arguments, 1); | |
| 622 | - if (self[methodName]) { | |
| 623 | - self[methodName].apply(self, params); | |
| 624 | - } | |
| 625 | - var callbacks = events[eventName]; | |
| 626 | - if (!callbacks) { | |
| 627 | - return self; | |
| 628 | - } | |
| 629 | - $.each(callbacks, function (index, callback) { | |
| 630 | - callback.apply(self, params); | |
| 631 | - }); | |
| 632 | - return self; | |
| 633 | - }; | |
| 634 | - init(); | |
| 635 | -}; | |
| 636 | -Module.prototype.__construct = function () {}; | |
| 637 | -Module.prototype.getDefaultSettings = function () { | |
| 638 | - return {}; | |
| 639 | -}; | |
| 640 | -Module.prototype.getConstructorID = function () { | |
| 641 | - return this.constructor.name; | |
| 642 | -}; | |
| 643 | -Module.extend = function (properties) { | |
| 644 | - var $ = jQuery, | |
| 645 | - parent = this; | |
| 646 | - var child = function child() { | |
| 647 | - return parent.apply(this, arguments); | |
| 648 | - }; | |
| 649 | - $.extend(child, parent); | |
| 650 | - child.prototype = Object.create($.extend({}, parent.prototype, properties)); | |
| 651 | - child.prototype.constructor = child; | |
| 652 | - child.__super__ = parent.prototype; | |
| 653 | - return child; | |
| 654 | -}; | |
| 655 | -module.exports = Module; | |
| 656 | - | |
| 657 | -/***/ }), | |
| 658 | - | |
| 659 | -/***/ "../assets/dev/js/modules/imports/utils/masonry.js": | |
| 660 | -/*!*********************************************************!*\ | |
| 661 | - !*** ../assets/dev/js/modules/imports/utils/masonry.js ***! | |
| 662 | - \*********************************************************/ | |
| 663 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 664 | - | |
| 665 | -"use strict"; | |
| 666 | - | |
| 667 | - | |
| 668 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 669 | -Object.defineProperty(exports, "__esModule", ({ | |
| 670 | - value: true | |
| 671 | -})); | |
| 672 | -exports["default"] = void 0; | |
| 673 | -var _viewModule = _interopRequireDefault(__webpack_require__(/*! ../view-module */ "../assets/dev/js/modules/imports/view-module.js")); | |
| 674 | -var _default = exports["default"] = _viewModule.default.extend({ | |
| 675 | - getDefaultSettings: function getDefaultSettings() { | |
| 676 | - return { | |
| 677 | - container: null, | |
| 678 | - items: null, | |
| 679 | - columnsCount: 3, | |
| 680 | - verticalSpaceBetween: 30 | |
| 681 | - }; | |
| 682 | - }, | |
| 683 | - getDefaultElements: function getDefaultElements() { | |
| 684 | - return { | |
| 685 | - $container: jQuery(this.getSettings('container')), | |
| 686 | - $items: jQuery(this.getSettings('items')) | |
| 687 | - }; | |
| 688 | - }, | |
| 689 | - run: function run() { | |
| 690 | - var heights = [], | |
| 691 | - distanceFromTop = this.elements.$container.position().top, | |
| 692 | - settings = this.getSettings(), | |
| 693 | - columnsCount = settings.columnsCount; | |
| 694 | - distanceFromTop += parseInt(this.elements.$container.css('margin-top'), 10); | |
| 695 | - this.elements.$items.each(function (index) { | |
| 696 | - var row = Math.floor(index / columnsCount), | |
| 697 | - $item = jQuery(this), | |
| 698 | - itemHeight = $item[0].getBoundingClientRect().height + settings.verticalSpaceBetween; | |
| 699 | - if (row) { | |
| 700 | - var itemPosition = $item.position(), | |
| 701 | - indexAtRow = index % columnsCount, | |
| 702 | - pullHeight = itemPosition.top - distanceFromTop - heights[indexAtRow]; | |
| 703 | - pullHeight -= parseInt($item.css('margin-top'), 10); | |
| 704 | - pullHeight *= -1; | |
| 705 | - $item.css('margin-top', pullHeight + 'px'); | |
| 706 | - heights[indexAtRow] += itemHeight; | |
| 707 | - } else { | |
| 708 | - heights.push(itemHeight); | |
| 709 | - } | |
| 710 | - }); | |
| 711 | - } | |
| 712 | -}); | |
| 713 | - | |
| 714 | -/***/ }), | |
| 715 | - | |
| 716 | -/***/ "../assets/dev/js/modules/imports/utils/scroll.js": | |
| 717 | -/*!********************************************************!*\ | |
| 718 | - !*** ../assets/dev/js/modules/imports/utils/scroll.js ***! | |
| 719 | - \********************************************************/ | |
| 720 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 721 | - | |
| 722 | -"use strict"; | |
| 723 | - | |
| 724 | - | |
| 725 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 726 | -Object.defineProperty(exports, "__esModule", ({ | |
| 727 | - value: true | |
| 728 | -})); | |
| 729 | -exports["default"] = void 0; | |
| 730 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 731 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 732 | -// Moved from elementor pro: 'assets/dev/js/frontend/utils' | |
| 733 | -var Scroll = exports["default"] = /*#__PURE__*/function () { | |
| 734 | - function Scroll() { | |
| 735 | - (0, _classCallCheck2.default)(this, Scroll); | |
| 736 | - } | |
| 737 | - return (0, _createClass2.default)(Scroll, null, [{ | |
| 738 | - key: "scrollObserver", | |
| 739 | - value: | |
| 740 | - /** | |
| 741 | - * @param {Object} obj | |
| 742 | - * @param {number} obj.sensitivity - Value between 0-100 - Will determine the intersection trigger points on the element | |
| 743 | - * @param {Function} obj.callback - Will be triggered on each intersection point between the element and the viewport top/bottom | |
| 744 | - * @param {string} obj.offset - Offset between the element intersection points and the viewport, written like in CSS: '-50% 0 -25%' | |
| 745 | - * @param {HTMLElement} obj.root - The element that the events will be relative to, if 'null' will be relative to the viewport | |
| 746 | - */ | |
| 747 | - function scrollObserver(obj) { | |
| 748 | - var lastScrollY = 0; | |
| 749 | - | |
| 750 | - // Generating thresholds points along the animation height | |
| 751 | - // More thresholds points = more trigger points of the callback | |
| 752 | - var buildThresholds = function buildThresholds() { | |
| 753 | - var sensitivityPercentage = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; | |
| 754 | - var thresholds = []; | |
| 755 | - if (sensitivityPercentage > 0 && sensitivityPercentage <= 100) { | |
| 756 | - var increment = 100 / sensitivityPercentage; | |
| 757 | - for (var i = 0; i <= 100; i += increment) { | |
| 758 | - thresholds.push(i / 100); | |
| 759 | - } | |
| 760 | - } else { | |
| 761 | - thresholds.push(0); | |
| 762 | - } | |
| 763 | - return thresholds; | |
| 764 | - }; | |
| 765 | - var options = { | |
| 766 | - root: obj.root || null, | |
| 767 | - rootMargin: obj.offset || '0px', | |
| 768 | - threshold: buildThresholds(obj.sensitivity) | |
| 769 | - }; | |
| 770 | - function handleIntersect(entries) { | |
| 771 | - var currentScrollY = entries[0].boundingClientRect.y, | |
| 772 | - isInViewport = entries[0].isIntersecting, | |
| 773 | - intersectionScrollDirection = currentScrollY < lastScrollY ? 'down' : 'up', | |
| 774 | - scrollPercentage = Math.abs(parseFloat((entries[0].intersectionRatio * 100).toFixed(2))); | |
| 775 | - obj.callback({ | |
| 776 | - sensitivity: obj.sensitivity, | |
| 777 | - isInViewport: isInViewport, | |
| 778 | - scrollPercentage: scrollPercentage, | |
| 779 | - intersectionScrollDirection: intersectionScrollDirection | |
| 780 | - }); | |
| 781 | - lastScrollY = currentScrollY; | |
| 782 | - } | |
| 783 | - return new IntersectionObserver(handleIntersect, options); | |
| 784 | - } | |
| 785 | - | |
| 786 | - /** | |
| 787 | - * @param {jQuery.Element} $element | |
| 788 | - * @param {Object} offsetObj | |
| 789 | - * @param {number} offsetObj.start - Offset start value in percentages | |
| 790 | - * @param {number} offsetObj.end - Offset end value in percentages | |
| 791 | - */ | |
| 792 | - }, { | |
| 793 | - key: "getElementViewportPercentage", | |
| 794 | - value: function getElementViewportPercentage($element) { | |
| 795 | - var offsetObj = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; | |
| 796 | - var elementOffset = $element[0].getBoundingClientRect(), | |
| 797 | - offsetStart = offsetObj.start || 0, | |
| 798 | - offsetEnd = offsetObj.end || 0, | |
| 799 | - windowStartOffset = window.innerHeight * offsetStart / 100, | |
| 800 | - windowEndOffset = window.innerHeight * offsetEnd / 100, | |
| 801 | - y1 = elementOffset.top - window.innerHeight, | |
| 802 | - y2 = elementOffset.top + windowStartOffset + $element.height(), | |
| 803 | - startPosition = 0 - y1 + windowStartOffset, | |
| 804 | - endPosition = y2 - y1 + windowEndOffset, | |
| 805 | - percent = Math.max(0, Math.min(startPosition / endPosition, 1)); | |
| 806 | - return parseFloat((percent * 100).toFixed(2)); | |
| 807 | - } | |
| 808 | - | |
| 809 | - /** | |
| 810 | - * @param {Object} offsetObj | |
| 811 | - * @param {number} offsetObj.start - Offset start value in percentages | |
| 812 | - * @param {number} offsetObj.end - Offset end value in percentages | |
| 813 | - * @param {number} limitPageHeight - Will limit the page height calculation | |
| 814 | - */ | |
| 815 | - }, { | |
| 816 | - key: "getPageScrollPercentage", | |
| 817 | - value: function getPageScrollPercentage() { | |
| 818 | - var offsetObj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 819 | - var limitPageHeight = arguments.length > 1 ? arguments[1] : undefined; | |
| 820 | - var offsetStart = offsetObj.start || 0, | |
| 821 | - offsetEnd = offsetObj.end || 0, | |
| 822 | - initialPageHeight = limitPageHeight || document.documentElement.scrollHeight - document.documentElement.clientHeight, | |
| 823 | - heightOffset = initialPageHeight * offsetStart / 100, | |
| 824 | - pageRange = initialPageHeight + heightOffset + initialPageHeight * offsetEnd / 100, | |
| 825 | - scrollPos = document.documentElement.scrollTop + document.body.scrollTop + heightOffset; | |
| 826 | - return scrollPos / pageRange * 100; | |
| 827 | - } | |
| 828 | - }]); | |
| 829 | -}(); | |
| 830 | - | |
| 831 | -/***/ }), | |
| 832 | - | |
| 833 | -/***/ "../assets/dev/js/modules/imports/view-module.js": | |
| 834 | -/*!*******************************************************!*\ | |
| 835 | - !*** ../assets/dev/js/modules/imports/view-module.js ***! | |
| 836 | - \*******************************************************/ | |
| 837 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 838 | - | |
| 839 | -"use strict"; | |
| 840 | - | |
| 841 | - | |
| 842 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 843 | -Object.defineProperty(exports, "__esModule", ({ | |
| 844 | - value: true | |
| 845 | -})); | |
| 846 | -exports["default"] = void 0; | |
| 847 | -var _module = _interopRequireDefault(__webpack_require__(/*! ./module */ "../assets/dev/js/modules/imports/module.js")); | |
| 848 | -var _default = exports["default"] = _module.default.extend({ | |
| 849 | - elements: null, | |
| 850 | - getDefaultElements: function getDefaultElements() { | |
| 851 | - return {}; | |
| 852 | - }, | |
| 853 | - bindEvents: function bindEvents() {}, | |
| 854 | - onInit: function onInit() { | |
| 855 | - this.initElements(); | |
| 856 | - this.bindEvents(); | |
| 857 | - }, | |
| 858 | - initElements: function initElements() { | |
| 859 | - this.elements = this.getDefaultElements(); | |
| 860 | - } | |
| 861 | -}); | |
| 862 | - | |
| 863 | -/***/ }), | |
| 864 | - | |
| 865 | -/***/ "../assets/dev/js/modules/modules.js": | |
| 866 | -/*!*******************************************!*\ | |
| 867 | - !*** ../assets/dev/js/modules/modules.js ***! | |
| 868 | - \*******************************************/ | |
| 869 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 870 | - | |
| 871 | -"use strict"; | |
| 872 | - | |
| 873 | - | |
| 874 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 875 | -Object.defineProperty(exports, "__esModule", ({ | |
| 876 | - value: true | |
| 877 | -})); | |
| 878 | -exports["default"] = void 0; | |
| 879 | -var _module = _interopRequireDefault(__webpack_require__(/*! ./imports/module */ "../assets/dev/js/modules/imports/module.js")); | |
| 880 | -var _viewModule = _interopRequireDefault(__webpack_require__(/*! ./imports/view-module */ "../assets/dev/js/modules/imports/view-module.js")); | |
| 881 | -var _argsObject = _interopRequireDefault(__webpack_require__(/*! ./imports/args-object */ "../assets/dev/js/modules/imports/args-object.js")); | |
| 882 | -var _masonry = _interopRequireDefault(__webpack_require__(/*! ./imports/utils/masonry */ "../assets/dev/js/modules/imports/utils/masonry.js")); | |
| 883 | -var _scroll = _interopRequireDefault(__webpack_require__(/*! ./imports/utils/scroll */ "../assets/dev/js/modules/imports/utils/scroll.js")); | |
| 884 | -var _forceMethodImplementation = _interopRequireDefault(__webpack_require__(/*! ./imports/force-method-implementation */ "../assets/dev/js/modules/imports/force-method-implementation.js")); | |
| 885 | -var _templateRegistryHelpers = __webpack_require__(/*! ../../../../app/modules/import-export-customization/assets/js/shared/utils/template-registry-helpers */ "../app/modules/import-export-customization/assets/js/shared/utils/template-registry-helpers.js"); | |
| 886 | -var _customizationDialogs = __webpack_require__(/*! ../../../../app/modules/import-export-customization/assets/js/shared/registry/customization-dialogs */ "../app/modules/import-export-customization/assets/js/shared/registry/customization-dialogs.js"); | |
| 887 | -var baseModules = { | |
| 888 | - Module: _module.default, | |
| 889 | - ViewModule: _viewModule.default, | |
| 890 | - ArgsObject: _argsObject.default, | |
| 891 | - ForceMethodImplementation: _forceMethodImplementation.default, | |
| 892 | - utils: { | |
| 893 | - Masonry: _masonry.default, | |
| 894 | - Scroll: _scroll.default | |
| 895 | - }, | |
| 896 | - importExport: { | |
| 897 | - createGetInitialState: _templateRegistryHelpers.createGetInitialState, | |
| 898 | - customizationDialogsRegistry: _customizationDialogs.customizationDialogsRegistry | |
| 899 | - } | |
| 900 | -}; | |
| 901 | -if (!window.elementorModules) { | |
| 902 | - window.elementorModules = baseModules; | |
| 903 | -} else { | |
| 904 | - Object.assign(window.elementorModules, baseModules); | |
| 905 | -} | |
| 906 | -var _default = exports["default"] = window.elementorModules; | |
| 907 | - | |
| 908 | -/***/ }), | |
| 909 | - | |
| 910 | -/***/ "../core/common/assets/js/views/modal/header.js": | |
| 911 | -/*!******************************************************!*\ | |
| 912 | - !*** ../core/common/assets/js/views/modal/header.js ***! | |
| 913 | - \******************************************************/ | |
| 914 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 915 | - | |
| 916 | -"use strict"; | |
| 917 | - | |
| 918 | - | |
| 919 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 920 | -Object.defineProperty(exports, "__esModule", ({ | |
| 921 | - value: true | |
| 922 | -})); | |
| 923 | -exports["default"] = void 0; | |
| 924 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 925 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 926 | -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 927 | -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 928 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 929 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 930 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 931 | -var _default = exports["default"] = /*#__PURE__*/function (_Marionette$LayoutVie) { | |
| 932 | - function _default() { | |
| 933 | - (0, _classCallCheck2.default)(this, _default); | |
| 934 | - return _callSuper(this, _default, arguments); | |
| 935 | - } | |
| 936 | - (0, _inherits2.default)(_default, _Marionette$LayoutVie); | |
| 937 | - return (0, _createClass2.default)(_default, [{ | |
| 938 | - key: "tagName", | |
| 939 | - value: function tagName() { | |
| 940 | - return 'header'; | |
| 941 | - } | |
| 942 | - }, { | |
| 943 | - key: "className", | |
| 944 | - value: function className() { | |
| 945 | - return 'elementor-templates-modal__header'; | |
| 946 | - } | |
| 947 | - }, { | |
| 948 | - key: "getTemplate", | |
| 949 | - value: function getTemplate() { | |
| 950 | - return '#tmpl-elementor-templates-modal__header'; | |
| 951 | - } | |
| 952 | - }, { | |
| 953 | - key: "regions", | |
| 954 | - value: function regions() { | |
| 955 | - return { | |
| 956 | - logoArea: '.elementor-templates-modal__header__logo-area', | |
| 957 | - tools: '#elementor-template-library-header-tools', | |
| 958 | - menuArea: '.elementor-templates-modal__header__menu-area' | |
| 959 | - }; | |
| 960 | - } | |
| 961 | - }, { | |
| 962 | - key: "ui", | |
| 963 | - value: function ui() { | |
| 964 | - return { | |
| 965 | - closeModal: '.elementor-templates-modal__header__close' | |
| 966 | - }; | |
| 967 | - } | |
| 968 | - }, { | |
| 969 | - key: "events", | |
| 970 | - value: function events() { | |
| 971 | - return { | |
| 972 | - 'click @ui.closeModal': 'onCloseModalClick' | |
| 973 | - }; | |
| 974 | - } | |
| 975 | - }, { | |
| 976 | - key: "onRender", | |
| 977 | - value: function onRender() { | |
| 978 | - this.bindEscapeKey(); | |
| 979 | - } | |
| 980 | - }, { | |
| 981 | - key: "bindEscapeKey", | |
| 982 | - value: function bindEscapeKey() { | |
| 983 | - var _this = this; | |
| 984 | - this.onDocumentKeyDown = function (event) { | |
| 985 | - if ('Escape' === event.key) { | |
| 986 | - _this.onCloseModalClick(); | |
| 987 | - } | |
| 988 | - }; | |
| 989 | - document.addEventListener('keydown', this.onDocumentKeyDown); | |
| 990 | - } | |
| 991 | - }, { | |
| 992 | - key: "onDestroy", | |
| 993 | - value: function onDestroy() { | |
| 994 | - if (this.onDocumentKeyDown) { | |
| 995 | - document.removeEventListener('keydown', this.onDocumentKeyDown); | |
| 996 | - } | |
| 997 | - } | |
| 998 | - }, { | |
| 999 | - key: "templateHelpers", | |
| 1000 | - value: function templateHelpers() { | |
| 1001 | - return { | |
| 1002 | - closeType: this.getOption('closeType') | |
| 1003 | - }; | |
| 1004 | - } | |
| 1005 | - }, { | |
| 1006 | - key: "onCloseModalClick", | |
| 1007 | - value: function onCloseModalClick() { | |
| 1008 | - this._parent._parent._parent.hideModal(); | |
| 1009 | - var documentType = this.getDocumentType(); | |
| 1010 | - var customEvent = new CustomEvent("core/modal/close/".concat(documentType)); | |
| 1011 | - window.dispatchEvent(customEvent); | |
| 1012 | - if (this.isFloatingButtonLibraryClose()) { | |
| 1013 | - $e.internal('document/save/set-is-modified', { | |
| 1014 | - status: false | |
| 1015 | - }); | |
| 1016 | - window.location.href = elementor.config.admin_floating_button_admin_url; | |
| 1017 | - } | |
| 1018 | - } | |
| 1019 | - }, { | |
| 1020 | - key: "getDocumentType", | |
| 1021 | - value: function getDocumentType() { | |
| 1022 | - var _elementor$config$doc, _elementor; | |
| 1023 | - var DEFAULT_TYPE = 'default'; | |
| 1024 | - if ('undefined' === typeof window.elementor) { | |
| 1025 | - return DEFAULT_TYPE; | |
| 1026 | - } | |
| 1027 | - return (_elementor$config$doc = (_elementor = elementor) === null || _elementor === void 0 || (_elementor = _elementor.config) === null || _elementor === void 0 || (_elementor = _elementor.document) === null || _elementor === void 0 ? void 0 : _elementor.type) !== null && _elementor$config$doc !== void 0 ? _elementor$config$doc : DEFAULT_TYPE; | |
| 1028 | - } | |
| 1029 | - }, { | |
| 1030 | - key: "isFloatingButtonLibraryClose", | |
| 1031 | - value: function isFloatingButtonLibraryClose() { | |
| 1032 | - var _elementor$config, _elementor$config2; | |
| 1033 | - return window.elementor && ((_elementor$config = elementor.config) === null || _elementor$config === void 0 ? void 0 : _elementor$config.admin_floating_button_admin_url) && 'floating-buttons' === ((_elementor$config2 = elementor.config) === null || _elementor$config2 === void 0 || (_elementor$config2 = _elementor$config2.document) === null || _elementor$config2 === void 0 ? void 0 : _elementor$config2.type) && (this.$el.closest('.dialog-lightbox-widget-content').find('.elementor-template-library-template-floating_button').length || this.$el.closest('.dialog-lightbox-widget-content').find('#elementor-template-library-preview').length || this.$el.closest('.dialog-lightbox-widget-content').find('#elementor-template-library-templates-empty').length); | |
| 1034 | - } | |
| 1035 | - }]); | |
| 1036 | -}(Marionette.LayoutView); | |
| 1037 | - | |
| 1038 | -/***/ }), | |
| 1039 | - | |
| 1040 | -/***/ "../core/common/assets/js/views/modal/layout.js": | |
| 1041 | -/*!******************************************************!*\ | |
| 1042 | - !*** ../core/common/assets/js/views/modal/layout.js ***! | |
| 1043 | - \******************************************************/ | |
| 1044 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1045 | - | |
| 1046 | -"use strict"; | |
| 1047 | - | |
| 1048 | - | |
| 1049 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1050 | -Object.defineProperty(exports, "__esModule", ({ | |
| 1051 | - value: true | |
| 1052 | -})); | |
| 1053 | -exports["default"] = void 0; | |
| 1054 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 1055 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 1056 | -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 1057 | -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 1058 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1059 | -var _header = _interopRequireDefault(__webpack_require__(/*! ./header */ "../core/common/assets/js/views/modal/header.js")); | |
| 1060 | -var _logo = _interopRequireDefault(__webpack_require__(/*! ./logo */ "../core/common/assets/js/views/modal/logo.js")); | |
| 1061 | -var _loading = _interopRequireDefault(__webpack_require__(/*! ./loading */ "../core/common/assets/js/views/modal/loading.js")); | |
| 1062 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 1063 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 1064 | -var _default = exports["default"] = /*#__PURE__*/function (_Marionette$LayoutVie) { | |
| 1065 | - function _default() { | |
| 1066 | - (0, _classCallCheck2.default)(this, _default); | |
| 1067 | - return _callSuper(this, _default, arguments); | |
| 1068 | - } | |
| 1069 | - (0, _inherits2.default)(_default, _Marionette$LayoutVie); | |
| 1070 | - return (0, _createClass2.default)(_default, [{ | |
| 1071 | - key: "el", | |
| 1072 | - value: function el() { | |
| 1073 | - return this.getModal().getElements('widget'); | |
| 1074 | - } | |
| 1075 | - }, { | |
| 1076 | - key: "regions", | |
| 1077 | - value: function regions() { | |
| 1078 | - return { | |
| 1079 | - modalHeader: '.dialog-header', | |
| 1080 | - modalContent: '.dialog-lightbox-content', | |
| 1081 | - modalLoading: '.dialog-lightbox-loading' | |
| 1082 | - }; | |
| 1083 | - } | |
| 1084 | - }, { | |
| 1085 | - key: "initialize", | |
| 1086 | - value: function initialize() { | |
| 1087 | - this.modalHeader.show(new _header.default(this.getHeaderOptions())); | |
| 1088 | - } | |
| 1089 | - }, { | |
| 1090 | - key: "getModal", | |
| 1091 | - value: function getModal() { | |
| 1092 | - if (!this.modal) { | |
| 1093 | - this.initModal(); | |
| 1094 | - } | |
| 1095 | - return this.modal; | |
| 1096 | - } | |
| 1097 | - }, { | |
| 1098 | - key: "initModal", | |
| 1099 | - value: function initModal() { | |
| 1100 | - var modalOptions = { | |
| 1101 | - className: 'elementor-templates-modal', | |
| 1102 | - closeButton: false, | |
| 1103 | - draggable: false, | |
| 1104 | - hide: { | |
| 1105 | - onOutsideClick: false, | |
| 1106 | - onEscKeyPress: false | |
| 1107 | - } | |
| 1108 | - }; | |
| 1109 | - jQuery.extend(true, modalOptions, this.getModalOptions()); | |
| 1110 | - this.modal = elementorCommon.dialogsManager.createWidget('lightbox', modalOptions); | |
| 1111 | - this.modal.getElements('message').append(this.modal.addElement('content'), this.modal.addElement('loading')); | |
| 1112 | - if (modalOptions.draggable) { | |
| 1113 | - this.draggableModal(); | |
| 1114 | - } | |
| 1115 | - } | |
| 1116 | - }, { | |
| 1117 | - key: "showModal", | |
| 1118 | - value: function showModal() { | |
| 1119 | - this.getModal().show(); | |
| 1120 | - } | |
| 1121 | - }, { | |
| 1122 | - key: "hideModal", | |
| 1123 | - value: function hideModal() { | |
| 1124 | - this.getModal().hide(); | |
| 1125 | - } | |
| 1126 | - }, { | |
| 1127 | - key: "draggableModal", | |
| 1128 | - value: function draggableModal() { | |
| 1129 | - var $modalWidgetContent = this.getModal().getElements('widgetContent'); | |
| 1130 | - $modalWidgetContent.draggable({ | |
| 1131 | - containment: 'parent', | |
| 1132 | - stop: function stop() { | |
| 1133 | - $modalWidgetContent.height(''); | |
| 1134 | - } | |
| 1135 | - }); | |
| 1136 | - $modalWidgetContent.css('position', 'absolute'); | |
| 1137 | - } | |
| 1138 | - }, { | |
| 1139 | - key: "getModalOptions", | |
| 1140 | - value: function getModalOptions() { | |
| 1141 | - return {}; | |
| 1142 | - } | |
| 1143 | - }, { | |
| 1144 | - key: "getLogoOptions", | |
| 1145 | - value: function getLogoOptions() { | |
| 1146 | - return {}; | |
| 1147 | - } | |
| 1148 | - }, { | |
| 1149 | - key: "getHeaderOptions", | |
| 1150 | - value: function getHeaderOptions() { | |
| 1151 | - return { | |
| 1152 | - closeType: 'normal' | |
| 1153 | - }; | |
| 1154 | - } | |
| 1155 | - }, { | |
| 1156 | - key: "getHeaderView", | |
| 1157 | - value: function getHeaderView() { | |
| 1158 | - return this.modalHeader.currentView; | |
| 1159 | - } | |
| 1160 | - }, { | |
| 1161 | - key: "showLoadingView", | |
| 1162 | - value: function showLoadingView() { | |
| 1163 | - this.modalLoading.show(new _loading.default()); | |
| 1164 | - this.modalLoading.$el.show(); | |
| 1165 | - this.modalContent.$el.hide(); | |
| 1166 | - } | |
| 1167 | - }, { | |
| 1168 | - key: "hideLoadingView", | |
| 1169 | - value: function hideLoadingView() { | |
| 1170 | - this.modalContent.$el.show(); | |
| 1171 | - this.modalLoading.$el.hide(); | |
| 1172 | - } | |
| 1173 | - }, { | |
| 1174 | - key: "showLogo", | |
| 1175 | - value: function showLogo() { | |
| 1176 | - this.getHeaderView().logoArea.show(new _logo.default(this.getLogoOptions())); | |
| 1177 | - } | |
| 1178 | - }]); | |
| 1179 | -}(Marionette.LayoutView); | |
| 1180 | - | |
| 1181 | -/***/ }), | |
| 1182 | - | |
| 1183 | -/***/ "../core/common/assets/js/views/modal/loading.js": | |
| 1184 | -/*!*******************************************************!*\ | |
| 1185 | - !*** ../core/common/assets/js/views/modal/loading.js ***! | |
| 1186 | - \*******************************************************/ | |
| 1187 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1188 | - | |
| 1189 | -"use strict"; | |
| 1190 | - | |
| 1191 | - | |
| 1192 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1193 | -Object.defineProperty(exports, "__esModule", ({ | |
| 1194 | - value: true | |
| 1195 | -})); | |
| 1196 | -exports["default"] = void 0; | |
| 1197 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 1198 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 1199 | -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 1200 | -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 1201 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1202 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 1203 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 1204 | -var _default = exports["default"] = /*#__PURE__*/function (_Marionette$ItemView) { | |
| 1205 | - function _default() { | |
| 1206 | - (0, _classCallCheck2.default)(this, _default); | |
| 1207 | - return _callSuper(this, _default, arguments); | |
| 1208 | - } | |
| 1209 | - (0, _inherits2.default)(_default, _Marionette$ItemView); | |
| 1210 | - return (0, _createClass2.default)(_default, [{ | |
| 1211 | - key: "id", | |
| 1212 | - value: function id() { | |
| 1213 | - return 'elementor-template-library-loading'; | |
| 1214 | - } | |
| 1215 | - }, { | |
| 1216 | - key: "getTemplate", | |
| 1217 | - value: function getTemplate() { | |
| 1218 | - return '#tmpl-elementor-template-library-loading'; | |
| 1219 | - } | |
| 1220 | - }]); | |
| 1221 | -}(Marionette.ItemView); | |
| 1222 | - | |
| 1223 | -/***/ }), | |
| 1224 | - | |
| 1225 | -/***/ "../core/common/assets/js/views/modal/logo.js": | |
| 1226 | -/*!****************************************************!*\ | |
| 1227 | - !*** ../core/common/assets/js/views/modal/logo.js ***! | |
| 1228 | - \****************************************************/ | |
| 1229 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1230 | - | |
| 1231 | -"use strict"; | |
| 1232 | - | |
| 1233 | - | |
| 1234 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1235 | -Object.defineProperty(exports, "__esModule", ({ | |
| 1236 | - value: true | |
| 1237 | -})); | |
| 1238 | -exports["default"] = void 0; | |
| 1239 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 1240 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 1241 | -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 1242 | -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 1243 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1244 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 1245 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 1246 | -var _default = exports["default"] = /*#__PURE__*/function (_Marionette$ItemView) { | |
| 1247 | - function _default() { | |
| 1248 | - (0, _classCallCheck2.default)(this, _default); | |
| 1249 | - return _callSuper(this, _default, arguments); | |
| 1250 | - } | |
| 1251 | - (0, _inherits2.default)(_default, _Marionette$ItemView); | |
| 1252 | - return (0, _createClass2.default)(_default, [{ | |
| 1253 | - key: "getTemplate", | |
| 1254 | - value: function getTemplate() { | |
| 1255 | - return '#tmpl-elementor-templates-modal__header__logo'; | |
| 1256 | - } | |
| 1257 | - }, { | |
| 1258 | - key: "className", | |
| 1259 | - value: function className() { | |
| 1260 | - return 'elementor-templates-modal__header__logo'; | |
| 1261 | - } | |
| 1262 | - }, { | |
| 1263 | - key: "events", | |
| 1264 | - value: function events() { | |
| 1265 | - return { | |
| 1266 | - click: 'onClick' | |
| 1267 | - }; | |
| 1268 | - } | |
| 1269 | - }, { | |
| 1270 | - key: "templateHelpers", | |
| 1271 | - value: function templateHelpers() { | |
| 1272 | - return { | |
| 1273 | - title: this.getOption('title') | |
| 1274 | - }; | |
| 1275 | - } | |
| 1276 | - }, { | |
| 1277 | - key: "onClick", | |
| 1278 | - value: function onClick() { | |
| 1279 | - var clickCallback = this.getOption('click'); | |
| 1280 | - if (clickCallback) { | |
| 1281 | - clickCallback(); | |
| 1282 | - } | |
| 1283 | - } | |
| 1284 | - }]); | |
| 1285 | -}(Marionette.ItemView); | |
| 1286 | - | |
| 1287 | -/***/ }), | |
| 1288 | - | |
| 1289 | -/***/ "../modules/web-cli/assets/js/modules/command-base.js": | |
| 1290 | -/*!************************************************************!*\ | |
| 1291 | - !*** ../modules/web-cli/assets/js/modules/command-base.js ***! | |
| 1292 | - \************************************************************/ | |
| 1293 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1294 | - | |
| 1295 | -"use strict"; | |
| 1296 | - | |
| 1297 | - | |
| 1298 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1299 | -Object.defineProperty(exports, "__esModule", ({ | |
| 1300 | - value: true | |
| 1301 | -})); | |
| 1302 | -exports["default"] = void 0; | |
| 1303 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 1304 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 1305 | -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 1306 | -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 1307 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1308 | -var _commandInfra = _interopRequireDefault(__webpack_require__(/*! ./command-infra */ "../modules/web-cli/assets/js/modules/command-infra.js")); | |
| 1309 | -var _deprecation = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/deprecation */ "../modules/web-cli/assets/js/utils/deprecation.js")); | |
| 1310 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 1311 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 1427 | +//#endregion | |
| 1428 | +//#region modules/web-cli/assets/js/utils/deprecation.js | |
| 1312 | 1429 | /** |
| 1313 | - * @name $e.modules.CommandBase | |
| 1314 | - */ | |
| 1315 | -var CommandBase = exports["default"] = /*#__PURE__*/function (_CommandInfra) { | |
| 1316 | - function CommandBase() { | |
| 1317 | - (0, _classCallCheck2.default)(this, CommandBase); | |
| 1318 | - return _callSuper(this, CommandBase, arguments); | |
| 1319 | - } | |
| 1320 | - (0, _inherits2.default)(CommandBase, _CommandInfra); | |
| 1321 | - return (0, _createClass2.default)(CommandBase, [{ | |
| 1322 | - key: "onBeforeRun", | |
| 1323 | - value: function onBeforeRun() { | |
| 1324 | - var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 1325 | - $e.hooks.runUIBefore(this.command, args); | |
| 1326 | - } | |
| 1327 | - }, { | |
| 1328 | - key: "onAfterRun", | |
| 1329 | - value: function onAfterRun() { | |
| 1330 | - var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 1331 | - var result = arguments.length > 1 ? arguments[1] : undefined; | |
| 1332 | - $e.hooks.runUIAfter(this.command, args, result); | |
| 1333 | - } | |
| 1334 | - }, { | |
| 1335 | - key: "onBeforeApply", | |
| 1336 | - value: function onBeforeApply() { | |
| 1337 | - var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 1338 | - $e.hooks.runDataDependency(this.command, args); | |
| 1339 | - } | |
| 1340 | - }, { | |
| 1341 | - key: "onAfterApply", | |
| 1342 | - value: function onAfterApply() { | |
| 1343 | - var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 1344 | - var result = arguments.length > 1 ? arguments[1] : undefined; | |
| 1345 | - return $e.hooks.runDataAfter(this.command, args, result); | |
| 1346 | - } | |
| 1347 | - }, { | |
| 1348 | - key: "onCatchApply", | |
| 1349 | - value: function onCatchApply(e) { | |
| 1350 | - this.runCatchHooks(e); | |
| 1351 | - } | |
| 1430 | + * @typedef {Object} Version | |
| 1431 | + * @property {number} major1 The first number | |
| 1432 | + * @property {number} major2 The second number | |
| 1433 | + * @property {number} minor The third number | |
| 1434 | + * @property {string} build The fourth number | |
| 1435 | + */ | |
| 1436 | + var softDeprecated = function softDeprecated(name, version, replacement) { | |
| 1437 | + if (elementorWebCliConfig.isDebug) deprecatedMessage("soft", name, version, replacement); | |
| 1438 | + }; | |
| 1439 | + var hardDeprecated = function hardDeprecated(name, version, replacement) { | |
| 1440 | + deprecatedMessage("hard", name, version, replacement); | |
| 1441 | + }; | |
| 1442 | + var deprecatedMessage = function deprecatedMessage(type, name, version, replacement) { | |
| 1443 | + var message = "`".concat(name, "` is ").concat(type, " deprecated since ").concat(version); | |
| 1444 | + if (replacement) message += " - Use `".concat(replacement, "` instead"); | |
| 1445 | + Console.warn(message); | |
| 1446 | + }; | |
| 1447 | + var Deprecation = /*#__PURE__*/ function() { | |
| 1448 | + function Deprecation() { | |
| 1449 | + _classCallCheck(this, Deprecation); | |
| 1450 | + } | |
| 1451 | + return _createClass(Deprecation, null, [ | |
| 1452 | + { | |
| 1453 | + key: "deprecated", | |
| 1454 | + value: function deprecated(name, version, replacement) { | |
| 1455 | + if (this.isHardDeprecated(version)) hardDeprecated(name, version, replacement); | |
| 1456 | + else softDeprecated(name, version, replacement); | |
| 1457 | + } | |
| 1458 | + }, | |
| 1459 | + { | |
| 1460 | + key: "parseVersion", | |
| 1461 | + value: function parseVersion(version) { | |
| 1462 | + var versionParts = version.split("."); | |
| 1463 | + if (versionParts.length < 3 || versionParts.length > 4) throw new RangeError("Invalid Semantic Version string provided"); | |
| 1464 | + var _versionParts = _slicedToArray(versionParts, 4); | |
| 1465 | + var major1 = _versionParts[0]; | |
| 1466 | + var major2 = _versionParts[1]; | |
| 1467 | + var minor = _versionParts[2]; | |
| 1468 | + var _versionParts$ = _versionParts[3]; | |
| 1469 | + return { | |
| 1470 | + major1: parseInt(major1), | |
| 1471 | + major2: parseInt(major2), | |
| 1472 | + minor: parseInt(minor), | |
| 1473 | + build: _versionParts$ === void 0 ? "" : _versionParts$ | |
| 1474 | + }; | |
| 1475 | + } | |
| 1476 | + }, | |
| 1477 | + { | |
| 1478 | + key: "getTotalMajor", | |
| 1479 | + value: function getTotalMajor(versionObj) { | |
| 1480 | + var total = parseInt("".concat(versionObj.major1).concat(versionObj.major2, "0")); | |
| 1481 | + total = Number((total / 10).toFixed(0)); | |
| 1482 | + if (versionObj.major2 > 9) total = versionObj.major2 - 9; | |
| 1483 | + return total; | |
| 1484 | + } | |
| 1485 | + }, | |
| 1486 | + { | |
| 1487 | + key: "compareVersion", | |
| 1488 | + value: function compareVersion(version1, version2) { | |
| 1489 | + var _this = this; | |
| 1490 | + return [this.parseVersion(version1), this.parseVersion(version2)].map(function(versionObj) { | |
| 1491 | + return _this.getTotalMajor(versionObj); | |
| 1492 | + }).reduce(function(acc, major) { | |
| 1493 | + return acc - major; | |
| 1494 | + }); | |
| 1495 | + } | |
| 1496 | + }, | |
| 1497 | + { | |
| 1498 | + key: "isSoftDeprecated", | |
| 1499 | + value: function isSoftDeprecated(version) { | |
| 1500 | + return this.compareVersion(version, elementorWebCliConfig.version) <= 4; | |
| 1501 | + } | |
| 1502 | + }, | |
| 1503 | + { | |
| 1504 | + key: "isHardDeprecated", | |
| 1505 | + value: function isHardDeprecated(version) { | |
| 1506 | + var total = this.compareVersion(version, elementorWebCliConfig.version); | |
| 1507 | + return total < 0 || total >= 8; | |
| 1508 | + } | |
| 1509 | + } | |
| 1510 | + ]); | |
| 1511 | + }(); | |
| 1352 | 1512 | |
| 1353 | - /** | |
| 1354 | - * Run all the catch hooks. | |
| 1355 | - * | |
| 1356 | - * @param {Error} e | |
| 1357 | - */ | |
| 1358 | - }, { | |
| 1359 | - key: "runCatchHooks", | |
| 1360 | - value: function runCatchHooks(e) { | |
| 1361 | - $e.hooks.runDataCatch(this.command, this.args, e); | |
| 1362 | - $e.hooks.runUICatch(this.command, this.args, e); | |
| 1363 | - } | |
| 1513 | +//#endregion | |
| 1514 | +//#region modules/web-cli/assets/js/modules/command-infra.js | |
| 1515 | + function _callSuper$9(t, o, e) { | |
| 1516 | + return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$9() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 1517 | + } | |
| 1518 | + __name(_callSuper$9, "_callSuper"); | |
| 1519 | + function _isNativeReflectConstruct$9() { | |
| 1520 | + try { | |
| 1521 | + var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 1522 | + } catch (t) {} | |
| 1523 | + return (_isNativeReflectConstruct$9 = function _isNativeReflectConstruct() { | |
| 1524 | + return !!t; | |
| 1525 | + })(); | |
| 1526 | + } | |
| 1527 | + __name(_isNativeReflectConstruct$9, "_isNativeReflectConstruct"); | |
| 1528 | + /** | |
| 1529 | + * @typedef {import('../modules/component-base')} ComponentBase | |
| 1530 | + */ | |
| 1531 | + var CommandInfra = /*#__PURE__*/ function(_ArgsObject) { | |
| 1532 | + /** | |
| 1533 | + * Function constructor(). | |
| 1534 | + * | |
| 1535 | + * Create Commands Base. | |
| 1536 | + * | |
| 1537 | + * @param {{}} args | |
| 1538 | + */ | |
| 1539 | + function CommandInfra() { | |
| 1540 | + var _this; | |
| 1541 | + var args = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; | |
| 1542 | + _classCallCheck(this, CommandInfra); | |
| 1543 | + _this = _callSuper$9(this, CommandInfra, [args]); | |
| 1544 | + if (!_this.constructor.registerConfig) throw RangeError("Doing it wrong: Each command type should have `registerConfig`."); | |
| 1545 | + _this.command = _this.constructor.getCommand(); | |
| 1546 | + _this.component = _this.constructor.getComponent(); | |
| 1547 | + _this.initialize(args); | |
| 1548 | + args = _this.args; | |
| 1549 | + _this.validateArgs(args); | |
| 1550 | + return _this; | |
| 1551 | + } | |
| 1552 | + /** | |
| 1553 | + * Function initialize(). | |
| 1554 | + * | |
| 1555 | + * Initialize command, called after construction. | |
| 1556 | + * | |
| 1557 | + * @param {{}} args | |
| 1558 | + */ | |
| 1559 | + _inherits(CommandInfra, _ArgsObject); | |
| 1560 | + return _createClass(CommandInfra, [ | |
| 1561 | + { | |
| 1562 | + key: "currentCommand", | |
| 1563 | + get: function get() { | |
| 1564 | + Deprecation.deprecated("this.currentCommand", "3.7.0", "this.command"); | |
| 1565 | + return this.command; | |
| 1566 | + } | |
| 1567 | + }, | |
| 1568 | + { | |
| 1569 | + key: "initialize", | |
| 1570 | + value: function initialize() { | |
| 1571 | + arguments.length > 0 && arguments[0] !== void 0 && arguments[0]; | |
| 1572 | + } | |
| 1573 | + }, | |
| 1574 | + { | |
| 1575 | + key: "validateArgs", | |
| 1576 | + value: function validateArgs() { | |
| 1577 | + arguments.length > 0 && arguments[0] !== void 0 && arguments[0]; | |
| 1578 | + } | |
| 1579 | + }, | |
| 1580 | + { | |
| 1581 | + key: "apply", | |
| 1582 | + value: function apply() { | |
| 1583 | + arguments.length > 0 && arguments[0] !== void 0 && arguments[0]; | |
| 1584 | + elementorModules.ForceMethodImplementation(); | |
| 1585 | + } | |
| 1586 | + }, | |
| 1587 | + { | |
| 1588 | + key: "run", | |
| 1589 | + value: function run() { | |
| 1590 | + return this.apply(this.args); | |
| 1591 | + } | |
| 1592 | + }, | |
| 1593 | + { | |
| 1594 | + key: "onBeforeRun", | |
| 1595 | + value: function onBeforeRun() { | |
| 1596 | + arguments.length > 0 && arguments[0] !== void 0 && arguments[0]; | |
| 1597 | + } | |
| 1598 | + }, | |
| 1599 | + { | |
| 1600 | + key: "onAfterRun", | |
| 1601 | + value: function onAfterRun() { | |
| 1602 | + arguments.length > 0 && arguments[0] !== void 0 && arguments[0]; | |
| 1603 | + arguments.length > 1 && arguments[1]; | |
| 1604 | + } | |
| 1605 | + }, | |
| 1606 | + { | |
| 1607 | + key: "onBeforeApply", | |
| 1608 | + value: function onBeforeApply() { | |
| 1609 | + arguments.length > 0 && arguments[0] !== void 0 && arguments[0]; | |
| 1610 | + } | |
| 1611 | + }, | |
| 1612 | + { | |
| 1613 | + key: "onAfterApply", | |
| 1614 | + value: function onAfterApply() { | |
| 1615 | + arguments.length > 0 && arguments[0] !== void 0 && arguments[0]; | |
| 1616 | + arguments.length > 1 && arguments[1]; | |
| 1617 | + } | |
| 1618 | + }, | |
| 1619 | + { | |
| 1620 | + key: "onCatchApply", | |
| 1621 | + value: function onCatchApply(e) {} | |
| 1622 | + } | |
| 1623 | + ], [ | |
| 1624 | + { | |
| 1625 | + key: "getInstanceType", | |
| 1626 | + value: function getInstanceType() { | |
| 1627 | + return "CommandInfra"; | |
| 1628 | + } | |
| 1629 | + }, | |
| 1630 | + { | |
| 1631 | + key: "getInfo", | |
| 1632 | + value: function getInfo() { | |
| 1633 | + return {}; | |
| 1634 | + } | |
| 1635 | + }, | |
| 1636 | + { | |
| 1637 | + key: "getCommand", | |
| 1638 | + value: function getCommand() { | |
| 1639 | + return this.registerConfig.command; | |
| 1640 | + } | |
| 1641 | + }, | |
| 1642 | + { | |
| 1643 | + key: "getComponent", | |
| 1644 | + value: function getComponent() { | |
| 1645 | + return this.registerConfig.component; | |
| 1646 | + } | |
| 1647 | + }, | |
| 1648 | + { | |
| 1649 | + key: "setRegisterConfig", | |
| 1650 | + value: function setRegisterConfig(config) { | |
| 1651 | + this.registerConfig = Object.freeze(config); | |
| 1652 | + } | |
| 1653 | + } | |
| 1654 | + ]); | |
| 1655 | + }(ArgsObject); | |
| 1656 | + /** | |
| 1657 | + * @type {Object} | |
| 1658 | + */ | |
| 1659 | + _defineProperty(CommandInfra, "registerConfig", null); | |
| 1364 | 1660 | |
| 1365 | - /** | |
| 1366 | - * TODO - Remove - Backwards compatibility. | |
| 1367 | - * | |
| 1368 | - * Function requireContainer(). | |
| 1369 | - * | |
| 1370 | - * Validate `arg.container` & `arg.containers`. | |
| 1371 | - * | |
| 1372 | - * @param {{}} args | |
| 1373 | - * @deprecated since 3.7.0, extend `$e.modules.editor.CommandContainerBase` or `$e.modules.editor.CommandContainerInternalBase` instead. | |
| 1374 | - * | |
| 1375 | - * @throws {Error} | |
| 1376 | - */ | |
| 1377 | - }, { | |
| 1378 | - key: "requireContainer", | |
| 1379 | - value: function requireContainer() { | |
| 1380 | - var _this = this; | |
| 1381 | - var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.args; | |
| 1382 | - _deprecation.default.deprecated('requireContainer()', '3.7.0', 'Extend `$e.modules.editor.CommandContainerBase` or `$e.modules.editor.CommandContainerInternalBase`'); | |
| 1383 | - if (!args.container && !args.containers) { | |
| 1384 | - throw Error('container or containers are required.'); | |
| 1385 | - } | |
| 1386 | - if (args.container && args.containers) { | |
| 1387 | - throw Error('container and containers cannot go together please select one of them.'); | |
| 1388 | - } | |
| 1389 | - var containers = args.containers || [args.container]; | |
| 1390 | - containers.forEach(function (container) { | |
| 1391 | - _this.requireArgumentInstance('container', elementorModules.editor.Container, { | |
| 1392 | - container: container | |
| 1393 | - }); | |
| 1394 | - }); | |
| 1395 | - } | |
| 1396 | - }], [{ | |
| 1397 | - key: "getInstanceType", | |
| 1398 | - value: function getInstanceType() { | |
| 1399 | - return 'CommandBase'; | |
| 1400 | - } | |
| 1401 | - }]); | |
| 1402 | -}(_commandInfra.default); | |
| 1661 | +//#endregion | |
| 1662 | +//#region modules/web-cli/assets/js/modules/command-base.js | |
| 1663 | + function _callSuper$8(t, o, e) { | |
| 1664 | + return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$8() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 1665 | + } | |
| 1666 | + __name(_callSuper$8, "_callSuper"); | |
| 1667 | + function _isNativeReflectConstruct$8() { | |
| 1668 | + try { | |
| 1669 | + var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 1670 | + } catch (t) {} | |
| 1671 | + return (_isNativeReflectConstruct$8 = function _isNativeReflectConstruct() { | |
| 1672 | + return !!t; | |
| 1673 | + })(); | |
| 1674 | + } | |
| 1675 | + __name(_isNativeReflectConstruct$8, "_isNativeReflectConstruct"); | |
| 1676 | + /** | |
| 1677 | + * @name $e.modules.CommandBase | |
| 1678 | + */ | |
| 1679 | + var CommandBase = /*#__PURE__*/ function(_CommandInfra) { | |
| 1680 | + function CommandBase() { | |
| 1681 | + _classCallCheck(this, CommandBase); | |
| 1682 | + return _callSuper$8(this, CommandBase, arguments); | |
| 1683 | + } | |
| 1684 | + _inherits(CommandBase, _CommandInfra); | |
| 1685 | + return _createClass(CommandBase, [ | |
| 1686 | + { | |
| 1687 | + key: "onBeforeRun", | |
| 1688 | + value: function onBeforeRun() { | |
| 1689 | + var args = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; | |
| 1690 | + $e.hooks.runUIBefore(this.command, args); | |
| 1691 | + } | |
| 1692 | + }, | |
| 1693 | + { | |
| 1694 | + key: "onAfterRun", | |
| 1695 | + value: function onAfterRun() { | |
| 1696 | + var args = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; | |
| 1697 | + var result = arguments.length > 1 ? arguments[1] : void 0; | |
| 1698 | + $e.hooks.runUIAfter(this.command, args, result); | |
| 1699 | + } | |
| 1700 | + }, | |
| 1701 | + { | |
| 1702 | + key: "onBeforeApply", | |
| 1703 | + value: function onBeforeApply() { | |
| 1704 | + var args = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; | |
| 1705 | + $e.hooks.runDataDependency(this.command, args); | |
| 1706 | + } | |
| 1707 | + }, | |
| 1708 | + { | |
| 1709 | + key: "onAfterApply", | |
| 1710 | + value: function onAfterApply() { | |
| 1711 | + var args = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; | |
| 1712 | + var result = arguments.length > 1 ? arguments[1] : void 0; | |
| 1713 | + return $e.hooks.runDataAfter(this.command, args, result); | |
| 1714 | + } | |
| 1715 | + }, | |
| 1716 | + { | |
| 1717 | + key: "onCatchApply", | |
| 1718 | + value: function onCatchApply(e) { | |
| 1719 | + this.runCatchHooks(e); | |
| 1720 | + } | |
| 1721 | + }, | |
| 1722 | + { | |
| 1723 | + key: "runCatchHooks", | |
| 1724 | + value: function runCatchHooks(e) { | |
| 1725 | + $e.hooks.runDataCatch(this.command, this.args, e); | |
| 1726 | + $e.hooks.runUICatch(this.command, this.args, e); | |
| 1727 | + } | |
| 1728 | + }, | |
| 1729 | + { | |
| 1730 | + key: "requireContainer", | |
| 1731 | + value: function requireContainer() { | |
| 1732 | + var _this = this; | |
| 1733 | + var args = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.args; | |
| 1734 | + Deprecation.deprecated("requireContainer()", "3.7.0", "Extend `$e.modules.editor.CommandContainerBase` or `$e.modules.editor.CommandContainerInternalBase`"); | |
| 1735 | + if (!args.container && !args.containers) throw Error("container or containers are required."); | |
| 1736 | + if (args.container && args.containers) throw Error("container and containers cannot go together please select one of them."); | |
| 1737 | + (args.containers || [args.container]).forEach(function(container) { | |
| 1738 | + _this.requireArgumentInstance("container", elementorModules.editor.Container, { container }); | |
| 1739 | + }); | |
| 1740 | + } | |
| 1741 | + } | |
| 1742 | + ], [{ | |
| 1743 | + key: "getInstanceType", | |
| 1744 | + value: function getInstanceType() { | |
| 1745 | + return "CommandBase"; | |
| 1746 | + } | |
| 1747 | + }]); | |
| 1748 | + }(CommandInfra); | |
| 1403 | 1749 | |
| 1404 | -/***/ }), | |
| 1750 | +//#endregion | |
| 1751 | +//#region modules/web-cli/assets/js/modules/command-callback-base.js | |
| 1752 | + function _callSuper$7(t, o, e) { | |
| 1753 | + return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$7() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 1754 | + } | |
| 1755 | + __name(_callSuper$7, "_callSuper"); | |
| 1756 | + function _isNativeReflectConstruct$7() { | |
| 1757 | + try { | |
| 1758 | + var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 1759 | + } catch (t) {} | |
| 1760 | + return (_isNativeReflectConstruct$7 = function _isNativeReflectConstruct() { | |
| 1761 | + return !!t; | |
| 1762 | + })(); | |
| 1763 | + } | |
| 1764 | + __name(_isNativeReflectConstruct$7, "_isNativeReflectConstruct"); | |
| 1765 | + /** | |
| 1766 | + * To support pure callbacks in the API(commands.js), to ensure they have registered with the proper context. | |
| 1767 | + */ | |
| 1768 | + var CommandCallbackBase = /*#__PURE__*/ function(_CommandBase) { | |
| 1769 | + function CommandCallbackBase() { | |
| 1770 | + _classCallCheck(this, CommandCallbackBase); | |
| 1771 | + return _callSuper$7(this, CommandCallbackBase, arguments); | |
| 1772 | + } | |
| 1773 | + _inherits(CommandCallbackBase, _CommandBase); | |
| 1774 | + return _createClass(CommandCallbackBase, [{ | |
| 1775 | + key: "apply", | |
| 1776 | + value: function apply() { | |
| 1777 | + var args = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; | |
| 1778 | + return this.constructor.getCallback()(args); | |
| 1779 | + } | |
| 1780 | + }], [{ | |
| 1781 | + key: "getInstanceType", | |
| 1782 | + value: function getInstanceType() { | |
| 1783 | + return "CommandCallbackBase"; | |
| 1784 | + } | |
| 1785 | + }, { | |
| 1786 | + key: "getCallback", | |
| 1787 | + value: function getCallback() { | |
| 1788 | + return this.registerConfig.callback; | |
| 1789 | + } | |
| 1790 | + }]); | |
| 1791 | + }(CommandBase); | |
| 1405 | 1792 | |
| 1406 | -/***/ "../modules/web-cli/assets/js/modules/command-callback-base.js": | |
| 1407 | -/*!*********************************************************************!*\ | |
| 1408 | - !*** ../modules/web-cli/assets/js/modules/command-callback-base.js ***! | |
| 1409 | - \*********************************************************************/ | |
| 1410 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1793 | +//#endregion | |
| 1794 | +//#region modules/web-cli/assets/js/utils/force-method-implementation.js | |
| 1795 | + function _callSuper$6(t, o, e) { | |
| 1796 | + return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$6() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 1797 | + } | |
| 1798 | + __name(_callSuper$6, "_callSuper"); | |
| 1799 | + function _isNativeReflectConstruct$6() { | |
| 1800 | + try { | |
| 1801 | + var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 1802 | + } catch (t) {} | |
| 1803 | + return (_isNativeReflectConstruct$6 = function _isNativeReflectConstruct() { | |
| 1804 | + return !!t; | |
| 1805 | + })(); | |
| 1806 | + } | |
| 1807 | + __name(_isNativeReflectConstruct$6, "_isNativeReflectConstruct"); | |
| 1808 | + var ForceMethodImplementation = /*#__PURE__*/ function(_Error) { | |
| 1809 | + function ForceMethodImplementation() { | |
| 1810 | + var _this; | |
| 1811 | + var info = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; | |
| 1812 | + _classCallCheck(this, ForceMethodImplementation); | |
| 1813 | + _this = _callSuper$6(this, ForceMethodImplementation, ["".concat(info.isStatic ? "static " : "").concat(info.fullName, "() should be implemented, please provide '").concat(info.functionName || info.fullName, "' functionality.")]); | |
| 1814 | + Error.captureStackTrace(_this, ForceMethodImplementation); | |
| 1815 | + return _this; | |
| 1816 | + } | |
| 1817 | + _inherits(ForceMethodImplementation, _Error); | |
| 1818 | + return _createClass(ForceMethodImplementation); | |
| 1819 | + }(/*#__PURE__*/ _wrapNativeSuper(Error)); | |
| 1820 | + var force_method_implementation_default = /* @__PURE__ */ __name((function() { | |
| 1821 | + var caller = Error().stack.split("\n")[2].trim(); | |
| 1822 | + var callerName = caller.startsWith("at new") ? "constructor" : caller.split(" ")[1]; | |
| 1823 | + var info = {}; | |
| 1824 | + info.functionName = callerName; | |
| 1825 | + info.fullName = callerName; | |
| 1826 | + if (info.functionName.includes(".")) { | |
| 1827 | + var parts = info.functionName.split("."); | |
| 1828 | + info.className = parts[0]; | |
| 1829 | + info.functionName = parts[1]; | |
| 1830 | + } else info.isStatic = true; | |
| 1831 | + throw new ForceMethodImplementation(info); | |
| 1832 | + }), "default"); | |
| 1411 | 1833 | |
| 1412 | -"use strict"; | |
| 1834 | +//#endregion | |
| 1835 | +//#region modules/web-cli/assets/js/modules/component-base.js | |
| 1836 | + function ownKeys(e, r) { | |
| 1837 | + var t = Object.keys(e); | |
| 1838 | + if (Object.getOwnPropertySymbols) { | |
| 1839 | + var o = Object.getOwnPropertySymbols(e); | |
| 1840 | + r && (o = o.filter(function(r) { | |
| 1841 | + return Object.getOwnPropertyDescriptor(e, r).enumerable; | |
| 1842 | + })), t.push.apply(t, o); | |
| 1843 | + } | |
| 1844 | + return t; | |
| 1845 | + } | |
| 1846 | + function _objectSpread(e) { | |
| 1847 | + for (var r = 1; r < arguments.length; r++) { | |
| 1848 | + var t = null != arguments[r] ? arguments[r] : {}; | |
| 1849 | + r % 2 ? ownKeys(Object(t), !0).forEach(function(r) { | |
| 1850 | + _defineProperty(e, r, t[r]); | |
| 1851 | + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r) { | |
| 1852 | + Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); | |
| 1853 | + }); | |
| 1854 | + } | |
| 1855 | + return e; | |
| 1856 | + } | |
| 1857 | + function _callSuper$5(t, o, e) { | |
| 1858 | + return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$5() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 1859 | + } | |
| 1860 | + __name(_callSuper$5, "_callSuper"); | |
| 1861 | + function _isNativeReflectConstruct$5() { | |
| 1862 | + try { | |
| 1863 | + var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 1864 | + } catch (t) {} | |
| 1865 | + return (_isNativeReflectConstruct$5 = function _isNativeReflectConstruct() { | |
| 1866 | + return !!t; | |
| 1867 | + })(); | |
| 1868 | + } | |
| 1869 | + __name(_isNativeReflectConstruct$5, "_isNativeReflectConstruct"); | |
| 1870 | + /** | |
| 1871 | + * @typedef {import('./command-infra')} CommandInfra | |
| 1872 | + * @typedef {import('./hook-base')} HookBase | |
| 1873 | + * @typedef {import('../core/states/ui-state-base')} UiStateBase | |
| 1874 | + */ | |
| 1875 | + var ComponentBase = /*#__PURE__*/ function(_Module) { | |
| 1876 | + function ComponentBase() { | |
| 1877 | + _classCallCheck(this, ComponentBase); | |
| 1878 | + return _callSuper$5(this, ComponentBase, arguments); | |
| 1879 | + } | |
| 1880 | + _inherits(ComponentBase, _Module); | |
| 1881 | + return _createClass(ComponentBase, [ | |
| 1882 | + { | |
| 1883 | + key: "__construct", | |
| 1884 | + value: function __construct() { | |
| 1885 | + var args = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; | |
| 1886 | + if (args.manager) this.manager = args.manager; | |
| 1887 | + this.commands = this.defaultCommands(); | |
| 1888 | + this.commandsInternal = this.defaultCommandsInternal(); | |
| 1889 | + this.hooks = this.defaultHooks(); | |
| 1890 | + this.routes = this.defaultRoutes(); | |
| 1891 | + this.tabs = this.defaultTabs(); | |
| 1892 | + this.shortcuts = this.defaultShortcuts(); | |
| 1893 | + this.utils = this.defaultUtils(); | |
| 1894 | + this.data = this.defaultData(); | |
| 1895 | + this.uiStates = this.defaultUiStates(); | |
| 1896 | + this.states = this.defaultStates(); | |
| 1897 | + this.defaultRoute = ""; | |
| 1898 | + this.currentTab = ""; | |
| 1899 | + } | |
| 1900 | + }, | |
| 1901 | + { | |
| 1902 | + key: "registerAPI", | |
| 1903 | + value: function registerAPI() { | |
| 1904 | + var _this = this; | |
| 1905 | + Object.entries(this.getTabs()).forEach(function(tab) { | |
| 1906 | + return _this.registerTabRoute(tab[0]); | |
| 1907 | + }); | |
| 1908 | + Object.entries(this.getRoutes()).forEach(function(_ref) { | |
| 1909 | + var _ref2 = _slicedToArray(_ref, 2); | |
| 1910 | + var route = _ref2[0]; | |
| 1911 | + var callback = _ref2[1]; | |
| 1912 | + return _this.registerRoute(route, callback); | |
| 1913 | + }); | |
| 1914 | + Object.entries(this.getCommands()).forEach(function(_ref3) { | |
| 1915 | + var _ref4 = _slicedToArray(_ref3, 2); | |
| 1916 | + var command = _ref4[0]; | |
| 1917 | + var callback = _ref4[1]; | |
| 1918 | + return _this.registerCommand(command, callback); | |
| 1919 | + }); | |
| 1920 | + Object.entries(this.getCommandsInternal()).forEach(function(_ref5) { | |
| 1921 | + var _ref6 = _slicedToArray(_ref5, 2); | |
| 1922 | + var command = _ref6[0]; | |
| 1923 | + var callback = _ref6[1]; | |
| 1924 | + return _this.registerCommandInternal(command, callback); | |
| 1925 | + }); | |
| 1926 | + Object.values(this.getHooks()).forEach(function(instance) { | |
| 1927 | + return _this.registerHook(instance); | |
| 1928 | + }); | |
| 1929 | + Object.entries(this.getData()).forEach(function(_ref7) { | |
| 1930 | + var _ref8 = _slicedToArray(_ref7, 2); | |
| 1931 | + var command = _ref8[0]; | |
| 1932 | + var callback = _ref8[1]; | |
| 1933 | + return _this.registerData(command, callback); | |
| 1934 | + }); | |
| 1935 | + Object.values(this.getUiStates()).forEach(function(instance) { | |
| 1936 | + return _this.registerUiState(instance); | |
| 1937 | + }); | |
| 1938 | + Object.entries(this.getStates()).forEach(function(_ref9) { | |
| 1939 | + var _ref0 = _slicedToArray(_ref9, 2); | |
| 1940 | + var id = _ref0[0]; | |
| 1941 | + var state = _ref0[1]; | |
| 1942 | + return _this.registerState(id, state); | |
| 1943 | + }); | |
| 1944 | + } | |
| 1945 | + }, | |
| 1946 | + { | |
| 1947 | + key: "getNamespace", | |
| 1948 | + value: function getNamespace() { | |
| 1949 | + force_method_implementation_default(); | |
| 1950 | + } | |
| 1951 | + }, | |
| 1952 | + { | |
| 1953 | + key: "getRootContainer", | |
| 1954 | + value: function getRootContainer() { | |
| 1955 | + Deprecation.deprecated("getRootContainer()", "3.7.0", "getServiceName()"); | |
| 1956 | + return this.getServiceName(); | |
| 1957 | + } | |
| 1958 | + }, | |
| 1959 | + { | |
| 1960 | + key: "getServiceName", | |
| 1961 | + value: function getServiceName() { | |
| 1962 | + return this.getNamespace().split("/")[0]; | |
| 1963 | + } | |
| 1964 | + }, | |
| 1965 | + { | |
| 1966 | + key: "store", | |
| 1967 | + get: function get() { | |
| 1968 | + return $e.store.get(this.getNamespace()); | |
| 1969 | + } | |
| 1970 | + }, | |
| 1971 | + { | |
| 1972 | + key: "defaultTabs", | |
| 1973 | + value: function defaultTabs() { | |
| 1974 | + return {}; | |
| 1975 | + } | |
| 1976 | + }, | |
| 1977 | + { | |
| 1978 | + key: "defaultRoutes", | |
| 1979 | + value: function defaultRoutes() { | |
| 1980 | + return {}; | |
| 1981 | + } | |
| 1982 | + }, | |
| 1983 | + { | |
| 1984 | + key: "defaultCommands", | |
| 1985 | + value: function defaultCommands() { | |
| 1986 | + return {}; | |
| 1987 | + } | |
| 1988 | + }, | |
| 1989 | + { | |
| 1990 | + key: "defaultCommandsInternal", | |
| 1991 | + value: function defaultCommandsInternal() { | |
| 1992 | + return {}; | |
| 1993 | + } | |
| 1994 | + }, | |
| 1995 | + { | |
| 1996 | + key: "defaultHooks", | |
| 1997 | + value: function defaultHooks() { | |
| 1998 | + return {}; | |
| 1999 | + } | |
| 2000 | + }, | |
| 2001 | + { | |
| 2002 | + key: "defaultUiStates", | |
| 2003 | + value: function defaultUiStates() { | |
| 2004 | + return {}; | |
| 2005 | + } | |
| 2006 | + }, | |
| 2007 | + { | |
| 2008 | + key: "defaultStates", | |
| 2009 | + value: function defaultStates() { | |
| 2010 | + return {}; | |
| 2011 | + } | |
| 2012 | + }, | |
| 2013 | + { | |
| 2014 | + key: "defaultShortcuts", | |
| 2015 | + value: function defaultShortcuts() { | |
| 2016 | + return {}; | |
| 2017 | + } | |
| 2018 | + }, | |
| 2019 | + { | |
| 2020 | + key: "defaultUtils", | |
| 2021 | + value: function defaultUtils() { | |
| 2022 | + return {}; | |
| 2023 | + } | |
| 2024 | + }, | |
| 2025 | + { | |
| 2026 | + key: "defaultData", | |
| 2027 | + value: function defaultData() { | |
| 2028 | + return {}; | |
| 2029 | + } | |
| 2030 | + }, | |
| 2031 | + { | |
| 2032 | + key: "getCommands", | |
| 2033 | + value: function getCommands() { | |
| 2034 | + return this.commands; | |
| 2035 | + } | |
| 2036 | + }, | |
| 2037 | + { | |
| 2038 | + key: "getCommandsInternal", | |
| 2039 | + value: function getCommandsInternal() { | |
| 2040 | + return this.commandsInternal; | |
| 2041 | + } | |
| 2042 | + }, | |
| 2043 | + { | |
| 2044 | + key: "getHooks", | |
| 2045 | + value: function getHooks() { | |
| 2046 | + return this.hooks; | |
| 2047 | + } | |
| 2048 | + }, | |
| 2049 | + { | |
| 2050 | + key: "getUiStates", | |
| 2051 | + value: function getUiStates() { | |
| 2052 | + return this.uiStates; | |
| 2053 | + } | |
| 2054 | + }, | |
| 2055 | + { | |
| 2056 | + key: "getStates", | |
| 2057 | + value: function getStates() { | |
| 2058 | + return this.states; | |
| 2059 | + } | |
| 2060 | + }, | |
| 2061 | + { | |
| 2062 | + key: "getRoutes", | |
| 2063 | + value: function getRoutes() { | |
| 2064 | + return this.routes; | |
| 2065 | + } | |
| 2066 | + }, | |
| 2067 | + { | |
| 2068 | + key: "getTabs", | |
| 2069 | + value: function getTabs() { | |
| 2070 | + return this.tabs; | |
| 2071 | + } | |
| 2072 | + }, | |
| 2073 | + { | |
| 2074 | + key: "getShortcuts", | |
| 2075 | + value: function getShortcuts() { | |
| 2076 | + return this.shortcuts; | |
| 2077 | + } | |
| 2078 | + }, | |
| 2079 | + { | |
| 2080 | + key: "getData", | |
| 2081 | + value: function getData() { | |
| 2082 | + return this.data; | |
| 2083 | + } | |
| 2084 | + }, | |
| 2085 | + { | |
| 2086 | + key: "registerCommand", | |
| 2087 | + value: function registerCommand(command, context) { | |
| 2088 | + var commandsType = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "default"; | |
| 2089 | + var commandsManager; | |
| 2090 | + switch (commandsType) { | |
| 2091 | + case "default": | |
| 2092 | + commandsManager = $e.commands; | |
| 2093 | + break; | |
| 2094 | + case "internal": | |
| 2095 | + commandsManager = $e.commandsInternal; | |
| 2096 | + break; | |
| 2097 | + case "data": | |
| 2098 | + commandsManager = $e.data; | |
| 2099 | + break; | |
| 2100 | + default: throw new Error("Invalid commands type: '".concat(command, "'")); | |
| 2101 | + } | |
| 2102 | + var fullCommand = this.getNamespace() + "/" + command; | |
| 2103 | + var instanceType = context.getInstanceType ? context.getInstanceType() : false; | |
| 2104 | + var registerConfig = { | |
| 2105 | + command: fullCommand, | |
| 2106 | + component: this | |
| 2107 | + }; | |
| 2108 | + if (!instanceType) { | |
| 2109 | + if ($e.devTools) $e.devTools.log.warn("Attach command-callback-base, on command: '".concat(fullCommand, "', context is unknown type.")); | |
| 2110 | + registerConfig.callback = context; | |
| 2111 | + context = /*#__PURE__*/ function(_CommandCallbackBase) { | |
| 2112 | + function context() { | |
| 2113 | + _classCallCheck(this, context); | |
| 2114 | + return _callSuper$5(this, context, arguments); | |
| 2115 | + } | |
| 2116 | + _inherits(context, _CommandCallbackBase); | |
| 2117 | + return _createClass(context); | |
| 2118 | + }(CommandCallbackBase); | |
| 2119 | + } | |
| 2120 | + context.setRegisterConfig(registerConfig); | |
| 2121 | + commandsManager.register(this, command, context); | |
| 2122 | + } | |
| 2123 | + }, | |
| 2124 | + { | |
| 2125 | + key: "registerHook", | |
| 2126 | + value: function registerHook(instance) { | |
| 2127 | + return instance.register(); | |
| 2128 | + } | |
| 2129 | + }, | |
| 2130 | + { | |
| 2131 | + key: "registerCommandInternal", | |
| 2132 | + value: function registerCommandInternal(command, context) { | |
| 2133 | + this.registerCommand(command, context, "internal"); | |
| 2134 | + } | |
| 2135 | + }, | |
| 2136 | + { | |
| 2137 | + key: "registerUiState", | |
| 2138 | + value: function registerUiState(instance) { | |
| 2139 | + $e.uiStates.register(instance); | |
| 2140 | + } | |
| 2141 | + }, | |
| 2142 | + { | |
| 2143 | + key: "registerState", | |
| 2144 | + value: function registerState(id, stateConfig) { | |
| 2145 | + id = this.getNamespace() + (id ? "/".concat(id) : ""); | |
| 2146 | + var slice = (0, _reduxjs_toolkit.createSlice)(_objectSpread(_objectSpread({}, stateConfig), {}, { name: id })); | |
| 2147 | + $e.store.register(id, slice); | |
| 2148 | + } | |
| 2149 | + }, | |
| 2150 | + { | |
| 2151 | + key: "registerRoute", | |
| 2152 | + value: function registerRoute(route, callback) { | |
| 2153 | + $e.routes.register(this, route, callback); | |
| 2154 | + } | |
| 2155 | + }, | |
| 2156 | + { | |
| 2157 | + key: "registerData", | |
| 2158 | + value: function registerData(command, context) { | |
| 2159 | + this.registerCommand(command, context, "data"); | |
| 2160 | + } | |
| 2161 | + }, | |
| 2162 | + { | |
| 2163 | + key: "unregisterRoute", | |
| 2164 | + value: function unregisterRoute(route) { | |
| 2165 | + $e.routes.unregister(this, route); | |
| 2166 | + } | |
| 2167 | + }, | |
| 2168 | + { | |
| 2169 | + key: "registerTabRoute", | |
| 2170 | + value: function registerTabRoute(tab) { | |
| 2171 | + var _this2 = this; | |
| 2172 | + this.registerRoute(tab, function(args) { | |
| 2173 | + return _this2.activateTab(tab, args); | |
| 2174 | + }); | |
| 2175 | + } | |
| 2176 | + }, | |
| 2177 | + { | |
| 2178 | + key: "dependency", | |
| 2179 | + value: function dependency() { | |
| 2180 | + return true; | |
| 2181 | + } | |
| 2182 | + }, | |
| 2183 | + { | |
| 2184 | + key: "open", | |
| 2185 | + value: function open() { | |
| 2186 | + return true; | |
| 2187 | + } | |
| 2188 | + }, | |
| 2189 | + { | |
| 2190 | + key: "close", | |
| 2191 | + value: function close() { | |
| 2192 | + if (!this.isOpen) return false; | |
| 2193 | + this.isOpen = false; | |
| 2194 | + this.inactivate(); | |
| 2195 | + $e.routes.clearCurrent(this.getNamespace()); | |
| 2196 | + $e.routes.clearHistory(this.getServiceName()); | |
| 2197 | + return true; | |
| 2198 | + } | |
| 2199 | + }, | |
| 2200 | + { | |
| 2201 | + key: "activate", | |
| 2202 | + value: function activate() { | |
| 2203 | + $e.components.activate(this.getNamespace()); | |
| 2204 | + } | |
| 2205 | + }, | |
| 2206 | + { | |
| 2207 | + key: "inactivate", | |
| 2208 | + value: function inactivate() { | |
| 2209 | + $e.components.inactivate(this.getNamespace()); | |
| 2210 | + } | |
| 2211 | + }, | |
| 2212 | + { | |
| 2213 | + key: "isActive", | |
| 2214 | + value: function isActive() { | |
| 2215 | + return $e.components.isActive(this.getNamespace()); | |
| 2216 | + } | |
| 2217 | + }, | |
| 2218 | + { | |
| 2219 | + key: "onRoute", | |
| 2220 | + value: function onRoute(route) { | |
| 2221 | + this.toggleRouteClass(route, true); | |
| 2222 | + this.toggleHistoryClass(); | |
| 2223 | + this.activate(); | |
| 2224 | + this.trigger("route/open", route); | |
| 2225 | + } | |
| 2226 | + }, | |
| 2227 | + { | |
| 2228 | + key: "onCloseRoute", | |
| 2229 | + value: function onCloseRoute(route) { | |
| 2230 | + this.toggleRouteClass(route, false); | |
| 2231 | + this.inactivate(); | |
| 2232 | + this.trigger("route/close", route); | |
| 2233 | + } | |
| 2234 | + }, | |
| 2235 | + { | |
| 2236 | + key: "setDefaultRoute", | |
| 2237 | + value: function setDefaultRoute(route) { | |
| 2238 | + this.defaultRoute = this.getNamespace() + "/" + route; | |
| 2239 | + } | |
| 2240 | + }, | |
| 2241 | + { | |
| 2242 | + key: "getDefaultRoute", | |
| 2243 | + value: function getDefaultRoute() { | |
| 2244 | + return this.defaultRoute; | |
| 2245 | + } | |
| 2246 | + }, | |
| 2247 | + { | |
| 2248 | + key: "removeTab", | |
| 2249 | + value: function removeTab(tab) { | |
| 2250 | + delete this.tabs[tab]; | |
| 2251 | + this.unregisterRoute(tab); | |
| 2252 | + } | |
| 2253 | + }, | |
| 2254 | + { | |
| 2255 | + key: "hasTab", | |
| 2256 | + value: function hasTab(tab) { | |
| 2257 | + return !!this.tabs[tab]; | |
| 2258 | + } | |
| 2259 | + }, | |
| 2260 | + { | |
| 2261 | + key: "addTab", | |
| 2262 | + value: function addTab(tab, args, position) { | |
| 2263 | + var _this3 = this; | |
| 2264 | + this.tabs[tab] = args; | |
| 2265 | + if ("undefined" !== typeof position) { | |
| 2266 | + var newTabs = {}; | |
| 2267 | + var ids = Object.keys(this.tabs); | |
| 2268 | + ids.pop(); | |
| 2269 | + ids.splice(position, 0, tab); | |
| 2270 | + ids.forEach(function(id) { | |
| 2271 | + newTabs[id] = _this3.tabs[id]; | |
| 2272 | + }); | |
| 2273 | + this.tabs = newTabs; | |
| 2274 | + } | |
| 2275 | + this.registerTabRoute(tab); | |
| 2276 | + } | |
| 2277 | + }, | |
| 2278 | + { | |
| 2279 | + key: "getTabsWrapperSelector", | |
| 2280 | + value: function getTabsWrapperSelector() { | |
| 2281 | + return ""; | |
| 2282 | + } | |
| 2283 | + }, | |
| 2284 | + { | |
| 2285 | + key: "getTabRoute", | |
| 2286 | + value: function getTabRoute(tab) { | |
| 2287 | + return this.getNamespace() + "/" + tab; | |
| 2288 | + } | |
| 2289 | + }, | |
| 2290 | + { | |
| 2291 | + key: "renderTab", | |
| 2292 | + value: function renderTab(tab) {} | |
| 2293 | + }, | |
| 2294 | + { | |
| 2295 | + key: "activateTab", | |
| 2296 | + value: function activateTab(tab, args) { | |
| 2297 | + var _this4 = this; | |
| 2298 | + this.renderTab(tab, args); | |
| 2299 | + jQuery(this.getTabsWrapperSelector() + " .elementor-component-tab").off("click").on("click", function(event) { | |
| 2300 | + $e.route(_this4.getTabRoute(event.currentTarget.dataset.tab), args); | |
| 2301 | + }).removeClass("elementor-active").filter("[data-tab=\"" + tab + "\"]").addClass("elementor-active"); | |
| 2302 | + } | |
| 2303 | + }, | |
| 2304 | + { | |
| 2305 | + key: "getActiveTabConfig", | |
| 2306 | + value: function getActiveTabConfig() { | |
| 2307 | + return this.tabs[this.currentTab] || {}; | |
| 2308 | + } | |
| 2309 | + }, | |
| 2310 | + { | |
| 2311 | + key: "getBodyClass", | |
| 2312 | + value: function getBodyClass(route) { | |
| 2313 | + return "e-route-" + route.replace(/\//g, "-"); | |
| 2314 | + } | |
| 2315 | + }, | |
| 2316 | + { | |
| 2317 | + key: "normalizeCommandName", | |
| 2318 | + value: function normalizeCommandName(commandName) { | |
| 2319 | + return commandName.replace(/[A-Z]/g, function(match, offset) { | |
| 2320 | + return (offset > 0 ? "-" : "") + match.toLowerCase(); | |
| 2321 | + }); | |
| 2322 | + } | |
| 2323 | + }, | |
| 2324 | + { | |
| 2325 | + key: "importCommands", | |
| 2326 | + value: function importCommands(commandsFromImport) { | |
| 2327 | + var _this5 = this; | |
| 2328 | + var commands = {}; | |
| 2329 | + Object.entries(commandsFromImport).forEach(function(_ref1) { | |
| 2330 | + var _ref10 = _slicedToArray(_ref1, 2); | |
| 2331 | + var className = _ref10[0]; | |
| 2332 | + var Class = _ref10[1]; | |
| 2333 | + var command = _this5.normalizeCommandName(className); | |
| 2334 | + commands[command] = Class; | |
| 2335 | + }); | |
| 2336 | + return commands; | |
| 2337 | + } | |
| 2338 | + }, | |
| 2339 | + { | |
| 2340 | + key: "importHooks", | |
| 2341 | + value: function importHooks(hooksFromImport) { | |
| 2342 | + var hooks = {}; | |
| 2343 | + for (var key in hooksFromImport) { | |
| 2344 | + var hook = new hooksFromImport[key](); | |
| 2345 | + hooks[hook.getId()] = hook; | |
| 2346 | + } | |
| 2347 | + return hooks; | |
| 2348 | + } | |
| 2349 | + }, | |
| 2350 | + { | |
| 2351 | + key: "importUiStates", | |
| 2352 | + value: function importUiStates(statesFromImport) { | |
| 2353 | + var _this6 = this; | |
| 2354 | + var uiStates = {}; | |
| 2355 | + Object.values(statesFromImport).forEach(function(className) { | |
| 2356 | + var uiState = new className(_this6); | |
| 2357 | + uiStates[uiState.getId()] = uiState; | |
| 2358 | + }); | |
| 2359 | + return uiStates; | |
| 2360 | + } | |
| 2361 | + }, | |
| 2362 | + { | |
| 2363 | + key: "setUiState", | |
| 2364 | + value: function setUiState(state, value) { | |
| 2365 | + $e.uiStates.set("".concat(this.getNamespace(), "/").concat(state), value); | |
| 2366 | + } | |
| 2367 | + }, | |
| 2368 | + { | |
| 2369 | + key: "toggleRouteClass", | |
| 2370 | + value: function toggleRouteClass(route, state) { | |
| 2371 | + document.body.classList.toggle(this.getBodyClass(route), state); | |
| 2372 | + } | |
| 2373 | + }, | |
| 2374 | + { | |
| 2375 | + key: "toggleHistoryClass", | |
| 2376 | + value: function toggleHistoryClass() { | |
| 2377 | + document.body.classList.toggle("e-routes-has-history", !!$e.routes.getHistory(this.getServiceName()).length); | |
| 2378 | + } | |
| 2379 | + } | |
| 2380 | + ]); | |
| 2381 | + }(import_module.default); | |
| 1413 | 2382 | |
| 2383 | +//#endregion | |
| 2384 | +//#region modules/web-cli/assets/js/modules/commands/close.js | |
| 2385 | + function _callSuper$4(t, o, e) { | |
| 2386 | + return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$4() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 2387 | + } | |
| 2388 | + __name(_callSuper$4, "_callSuper"); | |
| 2389 | + function _isNativeReflectConstruct$4() { | |
| 2390 | + try { | |
| 2391 | + var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 2392 | + } catch (t) {} | |
| 2393 | + return (_isNativeReflectConstruct$4 = function _isNativeReflectConstruct() { | |
| 2394 | + return !!t; | |
| 2395 | + })(); | |
| 2396 | + } | |
| 2397 | + __name(_isNativeReflectConstruct$4, "_isNativeReflectConstruct"); | |
| 2398 | + var Close = /*#__PURE__*/ function(_CommandBase) { | |
| 2399 | + function Close() { | |
| 2400 | + _classCallCheck(this, Close); | |
| 2401 | + return _callSuper$4(this, Close, arguments); | |
| 2402 | + } | |
| 2403 | + _inherits(Close, _CommandBase); | |
| 2404 | + return _createClass(Close, [{ | |
| 2405 | + key: "apply", | |
| 2406 | + value: function apply() { | |
| 2407 | + this.component.close(); | |
| 2408 | + } | |
| 2409 | + }]); | |
| 2410 | + }(CommandBase); | |
| 1414 | 2411 | |
| 1415 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1416 | -Object.defineProperty(exports, "__esModule", ({ | |
| 1417 | - value: true | |
| 1418 | -})); | |
| 1419 | -exports["default"] = void 0; | |
| 1420 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 1421 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 1422 | -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 1423 | -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 1424 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1425 | -var _commandBase = _interopRequireDefault(__webpack_require__(/*! ./command-base */ "../modules/web-cli/assets/js/modules/command-base.js")); | |
| 1426 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 1427 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 1428 | -/** | |
| 1429 | - * To support pure callbacks in the API(commands.js), to ensure they have registered with the proper context. | |
| 1430 | - */ | |
| 1431 | -var CommandCallbackBase = exports["default"] = /*#__PURE__*/function (_CommandBase) { | |
| 1432 | - function CommandCallbackBase() { | |
| 1433 | - (0, _classCallCheck2.default)(this, CommandCallbackBase); | |
| 1434 | - return _callSuper(this, CommandCallbackBase, arguments); | |
| 1435 | - } | |
| 1436 | - (0, _inherits2.default)(CommandCallbackBase, _CommandBase); | |
| 1437 | - return (0, _createClass2.default)(CommandCallbackBase, [{ | |
| 1438 | - key: "apply", | |
| 1439 | - value: function apply() { | |
| 1440 | - var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 1441 | - return this.constructor.getCallback()(args); | |
| 1442 | - } | |
| 1443 | - }], [{ | |
| 1444 | - key: "getInstanceType", | |
| 1445 | - value: function getInstanceType() { | |
| 1446 | - return 'CommandCallbackBase'; | |
| 1447 | - } | |
| 2412 | +//#endregion | |
| 2413 | +//#region modules/web-cli/assets/js/modules/commands/open.js | |
| 2414 | + function _callSuper$3(t, o, e) { | |
| 2415 | + return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$3() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 2416 | + } | |
| 2417 | + __name(_callSuper$3, "_callSuper"); | |
| 2418 | + function _isNativeReflectConstruct$3() { | |
| 2419 | + try { | |
| 2420 | + var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 2421 | + } catch (t) {} | |
| 2422 | + return (_isNativeReflectConstruct$3 = function _isNativeReflectConstruct() { | |
| 2423 | + return !!t; | |
| 2424 | + })(); | |
| 2425 | + } | |
| 2426 | + __name(_isNativeReflectConstruct$3, "_isNativeReflectConstruct"); | |
| 2427 | + var Open = /*#__PURE__*/ function(_CommandBase) { | |
| 2428 | + function Open() { | |
| 2429 | + _classCallCheck(this, Open); | |
| 2430 | + return _callSuper$3(this, Open, arguments); | |
| 2431 | + } | |
| 2432 | + _inherits(Open, _CommandBase); | |
| 2433 | + return _createClass(Open, [{ | |
| 2434 | + key: "apply", | |
| 2435 | + value: function apply() { | |
| 2436 | + $e.route(this.component.getNamespace()); | |
| 2437 | + } | |
| 2438 | + }]); | |
| 2439 | + }(CommandBase); | |
| 1448 | 2440 | |
| 1449 | - /** | |
| 1450 | - * Get original callback of the command. | |
| 1451 | - * | |
| 1452 | - * Support pure callbacks ( Non command-base ). | |
| 1453 | - * | |
| 1454 | - * @return {()=>{}} Command Results. | |
| 1455 | - */ | |
| 1456 | - }, { | |
| 1457 | - key: "getCallback", | |
| 1458 | - value: function getCallback() { | |
| 1459 | - return this.registerConfig.callback; | |
| 1460 | - } | |
| 1461 | - }]); | |
| 1462 | -}(_commandBase.default); | |
| 2441 | +//#endregion | |
| 2442 | +//#region modules/web-cli/assets/js/modules/commands/toggle.js | |
| 2443 | + function _callSuper$2(t, o, e) { | |
| 2444 | + return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$2() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 2445 | + } | |
| 2446 | + __name(_callSuper$2, "_callSuper"); | |
| 2447 | + function _isNativeReflectConstruct$2() { | |
| 2448 | + try { | |
| 2449 | + var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 2450 | + } catch (t) {} | |
| 2451 | + return (_isNativeReflectConstruct$2 = function _isNativeReflectConstruct() { | |
| 2452 | + return !!t; | |
| 2453 | + })(); | |
| 2454 | + } | |
| 2455 | + __name(_isNativeReflectConstruct$2, "_isNativeReflectConstruct"); | |
| 2456 | + var Toggle = /*#__PURE__*/ function(_CommandBase) { | |
| 2457 | + function Toggle() { | |
| 2458 | + _classCallCheck(this, Toggle); | |
| 2459 | + return _callSuper$2(this, Toggle, arguments); | |
| 2460 | + } | |
| 2461 | + _inherits(Toggle, _CommandBase); | |
| 2462 | + return _createClass(Toggle, [{ | |
| 2463 | + key: "apply", | |
| 2464 | + value: function apply() { | |
| 2465 | + if (this.component.isOpen) this.component.close(); | |
| 2466 | + else $e.route(this.component.getNamespace()); | |
| 2467 | + } | |
| 2468 | + }]); | |
| 2469 | + }(CommandBase); | |
| 1463 | 2470 | |
| 1464 | -/***/ }), | |
| 2471 | +//#endregion | |
| 2472 | +//#region modules/web-cli/assets/js/modules/commands/index.js | |
| 2473 | + var commands_exports = /* @__PURE__ */ __exportAll({ | |
| 2474 | + Close: () => Close, | |
| 2475 | + Open: () => Open, | |
| 2476 | + Toggle: () => Toggle | |
| 2477 | + }); | |
| 1465 | 2478 | |
| 1466 | -/***/ "../modules/web-cli/assets/js/modules/command-infra.js": | |
| 1467 | -/*!*************************************************************!*\ | |
| 1468 | - !*** ../modules/web-cli/assets/js/modules/command-infra.js ***! | |
| 1469 | - \*************************************************************/ | |
| 1470 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 2479 | +//#endregion | |
| 2480 | +//#region modules/web-cli/assets/js/modules/component-modal-base.js | |
| 2481 | + function _callSuper$1(t, o, e) { | |
| 2482 | + return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$1() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 2483 | + } | |
| 2484 | + __name(_callSuper$1, "_callSuper"); | |
| 2485 | + function _isNativeReflectConstruct$1() { | |
| 2486 | + try { | |
| 2487 | + var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 2488 | + } catch (t) {} | |
| 2489 | + return (_isNativeReflectConstruct$1 = function _isNativeReflectConstruct() { | |
| 2490 | + return !!t; | |
| 2491 | + })(); | |
| 2492 | + } | |
| 2493 | + __name(_isNativeReflectConstruct$1, "_isNativeReflectConstruct"); | |
| 2494 | + function _superPropGet(t, o, e, r) { | |
| 2495 | + var p = _get(_getPrototypeOf(1 & r ? t.prototype : t), o, e); | |
| 2496 | + return 2 & r && "function" == typeof p ? function(t) { | |
| 2497 | + return p.apply(e, t); | |
| 2498 | + } : p; | |
| 2499 | + } | |
| 2500 | + var ComponentModalBase = /*#__PURE__*/ function(_ComponentBase) { | |
| 2501 | + function ComponentModalBase() { | |
| 2502 | + _classCallCheck(this, ComponentModalBase); | |
| 2503 | + return _callSuper$1(this, ComponentModalBase, arguments); | |
| 2504 | + } | |
| 2505 | + _inherits(ComponentModalBase, _ComponentBase); | |
| 2506 | + return _createClass(ComponentModalBase, [ | |
| 2507 | + { | |
| 2508 | + key: "registerAPI", | |
| 2509 | + value: function registerAPI() { | |
| 2510 | + var _this = this; | |
| 2511 | + _superPropGet(ComponentModalBase, "registerAPI", this, 3)([]); | |
| 2512 | + $e.shortcuts.register("esc", { | |
| 2513 | + scopes: [this.getNamespace()], | |
| 2514 | + callback: function callback() { | |
| 2515 | + return _this.close(); | |
| 2516 | + } | |
| 2517 | + }); | |
| 2518 | + } | |
| 2519 | + }, | |
| 2520 | + { | |
| 2521 | + key: "defaultCommands", | |
| 2522 | + value: function defaultCommands() { | |
| 2523 | + return this.importCommands(commands_exports); | |
| 2524 | + } | |
| 2525 | + }, | |
| 2526 | + { | |
| 2527 | + key: "defaultRoutes", | |
| 2528 | + value: function defaultRoutes() { | |
| 2529 | + return { "": function _() {} }; | |
| 2530 | + } | |
| 2531 | + }, | |
| 2532 | + { | |
| 2533 | + key: "open", | |
| 2534 | + value: function open() { | |
| 2535 | + var _this2 = this; | |
| 2536 | + if (!this.layout) { | |
| 2537 | + var layout = this.getModalLayout(); | |
| 2538 | + this.layout = new layout({ component: this }); | |
| 2539 | + this.layout.getModal().on("hide", function() { | |
| 2540 | + return _this2.close(); | |
| 2541 | + }); | |
| 2542 | + } | |
| 2543 | + this.layout.showModal(); | |
| 2544 | + return true; | |
| 2545 | + } | |
| 2546 | + }, | |
| 2547 | + { | |
| 2548 | + key: "close", | |
| 2549 | + value: function close() { | |
| 2550 | + if (!_superPropGet(ComponentModalBase, "close", this, 3)([])) return false; | |
| 2551 | + elementor.hooks.applyFilters("component/modal/close", this.layout.getModal().hide.bind(this.layout.getModal()), this)(); | |
| 2552 | + return true; | |
| 2553 | + } | |
| 2554 | + }, | |
| 2555 | + { | |
| 2556 | + key: "getModalLayout", | |
| 2557 | + value: function getModalLayout() { | |
| 2558 | + force_method_implementation_default(); | |
| 2559 | + } | |
| 2560 | + } | |
| 2561 | + ]); | |
| 2562 | + }(ComponentBase); | |
| 1471 | 2563 | |
| 1472 | -"use strict"; | |
| 2564 | +//#endregion | |
| 2565 | +//#region modules/web-cli/assets/js/modules/hook-break.js | |
| 2566 | + function _callSuper(t, o, e) { | |
| 2567 | + return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 2568 | + } | |
| 2569 | + function _isNativeReflectConstruct() { | |
| 2570 | + try { | |
| 2571 | + var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 2572 | + } catch (t) {} | |
| 2573 | + return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { | |
| 2574 | + return !!t; | |
| 2575 | + })(); | |
| 2576 | + } | |
| 2577 | + var HookBreak = /*#__PURE__*/ function(_Error) { | |
| 2578 | + function HookBreak() { | |
| 2579 | + _classCallCheck(this, HookBreak); | |
| 2580 | + return _callSuper(this, HookBreak, ["HookBreak"]); | |
| 2581 | + } | |
| 2582 | + _inherits(HookBreak, _Error); | |
| 2583 | + return _createClass(HookBreak); | |
| 2584 | + }(/*#__PURE__*/ _wrapNativeSuper(Error)); | |
| 1473 | 2585 | |
| 2586 | +//#endregion | |
| 2587 | +//#region core/common/assets/js/modules.js | |
| 2588 | + modules_default.common = { | |
| 2589 | + /** | |
| 2590 | + * @deprecated since 2.9.0, use `$e.modules.ComponentBase` instead. | |
| 2591 | + */ | |
| 2592 | + get Component() { | |
| 2593 | + setTimeout(function() { | |
| 2594 | + elementorDevTools.deprecation.deprecated("elementorModules.common.Component", "2.9.0", "$e.modules.ComponentBase"); | |
| 2595 | + }, 2e3); | |
| 2596 | + return ComponentBase; | |
| 2597 | + }, | |
| 2598 | + /** | |
| 2599 | + * @deprecated since 2.9.0, use `$e.modules.ComponentModalBase` instead. | |
| 2600 | + */ | |
| 2601 | + get ComponentModal() { | |
| 2602 | + setTimeout(function() { | |
| 2603 | + elementorDevTools.deprecation.deprecated("elementorModules.common.ComponentModal", "2.9.0", "$e.modules.ComponentModalBase"); | |
| 2604 | + }, 2e3); | |
| 2605 | + return ComponentModalBase; | |
| 2606 | + }, | |
| 2607 | + /** | |
| 2608 | + * @deprecated since 2.9.0, use `$e.modules.HookBreak` instead. | |
| 2609 | + */ | |
| 2610 | + get HookBreak() { | |
| 2611 | + setTimeout(function() { | |
| 2612 | + elementorDevTools.deprecation.deprecated("elementorModules.common.HookBreak", "2.9.0", "$e.modules.HookBreak"); | |
| 2613 | + }, 2e3); | |
| 2614 | + return HookBreak; | |
| 2615 | + }, | |
| 2616 | + views: { modal: { Layout: _default } } | |
| 2617 | + }; | |
| 1474 | 2618 | |
| 1475 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1476 | -Object.defineProperty(exports, "__esModule", ({ | |
| 1477 | - value: true | |
| 1478 | -})); | |
| 1479 | -exports["default"] = void 0; | |
| 1480 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 1481 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 1482 | -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 1483 | -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 1484 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1485 | -var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); | |
| 1486 | -var _argsObject = _interopRequireDefault(__webpack_require__(/*! elementor-assets-js/modules/imports/args-object */ "../assets/dev/js/modules/imports/args-object.js")); | |
| 1487 | -var _deprecation = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/deprecation */ "../modules/web-cli/assets/js/utils/deprecation.js")); | |
| 1488 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 1489 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 1490 | -/** | |
| 1491 | - * @typedef {import('../modules/component-base')} ComponentBase | |
| 1492 | - */ | |
| 1493 | -var CommandInfra = exports["default"] = /*#__PURE__*/function (_ArgsObject) { | |
| 1494 | - /** | |
| 1495 | - * Function constructor(). | |
| 1496 | - * | |
| 1497 | - * Create Commands Base. | |
| 1498 | - * | |
| 1499 | - * @param {{}} args | |
| 1500 | - */ | |
| 1501 | - function CommandInfra() { | |
| 1502 | - var _this; | |
| 1503 | - var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 1504 | - (0, _classCallCheck2.default)(this, CommandInfra); | |
| 1505 | - _this = _callSuper(this, CommandInfra, [args]); | |
| 1506 | - if (!_this.constructor.registerConfig) { | |
| 1507 | - throw RangeError('Doing it wrong: Each command type should have `registerConfig`.'); | |
| 1508 | - } | |
| 1509 | - | |
| 1510 | - // Acknowledge self about which command it run. | |
| 1511 | - _this.command = _this.constructor.getCommand(); | |
| 1512 | - | |
| 1513 | - // Assign instance of current component. | |
| 1514 | - _this.component = _this.constructor.getComponent(); | |
| 1515 | - | |
| 1516 | - // Who ever need do something before without `super` the constructor can use `initialize` method. | |
| 1517 | - _this.initialize(args); | |
| 1518 | - | |
| 1519 | - // Refresh args, maybe the changed via `initialize`. | |
| 1520 | - args = _this.args; | |
| 1521 | - | |
| 1522 | - // Validate args before run. | |
| 1523 | - _this.validateArgs(args); | |
| 1524 | - return _this; | |
| 1525 | - } | |
| 1526 | - | |
| 1527 | - /** | |
| 1528 | - * Function initialize(). | |
| 1529 | - * | |
| 1530 | - * Initialize command, called after construction. | |
| 1531 | - * | |
| 1532 | - * @param {{}} args | |
| 1533 | - */ | |
| 1534 | - (0, _inherits2.default)(CommandInfra, _ArgsObject); | |
| 1535 | - return (0, _createClass2.default)(CommandInfra, [{ | |
| 1536 | - key: "currentCommand", | |
| 1537 | - get: | |
| 1538 | - /** | |
| 1539 | - * @deprecated since 3.7.0, use `this.command` instead. | |
| 1540 | - */ | |
| 1541 | - function get() { | |
| 1542 | - _deprecation.default.deprecated('this.currentCommand', '3.7.0', 'this.command'); | |
| 1543 | - return this.command; | |
| 1544 | - } | |
| 1545 | - }, { | |
| 1546 | - key: "initialize", | |
| 1547 | - value: function initialize() { | |
| 1548 | - var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 1549 | - } // eslint-disable-line no-unused-vars | |
| 1550 | - | |
| 1551 | - /** | |
| 1552 | - * Function validateArgs(). | |
| 1553 | - * | |
| 1554 | - * Validate command arguments. | |
| 1555 | - * | |
| 1556 | - * @param {{}} args | |
| 1557 | - */ | |
| 1558 | - }, { | |
| 1559 | - key: "validateArgs", | |
| 1560 | - value: function validateArgs() { | |
| 1561 | - var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 1562 | - } // eslint-disable-line no-unused-vars | |
| 1563 | - | |
| 1564 | - // eslint-disable-next-line jsdoc/require-returns-check | |
| 1565 | - /** | |
| 1566 | - * Function apply(). | |
| 1567 | - * | |
| 1568 | - * Do the actual command. | |
| 1569 | - * | |
| 1570 | - * @param {{}} args | |
| 1571 | - * | |
| 1572 | - * @return {*} Command results. | |
| 1573 | - */ | |
| 1574 | - }, { | |
| 1575 | - key: "apply", | |
| 1576 | - value: function apply() { | |
| 1577 | - var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 1578 | - // eslint-disable-line no-unused-vars | |
| 1579 | - elementorModules.ForceMethodImplementation(); | |
| 1580 | - } | |
| 1581 | - | |
| 1582 | - /** | |
| 1583 | - * Function run(). | |
| 1584 | - * | |
| 1585 | - * Run command with history & hooks. | |
| 1586 | - * | |
| 1587 | - * @return {*} Command results. | |
| 1588 | - */ | |
| 1589 | - }, { | |
| 1590 | - key: "run", | |
| 1591 | - value: function run() { | |
| 1592 | - return this.apply(this.args); | |
| 1593 | - } | |
| 1594 | - | |
| 1595 | - /** | |
| 1596 | - * Function onBeforeRun. | |
| 1597 | - * | |
| 1598 | - * Called before run(). | |
| 1599 | - * | |
| 1600 | - * @param {{}} args | |
| 1601 | - */ | |
| 1602 | - }, { | |
| 1603 | - key: "onBeforeRun", | |
| 1604 | - value: function onBeforeRun() { | |
| 1605 | - var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 1606 | - } // eslint-disable-line no-unused-vars | |
| 1607 | - | |
| 1608 | - /** | |
| 1609 | - * Function onAfterRun. | |
| 1610 | - * | |
| 1611 | - * Called after run(). | |
| 1612 | - * | |
| 1613 | - * @param {{}} args | |
| 1614 | - * @param {*} result | |
| 1615 | - */ | |
| 1616 | - }, { | |
| 1617 | - key: "onAfterRun", | |
| 1618 | - value: function onAfterRun() { | |
| 1619 | - var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 1620 | - var result = arguments.length > 1 ? arguments[1] : undefined; | |
| 1621 | - } // eslint-disable-line no-unused-vars | |
| 1622 | - | |
| 1623 | - /** | |
| 1624 | - * Function onBeforeApply. | |
| 1625 | - * | |
| 1626 | - * Called before apply(). | |
| 1627 | - * | |
| 1628 | - * @param {{}} args | |
| 1629 | - */ | |
| 1630 | - }, { | |
| 1631 | - key: "onBeforeApply", | |
| 1632 | - value: function onBeforeApply() { | |
| 1633 | - var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 1634 | - } // eslint-disable-line no-unused-vars | |
| 1635 | - | |
| 1636 | - /** | |
| 1637 | - * Function onAfterApply. | |
| 1638 | - * | |
| 1639 | - * Called after apply(). | |
| 1640 | - * | |
| 1641 | - * @param {{}} args | |
| 1642 | - * @param {*} result | |
| 1643 | - */ | |
| 1644 | - }, { | |
| 1645 | - key: "onAfterApply", | |
| 1646 | - value: function onAfterApply() { | |
| 1647 | - var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 1648 | - var result = arguments.length > 1 ? arguments[1] : undefined; | |
| 1649 | - } // eslint-disable-line no-unused-vars | |
| 1650 | - | |
| 1651 | - /** | |
| 1652 | - * Function onCatchApply. | |
| 1653 | - * | |
| 1654 | - * Called after apply() failed. | |
| 1655 | - * | |
| 1656 | - * @param {Error} e | |
| 1657 | - */ | |
| 1658 | - }, { | |
| 1659 | - key: "onCatchApply", | |
| 1660 | - value: function onCatchApply(e) {} // eslint-disable-line no-unused-vars | |
| 1661 | - }], [{ | |
| 1662 | - key: "getInstanceType", | |
| 1663 | - value: function getInstanceType() { | |
| 1664 | - return 'CommandInfra'; | |
| 1665 | - } | |
| 1666 | - | |
| 1667 | - /** | |
| 1668 | - * Get info of command. | |
| 1669 | - * | |
| 1670 | - * @return {Object} Extra information about the command. | |
| 1671 | - */ | |
| 1672 | - }, { | |
| 1673 | - key: "getInfo", | |
| 1674 | - value: function getInfo() { | |
| 1675 | - return {}; | |
| 1676 | - } | |
| 1677 | - | |
| 1678 | - /** | |
| 1679 | - * @return {string} Self command name. | |
| 1680 | - */ | |
| 1681 | - }, { | |
| 1682 | - key: "getCommand", | |
| 1683 | - value: function getCommand() { | |
| 1684 | - return this.registerConfig.command; | |
| 1685 | - } | |
| 1686 | - | |
| 1687 | - /** | |
| 1688 | - * @return {ComponentBase} Self component | |
| 1689 | - */ | |
| 1690 | - }, { | |
| 1691 | - key: "getComponent", | |
| 1692 | - value: function getComponent() { | |
| 1693 | - return this.registerConfig.component; | |
| 1694 | - } | |
| 1695 | - }, { | |
| 1696 | - key: "setRegisterConfig", | |
| 1697 | - value: function setRegisterConfig(config) { | |
| 1698 | - this.registerConfig = Object.freeze(config); | |
| 1699 | - } | |
| 1700 | - }]); | |
| 1701 | -}(_argsObject.default); | |
| 1702 | -/** | |
| 1703 | - * @type {Object} | |
| 1704 | - */ | |
| 1705 | -(0, _defineProperty2.default)(CommandInfra, "registerConfig", null); | |
| 1706 | - | |
| 1707 | -/***/ }), | |
| 1708 | - | |
| 1709 | -/***/ "../modules/web-cli/assets/js/modules/commands/close.js": | |
| 1710 | -/*!**************************************************************!*\ | |
| 1711 | - !*** ../modules/web-cli/assets/js/modules/commands/close.js ***! | |
| 1712 | - \**************************************************************/ | |
| 1713 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1714 | - | |
| 1715 | -"use strict"; | |
| 1716 | - | |
| 1717 | - | |
| 1718 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1719 | -Object.defineProperty(exports, "__esModule", ({ | |
| 1720 | - value: true | |
| 1721 | -})); | |
| 1722 | -exports["default"] = exports.Close = void 0; | |
| 1723 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 1724 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 1725 | -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 1726 | -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 1727 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1728 | -var _commandBase = _interopRequireDefault(__webpack_require__(/*! elementor-api/modules/command-base */ "../modules/web-cli/assets/js/modules/command-base.js")); | |
| 1729 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 1730 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 1731 | -var Close = exports.Close = /*#__PURE__*/function (_CommandBase) { | |
| 1732 | - function Close() { | |
| 1733 | - (0, _classCallCheck2.default)(this, Close); | |
| 1734 | - return _callSuper(this, Close, arguments); | |
| 1735 | - } | |
| 1736 | - (0, _inherits2.default)(Close, _CommandBase); | |
| 1737 | - return (0, _createClass2.default)(Close, [{ | |
| 1738 | - key: "apply", | |
| 1739 | - value: function apply() { | |
| 1740 | - this.component.close(); | |
| 1741 | - } | |
| 1742 | - }]); | |
| 1743 | -}(_commandBase.default); | |
| 1744 | -var _default = exports["default"] = Close; | |
| 1745 | - | |
| 1746 | -/***/ }), | |
| 1747 | - | |
| 1748 | -/***/ "../modules/web-cli/assets/js/modules/commands/index.js": | |
| 1749 | -/*!**************************************************************!*\ | |
| 1750 | - !*** ../modules/web-cli/assets/js/modules/commands/index.js ***! | |
| 1751 | - \**************************************************************/ | |
| 1752 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1753 | - | |
| 1754 | -"use strict"; | |
| 1755 | - | |
| 1756 | - | |
| 1757 | -Object.defineProperty(exports, "__esModule", ({ | |
| 1758 | - value: true | |
| 1759 | -})); | |
| 1760 | -Object.defineProperty(exports, "Close", ({ | |
| 1761 | - enumerable: true, | |
| 1762 | - get: function get() { | |
| 1763 | - return _close.Close; | |
| 1764 | - } | |
| 1765 | -})); | |
| 1766 | -Object.defineProperty(exports, "Open", ({ | |
| 1767 | - enumerable: true, | |
| 1768 | - get: function get() { | |
| 1769 | - return _open.Open; | |
| 1770 | - } | |
| 1771 | -})); | |
| 1772 | -Object.defineProperty(exports, "Toggle", ({ | |
| 1773 | - enumerable: true, | |
| 1774 | - get: function get() { | |
| 1775 | - return _toggle.Toggle; | |
| 1776 | - } | |
| 1777 | -})); | |
| 1778 | -var _close = __webpack_require__(/*! ./close */ "../modules/web-cli/assets/js/modules/commands/close.js"); | |
| 1779 | -var _open = __webpack_require__(/*! ./open */ "../modules/web-cli/assets/js/modules/commands/open.js"); | |
| 1780 | -var _toggle = __webpack_require__(/*! ./toggle */ "../modules/web-cli/assets/js/modules/commands/toggle.js"); | |
| 1781 | - | |
| 1782 | -/***/ }), | |
| 1783 | - | |
| 1784 | -/***/ "../modules/web-cli/assets/js/modules/commands/open.js": | |
| 1785 | -/*!*************************************************************!*\ | |
| 1786 | - !*** ../modules/web-cli/assets/js/modules/commands/open.js ***! | |
| 1787 | - \*************************************************************/ | |
| 1788 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1789 | - | |
| 1790 | -"use strict"; | |
| 1791 | - | |
| 1792 | - | |
| 1793 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1794 | -Object.defineProperty(exports, "__esModule", ({ | |
| 1795 | - value: true | |
| 1796 | -})); | |
| 1797 | -exports["default"] = exports.Open = void 0; | |
| 1798 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 1799 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 1800 | -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 1801 | -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 1802 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1803 | -var _commandBase = _interopRequireDefault(__webpack_require__(/*! elementor-api/modules/command-base */ "../modules/web-cli/assets/js/modules/command-base.js")); | |
| 1804 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 1805 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 1806 | -var Open = exports.Open = /*#__PURE__*/function (_CommandBase) { | |
| 1807 | - function Open() { | |
| 1808 | - (0, _classCallCheck2.default)(this, Open); | |
| 1809 | - return _callSuper(this, Open, arguments); | |
| 1810 | - } | |
| 1811 | - (0, _inherits2.default)(Open, _CommandBase); | |
| 1812 | - return (0, _createClass2.default)(Open, [{ | |
| 1813 | - key: "apply", | |
| 1814 | - value: function apply() { | |
| 1815 | - $e.route(this.component.getNamespace()); | |
| 1816 | - } | |
| 1817 | - }]); | |
| 1818 | -}(_commandBase.default); | |
| 1819 | -var _default = exports["default"] = Open; | |
| 1820 | - | |
| 1821 | -/***/ }), | |
| 1822 | - | |
| 1823 | -/***/ "../modules/web-cli/assets/js/modules/commands/toggle.js": | |
| 1824 | -/*!***************************************************************!*\ | |
| 1825 | - !*** ../modules/web-cli/assets/js/modules/commands/toggle.js ***! | |
| 1826 | - \***************************************************************/ | |
| 1827 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1828 | - | |
| 1829 | -"use strict"; | |
| 1830 | - | |
| 1831 | - | |
| 1832 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1833 | -Object.defineProperty(exports, "__esModule", ({ | |
| 1834 | - value: true | |
| 1835 | -})); | |
| 1836 | -exports["default"] = exports.Toggle = void 0; | |
| 1837 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 1838 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 1839 | -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 1840 | -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 1841 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1842 | -var _commandBase = _interopRequireDefault(__webpack_require__(/*! elementor-api/modules/command-base */ "../modules/web-cli/assets/js/modules/command-base.js")); | |
| 1843 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 1844 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 1845 | -var Toggle = exports.Toggle = /*#__PURE__*/function (_CommandBase) { | |
| 1846 | - function Toggle() { | |
| 1847 | - (0, _classCallCheck2.default)(this, Toggle); | |
| 1848 | - return _callSuper(this, Toggle, arguments); | |
| 1849 | - } | |
| 1850 | - (0, _inherits2.default)(Toggle, _CommandBase); | |
| 1851 | - return (0, _createClass2.default)(Toggle, [{ | |
| 1852 | - key: "apply", | |
| 1853 | - value: function apply() { | |
| 1854 | - if (this.component.isOpen) { | |
| 1855 | - this.component.close(); | |
| 1856 | - } else { | |
| 1857 | - $e.route(this.component.getNamespace()); | |
| 1858 | - } | |
| 1859 | - } | |
| 1860 | - }]); | |
| 1861 | -}(_commandBase.default); | |
| 1862 | -var _default = exports["default"] = Toggle; | |
| 1863 | - | |
| 1864 | -/***/ }), | |
| 1865 | - | |
| 1866 | -/***/ "../modules/web-cli/assets/js/modules/component-base.js": | |
| 1867 | -/*!**************************************************************!*\ | |
| 1868 | - !*** ../modules/web-cli/assets/js/modules/component-base.js ***! | |
| 1869 | - \**************************************************************/ | |
| 1870 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1871 | - | |
| 1872 | -"use strict"; | |
| 1873 | - | |
| 1874 | - | |
| 1875 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1876 | -Object.defineProperty(exports, "__esModule", ({ | |
| 1877 | - value: true | |
| 1878 | -})); | |
| 1879 | -exports["default"] = void 0; | |
| 1880 | -var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); | |
| 1881 | -var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); | |
| 1882 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 1883 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 1884 | -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 1885 | -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 1886 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1887 | -var _commandCallbackBase = _interopRequireDefault(__webpack_require__(/*! elementor-api/modules/command-callback-base */ "../modules/web-cli/assets/js/modules/command-callback-base.js")); | |
| 1888 | -var _toolkit = __webpack_require__(/*! @reduxjs/toolkit */ "../node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js"); | |
| 1889 | -var _module = _interopRequireDefault(__webpack_require__(/*! elementor/assets/dev/js/modules/imports/module.js */ "../assets/dev/js/modules/imports/module.js")); | |
| 1890 | -var _forceMethodImplementation = _interopRequireDefault(__webpack_require__(/*! ../utils/force-method-implementation */ "../modules/web-cli/assets/js/utils/force-method-implementation.js")); | |
| 1891 | -var _deprecation = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/deprecation */ "../modules/web-cli/assets/js/utils/deprecation.js")); | |
| 1892 | -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; } | |
| 1893 | -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; } | |
| 1894 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 1895 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 1896 | -/** | |
| 1897 | - * @typedef {import('./command-infra')} CommandInfra | |
| 1898 | - * @typedef {import('./hook-base')} HookBase | |
| 1899 | - * @typedef {import('../core/states/ui-state-base')} UiStateBase | |
| 1900 | - */ | |
| 1901 | -var ComponentBase = exports["default"] = /*#__PURE__*/function (_Module) { | |
| 1902 | - function ComponentBase() { | |
| 1903 | - (0, _classCallCheck2.default)(this, ComponentBase); | |
| 1904 | - return _callSuper(this, ComponentBase, arguments); | |
| 1905 | - } | |
| 1906 | - (0, _inherits2.default)(ComponentBase, _Module); | |
| 1907 | - return (0, _createClass2.default)(ComponentBase, [{ | |
| 1908 | - key: "__construct", | |
| 1909 | - value: function __construct() { | |
| 1910 | - var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 1911 | - if (args.manager) { | |
| 1912 | - this.manager = args.manager; | |
| 1913 | - } | |
| 1914 | - this.commands = this.defaultCommands(); | |
| 1915 | - this.commandsInternal = this.defaultCommandsInternal(); | |
| 1916 | - this.hooks = this.defaultHooks(); | |
| 1917 | - this.routes = this.defaultRoutes(); | |
| 1918 | - this.tabs = this.defaultTabs(); | |
| 1919 | - this.shortcuts = this.defaultShortcuts(); | |
| 1920 | - this.utils = this.defaultUtils(); | |
| 1921 | - this.data = this.defaultData(); | |
| 1922 | - this.uiStates = this.defaultUiStates(); | |
| 1923 | - this.states = this.defaultStates(); | |
| 1924 | - this.defaultRoute = ''; | |
| 1925 | - this.currentTab = ''; | |
| 1926 | - } | |
| 1927 | - }, { | |
| 1928 | - key: "registerAPI", | |
| 1929 | - value: function registerAPI() { | |
| 1930 | - var _this = this; | |
| 1931 | - Object.entries(this.getTabs()).forEach(function (tab) { | |
| 1932 | - return _this.registerTabRoute(tab[0]); | |
| 1933 | - }); | |
| 1934 | - Object.entries(this.getRoutes()).forEach(function (_ref) { | |
| 1935 | - var _ref2 = (0, _slicedToArray2.default)(_ref, 2), | |
| 1936 | - route = _ref2[0], | |
| 1937 | - callback = _ref2[1]; | |
| 1938 | - return _this.registerRoute(route, callback); | |
| 1939 | - }); | |
| 1940 | - Object.entries(this.getCommands()).forEach(function (_ref3) { | |
| 1941 | - var _ref4 = (0, _slicedToArray2.default)(_ref3, 2), | |
| 1942 | - command = _ref4[0], | |
| 1943 | - callback = _ref4[1]; | |
| 1944 | - return _this.registerCommand(command, callback); | |
| 1945 | - }); | |
| 1946 | - Object.entries(this.getCommandsInternal()).forEach(function (_ref5) { | |
| 1947 | - var _ref6 = (0, _slicedToArray2.default)(_ref5, 2), | |
| 1948 | - command = _ref6[0], | |
| 1949 | - callback = _ref6[1]; | |
| 1950 | - return _this.registerCommandInternal(command, callback); | |
| 1951 | - }); | |
| 1952 | - Object.values(this.getHooks()).forEach(function (instance) { | |
| 1953 | - return _this.registerHook(instance); | |
| 1954 | - }); | |
| 1955 | - Object.entries(this.getData()).forEach(function (_ref7) { | |
| 1956 | - var _ref8 = (0, _slicedToArray2.default)(_ref7, 2), | |
| 1957 | - command = _ref8[0], | |
| 1958 | - callback = _ref8[1]; | |
| 1959 | - return _this.registerData(command, callback); | |
| 1960 | - }); | |
| 1961 | - Object.values(this.getUiStates()).forEach(function (instance) { | |
| 1962 | - return _this.registerUiState(instance); | |
| 1963 | - }); | |
| 1964 | - Object.entries(this.getStates()).forEach(function (_ref9) { | |
| 1965 | - var _ref0 = (0, _slicedToArray2.default)(_ref9, 2), | |
| 1966 | - id = _ref0[0], | |
| 1967 | - state = _ref0[1]; | |
| 1968 | - return _this.registerState(id, state); | |
| 1969 | - }); | |
| 1970 | - } | |
| 1971 | - | |
| 1972 | - // eslint-disable-next-line jsdoc/require-returns-check | |
| 1973 | - /** | |
| 1974 | - * @return {string} namespace | |
| 1975 | - */ | |
| 1976 | - }, { | |
| 1977 | - key: "getNamespace", | |
| 1978 | - value: function getNamespace() { | |
| 1979 | - (0, _forceMethodImplementation.default)(); | |
| 1980 | - } | |
| 1981 | - | |
| 1982 | - /** | |
| 1983 | - * @deprecated since 3.7.0, use `getServiceName()` instead. | |
| 1984 | - */ | |
| 1985 | - }, { | |
| 1986 | - key: "getRootContainer", | |
| 1987 | - value: function getRootContainer() { | |
| 1988 | - _deprecation.default.deprecated('getRootContainer()', '3.7.0', 'getServiceName()'); | |
| 1989 | - return this.getServiceName(); | |
| 1990 | - } | |
| 1991 | - }, { | |
| 1992 | - key: "getServiceName", | |
| 1993 | - value: function getServiceName() { | |
| 1994 | - return this.getNamespace().split('/')[0]; | |
| 1995 | - } | |
| 1996 | - }, { | |
| 1997 | - key: "store", | |
| 1998 | - get: function get() { | |
| 1999 | - return $e.store.get(this.getNamespace()); | |
| 2000 | - } | |
| 2001 | - }, { | |
| 2002 | - key: "defaultTabs", | |
| 2003 | - value: function defaultTabs() { | |
| 2004 | - return {}; | |
| 2005 | - } | |
| 2006 | - }, { | |
| 2007 | - key: "defaultRoutes", | |
| 2008 | - value: function defaultRoutes() { | |
| 2009 | - return {}; | |
| 2010 | - } | |
| 2011 | - }, { | |
| 2012 | - key: "defaultCommands", | |
| 2013 | - value: function defaultCommands() { | |
| 2014 | - return {}; | |
| 2015 | - } | |
| 2016 | - }, { | |
| 2017 | - key: "defaultCommandsInternal", | |
| 2018 | - value: function defaultCommandsInternal() { | |
| 2019 | - return {}; | |
| 2020 | - } | |
| 2021 | - }, { | |
| 2022 | - key: "defaultHooks", | |
| 2023 | - value: function defaultHooks() { | |
| 2024 | - return {}; | |
| 2025 | - } | |
| 2026 | - | |
| 2027 | - /** | |
| 2028 | - * Get the component's default UI states. | |
| 2029 | - * | |
| 2030 | - * @return {Object} default UI states | |
| 2031 | - */ | |
| 2032 | - }, { | |
| 2033 | - key: "defaultUiStates", | |
| 2034 | - value: function defaultUiStates() { | |
| 2035 | - return {}; | |
| 2036 | - } | |
| 2037 | - | |
| 2038 | - /** | |
| 2039 | - * Get the component's Redux slice settings. | |
| 2040 | - * | |
| 2041 | - * @return {Object} Redux slice settings | |
| 2042 | - */ | |
| 2043 | - }, { | |
| 2044 | - key: "defaultStates", | |
| 2045 | - value: function defaultStates() { | |
| 2046 | - return {}; | |
| 2047 | - } | |
| 2048 | - }, { | |
| 2049 | - key: "defaultShortcuts", | |
| 2050 | - value: function defaultShortcuts() { | |
| 2051 | - return {}; | |
| 2052 | - } | |
| 2053 | - }, { | |
| 2054 | - key: "defaultUtils", | |
| 2055 | - value: function defaultUtils() { | |
| 2056 | - return {}; | |
| 2057 | - } | |
| 2058 | - }, { | |
| 2059 | - key: "defaultData", | |
| 2060 | - value: function defaultData() { | |
| 2061 | - return {}; | |
| 2062 | - } | |
| 2063 | - }, { | |
| 2064 | - key: "getCommands", | |
| 2065 | - value: function getCommands() { | |
| 2066 | - return this.commands; | |
| 2067 | - } | |
| 2068 | - }, { | |
| 2069 | - key: "getCommandsInternal", | |
| 2070 | - value: function getCommandsInternal() { | |
| 2071 | - return this.commandsInternal; | |
| 2072 | - } | |
| 2073 | - }, { | |
| 2074 | - key: "getHooks", | |
| 2075 | - value: function getHooks() { | |
| 2076 | - return this.hooks; | |
| 2077 | - } | |
| 2078 | - | |
| 2079 | - /** | |
| 2080 | - * Retrieve the component's UI states. | |
| 2081 | - * | |
| 2082 | - * @return {Object} UI states | |
| 2083 | - */ | |
| 2084 | - }, { | |
| 2085 | - key: "getUiStates", | |
| 2086 | - value: function getUiStates() { | |
| 2087 | - return this.uiStates; | |
| 2088 | - } | |
| 2089 | - | |
| 2090 | - /** | |
| 2091 | - * Retrieve the component's Redux Slice. | |
| 2092 | - * | |
| 2093 | - * @return {Object} Redux Slice | |
| 2094 | - */ | |
| 2095 | - }, { | |
| 2096 | - key: "getStates", | |
| 2097 | - value: function getStates() { | |
| 2098 | - return this.states; | |
| 2099 | - } | |
| 2100 | - }, { | |
| 2101 | - key: "getRoutes", | |
| 2102 | - value: function getRoutes() { | |
| 2103 | - return this.routes; | |
| 2104 | - } | |
| 2105 | - }, { | |
| 2106 | - key: "getTabs", | |
| 2107 | - value: function getTabs() { | |
| 2108 | - return this.tabs; | |
| 2109 | - } | |
| 2110 | - }, { | |
| 2111 | - key: "getShortcuts", | |
| 2112 | - value: function getShortcuts() { | |
| 2113 | - return this.shortcuts; | |
| 2114 | - } | |
| 2115 | - }, { | |
| 2116 | - key: "getData", | |
| 2117 | - value: function getData() { | |
| 2118 | - return this.data; | |
| 2119 | - } | |
| 2120 | - | |
| 2121 | - /** | |
| 2122 | - * @param {string} command | |
| 2123 | - * @param {(()=>{}|CommandInfra)} context | |
| 2124 | - * @param {'default'|'internal'|'data'} commandsType | |
| 2125 | - */ | |
| 2126 | - }, { | |
| 2127 | - key: "registerCommand", | |
| 2128 | - value: function registerCommand(command, context) { | |
| 2129 | - var commandsType = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'default'; | |
| 2130 | - var commandsManager; | |
| 2131 | - switch (commandsType) { | |
| 2132 | - case 'default': | |
| 2133 | - commandsManager = $e.commands; | |
| 2134 | - break; | |
| 2135 | - case 'internal': | |
| 2136 | - commandsManager = $e.commandsInternal; | |
| 2137 | - break; | |
| 2138 | - case 'data': | |
| 2139 | - commandsManager = $e.data; | |
| 2140 | - break; | |
| 2141 | - default: | |
| 2142 | - throw new Error("Invalid commands type: '".concat(command, "'")); | |
| 2143 | - } | |
| 2144 | - var fullCommand = this.getNamespace() + '/' + command, | |
| 2145 | - instanceType = context.getInstanceType ? context.getInstanceType() : false, | |
| 2146 | - registerConfig = { | |
| 2147 | - command: fullCommand, | |
| 2148 | - component: this | |
| 2149 | - }; | |
| 2150 | - | |
| 2151 | - // Support pure callback. | |
| 2152 | - if (!instanceType) { | |
| 2153 | - if ($e.devTools) { | |
| 2154 | - $e.devTools.log.warn("Attach command-callback-base, on command: '".concat(fullCommand, "', context is unknown type.")); | |
| 2155 | - } | |
| 2156 | - registerConfig.callback = context; | |
| 2157 | - | |
| 2158 | - // Unique class. | |
| 2159 | - context = /*#__PURE__*/function (_CommandCallbackBase) { | |
| 2160 | - function context() { | |
| 2161 | - (0, _classCallCheck2.default)(this, context); | |
| 2162 | - return _callSuper(this, context, arguments); | |
| 2163 | - } | |
| 2164 | - (0, _inherits2.default)(context, _CommandCallbackBase); | |
| 2165 | - return (0, _createClass2.default)(context); | |
| 2166 | - }(_commandCallbackBase.default); | |
| 2167 | - } | |
| 2168 | - context.setRegisterConfig(registerConfig); | |
| 2169 | - commandsManager.register(this, command, context); | |
| 2170 | - } | |
| 2171 | - | |
| 2172 | - /** | |
| 2173 | - * @param {HookBase} instance | |
| 2174 | - */ | |
| 2175 | - }, { | |
| 2176 | - key: "registerHook", | |
| 2177 | - value: function registerHook(instance) { | |
| 2178 | - return instance.register(); | |
| 2179 | - } | |
| 2180 | - }, { | |
| 2181 | - key: "registerCommandInternal", | |
| 2182 | - value: function registerCommandInternal(command, context) { | |
| 2183 | - this.registerCommand(command, context, 'internal'); | |
| 2184 | - } | |
| 2185 | - | |
| 2186 | - /** | |
| 2187 | - * Register a UI state. | |
| 2188 | - * | |
| 2189 | - * @param {UiStateBase} instance - UI state instance. | |
| 2190 | - * | |
| 2191 | - * @return {void} | |
| 2192 | - */ | |
| 2193 | - }, { | |
| 2194 | - key: "registerUiState", | |
| 2195 | - value: function registerUiState(instance) { | |
| 2196 | - $e.uiStates.register(instance); | |
| 2197 | - } | |
| 2198 | - | |
| 2199 | - /** | |
| 2200 | - * Register a Redux Slice. | |
| 2201 | - * | |
| 2202 | - * @param {string} id - State id. | |
| 2203 | - * @param {Object} stateConfig - The state config. | |
| 2204 | - * | |
| 2205 | - * @return {void} | |
| 2206 | - */ | |
| 2207 | - }, { | |
| 2208 | - key: "registerState", | |
| 2209 | - value: function registerState(id, stateConfig) { | |
| 2210 | - id = this.getNamespace() + (id ? "/".concat(id) : ''); | |
| 2211 | - var slice = (0, _toolkit.createSlice)(_objectSpread(_objectSpread({}, stateConfig), {}, { | |
| 2212 | - name: id | |
| 2213 | - })); | |
| 2214 | - $e.store.register(id, slice); | |
| 2215 | - } | |
| 2216 | - }, { | |
| 2217 | - key: "registerRoute", | |
| 2218 | - value: function registerRoute(route, callback) { | |
| 2219 | - $e.routes.register(this, route, callback); | |
| 2220 | - } | |
| 2221 | - }, { | |
| 2222 | - key: "registerData", | |
| 2223 | - value: function registerData(command, context) { | |
| 2224 | - this.registerCommand(command, context, 'data'); | |
| 2225 | - } | |
| 2226 | - }, { | |
| 2227 | - key: "unregisterRoute", | |
| 2228 | - value: function unregisterRoute(route) { | |
| 2229 | - $e.routes.unregister(this, route); | |
| 2230 | - } | |
| 2231 | - }, { | |
| 2232 | - key: "registerTabRoute", | |
| 2233 | - value: function registerTabRoute(tab) { | |
| 2234 | - var _this2 = this; | |
| 2235 | - this.registerRoute(tab, function (args) { | |
| 2236 | - return _this2.activateTab(tab, args); | |
| 2237 | - }); | |
| 2238 | - } | |
| 2239 | - }, { | |
| 2240 | - key: "dependency", | |
| 2241 | - value: function dependency() { | |
| 2242 | - return true; | |
| 2243 | - } | |
| 2244 | - }, { | |
| 2245 | - key: "open", | |
| 2246 | - value: function open() { | |
| 2247 | - return true; | |
| 2248 | - } | |
| 2249 | - }, { | |
| 2250 | - key: "close", | |
| 2251 | - value: function close() { | |
| 2252 | - if (!this.isOpen) { | |
| 2253 | - return false; | |
| 2254 | - } | |
| 2255 | - this.isOpen = false; | |
| 2256 | - this.inactivate(); | |
| 2257 | - $e.routes.clearCurrent(this.getNamespace()); | |
| 2258 | - $e.routes.clearHistory(this.getServiceName()); | |
| 2259 | - return true; | |
| 2260 | - } | |
| 2261 | - }, { | |
| 2262 | - key: "activate", | |
| 2263 | - value: function activate() { | |
| 2264 | - $e.components.activate(this.getNamespace()); | |
| 2265 | - } | |
| 2266 | - }, { | |
| 2267 | - key: "inactivate", | |
| 2268 | - value: function inactivate() { | |
| 2269 | - $e.components.inactivate(this.getNamespace()); | |
| 2270 | - } | |
| 2271 | - }, { | |
| 2272 | - key: "isActive", | |
| 2273 | - value: function isActive() { | |
| 2274 | - return $e.components.isActive(this.getNamespace()); | |
| 2275 | - } | |
| 2276 | - }, { | |
| 2277 | - key: "onRoute", | |
| 2278 | - value: function onRoute(route) { | |
| 2279 | - this.toggleRouteClass(route, true); | |
| 2280 | - this.toggleHistoryClass(); | |
| 2281 | - this.activate(); | |
| 2282 | - this.trigger('route/open', route); | |
| 2283 | - } | |
| 2284 | - }, { | |
| 2285 | - key: "onCloseRoute", | |
| 2286 | - value: function onCloseRoute(route) { | |
| 2287 | - this.toggleRouteClass(route, false); | |
| 2288 | - this.inactivate(); | |
| 2289 | - this.trigger('route/close', route); | |
| 2290 | - } | |
| 2291 | - }, { | |
| 2292 | - key: "setDefaultRoute", | |
| 2293 | - value: function setDefaultRoute(route) { | |
| 2294 | - this.defaultRoute = this.getNamespace() + '/' + route; | |
| 2295 | - } | |
| 2296 | - }, { | |
| 2297 | - key: "getDefaultRoute", | |
| 2298 | - value: function getDefaultRoute() { | |
| 2299 | - return this.defaultRoute; | |
| 2300 | - } | |
| 2301 | - }, { | |
| 2302 | - key: "removeTab", | |
| 2303 | - value: function removeTab(tab) { | |
| 2304 | - delete this.tabs[tab]; | |
| 2305 | - this.unregisterRoute(tab); | |
| 2306 | - } | |
| 2307 | - }, { | |
| 2308 | - key: "hasTab", | |
| 2309 | - value: function hasTab(tab) { | |
| 2310 | - return !!this.tabs[tab]; | |
| 2311 | - } | |
| 2312 | - }, { | |
| 2313 | - key: "addTab", | |
| 2314 | - value: function addTab(tab, args, position) { | |
| 2315 | - var _this3 = this; | |
| 2316 | - this.tabs[tab] = args; | |
| 2317 | - // It can be 0. | |
| 2318 | - if ('undefined' !== typeof position) { | |
| 2319 | - var newTabs = {}; | |
| 2320 | - var ids = Object.keys(this.tabs); | |
| 2321 | - // Remove new tab | |
| 2322 | - ids.pop(); | |
| 2323 | - | |
| 2324 | - // Add it to position. | |
| 2325 | - ids.splice(position, 0, tab); | |
| 2326 | - ids.forEach(function (id) { | |
| 2327 | - newTabs[id] = _this3.tabs[id]; | |
| 2328 | - }); | |
| 2329 | - this.tabs = newTabs; | |
| 2330 | - } | |
| 2331 | - this.registerTabRoute(tab); | |
| 2332 | - } | |
| 2333 | - }, { | |
| 2334 | - key: "getTabsWrapperSelector", | |
| 2335 | - value: function getTabsWrapperSelector() { | |
| 2336 | - return ''; | |
| 2337 | - } | |
| 2338 | - }, { | |
| 2339 | - key: "getTabRoute", | |
| 2340 | - value: function getTabRoute(tab) { | |
| 2341 | - return this.getNamespace() + '/' + tab; | |
| 2342 | - } | |
| 2343 | - }, { | |
| 2344 | - key: "renderTab", | |
| 2345 | - value: function renderTab(tab) {} // eslint-disable-line | |
| 2346 | - }, { | |
| 2347 | - key: "activateTab", | |
| 2348 | - value: function activateTab(tab, args) { | |
| 2349 | - var _this4 = this; | |
| 2350 | - this.renderTab(tab, args); | |
| 2351 | - jQuery(this.getTabsWrapperSelector() + ' .elementor-component-tab').off('click').on('click', function (event) { | |
| 2352 | - $e.route(_this4.getTabRoute(event.currentTarget.dataset.tab), args); | |
| 2353 | - }).removeClass('elementor-active').filter('[data-tab="' + tab + '"]').addClass('elementor-active'); | |
| 2354 | - } | |
| 2355 | - }, { | |
| 2356 | - key: "getActiveTabConfig", | |
| 2357 | - value: function getActiveTabConfig() { | |
| 2358 | - return this.tabs[this.currentTab] || {}; | |
| 2359 | - } | |
| 2360 | - }, { | |
| 2361 | - key: "getBodyClass", | |
| 2362 | - value: function getBodyClass(route) { | |
| 2363 | - return 'e-route-' + route.replace(/\//g, '-'); | |
| 2364 | - } | |
| 2365 | - | |
| 2366 | - /** | |
| 2367 | - * If command includes uppercase character convert it to lowercase and add `-`. | |
| 2368 | - * e.g: `CopyAll` is converted to `copy-all`. | |
| 2369 | - * | |
| 2370 | - * @param {string} commandName | |
| 2371 | - */ | |
| 2372 | - }, { | |
| 2373 | - key: "normalizeCommandName", | |
| 2374 | - value: function normalizeCommandName(commandName) { | |
| 2375 | - return commandName.replace(/[A-Z]/g, function (match, offset) { | |
| 2376 | - return (offset > 0 ? '-' : '') + match.toLowerCase(); | |
| 2377 | - }); | |
| 2378 | - } | |
| 2379 | - | |
| 2380 | - /** | |
| 2381 | - * @param {{}} commandsFromImport | |
| 2382 | - * @return {{}} imported commands | |
| 2383 | - */ | |
| 2384 | - }, { | |
| 2385 | - key: "importCommands", | |
| 2386 | - value: function importCommands(commandsFromImport) { | |
| 2387 | - var _this5 = this; | |
| 2388 | - var commands = {}; | |
| 2389 | - | |
| 2390 | - // Convert `Commands` to `ComponentBase` workable format. | |
| 2391 | - Object.entries(commandsFromImport).forEach(function (_ref1) { | |
| 2392 | - var _ref10 = (0, _slicedToArray2.default)(_ref1, 2), | |
| 2393 | - className = _ref10[0], | |
| 2394 | - Class = _ref10[1]; | |
| 2395 | - var command = _this5.normalizeCommandName(className); | |
| 2396 | - commands[command] = Class; | |
| 2397 | - }); | |
| 2398 | - return commands; | |
| 2399 | - } | |
| 2400 | - }, { | |
| 2401 | - key: "importHooks", | |
| 2402 | - value: function importHooks(hooksFromImport) { | |
| 2403 | - var hooks = {}; | |
| 2404 | - for (var key in hooksFromImport) { | |
| 2405 | - var hook = new hooksFromImport[key](); | |
| 2406 | - hooks[hook.getId()] = hook; | |
| 2407 | - } | |
| 2408 | - return hooks; | |
| 2409 | - } | |
| 2410 | - | |
| 2411 | - /** | |
| 2412 | - * Import & initialize the component's UI states. | |
| 2413 | - * Should be used inside `defaultUiState()`. | |
| 2414 | - * | |
| 2415 | - * @param {Object} statesFromImport - UI states from import. | |
| 2416 | - * | |
| 2417 | - * @return {Object} UI States | |
| 2418 | - */ | |
| 2419 | - }, { | |
| 2420 | - key: "importUiStates", | |
| 2421 | - value: function importUiStates(statesFromImport) { | |
| 2422 | - var _this6 = this; | |
| 2423 | - var uiStates = {}; | |
| 2424 | - Object.values(statesFromImport).forEach(function (className) { | |
| 2425 | - var uiState = new className(_this6); | |
| 2426 | - uiStates[uiState.getId()] = uiState; | |
| 2427 | - }); | |
| 2428 | - return uiStates; | |
| 2429 | - } | |
| 2430 | - | |
| 2431 | - /** | |
| 2432 | - * Set a UI state value. | |
| 2433 | - * TODO: Should we provide such function? Maybe the developer should implicitly pass the full state ID? | |
| 2434 | - * | |
| 2435 | - * @param {string} state - Non-prefixed state ID. | |
| 2436 | - * @param {*} value - New state value. | |
| 2437 | - * | |
| 2438 | - * @return {void} | |
| 2439 | - */ | |
| 2440 | - }, { | |
| 2441 | - key: "setUiState", | |
| 2442 | - value: function setUiState(state, value) { | |
| 2443 | - $e.uiStates.set("".concat(this.getNamespace(), "/").concat(state), value); | |
| 2444 | - } | |
| 2445 | - }, { | |
| 2446 | - key: "toggleRouteClass", | |
| 2447 | - value: function toggleRouteClass(route, state) { | |
| 2448 | - document.body.classList.toggle(this.getBodyClass(route), state); | |
| 2449 | - } | |
| 2450 | - }, { | |
| 2451 | - key: "toggleHistoryClass", | |
| 2452 | - value: function toggleHistoryClass() { | |
| 2453 | - document.body.classList.toggle('e-routes-has-history', !!$e.routes.getHistory(this.getServiceName()).length); | |
| 2454 | - } | |
| 2455 | - }]); | |
| 2456 | -}(_module.default); | |
| 2457 | - | |
| 2458 | -/***/ }), | |
| 2459 | - | |
| 2460 | -/***/ "../modules/web-cli/assets/js/modules/component-modal-base.js": | |
| 2461 | -/*!********************************************************************!*\ | |
| 2462 | - !*** ../modules/web-cli/assets/js/modules/component-modal-base.js ***! | |
| 2463 | - \********************************************************************/ | |
| 2464 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 2465 | - | |
| 2466 | -"use strict"; | |
| 2467 | - | |
| 2468 | - | |
| 2469 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 2470 | -var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"); | |
| 2471 | -Object.defineProperty(exports, "__esModule", ({ | |
| 2472 | - value: true | |
| 2473 | -})); | |
| 2474 | -exports["default"] = void 0; | |
| 2475 | -var _readOnlyError2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/readOnlyError */ "../node_modules/@babel/runtime/helpers/readOnlyError.js")); | |
| 2476 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 2477 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 2478 | -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 2479 | -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 2480 | -var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js")); | |
| 2481 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 2482 | -var _componentBase = _interopRequireDefault(__webpack_require__(/*! ./component-base */ "../modules/web-cli/assets/js/modules/component-base.js")); | |
| 2483 | -var commands = _interopRequireWildcard(__webpack_require__(/*! ./commands/ */ "../modules/web-cli/assets/js/modules/commands/index.js")); | |
| 2484 | -var _forceMethodImplementation = _interopRequireDefault(__webpack_require__(/*! ../utils/force-method-implementation */ "../modules/web-cli/assets/js/utils/force-method-implementation.js")); | |
| 2485 | -function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } | |
| 2486 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 2487 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 2488 | -function _superPropGet(t, o, e, r) { var p = (0, _get2.default)((0, _getPrototypeOf2.default)(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; } | |
| 2489 | -var ComponentModalBase = exports["default"] = /*#__PURE__*/function (_ComponentBase) { | |
| 2490 | - function ComponentModalBase() { | |
| 2491 | - (0, _classCallCheck2.default)(this, ComponentModalBase); | |
| 2492 | - return _callSuper(this, ComponentModalBase, arguments); | |
| 2493 | - } | |
| 2494 | - (0, _inherits2.default)(ComponentModalBase, _ComponentBase); | |
| 2495 | - return (0, _createClass2.default)(ComponentModalBase, [{ | |
| 2496 | - key: "registerAPI", | |
| 2497 | - value: function registerAPI() { | |
| 2498 | - var _this = this; | |
| 2499 | - _superPropGet(ComponentModalBase, "registerAPI", this, 3)([]); | |
| 2500 | - $e.shortcuts.register('esc', { | |
| 2501 | - scopes: [this.getNamespace()], | |
| 2502 | - callback: function callback() { | |
| 2503 | - return _this.close(); | |
| 2504 | - } | |
| 2505 | - }); | |
| 2506 | - } | |
| 2507 | - }, { | |
| 2508 | - key: "defaultCommands", | |
| 2509 | - value: function defaultCommands() { | |
| 2510 | - return this.importCommands(commands); | |
| 2511 | - } | |
| 2512 | - }, { | |
| 2513 | - key: "defaultRoutes", | |
| 2514 | - value: function defaultRoutes() { | |
| 2515 | - return { | |
| 2516 | - '': function _() {/* Nothing to do, it's already rendered. */} | |
| 2517 | - }; | |
| 2518 | - } | |
| 2519 | - }, { | |
| 2520 | - key: "open", | |
| 2521 | - value: function open() { | |
| 2522 | - var _this2 = this; | |
| 2523 | - if (!this.layout) { | |
| 2524 | - var layout = this.getModalLayout(); | |
| 2525 | - this.layout = new layout({ | |
| 2526 | - component: this | |
| 2527 | - }); | |
| 2528 | - this.layout.getModal().on('hide', function () { | |
| 2529 | - return _this2.close(); | |
| 2530 | - }); | |
| 2531 | - } | |
| 2532 | - this.layout.showModal(); | |
| 2533 | - return true; | |
| 2534 | - } | |
| 2535 | - }, { | |
| 2536 | - key: "close", | |
| 2537 | - value: function close() { | |
| 2538 | - if (!_superPropGet(ComponentModalBase, "close", this, 3)([])) { | |
| 2539 | - return false; | |
| 2540 | - } | |
| 2541 | - var close = elementor.hooks.applyFilters('component/modal/close', this.layout.getModal().hide.bind(this.layout.getModal()), this); | |
| 2542 | - close(); | |
| 2543 | - return true; | |
| 2544 | - } | |
| 2545 | - }, { | |
| 2546 | - key: "getModalLayout", | |
| 2547 | - value: function getModalLayout() { | |
| 2548 | - (0, _forceMethodImplementation.default)(); | |
| 2549 | - } | |
| 2550 | - }]); | |
| 2551 | -}(_componentBase.default); | |
| 2552 | - | |
| 2553 | -/***/ }), | |
| 2554 | - | |
| 2555 | -/***/ "../modules/web-cli/assets/js/modules/hook-break.js": | |
| 2556 | -/*!**********************************************************!*\ | |
| 2557 | - !*** ../modules/web-cli/assets/js/modules/hook-break.js ***! | |
| 2558 | - \**********************************************************/ | |
| 2559 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 2560 | - | |
| 2561 | -"use strict"; | |
| 2562 | - | |
| 2563 | - | |
| 2564 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 2565 | -Object.defineProperty(exports, "__esModule", ({ | |
| 2566 | - value: true | |
| 2567 | -})); | |
| 2568 | -exports["default"] = void 0; | |
| 2569 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 2570 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 2571 | -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 2572 | -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 2573 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 2574 | -var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/wrapNativeSuper */ "../node_modules/@babel/runtime/helpers/wrapNativeSuper.js")); | |
| 2575 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 2576 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 2577 | -var HookBreak = exports["default"] = /*#__PURE__*/function (_Error) { | |
| 2578 | - function HookBreak() { | |
| 2579 | - (0, _classCallCheck2.default)(this, HookBreak); | |
| 2580 | - return _callSuper(this, HookBreak, ['HookBreak']); | |
| 2581 | - } | |
| 2582 | - (0, _inherits2.default)(HookBreak, _Error); | |
| 2583 | - return (0, _createClass2.default)(HookBreak); | |
| 2584 | -}(/*#__PURE__*/(0, _wrapNativeSuper2.default)(Error)); | |
| 2585 | - | |
| 2586 | -/***/ }), | |
| 2587 | - | |
| 2588 | -/***/ "../modules/web-cli/assets/js/utils/console.js": | |
| 2589 | -/*!*****************************************************!*\ | |
| 2590 | - !*** ../modules/web-cli/assets/js/utils/console.js ***! | |
| 2591 | - \*****************************************************/ | |
| 2592 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 2593 | - | |
| 2594 | -"use strict"; | |
| 2595 | - | |
| 2596 | - | |
| 2597 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 2598 | -Object.defineProperty(exports, "__esModule", ({ | |
| 2599 | - value: true | |
| 2600 | -})); | |
| 2601 | -exports["default"] = void 0; | |
| 2602 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 2603 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 2604 | -var Console = exports["default"] = /*#__PURE__*/function () { | |
| 2605 | - function Console() { | |
| 2606 | - (0, _classCallCheck2.default)(this, Console); | |
| 2607 | - } | |
| 2608 | - return (0, _createClass2.default)(Console, null, [{ | |
| 2609 | - key: "error", | |
| 2610 | - value: function error(message) { | |
| 2611 | - // Show an error if devTools is available. | |
| 2612 | - if ($e.devTools) { | |
| 2613 | - $e.devTools.log.error(message); | |
| 2614 | - } | |
| 2615 | - | |
| 2616 | - // If not a 'Hook-Break' then show error. | |
| 2617 | - if (!(message instanceof $e.modules.HookBreak)) { | |
| 2618 | - // eslint-disable-next-line no-console | |
| 2619 | - console.error(message); | |
| 2620 | - } | |
| 2621 | - } | |
| 2622 | - }, { | |
| 2623 | - key: "warn", | |
| 2624 | - value: function warn() { | |
| 2625 | - var _console; | |
| 2626 | - var style = "font-size: 12px; background-image: url(\"".concat(elementorWebCliConfig.urls.assets, "images/logo-icon.png\"); background-repeat: no-repeat; background-size: contain;"); | |
| 2627 | - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { | |
| 2628 | - args[_key] = arguments[_key]; | |
| 2629 | - } | |
| 2630 | - args.unshift('%c %c', style, ''); | |
| 2631 | - (_console = console).warn.apply(_console, args); // eslint-disable-line no-console | |
| 2632 | - } | |
| 2633 | - }]); | |
| 2634 | -}(); | |
| 2635 | - | |
| 2636 | -/***/ }), | |
| 2637 | - | |
| 2638 | -/***/ "../modules/web-cli/assets/js/utils/deprecation.js": | |
| 2639 | -/*!*********************************************************!*\ | |
| 2640 | - !*** ../modules/web-cli/assets/js/utils/deprecation.js ***! | |
| 2641 | - \*********************************************************/ | |
| 2642 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 2643 | - | |
| 2644 | -"use strict"; | |
| 2645 | - | |
| 2646 | - | |
| 2647 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 2648 | -Object.defineProperty(exports, "__esModule", ({ | |
| 2649 | - value: true | |
| 2650 | -})); | |
| 2651 | -exports["default"] = void 0; | |
| 2652 | -var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); | |
| 2653 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 2654 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 2655 | -var _console = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/console */ "../modules/web-cli/assets/js/utils/console.js")); | |
| 2656 | -// Copied from `modules/dev-tools/assets/js/deprecation.js` | |
| 2657 | -/** | |
| 2658 | - * @typedef {Object} Version | |
| 2659 | - * @property {number} major1 The first number | |
| 2660 | - * @property {number} major2 The second number | |
| 2661 | - * @property {number} minor The third number | |
| 2662 | - * @property {string} build The fourth number | |
| 2663 | - */ | |
| 2664 | - | |
| 2665 | -var softDeprecated = function softDeprecated(name, version, replacement) { | |
| 2666 | - if (elementorWebCliConfig.isDebug) { | |
| 2667 | - deprecatedMessage('soft', name, version, replacement); | |
| 2668 | - } | |
| 2669 | -}; | |
| 2670 | -var hardDeprecated = function hardDeprecated(name, version, replacement) { | |
| 2671 | - deprecatedMessage('hard', name, version, replacement); | |
| 2672 | -}; | |
| 2673 | -var deprecatedMessage = function deprecatedMessage(type, name, version, replacement) { | |
| 2674 | - var message = "`".concat(name, "` is ").concat(type, " deprecated since ").concat(version); | |
| 2675 | - if (replacement) { | |
| 2676 | - message += " - Use `".concat(replacement, "` instead"); | |
| 2677 | - } | |
| 2678 | - _console.default.warn(message); | |
| 2679 | -}; | |
| 2680 | -var Deprecation = exports["default"] = /*#__PURE__*/function () { | |
| 2681 | - function Deprecation() { | |
| 2682 | - (0, _classCallCheck2.default)(this, Deprecation); | |
| 2683 | - } | |
| 2684 | - return (0, _createClass2.default)(Deprecation, null, [{ | |
| 2685 | - key: "deprecated", | |
| 2686 | - value: function deprecated(name, version, replacement) { | |
| 2687 | - if (this.isHardDeprecated(version)) { | |
| 2688 | - hardDeprecated(name, version, replacement); | |
| 2689 | - } else { | |
| 2690 | - softDeprecated(name, version, replacement); | |
| 2691 | - } | |
| 2692 | - } | |
| 2693 | - | |
| 2694 | - /** | |
| 2695 | - * @param {string} version | |
| 2696 | - * | |
| 2697 | - * @return {Version} | |
| 2698 | - */ | |
| 2699 | - }, { | |
| 2700 | - key: "parseVersion", | |
| 2701 | - value: function parseVersion(version) { | |
| 2702 | - var versionParts = version.split('.'); | |
| 2703 | - if (versionParts.length < 3 || versionParts.length > 4) { | |
| 2704 | - throw new RangeError('Invalid Semantic Version string provided'); | |
| 2705 | - } | |
| 2706 | - var _versionParts = (0, _slicedToArray2.default)(versionParts, 4), | |
| 2707 | - major1 = _versionParts[0], | |
| 2708 | - major2 = _versionParts[1], | |
| 2709 | - minor = _versionParts[2], | |
| 2710 | - _versionParts$ = _versionParts[3], | |
| 2711 | - build = _versionParts$ === void 0 ? '' : _versionParts$; | |
| 2712 | - return { | |
| 2713 | - major1: parseInt(major1), | |
| 2714 | - major2: parseInt(major2), | |
| 2715 | - minor: parseInt(minor), | |
| 2716 | - build: build | |
| 2717 | - }; | |
| 2718 | - } | |
| 2719 | - | |
| 2720 | - /** | |
| 2721 | - * Get total of major. | |
| 2722 | - * | |
| 2723 | - * Since `get_total_major` cannot determine how much really versions between 2.9.0 and 3.3.0 if there is 2.10.0 version for example, | |
| 2724 | - * versions with major2 more then 9 will be added to total. | |
| 2725 | - * | |
| 2726 | - * @param {Version} versionObj | |
| 2727 | - * | |
| 2728 | - * @return {number} | |
| 2729 | - */ | |
| 2730 | - }, { | |
| 2731 | - key: "getTotalMajor", | |
| 2732 | - value: function getTotalMajor(versionObj) { | |
| 2733 | - var total = parseInt("".concat(versionObj.major1).concat(versionObj.major2, "0")); | |
| 2734 | - total = Number((total / 10).toFixed(0)); | |
| 2735 | - if (versionObj.major2 > 9) { | |
| 2736 | - total = versionObj.major2 - 9; | |
| 2737 | - } | |
| 2738 | - return total; | |
| 2739 | - } | |
| 2740 | - | |
| 2741 | - /** | |
| 2742 | - * @param {string} version1 | |
| 2743 | - * @param {string} version2 | |
| 2744 | - * | |
| 2745 | - * @return {number} | |
| 2746 | - */ | |
| 2747 | - }, { | |
| 2748 | - key: "compareVersion", | |
| 2749 | - value: function compareVersion(version1, version2) { | |
| 2750 | - var _this = this; | |
| 2751 | - return [this.parseVersion(version1), this.parseVersion(version2)].map(function (versionObj) { | |
| 2752 | - return _this.getTotalMajor(versionObj); | |
| 2753 | - }).reduce(function (acc, major) { | |
| 2754 | - return acc - major; | |
| 2755 | - }); | |
| 2756 | - } | |
| 2757 | - | |
| 2758 | - /** | |
| 2759 | - * @param {string} version | |
| 2760 | - * | |
| 2761 | - * @return {boolean} | |
| 2762 | - */ | |
| 2763 | - }, { | |
| 2764 | - key: "isSoftDeprecated", | |
| 2765 | - value: function isSoftDeprecated(version) { | |
| 2766 | - var total = this.compareVersion(version, elementorWebCliConfig.version); | |
| 2767 | - return total <= 4; | |
| 2768 | - } | |
| 2769 | - | |
| 2770 | - /** | |
| 2771 | - * @param {string} version | |
| 2772 | - * @return {boolean} | |
| 2773 | - */ | |
| 2774 | - }, { | |
| 2775 | - key: "isHardDeprecated", | |
| 2776 | - value: function isHardDeprecated(version) { | |
| 2777 | - var total = this.compareVersion(version, elementorWebCliConfig.version); | |
| 2778 | - return total < 0 || total >= 8; | |
| 2779 | - } | |
| 2780 | - }]); | |
| 2781 | -}(); | |
| 2782 | - | |
| 2783 | -/***/ }), | |
| 2784 | - | |
| 2785 | -/***/ "../modules/web-cli/assets/js/utils/force-method-implementation.js": | |
| 2786 | -/*!*************************************************************************!*\ | |
| 2787 | - !*** ../modules/web-cli/assets/js/utils/force-method-implementation.js ***! | |
| 2788 | - \*************************************************************************/ | |
| 2789 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 2790 | - | |
| 2791 | -"use strict"; | |
| 2792 | - | |
| 2793 | - | |
| 2794 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 2795 | -Object.defineProperty(exports, "__esModule", ({ | |
| 2796 | - value: true | |
| 2797 | -})); | |
| 2798 | -exports["default"] = exports.ForceMethodImplementation = void 0; | |
| 2799 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 2800 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 2801 | -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 2802 | -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 2803 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 2804 | -var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/wrapNativeSuper */ "../node_modules/@babel/runtime/helpers/wrapNativeSuper.js")); | |
| 2805 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 2806 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 2807 | -// TODO: Copied from `assets/dev/js/modules/imports/force-method-implementation.js`; | |
| 2808 | -var ForceMethodImplementation = exports.ForceMethodImplementation = /*#__PURE__*/function (_Error) { | |
| 2809 | - function ForceMethodImplementation() { | |
| 2810 | - var _this; | |
| 2811 | - var info = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 2812 | - (0, _classCallCheck2.default)(this, ForceMethodImplementation); | |
| 2813 | - _this = _callSuper(this, ForceMethodImplementation, ["".concat(info.isStatic ? 'static ' : '').concat(info.fullName, "() should be implemented, please provide '").concat(info.functionName || info.fullName, "' functionality.")]); | |
| 2814 | - Error.captureStackTrace(_this, ForceMethodImplementation); | |
| 2815 | - return _this; | |
| 2816 | - } | |
| 2817 | - (0, _inherits2.default)(ForceMethodImplementation, _Error); | |
| 2818 | - return (0, _createClass2.default)(ForceMethodImplementation); | |
| 2819 | -}(/*#__PURE__*/(0, _wrapNativeSuper2.default)(Error)); | |
| 2820 | -var _default = exports["default"] = function _default() { | |
| 2821 | - var stack = Error().stack, | |
| 2822 | - caller = stack.split('\n')[2].trim(), | |
| 2823 | - callerName = caller.startsWith('at new') ? 'constructor' : caller.split(' ')[1], | |
| 2824 | - info = {}; | |
| 2825 | - info.functionName = callerName; | |
| 2826 | - info.fullName = callerName; | |
| 2827 | - if (info.functionName.includes('.')) { | |
| 2828 | - var parts = info.functionName.split('.'); | |
| 2829 | - info.className = parts[0]; | |
| 2830 | - info.functionName = parts[1]; | |
| 2831 | - } else { | |
| 2832 | - info.isStatic = true; | |
| 2833 | - } | |
| 2834 | - throw new ForceMethodImplementation(info); | |
| 2835 | -}; | |
| 2836 | - | |
| 2837 | -/***/ }), | |
| 2838 | - | |
| 2839 | -/***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js": | |
| 2840 | -/*!******************************************************************!*\ | |
| 2841 | - !*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***! | |
| 2842 | - \******************************************************************/ | |
| 2843 | -/***/ ((module) => { | |
| 2844 | - | |
| 2845 | -function _arrayLikeToArray(r, a) { | |
| 2846 | - (null == a || a > r.length) && (a = r.length); | |
| 2847 | - for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; | |
| 2848 | - return n; | |
| 2849 | -} | |
| 2850 | -module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2851 | - | |
| 2852 | -/***/ }), | |
| 2853 | - | |
| 2854 | -/***/ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js": | |
| 2855 | -/*!****************************************************************!*\ | |
| 2856 | - !*** ../node_modules/@babel/runtime/helpers/arrayWithHoles.js ***! | |
| 2857 | - \****************************************************************/ | |
| 2858 | -/***/ ((module) => { | |
| 2859 | - | |
| 2860 | -function _arrayWithHoles(r) { | |
| 2861 | - if (Array.isArray(r)) return r; | |
| 2862 | -} | |
| 2863 | -module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2864 | - | |
| 2865 | -/***/ }), | |
| 2866 | - | |
| 2867 | -/***/ "../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js": | |
| 2868 | -/*!*******************************************************************!*\ | |
| 2869 | - !*** ../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***! | |
| 2870 | - \*******************************************************************/ | |
| 2871 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2872 | - | |
| 2873 | -var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js"); | |
| 2874 | -function _arrayWithoutHoles(r) { | |
| 2875 | - if (Array.isArray(r)) return arrayLikeToArray(r); | |
| 2876 | -} | |
| 2877 | -module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2878 | - | |
| 2879 | -/***/ }), | |
| 2880 | - | |
| 2881 | -/***/ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js": | |
| 2882 | -/*!***********************************************************************!*\ | |
| 2883 | - !*** ../node_modules/@babel/runtime/helpers/assertThisInitialized.js ***! | |
| 2884 | - \***********************************************************************/ | |
| 2885 | -/***/ ((module) => { | |
| 2886 | - | |
| 2887 | -function _assertThisInitialized(e) { | |
| 2888 | - if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
| 2889 | - return e; | |
| 2890 | -} | |
| 2891 | -module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2892 | - | |
| 2893 | -/***/ }), | |
| 2894 | - | |
| 2895 | -/***/ "../node_modules/@babel/runtime/helpers/classCallCheck.js": | |
| 2896 | -/*!****************************************************************!*\ | |
| 2897 | - !*** ../node_modules/@babel/runtime/helpers/classCallCheck.js ***! | |
| 2898 | - \****************************************************************/ | |
| 2899 | -/***/ ((module) => { | |
| 2900 | - | |
| 2901 | -function _classCallCheck(a, n) { | |
| 2902 | - if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); | |
| 2903 | -} | |
| 2904 | -module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2905 | - | |
| 2906 | -/***/ }), | |
| 2907 | - | |
| 2908 | -/***/ "../node_modules/@babel/runtime/helpers/construct.js": | |
| 2909 | -/*!***********************************************************!*\ | |
| 2910 | - !*** ../node_modules/@babel/runtime/helpers/construct.js ***! | |
| 2911 | - \***********************************************************/ | |
| 2912 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2913 | - | |
| 2914 | -var isNativeReflectConstruct = __webpack_require__(/*! ./isNativeReflectConstruct.js */ "../node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js"); | |
| 2915 | -var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js"); | |
| 2916 | -function _construct(t, e, r) { | |
| 2917 | - if (isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments); | |
| 2918 | - var o = [null]; | |
| 2919 | - o.push.apply(o, e); | |
| 2920 | - var p = new (t.bind.apply(t, o))(); | |
| 2921 | - return r && setPrototypeOf(p, r.prototype), p; | |
| 2922 | -} | |
| 2923 | -module.exports = _construct, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2924 | - | |
| 2925 | -/***/ }), | |
| 2926 | - | |
| 2927 | -/***/ "../node_modules/@babel/runtime/helpers/createClass.js": | |
| 2928 | -/*!*************************************************************!*\ | |
| 2929 | - !*** ../node_modules/@babel/runtime/helpers/createClass.js ***! | |
| 2930 | - \*************************************************************/ | |
| 2931 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2932 | - | |
| 2933 | -var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); | |
| 2934 | -function _defineProperties(e, r) { | |
| 2935 | - for (var t = 0; t < r.length; t++) { | |
| 2936 | - var o = r[t]; | |
| 2937 | - o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o); | |
| 2938 | - } | |
| 2939 | -} | |
| 2940 | -function _createClass(e, r, t) { | |
| 2941 | - return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { | |
| 2942 | - writable: !1 | |
| 2943 | - }), e; | |
| 2944 | -} | |
| 2945 | -module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2946 | - | |
| 2947 | -/***/ }), | |
| 2948 | - | |
| 2949 | -/***/ "../node_modules/@babel/runtime/helpers/defineProperty.js": | |
| 2950 | -/*!****************************************************************!*\ | |
| 2951 | - !*** ../node_modules/@babel/runtime/helpers/defineProperty.js ***! | |
| 2952 | - \****************************************************************/ | |
| 2953 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2954 | - | |
| 2955 | -var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); | |
| 2956 | -function _defineProperty(e, r, t) { | |
| 2957 | - return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, { | |
| 2958 | - value: t, | |
| 2959 | - enumerable: !0, | |
| 2960 | - configurable: !0, | |
| 2961 | - writable: !0 | |
| 2962 | - }) : e[r] = t, e; | |
| 2963 | -} | |
| 2964 | -module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2965 | - | |
| 2966 | -/***/ }), | |
| 2967 | - | |
| 2968 | -/***/ "../node_modules/@babel/runtime/helpers/esm/defineProperty.js": | |
| 2969 | -/*!********************************************************************!*\ | |
| 2970 | - !*** ../node_modules/@babel/runtime/helpers/esm/defineProperty.js ***! | |
| 2971 | - \********************************************************************/ | |
| 2972 | -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { | |
| 2973 | - | |
| 2974 | -"use strict"; | |
| 2975 | -__webpack_require__.r(__webpack_exports__); | |
| 2976 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 2977 | -/* harmony export */ "default": () => (/* binding */ _defineProperty) | |
| 2978 | -/* harmony export */ }); | |
| 2979 | -/* harmony import */ var _toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js"); | |
| 2980 | - | |
| 2981 | -function _defineProperty(e, r, t) { | |
| 2982 | - return (r = (0,_toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__["default"])(r)) in e ? Object.defineProperty(e, r, { | |
| 2983 | - value: t, | |
| 2984 | - enumerable: !0, | |
| 2985 | - configurable: !0, | |
| 2986 | - writable: !0 | |
| 2987 | - }) : e[r] = t, e; | |
| 2988 | -} | |
| 2989 | - | |
| 2990 | - | |
| 2991 | -/***/ }), | |
| 2992 | - | |
| 2993 | -/***/ "../node_modules/@babel/runtime/helpers/esm/objectSpread2.js": | |
| 2994 | -/*!*******************************************************************!*\ | |
| 2995 | - !*** ../node_modules/@babel/runtime/helpers/esm/objectSpread2.js ***! | |
| 2996 | - \*******************************************************************/ | |
| 2997 | -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { | |
| 2998 | - | |
| 2999 | -"use strict"; | |
| 3000 | -__webpack_require__.r(__webpack_exports__); | |
| 3001 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3002 | -/* harmony export */ "default": () => (/* binding */ _objectSpread2) | |
| 3003 | -/* harmony export */ }); | |
| 3004 | -/* harmony import */ var _defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defineProperty.js */ "../node_modules/@babel/runtime/helpers/esm/defineProperty.js"); | |
| 3005 | - | |
| 3006 | -function ownKeys(e, r) { | |
| 3007 | - var t = Object.keys(e); | |
| 3008 | - if (Object.getOwnPropertySymbols) { | |
| 3009 | - var o = Object.getOwnPropertySymbols(e); | |
| 3010 | - r && (o = o.filter(function (r) { | |
| 3011 | - return Object.getOwnPropertyDescriptor(e, r).enumerable; | |
| 3012 | - })), t.push.apply(t, o); | |
| 3013 | - } | |
| 3014 | - return t; | |
| 3015 | -} | |
| 3016 | -function _objectSpread2(e) { | |
| 3017 | - for (var r = 1; r < arguments.length; r++) { | |
| 3018 | - var t = null != arguments[r] ? arguments[r] : {}; | |
| 3019 | - r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { | |
| 3020 | - (0,_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__["default"])(e, r, t[r]); | |
| 3021 | - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { | |
| 3022 | - Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); | |
| 3023 | - }); | |
| 3024 | - } | |
| 3025 | - return e; | |
| 3026 | -} | |
| 3027 | - | |
| 3028 | - | |
| 3029 | -/***/ }), | |
| 3030 | - | |
| 3031 | -/***/ "../node_modules/@babel/runtime/helpers/esm/toPrimitive.js": | |
| 3032 | -/*!*****************************************************************!*\ | |
| 3033 | - !*** ../node_modules/@babel/runtime/helpers/esm/toPrimitive.js ***! | |
| 3034 | - \*****************************************************************/ | |
| 3035 | -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { | |
| 3036 | - | |
| 3037 | -"use strict"; | |
| 3038 | -__webpack_require__.r(__webpack_exports__); | |
| 3039 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3040 | -/* harmony export */ "default": () => (/* binding */ toPrimitive) | |
| 3041 | -/* harmony export */ }); | |
| 3042 | -/* harmony import */ var _typeof_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/esm/typeof.js"); | |
| 3043 | - | |
| 3044 | -function toPrimitive(t, r) { | |
| 3045 | - if ("object" != (0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(t) || !t) return t; | |
| 3046 | - var e = t[Symbol.toPrimitive]; | |
| 3047 | - if (void 0 !== e) { | |
| 3048 | - var i = e.call(t, r || "default"); | |
| 3049 | - if ("object" != (0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(i)) return i; | |
| 3050 | - throw new TypeError("@@toPrimitive must return a primitive value."); | |
| 3051 | - } | |
| 3052 | - return ("string" === r ? String : Number)(t); | |
| 3053 | -} | |
| 3054 | - | |
| 3055 | - | |
| 3056 | -/***/ }), | |
| 3057 | - | |
| 3058 | -/***/ "../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js": | |
| 3059 | -/*!*******************************************************************!*\ | |
| 3060 | - !*** ../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js ***! | |
| 3061 | - \*******************************************************************/ | |
| 3062 | -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { | |
| 3063 | - | |
| 3064 | -"use strict"; | |
| 3065 | -__webpack_require__.r(__webpack_exports__); | |
| 3066 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3067 | -/* harmony export */ "default": () => (/* binding */ toPropertyKey) | |
| 3068 | -/* harmony export */ }); | |
| 3069 | -/* harmony import */ var _typeof_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/esm/typeof.js"); | |
| 3070 | -/* harmony import */ var _toPrimitive_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./toPrimitive.js */ "../node_modules/@babel/runtime/helpers/esm/toPrimitive.js"); | |
| 3071 | - | |
| 3072 | - | |
| 3073 | -function toPropertyKey(t) { | |
| 3074 | - var i = (0,_toPrimitive_js__WEBPACK_IMPORTED_MODULE_1__["default"])(t, "string"); | |
| 3075 | - return "symbol" == (0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(i) ? i : i + ""; | |
| 3076 | -} | |
| 3077 | - | |
| 3078 | - | |
| 3079 | -/***/ }), | |
| 3080 | - | |
| 3081 | -/***/ "../node_modules/@babel/runtime/helpers/esm/typeof.js": | |
| 3082 | -/*!************************************************************!*\ | |
| 3083 | - !*** ../node_modules/@babel/runtime/helpers/esm/typeof.js ***! | |
| 3084 | - \************************************************************/ | |
| 3085 | -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { | |
| 3086 | - | |
| 3087 | -"use strict"; | |
| 3088 | -__webpack_require__.r(__webpack_exports__); | |
| 3089 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3090 | -/* harmony export */ "default": () => (/* binding */ _typeof) | |
| 3091 | -/* harmony export */ }); | |
| 3092 | -function _typeof(o) { | |
| 3093 | - "@babel/helpers - typeof"; | |
| 3094 | - | |
| 3095 | - return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { | |
| 3096 | - return typeof o; | |
| 3097 | - } : function (o) { | |
| 3098 | - return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; | |
| 3099 | - }, _typeof(o); | |
| 3100 | -} | |
| 3101 | - | |
| 3102 | - | |
| 3103 | -/***/ }), | |
| 3104 | - | |
| 3105 | -/***/ "../node_modules/@babel/runtime/helpers/get.js": | |
| 3106 | -/*!*****************************************************!*\ | |
| 3107 | - !*** ../node_modules/@babel/runtime/helpers/get.js ***! | |
| 3108 | - \*****************************************************/ | |
| 3109 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 3110 | - | |
| 3111 | -var superPropBase = __webpack_require__(/*! ./superPropBase.js */ "../node_modules/@babel/runtime/helpers/superPropBase.js"); | |
| 3112 | -function _get() { | |
| 3113 | - return module.exports = _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { | |
| 3114 | - var p = superPropBase(e, t); | |
| 3115 | - if (p) { | |
| 3116 | - var n = Object.getOwnPropertyDescriptor(p, t); | |
| 3117 | - return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; | |
| 3118 | - } | |
| 3119 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _get.apply(null, arguments); | |
| 3120 | -} | |
| 3121 | -module.exports = _get, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3122 | - | |
| 3123 | -/***/ }), | |
| 3124 | - | |
| 3125 | -/***/ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js": | |
| 3126 | -/*!****************************************************************!*\ | |
| 3127 | - !*** ../node_modules/@babel/runtime/helpers/getPrototypeOf.js ***! | |
| 3128 | - \****************************************************************/ | |
| 3129 | -/***/ ((module) => { | |
| 3130 | - | |
| 3131 | -function _getPrototypeOf(t) { | |
| 3132 | - return module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { | |
| 3133 | - return t.__proto__ || Object.getPrototypeOf(t); | |
| 3134 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _getPrototypeOf(t); | |
| 3135 | -} | |
| 3136 | -module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3137 | - | |
| 3138 | -/***/ }), | |
| 3139 | - | |
| 3140 | -/***/ "../node_modules/@babel/runtime/helpers/inherits.js": | |
| 3141 | -/*!**********************************************************!*\ | |
| 3142 | - !*** ../node_modules/@babel/runtime/helpers/inherits.js ***! | |
| 3143 | - \**********************************************************/ | |
| 3144 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 3145 | - | |
| 3146 | -var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js"); | |
| 3147 | -function _inherits(t, e) { | |
| 3148 | - if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); | |
| 3149 | - t.prototype = Object.create(e && e.prototype, { | |
| 3150 | - constructor: { | |
| 3151 | - value: t, | |
| 3152 | - writable: !0, | |
| 3153 | - configurable: !0 | |
| 3154 | - } | |
| 3155 | - }), Object.defineProperty(t, "prototype", { | |
| 3156 | - writable: !1 | |
| 3157 | - }), e && setPrototypeOf(t, e); | |
| 3158 | -} | |
| 3159 | -module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3160 | - | |
| 3161 | -/***/ }), | |
| 3162 | - | |
| 3163 | -/***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js": | |
| 3164 | -/*!***********************************************************************!*\ | |
| 3165 | - !*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***! | |
| 3166 | - \***********************************************************************/ | |
| 3167 | -/***/ ((module) => { | |
| 3168 | - | |
| 3169 | -function _interopRequireDefault(e) { | |
| 3170 | - return e && e.__esModule ? e : { | |
| 3171 | - "default": e | |
| 3172 | - }; | |
| 3173 | -} | |
| 3174 | -module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3175 | - | |
| 3176 | -/***/ }), | |
| 3177 | - | |
| 3178 | -/***/ "../node_modules/@babel/runtime/helpers/isNativeFunction.js": | |
| 3179 | -/*!******************************************************************!*\ | |
| 3180 | - !*** ../node_modules/@babel/runtime/helpers/isNativeFunction.js ***! | |
| 3181 | - \******************************************************************/ | |
| 3182 | -/***/ ((module) => { | |
| 3183 | - | |
| 3184 | -function _isNativeFunction(t) { | |
| 3185 | - try { | |
| 3186 | - return -1 !== Function.toString.call(t).indexOf("[native code]"); | |
| 3187 | - } catch (n) { | |
| 3188 | - return "function" == typeof t; | |
| 3189 | - } | |
| 3190 | -} | |
| 3191 | -module.exports = _isNativeFunction, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3192 | - | |
| 3193 | -/***/ }), | |
| 3194 | - | |
| 3195 | -/***/ "../node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js": | |
| 3196 | -/*!**************************************************************************!*\ | |
| 3197 | - !*** ../node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js ***! | |
| 3198 | - \**************************************************************************/ | |
| 3199 | -/***/ ((module) => { | |
| 3200 | - | |
| 3201 | -function _isNativeReflectConstruct() { | |
| 3202 | - try { | |
| 3203 | - var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); | |
| 3204 | - } catch (t) {} | |
| 3205 | - return (module.exports = _isNativeReflectConstruct = function _isNativeReflectConstruct() { | |
| 3206 | - return !!t; | |
| 3207 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); | |
| 3208 | -} | |
| 3209 | -module.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3210 | - | |
| 3211 | -/***/ }), | |
| 3212 | - | |
| 3213 | -/***/ "../node_modules/@babel/runtime/helpers/iterableToArray.js": | |
| 3214 | -/*!*****************************************************************!*\ | |
| 3215 | - !*** ../node_modules/@babel/runtime/helpers/iterableToArray.js ***! | |
| 3216 | - \*****************************************************************/ | |
| 3217 | -/***/ ((module) => { | |
| 3218 | - | |
| 3219 | -function _iterableToArray(r) { | |
| 3220 | - if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); | |
| 3221 | -} | |
| 3222 | -module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3223 | - | |
| 3224 | -/***/ }), | |
| 3225 | - | |
| 3226 | -/***/ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js": | |
| 3227 | -/*!**********************************************************************!*\ | |
| 3228 | - !*** ../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***! | |
| 3229 | - \**********************************************************************/ | |
| 3230 | -/***/ ((module) => { | |
| 3231 | - | |
| 3232 | -function _iterableToArrayLimit(r, l) { | |
| 3233 | - var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; | |
| 3234 | - if (null != t) { | |
| 3235 | - var e, | |
| 3236 | - n, | |
| 3237 | - i, | |
| 3238 | - u, | |
| 3239 | - a = [], | |
| 3240 | - f = !0, | |
| 3241 | - o = !1; | |
| 3242 | - try { | |
| 3243 | - if (i = (t = t.call(r)).next, 0 === l) { | |
| 3244 | - if (Object(t) !== t) return; | |
| 3245 | - f = !1; | |
| 3246 | - } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); | |
| 3247 | - } catch (r) { | |
| 3248 | - o = !0, n = r; | |
| 3249 | - } finally { | |
| 3250 | - try { | |
| 3251 | - if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; | |
| 3252 | - } finally { | |
| 3253 | - if (o) throw n; | |
| 3254 | - } | |
| 3255 | - } | |
| 3256 | - return a; | |
| 3257 | - } | |
| 3258 | -} | |
| 3259 | -module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3260 | - | |
| 3261 | -/***/ }), | |
| 3262 | - | |
| 3263 | -/***/ "../node_modules/@babel/runtime/helpers/nonIterableRest.js": | |
| 3264 | -/*!*****************************************************************!*\ | |
| 3265 | - !*** ../node_modules/@babel/runtime/helpers/nonIterableRest.js ***! | |
| 3266 | - \*****************************************************************/ | |
| 3267 | -/***/ ((module) => { | |
| 3268 | - | |
| 3269 | -function _nonIterableRest() { | |
| 3270 | - throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | |
| 3271 | -} | |
| 3272 | -module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3273 | - | |
| 3274 | -/***/ }), | |
| 3275 | - | |
| 3276 | -/***/ "../node_modules/@babel/runtime/helpers/nonIterableSpread.js": | |
| 3277 | -/*!*******************************************************************!*\ | |
| 3278 | - !*** ../node_modules/@babel/runtime/helpers/nonIterableSpread.js ***! | |
| 3279 | - \*******************************************************************/ | |
| 3280 | -/***/ ((module) => { | |
| 3281 | - | |
| 3282 | -function _nonIterableSpread() { | |
| 3283 | - throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | |
| 3284 | -} | |
| 3285 | -module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3286 | - | |
| 3287 | -/***/ }), | |
| 3288 | - | |
| 3289 | -/***/ "../node_modules/@babel/runtime/helpers/objectWithoutProperties.js": | |
| 3290 | -/*!*************************************************************************!*\ | |
| 3291 | - !*** ../node_modules/@babel/runtime/helpers/objectWithoutProperties.js ***! | |
| 3292 | - \*************************************************************************/ | |
| 3293 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 3294 | - | |
| 3295 | -var objectWithoutPropertiesLoose = __webpack_require__(/*! ./objectWithoutPropertiesLoose.js */ "../node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js"); | |
| 3296 | -function _objectWithoutProperties(e, t) { | |
| 3297 | - if (null == e) return {}; | |
| 3298 | - var o, | |
| 3299 | - r, | |
| 3300 | - i = objectWithoutPropertiesLoose(e, t); | |
| 3301 | - if (Object.getOwnPropertySymbols) { | |
| 3302 | - var n = Object.getOwnPropertySymbols(e); | |
| 3303 | - for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); | |
| 3304 | - } | |
| 3305 | - return i; | |
| 3306 | -} | |
| 3307 | -module.exports = _objectWithoutProperties, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3308 | - | |
| 3309 | -/***/ }), | |
| 3310 | - | |
| 3311 | -/***/ "../node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js": | |
| 3312 | -/*!******************************************************************************!*\ | |
| 3313 | - !*** ../node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js ***! | |
| 3314 | - \******************************************************************************/ | |
| 3315 | -/***/ ((module) => { | |
| 3316 | - | |
| 3317 | -function _objectWithoutPropertiesLoose(r, e) { | |
| 3318 | - if (null == r) return {}; | |
| 3319 | - var t = {}; | |
| 3320 | - for (var n in r) if ({}.hasOwnProperty.call(r, n)) { | |
| 3321 | - if (-1 !== e.indexOf(n)) continue; | |
| 3322 | - t[n] = r[n]; | |
| 3323 | - } | |
| 3324 | - return t; | |
| 3325 | -} | |
| 3326 | -module.exports = _objectWithoutPropertiesLoose, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3327 | - | |
| 3328 | -/***/ }), | |
| 3329 | - | |
| 3330 | -/***/ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js": | |
| 3331 | -/*!***************************************************************************!*\ | |
| 3332 | - !*** ../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***! | |
| 3333 | - \***************************************************************************/ | |
| 3334 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 3335 | - | |
| 3336 | -var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 3337 | -var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js"); | |
| 3338 | -function _possibleConstructorReturn(t, e) { | |
| 3339 | - if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; | |
| 3340 | - if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); | |
| 3341 | - return assertThisInitialized(t); | |
| 3342 | -} | |
| 3343 | -module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3344 | - | |
| 3345 | -/***/ }), | |
| 3346 | - | |
| 3347 | -/***/ "../node_modules/@babel/runtime/helpers/readOnlyError.js": | |
| 3348 | -/*!***************************************************************!*\ | |
| 3349 | - !*** ../node_modules/@babel/runtime/helpers/readOnlyError.js ***! | |
| 3350 | - \***************************************************************/ | |
| 3351 | -/***/ ((module) => { | |
| 3352 | - | |
| 3353 | -function _readOnlyError(r) { | |
| 3354 | - throw new TypeError('"' + r + '" is read-only'); | |
| 3355 | -} | |
| 3356 | -module.exports = _readOnlyError, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3357 | - | |
| 3358 | -/***/ }), | |
| 3359 | - | |
| 3360 | -/***/ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js": | |
| 3361 | -/*!****************************************************************!*\ | |
| 3362 | - !*** ../node_modules/@babel/runtime/helpers/setPrototypeOf.js ***! | |
| 3363 | - \****************************************************************/ | |
| 3364 | -/***/ ((module) => { | |
| 3365 | - | |
| 3366 | -function _setPrototypeOf(t, e) { | |
| 3367 | - return module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { | |
| 3368 | - return t.__proto__ = e, t; | |
| 3369 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _setPrototypeOf(t, e); | |
| 3370 | -} | |
| 3371 | -module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3372 | - | |
| 3373 | -/***/ }), | |
| 3374 | - | |
| 3375 | -/***/ "../node_modules/@babel/runtime/helpers/slicedToArray.js": | |
| 3376 | -/*!***************************************************************!*\ | |
| 3377 | - !*** ../node_modules/@babel/runtime/helpers/slicedToArray.js ***! | |
| 3378 | - \***************************************************************/ | |
| 3379 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 3380 | - | |
| 3381 | -var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js"); | |
| 3382 | -var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js"); | |
| 3383 | -var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"); | |
| 3384 | -var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "../node_modules/@babel/runtime/helpers/nonIterableRest.js"); | |
| 3385 | -function _slicedToArray(r, e) { | |
| 3386 | - return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest(); | |
| 3387 | -} | |
| 3388 | -module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3389 | - | |
| 3390 | -/***/ }), | |
| 3391 | - | |
| 3392 | -/***/ "../node_modules/@babel/runtime/helpers/superPropBase.js": | |
| 3393 | -/*!***************************************************************!*\ | |
| 3394 | - !*** ../node_modules/@babel/runtime/helpers/superPropBase.js ***! | |
| 3395 | - \***************************************************************/ | |
| 3396 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 3397 | - | |
| 3398 | -var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"); | |
| 3399 | -function _superPropBase(t, o) { | |
| 3400 | - for (; !{}.hasOwnProperty.call(t, o) && null !== (t = getPrototypeOf(t));); | |
| 3401 | - return t; | |
| 3402 | -} | |
| 3403 | -module.exports = _superPropBase, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3404 | - | |
| 3405 | -/***/ }), | |
| 3406 | - | |
| 3407 | -/***/ "../node_modules/@babel/runtime/helpers/toConsumableArray.js": | |
| 3408 | -/*!*******************************************************************!*\ | |
| 3409 | - !*** ../node_modules/@babel/runtime/helpers/toConsumableArray.js ***! | |
| 3410 | - \*******************************************************************/ | |
| 3411 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 3412 | - | |
| 3413 | -var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js"); | |
| 3414 | -var iterableToArray = __webpack_require__(/*! ./iterableToArray.js */ "../node_modules/@babel/runtime/helpers/iterableToArray.js"); | |
| 3415 | -var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"); | |
| 3416 | -var nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread.js */ "../node_modules/@babel/runtime/helpers/nonIterableSpread.js"); | |
| 3417 | -function _toConsumableArray(r) { | |
| 3418 | - return arrayWithoutHoles(r) || iterableToArray(r) || unsupportedIterableToArray(r) || nonIterableSpread(); | |
| 3419 | -} | |
| 3420 | -module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3421 | - | |
| 3422 | -/***/ }), | |
| 3423 | - | |
| 3424 | -/***/ "../node_modules/@babel/runtime/helpers/toPrimitive.js": | |
| 3425 | -/*!*************************************************************!*\ | |
| 3426 | - !*** ../node_modules/@babel/runtime/helpers/toPrimitive.js ***! | |
| 3427 | - \*************************************************************/ | |
| 3428 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 3429 | - | |
| 3430 | -var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 3431 | -function toPrimitive(t, r) { | |
| 3432 | - if ("object" != _typeof(t) || !t) return t; | |
| 3433 | - var e = t[Symbol.toPrimitive]; | |
| 3434 | - if (void 0 !== e) { | |
| 3435 | - var i = e.call(t, r || "default"); | |
| 3436 | - if ("object" != _typeof(i)) return i; | |
| 3437 | - throw new TypeError("@@toPrimitive must return a primitive value."); | |
| 3438 | - } | |
| 3439 | - return ("string" === r ? String : Number)(t); | |
| 3440 | -} | |
| 3441 | -module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3442 | - | |
| 3443 | -/***/ }), | |
| 3444 | - | |
| 3445 | -/***/ "../node_modules/@babel/runtime/helpers/toPropertyKey.js": | |
| 3446 | -/*!***************************************************************!*\ | |
| 3447 | - !*** ../node_modules/@babel/runtime/helpers/toPropertyKey.js ***! | |
| 3448 | - \***************************************************************/ | |
| 3449 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 3450 | - | |
| 3451 | -var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 3452 | -var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ "../node_modules/@babel/runtime/helpers/toPrimitive.js"); | |
| 3453 | -function toPropertyKey(t) { | |
| 3454 | - var i = toPrimitive(t, "string"); | |
| 3455 | - return "symbol" == _typeof(i) ? i : i + ""; | |
| 3456 | -} | |
| 3457 | -module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3458 | - | |
| 3459 | -/***/ }), | |
| 3460 | - | |
| 3461 | -/***/ "../node_modules/@babel/runtime/helpers/typeof.js": | |
| 3462 | -/*!********************************************************!*\ | |
| 3463 | - !*** ../node_modules/@babel/runtime/helpers/typeof.js ***! | |
| 3464 | - \********************************************************/ | |
| 3465 | -/***/ ((module) => { | |
| 3466 | - | |
| 3467 | -function _typeof(o) { | |
| 3468 | - "@babel/helpers - typeof"; | |
| 3469 | - | |
| 3470 | - return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { | |
| 3471 | - return typeof o; | |
| 3472 | - } : function (o) { | |
| 3473 | - return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; | |
| 3474 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o); | |
| 3475 | -} | |
| 3476 | -module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3477 | - | |
| 3478 | -/***/ }), | |
| 3479 | - | |
| 3480 | -/***/ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js": | |
| 3481 | -/*!****************************************************************************!*\ | |
| 3482 | - !*** ../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***! | |
| 3483 | - \****************************************************************************/ | |
| 3484 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 3485 | - | |
| 3486 | -var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js"); | |
| 3487 | -function _unsupportedIterableToArray(r, a) { | |
| 3488 | - if (r) { | |
| 3489 | - if ("string" == typeof r) return arrayLikeToArray(r, a); | |
| 3490 | - var t = {}.toString.call(r).slice(8, -1); | |
| 3491 | - return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? arrayLikeToArray(r, a) : void 0; | |
| 3492 | - } | |
| 3493 | -} | |
| 3494 | -module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3495 | - | |
| 3496 | -/***/ }), | |
| 3497 | - | |
| 3498 | -/***/ "../node_modules/@babel/runtime/helpers/wrapNativeSuper.js": | |
| 3499 | -/*!*****************************************************************!*\ | |
| 3500 | - !*** ../node_modules/@babel/runtime/helpers/wrapNativeSuper.js ***! | |
| 3501 | - \*****************************************************************/ | |
| 3502 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 3503 | - | |
| 3504 | -var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"); | |
| 3505 | -var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js"); | |
| 3506 | -var isNativeFunction = __webpack_require__(/*! ./isNativeFunction.js */ "../node_modules/@babel/runtime/helpers/isNativeFunction.js"); | |
| 3507 | -var construct = __webpack_require__(/*! ./construct.js */ "../node_modules/@babel/runtime/helpers/construct.js"); | |
| 3508 | -function _wrapNativeSuper(t) { | |
| 3509 | - var r = "function" == typeof Map ? new Map() : void 0; | |
| 3510 | - return module.exports = _wrapNativeSuper = function _wrapNativeSuper(t) { | |
| 3511 | - if (null === t || !isNativeFunction(t)) return t; | |
| 3512 | - if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function"); | |
| 3513 | - if (void 0 !== r) { | |
| 3514 | - if (r.has(t)) return r.get(t); | |
| 3515 | - r.set(t, Wrapper); | |
| 3516 | - } | |
| 3517 | - function Wrapper() { | |
| 3518 | - return construct(t, arguments, getPrototypeOf(this).constructor); | |
| 3519 | - } | |
| 3520 | - return Wrapper.prototype = Object.create(t.prototype, { | |
| 3521 | - constructor: { | |
| 3522 | - value: Wrapper, | |
| 3523 | - enumerable: !1, | |
| 3524 | - writable: !0, | |
| 3525 | - configurable: !0 | |
| 3526 | - } | |
| 3527 | - }), setPrototypeOf(Wrapper, t); | |
| 3528 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _wrapNativeSuper(t); | |
| 3529 | -} | |
| 3530 | -module.exports = _wrapNativeSuper, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3531 | - | |
| 3532 | -/***/ }), | |
| 3533 | - | |
| 3534 | -/***/ "../node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js": | |
| 3535 | -/*!******************************************************************!*\ | |
| 3536 | - !*** ../node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js ***! | |
| 3537 | - \******************************************************************/ | |
| 3538 | -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | |
| 3539 | - | |
| 3540 | -"use strict"; | |
| 3541 | -__webpack_require__.r(__webpack_exports__); | |
| 3542 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3543 | -/* harmony export */ EnhancerArray: () => (/* binding */ EnhancerArray), | |
| 3544 | -/* harmony export */ MiddlewareArray: () => (/* binding */ MiddlewareArray), | |
| 3545 | -/* harmony export */ SHOULD_AUTOBATCH: () => (/* binding */ SHOULD_AUTOBATCH), | |
| 3546 | -/* harmony export */ TaskAbortError: () => (/* binding */ TaskAbortError), | |
| 3547 | -/* harmony export */ __DO_NOT_USE__ActionTypes: () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_1__.__DO_NOT_USE__ActionTypes), | |
| 3548 | -/* harmony export */ addListener: () => (/* binding */ addListener), | |
| 3549 | -/* harmony export */ applyMiddleware: () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_1__.applyMiddleware), | |
| 3550 | -/* harmony export */ autoBatchEnhancer: () => (/* binding */ autoBatchEnhancer), | |
| 3551 | -/* harmony export */ bindActionCreators: () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_1__.bindActionCreators), | |
| 3552 | -/* harmony export */ clearAllListeners: () => (/* binding */ clearAllListeners), | |
| 3553 | -/* harmony export */ combineReducers: () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_1__.combineReducers), | |
| 3554 | -/* harmony export */ compose: () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_1__.compose), | |
| 3555 | -/* harmony export */ configureStore: () => (/* binding */ configureStore), | |
| 3556 | -/* harmony export */ createAction: () => (/* binding */ createAction), | |
| 3557 | -/* harmony export */ createActionCreatorInvariantMiddleware: () => (/* binding */ createActionCreatorInvariantMiddleware), | |
| 3558 | -/* harmony export */ createAsyncThunk: () => (/* binding */ createAsyncThunk), | |
| 3559 | -/* harmony export */ createDraftSafeSelector: () => (/* binding */ createDraftSafeSelector), | |
| 3560 | -/* harmony export */ createEntityAdapter: () => (/* binding */ createEntityAdapter), | |
| 3561 | -/* harmony export */ createImmutableStateInvariantMiddleware: () => (/* binding */ createImmutableStateInvariantMiddleware), | |
| 3562 | -/* harmony export */ createListenerMiddleware: () => (/* binding */ createListenerMiddleware), | |
| 3563 | -/* harmony export */ createNextState: () => (/* reexport safe */ immer__WEBPACK_IMPORTED_MODULE_0__["default"]), | |
| 3564 | -/* harmony export */ createReducer: () => (/* binding */ createReducer), | |
| 3565 | -/* harmony export */ createSelector: () => (/* reexport safe */ reselect__WEBPACK_IMPORTED_MODULE_2__.createSelector), | |
| 3566 | -/* harmony export */ createSerializableStateInvariantMiddleware: () => (/* binding */ createSerializableStateInvariantMiddleware), | |
| 3567 | -/* harmony export */ createSlice: () => (/* binding */ createSlice), | |
| 3568 | -/* harmony export */ createStore: () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_1__.createStore), | |
| 3569 | -/* harmony export */ current: () => (/* reexport safe */ immer__WEBPACK_IMPORTED_MODULE_0__.current), | |
| 3570 | -/* harmony export */ findNonSerializableValue: () => (/* binding */ findNonSerializableValue), | |
| 3571 | -/* harmony export */ freeze: () => (/* reexport safe */ immer__WEBPACK_IMPORTED_MODULE_0__.freeze), | |
| 3572 | -/* harmony export */ getDefaultMiddleware: () => (/* binding */ getDefaultMiddleware), | |
| 3573 | -/* harmony export */ getType: () => (/* binding */ getType), | |
| 3574 | -/* harmony export */ isAction: () => (/* binding */ isAction), | |
| 3575 | -/* harmony export */ isActionCreator: () => (/* binding */ isActionCreator), | |
| 3576 | -/* harmony export */ isAllOf: () => (/* binding */ isAllOf), | |
| 3577 | -/* harmony export */ isAnyOf: () => (/* binding */ isAnyOf), | |
| 3578 | -/* harmony export */ isAsyncThunkAction: () => (/* binding */ isAsyncThunkAction), | |
| 3579 | -/* harmony export */ isDraft: () => (/* reexport safe */ immer__WEBPACK_IMPORTED_MODULE_0__.isDraft), | |
| 3580 | -/* harmony export */ isFluxStandardAction: () => (/* binding */ isFSA), | |
| 3581 | -/* harmony export */ isFulfilled: () => (/* binding */ isFulfilled), | |
| 3582 | -/* harmony export */ isImmutableDefault: () => (/* binding */ isImmutableDefault), | |
| 3583 | -/* harmony export */ isPending: () => (/* binding */ isPending), | |
| 3584 | -/* harmony export */ isPlain: () => (/* binding */ isPlain), | |
| 3585 | -/* harmony export */ isPlainObject: () => (/* binding */ isPlainObject), | |
| 3586 | -/* harmony export */ isRejected: () => (/* binding */ isRejected), | |
| 3587 | -/* harmony export */ isRejectedWithValue: () => (/* binding */ isRejectedWithValue), | |
| 3588 | -/* harmony export */ legacy_createStore: () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_1__.legacy_createStore), | |
| 3589 | -/* harmony export */ miniSerializeError: () => (/* binding */ miniSerializeError), | |
| 3590 | -/* harmony export */ nanoid: () => (/* binding */ nanoid), | |
| 3591 | -/* harmony export */ original: () => (/* reexport safe */ immer__WEBPACK_IMPORTED_MODULE_0__.original), | |
| 3592 | -/* harmony export */ prepareAutoBatched: () => (/* binding */ prepareAutoBatched), | |
| 3593 | -/* harmony export */ removeListener: () => (/* binding */ removeListener), | |
| 3594 | -/* harmony export */ unwrapResult: () => (/* binding */ unwrapResult) | |
| 3595 | -/* harmony export */ }); | |
| 3596 | -/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! immer */ "../node_modules/immer/dist/immer.esm.mjs"); | |
| 3597 | -/* harmony import */ var redux__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! redux */ "../node_modules/redux/es/redux.js"); | |
| 3598 | -/* harmony import */ var reselect__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! reselect */ "../node_modules/reselect/es/index.js"); | |
| 3599 | -/* harmony import */ var redux_thunk__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! redux-thunk */ "../node_modules/redux-thunk/es/index.js"); | |
| 3600 | -var __extends = (undefined && undefined.__extends) || (function () { | |
| 3601 | - var extendStatics = function (d, b) { | |
| 3602 | - extendStatics = Object.setPrototypeOf || | |
| 3603 | - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | |
| 3604 | - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | |
| 3605 | - return extendStatics(d, b); | |
| 3606 | - }; | |
| 3607 | - return function (d, b) { | |
| 3608 | - if (typeof b !== "function" && b !== null) | |
| 3609 | - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | |
| 3610 | - extendStatics(d, b); | |
| 3611 | - function __() { this.constructor = d; } | |
| 3612 | - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | |
| 3613 | - }; | |
| 3614 | -})(); | |
| 3615 | -var __generator = (undefined && undefined.__generator) || function (thisArg, body) { | |
| 3616 | - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; | |
| 3617 | - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; | |
| 3618 | - function verb(n) { return function (v) { return step([n, v]); }; } | |
| 3619 | - function step(op) { | |
| 3620 | - if (f) throw new TypeError("Generator is already executing."); | |
| 3621 | - while (_) try { | |
| 3622 | - 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; | |
| 3623 | - if (y = 0, t) op = [op[0] & 2, t.value]; | |
| 3624 | - switch (op[0]) { | |
| 3625 | - case 0: case 1: t = op; break; | |
| 3626 | - case 4: _.label++; return { value: op[1], done: false }; | |
| 3627 | - case 5: _.label++; y = op[1]; op = [0]; continue; | |
| 3628 | - case 7: op = _.ops.pop(); _.trys.pop(); continue; | |
| 3629 | - default: | |
| 3630 | - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } | |
| 3631 | - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } | |
| 3632 | - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } | |
| 3633 | - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } | |
| 3634 | - if (t[2]) _.ops.pop(); | |
| 3635 | - _.trys.pop(); continue; | |
| 3636 | - } | |
| 3637 | - op = body.call(thisArg, _); | |
| 3638 | - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } | |
| 3639 | - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; | |
| 3640 | - } | |
| 3641 | -}; | |
| 3642 | -var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from) { | |
| 3643 | - for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) | |
| 3644 | - to[j] = from[i]; | |
| 3645 | - return to; | |
| 3646 | -}; | |
| 3647 | -var __defProp = Object.defineProperty; | |
| 3648 | -var __defProps = Object.defineProperties; | |
| 3649 | -var __getOwnPropDescs = Object.getOwnPropertyDescriptors; | |
| 3650 | -var __getOwnPropSymbols = Object.getOwnPropertySymbols; | |
| 3651 | -var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 3652 | -var __propIsEnum = Object.prototype.propertyIsEnumerable; | |
| 3653 | -var __defNormalProp = function (obj, key, value) { return key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value: value }) : obj[key] = value; }; | |
| 3654 | -var __spreadValues = function (a, b) { | |
| 3655 | - for (var prop in b || (b = {})) | |
| 3656 | - if (__hasOwnProp.call(b, prop)) | |
| 3657 | - __defNormalProp(a, prop, b[prop]); | |
| 3658 | - if (__getOwnPropSymbols) | |
| 3659 | - for (var _i = 0, _c = __getOwnPropSymbols(b); _i < _c.length; _i++) { | |
| 3660 | - var prop = _c[_i]; | |
| 3661 | - if (__propIsEnum.call(b, prop)) | |
| 3662 | - __defNormalProp(a, prop, b[prop]); | |
| 3663 | - } | |
| 3664 | - return a; | |
| 3665 | -}; | |
| 3666 | -var __spreadProps = function (a, b) { return __defProps(a, __getOwnPropDescs(b)); }; | |
| 3667 | -var __async = function (__this, __arguments, generator) { | |
| 3668 | - return new Promise(function (resolve, reject) { | |
| 3669 | - var fulfilled = function (value) { | |
| 3670 | - try { | |
| 3671 | - step(generator.next(value)); | |
| 3672 | - } | |
| 3673 | - catch (e) { | |
| 3674 | - reject(e); | |
| 3675 | - } | |
| 3676 | - }; | |
| 3677 | - var rejected = function (value) { | |
| 3678 | - try { | |
| 3679 | - step(generator.throw(value)); | |
| 3680 | - } | |
| 3681 | - catch (e) { | |
| 3682 | - reject(e); | |
| 3683 | - } | |
| 3684 | - }; | |
| 3685 | - var step = function (x) { return x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected); }; | |
| 3686 | - step((generator = generator.apply(__this, __arguments)).next()); | |
| 3687 | - }); | |
| 3688 | -}; | |
| 3689 | -// src/index.ts | |
| 3690 | - | |
| 3691 | - | |
| 3692 | - | |
| 3693 | - | |
| 3694 | -// src/createDraftSafeSelector.ts | |
| 3695 | - | |
| 3696 | - | |
| 3697 | -var createDraftSafeSelector = function () { | |
| 3698 | - var args = []; | |
| 3699 | - for (var _i = 0; _i < arguments.length; _i++) { | |
| 3700 | - args[_i] = arguments[_i]; | |
| 3701 | - } | |
| 3702 | - var selector = reselect__WEBPACK_IMPORTED_MODULE_2__.createSelector.apply(void 0, args); | |
| 3703 | - var wrappedSelector = function (value) { | |
| 3704 | - var rest = []; | |
| 3705 | - for (var _i = 1; _i < arguments.length; _i++) { | |
| 3706 | - rest[_i - 1] = arguments[_i]; | |
| 3707 | - } | |
| 3708 | - return selector.apply(void 0, __spreadArray([(0,immer__WEBPACK_IMPORTED_MODULE_0__.isDraft)(value) ? (0,immer__WEBPACK_IMPORTED_MODULE_0__.current)(value) : value], rest)); | |
| 3709 | - }; | |
| 3710 | - return wrappedSelector; | |
| 3711 | -}; | |
| 3712 | -// src/configureStore.ts | |
| 3713 | - | |
| 3714 | -// src/devtoolsExtension.ts | |
| 3715 | - | |
| 3716 | -var composeWithDevTools = typeof window !== "undefined" && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ : function () { | |
| 3717 | - if (arguments.length === 0) | |
| 3718 | - return void 0; | |
| 3719 | - if (typeof arguments[0] === "object") | |
| 3720 | - return redux__WEBPACK_IMPORTED_MODULE_1__.compose; | |
| 3721 | - return redux__WEBPACK_IMPORTED_MODULE_1__.compose.apply(null, arguments); | |
| 3722 | -}; | |
| 3723 | -var devToolsEnhancer = typeof window !== "undefined" && window.__REDUX_DEVTOOLS_EXTENSION__ ? window.__REDUX_DEVTOOLS_EXTENSION__ : function () { | |
| 3724 | - return function (noop2) { | |
| 3725 | - return noop2; | |
| 3726 | - }; | |
| 3727 | -}; | |
| 3728 | -// src/isPlainObject.ts | |
| 3729 | -function isPlainObject(value) { | |
| 3730 | - if (typeof value !== "object" || value === null) | |
| 3731 | - return false; | |
| 3732 | - var proto = Object.getPrototypeOf(value); | |
| 3733 | - if (proto === null) | |
| 3734 | - return true; | |
| 3735 | - var baseProto = proto; | |
| 3736 | - while (Object.getPrototypeOf(baseProto) !== null) { | |
| 3737 | - baseProto = Object.getPrototypeOf(baseProto); | |
| 3738 | - } | |
| 3739 | - return proto === baseProto; | |
| 3740 | -} | |
| 3741 | -// src/getDefaultMiddleware.ts | |
| 3742 | - | |
| 3743 | -// src/tsHelpers.ts | |
| 3744 | -var hasMatchFunction = function (v) { | |
| 3745 | - return v && typeof v.match === "function"; | |
| 3746 | -}; | |
| 3747 | -// src/createAction.ts | |
| 3748 | -function createAction(type, prepareAction) { | |
| 3749 | - function actionCreator() { | |
| 3750 | - var args = []; | |
| 3751 | - for (var _i = 0; _i < arguments.length; _i++) { | |
| 3752 | - args[_i] = arguments[_i]; | |
| 3753 | - } | |
| 3754 | - if (prepareAction) { | |
| 3755 | - var prepared = prepareAction.apply(void 0, args); | |
| 3756 | - if (!prepared) { | |
| 3757 | - throw new Error("prepareAction did not return an object"); | |
| 3758 | - } | |
| 3759 | - return __spreadValues(__spreadValues({ | |
| 3760 | - type: type, | |
| 3761 | - payload: prepared.payload | |
| 3762 | - }, "meta" in prepared && { meta: prepared.meta }), "error" in prepared && { error: prepared.error }); | |
| 3763 | - } | |
| 3764 | - return { type: type, payload: args[0] }; | |
| 3765 | - } | |
| 3766 | - actionCreator.toString = function () { return "" + type; }; | |
| 3767 | - actionCreator.type = type; | |
| 3768 | - actionCreator.match = function (action) { return action.type === type; }; | |
| 3769 | - return actionCreator; | |
| 3770 | -} | |
| 3771 | -function isAction(action) { | |
| 3772 | - return isPlainObject(action) && "type" in action; | |
| 3773 | -} | |
| 3774 | -function isActionCreator(action) { | |
| 3775 | - return typeof action === "function" && "type" in action && hasMatchFunction(action); | |
| 3776 | -} | |
| 3777 | -function isFSA(action) { | |
| 3778 | - return isAction(action) && typeof action.type === "string" && Object.keys(action).every(isValidKey); | |
| 3779 | -} | |
| 3780 | -function isValidKey(key) { | |
| 3781 | - return ["type", "payload", "error", "meta"].indexOf(key) > -1; | |
| 3782 | -} | |
| 3783 | -function getType(actionCreator) { | |
| 3784 | - return "" + actionCreator; | |
| 3785 | -} | |
| 3786 | -// src/actionCreatorInvariantMiddleware.ts | |
| 3787 | -function getMessage(type) { | |
| 3788 | - var splitType = type ? ("" + type).split("/") : []; | |
| 3789 | - var actionName = splitType[splitType.length - 1] || "actionCreator"; | |
| 3790 | - 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."; | |
| 3791 | -} | |
| 3792 | -function createActionCreatorInvariantMiddleware(options) { | |
| 3793 | - if (options === void 0) { options = {}; } | |
| 3794 | - if (false) // removed by dead control flow | |
| 3795 | -{} | |
| 3796 | - var _c = options.isActionCreator, isActionCreator2 = _c === void 0 ? isActionCreator : _c; | |
| 3797 | - return function () { return function (next) { return function (action) { | |
| 3798 | - if (isActionCreator2(action)) { | |
| 3799 | - console.warn(getMessage(action.type)); | |
| 3800 | - } | |
| 3801 | - return next(action); | |
| 3802 | - }; }; }; | |
| 3803 | -} | |
| 3804 | -// src/utils.ts | |
| 3805 | - | |
| 3806 | -function getTimeMeasureUtils(maxDelay, fnName) { | |
| 3807 | - var elapsed = 0; | |
| 3808 | - return { | |
| 3809 | - measureTime: function (fn) { | |
| 3810 | - var started = Date.now(); | |
| 3811 | - try { | |
| 3812 | - return fn(); | |
| 3813 | - } | |
| 3814 | - finally { | |
| 3815 | - var finished = Date.now(); | |
| 3816 | - elapsed += finished - started; | |
| 3817 | - } | |
| 3818 | - }, | |
| 3819 | - warnIfExceeded: function () { | |
| 3820 | - if (elapsed > maxDelay) { | |
| 3821 | - 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."); | |
| 3822 | - } | |
| 3823 | - } | |
| 3824 | - }; | |
| 3825 | -} | |
| 3826 | -var MiddlewareArray = /** @class */ (function (_super) { | |
| 3827 | - __extends(MiddlewareArray, _super); | |
| 3828 | - function MiddlewareArray() { | |
| 3829 | - var args = []; | |
| 3830 | - for (var _i = 0; _i < arguments.length; _i++) { | |
| 3831 | - args[_i] = arguments[_i]; | |
| 3832 | - } | |
| 3833 | - var _this = _super.apply(this, args) || this; | |
| 3834 | - Object.setPrototypeOf(_this, MiddlewareArray.prototype); | |
| 3835 | - return _this; | |
| 3836 | - } | |
| 3837 | - Object.defineProperty(MiddlewareArray, Symbol.species, { | |
| 3838 | - get: function () { | |
| 3839 | - return MiddlewareArray; | |
| 3840 | - }, | |
| 3841 | - enumerable: false, | |
| 3842 | - configurable: true | |
| 3843 | - }); | |
| 3844 | - MiddlewareArray.prototype.concat = function () { | |
| 3845 | - var arr = []; | |
| 3846 | - for (var _i = 0; _i < arguments.length; _i++) { | |
| 3847 | - arr[_i] = arguments[_i]; | |
| 3848 | - } | |
| 3849 | - return _super.prototype.concat.apply(this, arr); | |
| 3850 | - }; | |
| 3851 | - MiddlewareArray.prototype.prepend = function () { | |
| 3852 | - var arr = []; | |
| 3853 | - for (var _i = 0; _i < arguments.length; _i++) { | |
| 3854 | - arr[_i] = arguments[_i]; | |
| 3855 | - } | |
| 3856 | - if (arr.length === 1 && Array.isArray(arr[0])) { | |
| 3857 | - return new (MiddlewareArray.bind.apply(MiddlewareArray, __spreadArray([void 0], arr[0].concat(this))))(); | |
| 3858 | - } | |
| 3859 | - return new (MiddlewareArray.bind.apply(MiddlewareArray, __spreadArray([void 0], arr.concat(this))))(); | |
| 3860 | - }; | |
| 3861 | - return MiddlewareArray; | |
| 3862 | -}(Array)); | |
| 3863 | -var EnhancerArray = /** @class */ (function (_super) { | |
| 3864 | - __extends(EnhancerArray, _super); | |
| 3865 | - function EnhancerArray() { | |
| 3866 | - var args = []; | |
| 3867 | - for (var _i = 0; _i < arguments.length; _i++) { | |
| 3868 | - args[_i] = arguments[_i]; | |
| 3869 | - } | |
| 3870 | - var _this = _super.apply(this, args) || this; | |
| 3871 | - Object.setPrototypeOf(_this, EnhancerArray.prototype); | |
| 3872 | - return _this; | |
| 3873 | - } | |
| 3874 | - Object.defineProperty(EnhancerArray, Symbol.species, { | |
| 3875 | - get: function () { | |
| 3876 | - return EnhancerArray; | |
| 3877 | - }, | |
| 3878 | - enumerable: false, | |
| 3879 | - configurable: true | |
| 3880 | - }); | |
| 3881 | - EnhancerArray.prototype.concat = function () { | |
| 3882 | - var arr = []; | |
| 3883 | - for (var _i = 0; _i < arguments.length; _i++) { | |
| 3884 | - arr[_i] = arguments[_i]; | |
| 3885 | - } | |
| 3886 | - return _super.prototype.concat.apply(this, arr); | |
| 3887 | - }; | |
| 3888 | - EnhancerArray.prototype.prepend = function () { | |
| 3889 | - var arr = []; | |
| 3890 | - for (var _i = 0; _i < arguments.length; _i++) { | |
| 3891 | - arr[_i] = arguments[_i]; | |
| 3892 | - } | |
| 3893 | - if (arr.length === 1 && Array.isArray(arr[0])) { | |
| 3894 | - return new (EnhancerArray.bind.apply(EnhancerArray, __spreadArray([void 0], arr[0].concat(this))))(); | |
| 3895 | - } | |
| 3896 | - return new (EnhancerArray.bind.apply(EnhancerArray, __spreadArray([void 0], arr.concat(this))))(); | |
| 3897 | - }; | |
| 3898 | - return EnhancerArray; | |
| 3899 | -}(Array)); | |
| 3900 | -function freezeDraftable(val) { | |
| 3901 | - return (0,immer__WEBPACK_IMPORTED_MODULE_0__.isDraftable)(val) ? (0,immer__WEBPACK_IMPORTED_MODULE_0__["default"])(val, function () { | |
| 3902 | - }) : val; | |
| 3903 | -} | |
| 3904 | -// src/immutableStateInvariantMiddleware.ts | |
| 3905 | -var isProduction = "development" === "production"; | |
| 3906 | -var prefix = "Invariant failed"; | |
| 3907 | -function invariant(condition, message) { | |
| 3908 | - if (condition) { | |
| 3909 | - return; | |
| 3910 | - } | |
| 3911 | - if (isProduction) { | |
| 3912 | - throw new Error(prefix); | |
| 3913 | - } | |
| 3914 | - throw new Error(prefix + ": " + (message || "")); | |
| 3915 | -} | |
| 3916 | -function stringify(obj, serializer, indent, decycler) { | |
| 3917 | - return JSON.stringify(obj, getSerialize(serializer, decycler), indent); | |
| 3918 | -} | |
| 3919 | -function getSerialize(serializer, decycler) { | |
| 3920 | - var stack = [], keys = []; | |
| 3921 | - if (!decycler) | |
| 3922 | - decycler = function (_, value) { | |
| 3923 | - if (stack[0] === value) | |
| 3924 | - return "[Circular ~]"; | |
| 3925 | - return "[Circular ~." + keys.slice(0, stack.indexOf(value)).join(".") + "]"; | |
| 3926 | - }; | |
| 3927 | - return function (key, value) { | |
| 3928 | - if (stack.length > 0) { | |
| 3929 | - var thisPos = stack.indexOf(this); | |
| 3930 | - ~thisPos ? stack.splice(thisPos + 1) : stack.push(this); | |
| 3931 | - ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key); | |
| 3932 | - if (~stack.indexOf(value)) | |
| 3933 | - value = decycler.call(this, key, value); | |
| 3934 | - } | |
| 3935 | - else | |
| 3936 | - stack.push(value); | |
| 3937 | - return serializer == null ? value : serializer.call(this, key, value); | |
| 3938 | - }; | |
| 3939 | -} | |
| 3940 | -function isImmutableDefault(value) { | |
| 3941 | - return typeof value !== "object" || value == null || Object.isFrozen(value); | |
| 3942 | -} | |
| 3943 | -function trackForMutations(isImmutable, ignorePaths, obj) { | |
| 3944 | - var trackedProperties = trackProperties(isImmutable, ignorePaths, obj); | |
| 3945 | - return { | |
| 3946 | - detectMutations: function () { | |
| 3947 | - return detectMutations(isImmutable, ignorePaths, trackedProperties, obj); | |
| 3948 | - } | |
| 3949 | - }; | |
| 3950 | -} | |
| 3951 | -function trackProperties(isImmutable, ignorePaths, obj, path, checkedObjects) { | |
| 3952 | - if (ignorePaths === void 0) { ignorePaths = []; } | |
| 3953 | - if (path === void 0) { path = ""; } | |
| 3954 | - if (checkedObjects === void 0) { checkedObjects = new Set(); } | |
| 3955 | - var tracked = { value: obj }; | |
| 3956 | - if (!isImmutable(obj) && !checkedObjects.has(obj)) { | |
| 3957 | - checkedObjects.add(obj); | |
| 3958 | - tracked.children = {}; | |
| 3959 | - for (var key in obj) { | |
| 3960 | - var childPath = path ? path + "." + key : key; | |
| 3961 | - if (ignorePaths.length && ignorePaths.indexOf(childPath) !== -1) { | |
| 3962 | - continue; | |
| 3963 | - } | |
| 3964 | - tracked.children[key] = trackProperties(isImmutable, ignorePaths, obj[key], childPath); | |
| 3965 | - } | |
| 3966 | - } | |
| 3967 | - return tracked; | |
| 3968 | -} | |
| 3969 | -function detectMutations(isImmutable, ignoredPaths, trackedProperty, obj, sameParentRef, path) { | |
| 3970 | - if (ignoredPaths === void 0) { ignoredPaths = []; } | |
| 3971 | - if (sameParentRef === void 0) { sameParentRef = false; } | |
| 3972 | - if (path === void 0) { path = ""; } | |
| 3973 | - var prevObj = trackedProperty ? trackedProperty.value : void 0; | |
| 3974 | - var sameRef = prevObj === obj; | |
| 3975 | - if (sameParentRef && !sameRef && !Number.isNaN(obj)) { | |
| 3976 | - return { wasMutated: true, path: path }; | |
| 3977 | - } | |
| 3978 | - if (isImmutable(prevObj) || isImmutable(obj)) { | |
| 3979 | - return { wasMutated: false }; | |
| 3980 | - } | |
| 3981 | - var keysToDetect = {}; | |
| 3982 | - for (var key in trackedProperty.children) { | |
| 3983 | - keysToDetect[key] = true; | |
| 3984 | - } | |
| 3985 | - for (var key in obj) { | |
| 3986 | - keysToDetect[key] = true; | |
| 3987 | - } | |
| 3988 | - var hasIgnoredPaths = ignoredPaths.length > 0; | |
| 3989 | - var _loop_1 = function (key) { | |
| 3990 | - var nestedPath = path ? path + "." + key : key; | |
| 3991 | - if (hasIgnoredPaths) { | |
| 3992 | - var hasMatches = ignoredPaths.some(function (ignored) { | |
| 3993 | - if (ignored instanceof RegExp) { | |
| 3994 | - return ignored.test(nestedPath); | |
| 3995 | - } | |
| 3996 | - return nestedPath === ignored; | |
| 3997 | - }); | |
| 3998 | - if (hasMatches) { | |
| 3999 | - return "continue"; | |
| 4000 | - } | |
| 4001 | - } | |
| 4002 | - var result = detectMutations(isImmutable, ignoredPaths, trackedProperty.children[key], obj[key], sameRef, nestedPath); | |
| 4003 | - if (result.wasMutated) { | |
| 4004 | - return { value: result }; | |
| 4005 | - } | |
| 4006 | - }; | |
| 4007 | - for (var key in keysToDetect) { | |
| 4008 | - var state_1 = _loop_1(key); | |
| 4009 | - if (typeof state_1 === "object") | |
| 4010 | - return state_1.value; | |
| 4011 | - } | |
| 4012 | - return { wasMutated: false }; | |
| 4013 | -} | |
| 4014 | -function createImmutableStateInvariantMiddleware(options) { | |
| 4015 | - if (options === void 0) { options = {}; } | |
| 4016 | - if (false) // removed by dead control flow | |
| 4017 | -{} | |
| 4018 | - 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; | |
| 4019 | - ignoredPaths = ignoredPaths || ignore; | |
| 4020 | - var track = trackForMutations.bind(null, isImmutable, ignoredPaths); | |
| 4021 | - return function (_c) { | |
| 4022 | - var getState = _c.getState; | |
| 4023 | - var state = getState(); | |
| 4024 | - var tracker = track(state); | |
| 4025 | - var result; | |
| 4026 | - return function (next) { return function (action) { | |
| 4027 | - var measureUtils = getTimeMeasureUtils(warnAfter, "ImmutableStateInvariantMiddleware"); | |
| 4028 | - measureUtils.measureTime(function () { | |
| 4029 | - state = getState(); | |
| 4030 | - result = tracker.detectMutations(); | |
| 4031 | - tracker = track(state); | |
| 4032 | - 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)"); | |
| 4033 | - }); | |
| 4034 | - var dispatchedAction = next(action); | |
| 4035 | - measureUtils.measureTime(function () { | |
| 4036 | - state = getState(); | |
| 4037 | - result = tracker.detectMutations(); | |
| 4038 | - tracker = track(state); | |
| 4039 | - 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)"); | |
| 4040 | - }); | |
| 4041 | - measureUtils.warnIfExceeded(); | |
| 4042 | - return dispatchedAction; | |
| 4043 | - }; }; | |
| 4044 | - }; | |
| 4045 | -} | |
| 4046 | -// src/serializableStateInvariantMiddleware.ts | |
| 4047 | -function isPlain(val) { | |
| 4048 | - var type = typeof val; | |
| 4049 | - return val == null || type === "string" || type === "boolean" || type === "number" || Array.isArray(val) || isPlainObject(val); | |
| 4050 | -} | |
| 4051 | -function findNonSerializableValue(value, path, isSerializable, getEntries, ignoredPaths, cache) { | |
| 4052 | - if (path === void 0) { path = ""; } | |
| 4053 | - if (isSerializable === void 0) { isSerializable = isPlain; } | |
| 4054 | - if (ignoredPaths === void 0) { ignoredPaths = []; } | |
| 4055 | - var foundNestedSerializable; | |
| 4056 | - if (!isSerializable(value)) { | |
| 4057 | - return { | |
| 4058 | - keyPath: path || "<root>", | |
| 4059 | - value: value | |
| 4060 | - }; | |
| 4061 | - } | |
| 4062 | - if (typeof value !== "object" || value === null) { | |
| 4063 | - return false; | |
| 4064 | - } | |
| 4065 | - if (cache == null ? void 0 : cache.has(value)) | |
| 4066 | - return false; | |
| 4067 | - var entries = getEntries != null ? getEntries(value) : Object.entries(value); | |
| 4068 | - var hasIgnoredPaths = ignoredPaths.length > 0; | |
| 4069 | - var _loop_2 = function (key, nestedValue) { | |
| 4070 | - var nestedPath = path ? path + "." + key : key; | |
| 4071 | - if (hasIgnoredPaths) { | |
| 4072 | - var hasMatches = ignoredPaths.some(function (ignored) { | |
| 4073 | - if (ignored instanceof RegExp) { | |
| 4074 | - return ignored.test(nestedPath); | |
| 4075 | - } | |
| 4076 | - return nestedPath === ignored; | |
| 4077 | - }); | |
| 4078 | - if (hasMatches) { | |
| 4079 | - return "continue"; | |
| 4080 | - } | |
| 4081 | - } | |
| 4082 | - if (!isSerializable(nestedValue)) { | |
| 4083 | - return { value: { | |
| 4084 | - keyPath: nestedPath, | |
| 4085 | - value: nestedValue | |
| 4086 | - } }; | |
| 4087 | - } | |
| 4088 | - if (typeof nestedValue === "object") { | |
| 4089 | - foundNestedSerializable = findNonSerializableValue(nestedValue, nestedPath, isSerializable, getEntries, ignoredPaths, cache); | |
| 4090 | - if (foundNestedSerializable) { | |
| 4091 | - return { value: foundNestedSerializable }; | |
| 4092 | - } | |
| 4093 | - } | |
| 4094 | - }; | |
| 4095 | - for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) { | |
| 4096 | - var _c = entries_1[_i], key = _c[0], nestedValue = _c[1]; | |
| 4097 | - var state_2 = _loop_2(key, nestedValue); | |
| 4098 | - if (typeof state_2 === "object") | |
| 4099 | - return state_2.value; | |
| 4100 | - } | |
| 4101 | - if (cache && isNestedFrozen(value)) | |
| 4102 | - cache.add(value); | |
| 4103 | - return false; | |
| 4104 | -} | |
| 4105 | -function isNestedFrozen(value) { | |
| 4106 | - if (!Object.isFrozen(value)) | |
| 4107 | - return false; | |
| 4108 | - for (var _i = 0, _c = Object.values(value); _i < _c.length; _i++) { | |
| 4109 | - var nestedValue = _c[_i]; | |
| 4110 | - if (typeof nestedValue !== "object" || nestedValue === null) | |
| 4111 | - continue; | |
| 4112 | - if (!isNestedFrozen(nestedValue)) | |
| 4113 | - return false; | |
| 4114 | - } | |
| 4115 | - return true; | |
| 4116 | -} | |
| 4117 | -function createSerializableStateInvariantMiddleware(options) { | |
| 4118 | - if (options === void 0) { options = {}; } | |
| 4119 | - if (false) // removed by dead control flow | |
| 4120 | -{} | |
| 4121 | - 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; | |
| 4122 | - var cache = !disableCache && WeakSet ? new WeakSet() : void 0; | |
| 4123 | - return function (storeAPI) { return function (next) { return function (action) { | |
| 4124 | - var result = next(action); | |
| 4125 | - var measureUtils = getTimeMeasureUtils(warnAfter, "SerializableStateInvariantMiddleware"); | |
| 4126 | - if (!ignoreActions && !(ignoredActions.length && ignoredActions.indexOf(action.type) !== -1)) { | |
| 4127 | - measureUtils.measureTime(function () { | |
| 4128 | - var foundActionNonSerializableValue = findNonSerializableValue(action, "", isSerializable, getEntries, ignoredActionPaths, cache); | |
| 4129 | - if (foundActionNonSerializableValue) { | |
| 4130 | - var keyPath = foundActionNonSerializableValue.keyPath, value = foundActionNonSerializableValue.value; | |
| 4131 | - 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)"); | |
| 4132 | - } | |
| 4133 | - }); | |
| 4134 | - } | |
| 4135 | - if (!ignoreState) { | |
| 4136 | - measureUtils.measureTime(function () { | |
| 4137 | - var state = storeAPI.getState(); | |
| 4138 | - var foundStateNonSerializableValue = findNonSerializableValue(state, "", isSerializable, getEntries, ignoredPaths, cache); | |
| 4139 | - if (foundStateNonSerializableValue) { | |
| 4140 | - var keyPath = foundStateNonSerializableValue.keyPath, value = foundStateNonSerializableValue.value; | |
| 4141 | - 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)"); | |
| 4142 | - } | |
| 4143 | - }); | |
| 4144 | - measureUtils.warnIfExceeded(); | |
| 4145 | - } | |
| 4146 | - return result; | |
| 4147 | - }; }; }; | |
| 4148 | -} | |
| 4149 | -// src/getDefaultMiddleware.ts | |
| 4150 | -function isBoolean(x) { | |
| 4151 | - return typeof x === "boolean"; | |
| 4152 | -} | |
| 4153 | -function curryGetDefaultMiddleware() { | |
| 4154 | - return function curriedGetDefaultMiddleware(options) { | |
| 4155 | - return getDefaultMiddleware(options); | |
| 4156 | - }; | |
| 4157 | -} | |
| 4158 | -function getDefaultMiddleware(options) { | |
| 4159 | - if (options === void 0) { options = {}; } | |
| 4160 | - 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; | |
| 4161 | - var middlewareArray = new MiddlewareArray(); | |
| 4162 | - if (thunk) { | |
| 4163 | - if (isBoolean(thunk)) { | |
| 4164 | - middlewareArray.push(redux_thunk__WEBPACK_IMPORTED_MODULE_3__["default"]); | |
| 4165 | - } | |
| 4166 | - else { | |
| 4167 | - middlewareArray.push(redux_thunk__WEBPACK_IMPORTED_MODULE_3__["default"].withExtraArgument(thunk.extraArgument)); | |
| 4168 | - } | |
| 4169 | - } | |
| 4170 | - if (true) { | |
| 4171 | - if (immutableCheck) { | |
| 4172 | - var immutableOptions = {}; | |
| 4173 | - if (!isBoolean(immutableCheck)) { | |
| 4174 | - immutableOptions = immutableCheck; | |
| 4175 | - } | |
| 4176 | - middlewareArray.unshift(createImmutableStateInvariantMiddleware(immutableOptions)); | |
| 4177 | - } | |
| 4178 | - if (serializableCheck) { | |
| 4179 | - var serializableOptions = {}; | |
| 4180 | - if (!isBoolean(serializableCheck)) { | |
| 4181 | - serializableOptions = serializableCheck; | |
| 4182 | - } | |
| 4183 | - middlewareArray.push(createSerializableStateInvariantMiddleware(serializableOptions)); | |
| 4184 | - } | |
| 4185 | - if (actionCreatorCheck) { | |
| 4186 | - var actionCreatorOptions = {}; | |
| 4187 | - if (!isBoolean(actionCreatorCheck)) { | |
| 4188 | - actionCreatorOptions = actionCreatorCheck; | |
| 4189 | - } | |
| 4190 | - middlewareArray.unshift(createActionCreatorInvariantMiddleware(actionCreatorOptions)); | |
| 4191 | - } | |
| 4192 | - } | |
| 4193 | - return middlewareArray; | |
| 4194 | -} | |
| 4195 | -// src/configureStore.ts | |
| 4196 | -var IS_PRODUCTION = "development" === "production"; | |
| 4197 | -function configureStore(options) { | |
| 4198 | - var curriedGetDefaultMiddleware = curryGetDefaultMiddleware(); | |
| 4199 | - 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; | |
| 4200 | - var rootReducer; | |
| 4201 | - if (typeof reducer === "function") { | |
| 4202 | - rootReducer = reducer; | |
| 4203 | - } | |
| 4204 | - else if (isPlainObject(reducer)) { | |
| 4205 | - rootReducer = (0,redux__WEBPACK_IMPORTED_MODULE_1__.combineReducers)(reducer); | |
| 4206 | - } | |
| 4207 | - else { | |
| 4208 | - throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers'); | |
| 4209 | - } | |
| 4210 | - var finalMiddleware = middleware; | |
| 4211 | - if (typeof finalMiddleware === "function") { | |
| 4212 | - finalMiddleware = finalMiddleware(curriedGetDefaultMiddleware); | |
| 4213 | - if (!IS_PRODUCTION && !Array.isArray(finalMiddleware)) { | |
| 4214 | - throw new Error("when using a middleware builder function, an array of middleware must be returned"); | |
| 4215 | - } | |
| 4216 | - } | |
| 4217 | - if (!IS_PRODUCTION && finalMiddleware.some(function (item) { return typeof item !== "function"; })) { | |
| 4218 | - throw new Error("each middleware provided to configureStore must be a function"); | |
| 4219 | - } | |
| 4220 | - var middlewareEnhancer = redux__WEBPACK_IMPORTED_MODULE_1__.applyMiddleware.apply(void 0, finalMiddleware); | |
| 4221 | - var finalCompose = redux__WEBPACK_IMPORTED_MODULE_1__.compose; | |
| 4222 | - if (devTools) { | |
| 4223 | - finalCompose = composeWithDevTools(__spreadValues({ | |
| 4224 | - trace: !IS_PRODUCTION | |
| 4225 | - }, typeof devTools === "object" && devTools)); | |
| 4226 | - } | |
| 4227 | - var defaultEnhancers = new EnhancerArray(middlewareEnhancer); | |
| 4228 | - var storeEnhancers = defaultEnhancers; | |
| 4229 | - if (Array.isArray(enhancers)) { | |
| 4230 | - storeEnhancers = __spreadArray([middlewareEnhancer], enhancers); | |
| 4231 | - } | |
| 4232 | - else if (typeof enhancers === "function") { | |
| 4233 | - storeEnhancers = enhancers(defaultEnhancers); | |
| 4234 | - } | |
| 4235 | - var composedEnhancer = finalCompose.apply(void 0, storeEnhancers); | |
| 4236 | - return (0,redux__WEBPACK_IMPORTED_MODULE_1__.createStore)(rootReducer, preloadedState, composedEnhancer); | |
| 4237 | -} | |
| 4238 | -// src/createReducer.ts | |
| 4239 | - | |
| 4240 | -// src/mapBuilders.ts | |
| 4241 | -function executeReducerBuilderCallback(builderCallback) { | |
| 4242 | - var actionsMap = {}; | |
| 4243 | - var actionMatchers = []; | |
| 4244 | - var defaultCaseReducer; | |
| 4245 | - var builder = { | |
| 4246 | - addCase: function (typeOrActionCreator, reducer) { | |
| 4247 | - if (true) { | |
| 4248 | - if (actionMatchers.length > 0) { | |
| 4249 | - throw new Error("`builder.addCase` should only be called before calling `builder.addMatcher`"); | |
| 4250 | - } | |
| 4251 | - if (defaultCaseReducer) { | |
| 4252 | - throw new Error("`builder.addCase` should only be called before calling `builder.addDefaultCase`"); | |
| 4253 | - } | |
| 4254 | - } | |
| 4255 | - var type = typeof typeOrActionCreator === "string" ? typeOrActionCreator : typeOrActionCreator.type; | |
| 4256 | - if (!type) { | |
| 4257 | - throw new Error("`builder.addCase` cannot be called with an empty action type"); | |
| 4258 | - } | |
| 4259 | - if (type in actionsMap) { | |
| 4260 | - throw new Error("`builder.addCase` cannot be called with two reducers for the same action type"); | |
| 4261 | - } | |
| 4262 | - actionsMap[type] = reducer; | |
| 4263 | - return builder; | |
| 4264 | - }, | |
| 4265 | - addMatcher: function (matcher, reducer) { | |
| 4266 | - if (true) { | |
| 4267 | - if (defaultCaseReducer) { | |
| 4268 | - throw new Error("`builder.addMatcher` should only be called before calling `builder.addDefaultCase`"); | |
| 4269 | - } | |
| 4270 | - } | |
| 4271 | - actionMatchers.push({ matcher: matcher, reducer: reducer }); | |
| 4272 | - return builder; | |
| 4273 | - }, | |
| 4274 | - addDefaultCase: function (reducer) { | |
| 4275 | - if (true) { | |
| 4276 | - if (defaultCaseReducer) { | |
| 4277 | - throw new Error("`builder.addDefaultCase` can only be called once"); | |
| 4278 | - } | |
| 4279 | - } | |
| 4280 | - defaultCaseReducer = reducer; | |
| 4281 | - return builder; | |
| 4282 | - } | |
| 4283 | - }; | |
| 4284 | - builderCallback(builder); | |
| 4285 | - return [actionsMap, actionMatchers, defaultCaseReducer]; | |
| 4286 | -} | |
| 4287 | -// src/createReducer.ts | |
| 4288 | -function isStateFunction(x) { | |
| 4289 | - return typeof x === "function"; | |
| 4290 | -} | |
| 4291 | -var hasWarnedAboutObjectNotation = false; | |
| 4292 | -function createReducer(initialState, mapOrBuilderCallback, actionMatchers, defaultCaseReducer) { | |
| 4293 | - if (actionMatchers === void 0) { actionMatchers = []; } | |
| 4294 | - if (true) { | |
| 4295 | - if (typeof mapOrBuilderCallback === "object") { | |
| 4296 | - if (!hasWarnedAboutObjectNotation) { | |
| 4297 | - hasWarnedAboutObjectNotation = true; | |
| 4298 | - 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"); | |
| 4299 | - } | |
| 4300 | - } | |
| 4301 | - } | |
| 4302 | - var _c = typeof mapOrBuilderCallback === "function" ? executeReducerBuilderCallback(mapOrBuilderCallback) : [mapOrBuilderCallback, actionMatchers, defaultCaseReducer], actionsMap = _c[0], finalActionMatchers = _c[1], finalDefaultCaseReducer = _c[2]; | |
| 4303 | - var getInitialState; | |
| 4304 | - if (isStateFunction(initialState)) { | |
| 4305 | - getInitialState = function () { return freezeDraftable(initialState()); }; | |
| 4306 | - } | |
| 4307 | - else { | |
| 4308 | - var frozenInitialState_1 = freezeDraftable(initialState); | |
| 4309 | - getInitialState = function () { return frozenInitialState_1; }; | |
| 4310 | - } | |
| 4311 | - function reducer(state, action) { | |
| 4312 | - if (state === void 0) { state = getInitialState(); } | |
| 4313 | - var caseReducers = __spreadArray([ | |
| 4314 | - actionsMap[action.type] | |
| 4315 | - ], finalActionMatchers.filter(function (_c) { | |
| 4316 | - var matcher = _c.matcher; | |
| 4317 | - return matcher(action); | |
| 4318 | - }).map(function (_c) { | |
| 4319 | - var reducer2 = _c.reducer; | |
| 4320 | - return reducer2; | |
| 4321 | - })); | |
| 4322 | - if (caseReducers.filter(function (cr) { return !!cr; }).length === 0) { | |
| 4323 | - caseReducers = [finalDefaultCaseReducer]; | |
| 4324 | - } | |
| 4325 | - return caseReducers.reduce(function (previousState, caseReducer) { | |
| 4326 | - if (caseReducer) { | |
| 4327 | - if ((0,immer__WEBPACK_IMPORTED_MODULE_0__.isDraft)(previousState)) { | |
| 4328 | - var draft = previousState; | |
| 4329 | - var result = caseReducer(draft, action); | |
| 4330 | - if (result === void 0) { | |
| 4331 | - return previousState; | |
| 4332 | - } | |
| 4333 | - return result; | |
| 4334 | - } | |
| 4335 | - else if (!(0,immer__WEBPACK_IMPORTED_MODULE_0__.isDraftable)(previousState)) { | |
| 4336 | - var result = caseReducer(previousState, action); | |
| 4337 | - if (result === void 0) { | |
| 4338 | - if (previousState === null) { | |
| 4339 | - return previousState; | |
| 4340 | - } | |
| 4341 | - throw Error("A case reducer on a non-draftable value must not return undefined"); | |
| 4342 | - } | |
| 4343 | - return result; | |
| 4344 | - } | |
| 4345 | - else { | |
| 4346 | - return (0,immer__WEBPACK_IMPORTED_MODULE_0__["default"])(previousState, function (draft) { | |
| 4347 | - return caseReducer(draft, action); | |
| 4348 | - }); | |
| 4349 | - } | |
| 4350 | - } | |
| 4351 | - return previousState; | |
| 4352 | - }, state); | |
| 4353 | - } | |
| 4354 | - reducer.getInitialState = getInitialState; | |
| 4355 | - return reducer; | |
| 4356 | -} | |
| 4357 | -// src/createSlice.ts | |
| 4358 | -var hasWarnedAboutObjectNotation2 = false; | |
| 4359 | -function getType2(slice, actionKey) { | |
| 4360 | - return slice + "/" + actionKey; | |
| 4361 | -} | |
| 4362 | -function createSlice(options) { | |
| 4363 | - var name = options.name; | |
| 4364 | - if (!name) { | |
| 4365 | - throw new Error("`name` is a required option for createSlice"); | |
| 4366 | - } | |
| 4367 | - if (typeof process !== "undefined" && "development" === "development") { | |
| 4368 | - if (options.initialState === void 0) { | |
| 4369 | - console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`"); | |
| 4370 | - } | |
| 4371 | - } | |
| 4372 | - var initialState = typeof options.initialState == "function" ? options.initialState : freezeDraftable(options.initialState); | |
| 4373 | - var reducers = options.reducers || {}; | |
| 4374 | - var reducerNames = Object.keys(reducers); | |
| 4375 | - var sliceCaseReducersByName = {}; | |
| 4376 | - var sliceCaseReducersByType = {}; | |
| 4377 | - var actionCreators = {}; | |
| 4378 | - reducerNames.forEach(function (reducerName) { | |
| 4379 | - var maybeReducerWithPrepare = reducers[reducerName]; | |
| 4380 | - var type = getType2(name, reducerName); | |
| 4381 | - var caseReducer; | |
| 4382 | - var prepareCallback; | |
| 4383 | - if ("reducer" in maybeReducerWithPrepare) { | |
| 4384 | - caseReducer = maybeReducerWithPrepare.reducer; | |
| 4385 | - prepareCallback = maybeReducerWithPrepare.prepare; | |
| 4386 | - } | |
| 4387 | - else { | |
| 4388 | - caseReducer = maybeReducerWithPrepare; | |
| 4389 | - } | |
| 4390 | - sliceCaseReducersByName[reducerName] = caseReducer; | |
| 4391 | - sliceCaseReducersByType[type] = caseReducer; | |
| 4392 | - actionCreators[reducerName] = prepareCallback ? createAction(type, prepareCallback) : createAction(type); | |
| 4393 | - }); | |
| 4394 | - function buildReducer() { | |
| 4395 | - if (true) { | |
| 4396 | - if (typeof options.extraReducers === "object") { | |
| 4397 | - if (!hasWarnedAboutObjectNotation2) { | |
| 4398 | - hasWarnedAboutObjectNotation2 = true; | |
| 4399 | - 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"); | |
| 4400 | - } | |
| 4401 | - } | |
| 4402 | - } | |
| 4403 | - 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; | |
| 4404 | - var finalCaseReducers = __spreadValues(__spreadValues({}, extraReducers), sliceCaseReducersByType); | |
| 4405 | - return createReducer(initialState, function (builder) { | |
| 4406 | - for (var key in finalCaseReducers) { | |
| 4407 | - builder.addCase(key, finalCaseReducers[key]); | |
| 4408 | - } | |
| 4409 | - for (var _i = 0, actionMatchers_1 = actionMatchers; _i < actionMatchers_1.length; _i++) { | |
| 4410 | - var m = actionMatchers_1[_i]; | |
| 4411 | - builder.addMatcher(m.matcher, m.reducer); | |
| 4412 | - } | |
| 4413 | - if (defaultCaseReducer) { | |
| 4414 | - builder.addDefaultCase(defaultCaseReducer); | |
| 4415 | - } | |
| 4416 | - }); | |
| 4417 | - } | |
| 4418 | - var _reducer; | |
| 4419 | - return { | |
| 4420 | - name: name, | |
| 4421 | - reducer: function (state, action) { | |
| 4422 | - if (!_reducer) | |
| 4423 | - _reducer = buildReducer(); | |
| 4424 | - return _reducer(state, action); | |
| 4425 | - }, | |
| 4426 | - actions: actionCreators, | |
| 4427 | - caseReducers: sliceCaseReducersByName, | |
| 4428 | - getInitialState: function () { | |
| 4429 | - if (!_reducer) | |
| 4430 | - _reducer = buildReducer(); | |
| 4431 | - return _reducer.getInitialState(); | |
| 4432 | - } | |
| 4433 | - }; | |
| 4434 | -} | |
| 4435 | -// src/entities/entity_state.ts | |
| 4436 | -function getInitialEntityState() { | |
| 4437 | - return { | |
| 4438 | - ids: [], | |
| 4439 | - entities: {} | |
| 4440 | - }; | |
| 4441 | -} | |
| 4442 | -function createInitialStateFactory() { | |
| 4443 | - function getInitialState(additionalState) { | |
| 4444 | - if (additionalState === void 0) { additionalState = {}; } | |
| 4445 | - return Object.assign(getInitialEntityState(), additionalState); | |
| 4446 | - } | |
| 4447 | - return { getInitialState: getInitialState }; | |
| 4448 | -} | |
| 4449 | -// src/entities/state_selectors.ts | |
| 4450 | -function createSelectorsFactory() { | |
| 4451 | - function getSelectors(selectState) { | |
| 4452 | - var selectIds = function (state) { return state.ids; }; | |
| 4453 | - var selectEntities = function (state) { return state.entities; }; | |
| 4454 | - var selectAll = createDraftSafeSelector(selectIds, selectEntities, function (ids, entities) { return ids.map(function (id) { return entities[id]; }); }); | |
| 4455 | - var selectId = function (_, id) { return id; }; | |
| 4456 | - var selectById = function (entities, id) { return entities[id]; }; | |
| 4457 | - var selectTotal = createDraftSafeSelector(selectIds, function (ids) { return ids.length; }); | |
| 4458 | - if (!selectState) { | |
| 4459 | - return { | |
| 4460 | - selectIds: selectIds, | |
| 4461 | - selectEntities: selectEntities, | |
| 4462 | - selectAll: selectAll, | |
| 4463 | - selectTotal: selectTotal, | |
| 4464 | - selectById: createDraftSafeSelector(selectEntities, selectId, selectById) | |
| 4465 | - }; | |
| 4466 | - } | |
| 4467 | - var selectGlobalizedEntities = createDraftSafeSelector(selectState, selectEntities); | |
| 4468 | - return { | |
| 4469 | - selectIds: createDraftSafeSelector(selectState, selectIds), | |
| 4470 | - selectEntities: selectGlobalizedEntities, | |
| 4471 | - selectAll: createDraftSafeSelector(selectState, selectAll), | |
| 4472 | - selectTotal: createDraftSafeSelector(selectState, selectTotal), | |
| 4473 | - selectById: createDraftSafeSelector(selectGlobalizedEntities, selectId, selectById) | |
| 4474 | - }; | |
| 4475 | - } | |
| 4476 | - return { getSelectors: getSelectors }; | |
| 4477 | -} | |
| 4478 | -// src/entities/state_adapter.ts | |
| 4479 | - | |
| 4480 | -function createSingleArgumentStateOperator(mutator) { | |
| 4481 | - var operator = createStateOperator(function (_, state) { return mutator(state); }); | |
| 4482 | - return function operation(state) { | |
| 4483 | - return operator(state, void 0); | |
| 4484 | - }; | |
| 4485 | -} | |
| 4486 | -function createStateOperator(mutator) { | |
| 4487 | - return function operation(state, arg) { | |
| 4488 | - function isPayloadActionArgument(arg2) { | |
| 4489 | - return isFSA(arg2); | |
| 4490 | - } | |
| 4491 | - var runMutator = function (draft) { | |
| 4492 | - if (isPayloadActionArgument(arg)) { | |
| 4493 | - mutator(arg.payload, draft); | |
| 4494 | - } | |
| 4495 | - else { | |
| 4496 | - mutator(arg, draft); | |
| 4497 | - } | |
| 4498 | - }; | |
| 4499 | - if ((0,immer__WEBPACK_IMPORTED_MODULE_0__.isDraft)(state)) { | |
| 4500 | - runMutator(state); | |
| 4501 | - return state; | |
| 4502 | - } | |
| 4503 | - else { | |
| 4504 | - return (0,immer__WEBPACK_IMPORTED_MODULE_0__["default"])(state, runMutator); | |
| 4505 | - } | |
| 4506 | - }; | |
| 4507 | -} | |
| 4508 | -// src/entities/utils.ts | |
| 4509 | -function selectIdValue(entity, selectId) { | |
| 4510 | - var key = selectId(entity); | |
| 4511 | - if ( true && key === void 0) { | |
| 4512 | - 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()); | |
| 4513 | - } | |
| 4514 | - return key; | |
| 4515 | -} | |
| 4516 | -function ensureEntitiesArray(entities) { | |
| 4517 | - if (!Array.isArray(entities)) { | |
| 4518 | - entities = Object.values(entities); | |
| 4519 | - } | |
| 4520 | - return entities; | |
| 4521 | -} | |
| 4522 | -function splitAddedUpdatedEntities(newEntities, selectId, state) { | |
| 4523 | - newEntities = ensureEntitiesArray(newEntities); | |
| 4524 | - var added = []; | |
| 4525 | - var updated = []; | |
| 4526 | - for (var _i = 0, newEntities_1 = newEntities; _i < newEntities_1.length; _i++) { | |
| 4527 | - var entity = newEntities_1[_i]; | |
| 4528 | - var id = selectIdValue(entity, selectId); | |
| 4529 | - if (id in state.entities) { | |
| 4530 | - updated.push({ id: id, changes: entity }); | |
| 4531 | - } | |
| 4532 | - else { | |
| 4533 | - added.push(entity); | |
| 4534 | - } | |
| 4535 | - } | |
| 4536 | - return [added, updated]; | |
| 4537 | -} | |
| 4538 | -// src/entities/unsorted_state_adapter.ts | |
| 4539 | -function createUnsortedStateAdapter(selectId) { | |
| 4540 | - function addOneMutably(entity, state) { | |
| 4541 | - var key = selectIdValue(entity, selectId); | |
| 4542 | - if (key in state.entities) { | |
| 4543 | - return; | |
| 4544 | - } | |
| 4545 | - state.ids.push(key); | |
| 4546 | - state.entities[key] = entity; | |
| 4547 | - } | |
| 4548 | - function addManyMutably(newEntities, state) { | |
| 4549 | - newEntities = ensureEntitiesArray(newEntities); | |
| 4550 | - for (var _i = 0, newEntities_2 = newEntities; _i < newEntities_2.length; _i++) { | |
| 4551 | - var entity = newEntities_2[_i]; | |
| 4552 | - addOneMutably(entity, state); | |
| 4553 | - } | |
| 4554 | - } | |
| 4555 | - function setOneMutably(entity, state) { | |
| 4556 | - var key = selectIdValue(entity, selectId); | |
| 4557 | - if (!(key in state.entities)) { | |
| 4558 | - state.ids.push(key); | |
| 4559 | - } | |
| 4560 | - state.entities[key] = entity; | |
| 4561 | - } | |
| 4562 | - function setManyMutably(newEntities, state) { | |
| 4563 | - newEntities = ensureEntitiesArray(newEntities); | |
| 4564 | - for (var _i = 0, newEntities_3 = newEntities; _i < newEntities_3.length; _i++) { | |
| 4565 | - var entity = newEntities_3[_i]; | |
| 4566 | - setOneMutably(entity, state); | |
| 4567 | - } | |
| 4568 | - } | |
| 4569 | - function setAllMutably(newEntities, state) { | |
| 4570 | - newEntities = ensureEntitiesArray(newEntities); | |
| 4571 | - state.ids = []; | |
| 4572 | - state.entities = {}; | |
| 4573 | - addManyMutably(newEntities, state); | |
| 4574 | - } | |
| 4575 | - function removeOneMutably(key, state) { | |
| 4576 | - return removeManyMutably([key], state); | |
| 4577 | - } | |
| 4578 | - function removeManyMutably(keys, state) { | |
| 4579 | - var didMutate = false; | |
| 4580 | - keys.forEach(function (key) { | |
| 4581 | - if (key in state.entities) { | |
| 4582 | - delete state.entities[key]; | |
| 4583 | - didMutate = true; | |
| 4584 | - } | |
| 4585 | - }); | |
| 4586 | - if (didMutate) { | |
| 4587 | - state.ids = state.ids.filter(function (id) { return id in state.entities; }); | |
| 4588 | - } | |
| 4589 | - } | |
| 4590 | - function removeAllMutably(state) { | |
| 4591 | - Object.assign(state, { | |
| 4592 | - ids: [], | |
| 4593 | - entities: {} | |
| 4594 | - }); | |
| 4595 | - } | |
| 4596 | - function takeNewKey(keys, update, state) { | |
| 4597 | - var original2 = state.entities[update.id]; | |
| 4598 | - var updated = Object.assign({}, original2, update.changes); | |
| 4599 | - var newKey = selectIdValue(updated, selectId); | |
| 4600 | - var hasNewKey = newKey !== update.id; | |
| 4601 | - if (hasNewKey) { | |
| 4602 | - keys[update.id] = newKey; | |
| 4603 | - delete state.entities[update.id]; | |
| 4604 | - } | |
| 4605 | - state.entities[newKey] = updated; | |
| 4606 | - return hasNewKey; | |
| 4607 | - } | |
| 4608 | - function updateOneMutably(update, state) { | |
| 4609 | - return updateManyMutably([update], state); | |
| 4610 | - } | |
| 4611 | - function updateManyMutably(updates, state) { | |
| 4612 | - var newKeys = {}; | |
| 4613 | - var updatesPerEntity = {}; | |
| 4614 | - updates.forEach(function (update) { | |
| 4615 | - if (update.id in state.entities) { | |
| 4616 | - updatesPerEntity[update.id] = { | |
| 4617 | - id: update.id, | |
| 4618 | - changes: __spreadValues(__spreadValues({}, updatesPerEntity[update.id] ? updatesPerEntity[update.id].changes : null), update.changes) | |
| 4619 | - }; | |
| 4620 | - } | |
| 4621 | - }); | |
| 4622 | - updates = Object.values(updatesPerEntity); | |
| 4623 | - var didMutateEntities = updates.length > 0; | |
| 4624 | - if (didMutateEntities) { | |
| 4625 | - var didMutateIds = updates.filter(function (update) { return takeNewKey(newKeys, update, state); }).length > 0; | |
| 4626 | - if (didMutateIds) { | |
| 4627 | - state.ids = Object.keys(state.entities); | |
| 4628 | - } | |
| 4629 | - } | |
| 4630 | - } | |
| 4631 | - function upsertOneMutably(entity, state) { | |
| 4632 | - return upsertManyMutably([entity], state); | |
| 4633 | - } | |
| 4634 | - function upsertManyMutably(newEntities, state) { | |
| 4635 | - var _c = splitAddedUpdatedEntities(newEntities, selectId, state), added = _c[0], updated = _c[1]; | |
| 4636 | - updateManyMutably(updated, state); | |
| 4637 | - addManyMutably(added, state); | |
| 4638 | - } | |
| 4639 | - return { | |
| 4640 | - removeAll: createSingleArgumentStateOperator(removeAllMutably), | |
| 4641 | - addOne: createStateOperator(addOneMutably), | |
| 4642 | - addMany: createStateOperator(addManyMutably), | |
| 4643 | - setOne: createStateOperator(setOneMutably), | |
| 4644 | - setMany: createStateOperator(setManyMutably), | |
| 4645 | - setAll: createStateOperator(setAllMutably), | |
| 4646 | - updateOne: createStateOperator(updateOneMutably), | |
| 4647 | - updateMany: createStateOperator(updateManyMutably), | |
| 4648 | - upsertOne: createStateOperator(upsertOneMutably), | |
| 4649 | - upsertMany: createStateOperator(upsertManyMutably), | |
| 4650 | - removeOne: createStateOperator(removeOneMutably), | |
| 4651 | - removeMany: createStateOperator(removeManyMutably) | |
| 4652 | - }; | |
| 4653 | -} | |
| 4654 | -// src/entities/sorted_state_adapter.ts | |
| 4655 | -function createSortedStateAdapter(selectId, sort) { | |
| 4656 | - var _c = createUnsortedStateAdapter(selectId), removeOne = _c.removeOne, removeMany = _c.removeMany, removeAll = _c.removeAll; | |
| 4657 | - function addOneMutably(entity, state) { | |
| 4658 | - return addManyMutably([entity], state); | |
| 4659 | - } | |
| 4660 | - function addManyMutably(newEntities, state) { | |
| 4661 | - newEntities = ensureEntitiesArray(newEntities); | |
| 4662 | - var models = newEntities.filter(function (model) { return !(selectIdValue(model, selectId) in state.entities); }); | |
| 4663 | - if (models.length !== 0) { | |
| 4664 | - merge(models, state); | |
| 4665 | - } | |
| 4666 | - } | |
| 4667 | - function setOneMutably(entity, state) { | |
| 4668 | - return setManyMutably([entity], state); | |
| 4669 | - } | |
| 4670 | - function setManyMutably(newEntities, state) { | |
| 4671 | - newEntities = ensureEntitiesArray(newEntities); | |
| 4672 | - if (newEntities.length !== 0) { | |
| 4673 | - merge(newEntities, state); | |
| 4674 | - } | |
| 4675 | - } | |
| 4676 | - function setAllMutably(newEntities, state) { | |
| 4677 | - newEntities = ensureEntitiesArray(newEntities); | |
| 4678 | - state.entities = {}; | |
| 4679 | - state.ids = []; | |
| 4680 | - addManyMutably(newEntities, state); | |
| 4681 | - } | |
| 4682 | - function updateOneMutably(update, state) { | |
| 4683 | - return updateManyMutably([update], state); | |
| 4684 | - } | |
| 4685 | - function updateManyMutably(updates, state) { | |
| 4686 | - var appliedUpdates = false; | |
| 4687 | - for (var _i = 0, updates_1 = updates; _i < updates_1.length; _i++) { | |
| 4688 | - var update = updates_1[_i]; | |
| 4689 | - var entity = state.entities[update.id]; | |
| 4690 | - if (!entity) { | |
| 4691 | - continue; | |
| 4692 | - } | |
| 4693 | - appliedUpdates = true; | |
| 4694 | - Object.assign(entity, update.changes); | |
| 4695 | - var newId = selectId(entity); | |
| 4696 | - if (update.id !== newId) { | |
| 4697 | - delete state.entities[update.id]; | |
| 4698 | - state.entities[newId] = entity; | |
| 4699 | - } | |
| 4700 | - } | |
| 4701 | - if (appliedUpdates) { | |
| 4702 | - resortEntities(state); | |
| 4703 | - } | |
| 4704 | - } | |
| 4705 | - function upsertOneMutably(entity, state) { | |
| 4706 | - return upsertManyMutably([entity], state); | |
| 4707 | - } | |
| 4708 | - function upsertManyMutably(newEntities, state) { | |
| 4709 | - var _c = splitAddedUpdatedEntities(newEntities, selectId, state), added = _c[0], updated = _c[1]; | |
| 4710 | - updateManyMutably(updated, state); | |
| 4711 | - addManyMutably(added, state); | |
| 4712 | - } | |
| 4713 | - function areArraysEqual(a, b) { | |
| 4714 | - if (a.length !== b.length) { | |
| 4715 | - return false; | |
| 4716 | - } | |
| 4717 | - for (var i = 0; i < a.length && i < b.length; i++) { | |
| 4718 | - if (a[i] === b[i]) { | |
| 4719 | - continue; | |
| 4720 | - } | |
| 4721 | - return false; | |
| 4722 | - } | |
| 4723 | - return true; | |
| 4724 | - } | |
| 4725 | - function merge(models, state) { | |
| 4726 | - models.forEach(function (model) { | |
| 4727 | - state.entities[selectId(model)] = model; | |
| 4728 | - }); | |
| 4729 | - resortEntities(state); | |
| 4730 | - } | |
| 4731 | - function resortEntities(state) { | |
| 4732 | - var allEntities = Object.values(state.entities); | |
| 4733 | - allEntities.sort(sort); | |
| 4734 | - var newSortedIds = allEntities.map(selectId); | |
| 4735 | - var ids = state.ids; | |
| 4736 | - if (!areArraysEqual(ids, newSortedIds)) { | |
| 4737 | - state.ids = newSortedIds; | |
| 4738 | - } | |
| 4739 | - } | |
| 4740 | - return { | |
| 4741 | - removeOne: removeOne, | |
| 4742 | - removeMany: removeMany, | |
| 4743 | - removeAll: removeAll, | |
| 4744 | - addOne: createStateOperator(addOneMutably), | |
| 4745 | - updateOne: createStateOperator(updateOneMutably), | |
| 4746 | - upsertOne: createStateOperator(upsertOneMutably), | |
| 4747 | - setOne: createStateOperator(setOneMutably), | |
| 4748 | - setMany: createStateOperator(setManyMutably), | |
| 4749 | - setAll: createStateOperator(setAllMutably), | |
| 4750 | - addMany: createStateOperator(addManyMutably), | |
| 4751 | - updateMany: createStateOperator(updateManyMutably), | |
| 4752 | - upsertMany: createStateOperator(upsertManyMutably) | |
| 4753 | - }; | |
| 4754 | -} | |
| 4755 | -// src/entities/create_adapter.ts | |
| 4756 | -function createEntityAdapter(options) { | |
| 4757 | - if (options === void 0) { options = {}; } | |
| 4758 | - var _c = __spreadValues({ | |
| 4759 | - sortComparer: false, | |
| 4760 | - selectId: function (instance) { return instance.id; } | |
| 4761 | - }, options), selectId = _c.selectId, sortComparer = _c.sortComparer; | |
| 4762 | - var stateFactory = createInitialStateFactory(); | |
| 4763 | - var selectorsFactory = createSelectorsFactory(); | |
| 4764 | - var stateAdapter = sortComparer ? createSortedStateAdapter(selectId, sortComparer) : createUnsortedStateAdapter(selectId); | |
| 4765 | - return __spreadValues(__spreadValues(__spreadValues({ | |
| 4766 | - selectId: selectId, | |
| 4767 | - sortComparer: sortComparer | |
| 4768 | - }, stateFactory), selectorsFactory), stateAdapter); | |
| 4769 | -} | |
| 4770 | -// src/nanoid.ts | |
| 4771 | -var urlAlphabet = "ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"; | |
| 4772 | -var nanoid = function (size) { | |
| 4773 | - if (size === void 0) { size = 21; } | |
| 4774 | - var id = ""; | |
| 4775 | - var i = size; | |
| 4776 | - while (i--) { | |
| 4777 | - id += urlAlphabet[Math.random() * 64 | 0]; | |
| 4778 | - } | |
| 4779 | - return id; | |
| 4780 | -}; | |
| 4781 | -// src/createAsyncThunk.ts | |
| 4782 | -var commonProperties = [ | |
| 4783 | - "name", | |
| 4784 | - "message", | |
| 4785 | - "stack", | |
| 4786 | - "code" | |
| 4787 | -]; | |
| 4788 | -var RejectWithValue = /** @class */ (function () { | |
| 4789 | - function RejectWithValue(payload, meta) { | |
| 4790 | - this.payload = payload; | |
| 4791 | - this.meta = meta; | |
| 4792 | - } | |
| 4793 | - return RejectWithValue; | |
| 4794 | -}()); | |
| 4795 | -var FulfillWithMeta = /** @class */ (function () { | |
| 4796 | - function FulfillWithMeta(payload, meta) { | |
| 4797 | - this.payload = payload; | |
| 4798 | - this.meta = meta; | |
| 4799 | - } | |
| 4800 | - return FulfillWithMeta; | |
| 4801 | -}()); | |
| 4802 | -var miniSerializeError = function (value) { | |
| 4803 | - if (typeof value === "object" && value !== null) { | |
| 4804 | - var simpleError = {}; | |
| 4805 | - for (var _i = 0, commonProperties_1 = commonProperties; _i < commonProperties_1.length; _i++) { | |
| 4806 | - var property = commonProperties_1[_i]; | |
| 4807 | - if (typeof value[property] === "string") { | |
| 4808 | - simpleError[property] = value[property]; | |
| 4809 | - } | |
| 4810 | - } | |
| 4811 | - return simpleError; | |
| 4812 | - } | |
| 4813 | - return { message: String(value) }; | |
| 4814 | -}; | |
| 4815 | -var createAsyncThunk = (function () { | |
| 4816 | - function createAsyncThunk2(typePrefix, payloadCreator, options) { | |
| 4817 | - var fulfilled = createAction(typePrefix + "/fulfilled", function (payload, requestId, arg, meta) { return ({ | |
| 4818 | - payload: payload, | |
| 4819 | - meta: __spreadProps(__spreadValues({}, meta || {}), { | |
| 4820 | - arg: arg, | |
| 4821 | - requestId: requestId, | |
| 4822 | - requestStatus: "fulfilled" | |
| 4823 | - }) | |
| 4824 | - }); }); | |
| 4825 | - var pending = createAction(typePrefix + "/pending", function (requestId, arg, meta) { return ({ | |
| 4826 | - payload: void 0, | |
| 4827 | - meta: __spreadProps(__spreadValues({}, meta || {}), { | |
| 4828 | - arg: arg, | |
| 4829 | - requestId: requestId, | |
| 4830 | - requestStatus: "pending" | |
| 4831 | - }) | |
| 4832 | - }); }); | |
| 4833 | - var rejected = createAction(typePrefix + "/rejected", function (error, requestId, arg, payload, meta) { return ({ | |
| 4834 | - payload: payload, | |
| 4835 | - error: (options && options.serializeError || miniSerializeError)(error || "Rejected"), | |
| 4836 | - meta: __spreadProps(__spreadValues({}, meta || {}), { | |
| 4837 | - arg: arg, | |
| 4838 | - requestId: requestId, | |
| 4839 | - rejectedWithValue: !!payload, | |
| 4840 | - requestStatus: "rejected", | |
| 4841 | - aborted: (error == null ? void 0 : error.name) === "AbortError", | |
| 4842 | - condition: (error == null ? void 0 : error.name) === "ConditionError" | |
| 4843 | - }) | |
| 4844 | - }); }); | |
| 4845 | - var displayedWarning = false; | |
| 4846 | - var AC = typeof AbortController !== "undefined" ? AbortController : /** @class */ (function () { | |
| 4847 | - function class_1() { | |
| 4848 | - this.signal = { | |
| 4849 | - aborted: false, | |
| 4850 | - addEventListener: function () { | |
| 4851 | - }, | |
| 4852 | - dispatchEvent: function () { | |
| 4853 | - return false; | |
| 4854 | - }, | |
| 4855 | - onabort: function () { | |
| 4856 | - }, | |
| 4857 | - removeEventListener: function () { | |
| 4858 | - }, | |
| 4859 | - reason: void 0, | |
| 4860 | - throwIfAborted: function () { | |
| 4861 | - } | |
| 4862 | - }; | |
| 4863 | - } | |
| 4864 | - class_1.prototype.abort = function () { | |
| 4865 | - if (true) { | |
| 4866 | - if (!displayedWarning) { | |
| 4867 | - displayedWarning = true; | |
| 4868 | - 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'."); | |
| 4869 | - } | |
| 4870 | - } | |
| 4871 | - }; | |
| 4872 | - return class_1; | |
| 4873 | - }()); | |
| 4874 | - function actionCreator(arg) { | |
| 4875 | - return function (dispatch, getState, extra) { | |
| 4876 | - var requestId = (options == null ? void 0 : options.idGenerator) ? options.idGenerator(arg) : nanoid(); | |
| 4877 | - var abortController = new AC(); | |
| 4878 | - var abortReason; | |
| 4879 | - var started = false; | |
| 4880 | - function abort(reason) { | |
| 4881 | - abortReason = reason; | |
| 4882 | - abortController.abort(); | |
| 4883 | - } | |
| 4884 | - var promise2 = function () { | |
| 4885 | - return __async(this, null, function () { | |
| 4886 | - var _a, _b, finalAction, conditionResult, abortedPromise, err_1, skipDispatch; | |
| 4887 | - return __generator(this, function (_c) { | |
| 4888 | - switch (_c.label) { | |
| 4889 | - case 0: | |
| 4890 | - _c.trys.push([0, 4, , 5]); | |
| 4891 | - conditionResult = (_a = options == null ? void 0 : options.condition) == null ? void 0 : _a.call(options, arg, { getState: getState, extra: extra }); | |
| 4892 | - if (!isThenable(conditionResult)) return [3 /*break*/, 2]; | |
| 4893 | - return [4 /*yield*/, conditionResult]; | |
| 4894 | - case 1: | |
| 4895 | - conditionResult = _c.sent(); | |
| 4896 | - _c.label = 2; | |
| 4897 | - case 2: | |
| 4898 | - if (conditionResult === false || abortController.signal.aborted) { | |
| 4899 | - throw { | |
| 4900 | - name: "ConditionError", | |
| 4901 | - message: "Aborted due to condition callback returning false." | |
| 4902 | - }; | |
| 4903 | - } | |
| 4904 | - started = true; | |
| 4905 | - abortedPromise = new Promise(function (_, reject) { return abortController.signal.addEventListener("abort", function () { return reject({ | |
| 4906 | - name: "AbortError", | |
| 4907 | - message: abortReason || "Aborted" | |
| 4908 | - }); }); }); | |
| 4909 | - 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 }))); | |
| 4910 | - return [4 /*yield*/, Promise.race([ | |
| 4911 | - abortedPromise, | |
| 4912 | - Promise.resolve(payloadCreator(arg, { | |
| 4913 | - dispatch: dispatch, | |
| 4914 | - getState: getState, | |
| 4915 | - extra: extra, | |
| 4916 | - requestId: requestId, | |
| 4917 | - signal: abortController.signal, | |
| 4918 | - abort: abort, | |
| 4919 | - rejectWithValue: function (value, meta) { | |
| 4920 | - return new RejectWithValue(value, meta); | |
| 4921 | - }, | |
| 4922 | - fulfillWithValue: function (value, meta) { | |
| 4923 | - return new FulfillWithMeta(value, meta); | |
| 4924 | - } | |
| 4925 | - })).then(function (result) { | |
| 4926 | - if (result instanceof RejectWithValue) { | |
| 4927 | - throw result; | |
| 4928 | - } | |
| 4929 | - if (result instanceof FulfillWithMeta) { | |
| 4930 | - return fulfilled(result.payload, requestId, arg, result.meta); | |
| 4931 | - } | |
| 4932 | - return fulfilled(result, requestId, arg); | |
| 4933 | - }) | |
| 4934 | - ])]; | |
| 4935 | - case 3: | |
| 4936 | - finalAction = _c.sent(); | |
| 4937 | - return [3 /*break*/, 5]; | |
| 4938 | - case 4: | |
| 4939 | - err_1 = _c.sent(); | |
| 4940 | - finalAction = err_1 instanceof RejectWithValue ? rejected(null, requestId, arg, err_1.payload, err_1.meta) : rejected(err_1, requestId, arg); | |
| 4941 | - return [3 /*break*/, 5]; | |
| 4942 | - case 5: | |
| 4943 | - skipDispatch = options && !options.dispatchConditionRejection && rejected.match(finalAction) && finalAction.meta.condition; | |
| 4944 | - if (!skipDispatch) { | |
| 4945 | - dispatch(finalAction); | |
| 4946 | - } | |
| 4947 | - return [2 /*return*/, finalAction]; | |
| 4948 | - } | |
| 4949 | - }); | |
| 4950 | - }); | |
| 4951 | - }(); | |
| 4952 | - return Object.assign(promise2, { | |
| 4953 | - abort: abort, | |
| 4954 | - requestId: requestId, | |
| 4955 | - arg: arg, | |
| 4956 | - unwrap: function () { | |
| 4957 | - return promise2.then(unwrapResult); | |
| 4958 | - } | |
| 4959 | - }); | |
| 4960 | - }; | |
| 4961 | - } | |
| 4962 | - return Object.assign(actionCreator, { | |
| 4963 | - pending: pending, | |
| 4964 | - rejected: rejected, | |
| 4965 | - fulfilled: fulfilled, | |
| 4966 | - typePrefix: typePrefix | |
| 4967 | - }); | |
| 4968 | - } | |
| 4969 | - createAsyncThunk2.withTypes = function () { return createAsyncThunk2; }; | |
| 4970 | - return createAsyncThunk2; | |
| 4971 | -})(); | |
| 4972 | -function unwrapResult(action) { | |
| 4973 | - if (action.meta && action.meta.rejectedWithValue) { | |
| 4974 | - throw action.payload; | |
| 4975 | - } | |
| 4976 | - if (action.error) { | |
| 4977 | - throw action.error; | |
| 4978 | - } | |
| 4979 | - return action.payload; | |
| 4980 | -} | |
| 4981 | -function isThenable(value) { | |
| 4982 | - return value !== null && typeof value === "object" && typeof value.then === "function"; | |
| 4983 | -} | |
| 4984 | -// src/matchers.ts | |
| 4985 | -var matches = function (matcher, action) { | |
| 4986 | - if (hasMatchFunction(matcher)) { | |
| 4987 | - return matcher.match(action); | |
| 4988 | - } | |
| 4989 | - else { | |
| 4990 | - return matcher(action); | |
| 4991 | - } | |
| 4992 | -}; | |
| 4993 | -function isAnyOf() { | |
| 4994 | - var matchers = []; | |
| 4995 | - for (var _i = 0; _i < arguments.length; _i++) { | |
| 4996 | - matchers[_i] = arguments[_i]; | |
| 4997 | - } | |
| 4998 | - return function (action) { | |
| 4999 | - return matchers.some(function (matcher) { return matches(matcher, action); }); | |
| 5000 | - }; | |
| 5001 | -} | |
| 5002 | -function isAllOf() { | |
| 5003 | - var matchers = []; | |
| 5004 | - for (var _i = 0; _i < arguments.length; _i++) { | |
| 5005 | - matchers[_i] = arguments[_i]; | |
| 5006 | - } | |
| 5007 | - return function (action) { | |
| 5008 | - return matchers.every(function (matcher) { return matches(matcher, action); }); | |
| 5009 | - }; | |
| 5010 | -} | |
| 5011 | -function hasExpectedRequestMetadata(action, validStatus) { | |
| 5012 | - if (!action || !action.meta) | |
| 5013 | - return false; | |
| 5014 | - var hasValidRequestId = typeof action.meta.requestId === "string"; | |
| 5015 | - var hasValidRequestStatus = validStatus.indexOf(action.meta.requestStatus) > -1; | |
| 5016 | - return hasValidRequestId && hasValidRequestStatus; | |
| 5017 | -} | |
| 5018 | -function isAsyncThunkArray(a) { | |
| 5019 | - return typeof a[0] === "function" && "pending" in a[0] && "fulfilled" in a[0] && "rejected" in a[0]; | |
| 5020 | -} | |
| 5021 | -function isPending() { | |
| 5022 | - var asyncThunks = []; | |
| 5023 | - for (var _i = 0; _i < arguments.length; _i++) { | |
| 5024 | - asyncThunks[_i] = arguments[_i]; | |
| 5025 | - } | |
| 5026 | - if (asyncThunks.length === 0) { | |
| 5027 | - return function (action) { return hasExpectedRequestMetadata(action, ["pending"]); }; | |
| 5028 | - } | |
| 5029 | - if (!isAsyncThunkArray(asyncThunks)) { | |
| 5030 | - return isPending()(asyncThunks[0]); | |
| 5031 | - } | |
| 5032 | - return function (action) { | |
| 5033 | - var matchers = asyncThunks.map(function (asyncThunk) { return asyncThunk.pending; }); | |
| 5034 | - var combinedMatcher = isAnyOf.apply(void 0, matchers); | |
| 5035 | - return combinedMatcher(action); | |
| 5036 | - }; | |
| 5037 | -} | |
| 5038 | -function isRejected() { | |
| 5039 | - var asyncThunks = []; | |
| 5040 | - for (var _i = 0; _i < arguments.length; _i++) { | |
| 5041 | - asyncThunks[_i] = arguments[_i]; | |
| 5042 | - } | |
| 5043 | - if (asyncThunks.length === 0) { | |
| 5044 | - return function (action) { return hasExpectedRequestMetadata(action, ["rejected"]); }; | |
| 5045 | - } | |
| 5046 | - if (!isAsyncThunkArray(asyncThunks)) { | |
| 5047 | - return isRejected()(asyncThunks[0]); | |
| 5048 | - } | |
| 5049 | - return function (action) { | |
| 5050 | - var matchers = asyncThunks.map(function (asyncThunk) { return asyncThunk.rejected; }); | |
| 5051 | - var combinedMatcher = isAnyOf.apply(void 0, matchers); | |
| 5052 | - return combinedMatcher(action); | |
| 5053 | - }; | |
| 5054 | -} | |
| 5055 | -function isRejectedWithValue() { | |
| 5056 | - var asyncThunks = []; | |
| 5057 | - for (var _i = 0; _i < arguments.length; _i++) { | |
| 5058 | - asyncThunks[_i] = arguments[_i]; | |
| 5059 | - } | |
| 5060 | - var hasFlag = function (action) { | |
| 5061 | - return action && action.meta && action.meta.rejectedWithValue; | |
| 5062 | - }; | |
| 5063 | - if (asyncThunks.length === 0) { | |
| 5064 | - return function (action) { | |
| 5065 | - var combinedMatcher = isAllOf(isRejected.apply(void 0, asyncThunks), hasFlag); | |
| 5066 | - return combinedMatcher(action); | |
| 5067 | - }; | |
| 5068 | - } | |
| 5069 | - if (!isAsyncThunkArray(asyncThunks)) { | |
| 5070 | - return isRejectedWithValue()(asyncThunks[0]); | |
| 5071 | - } | |
| 5072 | - return function (action) { | |
| 5073 | - var combinedMatcher = isAllOf(isRejected.apply(void 0, asyncThunks), hasFlag); | |
| 5074 | - return combinedMatcher(action); | |
| 5075 | - }; | |
| 5076 | -} | |
| 5077 | -function isFulfilled() { | |
| 5078 | - var asyncThunks = []; | |
| 5079 | - for (var _i = 0; _i < arguments.length; _i++) { | |
| 5080 | - asyncThunks[_i] = arguments[_i]; | |
| 5081 | - } | |
| 5082 | - if (asyncThunks.length === 0) { | |
| 5083 | - return function (action) { return hasExpectedRequestMetadata(action, ["fulfilled"]); }; | |
| 5084 | - } | |
| 5085 | - if (!isAsyncThunkArray(asyncThunks)) { | |
| 5086 | - return isFulfilled()(asyncThunks[0]); | |
| 5087 | - } | |
| 5088 | - return function (action) { | |
| 5089 | - var matchers = asyncThunks.map(function (asyncThunk) { return asyncThunk.fulfilled; }); | |
| 5090 | - var combinedMatcher = isAnyOf.apply(void 0, matchers); | |
| 5091 | - return combinedMatcher(action); | |
| 5092 | - }; | |
| 5093 | -} | |
| 5094 | -function isAsyncThunkAction() { | |
| 5095 | - var asyncThunks = []; | |
| 5096 | - for (var _i = 0; _i < arguments.length; _i++) { | |
| 5097 | - asyncThunks[_i] = arguments[_i]; | |
| 5098 | - } | |
| 5099 | - if (asyncThunks.length === 0) { | |
| 5100 | - return function (action) { return hasExpectedRequestMetadata(action, ["pending", "fulfilled", "rejected"]); }; | |
| 5101 | - } | |
| 5102 | - if (!isAsyncThunkArray(asyncThunks)) { | |
| 5103 | - return isAsyncThunkAction()(asyncThunks[0]); | |
| 5104 | - } | |
| 5105 | - return function (action) { | |
| 5106 | - var matchers = []; | |
| 5107 | - for (var _i = 0, asyncThunks_1 = asyncThunks; _i < asyncThunks_1.length; _i++) { | |
| 5108 | - var asyncThunk = asyncThunks_1[_i]; | |
| 5109 | - matchers.push(asyncThunk.pending, asyncThunk.rejected, asyncThunk.fulfilled); | |
| 5110 | - } | |
| 5111 | - var combinedMatcher = isAnyOf.apply(void 0, matchers); | |
| 5112 | - return combinedMatcher(action); | |
| 5113 | - }; | |
| 5114 | -} | |
| 5115 | -// src/listenerMiddleware/utils.ts | |
| 5116 | -var assertFunction = function (func, expected) { | |
| 5117 | - if (typeof func !== "function") { | |
| 5118 | - throw new TypeError(expected + " is not a function"); | |
| 5119 | - } | |
| 5120 | -}; | |
| 5121 | -var noop = function () { | |
| 5122 | -}; | |
| 5123 | -var catchRejection = function (promise2, onError) { | |
| 5124 | - if (onError === void 0) { onError = noop; } | |
| 5125 | - promise2.catch(onError); | |
| 5126 | - return promise2; | |
| 5127 | -}; | |
| 5128 | -var addAbortSignalListener = function (abortSignal, callback) { | |
| 5129 | - abortSignal.addEventListener("abort", callback, { once: true }); | |
| 5130 | - return function () { return abortSignal.removeEventListener("abort", callback); }; | |
| 5131 | -}; | |
| 5132 | -var abortControllerWithReason = function (abortController, reason) { | |
| 5133 | - var signal = abortController.signal; | |
| 5134 | - if (signal.aborted) { | |
| 5135 | - return; | |
| 5136 | - } | |
| 5137 | - if (!("reason" in signal)) { | |
| 5138 | - Object.defineProperty(signal, "reason", { | |
| 5139 | - enumerable: true, | |
| 5140 | - value: reason, | |
| 5141 | - configurable: true, | |
| 5142 | - writable: true | |
| 5143 | - }); | |
| 5144 | - } | |
| 5145 | - ; | |
| 5146 | - abortController.abort(reason); | |
| 5147 | -}; | |
| 5148 | -// src/listenerMiddleware/exceptions.ts | |
| 5149 | -var task = "task"; | |
| 5150 | -var listener = "listener"; | |
| 5151 | -var completed = "completed"; | |
| 5152 | -var cancelled = "cancelled"; | |
| 5153 | -var taskCancelled = "task-" + cancelled; | |
| 5154 | -var taskCompleted = "task-" + completed; | |
| 5155 | -var listenerCancelled = listener + "-" + cancelled; | |
| 5156 | -var listenerCompleted = listener + "-" + completed; | |
| 5157 | -var TaskAbortError = /** @class */ (function () { | |
| 5158 | - function TaskAbortError(code) { | |
| 5159 | - this.code = code; | |
| 5160 | - this.name = "TaskAbortError"; | |
| 5161 | - this.message = task + " " + cancelled + " (reason: " + code + ")"; | |
| 5162 | - } | |
| 5163 | - return TaskAbortError; | |
| 5164 | -}()); | |
| 5165 | -// src/listenerMiddleware/task.ts | |
| 5166 | -var validateActive = function (signal) { | |
| 5167 | - if (signal.aborted) { | |
| 5168 | - throw new TaskAbortError(signal.reason); | |
| 5169 | - } | |
| 5170 | -}; | |
| 5171 | -function raceWithSignal(signal, promise2) { | |
| 5172 | - var cleanup = noop; | |
| 5173 | - return new Promise(function (resolve, reject) { | |
| 5174 | - var notifyRejection = function () { return reject(new TaskAbortError(signal.reason)); }; | |
| 5175 | - if (signal.aborted) { | |
| 5176 | - notifyRejection(); | |
| 5177 | - return; | |
| 5178 | - } | |
| 5179 | - cleanup = addAbortSignalListener(signal, notifyRejection); | |
| 5180 | - promise2.finally(function () { return cleanup(); }).then(resolve, reject); | |
| 5181 | - }).finally(function () { | |
| 5182 | - cleanup = noop; | |
| 5183 | - }); | |
| 5184 | -} | |
| 5185 | -var runTask = function (task2, cleanUp) { return __async(void 0, null, function () { | |
| 5186 | - var value, error_1; | |
| 5187 | - return __generator(this, function (_c) { | |
| 5188 | - switch (_c.label) { | |
| 5189 | - case 0: | |
| 5190 | - _c.trys.push([0, 3, 4, 5]); | |
| 5191 | - return [4 /*yield*/, Promise.resolve()]; | |
| 5192 | - case 1: | |
| 5193 | - _c.sent(); | |
| 5194 | - return [4 /*yield*/, task2()]; | |
| 5195 | - case 2: | |
| 5196 | - value = _c.sent(); | |
| 5197 | - return [2 /*return*/, { | |
| 5198 | - status: "ok", | |
| 5199 | - value: value | |
| 5200 | - }]; | |
| 5201 | - case 3: | |
| 5202 | - error_1 = _c.sent(); | |
| 5203 | - return [2 /*return*/, { | |
| 5204 | - status: error_1 instanceof TaskAbortError ? "cancelled" : "rejected", | |
| 5205 | - error: error_1 | |
| 5206 | - }]; | |
| 5207 | - case 4: | |
| 5208 | - cleanUp == null ? void 0 : cleanUp(); | |
| 5209 | - return [7 /*endfinally*/]; | |
| 5210 | - case 5: return [2 /*return*/]; | |
| 5211 | - } | |
| 5212 | - }); | |
| 5213 | -}); }; | |
| 5214 | -var createPause = function (signal) { | |
| 5215 | - return function (promise2) { | |
| 5216 | - return catchRejection(raceWithSignal(signal, promise2).then(function (output) { | |
| 5217 | - validateActive(signal); | |
| 5218 | - return output; | |
| 5219 | - })); | |
| 5220 | - }; | |
| 5221 | -}; | |
| 5222 | -var createDelay = function (signal) { | |
| 5223 | - var pause = createPause(signal); | |
| 5224 | - return function (timeoutMs) { | |
| 5225 | - return pause(new Promise(function (resolve) { return setTimeout(resolve, timeoutMs); })); | |
| 5226 | - }; | |
| 5227 | -}; | |
| 5228 | -// src/listenerMiddleware/index.ts | |
| 5229 | -var assign = Object.assign; | |
| 5230 | -var INTERNAL_NIL_TOKEN = {}; | |
| 5231 | -var alm = "listenerMiddleware"; | |
| 5232 | -var createFork = function (parentAbortSignal, parentBlockingPromises) { | |
| 5233 | - var linkControllers = function (controller) { return addAbortSignalListener(parentAbortSignal, function () { return abortControllerWithReason(controller, parentAbortSignal.reason); }); }; | |
| 5234 | - return function (taskExecutor, opts) { | |
| 5235 | - assertFunction(taskExecutor, "taskExecutor"); | |
| 5236 | - var childAbortController = new AbortController(); | |
| 5237 | - linkControllers(childAbortController); | |
| 5238 | - var result = runTask(function () { return __async(void 0, null, function () { | |
| 5239 | - var result2; | |
| 5240 | - return __generator(this, function (_c) { | |
| 5241 | - switch (_c.label) { | |
| 5242 | - case 0: | |
| 5243 | - validateActive(parentAbortSignal); | |
| 5244 | - validateActive(childAbortController.signal); | |
| 5245 | - return [4 /*yield*/, taskExecutor({ | |
| 5246 | - pause: createPause(childAbortController.signal), | |
| 5247 | - delay: createDelay(childAbortController.signal), | |
| 5248 | - signal: childAbortController.signal | |
| 5249 | - })]; | |
| 5250 | - case 1: | |
| 5251 | - result2 = _c.sent(); | |
| 5252 | - validateActive(childAbortController.signal); | |
| 5253 | - return [2 /*return*/, result2]; | |
| 5254 | - } | |
| 5255 | - }); | |
| 5256 | - }); }, function () { return abortControllerWithReason(childAbortController, taskCompleted); }); | |
| 5257 | - if (opts == null ? void 0 : opts.autoJoin) { | |
| 5258 | - parentBlockingPromises.push(result); | |
| 5259 | - } | |
| 5260 | - return { | |
| 5261 | - result: createPause(parentAbortSignal)(result), | |
| 5262 | - cancel: function () { | |
| 5263 | - abortControllerWithReason(childAbortController, taskCancelled); | |
| 5264 | - } | |
| 5265 | - }; | |
| 5266 | - }; | |
| 5267 | -}; | |
| 5268 | -var createTakePattern = function (startListening, signal) { | |
| 5269 | - var take = function (predicate, timeout) { return __async(void 0, null, function () { | |
| 5270 | - var unsubscribe, tuplePromise, promises, output; | |
| 5271 | - return __generator(this, function (_c) { | |
| 5272 | - switch (_c.label) { | |
| 5273 | - case 0: | |
| 5274 | - validateActive(signal); | |
| 5275 | - unsubscribe = function () { | |
| 5276 | - }; | |
| 5277 | - tuplePromise = new Promise(function (resolve, reject) { | |
| 5278 | - var stopListening = startListening({ | |
| 5279 | - predicate: predicate, | |
| 5280 | - effect: function (action, listenerApi) { | |
| 5281 | - listenerApi.unsubscribe(); | |
| 5282 | - resolve([ | |
| 5283 | - action, | |
| 5284 | - listenerApi.getState(), | |
| 5285 | - listenerApi.getOriginalState() | |
| 5286 | - ]); | |
| 5287 | - } | |
| 5288 | - }); | |
| 5289 | - unsubscribe = function () { | |
| 5290 | - stopListening(); | |
| 5291 | - reject(); | |
| 5292 | - }; | |
| 5293 | - }); | |
| 5294 | - promises = [ | |
| 5295 | - tuplePromise | |
| 5296 | - ]; | |
| 5297 | - if (timeout != null) { | |
| 5298 | - promises.push(new Promise(function (resolve) { return setTimeout(resolve, timeout, null); })); | |
| 5299 | - } | |
| 5300 | - _c.label = 1; | |
| 5301 | - case 1: | |
| 5302 | - _c.trys.push([1, , 3, 4]); | |
| 5303 | - return [4 /*yield*/, raceWithSignal(signal, Promise.race(promises))]; | |
| 5304 | - case 2: | |
| 5305 | - output = _c.sent(); | |
| 5306 | - validateActive(signal); | |
| 5307 | - return [2 /*return*/, output]; | |
| 5308 | - case 3: | |
| 5309 | - unsubscribe(); | |
| 5310 | - return [7 /*endfinally*/]; | |
| 5311 | - case 4: return [2 /*return*/]; | |
| 5312 | - } | |
| 5313 | - }); | |
| 5314 | - }); }; | |
| 5315 | - return function (predicate, timeout) { return catchRejection(take(predicate, timeout)); }; | |
| 5316 | -}; | |
| 5317 | -var getListenerEntryPropsFrom = function (options) { | |
| 5318 | - var type = options.type, actionCreator = options.actionCreator, matcher = options.matcher, predicate = options.predicate, effect = options.effect; | |
| 5319 | - if (type) { | |
| 5320 | - predicate = createAction(type).match; | |
| 5321 | - } | |
| 5322 | - else if (actionCreator) { | |
| 5323 | - type = actionCreator.type; | |
| 5324 | - predicate = actionCreator.match; | |
| 5325 | - } | |
| 5326 | - else if (matcher) { | |
| 5327 | - predicate = matcher; | |
| 5328 | - } | |
| 5329 | - else if (predicate) { | |
| 5330 | - } | |
| 5331 | - else { | |
| 5332 | - throw new Error("Creating or removing a listener requires one of the known fields for matching an action"); | |
| 5333 | - } | |
| 5334 | - assertFunction(effect, "options.listener"); | |
| 5335 | - return { predicate: predicate, type: type, effect: effect }; | |
| 5336 | -}; | |
| 5337 | -var createListenerEntry = function (options) { | |
| 5338 | - var _c = getListenerEntryPropsFrom(options), type = _c.type, predicate = _c.predicate, effect = _c.effect; | |
| 5339 | - var id = nanoid(); | |
| 5340 | - var entry = { | |
| 5341 | - id: id, | |
| 5342 | - effect: effect, | |
| 5343 | - type: type, | |
| 5344 | - predicate: predicate, | |
| 5345 | - pending: new Set(), | |
| 5346 | - unsubscribe: function () { | |
| 5347 | - throw new Error("Unsubscribe not initialized"); | |
| 5348 | - } | |
| 5349 | - }; | |
| 5350 | - return entry; | |
| 5351 | -}; | |
| 5352 | -var cancelActiveListeners = function (entry) { | |
| 5353 | - entry.pending.forEach(function (controller) { | |
| 5354 | - abortControllerWithReason(controller, listenerCancelled); | |
| 5355 | - }); | |
| 5356 | -}; | |
| 5357 | -var createClearListenerMiddleware = function (listenerMap) { | |
| 5358 | - return function () { | |
| 5359 | - listenerMap.forEach(cancelActiveListeners); | |
| 5360 | - listenerMap.clear(); | |
| 5361 | - }; | |
| 5362 | -}; | |
| 5363 | -var safelyNotifyError = function (errorHandler, errorToNotify, errorInfo) { | |
| 5364 | - try { | |
| 5365 | - errorHandler(errorToNotify, errorInfo); | |
| 5366 | - } | |
| 5367 | - catch (errorHandlerError) { | |
| 5368 | - setTimeout(function () { | |
| 5369 | - throw errorHandlerError; | |
| 5370 | - }, 0); | |
| 5371 | - } | |
| 5372 | -}; | |
| 5373 | -var addListener = createAction(alm + "/add"); | |
| 5374 | -var clearAllListeners = createAction(alm + "/removeAll"); | |
| 5375 | -var removeListener = createAction(alm + "/remove"); | |
| 5376 | -var defaultErrorHandler = function () { | |
| 5377 | - var args = []; | |
| 5378 | - for (var _i = 0; _i < arguments.length; _i++) { | |
| 5379 | - args[_i] = arguments[_i]; | |
| 5380 | - } | |
| 5381 | - console.error.apply(console, __spreadArray([alm + "/error"], args)); | |
| 5382 | -}; | |
| 5383 | -function createListenerMiddleware(middlewareOptions) { | |
| 5384 | - var _this = this; | |
| 5385 | - if (middlewareOptions === void 0) { middlewareOptions = {}; } | |
| 5386 | - var listenerMap = new Map(); | |
| 5387 | - var extra = middlewareOptions.extra, _c = middlewareOptions.onError, onError = _c === void 0 ? defaultErrorHandler : _c; | |
| 5388 | - assertFunction(onError, "onError"); | |
| 5389 | - var insertEntry = function (entry) { | |
| 5390 | - entry.unsubscribe = function () { return listenerMap.delete(entry.id); }; | |
| 5391 | - listenerMap.set(entry.id, entry); | |
| 5392 | - return function (cancelOptions) { | |
| 5393 | - entry.unsubscribe(); | |
| 5394 | - if (cancelOptions == null ? void 0 : cancelOptions.cancelActive) { | |
| 5395 | - cancelActiveListeners(entry); | |
| 5396 | - } | |
| 5397 | - }; | |
| 5398 | - }; | |
| 5399 | - var findListenerEntry = function (comparator) { | |
| 5400 | - for (var _i = 0, _c = Array.from(listenerMap.values()); _i < _c.length; _i++) { | |
| 5401 | - var entry = _c[_i]; | |
| 5402 | - if (comparator(entry)) { | |
| 5403 | - return entry; | |
| 5404 | - } | |
| 5405 | - } | |
| 5406 | - return void 0; | |
| 5407 | - }; | |
| 5408 | - var startListening = function (options) { | |
| 5409 | - var entry = findListenerEntry(function (existingEntry) { return existingEntry.effect === options.effect; }); | |
| 5410 | - if (!entry) { | |
| 5411 | - entry = createListenerEntry(options); | |
| 5412 | - } | |
| 5413 | - return insertEntry(entry); | |
| 5414 | - }; | |
| 5415 | - var stopListening = function (options) { | |
| 5416 | - var _c = getListenerEntryPropsFrom(options), type = _c.type, effect = _c.effect, predicate = _c.predicate; | |
| 5417 | - var entry = findListenerEntry(function (entry2) { | |
| 5418 | - var matchPredicateOrType = typeof type === "string" ? entry2.type === type : entry2.predicate === predicate; | |
| 5419 | - return matchPredicateOrType && entry2.effect === effect; | |
| 5420 | - }); | |
| 5421 | - if (entry) { | |
| 5422 | - entry.unsubscribe(); | |
| 5423 | - if (options.cancelActive) { | |
| 5424 | - cancelActiveListeners(entry); | |
| 5425 | - } | |
| 5426 | - } | |
| 5427 | - return !!entry; | |
| 5428 | - }; | |
| 5429 | - var notifyListener = function (entry, action, api, getOriginalState) { return __async(_this, null, function () { | |
| 5430 | - var internalTaskController, take, autoJoinPromises, listenerError_1; | |
| 5431 | - return __generator(this, function (_c) { | |
| 5432 | - switch (_c.label) { | |
| 5433 | - case 0: | |
| 5434 | - internalTaskController = new AbortController(); | |
| 5435 | - take = createTakePattern(startListening, internalTaskController.signal); | |
| 5436 | - autoJoinPromises = []; | |
| 5437 | - _c.label = 1; | |
| 5438 | - case 1: | |
| 5439 | - _c.trys.push([1, 3, 4, 6]); | |
| 5440 | - entry.pending.add(internalTaskController); | |
| 5441 | - return [4 /*yield*/, Promise.resolve(entry.effect(action, assign({}, api, { | |
| 5442 | - getOriginalState: getOriginalState, | |
| 5443 | - condition: function (predicate, timeout) { return take(predicate, timeout).then(Boolean); }, | |
| 5444 | - take: take, | |
| 5445 | - delay: createDelay(internalTaskController.signal), | |
| 5446 | - pause: createPause(internalTaskController.signal), | |
| 5447 | - extra: extra, | |
| 5448 | - signal: internalTaskController.signal, | |
| 5449 | - fork: createFork(internalTaskController.signal, autoJoinPromises), | |
| 5450 | - unsubscribe: entry.unsubscribe, | |
| 5451 | - subscribe: function () { | |
| 5452 | - listenerMap.set(entry.id, entry); | |
| 5453 | - }, | |
| 5454 | - cancelActiveListeners: function () { | |
| 5455 | - entry.pending.forEach(function (controller, _, set) { | |
| 5456 | - if (controller !== internalTaskController) { | |
| 5457 | - abortControllerWithReason(controller, listenerCancelled); | |
| 5458 | - set.delete(controller); | |
| 5459 | - } | |
| 5460 | - }); | |
| 5461 | - } | |
| 5462 | - })))]; | |
| 5463 | - case 2: | |
| 5464 | - _c.sent(); | |
| 5465 | - return [3 /*break*/, 6]; | |
| 5466 | - case 3: | |
| 5467 | - listenerError_1 = _c.sent(); | |
| 5468 | - if (!(listenerError_1 instanceof TaskAbortError)) { | |
| 5469 | - safelyNotifyError(onError, listenerError_1, { | |
| 5470 | - raisedBy: "effect" | |
| 5471 | - }); | |
| 5472 | - } | |
| 5473 | - return [3 /*break*/, 6]; | |
| 5474 | - case 4: return [4 /*yield*/, Promise.allSettled(autoJoinPromises)]; | |
| 5475 | - case 5: | |
| 5476 | - _c.sent(); | |
| 5477 | - abortControllerWithReason(internalTaskController, listenerCompleted); | |
| 5478 | - entry.pending.delete(internalTaskController); | |
| 5479 | - return [7 /*endfinally*/]; | |
| 5480 | - case 6: return [2 /*return*/]; | |
| 5481 | - } | |
| 5482 | - }); | |
| 5483 | - }); }; | |
| 5484 | - var clearListenerMiddleware = createClearListenerMiddleware(listenerMap); | |
| 5485 | - var middleware = function (api) { return function (next) { return function (action) { | |
| 5486 | - if (!isAction(action)) { | |
| 5487 | - return next(action); | |
| 5488 | - } | |
| 5489 | - if (addListener.match(action)) { | |
| 5490 | - return startListening(action.payload); | |
| 5491 | - } | |
| 5492 | - if (clearAllListeners.match(action)) { | |
| 5493 | - clearListenerMiddleware(); | |
| 5494 | - return; | |
| 5495 | - } | |
| 5496 | - if (removeListener.match(action)) { | |
| 5497 | - return stopListening(action.payload); | |
| 5498 | - } | |
| 5499 | - var originalState = api.getState(); | |
| 5500 | - var getOriginalState = function () { | |
| 5501 | - if (originalState === INTERNAL_NIL_TOKEN) { | |
| 5502 | - throw new Error(alm + ": getOriginalState can only be called synchronously"); | |
| 5503 | - } | |
| 5504 | - return originalState; | |
| 5505 | - }; | |
| 5506 | - var result; | |
| 5507 | - try { | |
| 5508 | - result = next(action); | |
| 5509 | - if (listenerMap.size > 0) { | |
| 5510 | - var currentState = api.getState(); | |
| 5511 | - var listenerEntries = Array.from(listenerMap.values()); | |
| 5512 | - for (var _i = 0, listenerEntries_1 = listenerEntries; _i < listenerEntries_1.length; _i++) { | |
| 5513 | - var entry = listenerEntries_1[_i]; | |
| 5514 | - var runListener = false; | |
| 5515 | - try { | |
| 5516 | - runListener = entry.predicate(action, currentState, originalState); | |
| 5517 | - } | |
| 5518 | - catch (predicateError) { | |
| 5519 | - runListener = false; | |
| 5520 | - safelyNotifyError(onError, predicateError, { | |
| 5521 | - raisedBy: "predicate" | |
| 5522 | - }); | |
| 5523 | - } | |
| 5524 | - if (!runListener) { | |
| 5525 | - continue; | |
| 5526 | - } | |
| 5527 | - notifyListener(entry, action, api, getOriginalState); | |
| 5528 | - } | |
| 5529 | - } | |
| 5530 | - } | |
| 5531 | - finally { | |
| 5532 | - originalState = INTERNAL_NIL_TOKEN; | |
| 5533 | - } | |
| 5534 | - return result; | |
| 5535 | - }; }; }; | |
| 5536 | - return { | |
| 5537 | - middleware: middleware, | |
| 5538 | - startListening: startListening, | |
| 5539 | - stopListening: stopListening, | |
| 5540 | - clearListeners: clearListenerMiddleware | |
| 5541 | - }; | |
| 5542 | -} | |
| 5543 | -// src/autoBatchEnhancer.ts | |
| 5544 | -var SHOULD_AUTOBATCH = "RTK_autoBatch"; | |
| 5545 | -var prepareAutoBatched = function () { return function (payload) { | |
| 5546 | - var _c; | |
| 5547 | - return ({ | |
| 5548 | - payload: payload, | |
| 5549 | - meta: (_c = {}, _c[SHOULD_AUTOBATCH] = true, _c) | |
| 5550 | - }); | |
| 5551 | -}; }; | |
| 5552 | -var promise; | |
| 5553 | -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 () { | |
| 5554 | - throw err; | |
| 5555 | -}, 0); }); }; | |
| 5556 | -var createQueueWithTimer = function (timeout) { | |
| 5557 | - return function (notify) { | |
| 5558 | - setTimeout(notify, timeout); | |
| 5559 | - }; | |
| 5560 | -}; | |
| 5561 | -var rAF = typeof window !== "undefined" && window.requestAnimationFrame ? window.requestAnimationFrame : createQueueWithTimer(10); | |
| 5562 | -var autoBatchEnhancer = function (options) { | |
| 5563 | - if (options === void 0) { options = { type: "raf" }; } | |
| 5564 | - return function (next) { return function () { | |
| 5565 | - var args = []; | |
| 5566 | - for (var _i = 0; _i < arguments.length; _i++) { | |
| 5567 | - args[_i] = arguments[_i]; | |
| 5568 | - } | |
| 5569 | - var store = next.apply(void 0, args); | |
| 5570 | - var notifying = true; | |
| 5571 | - var shouldNotifyAtEndOfTick = false; | |
| 5572 | - var notificationQueued = false; | |
| 5573 | - var listeners = new Set(); | |
| 5574 | - var queueCallback = options.type === "tick" ? queueMicrotaskShim : options.type === "raf" ? rAF : options.type === "callback" ? options.queueNotification : createQueueWithTimer(options.timeout); | |
| 5575 | - var notifyListeners = function () { | |
| 5576 | - notificationQueued = false; | |
| 5577 | - if (shouldNotifyAtEndOfTick) { | |
| 5578 | - shouldNotifyAtEndOfTick = false; | |
| 5579 | - listeners.forEach(function (l) { return l(); }); | |
| 5580 | - } | |
| 5581 | - }; | |
| 5582 | - return Object.assign({}, store, { | |
| 5583 | - subscribe: function (listener2) { | |
| 5584 | - var wrappedListener = function () { return notifying && listener2(); }; | |
| 5585 | - var unsubscribe = store.subscribe(wrappedListener); | |
| 5586 | - listeners.add(listener2); | |
| 5587 | - return function () { | |
| 5588 | - unsubscribe(); | |
| 5589 | - listeners.delete(listener2); | |
| 5590 | - }; | |
| 5591 | - }, | |
| 5592 | - dispatch: function (action) { | |
| 5593 | - var _a; | |
| 5594 | - try { | |
| 5595 | - notifying = !((_a = action == null ? void 0 : action.meta) == null ? void 0 : _a[SHOULD_AUTOBATCH]); | |
| 5596 | - shouldNotifyAtEndOfTick = !notifying; | |
| 5597 | - if (shouldNotifyAtEndOfTick) { | |
| 5598 | - if (!notificationQueued) { | |
| 5599 | - notificationQueued = true; | |
| 5600 | - queueCallback(notifyListeners); | |
| 5601 | - } | |
| 5602 | - } | |
| 5603 | - return store.dispatch(action); | |
| 5604 | - } | |
| 5605 | - finally { | |
| 5606 | - notifying = true; | |
| 5607 | - } | |
| 5608 | - } | |
| 5609 | - }); | |
| 5610 | - }; }; | |
| 5611 | -}; | |
| 5612 | -// src/index.ts | |
| 5613 | -(0,immer__WEBPACK_IMPORTED_MODULE_0__.enableES5)(); | |
| 5614 | - | |
| 5615 | -//# sourceMappingURL=redux-toolkit.esm.js.map | |
| 5616 | - | |
| 5617 | -/***/ }), | |
| 5618 | - | |
| 5619 | -/***/ "../node_modules/immer/dist/immer.esm.mjs": | |
| 5620 | -/*!************************************************!*\ | |
| 5621 | - !*** ../node_modules/immer/dist/immer.esm.mjs ***! | |
| 5622 | - \************************************************/ | |
| 5623 | -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { | |
| 5624 | - | |
| 5625 | -"use strict"; | |
| 5626 | -__webpack_require__.r(__webpack_exports__); | |
| 5627 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 5628 | -/* harmony export */ Immer: () => (/* binding */ un), | |
| 5629 | -/* harmony export */ applyPatches: () => (/* binding */ pn), | |
| 5630 | -/* harmony export */ castDraft: () => (/* binding */ K), | |
| 5631 | -/* harmony export */ castImmutable: () => (/* binding */ $), | |
| 5632 | -/* harmony export */ createDraft: () => (/* binding */ ln), | |
| 5633 | -/* harmony export */ current: () => (/* binding */ R), | |
| 5634 | -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), | |
| 5635 | -/* harmony export */ enableAllPlugins: () => (/* binding */ J), | |
| 5636 | -/* harmony export */ enableES5: () => (/* binding */ F), | |
| 5637 | -/* harmony export */ enableMapSet: () => (/* binding */ C), | |
| 5638 | -/* harmony export */ enablePatches: () => (/* binding */ T), | |
| 5639 | -/* harmony export */ finishDraft: () => (/* binding */ dn), | |
| 5640 | -/* harmony export */ freeze: () => (/* binding */ d), | |
| 5641 | -/* harmony export */ immerable: () => (/* binding */ L), | |
| 5642 | -/* harmony export */ isDraft: () => (/* binding */ r), | |
| 5643 | -/* harmony export */ isDraftable: () => (/* binding */ t), | |
| 5644 | -/* harmony export */ nothing: () => (/* binding */ H), | |
| 5645 | -/* harmony export */ original: () => (/* binding */ e), | |
| 5646 | -/* harmony export */ produce: () => (/* binding */ fn), | |
| 5647 | -/* harmony export */ produceWithPatches: () => (/* binding */ cn), | |
| 5648 | -/* harmony export */ setAutoFreeze: () => (/* binding */ sn), | |
| 5649 | -/* harmony export */ setUseProxies: () => (/* binding */ vn) | |
| 5650 | -/* harmony export */ }); | |
| 5651 | -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 | |
| 5652 | -}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); | |
| 5653 | -//# sourceMappingURL=immer.esm.js.map | |
| 5654 | - | |
| 5655 | - | |
| 5656 | -/***/ }), | |
| 5657 | - | |
| 5658 | -/***/ "../node_modules/redux-thunk/es/index.js": | |
| 5659 | -/*!***********************************************!*\ | |
| 5660 | - !*** ../node_modules/redux-thunk/es/index.js ***! | |
| 5661 | - \***********************************************/ | |
| 5662 | -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | |
| 5663 | - | |
| 5664 | -"use strict"; | |
| 5665 | -__webpack_require__.r(__webpack_exports__); | |
| 5666 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 5667 | -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) | |
| 5668 | -/* harmony export */ }); | |
| 5669 | -/** A function that accepts a potential "extra argument" value to be injected later, | |
| 5670 | - * and returns an instance of the thunk middleware that uses that value | |
| 5671 | - */ | |
| 5672 | -function createThunkMiddleware(extraArgument) { | |
| 5673 | - // Standard Redux middleware definition pattern: | |
| 5674 | - // See: https://redux.js.org/tutorials/fundamentals/part-4-store#writing-custom-middleware | |
| 5675 | - var middleware = function middleware(_ref) { | |
| 5676 | - var dispatch = _ref.dispatch, | |
| 5677 | - getState = _ref.getState; | |
| 5678 | - return function (next) { | |
| 5679 | - return function (action) { | |
| 5680 | - // The thunk middleware looks for any functions that were passed to `store.dispatch`. | |
| 5681 | - // If this "action" is really a function, call it and return the result. | |
| 5682 | - if (typeof action === 'function') { | |
| 5683 | - // Inject the store's `dispatch` and `getState` methods, as well as any "extra arg" | |
| 5684 | - return action(dispatch, getState, extraArgument); | |
| 5685 | - } // Otherwise, pass the action down the middleware chain as usual | |
| 5686 | - | |
| 5687 | - | |
| 5688 | - return next(action); | |
| 5689 | - }; | |
| 5690 | - }; | |
| 5691 | - }; | |
| 5692 | - | |
| 5693 | - return middleware; | |
| 5694 | -} | |
| 5695 | - | |
| 5696 | -var thunk = createThunkMiddleware(); // Attach the factory function so users can create a customized version | |
| 5697 | -// with whatever "extra arg" they want to inject into their thunks | |
| 5698 | - | |
| 5699 | -thunk.withExtraArgument = createThunkMiddleware; | |
| 5700 | -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (thunk); | |
| 5701 | - | |
| 5702 | -/***/ }), | |
| 5703 | - | |
| 5704 | -/***/ "../node_modules/redux/es/redux.js": | |
| 5705 | -/*!*****************************************!*\ | |
| 5706 | - !*** ../node_modules/redux/es/redux.js ***! | |
| 5707 | - \*****************************************/ | |
| 5708 | -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | |
| 5709 | - | |
| 5710 | -"use strict"; | |
| 5711 | -__webpack_require__.r(__webpack_exports__); | |
| 5712 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 5713 | -/* harmony export */ __DO_NOT_USE__ActionTypes: () => (/* binding */ ActionTypes), | |
| 5714 | -/* harmony export */ applyMiddleware: () => (/* binding */ applyMiddleware), | |
| 5715 | -/* harmony export */ bindActionCreators: () => (/* binding */ bindActionCreators), | |
| 5716 | -/* harmony export */ combineReducers: () => (/* binding */ combineReducers), | |
| 5717 | -/* harmony export */ compose: () => (/* binding */ compose), | |
| 5718 | -/* harmony export */ createStore: () => (/* binding */ createStore), | |
| 5719 | -/* harmony export */ legacy_createStore: () => (/* binding */ legacy_createStore) | |
| 5720 | -/* harmony export */ }); | |
| 5721 | -/* 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"); | |
| 5722 | - | |
| 5723 | - | |
| 5724 | -/** | |
| 5725 | - * Adapted from React: https://github.com/facebook/react/blob/master/packages/shared/formatProdErrorMessage.js | |
| 5726 | - * | |
| 5727 | - * Do not require this module directly! Use normal throw error calls. These messages will be replaced with error codes | |
| 5728 | - * during build. | |
| 5729 | - * @param {number} code | |
| 5730 | - */ | |
| 5731 | -function formatProdErrorMessage(code) { | |
| 5732 | - 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. '; | |
| 5733 | -} | |
| 5734 | - | |
| 5735 | -// Inlined version of the `symbol-observable` polyfill | |
| 5736 | -var $$observable = (function () { | |
| 5737 | - return typeof Symbol === 'function' && Symbol.observable || '@@observable'; | |
| 5738 | -})(); | |
| 5739 | - | |
| 5740 | -/** | |
| 5741 | - * These are private action types reserved by Redux. | |
| 5742 | - * For any unknown actions, you must return the current state. | |
| 5743 | - * If the current state is undefined, you must return the initial state. | |
| 5744 | - * Do not reference these action types directly in your code. | |
| 5745 | - */ | |
| 5746 | -var randomString = function randomString() { | |
| 5747 | - return Math.random().toString(36).substring(7).split('').join('.'); | |
| 5748 | -}; | |
| 5749 | - | |
| 5750 | -var ActionTypes = { | |
| 5751 | - INIT: "@@redux/INIT" + randomString(), | |
| 5752 | - REPLACE: "@@redux/REPLACE" + randomString(), | |
| 5753 | - PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() { | |
| 5754 | - return "@@redux/PROBE_UNKNOWN_ACTION" + randomString(); | |
| 5755 | - } | |
| 5756 | -}; | |
| 5757 | - | |
| 5758 | -/** | |
| 5759 | - * @param {any} obj The object to inspect. | |
| 5760 | - * @returns {boolean} True if the argument appears to be a plain object. | |
| 5761 | - */ | |
| 5762 | -function isPlainObject(obj) { | |
| 5763 | - if (typeof obj !== 'object' || obj === null) return false; | |
| 5764 | - var proto = obj; | |
| 5765 | - | |
| 5766 | - while (Object.getPrototypeOf(proto) !== null) { | |
| 5767 | - proto = Object.getPrototypeOf(proto); | |
| 5768 | - } | |
| 5769 | - | |
| 5770 | - return Object.getPrototypeOf(obj) === proto; | |
| 5771 | -} | |
| 5772 | - | |
| 5773 | -// Inlined / shortened version of `kindOf` from https://github.com/jonschlinkert/kind-of | |
| 5774 | -function miniKindOf(val) { | |
| 5775 | - if (val === void 0) return 'undefined'; | |
| 5776 | - if (val === null) return 'null'; | |
| 5777 | - var type = typeof val; | |
| 5778 | - | |
| 5779 | - switch (type) { | |
| 5780 | - case 'boolean': | |
| 5781 | - case 'string': | |
| 5782 | - case 'number': | |
| 5783 | - case 'symbol': | |
| 5784 | - case 'function': | |
| 5785 | - { | |
| 5786 | - return type; | |
| 5787 | - } | |
| 5788 | - } | |
| 5789 | - | |
| 5790 | - if (Array.isArray(val)) return 'array'; | |
| 5791 | - if (isDate(val)) return 'date'; | |
| 5792 | - if (isError(val)) return 'error'; | |
| 5793 | - var constructorName = ctorName(val); | |
| 5794 | - | |
| 5795 | - switch (constructorName) { | |
| 5796 | - case 'Symbol': | |
| 5797 | - case 'Promise': | |
| 5798 | - case 'WeakMap': | |
| 5799 | - case 'WeakSet': | |
| 5800 | - case 'Map': | |
| 5801 | - case 'Set': | |
| 5802 | - return constructorName; | |
| 5803 | - } // other | |
| 5804 | - | |
| 5805 | - | |
| 5806 | - return type.slice(8, -1).toLowerCase().replace(/\s/g, ''); | |
| 5807 | -} | |
| 5808 | - | |
| 5809 | -function ctorName(val) { | |
| 5810 | - return typeof val.constructor === 'function' ? val.constructor.name : null; | |
| 5811 | -} | |
| 5812 | - | |
| 5813 | -function isError(val) { | |
| 5814 | - return val instanceof Error || typeof val.message === 'string' && val.constructor && typeof val.constructor.stackTraceLimit === 'number'; | |
| 5815 | -} | |
| 5816 | - | |
| 5817 | -function isDate(val) { | |
| 5818 | - if (val instanceof Date) return true; | |
| 5819 | - return typeof val.toDateString === 'function' && typeof val.getDate === 'function' && typeof val.setDate === 'function'; | |
| 5820 | -} | |
| 5821 | - | |
| 5822 | -function kindOf(val) { | |
| 5823 | - var typeOfVal = typeof val; | |
| 5824 | - | |
| 5825 | - if (true) { | |
| 5826 | - typeOfVal = miniKindOf(val); | |
| 5827 | - } | |
| 5828 | - | |
| 5829 | - return typeOfVal; | |
| 5830 | -} | |
| 5831 | - | |
| 5832 | -/** | |
| 5833 | - * @deprecated | |
| 5834 | - * | |
| 5835 | - * **We recommend using the `configureStore` method | |
| 5836 | - * of the `@reduxjs/toolkit` package**, which replaces `createStore`. | |
| 5837 | - * | |
| 5838 | - * Redux Toolkit is our recommended approach for writing Redux logic today, | |
| 5839 | - * including store setup, reducers, data fetching, and more. | |
| 5840 | - * | |
| 5841 | - * **For more details, please read this Redux docs page:** | |
| 5842 | - * **https://redux.js.org/introduction/why-rtk-is-redux-today** | |
| 5843 | - * | |
| 5844 | - * `configureStore` from Redux Toolkit is an improved version of `createStore` that | |
| 5845 | - * simplifies setup and helps avoid common bugs. | |
| 5846 | - * | |
| 5847 | - * You should not be using the `redux` core package by itself today, except for learning purposes. | |
| 5848 | - * The `createStore` method from the core `redux` package will not be removed, but we encourage | |
| 5849 | - * all users to migrate to using Redux Toolkit for all Redux code. | |
| 5850 | - * | |
| 5851 | - * If you want to use `createStore` without this visual deprecation warning, use | |
| 5852 | - * the `legacy_createStore` import instead: | |
| 5853 | - * | |
| 5854 | - * `import { legacy_createStore as createStore} from 'redux'` | |
| 5855 | - * | |
| 5856 | - */ | |
| 5857 | - | |
| 5858 | -function createStore(reducer, preloadedState, enhancer) { | |
| 5859 | - var _ref2; | |
| 5860 | - | |
| 5861 | - if (typeof preloadedState === 'function' && typeof enhancer === 'function' || typeof enhancer === 'function' && typeof arguments[3] === 'function') { | |
| 5862 | - 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.'); | |
| 5863 | - } | |
| 5864 | - | |
| 5865 | - if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') { | |
| 5866 | - enhancer = preloadedState; | |
| 5867 | - preloadedState = undefined; | |
| 5868 | - } | |
| 5869 | - | |
| 5870 | - if (typeof enhancer !== 'undefined') { | |
| 5871 | - if (typeof enhancer !== 'function') { | |
| 5872 | - throw new Error( false ? 0 : "Expected the enhancer to be a function. Instead, received: '" + kindOf(enhancer) + "'"); | |
| 5873 | - } | |
| 5874 | - | |
| 5875 | - return enhancer(createStore)(reducer, preloadedState); | |
| 5876 | - } | |
| 5877 | - | |
| 5878 | - if (typeof reducer !== 'function') { | |
| 5879 | - throw new Error( false ? 0 : "Expected the root reducer to be a function. Instead, received: '" + kindOf(reducer) + "'"); | |
| 5880 | - } | |
| 5881 | - | |
| 5882 | - var currentReducer = reducer; | |
| 5883 | - var currentState = preloadedState; | |
| 5884 | - var currentListeners = []; | |
| 5885 | - var nextListeners = currentListeners; | |
| 5886 | - var isDispatching = false; | |
| 5887 | - /** | |
| 5888 | - * This makes a shallow copy of currentListeners so we can use | |
| 5889 | - * nextListeners as a temporary list while dispatching. | |
| 5890 | - * | |
| 5891 | - * This prevents any bugs around consumers calling | |
| 5892 | - * subscribe/unsubscribe in the middle of a dispatch. | |
| 5893 | - */ | |
| 5894 | - | |
| 5895 | - function ensureCanMutateNextListeners() { | |
| 5896 | - if (nextListeners === currentListeners) { | |
| 5897 | - nextListeners = currentListeners.slice(); | |
| 5898 | - } | |
| 5899 | - } | |
| 5900 | - /** | |
| 5901 | - * Reads the state tree managed by the store. | |
| 5902 | - * | |
| 5903 | - * @returns {any} The current state tree of your application. | |
| 5904 | - */ | |
| 5905 | - | |
| 5906 | - | |
| 5907 | - function getState() { | |
| 5908 | - if (isDispatching) { | |
| 5909 | - 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.'); | |
| 5910 | - } | |
| 5911 | - | |
| 5912 | - return currentState; | |
| 5913 | - } | |
| 5914 | - /** | |
| 5915 | - * Adds a change listener. It will be called any time an action is dispatched, | |
| 5916 | - * and some part of the state tree may potentially have changed. You may then | |
| 5917 | - * call `getState()` to read the current state tree inside the callback. | |
| 5918 | - * | |
| 5919 | - * You may call `dispatch()` from a change listener, with the following | |
| 5920 | - * caveats: | |
| 5921 | - * | |
| 5922 | - * 1. The subscriptions are snapshotted just before every `dispatch()` call. | |
| 5923 | - * If you subscribe or unsubscribe while the listeners are being invoked, this | |
| 5924 | - * will not have any effect on the `dispatch()` that is currently in progress. | |
| 5925 | - * However, the next `dispatch()` call, whether nested or not, will use a more | |
| 5926 | - * recent snapshot of the subscription list. | |
| 5927 | - * | |
| 5928 | - * 2. The listener should not expect to see all state changes, as the state | |
| 5929 | - * might have been updated multiple times during a nested `dispatch()` before | |
| 5930 | - * the listener is called. It is, however, guaranteed that all subscribers | |
| 5931 | - * registered before the `dispatch()` started will be called with the latest | |
| 5932 | - * state by the time it exits. | |
| 5933 | - * | |
| 5934 | - * @param {Function} listener A callback to be invoked on every dispatch. | |
| 5935 | - * @returns {Function} A function to remove this change listener. | |
| 5936 | - */ | |
| 5937 | - | |
| 5938 | - | |
| 5939 | - function subscribe(listener) { | |
| 5940 | - if (typeof listener !== 'function') { | |
| 5941 | - throw new Error( false ? 0 : "Expected the listener to be a function. Instead, received: '" + kindOf(listener) + "'"); | |
| 5942 | - } | |
| 5943 | - | |
| 5944 | - if (isDispatching) { | |
| 5945 | - 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.'); | |
| 5946 | - } | |
| 5947 | - | |
| 5948 | - var isSubscribed = true; | |
| 5949 | - ensureCanMutateNextListeners(); | |
| 5950 | - nextListeners.push(listener); | |
| 5951 | - return function unsubscribe() { | |
| 5952 | - if (!isSubscribed) { | |
| 5953 | - return; | |
| 5954 | - } | |
| 5955 | - | |
| 5956 | - if (isDispatching) { | |
| 5957 | - 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.'); | |
| 5958 | - } | |
| 5959 | - | |
| 5960 | - isSubscribed = false; | |
| 5961 | - ensureCanMutateNextListeners(); | |
| 5962 | - var index = nextListeners.indexOf(listener); | |
| 5963 | - nextListeners.splice(index, 1); | |
| 5964 | - currentListeners = null; | |
| 5965 | - }; | |
| 5966 | - } | |
| 5967 | - /** | |
| 5968 | - * Dispatches an action. It is the only way to trigger a state change. | |
| 5969 | - * | |
| 5970 | - * The `reducer` function, used to create the store, will be called with the | |
| 5971 | - * current state tree and the given `action`. Its return value will | |
| 5972 | - * be considered the **next** state of the tree, and the change listeners | |
| 5973 | - * will be notified. | |
| 5974 | - * | |
| 5975 | - * The base implementation only supports plain object actions. If you want to | |
| 5976 | - * dispatch a Promise, an Observable, a thunk, or something else, you need to | |
| 5977 | - * wrap your store creating function into the corresponding middleware. For | |
| 5978 | - * example, see the documentation for the `redux-thunk` package. Even the | |
| 5979 | - * middleware will eventually dispatch plain object actions using this method. | |
| 5980 | - * | |
| 5981 | - * @param {Object} action A plain object representing “what changed”. It is | |
| 5982 | - * a good idea to keep actions serializable so you can record and replay user | |
| 5983 | - * sessions, or use the time travelling `redux-devtools`. An action must have | |
| 5984 | - * a `type` property which may not be `undefined`. It is a good idea to use | |
| 5985 | - * string constants for action types. | |
| 5986 | - * | |
| 5987 | - * @returns {Object} For convenience, the same action object you dispatched. | |
| 5988 | - * | |
| 5989 | - * Note that, if you use a custom middleware, it may wrap `dispatch()` to | |
| 5990 | - * return something else (for example, a Promise you can await). | |
| 5991 | - */ | |
| 5992 | - | |
| 5993 | - | |
| 5994 | - function dispatch(action) { | |
| 5995 | - if (!isPlainObject(action)) { | |
| 5996 | - 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."); | |
| 5997 | - } | |
| 5998 | - | |
| 5999 | - if (typeof action.type === 'undefined') { | |
| 6000 | - throw new Error( false ? 0 : 'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.'); | |
| 6001 | - } | |
| 6002 | - | |
| 6003 | - if (isDispatching) { | |
| 6004 | - throw new Error( false ? 0 : 'Reducers may not dispatch actions.'); | |
| 6005 | - } | |
| 6006 | - | |
| 6007 | - try { | |
| 6008 | - isDispatching = true; | |
| 6009 | - currentState = currentReducer(currentState, action); | |
| 6010 | - } finally { | |
| 6011 | - isDispatching = false; | |
| 6012 | - } | |
| 6013 | - | |
| 6014 | - var listeners = currentListeners = nextListeners; | |
| 6015 | - | |
| 6016 | - for (var i = 0; i < listeners.length; i++) { | |
| 6017 | - var listener = listeners[i]; | |
| 6018 | - listener(); | |
| 6019 | - } | |
| 6020 | - | |
| 6021 | - return action; | |
| 6022 | - } | |
| 6023 | - /** | |
| 6024 | - * Replaces the reducer currently used by the store to calculate the state. | |
| 6025 | - * | |
| 6026 | - * You might need this if your app implements code splitting and you want to | |
| 6027 | - * load some of the reducers dynamically. You might also need this if you | |
| 6028 | - * implement a hot reloading mechanism for Redux. | |
| 6029 | - * | |
| 6030 | - * @param {Function} nextReducer The reducer for the store to use instead. | |
| 6031 | - * @returns {void} | |
| 6032 | - */ | |
| 6033 | - | |
| 6034 | - | |
| 6035 | - function replaceReducer(nextReducer) { | |
| 6036 | - if (typeof nextReducer !== 'function') { | |
| 6037 | - throw new Error( false ? 0 : "Expected the nextReducer to be a function. Instead, received: '" + kindOf(nextReducer)); | |
| 6038 | - } | |
| 6039 | - | |
| 6040 | - currentReducer = nextReducer; // This action has a similiar effect to ActionTypes.INIT. | |
| 6041 | - // Any reducers that existed in both the new and old rootReducer | |
| 6042 | - // will receive the previous state. This effectively populates | |
| 6043 | - // the new state tree with any relevant data from the old one. | |
| 6044 | - | |
| 6045 | - dispatch({ | |
| 6046 | - type: ActionTypes.REPLACE | |
| 6047 | - }); | |
| 6048 | - } | |
| 6049 | - /** | |
| 6050 | - * Interoperability point for observable/reactive libraries. | |
| 6051 | - * @returns {observable} A minimal observable of state changes. | |
| 6052 | - * For more information, see the observable proposal: | |
| 6053 | - * https://github.com/tc39/proposal-observable | |
| 6054 | - */ | |
| 6055 | - | |
| 6056 | - | |
| 6057 | - function observable() { | |
| 6058 | - var _ref; | |
| 6059 | - | |
| 6060 | - var outerSubscribe = subscribe; | |
| 6061 | - return _ref = { | |
| 6062 | - /** | |
| 6063 | - * The minimal observable subscription method. | |
| 6064 | - * @param {Object} observer Any object that can be used as an observer. | |
| 6065 | - * The observer object should have a `next` method. | |
| 6066 | - * @returns {subscription} An object with an `unsubscribe` method that can | |
| 6067 | - * be used to unsubscribe the observable from the store, and prevent further | |
| 6068 | - * emission of values from the observable. | |
| 6069 | - */ | |
| 6070 | - subscribe: function subscribe(observer) { | |
| 6071 | - if (typeof observer !== 'object' || observer === null) { | |
| 6072 | - throw new Error( false ? 0 : "Expected the observer to be an object. Instead, received: '" + kindOf(observer) + "'"); | |
| 6073 | - } | |
| 6074 | - | |
| 6075 | - function observeState() { | |
| 6076 | - if (observer.next) { | |
| 6077 | - observer.next(getState()); | |
| 6078 | - } | |
| 6079 | - } | |
| 6080 | - | |
| 6081 | - observeState(); | |
| 6082 | - var unsubscribe = outerSubscribe(observeState); | |
| 6083 | - return { | |
| 6084 | - unsubscribe: unsubscribe | |
| 6085 | - }; | |
| 6086 | - } | |
| 6087 | - }, _ref[$$observable] = function () { | |
| 6088 | - return this; | |
| 6089 | - }, _ref; | |
| 6090 | - } // When a store is created, an "INIT" action is dispatched so that every | |
| 6091 | - // reducer returns their initial state. This effectively populates | |
| 6092 | - // the initial state tree. | |
| 6093 | - | |
| 6094 | - | |
| 6095 | - dispatch({ | |
| 6096 | - type: ActionTypes.INIT | |
| 6097 | - }); | |
| 6098 | - return _ref2 = { | |
| 6099 | - dispatch: dispatch, | |
| 6100 | - subscribe: subscribe, | |
| 6101 | - getState: getState, | |
| 6102 | - replaceReducer: replaceReducer | |
| 6103 | - }, _ref2[$$observable] = observable, _ref2; | |
| 6104 | -} | |
| 6105 | -/** | |
| 6106 | - * Creates a Redux store that holds the state tree. | |
| 6107 | - * | |
| 6108 | - * **We recommend using `configureStore` from the | |
| 6109 | - * `@reduxjs/toolkit` package**, which replaces `createStore`: | |
| 6110 | - * **https://redux.js.org/introduction/why-rtk-is-redux-today** | |
| 6111 | - * | |
| 6112 | - * The only way to change the data in the store is to call `dispatch()` on it. | |
| 6113 | - * | |
| 6114 | - * There should only be a single store in your app. To specify how different | |
| 6115 | - * parts of the state tree respond to actions, you may combine several reducers | |
| 6116 | - * into a single reducer function by using `combineReducers`. | |
| 6117 | - * | |
| 6118 | - * @param {Function} reducer A function that returns the next state tree, given | |
| 6119 | - * the current state tree and the action to handle. | |
| 6120 | - * | |
| 6121 | - * @param {any} [preloadedState] The initial state. You may optionally specify it | |
| 6122 | - * to hydrate the state from the server in universal apps, or to restore a | |
| 6123 | - * previously serialized user session. | |
| 6124 | - * If you use `combineReducers` to produce the root reducer function, this must be | |
| 6125 | - * an object with the same shape as `combineReducers` keys. | |
| 6126 | - * | |
| 6127 | - * @param {Function} [enhancer] The store enhancer. You may optionally specify it | |
| 6128 | - * to enhance the store with third-party capabilities such as middleware, | |
| 6129 | - * time travel, persistence, etc. The only store enhancer that ships with Redux | |
| 6130 | - * is `applyMiddleware()`. | |
| 6131 | - * | |
| 6132 | - * @returns {Store} A Redux store that lets you read the state, dispatch actions | |
| 6133 | - * and subscribe to changes. | |
| 6134 | - */ | |
| 6135 | - | |
| 6136 | -var legacy_createStore = createStore; | |
| 6137 | - | |
| 6138 | -/** | |
| 6139 | - * Prints a warning in the console if it exists. | |
| 6140 | - * | |
| 6141 | - * @param {String} message The warning message. | |
| 6142 | - * @returns {void} | |
| 6143 | - */ | |
| 6144 | -function warning(message) { | |
| 6145 | - /* eslint-disable no-console */ | |
| 6146 | - if (typeof console !== 'undefined' && typeof console.error === 'function') { | |
| 6147 | - console.error(message); | |
| 6148 | - } | |
| 6149 | - /* eslint-enable no-console */ | |
| 6150 | - | |
| 6151 | - | |
| 6152 | - try { | |
| 6153 | - // This error was thrown as a convenience so that if you enable | |
| 6154 | - // "break on all exceptions" in your console, | |
| 6155 | - // it would pause the execution at this line. | |
| 6156 | - throw new Error(message); | |
| 6157 | - } catch (e) {} // eslint-disable-line no-empty | |
| 6158 | - | |
| 6159 | -} | |
| 6160 | - | |
| 6161 | -function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) { | |
| 6162 | - var reducerKeys = Object.keys(reducers); | |
| 6163 | - var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer'; | |
| 6164 | - | |
| 6165 | - if (reducerKeys.length === 0) { | |
| 6166 | - return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.'; | |
| 6167 | - } | |
| 6168 | - | |
| 6169 | - if (!isPlainObject(inputState)) { | |
| 6170 | - return "The " + argumentName + " has unexpected type of \"" + kindOf(inputState) + "\". Expected argument to be an object with the following " + ("keys: \"" + reducerKeys.join('", "') + "\""); | |
| 6171 | - } | |
| 6172 | - | |
| 6173 | - var unexpectedKeys = Object.keys(inputState).filter(function (key) { | |
| 6174 | - return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key]; | |
| 6175 | - }); | |
| 6176 | - unexpectedKeys.forEach(function (key) { | |
| 6177 | - unexpectedKeyCache[key] = true; | |
| 6178 | - }); | |
| 6179 | - if (action && action.type === ActionTypes.REPLACE) return; | |
| 6180 | - | |
| 6181 | - if (unexpectedKeys.length > 0) { | |
| 6182 | - 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."); | |
| 6183 | - } | |
| 6184 | -} | |
| 6185 | - | |
| 6186 | -function assertReducerShape(reducers) { | |
| 6187 | - Object.keys(reducers).forEach(function (key) { | |
| 6188 | - var reducer = reducers[key]; | |
| 6189 | - var initialState = reducer(undefined, { | |
| 6190 | - type: ActionTypes.INIT | |
| 6191 | - }); | |
| 6192 | - | |
| 6193 | - if (typeof initialState === 'undefined') { | |
| 6194 | - 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."); | |
| 6195 | - } | |
| 6196 | - | |
| 6197 | - if (typeof reducer(undefined, { | |
| 6198 | - type: ActionTypes.PROBE_UNKNOWN_ACTION() | |
| 6199 | - }) === 'undefined') { | |
| 6200 | - 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."); | |
| 6201 | - } | |
| 6202 | - }); | |
| 6203 | -} | |
| 6204 | -/** | |
| 6205 | - * Turns an object whose values are different reducer functions, into a single | |
| 6206 | - * reducer function. It will call every child reducer, and gather their results | |
| 6207 | - * into a single state object, whose keys correspond to the keys of the passed | |
| 6208 | - * reducer functions. | |
| 6209 | - * | |
| 6210 | - * @param {Object} reducers An object whose values correspond to different | |
| 6211 | - * reducer functions that need to be combined into one. One handy way to obtain | |
| 6212 | - * it is to use ES6 `import * as reducers` syntax. The reducers may never return | |
| 6213 | - * undefined for any action. Instead, they should return their initial state | |
| 6214 | - * if the state passed to them was undefined, and the current state for any | |
| 6215 | - * unrecognized action. | |
| 6216 | - * | |
| 6217 | - * @returns {Function} A reducer function that invokes every reducer inside the | |
| 6218 | - * passed object, and builds a state object with the same shape. | |
| 6219 | - */ | |
| 6220 | - | |
| 6221 | - | |
| 6222 | -function combineReducers(reducers) { | |
| 6223 | - var reducerKeys = Object.keys(reducers); | |
| 6224 | - var finalReducers = {}; | |
| 6225 | - | |
| 6226 | - for (var i = 0; i < reducerKeys.length; i++) { | |
| 6227 | - var key = reducerKeys[i]; | |
| 6228 | - | |
| 6229 | - if (true) { | |
| 6230 | - if (typeof reducers[key] === 'undefined') { | |
| 6231 | - warning("No reducer provided for key \"" + key + "\""); | |
| 6232 | - } | |
| 6233 | - } | |
| 6234 | - | |
| 6235 | - if (typeof reducers[key] === 'function') { | |
| 6236 | - finalReducers[key] = reducers[key]; | |
| 6237 | - } | |
| 6238 | - } | |
| 6239 | - | |
| 6240 | - var finalReducerKeys = Object.keys(finalReducers); // This is used to make sure we don't warn about the same | |
| 6241 | - // keys multiple times. | |
| 6242 | - | |
| 6243 | - var unexpectedKeyCache; | |
| 6244 | - | |
| 6245 | - if (true) { | |
| 6246 | - unexpectedKeyCache = {}; | |
| 6247 | - } | |
| 6248 | - | |
| 6249 | - var shapeAssertionError; | |
| 6250 | - | |
| 6251 | - try { | |
| 6252 | - assertReducerShape(finalReducers); | |
| 6253 | - } catch (e) { | |
| 6254 | - shapeAssertionError = e; | |
| 6255 | - } | |
| 6256 | - | |
| 6257 | - return function combination(state, action) { | |
| 6258 | - if (state === void 0) { | |
| 6259 | - state = {}; | |
| 6260 | - } | |
| 6261 | - | |
| 6262 | - if (shapeAssertionError) { | |
| 6263 | - throw shapeAssertionError; | |
| 6264 | - } | |
| 6265 | - | |
| 6266 | - if (true) { | |
| 6267 | - var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache); | |
| 6268 | - | |
| 6269 | - if (warningMessage) { | |
| 6270 | - warning(warningMessage); | |
| 6271 | - } | |
| 6272 | - } | |
| 6273 | - | |
| 6274 | - var hasChanged = false; | |
| 6275 | - var nextState = {}; | |
| 6276 | - | |
| 6277 | - for (var _i = 0; _i < finalReducerKeys.length; _i++) { | |
| 6278 | - var _key = finalReducerKeys[_i]; | |
| 6279 | - var reducer = finalReducers[_key]; | |
| 6280 | - var previousStateForKey = state[_key]; | |
| 6281 | - var nextStateForKey = reducer(previousStateForKey, action); | |
| 6282 | - | |
| 6283 | - if (typeof nextStateForKey === 'undefined') { | |
| 6284 | - var actionType = action && action.type; | |
| 6285 | - 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."); | |
| 6286 | - } | |
| 6287 | - | |
| 6288 | - nextState[_key] = nextStateForKey; | |
| 6289 | - hasChanged = hasChanged || nextStateForKey !== previousStateForKey; | |
| 6290 | - } | |
| 6291 | - | |
| 6292 | - hasChanged = hasChanged || finalReducerKeys.length !== Object.keys(state).length; | |
| 6293 | - return hasChanged ? nextState : state; | |
| 6294 | - }; | |
| 6295 | -} | |
| 6296 | - | |
| 6297 | -function bindActionCreator(actionCreator, dispatch) { | |
| 6298 | - return function () { | |
| 6299 | - return dispatch(actionCreator.apply(this, arguments)); | |
| 6300 | - }; | |
| 6301 | -} | |
| 6302 | -/** | |
| 6303 | - * Turns an object whose values are action creators, into an object with the | |
| 6304 | - * same keys, but with every function wrapped into a `dispatch` call so they | |
| 6305 | - * may be invoked directly. This is just a convenience method, as you can call | |
| 6306 | - * `store.dispatch(MyActionCreators.doSomething())` yourself just fine. | |
| 6307 | - * | |
| 6308 | - * For convenience, you can also pass an action creator as the first argument, | |
| 6309 | - * and get a dispatch wrapped function in return. | |
| 6310 | - * | |
| 6311 | - * @param {Function|Object} actionCreators An object whose values are action | |
| 6312 | - * creator functions. One handy way to obtain it is to use ES6 `import * as` | |
| 6313 | - * syntax. You may also pass a single function. | |
| 6314 | - * | |
| 6315 | - * @param {Function} dispatch The `dispatch` function available on your Redux | |
| 6316 | - * store. | |
| 6317 | - * | |
| 6318 | - * @returns {Function|Object} The object mimicking the original object, but with | |
| 6319 | - * every action creator wrapped into the `dispatch` call. If you passed a | |
| 6320 | - * function as `actionCreators`, the return value will also be a single | |
| 6321 | - * function. | |
| 6322 | - */ | |
| 6323 | - | |
| 6324 | - | |
| 6325 | -function bindActionCreators(actionCreators, dispatch) { | |
| 6326 | - if (typeof actionCreators === 'function') { | |
| 6327 | - return bindActionCreator(actionCreators, dispatch); | |
| 6328 | - } | |
| 6329 | - | |
| 6330 | - if (typeof actionCreators !== 'object' || actionCreators === null) { | |
| 6331 | - 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\"?"); | |
| 6332 | - } | |
| 6333 | - | |
| 6334 | - var boundActionCreators = {}; | |
| 6335 | - | |
| 6336 | - for (var key in actionCreators) { | |
| 6337 | - var actionCreator = actionCreators[key]; | |
| 6338 | - | |
| 6339 | - if (typeof actionCreator === 'function') { | |
| 6340 | - boundActionCreators[key] = bindActionCreator(actionCreator, dispatch); | |
| 6341 | - } | |
| 6342 | - } | |
| 6343 | - | |
| 6344 | - return boundActionCreators; | |
| 6345 | -} | |
| 6346 | - | |
| 6347 | -/** | |
| 6348 | - * Composes single-argument functions from right to left. The rightmost | |
| 6349 | - * function can take multiple arguments as it provides the signature for | |
| 6350 | - * the resulting composite function. | |
| 6351 | - * | |
| 6352 | - * @param {...Function} funcs The functions to compose. | |
| 6353 | - * @returns {Function} A function obtained by composing the argument functions | |
| 6354 | - * from right to left. For example, compose(f, g, h) is identical to doing | |
| 6355 | - * (...args) => f(g(h(...args))). | |
| 6356 | - */ | |
| 6357 | -function compose() { | |
| 6358 | - for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) { | |
| 6359 | - funcs[_key] = arguments[_key]; | |
| 6360 | - } | |
| 6361 | - | |
| 6362 | - if (funcs.length === 0) { | |
| 6363 | - return function (arg) { | |
| 6364 | - return arg; | |
| 6365 | - }; | |
| 6366 | - } | |
| 6367 | - | |
| 6368 | - if (funcs.length === 1) { | |
| 6369 | - return funcs[0]; | |
| 6370 | - } | |
| 6371 | - | |
| 6372 | - return funcs.reduce(function (a, b) { | |
| 6373 | - return function () { | |
| 6374 | - return a(b.apply(void 0, arguments)); | |
| 6375 | - }; | |
| 6376 | - }); | |
| 6377 | -} | |
| 6378 | - | |
| 6379 | -/** | |
| 6380 | - * Creates a store enhancer that applies middleware to the dispatch method | |
| 6381 | - * of the Redux store. This is handy for a variety of tasks, such as expressing | |
| 6382 | - * asynchronous actions in a concise manner, or logging every action payload. | |
| 6383 | - * | |
| 6384 | - * See `redux-thunk` package as an example of the Redux middleware. | |
| 6385 | - * | |
| 6386 | - * Because middleware is potentially asynchronous, this should be the first | |
| 6387 | - * store enhancer in the composition chain. | |
| 6388 | - * | |
| 6389 | - * Note that each middleware will be given the `dispatch` and `getState` functions | |
| 6390 | - * as named arguments. | |
| 6391 | - * | |
| 6392 | - * @param {...Function} middlewares The middleware chain to be applied. | |
| 6393 | - * @returns {Function} A store enhancer applying the middleware. | |
| 6394 | - */ | |
| 6395 | - | |
| 6396 | -function applyMiddleware() { | |
| 6397 | - for (var _len = arguments.length, middlewares = new Array(_len), _key = 0; _key < _len; _key++) { | |
| 6398 | - middlewares[_key] = arguments[_key]; | |
| 6399 | - } | |
| 6400 | - | |
| 6401 | - return function (createStore) { | |
| 6402 | - return function () { | |
| 6403 | - var store = createStore.apply(void 0, arguments); | |
| 6404 | - | |
| 6405 | - var _dispatch = function dispatch() { | |
| 6406 | - throw new Error( false ? 0 : 'Dispatching while constructing your middleware is not allowed. ' + 'Other middleware would not be applied to this dispatch.'); | |
| 6407 | - }; | |
| 6408 | - | |
| 6409 | - var middlewareAPI = { | |
| 6410 | - getState: store.getState, | |
| 6411 | - dispatch: function dispatch() { | |
| 6412 | - return _dispatch.apply(void 0, arguments); | |
| 6413 | - } | |
| 6414 | - }; | |
| 6415 | - var chain = middlewares.map(function (middleware) { | |
| 6416 | - return middleware(middlewareAPI); | |
| 6417 | - }); | |
| 6418 | - _dispatch = compose.apply(void 0, chain)(store.dispatch); | |
| 6419 | - return (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__["default"])((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__["default"])({}, store), {}, { | |
| 6420 | - dispatch: _dispatch | |
| 6421 | - }); | |
| 6422 | - }; | |
| 6423 | - }; | |
| 6424 | -} | |
| 6425 | - | |
| 6426 | - | |
| 6427 | - | |
| 6428 | - | |
| 6429 | -/***/ }), | |
| 6430 | - | |
| 6431 | -/***/ "../node_modules/reselect/es/defaultMemoize.js": | |
| 6432 | -/*!*****************************************************!*\ | |
| 6433 | - !*** ../node_modules/reselect/es/defaultMemoize.js ***! | |
| 6434 | - \*****************************************************/ | |
| 6435 | -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | |
| 6436 | - | |
| 6437 | -"use strict"; | |
| 6438 | -__webpack_require__.r(__webpack_exports__); | |
| 6439 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 6440 | -/* harmony export */ createCacheKeyComparator: () => (/* binding */ createCacheKeyComparator), | |
| 6441 | -/* harmony export */ defaultEqualityCheck: () => (/* binding */ defaultEqualityCheck), | |
| 6442 | -/* harmony export */ defaultMemoize: () => (/* binding */ defaultMemoize) | |
| 6443 | -/* harmony export */ }); | |
| 6444 | -// Cache implementation based on Erik Rasmussen's `lru-memoize`: | |
| 6445 | -// https://github.com/erikras/lru-memoize | |
| 6446 | -var NOT_FOUND = 'NOT_FOUND'; | |
| 6447 | - | |
| 6448 | -function createSingletonCache(equals) { | |
| 6449 | - var entry; | |
| 6450 | - return { | |
| 6451 | - get: function get(key) { | |
| 6452 | - if (entry && equals(entry.key, key)) { | |
| 6453 | - return entry.value; | |
| 6454 | - } | |
| 6455 | - | |
| 6456 | - return NOT_FOUND; | |
| 6457 | - }, | |
| 6458 | - put: function put(key, value) { | |
| 6459 | - entry = { | |
| 6460 | - key: key, | |
| 6461 | - value: value | |
| 6462 | - }; | |
| 6463 | - }, | |
| 6464 | - getEntries: function getEntries() { | |
| 6465 | - return entry ? [entry] : []; | |
| 6466 | - }, | |
| 6467 | - clear: function clear() { | |
| 6468 | - entry = undefined; | |
| 6469 | - } | |
| 6470 | - }; | |
| 6471 | -} | |
| 6472 | - | |
| 6473 | -function createLruCache(maxSize, equals) { | |
| 6474 | - var entries = []; | |
| 6475 | - | |
| 6476 | - function get(key) { | |
| 6477 | - var cacheIndex = entries.findIndex(function (entry) { | |
| 6478 | - return equals(key, entry.key); | |
| 6479 | - }); // We found a cached entry | |
| 6480 | - | |
| 6481 | - if (cacheIndex > -1) { | |
| 6482 | - var entry = entries[cacheIndex]; // Cached entry not at top of cache, move it to the top | |
| 6483 | - | |
| 6484 | - if (cacheIndex > 0) { | |
| 6485 | - entries.splice(cacheIndex, 1); | |
| 6486 | - entries.unshift(entry); | |
| 6487 | - } | |
| 6488 | - | |
| 6489 | - return entry.value; | |
| 6490 | - } // No entry found in cache, return sentinel | |
| 6491 | - | |
| 6492 | - | |
| 6493 | - return NOT_FOUND; | |
| 6494 | - } | |
| 6495 | - | |
| 6496 | - function put(key, value) { | |
| 6497 | - if (get(key) === NOT_FOUND) { | |
| 6498 | - // TODO Is unshift slow? | |
| 6499 | - entries.unshift({ | |
| 6500 | - key: key, | |
| 6501 | - value: value | |
| 6502 | - }); | |
| 6503 | - | |
| 6504 | - if (entries.length > maxSize) { | |
| 6505 | - entries.pop(); | |
| 6506 | - } | |
| 6507 | - } | |
| 6508 | - } | |
| 6509 | - | |
| 6510 | - function getEntries() { | |
| 6511 | - return entries; | |
| 6512 | - } | |
| 6513 | - | |
| 6514 | - function clear() { | |
| 6515 | - entries = []; | |
| 6516 | - } | |
| 6517 | - | |
| 6518 | - return { | |
| 6519 | - get: get, | |
| 6520 | - put: put, | |
| 6521 | - getEntries: getEntries, | |
| 6522 | - clear: clear | |
| 6523 | - }; | |
| 6524 | -} | |
| 6525 | - | |
| 6526 | -var defaultEqualityCheck = function defaultEqualityCheck(a, b) { | |
| 6527 | - return a === b; | |
| 6528 | -}; | |
| 6529 | -function createCacheKeyComparator(equalityCheck) { | |
| 6530 | - return function areArgumentsShallowlyEqual(prev, next) { | |
| 6531 | - if (prev === null || next === null || prev.length !== next.length) { | |
| 6532 | - return false; | |
| 6533 | - } // Do this in a for loop (and not a `forEach` or an `every`) so we can determine equality as fast as possible. | |
| 6534 | - | |
| 6535 | - | |
| 6536 | - var length = prev.length; | |
| 6537 | - | |
| 6538 | - for (var i = 0; i < length; i++) { | |
| 6539 | - if (!equalityCheck(prev[i], next[i])) { | |
| 6540 | - return false; | |
| 6541 | - } | |
| 6542 | - } | |
| 6543 | - | |
| 6544 | - return true; | |
| 6545 | - }; | |
| 6546 | -} | |
| 6547 | -// defaultMemoize now supports a configurable cache size with LRU behavior, | |
| 6548 | -// and optional comparison of the result value with existing values | |
| 6549 | -function defaultMemoize(func, equalityCheckOrOptions) { | |
| 6550 | - var providedOptions = typeof equalityCheckOrOptions === 'object' ? equalityCheckOrOptions : { | |
| 6551 | - equalityCheck: equalityCheckOrOptions | |
| 6552 | - }; | |
| 6553 | - var _providedOptions$equa = providedOptions.equalityCheck, | |
| 6554 | - equalityCheck = _providedOptions$equa === void 0 ? defaultEqualityCheck : _providedOptions$equa, | |
| 6555 | - _providedOptions$maxS = providedOptions.maxSize, | |
| 6556 | - maxSize = _providedOptions$maxS === void 0 ? 1 : _providedOptions$maxS, | |
| 6557 | - resultEqualityCheck = providedOptions.resultEqualityCheck; | |
| 6558 | - var comparator = createCacheKeyComparator(equalityCheck); | |
| 6559 | - var cache = maxSize === 1 ? createSingletonCache(comparator) : createLruCache(maxSize, comparator); // we reference arguments instead of spreading them for performance reasons | |
| 6560 | - | |
| 6561 | - function memoized() { | |
| 6562 | - var value = cache.get(arguments); | |
| 6563 | - | |
| 6564 | - if (value === NOT_FOUND) { | |
| 6565 | - // @ts-ignore | |
| 6566 | - value = func.apply(null, arguments); | |
| 6567 | - | |
| 6568 | - if (resultEqualityCheck) { | |
| 6569 | - var entries = cache.getEntries(); | |
| 6570 | - var matchingEntry = entries.find(function (entry) { | |
| 6571 | - return resultEqualityCheck(entry.value, value); | |
| 6572 | - }); | |
| 6573 | - | |
| 6574 | - if (matchingEntry) { | |
| 6575 | - value = matchingEntry.value; | |
| 6576 | - } | |
| 6577 | - } | |
| 6578 | - | |
| 6579 | - cache.put(arguments, value); | |
| 6580 | - } | |
| 6581 | - | |
| 6582 | - return value; | |
| 6583 | - } | |
| 6584 | - | |
| 6585 | - memoized.clearCache = function () { | |
| 6586 | - return cache.clear(); | |
| 6587 | - }; | |
| 6588 | - | |
| 6589 | - return memoized; | |
| 6590 | -} | |
| 6591 | - | |
| 6592 | -/***/ }), | |
| 6593 | - | |
| 6594 | -/***/ "../node_modules/reselect/es/index.js": | |
| 6595 | -/*!********************************************!*\ | |
| 6596 | - !*** ../node_modules/reselect/es/index.js ***! | |
| 6597 | - \********************************************/ | |
| 6598 | -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | |
| 6599 | - | |
| 6600 | -"use strict"; | |
| 6601 | -__webpack_require__.r(__webpack_exports__); | |
| 6602 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 6603 | -/* harmony export */ createSelector: () => (/* binding */ createSelector), | |
| 6604 | -/* harmony export */ createSelectorCreator: () => (/* binding */ createSelectorCreator), | |
| 6605 | -/* harmony export */ createStructuredSelector: () => (/* binding */ createStructuredSelector), | |
| 6606 | -/* harmony export */ defaultEqualityCheck: () => (/* reexport safe */ _defaultMemoize__WEBPACK_IMPORTED_MODULE_0__.defaultEqualityCheck), | |
| 6607 | -/* harmony export */ defaultMemoize: () => (/* reexport safe */ _defaultMemoize__WEBPACK_IMPORTED_MODULE_0__.defaultMemoize) | |
| 6608 | -/* harmony export */ }); | |
| 6609 | -/* harmony import */ var _defaultMemoize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultMemoize */ "../node_modules/reselect/es/defaultMemoize.js"); | |
| 6610 | - | |
| 6611 | - | |
| 6612 | - | |
| 6613 | -function getDependencies(funcs) { | |
| 6614 | - var dependencies = Array.isArray(funcs[0]) ? funcs[0] : funcs; | |
| 6615 | - | |
| 6616 | - if (!dependencies.every(function (dep) { | |
| 6617 | - return typeof dep === 'function'; | |
| 6618 | - })) { | |
| 6619 | - var dependencyTypes = dependencies.map(function (dep) { | |
| 6620 | - return typeof dep === 'function' ? "function " + (dep.name || 'unnamed') + "()" : typeof dep; | |
| 6621 | - }).join(', '); | |
| 6622 | - throw new Error("createSelector expects all input-selectors to be functions, but received the following types: [" + dependencyTypes + "]"); | |
| 6623 | - } | |
| 6624 | - | |
| 6625 | - return dependencies; | |
| 6626 | -} | |
| 6627 | - | |
| 6628 | -function createSelectorCreator(memoize) { | |
| 6629 | - for (var _len = arguments.length, memoizeOptionsFromArgs = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { | |
| 6630 | - memoizeOptionsFromArgs[_key - 1] = arguments[_key]; | |
| 6631 | - } | |
| 6632 | - | |
| 6633 | - var createSelector = function createSelector() { | |
| 6634 | - for (var _len2 = arguments.length, funcs = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { | |
| 6635 | - funcs[_key2] = arguments[_key2]; | |
| 6636 | - } | |
| 6637 | - | |
| 6638 | - var _recomputations = 0; | |
| 6639 | - | |
| 6640 | - var _lastResult; // Due to the intricacies of rest params, we can't do an optional arg after `...funcs`. | |
| 6641 | - // So, start by declaring the default value here. | |
| 6642 | - // (And yes, the words 'memoize' and 'options' appear too many times in this next sequence.) | |
| 6643 | - | |
| 6644 | - | |
| 6645 | - var directlyPassedOptions = { | |
| 6646 | - memoizeOptions: undefined | |
| 6647 | - }; // Normally, the result func or "output selector" is the last arg | |
| 6648 | - | |
| 6649 | - var resultFunc = funcs.pop(); // If the result func is actually an _object_, assume it's our options object | |
| 6650 | - | |
| 6651 | - if (typeof resultFunc === 'object') { | |
| 6652 | - directlyPassedOptions = resultFunc; // and pop the real result func off | |
| 6653 | - | |
| 6654 | - resultFunc = funcs.pop(); | |
| 6655 | - } | |
| 6656 | - | |
| 6657 | - if (typeof resultFunc !== 'function') { | |
| 6658 | - throw new Error("createSelector expects an output function after the inputs, but received: [" + typeof resultFunc + "]"); | |
| 6659 | - } // Determine which set of options we're using. Prefer options passed directly, | |
| 6660 | - // but fall back to options given to createSelectorCreator. | |
| 6661 | - | |
| 6662 | - | |
| 6663 | - var _directlyPassedOption = directlyPassedOptions, | |
| 6664 | - _directlyPassedOption2 = _directlyPassedOption.memoizeOptions, | |
| 6665 | - memoizeOptions = _directlyPassedOption2 === void 0 ? memoizeOptionsFromArgs : _directlyPassedOption2; // Simplifying assumption: it's unlikely that the first options arg of the provided memoizer | |
| 6666 | - // is an array. In most libs I've looked at, it's an equality function or options object. | |
| 6667 | - // Based on that, if `memoizeOptions` _is_ an array, we assume it's a full | |
| 6668 | - // user-provided array of options. Otherwise, it must be just the _first_ arg, and so | |
| 6669 | - // we wrap it in an array so we can apply it. | |
| 6670 | - | |
| 6671 | - var finalMemoizeOptions = Array.isArray(memoizeOptions) ? memoizeOptions : [memoizeOptions]; | |
| 6672 | - var dependencies = getDependencies(funcs); | |
| 6673 | - var memoizedResultFunc = memoize.apply(void 0, [function recomputationWrapper() { | |
| 6674 | - _recomputations++; // apply arguments instead of spreading for performance. | |
| 6675 | - | |
| 6676 | - return resultFunc.apply(null, arguments); | |
| 6677 | - }].concat(finalMemoizeOptions)); // If a selector is called with the exact same arguments we don't need to traverse our dependencies again. | |
| 6678 | - | |
| 6679 | - var selector = memoize(function dependenciesChecker() { | |
| 6680 | - var params = []; | |
| 6681 | - var length = dependencies.length; | |
| 6682 | - | |
| 6683 | - for (var i = 0; i < length; i++) { | |
| 6684 | - // apply arguments instead of spreading and mutate a local list of params for performance. | |
| 6685 | - // @ts-ignore | |
| 6686 | - params.push(dependencies[i].apply(null, arguments)); | |
| 6687 | - } // apply arguments instead of spreading for performance. | |
| 6688 | - | |
| 6689 | - | |
| 6690 | - _lastResult = memoizedResultFunc.apply(null, params); | |
| 6691 | - return _lastResult; | |
| 6692 | - }); | |
| 6693 | - Object.assign(selector, { | |
| 6694 | - resultFunc: resultFunc, | |
| 6695 | - memoizedResultFunc: memoizedResultFunc, | |
| 6696 | - dependencies: dependencies, | |
| 6697 | - lastResult: function lastResult() { | |
| 6698 | - return _lastResult; | |
| 6699 | - }, | |
| 6700 | - recomputations: function recomputations() { | |
| 6701 | - return _recomputations; | |
| 6702 | - }, | |
| 6703 | - resetRecomputations: function resetRecomputations() { | |
| 6704 | - return _recomputations = 0; | |
| 6705 | - } | |
| 6706 | - }); | |
| 6707 | - return selector; | |
| 6708 | - }; // @ts-ignore | |
| 6709 | - | |
| 6710 | - | |
| 6711 | - return createSelector; | |
| 6712 | -} | |
| 6713 | -var createSelector = /* #__PURE__ */createSelectorCreator(_defaultMemoize__WEBPACK_IMPORTED_MODULE_0__.defaultMemoize); | |
| 6714 | -// Manual definition of state and output arguments | |
| 6715 | -var createStructuredSelector = function createStructuredSelector(selectors, selectorCreator) { | |
| 6716 | - if (selectorCreator === void 0) { | |
| 6717 | - selectorCreator = createSelector; | |
| 6718 | - } | |
| 6719 | - | |
| 6720 | - if (typeof selectors !== 'object') { | |
| 6721 | - throw new Error('createStructuredSelector expects first argument to be an object ' + ("where each property is a selector, instead received a " + typeof selectors)); | |
| 6722 | - } | |
| 6723 | - | |
| 6724 | - var objectKeys = Object.keys(selectors); | |
| 6725 | - var resultSelector = selectorCreator( // @ts-ignore | |
| 6726 | - objectKeys.map(function (key) { | |
| 6727 | - return selectors[key]; | |
| 6728 | - }), function () { | |
| 6729 | - for (var _len3 = arguments.length, values = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { | |
| 6730 | - values[_key3] = arguments[_key3]; | |
| 6731 | - } | |
| 6732 | - | |
| 6733 | - return values.reduce(function (composition, value, index) { | |
| 6734 | - composition[objectKeys[index]] = value; | |
| 6735 | - return composition; | |
| 6736 | - }, {}); | |
| 6737 | - }); | |
| 6738 | - return resultSelector; | |
| 6739 | -}; | |
| 6740 | - | |
| 6741 | -/***/ }) | |
| 6742 | - | |
| 6743 | -/******/ }); | |
| 6744 | -/************************************************************************/ | |
| 6745 | -/******/ // The module cache | |
| 6746 | -/******/ var __webpack_module_cache__ = {}; | |
| 6747 | -/******/ | |
| 6748 | -/******/ // The require function | |
| 6749 | -/******/ function __webpack_require__(moduleId) { | |
| 6750 | -/******/ // Check if module is in cache | |
| 6751 | -/******/ var cachedModule = __webpack_module_cache__[moduleId]; | |
| 6752 | -/******/ if (cachedModule !== undefined) { | |
| 6753 | -/******/ return cachedModule.exports; | |
| 6754 | -/******/ } | |
| 6755 | -/******/ // Create a new module (and put it into the cache) | |
| 6756 | -/******/ var module = __webpack_module_cache__[moduleId] = { | |
| 6757 | -/******/ // no module.id needed | |
| 6758 | -/******/ // no module.loaded needed | |
| 6759 | -/******/ exports: {} | |
| 6760 | -/******/ }; | |
| 6761 | -/******/ | |
| 6762 | -/******/ // Execute the module function | |
| 6763 | -/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); | |
| 6764 | -/******/ | |
| 6765 | -/******/ // Return the exports of the module | |
| 6766 | -/******/ return module.exports; | |
| 6767 | -/******/ } | |
| 6768 | -/******/ | |
| 6769 | -/************************************************************************/ | |
| 6770 | -/******/ /* webpack/runtime/define property getters */ | |
| 6771 | -/******/ (() => { | |
| 6772 | -/******/ // define getter functions for harmony exports | |
| 6773 | -/******/ __webpack_require__.d = (exports, definition) => { | |
| 6774 | -/******/ for(var key in definition) { | |
| 6775 | -/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { | |
| 6776 | -/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); | |
| 6777 | -/******/ } | |
| 6778 | -/******/ } | |
| 6779 | -/******/ }; | |
| 6780 | -/******/ })(); | |
| 6781 | -/******/ | |
| 6782 | -/******/ /* webpack/runtime/global */ | |
| 6783 | -/******/ (() => { | |
| 6784 | -/******/ __webpack_require__.g = (function() { | |
| 6785 | -/******/ if (typeof globalThis === 'object') return globalThis; | |
| 6786 | -/******/ try { | |
| 6787 | -/******/ return this || new Function('return this')(); | |
| 6788 | -/******/ } catch (e) { | |
| 6789 | -/******/ if (typeof window === 'object') return window; | |
| 6790 | -/******/ } | |
| 6791 | -/******/ })(); | |
| 6792 | -/******/ })(); | |
| 6793 | -/******/ | |
| 6794 | -/******/ /* webpack/runtime/hasOwnProperty shorthand */ | |
| 6795 | -/******/ (() => { | |
| 6796 | -/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) | |
| 6797 | -/******/ })(); | |
| 6798 | -/******/ | |
| 6799 | -/******/ /* webpack/runtime/make namespace object */ | |
| 6800 | -/******/ (() => { | |
| 6801 | -/******/ // define __esModule on exports | |
| 6802 | -/******/ __webpack_require__.r = (exports) => { | |
| 6803 | -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { | |
| 6804 | -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); | |
| 6805 | -/******/ } | |
| 6806 | -/******/ Object.defineProperty(exports, '__esModule', { value: true }); | |
| 6807 | -/******/ }; | |
| 6808 | -/******/ })(); | |
| 6809 | -/******/ | |
| 6810 | -/************************************************************************/ | |
| 6811 | -var __webpack_exports__ = {}; | |
| 6812 | -// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. | |
| 6813 | -(() => { | |
| 6814 | -"use strict"; | |
| 6815 | -/*!*******************************************!*\ | |
| 6816 | - !*** ../core/common/assets/js/modules.js ***! | |
| 6817 | - \*******************************************/ | |
| 6818 | - | |
| 6819 | - | |
| 6820 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 6821 | -var _modules = _interopRequireDefault(__webpack_require__(/*! elementor-assets-js/modules/modules */ "../assets/dev/js/modules/modules.js")); | |
| 6822 | -var _layout = _interopRequireDefault(__webpack_require__(/*! ./views/modal/layout */ "../core/common/assets/js/views/modal/layout.js")); | |
| 6823 | -var _componentBase = _interopRequireDefault(__webpack_require__(/*! elementor-api/modules/component-base */ "../modules/web-cli/assets/js/modules/component-base.js")); | |
| 6824 | -var _componentModalBase = _interopRequireDefault(__webpack_require__(/*! elementor-api/modules/component-modal-base */ "../modules/web-cli/assets/js/modules/component-modal-base.js")); | |
| 6825 | -var _hookBreak = _interopRequireDefault(__webpack_require__(/*! elementor-api/modules/hook-break */ "../modules/web-cli/assets/js/modules/hook-break.js")); | |
| 6826 | -_modules.default.common = { | |
| 6827 | - /** | |
| 6828 | - * @deprecated since 2.9.0, use `$e.modules.ComponentBase` instead. | |
| 6829 | - */ | |
| 6830 | - get Component() { | |
| 6831 | - // `elementorCommon` isn't available during it self initialize. | |
| 6832 | - setTimeout(function () { | |
| 6833 | - elementorDevTools.deprecation.deprecated('elementorModules.common.Component', '2.9.0', '$e.modules.ComponentBase'); | |
| 6834 | - }, 2000); | |
| 6835 | - return _componentBase.default; | |
| 6836 | - }, | |
| 6837 | - /** | |
| 6838 | - * @deprecated since 2.9.0, use `$e.modules.ComponentModalBase` instead. | |
| 6839 | - */ | |
| 6840 | - get ComponentModal() { | |
| 6841 | - // `elementorCommon` isn't available during it self initialize. | |
| 6842 | - setTimeout(function () { | |
| 6843 | - elementorDevTools.deprecation.deprecated('elementorModules.common.ComponentModal', '2.9.0', '$e.modules.ComponentModalBase'); | |
| 6844 | - }, 2000); | |
| 6845 | - return _componentModalBase.default; | |
| 6846 | - }, | |
| 6847 | - /** | |
| 6848 | - * @deprecated since 2.9.0, use `$e.modules.HookBreak` instead. | |
| 6849 | - */ | |
| 6850 | - get HookBreak() { | |
| 6851 | - // `elementorCommon` isn't available during it self initialize. | |
| 6852 | - setTimeout(function () { | |
| 6853 | - elementorDevTools.deprecation.deprecated('elementorModules.common.HookBreak', '2.9.0', '$e.modules.HookBreak'); | |
| 6854 | - }, 2000); | |
| 6855 | - return _hookBreak.default; | |
| 6856 | - }, | |
| 6857 | - views: { | |
| 6858 | - modal: { | |
| 6859 | - Layout: _layout.default | |
| 6860 | - } | |
| 6861 | - } | |
| 6862 | -}; | |
| 6863 | -})(); | |
| 6864 | - | |
| 6865 | -/******/ })() | |
| 6866 | -; | |
| 2619 | +//#endregion | |
| 2620 | +})(elementorVendors.reduxToolkit); | |
| 6867 | 2621 | //# sourceMappingURL=common-modules.js.map |