PluginProbe
Elementor Website Builder – more than just a page builder / 3.6.7
Elementor Website Builder – more than just a page builder v3.6.7
4.3.2 4.3.1 4.3.0 4.3.0-beta3 4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 All 455 releases
← All changes | assets/js/app-loader.js +4789 -1117 4.2.0-dev2 → 3.6.7 View file →
@@ -1,245 +1,2780 @@
1 +/*! elementor - v3.6.7 - 03-07-2022 */
1 2 /******/ (() => { // webpackBootstrap
2 3 /******/ var __webpack_modules__ = ({
3 4
4 -/***/ "../app/assets/js/loader/commands/close.js":
5 -/*!*************************************************!*\
6 - !*** ../app/assets/js/loader/commands/close.js ***!
7 - \*************************************************/
8 -/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
5 +/***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js":
6 +/*!******************************************************************!*\
7 + !*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
8 + \******************************************************************/
9 +/***/ ((module) => {
9 10
10 -"use strict";
11 +function _arrayLikeToArray(arr, len) {
12 + if (len == null || len > arr.length) len = arr.length;
11 13
14 + for (var i = 0, arr2 = new Array(len); i < len; i++) {
15 + arr2[i] = arr[i];
16 + }
12 17
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["default"] = exports.Close = void 0;
18 -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
19 -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
20 -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
21 -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
22 -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
23 -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)); }
24 -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
25 -var Close = exports.Close = /*#__PURE__*/function (_$e$modules$CommandBa) {
26 - function Close() {
27 - (0, _classCallCheck2.default)(this, Close);
28 - return _callSuper(this, Close, arguments);
18 + return arr2;
19 +}
20 +
21 +module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
22 +
23 +/***/ }),
24 +
25 +/***/ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js":
26 +/*!****************************************************************!*\
27 + !*** ../node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
28 + \****************************************************************/
29 +/***/ ((module) => {
30 +
31 +function _arrayWithHoles(arr) {
32 + if (Array.isArray(arr)) return arr;
33 +}
34 +
35 +module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
36 +
37 +/***/ }),
38 +
39 +/***/ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js":
40 +/*!***********************************************************************!*\
41 + !*** ../node_modules/@babel/runtime/helpers/assertThisInitialized.js ***!
42 + \***********************************************************************/
43 +/***/ ((module) => {
44 +
45 +function _assertThisInitialized(self) {
46 + if (self === void 0) {
47 + throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
29 48 }
30 - (0, _inherits2.default)(Close, _$e$modules$CommandBa);
31 - return (0, _createClass2.default)(Close, [{
32 - key: "apply",
33 - value: function apply() {
34 - if (!this.component.close()) {
35 - return false;
49 +
50 + return self;
51 +}
52 +
53 +module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports;
54 +
55 +/***/ }),
56 +
57 +/***/ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js":
58 +/*!******************************************************************!*\
59 + !*** ../node_modules/@babel/runtime/helpers/asyncToGenerator.js ***!
60 + \******************************************************************/
61 +/***/ ((module) => {
62 +
63 +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
64 + try {
65 + var info = gen[key](arg);
66 + var value = info.value;
67 + } catch (error) {
68 + reject(error);
69 + return;
70 + }
71 +
72 + if (info.done) {
73 + resolve(value);
74 + } else {
75 + Promise.resolve(value).then(_next, _throw);
76 + }
77 +}
78 +
79 +function _asyncToGenerator(fn) {
80 + return function () {
81 + var self = this,
82 + args = arguments;
83 + return new Promise(function (resolve, reject) {
84 + var gen = fn.apply(self, args);
85 +
86 + function _next(value) {
87 + asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
36 88 }
37 - this.component.iframe.remove();
38 - this.component.iframe = null;
39 - return true;
40 - }
41 - }]);
42 -}($e.modules.CommandBase);
43 -var _default = exports["default"] = Close;
44 89
90 + function _throw(err) {
91 + asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
92 + }
93 +
94 + _next(undefined);
95 + });
96 + };
97 +}
98 +
99 +module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;
100 +
45 101 /***/ }),
46 102
47 -/***/ "../app/assets/js/loader/commands/index.js":
48 -/*!*************************************************!*\
49 - !*** ../app/assets/js/loader/commands/index.js ***!
50 - \*************************************************/
51 -/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
103 +/***/ "../node_modules/@babel/runtime/helpers/classCallCheck.js":
104 +/*!****************************************************************!*\
105 + !*** ../node_modules/@babel/runtime/helpers/classCallCheck.js ***!
106 + \****************************************************************/
107 +/***/ ((module) => {
52 108
53 -"use strict";
109 +function _classCallCheck(instance, Constructor) {
110 + if (!(instance instanceof Constructor)) {
111 + throw new TypeError("Cannot call a class as a function");
112 + }
113 +}
54 114
115 +module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
55 116
56 -Object.defineProperty(exports, "__esModule", ({
57 - value: true
58 -}));
59 -Object.defineProperty(exports, "Close", ({
60 - enumerable: true,
61 - get: function get() {
62 - return _close.Close;
117 +/***/ }),
118 +
119 +/***/ "../node_modules/@babel/runtime/helpers/construct.js":
120 +/*!***********************************************************!*\
121 + !*** ../node_modules/@babel/runtime/helpers/construct.js ***!
122 + \***********************************************************/
123 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
124 +
125 +var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js");
126 +
127 +var isNativeReflectConstruct = __webpack_require__(/*! ./isNativeReflectConstruct.js */ "../node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js");
128 +
129 +function _construct(Parent, args, Class) {
130 + if (isNativeReflectConstruct()) {
131 + module.exports = _construct = Reflect.construct.bind(), module.exports.__esModule = true, module.exports["default"] = module.exports;
132 + } else {
133 + module.exports = _construct = function _construct(Parent, args, Class) {
134 + var a = [null];
135 + a.push.apply(a, args);
136 + var Constructor = Function.bind.apply(Parent, a);
137 + var instance = new Constructor();
138 + if (Class) setPrototypeOf(instance, Class.prototype);
139 + return instance;
140 + }, module.exports.__esModule = true, module.exports["default"] = module.exports;
63 141 }
64 -}));
65 -Object.defineProperty(exports, "Load", ({
66 - enumerable: true,
67 - get: function get() {
68 - return _load.Load;
142 +
143 + return _construct.apply(null, arguments);
144 +}
145 +
146 +module.exports = _construct, module.exports.__esModule = true, module.exports["default"] = module.exports;
147 +
148 +/***/ }),
149 +
150 +/***/ "../node_modules/@babel/runtime/helpers/createClass.js":
151 +/*!*************************************************************!*\
152 + !*** ../node_modules/@babel/runtime/helpers/createClass.js ***!
153 + \*************************************************************/
154 +/***/ ((module) => {
155 +
156 +function _defineProperties(target, props) {
157 + for (var i = 0; i < props.length; i++) {
158 + var descriptor = props[i];
159 + descriptor.enumerable = descriptor.enumerable || false;
160 + descriptor.configurable = true;
161 + if ("value" in descriptor) descriptor.writable = true;
162 + Object.defineProperty(target, descriptor.key, descriptor);
69 163 }
70 -}));
71 -Object.defineProperty(exports, "Open", ({
72 - enumerable: true,
73 - get: function get() {
74 - return _open.Open;
164 +}
165 +
166 +function _createClass(Constructor, protoProps, staticProps) {
167 + if (protoProps) _defineProperties(Constructor.prototype, protoProps);
168 + if (staticProps) _defineProperties(Constructor, staticProps);
169 + Object.defineProperty(Constructor, "prototype", {
170 + writable: false
171 + });
172 + return Constructor;
173 +}
174 +
175 +module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
176 +
177 +/***/ }),
178 +
179 +/***/ "../node_modules/@babel/runtime/helpers/defineProperty.js":
180 +/*!****************************************************************!*\
181 + !*** ../node_modules/@babel/runtime/helpers/defineProperty.js ***!
182 + \****************************************************************/
183 +/***/ ((module) => {
184 +
185 +function _defineProperty(obj, key, value) {
186 + if (key in obj) {
187 + Object.defineProperty(obj, key, {
188 + value: value,
189 + enumerable: true,
190 + configurable: true,
191 + writable: true
192 + });
193 + } else {
194 + obj[key] = value;
75 195 }
76 -}));
77 -var _close = __webpack_require__(/*! ./close */ "../app/assets/js/loader/commands/close.js");
78 -var _load = __webpack_require__(/*! ./load */ "../app/assets/js/loader/commands/load.js");
79 -var _open = __webpack_require__(/*! ./open */ "../app/assets/js/loader/commands/open.js");
80 196
197 + return obj;
198 +}
199 +
200 +module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
201 +
81 202 /***/ }),
82 203
83 -/***/ "../app/assets/js/loader/commands/load.js":
84 -/*!************************************************!*\
85 - !*** ../app/assets/js/loader/commands/load.js ***!
86 - \************************************************/
87 -/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
204 +/***/ "../node_modules/@babel/runtime/helpers/get.js":
205 +/*!*****************************************************!*\
206 + !*** ../node_modules/@babel/runtime/helpers/get.js ***!
207 + \*****************************************************/
208 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
88 209
89 -"use strict";
210 +var superPropBase = __webpack_require__(/*! ./superPropBase.js */ "../node_modules/@babel/runtime/helpers/superPropBase.js");
90 211
212 +function _get() {
213 + if (typeof Reflect !== "undefined" && Reflect.get) {
214 + module.exports = _get = Reflect.get.bind(), module.exports.__esModule = true, module.exports["default"] = module.exports;
215 + } else {
216 + module.exports = _get = function _get(target, property, receiver) {
217 + var base = superPropBase(target, property);
218 + if (!base) return;
219 + var desc = Object.getOwnPropertyDescriptor(base, property);
91 220
92 -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
93 -Object.defineProperty(exports, "__esModule", ({
94 - value: true
95 -}));
96 -exports["default"] = exports.Load = void 0;
97 -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
98 -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
99 -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
100 -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
101 -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
102 -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)); }
103 -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
104 -var Load = exports.Load = /*#__PURE__*/function (_$e$modules$CommandBa) {
105 - function Load() {
106 - (0, _classCallCheck2.default)(this, Load);
107 - return _callSuper(this, Load, arguments);
221 + if (desc.get) {
222 + return desc.get.call(arguments.length < 3 ? target : receiver);
223 + }
224 +
225 + return desc.value;
226 + }, module.exports.__esModule = true, module.exports["default"] = module.exports;
108 227 }
109 - (0, _inherits2.default)(Load, _$e$modules$CommandBa);
110 - return (0, _createClass2.default)(Load, [{
111 - key: "apply",
112 - value: function apply(args) {
113 - var component = this.component;
114 - if (!component.iframe) {
115 - component.iframe = document.createElement('iframe');
116 - component.iframe.className = 'elementor-app-iframe';
117 - component.iframe.style.cssText = '' + 'display: none;' + 'width: 100%;' + 'height: 100%;' + 'position: fixed;' + 'top: 0;' + 'left: 0;' + 'z-index: 99999; /* Over WP Admin Bar */' + 'background-color: rgba(0, 0, 0, 0.8);';
118 - document.body.appendChild(component.iframe);
119 - }
120 - if (args.url === component.iframe.src) {
121 - return;
122 - }
123 - component.iframe.src = args.url;
228 +
229 + return _get.apply(this, arguments);
230 +}
231 +
232 +module.exports = _get, module.exports.__esModule = true, module.exports["default"] = module.exports;
233 +
234 +/***/ }),
235 +
236 +/***/ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js":
237 +/*!****************************************************************!*\
238 + !*** ../node_modules/@babel/runtime/helpers/getPrototypeOf.js ***!
239 + \****************************************************************/
240 +/***/ ((module) => {
241 +
242 +function _getPrototypeOf(o) {
243 + module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
244 + return o.__proto__ || Object.getPrototypeOf(o);
245 + }, module.exports.__esModule = true, module.exports["default"] = module.exports;
246 + return _getPrototypeOf(o);
247 +}
248 +
249 +module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
250 +
251 +/***/ }),
252 +
253 +/***/ "../node_modules/@babel/runtime/helpers/inherits.js":
254 +/*!**********************************************************!*\
255 + !*** ../node_modules/@babel/runtime/helpers/inherits.js ***!
256 + \**********************************************************/
257 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
258 +
259 +var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js");
260 +
261 +function _inherits(subClass, superClass) {
262 + if (typeof superClass !== "function" && superClass !== null) {
263 + throw new TypeError("Super expression must either be null or a function");
264 + }
265 +
266 + subClass.prototype = Object.create(superClass && superClass.prototype, {
267 + constructor: {
268 + value: subClass,
269 + writable: true,
270 + configurable: true
124 271 }
125 - }]);
126 -}($e.modules.CommandBase);
127 -var _default = exports["default"] = Load;
272 + });
273 + Object.defineProperty(subClass, "prototype", {
274 + writable: false
275 + });
276 + if (superClass) setPrototypeOf(subClass, superClass);
277 +}
128 278
279 +module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports;
280 +
129 281 /***/ }),
130 282
131 -/***/ "../app/assets/js/loader/commands/open.js":
132 -/*!************************************************!*\
133 - !*** ../app/assets/js/loader/commands/open.js ***!
134 - \************************************************/
135 -/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
283 +/***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js":
284 +/*!***********************************************************************!*\
285 + !*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
286 + \***********************************************************************/
287 +/***/ ((module) => {
136 288
137 -"use strict";
289 +function _interopRequireDefault(obj) {
290 + return obj && obj.__esModule ? obj : {
291 + "default": obj
292 + };
293 +}
138 294
295 +module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
139 296
140 -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
141 -Object.defineProperty(exports, "__esModule", ({
142 - value: true
143 -}));
144 -exports["default"] = exports.Open = void 0;
145 -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
146 -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
147 -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
148 -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
149 -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
150 -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)); }
151 -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
152 -var Open = exports.Open = /*#__PURE__*/function (_$e$modules$CommandBa) {
153 - function Open() {
154 - (0, _classCallCheck2.default)(this, Open);
155 - return _callSuper(this, Open, arguments);
297 +/***/ }),
298 +
299 +/***/ "../node_modules/@babel/runtime/helpers/isNativeFunction.js":
300 +/*!******************************************************************!*\
301 + !*** ../node_modules/@babel/runtime/helpers/isNativeFunction.js ***!
302 + \******************************************************************/
303 +/***/ ((module) => {
304 +
305 +function _isNativeFunction(fn) {
306 + return Function.toString.call(fn).indexOf("[native code]") !== -1;
307 +}
308 +
309 +module.exports = _isNativeFunction, module.exports.__esModule = true, module.exports["default"] = module.exports;
310 +
311 +/***/ }),
312 +
313 +/***/ "../node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js":
314 +/*!**************************************************************************!*\
315 + !*** ../node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js ***!
316 + \**************************************************************************/
317 +/***/ ((module) => {
318 +
319 +function _isNativeReflectConstruct() {
320 + if (typeof Reflect === "undefined" || !Reflect.construct) return false;
321 + if (Reflect.construct.sham) return false;
322 + if (typeof Proxy === "function") return true;
323 +
324 + try {
325 + Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
326 + return true;
327 + } catch (e) {
328 + return false;
156 329 }
157 - (0, _inherits2.default)(Open, _$e$modules$CommandBa);
158 - return (0, _createClass2.default)(Open, [{
159 - key: "apply",
160 - value: function apply(args) {
161 - $e.route('app', args);
162 - return true;
330 +}
331 +
332 +module.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports["default"] = module.exports;
333 +
334 +/***/ }),
335 +
336 +/***/ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js":
337 +/*!**********************************************************************!*\
338 + !*** ../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
339 + \**********************************************************************/
340 +/***/ ((module) => {
341 +
342 +function _iterableToArrayLimit(arr, i) {
343 + var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
344 +
345 + if (_i == null) return;
346 + var _arr = [];
347 + var _n = true;
348 + var _d = false;
349 +
350 + var _s, _e;
351 +
352 + try {
353 + for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
354 + _arr.push(_s.value);
355 +
356 + if (i && _arr.length === i) break;
163 357 }
164 - }]);
165 -}($e.modules.CommandBase);
166 -var _default = exports["default"] = Open;
358 + } catch (err) {
359 + _d = true;
360 + _e = err;
361 + } finally {
362 + try {
363 + if (!_n && _i["return"] != null) _i["return"]();
364 + } finally {
365 + if (_d) throw _e;
366 + }
367 + }
167 368
369 + return _arr;
370 +}
371 +
372 +module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
373 +
168 374 /***/ }),
169 375
170 -/***/ "../app/assets/js/loader/component.js":
171 -/*!********************************************!*\
172 - !*** ../app/assets/js/loader/component.js ***!
173 - \********************************************/
174 -/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
376 +/***/ "../node_modules/@babel/runtime/helpers/nonIterableRest.js":
377 +/*!*****************************************************************!*\
378 + !*** ../node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
379 + \*****************************************************************/
380 +/***/ ((module) => {
175 381
176 -"use strict";
382 +function _nonIterableRest() {
383 + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
384 +}
177 385
386 +module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
178 387
179 -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
180 -var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js");
181 -Object.defineProperty(exports, "__esModule", ({
182 - value: true
183 -}));
184 -exports["default"] = void 0;
185 -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
186 -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
187 -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
188 -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
189 -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
190 -var _componentBase = _interopRequireDefault(__webpack_require__(/*! elementor-api/modules/component-base */ "../modules/web-cli/assets/js/modules/component-base.js"));
191 -var commands = _interopRequireWildcard(__webpack_require__(/*! ./commands/ */ "../app/assets/js/loader/commands/index.js"));
192 -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); }
193 -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)); }
194 -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
195 -var Component = exports["default"] = /*#__PURE__*/function (_ComponentModalBase) {
196 - function Component() {
197 - (0, _classCallCheck2.default)(this, Component);
198 - return _callSuper(this, Component, arguments);
388 +/***/ }),
389 +
390 +/***/ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js":
391 +/*!***************************************************************************!*\
392 + !*** ../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***!
393 + \***************************************************************************/
394 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
395 +
396 +var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]);
397 +
398 +var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js");
399 +
400 +function _possibleConstructorReturn(self, call) {
401 + if (call && (_typeof(call) === "object" || typeof call === "function")) {
402 + return call;
403 + } else if (call !== void 0) {
404 + throw new TypeError("Derived constructors may only return object or undefined");
199 405 }
200 - (0, _inherits2.default)(Component, _ComponentModalBase);
201 - return (0, _createClass2.default)(Component, [{
202 - key: "getNamespace",
203 - value: function getNamespace() {
204 - return 'app';
205 - }
206 - }, {
207 - key: "defaultRoutes",
208 - value: function defaultRoutes() {
209 - var _this = this;
406 +
407 + return assertThisInitialized(self);
408 +}
409 +
410 +module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports;
411 +
412 +/***/ }),
413 +
414 +/***/ "../node_modules/@babel/runtime/helpers/regeneratorRuntime.js":
415 +/*!********************************************************************!*\
416 + !*** ../node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***!
417 + \********************************************************************/
418 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
419 +
420 +var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]);
421 +
422 +function _regeneratorRuntime() {
423 + "use strict";
424 + /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
425 +
426 + module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
427 + return exports;
428 + }, module.exports.__esModule = true, module.exports["default"] = module.exports;
429 + var exports = {},
430 + Op = Object.prototype,
431 + hasOwn = Op.hasOwnProperty,
432 + $Symbol = "function" == typeof Symbol ? Symbol : {},
433 + iteratorSymbol = $Symbol.iterator || "@@iterator",
434 + asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
435 + toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
436 +
437 + function define(obj, key, value) {
438 + return Object.defineProperty(obj, key, {
439 + value: value,
440 + enumerable: !0,
441 + configurable: !0,
442 + writable: !0
443 + }), obj[key];
444 + }
445 +
446 + try {
447 + define({}, "");
448 + } catch (err) {
449 + define = function define(obj, key, value) {
450 + return obj[key] = value;
451 + };
452 + }
453 +
454 + function wrap(innerFn, outerFn, self, tryLocsList) {
455 + var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
456 + generator = Object.create(protoGenerator.prototype),
457 + context = new Context(tryLocsList || []);
458 + return generator._invoke = function (innerFn, self, context) {
459 + var state = "suspendedStart";
460 + return function (method, arg) {
461 + if ("executing" === state) throw new Error("Generator is already running");
462 +
463 + if ("completed" === state) {
464 + if ("throw" === method) throw arg;
465 + return doneResult();
466 + }
467 +
468 + for (context.method = method, context.arg = arg;;) {
469 + var delegate = context.delegate;
470 +
471 + if (delegate) {
472 + var delegateResult = maybeInvokeDelegate(delegate, context);
473 +
474 + if (delegateResult) {
475 + if (delegateResult === ContinueSentinel) continue;
476 + return delegateResult;
477 + }
478 + }
479 +
480 + if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
481 + if ("suspendedStart" === state) throw state = "completed", context.arg;
482 + context.dispatchException(context.arg);
483 + } else "return" === context.method && context.abrupt("return", context.arg);
484 + state = "executing";
485 + var record = tryCatch(innerFn, self, context);
486 +
487 + if ("normal" === record.type) {
488 + if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
489 + return {
490 + value: record.arg,
491 + done: context.done
492 + };
493 + }
494 +
495 + "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
496 + }
497 + };
498 + }(innerFn, self, context), generator;
499 + }
500 +
501 + function tryCatch(fn, obj, arg) {
502 + try {
210 503 return {
211 - '': function _(args) {
212 - args.url = args.url || elementorAppConfig.menu_url;
213 - $e.run('app/load', args);
214 - _this.iframe.style.display = '';
215 - document.body.style.overflow = 'hidden';
216 - }
504 + type: "normal",
505 + arg: fn.call(obj, arg)
217 506 };
507 + } catch (err) {
508 + return {
509 + type: "throw",
510 + arg: err
511 + };
218 512 }
219 - }, {
220 - key: "defaultCommands",
221 - value: function defaultCommands() {
222 - return this.importCommands(commands);
513 + }
514 +
515 + exports.wrap = wrap;
516 + var ContinueSentinel = {};
517 +
518 + function Generator() {}
519 +
520 + function GeneratorFunction() {}
521 +
522 + function GeneratorFunctionPrototype() {}
523 +
524 + var IteratorPrototype = {};
525 + define(IteratorPrototype, iteratorSymbol, function () {
526 + return this;
527 + });
528 + var getProto = Object.getPrototypeOf,
529 + NativeIteratorPrototype = getProto && getProto(getProto(values([])));
530 + NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
531 + var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
532 +
533 + function defineIteratorMethods(prototype) {
534 + ["next", "throw", "return"].forEach(function (method) {
535 + define(prototype, method, function (arg) {
536 + return this._invoke(method, arg);
537 + });
538 + });
539 + }
540 +
541 + function AsyncIterator(generator, PromiseImpl) {
542 + function invoke(method, arg, resolve, reject) {
543 + var record = tryCatch(generator[method], generator, arg);
544 +
545 + if ("throw" !== record.type) {
546 + var result = record.arg,
547 + value = result.value;
548 + return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
549 + invoke("next", value, resolve, reject);
550 + }, function (err) {
551 + invoke("throw", err, resolve, reject);
552 + }) : PromiseImpl.resolve(value).then(function (unwrapped) {
553 + result.value = unwrapped, resolve(result);
554 + }, function (error) {
555 + return invoke("throw", error, resolve, reject);
556 + });
557 + }
558 +
559 + reject(record.arg);
223 560 }
224 - }, {
225 - key: "defaultShortcuts",
226 - value: function defaultShortcuts() {
227 - return {
228 - '': {
229 - keys: 'ctrl+shift+e'
230 - },
231 - close: {
232 - keys: 'esc',
233 - scopes: [this.getNamespace()]
561 +
562 + var previousPromise;
563 +
564 + this._invoke = function (method, arg) {
565 + function callInvokeWithMethodAndArg() {
566 + return new PromiseImpl(function (resolve, reject) {
567 + invoke(method, arg, resolve, reject);
568 + });
569 + }
570 +
571 + return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
572 + };
573 + }
574 +
575 + function maybeInvokeDelegate(delegate, context) {
576 + var method = delegate.iterator[context.method];
577 +
578 + if (undefined === method) {
579 + if (context.delegate = null, "throw" === context.method) {
580 + if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
581 + context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
582 + }
583 +
584 + return ContinueSentinel;
585 + }
586 +
587 + var record = tryCatch(method, delegate.iterator, context.arg);
588 + if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
589 + var info = record.arg;
590 + return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
591 + }
592 +
593 + function pushTryEntry(locs) {
594 + var entry = {
595 + tryLoc: locs[0]
596 + };
597 + 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
598 + }
599 +
600 + function resetTryEntry(entry) {
601 + var record = entry.completion || {};
602 + record.type = "normal", delete record.arg, entry.completion = record;
603 + }
604 +
605 + function Context(tryLocsList) {
606 + this.tryEntries = [{
607 + tryLoc: "root"
608 + }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
609 + }
610 +
611 + function values(iterable) {
612 + if (iterable) {
613 + var iteratorMethod = iterable[iteratorSymbol];
614 + if (iteratorMethod) return iteratorMethod.call(iterable);
615 + if ("function" == typeof iterable.next) return iterable;
616 +
617 + if (!isNaN(iterable.length)) {
618 + var i = -1,
619 + next = function next() {
620 + for (; ++i < iterable.length;) {
621 + if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
622 + }
623 +
624 + return next.value = undefined, next.done = !0, next;
625 + };
626 +
627 + return next.next = next;
628 + }
629 + }
630 +
631 + return {
632 + next: doneResult
633 + };
634 + }
635 +
636 + function doneResult() {
637 + return {
638 + value: undefined,
639 + done: !0
640 + };
641 + }
642 +
643 + return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
644 + var ctor = "function" == typeof genFun && genFun.constructor;
645 + return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
646 + }, exports.mark = function (genFun) {
647 + return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
648 + }, exports.awrap = function (arg) {
649 + return {
650 + __await: arg
651 + };
652 + }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
653 + return this;
654 + }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
655 + void 0 === PromiseImpl && (PromiseImpl = Promise);
656 + var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
657 + return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
658 + return result.done ? result.value : iter.next();
659 + });
660 + }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
661 + return this;
662 + }), define(Gp, "toString", function () {
663 + return "[object Generator]";
664 + }), exports.keys = function (object) {
665 + var keys = [];
666 +
667 + for (var key in object) {
668 + keys.push(key);
669 + }
670 +
671 + return keys.reverse(), function next() {
672 + for (; keys.length;) {
673 + var key = keys.pop();
674 + if (key in object) return next.value = key, next.done = !1, next;
675 + }
676 +
677 + return next.done = !0, next;
678 + };
679 + }, exports.values = values, Context.prototype = {
680 + constructor: Context,
681 + reset: function reset(skipTempReset) {
682 + if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) {
683 + "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
684 + }
685 + },
686 + stop: function stop() {
687 + this.done = !0;
688 + var rootRecord = this.tryEntries[0].completion;
689 + if ("throw" === rootRecord.type) throw rootRecord.arg;
690 + return this.rval;
691 + },
692 + dispatchException: function dispatchException(exception) {
693 + if (this.done) throw exception;
694 + var context = this;
695 +
696 + function handle(loc, caught) {
697 + return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
698 + }
699 +
700 + for (var i = this.tryEntries.length - 1; i >= 0; --i) {
701 + var entry = this.tryEntries[i],
702 + record = entry.completion;
703 + if ("root" === entry.tryLoc) return handle("end");
704 +
705 + if (entry.tryLoc <= this.prev) {
706 + var hasCatch = hasOwn.call(entry, "catchLoc"),
707 + hasFinally = hasOwn.call(entry, "finallyLoc");
708 +
709 + if (hasCatch && hasFinally) {
710 + if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
711 + if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
712 + } else if (hasCatch) {
713 + if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
714 + } else {
715 + if (!hasFinally) throw new Error("try statement without catch or finally");
716 + if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
717 + }
234 718 }
235 - };
719 + }
720 + },
721 + abrupt: function abrupt(type, arg) {
722 + for (var i = this.tryEntries.length - 1; i >= 0; --i) {
723 + var entry = this.tryEntries[i];
724 +
725 + if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
726 + var finallyEntry = entry;
727 + break;
728 + }
729 + }
730 +
731 + finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
732 + var record = finallyEntry ? finallyEntry.completion : {};
733 + return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
734 + },
735 + complete: function complete(record, afterLoc) {
736 + if ("throw" === record.type) throw record.arg;
737 + return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
738 + },
739 + finish: function finish(finallyLoc) {
740 + for (var i = this.tryEntries.length - 1; i >= 0; --i) {
741 + var entry = this.tryEntries[i];
742 + if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
743 + }
744 + },
745 + "catch": function _catch(tryLoc) {
746 + for (var i = this.tryEntries.length - 1; i >= 0; --i) {
747 + var entry = this.tryEntries[i];
748 +
749 + if (entry.tryLoc === tryLoc) {
750 + var record = entry.completion;
751 +
752 + if ("throw" === record.type) {
753 + var thrown = record.arg;
754 + resetTryEntry(entry);
755 + }
756 +
757 + return thrown;
758 + }
759 + }
760 +
761 + throw new Error("illegal catch attempt");
762 + },
763 + delegateYield: function delegateYield(iterable, resultName, nextLoc) {
764 + return this.delegate = {
765 + iterator: values(iterable),
766 + resultName: resultName,
767 + nextLoc: nextLoc
768 + }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
236 769 }
237 - }]);
238 -}(_componentBase.default);
770 + }, exports;
771 +}
239 772
773 +module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
774 +
240 775 /***/ }),
241 776
777 +/***/ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js":
778 +/*!****************************************************************!*\
779 + !*** ../node_modules/@babel/runtime/helpers/setPrototypeOf.js ***!
780 + \****************************************************************/
781 +/***/ ((module) => {
782 +
783 +function _setPrototypeOf(o, p) {
784 + module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
785 + o.__proto__ = p;
786 + return o;
787 + }, module.exports.__esModule = true, module.exports["default"] = module.exports;
788 + return _setPrototypeOf(o, p);
789 +}
790 +
791 +module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
792 +
793 +/***/ }),
794 +
795 +/***/ "../node_modules/@babel/runtime/helpers/slicedToArray.js":
796 +/*!***************************************************************!*\
797 + !*** ../node_modules/@babel/runtime/helpers/slicedToArray.js ***!
798 + \***************************************************************/
799 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
800 +
801 +var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js");
802 +
803 +var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js");
804 +
805 +var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js");
806 +
807 +var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "../node_modules/@babel/runtime/helpers/nonIterableRest.js");
808 +
809 +function _slicedToArray(arr, i) {
810 + return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
811 +}
812 +
813 +module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
814 +
815 +/***/ }),
816 +
817 +/***/ "../node_modules/@babel/runtime/helpers/superPropBase.js":
818 +/*!***************************************************************!*\
819 + !*** ../node_modules/@babel/runtime/helpers/superPropBase.js ***!
820 + \***************************************************************/
821 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
822 +
823 +var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js");
824 +
825 +function _superPropBase(object, property) {
826 + while (!Object.prototype.hasOwnProperty.call(object, property)) {
827 + object = getPrototypeOf(object);
828 + if (object === null) break;
829 + }
830 +
831 + return object;
832 +}
833 +
834 +module.exports = _superPropBase, module.exports.__esModule = true, module.exports["default"] = module.exports;
835 +
836 +/***/ }),
837 +
838 +/***/ "../node_modules/@babel/runtime/helpers/typeof.js":
839 +/*!********************************************************!*\
840 + !*** ../node_modules/@babel/runtime/helpers/typeof.js ***!
841 + \********************************************************/
842 +/***/ ((module) => {
843 +
844 +function _typeof(obj) {
845 + "@babel/helpers - typeof";
846 +
847 + return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
848 + return typeof obj;
849 + } : function (obj) {
850 + return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
851 + }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
852 +}
853 +
854 +module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
855 +
856 +/***/ }),
857 +
858 +/***/ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js":
859 +/*!****************************************************************************!*\
860 + !*** ../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
861 + \****************************************************************************/
862 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
863 +
864 +var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js");
865 +
866 +function _unsupportedIterableToArray(o, minLen) {
867 + if (!o) return;
868 + if (typeof o === "string") return arrayLikeToArray(o, minLen);
869 + var n = Object.prototype.toString.call(o).slice(8, -1);
870 + if (n === "Object" && o.constructor) n = o.constructor.name;
871 + if (n === "Map" || n === "Set") return Array.from(o);
872 + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
873 +}
874 +
875 +module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
876 +
877 +/***/ }),
878 +
879 +/***/ "../node_modules/@babel/runtime/helpers/wrapNativeSuper.js":
880 +/*!*****************************************************************!*\
881 + !*** ../node_modules/@babel/runtime/helpers/wrapNativeSuper.js ***!
882 + \*****************************************************************/
883 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
884 +
885 +var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js");
886 +
887 +var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js");
888 +
889 +var isNativeFunction = __webpack_require__(/*! ./isNativeFunction.js */ "../node_modules/@babel/runtime/helpers/isNativeFunction.js");
890 +
891 +var construct = __webpack_require__(/*! ./construct.js */ "../node_modules/@babel/runtime/helpers/construct.js");
892 +
893 +function _wrapNativeSuper(Class) {
894 + var _cache = typeof Map === "function" ? new Map() : undefined;
895 +
896 + module.exports = _wrapNativeSuper = function _wrapNativeSuper(Class) {
897 + if (Class === null || !isNativeFunction(Class)) return Class;
898 +
899 + if (typeof Class !== "function") {
900 + throw new TypeError("Super expression must either be null or a function");
901 + }
902 +
903 + if (typeof _cache !== "undefined") {
904 + if (_cache.has(Class)) return _cache.get(Class);
905 +
906 + _cache.set(Class, Wrapper);
907 + }
908 +
909 + function Wrapper() {
910 + return construct(Class, arguments, getPrototypeOf(this).constructor);
911 + }
912 +
913 + Wrapper.prototype = Object.create(Class.prototype, {
914 + constructor: {
915 + value: Wrapper,
916 + enumerable: false,
917 + writable: true,
918 + configurable: true
919 + }
920 + });
921 + return setPrototypeOf(Wrapper, Class);
922 + }, module.exports.__esModule = true, module.exports["default"] = module.exports;
923 + return _wrapNativeSuper(Class);
924 +}
925 +
926 +module.exports = _wrapNativeSuper, module.exports.__esModule = true, module.exports["default"] = module.exports;
927 +
928 +/***/ }),
929 +
930 +/***/ "../node_modules/@babel/runtime/regenerator/index.js":
931 +/*!***********************************************************!*\
932 + !*** ../node_modules/@babel/runtime/regenerator/index.js ***!
933 + \***********************************************************/
934 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
935 +
936 +// TODO(Babel 8): Remove this file.
937 +
938 +var runtime = __webpack_require__(/*! ../helpers/regeneratorRuntime */ "../node_modules/@babel/runtime/helpers/regeneratorRuntime.js")();
939 +module.exports = runtime;
940 +
941 +// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=
942 +try {
943 + regeneratorRuntime = runtime;
944 +} catch (accidentalStrictMode) {
945 + if (typeof globalThis === "object") {
946 + globalThis.regeneratorRuntime = runtime;
947 + } else {
948 + Function("r", "regeneratorRuntime = r")(runtime);
949 + }
950 +}
951 +
952 +
953 +/***/ }),
954 +
955 +/***/ "../node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js":
956 +/*!******************************************************************!*\
957 + !*** ../node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js ***!
958 + \******************************************************************/
959 +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
960 +
961 +"use strict";
962 +__webpack_require__.r(__webpack_exports__);
963 +/* harmony export */ __webpack_require__.d(__webpack_exports__, {
964 +/* harmony export */ "MiddlewareArray": () => (/* binding */ MiddlewareArray),
965 +/* harmony export */ "TaskAbortError": () => (/* binding */ TaskAbortError),
966 +/* harmony export */ "__DO_NOT_USE__ActionTypes": () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.__DO_NOT_USE__ActionTypes),
967 +/* harmony export */ "addListener": () => (/* binding */ addListener),
968 +/* harmony export */ "applyMiddleware": () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.applyMiddleware),
969 +/* harmony export */ "bindActionCreators": () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.bindActionCreators),
970 +/* harmony export */ "clearAllListeners": () => (/* binding */ clearAllListeners),
971 +/* harmony export */ "combineReducers": () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.combineReducers),
972 +/* harmony export */ "compose": () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.compose),
973 +/* harmony export */ "configureStore": () => (/* binding */ configureStore),
974 +/* harmony export */ "createAction": () => (/* binding */ createAction),
975 +/* harmony export */ "createAsyncThunk": () => (/* binding */ createAsyncThunk),
976 +/* harmony export */ "createDraftSafeSelector": () => (/* binding */ createDraftSafeSelector),
977 +/* harmony export */ "createEntityAdapter": () => (/* binding */ createEntityAdapter),
978 +/* harmony export */ "createImmutableStateInvariantMiddleware": () => (/* binding */ createImmutableStateInvariantMiddleware),
979 +/* harmony export */ "createListenerMiddleware": () => (/* binding */ createListenerMiddleware),
980 +/* harmony export */ "createNextState": () => (/* reexport safe */ immer__WEBPACK_IMPORTED_MODULE_2__["default"]),
981 +/* harmony export */ "createReducer": () => (/* binding */ createReducer),
982 +/* harmony export */ "createSelector": () => (/* reexport safe */ reselect__WEBPACK_IMPORTED_MODULE_1__.createSelector),
983 +/* harmony export */ "createSerializableStateInvariantMiddleware": () => (/* binding */ createSerializableStateInvariantMiddleware),
984 +/* harmony export */ "createSlice": () => (/* binding */ createSlice),
985 +/* harmony export */ "createStore": () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.createStore),
986 +/* harmony export */ "current": () => (/* reexport safe */ immer__WEBPACK_IMPORTED_MODULE_2__.current),
987 +/* harmony export */ "findNonSerializableValue": () => (/* binding */ findNonSerializableValue),
988 +/* harmony export */ "freeze": () => (/* reexport safe */ immer__WEBPACK_IMPORTED_MODULE_2__.freeze),
989 +/* harmony export */ "getDefaultMiddleware": () => (/* binding */ getDefaultMiddleware),
990 +/* harmony export */ "getType": () => (/* binding */ getType),
991 +/* harmony export */ "isAllOf": () => (/* binding */ isAllOf),
992 +/* harmony export */ "isAnyOf": () => (/* binding */ isAnyOf),
993 +/* harmony export */ "isAsyncThunkAction": () => (/* binding */ isAsyncThunkAction),
994 +/* harmony export */ "isDraft": () => (/* reexport safe */ immer__WEBPACK_IMPORTED_MODULE_2__.isDraft),
995 +/* harmony export */ "isFulfilled": () => (/* binding */ isFulfilled),
996 +/* harmony export */ "isImmutableDefault": () => (/* binding */ isImmutableDefault),
997 +/* harmony export */ "isPending": () => (/* binding */ isPending),
998 +/* harmony export */ "isPlain": () => (/* binding */ isPlain),
999 +/* harmony export */ "isPlainObject": () => (/* binding */ isPlainObject),
1000 +/* harmony export */ "isRejected": () => (/* binding */ isRejected),
1001 +/* harmony export */ "isRejectedWithValue": () => (/* binding */ isRejectedWithValue),
1002 +/* harmony export */ "legacy_createStore": () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.legacy_createStore),
1003 +/* harmony export */ "miniSerializeError": () => (/* binding */ miniSerializeError),
1004 +/* harmony export */ "nanoid": () => (/* binding */ nanoid),
1005 +/* harmony export */ "original": () => (/* reexport safe */ immer__WEBPACK_IMPORTED_MODULE_2__.original),
1006 +/* harmony export */ "removeListener": () => (/* binding */ removeListener),
1007 +/* harmony export */ "unwrapResult": () => (/* binding */ unwrapResult)
1008 +/* harmony export */ });
1009 +/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! immer */ "../node_modules/immer/dist/immer.esm.mjs");
1010 +/* harmony import */ var redux__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! redux */ "../node_modules/redux/es/redux.js");
1011 +/* harmony import */ var reselect__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! reselect */ "../node_modules/reselect/es/index.js");
1012 +/* harmony import */ var redux_thunk__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! redux-thunk */ "../node_modules/redux-thunk/es/index.js");
1013 +var __extends = (undefined && undefined.__extends) || (function () {
1014 + var extendStatics = function (d, b) {
1015 + extendStatics = Object.setPrototypeOf ||
1016 + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
1017 + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
1018 + return extendStatics(d, b);
1019 + };
1020 + return function (d, b) {
1021 + if (typeof b !== "function" && b !== null)
1022 + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
1023 + extendStatics(d, b);
1024 + function __() { this.constructor = d; }
1025 + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
1026 + };
1027 +})();
1028 +var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
1029 + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
1030 + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
1031 + function verb(n) { return function (v) { return step([n, v]); }; }
1032 + function step(op) {
1033 + if (f) throw new TypeError("Generator is already executing.");
1034 + while (_) try {
1035 + 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;
1036 + if (y = 0, t) op = [op[0] & 2, t.value];
1037 + switch (op[0]) {
1038 + case 0: case 1: t = op; break;
1039 + case 4: _.label++; return { value: op[1], done: false };
1040 + case 5: _.label++; y = op[1]; op = [0]; continue;
1041 + case 7: op = _.ops.pop(); _.trys.pop(); continue;
1042 + default:
1043 + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
1044 + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
1045 + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
1046 + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
1047 + if (t[2]) _.ops.pop();
1048 + _.trys.pop(); continue;
1049 + }
1050 + op = body.call(thisArg, _);
1051 + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
1052 + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
1053 + }
1054 +};
1055 +var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from) {
1056 + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
1057 + to[j] = from[i];
1058 + return to;
1059 +};
1060 +var __defProp = Object.defineProperty;
1061 +var __defProps = Object.defineProperties;
1062 +var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
1063 +var __getOwnPropSymbols = Object.getOwnPropertySymbols;
1064 +var __hasOwnProp = Object.prototype.hasOwnProperty;
1065 +var __propIsEnum = Object.prototype.propertyIsEnumerable;
1066 +var __defNormalProp = function (obj, key, value) { return key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value: value }) : obj[key] = value; };
1067 +var __spreadValues = function (a, b) {
1068 + for (var prop in b || (b = {}))
1069 + if (__hasOwnProp.call(b, prop))
1070 + __defNormalProp(a, prop, b[prop]);
1071 + if (__getOwnPropSymbols)
1072 + for (var _i = 0, _c = __getOwnPropSymbols(b); _i < _c.length; _i++) {
1073 + var prop = _c[_i];
1074 + if (__propIsEnum.call(b, prop))
1075 + __defNormalProp(a, prop, b[prop]);
1076 + }
1077 + return a;
1078 +};
1079 +var __spreadProps = function (a, b) { return __defProps(a, __getOwnPropDescs(b)); };
1080 +var __async = function (__this, __arguments, generator) {
1081 + return new Promise(function (resolve, reject) {
1082 + var fulfilled = function (value) {
1083 + try {
1084 + step(generator.next(value));
1085 + }
1086 + catch (e) {
1087 + reject(e);
1088 + }
1089 + };
1090 + var rejected = function (value) {
1091 + try {
1092 + step(generator.throw(value));
1093 + }
1094 + catch (e) {
1095 + reject(e);
1096 + }
1097 + };
1098 + var step = function (x) { return x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected); };
1099 + step((generator = generator.apply(__this, __arguments)).next());
1100 + });
1101 +};
1102 +// src/index.ts
1103 +
1104 +
1105 +
1106 +
1107 +// src/createDraftSafeSelector.ts
1108 +
1109 +
1110 +var createDraftSafeSelector = function () {
1111 + var args = [];
1112 + for (var _i = 0; _i < arguments.length; _i++) {
1113 + args[_i] = arguments[_i];
1114 + }
1115 + var selector = reselect__WEBPACK_IMPORTED_MODULE_1__.createSelector.apply(void 0, args);
1116 + var wrappedSelector = function (value) {
1117 + var rest = [];
1118 + for (var _i = 1; _i < arguments.length; _i++) {
1119 + rest[_i - 1] = arguments[_i];
1120 + }
1121 + return selector.apply(void 0, __spreadArray([(0,immer__WEBPACK_IMPORTED_MODULE_2__.isDraft)(value) ? (0,immer__WEBPACK_IMPORTED_MODULE_2__.current)(value) : value], rest));
1122 + };
1123 + return wrappedSelector;
1124 +};
1125 +// src/configureStore.ts
1126 +
1127 +// src/devtoolsExtension.ts
1128 +
1129 +var composeWithDevTools = typeof window !== "undefined" && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ : function () {
1130 + if (arguments.length === 0)
1131 + return void 0;
1132 + if (typeof arguments[0] === "object")
1133 + return redux__WEBPACK_IMPORTED_MODULE_0__.compose;
1134 + return redux__WEBPACK_IMPORTED_MODULE_0__.compose.apply(null, arguments);
1135 +};
1136 +var devToolsEnhancer = typeof window !== "undefined" && window.__REDUX_DEVTOOLS_EXTENSION__ ? window.__REDUX_DEVTOOLS_EXTENSION__ : function () {
1137 + return function (noop2) {
1138 + return noop2;
1139 + };
1140 +};
1141 +// src/isPlainObject.ts
1142 +function isPlainObject(value) {
1143 + if (typeof value !== "object" || value === null)
1144 + return false;
1145 + var proto = Object.getPrototypeOf(value);
1146 + if (proto === null)
1147 + return true;
1148 + var baseProto = proto;
1149 + while (Object.getPrototypeOf(baseProto) !== null) {
1150 + baseProto = Object.getPrototypeOf(baseProto);
1151 + }
1152 + return proto === baseProto;
1153 +}
1154 +// src/getDefaultMiddleware.ts
1155 +
1156 +// src/utils.ts
1157 +function getTimeMeasureUtils(maxDelay, fnName) {
1158 + var elapsed = 0;
1159 + return {
1160 + measureTime: function (fn) {
1161 + var started = Date.now();
1162 + try {
1163 + return fn();
1164 + }
1165 + finally {
1166 + var finished = Date.now();
1167 + elapsed += finished - started;
1168 + }
1169 + },
1170 + warnIfExceeded: function () {
1171 + if (elapsed > maxDelay) {
1172 + 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.");
1173 + }
1174 + }
1175 + };
1176 +}
1177 +var MiddlewareArray = /** @class */ (function (_super) {
1178 + __extends(MiddlewareArray, _super);
1179 + function MiddlewareArray() {
1180 + var args = [];
1181 + for (var _i = 0; _i < arguments.length; _i++) {
1182 + args[_i] = arguments[_i];
1183 + }
1184 + var _this = _super.apply(this, args) || this;
1185 + Object.setPrototypeOf(_this, MiddlewareArray.prototype);
1186 + return _this;
1187 + }
1188 + Object.defineProperty(MiddlewareArray, Symbol.species, {
1189 + get: function () {
1190 + return MiddlewareArray;
1191 + },
1192 + enumerable: false,
1193 + configurable: true
1194 + });
1195 + MiddlewareArray.prototype.concat = function () {
1196 + var arr = [];
1197 + for (var _i = 0; _i < arguments.length; _i++) {
1198 + arr[_i] = arguments[_i];
1199 + }
1200 + return _super.prototype.concat.apply(this, arr);
1201 + };
1202 + MiddlewareArray.prototype.prepend = function () {
1203 + var arr = [];
1204 + for (var _i = 0; _i < arguments.length; _i++) {
1205 + arr[_i] = arguments[_i];
1206 + }
1207 + if (arr.length === 1 && Array.isArray(arr[0])) {
1208 + return new (MiddlewareArray.bind.apply(MiddlewareArray, __spreadArray([void 0], arr[0].concat(this))))();
1209 + }
1210 + return new (MiddlewareArray.bind.apply(MiddlewareArray, __spreadArray([void 0], arr.concat(this))))();
1211 + };
1212 + return MiddlewareArray;
1213 +}(Array));
1214 +// src/immutableStateInvariantMiddleware.ts
1215 +var isProduction = "development" === "production";
1216 +var prefix = "Invariant failed";
1217 +function invariant(condition, message) {
1218 + if (condition) {
1219 + return;
1220 + }
1221 + if (isProduction) {
1222 + throw new Error(prefix);
1223 + }
1224 + throw new Error(prefix + ": " + (message || ""));
1225 +}
1226 +function stringify(obj, serializer, indent, decycler) {
1227 + return JSON.stringify(obj, getSerialize(serializer, decycler), indent);
1228 +}
1229 +function getSerialize(serializer, decycler) {
1230 + var stack = [], keys = [];
1231 + if (!decycler)
1232 + decycler = function (_, value) {
1233 + if (stack[0] === value)
1234 + return "[Circular ~]";
1235 + return "[Circular ~." + keys.slice(0, stack.indexOf(value)).join(".") + "]";
1236 + };
1237 + return function (key, value) {
1238 + if (stack.length > 0) {
1239 + var thisPos = stack.indexOf(this);
1240 + ~thisPos ? stack.splice(thisPos + 1) : stack.push(this);
1241 + ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key);
1242 + if (~stack.indexOf(value))
1243 + value = decycler.call(this, key, value);
1244 + }
1245 + else
1246 + stack.push(value);
1247 + return serializer == null ? value : serializer.call(this, key, value);
1248 + };
1249 +}
1250 +function isImmutableDefault(value) {
1251 + return typeof value !== "object" || value === null || typeof value === "undefined" || Object.isFrozen(value);
1252 +}
1253 +function trackForMutations(isImmutable, ignorePaths, obj) {
1254 + var trackedProperties = trackProperties(isImmutable, ignorePaths, obj);
1255 + return {
1256 + detectMutations: function () {
1257 + return detectMutations(isImmutable, ignorePaths, trackedProperties, obj);
1258 + }
1259 + };
1260 +}
1261 +function trackProperties(isImmutable, ignorePaths, obj, path) {
1262 + if (ignorePaths === void 0) { ignorePaths = []; }
1263 + if (path === void 0) { path = ""; }
1264 + var tracked = { value: obj };
1265 + if (!isImmutable(obj)) {
1266 + tracked.children = {};
1267 + for (var key in obj) {
1268 + var childPath = path ? path + "." + key : key;
1269 + if (ignorePaths.length && ignorePaths.indexOf(childPath) !== -1) {
1270 + continue;
1271 + }
1272 + tracked.children[key] = trackProperties(isImmutable, ignorePaths, obj[key], childPath);
1273 + }
1274 + }
1275 + return tracked;
1276 +}
1277 +function detectMutations(isImmutable, ignorePaths, trackedProperty, obj, sameParentRef, path) {
1278 + if (ignorePaths === void 0) { ignorePaths = []; }
1279 + if (sameParentRef === void 0) { sameParentRef = false; }
1280 + if (path === void 0) { path = ""; }
1281 + var prevObj = trackedProperty ? trackedProperty.value : void 0;
1282 + var sameRef = prevObj === obj;
1283 + if (sameParentRef && !sameRef && !Number.isNaN(obj)) {
1284 + return { wasMutated: true, path: path };
1285 + }
1286 + if (isImmutable(prevObj) || isImmutable(obj)) {
1287 + return { wasMutated: false };
1288 + }
1289 + var keysToDetect = {};
1290 + for (var key in trackedProperty.children) {
1291 + keysToDetect[key] = true;
1292 + }
1293 + for (var key in obj) {
1294 + keysToDetect[key] = true;
1295 + }
1296 + for (var key in keysToDetect) {
1297 + var childPath = path ? path + "." + key : key;
1298 + if (ignorePaths.length && ignorePaths.indexOf(childPath) !== -1) {
1299 + continue;
1300 + }
1301 + var result = detectMutations(isImmutable, ignorePaths, trackedProperty.children[key], obj[key], sameRef, childPath);
1302 + if (result.wasMutated) {
1303 + return result;
1304 + }
1305 + }
1306 + return { wasMutated: false };
1307 +}
1308 +function createImmutableStateInvariantMiddleware(options) {
1309 + if (options === void 0) { options = {}; }
1310 + if (false) {}
1311 + 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;
1312 + ignoredPaths = ignoredPaths || ignore;
1313 + var track = trackForMutations.bind(null, isImmutable, ignoredPaths);
1314 + return function (_c) {
1315 + var getState = _c.getState;
1316 + var state = getState();
1317 + var tracker = track(state);
1318 + var result;
1319 + return function (next) { return function (action) {
1320 + var measureUtils = getTimeMeasureUtils(warnAfter, "ImmutableStateInvariantMiddleware");
1321 + measureUtils.measureTime(function () {
1322 + state = getState();
1323 + result = tracker.detectMutations();
1324 + tracker = track(state);
1325 + 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)");
1326 + });
1327 + var dispatchedAction = next(action);
1328 + measureUtils.measureTime(function () {
1329 + state = getState();
1330 + result = tracker.detectMutations();
1331 + tracker = track(state);
1332 + 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)");
1333 + });
1334 + measureUtils.warnIfExceeded();
1335 + return dispatchedAction;
1336 + }; };
1337 + };
1338 +}
1339 +// src/serializableStateInvariantMiddleware.ts
1340 +function isPlain(val) {
1341 + var type = typeof val;
1342 + return type === "undefined" || val === null || type === "string" || type === "boolean" || type === "number" || Array.isArray(val) || isPlainObject(val);
1343 +}
1344 +function findNonSerializableValue(value, path, isSerializable, getEntries, ignoredPaths) {
1345 + if (path === void 0) { path = ""; }
1346 + if (isSerializable === void 0) { isSerializable = isPlain; }
1347 + if (ignoredPaths === void 0) { ignoredPaths = []; }
1348 + var foundNestedSerializable;
1349 + if (!isSerializable(value)) {
1350 + return {
1351 + keyPath: path || "<root>",
1352 + value: value
1353 + };
1354 + }
1355 + if (typeof value !== "object" || value === null) {
1356 + return false;
1357 + }
1358 + var entries = getEntries != null ? getEntries(value) : Object.entries(value);
1359 + var hasIgnoredPaths = ignoredPaths.length > 0;
1360 + for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) {
1361 + var _c = entries_1[_i], key = _c[0], nestedValue = _c[1];
1362 + var nestedPath = path ? path + "." + key : key;
1363 + if (hasIgnoredPaths && ignoredPaths.indexOf(nestedPath) >= 0) {
1364 + continue;
1365 + }
1366 + if (!isSerializable(nestedValue)) {
1367 + return {
1368 + keyPath: nestedPath,
1369 + value: nestedValue
1370 + };
1371 + }
1372 + if (typeof nestedValue === "object") {
1373 + foundNestedSerializable = findNonSerializableValue(nestedValue, nestedPath, isSerializable, getEntries, ignoredPaths);
1374 + if (foundNestedSerializable) {
1375 + return foundNestedSerializable;
1376 + }
1377 + }
1378 + }
1379 + return false;
1380 +}
1381 +function createSerializableStateInvariantMiddleware(options) {
1382 + if (options === void 0) { options = {}; }
1383 + if (false) {}
1384 + 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;
1385 + return function (storeAPI) { return function (next) { return function (action) {
1386 + var result = next(action);
1387 + var measureUtils = getTimeMeasureUtils(warnAfter, "SerializableStateInvariantMiddleware");
1388 + if (!ignoreActions && !(ignoredActions.length && ignoredActions.indexOf(action.type) !== -1)) {
1389 + measureUtils.measureTime(function () {
1390 + var foundActionNonSerializableValue = findNonSerializableValue(action, "", isSerializable, getEntries, ignoredActionPaths);
1391 + if (foundActionNonSerializableValue) {
1392 + var keyPath = foundActionNonSerializableValue.keyPath, value = foundActionNonSerializableValue.value;
1393 + 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)");
1394 + }
1395 + });
1396 + }
1397 + if (!ignoreState) {
1398 + measureUtils.measureTime(function () {
1399 + var state = storeAPI.getState();
1400 + var foundStateNonSerializableValue = findNonSerializableValue(state, "", isSerializable, getEntries, ignoredPaths);
1401 + if (foundStateNonSerializableValue) {
1402 + var keyPath = foundStateNonSerializableValue.keyPath, value = foundStateNonSerializableValue.value;
1403 + 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)");
1404 + }
1405 + });
1406 + measureUtils.warnIfExceeded();
1407 + }
1408 + return result;
1409 + }; }; };
1410 +}
1411 +// src/getDefaultMiddleware.ts
1412 +function isBoolean(x) {
1413 + return typeof x === "boolean";
1414 +}
1415 +function curryGetDefaultMiddleware() {
1416 + return function curriedGetDefaultMiddleware(options) {
1417 + return getDefaultMiddleware(options);
1418 + };
1419 +}
1420 +function getDefaultMiddleware(options) {
1421 + if (options === void 0) { options = {}; }
1422 + 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;
1423 + var middlewareArray = new MiddlewareArray();
1424 + if (thunk) {
1425 + if (isBoolean(thunk)) {
1426 + middlewareArray.push(redux_thunk__WEBPACK_IMPORTED_MODULE_3__["default"]);
1427 + }
1428 + else {
1429 + middlewareArray.push(redux_thunk__WEBPACK_IMPORTED_MODULE_3__["default"].withExtraArgument(thunk.extraArgument));
1430 + }
1431 + }
1432 + if (true) {
1433 + if (immutableCheck) {
1434 + var immutableOptions = {};
1435 + if (!isBoolean(immutableCheck)) {
1436 + immutableOptions = immutableCheck;
1437 + }
1438 + middlewareArray.unshift(createImmutableStateInvariantMiddleware(immutableOptions));
1439 + }
1440 + if (serializableCheck) {
1441 + var serializableOptions = {};
1442 + if (!isBoolean(serializableCheck)) {
1443 + serializableOptions = serializableCheck;
1444 + }
1445 + middlewareArray.push(createSerializableStateInvariantMiddleware(serializableOptions));
1446 + }
1447 + }
1448 + return middlewareArray;
1449 +}
1450 +// src/configureStore.ts
1451 +var IS_PRODUCTION = "development" === "production";
1452 +function configureStore(options) {
1453 + var curriedGetDefaultMiddleware = curryGetDefaultMiddleware();
1454 + 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;
1455 + var rootReducer;
1456 + if (typeof reducer === "function") {
1457 + rootReducer = reducer;
1458 + }
1459 + else if (isPlainObject(reducer)) {
1460 + rootReducer = (0,redux__WEBPACK_IMPORTED_MODULE_0__.combineReducers)(reducer);
1461 + }
1462 + else {
1463 + throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');
1464 + }
1465 + var finalMiddleware = middleware;
1466 + if (typeof finalMiddleware === "function") {
1467 + finalMiddleware = finalMiddleware(curriedGetDefaultMiddleware);
1468 + if (!IS_PRODUCTION && !Array.isArray(finalMiddleware)) {
1469 + throw new Error("when using a middleware builder function, an array of middleware must be returned");
1470 + }
1471 + }
1472 + if (!IS_PRODUCTION && finalMiddleware.some(function (item) { return typeof item !== "function"; })) {
1473 + throw new Error("each middleware provided to configureStore must be a function");
1474 + }
1475 + var middlewareEnhancer = redux__WEBPACK_IMPORTED_MODULE_0__.applyMiddleware.apply(void 0, finalMiddleware);
1476 + var finalCompose = redux__WEBPACK_IMPORTED_MODULE_0__.compose;
1477 + if (devTools) {
1478 + finalCompose = composeWithDevTools(__spreadValues({
1479 + trace: !IS_PRODUCTION
1480 + }, typeof devTools === "object" && devTools));
1481 + }
1482 + var storeEnhancers = [middlewareEnhancer];
1483 + if (Array.isArray(enhancers)) {
1484 + storeEnhancers = __spreadArray([middlewareEnhancer], enhancers);
1485 + }
1486 + else if (typeof enhancers === "function") {
1487 + storeEnhancers = enhancers(storeEnhancers);
1488 + }
1489 + var composedEnhancer = finalCompose.apply(void 0, storeEnhancers);
1490 + return (0,redux__WEBPACK_IMPORTED_MODULE_0__.createStore)(rootReducer, preloadedState, composedEnhancer);
1491 +}
1492 +// src/createAction.ts
1493 +function createAction(type, prepareAction) {
1494 + function actionCreator() {
1495 + var args = [];
1496 + for (var _i = 0; _i < arguments.length; _i++) {
1497 + args[_i] = arguments[_i];
1498 + }
1499 + if (prepareAction) {
1500 + var prepared = prepareAction.apply(void 0, args);
1501 + if (!prepared) {
1502 + throw new Error("prepareAction did not return an object");
1503 + }
1504 + return __spreadValues(__spreadValues({
1505 + type: type,
1506 + payload: prepared.payload
1507 + }, "meta" in prepared && { meta: prepared.meta }), "error" in prepared && { error: prepared.error });
1508 + }
1509 + return { type: type, payload: args[0] };
1510 + }
1511 + actionCreator.toString = function () { return "" + type; };
1512 + actionCreator.type = type;
1513 + actionCreator.match = function (action) { return action.type === type; };
1514 + return actionCreator;
1515 +}
1516 +function isFSA(action) {
1517 + return isPlainObject(action) && typeof action.type === "string" && Object.keys(action).every(isValidKey);
1518 +}
1519 +function isValidKey(key) {
1520 + return ["type", "payload", "error", "meta"].indexOf(key) > -1;
1521 +}
1522 +function getType(actionCreator) {
1523 + return "" + actionCreator;
1524 +}
1525 +// src/createReducer.ts
1526 +
1527 +// src/mapBuilders.ts
1528 +function executeReducerBuilderCallback(builderCallback) {
1529 + var actionsMap = {};
1530 + var actionMatchers = [];
1531 + var defaultCaseReducer;
1532 + var builder = {
1533 + addCase: function (typeOrActionCreator, reducer) {
1534 + if (true) {
1535 + if (actionMatchers.length > 0) {
1536 + throw new Error("`builder.addCase` should only be called before calling `builder.addMatcher`");
1537 + }
1538 + if (defaultCaseReducer) {
1539 + throw new Error("`builder.addCase` should only be called before calling `builder.addDefaultCase`");
1540 + }
1541 + }
1542 + var type = typeof typeOrActionCreator === "string" ? typeOrActionCreator : typeOrActionCreator.type;
1543 + if (type in actionsMap) {
1544 + throw new Error("addCase cannot be called with two reducers for the same action type");
1545 + }
1546 + actionsMap[type] = reducer;
1547 + return builder;
1548 + },
1549 + addMatcher: function (matcher, reducer) {
1550 + if (true) {
1551 + if (defaultCaseReducer) {
1552 + throw new Error("`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");
1553 + }
1554 + }
1555 + actionMatchers.push({ matcher: matcher, reducer: reducer });
1556 + return builder;
1557 + },
1558 + addDefaultCase: function (reducer) {
1559 + if (true) {
1560 + if (defaultCaseReducer) {
1561 + throw new Error("`builder.addDefaultCase` can only be called once");
1562 + }
1563 + }
1564 + defaultCaseReducer = reducer;
1565 + return builder;
1566 + }
1567 + };
1568 + builderCallback(builder);
1569 + return [actionsMap, actionMatchers, defaultCaseReducer];
1570 +}
1571 +// src/createReducer.ts
1572 +function isStateFunction(x) {
1573 + return typeof x === "function";
1574 +}
1575 +function createReducer(initialState, mapOrBuilderCallback, actionMatchers, defaultCaseReducer) {
1576 + if (actionMatchers === void 0) { actionMatchers = []; }
1577 + var _c = typeof mapOrBuilderCallback === "function" ? executeReducerBuilderCallback(mapOrBuilderCallback) : [mapOrBuilderCallback, actionMatchers, defaultCaseReducer], actionsMap = _c[0], finalActionMatchers = _c[1], finalDefaultCaseReducer = _c[2];
1578 + var getInitialState;
1579 + if (isStateFunction(initialState)) {
1580 + getInitialState = function () { return (0,immer__WEBPACK_IMPORTED_MODULE_2__["default"])(initialState(), function () {
1581 + }); };
1582 + }
1583 + else {
1584 + var frozenInitialState_1 = (0,immer__WEBPACK_IMPORTED_MODULE_2__["default"])(initialState, function () {
1585 + });
1586 + getInitialState = function () { return frozenInitialState_1; };
1587 + }
1588 + function reducer(state, action) {
1589 + if (state === void 0) { state = getInitialState(); }
1590 + var caseReducers = __spreadArray([
1591 + actionsMap[action.type]
1592 + ], finalActionMatchers.filter(function (_c) {
1593 + var matcher = _c.matcher;
1594 + return matcher(action);
1595 + }).map(function (_c) {
1596 + var reducer2 = _c.reducer;
1597 + return reducer2;
1598 + }));
1599 + if (caseReducers.filter(function (cr) { return !!cr; }).length === 0) {
1600 + caseReducers = [finalDefaultCaseReducer];
1601 + }
1602 + return caseReducers.reduce(function (previousState, caseReducer) {
1603 + if (caseReducer) {
1604 + if ((0,immer__WEBPACK_IMPORTED_MODULE_2__.isDraft)(previousState)) {
1605 + var draft = previousState;
1606 + var result = caseReducer(draft, action);
1607 + if (typeof result === "undefined") {
1608 + return previousState;
1609 + }
1610 + return result;
1611 + }
1612 + else if (!(0,immer__WEBPACK_IMPORTED_MODULE_2__.isDraftable)(previousState)) {
1613 + var result = caseReducer(previousState, action);
1614 + if (typeof result === "undefined") {
1615 + if (previousState === null) {
1616 + return previousState;
1617 + }
1618 + throw Error("A case reducer on a non-draftable value must not return undefined");
1619 + }
1620 + return result;
1621 + }
1622 + else {
1623 + return (0,immer__WEBPACK_IMPORTED_MODULE_2__["default"])(previousState, function (draft) {
1624 + return caseReducer(draft, action);
1625 + });
1626 + }
1627 + }
1628 + return previousState;
1629 + }, state);
1630 + }
1631 + reducer.getInitialState = getInitialState;
1632 + return reducer;
1633 +}
1634 +// src/createSlice.ts
1635 +function getType2(slice, actionKey) {
1636 + return slice + "/" + actionKey;
1637 +}
1638 +function createSlice(options) {
1639 + var name = options.name;
1640 + if (!name) {
1641 + throw new Error("`name` is a required option for createSlice");
1642 + }
1643 + var initialState = typeof options.initialState == "function" ? options.initialState : (0,immer__WEBPACK_IMPORTED_MODULE_2__["default"])(options.initialState, function () {
1644 + });
1645 + var reducers = options.reducers || {};
1646 + var reducerNames = Object.keys(reducers);
1647 + var sliceCaseReducersByName = {};
1648 + var sliceCaseReducersByType = {};
1649 + var actionCreators = {};
1650 + reducerNames.forEach(function (reducerName) {
1651 + var maybeReducerWithPrepare = reducers[reducerName];
1652 + var type = getType2(name, reducerName);
1653 + var caseReducer;
1654 + var prepareCallback;
1655 + if ("reducer" in maybeReducerWithPrepare) {
1656 + caseReducer = maybeReducerWithPrepare.reducer;
1657 + prepareCallback = maybeReducerWithPrepare.prepare;
1658 + }
1659 + else {
1660 + caseReducer = maybeReducerWithPrepare;
1661 + }
1662 + sliceCaseReducersByName[reducerName] = caseReducer;
1663 + sliceCaseReducersByType[type] = caseReducer;
1664 + actionCreators[reducerName] = prepareCallback ? createAction(type, prepareCallback) : createAction(type);
1665 + });
1666 + function buildReducer() {
1667 + 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;
1668 + var finalCaseReducers = __spreadValues(__spreadValues({}, extraReducers), sliceCaseReducersByType);
1669 + return createReducer(initialState, finalCaseReducers, actionMatchers, defaultCaseReducer);
1670 + }
1671 + var _reducer;
1672 + return {
1673 + name: name,
1674 + reducer: function (state, action) {
1675 + if (!_reducer)
1676 + _reducer = buildReducer();
1677 + return _reducer(state, action);
1678 + },
1679 + actions: actionCreators,
1680 + caseReducers: sliceCaseReducersByName,
1681 + getInitialState: function () {
1682 + if (!_reducer)
1683 + _reducer = buildReducer();
1684 + return _reducer.getInitialState();
1685 + }
1686 + };
1687 +}
1688 +// src/entities/entity_state.ts
1689 +function getInitialEntityState() {
1690 + return {
1691 + ids: [],
1692 + entities: {}
1693 + };
1694 +}
1695 +function createInitialStateFactory() {
1696 + function getInitialState(additionalState) {
1697 + if (additionalState === void 0) { additionalState = {}; }
1698 + return Object.assign(getInitialEntityState(), additionalState);
1699 + }
1700 + return { getInitialState: getInitialState };
1701 +}
1702 +// src/entities/state_selectors.ts
1703 +function createSelectorsFactory() {
1704 + function getSelectors(selectState) {
1705 + var selectIds = function (state) { return state.ids; };
1706 + var selectEntities = function (state) { return state.entities; };
1707 + var selectAll = createDraftSafeSelector(selectIds, selectEntities, function (ids, entities) { return ids.map(function (id) { return entities[id]; }); });
1708 + var selectId = function (_, id) { return id; };
1709 + var selectById = function (entities, id) { return entities[id]; };
1710 + var selectTotal = createDraftSafeSelector(selectIds, function (ids) { return ids.length; });
1711 + if (!selectState) {
1712 + return {
1713 + selectIds: selectIds,
1714 + selectEntities: selectEntities,
1715 + selectAll: selectAll,
1716 + selectTotal: selectTotal,
1717 + selectById: createDraftSafeSelector(selectEntities, selectId, selectById)
1718 + };
1719 + }
1720 + var selectGlobalizedEntities = createDraftSafeSelector(selectState, selectEntities);
1721 + return {
1722 + selectIds: createDraftSafeSelector(selectState, selectIds),
1723 + selectEntities: selectGlobalizedEntities,
1724 + selectAll: createDraftSafeSelector(selectState, selectAll),
1725 + selectTotal: createDraftSafeSelector(selectState, selectTotal),
1726 + selectById: createDraftSafeSelector(selectGlobalizedEntities, selectId, selectById)
1727 + };
1728 + }
1729 + return { getSelectors: getSelectors };
1730 +}
1731 +// src/entities/state_adapter.ts
1732 +
1733 +function createSingleArgumentStateOperator(mutator) {
1734 + var operator = createStateOperator(function (_, state) { return mutator(state); });
1735 + return function operation(state) {
1736 + return operator(state, void 0);
1737 + };
1738 +}
1739 +function createStateOperator(mutator) {
1740 + return function operation(state, arg) {
1741 + function isPayloadActionArgument(arg2) {
1742 + return isFSA(arg2);
1743 + }
1744 + var runMutator = function (draft) {
1745 + if (isPayloadActionArgument(arg)) {
1746 + mutator(arg.payload, draft);
1747 + }
1748 + else {
1749 + mutator(arg, draft);
1750 + }
1751 + };
1752 + if ((0,immer__WEBPACK_IMPORTED_MODULE_2__.isDraft)(state)) {
1753 + runMutator(state);
1754 + return state;
1755 + }
1756 + else {
1757 + return (0,immer__WEBPACK_IMPORTED_MODULE_2__["default"])(state, runMutator);
1758 + }
1759 + };
1760 +}
1761 +// src/entities/utils.ts
1762 +function selectIdValue(entity, selectId) {
1763 + var key = selectId(entity);
1764 + if ( true && key === void 0) {
1765 + 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());
1766 + }
1767 + return key;
1768 +}
1769 +function ensureEntitiesArray(entities) {
1770 + if (!Array.isArray(entities)) {
1771 + entities = Object.values(entities);
1772 + }
1773 + return entities;
1774 +}
1775 +function splitAddedUpdatedEntities(newEntities, selectId, state) {
1776 + newEntities = ensureEntitiesArray(newEntities);
1777 + var added = [];
1778 + var updated = [];
1779 + for (var _i = 0, newEntities_1 = newEntities; _i < newEntities_1.length; _i++) {
1780 + var entity = newEntities_1[_i];
1781 + var id = selectIdValue(entity, selectId);
1782 + if (id in state.entities) {
1783 + updated.push({ id: id, changes: entity });
1784 + }
1785 + else {
1786 + added.push(entity);
1787 + }
1788 + }
1789 + return [added, updated];
1790 +}
1791 +// src/entities/unsorted_state_adapter.ts
1792 +function createUnsortedStateAdapter(selectId) {
1793 + function addOneMutably(entity, state) {
1794 + var key = selectIdValue(entity, selectId);
1795 + if (key in state.entities) {
1796 + return;
1797 + }
1798 + state.ids.push(key);
1799 + state.entities[key] = entity;
1800 + }
1801 + function addManyMutably(newEntities, state) {
1802 + newEntities = ensureEntitiesArray(newEntities);
1803 + for (var _i = 0, newEntities_2 = newEntities; _i < newEntities_2.length; _i++) {
1804 + var entity = newEntities_2[_i];
1805 + addOneMutably(entity, state);
1806 + }
1807 + }
1808 + function setOneMutably(entity, state) {
1809 + var key = selectIdValue(entity, selectId);
1810 + if (!(key in state.entities)) {
1811 + state.ids.push(key);
1812 + }
1813 + state.entities[key] = entity;
1814 + }
1815 + function setManyMutably(newEntities, state) {
1816 + newEntities = ensureEntitiesArray(newEntities);
1817 + for (var _i = 0, newEntities_3 = newEntities; _i < newEntities_3.length; _i++) {
1818 + var entity = newEntities_3[_i];
1819 + setOneMutably(entity, state);
1820 + }
1821 + }
1822 + function setAllMutably(newEntities, state) {
1823 + newEntities = ensureEntitiesArray(newEntities);
1824 + state.ids = [];
1825 + state.entities = {};
1826 + addManyMutably(newEntities, state);
1827 + }
1828 + function removeOneMutably(key, state) {
1829 + return removeManyMutably([key], state);
1830 + }
1831 + function removeManyMutably(keys, state) {
1832 + var didMutate = false;
1833 + keys.forEach(function (key) {
1834 + if (key in state.entities) {
1835 + delete state.entities[key];
1836 + didMutate = true;
1837 + }
1838 + });
1839 + if (didMutate) {
1840 + state.ids = state.ids.filter(function (id) { return id in state.entities; });
1841 + }
1842 + }
1843 + function removeAllMutably(state) {
1844 + Object.assign(state, {
1845 + ids: [],
1846 + entities: {}
1847 + });
1848 + }
1849 + function takeNewKey(keys, update, state) {
1850 + var original2 = state.entities[update.id];
1851 + var updated = Object.assign({}, original2, update.changes);
1852 + var newKey = selectIdValue(updated, selectId);
1853 + var hasNewKey = newKey !== update.id;
1854 + if (hasNewKey) {
1855 + keys[update.id] = newKey;
1856 + delete state.entities[update.id];
1857 + }
1858 + state.entities[newKey] = updated;
1859 + return hasNewKey;
1860 + }
1861 + function updateOneMutably(update, state) {
1862 + return updateManyMutably([update], state);
1863 + }
1864 + function updateManyMutably(updates, state) {
1865 + var newKeys = {};
1866 + var updatesPerEntity = {};
1867 + updates.forEach(function (update) {
1868 + if (update.id in state.entities) {
1869 + updatesPerEntity[update.id] = {
1870 + id: update.id,
1871 + changes: __spreadValues(__spreadValues({}, updatesPerEntity[update.id] ? updatesPerEntity[update.id].changes : null), update.changes)
1872 + };
1873 + }
1874 + });
1875 + updates = Object.values(updatesPerEntity);
1876 + var didMutateEntities = updates.length > 0;
1877 + if (didMutateEntities) {
1878 + var didMutateIds = updates.filter(function (update) { return takeNewKey(newKeys, update, state); }).length > 0;
1879 + if (didMutateIds) {
1880 + state.ids = state.ids.map(function (id) { return newKeys[id] || id; });
1881 + }
1882 + }
1883 + }
1884 + function upsertOneMutably(entity, state) {
1885 + return upsertManyMutably([entity], state);
1886 + }
1887 + function upsertManyMutably(newEntities, state) {
1888 + var _c = splitAddedUpdatedEntities(newEntities, selectId, state), added = _c[0], updated = _c[1];
1889 + updateManyMutably(updated, state);
1890 + addManyMutably(added, state);
1891 + }
1892 + return {
1893 + removeAll: createSingleArgumentStateOperator(removeAllMutably),
1894 + addOne: createStateOperator(addOneMutably),
1895 + addMany: createStateOperator(addManyMutably),
1896 + setOne: createStateOperator(setOneMutably),
1897 + setMany: createStateOperator(setManyMutably),
1898 + setAll: createStateOperator(setAllMutably),
1899 + updateOne: createStateOperator(updateOneMutably),
1900 + updateMany: createStateOperator(updateManyMutably),
1901 + upsertOne: createStateOperator(upsertOneMutably),
1902 + upsertMany: createStateOperator(upsertManyMutably),
1903 + removeOne: createStateOperator(removeOneMutably),
1904 + removeMany: createStateOperator(removeManyMutably)
1905 + };
1906 +}
1907 +// src/entities/sorted_state_adapter.ts
1908 +function createSortedStateAdapter(selectId, sort) {
1909 + var _c = createUnsortedStateAdapter(selectId), removeOne = _c.removeOne, removeMany = _c.removeMany, removeAll = _c.removeAll;
1910 + function addOneMutably(entity, state) {
1911 + return addManyMutably([entity], state);
1912 + }
1913 + function addManyMutably(newEntities, state) {
1914 + newEntities = ensureEntitiesArray(newEntities);
1915 + var models = newEntities.filter(function (model) { return !(selectIdValue(model, selectId) in state.entities); });
1916 + if (models.length !== 0) {
1917 + merge(models, state);
1918 + }
1919 + }
1920 + function setOneMutably(entity, state) {
1921 + return setManyMutably([entity], state);
1922 + }
1923 + function setManyMutably(newEntities, state) {
1924 + newEntities = ensureEntitiesArray(newEntities);
1925 + if (newEntities.length !== 0) {
1926 + merge(newEntities, state);
1927 + }
1928 + }
1929 + function setAllMutably(newEntities, state) {
1930 + newEntities = ensureEntitiesArray(newEntities);
1931 + state.entities = {};
1932 + state.ids = [];
1933 + addManyMutably(newEntities, state);
1934 + }
1935 + function updateOneMutably(update, state) {
1936 + return updateManyMutably([update], state);
1937 + }
1938 + function takeUpdatedModel(models, update, state) {
1939 + if (!(update.id in state.entities)) {
1940 + return false;
1941 + }
1942 + var original2 = state.entities[update.id];
1943 + var updated = Object.assign({}, original2, update.changes);
1944 + var newKey = selectIdValue(updated, selectId);
1945 + delete state.entities[update.id];
1946 + models.push(updated);
1947 + return newKey !== update.id;
1948 + }
1949 + function updateManyMutably(updates, state) {
1950 + var models = [];
1951 + updates.forEach(function (update) { return takeUpdatedModel(models, update, state); });
1952 + if (models.length !== 0) {
1953 + merge(models, state);
1954 + }
1955 + }
1956 + function upsertOneMutably(entity, state) {
1957 + return upsertManyMutably([entity], state);
1958 + }
1959 + function upsertManyMutably(newEntities, state) {
1960 + var _c = splitAddedUpdatedEntities(newEntities, selectId, state), added = _c[0], updated = _c[1];
1961 + updateManyMutably(updated, state);
1962 + addManyMutably(added, state);
1963 + }
1964 + function areArraysEqual(a, b) {
1965 + if (a.length !== b.length) {
1966 + return false;
1967 + }
1968 + for (var i = 0; i < a.length && i < b.length; i++) {
1969 + if (a[i] === b[i]) {
1970 + continue;
1971 + }
1972 + return false;
1973 + }
1974 + return true;
1975 + }
1976 + function merge(models, state) {
1977 + models.forEach(function (model) {
1978 + state.entities[selectId(model)] = model;
1979 + });
1980 + var allEntities = Object.values(state.entities);
1981 + allEntities.sort(sort);
1982 + var newSortedIds = allEntities.map(selectId);
1983 + var ids = state.ids;
1984 + if (!areArraysEqual(ids, newSortedIds)) {
1985 + state.ids = newSortedIds;
1986 + }
1987 + }
1988 + return {
1989 + removeOne: removeOne,
1990 + removeMany: removeMany,
1991 + removeAll: removeAll,
1992 + addOne: createStateOperator(addOneMutably),
1993 + updateOne: createStateOperator(updateOneMutably),
1994 + upsertOne: createStateOperator(upsertOneMutably),
1995 + setOne: createStateOperator(setOneMutably),
1996 + setMany: createStateOperator(setManyMutably),
1997 + setAll: createStateOperator(setAllMutably),
1998 + addMany: createStateOperator(addManyMutably),
1999 + updateMany: createStateOperator(updateManyMutably),
2000 + upsertMany: createStateOperator(upsertManyMutably)
2001 + };
2002 +}
2003 +// src/entities/create_adapter.ts
2004 +function createEntityAdapter(options) {
2005 + if (options === void 0) { options = {}; }
2006 + var _c = __spreadValues({
2007 + sortComparer: false,
2008 + selectId: function (instance) { return instance.id; }
2009 + }, options), selectId = _c.selectId, sortComparer = _c.sortComparer;
2010 + var stateFactory = createInitialStateFactory();
2011 + var selectorsFactory = createSelectorsFactory();
2012 + var stateAdapter = sortComparer ? createSortedStateAdapter(selectId, sortComparer) : createUnsortedStateAdapter(selectId);
2013 + return __spreadValues(__spreadValues(__spreadValues({
2014 + selectId: selectId,
2015 + sortComparer: sortComparer
2016 + }, stateFactory), selectorsFactory), stateAdapter);
2017 +}
2018 +// src/nanoid.ts
2019 +var urlAlphabet = "ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW";
2020 +var nanoid = function (size) {
2021 + if (size === void 0) { size = 21; }
2022 + var id = "";
2023 + var i = size;
2024 + while (i--) {
2025 + id += urlAlphabet[Math.random() * 64 | 0];
2026 + }
2027 + return id;
2028 +};
2029 +// src/createAsyncThunk.ts
2030 +var commonProperties = [
2031 + "name",
2032 + "message",
2033 + "stack",
2034 + "code"
2035 +];
2036 +var RejectWithValue = /** @class */ (function () {
2037 + function RejectWithValue(payload, meta) {
2038 + this.payload = payload;
2039 + this.meta = meta;
2040 + }
2041 + return RejectWithValue;
2042 +}());
2043 +var FulfillWithMeta = /** @class */ (function () {
2044 + function FulfillWithMeta(payload, meta) {
2045 + this.payload = payload;
2046 + this.meta = meta;
2047 + }
2048 + return FulfillWithMeta;
2049 +}());
2050 +var miniSerializeError = function (value) {
2051 + if (typeof value === "object" && value !== null) {
2052 + var simpleError = {};
2053 + for (var _i = 0, commonProperties_1 = commonProperties; _i < commonProperties_1.length; _i++) {
2054 + var property = commonProperties_1[_i];
2055 + if (typeof value[property] === "string") {
2056 + simpleError[property] = value[property];
2057 + }
2058 + }
2059 + return simpleError;
2060 + }
2061 + return { message: String(value) };
2062 +};
2063 +function createAsyncThunk(typePrefix, payloadCreator, options) {
2064 + var fulfilled = createAction(typePrefix + "/fulfilled", function (payload, requestId, arg, meta) { return ({
2065 + payload: payload,
2066 + meta: __spreadProps(__spreadValues({}, meta || {}), {
2067 + arg: arg,
2068 + requestId: requestId,
2069 + requestStatus: "fulfilled"
2070 + })
2071 + }); });
2072 + var pending = createAction(typePrefix + "/pending", function (requestId, arg, meta) { return ({
2073 + payload: void 0,
2074 + meta: __spreadProps(__spreadValues({}, meta || {}), {
2075 + arg: arg,
2076 + requestId: requestId,
2077 + requestStatus: "pending"
2078 + })
2079 + }); });
2080 + var rejected = createAction(typePrefix + "/rejected", function (error, requestId, arg, payload, meta) { return ({
2081 + payload: payload,
2082 + error: (options && options.serializeError || miniSerializeError)(error || "Rejected"),
2083 + meta: __spreadProps(__spreadValues({}, meta || {}), {
2084 + arg: arg,
2085 + requestId: requestId,
2086 + rejectedWithValue: !!payload,
2087 + requestStatus: "rejected",
2088 + aborted: (error == null ? void 0 : error.name) === "AbortError",
2089 + condition: (error == null ? void 0 : error.name) === "ConditionError"
2090 + })
2091 + }); });
2092 + var displayedWarning = false;
2093 + var AC = typeof AbortController !== "undefined" ? AbortController : /** @class */ (function () {
2094 + function class_1() {
2095 + this.signal = {
2096 + aborted: false,
2097 + addEventListener: function () {
2098 + },
2099 + dispatchEvent: function () {
2100 + return false;
2101 + },
2102 + onabort: function () {
2103 + },
2104 + removeEventListener: function () {
2105 + }
2106 + };
2107 + }
2108 + class_1.prototype.abort = function () {
2109 + if (true) {
2110 + if (!displayedWarning) {
2111 + displayedWarning = true;
2112 + 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'.");
2113 + }
2114 + }
2115 + };
2116 + return class_1;
2117 + }());
2118 + function actionCreator(arg) {
2119 + return function (dispatch, getState, extra) {
2120 + var requestId = (options == null ? void 0 : options.idGenerator) ? options.idGenerator(arg) : nanoid();
2121 + var abortController = new AC();
2122 + var abortReason;
2123 + var abortedPromise = new Promise(function (_, reject) { return abortController.signal.addEventListener("abort", function () { return reject({ name: "AbortError", message: abortReason || "Aborted" }); }); });
2124 + var started = false;
2125 + function abort(reason) {
2126 + if (started) {
2127 + abortReason = reason;
2128 + abortController.abort();
2129 + }
2130 + }
2131 + var promise = function () {
2132 + return __async(this, null, function () {
2133 + var _a, _b, finalAction, conditionResult, err_1, skipDispatch;
2134 + return __generator(this, function (_c) {
2135 + switch (_c.label) {
2136 + case 0:
2137 + _c.trys.push([0, 4, , 5]);
2138 + conditionResult = (_a = options == null ? void 0 : options.condition) == null ? void 0 : _a.call(options, arg, { getState: getState, extra: extra });
2139 + if (!isThenable(conditionResult)) return [3 /*break*/, 2];
2140 + return [4 /*yield*/, conditionResult];
2141 + case 1:
2142 + conditionResult = _c.sent();
2143 + _c.label = 2;
2144 + case 2:
2145 + if (conditionResult === false) {
2146 + throw {
2147 + name: "ConditionError",
2148 + message: "Aborted due to condition callback returning false."
2149 + };
2150 + }
2151 + started = true;
2152 + 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 })));
2153 + return [4 /*yield*/, Promise.race([
2154 + abortedPromise,
2155 + Promise.resolve(payloadCreator(arg, {
2156 + dispatch: dispatch,
2157 + getState: getState,
2158 + extra: extra,
2159 + requestId: requestId,
2160 + signal: abortController.signal,
2161 + rejectWithValue: function (value, meta) {
2162 + return new RejectWithValue(value, meta);
2163 + },
2164 + fulfillWithValue: function (value, meta) {
2165 + return new FulfillWithMeta(value, meta);
2166 + }
2167 + })).then(function (result) {
2168 + if (result instanceof RejectWithValue) {
2169 + throw result;
2170 + }
2171 + if (result instanceof FulfillWithMeta) {
2172 + return fulfilled(result.payload, requestId, arg, result.meta);
2173 + }
2174 + return fulfilled(result, requestId, arg);
2175 + })
2176 + ])];
2177 + case 3:
2178 + finalAction = _c.sent();
2179 + return [3 /*break*/, 5];
2180 + case 4:
2181 + err_1 = _c.sent();
2182 + finalAction = err_1 instanceof RejectWithValue ? rejected(null, requestId, arg, err_1.payload, err_1.meta) : rejected(err_1, requestId, arg);
2183 + return [3 /*break*/, 5];
2184 + case 5:
2185 + skipDispatch = options && !options.dispatchConditionRejection && rejected.match(finalAction) && finalAction.meta.condition;
2186 + if (!skipDispatch) {
2187 + dispatch(finalAction);
2188 + }
2189 + return [2 /*return*/, finalAction];
2190 + }
2191 + });
2192 + });
2193 + }();
2194 + return Object.assign(promise, {
2195 + abort: abort,
2196 + requestId: requestId,
2197 + arg: arg,
2198 + unwrap: function () {
2199 + return promise.then(unwrapResult);
2200 + }
2201 + });
2202 + };
2203 + }
2204 + return Object.assign(actionCreator, {
2205 + pending: pending,
2206 + rejected: rejected,
2207 + fulfilled: fulfilled,
2208 + typePrefix: typePrefix
2209 + });
2210 +}
2211 +function unwrapResult(action) {
2212 + if (action.meta && action.meta.rejectedWithValue) {
2213 + throw action.payload;
2214 + }
2215 + if (action.error) {
2216 + throw action.error;
2217 + }
2218 + return action.payload;
2219 +}
2220 +function isThenable(value) {
2221 + return value !== null && typeof value === "object" && typeof value.then === "function";
2222 +}
2223 +// src/tsHelpers.ts
2224 +var hasMatchFunction = function (v) {
2225 + return v && typeof v.match === "function";
2226 +};
2227 +// src/matchers.ts
2228 +var matches = function (matcher, action) {
2229 + if (hasMatchFunction(matcher)) {
2230 + return matcher.match(action);
2231 + }
2232 + else {
2233 + return matcher(action);
2234 + }
2235 +};
2236 +function isAnyOf() {
2237 + var matchers = [];
2238 + for (var _i = 0; _i < arguments.length; _i++) {
2239 + matchers[_i] = arguments[_i];
2240 + }
2241 + return function (action) {
2242 + return matchers.some(function (matcher) { return matches(matcher, action); });
2243 + };
2244 +}
2245 +function isAllOf() {
2246 + var matchers = [];
2247 + for (var _i = 0; _i < arguments.length; _i++) {
2248 + matchers[_i] = arguments[_i];
2249 + }
2250 + return function (action) {
2251 + return matchers.every(function (matcher) { return matches(matcher, action); });
2252 + };
2253 +}
2254 +function hasExpectedRequestMetadata(action, validStatus) {
2255 + if (!action || !action.meta)
2256 + return false;
2257 + var hasValidRequestId = typeof action.meta.requestId === "string";
2258 + var hasValidRequestStatus = validStatus.indexOf(action.meta.requestStatus) > -1;
2259 + return hasValidRequestId && hasValidRequestStatus;
2260 +}
2261 +function isAsyncThunkArray(a) {
2262 + return typeof a[0] === "function" && "pending" in a[0] && "fulfilled" in a[0] && "rejected" in a[0];
2263 +}
2264 +function isPending() {
2265 + var asyncThunks = [];
2266 + for (var _i = 0; _i < arguments.length; _i++) {
2267 + asyncThunks[_i] = arguments[_i];
2268 + }
2269 + if (asyncThunks.length === 0) {
2270 + return function (action) { return hasExpectedRequestMetadata(action, ["pending"]); };
2271 + }
2272 + if (!isAsyncThunkArray(asyncThunks)) {
2273 + return isPending()(asyncThunks[0]);
2274 + }
2275 + return function (action) {
2276 + var matchers = asyncThunks.map(function (asyncThunk) { return asyncThunk.pending; });
2277 + var combinedMatcher = isAnyOf.apply(void 0, matchers);
2278 + return combinedMatcher(action);
2279 + };
2280 +}
2281 +function isRejected() {
2282 + var asyncThunks = [];
2283 + for (var _i = 0; _i < arguments.length; _i++) {
2284 + asyncThunks[_i] = arguments[_i];
2285 + }
2286 + if (asyncThunks.length === 0) {
2287 + return function (action) { return hasExpectedRequestMetadata(action, ["rejected"]); };
2288 + }
2289 + if (!isAsyncThunkArray(asyncThunks)) {
2290 + return isRejected()(asyncThunks[0]);
2291 + }
2292 + return function (action) {
2293 + var matchers = asyncThunks.map(function (asyncThunk) { return asyncThunk.rejected; });
2294 + var combinedMatcher = isAnyOf.apply(void 0, matchers);
2295 + return combinedMatcher(action);
2296 + };
2297 +}
2298 +function isRejectedWithValue() {
2299 + var asyncThunks = [];
2300 + for (var _i = 0; _i < arguments.length; _i++) {
2301 + asyncThunks[_i] = arguments[_i];
2302 + }
2303 + var hasFlag = function (action) {
2304 + return action && action.meta && action.meta.rejectedWithValue;
2305 + };
2306 + if (asyncThunks.length === 0) {
2307 + return function (action) {
2308 + var combinedMatcher = isAllOf(isRejected.apply(void 0, asyncThunks), hasFlag);
2309 + return combinedMatcher(action);
2310 + };
2311 + }
2312 + if (!isAsyncThunkArray(asyncThunks)) {
2313 + return isRejectedWithValue()(asyncThunks[0]);
2314 + }
2315 + return function (action) {
2316 + var combinedMatcher = isAllOf(isRejected.apply(void 0, asyncThunks), hasFlag);
2317 + return combinedMatcher(action);
2318 + };
2319 +}
2320 +function isFulfilled() {
2321 + var asyncThunks = [];
2322 + for (var _i = 0; _i < arguments.length; _i++) {
2323 + asyncThunks[_i] = arguments[_i];
2324 + }
2325 + if (asyncThunks.length === 0) {
2326 + return function (action) { return hasExpectedRequestMetadata(action, ["fulfilled"]); };
2327 + }
2328 + if (!isAsyncThunkArray(asyncThunks)) {
2329 + return isFulfilled()(asyncThunks[0]);
2330 + }
2331 + return function (action) {
2332 + var matchers = asyncThunks.map(function (asyncThunk) { return asyncThunk.fulfilled; });
2333 + var combinedMatcher = isAnyOf.apply(void 0, matchers);
2334 + return combinedMatcher(action);
2335 + };
2336 +}
2337 +function isAsyncThunkAction() {
2338 + var asyncThunks = [];
2339 + for (var _i = 0; _i < arguments.length; _i++) {
2340 + asyncThunks[_i] = arguments[_i];
2341 + }
2342 + if (asyncThunks.length === 0) {
2343 + return function (action) { return hasExpectedRequestMetadata(action, ["pending", "fulfilled", "rejected"]); };
2344 + }
2345 + if (!isAsyncThunkArray(asyncThunks)) {
2346 + return isAsyncThunkAction()(asyncThunks[0]);
2347 + }
2348 + return function (action) {
2349 + var matchers = [];
2350 + for (var _i = 0, asyncThunks_1 = asyncThunks; _i < asyncThunks_1.length; _i++) {
2351 + var asyncThunk = asyncThunks_1[_i];
2352 + matchers.push(asyncThunk.pending, asyncThunk.rejected, asyncThunk.fulfilled);
2353 + }
2354 + var combinedMatcher = isAnyOf.apply(void 0, matchers);
2355 + return combinedMatcher(action);
2356 + };
2357 +}
2358 +// src/listenerMiddleware/utils.ts
2359 +var assertFunction = function (func, expected) {
2360 + if (typeof func !== "function") {
2361 + throw new TypeError(expected + " is not a function");
2362 + }
2363 +};
2364 +var noop = function () {
2365 +};
2366 +var catchRejection = function (promise, onError) {
2367 + if (onError === void 0) { onError = noop; }
2368 + promise.catch(onError);
2369 + return promise;
2370 +};
2371 +var addAbortSignalListener = function (abortSignal, callback) {
2372 + abortSignal.addEventListener("abort", callback, { once: true });
2373 +};
2374 +var abortControllerWithReason = function (abortController, reason) {
2375 + var signal = abortController.signal;
2376 + if (signal.aborted) {
2377 + return;
2378 + }
2379 + if (!("reason" in signal)) {
2380 + Object.defineProperty(signal, "reason", {
2381 + enumerable: true,
2382 + value: reason,
2383 + configurable: true,
2384 + writable: true
2385 + });
2386 + }
2387 + ;
2388 + abortController.abort(reason);
2389 +};
2390 +// src/listenerMiddleware/exceptions.ts
2391 +var task = "task";
2392 +var listener = "listener";
2393 +var completed = "completed";
2394 +var cancelled = "cancelled";
2395 +var taskCancelled = "task-" + cancelled;
2396 +var taskCompleted = "task-" + completed;
2397 +var listenerCancelled = listener + "-" + cancelled;
2398 +var listenerCompleted = listener + "-" + completed;
2399 +var TaskAbortError = /** @class */ (function () {
2400 + function TaskAbortError(code) {
2401 + this.code = code;
2402 + this.name = "TaskAbortError";
2403 + this.message = task + " " + cancelled + " (reason: " + code + ")";
2404 + }
2405 + return TaskAbortError;
2406 +}());
2407 +// src/listenerMiddleware/task.ts
2408 +var validateActive = function (signal) {
2409 + if (signal.aborted) {
2410 + throw new TaskAbortError(signal.reason);
2411 + }
2412 +};
2413 +var promisifyAbortSignal = function (signal) {
2414 + return catchRejection(new Promise(function (_, reject) {
2415 + var notifyRejection = function () { return reject(new TaskAbortError(signal.reason)); };
2416 + if (signal.aborted) {
2417 + notifyRejection();
2418 + }
2419 + else {
2420 + addAbortSignalListener(signal, notifyRejection);
2421 + }
2422 + }));
2423 +};
2424 +var runTask = function (task2, cleanUp) { return __async(void 0, null, function () {
2425 + var value, error_1;
2426 + return __generator(this, function (_c) {
2427 + switch (_c.label) {
2428 + case 0:
2429 + _c.trys.push([0, 3, 4, 5]);
2430 + return [4 /*yield*/, Promise.resolve()];
2431 + case 1:
2432 + _c.sent();
2433 + return [4 /*yield*/, task2()];
2434 + case 2:
2435 + value = _c.sent();
2436 + return [2 /*return*/, {
2437 + status: "ok",
2438 + value: value
2439 + }];
2440 + case 3:
2441 + error_1 = _c.sent();
2442 + return [2 /*return*/, {
2443 + status: error_1 instanceof TaskAbortError ? "cancelled" : "rejected",
2444 + error: error_1
2445 + }];
2446 + case 4:
2447 + cleanUp == null ? void 0 : cleanUp();
2448 + return [7 /*endfinally*/];
2449 + case 5: return [2 /*return*/];
2450 + }
2451 + });
2452 +}); };
2453 +var createPause = function (signal) {
2454 + return function (promise) {
2455 + return catchRejection(Promise.race([promisifyAbortSignal(signal), promise]).then(function (output) {
2456 + validateActive(signal);
2457 + return output;
2458 + }));
2459 + };
2460 +};
2461 +var createDelay = function (signal) {
2462 + var pause = createPause(signal);
2463 + return function (timeoutMs) {
2464 + return pause(new Promise(function (resolve) { return setTimeout(resolve, timeoutMs); }));
2465 + };
2466 +};
2467 +// src/listenerMiddleware/index.ts
2468 +var assign = Object.assign;
2469 +var INTERNAL_NIL_TOKEN = {};
2470 +var alm = "listenerMiddleware";
2471 +var createFork = function (parentAbortSignal) {
2472 + var linkControllers = function (controller) { return addAbortSignalListener(parentAbortSignal, function () { return abortControllerWithReason(controller, parentAbortSignal.reason); }); };
2473 + return function (taskExecutor) {
2474 + assertFunction(taskExecutor, "taskExecutor");
2475 + var childAbortController = new AbortController();
2476 + linkControllers(childAbortController);
2477 + var result = runTask(function () { return __async(void 0, null, function () {
2478 + var result2;
2479 + return __generator(this, function (_c) {
2480 + switch (_c.label) {
2481 + case 0:
2482 + validateActive(parentAbortSignal);
2483 + validateActive(childAbortController.signal);
2484 + return [4 /*yield*/, taskExecutor({
2485 + pause: createPause(childAbortController.signal),
2486 + delay: createDelay(childAbortController.signal),
2487 + signal: childAbortController.signal
2488 + })];
2489 + case 1:
2490 + result2 = _c.sent();
2491 + validateActive(childAbortController.signal);
2492 + return [2 /*return*/, result2];
2493 + }
2494 + });
2495 + }); }, function () { return abortControllerWithReason(childAbortController, taskCompleted); });
2496 + return {
2497 + result: createPause(parentAbortSignal)(result),
2498 + cancel: function () {
2499 + abortControllerWithReason(childAbortController, taskCancelled);
2500 + }
2501 + };
2502 + };
2503 +};
2504 +var createTakePattern = function (startListening, signal) {
2505 + var take = function (predicate, timeout) { return __async(void 0, null, function () {
2506 + var unsubscribe, tuplePromise, promises, output;
2507 + return __generator(this, function (_c) {
2508 + switch (_c.label) {
2509 + case 0:
2510 + validateActive(signal);
2511 + unsubscribe = function () {
2512 + };
2513 + tuplePromise = new Promise(function (resolve) {
2514 + unsubscribe = startListening({
2515 + predicate: predicate,
2516 + effect: function (action, listenerApi) {
2517 + listenerApi.unsubscribe();
2518 + resolve([
2519 + action,
2520 + listenerApi.getState(),
2521 + listenerApi.getOriginalState()
2522 + ]);
2523 + }
2524 + });
2525 + });
2526 + promises = [
2527 + promisifyAbortSignal(signal),
2528 + tuplePromise
2529 + ];
2530 + if (timeout != null) {
2531 + promises.push(new Promise(function (resolve) { return setTimeout(resolve, timeout, null); }));
2532 + }
2533 + _c.label = 1;
2534 + case 1:
2535 + _c.trys.push([1, , 3, 4]);
2536 + return [4 /*yield*/, Promise.race(promises)];
2537 + case 2:
2538 + output = _c.sent();
2539 + validateActive(signal);
2540 + return [2 /*return*/, output];
2541 + case 3:
2542 + unsubscribe();
2543 + return [7 /*endfinally*/];
2544 + case 4: return [2 /*return*/];
2545 + }
2546 + });
2547 + }); };
2548 + return function (predicate, timeout) { return catchRejection(take(predicate, timeout)); };
2549 +};
2550 +var getListenerEntryPropsFrom = function (options) {
2551 + var type = options.type, actionCreator = options.actionCreator, matcher = options.matcher, predicate = options.predicate, effect = options.effect;
2552 + if (type) {
2553 + predicate = createAction(type).match;
2554 + }
2555 + else if (actionCreator) {
2556 + type = actionCreator.type;
2557 + predicate = actionCreator.match;
2558 + }
2559 + else if (matcher) {
2560 + predicate = matcher;
2561 + }
2562 + else if (predicate) {
2563 + }
2564 + else {
2565 + throw new Error("Creating or removing a listener requires one of the known fields for matching an action");
2566 + }
2567 + assertFunction(effect, "options.listener");
2568 + return { predicate: predicate, type: type, effect: effect };
2569 +};
2570 +var createListenerEntry = function (options) {
2571 + var _c = getListenerEntryPropsFrom(options), type = _c.type, predicate = _c.predicate, effect = _c.effect;
2572 + var id = nanoid();
2573 + var entry = {
2574 + id: id,
2575 + effect: effect,
2576 + type: type,
2577 + predicate: predicate,
2578 + pending: new Set(),
2579 + unsubscribe: function () {
2580 + throw new Error("Unsubscribe not initialized");
2581 + }
2582 + };
2583 + return entry;
2584 +};
2585 +var createClearListenerMiddleware = function (listenerMap) {
2586 + return function () {
2587 + listenerMap.forEach(cancelActiveListeners);
2588 + listenerMap.clear();
2589 + };
2590 +};
2591 +var safelyNotifyError = function (errorHandler, errorToNotify, errorInfo) {
2592 + try {
2593 + errorHandler(errorToNotify, errorInfo);
2594 + }
2595 + catch (errorHandlerError) {
2596 + setTimeout(function () {
2597 + throw errorHandlerError;
2598 + }, 0);
2599 + }
2600 +};
2601 +var addListener = createAction(alm + "/add");
2602 +var clearAllListeners = createAction(alm + "/removeAll");
2603 +var removeListener = createAction(alm + "/remove");
2604 +var defaultErrorHandler = function () {
2605 + var args = [];
2606 + for (var _i = 0; _i < arguments.length; _i++) {
2607 + args[_i] = arguments[_i];
2608 + }
2609 + console.error.apply(console, __spreadArray([alm + "/error"], args));
2610 +};
2611 +var cancelActiveListeners = function (entry) {
2612 + entry.pending.forEach(function (controller) {
2613 + abortControllerWithReason(controller, listenerCancelled);
2614 + });
2615 +};
2616 +function createListenerMiddleware(middlewareOptions) {
2617 + var _this = this;
2618 + if (middlewareOptions === void 0) { middlewareOptions = {}; }
2619 + var listenerMap = new Map();
2620 + var extra = middlewareOptions.extra, _c = middlewareOptions.onError, onError = _c === void 0 ? defaultErrorHandler : _c;
2621 + assertFunction(onError, "onError");
2622 + var insertEntry = function (entry) {
2623 + entry.unsubscribe = function () { return listenerMap.delete(entry.id); };
2624 + listenerMap.set(entry.id, entry);
2625 + return function (cancelOptions) {
2626 + entry.unsubscribe();
2627 + if (cancelOptions == null ? void 0 : cancelOptions.cancelActive) {
2628 + cancelActiveListeners(entry);
2629 + }
2630 + };
2631 + };
2632 + var findListenerEntry = function (comparator) {
2633 + for (var _i = 0, _c = Array.from(listenerMap.values()); _i < _c.length; _i++) {
2634 + var entry = _c[_i];
2635 + if (comparator(entry)) {
2636 + return entry;
2637 + }
2638 + }
2639 + return void 0;
2640 + };
2641 + var startListening = function (options) {
2642 + var entry = findListenerEntry(function (existingEntry) { return existingEntry.effect === options.effect; });
2643 + if (!entry) {
2644 + entry = createListenerEntry(options);
2645 + }
2646 + return insertEntry(entry);
2647 + };
2648 + var stopListening = function (options) {
2649 + var _c = getListenerEntryPropsFrom(options), type = _c.type, effect = _c.effect, predicate = _c.predicate;
2650 + var entry = findListenerEntry(function (entry2) {
2651 + var matchPredicateOrType = typeof type === "string" ? entry2.type === type : entry2.predicate === predicate;
2652 + return matchPredicateOrType && entry2.effect === effect;
2653 + });
2654 + if (entry) {
2655 + entry.unsubscribe();
2656 + if (options.cancelActive) {
2657 + cancelActiveListeners(entry);
2658 + }
2659 + }
2660 + return !!entry;
2661 + };
2662 + var notifyListener = function (entry, action, api, getOriginalState) { return __async(_this, null, function () {
2663 + var internalTaskController, take, listenerError_1;
2664 + return __generator(this, function (_c) {
2665 + switch (_c.label) {
2666 + case 0:
2667 + internalTaskController = new AbortController();
2668 + take = createTakePattern(startListening, internalTaskController.signal);
2669 + _c.label = 1;
2670 + case 1:
2671 + _c.trys.push([1, 3, 4, 5]);
2672 + entry.pending.add(internalTaskController);
2673 + return [4 /*yield*/, Promise.resolve(entry.effect(action, assign({}, api, {
2674 + getOriginalState: getOriginalState,
2675 + condition: function (predicate, timeout) { return take(predicate, timeout).then(Boolean); },
2676 + take: take,
2677 + delay: createDelay(internalTaskController.signal),
2678 + pause: createPause(internalTaskController.signal),
2679 + extra: extra,
2680 + signal: internalTaskController.signal,
2681 + fork: createFork(internalTaskController.signal),
2682 + unsubscribe: entry.unsubscribe,
2683 + subscribe: function () {
2684 + listenerMap.set(entry.id, entry);
2685 + },
2686 + cancelActiveListeners: function () {
2687 + entry.pending.forEach(function (controller, _, set) {
2688 + if (controller !== internalTaskController) {
2689 + abortControllerWithReason(controller, listenerCancelled);
2690 + set.delete(controller);
2691 + }
2692 + });
2693 + }
2694 + })))];
2695 + case 2:
2696 + _c.sent();
2697 + return [3 /*break*/, 5];
2698 + case 3:
2699 + listenerError_1 = _c.sent();
2700 + if (!(listenerError_1 instanceof TaskAbortError)) {
2701 + safelyNotifyError(onError, listenerError_1, {
2702 + raisedBy: "effect"
2703 + });
2704 + }
2705 + return [3 /*break*/, 5];
2706 + case 4:
2707 + abortControllerWithReason(internalTaskController, listenerCompleted);
2708 + entry.pending.delete(internalTaskController);
2709 + return [7 /*endfinally*/];
2710 + case 5: return [2 /*return*/];
2711 + }
2712 + });
2713 + }); };
2714 + var clearListenerMiddleware = createClearListenerMiddleware(listenerMap);
2715 + var middleware = function (api) { return function (next) { return function (action) {
2716 + if (addListener.match(action)) {
2717 + return startListening(action.payload);
2718 + }
2719 + if (clearAllListeners.match(action)) {
2720 + clearListenerMiddleware();
2721 + return;
2722 + }
2723 + if (removeListener.match(action)) {
2724 + return stopListening(action.payload);
2725 + }
2726 + var originalState = api.getState();
2727 + var getOriginalState = function () {
2728 + if (originalState === INTERNAL_NIL_TOKEN) {
2729 + throw new Error(alm + ": getOriginalState can only be called synchronously");
2730 + }
2731 + return originalState;
2732 + };
2733 + var result;
2734 + try {
2735 + result = next(action);
2736 + if (listenerMap.size > 0) {
2737 + var currentState = api.getState();
2738 + var listenerEntries = Array.from(listenerMap.values());
2739 + for (var _i = 0, listenerEntries_1 = listenerEntries; _i < listenerEntries_1.length; _i++) {
2740 + var entry = listenerEntries_1[_i];
2741 + var runListener = false;
2742 + try {
2743 + runListener = entry.predicate(action, currentState, originalState);
2744 + }
2745 + catch (predicateError) {
2746 + runListener = false;
2747 + safelyNotifyError(onError, predicateError, {
2748 + raisedBy: "predicate"
2749 + });
2750 + }
2751 + if (!runListener) {
2752 + continue;
2753 + }
2754 + notifyListener(entry, action, api, getOriginalState);
2755 + }
2756 + }
2757 + }
2758 + finally {
2759 + originalState = INTERNAL_NIL_TOKEN;
2760 + }
2761 + return result;
2762 + }; }; };
2763 + return {
2764 + middleware: middleware,
2765 + startListening: startListening,
2766 + stopListening: stopListening,
2767 + clearListeners: clearListenerMiddleware
2768 + };
2769 +}
2770 +// src/index.ts
2771 +(0,immer__WEBPACK_IMPORTED_MODULE_2__.enableES5)();
2772 +
2773 +//# sourceMappingURL=redux-toolkit.esm.js.map
2774 +
2775 +/***/ }),
2776 +
242 2777 /***/ "../assets/dev/js/editor/utils/is-instanceof.js":
243 2778 /*!******************************************************!*\
244 2779 !*** ../assets/dev/js/editor/utils/is-instanceof.js ***!
245 2780 \******************************************************/
@@ -251,11 +2786,15 @@
251 2786 Object.defineProperty(exports, "__esModule", ({
252 2787 value: true
253 2788 }));
254 2789 exports["default"] = void 0;
255 -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; } } }; }
256 -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; } }
257 -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; }
2790 +
2791 +function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, 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 normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
2792 +
2793 +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
2794 +
2795 +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
2796 +
258 2797 /**
259 2798 * Some FileAPI objects such as FileList, DataTransferItem and DataTransferItemList has inconsistency with the retrieved
260 2799 * object (from events, etc.) and the actual JavaScript object so a regular instanceof doesn't work. This function can
261 2800 * check whether it's instanceof by using the objects constructor and prototype names.
@@ -263,16 +2802,19 @@
263 2802 * @param object
264 2803 * @param constructors
265 2804 * @return {boolean}
266 2805 */
267 -var _default = exports["default"] = function _default(object, constructors) {
2806 +var _default = function _default(object, constructors) {
268 2807 constructors = Array.isArray(constructors) ? constructors : [constructors];
2808 +
269 2809 var _iterator = _createForOfIteratorHelper(constructors),
270 - _step;
2810 + _step;
2811 +
271 2812 try {
272 2813 for (_iterator.s(); !(_step = _iterator.n()).done;) {
273 - var constructor = _step.value;
274 - if (object.constructor.name === constructor.prototype[Symbol.toStringTag]) {
2814 + var _constructor = _step.value;
2815 +
2816 + if (object.constructor.name === _constructor.prototype[Symbol.toStringTag]) {
275 2817 return true;
276 2818 }
277 2819 }
278 2820 } catch (err) {
@@ -279,11 +2821,14 @@
279 2821 _iterator.e(err);
280 2822 } finally {
281 2823 _iterator.f();
282 2824 }
2825 +
283 2826 return false;
284 2827 };
285 2828
2829 +exports["default"] = _default;
2830 +
286 2831 /***/ }),
287 2832
288 2833 /***/ "../assets/dev/js/modules/imports/args-object.js":
289 2834 /*!*******************************************************!*\
@@ -294,23 +2839,39 @@
294 2839 "use strict";
295 2840
296 2841
297 2842 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
2843 +
298 2844 Object.defineProperty(exports, "__esModule", ({
299 2845 value: true
300 2846 }));
301 2847 exports["default"] = void 0;
2848 +
302 2849 var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"));
2850 +
303 2851 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
2852 +
304 2853 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
2854 +
2855 +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
2856 +
305 2857 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
2858 +
306 2859 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
307 -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
2860 +
308 2861 var _instanceType = _interopRequireDefault(__webpack_require__(/*! ./instance-type */ "../assets/dev/js/modules/imports/instance-type.js"));
2862 +
309 2863 var _isInstanceof = _interopRequireDefault(__webpack_require__(/*! ../../editor/utils/is-instanceof */ "../assets/dev/js/editor/utils/is-instanceof.js"));
310 -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)); }
311 -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
312 -var ArgsObject = exports["default"] = /*#__PURE__*/function (_InstanceType) {
2864 +
2865 +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
2866 +
2867 +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
2868 +
2869 +var ArgsObject = /*#__PURE__*/function (_InstanceType) {
2870 + (0, _inherits2.default)(ArgsObject, _InstanceType);
2871 +
2872 + var _super = _createSuper(ArgsObject);
2873 +
313 2874 /**
314 2875 * Function constructor().
315 2876 *
316 2877 * Create ArgsObject.
@@ -318,14 +2879,14 @@
318 2879 * @param {{}} args
319 2880 */
320 2881 function ArgsObject(args) {
321 2882 var _this;
2883 +
322 2884 (0, _classCallCheck2.default)(this, ArgsObject);
323 - _this = _callSuper(this, ArgsObject);
2885 + _this = _super.call(this);
324 2886 _this.args = args;
325 2887 return _this;
326 2888 }
327 -
328 2889 /**
329 2890 * Function requireArgument().
330 2891 *
331 2892 * Validate property in args.
@@ -333,19 +2894,21 @@
333 2894 * @param {string} property
334 2895 * @param {{}} args
335 2896 *
336 2897 * @throws {Error}
2898 + *
337 2899 */
338 - (0, _inherits2.default)(ArgsObject, _InstanceType);
339 - return (0, _createClass2.default)(ArgsObject, [{
2900 +
2901 +
2902 + (0, _createClass2.default)(ArgsObject, [{
340 2903 key: "requireArgument",
341 2904 value: function requireArgument(property) {
342 2905 var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.args;
343 - if (!Object.prototype.hasOwnProperty.call(args, property)) {
2906 +
2907 + if (!args.hasOwnProperty(property)) {
344 2908 throw Error("".concat(property, " is required."));
345 2909 }
346 2910 }
347 -
348 2911 /**
349 2912 * Function requireArgumentType().
350 2913 *
351 2914 * Validate property in args using `type === typeof(args.whatever)`.
@@ -354,19 +2917,21 @@
354 2917 * @param {string} type
355 2918 * @param {{}} args
356 2919 *
357 2920 * @throws {Error}
2921 + *
358 2922 */
2923 +
359 2924 }, {
360 2925 key: "requireArgumentType",
361 2926 value: function requireArgumentType(property, type) {
362 2927 var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.args;
363 2928 this.requireArgument(property, args);
2929 +
364 2930 if ((0, _typeof2.default)(args[property]) !== type) {
365 2931 throw Error("".concat(property, " invalid type: ").concat(type, "."));
366 2932 }
367 2933 }
368 -
369 2934 /**
370 2935 * Function requireArgumentInstance().
371 2936 *
372 2937 * Validate property in args using `args.whatever instanceof instance`.
@@ -375,19 +2940,21 @@
375 2940 * @param {*} instance
376 2941 * @param {{}} args
377 2942 *
378 2943 * @throws {Error}
2944 + *
379 2945 */
2946 +
380 2947 }, {
381 2948 key: "requireArgumentInstance",
382 2949 value: function requireArgumentInstance(property, instance) {
383 2950 var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.args;
384 2951 this.requireArgument(property, args);
2952 +
385 2953 if (!(args[property] instanceof instance) && !(0, _isInstanceof.default)(args[property], instance)) {
386 2954 throw Error("".concat(property, " invalid instance."));
387 2955 }
388 2956 }
389 -
390 2957 /**
391 2958 * Function requireArgumentConstructor().
392 2959 *
393 2960 * Validate property in args using `type === args.whatever.constructor`.
@@ -396,17 +2963,18 @@
396 2963 * @param {*} type
397 2964 * @param {{}} args
398 2965 *
399 2966 * @throws {Error}
2967 + *
400 2968 */
2969 +
401 2970 }, {
402 2971 key: "requireArgumentConstructor",
403 2972 value: function requireArgumentConstructor(property, type) {
404 2973 var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.args;
405 - this.requireArgument(property, args);
2974 + this.requireArgument(property, args); // Note: Converting the constructor to string in order to avoid equation issues
2975 + // due to different memory addresses between iframes (window.Object !== window.top.Object).
406 2976
407 - // Note: Converting the constructor to string in order to avoid equation issues
408 - // due to different memory addresses between iframes (window.Object !== window.top.Object).
409 2977 if (args[property].constructor.toString() !== type.prototype.constructor.toString()) {
410 2978 throw Error("".concat(property, " invalid constructor type."));
411 2979 }
412 2980 }
@@ -415,10 +2983,13 @@
415 2983 value: function getInstanceType() {
416 2984 return 'ArgsObject';
417 2985 }
418 2986 }]);
2987 + return ArgsObject;
419 2988 }(_instanceType.default);
420 2989
2990 +exports["default"] = ArgsObject;
2991 +
421 2992 /***/ }),
422 2993
423 2994 /***/ "../assets/dev/js/modules/imports/instance-type.js":
424 2995 /*!*********************************************************!*\
@@ -429,34 +3000,43 @@
429 3000 "use strict";
430 3001
431 3002
432 3003 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
3004 +
433 3005 Object.defineProperty(exports, "__esModule", ({
434 3006 value: true
435 3007 }));
436 3008 exports["default"] = void 0;
3009 +
437 3010 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
3011 +
438 3012 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
3013 +
3014 +var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js"));
3015 +
439 3016 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
440 -var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js"));
441 -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; }
442 -var InstanceType = exports["default"] = /*#__PURE__*/function () {
3017 +
3018 +var InstanceType = /*#__PURE__*/function (_Symbol$hasInstance) {
443 3019 function InstanceType() {
444 3020 var _this = this;
3021 +
445 3022 (0, _classCallCheck2.default)(this, InstanceType);
446 3023 // Since anonymous classes sometimes do not get validated by babel, do it manually.
447 3024 var target = this instanceof InstanceType ? this.constructor : void 0;
448 3025 var prototypes = [];
3026 +
449 3027 while (target.__proto__ && target.__proto__.name) {
450 3028 prototypes.push(target.__proto__);
451 3029 target = target.__proto__;
452 3030 }
3031 +
453 3032 prototypes.reverse().forEach(function (proto) {
454 3033 return _this instanceof proto;
455 3034 });
456 3035 }
457 - return (0, _createClass2.default)(InstanceType, null, [{
458 - key: Symbol.hasInstance,
3036 +
3037 + (0, _createClass2.default)(InstanceType, null, [{
3038 + key: _Symbol$hasInstance,
459 3039 value: function value(target) {
460 3040 /**
461 3041 * This is function extending being called each time JS uses instanceOf, since babel use it each time it create new class
462 3042 * its give's opportunity to mange capabilities of instanceOf operator.
@@ -461,34 +3041,39 @@
461 3041 * This is function extending being called each time JS uses instanceOf, since babel use it each time it create new class
462 3042 * its give's opportunity to mange capabilities of instanceOf operator.
463 3043 * saving current class each time will give option later to handle instanceOf manually.
464 3044 */
465 - var result = _superPropGet(InstanceType, Symbol.hasInstance, this, 2)([target]);
3045 + var result = (0, _get2.default)((0, _getPrototypeOf2.default)(InstanceType), Symbol.hasInstance, this).call(this, target); // Act normal when validate a class, which does not have instance type.
466 3046
467 - // Act normal when validate a class, which does not have instance type.
468 3047 if (target && !target.constructor.getInstanceType) {
469 3048 return result;
470 3049 }
3050 +
471 3051 if (target) {
472 3052 if (!target.instanceTypes) {
473 3053 target.instanceTypes = [];
474 3054 }
3055 +
475 3056 if (!result) {
476 3057 if (this.getInstanceType() === target.constructor.getInstanceType()) {
477 3058 result = true;
478 3059 }
479 3060 }
3061 +
480 3062 if (result) {
481 3063 var name = this.getInstanceType === InstanceType.getInstanceType ? 'BaseInstanceType' : this.getInstanceType();
3064 +
482 3065 if (-1 === target.instanceTypes.indexOf(name)) {
483 3066 target.instanceTypes.push(name);
484 3067 }
485 3068 }
486 3069 }
3070 +
487 3071 if (!result && target) {
488 3072 // Check if the given 'target', is instance of known types.
489 3073 result = target.instanceTypes && Array.isArray(target.instanceTypes) && -1 !== target.instanceTypes.indexOf(this.getInstanceType());
490 3074 }
3075 +
491 3076 return result;
492 3077 }
493 3078 }, {
494 3079 key: "getInstanceType",
@@ -495,10 +3080,13 @@
495 3080 value: function getInstanceType() {
496 3081 elementorModules.ForceMethodImplementation();
497 3082 }
498 3083 }]);
499 -}();
3084 + return InstanceType;
3085 +}(Symbol.hasInstance);
500 3086
3087 +exports["default"] = InstanceType;
3088 +
501 3089 /***/ }),
502 3090
503 3091 /***/ "../assets/dev/js/modules/imports/module.js":
504 3092 /*!**************************************************!*\
@@ -509,91 +3097,117 @@
509 3097 "use strict";
510 3098
511 3099
512 3100 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
3101 +
513 3102 var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"));
3103 +
514 3104 var Module = function Module() {
515 3105 var $ = jQuery,
516 - instanceParams = arguments,
517 - self = this,
518 - events = {};
3106 + instanceParams = arguments,
3107 + self = this,
3108 + events = {};
519 3109 var settings;
3110 +
520 3111 var ensureClosureMethods = function ensureClosureMethods() {
521 3112 $.each(self, function (methodName) {
522 3113 var oldMethod = self[methodName];
3114 +
523 3115 if ('function' !== typeof oldMethod) {
524 3116 return;
525 3117 }
3118 +
526 3119 self[methodName] = function () {
527 3120 return oldMethod.apply(self, arguments);
528 3121 };
529 3122 });
530 3123 };
3124 +
531 3125 var initSettings = function initSettings() {
532 3126 settings = self.getDefaultSettings();
533 3127 var instanceSettings = instanceParams[0];
3128 +
534 3129 if (instanceSettings) {
535 3130 $.extend(true, settings, instanceSettings);
536 3131 }
537 3132 };
3133 +
538 3134 var init = function init() {
539 3135 self.__construct.apply(self, instanceParams);
3136 +
540 3137 ensureClosureMethods();
541 3138 initSettings();
542 3139 self.trigger('init');
543 3140 };
3141 +
544 3142 this.getItems = function (items, itemKey) {
545 3143 if (itemKey) {
546 3144 var keyStack = itemKey.split('.'),
547 - currentKey = keyStack.splice(0, 1);
3145 + currentKey = keyStack.splice(0, 1);
3146 +
548 3147 if (!keyStack.length) {
549 3148 return items[currentKey];
550 3149 }
3150 +
551 3151 if (!items[currentKey]) {
552 3152 return;
553 3153 }
3154 +
554 3155 return this.getItems(items[currentKey], keyStack.join('.'));
555 3156 }
3157 +
556 3158 return items;
557 3159 };
3160 +
558 3161 this.getSettings = function (setting) {
559 3162 return this.getItems(settings, setting);
560 3163 };
3164 +
561 3165 this.setSettings = function (settingKey, value, settingsContainer) {
562 3166 if (!settingsContainer) {
563 3167 settingsContainer = settings;
564 3168 }
3169 +
565 3170 if ('object' === (0, _typeof2.default)(settingKey)) {
566 3171 $.extend(settingsContainer, settingKey);
567 3172 return self;
568 3173 }
3174 +
569 3175 var keyStack = settingKey.split('.'),
570 - currentKey = keyStack.splice(0, 1);
3176 + currentKey = keyStack.splice(0, 1);
3177 +
571 3178 if (!keyStack.length) {
572 3179 settingsContainer[currentKey] = value;
573 3180 return self;
574 3181 }
3182 +
575 3183 if (!settingsContainer[currentKey]) {
576 3184 settingsContainer[currentKey] = {};
577 3185 }
3186 +
578 3187 return self.setSettings(keyStack.join('.'), value, settingsContainer[currentKey]);
579 3188 };
3189 +
580 3190 this.getErrorMessage = function (type, functionName) {
581 3191 var message;
3192 +
582 3193 switch (type) {
583 3194 case 'forceMethodImplementation':
584 3195 message = "The method '".concat(functionName, "' must to be implemented in the inheritor child.");
585 3196 break;
3197 +
586 3198 default:
587 3199 message = 'An error occurs';
588 3200 }
3201 +
589 3202 return message;
590 - };
3203 + }; // TODO: This function should be deleted ?.
591 3204
592 - // TODO: This function should be deleted ?.
3205 +
593 3206 this.forceMethodImplementation = function (functionName) {
594 3207 throw new Error(this.getErrorMessage('forceMethodImplementation', functionName));
595 3208 };
3209 +
596 3210 this.on = function (eventName, callback) {
597 3211 if ('object' === (0, _typeof2.default)(eventName)) {
598 3212 $.each(eventName, function (singleEventName) {
599 3213 self.on(singleEventName, this);
@@ -599,66 +3213,84 @@
599 3213 self.on(singleEventName, this);
600 3214 });
601 3215 return self;
602 3216 }
3217 +
603 3218 var eventNames = eventName.split(' ');
604 3219 eventNames.forEach(function (singleEventName) {
605 3220 if (!events[singleEventName]) {
606 3221 events[singleEventName] = [];
607 3222 }
3223 +
608 3224 events[singleEventName].push(callback);
609 3225 });
610 3226 return self;
611 3227 };
3228 +
612 3229 this.off = function (eventName, callback) {
613 3230 if (!events[eventName]) {
614 3231 return self;
615 3232 }
3233 +
616 3234 if (!callback) {
617 3235 delete events[eventName];
618 3236 return self;
619 3237 }
3238 +
620 3239 var callbackIndex = events[eventName].indexOf(callback);
3240 +
621 3241 if (-1 !== callbackIndex) {
622 - delete events[eventName][callbackIndex];
3242 + delete events[eventName][callbackIndex]; // Reset array index (for next off on same event).
623 3243
624 - // Reset array index (for next off on same event).
625 3244 events[eventName] = events[eventName].filter(function (val) {
626 3245 return val;
627 3246 });
628 3247 }
3248 +
629 3249 return self;
630 3250 };
3251 +
631 3252 this.trigger = function (eventName) {
632 3253 var methodName = 'on' + eventName[0].toUpperCase() + eventName.slice(1),
633 - params = Array.prototype.slice.call(arguments, 1);
3254 + params = Array.prototype.slice.call(arguments, 1);
3255 +
634 3256 if (self[methodName]) {
635 3257 self[methodName].apply(self, params);
636 3258 }
3259 +
637 3260 var callbacks = events[eventName];
3261 +
638 3262 if (!callbacks) {
639 3263 return self;
640 3264 }
3265 +
641 3266 $.each(callbacks, function (index, callback) {
642 3267 callback.apply(self, params);
643 3268 });
644 3269 return self;
645 3270 };
3271 +
646 3272 init();
647 3273 };
3274 +
648 3275 Module.prototype.__construct = function () {};
3276 +
649 3277 Module.prototype.getDefaultSettings = function () {
650 3278 return {};
651 3279 };
3280 +
652 3281 Module.prototype.getConstructorID = function () {
653 3282 return this.constructor.name;
654 3283 };
3284 +
655 3285 Module.extend = function (properties) {
656 3286 var $ = jQuery,
657 - parent = this;
3287 + parent = this;
3288 +
658 3289 var child = function child() {
659 3290 return parent.apply(this, arguments);
660 3291 };
3292 +
661 3293 $.extend(child, parent);
662 3294 child.prototype = Object.create($.extend({}, parent.prototype, properties));
663 3295 child.prototype.constructor = child;
664 3296 child.__super__ = parent.prototype;
@@ -663,16 +3295,17 @@
663 3295 child.prototype.constructor = child;
664 3296 child.__super__ = parent.prototype;
665 3297 return child;
666 3298 };
3299 +
667 3300 module.exports = Module;
668 3301
669 3302 /***/ }),
670 3303
671 -/***/ "../modules/web-cli/assets/js/modules/command-base.js":
672 -/*!************************************************************!*\
673 - !*** ../modules/web-cli/assets/js/modules/command-base.js ***!
674 - \************************************************************/
3304 +/***/ "../core/app/assets/js/loader/commands/close.js":
3305 +/*!******************************************************!*\
3306 + !*** ../core/app/assets/js/loader/commands/close.js ***!
3307 + \******************************************************/
675 3308 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
676 3309
677 3310 "use strict";
678 3311
@@ -677,119 +3310,232 @@
677 3310 "use strict";
678 3311
679 3312
680 3313 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
3314 +
681 3315 Object.defineProperty(exports, "__esModule", ({
682 3316 value: true
683 3317 }));
684 -exports["default"] = void 0;
3318 +exports["default"] = exports.Close = void 0;
3319 +
685 3320 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
3321 +
686 3322 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
3323 +
3324 +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
3325 +
687 3326 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
3327 +
688 3328 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
3329 +
3330 +var _commandBase = _interopRequireDefault(__webpack_require__(/*! elementor-api/modules/command-base */ "../modules/web-cli/assets/js/modules/command-base.js"));
3331 +
3332 +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
3333 +
3334 +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
3335 +
3336 +var Close = /*#__PURE__*/function (_CommandBase) {
3337 + (0, _inherits2.default)(Close, _CommandBase);
3338 +
3339 + var _super = _createSuper(Close);
3340 +
3341 + function Close() {
3342 + (0, _classCallCheck2.default)(this, Close);
3343 + return _super.apply(this, arguments);
3344 + }
3345 +
3346 + (0, _createClass2.default)(Close, [{
3347 + key: "apply",
3348 + value: function apply() {
3349 + if (!this.component.close()) {
3350 + return false;
3351 + }
3352 +
3353 + this.component.iframe.remove();
3354 + this.component.iframe = null;
3355 + return true;
3356 + }
3357 + }]);
3358 + return Close;
3359 +}(_commandBase.default);
3360 +
3361 +exports.Close = Close;
3362 +var _default = Close;
3363 +exports["default"] = _default;
3364 +
3365 +/***/ }),
3366 +
3367 +/***/ "../core/app/assets/js/loader/commands/index.js":
3368 +/*!******************************************************!*\
3369 + !*** ../core/app/assets/js/loader/commands/index.js ***!
3370 + \******************************************************/
3371 +/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
3372 +
3373 +"use strict";
3374 +
3375 +
3376 +Object.defineProperty(exports, "__esModule", ({
3377 + value: true
3378 +}));
3379 +Object.defineProperty(exports, "Close", ({
3380 + enumerable: true,
3381 + get: function get() {
3382 + return _close.Close;
3383 + }
3384 +}));
3385 +Object.defineProperty(exports, "Load", ({
3386 + enumerable: true,
3387 + get: function get() {
3388 + return _load.Load;
3389 + }
3390 +}));
3391 +Object.defineProperty(exports, "Open", ({
3392 + enumerable: true,
3393 + get: function get() {
3394 + return _open.Open;
3395 + }
3396 +}));
3397 +
3398 +var _close = __webpack_require__(/*! ./close */ "../core/app/assets/js/loader/commands/close.js");
3399 +
3400 +var _load = __webpack_require__(/*! ./load */ "../core/app/assets/js/loader/commands/load.js");
3401 +
3402 +var _open = __webpack_require__(/*! ./open */ "../core/app/assets/js/loader/commands/open.js");
3403 +
3404 +/***/ }),
3405 +
3406 +/***/ "../core/app/assets/js/loader/commands/load.js":
3407 +/*!*****************************************************!*\
3408 + !*** ../core/app/assets/js/loader/commands/load.js ***!
3409 + \*****************************************************/
3410 +/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
3411 +
3412 +"use strict";
3413 +
3414 +
3415 +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
3416 +
3417 +Object.defineProperty(exports, "__esModule", ({
3418 + value: true
3419 +}));
3420 +exports["default"] = exports.Load = void 0;
3421 +
3422 +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
3423 +
3424 +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
3425 +
689 3426 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
690 -var _commandInfra = _interopRequireDefault(__webpack_require__(/*! ./command-infra */ "../modules/web-cli/assets/js/modules/command-infra.js"));
691 -var _deprecation = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/deprecation */ "../modules/web-cli/assets/js/utils/deprecation.js"));
692 -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)); }
693 -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
694 -/**
695 - * @name $e.modules.CommandBase
696 - */
697 -var CommandBase = exports["default"] = /*#__PURE__*/function (_CommandInfra) {
698 - function CommandBase() {
699 - (0, _classCallCheck2.default)(this, CommandBase);
700 - return _callSuper(this, CommandBase, arguments);
3427 +
3428 +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
3429 +
3430 +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
3431 +
3432 +var _commandBase = _interopRequireDefault(__webpack_require__(/*! elementor-api/modules/command-base */ "../modules/web-cli/assets/js/modules/command-base.js"));
3433 +
3434 +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
3435 +
3436 +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
3437 +
3438 +var Load = /*#__PURE__*/function (_CommandBase) {
3439 + (0, _inherits2.default)(Load, _CommandBase);
3440 +
3441 + var _super = _createSuper(Load);
3442 +
3443 + function Load() {
3444 + (0, _classCallCheck2.default)(this, Load);
3445 + return _super.apply(this, arguments);
701 3446 }
702 - (0, _inherits2.default)(CommandBase, _CommandInfra);
703 - return (0, _createClass2.default)(CommandBase, [{
704 - key: "onBeforeRun",
705 - value: function onBeforeRun() {
706 - var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
707 - $e.hooks.runUIBefore(this.command, args);
708 - }
709 - }, {
710 - key: "onAfterRun",
711 - value: function onAfterRun() {
712 - var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
713 - var result = arguments.length > 1 ? arguments[1] : undefined;
714 - $e.hooks.runUIAfter(this.command, args, result);
715 - }
716 - }, {
717 - key: "onBeforeApply",
718 - value: function onBeforeApply() {
719 - var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
720 - $e.hooks.runDataDependency(this.command, args);
721 - }
722 - }, {
723 - key: "onAfterApply",
724 - value: function onAfterApply() {
725 - var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
726 - var result = arguments.length > 1 ? arguments[1] : undefined;
727 - return $e.hooks.runDataAfter(this.command, args, result);
728 - }
729 - }, {
730 - key: "onCatchApply",
731 - value: function onCatchApply(e) {
732 - this.runCatchHooks(e);
733 - }
734 3447
735 - /**
736 - * Run all the catch hooks.
737 - *
738 - * @param {Error} e
739 - */
740 - }, {
741 - key: "runCatchHooks",
742 - value: function runCatchHooks(e) {
743 - $e.hooks.runDataCatch(this.command, this.args, e);
744 - $e.hooks.runUICatch(this.command, this.args, e);
745 - }
3448 + (0, _createClass2.default)(Load, [{
3449 + key: "apply",
3450 + value: function apply(args) {
3451 + var component = this.component;
746 3452
747 - /**
748 - * TODO - Remove - Backwards compatibility.
749 - *
750 - * Function requireContainer().
751 - *
752 - * Validate `arg.container` & `arg.containers`.
753 - *
754 - * @param {{}} args
755 - * @deprecated since 3.7.0, extend `$e.modules.editor.CommandContainerBase` or `$e.modules.editor.CommandContainerInternalBase` instead.
756 - *
757 - * @throws {Error}
758 - */
759 - }, {
760 - key: "requireContainer",
761 - value: function requireContainer() {
762 - var _this = this;
763 - var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.args;
764 - _deprecation.default.deprecated('requireContainer()', '3.7.0', 'Extend `$e.modules.editor.CommandContainerBase` or `$e.modules.editor.CommandContainerInternalBase`');
765 - if (!args.container && !args.containers) {
766 - throw Error('container or containers are required.');
3453 + if (!component.iframe) {
3454 + component.iframe = document.createElement('iframe');
3455 + component.iframe.className = 'elementor-app-iframe';
3456 + component.iframe.style.cssText = '' + 'display: none;' + 'width: 100%;' + 'height: 100%;' + 'position: fixed;' + 'top: 0;' + 'left: 0;' + 'z-index: 99999; /* Over WP Admin Bar */' + 'background-color: rgba(0, 0, 0, 0.8);';
3457 + document.body.appendChild(component.iframe);
767 3458 }
768 - if (args.container && args.containers) {
769 - throw Error('container and containers cannot go together please select one of them.');
3459 +
3460 + if (args.url === component.iframe.src) {
3461 + return;
770 3462 }
771 - var containers = args.containers || [args.container];
772 - containers.forEach(function (container) {
773 - _this.requireArgumentInstance('container', elementorModules.editor.Container, {
774 - container: container
775 - });
776 - });
3463 +
3464 + component.iframe.src = args.url;
777 3465 }
778 - }], [{
779 - key: "getInstanceType",
780 - value: function getInstanceType() {
781 - return 'CommandBase';
3466 + }]);
3467 + return Load;
3468 +}(_commandBase.default);
3469 +
3470 +exports.Load = Load;
3471 +var _default = Load;
3472 +exports["default"] = _default;
3473 +
3474 +/***/ }),
3475 +
3476 +/***/ "../core/app/assets/js/loader/commands/open.js":
3477 +/*!*****************************************************!*\
3478 + !*** ../core/app/assets/js/loader/commands/open.js ***!
3479 + \*****************************************************/
3480 +/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
3481 +
3482 +"use strict";
3483 +
3484 +
3485 +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
3486 +
3487 +Object.defineProperty(exports, "__esModule", ({
3488 + value: true
3489 +}));
3490 +exports["default"] = exports.Open = void 0;
3491 +
3492 +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
3493 +
3494 +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
3495 +
3496 +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
3497 +
3498 +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
3499 +
3500 +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
3501 +
3502 +var _commandBase = _interopRequireDefault(__webpack_require__(/*! elementor-api/modules/command-base */ "../modules/web-cli/assets/js/modules/command-base.js"));
3503 +
3504 +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
3505 +
3506 +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
3507 +
3508 +var Open = /*#__PURE__*/function (_CommandBase) {
3509 + (0, _inherits2.default)(Open, _CommandBase);
3510 +
3511 + var _super = _createSuper(Open);
3512 +
3513 + function Open() {
3514 + (0, _classCallCheck2.default)(this, Open);
3515 + return _super.apply(this, arguments);
3516 + }
3517 +
3518 + (0, _createClass2.default)(Open, [{
3519 + key: "apply",
3520 + value: function apply(args) {
3521 + $e.route('app', args);
3522 + return true;
782 3523 }
783 3524 }]);
784 -}(_commandInfra.default);
3525 + return Open;
3526 +}(_commandBase.default);
785 3527
3528 +exports.Open = Open;
3529 +var _default = Open;
3530 +exports["default"] = _default;
3531 +
786 3532 /***/ }),
787 3533
788 -/***/ "../modules/web-cli/assets/js/modules/command-callback-base.js":
789 -/*!*********************************************************************!*\
790 - !*** ../modules/web-cli/assets/js/modules/command-callback-base.js ***!
791 - \*********************************************************************/
3534 +/***/ "../core/app/assets/js/loader/component.js":
3535 +/*!*************************************************!*\
3536 + !*** ../core/app/assets/js/loader/component.js ***!
3537 + \*************************************************/
792 3538 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
793 3539
794 3540 "use strict";
795 3541
@@ -794,62 +3540,97 @@
794 3540 "use strict";
795 3541
796 3542
797 3543 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
3544 +
3545 +var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js");
3546 +
798 3547 Object.defineProperty(exports, "__esModule", ({
799 3548 value: true
800 3549 }));
801 3550 exports["default"] = void 0;
3551 +
802 3552 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
3553 +
803 3554 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
3555 +
3556 +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
3557 +
804 3558 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
3559 +
805 3560 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
806 -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
807 -var _commandBase = _interopRequireDefault(__webpack_require__(/*! ./command-base */ "../modules/web-cli/assets/js/modules/command-base.js"));
808 -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)); }
809 -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
810 -/**
811 - * To support pure callbacks in the API(commands.js), to ensure they have registered with the proper context.
812 - */
813 -var CommandCallbackBase = exports["default"] = /*#__PURE__*/function (_CommandBase) {
814 - function CommandCallbackBase() {
815 - (0, _classCallCheck2.default)(this, CommandCallbackBase);
816 - return _callSuper(this, CommandCallbackBase, arguments);
3561 +
3562 +var _componentBase = _interopRequireDefault(__webpack_require__(/*! elementor-api/modules/component-base */ "../modules/web-cli/assets/js/modules/component-base.js"));
3563 +
3564 +var commands = _interopRequireWildcard(__webpack_require__(/*! ./commands/ */ "../core/app/assets/js/loader/commands/index.js"));
3565 +
3566 +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
3567 +
3568 +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
3569 +
3570 +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
3571 +
3572 +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
3573 +
3574 +var Component = /*#__PURE__*/function (_ComponentModalBase) {
3575 + (0, _inherits2.default)(Component, _ComponentModalBase);
3576 +
3577 + var _super = _createSuper(Component);
3578 +
3579 + function Component() {
3580 + (0, _classCallCheck2.default)(this, Component);
3581 + return _super.apply(this, arguments);
817 3582 }
818 - (0, _inherits2.default)(CommandCallbackBase, _CommandBase);
819 - return (0, _createClass2.default)(CommandCallbackBase, [{
820 - key: "apply",
821 - value: function apply() {
822 - var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
823 - return this.constructor.getCallback()(args);
3583 +
3584 + (0, _createClass2.default)(Component, [{
3585 + key: "getNamespace",
3586 + value: function getNamespace() {
3587 + return 'app';
824 3588 }
825 - }], [{
826 - key: "getInstanceType",
827 - value: function getInstanceType() {
828 - return 'CommandCallbackBase';
3589 + }, {
3590 + key: "defaultRoutes",
3591 + value: function defaultRoutes() {
3592 + var _this = this;
3593 +
3594 + return {
3595 + '': function _(args) {
3596 + args.url = args.url || elementorAppConfig.menu_url;
3597 + $e.run('app/load', args);
3598 + _this.iframe.style.display = '';
3599 + document.body.style.overflow = 'hidden';
3600 + }
3601 + };
829 3602 }
830 -
831 - /**
832 - * Get original callback of the command.
833 - *
834 - * Support pure callbacks ( Non command-base ).
835 - *
836 - * @return {()=>{}} Command Results.
837 - */
838 3603 }, {
839 - key: "getCallback",
840 - value: function getCallback() {
841 - return this.registerConfig.callback;
3604 + key: "defaultCommands",
3605 + value: function defaultCommands() {
3606 + return this.importCommands(commands);
842 3607 }
3608 + }, {
3609 + key: "defaultShortcuts",
3610 + value: function defaultShortcuts() {
3611 + return {
3612 + '': {
3613 + keys: 'ctrl+shift+e'
3614 + },
3615 + close: {
3616 + keys: 'esc',
3617 + scopes: [this.getNamespace()]
3618 + }
3619 + };
3620 + }
843 3621 }]);
844 -}(_commandBase.default);
3622 + return Component;
3623 +}(_componentBase.default);
845 3624
3625 +exports["default"] = Component;
3626 +
846 3627 /***/ }),
847 3628
848 -/***/ "../modules/web-cli/assets/js/modules/command-infra.js":
849 -/*!*************************************************************!*\
850 - !*** ../modules/web-cli/assets/js/modules/command-infra.js ***!
851 - \*************************************************************/
3629 +/***/ "../modules/web-cli/assets/js/modules/command-base.js":
3630 +/*!************************************************************!*\
3631 + !*** ../modules/web-cli/assets/js/modules/command-base.js ***!
3632 + \************************************************************/
852 3633 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
853 3634
854 3635 "use strict";
855 3636
@@ -854,77 +3635,126 @@
854 3635 "use strict";
855 3636
856 3637
857 3638 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
3639 +
858 3640 Object.defineProperty(exports, "__esModule", ({
859 3641 value: true
860 3642 }));
861 3643 exports["default"] = void 0;
3644 +
3645 +var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js"));
3646 +
3647 +var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"));
3648 +
3649 +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js"));
3650 +
862 3651 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
3652 +
863 3653 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
3654 +
3655 +var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js"));
3656 +
3657 +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
3658 +
864 3659 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
3660 +
865 3661 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
866 -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
3662 +
867 3663 var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
3664 +
868 3665 var _argsObject = _interopRequireDefault(__webpack_require__(/*! elementor-assets-js/modules/imports/args-object */ "../assets/dev/js/modules/imports/args-object.js"));
869 -var _deprecation = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/deprecation */ "../modules/web-cli/assets/js/utils/deprecation.js"));
870 -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)); }
871 -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
3666 +
3667 +var _helpers = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/helpers */ "../modules/web-cli/assets/js/utils/helpers.js"));
3668 +
3669 +var _forceMethodImplementation = _interopRequireDefault(__webpack_require__(/*! ../utils/force-method-implementation */ "../modules/web-cli/assets/js/utils/force-method-implementation.js"));
3670 +
3671 +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
3672 +
3673 +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
3674 +
872 3675 /**
873 3676 * @typedef {import('../modules/component-base')} ComponentBase
874 3677 */
875 -var CommandInfra = exports["default"] = /*#__PURE__*/function (_ArgsObject) {
3678 +
3679 +/**
3680 + * @typedef {{}} Component
3681 + */
3682 +var CommandBase = /*#__PURE__*/function (_ArgsObject) {
3683 + (0, _inherits2.default)(CommandBase, _ArgsObject);
3684 +
3685 + var _super = _createSuper(CommandBase);
3686 +
876 3687 /**
877 3688 * Function constructor().
878 3689 *
879 3690 * Create Commands Base.
880 3691 *
881 - * @param {{}} args
3692 + * @param {*} [args={}]
3693 + * @param {*} [commandsAPI={}]
882 3694 */
883 - function CommandInfra() {
3695 + function CommandBase(args) {
884 3696 var _this;
885 - var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
886 - (0, _classCallCheck2.default)(this, CommandInfra);
887 - _this = _callSuper(this, CommandInfra, [args]);
888 - if (!_this.constructor.registerConfig) {
889 - throw RangeError('Doing it wrong: Each command type should have `registerConfig`.');
890 - }
891 3697
892 - // Acknowledge self about which command it run.
893 - _this.command = _this.constructor.getCommand();
3698 + var commandsAPI = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : $e.commands;
3699 + (0, _classCallCheck2.default)(this, CommandBase);
3700 + _this = _super.call(this, args); // Acknowledge self about which command it run.
894 3701
895 - // Assign instance of current component.
896 - _this.component = _this.constructor.getComponent();
3702 + (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "component", void 0);
3703 + _this.currentCommand = commandsAPI.getCurrentLast(); // Assign instance of current component.
897 3704
898 - // Who ever need do something before without `super` the constructor can use `initialize` method.
899 - _this.initialize(args);
3705 + _this.component = commandsAPI.getComponent(_this.currentCommand); // Who ever need do something before without `super` the constructor can use `initialize` method.
900 3706
901 - // Refresh args, maybe the changed via `initialize`.
902 - args = _this.args;
3707 + _this.initialize(args); // Refresh args, maybe the changed via `initialize`.
903 3708
904 - // Validate args before run.
3709 +
3710 + args = _this.args; // Validate args before run.
3711 +
905 3712 _this.validateArgs(args);
3713 +
906 3714 return _this;
907 3715 }
908 -
909 3716 /**
910 - * Function initialize().
3717 + * Function requireContainer().
911 3718 *
912 - * Initialize command, called after construction.
3719 + * Validate `arg.container` & `arg.containers`.
913 3720 *
914 3721 * @param {{}} args
3722 + *
3723 + * @throws {Error}
915 3724 */
916 - (0, _inherits2.default)(CommandInfra, _ArgsObject);
917 - return (0, _createClass2.default)(CommandInfra, [{
918 - key: "currentCommand",
919 - get:
3725 +
3726 +
3727 + (0, _createClass2.default)(CommandBase, [{
3728 + key: "requireContainer",
3729 + value: function requireContainer() {
3730 + var _this2 = this;
3731 +
3732 + var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.args;
3733 +
3734 + if (!args.container && !args.containers) {
3735 + throw Error('container or containers are required.');
3736 + }
3737 +
3738 + if (args.container && args.containers) {
3739 + throw Error('container and containers cannot go together please select one of them.');
3740 + }
3741 +
3742 + var containers = args.containers || [args.container];
3743 + containers.forEach(function (container) {
3744 + _this2.requireArgumentInstance('container', elementorModules.editor.Container, {
3745 + container: container
3746 + });
3747 + });
3748 + }
920 3749 /**
921 - * @deprecated since 3.7.0, use `this.command` instead.
3750 + * Function initialize().
3751 + *
3752 + * Initialize command, called after construction.
3753 + *
3754 + * @param {*} [args={}]
922 3755 */
923 - function get() {
924 - _deprecation.default.deprecated('this.currentCommand', '3.7.0', 'this.command');
925 - return this.command;
926 - }
3756 +
927 3757 }, {
928 3758 key: "initialize",
929 3759 value: function initialize() {
930 3760 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -934,10 +3764,11 @@
934 3764 * Function validateArgs().
935 3765 *
936 3766 * Validate command arguments.
937 3767 *
938 - * @param {{}} args
3768 + * @param {*} [args={}]
939 3769 */
3770 +
940 3771 }, {
941 3772 key: "validateArgs",
942 3773 value: function validateArgs() {
943 3774 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -942,95 +3773,240 @@
942 3773 value: function validateArgs() {
943 3774 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
944 3775 } // eslint-disable-line no-unused-vars
945 3776
946 - // eslint-disable-next-line jsdoc/require-returns-check
947 3777 /**
3778 + * Function isDataChanged().
3779 + *
3780 + * Whether the editor needs to set change flag on/off.
3781 + *
3782 + * @return {boolean} Whether the editor needs to set change flag on/off.
3783 + */
3784 +
3785 + }, {
3786 + key: "isDataChanged",
3787 + value: function isDataChanged() {
3788 + return false;
3789 + } // eslint-disable-next-line jsdoc/require-returns-check
3790 +
3791 + /**
948 3792 * Function apply().
949 3793 *
950 3794 * Do the actual command.
951 3795 *
952 - * @param {{}} args
3796 + * @param {*} [args={}]
953 3797 *
954 - * @return {*} Command results.
3798 + * @return {*} callback
955 3799 */
3800 +
956 3801 }, {
957 3802 key: "apply",
958 3803 value: function apply() {
959 3804 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
960 3805 // eslint-disable-line no-unused-vars
961 - elementorModules.ForceMethodImplementation();
3806 + (0, _forceMethodImplementation.default)();
962 3807 }
963 -
964 3808 /**
965 3809 * Function run().
966 3810 *
967 3811 * Run command with history & hooks.
968 3812 *
969 - * @return {*} Command results.
3813 + * @return {*} run results
970 3814 */
3815 +
971 3816 }, {
972 3817 key: "run",
973 3818 value: function run() {
974 - return this.apply(this.args);
3819 + var result; // For UI Hooks.
3820 +
3821 + this.onBeforeRun(this.args);
3822 +
3823 + try {
3824 + // For Data hooks.
3825 + this.onBeforeApply(this.args);
3826 + result = this.apply(this.args);
3827 + } catch (e) {
3828 + this.onCatchApply(e); // Catch 'Hook-Break' that comes from hooks base.
3829 +
3830 + if (e instanceof $e.modules.HookBreak) {
3831 + // Bypass.
3832 + return false;
3833 + }
3834 + }
3835 +
3836 + return this.runAfter(result);
975 3837 }
3838 + }, {
3839 + key: "runAfter",
3840 + value: function runAfter(result) {
3841 + var _this3 = this;
976 3842
3843 + var onAfter = function onAfter(_result) {
3844 + // Run Data hooks.
3845 + _this3.onAfterApply(_this3.args, _result); // TODO: Create Command-Base for Command-Document and apply it on after.
3846 +
3847 +
3848 + if (_this3.isDataChanged()) {
3849 + $e.internal('document/save/set-is-modified', {
3850 + status: true
3851 + });
3852 + } // For UI hooks.
3853 +
3854 +
3855 + _this3.onAfterRun(_this3.args, _result);
3856 + },
3857 + asyncOnAfter = /*#__PURE__*/function () {
3858 + var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(_result) {
3859 + var results, promises;
3860 + return _regenerator.default.wrap(function _callee$(_context) {
3861 + while (1) {
3862 + switch (_context.prev = _context.next) {
3863 + case 0:
3864 + // Run Data hooks.
3865 + results = _this3.onAfterApply(_this3.args, _result), promises = Array.isArray(results) ? results.flat().filter(function (filtered) {
3866 + return filtered instanceof Promise;
3867 + }) : [];
3868 +
3869 + if (!promises.length) {
3870 + _context.next = 4;
3871 + break;
3872 + }
3873 +
3874 + _context.next = 4;
3875 + return Promise.all(promises);
3876 +
3877 + case 4:
3878 + if (_this3.isDataChanged()) {
3879 + // TODO: Create Command-Base for Command-Document and apply it on after.
3880 + $e.internal('document/save/set-is-modified', {
3881 + status: true
3882 + });
3883 + } // For UI hooks.
3884 +
3885 +
3886 + _this3.onAfterRun(_this3.args, _result);
3887 +
3888 + case 6:
3889 + case "end":
3890 + return _context.stop();
3891 + }
3892 + }
3893 + }, _callee);
3894 + }));
3895 +
3896 + return function asyncOnAfter(_x) {
3897 + return _ref.apply(this, arguments);
3898 + };
3899 + }(); // TODO: Temp code determine if it's a jQuery deferred object.
3900 +
3901 +
3902 + if (result && 'object' === (0, _typeof2.default)(result) && result.promise && result.then && result.fail) {
3903 + result.fail(this.onCatchApply.bind(this));
3904 + result.done(onAfter);
3905 + } else if (result instanceof Promise) {
3906 + // Override initial result ( promise ) to await onAfter promises, first!.
3907 + return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
3908 + return _regenerator.default.wrap(function _callee2$(_context2) {
3909 + while (1) {
3910 + switch (_context2.prev = _context2.next) {
3911 + case 0:
3912 + _context2.next = 2;
3913 + return result.catch(_this3.onCatchApply.bind(_this3));
3914 +
3915 + case 2:
3916 + _context2.next = 4;
3917 + return result.then(function (_result) {
3918 + return asyncOnAfter(_result);
3919 + });
3920 +
3921 + case 4:
3922 + return _context2.abrupt("return", result);
3923 +
3924 + case 5:
3925 + case "end":
3926 + return _context2.stop();
3927 + }
3928 + }
3929 + }, _callee2);
3930 + }))();
3931 + } else {
3932 + onAfter(result);
3933 + }
3934 +
3935 + return result;
3936 + }
977 3937 /**
3938 + * Run all the catch hooks.
3939 + *
3940 + * @param {Error} e
3941 + */
3942 +
3943 + }, {
3944 + key: "runCatchHooks",
3945 + value: function runCatchHooks(e) {
3946 + $e.hooks.runDataCatch(this.currentCommand, this.args, e);
3947 + $e.hooks.runUICatch(this.currentCommand, this.args, e);
3948 + }
3949 + /**
978 3950 * Function onBeforeRun.
979 3951 *
980 3952 * Called before run().
981 3953 *
982 - * @param {{}} args
3954 + * @param {*} [args={}]
983 3955 */
3956 +
984 3957 }, {
985 3958 key: "onBeforeRun",
986 3959 value: function onBeforeRun() {
987 3960 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
988 - } // eslint-disable-line no-unused-vars
989 -
3961 + $e.hooks.runUIBefore(this.currentCommand, args);
3962 + }
990 3963 /**
991 3964 * Function onAfterRun.
992 3965 *
993 3966 * Called after run().
994 3967 *
995 - * @param {{}} args
996 - * @param {*} result
3968 + * @param {*} [args={}]
3969 + * @param {*} [result={*}]
997 3970 */
3971 +
998 3972 }, {
999 3973 key: "onAfterRun",
1000 3974 value: function onAfterRun() {
1001 3975 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1002 3976 var result = arguments.length > 1 ? arguments[1] : undefined;
1003 - } // eslint-disable-line no-unused-vars
1004 -
3977 + $e.hooks.runUIAfter(this.currentCommand, args, result);
3978 + }
1005 3979 /**
1006 3980 * Function onBeforeApply.
1007 3981 *
1008 3982 * Called before apply().
1009 3983 *
1010 - * @param {{}} args
3984 + * @param {*} [args={}]
1011 3985 */
3986 +
1012 3987 }, {
1013 3988 key: "onBeforeApply",
1014 3989 value: function onBeforeApply() {
1015 3990 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1016 - } // eslint-disable-line no-unused-vars
1017 -
3991 + $e.hooks.runDataDependency(this.currentCommand, args);
3992 + }
1018 3993 /**
1019 3994 * Function onAfterApply.
1020 3995 *
1021 3996 * Called after apply().
1022 3997 *
1023 - * @param {{}} args
1024 - * @param {*} result
3998 + * @param {*} [args={}]
3999 + * @param {*} [result={*}]
1025 4000 */
4001 +
1026 4002 }, {
1027 4003 key: "onAfterApply",
1028 4004 value: function onAfterApply() {
1029 4005 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1030 4006 var result = arguments.length > 1 ? arguments[1] : undefined;
1031 - } // eslint-disable-line no-unused-vars
1032 -
4007 + return $e.hooks.runDataAfter(this.currentCommand, args, result);
4008 + }
1033 4009 /**
1034 4010 * Function onCatchApply.
1035 4011 *
1036 4012 * Called after apply() failed.
@@ -1036,57 +4012,46 @@
1036 4012 * Called after apply() failed.
1037 4013 *
1038 4014 * @param {Error} e
1039 4015 */
4016 +
1040 4017 }, {
1041 4018 key: "onCatchApply",
1042 - value: function onCatchApply(e) {} // eslint-disable-line no-unused-vars
4019 + value: function onCatchApply(e) {
4020 + this.runCatchHooks(e);
4021 +
4022 + _helpers.default.consoleError(e);
4023 + }
1043 4024 }], [{
1044 4025 key: "getInstanceType",
1045 4026 value: function getInstanceType() {
1046 - return 'CommandInfra';
4027 + return 'CommandBase';
1047 4028 }
1048 -
1049 4029 /**
1050 4030 * Get info of command.
1051 4031 *
1052 - * @return {Object} Extra information about the command.
4032 + * Use to provide 'extra' information about the command.
4033 + *
4034 + * @return {Object} info of command
1053 4035 */
4036 +
1054 4037 }, {
1055 4038 key: "getInfo",
1056 4039 value: function getInfo() {
1057 4040 return {};
1058 4041 }
1059 -
1060 4042 /**
1061 - * @return {string} Self command name.
4043 + * Current component.
4044 + *
4045 + * @type {Component}
1062 4046 */
1063 - }, {
1064 - key: "getCommand",
1065 - value: function getCommand() {
1066 - return this.registerConfig.command;
1067 - }
1068 4047
1069 - /**
1070 - * @return {ComponentBase} Self component
1071 - */
1072 - }, {
1073 - key: "getComponent",
1074 - value: function getComponent() {
1075 - return this.registerConfig.component;
1076 - }
1077 - }, {
1078 - key: "setRegisterConfig",
1079 - value: function setRegisterConfig(config) {
1080 - this.registerConfig = Object.freeze(config);
1081 - }
1082 4048 }]);
4049 + return CommandBase;
1083 4050 }(_argsObject.default);
1084 -/**
1085 - * @type {Object}
1086 - */
1087 -(0, _defineProperty2.default)(CommandInfra, "registerConfig", null);
1088 4051
4052 +exports["default"] = CommandBase;
4053 +
1089 4054 /***/ }),
1090 4055
1091 4056 /***/ "../modules/web-cli/assets/js/modules/component-base.js":
1092 4057 /*!**************************************************************!*\
@@ -1097,46 +4062,68 @@
1097 4062 "use strict";
1098 4063
1099 4064
1100 4065 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
4066 +
1101 4067 Object.defineProperty(exports, "__esModule", ({
1102 4068 value: true
1103 4069 }));
1104 4070 exports["default"] = void 0;
4071 +
1105 4072 var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
4073 +
1106 4074 var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js"));
4075 +
1107 4076 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
4077 +
1108 4078 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
4079 +
4080 +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
4081 +
1109 4082 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
4083 +
1110 4084 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
1111 -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
1112 -var _commandCallbackBase = _interopRequireDefault(__webpack_require__(/*! elementor-api/modules/command-callback-base */ "../modules/web-cli/assets/js/modules/command-callback-base.js"));
1113 -var _toolkit = __webpack_require__(/*! @reduxjs/toolkit */ "@reduxjs/toolkit");
1114 -var _module = _interopRequireDefault(__webpack_require__(/*! elementor/assets/dev/js/modules/imports/module.js */ "../assets/dev/js/modules/imports/module.js"));
4085 +
4086 +var _toolkit = __webpack_require__(/*! @reduxjs/toolkit */ "../node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js");
4087 +
4088 +var _module = _interopRequireDefault(__webpack_require__(/*! elementor-assets-js/modules/imports/module.js */ "../assets/dev/js/modules/imports/module.js"));
4089 +
1115 4090 var _forceMethodImplementation = _interopRequireDefault(__webpack_require__(/*! ../utils/force-method-implementation */ "../modules/web-cli/assets/js/utils/force-method-implementation.js"));
1116 -var _deprecation = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/deprecation */ "../modules/web-cli/assets/js/utils/deprecation.js"));
1117 -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; }
1118 -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; }
1119 -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)); }
1120 -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
4091 +
4092 +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
4093 +
4094 +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4095 +
4096 +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
4097 +
4098 +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
4099 +
1121 4100 /**
1122 - * @typedef {import('./command-infra')} CommandInfra
1123 4101 * @typedef {import('./hook-base')} HookBase
4102 + */
4103 +
4104 +/**
1124 4105 * @typedef {import('../core/states/ui-state-base')} UiStateBase
1125 4106 */
1126 -var ComponentBase = exports["default"] = /*#__PURE__*/function (_Module) {
4107 +var ComponentBase = /*#__PURE__*/function (_Module) {
4108 + (0, _inherits2.default)(ComponentBase, _Module);
4109 +
4110 + var _super = _createSuper(ComponentBase);
4111 +
1127 4112 function ComponentBase() {
1128 4113 (0, _classCallCheck2.default)(this, ComponentBase);
1129 - return _callSuper(this, ComponentBase, arguments);
4114 + return _super.apply(this, arguments);
1130 4115 }
1131 - (0, _inherits2.default)(ComponentBase, _Module);
1132 - return (0, _createClass2.default)(ComponentBase, [{
4116 +
4117 + (0, _createClass2.default)(ComponentBase, [{
1133 4118 key: "__construct",
1134 4119 value: function __construct() {
1135 4120 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
4121 +
1136 4122 if (args.manager) {
1137 4123 this.manager = args.manager;
1138 4124 }
4125 +
1139 4126 this.commands = this.defaultCommands();
1140 4127 this.commandsInternal = this.defaultCommandsInternal();
1141 4128 this.hooks = this.defaultHooks();
1142 4129 this.routes = this.defaultRoutes();
@@ -1152,27 +4139,31 @@
1152 4139 }, {
1153 4140 key: "registerAPI",
1154 4141 value: function registerAPI() {
1155 4142 var _this = this;
4143 +
1156 4144 Object.entries(this.getTabs()).forEach(function (tab) {
1157 4145 return _this.registerTabRoute(tab[0]);
1158 4146 });
1159 4147 Object.entries(this.getRoutes()).forEach(function (_ref) {
1160 4148 var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
1161 - route = _ref2[0],
1162 - callback = _ref2[1];
4149 + route = _ref2[0],
4150 + callback = _ref2[1];
4151 +
1163 4152 return _this.registerRoute(route, callback);
1164 4153 });
1165 4154 Object.entries(this.getCommands()).forEach(function (_ref3) {
1166 4155 var _ref4 = (0, _slicedToArray2.default)(_ref3, 2),
1167 - command = _ref4[0],
1168 - callback = _ref4[1];
4156 + command = _ref4[0],
4157 + callback = _ref4[1];
4158 +
1169 4159 return _this.registerCommand(command, callback);
1170 4160 });
1171 4161 Object.entries(this.getCommandsInternal()).forEach(function (_ref5) {
1172 4162 var _ref6 = (0, _slicedToArray2.default)(_ref5, 2),
1173 - command = _ref6[0],
1174 - callback = _ref6[1];
4163 + command = _ref6[0],
4164 + callback = _ref6[1];
4165 +
1175 4166 return _this.registerCommandInternal(command, callback);
1176 4167 });
1177 4168 Object.values(this.getHooks()).forEach(function (instance) {
1178 4169 return _this.registerHook(instance);
@@ -1178,10 +4169,11 @@
1178 4169 return _this.registerHook(instance);
1179 4170 });
1180 4171 Object.entries(this.getData()).forEach(function (_ref7) {
1181 4172 var _ref8 = (0, _slicedToArray2.default)(_ref7, 2),
1182 - command = _ref8[0],
1183 - callback = _ref8[1];
4173 + command = _ref8[0],
4174 + callback = _ref8[1];
4175 +
1184 4176 return _this.registerData(command, callback);
1185 4177 });
1186 4178 Object.values(this.getUiStates()).forEach(function (instance) {
1187 4179 return _this.registerUiState(instance);
@@ -1186,45 +4178,32 @@
1186 4178 Object.values(this.getUiStates()).forEach(function (instance) {
1187 4179 return _this.registerUiState(instance);
1188 4180 });
1189 4181 Object.entries(this.getStates()).forEach(function (_ref9) {
1190 - var _ref0 = (0, _slicedToArray2.default)(_ref9, 2),
1191 - id = _ref0[0],
1192 - state = _ref0[1];
4182 + var _ref10 = (0, _slicedToArray2.default)(_ref9, 2),
4183 + id = _ref10[0],
4184 + state = _ref10[1];
4185 +
1193 4186 return _this.registerState(id, state);
1194 4187 });
1195 - }
4188 + } // eslint-disable-next-line jsdoc/require-returns-check
1196 4189
1197 - // eslint-disable-next-line jsdoc/require-returns-check
1198 4190 /**
1199 4191 * @return {string} namespace
1200 4192 */
4193 +
1201 4194 }, {
1202 4195 key: "getNamespace",
1203 4196 value: function getNamespace() {
1204 4197 (0, _forceMethodImplementation.default)();
1205 4198 }
1206 -
1207 - /**
1208 - * @deprecated since 3.7.0, use `getServiceName()` instead.
1209 - */
1210 4199 }, {
1211 4200 key: "getRootContainer",
1212 4201 value: function getRootContainer() {
1213 - _deprecation.default.deprecated('getRootContainer()', '3.7.0', 'getServiceName()');
1214 - return this.getServiceName();
4202 + var parts = this.getNamespace().split('/');
4203 + return parts[0];
1215 4204 }
1216 4205 }, {
1217 - key: "getServiceName",
1218 - value: function getServiceName() {
1219 - return this.getNamespace().split('/')[0];
1220 - }
1221 - }, {
1222 - key: "store",
1223 - get: function get() {
1224 - return $e.store.get(this.getNamespace());
1225 - }
1226 - }, {
1227 4206 key: "defaultTabs",
1228 4207 value: function defaultTabs() {
1229 4208 return {};
1230 4209 }
@@ -1247,25 +4226,25 @@
1247 4226 key: "defaultHooks",
1248 4227 value: function defaultHooks() {
1249 4228 return {};
1250 4229 }
1251 -
1252 4230 /**
1253 4231 * Get the component's default UI states.
1254 4232 *
1255 4233 * @return {Object} default UI states
1256 4234 */
4235 +
1257 4236 }, {
1258 4237 key: "defaultUiStates",
1259 4238 value: function defaultUiStates() {
1260 4239 return {};
1261 4240 }
1262 -
1263 4241 /**
1264 4242 * Get the component's Redux slice settings.
1265 4243 *
1266 4244 * @return {Object} Redux slice settings
1267 4245 */
4246 +
1268 4247 }, {
1269 4248 key: "defaultStates",
1270 4249 value: function defaultStates() {
1271 4250 return {};
@@ -1299,25 +4278,25 @@
1299 4278 key: "getHooks",
1300 4279 value: function getHooks() {
1301 4280 return this.hooks;
1302 4281 }
1303 -
1304 4282 /**
1305 4283 * Retrieve the component's UI states.
1306 4284 *
1307 4285 * @return {Object} UI states
1308 4286 */
4287 +
1309 4288 }, {
1310 4289 key: "getUiStates",
1311 4290 value: function getUiStates() {
1312 4291 return this.uiStates;
1313 4292 }
1314 -
1315 4293 /**
1316 4294 * Retrieve the component's Redux Slice.
1317 4295 *
1318 4296 * @return {Object} Redux Slice
1319 4297 */
4298 +
1320 4299 }, {
1321 4300 key: "getStates",
1322 4301 value: function getStates() {
1323 4302 return this.states;
@@ -1341,74 +4320,22 @@
1341 4320 key: "getData",
1342 4321 value: function getData() {
1343 4322 return this.data;
1344 4323 }
1345 -
1346 - /**
1347 - * @param {string} command
1348 - * @param {(()=>{}|CommandInfra)} context
1349 - * @param {'default'|'internal'|'data'} commandsType
1350 - */
1351 4324 }, {
1352 4325 key: "registerCommand",
1353 - value: function registerCommand(command, context) {
1354 - var commandsType = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'default';
1355 - var commandsManager;
1356 - switch (commandsType) {
1357 - case 'default':
1358 - commandsManager = $e.commands;
1359 - break;
1360 - case 'internal':
1361 - commandsManager = $e.commandsInternal;
1362 - break;
1363 - case 'data':
1364 - commandsManager = $e.data;
1365 - break;
1366 - default:
1367 - throw new Error("Invalid commands type: '".concat(command, "'"));
1368 - }
1369 - var fullCommand = this.getNamespace() + '/' + command,
1370 - instanceType = context.getInstanceType ? context.getInstanceType() : false,
1371 - registerConfig = {
1372 - command: fullCommand,
1373 - component: this
1374 - };
1375 -
1376 - // Support pure callback.
1377 - if (!instanceType) {
1378 - if ($e.devTools) {
1379 - $e.devTools.log.warn("Attach command-callback-base, on command: '".concat(fullCommand, "', context is unknown type."));
1380 - }
1381 - registerConfig.callback = context;
1382 -
1383 - // Unique class.
1384 - context = /*#__PURE__*/function (_CommandCallbackBase) {
1385 - function context() {
1386 - (0, _classCallCheck2.default)(this, context);
1387 - return _callSuper(this, context, arguments);
1388 - }
1389 - (0, _inherits2.default)(context, _CommandCallbackBase);
1390 - return (0, _createClass2.default)(context);
1391 - }(_commandCallbackBase.default);
1392 - }
1393 - context.setRegisterConfig(registerConfig);
1394 - commandsManager.register(this, command, context);
4326 + value: function registerCommand(command, callback) {
4327 + $e.commands.register(this, command, callback);
1395 4328 }
1396 -
1397 4329 /**
1398 4330 * @param {HookBase} instance
1399 4331 */
4332 +
1400 4333 }, {
1401 4334 key: "registerHook",
1402 4335 value: function registerHook(instance) {
1403 4336 return instance.register();
1404 4337 }
1405 - }, {
1406 - key: "registerCommandInternal",
1407 - value: function registerCommandInternal(command, context) {
1408 - this.registerCommand(command, context, 'internal');
1409 - }
1410 -
1411 4338 /**
1412 4339 * Register a UI state.
1413 4340 *
1414 4341 * @param {UiStateBase} instance - UI state instance.
@@ -1414,14 +4341,14 @@
1414 4341 * @param {UiStateBase} instance - UI state instance.
1415 4342 *
1416 4343 * @return {void}
1417 4344 */
4345 +
1418 4346 }, {
1419 4347 key: "registerUiState",
1420 4348 value: function registerUiState(instance) {
1421 4349 $e.uiStates.register(instance);
1422 4350 }
1423 -
1424 4351 /**
1425 4352 * Register a Redux Slice.
1426 4353 *
1427 4354 * @param {string} id - State id.
@@ -1428,8 +4355,9 @@
1428 4355 * @param {Object} stateConfig - The state config.
1429 4356 *
1430 4357 * @return {void}
1431 4358 */
4359 +
1432 4360 }, {
1433 4361 key: "registerState",
1434 4362 value: function registerState(id, stateConfig) {
1435 4363 id = this.getNamespace() + (id ? "/".concat(id) : '');
@@ -1438,8 +4366,13 @@
1438 4366 }));
1439 4367 $e.store.register(id, slice);
1440 4368 }
1441 4369 }, {
4370 + key: "registerCommandInternal",
4371 + value: function registerCommandInternal(command, callback) {
4372 + $e.commandsInternal.register(this, command, callback);
4373 + }
4374 + }, {
1442 4375 key: "registerRoute",
1443 4376 value: function registerRoute(route, callback) {
1444 4377 $e.routes.register(this, route, callback);
1445 4378 }
@@ -1444,10 +4377,10 @@
1444 4377 $e.routes.register(this, route, callback);
1445 4378 }
1446 4379 }, {
1447 4380 key: "registerData",
1448 - value: function registerData(command, context) {
1449 - this.registerCommand(command, context, 'data');
4381 + value: function registerData(command, callback) {
4382 + $e.data.register(this, command, callback);
1450 4383 }
1451 4384 }, {
1452 4385 key: "unregisterRoute",
1453 4386 value: function unregisterRoute(route) {
@@ -1456,8 +4389,9 @@
1456 4389 }, {
1457 4390 key: "registerTabRoute",
1458 4391 value: function registerTabRoute(tab) {
1459 4392 var _this2 = this;
4393 +
1460 4394 this.registerRoute(tab, function (args) {
1461 4395 return _this2.activateTab(tab, args);
1462 4396 });
1463 4397 }
@@ -1476,12 +4410,13 @@
1476 4410 value: function close() {
1477 4411 if (!this.isOpen) {
1478 4412 return false;
1479 4413 }
4414 +
1480 4415 this.isOpen = false;
1481 4416 this.inactivate();
1482 4417 $e.routes.clearCurrent(this.getNamespace());
1483 - $e.routes.clearHistory(this.getServiceName());
4418 + $e.routes.clearHistory(this.getRootContainer());
1484 4419 return true;
1485 4420 }
1486 4421 }, {
1487 4422 key: "activate",
@@ -1537,17 +4472,17 @@
1537 4472 }, {
1538 4473 key: "addTab",
1539 4474 value: function addTab(tab, args, position) {
1540 4475 var _this3 = this;
1541 - this.tabs[tab] = args;
1542 - // It can be 0.
4476 +
4477 + this.tabs[tab] = args; // It can be 0.
4478 +
1543 4479 if ('undefined' !== typeof position) {
1544 4480 var newTabs = {};
1545 - var ids = Object.keys(this.tabs);
1546 - // Remove new tab
1547 - ids.pop();
4481 + var ids = Object.keys(this.tabs); // Remove new tab
1548 4482
1549 - // Add it to position.
4483 + ids.pop(); // Add it to position.
4484 +
1550 4485 ids.splice(position, 0, tab);
1551 4486 ids.forEach(function (id) {
1552 4487 newTabs[id] = _this3.tabs[id];
1553 4488 });
@@ -1552,8 +4487,9 @@
1552 4487 newTabs[id] = _this3.tabs[id];
1553 4488 });
1554 4489 this.tabs = newTabs;
1555 4490 }
4491 +
1556 4492 this.registerTabRoute(tab);
1557 4493 }
1558 4494 }, {
1559 4495 key: "getTabsWrapperSelector",
@@ -1567,12 +4503,15 @@
1567 4503 }
1568 4504 }, {
1569 4505 key: "renderTab",
1570 4506 value: function renderTab(tab) {} // eslint-disable-line
4507 +
1571 4508 }, {
1572 4509 key: "activateTab",
1573 4510 value: function activateTab(tab, args) {
1574 4511 var _this4 = this;
4512 +
4513 + this.currentTab = tab;
1575 4514 this.renderTab(tab, args);
1576 4515 jQuery(this.getTabsWrapperSelector() + ' .elementor-component-tab').off('click').on('click', function (event) {
1577 4516 $e.route(_this4.getTabRoute(event.currentTarget.dataset.tab), args);
1578 4517 }).removeClass('elementor-active').filter('[data-tab="' + tab + '"]').addClass('elementor-active');
@@ -1586,9 +4525,8 @@
1586 4525 key: "getBodyClass",
1587 4526 value: function getBodyClass(route) {
1588 4527 return 'e-route-' + route.replace(/\//g, '-');
1589 4528 }
1590 -
1591 4529 /**
1592 4530 * If command includes uppercase character convert it to lowercase and add `-`.
1593 4531 * e.g: `CopyAll` is converted to `copy-all`.
1594 4532 *
@@ -1593,8 +4531,9 @@
1593 4531 * e.g: `CopyAll` is converted to `copy-all`.
1594 4532 *
1595 4533 * @param {string} commandName
1596 4534 */
4535 +
1597 4536 }, {
1598 4537 key: "normalizeCommandName",
1599 4538 value: function normalizeCommandName(commandName) {
1600 4539 return commandName.replace(/[A-Z]/g, function (match, offset) {
@@ -1600,26 +4539,29 @@
1600 4539 return commandName.replace(/[A-Z]/g, function (match, offset) {
1601 4540 return (offset > 0 ? '-' : '') + match.toLowerCase();
1602 4541 });
1603 4542 }
1604 -
1605 - /**
1606 - * @param {{}} commandsFromImport
1607 - * @return {{}} imported commands
1608 - */
1609 4543 }, {
1610 4544 key: "importCommands",
1611 4545 value: function importCommands(commandsFromImport) {
1612 4546 var _this5 = this;
1613 - var commands = {};
1614 4547
1615 - // Convert `Commands` to `ComponentBase` workable format.
1616 - Object.entries(commandsFromImport).forEach(function (_ref1) {
1617 - var _ref10 = (0, _slicedToArray2.default)(_ref1, 2),
1618 - className = _ref10[0],
1619 - Class = _ref10[1];
4548 + var commands = {}; // Convert `Commands` to `ComponentBase` workable format.
4549 +
4550 + Object.entries(commandsFromImport).forEach(function (_ref11) {
4551 + var _ref12 = (0, _slicedToArray2.default)(_ref11, 2),
4552 + className = _ref12[0],
4553 + Class = _ref12[1];
4554 +
1620 4555 var command = _this5.normalizeCommandName(className);
1621 - commands[command] = Class;
4556 +
4557 + commands[command] = function (args) {
4558 + return new Class(args).run();
4559 + }; // TODO: Temporary code, remove after merge with 'require-commands-base' branch.
4560 + // should not return callback, but Class or Instance without run ( gain performance ).
4561 +
4562 +
4563 + $e.commands.classes[_this5.getNamespace() + '/' + command] = Class;
1622 4564 });
1623 4565 return commands;
1624 4566 }
1625 4567 }, {
@@ -1625,15 +4567,16 @@
1625 4567 }, {
1626 4568 key: "importHooks",
1627 4569 value: function importHooks(hooksFromImport) {
1628 4570 var hooks = {};
4571 +
1629 4572 for (var key in hooksFromImport) {
1630 4573 var hook = new hooksFromImport[key]();
1631 4574 hooks[hook.getId()] = hook;
1632 4575 }
4576 +
1633 4577 return hooks;
1634 4578 }
1635 -
1636 4579 /**
1637 4580 * Import & initialize the component's UI states.
1638 4581 * Should be used inside `defaultUiState()`.
1639 4582 *
@@ -1640,12 +4583,14 @@
1640 4583 * @param {Object} statesFromImport - UI states from import.
1641 4584 *
1642 4585 * @return {Object} UI States
1643 4586 */
4587 +
1644 4588 }, {
1645 4589 key: "importUiStates",
1646 4590 value: function importUiStates(statesFromImport) {
1647 4591 var _this6 = this;
4592 +
1648 4593 var uiStates = {};
1649 4594 Object.values(statesFromImport).forEach(function (className) {
1650 4595 var uiState = new className(_this6);
1651 4596 uiStates[uiState.getId()] = uiState;
@@ -1651,9 +4596,8 @@
1651 4596 uiStates[uiState.getId()] = uiState;
1652 4597 });
1653 4598 return uiStates;
1654 4599 }
1655 -
1656 4600 /**
1657 4601 * Set a UI state value.
1658 4602 * TODO: Should we provide such function? Maybe the developer should implicitly pass the full state ID?
1659 4603 *
@@ -1661,8 +4605,9 @@
1661 4605 * @param {*} value - New state value.
1662 4606 *
1663 4607 * @return {void}
1664 4608 */
4609 +
1665 4610 }, {
1666 4611 key: "setUiState",
1667 4612 value: function setUiState(state, value) {
1668 4613 $e.uiStates.set("".concat(this.getNamespace(), "/").concat(state), value);
@@ -1674,18 +4619,99 @@
1674 4619 }
1675 4620 }, {
1676 4621 key: "toggleHistoryClass",
1677 4622 value: function toggleHistoryClass() {
1678 - document.body.classList.toggle('e-routes-has-history', !!$e.routes.getHistory(this.getServiceName()).length);
4623 + document.body.classList.toggle('e-routes-has-history', !!$e.routes.getHistory(this.getRootContainer()).length);
1679 4624 }
1680 4625 }]);
4626 + return ComponentBase;
1681 4627 }(_module.default);
1682 4628
4629 +exports["default"] = ComponentBase;
4630 +
1683 4631 /***/ }),
1684 4632
1685 -/***/ "../modules/web-cli/assets/js/utils/console.js":
4633 +/***/ "../modules/web-cli/assets/js/utils/force-method-implementation.js":
4634 +/*!*************************************************************************!*\
4635 + !*** ../modules/web-cli/assets/js/utils/force-method-implementation.js ***!
4636 + \*************************************************************************/
4637 +/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
4638 +
4639 +"use strict";
4640 +
4641 +
4642 +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
4643 +
4644 +Object.defineProperty(exports, "__esModule", ({
4645 + value: true
4646 +}));
4647 +exports["default"] = exports.ForceMethodImplementation = void 0;
4648 +
4649 +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
4650 +
4651 +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
4652 +
4653 +var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js"));
4654 +
4655 +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
4656 +
4657 +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
4658 +
4659 +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
4660 +
4661 +var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/wrapNativeSuper */ "../node_modules/@babel/runtime/helpers/wrapNativeSuper.js"));
4662 +
4663 +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
4664 +
4665 +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
4666 +
4667 +// TODO: Copied from `assets/dev/js/modules/imports/force-method-implementation.js`;
4668 +var ForceMethodImplementation = /*#__PURE__*/function (_Error) {
4669 + (0, _inherits2.default)(ForceMethodImplementation, _Error);
4670 +
4671 + var _super = _createSuper(ForceMethodImplementation);
4672 +
4673 + function ForceMethodImplementation() {
4674 + var _this;
4675 +
4676 + var info = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
4677 + (0, _classCallCheck2.default)(this, ForceMethodImplementation);
4678 + _this = _super.call(this, "".concat(info.isStatic ? 'static ' : '').concat(info.fullName, "() should be implemented, please provide '").concat(info.functionName || info.fullName, "' functionality."));
4679 + Error.captureStackTrace((0, _assertThisInitialized2.default)(_this), ForceMethodImplementation);
4680 + return _this;
4681 + }
4682 +
4683 + return (0, _createClass2.default)(ForceMethodImplementation);
4684 +}( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error));
4685 +
4686 +exports.ForceMethodImplementation = ForceMethodImplementation;
4687 +
4688 +var _default = function _default() {
4689 + var stack = Error().stack,
4690 + caller = stack.split('\n')[2].trim(),
4691 + callerName = caller.startsWith('at new') ? 'constructor' : caller.split(' ')[1],
4692 + info = {};
4693 + info.functionName = callerName;
4694 + info.fullName = callerName;
4695 +
4696 + if (info.functionName.includes('.')) {
4697 + var parts = info.functionName.split('.');
4698 + info.className = parts[0];
4699 + info.functionName = parts[1];
4700 + } else {
4701 + info.isStatic = true;
4702 + }
4703 +
4704 + throw new ForceMethodImplementation(info);
4705 +};
4706 +
4707 +exports["default"] = _default;
4708 +
4709 +/***/ }),
4710 +
4711 +/***/ "../modules/web-cli/assets/js/utils/helpers.js":
1686 4712 /*!*****************************************************!*\
1687 - !*** ../modules/web-cli/assets/js/utils/console.js ***!
4713 + !*** ../modules/web-cli/assets/js/utils/helpers.js ***!
1688 4714 \*****************************************************/
1689 4715 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1690 4716
1691 4717 "use strict";
@@ -1691,705 +4717,1312 @@
1691 4717 "use strict";
1692 4718
1693 4719
1694 4720 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
4721 +
1695 4722 Object.defineProperty(exports, "__esModule", ({
1696 4723 value: true
1697 4724 }));
1698 4725 exports["default"] = void 0;
4726 +
1699 4727 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
4728 +
1700 4729 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
1701 -var Console = exports["default"] = /*#__PURE__*/function () {
1702 - function Console() {
1703 - (0, _classCallCheck2.default)(this, Console);
4730 +
4731 +// TODO: Copied from `core/common/assets/js/utils/helpers.js` and modified into static functions.
4732 +var Helpers = /*#__PURE__*/function () {
4733 + function Helpers() {
4734 + (0, _classCallCheck2.default)(this, Helpers);
1704 4735 }
1705 - return (0, _createClass2.default)(Console, null, [{
1706 - key: "error",
1707 - value: function error(message) {
1708 - // Show an error if devTools is available.
1709 - if ($e.devTools) {
1710 - $e.devTools.log.error(message);
4736 +
4737 + (0, _createClass2.default)(Helpers, null, [{
4738 + key: "softDeprecated",
4739 + value: function softDeprecated(name, version, replacement) {
4740 + if (elementorWebCliConfig.isDebug) {
4741 + this.deprecatedMessage('soft', name, version, replacement);
1711 4742 }
4743 + }
4744 + }, {
4745 + key: "hardDeprecated",
4746 + value: function hardDeprecated(name, version, replacement) {
4747 + this.deprecatedMessage('hard', name, version, replacement);
4748 + }
4749 + }, {
4750 + key: "deprecatedMessage",
4751 + value: function deprecatedMessage(type, name, version, replacement) {
4752 + var message = "`".concat(name, "` is ").concat(type, " deprecated since ").concat(version);
1712 4753
1713 - // If not a 'Hook-Break' then show error.
1714 - if (!(message instanceof $e.modules.HookBreak)) {
1715 - // eslint-disable-next-line no-console
1716 - console.error(message);
4754 + if (replacement) {
4755 + message += " - Use `".concat(replacement, "` instead");
1717 4756 }
4757 +
4758 + this.consoleWarn(message);
1718 4759 }
1719 4760 }, {
1720 - key: "warn",
1721 - value: function warn() {
4761 + key: "consoleWarn",
4762 + value: function consoleWarn() {
1722 4763 var _console;
4764 +
1723 4765 var style = "font-size: 12px; background-image: url(\"".concat(elementorWebCliConfig.urls.assets, "images/logo-icon.png\"); background-repeat: no-repeat; background-size: contain;");
4766 +
1724 4767 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
1725 4768 args[_key] = arguments[_key];
1726 4769 }
4770 +
1727 4771 args.unshift('%c %c', style, '');
4772 +
1728 4773 (_console = console).warn.apply(_console, args); // eslint-disable-line no-console
4774 +
1729 4775 }
4776 + }, {
4777 + key: "consoleError",
4778 + value: function consoleError(message) {
4779 + // TODO: function is part of $e.
4780 + // Show an error if devTools is available.
4781 + if ($e.devTools) {
4782 + $e.devTools.log.error(message);
4783 + } // If not a 'Hook-Break' then show error.
4784 +
4785 +
4786 + if (!(message instanceof $e.modules.HookBreak)) {
4787 + // eslint-disable-next-line no-console
4788 + console.error(message);
4789 + }
4790 + }
4791 + }, {
4792 + key: "deprecatedMethod",
4793 + value: function deprecatedMethod(methodName, version, replacement) {
4794 + this.deprecatedMessage('hard', methodName, version, replacement); // This itself is deprecated.
4795 +
4796 + this.softDeprecated('Helpers.deprecatedMethod', '2.8.0', 'Helpers.softDeprecated || Helpers.hardDeprecated');
4797 + }
4798 + }, {
4799 + key: "cloneObject",
4800 + value: function cloneObject(object) {
4801 + return JSON.parse(JSON.stringify(object));
4802 + }
4803 + }, {
4804 + key: "upperCaseWords",
4805 + value: function upperCaseWords(string) {
4806 + return (string + '').replace(/^(.)|\s+(.)/g, function ($1) {
4807 + return $1.toUpperCase();
4808 + });
4809 + }
4810 + }, {
4811 + key: "getUniqueId",
4812 + value: function getUniqueId() {
4813 + return Math.random().toString(16).substr(2, 7);
4814 + }
1730 4815 }]);
4816 + return Helpers;
1731 4817 }();
1732 4818
4819 +exports["default"] = Helpers;
4820 +
1733 4821 /***/ }),
1734 4822
1735 -/***/ "../modules/web-cli/assets/js/utils/deprecation.js":
1736 -/*!*********************************************************!*\
1737 - !*** ../modules/web-cli/assets/js/utils/deprecation.js ***!
1738 - \*********************************************************/
1739 -/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
4823 +/***/ "../node_modules/redux-thunk/es/index.js":
4824 +/*!***********************************************!*\
4825 + !*** ../node_modules/redux-thunk/es/index.js ***!
4826 + \***********************************************/
4827 +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1740 4828
1741 4829 "use strict";
4830 +__webpack_require__.r(__webpack_exports__);
4831 +/* harmony export */ __webpack_require__.d(__webpack_exports__, {
4832 +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
4833 +/* harmony export */ });
4834 +/** A function that accepts a potential "extra argument" value to be injected later,
4835 + * and returns an instance of the thunk middleware that uses that value
4836 + */
4837 +function createThunkMiddleware(extraArgument) {
4838 + // Standard Redux middleware definition pattern:
4839 + // See: https://redux.js.org/tutorials/fundamentals/part-4-store#writing-custom-middleware
4840 + var middleware = function middleware(_ref) {
4841 + var dispatch = _ref.dispatch,
4842 + getState = _ref.getState;
4843 + return function (next) {
4844 + return function (action) {
4845 + // The thunk middleware looks for any functions that were passed to `store.dispatch`.
4846 + // If this "action" is really a function, call it and return the result.
4847 + if (typeof action === 'function') {
4848 + // Inject the store's `dispatch` and `getState` methods, as well as any "extra arg"
4849 + return action(dispatch, getState, extraArgument);
4850 + } // Otherwise, pass the action down the middleware chain as usual
1742 4851
1743 4852
1744 -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
1745 -Object.defineProperty(exports, "__esModule", ({
1746 - value: true
1747 -}));
1748 -exports["default"] = void 0;
1749 -var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js"));
1750 -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
1751 -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
1752 -var _console = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/console */ "../modules/web-cli/assets/js/utils/console.js"));
1753 -// Copied from `modules/dev-tools/assets/js/deprecation.js`
4853 + return next(action);
4854 + };
4855 + };
4856 + };
4857 +
4858 + return middleware;
4859 +}
4860 +
4861 +var thunk = createThunkMiddleware(); // Attach the factory function so users can create a customized version
4862 +// with whatever "extra arg" they want to inject into their thunks
4863 +
4864 +thunk.withExtraArgument = createThunkMiddleware;
4865 +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (thunk);
4866 +
4867 +/***/ }),
4868 +
4869 +/***/ "../node_modules/redux/es/redux.js":
4870 +/*!*****************************************!*\
4871 + !*** ../node_modules/redux/es/redux.js ***!
4872 + \*****************************************/
4873 +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4874 +
4875 +"use strict";
4876 +__webpack_require__.r(__webpack_exports__);
4877 +/* harmony export */ __webpack_require__.d(__webpack_exports__, {
4878 +/* harmony export */ "__DO_NOT_USE__ActionTypes": () => (/* binding */ ActionTypes),
4879 +/* harmony export */ "applyMiddleware": () => (/* binding */ applyMiddleware),
4880 +/* harmony export */ "bindActionCreators": () => (/* binding */ bindActionCreators),
4881 +/* harmony export */ "combineReducers": () => (/* binding */ combineReducers),
4882 +/* harmony export */ "compose": () => (/* binding */ compose),
4883 +/* harmony export */ "createStore": () => (/* binding */ createStore),
4884 +/* harmony export */ "legacy_createStore": () => (/* binding */ legacy_createStore)
4885 +/* harmony export */ });
4886 +/* 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");
4887 +
4888 +
1754 4889 /**
1755 - * @typedef {Object} Version
1756 - * @property {number} major1 The first number
1757 - * @property {number} major2 The second number
1758 - * @property {number} minor The third number
1759 - * @property {string} build The fourth number
4890 + * Adapted from React: https://github.com/facebook/react/blob/master/packages/shared/formatProdErrorMessage.js
4891 + *
4892 + * Do not require this module directly! Use normal throw error calls. These messages will be replaced with error codes
4893 + * during build.
4894 + * @param {number} code
1760 4895 */
4896 +function formatProdErrorMessage(code) {
4897 + 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. ';
4898 +}
1761 4899
1762 -var softDeprecated = function softDeprecated(name, version, replacement) {
1763 - if (elementorWebCliConfig.isDebug) {
1764 - deprecatedMessage('soft', name, version, replacement);
1765 - }
4900 +// Inlined version of the `symbol-observable` polyfill
4901 +var $$observable = (function () {
4902 + return typeof Symbol === 'function' && Symbol.observable || '@@observable';
4903 +})();
4904 +
4905 +/**
4906 + * These are private action types reserved by Redux.
4907 + * For any unknown actions, you must return the current state.
4908 + * If the current state is undefined, you must return the initial state.
4909 + * Do not reference these action types directly in your code.
4910 + */
4911 +var randomString = function randomString() {
4912 + return Math.random().toString(36).substring(7).split('').join('.');
1766 4913 };
1767 -var hardDeprecated = function hardDeprecated(name, version, replacement) {
1768 - deprecatedMessage('hard', name, version, replacement);
1769 -};
1770 -var deprecatedMessage = function deprecatedMessage(type, name, version, replacement) {
1771 - var message = "`".concat(name, "` is ").concat(type, " deprecated since ").concat(version);
1772 - if (replacement) {
1773 - message += " - Use `".concat(replacement, "` instead");
4914 +
4915 +var ActionTypes = {
4916 + INIT: "@@redux/INIT" + randomString(),
4917 + REPLACE: "@@redux/REPLACE" + randomString(),
4918 + PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() {
4919 + return "@@redux/PROBE_UNKNOWN_ACTION" + randomString();
1774 4920 }
1775 - _console.default.warn(message);
1776 4921 };
1777 -var Deprecation = exports["default"] = /*#__PURE__*/function () {
1778 - function Deprecation() {
1779 - (0, _classCallCheck2.default)(this, Deprecation);
4922 +
4923 +/**
4924 + * @param {any} obj The object to inspect.
4925 + * @returns {boolean} True if the argument appears to be a plain object.
4926 + */
4927 +function isPlainObject(obj) {
4928 + if (typeof obj !== 'object' || obj === null) return false;
4929 + var proto = obj;
4930 +
4931 + while (Object.getPrototypeOf(proto) !== null) {
4932 + proto = Object.getPrototypeOf(proto);
1780 4933 }
1781 - return (0, _createClass2.default)(Deprecation, null, [{
1782 - key: "deprecated",
1783 - value: function deprecated(name, version, replacement) {
1784 - if (this.isHardDeprecated(version)) {
1785 - hardDeprecated(name, version, replacement);
1786 - } else {
1787 - softDeprecated(name, version, replacement);
4934 +
4935 + return Object.getPrototypeOf(obj) === proto;
4936 +}
4937 +
4938 +// Inlined / shortened version of `kindOf` from https://github.com/jonschlinkert/kind-of
4939 +function miniKindOf(val) {
4940 + if (val === void 0) return 'undefined';
4941 + if (val === null) return 'null';
4942 + var type = typeof val;
4943 +
4944 + switch (type) {
4945 + case 'boolean':
4946 + case 'string':
4947 + case 'number':
4948 + case 'symbol':
4949 + case 'function':
4950 + {
4951 + return type;
1788 4952 }
4953 + }
4954 +
4955 + if (Array.isArray(val)) return 'array';
4956 + if (isDate(val)) return 'date';
4957 + if (isError(val)) return 'error';
4958 + var constructorName = ctorName(val);
4959 +
4960 + switch (constructorName) {
4961 + case 'Symbol':
4962 + case 'Promise':
4963 + case 'WeakMap':
4964 + case 'WeakSet':
4965 + case 'Map':
4966 + case 'Set':
4967 + return constructorName;
4968 + } // other
4969 +
4970 +
4971 + return type.slice(8, -1).toLowerCase().replace(/\s/g, '');
4972 +}
4973 +
4974 +function ctorName(val) {
4975 + return typeof val.constructor === 'function' ? val.constructor.name : null;
4976 +}
4977 +
4978 +function isError(val) {
4979 + return val instanceof Error || typeof val.message === 'string' && val.constructor && typeof val.constructor.stackTraceLimit === 'number';
4980 +}
4981 +
4982 +function isDate(val) {
4983 + if (val instanceof Date) return true;
4984 + return typeof val.toDateString === 'function' && typeof val.getDate === 'function' && typeof val.setDate === 'function';
4985 +}
4986 +
4987 +function kindOf(val) {
4988 + var typeOfVal = typeof val;
4989 +
4990 + if (true) {
4991 + typeOfVal = miniKindOf(val);
4992 + }
4993 +
4994 + return typeOfVal;
4995 +}
4996 +
4997 +/**
4998 + * @deprecated
4999 + *
5000 + * **We recommend using the `configureStore` method
5001 + * of the `@reduxjs/toolkit` package**, which replaces `createStore`.
5002 + *
5003 + * Redux Toolkit is our recommended approach for writing Redux logic today,
5004 + * including store setup, reducers, data fetching, and more.
5005 + *
5006 + * **For more details, please read this Redux docs page:**
5007 + * **https://redux.js.org/introduction/why-rtk-is-redux-today**
5008 + *
5009 + * `configureStore` from Redux Toolkit is an improved version of `createStore` that
5010 + * simplifies setup and helps avoid common bugs.
5011 + *
5012 + * You should not be using the `redux` core package by itself today, except for learning purposes.
5013 + * The `createStore` method from the core `redux` package will not be removed, but we encourage
5014 + * all users to migrate to using Redux Toolkit for all Redux code.
5015 + *
5016 + * If you want to use `createStore` without this visual deprecation warning, use
5017 + * the `legacy_createStore` import instead:
5018 + *
5019 + * `import { legacy_createStore as createStore} from 'redux'`
5020 + *
5021 + */
5022 +
5023 +function createStore(reducer, preloadedState, enhancer) {
5024 + var _ref2;
5025 +
5026 + if (typeof preloadedState === 'function' && typeof enhancer === 'function' || typeof enhancer === 'function' && typeof arguments[3] === 'function') {
5027 + 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.');
5028 + }
5029 +
5030 + if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {
5031 + enhancer = preloadedState;
5032 + preloadedState = undefined;
5033 + }
5034 +
5035 + if (typeof enhancer !== 'undefined') {
5036 + if (typeof enhancer !== 'function') {
5037 + throw new Error( false ? 0 : "Expected the enhancer to be a function. Instead, received: '" + kindOf(enhancer) + "'");
1789 5038 }
1790 5039
1791 - /**
1792 - * @param {string} version
1793 - *
1794 - * @return {Version}
1795 - */
1796 - }, {
1797 - key: "parseVersion",
1798 - value: function parseVersion(version) {
1799 - var versionParts = version.split('.');
1800 - if (versionParts.length < 3 || versionParts.length > 4) {
1801 - throw new RangeError('Invalid Semantic Version string provided');
5040 + return enhancer(createStore)(reducer, preloadedState);
5041 + }
5042 +
5043 + if (typeof reducer !== 'function') {
5044 + throw new Error( false ? 0 : "Expected the root reducer to be a function. Instead, received: '" + kindOf(reducer) + "'");
5045 + }
5046 +
5047 + var currentReducer = reducer;
5048 + var currentState = preloadedState;
5049 + var currentListeners = [];
5050 + var nextListeners = currentListeners;
5051 + var isDispatching = false;
5052 + /**
5053 + * This makes a shallow copy of currentListeners so we can use
5054 + * nextListeners as a temporary list while dispatching.
5055 + *
5056 + * This prevents any bugs around consumers calling
5057 + * subscribe/unsubscribe in the middle of a dispatch.
5058 + */
5059 +
5060 + function ensureCanMutateNextListeners() {
5061 + if (nextListeners === currentListeners) {
5062 + nextListeners = currentListeners.slice();
5063 + }
5064 + }
5065 + /**
5066 + * Reads the state tree managed by the store.
5067 + *
5068 + * @returns {any} The current state tree of your application.
5069 + */
5070 +
5071 +
5072 + function getState() {
5073 + if (isDispatching) {
5074 + 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.');
5075 + }
5076 +
5077 + return currentState;
5078 + }
5079 + /**
5080 + * Adds a change listener. It will be called any time an action is dispatched,
5081 + * and some part of the state tree may potentially have changed. You may then
5082 + * call `getState()` to read the current state tree inside the callback.
5083 + *
5084 + * You may call `dispatch()` from a change listener, with the following
5085 + * caveats:
5086 + *
5087 + * 1. The subscriptions are snapshotted just before every `dispatch()` call.
5088 + * If you subscribe or unsubscribe while the listeners are being invoked, this
5089 + * will not have any effect on the `dispatch()` that is currently in progress.
5090 + * However, the next `dispatch()` call, whether nested or not, will use a more
5091 + * recent snapshot of the subscription list.
5092 + *
5093 + * 2. The listener should not expect to see all state changes, as the state
5094 + * might have been updated multiple times during a nested `dispatch()` before
5095 + * the listener is called. It is, however, guaranteed that all subscribers
5096 + * registered before the `dispatch()` started will be called with the latest
5097 + * state by the time it exits.
5098 + *
5099 + * @param {Function} listener A callback to be invoked on every dispatch.
5100 + * @returns {Function} A function to remove this change listener.
5101 + */
5102 +
5103 +
5104 + function subscribe(listener) {
5105 + if (typeof listener !== 'function') {
5106 + throw new Error( false ? 0 : "Expected the listener to be a function. Instead, received: '" + kindOf(listener) + "'");
5107 + }
5108 +
5109 + if (isDispatching) {
5110 + 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.');
5111 + }
5112 +
5113 + var isSubscribed = true;
5114 + ensureCanMutateNextListeners();
5115 + nextListeners.push(listener);
5116 + return function unsubscribe() {
5117 + if (!isSubscribed) {
5118 + return;
1802 5119 }
1803 - var _versionParts = (0, _slicedToArray2.default)(versionParts, 4),
1804 - major1 = _versionParts[0],
1805 - major2 = _versionParts[1],
1806 - minor = _versionParts[2],
1807 - _versionParts$ = _versionParts[3],
1808 - build = _versionParts$ === void 0 ? '' : _versionParts$;
1809 - return {
1810 - major1: parseInt(major1),
1811 - major2: parseInt(major2),
1812 - minor: parseInt(minor),
1813 - build: build
1814 - };
5120 +
5121 + if (isDispatching) {
5122 + 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.');
5123 + }
5124 +
5125 + isSubscribed = false;
5126 + ensureCanMutateNextListeners();
5127 + var index = nextListeners.indexOf(listener);
5128 + nextListeners.splice(index, 1);
5129 + currentListeners = null;
5130 + };
5131 + }
5132 + /**
5133 + * Dispatches an action. It is the only way to trigger a state change.
5134 + *
5135 + * The `reducer` function, used to create the store, will be called with the
5136 + * current state tree and the given `action`. Its return value will
5137 + * be considered the **next** state of the tree, and the change listeners
5138 + * will be notified.
5139 + *
5140 + * The base implementation only supports plain object actions. If you want to
5141 + * dispatch a Promise, an Observable, a thunk, or something else, you need to
5142 + * wrap your store creating function into the corresponding middleware. For
5143 + * example, see the documentation for the `redux-thunk` package. Even the
5144 + * middleware will eventually dispatch plain object actions using this method.
5145 + *
5146 + * @param {Object} action A plain object representing “what changed”. It is
5147 + * a good idea to keep actions serializable so you can record and replay user
5148 + * sessions, or use the time travelling `redux-devtools`. An action must have
5149 + * a `type` property which may not be `undefined`. It is a good idea to use
5150 + * string constants for action types.
5151 + *
5152 + * @returns {Object} For convenience, the same action object you dispatched.
5153 + *
5154 + * Note that, if you use a custom middleware, it may wrap `dispatch()` to
5155 + * return something else (for example, a Promise you can await).
5156 + */
5157 +
5158 +
5159 + function dispatch(action) {
5160 + if (!isPlainObject(action)) {
5161 + 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.");
1815 5162 }
1816 5163
1817 - /**
1818 - * Get total of major.
1819 - *
1820 - * 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,
1821 - * versions with major2 more then 9 will be added to total.
1822 - *
1823 - * @param {Version} versionObj
1824 - *
1825 - * @return {number}
1826 - */
1827 - }, {
1828 - key: "getTotalMajor",
1829 - value: function getTotalMajor(versionObj) {
1830 - var total = parseInt("".concat(versionObj.major1).concat(versionObj.major2, "0"));
1831 - total = Number((total / 10).toFixed(0));
1832 - if (versionObj.major2 > 9) {
1833 - total = versionObj.major2 - 9;
1834 - }
1835 - return total;
5164 + if (typeof action.type === 'undefined') {
5165 + throw new Error( false ? 0 : 'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');
1836 5166 }
1837 5167
1838 - /**
1839 - * @param {string} version1
1840 - * @param {string} version2
1841 - *
1842 - * @return {number}
1843 - */
1844 - }, {
1845 - key: "compareVersion",
1846 - value: function compareVersion(version1, version2) {
1847 - var _this = this;
1848 - return [this.parseVersion(version1), this.parseVersion(version2)].map(function (versionObj) {
1849 - return _this.getTotalMajor(versionObj);
1850 - }).reduce(function (acc, major) {
1851 - return acc - major;
1852 - });
5168 + if (isDispatching) {
5169 + throw new Error( false ? 0 : 'Reducers may not dispatch actions.');
1853 5170 }
1854 5171
1855 - /**
1856 - * @param {string} version
1857 - *
1858 - * @return {boolean}
1859 - */
1860 - }, {
1861 - key: "isSoftDeprecated",
1862 - value: function isSoftDeprecated(version) {
1863 - var total = this.compareVersion(version, elementorWebCliConfig.version);
1864 - return total <= 4;
5172 + try {
5173 + isDispatching = true;
5174 + currentState = currentReducer(currentState, action);
5175 + } finally {
5176 + isDispatching = false;
1865 5177 }
1866 5178
1867 - /**
1868 - * @param {string} version
1869 - * @return {boolean}
1870 - */
1871 - }, {
1872 - key: "isHardDeprecated",
1873 - value: function isHardDeprecated(version) {
1874 - var total = this.compareVersion(version, elementorWebCliConfig.version);
1875 - return total < 0 || total >= 8;
5179 + var listeners = currentListeners = nextListeners;
5180 +
5181 + for (var i = 0; i < listeners.length; i++) {
5182 + var listener = listeners[i];
5183 + listener();
1876 5184 }
1877 - }]);
1878 -}();
1879 5185
1880 -/***/ }),
5186 + return action;
5187 + }
5188 + /**
5189 + * Replaces the reducer currently used by the store to calculate the state.
5190 + *
5191 + * You might need this if your app implements code splitting and you want to
5192 + * load some of the reducers dynamically. You might also need this if you
5193 + * implement a hot reloading mechanism for Redux.
5194 + *
5195 + * @param {Function} nextReducer The reducer for the store to use instead.
5196 + * @returns {void}
5197 + */
1881 5198
1882 -/***/ "../modules/web-cli/assets/js/utils/force-method-implementation.js":
1883 -/*!*************************************************************************!*\
1884 - !*** ../modules/web-cli/assets/js/utils/force-method-implementation.js ***!
1885 - \*************************************************************************/
1886 -/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1887 5199
1888 -"use strict";
5200 + function replaceReducer(nextReducer) {
5201 + if (typeof nextReducer !== 'function') {
5202 + throw new Error( false ? 0 : "Expected the nextReducer to be a function. Instead, received: '" + kindOf(nextReducer));
5203 + }
1889 5204
5205 + currentReducer = nextReducer; // This action has a similiar effect to ActionTypes.INIT.
5206 + // Any reducers that existed in both the new and old rootReducer
5207 + // will receive the previous state. This effectively populates
5208 + // the new state tree with any relevant data from the old one.
1890 5209
1891 -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
1892 -Object.defineProperty(exports, "__esModule", ({
1893 - value: true
1894 -}));
1895 -exports["default"] = exports.ForceMethodImplementation = void 0;
1896 -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
1897 -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
1898 -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
1899 -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
1900 -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
1901 -var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/wrapNativeSuper */ "../node_modules/@babel/runtime/helpers/wrapNativeSuper.js"));
1902 -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)); }
1903 -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
1904 -// TODO: Copied from `assets/dev/js/modules/imports/force-method-implementation.js`;
1905 -var ForceMethodImplementation = exports.ForceMethodImplementation = /*#__PURE__*/function (_Error) {
1906 - function ForceMethodImplementation() {
1907 - var _this;
1908 - var info = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1909 - (0, _classCallCheck2.default)(this, ForceMethodImplementation);
1910 - _this = _callSuper(this, ForceMethodImplementation, ["".concat(info.isStatic ? 'static ' : '').concat(info.fullName, "() should be implemented, please provide '").concat(info.functionName || info.fullName, "' functionality.")]);
1911 - Error.captureStackTrace(_this, ForceMethodImplementation);
1912 - return _this;
5210 + dispatch({
5211 + type: ActionTypes.REPLACE
5212 + });
1913 5213 }
1914 - (0, _inherits2.default)(ForceMethodImplementation, _Error);
1915 - return (0, _createClass2.default)(ForceMethodImplementation);
1916 -}(/*#__PURE__*/(0, _wrapNativeSuper2.default)(Error));
1917 -var _default = exports["default"] = function _default() {
1918 - var stack = Error().stack,
1919 - caller = stack.split('\n')[2].trim(),
1920 - callerName = caller.startsWith('at new') ? 'constructor' : caller.split(' ')[1],
1921 - info = {};
1922 - info.functionName = callerName;
1923 - info.fullName = callerName;
1924 - if (info.functionName.includes('.')) {
1925 - var parts = info.functionName.split('.');
1926 - info.className = parts[0];
1927 - info.functionName = parts[1];
1928 - } else {
1929 - info.isStatic = true;
5214 + /**
5215 + * Interoperability point for observable/reactive libraries.
5216 + * @returns {observable} A minimal observable of state changes.
5217 + * For more information, see the observable proposal:
5218 + * https://github.com/tc39/proposal-observable
5219 + */
5220 +
5221 +
5222 + function observable() {
5223 + var _ref;
5224 +
5225 + var outerSubscribe = subscribe;
5226 + return _ref = {
5227 + /**
5228 + * The minimal observable subscription method.
5229 + * @param {Object} observer Any object that can be used as an observer.
5230 + * The observer object should have a `next` method.
5231 + * @returns {subscription} An object with an `unsubscribe` method that can
5232 + * be used to unsubscribe the observable from the store, and prevent further
5233 + * emission of values from the observable.
5234 + */
5235 + subscribe: function subscribe(observer) {
5236 + if (typeof observer !== 'object' || observer === null) {
5237 + throw new Error( false ? 0 : "Expected the observer to be an object. Instead, received: '" + kindOf(observer) + "'");
5238 + }
5239 +
5240 + function observeState() {
5241 + if (observer.next) {
5242 + observer.next(getState());
5243 + }
5244 + }
5245 +
5246 + observeState();
5247 + var unsubscribe = outerSubscribe(observeState);
5248 + return {
5249 + unsubscribe: unsubscribe
5250 + };
5251 + }
5252 + }, _ref[$$observable] = function () {
5253 + return this;
5254 + }, _ref;
5255 + } // When a store is created, an "INIT" action is dispatched so that every
5256 + // reducer returns their initial state. This effectively populates
5257 + // the initial state tree.
5258 +
5259 +
5260 + dispatch({
5261 + type: ActionTypes.INIT
5262 + });
5263 + return _ref2 = {
5264 + dispatch: dispatch,
5265 + subscribe: subscribe,
5266 + getState: getState,
5267 + replaceReducer: replaceReducer
5268 + }, _ref2[$$observable] = observable, _ref2;
5269 +}
5270 +/**
5271 + * Creates a Redux store that holds the state tree.
5272 + *
5273 + * **We recommend using `configureStore` from the
5274 + * `@reduxjs/toolkit` package**, which replaces `createStore`:
5275 + * **https://redux.js.org/introduction/why-rtk-is-redux-today**
5276 + *
5277 + * The only way to change the data in the store is to call `dispatch()` on it.
5278 + *
5279 + * There should only be a single store in your app. To specify how different
5280 + * parts of the state tree respond to actions, you may combine several reducers
5281 + * into a single reducer function by using `combineReducers`.
5282 + *
5283 + * @param {Function} reducer A function that returns the next state tree, given
5284 + * the current state tree and the action to handle.
5285 + *
5286 + * @param {any} [preloadedState] The initial state. You may optionally specify it
5287 + * to hydrate the state from the server in universal apps, or to restore a
5288 + * previously serialized user session.
5289 + * If you use `combineReducers` to produce the root reducer function, this must be
5290 + * an object with the same shape as `combineReducers` keys.
5291 + *
5292 + * @param {Function} [enhancer] The store enhancer. You may optionally specify it
5293 + * to enhance the store with third-party capabilities such as middleware,
5294 + * time travel, persistence, etc. The only store enhancer that ships with Redux
5295 + * is `applyMiddleware()`.
5296 + *
5297 + * @returns {Store} A Redux store that lets you read the state, dispatch actions
5298 + * and subscribe to changes.
5299 + */
5300 +
5301 +var legacy_createStore = createStore;
5302 +
5303 +/**
5304 + * Prints a warning in the console if it exists.
5305 + *
5306 + * @param {String} message The warning message.
5307 + * @returns {void}
5308 + */
5309 +function warning(message) {
5310 + /* eslint-disable no-console */
5311 + if (typeof console !== 'undefined' && typeof console.error === 'function') {
5312 + console.error(message);
1930 5313 }
1931 - throw new ForceMethodImplementation(info);
1932 -};
5314 + /* eslint-enable no-console */
1933 5315
1934 -/***/ }),
1935 5316
1936 -/***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js":
1937 -/*!******************************************************************!*\
1938 - !*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
1939 - \******************************************************************/
1940 -/***/ ((module) => {
5317 + try {
5318 + // This error was thrown as a convenience so that if you enable
5319 + // "break on all exceptions" in your console,
5320 + // it would pause the execution at this line.
5321 + throw new Error(message);
5322 + } catch (e) {} // eslint-disable-line no-empty
1941 5323
1942 -function _arrayLikeToArray(r, a) {
1943 - (null == a || a > r.length) && (a = r.length);
1944 - for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
1945 - return n;
1946 5324 }
1947 -module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
1948 5325
1949 -/***/ }),
5326 +function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {
5327 + var reducerKeys = Object.keys(reducers);
5328 + var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer';
1950 5329
1951 -/***/ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js":
1952 -/*!****************************************************************!*\
1953 - !*** ../node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
1954 - \****************************************************************/
1955 -/***/ ((module) => {
5330 + if (reducerKeys.length === 0) {
5331 + return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';
5332 + }
1956 5333
1957 -function _arrayWithHoles(r) {
1958 - if (Array.isArray(r)) return r;
5334 + if (!isPlainObject(inputState)) {
5335 + return "The " + argumentName + " has unexpected type of \"" + kindOf(inputState) + "\". Expected argument to be an object with the following " + ("keys: \"" + reducerKeys.join('", "') + "\"");
5336 + }
5337 +
5338 + var unexpectedKeys = Object.keys(inputState).filter(function (key) {
5339 + return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key];
5340 + });
5341 + unexpectedKeys.forEach(function (key) {
5342 + unexpectedKeyCache[key] = true;
5343 + });
5344 + if (action && action.type === ActionTypes.REPLACE) return;
5345 +
5346 + if (unexpectedKeys.length > 0) {
5347 + 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.");
5348 + }
1959 5349 }
1960 -module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
1961 5350
1962 -/***/ }),
5351 +function assertReducerShape(reducers) {
5352 + Object.keys(reducers).forEach(function (key) {
5353 + var reducer = reducers[key];
5354 + var initialState = reducer(undefined, {
5355 + type: ActionTypes.INIT
5356 + });
1963 5357
1964 -/***/ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js":
1965 -/*!***********************************************************************!*\
1966 - !*** ../node_modules/@babel/runtime/helpers/assertThisInitialized.js ***!
1967 - \***********************************************************************/
1968 -/***/ ((module) => {
5358 + if (typeof initialState === 'undefined') {
5359 + 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.");
5360 + }
1969 5361
1970 -function _assertThisInitialized(e) {
1971 - if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1972 - return e;
5362 + if (typeof reducer(undefined, {
5363 + type: ActionTypes.PROBE_UNKNOWN_ACTION()
5364 + }) === 'undefined') {
5365 + 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.");
5366 + }
5367 + });
1973 5368 }
1974 -module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports;
5369 +/**
5370 + * Turns an object whose values are different reducer functions, into a single
5371 + * reducer function. It will call every child reducer, and gather their results
5372 + * into a single state object, whose keys correspond to the keys of the passed
5373 + * reducer functions.
5374 + *
5375 + * @param {Object} reducers An object whose values correspond to different
5376 + * reducer functions that need to be combined into one. One handy way to obtain
5377 + * it is to use ES6 `import * as reducers` syntax. The reducers may never return
5378 + * undefined for any action. Instead, they should return their initial state
5379 + * if the state passed to them was undefined, and the current state for any
5380 + * unrecognized action.
5381 + *
5382 + * @returns {Function} A reducer function that invokes every reducer inside the
5383 + * passed object, and builds a state object with the same shape.
5384 + */
1975 5385
1976 -/***/ }),
1977 5386
1978 -/***/ "../node_modules/@babel/runtime/helpers/classCallCheck.js":
1979 -/*!****************************************************************!*\
1980 - !*** ../node_modules/@babel/runtime/helpers/classCallCheck.js ***!
1981 - \****************************************************************/
1982 -/***/ ((module) => {
5387 +function combineReducers(reducers) {
5388 + var reducerKeys = Object.keys(reducers);
5389 + var finalReducers = {};
1983 5390
1984 -function _classCallCheck(a, n) {
1985 - if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
5391 + for (var i = 0; i < reducerKeys.length; i++) {
5392 + var key = reducerKeys[i];
5393 +
5394 + if (true) {
5395 + if (typeof reducers[key] === 'undefined') {
5396 + warning("No reducer provided for key \"" + key + "\"");
5397 + }
5398 + }
5399 +
5400 + if (typeof reducers[key] === 'function') {
5401 + finalReducers[key] = reducers[key];
5402 + }
5403 + }
5404 +
5405 + var finalReducerKeys = Object.keys(finalReducers); // This is used to make sure we don't warn about the same
5406 + // keys multiple times.
5407 +
5408 + var unexpectedKeyCache;
5409 +
5410 + if (true) {
5411 + unexpectedKeyCache = {};
5412 + }
5413 +
5414 + var shapeAssertionError;
5415 +
5416 + try {
5417 + assertReducerShape(finalReducers);
5418 + } catch (e) {
5419 + shapeAssertionError = e;
5420 + }
5421 +
5422 + return function combination(state, action) {
5423 + if (state === void 0) {
5424 + state = {};
5425 + }
5426 +
5427 + if (shapeAssertionError) {
5428 + throw shapeAssertionError;
5429 + }
5430 +
5431 + if (true) {
5432 + var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);
5433 +
5434 + if (warningMessage) {
5435 + warning(warningMessage);
5436 + }
5437 + }
5438 +
5439 + var hasChanged = false;
5440 + var nextState = {};
5441 +
5442 + for (var _i = 0; _i < finalReducerKeys.length; _i++) {
5443 + var _key = finalReducerKeys[_i];
5444 + var reducer = finalReducers[_key];
5445 + var previousStateForKey = state[_key];
5446 + var nextStateForKey = reducer(previousStateForKey, action);
5447 +
5448 + if (typeof nextStateForKey === 'undefined') {
5449 + var actionType = action && action.type;
5450 + 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.");
5451 + }
5452 +
5453 + nextState[_key] = nextStateForKey;
5454 + hasChanged = hasChanged || nextStateForKey !== previousStateForKey;
5455 + }
5456 +
5457 + hasChanged = hasChanged || finalReducerKeys.length !== Object.keys(state).length;
5458 + return hasChanged ? nextState : state;
5459 + };
1986 5460 }
1987 -module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
1988 5461
1989 -/***/ }),
5462 +function bindActionCreator(actionCreator, dispatch) {
5463 + return function () {
5464 + return dispatch(actionCreator.apply(this, arguments));
5465 + };
5466 +}
5467 +/**
5468 + * Turns an object whose values are action creators, into an object with the
5469 + * same keys, but with every function wrapped into a `dispatch` call so they
5470 + * may be invoked directly. This is just a convenience method, as you can call
5471 + * `store.dispatch(MyActionCreators.doSomething())` yourself just fine.
5472 + *
5473 + * For convenience, you can also pass an action creator as the first argument,
5474 + * and get a dispatch wrapped function in return.
5475 + *
5476 + * @param {Function|Object} actionCreators An object whose values are action
5477 + * creator functions. One handy way to obtain it is to use ES6 `import * as`
5478 + * syntax. You may also pass a single function.
5479 + *
5480 + * @param {Function} dispatch The `dispatch` function available on your Redux
5481 + * store.
5482 + *
5483 + * @returns {Function|Object} The object mimicking the original object, but with
5484 + * every action creator wrapped into the `dispatch` call. If you passed a
5485 + * function as `actionCreators`, the return value will also be a single
5486 + * function.
5487 + */
1990 5488
1991 -/***/ "../node_modules/@babel/runtime/helpers/construct.js":
1992 -/*!***********************************************************!*\
1993 - !*** ../node_modules/@babel/runtime/helpers/construct.js ***!
1994 - \***********************************************************/
1995 -/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1996 5489
1997 -var isNativeReflectConstruct = __webpack_require__(/*! ./isNativeReflectConstruct.js */ "../node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js");
1998 -var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js");
1999 -function _construct(t, e, r) {
2000 - if (isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);
2001 - var o = [null];
2002 - o.push.apply(o, e);
2003 - var p = new (t.bind.apply(t, o))();
2004 - return r && setPrototypeOf(p, r.prototype), p;
5490 +function bindActionCreators(actionCreators, dispatch) {
5491 + if (typeof actionCreators === 'function') {
5492 + return bindActionCreator(actionCreators, dispatch);
5493 + }
5494 +
5495 + if (typeof actionCreators !== 'object' || actionCreators === null) {
5496 + 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\"?");
5497 + }
5498 +
5499 + var boundActionCreators = {};
5500 +
5501 + for (var key in actionCreators) {
5502 + var actionCreator = actionCreators[key];
5503 +
5504 + if (typeof actionCreator === 'function') {
5505 + boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);
5506 + }
5507 + }
5508 +
5509 + return boundActionCreators;
2005 5510 }
2006 -module.exports = _construct, module.exports.__esModule = true, module.exports["default"] = module.exports;
2007 5511
2008 -/***/ }),
5512 +/**
5513 + * Composes single-argument functions from right to left. The rightmost
5514 + * function can take multiple arguments as it provides the signature for
5515 + * the resulting composite function.
5516 + *
5517 + * @param {...Function} funcs The functions to compose.
5518 + * @returns {Function} A function obtained by composing the argument functions
5519 + * from right to left. For example, compose(f, g, h) is identical to doing
5520 + * (...args) => f(g(h(...args))).
5521 + */
5522 +function compose() {
5523 + for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {
5524 + funcs[_key] = arguments[_key];
5525 + }
2009 5526
2010 -/***/ "../node_modules/@babel/runtime/helpers/createClass.js":
2011 -/*!*************************************************************!*\
2012 - !*** ../node_modules/@babel/runtime/helpers/createClass.js ***!
2013 - \*************************************************************/
2014 -/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5527 + if (funcs.length === 0) {
5528 + return function (arg) {
5529 + return arg;
5530 + };
5531 + }
2015 5532
2016 -var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js");
2017 -function _defineProperties(e, r) {
2018 - for (var t = 0; t < r.length; t++) {
2019 - var o = r[t];
2020 - o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o);
5533 + if (funcs.length === 1) {
5534 + return funcs[0];
2021 5535 }
5536 +
5537 + return funcs.reduce(function (a, b) {
5538 + return function () {
5539 + return a(b.apply(void 0, arguments));
5540 + };
5541 + });
2022 5542 }
2023 -function _createClass(e, r, t) {
2024 - return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
2025 - writable: !1
2026 - }), e;
5543 +
5544 +/**
5545 + * Creates a store enhancer that applies middleware to the dispatch method
5546 + * of the Redux store. This is handy for a variety of tasks, such as expressing
5547 + * asynchronous actions in a concise manner, or logging every action payload.
5548 + *
5549 + * See `redux-thunk` package as an example of the Redux middleware.
5550 + *
5551 + * Because middleware is potentially asynchronous, this should be the first
5552 + * store enhancer in the composition chain.
5553 + *
5554 + * Note that each middleware will be given the `dispatch` and `getState` functions
5555 + * as named arguments.
5556 + *
5557 + * @param {...Function} middlewares The middleware chain to be applied.
5558 + * @returns {Function} A store enhancer applying the middleware.
5559 + */
5560 +
5561 +function applyMiddleware() {
5562 + for (var _len = arguments.length, middlewares = new Array(_len), _key = 0; _key < _len; _key++) {
5563 + middlewares[_key] = arguments[_key];
5564 + }
5565 +
5566 + return function (createStore) {
5567 + return function () {
5568 + var store = createStore.apply(void 0, arguments);
5569 +
5570 + var _dispatch = function dispatch() {
5571 + throw new Error( false ? 0 : 'Dispatching while constructing your middleware is not allowed. ' + 'Other middleware would not be applied to this dispatch.');
5572 + };
5573 +
5574 + var middlewareAPI = {
5575 + getState: store.getState,
5576 + dispatch: function dispatch() {
5577 + return _dispatch.apply(void 0, arguments);
5578 + }
5579 + };
5580 + var chain = middlewares.map(function (middleware) {
5581 + return middleware(middlewareAPI);
5582 + });
5583 + _dispatch = compose.apply(void 0, chain)(store.dispatch);
5584 + return (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__["default"])((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__["default"])({}, store), {}, {
5585 + dispatch: _dispatch
5586 + });
5587 + };
5588 + };
2027 5589 }
2028 -module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
2029 5590
2030 -/***/ }),
5591 +/*
5592 + * This is a dummy function to check if the function name has been altered by minification.
5593 + * If the function has been minified and NODE_ENV !== 'production', warn the user.
5594 + */
2031 5595
2032 -/***/ "../node_modules/@babel/runtime/helpers/defineProperty.js":
2033 -/*!****************************************************************!*\
2034 - !*** ../node_modules/@babel/runtime/helpers/defineProperty.js ***!
2035 - \****************************************************************/
2036 -/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5596 +function isCrushed() {}
2037 5597
2038 -var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js");
2039 -function _defineProperty(e, r, t) {
2040 - return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
2041 - value: t,
2042 - enumerable: !0,
2043 - configurable: !0,
2044 - writable: !0
2045 - }) : e[r] = t, e;
5598 +if ( true && typeof isCrushed.name === 'string' && isCrushed.name !== 'isCrushed') {
5599 + warning('You are currently using minified code outside of NODE_ENV === "production". ' + 'This means that you are running a slower development build of Redux. ' + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + 'or setting mode to production in webpack (https://webpack.js.org/concepts/mode/) ' + 'to ensure you have the correct code for your production build.');
2046 5600 }
2047 -module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
2048 5601
5602 +
5603 +
5604 +
2049 5605 /***/ }),
2050 5606
2051 -/***/ "../node_modules/@babel/runtime/helpers/get.js":
5607 +/***/ "../node_modules/reselect/es/defaultMemoize.js":
2052 5608 /*!*****************************************************!*\
2053 - !*** ../node_modules/@babel/runtime/helpers/get.js ***!
5609 + !*** ../node_modules/reselect/es/defaultMemoize.js ***!
2054 5610 \*****************************************************/
2055 -/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5611 +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2056 5612
2057 -var superPropBase = __webpack_require__(/*! ./superPropBase.js */ "../node_modules/@babel/runtime/helpers/superPropBase.js");
2058 -function _get() {
2059 - return module.exports = _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) {
2060 - var p = superPropBase(e, t);
2061 - if (p) {
2062 - var n = Object.getOwnPropertyDescriptor(p, t);
2063 - return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value;
5613 +"use strict";
5614 +__webpack_require__.r(__webpack_exports__);
5615 +/* harmony export */ __webpack_require__.d(__webpack_exports__, {
5616 +/* harmony export */ "createCacheKeyComparator": () => (/* binding */ createCacheKeyComparator),
5617 +/* harmony export */ "defaultEqualityCheck": () => (/* binding */ defaultEqualityCheck),
5618 +/* harmony export */ "defaultMemoize": () => (/* binding */ defaultMemoize)
5619 +/* harmony export */ });
5620 +// Cache implementation based on Erik Rasmussen's `lru-memoize`:
5621 +// https://github.com/erikras/lru-memoize
5622 +var NOT_FOUND = 'NOT_FOUND';
5623 +
5624 +function createSingletonCache(equals) {
5625 + var entry;
5626 + return {
5627 + get: function get(key) {
5628 + if (entry && equals(entry.key, key)) {
5629 + return entry.value;
5630 + }
5631 +
5632 + return NOT_FOUND;
5633 + },
5634 + put: function put(key, value) {
5635 + entry = {
5636 + key: key,
5637 + value: value
5638 + };
5639 + },
5640 + getEntries: function getEntries() {
5641 + return entry ? [entry] : [];
5642 + },
5643 + clear: function clear() {
5644 + entry = undefined;
2064 5645 }
2065 - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _get.apply(null, arguments);
5646 + };
2066 5647 }
2067 -module.exports = _get, module.exports.__esModule = true, module.exports["default"] = module.exports;
2068 5648
2069 -/***/ }),
5649 +function createLruCache(maxSize, equals) {
5650 + var entries = [];
2070 5651
2071 -/***/ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js":
2072 -/*!****************************************************************!*\
2073 - !*** ../node_modules/@babel/runtime/helpers/getPrototypeOf.js ***!
2074 - \****************************************************************/
2075 -/***/ ((module) => {
5652 + function get(key) {
5653 + var cacheIndex = entries.findIndex(function (entry) {
5654 + return equals(key, entry.key);
5655 + }); // We found a cached entry
2076 5656
2077 -function _getPrototypeOf(t) {
2078 - return module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
2079 - return t.__proto__ || Object.getPrototypeOf(t);
2080 - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _getPrototypeOf(t);
2081 -}
2082 -module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
5657 + if (cacheIndex > -1) {
5658 + var entry = entries[cacheIndex]; // Cached entry not at top of cache, move it to the top
2083 5659
2084 -/***/ }),
5660 + if (cacheIndex > 0) {
5661 + entries.splice(cacheIndex, 1);
5662 + entries.unshift(entry);
5663 + }
2085 5664
2086 -/***/ "../node_modules/@babel/runtime/helpers/inherits.js":
2087 -/*!**********************************************************!*\
2088 - !*** ../node_modules/@babel/runtime/helpers/inherits.js ***!
2089 - \**********************************************************/
2090 -/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5665 + return entry.value;
5666 + } // No entry found in cache, return sentinel
2091 5667
2092 -var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js");
2093 -function _inherits(t, e) {
2094 - if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
2095 - t.prototype = Object.create(e && e.prototype, {
2096 - constructor: {
2097 - value: t,
2098 - writable: !0,
2099 - configurable: !0
5668 +
5669 + return NOT_FOUND;
5670 + }
5671 +
5672 + function put(key, value) {
5673 + if (get(key) === NOT_FOUND) {
5674 + // TODO Is unshift slow?
5675 + entries.unshift({
5676 + key: key,
5677 + value: value
5678 + });
5679 +
5680 + if (entries.length > maxSize) {
5681 + entries.pop();
5682 + }
2100 5683 }
2101 - }), Object.defineProperty(t, "prototype", {
2102 - writable: !1
2103 - }), e && setPrototypeOf(t, e);
5684 + }
5685 +
5686 + function getEntries() {
5687 + return entries;
5688 + }
5689 +
5690 + function clear() {
5691 + entries = [];
5692 + }
5693 +
5694 + return {
5695 + get: get,
5696 + put: put,
5697 + getEntries: getEntries,
5698 + clear: clear
5699 + };
2104 5700 }
2105 -module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports;
2106 5701
2107 -/***/ }),
5702 +var defaultEqualityCheck = function defaultEqualityCheck(a, b) {
5703 + return a === b;
5704 +};
5705 +function createCacheKeyComparator(equalityCheck) {
5706 + return function areArgumentsShallowlyEqual(prev, next) {
5707 + if (prev === null || next === null || prev.length !== next.length) {
5708 + return false;
5709 + } // Do this in a for loop (and not a `forEach` or an `every`) so we can determine equality as fast as possible.
2108 5710
2109 -/***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js":
2110 -/*!***********************************************************************!*\
2111 - !*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
2112 - \***********************************************************************/
2113 -/***/ ((module) => {
2114 5711
2115 -function _interopRequireDefault(e) {
2116 - return e && e.__esModule ? e : {
2117 - "default": e
5712 + var length = prev.length;
5713 +
5714 + for (var i = 0; i < length; i++) {
5715 + if (!equalityCheck(prev[i], next[i])) {
5716 + return false;
5717 + }
5718 + }
5719 +
5720 + return true;
2118 5721 };
2119 5722 }
2120 -module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
5723 +// defaultMemoize now supports a configurable cache size with LRU behavior,
5724 +// and optional comparison of the result value with existing values
5725 +function defaultMemoize(func, equalityCheckOrOptions) {
5726 + var providedOptions = typeof equalityCheckOrOptions === 'object' ? equalityCheckOrOptions : {
5727 + equalityCheck: equalityCheckOrOptions
5728 + };
5729 + var _providedOptions$equa = providedOptions.equalityCheck,
5730 + equalityCheck = _providedOptions$equa === void 0 ? defaultEqualityCheck : _providedOptions$equa,
5731 + _providedOptions$maxS = providedOptions.maxSize,
5732 + maxSize = _providedOptions$maxS === void 0 ? 1 : _providedOptions$maxS,
5733 + resultEqualityCheck = providedOptions.resultEqualityCheck;
5734 + var comparator = createCacheKeyComparator(equalityCheck);
5735 + var cache = maxSize === 1 ? createSingletonCache(comparator) : createLruCache(maxSize, comparator); // we reference arguments instead of spreading them for performance reasons
2121 5736
2122 -/***/ }),
5737 + function memoized() {
5738 + var value = cache.get(arguments);
2123 5739
2124 -/***/ "../node_modules/@babel/runtime/helpers/isNativeFunction.js":
2125 -/*!******************************************************************!*\
2126 - !*** ../node_modules/@babel/runtime/helpers/isNativeFunction.js ***!
2127 - \******************************************************************/
2128 -/***/ ((module) => {
5740 + if (value === NOT_FOUND) {
5741 + // @ts-ignore
5742 + value = func.apply(null, arguments);
2129 5743
2130 -function _isNativeFunction(t) {
2131 - try {
2132 - return -1 !== Function.toString.call(t).indexOf("[native code]");
2133 - } catch (n) {
2134 - return "function" == typeof t;
5744 + if (resultEqualityCheck) {
5745 + var entries = cache.getEntries();
5746 + var matchingEntry = entries.find(function (entry) {
5747 + return resultEqualityCheck(entry.value, value);
5748 + });
5749 +
5750 + if (matchingEntry) {
5751 + value = matchingEntry.value;
5752 + }
5753 + }
5754 +
5755 + cache.put(arguments, value);
5756 + }
5757 +
5758 + return value;
2135 5759 }
5760 +
5761 + memoized.clearCache = function () {
5762 + return cache.clear();
5763 + };
5764 +
5765 + return memoized;
2136 5766 }
2137 -module.exports = _isNativeFunction, module.exports.__esModule = true, module.exports["default"] = module.exports;
2138 5767
2139 5768 /***/ }),
2140 5769
2141 -/***/ "../node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js":
2142 -/*!**************************************************************************!*\
2143 - !*** ../node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js ***!
2144 - \**************************************************************************/
2145 -/***/ ((module) => {
5770 +/***/ "../node_modules/reselect/es/index.js":
5771 +/*!********************************************!*\
5772 + !*** ../node_modules/reselect/es/index.js ***!
5773 + \********************************************/
5774 +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2146 5775
2147 -function _isNativeReflectConstruct() {
2148 - try {
2149 - var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
2150 - } catch (t) {}
2151 - return (module.exports = _isNativeReflectConstruct = function _isNativeReflectConstruct() {
2152 - return !!t;
2153 - }, module.exports.__esModule = true, module.exports["default"] = module.exports)();
2154 -}
2155 -module.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports["default"] = module.exports;
5776 +"use strict";
5777 +__webpack_require__.r(__webpack_exports__);
5778 +/* harmony export */ __webpack_require__.d(__webpack_exports__, {
5779 +/* harmony export */ "createSelector": () => (/* binding */ createSelector),
5780 +/* harmony export */ "createSelectorCreator": () => (/* binding */ createSelectorCreator),
5781 +/* harmony export */ "createStructuredSelector": () => (/* binding */ createStructuredSelector),
5782 +/* harmony export */ "defaultEqualityCheck": () => (/* reexport safe */ _defaultMemoize__WEBPACK_IMPORTED_MODULE_0__.defaultEqualityCheck),
5783 +/* harmony export */ "defaultMemoize": () => (/* reexport safe */ _defaultMemoize__WEBPACK_IMPORTED_MODULE_0__.defaultMemoize)
5784 +/* harmony export */ });
5785 +/* harmony import */ var _defaultMemoize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultMemoize */ "../node_modules/reselect/es/defaultMemoize.js");
2156 5786
2157 -/***/ }),
2158 5787
2159 -/***/ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js":
2160 -/*!**********************************************************************!*\
2161 - !*** ../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
2162 - \**********************************************************************/
2163 -/***/ ((module) => {
2164 5788
2165 -function _iterableToArrayLimit(r, l) {
2166 - var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
2167 - if (null != t) {
2168 - var e,
2169 - n,
2170 - i,
2171 - u,
2172 - a = [],
2173 - f = !0,
2174 - o = !1;
2175 - try {
2176 - if (i = (t = t.call(r)).next, 0 === l) {
2177 - if (Object(t) !== t) return;
2178 - f = !1;
2179 - } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
2180 - } catch (r) {
2181 - o = !0, n = r;
2182 - } finally {
2183 - try {
2184 - if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
2185 - } finally {
2186 - if (o) throw n;
2187 - }
2188 - }
2189 - return a;
5789 +function getDependencies(funcs) {
5790 + var dependencies = Array.isArray(funcs[0]) ? funcs[0] : funcs;
5791 +
5792 + if (!dependencies.every(function (dep) {
5793 + return typeof dep === 'function';
5794 + })) {
5795 + var dependencyTypes = dependencies.map(function (dep) {
5796 + return typeof dep === 'function' ? "function " + (dep.name || 'unnamed') + "()" : typeof dep;
5797 + }).join(', ');
5798 + throw new Error("createSelector expects all input-selectors to be functions, but received the following types: [" + dependencyTypes + "]");
2190 5799 }
5800 +
5801 + return dependencies;
2191 5802 }
2192 -module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
2193 5803
2194 -/***/ }),
5804 +function createSelectorCreator(memoize) {
5805 + for (var _len = arguments.length, memoizeOptionsFromArgs = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
5806 + memoizeOptionsFromArgs[_key - 1] = arguments[_key];
5807 + }
2195 5808
2196 -/***/ "../node_modules/@babel/runtime/helpers/nonIterableRest.js":
2197 -/*!*****************************************************************!*\
2198 - !*** ../node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
2199 - \*****************************************************************/
2200 -/***/ ((module) => {
5809 + var createSelector = function createSelector() {
5810 + for (var _len2 = arguments.length, funcs = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
5811 + funcs[_key2] = arguments[_key2];
5812 + }
2201 5813
2202 -function _nonIterableRest() {
2203 - throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2204 -}
2205 -module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
5814 + var _recomputations = 0;
2206 5815
2207 -/***/ }),
5816 + var _lastResult; // Due to the intricacies of rest params, we can't do an optional arg after `...funcs`.
5817 + // So, start by declaring the default value here.
5818 + // (And yes, the words 'memoize' and 'options' appear too many times in this next sequence.)
2208 5819
2209 -/***/ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js":
2210 -/*!***************************************************************************!*\
2211 - !*** ../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***!
2212 - \***************************************************************************/
2213 -/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2214 5820
2215 -var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]);
2216 -var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js");
2217 -function _possibleConstructorReturn(t, e) {
2218 - if (e && ("object" == _typeof(e) || "function" == typeof e)) return e;
2219 - if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
2220 - return assertThisInitialized(t);
2221 -}
2222 -module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports;
5821 + var directlyPassedOptions = {
5822 + memoizeOptions: undefined
5823 + }; // Normally, the result func or "output selector" is the last arg
2223 5824
2224 -/***/ }),
5825 + var resultFunc = funcs.pop(); // If the result func is actually an _object_, assume it's our options object
2225 5826
2226 -/***/ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js":
2227 -/*!****************************************************************!*\
2228 - !*** ../node_modules/@babel/runtime/helpers/setPrototypeOf.js ***!
2229 - \****************************************************************/
2230 -/***/ ((module) => {
5827 + if (typeof resultFunc === 'object') {
5828 + directlyPassedOptions = resultFunc; // and pop the real result func off
2231 5829
2232 -function _setPrototypeOf(t, e) {
2233 - return module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
2234 - return t.__proto__ = e, t;
2235 - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _setPrototypeOf(t, e);
2236 -}
2237 -module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
5830 + resultFunc = funcs.pop();
5831 + }
2238 5832
2239 -/***/ }),
5833 + if (typeof resultFunc !== 'function') {
5834 + throw new Error("createSelector expects an output function after the inputs, but received: [" + typeof resultFunc + "]");
5835 + } // Determine which set of options we're using. Prefer options passed directly,
5836 + // but fall back to options given to createSelectorCreator.
2240 5837
2241 -/***/ "../node_modules/@babel/runtime/helpers/slicedToArray.js":
2242 -/*!***************************************************************!*\
2243 - !*** ../node_modules/@babel/runtime/helpers/slicedToArray.js ***!
2244 - \***************************************************************/
2245 -/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2246 5838
2247 -var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js");
2248 -var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js");
2249 -var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js");
2250 -var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "../node_modules/@babel/runtime/helpers/nonIterableRest.js");
2251 -function _slicedToArray(r, e) {
2252 - return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest();
2253 -}
2254 -module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
5839 + var _directlyPassedOption = directlyPassedOptions,
5840 + _directlyPassedOption2 = _directlyPassedOption.memoizeOptions,
5841 + memoizeOptions = _directlyPassedOption2 === void 0 ? memoizeOptionsFromArgs : _directlyPassedOption2; // Simplifying assumption: it's unlikely that the first options arg of the provided memoizer
5842 + // is an array. In most libs I've looked at, it's an equality function or options object.
5843 + // Based on that, if `memoizeOptions` _is_ an array, we assume it's a full
5844 + // user-provided array of options. Otherwise, it must be just the _first_ arg, and so
5845 + // we wrap it in an array so we can apply it.
2255 5846
2256 -/***/ }),
5847 + var finalMemoizeOptions = Array.isArray(memoizeOptions) ? memoizeOptions : [memoizeOptions];
5848 + var dependencies = getDependencies(funcs);
5849 + var memoizedResultFunc = memoize.apply(void 0, [function recomputationWrapper() {
5850 + _recomputations++; // apply arguments instead of spreading for performance.
2257 5851
2258 -/***/ "../node_modules/@babel/runtime/helpers/superPropBase.js":
2259 -/*!***************************************************************!*\
2260 - !*** ../node_modules/@babel/runtime/helpers/superPropBase.js ***!
2261 - \***************************************************************/
2262 -/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5852 + return resultFunc.apply(null, arguments);
5853 + }].concat(finalMemoizeOptions)); // If a selector is called with the exact same arguments we don't need to traverse our dependencies again.
2263 5854
2264 -var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js");
2265 -function _superPropBase(t, o) {
2266 - for (; !{}.hasOwnProperty.call(t, o) && null !== (t = getPrototypeOf(t)););
2267 - return t;
2268 -}
2269 -module.exports = _superPropBase, module.exports.__esModule = true, module.exports["default"] = module.exports;
5855 + var selector = memoize(function dependenciesChecker() {
5856 + var params = [];
5857 + var length = dependencies.length;
2270 5858
2271 -/***/ }),
5859 + for (var i = 0; i < length; i++) {
5860 + // apply arguments instead of spreading and mutate a local list of params for performance.
5861 + // @ts-ignore
5862 + params.push(dependencies[i].apply(null, arguments));
5863 + } // apply arguments instead of spreading for performance.
2272 5864
2273 -/***/ "../node_modules/@babel/runtime/helpers/toPrimitive.js":
2274 -/*!*************************************************************!*\
2275 - !*** ../node_modules/@babel/runtime/helpers/toPrimitive.js ***!
2276 - \*************************************************************/
2277 -/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2278 5865
2279 -var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]);
2280 -function toPrimitive(t, r) {
2281 - if ("object" != _typeof(t) || !t) return t;
2282 - var e = t[Symbol.toPrimitive];
2283 - if (void 0 !== e) {
2284 - var i = e.call(t, r || "default");
2285 - if ("object" != _typeof(i)) return i;
2286 - throw new TypeError("@@toPrimitive must return a primitive value.");
5866 + _lastResult = memoizedResultFunc.apply(null, params);
5867 + return _lastResult;
5868 + });
5869 + Object.assign(selector, {
5870 + resultFunc: resultFunc,
5871 + memoizedResultFunc: memoizedResultFunc,
5872 + dependencies: dependencies,
5873 + lastResult: function lastResult() {
5874 + return _lastResult;
5875 + },
5876 + recomputations: function recomputations() {
5877 + return _recomputations;
5878 + },
5879 + resetRecomputations: function resetRecomputations() {
5880 + return _recomputations = 0;
5881 + }
5882 + });
5883 + return selector;
5884 + }; // @ts-ignore
5885 +
5886 +
5887 + return createSelector;
5888 +}
5889 +var createSelector = /* #__PURE__ */createSelectorCreator(_defaultMemoize__WEBPACK_IMPORTED_MODULE_0__.defaultMemoize);
5890 +// Manual definition of state and output arguments
5891 +var createStructuredSelector = function createStructuredSelector(selectors, selectorCreator) {
5892 + if (selectorCreator === void 0) {
5893 + selectorCreator = createSelector;
2287 5894 }
2288 - return ("string" === r ? String : Number)(t);
2289 -}
2290 -module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports;
2291 5895
2292 -/***/ }),
5896 + if (typeof selectors !== 'object') {
5897 + throw new Error('createStructuredSelector expects first argument to be an object ' + ("where each property is a selector, instead received a " + typeof selectors));
5898 + }
2293 5899
2294 -/***/ "../node_modules/@babel/runtime/helpers/toPropertyKey.js":
2295 -/*!***************************************************************!*\
2296 - !*** ../node_modules/@babel/runtime/helpers/toPropertyKey.js ***!
2297 - \***************************************************************/
2298 -/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5900 + var objectKeys = Object.keys(selectors);
5901 + var resultSelector = selectorCreator( // @ts-ignore
5902 + objectKeys.map(function (key) {
5903 + return selectors[key];
5904 + }), function () {
5905 + for (var _len3 = arguments.length, values = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
5906 + values[_key3] = arguments[_key3];
5907 + }
2299 5908
2300 -var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]);
2301 -var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ "../node_modules/@babel/runtime/helpers/toPrimitive.js");
2302 -function toPropertyKey(t) {
2303 - var i = toPrimitive(t, "string");
2304 - return "symbol" == _typeof(i) ? i : i + "";
2305 -}
2306 -module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports;
5909 + return values.reduce(function (composition, value, index) {
5910 + composition[objectKeys[index]] = value;
5911 + return composition;
5912 + }, {});
5913 + });
5914 + return resultSelector;
5915 +};
2307 5916
2308 5917 /***/ }),
2309 5918
2310 -/***/ "../node_modules/@babel/runtime/helpers/typeof.js":
2311 -/*!********************************************************!*\
2312 - !*** ../node_modules/@babel/runtime/helpers/typeof.js ***!
2313 - \********************************************************/
2314 -/***/ ((module) => {
5919 +/***/ "../node_modules/@babel/runtime/helpers/esm/defineProperty.js":
5920 +/*!********************************************************************!*\
5921 + !*** ../node_modules/@babel/runtime/helpers/esm/defineProperty.js ***!
5922 + \********************************************************************/
5923 +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
2315 5924
2316 -function _typeof(o) {
2317 - "@babel/helpers - typeof";
5925 +"use strict";
5926 +__webpack_require__.r(__webpack_exports__);
5927 +/* harmony export */ __webpack_require__.d(__webpack_exports__, {
5928 +/* harmony export */ "default": () => (/* binding */ _defineProperty)
5929 +/* harmony export */ });
5930 +function _defineProperty(obj, key, value) {
5931 + if (key in obj) {
5932 + Object.defineProperty(obj, key, {
5933 + value: value,
5934 + enumerable: true,
5935 + configurable: true,
5936 + writable: true
5937 + });
5938 + } else {
5939 + obj[key] = value;
5940 + }
2318 5941
2319 - return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
2320 - return typeof o;
2321 - } : function (o) {
2322 - return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
2323 - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o);
5942 + return obj;
2324 5943 }
2325 -module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
2326 5944
2327 5945 /***/ }),
2328 5946
2329 -/***/ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js":
2330 -/*!****************************************************************************!*\
2331 - !*** ../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
2332 - \****************************************************************************/
2333 -/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5947 +/***/ "../node_modules/@babel/runtime/helpers/esm/objectSpread2.js":
5948 +/*!*******************************************************************!*\
5949 + !*** ../node_modules/@babel/runtime/helpers/esm/objectSpread2.js ***!
5950 + \*******************************************************************/
5951 +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
2334 5952
2335 -var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js");
2336 -function _unsupportedIterableToArray(r, a) {
2337 - if (r) {
2338 - if ("string" == typeof r) return arrayLikeToArray(r, a);
2339 - var t = {}.toString.call(r).slice(8, -1);
2340 - 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;
5953 +"use strict";
5954 +__webpack_require__.r(__webpack_exports__);
5955 +/* harmony export */ __webpack_require__.d(__webpack_exports__, {
5956 +/* harmony export */ "default": () => (/* binding */ _objectSpread2)
5957 +/* harmony export */ });
5958 +/* harmony import */ var _defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defineProperty.js */ "../node_modules/@babel/runtime/helpers/esm/defineProperty.js");
5959 +
5960 +
5961 +function ownKeys(object, enumerableOnly) {
5962 + var keys = Object.keys(object);
5963 +
5964 + if (Object.getOwnPropertySymbols) {
5965 + var symbols = Object.getOwnPropertySymbols(object);
5966 + enumerableOnly && (symbols = symbols.filter(function (sym) {
5967 + return Object.getOwnPropertyDescriptor(object, sym).enumerable;
5968 + })), keys.push.apply(keys, symbols);
2341 5969 }
5970 +
5971 + return keys;
2342 5972 }
2343 -module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
2344 5973
2345 -/***/ }),
5974 +function _objectSpread2(target) {
5975 + for (var i = 1; i < arguments.length; i++) {
5976 + var source = null != arguments[i] ? arguments[i] : {};
5977 + i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
5978 + (0,_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__["default"])(target, key, source[key]);
5979 + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
5980 + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
5981 + });
5982 + }
2346 5983
2347 -/***/ "../node_modules/@babel/runtime/helpers/wrapNativeSuper.js":
2348 -/*!*****************************************************************!*\
2349 - !*** ../node_modules/@babel/runtime/helpers/wrapNativeSuper.js ***!
2350 - \*****************************************************************/
2351 -/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2352 -
2353 -var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js");
2354 -var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js");
2355 -var isNativeFunction = __webpack_require__(/*! ./isNativeFunction.js */ "../node_modules/@babel/runtime/helpers/isNativeFunction.js");
2356 -var construct = __webpack_require__(/*! ./construct.js */ "../node_modules/@babel/runtime/helpers/construct.js");
2357 -function _wrapNativeSuper(t) {
2358 - var r = "function" == typeof Map ? new Map() : void 0;
2359 - return module.exports = _wrapNativeSuper = function _wrapNativeSuper(t) {
2360 - if (null === t || !isNativeFunction(t)) return t;
2361 - if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function");
2362 - if (void 0 !== r) {
2363 - if (r.has(t)) return r.get(t);
2364 - r.set(t, Wrapper);
2365 - }
2366 - function Wrapper() {
2367 - return construct(t, arguments, getPrototypeOf(this).constructor);
2368 - }
2369 - return Wrapper.prototype = Object.create(t.prototype, {
2370 - constructor: {
2371 - value: Wrapper,
2372 - enumerable: !1,
2373 - writable: !0,
2374 - configurable: !0
2375 - }
2376 - }), setPrototypeOf(Wrapper, t);
2377 - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _wrapNativeSuper(t);
5984 + return target;
2378 5985 }
2379 -module.exports = _wrapNativeSuper, module.exports.__esModule = true, module.exports["default"] = module.exports;
2380 5986
2381 5987 /***/ }),
2382 5988
2383 -/***/ "@reduxjs/toolkit":
5989 +/***/ "../node_modules/immer/dist/immer.esm.mjs":
2384 5990 /*!************************************************!*\
2385 - !*** external "elementorVendors.reduxToolkit" ***!
5991 + !*** ../node_modules/immer/dist/immer.esm.mjs ***!
2386 5992 \************************************************/
2387 -/***/ ((module) => {
5993 +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
2388 5994
2389 5995 "use strict";
2390 -module.exports = elementorVendors.reduxToolkit;
5996 +__webpack_require__.r(__webpack_exports__);
5997 +/* harmony export */ __webpack_require__.d(__webpack_exports__, {
5998 +/* harmony export */ "Immer": () => (/* binding */ un),
5999 +/* harmony export */ "applyPatches": () => (/* binding */ pn),
6000 +/* harmony export */ "castDraft": () => (/* binding */ K),
6001 +/* harmony export */ "castImmutable": () => (/* binding */ $),
6002 +/* harmony export */ "createDraft": () => (/* binding */ ln),
6003 +/* harmony export */ "current": () => (/* binding */ D),
6004 +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
6005 +/* harmony export */ "enableAllPlugins": () => (/* binding */ J),
6006 +/* harmony export */ "enableES5": () => (/* binding */ N),
6007 +/* harmony export */ "enableMapSet": () => (/* binding */ C),
6008 +/* harmony export */ "enablePatches": () => (/* binding */ T),
6009 +/* harmony export */ "finishDraft": () => (/* binding */ dn),
6010 +/* harmony export */ "freeze": () => (/* binding */ d),
6011 +/* harmony export */ "immerable": () => (/* binding */ L),
6012 +/* harmony export */ "isDraft": () => (/* binding */ r),
6013 +/* harmony export */ "isDraftable": () => (/* binding */ t),
6014 +/* harmony export */ "nothing": () => (/* binding */ H),
6015 +/* harmony export */ "original": () => (/* binding */ e),
6016 +/* harmony export */ "produce": () => (/* binding */ fn),
6017 +/* harmony export */ "produceWithPatches": () => (/* binding */ cn),
6018 +/* harmony export */ "setAutoFreeze": () => (/* binding */ sn),
6019 +/* harmony export */ "setUseProxies": () => (/* binding */ vn)
6020 +/* harmony export */ });
6021 +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)}throw Error("[Immer] minified error nr: "+n+(t.length?" "+t.map((function(n){return"'"+n+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function r(n){return!!n&&!!n[Q]}function t(n){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]||!!n.constructor[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.delete(r),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)?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 O(n){g(n),n.p.forEach(S),n.p=null}function g(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.O=!0}function P(r,e){e._=e.p.length;var i=e.p[0],o=void 0!==r&&r!==i;return e.h.g||b("ES5").S(e,r,o),o?(i[Q].P&&(O(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,[]),O(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;i(3===e.i?new Set(o):o,(function(r,i){return A(n,e,o,r,i,t)})),x(n,o,!1),t&&n.u&&b("Patches").R(e,t,n.u,n.s)}return e.o}function A(e,i,o,a,c,s){if( true&&c===o&&n(5),r(c)){var v=M(e,c,s&&i&&3!==i.i&&!u(i.D,a)?s.concat(a):void 0);if(f(o,a,v),!r(v))return;e.m=!1}if(t(c)&&!y(c)){if(!e.h.F&&e._<1)return;M(e,c),i&&i.A.l||x(e,c)}}function x(n,r,t){void 0===t&&(t=!1),n.h.F&&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 R(n,r,t){var e=s(r)?b("MapSet").N(r,t):v(r)?b("MapSet").T(r,t):n.g?function(n,r){var t=Array.isArray(n),e={i:t?1:0,A:r?r.A:_(),P:!1,I:!1,D:{},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 D(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=F(r,c),u.I=!1}else e=F(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 F(n,r){switch(r){case 2:return new Map(n);case 3:return Array.from(n)}return l(n)}function N(){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.O&&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,D:{},l:r,t:n,k:i,o:null,O:!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.D,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];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},R: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.D,(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.D,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.D=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=R(n.A.h,r,n);n.p.set(r,e),n.o.add(e)}else n.o.add(r)})))}function u(r){r.O&&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,D:void 0,t:n,k:this,C:!1,O:!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.D.set(n,!0),t.o.set(n,r),t.D.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.D.set(n,!1):r.D.delete(n),r.o.delete(n),!0},o.clear=function(){var n=this[Q];u(n),p(n).size&&(e(n),k(n),n.D=new Map,i(n.t,(function(r){n.D.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=R(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,O:!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",{N:function(n,r){return new f(n,r)},T:function(n,r){return new c(n,r)}})}function J(){N(),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]=R(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.D[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&&"number"!=typeof t&&(void 0!==t||r in n.o)||(n.o[r]=t,n.D[r]=!0,!0)},deleteProperty:function(n,r){return void 0!==z(n.t,r)||r in n.t?(n.D[r]=!1,E(n),k(n)):delete n.D[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.g=B,this.F=!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=R(e,r,void 0),v=!0;try{f=i(s),v=!1}finally{v?O(c):g(c)}return"undefined"!=typeof Promise&&f instanceof Promise?f.then((function(n){return j(c,o),P(n,c)}),(function(n){throw O(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.F&&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=D(e));var i=w(this),o=R(this,e,void 0);return o[Q].C=!0,g(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.F=n},i.setUseProxies=function(r){r&&!B&&n(20),this.g=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);
6022 +//# sourceMappingURL=immer.esm.js.map
2391 6023
6024 +
2392 6025 /***/ })
2393 6026
2394 6027 /******/ });
2395 6028 /************************************************************************/
@@ -2417,22 +6050,56 @@
2417 6050 /******/ return module.exports;
2418 6051 /******/ }
2419 6052 /******/
2420 6053 /************************************************************************/
6054 +/******/ /* webpack/runtime/define property getters */
6055 +/******/ (() => {
6056 +/******/ // define getter functions for harmony exports
6057 +/******/ __webpack_require__.d = (exports, definition) => {
6058 +/******/ for(var key in definition) {
6059 +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
6060 +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
6061 +/******/ }
6062 +/******/ }
6063 +/******/ };
6064 +/******/ })();
6065 +/******/
6066 +/******/ /* webpack/runtime/hasOwnProperty shorthand */
6067 +/******/ (() => {
6068 +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
6069 +/******/ })();
6070 +/******/
6071 +/******/ /* webpack/runtime/make namespace object */
6072 +/******/ (() => {
6073 +/******/ // define __esModule on exports
6074 +/******/ __webpack_require__.r = (exports) => {
6075 +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
6076 +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
6077 +/******/ }
6078 +/******/ Object.defineProperty(exports, '__esModule', { value: true });
6079 +/******/ };
6080 +/******/ })();
6081 +/******/
6082 +/************************************************************************/
2421 6083 var __webpack_exports__ = {};
2422 -// This entry needs to be wrapped in an IIFE because it needs to be in strict mode.
6084 +// This entry need to be wrapped in an IIFE because it need to be in strict mode.
2423 6085 (() => {
2424 6086 "use strict";
2425 -/*!**************************************!*\
2426 - !*** ../app/assets/js/app-loader.js ***!
2427 - \**************************************/
6087 +/*!*******************************************!*\
6088 + !*** ../core/app/assets/js/app-loader.js ***!
6089 + \*******************************************/
2428 6090
2429 6091
2430 6092 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
6093 +
2431 6094 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
6095 +
2432 6096 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
6097 +
2433 6098 var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
2434 -var _component = _interopRequireDefault(__webpack_require__(/*! ./loader/component */ "../app/assets/js/loader/component.js"));
6099 +
6100 +var _component = _interopRequireDefault(__webpack_require__(/*! ./loader/component */ "../core/app/assets/js/loader/component.js"));
6101 +
2435 6102 var AppLoader = /*#__PURE__*/function () {
2436 6103 function AppLoader() {
2437 6104 (0, _classCallCheck2.default)(this, AppLoader);
2438 6105 (0, _defineProperty2.default)(this, "selector", 'a.elementor-app-link, .elementor-app-link .ab-item');
@@ -2438,15 +6105,18 @@
2438 6105 (0, _defineProperty2.default)(this, "selector", 'a.elementor-app-link, .elementor-app-link .ab-item');
2439 6106 $e.components.register(new _component.default());
2440 6107 window.addEventListener('DOMContentLoaded', this.onLoad.bind(this));
2441 6108 }
2442 - return (0, _createClass2.default)(AppLoader, [{
6109 +
6110 + (0, _createClass2.default)(AppLoader, [{
2443 6111 key: "onLoad",
2444 6112 value: function onLoad() {
2445 6113 var links = document.querySelectorAll(this.selector);
6114 +
2446 6115 if (!links.length) {
2447 6116 return;
2448 6117 }
6118 +
2449 6119 links.forEach(function (link) {
2450 6120 link.addEventListener('click', function (event) {
2451 6121 event.preventDefault();
2452 6122 $e.run('app/open', {
@@ -2460,9 +6130,11 @@
2460 6130 });
2461 6131 });
2462 6132 }
2463 6133 }]);
6134 + return AppLoader;
2464 6135 }();
6136 +
2465 6137 window.elementorAppLoader = new AppLoader();
2466 6138 })();
2467 6139
2468 6140 /******/ })()