PluginProbe
Elementor Website Builder – more than just a page builder / 3.8.0-beta1
Elementor Website Builder – more than just a page builder v3.8.0-beta1
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 4.0.8 4.1.0-beta1 4.1.0-dev1 4.0.7 All 451 releases
elementor / assets / js / web-cli.js

web-cli.js in Elementor Website Builder – more than just a page builder 3.8.0-beta1, at assets/js/web-cli.js

12,854 lines 485.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /*! elementor - v3.7.6 - 19-09-2022 */
2 /******/ (() => { // webpackBootstrap
3 /******/ var __webpack_modules__ = ({
4
5 /***/ "../node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js":
6 /*!******************************************************************!*\
7 !*** ../node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js ***!
8 \******************************************************************/
9 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
10
11 "use strict";
12 __webpack_require__.r(__webpack_exports__);
13 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
14 /* harmony export */ "MiddlewareArray": () => (/* binding */ MiddlewareArray),
15 /* harmony export */ "TaskAbortError": () => (/* binding */ TaskAbortError),
16 /* harmony export */ "__DO_NOT_USE__ActionTypes": () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.__DO_NOT_USE__ActionTypes),
17 /* harmony export */ "addListener": () => (/* binding */ addListener),
18 /* harmony export */ "applyMiddleware": () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.applyMiddleware),
19 /* harmony export */ "bindActionCreators": () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.bindActionCreators),
20 /* harmony export */ "clearAllListeners": () => (/* binding */ clearAllListeners),
21 /* harmony export */ "combineReducers": () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.combineReducers),
22 /* harmony export */ "compose": () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.compose),
23 /* harmony export */ "configureStore": () => (/* binding */ configureStore),
24 /* harmony export */ "createAction": () => (/* binding */ createAction),
25 /* harmony export */ "createAsyncThunk": () => (/* binding */ createAsyncThunk),
26 /* harmony export */ "createDraftSafeSelector": () => (/* binding */ createDraftSafeSelector),
27 /* harmony export */ "createEntityAdapter": () => (/* binding */ createEntityAdapter),
28 /* harmony export */ "createImmutableStateInvariantMiddleware": () => (/* binding */ createImmutableStateInvariantMiddleware),
29 /* harmony export */ "createListenerMiddleware": () => (/* binding */ createListenerMiddleware),
30 /* harmony export */ "createNextState": () => (/* reexport safe */ immer__WEBPACK_IMPORTED_MODULE_2__["default"]),
31 /* harmony export */ "createReducer": () => (/* binding */ createReducer),
32 /* harmony export */ "createSelector": () => (/* reexport safe */ reselect__WEBPACK_IMPORTED_MODULE_1__.createSelector),
33 /* harmony export */ "createSerializableStateInvariantMiddleware": () => (/* binding */ createSerializableStateInvariantMiddleware),
34 /* harmony export */ "createSlice": () => (/* binding */ createSlice),
35 /* harmony export */ "createStore": () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.createStore),
36 /* harmony export */ "current": () => (/* reexport safe */ immer__WEBPACK_IMPORTED_MODULE_2__.current),
37 /* harmony export */ "findNonSerializableValue": () => (/* binding */ findNonSerializableValue),
38 /* harmony export */ "freeze": () => (/* reexport safe */ immer__WEBPACK_IMPORTED_MODULE_2__.freeze),
39 /* harmony export */ "getDefaultMiddleware": () => (/* binding */ getDefaultMiddleware),
40 /* harmony export */ "getType": () => (/* binding */ getType),
41 /* harmony export */ "isAllOf": () => (/* binding */ isAllOf),
42 /* harmony export */ "isAnyOf": () => (/* binding */ isAnyOf),
43 /* harmony export */ "isAsyncThunkAction": () => (/* binding */ isAsyncThunkAction),
44 /* harmony export */ "isDraft": () => (/* reexport safe */ immer__WEBPACK_IMPORTED_MODULE_2__.isDraft),
45 /* harmony export */ "isFulfilled": () => (/* binding */ isFulfilled),
46 /* harmony export */ "isImmutableDefault": () => (/* binding */ isImmutableDefault),
47 /* harmony export */ "isPending": () => (/* binding */ isPending),
48 /* harmony export */ "isPlain": () => (/* binding */ isPlain),
49 /* harmony export */ "isPlainObject": () => (/* binding */ isPlainObject),
50 /* harmony export */ "isRejected": () => (/* binding */ isRejected),
51 /* harmony export */ "isRejectedWithValue": () => (/* binding */ isRejectedWithValue),
52 /* harmony export */ "legacy_createStore": () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.legacy_createStore),
53 /* harmony export */ "miniSerializeError": () => (/* binding */ miniSerializeError),
54 /* harmony export */ "nanoid": () => (/* binding */ nanoid),
55 /* harmony export */ "original": () => (/* reexport safe */ immer__WEBPACK_IMPORTED_MODULE_2__.original),
56 /* harmony export */ "removeListener": () => (/* binding */ removeListener),
57 /* harmony export */ "unwrapResult": () => (/* binding */ unwrapResult)
58 /* harmony export */ });
59 /* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! immer */ "../node_modules/immer/dist/immer.esm.mjs");
60 /* harmony import */ var redux__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! redux */ "../node_modules/redux/es/redux.js");
61 /* harmony import */ var reselect__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! reselect */ "../node_modules/reselect/es/index.js");
62 /* harmony import */ var redux_thunk__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! redux-thunk */ "../node_modules/redux-thunk/es/index.js");
63 var __extends = (undefined && undefined.__extends) || (function () {
64 var extendStatics = function (d, b) {
65 extendStatics = Object.setPrototypeOf ||
66 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
67 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
68 return extendStatics(d, b);
69 };
70 return function (d, b) {
71 if (typeof b !== "function" && b !== null)
72 throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
73 extendStatics(d, b);
74 function __() { this.constructor = d; }
75 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
76 };
77 })();
78 var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
79 var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
80 return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
81 function verb(n) { return function (v) { return step([n, v]); }; }
82 function step(op) {
83 if (f) throw new TypeError("Generator is already executing.");
84 while (_) try {
85 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;
86 if (y = 0, t) op = [op[0] & 2, t.value];
87 switch (op[0]) {
88 case 0: case 1: t = op; break;
89 case 4: _.label++; return { value: op[1], done: false };
90 case 5: _.label++; y = op[1]; op = [0]; continue;
91 case 7: op = _.ops.pop(); _.trys.pop(); continue;
92 default:
93 if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
94 if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
95 if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
96 if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
97 if (t[2]) _.ops.pop();
98 _.trys.pop(); continue;
99 }
100 op = body.call(thisArg, _);
101 } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
102 if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
103 }
104 };
105 var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from) {
106 for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
107 to[j] = from[i];
108 return to;
109 };
110 var __defProp = Object.defineProperty;
111 var __defProps = Object.defineProperties;
112 var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
113 var __getOwnPropSymbols = Object.getOwnPropertySymbols;
114 var __hasOwnProp = Object.prototype.hasOwnProperty;
115 var __propIsEnum = Object.prototype.propertyIsEnumerable;
116 var __defNormalProp = function (obj, key, value) { return key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value: value }) : obj[key] = value; };
117 var __spreadValues = function (a, b) {
118 for (var prop in b || (b = {}))
119 if (__hasOwnProp.call(b, prop))
120 __defNormalProp(a, prop, b[prop]);
121 if (__getOwnPropSymbols)
122 for (var _i = 0, _c = __getOwnPropSymbols(b); _i < _c.length; _i++) {
123 var prop = _c[_i];
124 if (__propIsEnum.call(b, prop))
125 __defNormalProp(a, prop, b[prop]);
126 }
127 return a;
128 };
129 var __spreadProps = function (a, b) { return __defProps(a, __getOwnPropDescs(b)); };
130 var __async = function (__this, __arguments, generator) {
131 return new Promise(function (resolve, reject) {
132 var fulfilled = function (value) {
133 try {
134 step(generator.next(value));
135 }
136 catch (e) {
137 reject(e);
138 }
139 };
140 var rejected = function (value) {
141 try {
142 step(generator.throw(value));
143 }
144 catch (e) {
145 reject(e);
146 }
147 };
148 var step = function (x) { return x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected); };
149 step((generator = generator.apply(__this, __arguments)).next());
150 });
151 };
152 // src/index.ts
153
154
155
156
157 // src/createDraftSafeSelector.ts
158
159
160 var createDraftSafeSelector = function () {
161 var args = [];
162 for (var _i = 0; _i < arguments.length; _i++) {
163 args[_i] = arguments[_i];
164 }
165 var selector = reselect__WEBPACK_IMPORTED_MODULE_1__.createSelector.apply(void 0, args);
166 var wrappedSelector = function (value) {
167 var rest = [];
168 for (var _i = 1; _i < arguments.length; _i++) {
169 rest[_i - 1] = arguments[_i];
170 }
171 return selector.apply(void 0, __spreadArray([(0,immer__WEBPACK_IMPORTED_MODULE_2__.isDraft)(value) ? (0,immer__WEBPACK_IMPORTED_MODULE_2__.current)(value) : value], rest));
172 };
173 return wrappedSelector;
174 };
175 // src/configureStore.ts
176
177 // src/devtoolsExtension.ts
178
179 var composeWithDevTools = typeof window !== "undefined" && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ : function () {
180 if (arguments.length === 0)
181 return void 0;
182 if (typeof arguments[0] === "object")
183 return redux__WEBPACK_IMPORTED_MODULE_0__.compose;
184 return redux__WEBPACK_IMPORTED_MODULE_0__.compose.apply(null, arguments);
185 };
186 var devToolsEnhancer = typeof window !== "undefined" && window.__REDUX_DEVTOOLS_EXTENSION__ ? window.__REDUX_DEVTOOLS_EXTENSION__ : function () {
187 return function (noop2) {
188 return noop2;
189 };
190 };
191 // src/isPlainObject.ts
192 function isPlainObject(value) {
193 if (typeof value !== "object" || value === null)
194 return false;
195 var proto = Object.getPrototypeOf(value);
196 if (proto === null)
197 return true;
198 var baseProto = proto;
199 while (Object.getPrototypeOf(baseProto) !== null) {
200 baseProto = Object.getPrototypeOf(baseProto);
201 }
202 return proto === baseProto;
203 }
204 // src/getDefaultMiddleware.ts
205
206 // src/utils.ts
207
208 function getTimeMeasureUtils(maxDelay, fnName) {
209 var elapsed = 0;
210 return {
211 measureTime: function (fn) {
212 var started = Date.now();
213 try {
214 return fn();
215 }
216 finally {
217 var finished = Date.now();
218 elapsed += finished - started;
219 }
220 },
221 warnIfExceeded: function () {
222 if (elapsed > maxDelay) {
223 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.");
224 }
225 }
226 };
227 }
228 var MiddlewareArray = /** @class */ (function (_super) {
229 __extends(MiddlewareArray, _super);
230 function MiddlewareArray() {
231 var args = [];
232 for (var _i = 0; _i < arguments.length; _i++) {
233 args[_i] = arguments[_i];
234 }
235 var _this = _super.apply(this, args) || this;
236 Object.setPrototypeOf(_this, MiddlewareArray.prototype);
237 return _this;
238 }
239 Object.defineProperty(MiddlewareArray, Symbol.species, {
240 get: function () {
241 return MiddlewareArray;
242 },
243 enumerable: false,
244 configurable: true
245 });
246 MiddlewareArray.prototype.concat = function () {
247 var arr = [];
248 for (var _i = 0; _i < arguments.length; _i++) {
249 arr[_i] = arguments[_i];
250 }
251 return _super.prototype.concat.apply(this, arr);
252 };
253 MiddlewareArray.prototype.prepend = function () {
254 var arr = [];
255 for (var _i = 0; _i < arguments.length; _i++) {
256 arr[_i] = arguments[_i];
257 }
258 if (arr.length === 1 && Array.isArray(arr[0])) {
259 return new (MiddlewareArray.bind.apply(MiddlewareArray, __spreadArray([void 0], arr[0].concat(this))))();
260 }
261 return new (MiddlewareArray.bind.apply(MiddlewareArray, __spreadArray([void 0], arr.concat(this))))();
262 };
263 return MiddlewareArray;
264 }(Array));
265 function freezeDraftable(val) {
266 return (0,immer__WEBPACK_IMPORTED_MODULE_2__.isDraftable)(val) ? (0,immer__WEBPACK_IMPORTED_MODULE_2__["default"])(val, function () {
267 }) : val;
268 }
269 // src/immutableStateInvariantMiddleware.ts
270 var isProduction = "development" === "production";
271 var prefix = "Invariant failed";
272 function invariant(condition, message) {
273 if (condition) {
274 return;
275 }
276 if (isProduction) {
277 throw new Error(prefix);
278 }
279 throw new Error(prefix + ": " + (message || ""));
280 }
281 function stringify(obj, serializer, indent, decycler) {
282 return JSON.stringify(obj, getSerialize(serializer, decycler), indent);
283 }
284 function getSerialize(serializer, decycler) {
285 var stack = [], keys = [];
286 if (!decycler)
287 decycler = function (_, value) {
288 if (stack[0] === value)
289 return "[Circular ~]";
290 return "[Circular ~." + keys.slice(0, stack.indexOf(value)).join(".") + "]";
291 };
292 return function (key, value) {
293 if (stack.length > 0) {
294 var thisPos = stack.indexOf(this);
295 ~thisPos ? stack.splice(thisPos + 1) : stack.push(this);
296 ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key);
297 if (~stack.indexOf(value))
298 value = decycler.call(this, key, value);
299 }
300 else
301 stack.push(value);
302 return serializer == null ? value : serializer.call(this, key, value);
303 };
304 }
305 function isImmutableDefault(value) {
306 return typeof value !== "object" || value === null || typeof value === "undefined" || Object.isFrozen(value);
307 }
308 function trackForMutations(isImmutable, ignorePaths, obj) {
309 var trackedProperties = trackProperties(isImmutable, ignorePaths, obj);
310 return {
311 detectMutations: function () {
312 return detectMutations(isImmutable, ignorePaths, trackedProperties, obj);
313 }
314 };
315 }
316 function trackProperties(isImmutable, ignorePaths, obj, path) {
317 if (ignorePaths === void 0) { ignorePaths = []; }
318 if (path === void 0) { path = ""; }
319 var tracked = { value: obj };
320 if (!isImmutable(obj)) {
321 tracked.children = {};
322 for (var key in obj) {
323 var childPath = path ? path + "." + key : key;
324 if (ignorePaths.length && ignorePaths.indexOf(childPath) !== -1) {
325 continue;
326 }
327 tracked.children[key] = trackProperties(isImmutable, ignorePaths, obj[key], childPath);
328 }
329 }
330 return tracked;
331 }
332 function detectMutations(isImmutable, ignorePaths, trackedProperty, obj, sameParentRef, path) {
333 if (ignorePaths === void 0) { ignorePaths = []; }
334 if (sameParentRef === void 0) { sameParentRef = false; }
335 if (path === void 0) { path = ""; }
336 var prevObj = trackedProperty ? trackedProperty.value : void 0;
337 var sameRef = prevObj === obj;
338 if (sameParentRef && !sameRef && !Number.isNaN(obj)) {
339 return { wasMutated: true, path: path };
340 }
341 if (isImmutable(prevObj) || isImmutable(obj)) {
342 return { wasMutated: false };
343 }
344 var keysToDetect = {};
345 for (var key in trackedProperty.children) {
346 keysToDetect[key] = true;
347 }
348 for (var key in obj) {
349 keysToDetect[key] = true;
350 }
351 for (var key in keysToDetect) {
352 var childPath = path ? path + "." + key : key;
353 if (ignorePaths.length && ignorePaths.indexOf(childPath) !== -1) {
354 continue;
355 }
356 var result = detectMutations(isImmutable, ignorePaths, trackedProperty.children[key], obj[key], sameRef, childPath);
357 if (result.wasMutated) {
358 return result;
359 }
360 }
361 return { wasMutated: false };
362 }
363 function createImmutableStateInvariantMiddleware(options) {
364 if (options === void 0) { options = {}; }
365 if (false) {}
366 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;
367 ignoredPaths = ignoredPaths || ignore;
368 var track = trackForMutations.bind(null, isImmutable, ignoredPaths);
369 return function (_c) {
370 var getState = _c.getState;
371 var state = getState();
372 var tracker = track(state);
373 var result;
374 return function (next) { return function (action) {
375 var measureUtils = getTimeMeasureUtils(warnAfter, "ImmutableStateInvariantMiddleware");
376 measureUtils.measureTime(function () {
377 state = getState();
378 result = tracker.detectMutations();
379 tracker = track(state);
380 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)");
381 });
382 var dispatchedAction = next(action);
383 measureUtils.measureTime(function () {
384 state = getState();
385 result = tracker.detectMutations();
386 tracker = track(state);
387 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)");
388 });
389 measureUtils.warnIfExceeded();
390 return dispatchedAction;
391 }; };
392 };
393 }
394 // src/serializableStateInvariantMiddleware.ts
395 function isPlain(val) {
396 var type = typeof val;
397 return type === "undefined" || val === null || type === "string" || type === "boolean" || type === "number" || Array.isArray(val) || isPlainObject(val);
398 }
399 function findNonSerializableValue(value, path, isSerializable, getEntries, ignoredPaths) {
400 if (path === void 0) { path = ""; }
401 if (isSerializable === void 0) { isSerializable = isPlain; }
402 if (ignoredPaths === void 0) { ignoredPaths = []; }
403 var foundNestedSerializable;
404 if (!isSerializable(value)) {
405 return {
406 keyPath: path || "<root>",
407 value: value
408 };
409 }
410 if (typeof value !== "object" || value === null) {
411 return false;
412 }
413 var entries = getEntries != null ? getEntries(value) : Object.entries(value);
414 var hasIgnoredPaths = ignoredPaths.length > 0;
415 for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) {
416 var _c = entries_1[_i], key = _c[0], nestedValue = _c[1];
417 var nestedPath = path ? path + "." + key : key;
418 if (hasIgnoredPaths && ignoredPaths.indexOf(nestedPath) >= 0) {
419 continue;
420 }
421 if (!isSerializable(nestedValue)) {
422 return {
423 keyPath: nestedPath,
424 value: nestedValue
425 };
426 }
427 if (typeof nestedValue === "object") {
428 foundNestedSerializable = findNonSerializableValue(nestedValue, nestedPath, isSerializable, getEntries, ignoredPaths);
429 if (foundNestedSerializable) {
430 return foundNestedSerializable;
431 }
432 }
433 }
434 return false;
435 }
436 function createSerializableStateInvariantMiddleware(options) {
437 if (options === void 0) { options = {}; }
438 if (false) {}
439 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;
440 return function (storeAPI) { return function (next) { return function (action) {
441 var result = next(action);
442 var measureUtils = getTimeMeasureUtils(warnAfter, "SerializableStateInvariantMiddleware");
443 if (!ignoreActions && !(ignoredActions.length && ignoredActions.indexOf(action.type) !== -1)) {
444 measureUtils.measureTime(function () {
445 var foundActionNonSerializableValue = findNonSerializableValue(action, "", isSerializable, getEntries, ignoredActionPaths);
446 if (foundActionNonSerializableValue) {
447 var keyPath = foundActionNonSerializableValue.keyPath, value = foundActionNonSerializableValue.value;
448 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)");
449 }
450 });
451 }
452 if (!ignoreState) {
453 measureUtils.measureTime(function () {
454 var state = storeAPI.getState();
455 var foundStateNonSerializableValue = findNonSerializableValue(state, "", isSerializable, getEntries, ignoredPaths);
456 if (foundStateNonSerializableValue) {
457 var keyPath = foundStateNonSerializableValue.keyPath, value = foundStateNonSerializableValue.value;
458 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)");
459 }
460 });
461 measureUtils.warnIfExceeded();
462 }
463 return result;
464 }; }; };
465 }
466 // src/getDefaultMiddleware.ts
467 function isBoolean(x) {
468 return typeof x === "boolean";
469 }
470 function curryGetDefaultMiddleware() {
471 return function curriedGetDefaultMiddleware(options) {
472 return getDefaultMiddleware(options);
473 };
474 }
475 function getDefaultMiddleware(options) {
476 if (options === void 0) { options = {}; }
477 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;
478 var middlewareArray = new MiddlewareArray();
479 if (thunk) {
480 if (isBoolean(thunk)) {
481 middlewareArray.push(redux_thunk__WEBPACK_IMPORTED_MODULE_3__["default"]);
482 }
483 else {
484 middlewareArray.push(redux_thunk__WEBPACK_IMPORTED_MODULE_3__["default"].withExtraArgument(thunk.extraArgument));
485 }
486 }
487 if (true) {
488 if (immutableCheck) {
489 var immutableOptions = {};
490 if (!isBoolean(immutableCheck)) {
491 immutableOptions = immutableCheck;
492 }
493 middlewareArray.unshift(createImmutableStateInvariantMiddleware(immutableOptions));
494 }
495 if (serializableCheck) {
496 var serializableOptions = {};
497 if (!isBoolean(serializableCheck)) {
498 serializableOptions = serializableCheck;
499 }
500 middlewareArray.push(createSerializableStateInvariantMiddleware(serializableOptions));
501 }
502 }
503 return middlewareArray;
504 }
505 // src/configureStore.ts
506 var IS_PRODUCTION = "development" === "production";
507 function configureStore(options) {
508 var curriedGetDefaultMiddleware = curryGetDefaultMiddleware();
509 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;
510 var rootReducer;
511 if (typeof reducer === "function") {
512 rootReducer = reducer;
513 }
514 else if (isPlainObject(reducer)) {
515 rootReducer = (0,redux__WEBPACK_IMPORTED_MODULE_0__.combineReducers)(reducer);
516 }
517 else {
518 throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');
519 }
520 var finalMiddleware = middleware;
521 if (typeof finalMiddleware === "function") {
522 finalMiddleware = finalMiddleware(curriedGetDefaultMiddleware);
523 if (!IS_PRODUCTION && !Array.isArray(finalMiddleware)) {
524 throw new Error("when using a middleware builder function, an array of middleware must be returned");
525 }
526 }
527 if (!IS_PRODUCTION && finalMiddleware.some(function (item) { return typeof item !== "function"; })) {
528 throw new Error("each middleware provided to configureStore must be a function");
529 }
530 var middlewareEnhancer = redux__WEBPACK_IMPORTED_MODULE_0__.applyMiddleware.apply(void 0, finalMiddleware);
531 var finalCompose = redux__WEBPACK_IMPORTED_MODULE_0__.compose;
532 if (devTools) {
533 finalCompose = composeWithDevTools(__spreadValues({
534 trace: !IS_PRODUCTION
535 }, typeof devTools === "object" && devTools));
536 }
537 var storeEnhancers = [middlewareEnhancer];
538 if (Array.isArray(enhancers)) {
539 storeEnhancers = __spreadArray([middlewareEnhancer], enhancers);
540 }
541 else if (typeof enhancers === "function") {
542 storeEnhancers = enhancers(storeEnhancers);
543 }
544 var composedEnhancer = finalCompose.apply(void 0, storeEnhancers);
545 return (0,redux__WEBPACK_IMPORTED_MODULE_0__.createStore)(rootReducer, preloadedState, composedEnhancer);
546 }
547 // src/createAction.ts
548 function createAction(type, prepareAction) {
549 function actionCreator() {
550 var args = [];
551 for (var _i = 0; _i < arguments.length; _i++) {
552 args[_i] = arguments[_i];
553 }
554 if (prepareAction) {
555 var prepared = prepareAction.apply(void 0, args);
556 if (!prepared) {
557 throw new Error("prepareAction did not return an object");
558 }
559 return __spreadValues(__spreadValues({
560 type: type,
561 payload: prepared.payload
562 }, "meta" in prepared && { meta: prepared.meta }), "error" in prepared && { error: prepared.error });
563 }
564 return { type: type, payload: args[0] };
565 }
566 actionCreator.toString = function () { return "" + type; };
567 actionCreator.type = type;
568 actionCreator.match = function (action) { return action.type === type; };
569 return actionCreator;
570 }
571 function isFSA(action) {
572 return isPlainObject(action) && typeof action.type === "string" && Object.keys(action).every(isValidKey);
573 }
574 function isValidKey(key) {
575 return ["type", "payload", "error", "meta"].indexOf(key) > -1;
576 }
577 function getType(actionCreator) {
578 return "" + actionCreator;
579 }
580 // src/createReducer.ts
581
582 // src/mapBuilders.ts
583 function executeReducerBuilderCallback(builderCallback) {
584 var actionsMap = {};
585 var actionMatchers = [];
586 var defaultCaseReducer;
587 var builder = {
588 addCase: function (typeOrActionCreator, reducer) {
589 if (true) {
590 if (actionMatchers.length > 0) {
591 throw new Error("`builder.addCase` should only be called before calling `builder.addMatcher`");
592 }
593 if (defaultCaseReducer) {
594 throw new Error("`builder.addCase` should only be called before calling `builder.addDefaultCase`");
595 }
596 }
597 var type = typeof typeOrActionCreator === "string" ? typeOrActionCreator : typeOrActionCreator.type;
598 if (type in actionsMap) {
599 throw new Error("addCase cannot be called with two reducers for the same action type");
600 }
601 actionsMap[type] = reducer;
602 return builder;
603 },
604 addMatcher: function (matcher, reducer) {
605 if (true) {
606 if (defaultCaseReducer) {
607 throw new Error("`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");
608 }
609 }
610 actionMatchers.push({ matcher: matcher, reducer: reducer });
611 return builder;
612 },
613 addDefaultCase: function (reducer) {
614 if (true) {
615 if (defaultCaseReducer) {
616 throw new Error("`builder.addDefaultCase` can only be called once");
617 }
618 }
619 defaultCaseReducer = reducer;
620 return builder;
621 }
622 };
623 builderCallback(builder);
624 return [actionsMap, actionMatchers, defaultCaseReducer];
625 }
626 // src/createReducer.ts
627 function isStateFunction(x) {
628 return typeof x === "function";
629 }
630 function createReducer(initialState, mapOrBuilderCallback, actionMatchers, defaultCaseReducer) {
631 if (actionMatchers === void 0) { actionMatchers = []; }
632 var _c = typeof mapOrBuilderCallback === "function" ? executeReducerBuilderCallback(mapOrBuilderCallback) : [mapOrBuilderCallback, actionMatchers, defaultCaseReducer], actionsMap = _c[0], finalActionMatchers = _c[1], finalDefaultCaseReducer = _c[2];
633 var getInitialState;
634 if (isStateFunction(initialState)) {
635 getInitialState = function () { return freezeDraftable(initialState()); };
636 }
637 else {
638 var frozenInitialState_1 = freezeDraftable(initialState);
639 getInitialState = function () { return frozenInitialState_1; };
640 }
641 function reducer(state, action) {
642 if (state === void 0) { state = getInitialState(); }
643 var caseReducers = __spreadArray([
644 actionsMap[action.type]
645 ], finalActionMatchers.filter(function (_c) {
646 var matcher = _c.matcher;
647 return matcher(action);
648 }).map(function (_c) {
649 var reducer2 = _c.reducer;
650 return reducer2;
651 }));
652 if (caseReducers.filter(function (cr) { return !!cr; }).length === 0) {
653 caseReducers = [finalDefaultCaseReducer];
654 }
655 return caseReducers.reduce(function (previousState, caseReducer) {
656 if (caseReducer) {
657 if ((0,immer__WEBPACK_IMPORTED_MODULE_2__.isDraft)(previousState)) {
658 var draft = previousState;
659 var result = caseReducer(draft, action);
660 if (typeof result === "undefined") {
661 return previousState;
662 }
663 return result;
664 }
665 else if (!(0,immer__WEBPACK_IMPORTED_MODULE_2__.isDraftable)(previousState)) {
666 var result = caseReducer(previousState, action);
667 if (typeof result === "undefined") {
668 if (previousState === null) {
669 return previousState;
670 }
671 throw Error("A case reducer on a non-draftable value must not return undefined");
672 }
673 return result;
674 }
675 else {
676 return (0,immer__WEBPACK_IMPORTED_MODULE_2__["default"])(previousState, function (draft) {
677 return caseReducer(draft, action);
678 });
679 }
680 }
681 return previousState;
682 }, state);
683 }
684 reducer.getInitialState = getInitialState;
685 return reducer;
686 }
687 // src/createSlice.ts
688 function getType2(slice, actionKey) {
689 return slice + "/" + actionKey;
690 }
691 function createSlice(options) {
692 var name = options.name;
693 if (!name) {
694 throw new Error("`name` is a required option for createSlice");
695 }
696 if (typeof process !== "undefined" && "development" === "development") {
697 if (options.initialState === void 0) {
698 console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`");
699 }
700 }
701 var initialState = typeof options.initialState == "function" ? options.initialState : freezeDraftable(options.initialState);
702 var reducers = options.reducers || {};
703 var reducerNames = Object.keys(reducers);
704 var sliceCaseReducersByName = {};
705 var sliceCaseReducersByType = {};
706 var actionCreators = {};
707 reducerNames.forEach(function (reducerName) {
708 var maybeReducerWithPrepare = reducers[reducerName];
709 var type = getType2(name, reducerName);
710 var caseReducer;
711 var prepareCallback;
712 if ("reducer" in maybeReducerWithPrepare) {
713 caseReducer = maybeReducerWithPrepare.reducer;
714 prepareCallback = maybeReducerWithPrepare.prepare;
715 }
716 else {
717 caseReducer = maybeReducerWithPrepare;
718 }
719 sliceCaseReducersByName[reducerName] = caseReducer;
720 sliceCaseReducersByType[type] = caseReducer;
721 actionCreators[reducerName] = prepareCallback ? createAction(type, prepareCallback) : createAction(type);
722 });
723 function buildReducer() {
724 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;
725 var finalCaseReducers = __spreadValues(__spreadValues({}, extraReducers), sliceCaseReducersByType);
726 return createReducer(initialState, finalCaseReducers, actionMatchers, defaultCaseReducer);
727 }
728 var _reducer;
729 return {
730 name: name,
731 reducer: function (state, action) {
732 if (!_reducer)
733 _reducer = buildReducer();
734 return _reducer(state, action);
735 },
736 actions: actionCreators,
737 caseReducers: sliceCaseReducersByName,
738 getInitialState: function () {
739 if (!_reducer)
740 _reducer = buildReducer();
741 return _reducer.getInitialState();
742 }
743 };
744 }
745 // src/entities/entity_state.ts
746 function getInitialEntityState() {
747 return {
748 ids: [],
749 entities: {}
750 };
751 }
752 function createInitialStateFactory() {
753 function getInitialState(additionalState) {
754 if (additionalState === void 0) { additionalState = {}; }
755 return Object.assign(getInitialEntityState(), additionalState);
756 }
757 return { getInitialState: getInitialState };
758 }
759 // src/entities/state_selectors.ts
760 function createSelectorsFactory() {
761 function getSelectors(selectState) {
762 var selectIds = function (state) { return state.ids; };
763 var selectEntities = function (state) { return state.entities; };
764 var selectAll = createDraftSafeSelector(selectIds, selectEntities, function (ids, entities) { return ids.map(function (id) { return entities[id]; }); });
765 var selectId = function (_, id) { return id; };
766 var selectById = function (entities, id) { return entities[id]; };
767 var selectTotal = createDraftSafeSelector(selectIds, function (ids) { return ids.length; });
768 if (!selectState) {
769 return {
770 selectIds: selectIds,
771 selectEntities: selectEntities,
772 selectAll: selectAll,
773 selectTotal: selectTotal,
774 selectById: createDraftSafeSelector(selectEntities, selectId, selectById)
775 };
776 }
777 var selectGlobalizedEntities = createDraftSafeSelector(selectState, selectEntities);
778 return {
779 selectIds: createDraftSafeSelector(selectState, selectIds),
780 selectEntities: selectGlobalizedEntities,
781 selectAll: createDraftSafeSelector(selectState, selectAll),
782 selectTotal: createDraftSafeSelector(selectState, selectTotal),
783 selectById: createDraftSafeSelector(selectGlobalizedEntities, selectId, selectById)
784 };
785 }
786 return { getSelectors: getSelectors };
787 }
788 // src/entities/state_adapter.ts
789
790 function createSingleArgumentStateOperator(mutator) {
791 var operator = createStateOperator(function (_, state) { return mutator(state); });
792 return function operation(state) {
793 return operator(state, void 0);
794 };
795 }
796 function createStateOperator(mutator) {
797 return function operation(state, arg) {
798 function isPayloadActionArgument(arg2) {
799 return isFSA(arg2);
800 }
801 var runMutator = function (draft) {
802 if (isPayloadActionArgument(arg)) {
803 mutator(arg.payload, draft);
804 }
805 else {
806 mutator(arg, draft);
807 }
808 };
809 if ((0,immer__WEBPACK_IMPORTED_MODULE_2__.isDraft)(state)) {
810 runMutator(state);
811 return state;
812 }
813 else {
814 return (0,immer__WEBPACK_IMPORTED_MODULE_2__["default"])(state, runMutator);
815 }
816 };
817 }
818 // src/entities/utils.ts
819 function selectIdValue(entity, selectId) {
820 var key = selectId(entity);
821 if ( true && key === void 0) {
822 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());
823 }
824 return key;
825 }
826 function ensureEntitiesArray(entities) {
827 if (!Array.isArray(entities)) {
828 entities = Object.values(entities);
829 }
830 return entities;
831 }
832 function splitAddedUpdatedEntities(newEntities, selectId, state) {
833 newEntities = ensureEntitiesArray(newEntities);
834 var added = [];
835 var updated = [];
836 for (var _i = 0, newEntities_1 = newEntities; _i < newEntities_1.length; _i++) {
837 var entity = newEntities_1[_i];
838 var id = selectIdValue(entity, selectId);
839 if (id in state.entities) {
840 updated.push({ id: id, changes: entity });
841 }
842 else {
843 added.push(entity);
844 }
845 }
846 return [added, updated];
847 }
848 // src/entities/unsorted_state_adapter.ts
849 function createUnsortedStateAdapter(selectId) {
850 function addOneMutably(entity, state) {
851 var key = selectIdValue(entity, selectId);
852 if (key in state.entities) {
853 return;
854 }
855 state.ids.push(key);
856 state.entities[key] = entity;
857 }
858 function addManyMutably(newEntities, state) {
859 newEntities = ensureEntitiesArray(newEntities);
860 for (var _i = 0, newEntities_2 = newEntities; _i < newEntities_2.length; _i++) {
861 var entity = newEntities_2[_i];
862 addOneMutably(entity, state);
863 }
864 }
865 function setOneMutably(entity, state) {
866 var key = selectIdValue(entity, selectId);
867 if (!(key in state.entities)) {
868 state.ids.push(key);
869 }
870 state.entities[key] = entity;
871 }
872 function setManyMutably(newEntities, state) {
873 newEntities = ensureEntitiesArray(newEntities);
874 for (var _i = 0, newEntities_3 = newEntities; _i < newEntities_3.length; _i++) {
875 var entity = newEntities_3[_i];
876 setOneMutably(entity, state);
877 }
878 }
879 function setAllMutably(newEntities, state) {
880 newEntities = ensureEntitiesArray(newEntities);
881 state.ids = [];
882 state.entities = {};
883 addManyMutably(newEntities, state);
884 }
885 function removeOneMutably(key, state) {
886 return removeManyMutably([key], state);
887 }
888 function removeManyMutably(keys, state) {
889 var didMutate = false;
890 keys.forEach(function (key) {
891 if (key in state.entities) {
892 delete state.entities[key];
893 didMutate = true;
894 }
895 });
896 if (didMutate) {
897 state.ids = state.ids.filter(function (id) { return id in state.entities; });
898 }
899 }
900 function removeAllMutably(state) {
901 Object.assign(state, {
902 ids: [],
903 entities: {}
904 });
905 }
906 function takeNewKey(keys, update, state) {
907 var original2 = state.entities[update.id];
908 var updated = Object.assign({}, original2, update.changes);
909 var newKey = selectIdValue(updated, selectId);
910 var hasNewKey = newKey !== update.id;
911 if (hasNewKey) {
912 keys[update.id] = newKey;
913 delete state.entities[update.id];
914 }
915 state.entities[newKey] = updated;
916 return hasNewKey;
917 }
918 function updateOneMutably(update, state) {
919 return updateManyMutably([update], state);
920 }
921 function updateManyMutably(updates, state) {
922 var newKeys = {};
923 var updatesPerEntity = {};
924 updates.forEach(function (update) {
925 if (update.id in state.entities) {
926 updatesPerEntity[update.id] = {
927 id: update.id,
928 changes: __spreadValues(__spreadValues({}, updatesPerEntity[update.id] ? updatesPerEntity[update.id].changes : null), update.changes)
929 };
930 }
931 });
932 updates = Object.values(updatesPerEntity);
933 var didMutateEntities = updates.length > 0;
934 if (didMutateEntities) {
935 var didMutateIds = updates.filter(function (update) { return takeNewKey(newKeys, update, state); }).length > 0;
936 if (didMutateIds) {
937 state.ids = state.ids.map(function (id) { return newKeys[id] || id; });
938 }
939 }
940 }
941 function upsertOneMutably(entity, state) {
942 return upsertManyMutably([entity], state);
943 }
944 function upsertManyMutably(newEntities, state) {
945 var _c = splitAddedUpdatedEntities(newEntities, selectId, state), added = _c[0], updated = _c[1];
946 updateManyMutably(updated, state);
947 addManyMutably(added, state);
948 }
949 return {
950 removeAll: createSingleArgumentStateOperator(removeAllMutably),
951 addOne: createStateOperator(addOneMutably),
952 addMany: createStateOperator(addManyMutably),
953 setOne: createStateOperator(setOneMutably),
954 setMany: createStateOperator(setManyMutably),
955 setAll: createStateOperator(setAllMutably),
956 updateOne: createStateOperator(updateOneMutably),
957 updateMany: createStateOperator(updateManyMutably),
958 upsertOne: createStateOperator(upsertOneMutably),
959 upsertMany: createStateOperator(upsertManyMutably),
960 removeOne: createStateOperator(removeOneMutably),
961 removeMany: createStateOperator(removeManyMutably)
962 };
963 }
964 // src/entities/sorted_state_adapter.ts
965 function createSortedStateAdapter(selectId, sort) {
966 var _c = createUnsortedStateAdapter(selectId), removeOne = _c.removeOne, removeMany = _c.removeMany, removeAll = _c.removeAll;
967 function addOneMutably(entity, state) {
968 return addManyMutably([entity], state);
969 }
970 function addManyMutably(newEntities, state) {
971 newEntities = ensureEntitiesArray(newEntities);
972 var models = newEntities.filter(function (model) { return !(selectIdValue(model, selectId) in state.entities); });
973 if (models.length !== 0) {
974 merge(models, state);
975 }
976 }
977 function setOneMutably(entity, state) {
978 return setManyMutably([entity], state);
979 }
980 function setManyMutably(newEntities, state) {
981 newEntities = ensureEntitiesArray(newEntities);
982 if (newEntities.length !== 0) {
983 merge(newEntities, state);
984 }
985 }
986 function setAllMutably(newEntities, state) {
987 newEntities = ensureEntitiesArray(newEntities);
988 state.entities = {};
989 state.ids = [];
990 addManyMutably(newEntities, state);
991 }
992 function updateOneMutably(update, state) {
993 return updateManyMutably([update], state);
994 }
995 function updateManyMutably(updates, state) {
996 var appliedUpdates = false;
997 for (var _i = 0, updates_1 = updates; _i < updates_1.length; _i++) {
998 var update = updates_1[_i];
999 var entity = state.entities[update.id];
1000 if (!entity) {
1001 continue;
1002 }
1003 appliedUpdates = true;
1004 Object.assign(entity, update.changes);
1005 var newId = selectId(entity);
1006 if (update.id !== newId) {
1007 delete state.entities[update.id];
1008 state.entities[newId] = entity;
1009 }
1010 }
1011 if (appliedUpdates) {
1012 resortEntities(state);
1013 }
1014 }
1015 function upsertOneMutably(entity, state) {
1016 return upsertManyMutably([entity], state);
1017 }
1018 function upsertManyMutably(newEntities, state) {
1019 var _c = splitAddedUpdatedEntities(newEntities, selectId, state), added = _c[0], updated = _c[1];
1020 updateManyMutably(updated, state);
1021 addManyMutably(added, state);
1022 }
1023 function areArraysEqual(a, b) {
1024 if (a.length !== b.length) {
1025 return false;
1026 }
1027 for (var i = 0; i < a.length && i < b.length; i++) {
1028 if (a[i] === b[i]) {
1029 continue;
1030 }
1031 return false;
1032 }
1033 return true;
1034 }
1035 function merge(models, state) {
1036 models.forEach(function (model) {
1037 state.entities[selectId(model)] = model;
1038 });
1039 resortEntities(state);
1040 }
1041 function resortEntities(state) {
1042 var allEntities = Object.values(state.entities);
1043 allEntities.sort(sort);
1044 var newSortedIds = allEntities.map(selectId);
1045 var ids = state.ids;
1046 if (!areArraysEqual(ids, newSortedIds)) {
1047 state.ids = newSortedIds;
1048 }
1049 }
1050 return {
1051 removeOne: removeOne,
1052 removeMany: removeMany,
1053 removeAll: removeAll,
1054 addOne: createStateOperator(addOneMutably),
1055 updateOne: createStateOperator(updateOneMutably),
1056 upsertOne: createStateOperator(upsertOneMutably),
1057 setOne: createStateOperator(setOneMutably),
1058 setMany: createStateOperator(setManyMutably),
1059 setAll: createStateOperator(setAllMutably),
1060 addMany: createStateOperator(addManyMutably),
1061 updateMany: createStateOperator(updateManyMutably),
1062 upsertMany: createStateOperator(upsertManyMutably)
1063 };
1064 }
1065 // src/entities/create_adapter.ts
1066 function createEntityAdapter(options) {
1067 if (options === void 0) { options = {}; }
1068 var _c = __spreadValues({
1069 sortComparer: false,
1070 selectId: function (instance) { return instance.id; }
1071 }, options), selectId = _c.selectId, sortComparer = _c.sortComparer;
1072 var stateFactory = createInitialStateFactory();
1073 var selectorsFactory = createSelectorsFactory();
1074 var stateAdapter = sortComparer ? createSortedStateAdapter(selectId, sortComparer) : createUnsortedStateAdapter(selectId);
1075 return __spreadValues(__spreadValues(__spreadValues({
1076 selectId: selectId,
1077 sortComparer: sortComparer
1078 }, stateFactory), selectorsFactory), stateAdapter);
1079 }
1080 // src/nanoid.ts
1081 var urlAlphabet = "ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW";
1082 var nanoid = function (size) {
1083 if (size === void 0) { size = 21; }
1084 var id = "";
1085 var i = size;
1086 while (i--) {
1087 id += urlAlphabet[Math.random() * 64 | 0];
1088 }
1089 return id;
1090 };
1091 // src/createAsyncThunk.ts
1092 var commonProperties = [
1093 "name",
1094 "message",
1095 "stack",
1096 "code"
1097 ];
1098 var RejectWithValue = /** @class */ (function () {
1099 function RejectWithValue(payload, meta) {
1100 this.payload = payload;
1101 this.meta = meta;
1102 }
1103 return RejectWithValue;
1104 }());
1105 var FulfillWithMeta = /** @class */ (function () {
1106 function FulfillWithMeta(payload, meta) {
1107 this.payload = payload;
1108 this.meta = meta;
1109 }
1110 return FulfillWithMeta;
1111 }());
1112 var miniSerializeError = function (value) {
1113 if (typeof value === "object" && value !== null) {
1114 var simpleError = {};
1115 for (var _i = 0, commonProperties_1 = commonProperties; _i < commonProperties_1.length; _i++) {
1116 var property = commonProperties_1[_i];
1117 if (typeof value[property] === "string") {
1118 simpleError[property] = value[property];
1119 }
1120 }
1121 return simpleError;
1122 }
1123 return { message: String(value) };
1124 };
1125 function createAsyncThunk(typePrefix, payloadCreator, options) {
1126 var fulfilled = createAction(typePrefix + "/fulfilled", function (payload, requestId, arg, meta) { return ({
1127 payload: payload,
1128 meta: __spreadProps(__spreadValues({}, meta || {}), {
1129 arg: arg,
1130 requestId: requestId,
1131 requestStatus: "fulfilled"
1132 })
1133 }); });
1134 var pending = createAction(typePrefix + "/pending", function (requestId, arg, meta) { return ({
1135 payload: void 0,
1136 meta: __spreadProps(__spreadValues({}, meta || {}), {
1137 arg: arg,
1138 requestId: requestId,
1139 requestStatus: "pending"
1140 })
1141 }); });
1142 var rejected = createAction(typePrefix + "/rejected", function (error, requestId, arg, payload, meta) { return ({
1143 payload: payload,
1144 error: (options && options.serializeError || miniSerializeError)(error || "Rejected"),
1145 meta: __spreadProps(__spreadValues({}, meta || {}), {
1146 arg: arg,
1147 requestId: requestId,
1148 rejectedWithValue: !!payload,
1149 requestStatus: "rejected",
1150 aborted: (error == null ? void 0 : error.name) === "AbortError",
1151 condition: (error == null ? void 0 : error.name) === "ConditionError"
1152 })
1153 }); });
1154 var displayedWarning = false;
1155 var AC = typeof AbortController !== "undefined" ? AbortController : /** @class */ (function () {
1156 function class_1() {
1157 this.signal = {
1158 aborted: false,
1159 addEventListener: function () {
1160 },
1161 dispatchEvent: function () {
1162 return false;
1163 },
1164 onabort: function () {
1165 },
1166 removeEventListener: function () {
1167 },
1168 reason: void 0,
1169 throwIfAborted: function () {
1170 }
1171 };
1172 }
1173 class_1.prototype.abort = function () {
1174 if (true) {
1175 if (!displayedWarning) {
1176 displayedWarning = true;
1177 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'.");
1178 }
1179 }
1180 };
1181 return class_1;
1182 }());
1183 function actionCreator(arg) {
1184 return function (dispatch, getState, extra) {
1185 var requestId = (options == null ? void 0 : options.idGenerator) ? options.idGenerator(arg) : nanoid();
1186 var abortController = new AC();
1187 var abortReason;
1188 var abortedPromise = new Promise(function (_, reject) { return abortController.signal.addEventListener("abort", function () { return reject({ name: "AbortError", message: abortReason || "Aborted" }); }); });
1189 var started = false;
1190 function abort(reason) {
1191 if (started) {
1192 abortReason = reason;
1193 abortController.abort();
1194 }
1195 }
1196 var promise = function () {
1197 return __async(this, null, function () {
1198 var _a, _b, finalAction, conditionResult, err_1, skipDispatch;
1199 return __generator(this, function (_c) {
1200 switch (_c.label) {
1201 case 0:
1202 _c.trys.push([0, 4, , 5]);
1203 conditionResult = (_a = options == null ? void 0 : options.condition) == null ? void 0 : _a.call(options, arg, { getState: getState, extra: extra });
1204 if (!isThenable(conditionResult)) return [3 /*break*/, 2];
1205 return [4 /*yield*/, conditionResult];
1206 case 1:
1207 conditionResult = _c.sent();
1208 _c.label = 2;
1209 case 2:
1210 if (conditionResult === false) {
1211 throw {
1212 name: "ConditionError",
1213 message: "Aborted due to condition callback returning false."
1214 };
1215 }
1216 started = true;
1217 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 })));
1218 return [4 /*yield*/, Promise.race([
1219 abortedPromise,
1220 Promise.resolve(payloadCreator(arg, {
1221 dispatch: dispatch,
1222 getState: getState,
1223 extra: extra,
1224 requestId: requestId,
1225 signal: abortController.signal,
1226 rejectWithValue: function (value, meta) {
1227 return new RejectWithValue(value, meta);
1228 },
1229 fulfillWithValue: function (value, meta) {
1230 return new FulfillWithMeta(value, meta);
1231 }
1232 })).then(function (result) {
1233 if (result instanceof RejectWithValue) {
1234 throw result;
1235 }
1236 if (result instanceof FulfillWithMeta) {
1237 return fulfilled(result.payload, requestId, arg, result.meta);
1238 }
1239 return fulfilled(result, requestId, arg);
1240 })
1241 ])];
1242 case 3:
1243 finalAction = _c.sent();
1244 return [3 /*break*/, 5];
1245 case 4:
1246 err_1 = _c.sent();
1247 finalAction = err_1 instanceof RejectWithValue ? rejected(null, requestId, arg, err_1.payload, err_1.meta) : rejected(err_1, requestId, arg);
1248 return [3 /*break*/, 5];
1249 case 5:
1250 skipDispatch = options && !options.dispatchConditionRejection && rejected.match(finalAction) && finalAction.meta.condition;
1251 if (!skipDispatch) {
1252 dispatch(finalAction);
1253 }
1254 return [2 /*return*/, finalAction];
1255 }
1256 });
1257 });
1258 }();
1259 return Object.assign(promise, {
1260 abort: abort,
1261 requestId: requestId,
1262 arg: arg,
1263 unwrap: function () {
1264 return promise.then(unwrapResult);
1265 }
1266 });
1267 };
1268 }
1269 return Object.assign(actionCreator, {
1270 pending: pending,
1271 rejected: rejected,
1272 fulfilled: fulfilled,
1273 typePrefix: typePrefix
1274 });
1275 }
1276 function unwrapResult(action) {
1277 if (action.meta && action.meta.rejectedWithValue) {
1278 throw action.payload;
1279 }
1280 if (action.error) {
1281 throw action.error;
1282 }
1283 return action.payload;
1284 }
1285 function isThenable(value) {
1286 return value !== null && typeof value === "object" && typeof value.then === "function";
1287 }
1288 // src/tsHelpers.ts
1289 var hasMatchFunction = function (v) {
1290 return v && typeof v.match === "function";
1291 };
1292 // src/matchers.ts
1293 var matches = function (matcher, action) {
1294 if (hasMatchFunction(matcher)) {
1295 return matcher.match(action);
1296 }
1297 else {
1298 return matcher(action);
1299 }
1300 };
1301 function isAnyOf() {
1302 var matchers = [];
1303 for (var _i = 0; _i < arguments.length; _i++) {
1304 matchers[_i] = arguments[_i];
1305 }
1306 return function (action) {
1307 return matchers.some(function (matcher) { return matches(matcher, action); });
1308 };
1309 }
1310 function isAllOf() {
1311 var matchers = [];
1312 for (var _i = 0; _i < arguments.length; _i++) {
1313 matchers[_i] = arguments[_i];
1314 }
1315 return function (action) {
1316 return matchers.every(function (matcher) { return matches(matcher, action); });
1317 };
1318 }
1319 function hasExpectedRequestMetadata(action, validStatus) {
1320 if (!action || !action.meta)
1321 return false;
1322 var hasValidRequestId = typeof action.meta.requestId === "string";
1323 var hasValidRequestStatus = validStatus.indexOf(action.meta.requestStatus) > -1;
1324 return hasValidRequestId && hasValidRequestStatus;
1325 }
1326 function isAsyncThunkArray(a) {
1327 return typeof a[0] === "function" && "pending" in a[0] && "fulfilled" in a[0] && "rejected" in a[0];
1328 }
1329 function isPending() {
1330 var asyncThunks = [];
1331 for (var _i = 0; _i < arguments.length; _i++) {
1332 asyncThunks[_i] = arguments[_i];
1333 }
1334 if (asyncThunks.length === 0) {
1335 return function (action) { return hasExpectedRequestMetadata(action, ["pending"]); };
1336 }
1337 if (!isAsyncThunkArray(asyncThunks)) {
1338 return isPending()(asyncThunks[0]);
1339 }
1340 return function (action) {
1341 var matchers = asyncThunks.map(function (asyncThunk) { return asyncThunk.pending; });
1342 var combinedMatcher = isAnyOf.apply(void 0, matchers);
1343 return combinedMatcher(action);
1344 };
1345 }
1346 function isRejected() {
1347 var asyncThunks = [];
1348 for (var _i = 0; _i < arguments.length; _i++) {
1349 asyncThunks[_i] = arguments[_i];
1350 }
1351 if (asyncThunks.length === 0) {
1352 return function (action) { return hasExpectedRequestMetadata(action, ["rejected"]); };
1353 }
1354 if (!isAsyncThunkArray(asyncThunks)) {
1355 return isRejected()(asyncThunks[0]);
1356 }
1357 return function (action) {
1358 var matchers = asyncThunks.map(function (asyncThunk) { return asyncThunk.rejected; });
1359 var combinedMatcher = isAnyOf.apply(void 0, matchers);
1360 return combinedMatcher(action);
1361 };
1362 }
1363 function isRejectedWithValue() {
1364 var asyncThunks = [];
1365 for (var _i = 0; _i < arguments.length; _i++) {
1366 asyncThunks[_i] = arguments[_i];
1367 }
1368 var hasFlag = function (action) {
1369 return action && action.meta && action.meta.rejectedWithValue;
1370 };
1371 if (asyncThunks.length === 0) {
1372 return function (action) {
1373 var combinedMatcher = isAllOf(isRejected.apply(void 0, asyncThunks), hasFlag);
1374 return combinedMatcher(action);
1375 };
1376 }
1377 if (!isAsyncThunkArray(asyncThunks)) {
1378 return isRejectedWithValue()(asyncThunks[0]);
1379 }
1380 return function (action) {
1381 var combinedMatcher = isAllOf(isRejected.apply(void 0, asyncThunks), hasFlag);
1382 return combinedMatcher(action);
1383 };
1384 }
1385 function isFulfilled() {
1386 var asyncThunks = [];
1387 for (var _i = 0; _i < arguments.length; _i++) {
1388 asyncThunks[_i] = arguments[_i];
1389 }
1390 if (asyncThunks.length === 0) {
1391 return function (action) { return hasExpectedRequestMetadata(action, ["fulfilled"]); };
1392 }
1393 if (!isAsyncThunkArray(asyncThunks)) {
1394 return isFulfilled()(asyncThunks[0]);
1395 }
1396 return function (action) {
1397 var matchers = asyncThunks.map(function (asyncThunk) { return asyncThunk.fulfilled; });
1398 var combinedMatcher = isAnyOf.apply(void 0, matchers);
1399 return combinedMatcher(action);
1400 };
1401 }
1402 function isAsyncThunkAction() {
1403 var asyncThunks = [];
1404 for (var _i = 0; _i < arguments.length; _i++) {
1405 asyncThunks[_i] = arguments[_i];
1406 }
1407 if (asyncThunks.length === 0) {
1408 return function (action) { return hasExpectedRequestMetadata(action, ["pending", "fulfilled", "rejected"]); };
1409 }
1410 if (!isAsyncThunkArray(asyncThunks)) {
1411 return isAsyncThunkAction()(asyncThunks[0]);
1412 }
1413 return function (action) {
1414 var matchers = [];
1415 for (var _i = 0, asyncThunks_1 = asyncThunks; _i < asyncThunks_1.length; _i++) {
1416 var asyncThunk = asyncThunks_1[_i];
1417 matchers.push(asyncThunk.pending, asyncThunk.rejected, asyncThunk.fulfilled);
1418 }
1419 var combinedMatcher = isAnyOf.apply(void 0, matchers);
1420 return combinedMatcher(action);
1421 };
1422 }
1423 // src/listenerMiddleware/utils.ts
1424 var assertFunction = function (func, expected) {
1425 if (typeof func !== "function") {
1426 throw new TypeError(expected + " is not a function");
1427 }
1428 };
1429 var noop = function () {
1430 };
1431 var catchRejection = function (promise, onError) {
1432 if (onError === void 0) { onError = noop; }
1433 promise.catch(onError);
1434 return promise;
1435 };
1436 var addAbortSignalListener = function (abortSignal, callback) {
1437 abortSignal.addEventListener("abort", callback, { once: true });
1438 };
1439 var abortControllerWithReason = function (abortController, reason) {
1440 var signal = abortController.signal;
1441 if (signal.aborted) {
1442 return;
1443 }
1444 if (!("reason" in signal)) {
1445 Object.defineProperty(signal, "reason", {
1446 enumerable: true,
1447 value: reason,
1448 configurable: true,
1449 writable: true
1450 });
1451 }
1452 ;
1453 abortController.abort(reason);
1454 };
1455 // src/listenerMiddleware/exceptions.ts
1456 var task = "task";
1457 var listener = "listener";
1458 var completed = "completed";
1459 var cancelled = "cancelled";
1460 var taskCancelled = "task-" + cancelled;
1461 var taskCompleted = "task-" + completed;
1462 var listenerCancelled = listener + "-" + cancelled;
1463 var listenerCompleted = listener + "-" + completed;
1464 var TaskAbortError = /** @class */ (function () {
1465 function TaskAbortError(code) {
1466 this.code = code;
1467 this.name = "TaskAbortError";
1468 this.message = task + " " + cancelled + " (reason: " + code + ")";
1469 }
1470 return TaskAbortError;
1471 }());
1472 // src/listenerMiddleware/task.ts
1473 var validateActive = function (signal) {
1474 if (signal.aborted) {
1475 throw new TaskAbortError(signal.reason);
1476 }
1477 };
1478 var promisifyAbortSignal = function (signal) {
1479 return catchRejection(new Promise(function (_, reject) {
1480 var notifyRejection = function () { return reject(new TaskAbortError(signal.reason)); };
1481 if (signal.aborted) {
1482 notifyRejection();
1483 }
1484 else {
1485 addAbortSignalListener(signal, notifyRejection);
1486 }
1487 }));
1488 };
1489 var runTask = function (task2, cleanUp) { return __async(void 0, null, function () {
1490 var value, error_1;
1491 return __generator(this, function (_c) {
1492 switch (_c.label) {
1493 case 0:
1494 _c.trys.push([0, 3, 4, 5]);
1495 return [4 /*yield*/, Promise.resolve()];
1496 case 1:
1497 _c.sent();
1498 return [4 /*yield*/, task2()];
1499 case 2:
1500 value = _c.sent();
1501 return [2 /*return*/, {
1502 status: "ok",
1503 value: value
1504 }];
1505 case 3:
1506 error_1 = _c.sent();
1507 return [2 /*return*/, {
1508 status: error_1 instanceof TaskAbortError ? "cancelled" : "rejected",
1509 error: error_1
1510 }];
1511 case 4:
1512 cleanUp == null ? void 0 : cleanUp();
1513 return [7 /*endfinally*/];
1514 case 5: return [2 /*return*/];
1515 }
1516 });
1517 }); };
1518 var createPause = function (signal) {
1519 return function (promise) {
1520 return catchRejection(Promise.race([promisifyAbortSignal(signal), promise]).then(function (output) {
1521 validateActive(signal);
1522 return output;
1523 }));
1524 };
1525 };
1526 var createDelay = function (signal) {
1527 var pause = createPause(signal);
1528 return function (timeoutMs) {
1529 return pause(new Promise(function (resolve) { return setTimeout(resolve, timeoutMs); }));
1530 };
1531 };
1532 // src/listenerMiddleware/index.ts
1533 var assign = Object.assign;
1534 var INTERNAL_NIL_TOKEN = {};
1535 var alm = "listenerMiddleware";
1536 var createFork = function (parentAbortSignal) {
1537 var linkControllers = function (controller) { return addAbortSignalListener(parentAbortSignal, function () { return abortControllerWithReason(controller, parentAbortSignal.reason); }); };
1538 return function (taskExecutor) {
1539 assertFunction(taskExecutor, "taskExecutor");
1540 var childAbortController = new AbortController();
1541 linkControllers(childAbortController);
1542 var result = runTask(function () { return __async(void 0, null, function () {
1543 var result2;
1544 return __generator(this, function (_c) {
1545 switch (_c.label) {
1546 case 0:
1547 validateActive(parentAbortSignal);
1548 validateActive(childAbortController.signal);
1549 return [4 /*yield*/, taskExecutor({
1550 pause: createPause(childAbortController.signal),
1551 delay: createDelay(childAbortController.signal),
1552 signal: childAbortController.signal
1553 })];
1554 case 1:
1555 result2 = _c.sent();
1556 validateActive(childAbortController.signal);
1557 return [2 /*return*/, result2];
1558 }
1559 });
1560 }); }, function () { return abortControllerWithReason(childAbortController, taskCompleted); });
1561 return {
1562 result: createPause(parentAbortSignal)(result),
1563 cancel: function () {
1564 abortControllerWithReason(childAbortController, taskCancelled);
1565 }
1566 };
1567 };
1568 };
1569 var createTakePattern = function (startListening, signal) {
1570 var take = function (predicate, timeout) { return __async(void 0, null, function () {
1571 var unsubscribe, tuplePromise, promises, output;
1572 return __generator(this, function (_c) {
1573 switch (_c.label) {
1574 case 0:
1575 validateActive(signal);
1576 unsubscribe = function () {
1577 };
1578 tuplePromise = new Promise(function (resolve) {
1579 unsubscribe = startListening({
1580 predicate: predicate,
1581 effect: function (action, listenerApi) {
1582 listenerApi.unsubscribe();
1583 resolve([
1584 action,
1585 listenerApi.getState(),
1586 listenerApi.getOriginalState()
1587 ]);
1588 }
1589 });
1590 });
1591 promises = [
1592 promisifyAbortSignal(signal),
1593 tuplePromise
1594 ];
1595 if (timeout != null) {
1596 promises.push(new Promise(function (resolve) { return setTimeout(resolve, timeout, null); }));
1597 }
1598 _c.label = 1;
1599 case 1:
1600 _c.trys.push([1, , 3, 4]);
1601 return [4 /*yield*/, Promise.race(promises)];
1602 case 2:
1603 output = _c.sent();
1604 validateActive(signal);
1605 return [2 /*return*/, output];
1606 case 3:
1607 unsubscribe();
1608 return [7 /*endfinally*/];
1609 case 4: return [2 /*return*/];
1610 }
1611 });
1612 }); };
1613 return function (predicate, timeout) { return catchRejection(take(predicate, timeout)); };
1614 };
1615 var getListenerEntryPropsFrom = function (options) {
1616 var type = options.type, actionCreator = options.actionCreator, matcher = options.matcher, predicate = options.predicate, effect = options.effect;
1617 if (type) {
1618 predicate = createAction(type).match;
1619 }
1620 else if (actionCreator) {
1621 type = actionCreator.type;
1622 predicate = actionCreator.match;
1623 }
1624 else if (matcher) {
1625 predicate = matcher;
1626 }
1627 else if (predicate) {
1628 }
1629 else {
1630 throw new Error("Creating or removing a listener requires one of the known fields for matching an action");
1631 }
1632 assertFunction(effect, "options.listener");
1633 return { predicate: predicate, type: type, effect: effect };
1634 };
1635 var createListenerEntry = function (options) {
1636 var _c = getListenerEntryPropsFrom(options), type = _c.type, predicate = _c.predicate, effect = _c.effect;
1637 var id = nanoid();
1638 var entry = {
1639 id: id,
1640 effect: effect,
1641 type: type,
1642 predicate: predicate,
1643 pending: new Set(),
1644 unsubscribe: function () {
1645 throw new Error("Unsubscribe not initialized");
1646 }
1647 };
1648 return entry;
1649 };
1650 var createClearListenerMiddleware = function (listenerMap) {
1651 return function () {
1652 listenerMap.forEach(cancelActiveListeners);
1653 listenerMap.clear();
1654 };
1655 };
1656 var safelyNotifyError = function (errorHandler, errorToNotify, errorInfo) {
1657 try {
1658 errorHandler(errorToNotify, errorInfo);
1659 }
1660 catch (errorHandlerError) {
1661 setTimeout(function () {
1662 throw errorHandlerError;
1663 }, 0);
1664 }
1665 };
1666 var addListener = createAction(alm + "/add");
1667 var clearAllListeners = createAction(alm + "/removeAll");
1668 var removeListener = createAction(alm + "/remove");
1669 var defaultErrorHandler = function () {
1670 var args = [];
1671 for (var _i = 0; _i < arguments.length; _i++) {
1672 args[_i] = arguments[_i];
1673 }
1674 console.error.apply(console, __spreadArray([alm + "/error"], args));
1675 };
1676 var cancelActiveListeners = function (entry) {
1677 entry.pending.forEach(function (controller) {
1678 abortControllerWithReason(controller, listenerCancelled);
1679 });
1680 };
1681 function createListenerMiddleware(middlewareOptions) {
1682 var _this = this;
1683 if (middlewareOptions === void 0) { middlewareOptions = {}; }
1684 var listenerMap = new Map();
1685 var extra = middlewareOptions.extra, _c = middlewareOptions.onError, onError = _c === void 0 ? defaultErrorHandler : _c;
1686 assertFunction(onError, "onError");
1687 var insertEntry = function (entry) {
1688 entry.unsubscribe = function () { return listenerMap.delete(entry.id); };
1689 listenerMap.set(entry.id, entry);
1690 return function (cancelOptions) {
1691 entry.unsubscribe();
1692 if (cancelOptions == null ? void 0 : cancelOptions.cancelActive) {
1693 cancelActiveListeners(entry);
1694 }
1695 };
1696 };
1697 var findListenerEntry = function (comparator) {
1698 for (var _i = 0, _c = Array.from(listenerMap.values()); _i < _c.length; _i++) {
1699 var entry = _c[_i];
1700 if (comparator(entry)) {
1701 return entry;
1702 }
1703 }
1704 return void 0;
1705 };
1706 var startListening = function (options) {
1707 var entry = findListenerEntry(function (existingEntry) { return existingEntry.effect === options.effect; });
1708 if (!entry) {
1709 entry = createListenerEntry(options);
1710 }
1711 return insertEntry(entry);
1712 };
1713 var stopListening = function (options) {
1714 var _c = getListenerEntryPropsFrom(options), type = _c.type, effect = _c.effect, predicate = _c.predicate;
1715 var entry = findListenerEntry(function (entry2) {
1716 var matchPredicateOrType = typeof type === "string" ? entry2.type === type : entry2.predicate === predicate;
1717 return matchPredicateOrType && entry2.effect === effect;
1718 });
1719 if (entry) {
1720 entry.unsubscribe();
1721 if (options.cancelActive) {
1722 cancelActiveListeners(entry);
1723 }
1724 }
1725 return !!entry;
1726 };
1727 var notifyListener = function (entry, action, api, getOriginalState) { return __async(_this, null, function () {
1728 var internalTaskController, take, listenerError_1;
1729 return __generator(this, function (_c) {
1730 switch (_c.label) {
1731 case 0:
1732 internalTaskController = new AbortController();
1733 take = createTakePattern(startListening, internalTaskController.signal);
1734 _c.label = 1;
1735 case 1:
1736 _c.trys.push([1, 3, 4, 5]);
1737 entry.pending.add(internalTaskController);
1738 return [4 /*yield*/, Promise.resolve(entry.effect(action, assign({}, api, {
1739 getOriginalState: getOriginalState,
1740 condition: function (predicate, timeout) { return take(predicate, timeout).then(Boolean); },
1741 take: take,
1742 delay: createDelay(internalTaskController.signal),
1743 pause: createPause(internalTaskController.signal),
1744 extra: extra,
1745 signal: internalTaskController.signal,
1746 fork: createFork(internalTaskController.signal),
1747 unsubscribe: entry.unsubscribe,
1748 subscribe: function () {
1749 listenerMap.set(entry.id, entry);
1750 },
1751 cancelActiveListeners: function () {
1752 entry.pending.forEach(function (controller, _, set) {
1753 if (controller !== internalTaskController) {
1754 abortControllerWithReason(controller, listenerCancelled);
1755 set.delete(controller);
1756 }
1757 });
1758 }
1759 })))];
1760 case 2:
1761 _c.sent();
1762 return [3 /*break*/, 5];
1763 case 3:
1764 listenerError_1 = _c.sent();
1765 if (!(listenerError_1 instanceof TaskAbortError)) {
1766 safelyNotifyError(onError, listenerError_1, {
1767 raisedBy: "effect"
1768 });
1769 }
1770 return [3 /*break*/, 5];
1771 case 4:
1772 abortControllerWithReason(internalTaskController, listenerCompleted);
1773 entry.pending.delete(internalTaskController);
1774 return [7 /*endfinally*/];
1775 case 5: return [2 /*return*/];
1776 }
1777 });
1778 }); };
1779 var clearListenerMiddleware = createClearListenerMiddleware(listenerMap);
1780 var middleware = function (api) { return function (next) { return function (action) {
1781 if (addListener.match(action)) {
1782 return startListening(action.payload);
1783 }
1784 if (clearAllListeners.match(action)) {
1785 clearListenerMiddleware();
1786 return;
1787 }
1788 if (removeListener.match(action)) {
1789 return stopListening(action.payload);
1790 }
1791 var originalState = api.getState();
1792 var getOriginalState = function () {
1793 if (originalState === INTERNAL_NIL_TOKEN) {
1794 throw new Error(alm + ": getOriginalState can only be called synchronously");
1795 }
1796 return originalState;
1797 };
1798 var result;
1799 try {
1800 result = next(action);
1801 if (listenerMap.size > 0) {
1802 var currentState = api.getState();
1803 var listenerEntries = Array.from(listenerMap.values());
1804 for (var _i = 0, listenerEntries_1 = listenerEntries; _i < listenerEntries_1.length; _i++) {
1805 var entry = listenerEntries_1[_i];
1806 var runListener = false;
1807 try {
1808 runListener = entry.predicate(action, currentState, originalState);
1809 }
1810 catch (predicateError) {
1811 runListener = false;
1812 safelyNotifyError(onError, predicateError, {
1813 raisedBy: "predicate"
1814 });
1815 }
1816 if (!runListener) {
1817 continue;
1818 }
1819 notifyListener(entry, action, api, getOriginalState);
1820 }
1821 }
1822 }
1823 finally {
1824 originalState = INTERNAL_NIL_TOKEN;
1825 }
1826 return result;
1827 }; }; };
1828 return {
1829 middleware: middleware,
1830 startListening: startListening,
1831 stopListening: stopListening,
1832 clearListeners: clearListenerMiddleware
1833 };
1834 }
1835 // src/index.ts
1836 (0,immer__WEBPACK_IMPORTED_MODULE_2__.enableES5)();
1837
1838 //# sourceMappingURL=redux-toolkit.esm.js.map
1839
1840 /***/ }),
1841
1842 /***/ "../assets/dev/js/editor/utils/is-instanceof.js":
1843 /*!******************************************************!*\
1844 !*** ../assets/dev/js/editor/utils/is-instanceof.js ***!
1845 \******************************************************/
1846 /***/ ((__unused_webpack_module, exports) => {
1847
1848 "use strict";
1849
1850
1851 Object.defineProperty(exports, "__esModule", ({
1852 value: true
1853 }));
1854 exports["default"] = void 0;
1855
1856 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; } } }; }
1857
1858 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); }
1859
1860 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; }
1861
1862 /**
1863 * Some FileAPI objects such as FileList, DataTransferItem and DataTransferItemList has inconsistency with the retrieved
1864 * object (from events, etc.) and the actual JavaScript object so a regular instanceof doesn't work. This function can
1865 * check whether it's instanceof by using the objects constructor and prototype names.
1866 *
1867 * @param object
1868 * @param constructors
1869 * @return {boolean}
1870 */
1871 var _default = function _default(object, constructors) {
1872 constructors = Array.isArray(constructors) ? constructors : [constructors];
1873
1874 var _iterator = _createForOfIteratorHelper(constructors),
1875 _step;
1876
1877 try {
1878 for (_iterator.s(); !(_step = _iterator.n()).done;) {
1879 var _constructor = _step.value;
1880
1881 if (object.constructor.name === _constructor.prototype[Symbol.toStringTag]) {
1882 return true;
1883 }
1884 }
1885 } catch (err) {
1886 _iterator.e(err);
1887 } finally {
1888 _iterator.f();
1889 }
1890
1891 return false;
1892 };
1893
1894 exports["default"] = _default;
1895
1896 /***/ }),
1897
1898 /***/ "../assets/dev/js/modules/imports/args-object.js":
1899 /*!*******************************************************!*\
1900 !*** ../assets/dev/js/modules/imports/args-object.js ***!
1901 \*******************************************************/
1902 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1903
1904 "use strict";
1905
1906
1907 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
1908
1909 Object.defineProperty(exports, "__esModule", ({
1910 value: true
1911 }));
1912 exports["default"] = void 0;
1913
1914 var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"));
1915
1916 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
1917
1918 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
1919
1920 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
1921
1922 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
1923
1924 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
1925
1926 var _instanceType = _interopRequireDefault(__webpack_require__(/*! ./instance-type */ "../assets/dev/js/modules/imports/instance-type.js"));
1927
1928 var _isInstanceof = _interopRequireDefault(__webpack_require__(/*! ../../editor/utils/is-instanceof */ "../assets/dev/js/editor/utils/is-instanceof.js"));
1929
1930 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); }; }
1931
1932 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; } }
1933
1934 var ArgsObject = /*#__PURE__*/function (_InstanceType) {
1935 (0, _inherits2.default)(ArgsObject, _InstanceType);
1936
1937 var _super = _createSuper(ArgsObject);
1938
1939 /**
1940 * Function constructor().
1941 *
1942 * Create ArgsObject.
1943 *
1944 * @param {{}} args
1945 */
1946 function ArgsObject(args) {
1947 var _this;
1948
1949 (0, _classCallCheck2.default)(this, ArgsObject);
1950 _this = _super.call(this);
1951 _this.args = args;
1952 return _this;
1953 }
1954 /**
1955 * Function requireArgument().
1956 *
1957 * Validate property in args.
1958 *
1959 * @param {string} property
1960 * @param {{}} args
1961 *
1962 * @throws {Error}
1963 *
1964 */
1965
1966
1967 (0, _createClass2.default)(ArgsObject, [{
1968 key: "requireArgument",
1969 value: function requireArgument(property) {
1970 var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.args;
1971
1972 if (!Object.prototype.hasOwnProperty.call(args, property)) {
1973 throw Error("".concat(property, " is required."));
1974 }
1975 }
1976 /**
1977 * Function requireArgumentType().
1978 *
1979 * Validate property in args using `type === typeof(args.whatever)`.
1980 *
1981 * @param {string} property
1982 * @param {string} type
1983 * @param {{}} args
1984 *
1985 * @throws {Error}
1986 *
1987 */
1988
1989 }, {
1990 key: "requireArgumentType",
1991 value: function requireArgumentType(property, type) {
1992 var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.args;
1993 this.requireArgument(property, args);
1994
1995 if ((0, _typeof2.default)(args[property]) !== type) {
1996 throw Error("".concat(property, " invalid type: ").concat(type, "."));
1997 }
1998 }
1999 /**
2000 * Function requireArgumentInstance().
2001 *
2002 * Validate property in args using `args.whatever instanceof instance`.
2003 *
2004 * @param {string} property
2005 * @param {*} instance
2006 * @param {{}} args
2007 *
2008 * @throws {Error}
2009 *
2010 */
2011
2012 }, {
2013 key: "requireArgumentInstance",
2014 value: function requireArgumentInstance(property, instance) {
2015 var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.args;
2016 this.requireArgument(property, args);
2017
2018 if (!(args[property] instanceof instance) && !(0, _isInstanceof.default)(args[property], instance)) {
2019 throw Error("".concat(property, " invalid instance."));
2020 }
2021 }
2022 /**
2023 * Function requireArgumentConstructor().
2024 *
2025 * Validate property in args using `type === args.whatever.constructor`.
2026 *
2027 * @param {string} property
2028 * @param {*} type
2029 * @param {{}} args
2030 *
2031 * @throws {Error}
2032 *
2033 */
2034
2035 }, {
2036 key: "requireArgumentConstructor",
2037 value: function requireArgumentConstructor(property, type) {
2038 var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.args;
2039 this.requireArgument(property, args); // Note: Converting the constructor to string in order to avoid equation issues
2040 // due to different memory addresses between iframes (window.Object !== window.top.Object).
2041
2042 if (args[property].constructor.toString() !== type.prototype.constructor.toString()) {
2043 throw Error("".concat(property, " invalid constructor type."));
2044 }
2045 }
2046 }], [{
2047 key: "getInstanceType",
2048 value: function getInstanceType() {
2049 return 'ArgsObject';
2050 }
2051 }]);
2052 return ArgsObject;
2053 }(_instanceType.default);
2054
2055 exports["default"] = ArgsObject;
2056
2057 /***/ }),
2058
2059 /***/ "../assets/dev/js/modules/imports/instance-type.js":
2060 /*!*********************************************************!*\
2061 !*** ../assets/dev/js/modules/imports/instance-type.js ***!
2062 \*********************************************************/
2063 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
2064
2065 "use strict";
2066
2067
2068 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
2069
2070 Object.defineProperty(exports, "__esModule", ({
2071 value: true
2072 }));
2073 exports["default"] = void 0;
2074
2075 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
2076
2077 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
2078
2079 var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js"));
2080
2081 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
2082
2083 var InstanceType = /*#__PURE__*/function (_Symbol$hasInstance) {
2084 function InstanceType() {
2085 var _this = this;
2086
2087 (0, _classCallCheck2.default)(this, InstanceType);
2088 // Since anonymous classes sometimes do not get validated by babel, do it manually.
2089 var target = this instanceof InstanceType ? this.constructor : void 0;
2090 var prototypes = [];
2091
2092 while (target.__proto__ && target.__proto__.name) {
2093 prototypes.push(target.__proto__);
2094 target = target.__proto__;
2095 }
2096
2097 prototypes.reverse().forEach(function (proto) {
2098 return _this instanceof proto;
2099 });
2100 }
2101
2102 (0, _createClass2.default)(InstanceType, null, [{
2103 key: _Symbol$hasInstance,
2104 value: function value(target) {
2105 /**
2106 * This is function extending being called each time JS uses instanceOf, since babel use it each time it create new class
2107 * its give's opportunity to mange capabilities of instanceOf operator.
2108 * saving current class each time will give option later to handle instanceOf manually.
2109 */
2110 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.
2111
2112 if (target && !target.constructor.getInstanceType) {
2113 return result;
2114 }
2115
2116 if (target) {
2117 if (!target.instanceTypes) {
2118 target.instanceTypes = [];
2119 }
2120
2121 if (!result) {
2122 if (this.getInstanceType() === target.constructor.getInstanceType()) {
2123 result = true;
2124 }
2125 }
2126
2127 if (result) {
2128 var name = this.getInstanceType === InstanceType.getInstanceType ? 'BaseInstanceType' : this.getInstanceType();
2129
2130 if (-1 === target.instanceTypes.indexOf(name)) {
2131 target.instanceTypes.push(name);
2132 }
2133 }
2134 }
2135
2136 if (!result && target) {
2137 // Check if the given 'target', is instance of known types.
2138 result = target.instanceTypes && Array.isArray(target.instanceTypes) && -1 !== target.instanceTypes.indexOf(this.getInstanceType());
2139 }
2140
2141 return result;
2142 }
2143 }, {
2144 key: "getInstanceType",
2145 value: function getInstanceType() {
2146 elementorModules.ForceMethodImplementation();
2147 }
2148 }]);
2149 return InstanceType;
2150 }(Symbol.hasInstance);
2151
2152 exports["default"] = InstanceType;
2153
2154 /***/ }),
2155
2156 /***/ "../assets/dev/js/modules/imports/module.js":
2157 /*!**************************************************!*\
2158 !*** ../assets/dev/js/modules/imports/module.js ***!
2159 \**************************************************/
2160 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2161
2162 "use strict";
2163
2164
2165 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
2166
2167 var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"));
2168
2169 var Module = function Module() {
2170 var $ = jQuery,
2171 instanceParams = arguments,
2172 self = this,
2173 events = {};
2174 var settings;
2175
2176 var ensureClosureMethods = function ensureClosureMethods() {
2177 $.each(self, function (methodName) {
2178 var oldMethod = self[methodName];
2179
2180 if ('function' !== typeof oldMethod) {
2181 return;
2182 }
2183
2184 self[methodName] = function () {
2185 return oldMethod.apply(self, arguments);
2186 };
2187 });
2188 };
2189
2190 var initSettings = function initSettings() {
2191 settings = self.getDefaultSettings();
2192 var instanceSettings = instanceParams[0];
2193
2194 if (instanceSettings) {
2195 $.extend(true, settings, instanceSettings);
2196 }
2197 };
2198
2199 var init = function init() {
2200 self.__construct.apply(self, instanceParams);
2201
2202 ensureClosureMethods();
2203 initSettings();
2204 self.trigger('init');
2205 };
2206
2207 this.getItems = function (items, itemKey) {
2208 if (itemKey) {
2209 var keyStack = itemKey.split('.'),
2210 currentKey = keyStack.splice(0, 1);
2211
2212 if (!keyStack.length) {
2213 return items[currentKey];
2214 }
2215
2216 if (!items[currentKey]) {
2217 return;
2218 }
2219
2220 return this.getItems(items[currentKey], keyStack.join('.'));
2221 }
2222
2223 return items;
2224 };
2225
2226 this.getSettings = function (setting) {
2227 return this.getItems(settings, setting);
2228 };
2229
2230 this.setSettings = function (settingKey, value, settingsContainer) {
2231 if (!settingsContainer) {
2232 settingsContainer = settings;
2233 }
2234
2235 if ('object' === (0, _typeof2.default)(settingKey)) {
2236 $.extend(settingsContainer, settingKey);
2237 return self;
2238 }
2239
2240 var keyStack = settingKey.split('.'),
2241 currentKey = keyStack.splice(0, 1);
2242
2243 if (!keyStack.length) {
2244 settingsContainer[currentKey] = value;
2245 return self;
2246 }
2247
2248 if (!settingsContainer[currentKey]) {
2249 settingsContainer[currentKey] = {};
2250 }
2251
2252 return self.setSettings(keyStack.join('.'), value, settingsContainer[currentKey]);
2253 };
2254
2255 this.getErrorMessage = function (type, functionName) {
2256 var message;
2257
2258 switch (type) {
2259 case 'forceMethodImplementation':
2260 message = "The method '".concat(functionName, "' must to be implemented in the inheritor child.");
2261 break;
2262
2263 default:
2264 message = 'An error occurs';
2265 }
2266
2267 return message;
2268 }; // TODO: This function should be deleted ?.
2269
2270
2271 this.forceMethodImplementation = function (functionName) {
2272 throw new Error(this.getErrorMessage('forceMethodImplementation', functionName));
2273 };
2274
2275 this.on = function (eventName, callback) {
2276 if ('object' === (0, _typeof2.default)(eventName)) {
2277 $.each(eventName, function (singleEventName) {
2278 self.on(singleEventName, this);
2279 });
2280 return self;
2281 }
2282
2283 var eventNames = eventName.split(' ');
2284 eventNames.forEach(function (singleEventName) {
2285 if (!events[singleEventName]) {
2286 events[singleEventName] = [];
2287 }
2288
2289 events[singleEventName].push(callback);
2290 });
2291 return self;
2292 };
2293
2294 this.off = function (eventName, callback) {
2295 if (!events[eventName]) {
2296 return self;
2297 }
2298
2299 if (!callback) {
2300 delete events[eventName];
2301 return self;
2302 }
2303
2304 var callbackIndex = events[eventName].indexOf(callback);
2305
2306 if (-1 !== callbackIndex) {
2307 delete events[eventName][callbackIndex]; // Reset array index (for next off on same event).
2308
2309 events[eventName] = events[eventName].filter(function (val) {
2310 return val;
2311 });
2312 }
2313
2314 return self;
2315 };
2316
2317 this.trigger = function (eventName) {
2318 var methodName = 'on' + eventName[0].toUpperCase() + eventName.slice(1),
2319 params = Array.prototype.slice.call(arguments, 1);
2320
2321 if (self[methodName]) {
2322 self[methodName].apply(self, params);
2323 }
2324
2325 var callbacks = events[eventName];
2326
2327 if (!callbacks) {
2328 return self;
2329 }
2330
2331 $.each(callbacks, function (index, callback) {
2332 callback.apply(self, params);
2333 });
2334 return self;
2335 };
2336
2337 init();
2338 };
2339
2340 Module.prototype.__construct = function () {};
2341
2342 Module.prototype.getDefaultSettings = function () {
2343 return {};
2344 };
2345
2346 Module.prototype.getConstructorID = function () {
2347 return this.constructor.name;
2348 };
2349
2350 Module.extend = function (properties) {
2351 var $ = jQuery,
2352 parent = this;
2353
2354 var child = function child() {
2355 return parent.apply(this, arguments);
2356 };
2357
2358 $.extend(child, parent);
2359 child.prototype = Object.create($.extend({}, parent.prototype, properties));
2360 child.prototype.constructor = child;
2361 child.__super__ = parent.prototype;
2362 return child;
2363 };
2364
2365 module.exports = Module;
2366
2367 /***/ }),
2368
2369 /***/ "../modules/web-cli/assets/js/api.js":
2370 /*!*******************************************!*\
2371 !*** ../modules/web-cli/assets/js/api.js ***!
2372 \*******************************************/
2373 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
2374
2375 "use strict";
2376
2377
2378 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
2379
2380 var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js");
2381
2382 Object.defineProperty(exports, "__esModule", ({
2383 value: true
2384 }));
2385 exports["default"] = void 0;
2386
2387 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
2388
2389 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
2390
2391 var _backwardsCompatibility = _interopRequireDefault(__webpack_require__(/*! ./core/backwards-compatibility */ "../modules/web-cli/assets/js/core/backwards-compatibility.js"));
2392
2393 var _commandBase = _interopRequireDefault(__webpack_require__(/*! ./modules/command-base */ "../modules/web-cli/assets/js/modules/command-base.js"));
2394
2395 var _commandInternalBase = _interopRequireDefault(__webpack_require__(/*! ./modules/command-internal-base */ "../modules/web-cli/assets/js/modules/command-internal-base.js"));
2396
2397 var _commandData = _interopRequireDefault(__webpack_require__(/*! ./modules/command-data */ "../modules/web-cli/assets/js/modules/command-data.js"));
2398
2399 var _commands = _interopRequireDefault(__webpack_require__(/*! ./core/commands */ "../modules/web-cli/assets/js/core/commands.js"));
2400
2401 var _commandsInternal = _interopRequireDefault(__webpack_require__(/*! ./core/commands-internal */ "../modules/web-cli/assets/js/core/commands-internal.js"));
2402
2403 var _componentBase = _interopRequireDefault(__webpack_require__(/*! ./modules/component-base */ "../modules/web-cli/assets/js/modules/component-base.js"));
2404
2405 var _componentModalBase = _interopRequireDefault(__webpack_require__(/*! ./modules/component-modal-base */ "../modules/web-cli/assets/js/modules/component-modal-base.js"));
2406
2407 var _components = _interopRequireDefault(__webpack_require__(/*! ./core/components */ "../modules/web-cli/assets/js/core/components.js"));
2408
2409 var _data = _interopRequireDefault(__webpack_require__(/*! ./core/data.js */ "../modules/web-cli/assets/js/core/data.js"));
2410
2411 var _hashCommands = _interopRequireDefault(__webpack_require__(/*! ./extras/hash-commands */ "../modules/web-cli/assets/js/extras/hash-commands.js"));
2412
2413 var _hookBreak = _interopRequireDefault(__webpack_require__(/*! ./modules/hook-break */ "../modules/web-cli/assets/js/modules/hook-break.js"));
2414
2415 var _hooks = _interopRequireDefault(__webpack_require__(/*! ./core/hooks */ "../modules/web-cli/assets/js/core/hooks.js"));
2416
2417 var _routes = _interopRequireDefault(__webpack_require__(/*! ./core/routes */ "../modules/web-cli/assets/js/core/routes.js"));
2418
2419 var _shortcuts = _interopRequireDefault(__webpack_require__(/*! ./core/shortcuts */ "../modules/web-cli/assets/js/core/shortcuts.js"));
2420
2421 var _store = _interopRequireDefault(__webpack_require__(/*! ./core/store */ "../modules/web-cli/assets/js/core/store.js"));
2422
2423 var _uiStates = _interopRequireDefault(__webpack_require__(/*! ./core/ui-states */ "../modules/web-cli/assets/js/core/ui-states.js"));
2424
2425 var hookData = _interopRequireWildcard(__webpack_require__(/*! ./modules/hooks/data/ */ "../modules/web-cli/assets/js/modules/hooks/data/index.js"));
2426
2427 var hookUI = _interopRequireWildcard(__webpack_require__(/*! ./modules/hooks/ui */ "../modules/web-cli/assets/js/modules/hooks/ui/index.js"));
2428
2429 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); }
2430
2431 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; }
2432
2433 /* Alphabetical order */
2434 var API = /*#__PURE__*/function () {
2435 /**
2436 * Function constructor().
2437 *
2438 * Create's 'elementor' api.
2439 */
2440 function API() {
2441 (0, _classCallCheck2.default)(this, API);
2442 this.components = new _components.default();
2443 this.commands = new _commands.default();
2444 this.commandsInternal = new _commandsInternal.default();
2445 this.hooks = new _hooks.default();
2446 this.routes = new _routes.default();
2447 this.shortcuts = new _shortcuts.default(jQuery(window));
2448 this.data = new _data.default();
2449 this.store = new _store.default();
2450 this.uiStates = new _uiStates.default();
2451 this.modules = {
2452 CommandBase: _commandBase.default,
2453 CommandInternalBase: _commandInternalBase.default,
2454 CommandData: _commandData.default,
2455 ComponentBase: _componentBase.default,
2456 ComponentModalBase: _componentModalBase.default,
2457 HookBreak: _hookBreak.default,
2458 hookData: hookData,
2459 hookUI: hookUI
2460 };
2461 this.extras = {
2462 hashCommands: new _hashCommands.default()
2463 }; // Backwards compatibility should be last, in order to handle others.
2464
2465 this.bc = new _backwardsCompatibility.default();
2466 }
2467 /**
2468 * Function run().
2469 *
2470 * Alias of `$e.commands.run()`.
2471 *
2472 * @param {string} command
2473 * @param {*} [args={}]
2474 *
2475 * @return {*} result
2476 */
2477
2478
2479 (0, _createClass2.default)(API, [{
2480 key: "run",
2481 value: function run(command) {
2482 var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
2483 return $e.commands.run(command, args);
2484 }
2485 /**
2486 * Function internal().
2487 *
2488 * Alias of `$e.commandsInternal.run()`.
2489 *
2490 * @param {string} command
2491 * @param {*} [args={}]
2492 *
2493 * @return {boolean} result
2494 */
2495
2496 }, {
2497 key: "internal",
2498 value: function internal(command) {
2499 var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
2500 return $e.commandsInternal.run(command, args);
2501 }
2502 /**
2503 * Function route().
2504 *
2505 * Alias of `$e.routes.to()`.
2506 *
2507 * @param {string} route
2508 * @param {*} [args={}]
2509 */
2510
2511 }, {
2512 key: "route",
2513 value: function route(_route) {
2514 var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
2515 return $e.routes.to(_route, args);
2516 } // TODO: shortcut();
2517
2518 }]);
2519 return API;
2520 }();
2521
2522 exports["default"] = API;
2523
2524 /***/ }),
2525
2526 /***/ "../modules/web-cli/assets/js/core/backwards-compatibility.js":
2527 /*!********************************************************************!*\
2528 !*** ../modules/web-cli/assets/js/core/backwards-compatibility.js ***!
2529 \********************************************************************/
2530 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
2531
2532 "use strict";
2533
2534
2535 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
2536
2537 Object.defineProperty(exports, "__esModule", ({
2538 value: true
2539 }));
2540 exports["default"] = void 0;
2541
2542 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
2543
2544 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
2545
2546 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
2547
2548 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
2549
2550 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
2551
2552 var _componentBase = _interopRequireDefault(__webpack_require__(/*! elementor-api/modules/component-base */ "../modules/web-cli/assets/js/modules/component-base.js"));
2553
2554 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); }; }
2555
2556 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; } }
2557
2558 var BackwardsCompatibility = /*#__PURE__*/function () {
2559 function BackwardsCompatibility() {
2560 (0, _classCallCheck2.default)(this, BackwardsCompatibility);
2561 }
2562
2563 (0, _createClass2.default)(BackwardsCompatibility, [{
2564 key: "ensureTab",
2565 value: function ensureTab(namespace, tabSlug) {
2566 var page = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
2567 var component = $e.components.get(namespace);
2568
2569 if (!component) {
2570 var Component = /*#__PURE__*/function (_ComponentBase) {
2571 (0, _inherits2.default)(Component, _ComponentBase);
2572
2573 var _super = _createSuper(Component);
2574
2575 function Component() {
2576 (0, _classCallCheck2.default)(this, Component);
2577 return _super.apply(this, arguments);
2578 }
2579
2580 (0, _createClass2.default)(Component, [{
2581 key: "getNamespace",
2582 value: function getNamespace() {
2583 return namespace;
2584 }
2585 }, {
2586 key: "renderTab",
2587 value: function renderTab(tab) {
2588 elementor.getPanelView().setPage(page).activateTab(tab);
2589 }
2590 }]);
2591 return Component;
2592 }(_componentBase.default);
2593
2594 component = $e.components.register(new Component());
2595 }
2596
2597 if (!component.hasTab(tabSlug) && elementor.config.tabs[tabSlug]) {
2598 component.addTab(tabSlug, {
2599 title: elementor.config.tabs[tabSlug]
2600 });
2601 }
2602 }
2603 }]);
2604 return BackwardsCompatibility;
2605 }();
2606
2607 exports["default"] = BackwardsCompatibility;
2608
2609 /***/ }),
2610
2611 /***/ "../modules/web-cli/assets/js/core/backwards-compatibility/commands.js":
2612 /*!*****************************************************************************!*\
2613 !*** ../modules/web-cli/assets/js/core/backwards-compatibility/commands.js ***!
2614 \*****************************************************************************/
2615 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
2616
2617 "use strict";
2618
2619
2620 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
2621
2622 Object.defineProperty(exports, "__esModule", ({
2623 value: true
2624 }));
2625 exports["default"] = void 0;
2626
2627 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
2628
2629 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
2630
2631 var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js"));
2632
2633 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
2634
2635 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
2636
2637 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
2638
2639 var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
2640
2641 var _module = _interopRequireDefault(__webpack_require__(/*! elementor-assets-js/modules/imports/module.js */ "../assets/dev/js/modules/imports/module.js"));
2642
2643 var _deprecation = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/deprecation */ "../modules/web-cli/assets/js/utils/deprecation.js"));
2644
2645 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); }; }
2646
2647 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; } }
2648
2649 var CommandsBackwardsCompatibility = /*#__PURE__*/function (_Module) {
2650 (0, _inherits2.default)(CommandsBackwardsCompatibility, _Module);
2651
2652 var _super = _createSuper(CommandsBackwardsCompatibility);
2653
2654 function CommandsBackwardsCompatibility() {
2655 var _this;
2656
2657 (0, _classCallCheck2.default)(this, CommandsBackwardsCompatibility);
2658
2659 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
2660 args[_key] = arguments[_key];
2661 }
2662
2663 _this = _super.call.apply(_super, [this].concat(args));
2664 (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "on", function (eventName, callback) {
2665 if ('run' === eventName) {
2666 var componentName = _this.getConstructorID(); // Regex takes the first letter and convert it to lower case.
2667
2668
2669 componentName = componentName.replace(/^./, function (val) {
2670 return val.toLowerCase();
2671 });
2672
2673 _deprecation.default.deprecated("$e.".concat(componentName, ".on( 'run', ... )"), '3.0.0', "$e.".concat(componentName, ".on( 'run:before', ... )"));
2674
2675 _this.onOrig('run:before', callback);
2676
2677 return;
2678 }
2679
2680 _this.onOrig(eventName, callback);
2681 });
2682 return _this;
2683 }
2684
2685 (0, _createClass2.default)(CommandsBackwardsCompatibility, [{
2686 key: "__construct",
2687 value: function __construct() {
2688 this.onOrig = this.on;
2689 }
2690 }]);
2691 return CommandsBackwardsCompatibility;
2692 }(_module.default);
2693
2694 exports["default"] = CommandsBackwardsCompatibility;
2695
2696 /***/ }),
2697
2698 /***/ "../modules/web-cli/assets/js/core/commands-internal.js":
2699 /*!**************************************************************!*\
2700 !*** ../modules/web-cli/assets/js/core/commands-internal.js ***!
2701 \**************************************************************/
2702 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
2703
2704 "use strict";
2705
2706
2707 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
2708
2709 Object.defineProperty(exports, "__esModule", ({
2710 value: true
2711 }));
2712 exports["default"] = void 0;
2713
2714 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
2715
2716 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
2717
2718 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
2719
2720 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
2721
2722 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
2723
2724 var _commands = _interopRequireDefault(__webpack_require__(/*! ./commands.js */ "../modules/web-cli/assets/js/core/commands.js"));
2725
2726 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); }; }
2727
2728 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; } }
2729
2730 var CommandsInternal = /*#__PURE__*/function (_Commands) {
2731 (0, _inherits2.default)(CommandsInternal, _Commands);
2732
2733 var _super = _createSuper(CommandsInternal);
2734
2735 function CommandsInternal() {
2736 (0, _classCallCheck2.default)(this, CommandsInternal);
2737 return _super.apply(this, arguments);
2738 }
2739
2740 (0, _createClass2.default)(CommandsInternal, [{
2741 key: "error",
2742 value: function error(message) {
2743 throw Error('Commands internal: ' + message);
2744 }
2745 }]);
2746 return CommandsInternal;
2747 }(_commands.default);
2748
2749 exports["default"] = CommandsInternal;
2750
2751 /***/ }),
2752
2753 /***/ "../modules/web-cli/assets/js/core/commands.js":
2754 /*!*****************************************************!*\
2755 !*** ../modules/web-cli/assets/js/core/commands.js ***!
2756 \*****************************************************/
2757 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
2758
2759 "use strict";
2760
2761
2762 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
2763
2764 Object.defineProperty(exports, "__esModule", ({
2765 value: true
2766 }));
2767 exports["default"] = void 0;
2768
2769 var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js"));
2770
2771 var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js"));
2772
2773 var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"));
2774
2775 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
2776
2777 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
2778
2779 var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js"));
2780
2781 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
2782
2783 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
2784
2785 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
2786
2787 var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
2788
2789 var _commands = _interopRequireDefault(__webpack_require__(/*! ./backwards-compatibility/commands */ "../modules/web-cli/assets/js/core/backwards-compatibility/commands.js"));
2790
2791 var _commandBase = _interopRequireDefault(__webpack_require__(/*! ../modules/command-base */ "../modules/web-cli/assets/js/modules/command-base.js"));
2792
2793 var _console = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/console */ "../modules/web-cli/assets/js/utils/console.js"));
2794
2795 var _deprecation = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/deprecation */ "../modules/web-cli/assets/js/utils/deprecation.js"));
2796
2797 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; }
2798
2799 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; }
2800
2801 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); }; }
2802
2803 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; } }
2804
2805 /**
2806 * @typedef {import('../modules/component-base')} ComponentBase
2807 */
2808
2809 /**
2810 * @typedef {import('../modules/command-base')} CommandBase
2811 */
2812
2813 /**
2814 * @typedef {{}} Component
2815 */
2816 var Commands = /*#__PURE__*/function (_CommandsBackwardsCom) {
2817 (0, _inherits2.default)(Commands, _CommandsBackwardsCom);
2818
2819 var _super = _createSuper(Commands);
2820
2821 /**
2822 * Function constructor().
2823 *
2824 * Create `$e.commands` API.
2825 *
2826 * @param {{}} args
2827 */
2828 function Commands() {
2829 var _this;
2830
2831 (0, _classCallCheck2.default)(this, Commands);
2832
2833 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
2834 args[_key] = arguments[_key];
2835 }
2836
2837 _this = _super.call.apply(_super, [this].concat(args));
2838 _this.current = {};
2839 _this.currentArgs = {};
2840 _this.currentTrace = [];
2841 _this.commands = {};
2842 _this.components = {};
2843 Object.defineProperty((0, _assertThisInitialized2.default)(_this), 'classes', {
2844 get: function get() {
2845 _deprecation.default.deprecated('$e.commands.classes', '3.7.0', '$e.commands.getCommandClass(), $e.commandsInternal.getCommandClass(), $e.data.getCommandClass(), $e.routes.getCommandClass() according to the requested command infra-structure,');
2846
2847 return _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, $e.commands.commands), $e.commandsInternal.commands), $e.data.commands), $e.routes.commands);
2848 }
2849 });
2850 return _this;
2851 }
2852 /**
2853 * @param {string} id
2854 * @return {CommandBase} command class
2855 */
2856
2857
2858 (0, _createClass2.default)(Commands, [{
2859 key: "getCommandClass",
2860 value: function getCommandClass(id) {
2861 return this.commands[id];
2862 }
2863 /**
2864 * Function getAll().
2865 *
2866 * Receive all loaded commands.
2867 *
2868 * @return {string[]} commands
2869 */
2870
2871 }, {
2872 key: "getAll",
2873 value: function getAll() {
2874 return Object.keys(this.commands).sort();
2875 }
2876 /**
2877 * Function register().
2878 *
2879 * Register new command.
2880 *
2881 * @param {ComponentBase|string} component
2882 * @param {string} command
2883 * @param {Function} callback
2884 *
2885 * @return {Commands} commands
2886 */
2887
2888 }, {
2889 key: "register",
2890 value: function register(component, command, callback) {
2891 var _this2 = this;
2892
2893 var namespace;
2894
2895 if ('string' === typeof component) {
2896 namespace = component;
2897 component = $e.components.get(namespace);
2898
2899 if (!component) {
2900 this.error("'".concat(namespace, "' component is not exist."));
2901 }
2902 } else {
2903 namespace = component.getNamespace();
2904 }
2905
2906 var fullCommand = namespace + (command ? '/' + command : '');
2907
2908 if (this.commands[fullCommand]) {
2909 this.error("`".concat(fullCommand, "` is already registered."));
2910 }
2911
2912 this.commands[fullCommand] = callback;
2913 this.components[fullCommand] = namespace;
2914 var shortcuts = component.getShortcuts(),
2915 shortcut = shortcuts[command];
2916
2917 if (shortcut) {
2918 shortcut.command = fullCommand;
2919
2920 shortcut.callback = function (event) {
2921 return _this2.runShortcut(fullCommand, event);
2922 };
2923
2924 $e.shortcuts.register(shortcut.keys, shortcut);
2925 }
2926
2927 return this;
2928 }
2929 }, {
2930 key: "unregister",
2931 value: function unregister(component, command) {
2932 var namespace;
2933
2934 if ('string' === typeof component) {
2935 namespace = component;
2936 component = $e.components.get(namespace);
2937
2938 if (!component) {
2939 this.error("'".concat(namespace, "' component is not exist."));
2940 }
2941 } else {
2942 namespace = component.getNamespace();
2943 }
2944
2945 var fullCommand = namespace + (command ? '/' + command : '');
2946
2947 if (!this.commands[fullCommand]) {
2948 this.error("`".concat(fullCommand, "` not exist."));
2949 }
2950
2951 delete this.commands[fullCommand];
2952 delete this.components[fullCommand];
2953 var shortcuts = component.getShortcuts(),
2954 shortcut = shortcuts[command];
2955
2956 if (shortcut) {
2957 $e.shortcuts.unregister(shortcut.keys, shortcut);
2958 }
2959
2960 return this;
2961 }
2962 /**
2963 * Function getComponent().
2964 *
2965 * Receive Component of the command.
2966 *
2967 * @param {string} command
2968 *
2969 * @return {Component} component
2970 */
2971
2972 }, {
2973 key: "getComponent",
2974 value: function getComponent(command) {
2975 var namespace = this.components[command];
2976 return $e.components.get(namespace);
2977 }
2978 /**
2979 * Function is().
2980 *
2981 * Checks if current running command is the same parameter command.
2982 *
2983 * @param {string} command
2984 *
2985 * @return {boolean} is this command the same as the one passed in the arguments
2986 */
2987
2988 }, {
2989 key: "is",
2990 value: function is(command) {
2991 var component = this.getComponent(command);
2992
2993 if (!component) {
2994 return false;
2995 }
2996
2997 return command === this.current[component.getServiceName()];
2998 }
2999 /**
3000 * Function isCurrentFirstTrace().
3001 *
3002 * Checks if parameter command is the first command in trace that currently running.
3003 *
3004 * @param {string} command
3005 *
3006 * @return {boolean} is parameter command the first command in trace that currently running
3007 */
3008
3009 }, {
3010 key: "isCurrentFirstTrace",
3011 value: function isCurrentFirstTrace(command) {
3012 return command === this.getCurrentFirstTrace();
3013 }
3014 /**
3015 * Function getCurrent().
3016 *
3017 * Receive currently running components and its commands.
3018 *
3019 * @param {string} container
3020 *
3021 * @return {{}|boolean|*} currently running components
3022 */
3023
3024 }, {
3025 key: "getCurrent",
3026 value: function getCurrent() {
3027 var container = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
3028
3029 if (container) {
3030 if (!this.current[container]) {
3031 return false;
3032 }
3033
3034 return this.current[container];
3035 }
3036
3037 return this.current;
3038 }
3039 /**
3040 * Function getCurrentArgs().
3041 *
3042 * Receive currently running command args.
3043 *
3044 * @param {string} container
3045 *
3046 * @return {{}|boolean|*} current arguments
3047 */
3048
3049 }, {
3050 key: "getCurrentArgs",
3051 value: function getCurrentArgs() {
3052 var container = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
3053
3054 if (container) {
3055 if (!this.currentArgs[container]) {
3056 return false;
3057 }
3058
3059 return this.currentArgs[container];
3060 }
3061
3062 return this.currentArgs;
3063 }
3064 /**
3065 * Function getCurrentFirst().
3066 *
3067 * Receive first command that currently running.
3068 *
3069 * @return {string} first running command
3070 */
3071
3072 }, {
3073 key: "getCurrentFirst",
3074 value: function getCurrentFirst() {
3075 return Object.values(this.current)[0];
3076 }
3077 /**
3078 * Function getCurrentLast().
3079 *
3080 * Receive last command that currently running.
3081 *
3082 * @return {string} last running command
3083 */
3084
3085 }, {
3086 key: "getCurrentLast",
3087 value: function getCurrentLast() {
3088 var current = Object.values(this.current);
3089 return current[current.length - 1];
3090 }
3091 /**
3092 * Function getCurrentFirstTrace().
3093 *
3094 * Receive first command in trace that currently running
3095 *
3096 * @return {string} first command in trace
3097 */
3098
3099 }, {
3100 key: "getCurrentFirstTrace",
3101 value: function getCurrentFirstTrace() {
3102 return this.currentTrace[0];
3103 }
3104 /**
3105 * Function beforeRun().
3106 *
3107 * Responsible to add current command to trace and trigger 'run:before' event.
3108 * Run before command.
3109 *
3110 * @param {string} command
3111 * @param {{}} args
3112 * @param {boolean} [addTrace=true]
3113 */
3114
3115 }, {
3116 key: "beforeRun",
3117 value: function beforeRun(command) {
3118 var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
3119 var addTrace = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
3120 var component = this.getComponent(command),
3121 container = component.getServiceName();
3122
3123 if (addTrace) {
3124 this.addCurrentTrace(container, command, args);
3125 }
3126
3127 if (args.onBefore) {
3128 args.onBefore.apply(component, [args]);
3129 }
3130
3131 this.trigger('run:before', component, command, args);
3132 }
3133 /**
3134 * Function validateRun().
3135 *
3136 * Responsible to validate if the run is even possible.
3137 * Runs immediately after entering `run()`.
3138 *
3139 * @param {string} command
3140 * @param {*} args
3141 *
3142 * @return {boolean} dependency result
3143 */
3144
3145 }, {
3146 key: "validateRun",
3147 value: function validateRun(command) {
3148 var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
3149
3150 if (!this.commands[command]) {
3151 this.error("`".concat(command, "` not found."));
3152 }
3153
3154 return this.getComponent(command).dependency(command, args);
3155 }
3156 /**
3157 * Function run().
3158 *
3159 * Runs a command.
3160 *
3161 * @param {string} command
3162 * @param {{}} args
3163 *
3164 * @return {boolean|*} results
3165 */
3166
3167 }, {
3168 key: "run",
3169 value: function run(command) {
3170 var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
3171
3172 if (!this.validateRun(command, args)) {
3173 return false;
3174 }
3175
3176 this.beforeRun(command, args); // Get command class or callback.
3177
3178 var context = this.commands[command]; // Is it command-base based class?
3179
3180 if (context.getInstanceType) {
3181 context = new context(args);
3182 }
3183
3184 var currentComponent = this.getComponent(command); // Is simple callback? (e.g. a route)
3185
3186 if (!(context instanceof _commandBase.default)) {
3187 var results = context.apply(currentComponent, [args]);
3188 this.afterRun(command, args, results);
3189 return results;
3190 }
3191
3192 if (!this.validateInstanceScope(context, currentComponent, command)) {
3193 return this.removeCurrentTrace(currentComponent);
3194 }
3195
3196 return this.runInstance(context);
3197 }
3198 /**
3199 * Function runInstance().
3200 *
3201 * @param {CommandBase} instance
3202 *
3203 * @return {boolean|Promise<*>}
3204 */
3205
3206 }, {
3207 key: "runInstance",
3208 value: function runInstance(instance) {
3209 var results = null; // For UI Hooks.
3210
3211 instance.onBeforeRun(instance.args);
3212
3213 try {
3214 // For data hooks.
3215 instance.onBeforeApply(instance.args);
3216 results = instance.run();
3217 } catch (e) {
3218 this.catchApply(e, instance);
3219
3220 if (e instanceof $e.modules.HookBreak) {
3221 this.removeCurrentTrace(instance.component);
3222 return false;
3223 }
3224 }
3225
3226 return this.applyRunAfter(instance, results);
3227 }
3228 /**
3229 * Function applyRunAfter().
3230 *
3231 * Responsible for applying everything that need to be run after each command runs.
3232 * Called on run() after runInstance(), to manipulate results & apply 'after' hooks.
3233 *
3234 * @param {CommandBase} instance
3235 * @param {*} result
3236 *
3237 * @return {Promise<*>|*}
3238 */
3239
3240 }, {
3241 key: "applyRunAfter",
3242 value: function applyRunAfter(instance, result) {
3243 var _this3 = this;
3244
3245 // TODO: Temp code determine if it's a jQuery deferred object.
3246 if (result && 'object' === (0, _typeof2.default)(result) && result.promise && result.then && result.fail) {
3247 var handleJQueryDeferred = function handleJQueryDeferred(_result) {
3248 _result.fail(function (e) {
3249 _this3.catchApply(e, instance);
3250
3251 _this3.afterRun(instance.command, instance.args, e);
3252 });
3253
3254 _result.done(function (__result) {
3255 _this3.applyRunAfterSync(instance, __result);
3256 });
3257
3258 return _result;
3259 };
3260
3261 return handleJQueryDeferred(result);
3262 } else if (result instanceof Promise) {
3263 return this.applyRunAfterAsync(instance, result);
3264 }
3265
3266 this.applyRunAfterSync(instance, result);
3267 return result;
3268 }
3269 /**
3270 * Function applyRunAfterSync().
3271 *
3272 * Responsible to handle simple(synchronous) 'run after' behavior.
3273 * Called on applyRunAfterSync() after runInstance(), to handle results.
3274 *
3275 * @param {CommandBase} instance
3276 * @param {*} result
3277 */
3278
3279 }, {
3280 key: "applyRunAfterSync",
3281 value: function applyRunAfterSync(instance, result) {
3282 // Run Data hooks.
3283 instance.onAfterApply(instance.args, result); // For UI hooks.
3284
3285 instance.onAfterRun(instance.args, result);
3286 this.afterRun(instance.command, instance.args, result);
3287 }
3288 /**
3289 * Function applyRunAfterAsync().
3290 *
3291 * Await for promise result.
3292 * Called on applyRunAfter() after runInstance().
3293 *
3294 * @param {CommandBase} instance
3295 * @param {*} result
3296 */
3297
3298 }, {
3299 key: "applyRunAfterAsync",
3300 value: function applyRunAfterAsync(instance, result) {
3301 var _this4 = this;
3302
3303 // Override initial result ( promise ) to await onAfter promises, first!.
3304 return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
3305 return _regenerator.default.wrap(function _callee$(_context) {
3306 while (1) {
3307 switch (_context.prev = _context.next) {
3308 case 0:
3309 _context.next = 2;
3310 return result.catch(function (e) {
3311 _this4.catchApply(e, instance);
3312
3313 _this4.afterRun(instance.command, instance.args, e);
3314 });
3315
3316 case 2:
3317 _context.next = 4;
3318 return result.then(function (_result) {
3319 return _this4.applyRunAfterAsyncResult(instance, _result);
3320 });
3321
3322 case 4:
3323 return _context.abrupt("return", result);
3324
3325 case 5:
3326 case "end":
3327 return _context.stop();
3328 }
3329 }
3330 }, _callee);
3331 }))();
3332 }
3333 /**
3334 * Function applyRunAfterAsyncResult().
3335 *
3336 * Responsible to await all promises results.
3337 * Called on applyRunAfterAsync() after runInstance(), to handle async results.
3338 * Awaits all the promises, before releasing the command.
3339 *
3340 * @param {CommandBase} instance
3341 * @param {*} result
3342 */
3343
3344 }, {
3345 key: "applyRunAfterAsyncResult",
3346 value: function () {
3347 var _applyRunAfterAsyncResult = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(instance, result) {
3348 var results, promises;
3349 return _regenerator.default.wrap(function _callee2$(_context2) {
3350 while (1) {
3351 switch (_context2.prev = _context2.next) {
3352 case 0:
3353 // Run Data hooks.
3354 results = instance.onAfterApply(instance.args, result), promises = Array.isArray(results) ? results.flat().filter(function (filtered) {
3355 return filtered instanceof Promise;
3356 }) : [];
3357
3358 if (!promises.length) {
3359 _context2.next = 4;
3360 break;
3361 }
3362
3363 _context2.next = 4;
3364 return Promise.all(promises);
3365
3366 case 4:
3367 // For UI hooks.
3368 instance.onAfterRun(instance.args, result);
3369 this.afterRun(instance.command, instance.args, result);
3370
3371 case 6:
3372 case "end":
3373 return _context2.stop();
3374 }
3375 }
3376 }, _callee2, this);
3377 }));
3378
3379 function applyRunAfterAsyncResult(_x, _x2) {
3380 return _applyRunAfterAsyncResult.apply(this, arguments);
3381 }
3382
3383 return applyRunAfterAsyncResult;
3384 }()
3385 /**
3386 * Function afterRun().
3387 *
3388 * Responsible to to clear command from trace, and run 'run:after' event.
3389 * Method fired after the command runs.
3390 *
3391 * @param {string} command
3392 * @param {{}} args
3393 * @param {*} results
3394 * @param {boolean} [removeTrace=true]
3395 */
3396
3397 }, {
3398 key: "afterRun",
3399 value: function afterRun(command, args) {
3400 var results = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
3401 var removeTrace = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
3402 var component = this.getComponent(command);
3403
3404 if (args.onAfter) {
3405 args.onAfter.apply(component, [args, results]);
3406 }
3407
3408 this.trigger('run:after', component, command, args, results);
3409
3410 if (removeTrace) {
3411 this.removeCurrentTrace(component);
3412 }
3413 }
3414 /**
3415 * @param {Error} e
3416 * @param {CommandBase} instance
3417 */
3418
3419 }, {
3420 key: "catchApply",
3421 value: function catchApply(e, instance) {
3422 instance.onCatchApply(e);
3423
3424 _console.default.error(e);
3425 }
3426 /**
3427 * Function runShortcut().
3428 *
3429 * Run shortcut.
3430 *
3431 * It's separated in order to allow override.
3432 *
3433 * @param {string} command
3434 * @param {*} event
3435 *
3436 * @return {boolean|*} result
3437 */
3438
3439 }, {
3440 key: "runShortcut",
3441 value: function runShortcut(command, event) {
3442 return this.run(command, event);
3443 }
3444 }, {
3445 key: "validateInstanceScope",
3446 value: function validateInstanceScope(instance, currentComponent, command) {
3447 if (!(instance instanceof _commandBase.default)) {
3448 this.error("invalid instance, command: '".concat(command, "' "));
3449 } // In case of different scope.
3450
3451
3452 if (currentComponent !== instance.component) {
3453 if ($e.devTools) {
3454 $e.devTools.log.warn("Command: '".concat(command, "' registerArgs.component: '").concat(instance.component.getNamespace(), "' while current component is: '").concat(currentComponent.getNamespace(), "'"));
3455 }
3456
3457 return false;
3458 }
3459
3460 return true;
3461 }
3462 }, {
3463 key: "addCurrentTrace",
3464 value: function addCurrentTrace(container, command, args) {
3465 this.currentTrace.push(command);
3466 Commands.trace.push(command);
3467 this.attachCurrent(container, command, args);
3468 }
3469 }, {
3470 key: "removeCurrentTrace",
3471 value: function removeCurrentTrace(currentComponent) {
3472 var container = currentComponent.getServiceName();
3473 this.currentTrace.pop();
3474 Commands.trace.pop();
3475 this.detachCurrent(container);
3476 }
3477 }, {
3478 key: "attachCurrent",
3479 value: function attachCurrent(container, command, args) {
3480 this.current[container] = command;
3481 this.currentArgs[container] = args;
3482 }
3483 }, {
3484 key: "detachCurrent",
3485 value: function detachCurrent(container) {
3486 delete this.current[container];
3487 delete this.currentArgs[container];
3488 }
3489 /**
3490 * Function error().
3491 *
3492 * Throws error.
3493 *
3494 * @throws {Error}
3495 *
3496 * @param {string} message
3497 */
3498
3499 }, {
3500 key: "error",
3501 value: function error(message) {
3502 throw Error("Commands: ".concat(message));
3503 }
3504 }]);
3505 return Commands;
3506 }(_commands.default);
3507
3508 exports["default"] = Commands;
3509 (0, _defineProperty2.default)(Commands, "trace", []);
3510
3511 /***/ }),
3512
3513 /***/ "../modules/web-cli/assets/js/core/components.js":
3514 /*!*******************************************************!*\
3515 !*** ../modules/web-cli/assets/js/core/components.js ***!
3516 \*******************************************************/
3517 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
3518
3519 "use strict";
3520
3521
3522 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
3523
3524 Object.defineProperty(exports, "__esModule", ({
3525 value: true
3526 }));
3527 exports["default"] = void 0;
3528
3529 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
3530
3531 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
3532
3533 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
3534
3535 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
3536
3537 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
3538
3539 var _module = _interopRequireDefault(__webpack_require__(/*! elementor-assets-js/modules/imports/module.js */ "../assets/dev/js/modules/imports/module.js"));
3540
3541 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); }; }
3542
3543 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; } }
3544
3545 /**
3546 * @typedef {{}} Component
3547 */
3548 var _default = /*#__PURE__*/function (_Module) {
3549 (0, _inherits2.default)(_default, _Module);
3550
3551 var _super = _createSuper(_default);
3552
3553 function _default() {
3554 var _this;
3555
3556 (0, _classCallCheck2.default)(this, _default);
3557
3558 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
3559 args[_key] = arguments[_key];
3560 }
3561
3562 _this = _super.call.apply(_super, [this].concat(args));
3563 _this.components = {};
3564 _this.activeComponents = {};
3565 return _this;
3566 }
3567
3568 (0, _createClass2.default)(_default, [{
3569 key: "getAll",
3570 value: function getAll() {
3571 return Object.keys(this.components).sort();
3572 }
3573 }, {
3574 key: "register",
3575 value: function register(component) {
3576 if (this.components[component.getNamespace()]) {
3577 return;
3578 }
3579
3580 component.registerAPI();
3581 this.components[component.getNamespace()] = component;
3582 return component;
3583 }
3584 /**
3585 * @param {string} id
3586 * @return {Component} component
3587 */
3588
3589 }, {
3590 key: "get",
3591 value: function get(id) {
3592 return this.components[id];
3593 }
3594 }, {
3595 key: "getActive",
3596 value: function getActive() {
3597 return this.activeComponents;
3598 }
3599 }, {
3600 key: "activate",
3601 value: function activate(namespace) {
3602 // Add as last.
3603 this.inactivate(namespace);
3604 this.activeComponents[namespace] = true;
3605 }
3606 }, {
3607 key: "inactivate",
3608 value: function inactivate(namespace) {
3609 delete this.activeComponents[namespace];
3610 }
3611 }, {
3612 key: "isActive",
3613 value: function isActive(namespace) {
3614 return !!this.activeComponents[namespace];
3615 }
3616 }]);
3617 return _default;
3618 }(_module.default);
3619
3620 exports["default"] = _default;
3621
3622 /***/ }),
3623
3624 /***/ "../modules/web-cli/assets/js/core/data.js":
3625 /*!*************************************************!*\
3626 !*** ../modules/web-cli/assets/js/core/data.js ***!
3627 \*************************************************/
3628 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
3629
3630 "use strict";
3631
3632
3633 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
3634
3635 Object.defineProperty(exports, "__esModule", ({
3636 value: true
3637 }));
3638 exports["default"] = exports.READABLE = exports.EDITABLE = exports.DELETABLE = exports.CREATABLE = exports.ALLMETHODS = void 0;
3639
3640 var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js"));
3641
3642 var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js"));
3643
3644 var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js"));
3645
3646 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
3647
3648 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
3649
3650 var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js"));
3651
3652 var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js"));
3653
3654 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
3655
3656 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
3657
3658 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
3659
3660 var _argsObject = _interopRequireDefault(__webpack_require__(/*! elementor-assets-js/modules/imports/args-object */ "../assets/dev/js/modules/imports/args-object.js"));
3661
3662 var _commands = _interopRequireDefault(__webpack_require__(/*! ./commands.js */ "../modules/web-cli/assets/js/core/commands.js"));
3663
3664 var _cache = _interopRequireDefault(__webpack_require__(/*! ./data/cache */ "../modules/web-cli/assets/js/core/data/cache.js"));
3665
3666 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); }; }
3667
3668 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; } }
3669
3670 /**
3671 * @typedef {('create'|'delete'|'get'|'update'|'options')} DataTypes
3672 */
3673
3674 /**
3675 * @typedef {import('../modules/component-base')} ComponentBase
3676 */
3677
3678 /**
3679 * @typedef {{}} RequestInfo
3680 */
3681
3682 /**
3683 * @typedef {{}} RequestData
3684 * @property {ComponentBase} component component
3685 * @property {string} command command
3686 * @property {{}} args arguments
3687 * @property {DataTypes} type type
3688 * @property {number} timestamp timestamp
3689 * @property {string} endpoint endpoint
3690 *
3691 * @property {string} [baseEndpointURL] baseEndpointURL
3692 * @property {string} [namespace] namespace
3693 * @property {string} [version] version
3694 * @property {('hit'|'miss')} [cache] cache
3695 */
3696
3697 /**
3698 * @typedef {Object} ExtractedCommand
3699 * @property {string} command command
3700 * @property {Object} args arguments
3701 */
3702 // TODO: Return it from the server. Original at WP_REST_Server.
3703 var READABLE = ['GET'],
3704 CREATABLE = ['POST'],
3705 EDITABLE = ['POST', 'PUT', 'PATCH'],
3706 DELETABLE = ['DELETE'],
3707 ALLMETHODS = ['GET', 'POST', 'PUT', 'PATCH', 'DELETE'];
3708 exports.ALLMETHODS = ALLMETHODS;
3709 exports.DELETABLE = DELETABLE;
3710 exports.EDITABLE = EDITABLE;
3711 exports.CREATABLE = CREATABLE;
3712 exports.READABLE = READABLE;
3713
3714 var Data = /*#__PURE__*/function (_Commands) {
3715 (0, _inherits2.default)(Data, _Commands);
3716
3717 var _super = _createSuper(Data);
3718
3719 function Data() {
3720 var _this;
3721
3722 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
3723 (0, _classCallCheck2.default)(this, Data);
3724 _this = _super.call(this, args);
3725 _this.args = Object.assign(args, {
3726 namespace: 'elementor',
3727 version: '1',
3728 baseEndpointURL: elementorWebCliConfig.urls.rest
3729 });
3730 _this.cache = new _cache.default((0, _assertThisInitialized2.default)(_this));
3731 _this.validatedRequests = {};
3732 _this.commandFormats = {};
3733 return _this;
3734 }
3735 /**
3736 * Function getHTTPMethod().
3737 *
3738 * Returns HTTP Method by type.
3739 *
3740 * @param {DataTypes} type
3741 *
3742 * @return {string|boolean} HTTP Method
3743 */
3744
3745
3746 (0, _createClass2.default)(Data, [{
3747 key: "getHTTPMethod",
3748 value: function getHTTPMethod(type) {
3749 switch (type) {
3750 case 'create':
3751 return 'POST';
3752
3753 case 'delete':
3754 return 'DELETE';
3755
3756 case 'get':
3757 return 'GET';
3758
3759 case 'update':
3760 return 'PUT';
3761
3762 case 'options':
3763 return 'OPTIONS';
3764 }
3765
3766 return false;
3767 }
3768 /**
3769 * Function getAllowedMethods().
3770 *
3771 * Returns allowed HTTP methods by type.
3772 *
3773 * @param {DataTypes} type
3774 *
3775 * @return {[string]|boolean} allowed HTTP methods
3776 */
3777
3778 }, {
3779 key: "getAllowedMethods",
3780 value: function getAllowedMethods(type) {
3781 switch (type) {
3782 case 'create':
3783 return CREATABLE;
3784
3785 case 'delete':
3786 return DELETABLE;
3787
3788 case 'get':
3789 return READABLE;
3790
3791 case 'update':
3792 return EDITABLE;
3793
3794 case 'options':
3795 return ['OPTIONS'];
3796 }
3797
3798 return false;
3799 }
3800 /**
3801 * Function getEndpointURL().
3802 *
3803 * Get remote endpoint address.
3804 *
3805 * @param {RequestData} requestData
3806 * @param {string} [endpoint=requestData.endpoint]
3807 *
3808 * @return {string} endpoint address
3809 */
3810
3811 }, {
3812 key: "getEndpointURL",
3813 value: function getEndpointURL(requestData) {
3814 var endpoint = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : requestData.endpoint;
3815 // Allow to request data override default namespace and args.
3816 var _requestData$baseEndp = requestData.baseEndpointURL,
3817 baseEndpointURL = _requestData$baseEndp === void 0 ? this.args.baseEndpointURL : _requestData$baseEndp,
3818 _requestData$namespac = requestData.namespace,
3819 namespace = _requestData$namespac === void 0 ? this.args.namespace : _requestData$namespac,
3820 _requestData$version = requestData.version,
3821 version = _requestData$version === void 0 ? this.args.version : _requestData$version;
3822 return "".concat(baseEndpointURL).concat(namespace, "/v").concat(version, "/") + endpoint;
3823 }
3824 /**
3825 * Function commandToEndpoint().
3826 *
3827 * Convert command to endpoint.
3828 *
3829 * For example `component/command/{arg}` => `controller/endpoint/8`.
3830 *
3831 * TODO: Find a better solution.
3832 *
3833 * @param {string} command
3834 * @param {{}} args
3835 * @param {string|null} [format]
3836 *
3837 * @return {string} endpoint
3838 */
3839
3840 }, {
3841 key: "commandToEndpoint",
3842 value: function commandToEndpoint(command, args) {
3843 var format = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
3844 var endpoint = command;
3845 var argsQueryLength = args !== null && args !== void 0 && args.query ? Object.values(args.query).length : 0;
3846
3847 if (argsQueryLength && format && format.includes('/{')) {
3848 // Means command includes magic query arguments ( controller/endpoint/{whatever} ).
3849 var magicParams = format.split('/').filter(function (str) {
3850 return '{' === str.charAt(0);
3851 });
3852 magicParams.forEach(function (param) {
3853 // Remove the '{', '}'.
3854 param = param.replace('{', '');
3855 param = param.replace('}', '');
3856 var formatted = Object.entries(args.query).find(function (_ref) {
3857 var _ref2 = (0, _slicedToArray2.default)(_ref, 1),
3858 key = _ref2[0];
3859
3860 return key === param;
3861 });
3862
3863 if (!formatted) {
3864 return;
3865 }
3866
3867 var key = formatted[0],
3868 value = formatted[1].toString(); // Replace magic params with values.
3869
3870 format = format.replace(new RegExp('{' + param + '}', 'g'), value);
3871 delete args.query[key];
3872 });
3873 }
3874
3875 if (format) {
3876 endpoint = format;
3877 } // If requested magic param does not exist in args, need to remove it to have fixed endpoint.
3878 // eg: 'documents/{documentId}/elements/{elementId}' and args { documentId: 4123 }.
3879 // result: 'documents/4123/elements'
3880
3881
3882 if (format && endpoint.includes('/{')) {
3883 endpoint = endpoint.substring(0, endpoint.indexOf('/{'));
3884 }
3885
3886 if (args.query && Object.values(args.query).length) {
3887 // Sorting since the endpoint later will be used as key to store the cache.
3888 var queryEntries = Object.entries(args.query).sort(function (_ref3, _ref4) {
3889 var _ref5 = (0, _slicedToArray2.default)(_ref3, 1),
3890 aKey = _ref5[0];
3891
3892 var _ref6 = (0, _slicedToArray2.default)(_ref4, 1),
3893 bKey = _ref6[0];
3894
3895 return aKey - bKey;
3896 } // Sort by param name.
3897 ); // `args.query` will become a part of GET params.
3898
3899 if (queryEntries.length) {
3900 endpoint += '?';
3901 queryEntries.forEach(function (_ref7) {
3902 var _ref8 = (0, _slicedToArray2.default)(_ref7, 2),
3903 name = _ref8[0],
3904 value = _ref8[1];
3905
3906 // Replace the character '/' with the encoded version,
3907 // mostly because when saving this endpoint value to the cache it splits the url base on the '/' character.
3908 value = "".concat(value).replace(/\//g, '%2F');
3909 endpoint += name + '=' + value + '&';
3910 });
3911 } // If last character is '&' remove it.
3912
3913
3914 endpoint = endpoint.replace(/&$/, '');
3915 }
3916
3917 return endpoint;
3918 }
3919 /**
3920 * Function commandExtractArgs().
3921 *
3922 * If the command have query convert it to args.
3923 *
3924 * @param {string} command
3925 * @param {Object} args
3926 *
3927 * @return {ExtractedCommand} command
3928 */
3929
3930 }, {
3931 key: "commandExtractArgs",
3932 value: function commandExtractArgs(command) {
3933 var _command;
3934
3935 var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
3936
3937 if ((_command = command) !== null && _command !== void 0 && _command.includes('?')) {
3938 if (!args.query) {
3939 args.query = {};
3940 }
3941
3942 var commandParts = command.split('?'),
3943 pureCommand = commandParts[0],
3944 queryString = commandParts[1],
3945 query = new URLSearchParams(queryString);
3946 Object.assign(args.query, Object.fromEntries(query));
3947 command = pureCommand;
3948 }
3949
3950 return {
3951 command: command,
3952 args: args
3953 };
3954 }
3955 /**
3956 * Function validateRequestData().
3957 *
3958 * Validate request data requirements.
3959 *
3960 * @param {RequestData} requestData
3961 * @param {boolean} [requireArgsData]
3962 */
3963
3964 }, {
3965 key: "validateRequestData",
3966 value: function validateRequestData(requestData) {
3967 var requireArgsData = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
3968
3969 // Do not validate if its already valid.
3970 if (requestData.timestamp && this.validatedRequests[requestData.timestamp]) {
3971 return;
3972 }
3973
3974 var argsObject = new _argsObject.default(requestData);
3975 argsObject.requireArgument('component');
3976 argsObject.requireArgumentType('command', 'string');
3977 argsObject.requireArgumentType('endpoint', 'string');
3978
3979 if (requireArgsData) {
3980 argsObject.requireArgumentType('data', 'object', requestData.args);
3981 } // Ensure timestamp.
3982
3983
3984 if (!requestData.timestamp) {
3985 requestData.timestamp = new Date().getTime();
3986 }
3987
3988 this.validatedRequests[requestData.timestamp] = true;
3989 }
3990 /**
3991 * Function prepareHeaders().
3992 *
3993 * Prepare the headers for each request.
3994 *
3995 * @param {RequestData} requestData
3996 *
3997 * @return {{}} params
3998 */
3999
4000 }, {
4001 key: "prepareHeaders",
4002 value: function prepareHeaders(requestData) {
4003 var _requestData$args, _requestData$args$opt;
4004
4005 var type = requestData.type,
4006 nonce = elementorWebCliConfig.nonce,
4007 params = {
4008 signal: (_requestData$args = requestData.args) === null || _requestData$args === void 0 ? void 0 : (_requestData$args$opt = _requestData$args.options) === null || _requestData$args$opt === void 0 ? void 0 : _requestData$args$opt.signal,
4009 credentials: 'include' // Cookies is required for wp reset.
4010
4011 },
4012 headers = {
4013 'X-WP-Nonce': nonce
4014 };
4015 /**
4016 * Translate:
4017 * 'create, delete, get, update' to HTTP Methods:
4018 * 'GET, POST, PUT, PATCH, DELETE'
4019 */
4020
4021 var allowedMethods = this.getAllowedMethods(type),
4022 method = this.getHTTPMethod(type);
4023
4024 if ('GET' === method) {
4025 Object.assign(params, {
4026 headers: headers
4027 });
4028 } else if (allowedMethods) {
4029 var _requestData$args2, _requestData$args3;
4030
4031 if (['POST', 'PUT'].includes(method) && !((_requestData$args2 = requestData.args) !== null && _requestData$args2 !== void 0 && _requestData$args2.data)) {
4032 throw Error('Invalid requestData.args.data');
4033 }
4034
4035 Object.assign(headers, {
4036 'Content-Type': 'application/json'
4037 });
4038
4039 if ((_requestData$args3 = requestData.args) !== null && _requestData$args3 !== void 0 && _requestData$args3.headers) {
4040 Object.assign(headers, requestData.args.headers);
4041 }
4042
4043 Object.assign(params, {
4044 method: method,
4045 headers: headers,
4046 body: 'application/json' === headers['Content-Type'] ? JSON.stringify(requestData.args.data) : requestData.args.data
4047 });
4048 } else {
4049 throw Error("Invalid type: '".concat(type, "'"));
4050 }
4051
4052 return params;
4053 }
4054 /**
4055 * Function prepareEndpoint().
4056 *
4057 * This method response for building a final endpoint,
4058 * the main problem is with plain permalink mode + command with query params that creates a weird url,
4059 * the current method should fix it.
4060 *
4061 * @param {RequestData} requestData
4062 *
4063 * @return {string} Endpoint URL
4064 */
4065
4066 }, {
4067 key: "prepareEndpoint",
4068 value: function prepareEndpoint(requestData) {
4069 var splitEndpoint = requestData.endpoint.split('?'),
4070 endpoint = splitEndpoint.shift();
4071 var endpointAddress = this.getEndpointURL(requestData, endpoint);
4072
4073 if (splitEndpoint.length) {
4074 var separator = endpointAddress.includes('?') ? '&' : '?';
4075 endpointAddress += separator + splitEndpoint.pop();
4076 }
4077
4078 return endpointAddress;
4079 }
4080 /**
4081 * Function fetch().
4082 *
4083 * @param {RequestData} requestData
4084 * @param {function(RequestInfo,*) : Promise<Response> } [fetchAPI]
4085 *
4086 * @return {Promise<Response>} response
4087 */
4088
4089 }, {
4090 key: "fetch",
4091 value: function fetch(requestData) {
4092 var _requestData$args$opt2,
4093 _this2 = this;
4094
4095 var fetchAPI = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : window.fetch;
4096 requestData.cache = 'miss';
4097 var refresh = (_requestData$args$opt2 = requestData.args.options) === null || _requestData$args$opt2 === void 0 ? void 0 : _requestData$args$opt2.refresh,
4098 getCache = 'get' === requestData.type && !refresh,
4099 saveCache = ['create', 'get'].includes(requestData.type) && !refresh;
4100
4101 if (getCache) {
4102 var cachePromise = this.cache.getAsync(requestData);
4103
4104 if (cachePromise) {
4105 return cachePromise;
4106 }
4107 }
4108
4109 var params = this.prepareHeaders(requestData); // eslint-disable-next-line no-async-promise-executor
4110
4111 return new Promise( /*#__PURE__*/function () {
4112 var _ref9 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(resolve, reject) {
4113 var endpoint, request, response;
4114 return _regenerator.default.wrap(function _callee2$(_context2) {
4115 while (1) {
4116 switch (_context2.prev = _context2.next) {
4117 case 0:
4118 _context2.prev = 0;
4119 endpoint = _this2.prepareEndpoint(requestData);
4120 request = fetchAPI(endpoint, params);
4121 _context2.next = 5;
4122 return request.then( /*#__PURE__*/function () {
4123 var _ref10 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(_response) {
4124 return _regenerator.default.wrap(function _callee$(_context) {
4125 while (1) {
4126 switch (_context.prev = _context.next) {
4127 case 0:
4128 if (_response.ok) {
4129 _context.next = 6;
4130 break;
4131 }
4132
4133 if (!_response.headers.get('content-type').includes('application/json')) {
4134 _context.next = 5;
4135 break;
4136 }
4137
4138 _context.next = 4;
4139 return _response.json();
4140
4141 case 4:
4142 _response = _context.sent;
4143
4144 case 5:
4145 throw _response;
4146
4147 case 6:
4148 return _context.abrupt("return", _response.json());
4149
4150 case 7:
4151 case "end":
4152 return _context.stop();
4153 }
4154 }
4155 }, _callee);
4156 }));
4157
4158 return function (_x3) {
4159 return _ref10.apply(this, arguments);
4160 };
4161 }());
4162
4163 case 5:
4164 response = _context2.sent;
4165
4166 // At this point, it got the resolved response from remote.
4167 // So load cache, and resolve it.
4168 if (saveCache) {
4169 _this2.cache.set(requestData, response);
4170 }
4171
4172 resolve(response);
4173 _context2.next = 13;
4174 break;
4175
4176 case 10:
4177 _context2.prev = 10;
4178 _context2.t0 = _context2["catch"](0);
4179 reject(_context2.t0);
4180
4181 case 13:
4182 case "end":
4183 return _context2.stop();
4184 }
4185 }
4186 }, _callee2, null, [[0, 10]]);
4187 }));
4188
4189 return function (_x, _x2) {
4190 return _ref9.apply(this, arguments);
4191 };
4192 }());
4193 }
4194 /**
4195 * Function getCache().
4196 *
4197 * @param {ComponentBase} component
4198 * @param {string} command
4199 * @param {{}} query
4200 *
4201 * @return {{}} cache object
4202 */
4203
4204 }, {
4205 key: "getCache",
4206 value: function getCache(component, command) {
4207 var query = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
4208 var args = {
4209 query: query
4210 };
4211 return this.cache.get({
4212 endpoint: this.commandToEndpoint(command, args, this.commandFormats[command]),
4213 component: component,
4214 command: command,
4215 args: args
4216 });
4217 }
4218 /**
4219 * Function setCache().
4220 *
4221 * @param {ComponentBase} component
4222 * @param {string} command
4223 * @param {{}} query
4224 * @param {*} data
4225 */
4226
4227 }, {
4228 key: "setCache",
4229 value: function setCache(component, command, query, data) {
4230 var args = {
4231 query: query
4232 };
4233 this.cache.set({
4234 endpoint: this.commandToEndpoint(command, args, this.commandFormats[command]),
4235 component: component,
4236 command: command,
4237 args: args
4238 }, data);
4239 }
4240 /**
4241 * Function updateCache().
4242 *
4243 * The difference between 'setCache' and 'updateCache' is update will only modify exist values.
4244 * and 'setCache' will create or update.
4245 *
4246 * @param {ComponentBase} component
4247 * @param {string} command
4248 * @param {{}} query
4249 * @param {*} data
4250 */
4251
4252 }, {
4253 key: "updateCache",
4254 value: function updateCache(component, command, query, data) {
4255 var args = {
4256 query: query,
4257 data: data
4258 };
4259 this.cache.update({
4260 endpoint: this.commandToEndpoint(command, args, this.commandFormats[command]),
4261 component: component,
4262 command: command,
4263 args: args
4264 });
4265 }
4266 /**
4267 * Function deleteCache().
4268 *
4269 * @param {ComponentBase} component
4270 * @param {string} command
4271 * @param {{}} query
4272 */
4273
4274 }, {
4275 key: "deleteCache",
4276 value: function deleteCache(component, command) {
4277 var query = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
4278 var args = {
4279 query: query
4280 };
4281 this.cache.delete({
4282 endpoint: this.commandToEndpoint(command, args, this.commandFormats[command]),
4283 component: component,
4284 command: command,
4285 args: args
4286 });
4287 }
4288 /**
4289 * Function registerFormat().
4290 *
4291 * Register's format for each command.
4292 *
4293 * @param {string} command
4294 * @param {string} format
4295 */
4296
4297 }, {
4298 key: "registerFormat",
4299 value: function registerFormat(command, format) {
4300 this.commandFormats[command] = format;
4301 }
4302 /**
4303 * Function create().
4304 *
4305 * Run a command, that will be translated as endpoint for creating new data.
4306 *
4307 * @param {string} command
4308 * @param {*} data
4309 * @param {{}} query
4310 * @param {{}} options
4311 *
4312 * @return {*} result
4313 */
4314
4315 }, {
4316 key: "create",
4317 value: function create(command, data) {
4318 var query = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
4319 var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
4320 return this.run('create', command, {
4321 query: query,
4322 options: options,
4323 data: data
4324 });
4325 }
4326 /**
4327 * Function delete().
4328 *
4329 * Run a command, that will be translated as endpoint for deleting data.
4330 *
4331 * @param {string} command
4332 * @param {{}} query
4333 * @param {{}} options
4334 *
4335 * @return {*} result
4336 */
4337
4338 }, {
4339 key: "delete",
4340 value: function _delete(command) {
4341 var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
4342 var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
4343 return this.run('delete', command, {
4344 query: query,
4345 options: options
4346 });
4347 }
4348 /**
4349 * Function get().
4350 *
4351 * Run a command, that will be translated as endpoint for getting data.
4352 *
4353 * @param {string} command
4354 * @param {{}} query
4355 * @param {{}} options
4356 *
4357 * @return {*} result
4358 */
4359
4360 }, {
4361 key: "get",
4362 value: function get(command) {
4363 var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
4364 var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
4365 return this.run('get', command, {
4366 query: query,
4367 options: options
4368 });
4369 }
4370 /**
4371 * Function update().
4372 *
4373 * Run a command, that will be translated as endpoint for updating data.
4374 *
4375 * @param {string} command
4376 * @param {*} data
4377 * @param {{}} query
4378 * @param {{}} options
4379 *
4380 * @return {*} result
4381 */
4382
4383 }, {
4384 key: "update",
4385 value: function update(command, data) {
4386 var query = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
4387 var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
4388 return this.run('update', command, {
4389 query: query,
4390 options: options,
4391 data: data
4392 });
4393 }
4394 /**
4395 * Function options().
4396 *
4397 * Run a command, that will be translated as endpoint for requesting options/information about specific endpoint.
4398 *
4399 * @param {string} command
4400 * @param {{}} query
4401 * @param {{}} options
4402 *
4403 * @return {*} result
4404 */
4405
4406 }, {
4407 key: "options",
4408 value: function options(command, query) {
4409 var _options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
4410
4411 return this.run('options', command, {
4412 query: query,
4413 options: _options
4414 });
4415 }
4416 }, {
4417 key: "register",
4418 value: function register(component, command, callback) {
4419 (0, _get2.default)((0, _getPrototypeOf2.default)(Data.prototype), "register", this).call(this, component, command, callback);
4420 var fullCommandName = component.getNamespace() + '/' + command,
4421 commandInstance = $e.data.getCommandClass(fullCommandName),
4422 format = commandInstance !== null && commandInstance !== void 0 && commandInstance.getEndpointFormat ? commandInstance.getEndpointFormat() : false;
4423
4424 if (format) {
4425 $e.data.registerFormat(fullCommandName, format);
4426 }
4427
4428 return this;
4429 }
4430 /**
4431 * TODO: Add JSDOC typedef for args ( query and options ).
4432 *
4433 * @param {DataTypes} type
4434 * @param {string} command
4435 * @param {{}} args
4436 *
4437 * @override
4438 */
4439
4440 }, {
4441 key: "run",
4442 value: function run(type, command, args) {
4443 args.options.type = type;
4444
4445 var _this$commandExtractA = this.commandExtractArgs(command, args);
4446
4447 command = _this$commandExtractA.command;
4448 args = _this$commandExtractA.args;
4449 return (0, _get2.default)((0, _getPrototypeOf2.default)(Data.prototype), "run", this).call(this, command, args);
4450 }
4451 }, {
4452 key: "error",
4453 value: function error(message) {
4454 throw Error('Data commands: ' + message);
4455 }
4456 }]);
4457 return Data;
4458 }(_commands.default);
4459
4460 exports["default"] = Data;
4461
4462 /***/ }),
4463
4464 /***/ "../modules/web-cli/assets/js/core/data/cache.js":
4465 /*!*******************************************************!*\
4466 !*** ../modules/web-cli/assets/js/core/data/cache.js ***!
4467 \*******************************************************/
4468 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
4469
4470 "use strict";
4471
4472
4473 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
4474
4475 Object.defineProperty(exports, "__esModule", ({
4476 value: true
4477 }));
4478 exports["default"] = void 0;
4479
4480 var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"));
4481
4482 var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js"));
4483
4484 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
4485
4486 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
4487
4488 var _localStorage = _interopRequireDefault(__webpack_require__(/*! ./storages/local-storage */ "../modules/web-cli/assets/js/core/data/storages/local-storage.js"));
4489
4490 /**
4491 * @typedef {{}} RequestData
4492 */
4493
4494 /**
4495 * @typedef {import('../data')} Data
4496 */
4497
4498 /**
4499 * TODO: Search common logic, create functions to reduce code size.
4500 */
4501 var Cache = /*#__PURE__*/function () {
4502 /**
4503 * Function constructor().
4504 *
4505 * Create cache.
4506 *
4507 * @param {Data} manager
4508 */
4509 function Cache(manager) {
4510 (0, _classCallCheck2.default)(this, Cache);
4511 this.manager = manager;
4512 this.storage = new _localStorage.default();
4513 }
4514 /**
4515 * Function getAsync().
4516 *
4517 * Receive from cache. the difference between getAsync() and get() is that receive return it as promise...
4518 * to fake fetch mechanism.
4519 *
4520 * @param {RequestData} requestData
4521 *
4522 * @return {(Promise|boolean)} request data
4523 */
4524
4525
4526 (0, _createClass2.default)(Cache, [{
4527 key: "getAsync",
4528 value: function getAsync(requestData) {
4529 var data = this.get(requestData);
4530
4531 if (null !== data) {
4532 // If data comes from cache, add 'cache = hit' to requestData.
4533 requestData.cache = 'hit';
4534 return new Promise(function (resolve) {
4535 resolve(data);
4536 });
4537 } // TODO: Check if possible, always return promise and reject it.
4538
4539
4540 return false;
4541 }
4542 /**
4543 * Function set().
4544 *
4545 * set data to cache.
4546 *
4547 * The difference between set() and update() is that set, will modify the data anyway...
4548 * when update() will only modify exist objects/values.
4549 *
4550 * @param {RequestData} requestData
4551 * @param {*} data
4552 */
4553
4554 }, {
4555 key: "set",
4556 value: function set(requestData, data) {
4557 $e.data.validateRequestData(requestData);
4558 var componentName = requestData.component.getNamespace(),
4559 pureEndpoint = requestData.endpoint.replace(componentName + '/', ''),
4560 pureEndpointParts = pureEndpoint.split('/');
4561 var newData = {}; // Example of working with reaming endpoint part(s) can be found at 'cache.spec.js' test: 'load(): deep'.
4562 // Analyze reaming endpoint.
4563
4564 if (pureEndpointParts.length && pureEndpoint !== componentName) {
4565 // Using reaming endpoint parts, to build new data object.
4566 var result = pureEndpointParts.reduce(function (accumulator, pureEndpointPart) {
4567 accumulator[pureEndpointPart] = {};
4568 return accumulator[pureEndpointPart];
4569 }, newData); // 'result' is equal to 'newData' with a deeper pointer, build based on 'pureEndpointParts' ( will effect newData ).
4570
4571 Object.assign(result, data);
4572 } else {
4573 newData = data;
4574 }
4575
4576 var oldData = this.storage.getItem(componentName); // When have old data, merge it recursively with newData using jQuery.extend().
4577
4578 if (oldData !== null) {
4579 newData = jQuery.extend(true, oldData, newData);
4580 }
4581
4582 this.storage.setItem(componentName, newData);
4583 }
4584 /**
4585 * Function get().
4586 *
4587 * Get from exist storage.
4588 *
4589 * @param {RequestData} requestData
4590 *
4591 * @return {{}} data
4592 */
4593
4594 }, {
4595 key: "get",
4596 value: function get(requestData) {
4597 $e.data.validateRequestData(requestData);
4598 var componentName = requestData.component.getNamespace(),
4599 componentData = this.storage.getItem(componentName);
4600
4601 if (componentData !== null) {
4602 if (componentName === requestData.endpoint) {
4603 return componentData;
4604 } // Example of working with reaming endpoint part(s) can be found at 'cache.spec.js' test: 'get(): complex'.
4605 // Analyze reaming endpoint (Using reduce over endpoint parts, build the right index).
4606
4607
4608 var pureEndpoint = requestData.endpoint.replace(requestData.component.getNamespace() + '/', ''),
4609 pureEndpointParts = pureEndpoint.split('/'),
4610 // eslint-disable-next-line array-callback-return
4611 result = pureEndpointParts.reduce(function (accumulator, endpointPart) {
4612 if (accumulator && accumulator[endpointPart]) {
4613 return accumulator[endpointPart];
4614 }
4615 }, componentData); // Since $e.data.cache.receive will reject only if null is the result.
4616
4617 return result || null;
4618 }
4619
4620 return null;
4621 }
4622 /**
4623 * Function update().
4624 *
4625 * Update only already exist storage, runs over all storage
4626 *
4627 * @param {RequestData} requestData
4628 *
4629 * @return {boolean} is updated
4630 */
4631
4632 }, {
4633 key: "update",
4634 value: function update(requestData) {
4635 $e.data.validateRequestData(requestData, true);
4636 var endpoint = requestData.endpoint;
4637 var response = {}; // Simulate response from cache.
4638
4639 Object.entries(this.storage.getAll()).forEach(function (_ref) {
4640 var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
4641 endpointKey = _ref2[0],
4642
4643 /* String*/
4644 endpointValue = _ref2[1];
4645
4646 if (endpointValue && endpoint.includes(endpointKey)) {
4647 // Assuming it is a specific endpoint.
4648 var oldData = endpointValue,
4649 pureEndpoint = requestData.endpoint.replace(requestData.component.getNamespace() + '/', ''),
4650 pureEndpointParts = pureEndpoint.split('/'),
4651 isComponentUpdate = 1 === pureEndpointParts.length && endpointKey === requestData.endpoint && endpointKey === requestData.component.getNamespace(); // Component update or specific update?
4652
4653 if (isComponentUpdate) {
4654 response = jQuery.extend(true, oldData, requestData.args.data);
4655 } else {
4656 var oldSpecificData = pureEndpointParts.reduce(function (accumulator, pureEndpointPart) {
4657 return accumulator[pureEndpointPart];
4658 }, oldData);
4659 response = jQuery.extend(true, oldSpecificData, requestData.args.data);
4660 }
4661 }
4662 }); // If response not found.
4663
4664 if (0 === Object.values(response).length) {
4665 return false;
4666 } // Update cache.
4667
4668
4669 this.set(requestData, response);
4670 return true;
4671 }
4672 /**
4673 * Function delete().
4674 *
4675 * Delete endpoint from storage.
4676 *
4677 * @param {RequestData} requestData
4678 *
4679 * @return {boolean} is deleted
4680 */
4681
4682 }, {
4683 key: "delete",
4684 value: function _delete(requestData) {
4685 $e.data.validateRequestData(requestData);
4686 var result = false;
4687 var componentName = requestData.component.getNamespace();
4688
4689 if (componentName !== requestData.endpoint) {
4690 var oldData = this.storage.getItem(componentName),
4691 newData = {};
4692
4693 if (null === oldData) {
4694 return false;
4695 }
4696
4697 var pureEndpoint = requestData.endpoint.replace(componentName + '/', ''),
4698 pureEndpointParts = pureEndpoint.split('/'),
4699 lastEndpointPart = pureEndpointParts[pureEndpointParts.length - 1];
4700 pureEndpointParts.reduce(function (accumulator, pureEndpointPart) {
4701 if (pureEndpointPart === lastEndpointPart) {
4702 // Null, means delete.
4703 accumulator[pureEndpointPart] = null;
4704 } else {
4705 accumulator[pureEndpointPart] = {};
4706 }
4707
4708 return accumulator[pureEndpointPart];
4709 }, newData);
4710
4711 if (Object.keys(oldData).length) {
4712 var deleteKeys = function deleteKeys(target, nullsObject) {
4713 if (nullsObject) {
4714 Object.keys(nullsObject).forEach(function (key) {
4715 if (nullsObject[key] && 'object' === (0, _typeof2.default)(nullsObject[key])) {
4716 deleteKeys(target[key], nullsObject[key]);
4717 } else if (null === nullsObject[key]) {
4718 delete target[key];
4719 result = true;
4720 }
4721 });
4722 } else {
4723 // Means need to clear all the object.
4724 Object.keys(target).forEach(function (key) {
4725 return delete target[key];
4726 });
4727 }
4728
4729 return target;
4730 };
4731
4732 this.storage.setItem(componentName, deleteKeys(oldData, newData));
4733 }
4734 } else {
4735 for (var key in this.storage.getAll()) {
4736 if (key === requestData.endpoint) {
4737 this.storage.removeItem(requestData.endpoint);
4738 result = true;
4739 break;
4740 }
4741 }
4742 }
4743
4744 return result;
4745 }
4746 }]);
4747 return Cache;
4748 }();
4749
4750 exports["default"] = Cache;
4751
4752 /***/ }),
4753
4754 /***/ "../modules/web-cli/assets/js/core/data/errors/base-error.js":
4755 /*!*******************************************************************!*\
4756 !*** ../modules/web-cli/assets/js/core/data/errors/base-error.js ***!
4757 \*******************************************************************/
4758 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
4759
4760 "use strict";
4761
4762
4763 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
4764
4765 Object.defineProperty(exports, "__esModule", ({
4766 value: true
4767 }));
4768 exports["default"] = void 0;
4769
4770 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
4771
4772 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
4773
4774 var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js"));
4775
4776 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
4777
4778 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
4779
4780 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
4781
4782 var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/wrapNativeSuper */ "../node_modules/@babel/runtime/helpers/wrapNativeSuper.js"));
4783
4784 var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
4785
4786 var _console = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/console */ "../modules/web-cli/assets/js/utils/console.js"));
4787
4788 var _forceMethodImplementation = _interopRequireDefault(__webpack_require__(/*! ../../../utils/force-method-implementation */ "../modules/web-cli/assets/js/utils/force-method-implementation.js"));
4789
4790 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; }
4791
4792 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; }
4793
4794 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); }; }
4795
4796 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; } }
4797
4798 var BaseError = /*#__PURE__*/function (_Error) {
4799 (0, _inherits2.default)(BaseError, _Error);
4800
4801 var _super = _createSuper(BaseError);
4802
4803 /**
4804 * Error constructor.
4805 *
4806 * @param {string} message
4807 * @param {string} code
4808 * @param {*} data
4809 */
4810 function BaseError() {
4811 var _this;
4812
4813 var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
4814 var code = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
4815 var data = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
4816 (0, _classCallCheck2.default)(this, BaseError);
4817 _this = _super.call(this, message);
4818 (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "code", '');
4819 (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "data", []);
4820 _this.code = code;
4821 _this.data = data;
4822 return _this;
4823 }
4824 /**
4825 * Notify a message when the error occurs.
4826 */
4827
4828
4829 (0, _createClass2.default)(BaseError, [{
4830 key: "notify",
4831 value: function notify() {
4832 _console.default.error(_objectSpread({
4833 message: this.message
4834 }, this));
4835 }
4836 }], [{
4837 key: "create",
4838 value:
4839 /**
4840 * The server error code.
4841 *
4842 * @type {string}
4843 */
4844
4845 /**
4846 * Additional data about the current error.
4847 *
4848 * @type {*[]}
4849 */
4850
4851 /**
4852 * Static helper function to create the error.
4853 *
4854 * @param {string} message
4855 * @param {string} code
4856 * @param {*} data
4857 * @return {BaseError} error
4858 */
4859 function create(message) {
4860 var code = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
4861 var data = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
4862 return new this(message, code, data);
4863 }
4864 /**
4865 * Returns the status code of the error.
4866 */
4867
4868 }, {
4869 key: "getHTTPErrorCode",
4870 value: function getHTTPErrorCode() {
4871 (0, _forceMethodImplementation.default)();
4872 }
4873 }]);
4874 return BaseError;
4875 }( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error));
4876
4877 exports["default"] = BaseError;
4878
4879 /***/ }),
4880
4881 /***/ "../modules/web-cli/assets/js/core/data/errors/default-error.js":
4882 /*!**********************************************************************!*\
4883 !*** ../modules/web-cli/assets/js/core/data/errors/default-error.js ***!
4884 \**********************************************************************/
4885 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
4886
4887 "use strict";
4888
4889
4890 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
4891
4892 Object.defineProperty(exports, "__esModule", ({
4893 value: true
4894 }));
4895 exports["default"] = exports.DefaultError = void 0;
4896
4897 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
4898
4899 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
4900
4901 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
4902
4903 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
4904
4905 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
4906
4907 var _baseError = _interopRequireDefault(__webpack_require__(/*! ./base-error */ "../modules/web-cli/assets/js/core/data/errors/base-error.js"));
4908
4909 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); }; }
4910
4911 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; } }
4912
4913 var DefaultError = /*#__PURE__*/function (_BaseError) {
4914 (0, _inherits2.default)(DefaultError, _BaseError);
4915
4916 var _super = _createSuper(DefaultError);
4917
4918 function DefaultError() {
4919 (0, _classCallCheck2.default)(this, DefaultError);
4920 return _super.apply(this, arguments);
4921 }
4922
4923 (0, _createClass2.default)(DefaultError, null, [{
4924 key: "getHTTPErrorCode",
4925 value: function getHTTPErrorCode() {
4926 return 501;
4927 }
4928 }]);
4929 return DefaultError;
4930 }(_baseError.default);
4931
4932 exports.DefaultError = DefaultError;
4933 var _default = DefaultError;
4934 exports["default"] = _default;
4935
4936 /***/ }),
4937
4938 /***/ "../modules/web-cli/assets/js/core/data/errors/error-404.js":
4939 /*!******************************************************************!*\
4940 !*** ../modules/web-cli/assets/js/core/data/errors/error-404.js ***!
4941 \******************************************************************/
4942 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
4943
4944 "use strict";
4945
4946
4947 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
4948
4949 Object.defineProperty(exports, "__esModule", ({
4950 value: true
4951 }));
4952 exports["default"] = exports.Error404 = void 0;
4953
4954 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
4955
4956 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
4957
4958 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
4959
4960 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
4961
4962 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
4963
4964 var _baseError = _interopRequireDefault(__webpack_require__(/*! ./base-error */ "../modules/web-cli/assets/js/core/data/errors/base-error.js"));
4965
4966 var _console = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/console */ "../modules/web-cli/assets/js/utils/console.js"));
4967
4968 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); }; }
4969
4970 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; } }
4971
4972 var Error404 = /*#__PURE__*/function (_BaseError) {
4973 (0, _inherits2.default)(Error404, _BaseError);
4974
4975 var _super = _createSuper(Error404);
4976
4977 function Error404() {
4978 (0, _classCallCheck2.default)(this, Error404);
4979 return _super.apply(this, arguments);
4980 }
4981
4982 (0, _createClass2.default)(Error404, [{
4983 key: "notify",
4984 value: function notify() {
4985 _console.default.warn(this.message);
4986 }
4987 }], [{
4988 key: "getHTTPErrorCode",
4989 value: function getHTTPErrorCode() {
4990 return 404;
4991 }
4992 }]);
4993 return Error404;
4994 }(_baseError.default);
4995
4996 exports.Error404 = Error404;
4997 var _default = Error404;
4998 exports["default"] = _default;
4999
5000 /***/ }),
5001
5002 /***/ "../modules/web-cli/assets/js/core/data/errors/index.js":
5003 /*!**************************************************************!*\
5004 !*** ../modules/web-cli/assets/js/core/data/errors/index.js ***!
5005 \**************************************************************/
5006 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
5007
5008 "use strict";
5009
5010
5011 Object.defineProperty(exports, "__esModule", ({
5012 value: true
5013 }));
5014 Object.defineProperty(exports, "DefaultError", ({
5015 enumerable: true,
5016 get: function get() {
5017 return _defaultError.DefaultError;
5018 }
5019 }));
5020 Object.defineProperty(exports, "Error404", ({
5021 enumerable: true,
5022 get: function get() {
5023 return _error.Error404;
5024 }
5025 }));
5026
5027 var _defaultError = __webpack_require__(/*! ./default-error */ "../modules/web-cli/assets/js/core/data/errors/default-error.js");
5028
5029 var _error = __webpack_require__(/*! ./error-404 */ "../modules/web-cli/assets/js/core/data/errors/error-404.js");
5030
5031 /***/ }),
5032
5033 /***/ "../modules/web-cli/assets/js/core/data/storages/base-prefix-storage.js":
5034 /*!******************************************************************************!*\
5035 !*** ../modules/web-cli/assets/js/core/data/storages/base-prefix-storage.js ***!
5036 \******************************************************************************/
5037 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
5038
5039 "use strict";
5040
5041
5042 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
5043
5044 Object.defineProperty(exports, "__esModule", ({
5045 value: true
5046 }));
5047 exports["default"] = void 0;
5048
5049 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
5050
5051 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
5052
5053 var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js"));
5054
5055 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
5056
5057 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
5058
5059 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
5060
5061 var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
5062
5063 var _baseStorage = _interopRequireDefault(__webpack_require__(/*! elementor-api/core/data/storages/base-storage */ "../modules/web-cli/assets/js/core/data/storages/base-storage.js"));
5064
5065 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); }; }
5066
5067 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; } }
5068
5069 var BasePrefixStorage = /*#__PURE__*/function (_BaseStorage) {
5070 (0, _inherits2.default)(BasePrefixStorage, _BaseStorage);
5071
5072 var _super = _createSuper(BasePrefixStorage);
5073
5074 function BasePrefixStorage() {
5075 (0, _classCallCheck2.default)(this, BasePrefixStorage);
5076 return _super.apply(this, arguments);
5077 }
5078
5079 (0, _createClass2.default)(BasePrefixStorage, [{
5080 key: "clear",
5081 value: function clear() {
5082 var _this = this;
5083
5084 Object.keys(this.getAll()).forEach(function (key) {
5085 return _this.removeItem(key);
5086 });
5087 }
5088 }, {
5089 key: "getItem",
5090 value: function getItem(key) {
5091 return (0, _get2.default)((0, _getPrototypeOf2.default)(BasePrefixStorage.prototype), "getItem", this).call(this, BasePrefixStorage.DEFAULT_KEY_PREFIX + key);
5092 }
5093 }, {
5094 key: "removeItem",
5095 value: function removeItem(key) {
5096 return (0, _get2.default)((0, _getPrototypeOf2.default)(BasePrefixStorage.prototype), "removeItem", this).call(this, BasePrefixStorage.DEFAULT_KEY_PREFIX + key);
5097 }
5098 }, {
5099 key: "setItem",
5100 value: function setItem(key, value) {
5101 return (0, _get2.default)((0, _getPrototypeOf2.default)(BasePrefixStorage.prototype), "setItem", this).call(this, BasePrefixStorage.DEFAULT_KEY_PREFIX + key, value);
5102 }
5103 }, {
5104 key: "getAll",
5105 value: function getAll() {
5106 var _this2 = this;
5107
5108 var DEFAULT_KEY_PREFIX = BasePrefixStorage.DEFAULT_KEY_PREFIX,
5109 keys = Object.keys(this.provider),
5110 result = {};
5111 keys.forEach(function (key) {
5112 if (key.startsWith(DEFAULT_KEY_PREFIX)) {
5113 key = key.replace(DEFAULT_KEY_PREFIX, '');
5114 result[key] = _this2.getItem(key);
5115 }
5116 });
5117 return result;
5118 }
5119 }]);
5120 return BasePrefixStorage;
5121 }(_baseStorage.default);
5122
5123 exports["default"] = BasePrefixStorage;
5124 (0, _defineProperty2.default)(BasePrefixStorage, "DEFAULT_KEY_PREFIX", 'e_');
5125
5126 /***/ }),
5127
5128 /***/ "../modules/web-cli/assets/js/core/data/storages/base-storage.js":
5129 /*!***********************************************************************!*\
5130 !*** ../modules/web-cli/assets/js/core/data/storages/base-storage.js ***!
5131 \***********************************************************************/
5132 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
5133
5134 "use strict";
5135
5136
5137 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
5138
5139 Object.defineProperty(exports, "__esModule", ({
5140 value: true
5141 }));
5142 exports["default"] = void 0;
5143
5144 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
5145
5146 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
5147
5148 /**
5149 * TODO: Merge all storage's to one.
5150 * Using this technique give's the ability to use JSDOC from 'window.storage'.
5151 *
5152 * @implements {Storage}
5153 */
5154 var BaseStorage = /*#__PURE__*/function () {
5155 /**
5156 * Create storage wrapper.
5157 *
5158 * @param {Storage} provider
5159 */
5160 function BaseStorage(provider) {
5161 (0, _classCallCheck2.default)(this, BaseStorage);
5162
5163 if (BaseStorage === (this instanceof BaseStorage ? this.constructor : void 0)) {
5164 throw new TypeError('Cannot construct BaseStorage instances directly');
5165 }
5166
5167 this.provider = provider;
5168 }
5169
5170 (0, _createClass2.default)(BaseStorage, [{
5171 key: "clear",
5172 value: function clear() {
5173 return this.provider.clear();
5174 }
5175 }, {
5176 key: "getItem",
5177 value: function getItem(key) {
5178 var result = this.provider.getItem(key);
5179
5180 if (null !== result) {
5181 return JSON.parse(result);
5182 }
5183
5184 return result;
5185 }
5186 }, {
5187 key: "key",
5188 value: function key(index) {
5189 return this.provider.key(index);
5190 }
5191 }, {
5192 key: "removeItem",
5193 value: function removeItem(key) {
5194 return this.provider.removeItem(key);
5195 }
5196 }, {
5197 key: "setItem",
5198 value: function setItem(key, value) {
5199 return this.provider.setItem(key, JSON.stringify(value));
5200 }
5201 }, {
5202 key: "getAll",
5203 value: function getAll() {
5204 var _this = this;
5205
5206 var keys = Object.keys(this.provider),
5207 result = {};
5208 keys.forEach(function (key) {
5209 result[key] = _this.getItem(key);
5210 });
5211 return result;
5212 }
5213 }]);
5214 return BaseStorage;
5215 }();
5216
5217 exports["default"] = BaseStorage;
5218
5219 /***/ }),
5220
5221 /***/ "../modules/web-cli/assets/js/core/data/storages/local-storage.js":
5222 /*!************************************************************************!*\
5223 !*** ../modules/web-cli/assets/js/core/data/storages/local-storage.js ***!
5224 \************************************************************************/
5225 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
5226
5227 "use strict";
5228
5229
5230 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
5231
5232 Object.defineProperty(exports, "__esModule", ({
5233 value: true
5234 }));
5235 exports["default"] = void 0;
5236
5237 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
5238
5239 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
5240
5241 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
5242
5243 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
5244
5245 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
5246
5247 var _basePrefixStorage = _interopRequireDefault(__webpack_require__(/*! ./base-prefix-storage */ "../modules/web-cli/assets/js/core/data/storages/base-prefix-storage.js"));
5248
5249 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); }; }
5250
5251 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; } }
5252
5253 var LocalStorage = /*#__PURE__*/function (_BasePrefixStorage) {
5254 (0, _inherits2.default)(LocalStorage, _BasePrefixStorage);
5255
5256 var _super = _createSuper(LocalStorage);
5257
5258 function LocalStorage() {
5259 (0, _classCallCheck2.default)(this, LocalStorage);
5260 return _super.call(this, localStorage);
5261 }
5262
5263 (0, _createClass2.default)(LocalStorage, [{
5264 key: "debug",
5265 value: function debug() {
5266 var entries = this.getAll(),
5267 ordered = {};
5268 Object.keys(entries).sort().forEach(function (key) {
5269 var value = entries[key];
5270 ordered[key] = value;
5271 });
5272 return ordered;
5273 }
5274 }]);
5275 return LocalStorage;
5276 }(_basePrefixStorage.default);
5277
5278 exports["default"] = LocalStorage;
5279
5280 /***/ }),
5281
5282 /***/ "../modules/web-cli/assets/js/core/hooks.js":
5283 /*!**************************************************!*\
5284 !*** ../modules/web-cli/assets/js/core/hooks.js ***!
5285 \**************************************************/
5286 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
5287
5288 "use strict";
5289
5290
5291 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
5292
5293 Object.defineProperty(exports, "__esModule", ({
5294 value: true
5295 }));
5296 exports["default"] = void 0;
5297
5298 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
5299
5300 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
5301
5302 var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
5303
5304 var _data = _interopRequireDefault(__webpack_require__(/*! ./hooks/data.js */ "../modules/web-cli/assets/js/core/hooks/data.js"));
5305
5306 var _ui = _interopRequireDefault(__webpack_require__(/*! ./hooks/ui.js */ "../modules/web-cli/assets/js/core/hooks/ui.js"));
5307
5308 /**
5309 * @typedef {import('../modules/hook-base')} HookBase
5310 */
5311 var Hooks = /*#__PURE__*/function () {
5312 function Hooks() {
5313 (0, _classCallCheck2.default)(this, Hooks);
5314 (0, _defineProperty2.default)(this, "data", new _data.default());
5315 (0, _defineProperty2.default)(this, "ui", new _ui.default());
5316 }
5317
5318 (0, _createClass2.default)(Hooks, [{
5319 key: "activate",
5320 value:
5321 /**
5322 * Function activate().
5323 *
5324 * Activate all hooks.
5325 */
5326 function activate() {
5327 this.getTypes().forEach(function (hooksType) {
5328 hooksType.activate();
5329 });
5330 }
5331 /**
5332 * Function deactivate().
5333 *
5334 * Deactivate all hooks.
5335 */
5336
5337 }, {
5338 key: "deactivate",
5339 value: function deactivate() {
5340 this.getTypes().forEach(function (hooksType) {
5341 hooksType.deactivate();
5342 });
5343 }
5344 }, {
5345 key: "getAll",
5346 value: function getAll() {
5347 var flat = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
5348 var result = {};
5349 this.getTypes().forEach(function (hooksType) {
5350 result[hooksType.getType()] = hooksType.getAll(flat);
5351 });
5352 return result;
5353 }
5354 }, {
5355 key: "getTypes",
5356 value: function getTypes() {
5357 return [this.data, this.ui];
5358 }
5359 }, {
5360 key: "getType",
5361 value: function getType(type) {
5362 return this.getTypes().find(function (hooks) {
5363 return type === hooks.getType();
5364 });
5365 }
5366 /**
5367 * Function register().
5368 *
5369 * Register hook.
5370 *
5371 * @param {string} type
5372 * @param {string} event
5373 * @param {HookBase} instance
5374 *
5375 * @return {{}} Created callback
5376 */
5377
5378 }, {
5379 key: "register",
5380 value: function register(type, event, instance) {
5381 return this.getType(type).register(event, instance);
5382 }
5383 /**
5384 * Function run().
5385 *
5386 * Run's a hook.
5387 *
5388 * @param {string} type
5389 * @param {string} event
5390 * @param {string} command
5391 * @param {{}} args
5392 * @param {*} result
5393 *
5394 * @return {boolean} result
5395 */
5396
5397 }, {
5398 key: "run",
5399 value: function run(type, event, command, args) {
5400 var result = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : undefined;
5401 return this.getType(type).run(event, command, args, result);
5402 }
5403 /**
5404 * Function registerDataAfter().
5405 *
5406 * Register data hook that's run after the command.
5407 *
5408 * @param {HookBase} instance
5409 *
5410 * @return {{}} callback
5411 */
5412
5413 }, {
5414 key: "registerDataAfter",
5415 value: function registerDataAfter(instance) {
5416 return this.register('data', 'after', instance);
5417 }
5418 /**
5419 * Function registerDataCatch().
5420 *
5421 * Register data hook that's run when the command fails.
5422 *
5423 * @param {HookBase} instance
5424 *
5425 * @return {{}} callback
5426 */
5427
5428 }, {
5429 key: "registerDataCatch",
5430 value: function registerDataCatch(instance) {
5431 return this.register('data', 'catch', instance);
5432 }
5433 /**
5434 * Function registerDataDependency().
5435 *
5436 * Register data hook that's run before the command as dependency.
5437 *
5438 * @param {HookBase} instance
5439 *
5440 * @return {{}} callback
5441 */
5442
5443 }, {
5444 key: "registerDataDependency",
5445 value: function registerDataDependency(instance) {
5446 return this.register('data', 'dependency', instance);
5447 }
5448 /**
5449 * Function registerUIAfter().
5450 *
5451 * Register UI hook that's run after the commands run.
5452 *
5453 * @param {HookBase} instance
5454 *
5455 * @return {{}} callback
5456 */
5457
5458 }, {
5459 key: "registerUIAfter",
5460 value: function registerUIAfter(instance) {
5461 return this.register('ui', 'after', instance);
5462 }
5463 /**
5464 * Function registerUICatch().
5465 *
5466 * Register UI hook that's run when the command fails.
5467 *
5468 * @param {HookBase} instance
5469 *
5470 * @return {{}} callback
5471 */
5472
5473 }, {
5474 key: "registerUICatch",
5475 value: function registerUICatch(instance) {
5476 return this.register('ui', 'catch', instance);
5477 }
5478 /**
5479 * Function registerUIBefore().
5480 *
5481 * Register UI hook that's run before the command.
5482 *
5483 * @param {HookBase} instance
5484 *
5485 * @return {{}} callback
5486 */
5487
5488 }, {
5489 key: "registerUIBefore",
5490 value: function registerUIBefore(instance) {
5491 return this.register('ui', 'before', instance);
5492 }
5493 /**
5494 * Function runDataAfter().
5495 *
5496 * Run data hook that's run after the command.
5497 *
5498 * @param {string} command
5499 * @param {{}} args
5500 * @param {*} result
5501 *
5502 * @return {boolean} result
5503 */
5504
5505 }, {
5506 key: "runDataAfter",
5507 value: function runDataAfter(command, args, result) {
5508 return this.run('data', 'after', command, args, result);
5509 }
5510 /**
5511 * Function runDataCatch().
5512 *
5513 * Run data hook that's run when the command fails.
5514 *
5515 * @param {string} command
5516 * @param {{}} args
5517 * @param {*} error
5518 *
5519 * @return {boolean} result
5520 */
5521
5522 }, {
5523 key: "runDataCatch",
5524 value: function runDataCatch(command, args, error) {
5525 return this.run('data', 'catch', command, args, error);
5526 }
5527 /**
5528 * Function runDataDependency().
5529 *
5530 * Run data hook that's run before the command as dependency.
5531 *
5532 * @param {string} command
5533 * @param {{}} args
5534 *
5535 * @return {boolean} result
5536 */
5537
5538 }, {
5539 key: "runDataDependency",
5540 value: function runDataDependency(command, args) {
5541 return this.run('data', 'dependency', command, args);
5542 }
5543 /**
5544 * Function runUIAfter().
5545 *
5546 * Run UI hook that's run after the commands run.
5547 *
5548 * @param {string} command
5549 * @param {{}} args
5550 * @param {*} result
5551 *
5552 * @return {boolean} result
5553 */
5554
5555 }, {
5556 key: "runUIAfter",
5557 value: function runUIAfter(command, args, result) {
5558 return this.run('ui', 'after', command, args, result);
5559 }
5560 /**
5561 * Function runUICatch().
5562 *
5563 * Run UI hook that's run when the command fails.
5564 *
5565 * @param {string} command
5566 * @param {{}} args
5567 * @param {*} e
5568 *
5569 * @return {boolean} result
5570 */
5571
5572 }, {
5573 key: "runUICatch",
5574 value: function runUICatch(command, args, e) {
5575 return this.run('ui', 'catch', command, args, e);
5576 }
5577 /**
5578 * Function runUIBefore().
5579 *
5580 * Run UI hook that's run before the command.
5581 *
5582 * @param {string} command
5583 * @param {{}} args
5584 *
5585 * @return {boolean} result
5586 */
5587
5588 }, {
5589 key: "runUIBefore",
5590 value: function runUIBefore(command, args) {
5591 return this.run('ui', 'before', command, args);
5592 }
5593 }]);
5594 return Hooks;
5595 }();
5596
5597 exports["default"] = Hooks;
5598
5599 /***/ }),
5600
5601 /***/ "../modules/web-cli/assets/js/core/hooks/base.js":
5602 /*!*******************************************************!*\
5603 !*** ../modules/web-cli/assets/js/core/hooks/base.js ***!
5604 \*******************************************************/
5605 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
5606
5607 "use strict";
5608
5609
5610 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
5611
5612 Object.defineProperty(exports, "__esModule", ({
5613 value: true
5614 }));
5615 exports["default"] = void 0;
5616
5617 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
5618
5619 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
5620
5621 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
5622
5623 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
5624
5625 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
5626
5627 var _console = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/console */ "../modules/web-cli/assets/js/utils/console.js"));
5628
5629 var _module = _interopRequireDefault(__webpack_require__(/*! elementor-assets-js/modules/imports/module.js */ "../assets/dev/js/modules/imports/module.js"));
5630
5631 var _forceMethodImplementation = _interopRequireDefault(__webpack_require__(/*! ../../utils/force-method-implementation */ "../modules/web-cli/assets/js/utils/force-method-implementation.js"));
5632
5633 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); }; }
5634
5635 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; } }
5636
5637 /**
5638 * @typedef {import('../../modules/hook-base')} HookBase
5639 */
5640 var HooksBase = /*#__PURE__*/function (_Module) {
5641 (0, _inherits2.default)(HooksBase, _Module);
5642
5643 var _super = _createSuper(HooksBase);
5644
5645 /**
5646 * Function constructor().
5647 *
5648 * Create hooks base.
5649 *
5650 * @param {{}} args
5651 */
5652 function HooksBase() {
5653 var _this;
5654
5655 (0, _classCallCheck2.default)(this, HooksBase);
5656
5657 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
5658 args[_key] = arguments[_key];
5659 }
5660
5661 _this = _super.call.apply(_super, [this].concat(args));
5662 /**
5663 * Current command.
5664 *
5665 * @type {string}
5666 */
5667
5668 _this.current = '';
5669 /**
5670 * Array of ids which in use.
5671 *
5672 * @type {Array}
5673 */
5674
5675 _this.usedIds = [];
5676 /**
5677 * Object of callbacks that was bound by container type.
5678 *
5679 * @type {{}}
5680 */
5681
5682 _this.callbacks = {
5683 after: {},
5684 catch: {}
5685 };
5686 /**
5687 * Object of depth.
5688 *
5689 * @type {{}}
5690 */
5691
5692 _this.depth = {
5693 after: {},
5694 catch: {}
5695 };
5696 _this.callbacksFlatList = {};
5697 return _this;
5698 }
5699
5700 (0, _createClass2.default)(HooksBase, [{
5701 key: "activate",
5702 value: function activate() {
5703 Object.values(this.getAll(true)).forEach(function (callback) {
5704 callback.activate();
5705 });
5706 }
5707 }, {
5708 key: "deactivate",
5709 value: function deactivate() {
5710 Object.values(this.getAll(true)).forEach(function (callback) {
5711 callback.deactivate();
5712 });
5713 } // eslint-disable-next-line jsdoc/require-returns-check
5714
5715 /**
5716 * Function getType().
5717 *
5718 * Returns type eg: ( event, hook, etc ... ).
5719 *
5720 * @return {string} type
5721 */
5722
5723 }, {
5724 key: "getType",
5725 value: function getType() {
5726 (0, _forceMethodImplementation.default)();
5727 }
5728 }, {
5729 key: "get",
5730 value: function get(id) {
5731 return this.callbacksFlatList[id];
5732 }
5733 /**
5734 * Function getAll().
5735 *
5736 * Return all possible callbacks.
5737 *
5738 * @param {boolean} flat
5739 *
5740 * @return {{}} all callbacks
5741 */
5742
5743 }, {
5744 key: "getAll",
5745 value: function getAll() {
5746 var _this2 = this;
5747
5748 var flat = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
5749
5750 if (flat) {
5751 return this.callbacksFlatList;
5752 }
5753
5754 var result = {};
5755 Object.keys(this.callbacks).forEach(function (event) {
5756 if (!result[event]) {
5757 result[event] = [];
5758 }
5759
5760 Object.keys(_this2.callbacks[event]).forEach(function (command) {
5761 result[event].push({
5762 command: command,
5763 callbacks: _this2.callbacks[event][command]
5764 });
5765 });
5766 });
5767 return result;
5768 }
5769 /**
5770 * Function getCurrent();
5771 *
5772 * Return current command.
5773 *
5774 * @return {string} current command
5775 */
5776
5777 }, {
5778 key: "getCurrent",
5779 value: function getCurrent() {
5780 return this.current;
5781 }
5782 /**
5783 * Function getUsedIds().
5784 *
5785 * Returns the current used ids.
5786 *
5787 * @return {Array} used IDs
5788 */
5789
5790 }, {
5791 key: "getUsedIds",
5792 value: function getUsedIds() {
5793 return this.usedIds;
5794 }
5795 /**
5796 * Function getCallbacks().
5797 *
5798 * Get available callbacks for specific event and command.
5799 *
5800 * @param {string} event
5801 * @param {string} command
5802 * @param {*} args
5803 * @return {(Array | boolean)} callbacks
5804 */
5805
5806 }, {
5807 key: "getCallbacks",
5808 value: function getCallbacks(event, command, args) {
5809 var _args$containers = args.containers,
5810 containers = _args$containers === void 0 ? [args.container] : _args$containers,
5811 containerType = containers[0] ? containers[0].type : false;
5812 var callbacks = [];
5813
5814 if (this.callbacks[event] && this.callbacks[event][command]) {
5815 if (containerType && this.callbacks[event][command][containerType]) {
5816 callbacks = callbacks.concat(this.callbacks[event][command][containerType]);
5817 }
5818
5819 if (this.callbacks[event][command].all) {
5820 callbacks = callbacks.concat(this.callbacks[event][command].all);
5821 }
5822 }
5823
5824 if (callbacks.length) {
5825 return callbacks;
5826 }
5827
5828 return false;
5829 }
5830 /**
5831 * Function checkEvent().
5832 *
5833 * Validate if the event is available.
5834 *
5835 * @param {string} event
5836 */
5837
5838 }, {
5839 key: "checkEvent",
5840 value: function checkEvent(event) {
5841 if (-1 === Object.keys(this.callbacks).indexOf(event)) {
5842 throw Error("".concat(this.getType(), ": '").concat(event, "' is not available."));
5843 }
5844 }
5845 /**
5846 * Function checkInstance().
5847 *
5848 * Validate given instance.
5849 *
5850 * @param {HookBase} instance
5851 */
5852
5853 }, {
5854 key: "checkInstance",
5855 value: function checkInstance(instance) {
5856 if (instance.getType() !== this.getType()) {
5857 throw new Error("invalid instance, please use: 'elementor-api/modules/hook-base.js'. ");
5858 }
5859 }
5860 /**
5861 * Function checkId().
5862 *
5863 * Validate if the id is not used before.
5864 *
5865 * @param {string} id
5866 */
5867
5868 }, {
5869 key: "checkId",
5870 value: function checkId(id) {
5871 if (-1 !== this.usedIds.indexOf(id)) {
5872 throw Error("id: '".concat(id, "' is already in use."));
5873 }
5874 }
5875 /**
5876 * Function shouldRun().
5877 *
5878 * Determine if the event should run.
5879 *
5880 * @param {Array} callbacks
5881 *
5882 * @return {boolean} true if there are callbacks, otherwise false
5883 *
5884 * @throws {Error}
5885 */
5886
5887 }, {
5888 key: "shouldRun",
5889 value: function shouldRun(callbacks) {
5890 return !!callbacks && callbacks.length;
5891 }
5892 /**
5893 * Function register().
5894 *
5895 * Register the callback instance.
5896 *
5897 * @param {string} event
5898 * @param {HookBase} instance
5899 *
5900 * @return {{}} Created callback
5901 */
5902
5903 }, {
5904 key: "register",
5905 value: function register(event, instance) {
5906 var command = instance.getCommand(),
5907 id = instance.getId(),
5908 containerType = instance.getContainerType();
5909 this.checkEvent(event);
5910 this.checkInstance(instance);
5911 this.checkId(id);
5912 return this.registerCallback(id, event, command, instance, containerType);
5913 }
5914 /**
5915 * Function registerCallback().
5916 *
5917 * Register callback.
5918 *
5919 * @param {string} id
5920 * @param {string} event
5921 * @param {string} command
5922 * @param {HookBase} instance
5923 * @param {string} containerType
5924 *
5925 * TODO: Consider replace with typedef.
5926 * @return {{callback: *, id: *, isActive: boolean}} callback
5927 */
5928
5929 }, {
5930 key: "registerCallback",
5931 value: function registerCallback(id, event, command, instance, containerType) {
5932 if (!this.callbacks[event][command]) {
5933 this.callbacks[event][command] = [];
5934 } // Save used id(s).
5935
5936
5937 this.usedIds.push(id);
5938
5939 if (!this.callbacks[event][command]) {
5940 this.callbacks[event][command] = {};
5941 } // TODO: Create HookCallback class/type.
5942
5943
5944 var callback = {
5945 id: id,
5946 callback: instance.run.bind(instance),
5947 isActive: true,
5948 activate: function activate() {
5949 this.isActive = true;
5950 },
5951 deactivate: function deactivate() {
5952 this.isActive = false;
5953 }
5954 };
5955
5956 if (containerType) {
5957 if (!this.callbacks[event][command][containerType]) {
5958 this.callbacks[event][command][containerType] = [];
5959 }
5960
5961 this.callbacks[event][command][containerType].push(callback);
5962 } else {
5963 if (!this.callbacks[event][command].all) {
5964 this.callbacks[event][command].all = [];
5965 }
5966
5967 this.callbacks[event][command].all.push(callback);
5968 }
5969
5970 this.callbacksFlatList[callback.id] = callback;
5971 return callback;
5972 }
5973 /**
5974 * Function run().
5975 *
5976 * Run the callbacks.
5977 *
5978 * @param {string} event
5979 * @param {string} command
5980 * @param {{}} args
5981 * @param {*} result
5982 *
5983 * @return {*} results
5984 */
5985
5986 }, {
5987 key: "run",
5988 value: function run(event, command, args) {
5989 var result = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : undefined;
5990 var callbacks = this.getCallbacks(event, command, args);
5991
5992 if (this.shouldRun(callbacks)) {
5993 this.current = command;
5994 this.onRun(command, args, event);
5995 return this.runCallbacks(event, command, callbacks, args, result);
5996 }
5997
5998 return false;
5999 }
6000 /**
6001 * Function runCallbacks().
6002 *
6003 * Run's the given callbacks.
6004 *
6005 * @param {string} event
6006 * @param {string} command
6007 * @param {Array} callbacks
6008 * @param {{}} args
6009 * @param {[]} result
6010 */
6011
6012 }, {
6013 key: "runCallbacks",
6014 value: function runCallbacks(event, command, callbacks, args, result) {
6015 var callbacksResult = [];
6016
6017 for (var i in callbacks) {
6018 var callback = callbacks[i];
6019
6020 if (!callback.isActive) {
6021 continue;
6022 } // If not exist, set zero.
6023
6024
6025 if (undefined === this.depth[event][callback.id]) {
6026 this.depth[event][callback.id] = 0;
6027 }
6028
6029 this.depth[event][callback.id]++; // Prevent recursive hooks.
6030
6031 if (1 === this.depth[event][callback.id]) {
6032 this.onCallback(command, args, event, callback.id);
6033
6034 try {
6035 var callbackResult = this.runCallback(event, callback, args, result);
6036
6037 if (!callbackResult) {
6038 throw Error("Callback failed, event: '".concat(event, "'"));
6039 }
6040
6041 callbacksResult.push(callbackResult);
6042 } catch (e) {
6043 // If its 'Hook-Break' then parent `try {}` will handle it.
6044 if (e instanceof $e.modules.HookBreak) {
6045 throw e;
6046 }
6047
6048 _console.default.error(e);
6049 }
6050 }
6051
6052 this.depth[event][callback.id]--;
6053 }
6054
6055 return callbacksResult;
6056 } // eslint-disable-next-line jsdoc/require-returns-check
6057
6058 /**
6059 * Function runCallback().
6060 *
6061 * Run's the given callback.
6062 *
6063 * @param {string} event
6064 * @param {{}} callback
6065 * @param {{}} args
6066 * @param {*} result
6067 *
6068 * @return {*} results
6069 *
6070 * @throws {Error}
6071 */
6072
6073 }, {
6074 key: "runCallback",
6075 value: function runCallback(event, callback, args, result) {
6076 // eslint-disable-line no-unused-vars
6077 (0, _forceMethodImplementation.default)();
6078 }
6079 /**
6080 * Function onRun().
6081 *
6082 * Called before run a set of callbacks.
6083 *
6084 * @param {string} command
6085 * @param {{}} args
6086 * @param {string} event
6087 *
6088 * @throws {Error}
6089 */
6090
6091 }, {
6092 key: "onRun",
6093 value: function onRun(command, args, event) {
6094 // eslint-disable-line no-unused-vars
6095 (0, _forceMethodImplementation.default)();
6096 }
6097 /**
6098 * Function onCallback().
6099 *
6100 * Called before a single callback.
6101 *
6102 * @param {string} command
6103 * @param {{}} args
6104 * @param {string} event
6105 * @param {string} id
6106 *
6107 * @throws {Error}
6108 */
6109
6110 }, {
6111 key: "onCallback",
6112 value: function onCallback(command, args, event, id) {
6113 // eslint-disable-line no-unused-vars
6114 (0, _forceMethodImplementation.default)();
6115 }
6116 }]);
6117 return HooksBase;
6118 }(_module.default);
6119
6120 exports["default"] = HooksBase;
6121
6122 /***/ }),
6123
6124 /***/ "../modules/web-cli/assets/js/core/hooks/data.js":
6125 /*!*******************************************************!*\
6126 !*** ../modules/web-cli/assets/js/core/hooks/data.js ***!
6127 \*******************************************************/
6128 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6129
6130 "use strict";
6131
6132
6133 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
6134
6135 Object.defineProperty(exports, "__esModule", ({
6136 value: true
6137 }));
6138 exports["default"] = void 0;
6139
6140 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
6141
6142 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
6143
6144 var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js"));
6145
6146 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
6147
6148 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
6149
6150 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
6151
6152 var _base = _interopRequireDefault(__webpack_require__(/*! ./base.js */ "../modules/web-cli/assets/js/core/hooks/base.js"));
6153
6154 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); }; }
6155
6156 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; } }
6157
6158 var Data = /*#__PURE__*/function (_HooksBase) {
6159 (0, _inherits2.default)(Data, _HooksBase);
6160
6161 var _super = _createSuper(Data);
6162
6163 function Data() {
6164 var _this;
6165
6166 (0, _classCallCheck2.default)(this, Data);
6167
6168 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
6169 args[_key] = arguments[_key];
6170 }
6171
6172 _this = _super.call.apply(_super, [this].concat(args));
6173 _this.callbacks.dependency = {};
6174 _this.depth.dependency = {};
6175 return _this;
6176 }
6177
6178 (0, _createClass2.default)(Data, [{
6179 key: "getType",
6180 value: function getType() {
6181 return 'data';
6182 }
6183 }, {
6184 key: "runCallback",
6185 value: function runCallback(event, callback, args, result) {
6186 switch (event) {
6187 case 'dependency':
6188 {
6189 // If callback returns false and its dependency, then 'Hook-Break'.
6190 if (!callback.callback(args)) {
6191 this.depth[event][callback.id]--; // Throw custom break to be catch by the base for 'Safe' exit.
6192
6193 throw new $e.modules.HookBreak();
6194 }
6195
6196 return true;
6197 }
6198
6199 case 'catch':
6200 case 'after':
6201 {
6202 /**
6203 * When handling HOOK which is data after (not breakable),
6204 * even the result of the callback is negative, it is required to return positive,
6205 * since result of runCallback determine if the callback succeeded.
6206 */
6207 return callback.callback(args, result) || 'after' === event;
6208 }
6209 }
6210
6211 return false;
6212 }
6213 }, {
6214 key: "shouldRun",
6215 value: function shouldRun(callbacks) {
6216 return (0, _get2.default)((0, _getPrototypeOf2.default)(Data.prototype), "shouldRun", this).call(this, callbacks) && elementor.documents.getCurrent().history.getActive();
6217 }
6218 }, {
6219 key: "onRun",
6220 value: function onRun(command, args, event) {
6221 if (!$e.devTools) {
6222 return;
6223 }
6224
6225 $e.devTools.log.callbacks().run(this.getType(), command, args, event);
6226 }
6227 }, {
6228 key: "onCallback",
6229 value: function onCallback(command, args, event, id) {
6230 if (!$e.devTools) {
6231 return;
6232 }
6233
6234 $e.devTools.log.callbacks().callback(this.getType(), command, args, event, id);
6235 }
6236 }]);
6237 return Data;
6238 }(_base.default);
6239
6240 exports["default"] = Data;
6241
6242 /***/ }),
6243
6244 /***/ "../modules/web-cli/assets/js/core/hooks/ui.js":
6245 /*!*****************************************************!*\
6246 !*** ../modules/web-cli/assets/js/core/hooks/ui.js ***!
6247 \*****************************************************/
6248 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6249
6250 "use strict";
6251
6252
6253 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
6254
6255 Object.defineProperty(exports, "__esModule", ({
6256 value: true
6257 }));
6258 exports["default"] = void 0;
6259
6260 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
6261
6262 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
6263
6264 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
6265
6266 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
6267
6268 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
6269
6270 var _base = _interopRequireDefault(__webpack_require__(/*! ./base */ "../modules/web-cli/assets/js/core/hooks/base.js"));
6271
6272 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); }; }
6273
6274 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; } }
6275
6276 var Ui = /*#__PURE__*/function (_HooksBase) {
6277 (0, _inherits2.default)(Ui, _HooksBase);
6278
6279 var _super = _createSuper(Ui);
6280
6281 function Ui() {
6282 var _this;
6283
6284 (0, _classCallCheck2.default)(this, Ui);
6285
6286 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
6287 args[_key] = arguments[_key];
6288 }
6289
6290 _this = _super.call.apply(_super, [this].concat(args));
6291 _this.callbacks.before = {};
6292 _this.depth.before = {};
6293 return _this;
6294 }
6295
6296 (0, _createClass2.default)(Ui, [{
6297 key: "getType",
6298 value: function getType() {
6299 return 'ui';
6300 }
6301 }, {
6302 key: "runCallback",
6303 value: function runCallback(event, callback, args, result) {
6304 switch (event) {
6305 case 'before':
6306 callback.callback(args);
6307 break;
6308
6309 case 'catch':
6310 case 'after':
6311 callback.callback(args, result);
6312 break;
6313
6314 default:
6315 return false;
6316 }
6317
6318 return true;
6319 }
6320 }, {
6321 key: "onRun",
6322 value: function onRun(command, args, event) {
6323 if (!$e.devTools) {
6324 return;
6325 }
6326
6327 $e.devTools.log.callbacks().run(this.getType(), command, args, event);
6328 }
6329 }, {
6330 key: "onCallback",
6331 value: function onCallback(command, args, event, id) {
6332 if (!$e.devTools) {
6333 return;
6334 }
6335
6336 $e.devTools.log.callbacks().callback(this.getType(), command, args, event, id);
6337 }
6338 }]);
6339 return Ui;
6340 }(_base.default);
6341
6342 exports["default"] = Ui;
6343
6344 /***/ }),
6345
6346 /***/ "../modules/web-cli/assets/js/core/routes.js":
6347 /*!***************************************************!*\
6348 !*** ../modules/web-cli/assets/js/core/routes.js ***!
6349 \***************************************************/
6350 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6351
6352 "use strict";
6353
6354
6355 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
6356
6357 Object.defineProperty(exports, "__esModule", ({
6358 value: true
6359 }));
6360 exports["default"] = void 0;
6361
6362 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
6363
6364 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
6365
6366 var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js"));
6367
6368 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
6369
6370 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
6371
6372 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
6373
6374 var _commands = _interopRequireDefault(__webpack_require__(/*! ./commands */ "../modules/web-cli/assets/js/core/commands.js"));
6375
6376 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); }; }
6377
6378 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; } }
6379
6380 var Routes = /*#__PURE__*/function (_Commands) {
6381 (0, _inherits2.default)(Routes, _Commands);
6382
6383 var _super = _createSuper(Routes);
6384
6385 function Routes() {
6386 var _this;
6387
6388 (0, _classCallCheck2.default)(this, Routes);
6389
6390 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
6391 args[_key] = arguments[_key];
6392 }
6393
6394 _this = _super.call.apply(_super, [this].concat(args));
6395 _this.savedStates = {};
6396 _this.historyPerComponent = {};
6397 return _this;
6398 }
6399
6400 (0, _createClass2.default)(Routes, [{
6401 key: "refreshContainer",
6402 value: function refreshContainer(container) {
6403 var currentRoute = this.getCurrent(container),
6404 currentArgs = this.getCurrentArgs(container);
6405 this.clearCurrent(container);
6406 this.to(currentRoute, currentArgs);
6407 }
6408 }, {
6409 key: "getHistory",
6410 value: function getHistory() {
6411 var namespaceRoot = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
6412
6413 if (namespaceRoot) {
6414 return this.historyPerComponent[namespaceRoot] || [];
6415 }
6416
6417 return this.historyPerComponent;
6418 }
6419 }, {
6420 key: "clearHistory",
6421 value: function clearHistory(namespaceRoot) {
6422 delete this.historyPerComponent[namespaceRoot];
6423 }
6424 }, {
6425 key: "clearCurrent",
6426 value: function clearCurrent(container) {
6427 var route = this.current[container];
6428
6429 if (!route) {
6430 return;
6431 }
6432
6433 this.detachCurrent(container);
6434 this.getComponent(route).onCloseRoute(route);
6435 }
6436 }, {
6437 key: "clear",
6438 value: function clear() {
6439 var _this2 = this;
6440
6441 Object.keys(this.current).forEach(function (container) {
6442 return _this2.clearCurrent(container);
6443 });
6444 }
6445 }, {
6446 key: "saveState",
6447 value: function saveState(container) {
6448 this.savedStates[container] = {
6449 route: this.current[container],
6450 args: this.currentArgs[container]
6451 };
6452 return this;
6453 }
6454 }, {
6455 key: "restoreState",
6456 value: function restoreState(container) {
6457 if (!this.savedStates[container]) {
6458 return false;
6459 }
6460
6461 this.to(this.savedStates[container].route, this.savedStates[container].args);
6462 return true;
6463 }
6464 }, {
6465 key: "validateRun",
6466 value: function validateRun(route) {
6467 var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
6468
6469 if (!(0, _get2.default)((0, _getPrototypeOf2.default)(Routes.prototype), "validateRun", this).call(this, route, args)) {
6470 return false;
6471 }
6472
6473 if (this.is(route, args) && !args.refresh) {
6474 return false;
6475 }
6476
6477 var component = this.getComponent(route);
6478
6479 if (!component.isOpen || args.reOpen) {
6480 component.isOpen = component.open(args);
6481 }
6482
6483 return component.isOpen;
6484 }
6485 /**
6486 * @override
6487 */
6488
6489 }, {
6490 key: "beforeRun",
6491 value: function beforeRun(route, args) {
6492 var component = this.getComponent(route),
6493 container = component.getServiceName(),
6494 oldRoute = this.current[container];
6495
6496 if (oldRoute) {
6497 this.getComponent(oldRoute).onCloseRoute(oldRoute);
6498 }
6499
6500 _commands.default.trace.push(route);
6501
6502 (0, _get2.default)((0, _getPrototypeOf2.default)(Routes.prototype), "beforeRun", this).call(this, route, args, false);
6503 this.attachCurrent(container, route, args);
6504 }
6505 }, {
6506 key: "to",
6507 value: function to(route, args) {
6508 this.run(route, args);
6509 var namespaceRoot = this.getComponent(route).getServiceName();
6510
6511 if (!this.historyPerComponent[namespaceRoot]) {
6512 this.historyPerComponent[namespaceRoot] = [];
6513 }
6514
6515 this.historyPerComponent[namespaceRoot].push({
6516 route: route,
6517 args: args
6518 });
6519 }
6520 }, {
6521 key: "back",
6522 value: function back(namespaceRoot) {
6523 var history = this.getHistory(namespaceRoot); // Remove current;
6524
6525 history.pop();
6526 var last = history.pop();
6527
6528 if (!last) {
6529 return;
6530 }
6531
6532 this.to(last.route, last.args);
6533 } // Don't use the event object.
6534
6535 }, {
6536 key: "runShortcut",
6537 value: function runShortcut(command) {
6538 this.to(command);
6539 } // Don't clear current route.
6540
6541 }, {
6542 key: "afterRun",
6543 value: function afterRun(route, args) {
6544 var results = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
6545 var component = this.getComponent(route);
6546 component.onRoute(route, args);
6547 (0, _get2.default)((0, _getPrototypeOf2.default)(Routes.prototype), "afterRun", this).call(this, route, args, results, false);
6548
6549 _commands.default.trace.pop();
6550 }
6551 }, {
6552 key: "is",
6553 value: function is(route) {
6554 var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
6555
6556 if (!(0, _get2.default)((0, _getPrototypeOf2.default)(Routes.prototype), "is", this).call(this, route)) {
6557 return false;
6558 }
6559
6560 var container = this.getComponent(route).getServiceName();
6561 return _.isEqual(args, this.currentArgs[container]);
6562 }
6563 }, {
6564 key: "isPartOf",
6565 value: function isPartOf(route) {
6566 /**
6567 * Check against current command hierarchically.
6568 * For example `is( 'panel' )` will be true for `panel/elements`
6569 * `is( 'panel/editor' )` will be true for `panel/editor/style`
6570 */
6571 var parts = route.split('/'),
6572 container = parts[0],
6573 toCheck = [],
6574 currentParts = this.current[container] ? this.current[container].split('/') : [];
6575 var match = false;
6576 currentParts.forEach(function (part) {
6577 toCheck.push(part);
6578
6579 if (toCheck.join('/') === route) {
6580 match = true;
6581 }
6582 });
6583 return match;
6584 }
6585 }, {
6586 key: "error",
6587 value: function error(message) {
6588 throw Error('Routes: ' + message);
6589 }
6590 }]);
6591 return Routes;
6592 }(_commands.default);
6593
6594 exports["default"] = Routes;
6595
6596 /***/ }),
6597
6598 /***/ "../modules/web-cli/assets/js/core/shortcuts.js":
6599 /*!******************************************************!*\
6600 !*** ../modules/web-cli/assets/js/core/shortcuts.js ***!
6601 \******************************************************/
6602 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6603
6604 "use strict";
6605
6606
6607 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
6608
6609 Object.defineProperty(exports, "__esModule", ({
6610 value: true
6611 }));
6612 exports["default"] = void 0;
6613
6614 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
6615
6616 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
6617
6618 var _environment = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/environment */ "../modules/web-cli/assets/js/utils/environment.js"));
6619
6620 var _console = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/console */ "../modules/web-cli/assets/js/utils/console.js"));
6621
6622 var Shortcuts = /*#__PURE__*/function () {
6623 function Shortcuts($window) {
6624 (0, _classCallCheck2.default)(this, Shortcuts);
6625 this.specialKeys = {
6626 13: 'enter',
6627 27: 'esc',
6628 38: 'up',
6629 40: 'down',
6630 46: 'del',
6631 191: '?'
6632 };
6633 this.component = '';
6634 this.handlers = {};
6635 this.bindListener($window);
6636 }
6637
6638 (0, _createClass2.default)(Shortcuts, [{
6639 key: "bindListener",
6640 value: function bindListener($window) {
6641 var _this = this;
6642
6643 $window.on('keydown', function (event) {
6644 return _this.handle(event);
6645 });
6646 }
6647 }, {
6648 key: "getAll",
6649 value: function getAll() {
6650 var shortcuts = {};
6651 jQuery.each(this.handlers, function (key, handler) {
6652 jQuery.each(handler, function (index, config) {
6653 shortcuts[config.command] = key;
6654 });
6655 });
6656 return shortcuts;
6657 }
6658 /**
6659 * @param {string} shortcuts
6660 * @param {Object} args
6661 * @param {Function} args.callback Required
6662 * @param {string} args.component Optional
6663 * @param {Function} args.dependency Optional
6664 * @param {Array} args.exclude Optional
6665 * @param {boolean} args.allowAltKey Optional
6666 */
6667
6668 }, {
6669 key: "register",
6670 value: function register(shortcuts, args) {
6671 var _this2 = this;
6672
6673 shortcuts.replace(' ', '').split(',').forEach(function (shortcut) {
6674 if (!_this2.handlers[shortcut]) {
6675 _this2.handlers[shortcut] = [];
6676 }
6677
6678 _this2.handlers[shortcut].push(args);
6679 });
6680 }
6681 }, {
6682 key: "unregister",
6683 value: function unregister(shortcuts, args) {
6684 var _this3 = this;
6685
6686 shortcuts.replace(' ', '').split(',').forEach(function (shortcut) {
6687 _this3.handlers[shortcut].forEach(function (index, handler) {
6688 if (args === handler) {
6689 delete _this3.handlers[shortcut][index];
6690 }
6691 });
6692 });
6693 }
6694 }, {
6695 key: "handle",
6696 value: function handle(event) {
6697 var handlers = this.getHandlersByPriority(event);
6698
6699 if (!handlers) {
6700 return;
6701 }
6702
6703 var filteredHandlers = handlers.filter(function (handler) {
6704 if (handler.exclude && -1 !== handler.exclude.indexOf('input')) {
6705 var $target = jQuery(event.target);
6706
6707 if ($target.is(':input, .elementor-input') || $target.closest('[contenteditable="true"]').length) {
6708 return false;
6709 }
6710 }
6711
6712 if (handler.dependency && !handler.dependency(event)) {
6713 return false;
6714 } // Fix for some keyboard sources that consider alt key as ctrl key
6715
6716
6717 if (!handler.allowAltKey && event.altKey) {
6718 return false;
6719 }
6720
6721 return true;
6722 });
6723
6724 if (!filteredHandlers.length) {
6725 return;
6726 }
6727
6728 if (1 < filteredHandlers.length && elementorWebCliConfig.isDebug) {
6729 _console.default.warn('Multiple handlers for shortcut.', filteredHandlers, event);
6730 }
6731
6732 event.preventDefault();
6733 filteredHandlers[0].callback(event);
6734 }
6735 }, {
6736 key: "isControlEvent",
6737 value: function isControlEvent(event) {
6738 return event[_environment.default.mac ? 'metaKey' : 'ctrlKey'];
6739 }
6740 }, {
6741 key: "getEventShortcut",
6742 value: function getEventShortcut(event) {
6743 var shortcut = [];
6744
6745 if (event.altKey) {
6746 shortcut.push('alt');
6747 }
6748
6749 if (this.isControlEvent(event)) {
6750 shortcut.push('ctrl');
6751 }
6752
6753 if (event.shiftKey) {
6754 shortcut.push('shift');
6755 }
6756
6757 if (this.specialKeys[event.which]) {
6758 shortcut.push(this.specialKeys[event.which]);
6759 } else {
6760 shortcut.push(String.fromCharCode(event.which).toLowerCase());
6761 }
6762
6763 return shortcut.join('+');
6764 }
6765 }, {
6766 key: "isActiveScope",
6767 value: function isActiveScope(scopes) {
6768 var activeComponents = Object.keys($e.components.activeComponents),
6769 activeComponent = activeComponents[activeComponents.length - 1],
6770 component = $e.components.get(activeComponent);
6771
6772 if (!component) {
6773 return false;
6774 }
6775
6776 var namespace = component.getNamespace();
6777 var filteredByNamespace = scopes.some(function (scope) {
6778 return namespace === scope;
6779 });
6780
6781 if (filteredByNamespace) {
6782 return true;
6783 } // Else filter by namespaceRoot.
6784
6785
6786 var namespaceRoot = component.getServiceName();
6787 return scopes.some(function (scope) {
6788 return namespaceRoot === scope;
6789 });
6790 }
6791 }, {
6792 key: "getHandlersByPriority",
6793 value: function getHandlersByPriority(event) {
6794 var _this4 = this;
6795
6796 var handlers = this.handlers[this.getEventShortcut(event)];
6797
6798 if (!handlers) {
6799 return false;
6800 } // TODO: Prioritize current scope before roo scope.
6801
6802
6803 var inCurrentScope = handlers.filter(function (handler) {
6804 return handler.scopes && _this4.isActiveScope(handler.scopes);
6805 });
6806
6807 if (inCurrentScope.length) {
6808 return inCurrentScope;
6809 }
6810
6811 var noScope = handlers.filter(function (handler) {
6812 return !handler.scopes;
6813 });
6814
6815 if (noScope.length) {
6816 return noScope;
6817 }
6818 }
6819 }]);
6820 return Shortcuts;
6821 }();
6822
6823 exports["default"] = Shortcuts;
6824
6825 /***/ }),
6826
6827 /***/ "../modules/web-cli/assets/js/core/store.js":
6828 /*!**************************************************!*\
6829 !*** ../modules/web-cli/assets/js/core/store.js ***!
6830 \**************************************************/
6831 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6832
6833 "use strict";
6834
6835
6836 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
6837
6838 Object.defineProperty(exports, "__esModule", ({
6839 value: true
6840 }));
6841 exports["default"] = void 0;
6842
6843 var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js"));
6844
6845 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
6846
6847 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
6848
6849 var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
6850
6851 var _toolkit = __webpack_require__(/*! @reduxjs/toolkit */ "../node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js");
6852
6853 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; }
6854
6855 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; }
6856
6857 /**
6858 * @typedef {import('@reduxjs/toolkit').Slice} Slice
6859 */
6860
6861 /**
6862 * @typedef {import('@reduxjs/toolkit').EnhancedStore} EnhancedStore
6863 */
6864
6865 /**
6866 * @typedef {import('@reduxjs/toolkit').AnyAction} AnyAction
6867 */
6868
6869 /**
6870 * @typedef {import('@reduxjs/toolkit').ThunkMiddlewareFor} ThunkMiddlewareFor
6871 */
6872 var Store = /*#__PURE__*/function () {
6873 /**
6874 * @type {Object}
6875 */
6876
6877 /**
6878 * @type {EnhancedStore<{}, AnyAction, [ThunkMiddlewareFor<{}>]>}
6879 */
6880
6881 /**
6882 * Initialize the Store.
6883 *
6884 * @return {void}
6885 */
6886 function Store() {
6887 (0, _classCallCheck2.default)(this, Store);
6888 (0, _defineProperty2.default)(this, "slices", {});
6889 (0, _defineProperty2.default)(this, "reduxStore", void 0);
6890 this.slices = {};
6891 this.reduxStore = this.createStore();
6892 }
6893 /**
6894 * Create a Redux Store object.
6895 *
6896 * @return {EnhancedStore<{}, AnyAction, [ThunkMiddlewareFor<{}>]>} store
6897 */
6898
6899
6900 (0, _createClass2.default)(Store, [{
6901 key: "createStore",
6902 value: function createStore() {
6903 return (0, _toolkit.configureStore)({
6904 // Use an empty function instead of empty object since an empty object
6905 // isn't a valid reducer value.
6906 reducer: function reducer() {}
6907 });
6908 }
6909 /**
6910 * Inject a new reducer.
6911 *
6912 * See: https://redux.js.org/usage/code-splitting#defining-an-injectreducer-function
6913 *
6914 * @param {string} id - Reducer unique ID.
6915 * @param {Function} newReducer - New reducer to inject.
6916 *
6917 * @return {void}
6918 */
6919
6920 }, {
6921 key: "injectReducer",
6922 value: function injectReducer(id, newReducer) {
6923 var prevReducers = this.getReducers();
6924 this.reduxStore.replaceReducer((0, _toolkit.combineReducers)(_objectSpread(_objectSpread({}, prevReducers), {}, (0, _defineProperty2.default)({}, id, newReducer))));
6925 }
6926 /**
6927 * Register a Redux Store slice.
6928 *
6929 * @param {string} sliceId - Slice unique ID.
6930 * @param {Slice} instance - Slice object to add.
6931 *
6932 * @return {void}
6933 */
6934
6935 }, {
6936 key: "register",
6937 value: function register(sliceId, instance) {
6938 if (this.slices[sliceId]) {
6939 throw "Slice with ID '".concat(sliceId, "' already exists.");
6940 }
6941
6942 this.slices[sliceId] = instance;
6943 this.injectReducer(sliceId, instance.reducer);
6944 }
6945 /**
6946 * Get a specific slice.
6947 *
6948 * @param {string|null} sliceId - Slice ID to get.
6949 *
6950 * @return {Slice} slice
6951 */
6952
6953 }, {
6954 key: "get",
6955 value: function get(sliceId) {
6956 return this.slices[sliceId];
6957 }
6958 /**
6959 * Get all slices.
6960 *
6961 * @return {Object} slices
6962 */
6963
6964 }, {
6965 key: "getAllSlices",
6966 value: function getAllSlices() {
6967 return this.slices;
6968 }
6969 /**
6970 * Get All slices.
6971 *
6972 * @return {Object} slices
6973 */
6974
6975 }, {
6976 key: "getAll",
6977 value: function getAll() {
6978 return Object.keys(this.slices).sort();
6979 }
6980 /**
6981 * Return the current reducers.
6982 *
6983 * @return {Object} reducers
6984 */
6985
6986 }, {
6987 key: "getReducers",
6988 value: function getReducers() {
6989 return Object.entries(this.slices).reduce(function (reducers, _ref) {
6990 var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
6991 key = _ref2[0],
6992 slice = _ref2[1];
6993
6994 return _objectSpread(_objectSpread({}, reducers), {}, (0, _defineProperty2.default)({}, key, slice.reducer));
6995 }, {});
6996 }
6997 /**
6998 * Get the actual Redux store object.
6999 *
7000 * @return {Object} redux store object
7001 */
7002
7003 }, {
7004 key: "getReduxStore",
7005 value: function getReduxStore() {
7006 return this.reduxStore;
7007 }
7008 /**
7009 * Proxy to Redux's `dispatch()` function.
7010 *
7011 * @return {*} the dispatched action
7012 */
7013
7014 }, {
7015 key: "dispatch",
7016 value: function dispatch() {
7017 var _this$reduxStore;
7018
7019 return (_this$reduxStore = this.reduxStore).dispatch.apply(_this$reduxStore, arguments);
7020 }
7021 /**
7022 * Proxy to Redux's `getState()` function, with the ability to get a specific slice.
7023 *
7024 * @param {string|null} sliceId
7025 *
7026 * @return {*} The current state tree of the application
7027 */
7028
7029 }, {
7030 key: "getState",
7031 value: function getState() {
7032 var sliceId = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
7033 var state = this.reduxStore.getState();
7034 return sliceId ? state[sliceId] : state;
7035 }
7036 /**
7037 * Proxy to Redux's `replaceReducer()` function.
7038 * TODO: Do we want that?
7039 *
7040 * @return {*} undefined
7041 */
7042
7043 }, {
7044 key: "replaceReducer",
7045 value: function replaceReducer() {
7046 var _this$reduxStore2;
7047
7048 return (_this$reduxStore2 = this.reduxStore).replaceReducer.apply(_this$reduxStore2, arguments);
7049 }
7050 /**
7051 * Proxy to Redux's `subscribe()` function.
7052 *
7053 * @return {*} A function that unsubscribes the change listener
7054 */
7055
7056 }, {
7057 key: "subscribe",
7058 value: function subscribe() {
7059 var _this$reduxStore3;
7060
7061 return (_this$reduxStore3 = this.reduxStore).subscribe.apply(_this$reduxStore3, arguments);
7062 }
7063 }]);
7064 return Store;
7065 }();
7066
7067 exports["default"] = Store;
7068
7069 /***/ }),
7070
7071 /***/ "../modules/web-cli/assets/js/core/ui-states.js":
7072 /*!******************************************************!*\
7073 !*** ../modules/web-cli/assets/js/core/ui-states.js ***!
7074 \******************************************************/
7075 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
7076
7077 "use strict";
7078
7079
7080 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
7081
7082 Object.defineProperty(exports, "__esModule", ({
7083 value: true
7084 }));
7085 exports["default"] = void 0;
7086
7087 var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js"));
7088
7089 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
7090
7091 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
7092
7093 /**
7094 * @typedef {import('./states/ui-state-base')} UiStateBase
7095 */
7096 var UiStates = /*#__PURE__*/function () {
7097 /**
7098 * Initialize the State Manager.
7099 *
7100 * @return {void}
7101 */
7102 function UiStates() {
7103 (0, _classCallCheck2.default)(this, UiStates);
7104 this.states = {};
7105 }
7106 /**
7107 * Register a new state.
7108 *
7109 * @param {UiStateBase} instance - State instance.
7110 */
7111
7112
7113 (0, _createClass2.default)(UiStates, [{
7114 key: "register",
7115 value: function register(instance) {
7116 var stateId = instance.getPrefixedId();
7117
7118 if (this.states[stateId]) {
7119 throw "State '".concat(stateId, "' already exists.");
7120 }
7121
7122 this.states[stateId] = instance;
7123 }
7124 /**
7125 * Get all existing states with their options:
7126 *
7127 * {
7128 * 'state-id': [
7129 * 'option-1',
7130 * 'option-2',
7131 * 'option-3',
7132 * ],
7133 * }
7134 *
7135 * @return {Object} all existing states
7136 */
7137
7138 }, {
7139 key: "getAll",
7140 value: function getAll() {
7141 var states = {};
7142 Object.entries(this.states).forEach(function (_ref) {
7143 var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
7144 id = _ref2[0],
7145 instance = _ref2[1];
7146
7147 var options = instance.getOptions();
7148 states[id] = Object.keys(options);
7149 });
7150 return states;
7151 }
7152 /**
7153 * Get the state value, or return all of them if no `state` is set.
7154 *
7155 * @param {string} state - State ID.
7156 *
7157 * @return {UiStateBase} state value
7158 */
7159
7160 }, {
7161 key: "get",
7162 value: function get(state) {
7163 if (state) {
7164 return this.states[state];
7165 }
7166
7167 return this.states;
7168 }
7169 /**
7170 * Set the current state value and trigger its callbacks & events.
7171 * This function triggers a `e-ui-state:${ stateID }` event to the scope, with `oldValue` & `newValue`
7172 * under `e.detail`.
7173 * Additionally, it adds a `e-ui-state--${ stateID }__${ value }` class to the scope element.
7174 *
7175 * @param {string} state - State ID.
7176 * @param {string} value - New state value.
7177 *
7178 * @return {void}
7179 */
7180
7181 }, {
7182 key: "set",
7183 value: function set(state, value) {
7184 // Invalid state or option.
7185 if (!this.get(state)) {
7186 throw "State '".concat(state, "' doesn't exist.");
7187 }
7188
7189 var oldValue = this.getCurrent(state),
7190 classPrefix = "e-ui-state--".concat(state.replaceAll('/', '-')),
7191 oldStateClass = "".concat(classPrefix, "__").concat(oldValue),
7192 newStateClass = "".concat(classPrefix, "__").concat(value),
7193 scopes = this.get(state).getScopes(); // Set the current state to the new value.
7194
7195 this.get(state).set(value);
7196 scopes.forEach(function (scope) {
7197 scope.classList.remove(oldStateClass); // Set the new class only if there is a value (i.e. it's not a state removal action).
7198
7199 if (value) {
7200 scope.classList.add(newStateClass);
7201 } // Dispatch a custom state-change event to the scope.
7202
7203
7204 var event = new CustomEvent("e-ui-state:".concat(state), {
7205 detail: {
7206 oldValue: oldValue,
7207 newValue: value
7208 }
7209 });
7210 scope.dispatchEvent(event);
7211 });
7212 }
7213 /**
7214 * Remove a state.
7215 *
7216 * @param {string} state - State ID.
7217 *
7218 * @return {void}
7219 */
7220
7221 }, {
7222 key: "remove",
7223 value: function remove(state) {
7224 this.set(state, '');
7225 }
7226 /**
7227 * Get the current state value.
7228 *
7229 * @param {string} state - State ID.
7230 *
7231 * @return {string} current state value
7232 */
7233
7234 }, {
7235 key: "getCurrent",
7236 value: function getCurrent(state) {
7237 var _this$get;
7238
7239 return (_this$get = this.get(state)) === null || _this$get === void 0 ? void 0 : _this$get.getCurrent();
7240 }
7241 }]);
7242 return UiStates;
7243 }();
7244
7245 exports["default"] = UiStates;
7246
7247 /***/ }),
7248
7249 /***/ "../modules/web-cli/assets/js/extras/hash-commands.js":
7250 /*!************************************************************!*\
7251 !*** ../modules/web-cli/assets/js/extras/hash-commands.js ***!
7252 \************************************************************/
7253 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
7254
7255 "use strict";
7256
7257
7258 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
7259
7260 Object.defineProperty(exports, "__esModule", ({
7261 value: true
7262 }));
7263 exports["default"] = void 0;
7264
7265 var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js"));
7266
7267 var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js"));
7268
7269 var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js"));
7270
7271 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
7272
7273 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
7274
7275 var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
7276
7277 var _console = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/console */ "../modules/web-cli/assets/js/utils/console.js"));
7278
7279 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; } } }; }
7280
7281 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); }
7282
7283 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; }
7284
7285 var HashCommands = /*#__PURE__*/function () {
7286 /**
7287 * Cannot be static since it uses callback(s) that are available only after '$e' is initialized.
7288 */
7289
7290 /**
7291 * @typedef HashCommand
7292 * @property {string} method method
7293 * @property {string} command command
7294 * @property {Object} args arguments
7295 */
7296
7297 /**
7298 * List of current loaded hash commands.
7299 *
7300 * @type {Array.<HashCommand>}
7301 */
7302 function HashCommands() {
7303 (0, _classCallCheck2.default)(this, HashCommands);
7304 (0, _defineProperty2.default)(this, "dispatchersList", {
7305 'e:run': {
7306 runner: function runner() {
7307 return $e.run;
7308 },
7309 isSafe: function isSafe(command) {
7310 var _$e$commands$getComma;
7311
7312 return (_$e$commands$getComma = $e.commands.getCommandClass(command)) === null || _$e$commands$getComma === void 0 ? void 0 : _$e$commands$getComma.getInfo().isSafe;
7313 },
7314 isSafeWithArgs: function isSafeWithArgs(command) {
7315 var _$e$commands$getComma2;
7316
7317 return (_$e$commands$getComma2 = $e.commands.getCommandClass(command)) === null || _$e$commands$getComma2 === void 0 ? void 0 : _$e$commands$getComma2.getInfo().isSafeWithArgs;
7318 }
7319 },
7320 'e:route': {
7321 runner: function runner() {
7322 return $e.route;
7323 },
7324 isSafe: function isSafe() {
7325 return true;
7326 },
7327 isSafeWithArgs: function isSafeWithArgs() {
7328 return false;
7329 }
7330 }
7331 });
7332 (0, _defineProperty2.default)(this, "commands", []);
7333 this.commands = this.get();
7334 }
7335 /**
7336 * Function get().
7337 *
7338 * Get API requests that comes from hash ( eg #e:run ).
7339 *
7340 * @param {string} hash
7341 *
7342 * @return {Array.<HashCommand>} API requests
7343 */
7344
7345
7346 (0, _createClass2.default)(HashCommands, [{
7347 key: "get",
7348 value: function get() {
7349 var _this = this;
7350
7351 var hash = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : location.hash;
7352 var result = [];
7353
7354 if (hash) {
7355 // Remove first '#' and split each '&'.
7356 var hashList = hash.substr(1).split('&');
7357 hashList.forEach(function (hashItem) {
7358 // eslint-disable-next-line @wordpress/no-unused-vars-before-return
7359 var _hashItem$split = hashItem.split('?'),
7360 _hashItem$split2 = (0, _slicedToArray2.default)(_hashItem$split, 2),
7361 rawCommand = _hashItem$split2[0],
7362 rawArgs = _hashItem$split2[1];
7363
7364 var hashParts = rawCommand.split(':');
7365
7366 if (3 !== hashParts.length) {
7367 return;
7368 }
7369
7370 var method = hashParts[0] + ':' + hashParts[1],
7371 dispatcher = _this.dispatchersList[method];
7372
7373 if (dispatcher) {
7374 var command = hashParts[2],
7375 args = _this.parseCommandArgs(rawArgs);
7376
7377 result.push({
7378 method: method,
7379 command: command,
7380 args: args
7381 });
7382 }
7383 });
7384 }
7385
7386 return result;
7387 }
7388 /**
7389 * Function run().
7390 *
7391 * Run API requests that comes from hash ( eg #e:run ).
7392 *
7393 * @param {Array.<HashCommand>} [commands=this.commands]
7394 */
7395
7396 }, {
7397 key: "run",
7398 value: function () {
7399 var _run = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
7400 var commands,
7401 _iterator,
7402 _step,
7403 hashCommand,
7404 dispatcher,
7405 _iterator2,
7406 _step2,
7407 _hashCommand,
7408 _dispatcher,
7409 _args = arguments;
7410
7411 return _regenerator.default.wrap(function _callee$(_context) {
7412 while (1) {
7413 switch (_context.prev = _context.next) {
7414 case 0:
7415 commands = _args.length > 0 && _args[0] !== undefined ? _args[0] : this.commands;
7416 // To allow validate the run first.
7417 _iterator = _createForOfIteratorHelper(commands);
7418 _context.prev = 2;
7419
7420 _iterator.s();
7421
7422 case 4:
7423 if ((_step = _iterator.n()).done) {
7424 _context.next = 13;
7425 break;
7426 }
7427
7428 hashCommand = _step.value;
7429 dispatcher = this.dispatchersList[hashCommand.method];
7430
7431 if (dispatcher) {
7432 _context.next = 9;
7433 break;
7434 }
7435
7436 return _context.abrupt("return", Promise.reject(new Error("No dispatcher found for the command: `".concat(hashCommand.command, "`."))));
7437
7438 case 9:
7439 if (dispatcher.isSafe(hashCommand.command)) {
7440 _context.next = 11;
7441 break;
7442 }
7443
7444 return _context.abrupt("return", Promise.reject(new Error("Attempting to run unsafe or non exist command: `".concat(hashCommand.command, "`."))));
7445
7446 case 11:
7447 _context.next = 4;
7448 break;
7449
7450 case 13:
7451 _context.next = 18;
7452 break;
7453
7454 case 15:
7455 _context.prev = 15;
7456 _context.t0 = _context["catch"](2);
7457
7458 _iterator.e(_context.t0);
7459
7460 case 18:
7461 _context.prev = 18;
7462
7463 _iterator.f();
7464
7465 return _context.finish(18);
7466
7467 case 21:
7468 // This logic will run the promises by sequence (will wait for dispatcher to finish, before run again).
7469 _iterator2 = _createForOfIteratorHelper(commands);
7470 _context.prev = 22;
7471
7472 _iterator2.s();
7473
7474 case 24:
7475 if ((_step2 = _iterator2.n()).done) {
7476 _context.next = 31;
7477 break;
7478 }
7479
7480 _hashCommand = _step2.value;
7481 _dispatcher = this.dispatchersList[_hashCommand.method];
7482 _context.next = 29;
7483 return _dispatcher.runner()(_hashCommand.command, _dispatcher.isSafeWithArgs(_hashCommand.command) ? _hashCommand.args : undefined);
7484
7485 case 29:
7486 _context.next = 24;
7487 break;
7488
7489 case 31:
7490 _context.next = 36;
7491 break;
7492
7493 case 33:
7494 _context.prev = 33;
7495 _context.t1 = _context["catch"](22);
7496
7497 _iterator2.e(_context.t1);
7498
7499 case 36:
7500 _context.prev = 36;
7501
7502 _iterator2.f();
7503
7504 return _context.finish(36);
7505
7506 case 39:
7507 case "end":
7508 return _context.stop();
7509 }
7510 }
7511 }, _callee, this, [[2, 15, 18, 21], [22, 33, 36, 39]]);
7512 }));
7513
7514 function run() {
7515 return _run.apply(this, arguments);
7516 }
7517
7518 return run;
7519 }()
7520 /**
7521 * Function runOnce().
7522 *
7523 * Do same as `run` but clear `this.commands` before leaving.
7524 */
7525
7526 }, {
7527 key: "runOnce",
7528 value: function runOnce() {
7529 var _this2 = this;
7530
7531 this.run(this.commands).then(function () {
7532 _this2.commands = [];
7533 });
7534 }
7535 /**
7536 * Takes a args in form of JSON and parse it.
7537 *
7538 * @param {string} rawArgs
7539 * @return {Object} args in as an object
7540 */
7541
7542 }, {
7543 key: "parseCommandArgs",
7544 value: function parseCommandArgs(rawArgs) {
7545 try {
7546 return JSON.parse(decodeURI(rawArgs || '{}'));
7547 } catch (e) {
7548 _console.default.warn('Hash commands JSON args cannot be parsed. \n\n', e);
7549
7550 return {};
7551 }
7552 }
7553 }]);
7554 return HashCommands;
7555 }();
7556
7557 exports["default"] = HashCommands;
7558
7559 /***/ }),
7560
7561 /***/ "../modules/web-cli/assets/js/modules/command-base.js":
7562 /*!************************************************************!*\
7563 !*** ../modules/web-cli/assets/js/modules/command-base.js ***!
7564 \************************************************************/
7565 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
7566
7567 "use strict";
7568
7569
7570 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
7571
7572 Object.defineProperty(exports, "__esModule", ({
7573 value: true
7574 }));
7575 exports["default"] = void 0;
7576
7577 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
7578
7579 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
7580
7581 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
7582
7583 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
7584
7585 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
7586
7587 var _commandInfra = _interopRequireDefault(__webpack_require__(/*! ./command-infra */ "../modules/web-cli/assets/js/modules/command-infra.js"));
7588
7589 var _deprecation = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/deprecation */ "../modules/web-cli/assets/js/utils/deprecation.js"));
7590
7591 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); }; }
7592
7593 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; } }
7594
7595 /**
7596 * @name $e.modules.CommandBase
7597 */
7598 var CommandBase = /*#__PURE__*/function (_CommandInfra) {
7599 (0, _inherits2.default)(CommandBase, _CommandInfra);
7600
7601 var _super = _createSuper(CommandBase);
7602
7603 function CommandBase() {
7604 (0, _classCallCheck2.default)(this, CommandBase);
7605 return _super.apply(this, arguments);
7606 }
7607
7608 (0, _createClass2.default)(CommandBase, [{
7609 key: "onBeforeRun",
7610 value: function onBeforeRun() {
7611 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
7612 $e.hooks.runUIBefore(this.command, args);
7613 }
7614 }, {
7615 key: "onAfterRun",
7616 value: function onAfterRun() {
7617 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
7618 var result = arguments.length > 1 ? arguments[1] : undefined;
7619 $e.hooks.runUIAfter(this.command, args, result);
7620 }
7621 }, {
7622 key: "onBeforeApply",
7623 value: function onBeforeApply() {
7624 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
7625 $e.hooks.runDataDependency(this.command, args);
7626 }
7627 }, {
7628 key: "onAfterApply",
7629 value: function onAfterApply() {
7630 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
7631 var result = arguments.length > 1 ? arguments[1] : undefined;
7632 $e.hooks.runDataAfter(this.command, args, result);
7633 }
7634 }, {
7635 key: "onCatchApply",
7636 value: function onCatchApply(e) {
7637 this.runCatchHooks(e);
7638 }
7639 /**
7640 * Run all the catch hooks.
7641 *
7642 * @param {Error} e
7643 */
7644
7645 }, {
7646 key: "runCatchHooks",
7647 value: function runCatchHooks(e) {
7648 $e.hooks.runDataCatch(this.command, this.args, e);
7649 $e.hooks.runUICatch(this.command, this.args, e);
7650 }
7651 /**
7652 * TODO - Remove - Backwards compatibility.
7653 *
7654 * Function requireContainer().
7655 *
7656 * Validate `arg.container` & `arg.containers`.
7657 *
7658 * @param {{}} args
7659 *
7660 * @throws {Error}
7661 */
7662
7663 }, {
7664 key: "requireContainer",
7665 value: function requireContainer() {
7666 var _this = this;
7667
7668 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.args;
7669
7670 _deprecation.default.deprecated('requireContainer', '3.7.0', 'Extend `$e.modules.editor.CommandContainerBase` or `$e.modules.editor.CommandContainerInternalBase`');
7671
7672 if (!args.container && !args.containers) {
7673 throw Error('container or containers are required.');
7674 }
7675
7676 if (args.container && args.containers) {
7677 throw Error('container and containers cannot go together please select one of them.');
7678 }
7679
7680 var containers = args.containers || [args.container];
7681 containers.forEach(function (container) {
7682 _this.requireArgumentInstance('container', elementorModules.editor.Container, {
7683 container: container
7684 });
7685 });
7686 }
7687 }], [{
7688 key: "getInstanceType",
7689 value: function getInstanceType() {
7690 return 'CommandBase';
7691 }
7692 }]);
7693 return CommandBase;
7694 }(_commandInfra.default);
7695
7696 exports["default"] = CommandBase;
7697
7698 /***/ }),
7699
7700 /***/ "../modules/web-cli/assets/js/modules/command-callback-base.js":
7701 /*!*********************************************************************!*\
7702 !*** ../modules/web-cli/assets/js/modules/command-callback-base.js ***!
7703 \*********************************************************************/
7704 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
7705
7706 "use strict";
7707
7708
7709 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
7710
7711 Object.defineProperty(exports, "__esModule", ({
7712 value: true
7713 }));
7714 exports["default"] = void 0;
7715
7716 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
7717
7718 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
7719
7720 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
7721
7722 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
7723
7724 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
7725
7726 var _commandBase = _interopRequireDefault(__webpack_require__(/*! ./command-base */ "../modules/web-cli/assets/js/modules/command-base.js"));
7727
7728 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); }; }
7729
7730 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; } }
7731
7732 /**
7733 * To support pure callbacks in the API(commands.js), to ensure they have registered with the proper context.
7734 */
7735 var CommandCallbackBase = /*#__PURE__*/function (_CommandBase) {
7736 (0, _inherits2.default)(CommandCallbackBase, _CommandBase);
7737
7738 var _super = _createSuper(CommandCallbackBase);
7739
7740 function CommandCallbackBase() {
7741 (0, _classCallCheck2.default)(this, CommandCallbackBase);
7742 return _super.apply(this, arguments);
7743 }
7744
7745 (0, _createClass2.default)(CommandCallbackBase, [{
7746 key: "apply",
7747 value: function apply() {
7748 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
7749 return this.constructor.getCallback()(args);
7750 }
7751 }], [{
7752 key: "getInstanceType",
7753 value: function getInstanceType() {
7754 return 'CommandCallbackBase';
7755 }
7756 /**
7757 * Get original callback of the command.
7758 *
7759 * Support pure callbacks ( Non command-base ).
7760 *
7761 * @return {()=>{}} Command Results.
7762 */
7763
7764 }, {
7765 key: "getCallback",
7766 value: function getCallback() {
7767 return this.registerConfig.callback;
7768 }
7769 }]);
7770 return CommandCallbackBase;
7771 }(_commandBase.default);
7772
7773 exports["default"] = CommandCallbackBase;
7774
7775 /***/ }),
7776
7777 /***/ "../modules/web-cli/assets/js/modules/command-data.js":
7778 /*!************************************************************!*\
7779 !*** ../modules/web-cli/assets/js/modules/command-data.js ***!
7780 \************************************************************/
7781 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
7782
7783 "use strict";
7784
7785
7786 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
7787
7788 var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js");
7789
7790 Object.defineProperty(exports, "__esModule", ({
7791 value: true
7792 }));
7793 exports["default"] = void 0;
7794
7795 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
7796
7797 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
7798
7799 var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js"));
7800
7801 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
7802
7803 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
7804
7805 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
7806
7807 var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
7808
7809 var _commandBase = _interopRequireDefault(__webpack_require__(/*! ./command-base */ "../modules/web-cli/assets/js/modules/command-base.js"));
7810
7811 var errors = _interopRequireWildcard(__webpack_require__(/*! ../core/data/errors/ */ "../modules/web-cli/assets/js/core/data/errors/index.js"));
7812
7813 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); }
7814
7815 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; }
7816
7817 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); }; }
7818
7819 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; } }
7820
7821 /**
7822 * @name $e.modules.CommandData
7823 */
7824
7825 /**
7826 * @typedef {('create'|'delete'|'get'|'update'|'options')} DataTypes
7827 */
7828
7829 /**
7830 * @typedef {{}} RequestData
7831 */
7832
7833 /**
7834 * @typedef {import('../core/data/errors/base-error')} BaseError
7835 */
7836 var CommandData = /*#__PURE__*/function (_CommandBase) {
7837 (0, _inherits2.default)(CommandData, _CommandBase);
7838
7839 var _super = _createSuper(CommandData);
7840
7841 function CommandData(args) {
7842 var _this$args$options;
7843
7844 var _this;
7845
7846 var commandsAPI = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : $e.data;
7847 (0, _classCallCheck2.default)(this, CommandData);
7848 _this = _super.call(this, args, commandsAPI);
7849 (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "data", void 0);
7850 (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "type", void 0);
7851
7852 if ((_this$args$options = _this.args.options) !== null && _this$args$options !== void 0 && _this$args$options.type) {
7853 _this.type = _this.args.options.type;
7854 }
7855
7856 return _this;
7857 }
7858 /**
7859 * Function getEndpointFormat().
7860 *
7861 * @return {null|string} endpoint format
7862 */
7863
7864
7865 (0, _createClass2.default)(CommandData, [{
7866 key: "getApplyMethods",
7867 value:
7868 /**
7869 * @param {DataTypes} type
7870 *
7871 * @return {boolean|{before: (function(*=): {}), after: (function({}, *=): {})}} apply methods
7872 */
7873 function getApplyMethods() {
7874 var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.type;
7875 var before, after;
7876
7877 switch (type) {
7878 case 'create':
7879 before = this.applyBeforeCreate;
7880 after = this.applyAfterCreate;
7881 break;
7882
7883 case 'delete':
7884 before = this.applyBeforeDelete;
7885 after = this.applyAfterDelete;
7886 break;
7887
7888 case 'get':
7889 before = this.applyBeforeGet;
7890 after = this.applyAfterGet;
7891 break;
7892
7893 case 'update':
7894 before = this.applyBeforeUpdate;
7895 after = this.applyAfterUpdate;
7896 break;
7897
7898 case 'options':
7899 before = this.applyBeforeOptions;
7900 after = this.applyAfterOptions;
7901 break;
7902
7903 default:
7904 return false;
7905 }
7906
7907 return {
7908 before: before.bind(this),
7909 after: after.bind(this)
7910 };
7911 }
7912 /**
7913 * Function getRequestData().
7914 *
7915 * @return {RequestData} request data
7916 */
7917
7918 }, {
7919 key: "getRequestData",
7920 value: function getRequestData() {
7921 return {
7922 type: this.type,
7923 args: this.args,
7924 timestamp: new Date().getTime(),
7925 component: this.component,
7926 command: this.command,
7927 endpoint: $e.data.commandToEndpoint(this.command, JSON.parse(JSON.stringify(this.args)), this.constructor.getEndpointFormat())
7928 };
7929 }
7930 }, {
7931 key: "apply",
7932 value: function apply() {
7933 var _this2 = this;
7934
7935 var applyMethods = this.getApplyMethods(); // Run 'before' method.
7936
7937 this.args = applyMethods.before(this.args);
7938 var requestData = this.getRequestData();
7939 return $e.data.fetch(requestData).then(function (data) {
7940 _this2.data = data; // Run 'after' method.
7941
7942 _this2.data = applyMethods.after(data, _this2.args);
7943 _this2.data = {
7944 data: _this2.data
7945 }; // Append requestData.
7946
7947 _this2.data = Object.assign({
7948 __requestData__: requestData
7949 }, _this2.data);
7950 return _this2.data;
7951 });
7952 }
7953 /**
7954 * @param {*} [args={}]
7955 * @return {{}} filtered args
7956 */
7957
7958 }, {
7959 key: "applyBeforeCreate",
7960 value: function applyBeforeCreate() {
7961 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
7962 return args;
7963 }
7964 /**
7965 * @param {{}} data
7966 * @param {*} [args={}]
7967 * @return {{}} filtered result
7968 */
7969
7970 }, {
7971 key: "applyAfterCreate",
7972 value: function applyAfterCreate(data) {
7973 var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
7974 // eslint-disable-line no-unused-vars
7975 return data;
7976 }
7977 /**
7978 * @param {*} [args={}]
7979 * @return {{}} filtered args
7980 */
7981
7982 }, {
7983 key: "applyBeforeDelete",
7984 value: function applyBeforeDelete() {
7985 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
7986 return args;
7987 }
7988 /**
7989 * @param {{}} data
7990 * @param {*} [args={}]
7991 * @return {{}} filtered result
7992 */
7993
7994 }, {
7995 key: "applyAfterDelete",
7996 value: function applyAfterDelete(data) {
7997 var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
7998 // eslint-disable-line no-unused-vars
7999 return data;
8000 }
8001 /**
8002 * @param {*} [args={}]
8003 * @return {{}} filtered args
8004 */
8005
8006 }, {
8007 key: "applyBeforeGet",
8008 value: function applyBeforeGet() {
8009 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
8010 return args;
8011 }
8012 /**
8013 * @param {{}} data
8014 * @param {*} [args={}]
8015 * @return {{}} filtered result
8016 */
8017
8018 }, {
8019 key: "applyAfterGet",
8020 value: function applyAfterGet(data) {
8021 var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
8022 // eslint-disable-line no-unused-vars
8023 return data;
8024 }
8025 /**
8026 * @param {*} [args={}]
8027 * @return {{}} filtered args
8028 */
8029
8030 }, {
8031 key: "applyBeforeUpdate",
8032 value: function applyBeforeUpdate() {
8033 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
8034 return args;
8035 }
8036 /**
8037 * @param {{}} data
8038 * @param {*} [args={}]
8039 * @return {{}} filtered result
8040 */
8041
8042 }, {
8043 key: "applyAfterUpdate",
8044 value: function applyAfterUpdate(data) {
8045 var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
8046 // eslint-disable-line no-unused-vars
8047 return data;
8048 }
8049 /**
8050 * @param {*} [args={}]
8051 * @return {{}} filtered args
8052 */
8053
8054 }, {
8055 key: "applyBeforeOptions",
8056 value: function applyBeforeOptions() {
8057 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
8058 return args;
8059 }
8060 /**
8061 * @param {{}} data
8062 * @param {*} [args={}]
8063 * @return {{}} filtered result
8064 */
8065
8066 }, {
8067 key: "applyAfterOptions",
8068 value: function applyAfterOptions(data) {
8069 var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
8070 // eslint-disable-line no-unused-vars
8071 return data;
8072 }
8073 /**
8074 * @param {BaseError} e
8075 */
8076
8077 }, {
8078 key: "applyAfterCatch",
8079 value: function applyAfterCatch(e) {
8080 e.notify();
8081 }
8082 }, {
8083 key: "onCatchApply",
8084 value: function onCatchApply(e) {
8085 var _e, _e$data;
8086
8087 // TODO: If the errors that returns from the server is consistent remove the '?' from 'e'
8088 var httpErrorCode = ((_e = e) === null || _e === void 0 ? void 0 : (_e$data = _e.data) === null || _e$data === void 0 ? void 0 : _e$data.status) || 501;
8089 var dataError = Object.values(errors).find(function (error) {
8090 return error.getHTTPErrorCode() === httpErrorCode;
8091 });
8092
8093 if (!dataError) {
8094 dataError = errors.DefaultError;
8095 }
8096
8097 e = dataError.create(e.message, e.code, e.data || []);
8098 this.runCatchHooks(e);
8099 this.applyAfterCatch(e);
8100 }
8101 }], [{
8102 key: "getInstanceType",
8103 value:
8104 /**
8105 * Data returned from remote.
8106 *
8107 * @type {*}
8108 */
8109
8110 /**
8111 * Fetch type.
8112 *
8113 * @type {DataTypes}
8114 */
8115 function getInstanceType() {
8116 return 'CommandData';
8117 }
8118 }, {
8119 key: "getEndpointFormat",
8120 value: function getEndpointFormat() {
8121 return null;
8122 }
8123 }]);
8124 return CommandData;
8125 }(_commandBase.default);
8126
8127 exports["default"] = CommandData;
8128
8129 /***/ }),
8130
8131 /***/ "../modules/web-cli/assets/js/modules/command-infra.js":
8132 /*!*************************************************************!*\
8133 !*** ../modules/web-cli/assets/js/modules/command-infra.js ***!
8134 \*************************************************************/
8135 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
8136
8137 "use strict";
8138
8139
8140 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
8141
8142 Object.defineProperty(exports, "__esModule", ({
8143 value: true
8144 }));
8145 exports["default"] = void 0;
8146
8147 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
8148
8149 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
8150
8151 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
8152
8153 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
8154
8155 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
8156
8157 var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
8158
8159 var _argsObject = _interopRequireDefault(__webpack_require__(/*! elementor-assets-js/modules/imports/args-object */ "../assets/dev/js/modules/imports/args-object.js"));
8160
8161 var _deprecation = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/deprecation */ "../modules/web-cli/assets/js/utils/deprecation.js"));
8162
8163 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); }; }
8164
8165 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; } }
8166
8167 /**
8168 * @typedef {import('../modules/component-base')} ComponentBase
8169 */
8170 var CommandInfra = /*#__PURE__*/function (_ArgsObject) {
8171 (0, _inherits2.default)(CommandInfra, _ArgsObject);
8172
8173 var _super = _createSuper(CommandInfra);
8174
8175 /**
8176 * Function constructor().
8177 *
8178 * Create Commands Base.
8179 *
8180 * @param {{}} args
8181 */
8182 function CommandInfra() {
8183 var _this;
8184
8185 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
8186 (0, _classCallCheck2.default)(this, CommandInfra);
8187 _this = _super.call(this, args);
8188
8189 if (!_this.constructor.registerConfig) {
8190 throw RangeError('Doing it wrong: Each command type should have `registerConfig`.');
8191 } // Acknowledge self about which command it run.
8192
8193
8194 _this.command = _this.constructor.getCommand(); // Assign instance of current component.
8195
8196 _this.component = _this.constructor.getComponent(); // Who ever need do something before without `super` the constructor can use `initialize` method.
8197
8198 _this.initialize(args); // Refresh args, maybe the changed via `initialize`.
8199
8200
8201 args = _this.args; // Validate args before run.
8202
8203 _this.validateArgs(args);
8204
8205 return _this;
8206 }
8207 /**
8208 * Function initialize().
8209 *
8210 * Initialize command, called after construction.
8211 *
8212 * @param {{}} args
8213 */
8214
8215
8216 (0, _createClass2.default)(CommandInfra, [{
8217 key: "currentCommand",
8218 get: // TODO - Remove backwards compatibility.
8219 function get() {
8220 _deprecation.default.deprecated('this.currentCommand', '3.7.0', 'this.command');
8221
8222 return this.command;
8223 }
8224 }, {
8225 key: "initialize",
8226 value: function initialize() {
8227 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
8228 } // eslint-disable-line no-unused-vars
8229
8230 /**
8231 * Function validateArgs().
8232 *
8233 * Validate command arguments.
8234 *
8235 * @param {{}} args
8236 */
8237
8238 }, {
8239 key: "validateArgs",
8240 value: function validateArgs() {
8241 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
8242 } // eslint-disable-line no-unused-vars
8243 // eslint-disable-next-line jsdoc/require-returns-check
8244
8245 /**
8246 * Function apply().
8247 *
8248 * Do the actual command.
8249 *
8250 * @param {{}} args
8251 *
8252 * @return {*} Command results.
8253 */
8254
8255 }, {
8256 key: "apply",
8257 value: function apply() {
8258 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
8259 // eslint-disable-line no-unused-vars
8260 elementorModules.ForceMethodImplementation();
8261 }
8262 /**
8263 * Function run().
8264 *
8265 * Run command with history & hooks.
8266 *
8267 * @return {*} Command results.
8268 */
8269
8270 }, {
8271 key: "run",
8272 value: function run() {
8273 return this.apply(this.args);
8274 }
8275 /**
8276 * Function onBeforeRun.
8277 *
8278 * Called before run().
8279 *
8280 * @param {{}} args
8281 */
8282
8283 }, {
8284 key: "onBeforeRun",
8285 value: function onBeforeRun() {
8286 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
8287 } // eslint-disable-line no-unused-vars
8288
8289 /**
8290 * Function onAfterRun.
8291 *
8292 * Called after run().
8293 *
8294 * @param {{}} args
8295 * @param {*} result
8296 */
8297
8298 }, {
8299 key: "onAfterRun",
8300 value: function onAfterRun() {
8301 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
8302 var result = arguments.length > 1 ? arguments[1] : undefined;
8303 } // eslint-disable-line no-unused-vars
8304
8305 /**
8306 * Function onBeforeApply.
8307 *
8308 * Called before apply().
8309 *
8310 * @param {{}} args
8311 */
8312
8313 }, {
8314 key: "onBeforeApply",
8315 value: function onBeforeApply() {
8316 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
8317 } // eslint-disable-line no-unused-vars
8318
8319 /**
8320 * Function onAfterApply.
8321 *
8322 * Called after apply().
8323 *
8324 * @param {{}} args
8325 * @param {*} result
8326 */
8327
8328 }, {
8329 key: "onAfterApply",
8330 value: function onAfterApply() {
8331 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
8332 var result = arguments.length > 1 ? arguments[1] : undefined;
8333 } // eslint-disable-line no-unused-vars
8334
8335 /**
8336 * Function onCatchApply.
8337 *
8338 * Called after apply() failed.
8339 *
8340 * @param {Error} e
8341 */
8342
8343 }, {
8344 key: "onCatchApply",
8345 value: function onCatchApply(e) {} // eslint-disable-line no-unused-vars
8346
8347 }], [{
8348 key: "getInstanceType",
8349 value:
8350 /**
8351 * @type {Object}
8352 */
8353 function getInstanceType() {
8354 return 'CommandInfra';
8355 }
8356 /**
8357 * Get info of command.
8358 *
8359 * @return {Object} Extra information about the command.
8360 */
8361
8362 }, {
8363 key: "getInfo",
8364 value: function getInfo() {
8365 return {};
8366 }
8367 /**
8368 * @return {string} Self command name.
8369 */
8370
8371 }, {
8372 key: "getCommand",
8373 value: function getCommand() {
8374 return this.registerConfig.command;
8375 }
8376 /**
8377 * @return {ComponentBase} Self component
8378 */
8379
8380 }, {
8381 key: "getComponent",
8382 value: function getComponent() {
8383 return this.registerConfig.component;
8384 }
8385 }, {
8386 key: "setRegisterConfig",
8387 value: function setRegisterConfig(config) {
8388 this.registerConfig = Object.freeze(config);
8389 }
8390 }]);
8391 return CommandInfra;
8392 }(_argsObject.default);
8393
8394 exports["default"] = CommandInfra;
8395 (0, _defineProperty2.default)(CommandInfra, "registerConfig", null);
8396
8397 /***/ }),
8398
8399 /***/ "../modules/web-cli/assets/js/modules/command-internal-base.js":
8400 /*!*********************************************************************!*\
8401 !*** ../modules/web-cli/assets/js/modules/command-internal-base.js ***!
8402 \*********************************************************************/
8403 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
8404
8405 "use strict";
8406
8407
8408 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
8409
8410 Object.defineProperty(exports, "__esModule", ({
8411 value: true
8412 }));
8413 exports["default"] = void 0;
8414
8415 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
8416
8417 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
8418
8419 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
8420
8421 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
8422
8423 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
8424
8425 var _commandBase = _interopRequireDefault(__webpack_require__(/*! ./command-base */ "../modules/web-cli/assets/js/modules/command-base.js"));
8426
8427 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); }; }
8428
8429 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; } }
8430
8431 /**
8432 * @name $e.modules.CommandInternalBase
8433 */
8434 var CommandInternalBase = /*#__PURE__*/function (_CommandBase) {
8435 (0, _inherits2.default)(CommandInternalBase, _CommandBase);
8436
8437 var _super = _createSuper(CommandInternalBase);
8438
8439 function CommandInternalBase(args) {
8440 var commandsAPI = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : $e.commandsInternal;
8441 (0, _classCallCheck2.default)(this, CommandInternalBase);
8442 return _super.call(this, args, commandsAPI);
8443 }
8444
8445 (0, _createClass2.default)(CommandInternalBase, null, [{
8446 key: "getInstanceType",
8447 value: function getInstanceType() {
8448 return 'CommandInternalBase';
8449 }
8450 }]);
8451 return CommandInternalBase;
8452 }(_commandBase.default);
8453
8454 exports["default"] = CommandInternalBase;
8455
8456 /***/ }),
8457
8458 /***/ "../modules/web-cli/assets/js/modules/commands/close.js":
8459 /*!**************************************************************!*\
8460 !*** ../modules/web-cli/assets/js/modules/commands/close.js ***!
8461 \**************************************************************/
8462 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
8463
8464 "use strict";
8465
8466
8467 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
8468
8469 Object.defineProperty(exports, "__esModule", ({
8470 value: true
8471 }));
8472 exports["default"] = exports.Close = void 0;
8473
8474 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
8475
8476 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
8477
8478 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
8479
8480 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
8481
8482 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
8483
8484 var _commandBase = _interopRequireDefault(__webpack_require__(/*! elementor-api/modules/command-base */ "../modules/web-cli/assets/js/modules/command-base.js"));
8485
8486 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); }; }
8487
8488 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; } }
8489
8490 var Close = /*#__PURE__*/function (_CommandBase) {
8491 (0, _inherits2.default)(Close, _CommandBase);
8492
8493 var _super = _createSuper(Close);
8494
8495 function Close() {
8496 (0, _classCallCheck2.default)(this, Close);
8497 return _super.apply(this, arguments);
8498 }
8499
8500 (0, _createClass2.default)(Close, [{
8501 key: "apply",
8502 value: function apply() {
8503 this.component.close();
8504 }
8505 }]);
8506 return Close;
8507 }(_commandBase.default);
8508
8509 exports.Close = Close;
8510 var _default = Close;
8511 exports["default"] = _default;
8512
8513 /***/ }),
8514
8515 /***/ "../modules/web-cli/assets/js/modules/commands/index.js":
8516 /*!**************************************************************!*\
8517 !*** ../modules/web-cli/assets/js/modules/commands/index.js ***!
8518 \**************************************************************/
8519 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
8520
8521 "use strict";
8522
8523
8524 Object.defineProperty(exports, "__esModule", ({
8525 value: true
8526 }));
8527 Object.defineProperty(exports, "Close", ({
8528 enumerable: true,
8529 get: function get() {
8530 return _close.Close;
8531 }
8532 }));
8533 Object.defineProperty(exports, "Open", ({
8534 enumerable: true,
8535 get: function get() {
8536 return _open.Open;
8537 }
8538 }));
8539 Object.defineProperty(exports, "Toggle", ({
8540 enumerable: true,
8541 get: function get() {
8542 return _toggle.Toggle;
8543 }
8544 }));
8545
8546 var _close = __webpack_require__(/*! ./close */ "../modules/web-cli/assets/js/modules/commands/close.js");
8547
8548 var _open = __webpack_require__(/*! ./open */ "../modules/web-cli/assets/js/modules/commands/open.js");
8549
8550 var _toggle = __webpack_require__(/*! ./toggle */ "../modules/web-cli/assets/js/modules/commands/toggle.js");
8551
8552 /***/ }),
8553
8554 /***/ "../modules/web-cli/assets/js/modules/commands/open.js":
8555 /*!*************************************************************!*\
8556 !*** ../modules/web-cli/assets/js/modules/commands/open.js ***!
8557 \*************************************************************/
8558 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
8559
8560 "use strict";
8561
8562
8563 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
8564
8565 Object.defineProperty(exports, "__esModule", ({
8566 value: true
8567 }));
8568 exports["default"] = exports.Open = void 0;
8569
8570 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
8571
8572 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
8573
8574 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
8575
8576 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
8577
8578 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
8579
8580 var _commandBase = _interopRequireDefault(__webpack_require__(/*! elementor-api/modules/command-base */ "../modules/web-cli/assets/js/modules/command-base.js"));
8581
8582 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); }; }
8583
8584 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; } }
8585
8586 var Open = /*#__PURE__*/function (_CommandBase) {
8587 (0, _inherits2.default)(Open, _CommandBase);
8588
8589 var _super = _createSuper(Open);
8590
8591 function Open() {
8592 (0, _classCallCheck2.default)(this, Open);
8593 return _super.apply(this, arguments);
8594 }
8595
8596 (0, _createClass2.default)(Open, [{
8597 key: "apply",
8598 value: function apply() {
8599 $e.route(this.component.getNamespace());
8600 }
8601 }]);
8602 return Open;
8603 }(_commandBase.default);
8604
8605 exports.Open = Open;
8606 var _default = Open;
8607 exports["default"] = _default;
8608
8609 /***/ }),
8610
8611 /***/ "../modules/web-cli/assets/js/modules/commands/toggle.js":
8612 /*!***************************************************************!*\
8613 !*** ../modules/web-cli/assets/js/modules/commands/toggle.js ***!
8614 \***************************************************************/
8615 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
8616
8617 "use strict";
8618
8619
8620 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
8621
8622 Object.defineProperty(exports, "__esModule", ({
8623 value: true
8624 }));
8625 exports["default"] = exports.Toggle = void 0;
8626
8627 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
8628
8629 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
8630
8631 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
8632
8633 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
8634
8635 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
8636
8637 var _commandBase = _interopRequireDefault(__webpack_require__(/*! elementor-api/modules/command-base */ "../modules/web-cli/assets/js/modules/command-base.js"));
8638
8639 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); }; }
8640
8641 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; } }
8642
8643 var Toggle = /*#__PURE__*/function (_CommandBase) {
8644 (0, _inherits2.default)(Toggle, _CommandBase);
8645
8646 var _super = _createSuper(Toggle);
8647
8648 function Toggle() {
8649 (0, _classCallCheck2.default)(this, Toggle);
8650 return _super.apply(this, arguments);
8651 }
8652
8653 (0, _createClass2.default)(Toggle, [{
8654 key: "apply",
8655 value: function apply() {
8656 if (this.component.isOpen) {
8657 this.component.close();
8658 } else {
8659 $e.route(this.component.getNamespace());
8660 }
8661 }
8662 }]);
8663 return Toggle;
8664 }(_commandBase.default);
8665
8666 exports.Toggle = Toggle;
8667 var _default = Toggle;
8668 exports["default"] = _default;
8669
8670 /***/ }),
8671
8672 /***/ "../modules/web-cli/assets/js/modules/component-base.js":
8673 /*!**************************************************************!*\
8674 !*** ../modules/web-cli/assets/js/modules/component-base.js ***!
8675 \**************************************************************/
8676 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
8677
8678 "use strict";
8679
8680
8681 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
8682
8683 Object.defineProperty(exports, "__esModule", ({
8684 value: true
8685 }));
8686 exports["default"] = void 0;
8687
8688 var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
8689
8690 var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js"));
8691
8692 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
8693
8694 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
8695
8696 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
8697
8698 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
8699
8700 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
8701
8702 var _commandCallbackBase = _interopRequireDefault(__webpack_require__(/*! elementor-api/modules/command-callback-base */ "../modules/web-cli/assets/js/modules/command-callback-base.js"));
8703
8704 var _toolkit = __webpack_require__(/*! @reduxjs/toolkit */ "../node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js");
8705
8706 var _module = _interopRequireDefault(__webpack_require__(/*! elementor/assets/dev/js/modules/imports/module.js */ "../assets/dev/js/modules/imports/module.js"));
8707
8708 var _forceMethodImplementation = _interopRequireDefault(__webpack_require__(/*! ../utils/force-method-implementation */ "../modules/web-cli/assets/js/utils/force-method-implementation.js"));
8709
8710 var _deprecation = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/deprecation */ "../modules/web-cli/assets/js/utils/deprecation.js"));
8711
8712 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; }
8713
8714 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; }
8715
8716 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); }; }
8717
8718 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; } }
8719
8720 /**
8721 * @typedef {import('./command-infra')} CommandInfra
8722 * @typedef {import('./hook-base')} HookBase
8723 * @typedef {import('../core/states/ui-state-base')} UiStateBase
8724 */
8725 var ComponentBase = /*#__PURE__*/function (_Module) {
8726 (0, _inherits2.default)(ComponentBase, _Module);
8727
8728 var _super = _createSuper(ComponentBase);
8729
8730 function ComponentBase() {
8731 (0, _classCallCheck2.default)(this, ComponentBase);
8732 return _super.apply(this, arguments);
8733 }
8734
8735 (0, _createClass2.default)(ComponentBase, [{
8736 key: "__construct",
8737 value: function __construct() {
8738 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
8739
8740 if (args.manager) {
8741 this.manager = args.manager;
8742 }
8743
8744 this.commands = this.defaultCommands();
8745 this.commandsInternal = this.defaultCommandsInternal();
8746 this.hooks = this.defaultHooks();
8747 this.routes = this.defaultRoutes();
8748 this.tabs = this.defaultTabs();
8749 this.shortcuts = this.defaultShortcuts();
8750 this.utils = this.defaultUtils();
8751 this.data = this.defaultData();
8752 this.uiStates = this.defaultUiStates();
8753 this.states = this.defaultStates();
8754 this.defaultRoute = '';
8755 this.currentTab = '';
8756 }
8757 }, {
8758 key: "registerAPI",
8759 value: function registerAPI() {
8760 var _this = this;
8761
8762 Object.entries(this.getTabs()).forEach(function (tab) {
8763 return _this.registerTabRoute(tab[0]);
8764 });
8765 Object.entries(this.getRoutes()).forEach(function (_ref) {
8766 var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
8767 route = _ref2[0],
8768 callback = _ref2[1];
8769
8770 return _this.registerRoute(route, callback);
8771 });
8772 Object.entries(this.getCommands()).forEach(function (_ref3) {
8773 var _ref4 = (0, _slicedToArray2.default)(_ref3, 2),
8774 command = _ref4[0],
8775 callback = _ref4[1];
8776
8777 return _this.registerCommand(command, callback);
8778 });
8779 Object.entries(this.getCommandsInternal()).forEach(function (_ref5) {
8780 var _ref6 = (0, _slicedToArray2.default)(_ref5, 2),
8781 command = _ref6[0],
8782 callback = _ref6[1];
8783
8784 return _this.registerCommandInternal(command, callback);
8785 });
8786 Object.values(this.getHooks()).forEach(function (instance) {
8787 return _this.registerHook(instance);
8788 });
8789 Object.entries(this.getData()).forEach(function (_ref7) {
8790 var _ref8 = (0, _slicedToArray2.default)(_ref7, 2),
8791 command = _ref8[0],
8792 callback = _ref8[1];
8793
8794 return _this.registerData(command, callback);
8795 });
8796 Object.values(this.getUiStates()).forEach(function (instance) {
8797 return _this.registerUiState(instance);
8798 });
8799 Object.entries(this.getStates()).forEach(function (_ref9) {
8800 var _ref10 = (0, _slicedToArray2.default)(_ref9, 2),
8801 id = _ref10[0],
8802 state = _ref10[1];
8803
8804 return _this.registerState(id, state);
8805 });
8806 } // eslint-disable-next-line jsdoc/require-returns-check
8807
8808 /**
8809 * @return {string} namespace
8810 */
8811
8812 }, {
8813 key: "getNamespace",
8814 value: function getNamespace() {
8815 (0, _forceMethodImplementation.default)();
8816 }
8817 }, {
8818 key: "getRootContainer",
8819 value: function getRootContainer() {
8820 _deprecation.default.deprecated('getRootContainer()', '3.7.0', 'getServiceName()');
8821
8822 return this.getServiceName();
8823 }
8824 }, {
8825 key: "getServiceName",
8826 value: function getServiceName() {
8827 return this.getNamespace().split('/')[0];
8828 }
8829 }, {
8830 key: "store",
8831 get: function get() {
8832 return $e.store.get(this.getNamespace());
8833 }
8834 }, {
8835 key: "defaultTabs",
8836 value: function defaultTabs() {
8837 return {};
8838 }
8839 }, {
8840 key: "defaultRoutes",
8841 value: function defaultRoutes() {
8842 return {};
8843 }
8844 }, {
8845 key: "defaultCommands",
8846 value: function defaultCommands() {
8847 return {};
8848 }
8849 }, {
8850 key: "defaultCommandsInternal",
8851 value: function defaultCommandsInternal() {
8852 return {};
8853 }
8854 }, {
8855 key: "defaultHooks",
8856 value: function defaultHooks() {
8857 return {};
8858 }
8859 /**
8860 * Get the component's default UI states.
8861 *
8862 * @return {Object} default UI states
8863 */
8864
8865 }, {
8866 key: "defaultUiStates",
8867 value: function defaultUiStates() {
8868 return {};
8869 }
8870 /**
8871 * Get the component's Redux slice settings.
8872 *
8873 * @return {Object} Redux slice settings
8874 */
8875
8876 }, {
8877 key: "defaultStates",
8878 value: function defaultStates() {
8879 return {};
8880 }
8881 }, {
8882 key: "defaultShortcuts",
8883 value: function defaultShortcuts() {
8884 return {};
8885 }
8886 }, {
8887 key: "defaultUtils",
8888 value: function defaultUtils() {
8889 return {};
8890 }
8891 }, {
8892 key: "defaultData",
8893 value: function defaultData() {
8894 return {};
8895 }
8896 }, {
8897 key: "getCommands",
8898 value: function getCommands() {
8899 return this.commands;
8900 }
8901 }, {
8902 key: "getCommandsInternal",
8903 value: function getCommandsInternal() {
8904 return this.commandsInternal;
8905 }
8906 }, {
8907 key: "getHooks",
8908 value: function getHooks() {
8909 return this.hooks;
8910 }
8911 /**
8912 * Retrieve the component's UI states.
8913 *
8914 * @return {Object} UI states
8915 */
8916
8917 }, {
8918 key: "getUiStates",
8919 value: function getUiStates() {
8920 return this.uiStates;
8921 }
8922 /**
8923 * Retrieve the component's Redux Slice.
8924 *
8925 * @return {Object} Redux Slice
8926 */
8927
8928 }, {
8929 key: "getStates",
8930 value: function getStates() {
8931 return this.states;
8932 }
8933 }, {
8934 key: "getRoutes",
8935 value: function getRoutes() {
8936 return this.routes;
8937 }
8938 }, {
8939 key: "getTabs",
8940 value: function getTabs() {
8941 return this.tabs;
8942 }
8943 }, {
8944 key: "getShortcuts",
8945 value: function getShortcuts() {
8946 return this.shortcuts;
8947 }
8948 }, {
8949 key: "getData",
8950 value: function getData() {
8951 return this.data;
8952 }
8953 /**
8954 * @param {string} command
8955 * @param {(()=>{}|CommandInfra)} context
8956 * @param {'default'|'internal'|'data'} commandsType
8957 */
8958
8959 }, {
8960 key: "registerCommand",
8961 value: function registerCommand(command, context) {
8962 var commandsType = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'default';
8963 var commandsManager;
8964
8965 switch (commandsType) {
8966 case 'default':
8967 commandsManager = $e.commands;
8968 break;
8969
8970 case 'internal':
8971 commandsManager = $e.commandsInternal;
8972 break;
8973
8974 case 'data':
8975 commandsManager = $e.data;
8976 break;
8977
8978 default:
8979 throw new Error("Invalid commands type: '".concat(command, "'"));
8980 }
8981
8982 var fullCommand = this.getNamespace() + '/' + command,
8983 instanceType = context.getInstanceType ? context.getInstanceType() : false,
8984 registerConfig = {
8985 command: fullCommand,
8986 component: this
8987 }; // Support pure callback.
8988
8989 if (!instanceType) {
8990 if ($e.devTools) {
8991 $e.devTools.log.warn("Attach command-callback-base, on command: '".concat(fullCommand, "', context is unknown type."));
8992 }
8993
8994 registerConfig.callback = context; // Unique class.
8995
8996 context = /*#__PURE__*/function (_CommandCallbackBase) {
8997 (0, _inherits2.default)(context, _CommandCallbackBase);
8998
8999 var _super2 = _createSuper(context);
9000
9001 function context() {
9002 (0, _classCallCheck2.default)(this, context);
9003 return _super2.apply(this, arguments);
9004 }
9005
9006 return (0, _createClass2.default)(context);
9007 }(_commandCallbackBase.default);
9008 }
9009
9010 context.setRegisterConfig(registerConfig);
9011 commandsManager.register(this, command, context);
9012 }
9013 /**
9014 * @param {HookBase} instance
9015 */
9016
9017 }, {
9018 key: "registerHook",
9019 value: function registerHook(instance) {
9020 return instance.register();
9021 }
9022 }, {
9023 key: "registerCommandInternal",
9024 value: function registerCommandInternal(command, context) {
9025 this.registerCommand(command, context, 'internal');
9026 }
9027 /**
9028 * Register a UI state.
9029 *
9030 * @param {UiStateBase} instance - UI state instance.
9031 *
9032 * @return {void}
9033 */
9034
9035 }, {
9036 key: "registerUiState",
9037 value: function registerUiState(instance) {
9038 $e.uiStates.register(instance);
9039 }
9040 /**
9041 * Register a Redux Slice.
9042 *
9043 * @param {string} id - State id.
9044 * @param {Object} stateConfig - The state config.
9045 *
9046 * @return {void}
9047 */
9048
9049 }, {
9050 key: "registerState",
9051 value: function registerState(id, stateConfig) {
9052 id = this.getNamespace() + (id ? "/".concat(id) : '');
9053 var slice = (0, _toolkit.createSlice)(_objectSpread(_objectSpread({}, stateConfig), {}, {
9054 name: id
9055 }));
9056 $e.store.register(id, slice);
9057 }
9058 }, {
9059 key: "registerRoute",
9060 value: function registerRoute(route, callback) {
9061 $e.routes.register(this, route, callback);
9062 }
9063 }, {
9064 key: "registerData",
9065 value: function registerData(command, context) {
9066 this.registerCommand(command, context, 'data');
9067 }
9068 }, {
9069 key: "unregisterRoute",
9070 value: function unregisterRoute(route) {
9071 $e.routes.unregister(this, route);
9072 }
9073 }, {
9074 key: "registerTabRoute",
9075 value: function registerTabRoute(tab) {
9076 var _this2 = this;
9077
9078 this.registerRoute(tab, function (args) {
9079 return _this2.activateTab(tab, args);
9080 });
9081 }
9082 }, {
9083 key: "dependency",
9084 value: function dependency() {
9085 return true;
9086 }
9087 }, {
9088 key: "open",
9089 value: function open() {
9090 return true;
9091 }
9092 }, {
9093 key: "close",
9094 value: function close() {
9095 if (!this.isOpen) {
9096 return false;
9097 }
9098
9099 this.isOpen = false;
9100 this.inactivate();
9101 $e.routes.clearCurrent(this.getNamespace());
9102 $e.routes.clearHistory(this.getServiceName());
9103 return true;
9104 }
9105 }, {
9106 key: "activate",
9107 value: function activate() {
9108 $e.components.activate(this.getNamespace());
9109 }
9110 }, {
9111 key: "inactivate",
9112 value: function inactivate() {
9113 $e.components.inactivate(this.getNamespace());
9114 }
9115 }, {
9116 key: "isActive",
9117 value: function isActive() {
9118 return $e.components.isActive(this.getNamespace());
9119 }
9120 }, {
9121 key: "onRoute",
9122 value: function onRoute(route) {
9123 this.toggleRouteClass(route, true);
9124 this.toggleHistoryClass();
9125 this.activate();
9126 this.trigger('route/open', route);
9127 }
9128 }, {
9129 key: "onCloseRoute",
9130 value: function onCloseRoute(route) {
9131 this.toggleRouteClass(route, false);
9132 this.inactivate();
9133 this.trigger('route/close', route);
9134 }
9135 }, {
9136 key: "setDefaultRoute",
9137 value: function setDefaultRoute(route) {
9138 this.defaultRoute = this.getNamespace() + '/' + route;
9139 }
9140 }, {
9141 key: "getDefaultRoute",
9142 value: function getDefaultRoute() {
9143 return this.defaultRoute;
9144 }
9145 }, {
9146 key: "removeTab",
9147 value: function removeTab(tab) {
9148 delete this.tabs[tab];
9149 this.unregisterRoute(tab);
9150 }
9151 }, {
9152 key: "hasTab",
9153 value: function hasTab(tab) {
9154 return !!this.tabs[tab];
9155 }
9156 }, {
9157 key: "addTab",
9158 value: function addTab(tab, args, position) {
9159 var _this3 = this;
9160
9161 this.tabs[tab] = args; // It can be 0.
9162
9163 if ('undefined' !== typeof position) {
9164 var newTabs = {};
9165 var ids = Object.keys(this.tabs); // Remove new tab
9166
9167 ids.pop(); // Add it to position.
9168
9169 ids.splice(position, 0, tab);
9170 ids.forEach(function (id) {
9171 newTabs[id] = _this3.tabs[id];
9172 });
9173 this.tabs = newTabs;
9174 }
9175
9176 this.registerTabRoute(tab);
9177 }
9178 }, {
9179 key: "getTabsWrapperSelector",
9180 value: function getTabsWrapperSelector() {
9181 return '';
9182 }
9183 }, {
9184 key: "getTabRoute",
9185 value: function getTabRoute(tab) {
9186 return this.getNamespace() + '/' + tab;
9187 }
9188 }, {
9189 key: "renderTab",
9190 value: function renderTab(tab) {} // eslint-disable-line
9191
9192 }, {
9193 key: "activateTab",
9194 value: function activateTab(tab, args) {
9195 var _this4 = this;
9196
9197 this.currentTab = tab;
9198 this.renderTab(tab, args);
9199 jQuery(this.getTabsWrapperSelector() + ' .elementor-component-tab').off('click').on('click', function (event) {
9200 $e.route(_this4.getTabRoute(event.currentTarget.dataset.tab), args);
9201 }).removeClass('elementor-active').filter('[data-tab="' + tab + '"]').addClass('elementor-active');
9202 }
9203 }, {
9204 key: "getActiveTabConfig",
9205 value: function getActiveTabConfig() {
9206 return this.tabs[this.currentTab] || {};
9207 }
9208 }, {
9209 key: "getBodyClass",
9210 value: function getBodyClass(route) {
9211 return 'e-route-' + route.replace(/\//g, '-');
9212 }
9213 /**
9214 * If command includes uppercase character convert it to lowercase and add `-`.
9215 * e.g: `CopyAll` is converted to `copy-all`.
9216 *
9217 * @param {string} commandName
9218 */
9219
9220 }, {
9221 key: "normalizeCommandName",
9222 value: function normalizeCommandName(commandName) {
9223 return commandName.replace(/[A-Z]/g, function (match, offset) {
9224 return (offset > 0 ? '-' : '') + match.toLowerCase();
9225 });
9226 }
9227 /**
9228 * @param {{}} commandsFromImport
9229 * @return {{}} imported commands
9230 */
9231
9232 }, {
9233 key: "importCommands",
9234 value: function importCommands(commandsFromImport) {
9235 var _this5 = this;
9236
9237 var commands = {}; // Convert `Commands` to `ComponentBase` workable format.
9238
9239 Object.entries(commandsFromImport).forEach(function (_ref11) {
9240 var _ref12 = (0, _slicedToArray2.default)(_ref11, 2),
9241 className = _ref12[0],
9242 Class = _ref12[1];
9243
9244 var command = _this5.normalizeCommandName(className);
9245
9246 commands[command] = Class;
9247 });
9248 return commands;
9249 }
9250 }, {
9251 key: "importHooks",
9252 value: function importHooks(hooksFromImport) {
9253 var hooks = {};
9254
9255 for (var key in hooksFromImport) {
9256 var hook = new hooksFromImport[key]();
9257 hooks[hook.getId()] = hook;
9258 }
9259
9260 return hooks;
9261 }
9262 /**
9263 * Import & initialize the component's UI states.
9264 * Should be used inside `defaultUiState()`.
9265 *
9266 * @param {Object} statesFromImport - UI states from import.
9267 *
9268 * @return {Object} UI States
9269 */
9270
9271 }, {
9272 key: "importUiStates",
9273 value: function importUiStates(statesFromImport) {
9274 var _this6 = this;
9275
9276 var uiStates = {};
9277 Object.values(statesFromImport).forEach(function (className) {
9278 var uiState = new className(_this6);
9279 uiStates[uiState.getId()] = uiState;
9280 });
9281 return uiStates;
9282 }
9283 /**
9284 * Set a UI state value.
9285 * TODO: Should we provide such function? Maybe the developer should implicitly pass the full state ID?
9286 *
9287 * @param {string} state - Non-prefixed state ID.
9288 * @param {*} value - New state value.
9289 *
9290 * @return {void}
9291 */
9292
9293 }, {
9294 key: "setUiState",
9295 value: function setUiState(state, value) {
9296 $e.uiStates.set("".concat(this.getNamespace(), "/").concat(state), value);
9297 }
9298 }, {
9299 key: "toggleRouteClass",
9300 value: function toggleRouteClass(route, state) {
9301 document.body.classList.toggle(this.getBodyClass(route), state);
9302 }
9303 }, {
9304 key: "toggleHistoryClass",
9305 value: function toggleHistoryClass() {
9306 document.body.classList.toggle('e-routes-has-history', !!$e.routes.getHistory(this.getServiceName()).length);
9307 }
9308 }]);
9309 return ComponentBase;
9310 }(_module.default);
9311
9312 exports["default"] = ComponentBase;
9313
9314 /***/ }),
9315
9316 /***/ "../modules/web-cli/assets/js/modules/component-modal-base.js":
9317 /*!********************************************************************!*\
9318 !*** ../modules/web-cli/assets/js/modules/component-modal-base.js ***!
9319 \********************************************************************/
9320 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9321
9322 "use strict";
9323
9324
9325 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
9326
9327 var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js");
9328
9329 Object.defineProperty(exports, "__esModule", ({
9330 value: true
9331 }));
9332 exports["default"] = void 0;
9333
9334 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
9335
9336 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
9337
9338 var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js"));
9339
9340 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
9341
9342 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
9343
9344 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
9345
9346 var _componentBase = _interopRequireDefault(__webpack_require__(/*! ./component-base */ "../modules/web-cli/assets/js/modules/component-base.js"));
9347
9348 var commands = _interopRequireWildcard(__webpack_require__(/*! ./commands/ */ "../modules/web-cli/assets/js/modules/commands/index.js"));
9349
9350 var _forceMethodImplementation = _interopRequireDefault(__webpack_require__(/*! ../utils/force-method-implementation */ "../modules/web-cli/assets/js/utils/force-method-implementation.js"));
9351
9352 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); }
9353
9354 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; }
9355
9356 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); }; }
9357
9358 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; } }
9359
9360 var ComponentModalBase = /*#__PURE__*/function (_ComponentBase) {
9361 (0, _inherits2.default)(ComponentModalBase, _ComponentBase);
9362
9363 var _super = _createSuper(ComponentModalBase);
9364
9365 function ComponentModalBase() {
9366 (0, _classCallCheck2.default)(this, ComponentModalBase);
9367 return _super.apply(this, arguments);
9368 }
9369
9370 (0, _createClass2.default)(ComponentModalBase, [{
9371 key: "registerAPI",
9372 value: function registerAPI() {
9373 var _this = this;
9374
9375 (0, _get2.default)((0, _getPrototypeOf2.default)(ComponentModalBase.prototype), "registerAPI", this).call(this);
9376 $e.shortcuts.register('esc', {
9377 scopes: [this.getNamespace()],
9378 callback: function callback() {
9379 return _this.close();
9380 }
9381 });
9382 }
9383 }, {
9384 key: "defaultCommands",
9385 value: function defaultCommands() {
9386 return this.importCommands(commands);
9387 }
9388 }, {
9389 key: "defaultRoutes",
9390 value: function defaultRoutes() {
9391 return {
9392 '': function _() {
9393 /* Nothing to do, it's already rendered. */
9394 }
9395 };
9396 }
9397 }, {
9398 key: "open",
9399 value: function open() {
9400 var _this2 = this;
9401
9402 if (!this.layout) {
9403 var layout = this.getModalLayout();
9404 this.layout = new layout({
9405 component: this
9406 });
9407 this.layout.getModal().on('hide', function () {
9408 return _this2.close();
9409 });
9410 }
9411
9412 this.layout.showModal();
9413 return true;
9414 }
9415 }, {
9416 key: "close",
9417 value: function close() {
9418 if (!(0, _get2.default)((0, _getPrototypeOf2.default)(ComponentModalBase.prototype), "close", this).call(this)) {
9419 return false;
9420 }
9421
9422 this.layout.getModal().hide();
9423 return true;
9424 }
9425 }, {
9426 key: "getModalLayout",
9427 value: function getModalLayout() {
9428 (0, _forceMethodImplementation.default)();
9429 }
9430 }]);
9431 return ComponentModalBase;
9432 }(_componentBase.default);
9433
9434 exports["default"] = ComponentModalBase;
9435
9436 /***/ }),
9437
9438 /***/ "../modules/web-cli/assets/js/modules/hook-base.js":
9439 /*!*********************************************************!*\
9440 !*** ../modules/web-cli/assets/js/modules/hook-base.js ***!
9441 \*********************************************************/
9442 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9443
9444 "use strict";
9445
9446
9447 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
9448
9449 Object.defineProperty(exports, "__esModule", ({
9450 value: true
9451 }));
9452 exports["default"] = void 0;
9453
9454 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
9455
9456 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
9457
9458 var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
9459
9460 var _forceMethodImplementation = _interopRequireDefault(__webpack_require__(/*! ../utils/force-method-implementation */ "../modules/web-cli/assets/js/utils/force-method-implementation.js"));
9461
9462 var HookBase = /*#__PURE__*/function () {
9463 /**
9464 * Callback type, eg ( hook, event ).
9465 *
9466 * @type {string}
9467 */
9468
9469 /**
9470 * Full command address, that will hook the callback.
9471 *
9472 * @type {string}
9473 */
9474
9475 /**
9476 * Unique id of the callback.
9477 *
9478 * @type {string}
9479 */
9480
9481 /**
9482 * Function constructor().
9483 *
9484 * Create callback base.
9485 */
9486 function HookBase() {
9487 (0, _classCallCheck2.default)(this, HookBase);
9488 (0, _defineProperty2.default)(this, "type", void 0);
9489 (0, _defineProperty2.default)(this, "command", void 0);
9490 (0, _defineProperty2.default)(this, "id", void 0);
9491 this.initialize();
9492 this.type = this.getType();
9493 this.command = this.getCommand();
9494 this.id = this.getId();
9495 }
9496 /**
9497 * Function initialize().
9498 *
9499 * Called after creation of the base, used for initialize extras.
9500 * Without expending constructor.
9501 */
9502
9503
9504 (0, _createClass2.default)(HookBase, [{
9505 key: "initialize",
9506 value: function initialize() {}
9507 /**
9508 * Function register().
9509 *
9510 * Used to register the callback.
9511 *
9512 * @throws {Error}
9513 */
9514
9515 }, {
9516 key: "register",
9517 value: function register() {
9518 (0, _forceMethodImplementation.default)();
9519 } // eslint-disable-next-line jsdoc/require-returns-check
9520
9521 /**
9522 * Function getType().
9523 *
9524 * Get type eg: ( hook, event, etc ... ).
9525 *
9526 * @return {string} type
9527 *
9528 * @throws {Error}
9529 */
9530
9531 }, {
9532 key: "getType",
9533 value: function getType() {
9534 (0, _forceMethodImplementation.default)();
9535 } // eslint-disable-next-line jsdoc/require-returns-check
9536
9537 /**
9538 * Function getCommand().
9539 *
9540 * Returns the full command path for callback binding.
9541 *
9542 * Supports array of strings ( commands ).
9543 *
9544 * @return {string} command
9545 *
9546 * @throws {Error}
9547 */
9548
9549 }, {
9550 key: "getCommand",
9551 value: function getCommand() {
9552 (0, _forceMethodImplementation.default)();
9553 } // eslint-disable-next-line jsdoc/require-returns-check
9554
9555 /**
9556 * Function getId().
9557 *
9558 * Returns command id for the hook (should be unique).
9559 *
9560 * @return {string} id
9561 *
9562 * @throws {Error}
9563 */
9564
9565 }, {
9566 key: "getId",
9567 value: function getId() {
9568 (0, _forceMethodImplementation.default)();
9569 } // eslint-disable-next-line jsdoc/require-returns-check
9570
9571 /**
9572 * Function getContainerType().
9573 *
9574 * Bind eContainer type to callback.
9575 *
9576 * Used to gain performance.
9577 *
9578 * @return {string} type
9579 */
9580
9581 }, {
9582 key: "getContainerType",
9583 value: function getContainerType() {}
9584 /**
9585 * Function getConditions().
9586 *
9587 * Condition for running the callback, if true, call to apply().
9588 *
9589 * @param {*} [args={}]
9590 * @param {*} [result=*]
9591 *
9592 * @return {boolean} conditions
9593 */
9594
9595 }, {
9596 key: "getConditions",
9597 value: function getConditions() {
9598 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
9599 var result = arguments.length > 1 ? arguments[1] : undefined;
9600 // eslint-disable-line no-unused-vars
9601 return true;
9602 } // eslint-disable-next-line jsdoc/require-returns-check
9603
9604 /**
9605 * Function apply().
9606 *
9607 * Apply the callback, ( The actual affect of the callback ).
9608 *
9609 * @param {*} [args={}]
9610 *
9611 * @return {*} results
9612 */
9613
9614 }, {
9615 key: "apply",
9616 value: function apply(args) {
9617 // eslint-disable-line no-unused-vars
9618 (0, _forceMethodImplementation.default)();
9619 }
9620 /**
9621 * Function run().
9622 *
9623 * Run the callback.
9624 *
9625 * @param {*} args
9626 *
9627 * @return {*} results
9628 */
9629
9630 }, {
9631 key: "run",
9632 value: function run() {
9633 var _ref = arguments.length <= 0 ? undefined : arguments[0],
9634 _ref$options = _ref.options,
9635 options = _ref$options === void 0 ? {} : _ref$options; // Disable callback if requested by args.options.
9636
9637
9638 if (options.callbacks && false === options.callbacks[this.id]) {
9639 return true;
9640 }
9641
9642 if (this.getConditions.apply(this, arguments)) {
9643 if ($e.devTools) {
9644 $e.devTools.log.callbacks().active(this.type, this.command, this.id);
9645 }
9646
9647 return this.apply.apply(this, arguments);
9648 }
9649
9650 return true;
9651 }
9652 }]);
9653 return HookBase;
9654 }();
9655
9656 exports["default"] = HookBase;
9657
9658 /***/ }),
9659
9660 /***/ "../modules/web-cli/assets/js/modules/hook-break.js":
9661 /*!**********************************************************!*\
9662 !*** ../modules/web-cli/assets/js/modules/hook-break.js ***!
9663 \**********************************************************/
9664 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9665
9666 "use strict";
9667
9668
9669 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
9670
9671 Object.defineProperty(exports, "__esModule", ({
9672 value: true
9673 }));
9674 exports["default"] = void 0;
9675
9676 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
9677
9678 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
9679
9680 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
9681
9682 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
9683
9684 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
9685
9686 var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/wrapNativeSuper */ "../node_modules/@babel/runtime/helpers/wrapNativeSuper.js"));
9687
9688 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); }; }
9689
9690 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; } }
9691
9692 var HookBreak = /*#__PURE__*/function (_Error) {
9693 (0, _inherits2.default)(HookBreak, _Error);
9694
9695 var _super = _createSuper(HookBreak);
9696
9697 function HookBreak() {
9698 (0, _classCallCheck2.default)(this, HookBreak);
9699 return _super.call(this, 'HookBreak');
9700 }
9701
9702 return (0, _createClass2.default)(HookBreak);
9703 }( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error));
9704
9705 exports["default"] = HookBreak;
9706
9707 /***/ }),
9708
9709 /***/ "../modules/web-cli/assets/js/modules/hooks/data/after.js":
9710 /*!****************************************************************!*\
9711 !*** ../modules/web-cli/assets/js/modules/hooks/data/after.js ***!
9712 \****************************************************************/
9713 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9714
9715 "use strict";
9716
9717
9718 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
9719
9720 Object.defineProperty(exports, "__esModule", ({
9721 value: true
9722 }));
9723 exports["default"] = exports.After = void 0;
9724
9725 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
9726
9727 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
9728
9729 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
9730
9731 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
9732
9733 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
9734
9735 var _base = _interopRequireDefault(__webpack_require__(/*! ./base */ "../modules/web-cli/assets/js/modules/hooks/data/base.js"));
9736
9737 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); }; }
9738
9739 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; } }
9740
9741 var After = /*#__PURE__*/function (_Base) {
9742 (0, _inherits2.default)(After, _Base);
9743
9744 var _super = _createSuper(After);
9745
9746 function After() {
9747 (0, _classCallCheck2.default)(this, After);
9748 return _super.apply(this, arguments);
9749 }
9750
9751 (0, _createClass2.default)(After, [{
9752 key: "register",
9753 value: function register() {
9754 $e.hooks.registerDataAfter(this);
9755 }
9756 }]);
9757 return After;
9758 }(_base.default);
9759
9760 exports.After = After;
9761 var _default = After;
9762 exports["default"] = _default;
9763
9764 /***/ }),
9765
9766 /***/ "../modules/web-cli/assets/js/modules/hooks/data/base.js":
9767 /*!***************************************************************!*\
9768 !*** ../modules/web-cli/assets/js/modules/hooks/data/base.js ***!
9769 \***************************************************************/
9770 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9771
9772 "use strict";
9773
9774
9775 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
9776
9777 Object.defineProperty(exports, "__esModule", ({
9778 value: true
9779 }));
9780 exports["default"] = exports.Base = void 0;
9781
9782 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
9783
9784 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
9785
9786 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
9787
9788 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
9789
9790 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
9791
9792 var _hookBase = _interopRequireDefault(__webpack_require__(/*! elementor-api/modules/hook-base */ "../modules/web-cli/assets/js/modules/hook-base.js"));
9793
9794 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); }; }
9795
9796 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; } }
9797
9798 var Base = /*#__PURE__*/function (_HookBase) {
9799 (0, _inherits2.default)(Base, _HookBase);
9800
9801 var _super = _createSuper(Base);
9802
9803 function Base() {
9804 (0, _classCallCheck2.default)(this, Base);
9805 return _super.apply(this, arguments);
9806 }
9807
9808 (0, _createClass2.default)(Base, [{
9809 key: "getType",
9810 value: function getType() {
9811 return 'data';
9812 }
9813 }]);
9814 return Base;
9815 }(_hookBase.default);
9816
9817 exports.Base = Base;
9818 var _default = Base;
9819 exports["default"] = _default;
9820
9821 /***/ }),
9822
9823 /***/ "../modules/web-cli/assets/js/modules/hooks/data/catch.js":
9824 /*!****************************************************************!*\
9825 !*** ../modules/web-cli/assets/js/modules/hooks/data/catch.js ***!
9826 \****************************************************************/
9827 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9828
9829 "use strict";
9830
9831
9832 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
9833
9834 Object.defineProperty(exports, "__esModule", ({
9835 value: true
9836 }));
9837 exports["default"] = exports.Catch = void 0;
9838
9839 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
9840
9841 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
9842
9843 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
9844
9845 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
9846
9847 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
9848
9849 var _base = _interopRequireDefault(__webpack_require__(/*! ./base */ "../modules/web-cli/assets/js/modules/hooks/data/base.js"));
9850
9851 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); }; }
9852
9853 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; } }
9854
9855 var Catch = /*#__PURE__*/function (_Base) {
9856 (0, _inherits2.default)(Catch, _Base);
9857
9858 var _super = _createSuper(Catch);
9859
9860 function Catch() {
9861 (0, _classCallCheck2.default)(this, Catch);
9862 return _super.apply(this, arguments);
9863 }
9864
9865 (0, _createClass2.default)(Catch, [{
9866 key: "register",
9867 value: function register() {
9868 $e.hooks.registerDataCatch(this);
9869 }
9870 }]);
9871 return Catch;
9872 }(_base.default);
9873
9874 exports.Catch = Catch;
9875 var _default = Catch;
9876 exports["default"] = _default;
9877
9878 /***/ }),
9879
9880 /***/ "../modules/web-cli/assets/js/modules/hooks/data/dependency.js":
9881 /*!*********************************************************************!*\
9882 !*** ../modules/web-cli/assets/js/modules/hooks/data/dependency.js ***!
9883 \*********************************************************************/
9884 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9885
9886 "use strict";
9887
9888
9889 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
9890
9891 Object.defineProperty(exports, "__esModule", ({
9892 value: true
9893 }));
9894 exports["default"] = exports.Dependency = void 0;
9895
9896 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
9897
9898 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
9899
9900 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
9901
9902 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
9903
9904 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
9905
9906 var _base = _interopRequireDefault(__webpack_require__(/*! ./base */ "../modules/web-cli/assets/js/modules/hooks/data/base.js"));
9907
9908 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); }; }
9909
9910 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; } }
9911
9912 var Dependency = /*#__PURE__*/function (_Base) {
9913 (0, _inherits2.default)(Dependency, _Base);
9914
9915 var _super = _createSuper(Dependency);
9916
9917 function Dependency() {
9918 (0, _classCallCheck2.default)(this, Dependency);
9919 return _super.apply(this, arguments);
9920 }
9921
9922 (0, _createClass2.default)(Dependency, [{
9923 key: "register",
9924 value: function register() {
9925 $e.hooks.registerDataDependency(this);
9926 }
9927 }]);
9928 return Dependency;
9929 }(_base.default);
9930
9931 exports.Dependency = Dependency;
9932 var _default = Dependency;
9933 exports["default"] = _default;
9934
9935 /***/ }),
9936
9937 /***/ "../modules/web-cli/assets/js/modules/hooks/data/index.js":
9938 /*!****************************************************************!*\
9939 !*** ../modules/web-cli/assets/js/modules/hooks/data/index.js ***!
9940 \****************************************************************/
9941 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9942
9943 "use strict";
9944
9945
9946 Object.defineProperty(exports, "__esModule", ({
9947 value: true
9948 }));
9949 Object.defineProperty(exports, "After", ({
9950 enumerable: true,
9951 get: function get() {
9952 return _after.After;
9953 }
9954 }));
9955 Object.defineProperty(exports, "Base", ({
9956 enumerable: true,
9957 get: function get() {
9958 return _base.Base;
9959 }
9960 }));
9961 Object.defineProperty(exports, "Catch", ({
9962 enumerable: true,
9963 get: function get() {
9964 return _catch.Catch;
9965 }
9966 }));
9967 Object.defineProperty(exports, "Dependency", ({
9968 enumerable: true,
9969 get: function get() {
9970 return _dependency.Dependency;
9971 }
9972 }));
9973
9974 var _after = __webpack_require__(/*! ./after */ "../modules/web-cli/assets/js/modules/hooks/data/after.js");
9975
9976 var _base = __webpack_require__(/*! ./base */ "../modules/web-cli/assets/js/modules/hooks/data/base.js");
9977
9978 var _catch = __webpack_require__(/*! ./catch */ "../modules/web-cli/assets/js/modules/hooks/data/catch.js");
9979
9980 var _dependency = __webpack_require__(/*! ./dependency */ "../modules/web-cli/assets/js/modules/hooks/data/dependency.js");
9981
9982 /***/ }),
9983
9984 /***/ "../modules/web-cli/assets/js/modules/hooks/ui/after.js":
9985 /*!**************************************************************!*\
9986 !*** ../modules/web-cli/assets/js/modules/hooks/ui/after.js ***!
9987 \**************************************************************/
9988 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9989
9990 "use strict";
9991
9992
9993 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
9994
9995 Object.defineProperty(exports, "__esModule", ({
9996 value: true
9997 }));
9998 exports["default"] = exports.After = void 0;
9999
10000 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
10001
10002 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
10003
10004 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
10005
10006 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
10007
10008 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
10009
10010 var _base = _interopRequireDefault(__webpack_require__(/*! ./base */ "../modules/web-cli/assets/js/modules/hooks/ui/base.js"));
10011
10012 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); }; }
10013
10014 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; } }
10015
10016 var After = /*#__PURE__*/function (_Base) {
10017 (0, _inherits2.default)(After, _Base);
10018
10019 var _super = _createSuper(After);
10020
10021 function After() {
10022 (0, _classCallCheck2.default)(this, After);
10023 return _super.apply(this, arguments);
10024 }
10025
10026 (0, _createClass2.default)(After, [{
10027 key: "register",
10028 value: function register() {
10029 $e.hooks.registerUIAfter(this);
10030 }
10031 }]);
10032 return After;
10033 }(_base.default);
10034
10035 exports.After = After;
10036 var _default = After;
10037 exports["default"] = _default;
10038
10039 /***/ }),
10040
10041 /***/ "../modules/web-cli/assets/js/modules/hooks/ui/base.js":
10042 /*!*************************************************************!*\
10043 !*** ../modules/web-cli/assets/js/modules/hooks/ui/base.js ***!
10044 \*************************************************************/
10045 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
10046
10047 "use strict";
10048
10049
10050 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
10051
10052 Object.defineProperty(exports, "__esModule", ({
10053 value: true
10054 }));
10055 exports["default"] = exports.Base = void 0;
10056
10057 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
10058
10059 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
10060
10061 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
10062
10063 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
10064
10065 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
10066
10067 var _hookBase = _interopRequireDefault(__webpack_require__(/*! elementor-api/modules/hook-base */ "../modules/web-cli/assets/js/modules/hook-base.js"));
10068
10069 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); }; }
10070
10071 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; } }
10072
10073 var Base = /*#__PURE__*/function (_HookBase) {
10074 (0, _inherits2.default)(Base, _HookBase);
10075
10076 var _super = _createSuper(Base);
10077
10078 function Base() {
10079 (0, _classCallCheck2.default)(this, Base);
10080 return _super.apply(this, arguments);
10081 }
10082
10083 (0, _createClass2.default)(Base, [{
10084 key: "getType",
10085 value: function getType() {
10086 return 'ui';
10087 }
10088 }]);
10089 return Base;
10090 }(_hookBase.default);
10091
10092 exports.Base = Base;
10093 var _default = Base;
10094 exports["default"] = _default;
10095
10096 /***/ }),
10097
10098 /***/ "../modules/web-cli/assets/js/modules/hooks/ui/before.js":
10099 /*!***************************************************************!*\
10100 !*** ../modules/web-cli/assets/js/modules/hooks/ui/before.js ***!
10101 \***************************************************************/
10102 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
10103
10104 "use strict";
10105
10106
10107 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
10108
10109 Object.defineProperty(exports, "__esModule", ({
10110 value: true
10111 }));
10112 exports["default"] = exports.Before = void 0;
10113
10114 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
10115
10116 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
10117
10118 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
10119
10120 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
10121
10122 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
10123
10124 var _base = _interopRequireDefault(__webpack_require__(/*! ./base */ "../modules/web-cli/assets/js/modules/hooks/ui/base.js"));
10125
10126 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); }; }
10127
10128 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; } }
10129
10130 var Before = /*#__PURE__*/function (_Base) {
10131 (0, _inherits2.default)(Before, _Base);
10132
10133 var _super = _createSuper(Before);
10134
10135 function Before() {
10136 (0, _classCallCheck2.default)(this, Before);
10137 return _super.apply(this, arguments);
10138 }
10139
10140 (0, _createClass2.default)(Before, [{
10141 key: "register",
10142 value: function register() {
10143 $e.hooks.registerUIBefore(this);
10144 }
10145 }]);
10146 return Before;
10147 }(_base.default);
10148
10149 exports.Before = Before;
10150 var _default = Before;
10151 exports["default"] = _default;
10152
10153 /***/ }),
10154
10155 /***/ "../modules/web-cli/assets/js/modules/hooks/ui/catch.js":
10156 /*!**************************************************************!*\
10157 !*** ../modules/web-cli/assets/js/modules/hooks/ui/catch.js ***!
10158 \**************************************************************/
10159 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
10160
10161 "use strict";
10162
10163
10164 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
10165
10166 Object.defineProperty(exports, "__esModule", ({
10167 value: true
10168 }));
10169 exports["default"] = exports.Catch = void 0;
10170
10171 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
10172
10173 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
10174
10175 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
10176
10177 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
10178
10179 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
10180
10181 var _base = _interopRequireDefault(__webpack_require__(/*! ./base */ "../modules/web-cli/assets/js/modules/hooks/ui/base.js"));
10182
10183 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); }; }
10184
10185 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; } }
10186
10187 var Catch = /*#__PURE__*/function (_Base) {
10188 (0, _inherits2.default)(Catch, _Base);
10189
10190 var _super = _createSuper(Catch);
10191
10192 function Catch() {
10193 (0, _classCallCheck2.default)(this, Catch);
10194 return _super.apply(this, arguments);
10195 }
10196
10197 (0, _createClass2.default)(Catch, [{
10198 key: "register",
10199 value: function register() {
10200 $e.hooks.registerUICatch(this);
10201 }
10202 }]);
10203 return Catch;
10204 }(_base.default);
10205
10206 exports.Catch = Catch;
10207 var _default = Catch;
10208 exports["default"] = _default;
10209
10210 /***/ }),
10211
10212 /***/ "../modules/web-cli/assets/js/modules/hooks/ui/index.js":
10213 /*!**************************************************************!*\
10214 !*** ../modules/web-cli/assets/js/modules/hooks/ui/index.js ***!
10215 \**************************************************************/
10216 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
10217
10218 "use strict";
10219
10220
10221 Object.defineProperty(exports, "__esModule", ({
10222 value: true
10223 }));
10224 Object.defineProperty(exports, "After", ({
10225 enumerable: true,
10226 get: function get() {
10227 return _after.After;
10228 }
10229 }));
10230 Object.defineProperty(exports, "Base", ({
10231 enumerable: true,
10232 get: function get() {
10233 return _base.Base;
10234 }
10235 }));
10236 Object.defineProperty(exports, "Before", ({
10237 enumerable: true,
10238 get: function get() {
10239 return _before.Before;
10240 }
10241 }));
10242 Object.defineProperty(exports, "Catch", ({
10243 enumerable: true,
10244 get: function get() {
10245 return _catch.Catch;
10246 }
10247 }));
10248
10249 var _after = __webpack_require__(/*! ./after */ "../modules/web-cli/assets/js/modules/hooks/ui/after.js");
10250
10251 var _base = __webpack_require__(/*! ./base */ "../modules/web-cli/assets/js/modules/hooks/ui/base.js");
10252
10253 var _before = __webpack_require__(/*! ./before */ "../modules/web-cli/assets/js/modules/hooks/ui/before.js");
10254
10255 var _catch = __webpack_require__(/*! ./catch */ "../modules/web-cli/assets/js/modules/hooks/ui/catch.js");
10256
10257 /***/ }),
10258
10259 /***/ "../modules/web-cli/assets/js/utils/console.js":
10260 /*!*****************************************************!*\
10261 !*** ../modules/web-cli/assets/js/utils/console.js ***!
10262 \*****************************************************/
10263 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
10264
10265 "use strict";
10266
10267
10268 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
10269
10270 Object.defineProperty(exports, "__esModule", ({
10271 value: true
10272 }));
10273 exports["default"] = void 0;
10274
10275 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
10276
10277 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
10278
10279 var Console = /*#__PURE__*/function () {
10280 function Console() {
10281 (0, _classCallCheck2.default)(this, Console);
10282 }
10283
10284 (0, _createClass2.default)(Console, null, [{
10285 key: "error",
10286 value: function error(message) {
10287 // Show an error if devTools is available.
10288 if ($e.devTools) {
10289 $e.devTools.log.error(message);
10290 } // If not a 'Hook-Break' then show error.
10291
10292
10293 if (!(message instanceof $e.modules.HookBreak)) {
10294 // eslint-disable-next-line no-console
10295 console.error(message);
10296 }
10297 }
10298 }, {
10299 key: "warn",
10300 value: function warn() {
10301 var _console;
10302
10303 var style = "font-size: 12px; background-image: url(\"".concat(elementorWebCliConfig.urls.assets, "images/logo-icon.png\"); background-repeat: no-repeat; background-size: contain;");
10304
10305 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
10306 args[_key] = arguments[_key];
10307 }
10308
10309 args.unshift('%c %c', style, '');
10310
10311 (_console = console).warn.apply(_console, args); // eslint-disable-line no-console
10312
10313 }
10314 }]);
10315 return Console;
10316 }();
10317
10318 exports["default"] = Console;
10319
10320 /***/ }),
10321
10322 /***/ "../modules/web-cli/assets/js/utils/deprecation.js":
10323 /*!*********************************************************!*\
10324 !*** ../modules/web-cli/assets/js/utils/deprecation.js ***!
10325 \*********************************************************/
10326 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
10327
10328 "use strict";
10329
10330
10331 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
10332
10333 Object.defineProperty(exports, "__esModule", ({
10334 value: true
10335 }));
10336 exports["default"] = void 0;
10337
10338 var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js"));
10339
10340 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
10341
10342 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
10343
10344 var _console = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/console */ "../modules/web-cli/assets/js/utils/console.js"));
10345
10346 // Copied from `modules/dev-tools/assets/js/deprecation.js`
10347
10348 /**
10349 * @typedef {Object} Version
10350 * @property {number} major1 The first number
10351 * @property {number} major2 The second number
10352 * @property {number} minor The third number
10353 * @property {string} build The fourth number
10354 */
10355 var softDeprecated = function softDeprecated(name, version, replacement) {
10356 if (elementorWebCliConfig.isDebug) {
10357 deprecatedMessage('soft', name, version, replacement);
10358 }
10359 };
10360
10361 var hardDeprecated = function hardDeprecated(name, version, replacement) {
10362 deprecatedMessage('hard', name, version, replacement);
10363 };
10364
10365 var deprecatedMessage = function deprecatedMessage(type, name, version, replacement) {
10366 var message = "`".concat(name, "` is ").concat(type, " deprecated since ").concat(version);
10367
10368 if (replacement) {
10369 message += " - Use `".concat(replacement, "` instead");
10370 }
10371
10372 _console.default.warn(message);
10373 };
10374
10375 var Deprecation = /*#__PURE__*/function () {
10376 function Deprecation() {
10377 (0, _classCallCheck2.default)(this, Deprecation);
10378 }
10379
10380 (0, _createClass2.default)(Deprecation, null, [{
10381 key: "deprecated",
10382 value: function deprecated(name, version, replacement) {
10383 if (this.isHardDeprecated(version)) {
10384 hardDeprecated(name, version, replacement);
10385 } else {
10386 softDeprecated(name, version, replacement);
10387 }
10388 }
10389 /**
10390 * @param {string} version
10391 *
10392 * @return {Version}
10393 */
10394
10395 }, {
10396 key: "parseVersion",
10397 value: function parseVersion(version) {
10398 var versionParts = version.split('.');
10399
10400 if (versionParts.length < 3 || versionParts.length > 4) {
10401 throw new RangeError('Invalid Semantic Version string provided');
10402 }
10403
10404 var _versionParts = (0, _slicedToArray2.default)(versionParts, 4),
10405 major1 = _versionParts[0],
10406 major2 = _versionParts[1],
10407 minor = _versionParts[2],
10408 _versionParts$ = _versionParts[3],
10409 build = _versionParts$ === void 0 ? '' : _versionParts$;
10410
10411 return {
10412 major1: parseInt(major1),
10413 major2: parseInt(major2),
10414 minor: parseInt(minor),
10415 build: build
10416 };
10417 }
10418 /**
10419 * Get total of major.
10420 *
10421 * 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,
10422 * versions with major2 more then 9 will be added to total.
10423 *
10424 * @param {Version} versionObj
10425 *
10426 * @return {number}
10427 */
10428
10429 }, {
10430 key: "getTotalMajor",
10431 value: function getTotalMajor(versionObj) {
10432 var total = parseInt("".concat(versionObj.major1).concat(versionObj.major2, "0"));
10433 total = Number((total / 10).toFixed(0));
10434
10435 if (versionObj.major2 > 9) {
10436 total = versionObj.major2 - 9;
10437 }
10438
10439 return total;
10440 }
10441 /**
10442 * @param {string} version1
10443 * @param {string} version2
10444 *
10445 * @return {number}
10446 */
10447
10448 }, {
10449 key: "compareVersion",
10450 value: function compareVersion(version1, version2) {
10451 var _this = this;
10452
10453 return [this.parseVersion(version1), this.parseVersion(version2)].map(function (versionObj) {
10454 return _this.getTotalMajor(versionObj);
10455 }).reduce(function (acc, major) {
10456 return acc - major;
10457 });
10458 }
10459 /**
10460 * @param {string} version
10461 *
10462 * @return {boolean}
10463 */
10464
10465 }, {
10466 key: "isSoftDeprecated",
10467 value: function isSoftDeprecated(version) {
10468 var total = this.compareVersion(version, elementorWebCliConfig.version);
10469 return total <= 4;
10470 }
10471 /**
10472 * @param {string} version
10473 * @return {boolean}
10474 */
10475
10476 }, {
10477 key: "isHardDeprecated",
10478 value: function isHardDeprecated(version) {
10479 var total = this.compareVersion(version, elementorWebCliConfig.version);
10480 return total < 0 || total >= 8;
10481 }
10482 }]);
10483 return Deprecation;
10484 }();
10485
10486 exports["default"] = Deprecation;
10487
10488 /***/ }),
10489
10490 /***/ "../modules/web-cli/assets/js/utils/environment.js":
10491 /*!*********************************************************!*\
10492 !*** ../modules/web-cli/assets/js/utils/environment.js ***!
10493 \*********************************************************/
10494 /***/ ((__unused_webpack_module, exports) => {
10495
10496 "use strict";
10497
10498
10499 Object.defineProperty(exports, "__esModule", ({
10500 value: true
10501 }));
10502 exports["default"] = void 0;
10503
10504 // TODO: Copied from `core/common/assets/js/utils/environment.js`.
10505 var matchUserAgent = function matchUserAgent(UserAgentStr) {
10506 return userAgent.indexOf(UserAgentStr) >= 0;
10507 },
10508 userAgent = navigator.userAgent,
10509 // Solution influenced by https://stackoverflow.com/questions/9847580/how-to-detect-safari-chrome-ie-firefox-and-opera-browser
10510 // Opera 8.0+
10511 isOpera = !!window.opr && !!opr.addons || !!window.opera || matchUserAgent(' OPR/'),
10512 // Firefox 1.0+
10513 isFirefox = matchUserAgent('Firefox'),
10514 // Safari 3.0+ "[object HTMLElementConstructor]"
10515 isSafari = /^((?!chrome|android).)*safari/i.test(userAgent) || /constructor/i.test(window.HTMLElement) || function (p) {
10516 return '[object SafariRemoteNotification]' === p.toString();
10517 }(!window.safari || typeof safari !== 'undefined' && safari.pushNotification),
10518 // Internet Explorer 6-11
10519 isIE = /Trident|MSIE/.test(userAgent) && (
10520 /* @cc_on!@*/
10521 false || !!document.documentMode),
10522 // Edge 20+
10523 isEdge = !isIE && !!window.StyleMedia || matchUserAgent('Edg'),
10524 // Google Chrome (Not accurate)
10525 isChrome = !!window.chrome && matchUserAgent('Chrome') && !(isEdge || isOpera),
10526 // Blink engine
10527 isBlink = matchUserAgent('Chrome') && !!window.CSS,
10528 // Apple Webkit engine
10529 isAppleWebkit = matchUserAgent('AppleWebKit') && !isBlink,
10530 environment = {
10531 appleWebkit: isAppleWebkit,
10532 blink: isBlink,
10533 chrome: isChrome,
10534 edge: isEdge,
10535 firefox: isFirefox,
10536 ie: isIE,
10537 mac: matchUserAgent('Macintosh'),
10538 opera: isOpera,
10539 safari: isSafari,
10540 webkit: matchUserAgent('AppleWebKit')
10541 };
10542
10543 var _default = environment;
10544 exports["default"] = _default;
10545
10546 /***/ }),
10547
10548 /***/ "../modules/web-cli/assets/js/utils/force-method-implementation.js":
10549 /*!*************************************************************************!*\
10550 !*** ../modules/web-cli/assets/js/utils/force-method-implementation.js ***!
10551 \*************************************************************************/
10552 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
10553
10554 "use strict";
10555
10556
10557 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
10558
10559 Object.defineProperty(exports, "__esModule", ({
10560 value: true
10561 }));
10562 exports["default"] = exports.ForceMethodImplementation = void 0;
10563
10564 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
10565
10566 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
10567
10568 var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js"));
10569
10570 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
10571
10572 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
10573
10574 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
10575
10576 var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/wrapNativeSuper */ "../node_modules/@babel/runtime/helpers/wrapNativeSuper.js"));
10577
10578 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); }; }
10579
10580 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; } }
10581
10582 // TODO: Copied from `assets/dev/js/modules/imports/force-method-implementation.js`;
10583 var ForceMethodImplementation = /*#__PURE__*/function (_Error) {
10584 (0, _inherits2.default)(ForceMethodImplementation, _Error);
10585
10586 var _super = _createSuper(ForceMethodImplementation);
10587
10588 function ForceMethodImplementation() {
10589 var _this;
10590
10591 var info = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
10592 (0, _classCallCheck2.default)(this, ForceMethodImplementation);
10593 _this = _super.call(this, "".concat(info.isStatic ? 'static ' : '').concat(info.fullName, "() should be implemented, please provide '").concat(info.functionName || info.fullName, "' functionality."));
10594 Error.captureStackTrace((0, _assertThisInitialized2.default)(_this), ForceMethodImplementation);
10595 return _this;
10596 }
10597
10598 return (0, _createClass2.default)(ForceMethodImplementation);
10599 }( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error));
10600
10601 exports.ForceMethodImplementation = ForceMethodImplementation;
10602
10603 var _default = function _default() {
10604 var stack = Error().stack,
10605 caller = stack.split('\n')[2].trim(),
10606 callerName = caller.startsWith('at new') ? 'constructor' : caller.split(' ')[1],
10607 info = {};
10608 info.functionName = callerName;
10609 info.fullName = callerName;
10610
10611 if (info.functionName.includes('.')) {
10612 var parts = info.functionName.split('.');
10613 info.className = parts[0];
10614 info.functionName = parts[1];
10615 } else {
10616 info.isStatic = true;
10617 }
10618
10619 throw new ForceMethodImplementation(info);
10620 };
10621
10622 exports["default"] = _default;
10623
10624 /***/ }),
10625
10626 /***/ "../node_modules/redux-thunk/es/index.js":
10627 /*!***********************************************!*\
10628 !*** ../node_modules/redux-thunk/es/index.js ***!
10629 \***********************************************/
10630 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
10631
10632 "use strict";
10633 __webpack_require__.r(__webpack_exports__);
10634 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10635 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
10636 /* harmony export */ });
10637 /** A function that accepts a potential "extra argument" value to be injected later,
10638 * and returns an instance of the thunk middleware that uses that value
10639 */
10640 function createThunkMiddleware(extraArgument) {
10641 // Standard Redux middleware definition pattern:
10642 // See: https://redux.js.org/tutorials/fundamentals/part-4-store#writing-custom-middleware
10643 var middleware = function middleware(_ref) {
10644 var dispatch = _ref.dispatch,
10645 getState = _ref.getState;
10646 return function (next) {
10647 return function (action) {
10648 // The thunk middleware looks for any functions that were passed to `store.dispatch`.
10649 // If this "action" is really a function, call it and return the result.
10650 if (typeof action === 'function') {
10651 // Inject the store's `dispatch` and `getState` methods, as well as any "extra arg"
10652 return action(dispatch, getState, extraArgument);
10653 } // Otherwise, pass the action down the middleware chain as usual
10654
10655
10656 return next(action);
10657 };
10658 };
10659 };
10660
10661 return middleware;
10662 }
10663
10664 var thunk = createThunkMiddleware(); // Attach the factory function so users can create a customized version
10665 // with whatever "extra arg" they want to inject into their thunks
10666
10667 thunk.withExtraArgument = createThunkMiddleware;
10668 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (thunk);
10669
10670 /***/ }),
10671
10672 /***/ "../node_modules/redux/es/redux.js":
10673 /*!*****************************************!*\
10674 !*** ../node_modules/redux/es/redux.js ***!
10675 \*****************************************/
10676 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
10677
10678 "use strict";
10679 __webpack_require__.r(__webpack_exports__);
10680 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10681 /* harmony export */ "__DO_NOT_USE__ActionTypes": () => (/* binding */ ActionTypes),
10682 /* harmony export */ "applyMiddleware": () => (/* binding */ applyMiddleware),
10683 /* harmony export */ "bindActionCreators": () => (/* binding */ bindActionCreators),
10684 /* harmony export */ "combineReducers": () => (/* binding */ combineReducers),
10685 /* harmony export */ "compose": () => (/* binding */ compose),
10686 /* harmony export */ "createStore": () => (/* binding */ createStore),
10687 /* harmony export */ "legacy_createStore": () => (/* binding */ legacy_createStore)
10688 /* harmony export */ });
10689 /* 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");
10690
10691
10692 /**
10693 * Adapted from React: https://github.com/facebook/react/blob/master/packages/shared/formatProdErrorMessage.js
10694 *
10695 * Do not require this module directly! Use normal throw error calls. These messages will be replaced with error codes
10696 * during build.
10697 * @param {number} code
10698 */
10699 function formatProdErrorMessage(code) {
10700 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. ';
10701 }
10702
10703 // Inlined version of the `symbol-observable` polyfill
10704 var $$observable = (function () {
10705 return typeof Symbol === 'function' && Symbol.observable || '@@observable';
10706 })();
10707
10708 /**
10709 * These are private action types reserved by Redux.
10710 * For any unknown actions, you must return the current state.
10711 * If the current state is undefined, you must return the initial state.
10712 * Do not reference these action types directly in your code.
10713 */
10714 var randomString = function randomString() {
10715 return Math.random().toString(36).substring(7).split('').join('.');
10716 };
10717
10718 var ActionTypes = {
10719 INIT: "@@redux/INIT" + randomString(),
10720 REPLACE: "@@redux/REPLACE" + randomString(),
10721 PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() {
10722 return "@@redux/PROBE_UNKNOWN_ACTION" + randomString();
10723 }
10724 };
10725
10726 /**
10727 * @param {any} obj The object to inspect.
10728 * @returns {boolean} True if the argument appears to be a plain object.
10729 */
10730 function isPlainObject(obj) {
10731 if (typeof obj !== 'object' || obj === null) return false;
10732 var proto = obj;
10733
10734 while (Object.getPrototypeOf(proto) !== null) {
10735 proto = Object.getPrototypeOf(proto);
10736 }
10737
10738 return Object.getPrototypeOf(obj) === proto;
10739 }
10740
10741 // Inlined / shortened version of `kindOf` from https://github.com/jonschlinkert/kind-of
10742 function miniKindOf(val) {
10743 if (val === void 0) return 'undefined';
10744 if (val === null) return 'null';
10745 var type = typeof val;
10746
10747 switch (type) {
10748 case 'boolean':
10749 case 'string':
10750 case 'number':
10751 case 'symbol':
10752 case 'function':
10753 {
10754 return type;
10755 }
10756 }
10757
10758 if (Array.isArray(val)) return 'array';
10759 if (isDate(val)) return 'date';
10760 if (isError(val)) return 'error';
10761 var constructorName = ctorName(val);
10762
10763 switch (constructorName) {
10764 case 'Symbol':
10765 case 'Promise':
10766 case 'WeakMap':
10767 case 'WeakSet':
10768 case 'Map':
10769 case 'Set':
10770 return constructorName;
10771 } // other
10772
10773
10774 return type.slice(8, -1).toLowerCase().replace(/\s/g, '');
10775 }
10776
10777 function ctorName(val) {
10778 return typeof val.constructor === 'function' ? val.constructor.name : null;
10779 }
10780
10781 function isError(val) {
10782 return val instanceof Error || typeof val.message === 'string' && val.constructor && typeof val.constructor.stackTraceLimit === 'number';
10783 }
10784
10785 function isDate(val) {
10786 if (val instanceof Date) return true;
10787 return typeof val.toDateString === 'function' && typeof val.getDate === 'function' && typeof val.setDate === 'function';
10788 }
10789
10790 function kindOf(val) {
10791 var typeOfVal = typeof val;
10792
10793 if (true) {
10794 typeOfVal = miniKindOf(val);
10795 }
10796
10797 return typeOfVal;
10798 }
10799
10800 /**
10801 * @deprecated
10802 *
10803 * **We recommend using the `configureStore` method
10804 * of the `@reduxjs/toolkit` package**, which replaces `createStore`.
10805 *
10806 * Redux Toolkit is our recommended approach for writing Redux logic today,
10807 * including store setup, reducers, data fetching, and more.
10808 *
10809 * **For more details, please read this Redux docs page:**
10810 * **https://redux.js.org/introduction/why-rtk-is-redux-today**
10811 *
10812 * `configureStore` from Redux Toolkit is an improved version of `createStore` that
10813 * simplifies setup and helps avoid common bugs.
10814 *
10815 * You should not be using the `redux` core package by itself today, except for learning purposes.
10816 * The `createStore` method from the core `redux` package will not be removed, but we encourage
10817 * all users to migrate to using Redux Toolkit for all Redux code.
10818 *
10819 * If you want to use `createStore` without this visual deprecation warning, use
10820 * the `legacy_createStore` import instead:
10821 *
10822 * `import { legacy_createStore as createStore} from 'redux'`
10823 *
10824 */
10825
10826 function createStore(reducer, preloadedState, enhancer) {
10827 var _ref2;
10828
10829 if (typeof preloadedState === 'function' && typeof enhancer === 'function' || typeof enhancer === 'function' && typeof arguments[3] === 'function') {
10830 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.');
10831 }
10832
10833 if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {
10834 enhancer = preloadedState;
10835 preloadedState = undefined;
10836 }
10837
10838 if (typeof enhancer !== 'undefined') {
10839 if (typeof enhancer !== 'function') {
10840 throw new Error( false ? 0 : "Expected the enhancer to be a function. Instead, received: '" + kindOf(enhancer) + "'");
10841 }
10842
10843 return enhancer(createStore)(reducer, preloadedState);
10844 }
10845
10846 if (typeof reducer !== 'function') {
10847 throw new Error( false ? 0 : "Expected the root reducer to be a function. Instead, received: '" + kindOf(reducer) + "'");
10848 }
10849
10850 var currentReducer = reducer;
10851 var currentState = preloadedState;
10852 var currentListeners = [];
10853 var nextListeners = currentListeners;
10854 var isDispatching = false;
10855 /**
10856 * This makes a shallow copy of currentListeners so we can use
10857 * nextListeners as a temporary list while dispatching.
10858 *
10859 * This prevents any bugs around consumers calling
10860 * subscribe/unsubscribe in the middle of a dispatch.
10861 */
10862
10863 function ensureCanMutateNextListeners() {
10864 if (nextListeners === currentListeners) {
10865 nextListeners = currentListeners.slice();
10866 }
10867 }
10868 /**
10869 * Reads the state tree managed by the store.
10870 *
10871 * @returns {any} The current state tree of your application.
10872 */
10873
10874
10875 function getState() {
10876 if (isDispatching) {
10877 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.');
10878 }
10879
10880 return currentState;
10881 }
10882 /**
10883 * Adds a change listener. It will be called any time an action is dispatched,
10884 * and some part of the state tree may potentially have changed. You may then
10885 * call `getState()` to read the current state tree inside the callback.
10886 *
10887 * You may call `dispatch()` from a change listener, with the following
10888 * caveats:
10889 *
10890 * 1. The subscriptions are snapshotted just before every `dispatch()` call.
10891 * If you subscribe or unsubscribe while the listeners are being invoked, this
10892 * will not have any effect on the `dispatch()` that is currently in progress.
10893 * However, the next `dispatch()` call, whether nested or not, will use a more
10894 * recent snapshot of the subscription list.
10895 *
10896 * 2. The listener should not expect to see all state changes, as the state
10897 * might have been updated multiple times during a nested `dispatch()` before
10898 * the listener is called. It is, however, guaranteed that all subscribers
10899 * registered before the `dispatch()` started will be called with the latest
10900 * state by the time it exits.
10901 *
10902 * @param {Function} listener A callback to be invoked on every dispatch.
10903 * @returns {Function} A function to remove this change listener.
10904 */
10905
10906
10907 function subscribe(listener) {
10908 if (typeof listener !== 'function') {
10909 throw new Error( false ? 0 : "Expected the listener to be a function. Instead, received: '" + kindOf(listener) + "'");
10910 }
10911
10912 if (isDispatching) {
10913 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.');
10914 }
10915
10916 var isSubscribed = true;
10917 ensureCanMutateNextListeners();
10918 nextListeners.push(listener);
10919 return function unsubscribe() {
10920 if (!isSubscribed) {
10921 return;
10922 }
10923
10924 if (isDispatching) {
10925 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.');
10926 }
10927
10928 isSubscribed = false;
10929 ensureCanMutateNextListeners();
10930 var index = nextListeners.indexOf(listener);
10931 nextListeners.splice(index, 1);
10932 currentListeners = null;
10933 };
10934 }
10935 /**
10936 * Dispatches an action. It is the only way to trigger a state change.
10937 *
10938 * The `reducer` function, used to create the store, will be called with the
10939 * current state tree and the given `action`. Its return value will
10940 * be considered the **next** state of the tree, and the change listeners
10941 * will be notified.
10942 *
10943 * The base implementation only supports plain object actions. If you want to
10944 * dispatch a Promise, an Observable, a thunk, or something else, you need to
10945 * wrap your store creating function into the corresponding middleware. For
10946 * example, see the documentation for the `redux-thunk` package. Even the
10947 * middleware will eventually dispatch plain object actions using this method.
10948 *
10949 * @param {Object} action A plain object representing “what changed”. It is
10950 * a good idea to keep actions serializable so you can record and replay user
10951 * sessions, or use the time travelling `redux-devtools`. An action must have
10952 * a `type` property which may not be `undefined`. It is a good idea to use
10953 * string constants for action types.
10954 *
10955 * @returns {Object} For convenience, the same action object you dispatched.
10956 *
10957 * Note that, if you use a custom middleware, it may wrap `dispatch()` to
10958 * return something else (for example, a Promise you can await).
10959 */
10960
10961
10962 function dispatch(action) {
10963 if (!isPlainObject(action)) {
10964 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.");
10965 }
10966
10967 if (typeof action.type === 'undefined') {
10968 throw new Error( false ? 0 : 'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');
10969 }
10970
10971 if (isDispatching) {
10972 throw new Error( false ? 0 : 'Reducers may not dispatch actions.');
10973 }
10974
10975 try {
10976 isDispatching = true;
10977 currentState = currentReducer(currentState, action);
10978 } finally {
10979 isDispatching = false;
10980 }
10981
10982 var listeners = currentListeners = nextListeners;
10983
10984 for (var i = 0; i < listeners.length; i++) {
10985 var listener = listeners[i];
10986 listener();
10987 }
10988
10989 return action;
10990 }
10991 /**
10992 * Replaces the reducer currently used by the store to calculate the state.
10993 *
10994 * You might need this if your app implements code splitting and you want to
10995 * load some of the reducers dynamically. You might also need this if you
10996 * implement a hot reloading mechanism for Redux.
10997 *
10998 * @param {Function} nextReducer The reducer for the store to use instead.
10999 * @returns {void}
11000 */
11001
11002
11003 function replaceReducer(nextReducer) {
11004 if (typeof nextReducer !== 'function') {
11005 throw new Error( false ? 0 : "Expected the nextReducer to be a function. Instead, received: '" + kindOf(nextReducer));
11006 }
11007
11008 currentReducer = nextReducer; // This action has a similiar effect to ActionTypes.INIT.
11009 // Any reducers that existed in both the new and old rootReducer
11010 // will receive the previous state. This effectively populates
11011 // the new state tree with any relevant data from the old one.
11012
11013 dispatch({
11014 type: ActionTypes.REPLACE
11015 });
11016 }
11017 /**
11018 * Interoperability point for observable/reactive libraries.
11019 * @returns {observable} A minimal observable of state changes.
11020 * For more information, see the observable proposal:
11021 * https://github.com/tc39/proposal-observable
11022 */
11023
11024
11025 function observable() {
11026 var _ref;
11027
11028 var outerSubscribe = subscribe;
11029 return _ref = {
11030 /**
11031 * The minimal observable subscription method.
11032 * @param {Object} observer Any object that can be used as an observer.
11033 * The observer object should have a `next` method.
11034 * @returns {subscription} An object with an `unsubscribe` method that can
11035 * be used to unsubscribe the observable from the store, and prevent further
11036 * emission of values from the observable.
11037 */
11038 subscribe: function subscribe(observer) {
11039 if (typeof observer !== 'object' || observer === null) {
11040 throw new Error( false ? 0 : "Expected the observer to be an object. Instead, received: '" + kindOf(observer) + "'");
11041 }
11042
11043 function observeState() {
11044 if (observer.next) {
11045 observer.next(getState());
11046 }
11047 }
11048
11049 observeState();
11050 var unsubscribe = outerSubscribe(observeState);
11051 return {
11052 unsubscribe: unsubscribe
11053 };
11054 }
11055 }, _ref[$$observable] = function () {
11056 return this;
11057 }, _ref;
11058 } // When a store is created, an "INIT" action is dispatched so that every
11059 // reducer returns their initial state. This effectively populates
11060 // the initial state tree.
11061
11062
11063 dispatch({
11064 type: ActionTypes.INIT
11065 });
11066 return _ref2 = {
11067 dispatch: dispatch,
11068 subscribe: subscribe,
11069 getState: getState,
11070 replaceReducer: replaceReducer
11071 }, _ref2[$$observable] = observable, _ref2;
11072 }
11073 /**
11074 * Creates a Redux store that holds the state tree.
11075 *
11076 * **We recommend using `configureStore` from the
11077 * `@reduxjs/toolkit` package**, which replaces `createStore`:
11078 * **https://redux.js.org/introduction/why-rtk-is-redux-today**
11079 *
11080 * The only way to change the data in the store is to call `dispatch()` on it.
11081 *
11082 * There should only be a single store in your app. To specify how different
11083 * parts of the state tree respond to actions, you may combine several reducers
11084 * into a single reducer function by using `combineReducers`.
11085 *
11086 * @param {Function} reducer A function that returns the next state tree, given
11087 * the current state tree and the action to handle.
11088 *
11089 * @param {any} [preloadedState] The initial state. You may optionally specify it
11090 * to hydrate the state from the server in universal apps, or to restore a
11091 * previously serialized user session.
11092 * If you use `combineReducers` to produce the root reducer function, this must be
11093 * an object with the same shape as `combineReducers` keys.
11094 *
11095 * @param {Function} [enhancer] The store enhancer. You may optionally specify it
11096 * to enhance the store with third-party capabilities such as middleware,
11097 * time travel, persistence, etc. The only store enhancer that ships with Redux
11098 * is `applyMiddleware()`.
11099 *
11100 * @returns {Store} A Redux store that lets you read the state, dispatch actions
11101 * and subscribe to changes.
11102 */
11103
11104 var legacy_createStore = createStore;
11105
11106 /**
11107 * Prints a warning in the console if it exists.
11108 *
11109 * @param {String} message The warning message.
11110 * @returns {void}
11111 */
11112 function warning(message) {
11113 /* eslint-disable no-console */
11114 if (typeof console !== 'undefined' && typeof console.error === 'function') {
11115 console.error(message);
11116 }
11117 /* eslint-enable no-console */
11118
11119
11120 try {
11121 // This error was thrown as a convenience so that if you enable
11122 // "break on all exceptions" in your console,
11123 // it would pause the execution at this line.
11124 throw new Error(message);
11125 } catch (e) {} // eslint-disable-line no-empty
11126
11127 }
11128
11129 function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {
11130 var reducerKeys = Object.keys(reducers);
11131 var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer';
11132
11133 if (reducerKeys.length === 0) {
11134 return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';
11135 }
11136
11137 if (!isPlainObject(inputState)) {
11138 return "The " + argumentName + " has unexpected type of \"" + kindOf(inputState) + "\". Expected argument to be an object with the following " + ("keys: \"" + reducerKeys.join('", "') + "\"");
11139 }
11140
11141 var unexpectedKeys = Object.keys(inputState).filter(function (key) {
11142 return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key];
11143 });
11144 unexpectedKeys.forEach(function (key) {
11145 unexpectedKeyCache[key] = true;
11146 });
11147 if (action && action.type === ActionTypes.REPLACE) return;
11148
11149 if (unexpectedKeys.length > 0) {
11150 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.");
11151 }
11152 }
11153
11154 function assertReducerShape(reducers) {
11155 Object.keys(reducers).forEach(function (key) {
11156 var reducer = reducers[key];
11157 var initialState = reducer(undefined, {
11158 type: ActionTypes.INIT
11159 });
11160
11161 if (typeof initialState === 'undefined') {
11162 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.");
11163 }
11164
11165 if (typeof reducer(undefined, {
11166 type: ActionTypes.PROBE_UNKNOWN_ACTION()
11167 }) === 'undefined') {
11168 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.");
11169 }
11170 });
11171 }
11172 /**
11173 * Turns an object whose values are different reducer functions, into a single
11174 * reducer function. It will call every child reducer, and gather their results
11175 * into a single state object, whose keys correspond to the keys of the passed
11176 * reducer functions.
11177 *
11178 * @param {Object} reducers An object whose values correspond to different
11179 * reducer functions that need to be combined into one. One handy way to obtain
11180 * it is to use ES6 `import * as reducers` syntax. The reducers may never return
11181 * undefined for any action. Instead, they should return their initial state
11182 * if the state passed to them was undefined, and the current state for any
11183 * unrecognized action.
11184 *
11185 * @returns {Function} A reducer function that invokes every reducer inside the
11186 * passed object, and builds a state object with the same shape.
11187 */
11188
11189
11190 function combineReducers(reducers) {
11191 var reducerKeys = Object.keys(reducers);
11192 var finalReducers = {};
11193
11194 for (var i = 0; i < reducerKeys.length; i++) {
11195 var key = reducerKeys[i];
11196
11197 if (true) {
11198 if (typeof reducers[key] === 'undefined') {
11199 warning("No reducer provided for key \"" + key + "\"");
11200 }
11201 }
11202
11203 if (typeof reducers[key] === 'function') {
11204 finalReducers[key] = reducers[key];
11205 }
11206 }
11207
11208 var finalReducerKeys = Object.keys(finalReducers); // This is used to make sure we don't warn about the same
11209 // keys multiple times.
11210
11211 var unexpectedKeyCache;
11212
11213 if (true) {
11214 unexpectedKeyCache = {};
11215 }
11216
11217 var shapeAssertionError;
11218
11219 try {
11220 assertReducerShape(finalReducers);
11221 } catch (e) {
11222 shapeAssertionError = e;
11223 }
11224
11225 return function combination(state, action) {
11226 if (state === void 0) {
11227 state = {};
11228 }
11229
11230 if (shapeAssertionError) {
11231 throw shapeAssertionError;
11232 }
11233
11234 if (true) {
11235 var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);
11236
11237 if (warningMessage) {
11238 warning(warningMessage);
11239 }
11240 }
11241
11242 var hasChanged = false;
11243 var nextState = {};
11244
11245 for (var _i = 0; _i < finalReducerKeys.length; _i++) {
11246 var _key = finalReducerKeys[_i];
11247 var reducer = finalReducers[_key];
11248 var previousStateForKey = state[_key];
11249 var nextStateForKey = reducer(previousStateForKey, action);
11250
11251 if (typeof nextStateForKey === 'undefined') {
11252 var actionType = action && action.type;
11253 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.");
11254 }
11255
11256 nextState[_key] = nextStateForKey;
11257 hasChanged = hasChanged || nextStateForKey !== previousStateForKey;
11258 }
11259
11260 hasChanged = hasChanged || finalReducerKeys.length !== Object.keys(state).length;
11261 return hasChanged ? nextState : state;
11262 };
11263 }
11264
11265 function bindActionCreator(actionCreator, dispatch) {
11266 return function () {
11267 return dispatch(actionCreator.apply(this, arguments));
11268 };
11269 }
11270 /**
11271 * Turns an object whose values are action creators, into an object with the
11272 * same keys, but with every function wrapped into a `dispatch` call so they
11273 * may be invoked directly. This is just a convenience method, as you can call
11274 * `store.dispatch(MyActionCreators.doSomething())` yourself just fine.
11275 *
11276 * For convenience, you can also pass an action creator as the first argument,
11277 * and get a dispatch wrapped function in return.
11278 *
11279 * @param {Function|Object} actionCreators An object whose values are action
11280 * creator functions. One handy way to obtain it is to use ES6 `import * as`
11281 * syntax. You may also pass a single function.
11282 *
11283 * @param {Function} dispatch The `dispatch` function available on your Redux
11284 * store.
11285 *
11286 * @returns {Function|Object} The object mimicking the original object, but with
11287 * every action creator wrapped into the `dispatch` call. If you passed a
11288 * function as `actionCreators`, the return value will also be a single
11289 * function.
11290 */
11291
11292
11293 function bindActionCreators(actionCreators, dispatch) {
11294 if (typeof actionCreators === 'function') {
11295 return bindActionCreator(actionCreators, dispatch);
11296 }
11297
11298 if (typeof actionCreators !== 'object' || actionCreators === null) {
11299 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\"?");
11300 }
11301
11302 var boundActionCreators = {};
11303
11304 for (var key in actionCreators) {
11305 var actionCreator = actionCreators[key];
11306
11307 if (typeof actionCreator === 'function') {
11308 boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);
11309 }
11310 }
11311
11312 return boundActionCreators;
11313 }
11314
11315 /**
11316 * Composes single-argument functions from right to left. The rightmost
11317 * function can take multiple arguments as it provides the signature for
11318 * the resulting composite function.
11319 *
11320 * @param {...Function} funcs The functions to compose.
11321 * @returns {Function} A function obtained by composing the argument functions
11322 * from right to left. For example, compose(f, g, h) is identical to doing
11323 * (...args) => f(g(h(...args))).
11324 */
11325 function compose() {
11326 for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {
11327 funcs[_key] = arguments[_key];
11328 }
11329
11330 if (funcs.length === 0) {
11331 return function (arg) {
11332 return arg;
11333 };
11334 }
11335
11336 if (funcs.length === 1) {
11337 return funcs[0];
11338 }
11339
11340 return funcs.reduce(function (a, b) {
11341 return function () {
11342 return a(b.apply(void 0, arguments));
11343 };
11344 });
11345 }
11346
11347 /**
11348 * Creates a store enhancer that applies middleware to the dispatch method
11349 * of the Redux store. This is handy for a variety of tasks, such as expressing
11350 * asynchronous actions in a concise manner, or logging every action payload.
11351 *
11352 * See `redux-thunk` package as an example of the Redux middleware.
11353 *
11354 * Because middleware is potentially asynchronous, this should be the first
11355 * store enhancer in the composition chain.
11356 *
11357 * Note that each middleware will be given the `dispatch` and `getState` functions
11358 * as named arguments.
11359 *
11360 * @param {...Function} middlewares The middleware chain to be applied.
11361 * @returns {Function} A store enhancer applying the middleware.
11362 */
11363
11364 function applyMiddleware() {
11365 for (var _len = arguments.length, middlewares = new Array(_len), _key = 0; _key < _len; _key++) {
11366 middlewares[_key] = arguments[_key];
11367 }
11368
11369 return function (createStore) {
11370 return function () {
11371 var store = createStore.apply(void 0, arguments);
11372
11373 var _dispatch = function dispatch() {
11374 throw new Error( false ? 0 : 'Dispatching while constructing your middleware is not allowed. ' + 'Other middleware would not be applied to this dispatch.');
11375 };
11376
11377 var middlewareAPI = {
11378 getState: store.getState,
11379 dispatch: function dispatch() {
11380 return _dispatch.apply(void 0, arguments);
11381 }
11382 };
11383 var chain = middlewares.map(function (middleware) {
11384 return middleware(middlewareAPI);
11385 });
11386 _dispatch = compose.apply(void 0, chain)(store.dispatch);
11387 return (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__["default"])((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__["default"])({}, store), {}, {
11388 dispatch: _dispatch
11389 });
11390 };
11391 };
11392 }
11393
11394 /*
11395 * This is a dummy function to check if the function name has been altered by minification.
11396 * If the function has been minified and NODE_ENV !== 'production', warn the user.
11397 */
11398
11399 function isCrushed() {}
11400
11401 if ( true && typeof isCrushed.name === 'string' && isCrushed.name !== 'isCrushed') {
11402 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.');
11403 }
11404
11405
11406
11407
11408 /***/ }),
11409
11410 /***/ "../node_modules/reselect/es/defaultMemoize.js":
11411 /*!*****************************************************!*\
11412 !*** ../node_modules/reselect/es/defaultMemoize.js ***!
11413 \*****************************************************/
11414 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
11415
11416 "use strict";
11417 __webpack_require__.r(__webpack_exports__);
11418 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11419 /* harmony export */ "createCacheKeyComparator": () => (/* binding */ createCacheKeyComparator),
11420 /* harmony export */ "defaultEqualityCheck": () => (/* binding */ defaultEqualityCheck),
11421 /* harmony export */ "defaultMemoize": () => (/* binding */ defaultMemoize)
11422 /* harmony export */ });
11423 // Cache implementation based on Erik Rasmussen's `lru-memoize`:
11424 // https://github.com/erikras/lru-memoize
11425 var NOT_FOUND = 'NOT_FOUND';
11426
11427 function createSingletonCache(equals) {
11428 var entry;
11429 return {
11430 get: function get(key) {
11431 if (entry && equals(entry.key, key)) {
11432 return entry.value;
11433 }
11434
11435 return NOT_FOUND;
11436 },
11437 put: function put(key, value) {
11438 entry = {
11439 key: key,
11440 value: value
11441 };
11442 },
11443 getEntries: function getEntries() {
11444 return entry ? [entry] : [];
11445 },
11446 clear: function clear() {
11447 entry = undefined;
11448 }
11449 };
11450 }
11451
11452 function createLruCache(maxSize, equals) {
11453 var entries = [];
11454
11455 function get(key) {
11456 var cacheIndex = entries.findIndex(function (entry) {
11457 return equals(key, entry.key);
11458 }); // We found a cached entry
11459
11460 if (cacheIndex > -1) {
11461 var entry = entries[cacheIndex]; // Cached entry not at top of cache, move it to the top
11462
11463 if (cacheIndex > 0) {
11464 entries.splice(cacheIndex, 1);
11465 entries.unshift(entry);
11466 }
11467
11468 return entry.value;
11469 } // No entry found in cache, return sentinel
11470
11471
11472 return NOT_FOUND;
11473 }
11474
11475 function put(key, value) {
11476 if (get(key) === NOT_FOUND) {
11477 // TODO Is unshift slow?
11478 entries.unshift({
11479 key: key,
11480 value: value
11481 });
11482
11483 if (entries.length > maxSize) {
11484 entries.pop();
11485 }
11486 }
11487 }
11488
11489 function getEntries() {
11490 return entries;
11491 }
11492
11493 function clear() {
11494 entries = [];
11495 }
11496
11497 return {
11498 get: get,
11499 put: put,
11500 getEntries: getEntries,
11501 clear: clear
11502 };
11503 }
11504
11505 var defaultEqualityCheck = function defaultEqualityCheck(a, b) {
11506 return a === b;
11507 };
11508 function createCacheKeyComparator(equalityCheck) {
11509 return function areArgumentsShallowlyEqual(prev, next) {
11510 if (prev === null || next === null || prev.length !== next.length) {
11511 return false;
11512 } // Do this in a for loop (and not a `forEach` or an `every`) so we can determine equality as fast as possible.
11513
11514
11515 var length = prev.length;
11516
11517 for (var i = 0; i < length; i++) {
11518 if (!equalityCheck(prev[i], next[i])) {
11519 return false;
11520 }
11521 }
11522
11523 return true;
11524 };
11525 }
11526 // defaultMemoize now supports a configurable cache size with LRU behavior,
11527 // and optional comparison of the result value with existing values
11528 function defaultMemoize(func, equalityCheckOrOptions) {
11529 var providedOptions = typeof equalityCheckOrOptions === 'object' ? equalityCheckOrOptions : {
11530 equalityCheck: equalityCheckOrOptions
11531 };
11532 var _providedOptions$equa = providedOptions.equalityCheck,
11533 equalityCheck = _providedOptions$equa === void 0 ? defaultEqualityCheck : _providedOptions$equa,
11534 _providedOptions$maxS = providedOptions.maxSize,
11535 maxSize = _providedOptions$maxS === void 0 ? 1 : _providedOptions$maxS,
11536 resultEqualityCheck = providedOptions.resultEqualityCheck;
11537 var comparator = createCacheKeyComparator(equalityCheck);
11538 var cache = maxSize === 1 ? createSingletonCache(comparator) : createLruCache(maxSize, comparator); // we reference arguments instead of spreading them for performance reasons
11539
11540 function memoized() {
11541 var value = cache.get(arguments);
11542
11543 if (value === NOT_FOUND) {
11544 // @ts-ignore
11545 value = func.apply(null, arguments);
11546
11547 if (resultEqualityCheck) {
11548 var entries = cache.getEntries();
11549 var matchingEntry = entries.find(function (entry) {
11550 return resultEqualityCheck(entry.value, value);
11551 });
11552
11553 if (matchingEntry) {
11554 value = matchingEntry.value;
11555 }
11556 }
11557
11558 cache.put(arguments, value);
11559 }
11560
11561 return value;
11562 }
11563
11564 memoized.clearCache = function () {
11565 return cache.clear();
11566 };
11567
11568 return memoized;
11569 }
11570
11571 /***/ }),
11572
11573 /***/ "../node_modules/reselect/es/index.js":
11574 /*!********************************************!*\
11575 !*** ../node_modules/reselect/es/index.js ***!
11576 \********************************************/
11577 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
11578
11579 "use strict";
11580 __webpack_require__.r(__webpack_exports__);
11581 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11582 /* harmony export */ "createSelector": () => (/* binding */ createSelector),
11583 /* harmony export */ "createSelectorCreator": () => (/* binding */ createSelectorCreator),
11584 /* harmony export */ "createStructuredSelector": () => (/* binding */ createStructuredSelector),
11585 /* harmony export */ "defaultEqualityCheck": () => (/* reexport safe */ _defaultMemoize__WEBPACK_IMPORTED_MODULE_0__.defaultEqualityCheck),
11586 /* harmony export */ "defaultMemoize": () => (/* reexport safe */ _defaultMemoize__WEBPACK_IMPORTED_MODULE_0__.defaultMemoize)
11587 /* harmony export */ });
11588 /* harmony import */ var _defaultMemoize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultMemoize */ "../node_modules/reselect/es/defaultMemoize.js");
11589
11590
11591
11592 function getDependencies(funcs) {
11593 var dependencies = Array.isArray(funcs[0]) ? funcs[0] : funcs;
11594
11595 if (!dependencies.every(function (dep) {
11596 return typeof dep === 'function';
11597 })) {
11598 var dependencyTypes = dependencies.map(function (dep) {
11599 return typeof dep === 'function' ? "function " + (dep.name || 'unnamed') + "()" : typeof dep;
11600 }).join(', ');
11601 throw new Error("createSelector expects all input-selectors to be functions, but received the following types: [" + dependencyTypes + "]");
11602 }
11603
11604 return dependencies;
11605 }
11606
11607 function createSelectorCreator(memoize) {
11608 for (var _len = arguments.length, memoizeOptionsFromArgs = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
11609 memoizeOptionsFromArgs[_key - 1] = arguments[_key];
11610 }
11611
11612 var createSelector = function createSelector() {
11613 for (var _len2 = arguments.length, funcs = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
11614 funcs[_key2] = arguments[_key2];
11615 }
11616
11617 var _recomputations = 0;
11618
11619 var _lastResult; // Due to the intricacies of rest params, we can't do an optional arg after `...funcs`.
11620 // So, start by declaring the default value here.
11621 // (And yes, the words 'memoize' and 'options' appear too many times in this next sequence.)
11622
11623
11624 var directlyPassedOptions = {
11625 memoizeOptions: undefined
11626 }; // Normally, the result func or "output selector" is the last arg
11627
11628 var resultFunc = funcs.pop(); // If the result func is actually an _object_, assume it's our options object
11629
11630 if (typeof resultFunc === 'object') {
11631 directlyPassedOptions = resultFunc; // and pop the real result func off
11632
11633 resultFunc = funcs.pop();
11634 }
11635
11636 if (typeof resultFunc !== 'function') {
11637 throw new Error("createSelector expects an output function after the inputs, but received: [" + typeof resultFunc + "]");
11638 } // Determine which set of options we're using. Prefer options passed directly,
11639 // but fall back to options given to createSelectorCreator.
11640
11641
11642 var _directlyPassedOption = directlyPassedOptions,
11643 _directlyPassedOption2 = _directlyPassedOption.memoizeOptions,
11644 memoizeOptions = _directlyPassedOption2 === void 0 ? memoizeOptionsFromArgs : _directlyPassedOption2; // Simplifying assumption: it's unlikely that the first options arg of the provided memoizer
11645 // is an array. In most libs I've looked at, it's an equality function or options object.
11646 // Based on that, if `memoizeOptions` _is_ an array, we assume it's a full
11647 // user-provided array of options. Otherwise, it must be just the _first_ arg, and so
11648 // we wrap it in an array so we can apply it.
11649
11650 var finalMemoizeOptions = Array.isArray(memoizeOptions) ? memoizeOptions : [memoizeOptions];
11651 var dependencies = getDependencies(funcs);
11652 var memoizedResultFunc = memoize.apply(void 0, [function recomputationWrapper() {
11653 _recomputations++; // apply arguments instead of spreading for performance.
11654
11655 return resultFunc.apply(null, arguments);
11656 }].concat(finalMemoizeOptions)); // If a selector is called with the exact same arguments we don't need to traverse our dependencies again.
11657
11658 var selector = memoize(function dependenciesChecker() {
11659 var params = [];
11660 var length = dependencies.length;
11661
11662 for (var i = 0; i < length; i++) {
11663 // apply arguments instead of spreading and mutate a local list of params for performance.
11664 // @ts-ignore
11665 params.push(dependencies[i].apply(null, arguments));
11666 } // apply arguments instead of spreading for performance.
11667
11668
11669 _lastResult = memoizedResultFunc.apply(null, params);
11670 return _lastResult;
11671 });
11672 Object.assign(selector, {
11673 resultFunc: resultFunc,
11674 memoizedResultFunc: memoizedResultFunc,
11675 dependencies: dependencies,
11676 lastResult: function lastResult() {
11677 return _lastResult;
11678 },
11679 recomputations: function recomputations() {
11680 return _recomputations;
11681 },
11682 resetRecomputations: function resetRecomputations() {
11683 return _recomputations = 0;
11684 }
11685 });
11686 return selector;
11687 }; // @ts-ignore
11688
11689
11690 return createSelector;
11691 }
11692 var createSelector = /* #__PURE__ */createSelectorCreator(_defaultMemoize__WEBPACK_IMPORTED_MODULE_0__.defaultMemoize);
11693 // Manual definition of state and output arguments
11694 var createStructuredSelector = function createStructuredSelector(selectors, selectorCreator) {
11695 if (selectorCreator === void 0) {
11696 selectorCreator = createSelector;
11697 }
11698
11699 if (typeof selectors !== 'object') {
11700 throw new Error('createStructuredSelector expects first argument to be an object ' + ("where each property is a selector, instead received a " + typeof selectors));
11701 }
11702
11703 var objectKeys = Object.keys(selectors);
11704 var resultSelector = selectorCreator( // @ts-ignore
11705 objectKeys.map(function (key) {
11706 return selectors[key];
11707 }), function () {
11708 for (var _len3 = arguments.length, values = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
11709 values[_key3] = arguments[_key3];
11710 }
11711
11712 return values.reduce(function (composition, value, index) {
11713 composition[objectKeys[index]] = value;
11714 return composition;
11715 }, {});
11716 });
11717 return resultSelector;
11718 };
11719
11720 /***/ }),
11721
11722 /***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js":
11723 /*!******************************************************************!*\
11724 !*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
11725 \******************************************************************/
11726 /***/ ((module) => {
11727
11728 function _arrayLikeToArray(arr, len) {
11729 if (len == null || len > arr.length) len = arr.length;
11730
11731 for (var i = 0, arr2 = new Array(len); i < len; i++) {
11732 arr2[i] = arr[i];
11733 }
11734
11735 return arr2;
11736 }
11737
11738 module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
11739
11740 /***/ }),
11741
11742 /***/ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js":
11743 /*!****************************************************************!*\
11744 !*** ../node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
11745 \****************************************************************/
11746 /***/ ((module) => {
11747
11748 function _arrayWithHoles(arr) {
11749 if (Array.isArray(arr)) return arr;
11750 }
11751
11752 module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
11753
11754 /***/ }),
11755
11756 /***/ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js":
11757 /*!***********************************************************************!*\
11758 !*** ../node_modules/@babel/runtime/helpers/assertThisInitialized.js ***!
11759 \***********************************************************************/
11760 /***/ ((module) => {
11761
11762 function _assertThisInitialized(self) {
11763 if (self === void 0) {
11764 throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
11765 }
11766
11767 return self;
11768 }
11769
11770 module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports;
11771
11772 /***/ }),
11773
11774 /***/ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js":
11775 /*!******************************************************************!*\
11776 !*** ../node_modules/@babel/runtime/helpers/asyncToGenerator.js ***!
11777 \******************************************************************/
11778 /***/ ((module) => {
11779
11780 function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
11781 try {
11782 var info = gen[key](arg);
11783 var value = info.value;
11784 } catch (error) {
11785 reject(error);
11786 return;
11787 }
11788
11789 if (info.done) {
11790 resolve(value);
11791 } else {
11792 Promise.resolve(value).then(_next, _throw);
11793 }
11794 }
11795
11796 function _asyncToGenerator(fn) {
11797 return function () {
11798 var self = this,
11799 args = arguments;
11800 return new Promise(function (resolve, reject) {
11801 var gen = fn.apply(self, args);
11802
11803 function _next(value) {
11804 asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
11805 }
11806
11807 function _throw(err) {
11808 asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
11809 }
11810
11811 _next(undefined);
11812 });
11813 };
11814 }
11815
11816 module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;
11817
11818 /***/ }),
11819
11820 /***/ "../node_modules/@babel/runtime/helpers/classCallCheck.js":
11821 /*!****************************************************************!*\
11822 !*** ../node_modules/@babel/runtime/helpers/classCallCheck.js ***!
11823 \****************************************************************/
11824 /***/ ((module) => {
11825
11826 function _classCallCheck(instance, Constructor) {
11827 if (!(instance instanceof Constructor)) {
11828 throw new TypeError("Cannot call a class as a function");
11829 }
11830 }
11831
11832 module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
11833
11834 /***/ }),
11835
11836 /***/ "../node_modules/@babel/runtime/helpers/construct.js":
11837 /*!***********************************************************!*\
11838 !*** ../node_modules/@babel/runtime/helpers/construct.js ***!
11839 \***********************************************************/
11840 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
11841
11842 var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js");
11843
11844 var isNativeReflectConstruct = __webpack_require__(/*! ./isNativeReflectConstruct.js */ "../node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js");
11845
11846 function _construct(Parent, args, Class) {
11847 if (isNativeReflectConstruct()) {
11848 module.exports = _construct = Reflect.construct.bind(), module.exports.__esModule = true, module.exports["default"] = module.exports;
11849 } else {
11850 module.exports = _construct = function _construct(Parent, args, Class) {
11851 var a = [null];
11852 a.push.apply(a, args);
11853 var Constructor = Function.bind.apply(Parent, a);
11854 var instance = new Constructor();
11855 if (Class) setPrototypeOf(instance, Class.prototype);
11856 return instance;
11857 }, module.exports.__esModule = true, module.exports["default"] = module.exports;
11858 }
11859
11860 return _construct.apply(null, arguments);
11861 }
11862
11863 module.exports = _construct, module.exports.__esModule = true, module.exports["default"] = module.exports;
11864
11865 /***/ }),
11866
11867 /***/ "../node_modules/@babel/runtime/helpers/createClass.js":
11868 /*!*************************************************************!*\
11869 !*** ../node_modules/@babel/runtime/helpers/createClass.js ***!
11870 \*************************************************************/
11871 /***/ ((module) => {
11872
11873 function _defineProperties(target, props) {
11874 for (var i = 0; i < props.length; i++) {
11875 var descriptor = props[i];
11876 descriptor.enumerable = descriptor.enumerable || false;
11877 descriptor.configurable = true;
11878 if ("value" in descriptor) descriptor.writable = true;
11879 Object.defineProperty(target, descriptor.key, descriptor);
11880 }
11881 }
11882
11883 function _createClass(Constructor, protoProps, staticProps) {
11884 if (protoProps) _defineProperties(Constructor.prototype, protoProps);
11885 if (staticProps) _defineProperties(Constructor, staticProps);
11886 Object.defineProperty(Constructor, "prototype", {
11887 writable: false
11888 });
11889 return Constructor;
11890 }
11891
11892 module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
11893
11894 /***/ }),
11895
11896 /***/ "../node_modules/@babel/runtime/helpers/defineProperty.js":
11897 /*!****************************************************************!*\
11898 !*** ../node_modules/@babel/runtime/helpers/defineProperty.js ***!
11899 \****************************************************************/
11900 /***/ ((module) => {
11901
11902 function _defineProperty(obj, key, value) {
11903 if (key in obj) {
11904 Object.defineProperty(obj, key, {
11905 value: value,
11906 enumerable: true,
11907 configurable: true,
11908 writable: true
11909 });
11910 } else {
11911 obj[key] = value;
11912 }
11913
11914 return obj;
11915 }
11916
11917 module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
11918
11919 /***/ }),
11920
11921 /***/ "../node_modules/@babel/runtime/helpers/get.js":
11922 /*!*****************************************************!*\
11923 !*** ../node_modules/@babel/runtime/helpers/get.js ***!
11924 \*****************************************************/
11925 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
11926
11927 var superPropBase = __webpack_require__(/*! ./superPropBase.js */ "../node_modules/@babel/runtime/helpers/superPropBase.js");
11928
11929 function _get() {
11930 if (typeof Reflect !== "undefined" && Reflect.get) {
11931 module.exports = _get = Reflect.get.bind(), module.exports.__esModule = true, module.exports["default"] = module.exports;
11932 } else {
11933 module.exports = _get = function _get(target, property, receiver) {
11934 var base = superPropBase(target, property);
11935 if (!base) return;
11936 var desc = Object.getOwnPropertyDescriptor(base, property);
11937
11938 if (desc.get) {
11939 return desc.get.call(arguments.length < 3 ? target : receiver);
11940 }
11941
11942 return desc.value;
11943 }, module.exports.__esModule = true, module.exports["default"] = module.exports;
11944 }
11945
11946 return _get.apply(this, arguments);
11947 }
11948
11949 module.exports = _get, module.exports.__esModule = true, module.exports["default"] = module.exports;
11950
11951 /***/ }),
11952
11953 /***/ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js":
11954 /*!****************************************************************!*\
11955 !*** ../node_modules/@babel/runtime/helpers/getPrototypeOf.js ***!
11956 \****************************************************************/
11957 /***/ ((module) => {
11958
11959 function _getPrototypeOf(o) {
11960 module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
11961 return o.__proto__ || Object.getPrototypeOf(o);
11962 }, module.exports.__esModule = true, module.exports["default"] = module.exports;
11963 return _getPrototypeOf(o);
11964 }
11965
11966 module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
11967
11968 /***/ }),
11969
11970 /***/ "../node_modules/@babel/runtime/helpers/inherits.js":
11971 /*!**********************************************************!*\
11972 !*** ../node_modules/@babel/runtime/helpers/inherits.js ***!
11973 \**********************************************************/
11974 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
11975
11976 var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js");
11977
11978 function _inherits(subClass, superClass) {
11979 if (typeof superClass !== "function" && superClass !== null) {
11980 throw new TypeError("Super expression must either be null or a function");
11981 }
11982
11983 subClass.prototype = Object.create(superClass && superClass.prototype, {
11984 constructor: {
11985 value: subClass,
11986 writable: true,
11987 configurable: true
11988 }
11989 });
11990 Object.defineProperty(subClass, "prototype", {
11991 writable: false
11992 });
11993 if (superClass) setPrototypeOf(subClass, superClass);
11994 }
11995
11996 module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports;
11997
11998 /***/ }),
11999
12000 /***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js":
12001 /*!***********************************************************************!*\
12002 !*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
12003 \***********************************************************************/
12004 /***/ ((module) => {
12005
12006 function _interopRequireDefault(obj) {
12007 return obj && obj.__esModule ? obj : {
12008 "default": obj
12009 };
12010 }
12011
12012 module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
12013
12014 /***/ }),
12015
12016 /***/ "../node_modules/@babel/runtime/helpers/isNativeFunction.js":
12017 /*!******************************************************************!*\
12018 !*** ../node_modules/@babel/runtime/helpers/isNativeFunction.js ***!
12019 \******************************************************************/
12020 /***/ ((module) => {
12021
12022 function _isNativeFunction(fn) {
12023 return Function.toString.call(fn).indexOf("[native code]") !== -1;
12024 }
12025
12026 module.exports = _isNativeFunction, module.exports.__esModule = true, module.exports["default"] = module.exports;
12027
12028 /***/ }),
12029
12030 /***/ "../node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js":
12031 /*!**************************************************************************!*\
12032 !*** ../node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js ***!
12033 \**************************************************************************/
12034 /***/ ((module) => {
12035
12036 function _isNativeReflectConstruct() {
12037 if (typeof Reflect === "undefined" || !Reflect.construct) return false;
12038 if (Reflect.construct.sham) return false;
12039 if (typeof Proxy === "function") return true;
12040
12041 try {
12042 Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
12043 return true;
12044 } catch (e) {
12045 return false;
12046 }
12047 }
12048
12049 module.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports["default"] = module.exports;
12050
12051 /***/ }),
12052
12053 /***/ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js":
12054 /*!**********************************************************************!*\
12055 !*** ../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
12056 \**********************************************************************/
12057 /***/ ((module) => {
12058
12059 function _iterableToArrayLimit(arr, i) {
12060 var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
12061
12062 if (_i == null) return;
12063 var _arr = [];
12064 var _n = true;
12065 var _d = false;
12066
12067 var _s, _e;
12068
12069 try {
12070 for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
12071 _arr.push(_s.value);
12072
12073 if (i && _arr.length === i) break;
12074 }
12075 } catch (err) {
12076 _d = true;
12077 _e = err;
12078 } finally {
12079 try {
12080 if (!_n && _i["return"] != null) _i["return"]();
12081 } finally {
12082 if (_d) throw _e;
12083 }
12084 }
12085
12086 return _arr;
12087 }
12088
12089 module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
12090
12091 /***/ }),
12092
12093 /***/ "../node_modules/@babel/runtime/helpers/nonIterableRest.js":
12094 /*!*****************************************************************!*\
12095 !*** ../node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
12096 \*****************************************************************/
12097 /***/ ((module) => {
12098
12099 function _nonIterableRest() {
12100 throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
12101 }
12102
12103 module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
12104
12105 /***/ }),
12106
12107 /***/ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js":
12108 /*!***************************************************************************!*\
12109 !*** ../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***!
12110 \***************************************************************************/
12111 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
12112
12113 var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]);
12114
12115 var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js");
12116
12117 function _possibleConstructorReturn(self, call) {
12118 if (call && (_typeof(call) === "object" || typeof call === "function")) {
12119 return call;
12120 } else if (call !== void 0) {
12121 throw new TypeError("Derived constructors may only return object or undefined");
12122 }
12123
12124 return assertThisInitialized(self);
12125 }
12126
12127 module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports;
12128
12129 /***/ }),
12130
12131 /***/ "../node_modules/@babel/runtime/helpers/regeneratorRuntime.js":
12132 /*!********************************************************************!*\
12133 !*** ../node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***!
12134 \********************************************************************/
12135 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
12136
12137 var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]);
12138
12139 function _regeneratorRuntime() {
12140 "use strict";
12141 /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
12142
12143 module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
12144 return exports;
12145 }, module.exports.__esModule = true, module.exports["default"] = module.exports;
12146 var exports = {},
12147 Op = Object.prototype,
12148 hasOwn = Op.hasOwnProperty,
12149 $Symbol = "function" == typeof Symbol ? Symbol : {},
12150 iteratorSymbol = $Symbol.iterator || "@@iterator",
12151 asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
12152 toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
12153
12154 function define(obj, key, value) {
12155 return Object.defineProperty(obj, key, {
12156 value: value,
12157 enumerable: !0,
12158 configurable: !0,
12159 writable: !0
12160 }), obj[key];
12161 }
12162
12163 try {
12164 define({}, "");
12165 } catch (err) {
12166 define = function define(obj, key, value) {
12167 return obj[key] = value;
12168 };
12169 }
12170
12171 function wrap(innerFn, outerFn, self, tryLocsList) {
12172 var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
12173 generator = Object.create(protoGenerator.prototype),
12174 context = new Context(tryLocsList || []);
12175 return generator._invoke = function (innerFn, self, context) {
12176 var state = "suspendedStart";
12177 return function (method, arg) {
12178 if ("executing" === state) throw new Error("Generator is already running");
12179
12180 if ("completed" === state) {
12181 if ("throw" === method) throw arg;
12182 return doneResult();
12183 }
12184
12185 for (context.method = method, context.arg = arg;;) {
12186 var delegate = context.delegate;
12187
12188 if (delegate) {
12189 var delegateResult = maybeInvokeDelegate(delegate, context);
12190
12191 if (delegateResult) {
12192 if (delegateResult === ContinueSentinel) continue;
12193 return delegateResult;
12194 }
12195 }
12196
12197 if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
12198 if ("suspendedStart" === state) throw state = "completed", context.arg;
12199 context.dispatchException(context.arg);
12200 } else "return" === context.method && context.abrupt("return", context.arg);
12201 state = "executing";
12202 var record = tryCatch(innerFn, self, context);
12203
12204 if ("normal" === record.type) {
12205 if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
12206 return {
12207 value: record.arg,
12208 done: context.done
12209 };
12210 }
12211
12212 "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
12213 }
12214 };
12215 }(innerFn, self, context), generator;
12216 }
12217
12218 function tryCatch(fn, obj, arg) {
12219 try {
12220 return {
12221 type: "normal",
12222 arg: fn.call(obj, arg)
12223 };
12224 } catch (err) {
12225 return {
12226 type: "throw",
12227 arg: err
12228 };
12229 }
12230 }
12231
12232 exports.wrap = wrap;
12233 var ContinueSentinel = {};
12234
12235 function Generator() {}
12236
12237 function GeneratorFunction() {}
12238
12239 function GeneratorFunctionPrototype() {}
12240
12241 var IteratorPrototype = {};
12242 define(IteratorPrototype, iteratorSymbol, function () {
12243 return this;
12244 });
12245 var getProto = Object.getPrototypeOf,
12246 NativeIteratorPrototype = getProto && getProto(getProto(values([])));
12247 NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
12248 var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
12249
12250 function defineIteratorMethods(prototype) {
12251 ["next", "throw", "return"].forEach(function (method) {
12252 define(prototype, method, function (arg) {
12253 return this._invoke(method, arg);
12254 });
12255 });
12256 }
12257
12258 function AsyncIterator(generator, PromiseImpl) {
12259 function invoke(method, arg, resolve, reject) {
12260 var record = tryCatch(generator[method], generator, arg);
12261
12262 if ("throw" !== record.type) {
12263 var result = record.arg,
12264 value = result.value;
12265 return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
12266 invoke("next", value, resolve, reject);
12267 }, function (err) {
12268 invoke("throw", err, resolve, reject);
12269 }) : PromiseImpl.resolve(value).then(function (unwrapped) {
12270 result.value = unwrapped, resolve(result);
12271 }, function (error) {
12272 return invoke("throw", error, resolve, reject);
12273 });
12274 }
12275
12276 reject(record.arg);
12277 }
12278
12279 var previousPromise;
12280
12281 this._invoke = function (method, arg) {
12282 function callInvokeWithMethodAndArg() {
12283 return new PromiseImpl(function (resolve, reject) {
12284 invoke(method, arg, resolve, reject);
12285 });
12286 }
12287
12288 return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
12289 };
12290 }
12291
12292 function maybeInvokeDelegate(delegate, context) {
12293 var method = delegate.iterator[context.method];
12294
12295 if (undefined === method) {
12296 if (context.delegate = null, "throw" === context.method) {
12297 if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
12298 context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
12299 }
12300
12301 return ContinueSentinel;
12302 }
12303
12304 var record = tryCatch(method, delegate.iterator, context.arg);
12305 if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
12306 var info = record.arg;
12307 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);
12308 }
12309
12310 function pushTryEntry(locs) {
12311 var entry = {
12312 tryLoc: locs[0]
12313 };
12314 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
12315 }
12316
12317 function resetTryEntry(entry) {
12318 var record = entry.completion || {};
12319 record.type = "normal", delete record.arg, entry.completion = record;
12320 }
12321
12322 function Context(tryLocsList) {
12323 this.tryEntries = [{
12324 tryLoc: "root"
12325 }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
12326 }
12327
12328 function values(iterable) {
12329 if (iterable) {
12330 var iteratorMethod = iterable[iteratorSymbol];
12331 if (iteratorMethod) return iteratorMethod.call(iterable);
12332 if ("function" == typeof iterable.next) return iterable;
12333
12334 if (!isNaN(iterable.length)) {
12335 var i = -1,
12336 next = function next() {
12337 for (; ++i < iterable.length;) {
12338 if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
12339 }
12340
12341 return next.value = undefined, next.done = !0, next;
12342 };
12343
12344 return next.next = next;
12345 }
12346 }
12347
12348 return {
12349 next: doneResult
12350 };
12351 }
12352
12353 function doneResult() {
12354 return {
12355 value: undefined,
12356 done: !0
12357 };
12358 }
12359
12360 return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
12361 var ctor = "function" == typeof genFun && genFun.constructor;
12362 return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
12363 }, exports.mark = function (genFun) {
12364 return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
12365 }, exports.awrap = function (arg) {
12366 return {
12367 __await: arg
12368 };
12369 }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
12370 return this;
12371 }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
12372 void 0 === PromiseImpl && (PromiseImpl = Promise);
12373 var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
12374 return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
12375 return result.done ? result.value : iter.next();
12376 });
12377 }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
12378 return this;
12379 }), define(Gp, "toString", function () {
12380 return "[object Generator]";
12381 }), exports.keys = function (object) {
12382 var keys = [];
12383
12384 for (var key in object) {
12385 keys.push(key);
12386 }
12387
12388 return keys.reverse(), function next() {
12389 for (; keys.length;) {
12390 var key = keys.pop();
12391 if (key in object) return next.value = key, next.done = !1, next;
12392 }
12393
12394 return next.done = !0, next;
12395 };
12396 }, exports.values = values, Context.prototype = {
12397 constructor: Context,
12398 reset: function reset(skipTempReset) {
12399 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) {
12400 "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
12401 }
12402 },
12403 stop: function stop() {
12404 this.done = !0;
12405 var rootRecord = this.tryEntries[0].completion;
12406 if ("throw" === rootRecord.type) throw rootRecord.arg;
12407 return this.rval;
12408 },
12409 dispatchException: function dispatchException(exception) {
12410 if (this.done) throw exception;
12411 var context = this;
12412
12413 function handle(loc, caught) {
12414 return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
12415 }
12416
12417 for (var i = this.tryEntries.length - 1; i >= 0; --i) {
12418 var entry = this.tryEntries[i],
12419 record = entry.completion;
12420 if ("root" === entry.tryLoc) return handle("end");
12421
12422 if (entry.tryLoc <= this.prev) {
12423 var hasCatch = hasOwn.call(entry, "catchLoc"),
12424 hasFinally = hasOwn.call(entry, "finallyLoc");
12425
12426 if (hasCatch && hasFinally) {
12427 if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
12428 if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
12429 } else if (hasCatch) {
12430 if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
12431 } else {
12432 if (!hasFinally) throw new Error("try statement without catch or finally");
12433 if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
12434 }
12435 }
12436 }
12437 },
12438 abrupt: function abrupt(type, arg) {
12439 for (var i = this.tryEntries.length - 1; i >= 0; --i) {
12440 var entry = this.tryEntries[i];
12441
12442 if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
12443 var finallyEntry = entry;
12444 break;
12445 }
12446 }
12447
12448 finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
12449 var record = finallyEntry ? finallyEntry.completion : {};
12450 return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
12451 },
12452 complete: function complete(record, afterLoc) {
12453 if ("throw" === record.type) throw record.arg;
12454 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;
12455 },
12456 finish: function finish(finallyLoc) {
12457 for (var i = this.tryEntries.length - 1; i >= 0; --i) {
12458 var entry = this.tryEntries[i];
12459 if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
12460 }
12461 },
12462 "catch": function _catch(tryLoc) {
12463 for (var i = this.tryEntries.length - 1; i >= 0; --i) {
12464 var entry = this.tryEntries[i];
12465
12466 if (entry.tryLoc === tryLoc) {
12467 var record = entry.completion;
12468
12469 if ("throw" === record.type) {
12470 var thrown = record.arg;
12471 resetTryEntry(entry);
12472 }
12473
12474 return thrown;
12475 }
12476 }
12477
12478 throw new Error("illegal catch attempt");
12479 },
12480 delegateYield: function delegateYield(iterable, resultName, nextLoc) {
12481 return this.delegate = {
12482 iterator: values(iterable),
12483 resultName: resultName,
12484 nextLoc: nextLoc
12485 }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
12486 }
12487 }, exports;
12488 }
12489
12490 module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
12491
12492 /***/ }),
12493
12494 /***/ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js":
12495 /*!****************************************************************!*\
12496 !*** ../node_modules/@babel/runtime/helpers/setPrototypeOf.js ***!
12497 \****************************************************************/
12498 /***/ ((module) => {
12499
12500 function _setPrototypeOf(o, p) {
12501 module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
12502 o.__proto__ = p;
12503 return o;
12504 }, module.exports.__esModule = true, module.exports["default"] = module.exports;
12505 return _setPrototypeOf(o, p);
12506 }
12507
12508 module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
12509
12510 /***/ }),
12511
12512 /***/ "../node_modules/@babel/runtime/helpers/slicedToArray.js":
12513 /*!***************************************************************!*\
12514 !*** ../node_modules/@babel/runtime/helpers/slicedToArray.js ***!
12515 \***************************************************************/
12516 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
12517
12518 var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js");
12519
12520 var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js");
12521
12522 var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js");
12523
12524 var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "../node_modules/@babel/runtime/helpers/nonIterableRest.js");
12525
12526 function _slicedToArray(arr, i) {
12527 return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
12528 }
12529
12530 module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
12531
12532 /***/ }),
12533
12534 /***/ "../node_modules/@babel/runtime/helpers/superPropBase.js":
12535 /*!***************************************************************!*\
12536 !*** ../node_modules/@babel/runtime/helpers/superPropBase.js ***!
12537 \***************************************************************/
12538 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
12539
12540 var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js");
12541
12542 function _superPropBase(object, property) {
12543 while (!Object.prototype.hasOwnProperty.call(object, property)) {
12544 object = getPrototypeOf(object);
12545 if (object === null) break;
12546 }
12547
12548 return object;
12549 }
12550
12551 module.exports = _superPropBase, module.exports.__esModule = true, module.exports["default"] = module.exports;
12552
12553 /***/ }),
12554
12555 /***/ "../node_modules/@babel/runtime/helpers/typeof.js":
12556 /*!********************************************************!*\
12557 !*** ../node_modules/@babel/runtime/helpers/typeof.js ***!
12558 \********************************************************/
12559 /***/ ((module) => {
12560
12561 function _typeof(obj) {
12562 "@babel/helpers - typeof";
12563
12564 return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
12565 return typeof obj;
12566 } : function (obj) {
12567 return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
12568 }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
12569 }
12570
12571 module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
12572
12573 /***/ }),
12574
12575 /***/ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js":
12576 /*!****************************************************************************!*\
12577 !*** ../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
12578 \****************************************************************************/
12579 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
12580
12581 var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js");
12582
12583 function _unsupportedIterableToArray(o, minLen) {
12584 if (!o) return;
12585 if (typeof o === "string") return arrayLikeToArray(o, minLen);
12586 var n = Object.prototype.toString.call(o).slice(8, -1);
12587 if (n === "Object" && o.constructor) n = o.constructor.name;
12588 if (n === "Map" || n === "Set") return Array.from(o);
12589 if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
12590 }
12591
12592 module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
12593
12594 /***/ }),
12595
12596 /***/ "../node_modules/@babel/runtime/helpers/wrapNativeSuper.js":
12597 /*!*****************************************************************!*\
12598 !*** ../node_modules/@babel/runtime/helpers/wrapNativeSuper.js ***!
12599 \*****************************************************************/
12600 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
12601
12602 var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js");
12603
12604 var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js");
12605
12606 var isNativeFunction = __webpack_require__(/*! ./isNativeFunction.js */ "../node_modules/@babel/runtime/helpers/isNativeFunction.js");
12607
12608 var construct = __webpack_require__(/*! ./construct.js */ "../node_modules/@babel/runtime/helpers/construct.js");
12609
12610 function _wrapNativeSuper(Class) {
12611 var _cache = typeof Map === "function" ? new Map() : undefined;
12612
12613 module.exports = _wrapNativeSuper = function _wrapNativeSuper(Class) {
12614 if (Class === null || !isNativeFunction(Class)) return Class;
12615
12616 if (typeof Class !== "function") {
12617 throw new TypeError("Super expression must either be null or a function");
12618 }
12619
12620 if (typeof _cache !== "undefined") {
12621 if (_cache.has(Class)) return _cache.get(Class);
12622
12623 _cache.set(Class, Wrapper);
12624 }
12625
12626 function Wrapper() {
12627 return construct(Class, arguments, getPrototypeOf(this).constructor);
12628 }
12629
12630 Wrapper.prototype = Object.create(Class.prototype, {
12631 constructor: {
12632 value: Wrapper,
12633 enumerable: false,
12634 writable: true,
12635 configurable: true
12636 }
12637 });
12638 return setPrototypeOf(Wrapper, Class);
12639 }, module.exports.__esModule = true, module.exports["default"] = module.exports;
12640 return _wrapNativeSuper(Class);
12641 }
12642
12643 module.exports = _wrapNativeSuper, module.exports.__esModule = true, module.exports["default"] = module.exports;
12644
12645 /***/ }),
12646
12647 /***/ "../node_modules/@babel/runtime/regenerator/index.js":
12648 /*!***********************************************************!*\
12649 !*** ../node_modules/@babel/runtime/regenerator/index.js ***!
12650 \***********************************************************/
12651 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
12652
12653 // TODO(Babel 8): Remove this file.
12654
12655 var runtime = __webpack_require__(/*! ../helpers/regeneratorRuntime */ "../node_modules/@babel/runtime/helpers/regeneratorRuntime.js")();
12656 module.exports = runtime;
12657
12658 // Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=
12659 try {
12660 regeneratorRuntime = runtime;
12661 } catch (accidentalStrictMode) {
12662 if (typeof globalThis === "object") {
12663 globalThis.regeneratorRuntime = runtime;
12664 } else {
12665 Function("r", "regeneratorRuntime = r")(runtime);
12666 }
12667 }
12668
12669
12670 /***/ }),
12671
12672 /***/ "../node_modules/@babel/runtime/helpers/esm/defineProperty.js":
12673 /*!********************************************************************!*\
12674 !*** ../node_modules/@babel/runtime/helpers/esm/defineProperty.js ***!
12675 \********************************************************************/
12676 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
12677
12678 "use strict";
12679 __webpack_require__.r(__webpack_exports__);
12680 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12681 /* harmony export */ "default": () => (/* binding */ _defineProperty)
12682 /* harmony export */ });
12683 function _defineProperty(obj, key, value) {
12684 if (key in obj) {
12685 Object.defineProperty(obj, key, {
12686 value: value,
12687 enumerable: true,
12688 configurable: true,
12689 writable: true
12690 });
12691 } else {
12692 obj[key] = value;
12693 }
12694
12695 return obj;
12696 }
12697
12698 /***/ }),
12699
12700 /***/ "../node_modules/@babel/runtime/helpers/esm/objectSpread2.js":
12701 /*!*******************************************************************!*\
12702 !*** ../node_modules/@babel/runtime/helpers/esm/objectSpread2.js ***!
12703 \*******************************************************************/
12704 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
12705
12706 "use strict";
12707 __webpack_require__.r(__webpack_exports__);
12708 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12709 /* harmony export */ "default": () => (/* binding */ _objectSpread2)
12710 /* harmony export */ });
12711 /* harmony import */ var _defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defineProperty.js */ "../node_modules/@babel/runtime/helpers/esm/defineProperty.js");
12712
12713
12714 function ownKeys(object, enumerableOnly) {
12715 var keys = Object.keys(object);
12716
12717 if (Object.getOwnPropertySymbols) {
12718 var symbols = Object.getOwnPropertySymbols(object);
12719 enumerableOnly && (symbols = symbols.filter(function (sym) {
12720 return Object.getOwnPropertyDescriptor(object, sym).enumerable;
12721 })), keys.push.apply(keys, symbols);
12722 }
12723
12724 return keys;
12725 }
12726
12727 function _objectSpread2(target) {
12728 for (var i = 1; i < arguments.length; i++) {
12729 var source = null != arguments[i] ? arguments[i] : {};
12730 i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
12731 (0,_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__["default"])(target, key, source[key]);
12732 }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
12733 Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
12734 });
12735 }
12736
12737 return target;
12738 }
12739
12740 /***/ }),
12741
12742 /***/ "../node_modules/immer/dist/immer.esm.mjs":
12743 /*!************************************************!*\
12744 !*** ../node_modules/immer/dist/immer.esm.mjs ***!
12745 \************************************************/
12746 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
12747
12748 "use strict";
12749 __webpack_require__.r(__webpack_exports__);
12750 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12751 /* harmony export */ "Immer": () => (/* binding */ un),
12752 /* harmony export */ "applyPatches": () => (/* binding */ pn),
12753 /* harmony export */ "castDraft": () => (/* binding */ K),
12754 /* harmony export */ "castImmutable": () => (/* binding */ $),
12755 /* harmony export */ "createDraft": () => (/* binding */ ln),
12756 /* harmony export */ "current": () => (/* binding */ D),
12757 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
12758 /* harmony export */ "enableAllPlugins": () => (/* binding */ J),
12759 /* harmony export */ "enableES5": () => (/* binding */ N),
12760 /* harmony export */ "enableMapSet": () => (/* binding */ C),
12761 /* harmony export */ "enablePatches": () => (/* binding */ T),
12762 /* harmony export */ "finishDraft": () => (/* binding */ dn),
12763 /* harmony export */ "freeze": () => (/* binding */ d),
12764 /* harmony export */ "immerable": () => (/* binding */ L),
12765 /* harmony export */ "isDraft": () => (/* binding */ r),
12766 /* harmony export */ "isDraftable": () => (/* binding */ t),
12767 /* harmony export */ "nothing": () => (/* binding */ H),
12768 /* harmony export */ "original": () => (/* binding */ e),
12769 /* harmony export */ "produce": () => (/* binding */ fn),
12770 /* harmony export */ "produceWithPatches": () => (/* binding */ cn),
12771 /* harmony export */ "setAutoFreeze": () => (/* binding */ sn),
12772 /* harmony export */ "setUseProxies": () => (/* binding */ vn)
12773 /* harmony export */ });
12774 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);
12775 //# sourceMappingURL=immer.esm.js.map
12776
12777
12778 /***/ })
12779
12780 /******/ });
12781 /************************************************************************/
12782 /******/ // The module cache
12783 /******/ var __webpack_module_cache__ = {};
12784 /******/
12785 /******/ // The require function
12786 /******/ function __webpack_require__(moduleId) {
12787 /******/ // Check if module is in cache
12788 /******/ var cachedModule = __webpack_module_cache__[moduleId];
12789 /******/ if (cachedModule !== undefined) {
12790 /******/ return cachedModule.exports;
12791 /******/ }
12792 /******/ // Create a new module (and put it into the cache)
12793 /******/ var module = __webpack_module_cache__[moduleId] = {
12794 /******/ // no module.id needed
12795 /******/ // no module.loaded needed
12796 /******/ exports: {}
12797 /******/ };
12798 /******/
12799 /******/ // Execute the module function
12800 /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
12801 /******/
12802 /******/ // Return the exports of the module
12803 /******/ return module.exports;
12804 /******/ }
12805 /******/
12806 /************************************************************************/
12807 /******/ /* webpack/runtime/define property getters */
12808 /******/ (() => {
12809 /******/ // define getter functions for harmony exports
12810 /******/ __webpack_require__.d = (exports, definition) => {
12811 /******/ for(var key in definition) {
12812 /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
12813 /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
12814 /******/ }
12815 /******/ }
12816 /******/ };
12817 /******/ })();
12818 /******/
12819 /******/ /* webpack/runtime/hasOwnProperty shorthand */
12820 /******/ (() => {
12821 /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
12822 /******/ })();
12823 /******/
12824 /******/ /* webpack/runtime/make namespace object */
12825 /******/ (() => {
12826 /******/ // define __esModule on exports
12827 /******/ __webpack_require__.r = (exports) => {
12828 /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
12829 /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
12830 /******/ }
12831 /******/ Object.defineProperty(exports, '__esModule', { value: true });
12832 /******/ };
12833 /******/ })();
12834 /******/
12835 /************************************************************************/
12836 var __webpack_exports__ = {};
12837 // This entry need to be wrapped in an IIFE because it need to be in strict mode.
12838 (() => {
12839 "use strict";
12840 /*!*********************************************!*\
12841 !*** ../modules/web-cli/assets/js/index.js ***!
12842 \*********************************************/
12843
12844
12845 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
12846
12847 var _api = _interopRequireDefault(__webpack_require__(/*! ./api */ "../modules/web-cli/assets/js/api.js"));
12848
12849 window.$e = new _api.default();
12850 })();
12851
12852 /******/ })()
12853 ;
12854 //# sourceMappingURL=web-cli.js.map