PluginProbe
Elementor Website Builder – more than just a page builder / 3.9.2
Elementor Website Builder – more than just a page builder v3.9.2
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 / editor-document.js

editor-document.js in Elementor Website Builder – more than just a page builder 3.9.2, at assets/js/editor-document.js

1,651 lines 71.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /*! elementor - v3.9.2 - 21-12-2022 */
2 /******/ (() => { // webpackBootstrap
3 /******/ var __webpack_modules__ = ({
4
5 /***/ "../assets/dev/js/editor/command-bases/command-container-base.js":
6 /*!***********************************************************************!*\
7 !*** ../assets/dev/js/editor/command-bases/command-container-base.js ***!
8 \***********************************************************************/
9 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
10
11 "use strict";
12
13
14 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
15 Object.defineProperty(exports, "__esModule", ({
16 value: true
17 }));
18 exports["default"] = void 0;
19 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
20 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
21 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
22 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
23 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
24 var _commandBase = _interopRequireDefault(__webpack_require__(/*! elementor-api/modules/command-base */ "../modules/web-cli/assets/js/modules/command-base.js"));
25 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); }; }
26 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; } }
27 /**
28 * @name $e.modules.editor.CommandContainerBase
29 */
30 var CommandContainerBase = /*#__PURE__*/function (_CommandBase) {
31 (0, _inherits2.default)(CommandContainerBase, _CommandBase);
32 var _super = _createSuper(CommandContainerBase);
33 function CommandContainerBase() {
34 (0, _classCallCheck2.default)(this, CommandContainerBase);
35 return _super.apply(this, arguments);
36 }
37 (0, _createClass2.default)(CommandContainerBase, [{
38 key: "requireContainer",
39 value:
40 /**
41 * Function requireContainer().
42 *
43 * Validate `arg.container` & `arg.containers`.
44 *
45 * @param {{}} args
46 *
47 * @throws {Error}
48 */
49 function requireContainer() {
50 var _this = this;
51 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.args;
52 if (!args.container && !args.containers) {
53 throw Error('container or containers are required.');
54 }
55 if (args.container && args.containers) {
56 throw Error('container and containers cannot go together please select one of them.');
57 }
58 var containers = args.containers || [args.container];
59 containers.forEach(function (container) {
60 _this.requireArgumentInstance('container', elementorModules.editor.Container, {
61 container: container
62 });
63 });
64 }
65 }], [{
66 key: "getInstanceType",
67 value: function getInstanceType() {
68 return 'CommandContainerBase';
69 }
70 }]);
71 return CommandContainerBase;
72 }(_commandBase.default);
73 exports["default"] = CommandContainerBase;
74
75 /***/ }),
76
77 /***/ "../assets/dev/js/editor/command-bases/command-container-internal-base.js":
78 /*!********************************************************************************!*\
79 !*** ../assets/dev/js/editor/command-bases/command-container-internal-base.js ***!
80 \********************************************************************************/
81 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
82
83 "use strict";
84
85
86 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
87 Object.defineProperty(exports, "__esModule", ({
88 value: true
89 }));
90 exports["default"] = void 0;
91 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
92 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
93 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
94 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
95 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
96 var _commandContainerBase = _interopRequireDefault(__webpack_require__(/*! ./command-container-base */ "../assets/dev/js/editor/command-bases/command-container-base.js"));
97 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); }; }
98 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; } }
99 /**
100 * @name $e.modules.editor.CommandContainerInternalBase
101 */
102 var CommandContainerInternalBase = /*#__PURE__*/function (_CommandContainerBase) {
103 (0, _inherits2.default)(CommandContainerInternalBase, _CommandContainerBase);
104 var _super = _createSuper(CommandContainerInternalBase);
105 function CommandContainerInternalBase(args) {
106 (0, _classCallCheck2.default)(this, CommandContainerInternalBase);
107 return _super.call(this, args, $e.commandsInternal);
108 }
109 (0, _createClass2.default)(CommandContainerInternalBase, null, [{
110 key: "getInstanceType",
111 value: function getInstanceType() {
112 return 'CommandContainerInternalBase';
113 }
114 }]);
115 return CommandContainerInternalBase;
116 }(_commandContainerBase.default);
117 exports["default"] = CommandContainerInternalBase;
118
119 /***/ }),
120
121 /***/ "../assets/dev/js/editor/document/command-bases/command-history-base.js":
122 /*!******************************************************************************!*\
123 !*** ../assets/dev/js/editor/document/command-bases/command-history-base.js ***!
124 \******************************************************************************/
125 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
126
127 "use strict";
128
129
130 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
131 Object.defineProperty(exports, "__esModule", ({
132 value: true
133 }));
134 exports["default"] = void 0;
135 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
136 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
137 var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js"));
138 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
139 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
140 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
141 var _commandContainerBase = _interopRequireDefault(__webpack_require__(/*! elementor-editor/command-bases/command-container-base */ "../assets/dev/js/editor/command-bases/command-container-base.js"));
142 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); }; }
143 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; } }
144 /**
145 * @name $e.modules.editor.document.CommandHistoryBase
146 */
147 var CommandHistoryBase = /*#__PURE__*/function (_CommandContainerBase) {
148 (0, _inherits2.default)(CommandHistoryBase, _CommandContainerBase);
149 var _super = _createSuper(CommandHistoryBase);
150 function CommandHistoryBase() {
151 (0, _classCallCheck2.default)(this, CommandHistoryBase);
152 return _super.apply(this, arguments);
153 }
154 (0, _createClass2.default)(CommandHistoryBase, [{
155 key: "initialize",
156 value: function initialize() {
157 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
158 var _args$options = args.options,
159 options = _args$options === void 0 ? {} : _args$options,
160 _options$useHistory = options.useHistory,
161 useHistory = _options$useHistory === void 0 ? true : _options$useHistory;
162 if (useHistory) {
163 /**
164 * Get History from child command.
165 *
166 * @type {{}|boolean}
167 */
168 this.history = this.getHistory(args);
169
170 /**
171 * @type {number|boolean}
172 */
173 this.historyId = false;
174 }
175 }
176
177 // eslint-disable-next-line jsdoc/require-returns-check
178 /**
179 * Function getHistory().
180 *
181 * Get history object from child, do nothing if it false.
182 *
183 * @param {*} [args={}]
184 *
185 * @return {({}|boolean)} history object
186 */
187 }, {
188 key: "getHistory",
189 value: function getHistory() {
190 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
191 // eslint-disable-line no-unused-vars
192 elementorModules.ForceMethodImplementation();
193 }
194
195 /**
196 * Function isHistoryActive().
197 *
198 * Return `elementor.documents.getCurrent().history.getActive()`.
199 *
200 * @return {boolean} is history active
201 */
202 }, {
203 key: "isHistoryActive",
204 value: function isHistoryActive() {
205 return elementor.documents.getCurrent().history.getActive();
206 }
207 }, {
208 key: "onBeforeRun",
209 value: function onBeforeRun(args) {
210 (0, _get2.default)((0, _getPrototypeOf2.default)(CommandHistoryBase.prototype), "onBeforeRun", this).call(this, args);
211 if (this.history && this.isHistoryActive()) {
212 this.historyId = $e.internal('document/history/start-log', this.history);
213 }
214 }
215 }, {
216 key: "onAfterRun",
217 value: function onAfterRun(args, result) {
218 (0, _get2.default)((0, _getPrototypeOf2.default)(CommandHistoryBase.prototype), "onAfterRun", this).call(this, args, result);
219 if (this.history && this.isHistoryActive()) {
220 $e.internal('document/history/end-log', {
221 id: this.historyId
222 });
223 }
224 }
225 }, {
226 key: "onAfterApply",
227 value: function onAfterApply() {
228 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
229 var result = arguments.length > 1 ? arguments[1] : undefined;
230 (0, _get2.default)((0, _getPrototypeOf2.default)(CommandHistoryBase.prototype), "onAfterApply", this).call(this, args, result);
231 if (this.isDataChanged()) {
232 $e.internal('document/save/set-is-modified', {
233 status: true
234 });
235 }
236 }
237 }, {
238 key: "onCatchApply",
239 value: function onCatchApply(e) {
240 // Rollback history on failure.
241 if (e instanceof $e.modules.HookBreak && this.historyId) {
242 $e.internal('document/history/delete-log', {
243 id: this.historyId
244 });
245 }
246 (0, _get2.default)((0, _getPrototypeOf2.default)(CommandHistoryBase.prototype), "onCatchApply", this).call(this, e);
247 }
248 }, {
249 key: "isDataChanged",
250 value: function isDataChanged() {
251 // All the commands who use history are commands that changing the data.
252 return true;
253 }
254 }], [{
255 key: "getInstanceType",
256 value: function getInstanceType() {
257 return 'CommandHistoryBase';
258 }
259 }]);
260 return CommandHistoryBase;
261 }(_commandContainerBase.default);
262 exports["default"] = CommandHistoryBase;
263
264 /***/ }),
265
266 /***/ "../assets/dev/js/editor/document/command-bases/command-history-debounce-base.js":
267 /*!***************************************************************************************!*\
268 !*** ../assets/dev/js/editor/document/command-bases/command-history-debounce-base.js ***!
269 \***************************************************************************************/
270 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
271
272 "use strict";
273
274
275 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
276 Object.defineProperty(exports, "__esModule", ({
277 value: true
278 }));
279 exports.getDefaultDebounceDelay = exports["default"] = exports.DEFAULT_DEBOUNCE_DELAY = void 0;
280 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
281 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
282 var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js"));
283 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
284 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
285 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
286 var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
287 var _commandHistoryBase = _interopRequireDefault(__webpack_require__(/*! ./command-history-base */ "../assets/dev/js/editor/document/command-bases/command-history-base.js"));
288 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); }; }
289 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; } }
290 var DEFAULT_DEBOUNCE_DELAY = 800;
291
292 /**
293 * Function getDefaultDebounceDelay().
294 *
295 * Returns default debounce delay time, if exists in config override.
296 *
297 * @return {number} default debounce delay time
298 */
299 exports.DEFAULT_DEBOUNCE_DELAY = DEFAULT_DEBOUNCE_DELAY;
300 var getDefaultDebounceDelay = function getDefaultDebounceDelay() {
301 var result = DEFAULT_DEBOUNCE_DELAY;
302 if (elementor.config.document && undefined !== elementor.config.document.debounceDelay) {
303 result = elementor.config.document.debounceDelay;
304 }
305 return result;
306 };
307
308 /**
309 * @name $e.modules.editor.document.CommandHistoryDebounceBase
310 */
311 exports.getDefaultDebounceDelay = getDefaultDebounceDelay;
312 var CommandHistoryDebounceBase = /*#__PURE__*/function (_CommandHistoryBase) {
313 (0, _inherits2.default)(CommandHistoryDebounceBase, _CommandHistoryBase);
314 var _super = _createSuper(CommandHistoryDebounceBase);
315 function CommandHistoryDebounceBase() {
316 (0, _classCallCheck2.default)(this, CommandHistoryDebounceBase);
317 return _super.apply(this, arguments);
318 }
319 (0, _createClass2.default)(CommandHistoryDebounceBase, [{
320 key: "initialize",
321 value: function initialize(args) {
322 var _args$options = args.options,
323 options = _args$options === void 0 ? {} : _args$options;
324 (0, _get2.default)((0, _getPrototypeOf2.default)(CommandHistoryDebounceBase.prototype), "initialize", this).call(this, args);
325 if (!this.constructor.debounce) {
326 this.constructor.debounce = _.debounce(function (fn) {
327 return fn();
328 }, getDefaultDebounceDelay());
329 }
330
331 // If its head command, and not called within another command.
332 if (1 === $e.commands.currentTrace.length || options.debounce) {
333 this.isDebounceRequired = true;
334 }
335 }
336 }, {
337 key: "onBeforeRun",
338 value: function onBeforeRun(args) {
339 $e.modules.CommandBase.prototype.onBeforeRun.call(this, args);
340 if (this.history && this.isHistoryActive()) {
341 $e.internal('document/history/add-transaction', this.history);
342 }
343 }
344 }, {
345 key: "onAfterRun",
346 value: function onAfterRun(args, result) {
347 $e.modules.CommandBase.prototype.onAfterRun.call(this, args, result);
348 if (this.isHistoryActive()) {
349 if (this.isDebounceRequired) {
350 this.constructor.debounce(function () {
351 return $e.internal('document/history/end-transaction');
352 });
353 } else {
354 $e.internal('document/history/end-transaction');
355 }
356 }
357 }
358 }, {
359 key: "onCatchApply",
360 value: function onCatchApply(e) {
361 $e.modules.CommandBase.prototype.onCatchApply.call(this, e);
362
363 // Rollback history on failure.
364 if (e instanceof $e.modules.HookBreak && this.history) {
365 if (this.isDebounceRequired) {
366 // `clear-transaction` is under debounce, because it should `clear-transaction` after `end-transaction`.
367 this.constructor.debounce(function () {
368 return $e.internal('document/history/clear-transaction');
369 });
370 } else {
371 $e.internal('document/history/clear-transaction');
372 }
373 }
374 }
375 }], [{
376 key: "getInstanceType",
377 value:
378 /**
379 * Function debounce().
380 *
381 * Will debounce every function you pass in, at the same debounce flow.
382 *
383 * @param {Function}
384 */
385
386 function getInstanceType() {
387 return 'CommandHistoryDebounceBase';
388 }
389 }]);
390 return CommandHistoryDebounceBase;
391 }(_commandHistoryBase.default);
392 exports["default"] = CommandHistoryDebounceBase;
393 (0, _defineProperty2.default)(CommandHistoryDebounceBase, "debounce", undefined);
394
395 /***/ }),
396
397 /***/ "../assets/dev/js/editor/utils/is-instanceof.js":
398 /*!******************************************************!*\
399 !*** ../assets/dev/js/editor/utils/is-instanceof.js ***!
400 \******************************************************/
401 /***/ ((__unused_webpack_module, exports) => {
402
403 "use strict";
404
405
406 Object.defineProperty(exports, "__esModule", ({
407 value: true
408 }));
409 exports["default"] = void 0;
410 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; } } }; }
411 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); }
412 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; }
413 /**
414 * Some FileAPI objects such as FileList, DataTransferItem and DataTransferItemList has inconsistency with the retrieved
415 * object (from events, etc.) and the actual JavaScript object so a regular instanceof doesn't work. This function can
416 * check whether it's instanceof by using the objects constructor and prototype names.
417 *
418 * @param object
419 * @param constructors
420 * @return {boolean}
421 */
422 var _default = function _default(object, constructors) {
423 constructors = Array.isArray(constructors) ? constructors : [constructors];
424 var _iterator = _createForOfIteratorHelper(constructors),
425 _step;
426 try {
427 for (_iterator.s(); !(_step = _iterator.n()).done;) {
428 var _constructor = _step.value;
429 if (object.constructor.name === _constructor.prototype[Symbol.toStringTag]) {
430 return true;
431 }
432 }
433 } catch (err) {
434 _iterator.e(err);
435 } finally {
436 _iterator.f();
437 }
438 return false;
439 };
440 exports["default"] = _default;
441
442 /***/ }),
443
444 /***/ "../assets/dev/js/modules/imports/args-object.js":
445 /*!*******************************************************!*\
446 !*** ../assets/dev/js/modules/imports/args-object.js ***!
447 \*******************************************************/
448 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
449
450 "use strict";
451
452
453 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
454 Object.defineProperty(exports, "__esModule", ({
455 value: true
456 }));
457 exports["default"] = void 0;
458 var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"));
459 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
460 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
461 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
462 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
463 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
464 var _instanceType = _interopRequireDefault(__webpack_require__(/*! ./instance-type */ "../assets/dev/js/modules/imports/instance-type.js"));
465 var _isInstanceof = _interopRequireDefault(__webpack_require__(/*! ../../editor/utils/is-instanceof */ "../assets/dev/js/editor/utils/is-instanceof.js"));
466 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); }; }
467 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; } }
468 var ArgsObject = /*#__PURE__*/function (_InstanceType) {
469 (0, _inherits2.default)(ArgsObject, _InstanceType);
470 var _super = _createSuper(ArgsObject);
471 /**
472 * Function constructor().
473 *
474 * Create ArgsObject.
475 *
476 * @param {{}} args
477 */
478 function ArgsObject(args) {
479 var _this;
480 (0, _classCallCheck2.default)(this, ArgsObject);
481 _this = _super.call(this);
482 _this.args = args;
483 return _this;
484 }
485
486 /**
487 * Function requireArgument().
488 *
489 * Validate property in args.
490 *
491 * @param {string} property
492 * @param {{}} args
493 *
494 * @throws {Error}
495 *
496 */
497 (0, _createClass2.default)(ArgsObject, [{
498 key: "requireArgument",
499 value: function requireArgument(property) {
500 var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.args;
501 if (!Object.prototype.hasOwnProperty.call(args, property)) {
502 throw Error("".concat(property, " is required."));
503 }
504 }
505
506 /**
507 * Function requireArgumentType().
508 *
509 * Validate property in args using `type === typeof(args.whatever)`.
510 *
511 * @param {string} property
512 * @param {string} type
513 * @param {{}} args
514 *
515 * @throws {Error}
516 *
517 */
518 }, {
519 key: "requireArgumentType",
520 value: function requireArgumentType(property, type) {
521 var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.args;
522 this.requireArgument(property, args);
523 if ((0, _typeof2.default)(args[property]) !== type) {
524 throw Error("".concat(property, " invalid type: ").concat(type, "."));
525 }
526 }
527
528 /**
529 * Function requireArgumentInstance().
530 *
531 * Validate property in args using `args.whatever instanceof instance`.
532 *
533 * @param {string} property
534 * @param {*} instance
535 * @param {{}} args
536 *
537 * @throws {Error}
538 *
539 */
540 }, {
541 key: "requireArgumentInstance",
542 value: function requireArgumentInstance(property, instance) {
543 var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.args;
544 this.requireArgument(property, args);
545 if (!(args[property] instanceof instance) && !(0, _isInstanceof.default)(args[property], instance)) {
546 throw Error("".concat(property, " invalid instance."));
547 }
548 }
549
550 /**
551 * Function requireArgumentConstructor().
552 *
553 * Validate property in args using `type === args.whatever.constructor`.
554 *
555 * @param {string} property
556 * @param {*} type
557 * @param {{}} args
558 *
559 * @throws {Error}
560 *
561 */
562 }, {
563 key: "requireArgumentConstructor",
564 value: function requireArgumentConstructor(property, type) {
565 var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.args;
566 this.requireArgument(property, args);
567
568 // Note: Converting the constructor to string in order to avoid equation issues
569 // due to different memory addresses between iframes (window.Object !== window.top.Object).
570 if (args[property].constructor.toString() !== type.prototype.constructor.toString()) {
571 throw Error("".concat(property, " invalid constructor type."));
572 }
573 }
574 }], [{
575 key: "getInstanceType",
576 value: function getInstanceType() {
577 return 'ArgsObject';
578 }
579 }]);
580 return ArgsObject;
581 }(_instanceType.default);
582 exports["default"] = ArgsObject;
583
584 /***/ }),
585
586 /***/ "../assets/dev/js/modules/imports/instance-type.js":
587 /*!*********************************************************!*\
588 !*** ../assets/dev/js/modules/imports/instance-type.js ***!
589 \*********************************************************/
590 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
591
592 "use strict";
593
594
595 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
596 Object.defineProperty(exports, "__esModule", ({
597 value: true
598 }));
599 exports["default"] = void 0;
600 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
601 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
602 var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js"));
603 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
604 var InstanceType = /*#__PURE__*/function (_Symbol$hasInstance) {
605 function InstanceType() {
606 var _this = this;
607 (0, _classCallCheck2.default)(this, InstanceType);
608 // Since anonymous classes sometimes do not get validated by babel, do it manually.
609 var target = this instanceof InstanceType ? this.constructor : void 0;
610 var prototypes = [];
611 while (target.__proto__ && target.__proto__.name) {
612 prototypes.push(target.__proto__);
613 target = target.__proto__;
614 }
615 prototypes.reverse().forEach(function (proto) {
616 return _this instanceof proto;
617 });
618 }
619 (0, _createClass2.default)(InstanceType, null, [{
620 key: _Symbol$hasInstance,
621 value: function value(target) {
622 /**
623 * This is function extending being called each time JS uses instanceOf, since babel use it each time it create new class
624 * its give's opportunity to mange capabilities of instanceOf operator.
625 * saving current class each time will give option later to handle instanceOf manually.
626 */
627 var result = (0, _get2.default)((0, _getPrototypeOf2.default)(InstanceType), Symbol.hasInstance, this).call(this, target);
628
629 // Act normal when validate a class, which does not have instance type.
630 if (target && !target.constructor.getInstanceType) {
631 return result;
632 }
633 if (target) {
634 if (!target.instanceTypes) {
635 target.instanceTypes = [];
636 }
637 if (!result) {
638 if (this.getInstanceType() === target.constructor.getInstanceType()) {
639 result = true;
640 }
641 }
642 if (result) {
643 var name = this.getInstanceType === InstanceType.getInstanceType ? 'BaseInstanceType' : this.getInstanceType();
644 if (-1 === target.instanceTypes.indexOf(name)) {
645 target.instanceTypes.push(name);
646 }
647 }
648 }
649 if (!result && target) {
650 // Check if the given 'target', is instance of known types.
651 result = target.instanceTypes && Array.isArray(target.instanceTypes) && -1 !== target.instanceTypes.indexOf(this.getInstanceType());
652 }
653 return result;
654 }
655 }, {
656 key: "getInstanceType",
657 value: function getInstanceType() {
658 elementorModules.ForceMethodImplementation();
659 }
660 }]);
661 return InstanceType;
662 }(Symbol.hasInstance);
663 exports["default"] = InstanceType;
664
665 /***/ }),
666
667 /***/ "../modules/web-cli/assets/js/modules/command-base.js":
668 /*!************************************************************!*\
669 !*** ../modules/web-cli/assets/js/modules/command-base.js ***!
670 \************************************************************/
671 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
672
673 "use strict";
674
675
676 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
677 Object.defineProperty(exports, "__esModule", ({
678 value: true
679 }));
680 exports["default"] = void 0;
681 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
682 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
683 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
684 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
685 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
686 var _commandInfra = _interopRequireDefault(__webpack_require__(/*! ./command-infra */ "../modules/web-cli/assets/js/modules/command-infra.js"));
687 var _deprecation = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/deprecation */ "../modules/web-cli/assets/js/utils/deprecation.js"));
688 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); }; }
689 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; } }
690 /**
691 * @name $e.modules.CommandBase
692 */
693 var CommandBase = /*#__PURE__*/function (_CommandInfra) {
694 (0, _inherits2.default)(CommandBase, _CommandInfra);
695 var _super = _createSuper(CommandBase);
696 function CommandBase() {
697 (0, _classCallCheck2.default)(this, CommandBase);
698 return _super.apply(this, arguments);
699 }
700 (0, _createClass2.default)(CommandBase, [{
701 key: "onBeforeRun",
702 value: function onBeforeRun() {
703 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
704 $e.hooks.runUIBefore(this.command, args);
705 }
706 }, {
707 key: "onAfterRun",
708 value: function onAfterRun() {
709 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
710 var result = arguments.length > 1 ? arguments[1] : undefined;
711 $e.hooks.runUIAfter(this.command, args, result);
712 }
713 }, {
714 key: "onBeforeApply",
715 value: function onBeforeApply() {
716 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
717 $e.hooks.runDataDependency(this.command, args);
718 }
719 }, {
720 key: "onAfterApply",
721 value: function onAfterApply() {
722 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
723 var result = arguments.length > 1 ? arguments[1] : undefined;
724 $e.hooks.runDataAfter(this.command, args, result);
725 }
726 }, {
727 key: "onCatchApply",
728 value: function onCatchApply(e) {
729 this.runCatchHooks(e);
730 }
731
732 /**
733 * Run all the catch hooks.
734 *
735 * @param {Error} e
736 */
737 }, {
738 key: "runCatchHooks",
739 value: function runCatchHooks(e) {
740 $e.hooks.runDataCatch(this.command, this.args, e);
741 $e.hooks.runUICatch(this.command, this.args, e);
742 }
743
744 /**
745 * TODO - Remove - Backwards compatibility.
746 *
747 * Function requireContainer().
748 *
749 * Validate `arg.container` & `arg.containers`.
750 *
751 * @param {{}} args
752 *
753 * @throws {Error}
754 */
755 }, {
756 key: "requireContainer",
757 value: function requireContainer() {
758 var _this = this;
759 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.args;
760 _deprecation.default.deprecated('requireContainer', '3.7.0', 'Extend `$e.modules.editor.CommandContainerBase` or `$e.modules.editor.CommandContainerInternalBase`');
761 if (!args.container && !args.containers) {
762 throw Error('container or containers are required.');
763 }
764 if (args.container && args.containers) {
765 throw Error('container and containers cannot go together please select one of them.');
766 }
767 var containers = args.containers || [args.container];
768 containers.forEach(function (container) {
769 _this.requireArgumentInstance('container', elementorModules.editor.Container, {
770 container: container
771 });
772 });
773 }
774 }], [{
775 key: "getInstanceType",
776 value: function getInstanceType() {
777 return 'CommandBase';
778 }
779 }]);
780 return CommandBase;
781 }(_commandInfra.default);
782 exports["default"] = CommandBase;
783
784 /***/ }),
785
786 /***/ "../modules/web-cli/assets/js/modules/command-infra.js":
787 /*!*************************************************************!*\
788 !*** ../modules/web-cli/assets/js/modules/command-infra.js ***!
789 \*************************************************************/
790 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
791
792 "use strict";
793
794
795 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
796 Object.defineProperty(exports, "__esModule", ({
797 value: true
798 }));
799 exports["default"] = void 0;
800 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
801 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
802 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
803 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
804 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
805 var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
806 var _argsObject = _interopRequireDefault(__webpack_require__(/*! elementor-assets-js/modules/imports/args-object */ "../assets/dev/js/modules/imports/args-object.js"));
807 var _deprecation = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/deprecation */ "../modules/web-cli/assets/js/utils/deprecation.js"));
808 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); }; }
809 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; } }
810 /**
811 * @typedef {import('../modules/component-base')} ComponentBase
812 */
813 var CommandInfra = /*#__PURE__*/function (_ArgsObject) {
814 (0, _inherits2.default)(CommandInfra, _ArgsObject);
815 var _super = _createSuper(CommandInfra);
816 /**
817 * Function constructor().
818 *
819 * Create Commands Base.
820 *
821 * @param {{}} args
822 */
823 function CommandInfra() {
824 var _this;
825 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
826 (0, _classCallCheck2.default)(this, CommandInfra);
827 _this = _super.call(this, args);
828 if (!_this.constructor.registerConfig) {
829 throw RangeError('Doing it wrong: Each command type should have `registerConfig`.');
830 }
831
832 // Acknowledge self about which command it run.
833 _this.command = _this.constructor.getCommand();
834
835 // Assign instance of current component.
836 _this.component = _this.constructor.getComponent();
837
838 // Who ever need do something before without `super` the constructor can use `initialize` method.
839 _this.initialize(args);
840
841 // Refresh args, maybe the changed via `initialize`.
842 args = _this.args;
843
844 // Validate args before run.
845 _this.validateArgs(args);
846 return _this;
847 }
848
849 /**
850 * Function initialize().
851 *
852 * Initialize command, called after construction.
853 *
854 * @param {{}} args
855 */
856 (0, _createClass2.default)(CommandInfra, [{
857 key: "currentCommand",
858 get:
859 // TODO - Remove backwards compatibility.
860 function get() {
861 _deprecation.default.deprecated('this.currentCommand', '3.7.0', 'this.command');
862 return this.command;
863 }
864 }, {
865 key: "initialize",
866 value: function initialize() {
867 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
868 } // eslint-disable-line no-unused-vars
869
870 /**
871 * Function validateArgs().
872 *
873 * Validate command arguments.
874 *
875 * @param {{}} args
876 */
877 }, {
878 key: "validateArgs",
879 value: function validateArgs() {
880 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
881 } // eslint-disable-line no-unused-vars
882
883 // eslint-disable-next-line jsdoc/require-returns-check
884 /**
885 * Function apply().
886 *
887 * Do the actual command.
888 *
889 * @param {{}} args
890 *
891 * @return {*} Command results.
892 */
893 }, {
894 key: "apply",
895 value: function apply() {
896 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
897 // eslint-disable-line no-unused-vars
898 elementorModules.ForceMethodImplementation();
899 }
900
901 /**
902 * Function run().
903 *
904 * Run command with history & hooks.
905 *
906 * @return {*} Command results.
907 */
908 }, {
909 key: "run",
910 value: function run() {
911 return this.apply(this.args);
912 }
913
914 /**
915 * Function onBeforeRun.
916 *
917 * Called before run().
918 *
919 * @param {{}} args
920 */
921 }, {
922 key: "onBeforeRun",
923 value: function onBeforeRun() {
924 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
925 } // eslint-disable-line no-unused-vars
926
927 /**
928 * Function onAfterRun.
929 *
930 * Called after run().
931 *
932 * @param {{}} args
933 * @param {*} result
934 */
935 }, {
936 key: "onAfterRun",
937 value: function onAfterRun() {
938 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
939 var result = arguments.length > 1 ? arguments[1] : undefined;
940 } // eslint-disable-line no-unused-vars
941
942 /**
943 * Function onBeforeApply.
944 *
945 * Called before apply().
946 *
947 * @param {{}} args
948 */
949 }, {
950 key: "onBeforeApply",
951 value: function onBeforeApply() {
952 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
953 } // eslint-disable-line no-unused-vars
954
955 /**
956 * Function onAfterApply.
957 *
958 * Called after apply().
959 *
960 * @param {{}} args
961 * @param {*} result
962 */
963 }, {
964 key: "onAfterApply",
965 value: function onAfterApply() {
966 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
967 var result = arguments.length > 1 ? arguments[1] : undefined;
968 } // eslint-disable-line no-unused-vars
969
970 /**
971 * Function onCatchApply.
972 *
973 * Called after apply() failed.
974 *
975 * @param {Error} e
976 */
977 }, {
978 key: "onCatchApply",
979 value: function onCatchApply(e) {} // eslint-disable-line no-unused-vars
980 }], [{
981 key: "getInstanceType",
982 value:
983 /**
984 * @type {Object}
985 */
986
987 function getInstanceType() {
988 return 'CommandInfra';
989 }
990
991 /**
992 * Get info of command.
993 *
994 * @return {Object} Extra information about the command.
995 */
996 }, {
997 key: "getInfo",
998 value: function getInfo() {
999 return {};
1000 }
1001
1002 /**
1003 * @return {string} Self command name.
1004 */
1005 }, {
1006 key: "getCommand",
1007 value: function getCommand() {
1008 return this.registerConfig.command;
1009 }
1010
1011 /**
1012 * @return {ComponentBase} Self component
1013 */
1014 }, {
1015 key: "getComponent",
1016 value: function getComponent() {
1017 return this.registerConfig.component;
1018 }
1019 }, {
1020 key: "setRegisterConfig",
1021 value: function setRegisterConfig(config) {
1022 this.registerConfig = Object.freeze(config);
1023 }
1024 }]);
1025 return CommandInfra;
1026 }(_argsObject.default);
1027 exports["default"] = CommandInfra;
1028 (0, _defineProperty2.default)(CommandInfra, "registerConfig", null);
1029
1030 /***/ }),
1031
1032 /***/ "../modules/web-cli/assets/js/utils/console.js":
1033 /*!*****************************************************!*\
1034 !*** ../modules/web-cli/assets/js/utils/console.js ***!
1035 \*****************************************************/
1036 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1037
1038 "use strict";
1039
1040
1041 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
1042 Object.defineProperty(exports, "__esModule", ({
1043 value: true
1044 }));
1045 exports["default"] = void 0;
1046 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
1047 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
1048 var Console = /*#__PURE__*/function () {
1049 function Console() {
1050 (0, _classCallCheck2.default)(this, Console);
1051 }
1052 (0, _createClass2.default)(Console, null, [{
1053 key: "error",
1054 value: function error(message) {
1055 // Show an error if devTools is available.
1056 if ($e.devTools) {
1057 $e.devTools.log.error(message);
1058 }
1059
1060 // If not a 'Hook-Break' then show error.
1061 if (!(message instanceof $e.modules.HookBreak)) {
1062 // eslint-disable-next-line no-console
1063 console.error(message);
1064 }
1065 }
1066 }, {
1067 key: "warn",
1068 value: function warn() {
1069 var _console;
1070 var style = "font-size: 12px; background-image: url(\"".concat(elementorWebCliConfig.urls.assets, "images/logo-icon.png\"); background-repeat: no-repeat; background-size: contain;");
1071 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
1072 args[_key] = arguments[_key];
1073 }
1074 args.unshift('%c %c', style, '');
1075 (_console = console).warn.apply(_console, args); // eslint-disable-line no-console
1076 }
1077 }]);
1078 return Console;
1079 }();
1080 exports["default"] = Console;
1081
1082 /***/ }),
1083
1084 /***/ "../modules/web-cli/assets/js/utils/deprecation.js":
1085 /*!*********************************************************!*\
1086 !*** ../modules/web-cli/assets/js/utils/deprecation.js ***!
1087 \*********************************************************/
1088 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1089
1090 "use strict";
1091
1092
1093 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
1094 Object.defineProperty(exports, "__esModule", ({
1095 value: true
1096 }));
1097 exports["default"] = void 0;
1098 var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js"));
1099 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
1100 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
1101 var _console = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/console */ "../modules/web-cli/assets/js/utils/console.js"));
1102 // Copied from `modules/dev-tools/assets/js/deprecation.js`
1103 /**
1104 * @typedef {Object} Version
1105 * @property {number} major1 The first number
1106 * @property {number} major2 The second number
1107 * @property {number} minor The third number
1108 * @property {string} build The fourth number
1109 */
1110
1111 var softDeprecated = function softDeprecated(name, version, replacement) {
1112 if (elementorWebCliConfig.isDebug) {
1113 deprecatedMessage('soft', name, version, replacement);
1114 }
1115 };
1116 var hardDeprecated = function hardDeprecated(name, version, replacement) {
1117 deprecatedMessage('hard', name, version, replacement);
1118 };
1119 var deprecatedMessage = function deprecatedMessage(type, name, version, replacement) {
1120 var message = "`".concat(name, "` is ").concat(type, " deprecated since ").concat(version);
1121 if (replacement) {
1122 message += " - Use `".concat(replacement, "` instead");
1123 }
1124 _console.default.warn(message);
1125 };
1126 var Deprecation = /*#__PURE__*/function () {
1127 function Deprecation() {
1128 (0, _classCallCheck2.default)(this, Deprecation);
1129 }
1130 (0, _createClass2.default)(Deprecation, null, [{
1131 key: "deprecated",
1132 value: function deprecated(name, version, replacement) {
1133 if (this.isHardDeprecated(version)) {
1134 hardDeprecated(name, version, replacement);
1135 } else {
1136 softDeprecated(name, version, replacement);
1137 }
1138 }
1139
1140 /**
1141 * @param {string} version
1142 *
1143 * @return {Version}
1144 */
1145 }, {
1146 key: "parseVersion",
1147 value: function parseVersion(version) {
1148 var versionParts = version.split('.');
1149 if (versionParts.length < 3 || versionParts.length > 4) {
1150 throw new RangeError('Invalid Semantic Version string provided');
1151 }
1152 var _versionParts = (0, _slicedToArray2.default)(versionParts, 4),
1153 major1 = _versionParts[0],
1154 major2 = _versionParts[1],
1155 minor = _versionParts[2],
1156 _versionParts$ = _versionParts[3],
1157 build = _versionParts$ === void 0 ? '' : _versionParts$;
1158 return {
1159 major1: parseInt(major1),
1160 major2: parseInt(major2),
1161 minor: parseInt(minor),
1162 build: build
1163 };
1164 }
1165
1166 /**
1167 * Get total of major.
1168 *
1169 * 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,
1170 * versions with major2 more then 9 will be added to total.
1171 *
1172 * @param {Version} versionObj
1173 *
1174 * @return {number}
1175 */
1176 }, {
1177 key: "getTotalMajor",
1178 value: function getTotalMajor(versionObj) {
1179 var total = parseInt("".concat(versionObj.major1).concat(versionObj.major2, "0"));
1180 total = Number((total / 10).toFixed(0));
1181 if (versionObj.major2 > 9) {
1182 total = versionObj.major2 - 9;
1183 }
1184 return total;
1185 }
1186
1187 /**
1188 * @param {string} version1
1189 * @param {string} version2
1190 *
1191 * @return {number}
1192 */
1193 }, {
1194 key: "compareVersion",
1195 value: function compareVersion(version1, version2) {
1196 var _this = this;
1197 return [this.parseVersion(version1), this.parseVersion(version2)].map(function (versionObj) {
1198 return _this.getTotalMajor(versionObj);
1199 }).reduce(function (acc, major) {
1200 return acc - major;
1201 });
1202 }
1203
1204 /**
1205 * @param {string} version
1206 *
1207 * @return {boolean}
1208 */
1209 }, {
1210 key: "isSoftDeprecated",
1211 value: function isSoftDeprecated(version) {
1212 var total = this.compareVersion(version, elementorWebCliConfig.version);
1213 return total <= 4;
1214 }
1215
1216 /**
1217 * @param {string} version
1218 * @return {boolean}
1219 */
1220 }, {
1221 key: "isHardDeprecated",
1222 value: function isHardDeprecated(version) {
1223 var total = this.compareVersion(version, elementorWebCliConfig.version);
1224 return total < 0 || total >= 8;
1225 }
1226 }]);
1227 return Deprecation;
1228 }();
1229 exports["default"] = Deprecation;
1230
1231 /***/ }),
1232
1233 /***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js":
1234 /*!******************************************************************!*\
1235 !*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
1236 \******************************************************************/
1237 /***/ ((module) => {
1238
1239 function _arrayLikeToArray(arr, len) {
1240 if (len == null || len > arr.length) len = arr.length;
1241 for (var i = 0, arr2 = new Array(len); i < len; i++) {
1242 arr2[i] = arr[i];
1243 }
1244 return arr2;
1245 }
1246 module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
1247
1248 /***/ }),
1249
1250 /***/ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js":
1251 /*!****************************************************************!*\
1252 !*** ../node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
1253 \****************************************************************/
1254 /***/ ((module) => {
1255
1256 function _arrayWithHoles(arr) {
1257 if (Array.isArray(arr)) return arr;
1258 }
1259 module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
1260
1261 /***/ }),
1262
1263 /***/ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js":
1264 /*!***********************************************************************!*\
1265 !*** ../node_modules/@babel/runtime/helpers/assertThisInitialized.js ***!
1266 \***********************************************************************/
1267 /***/ ((module) => {
1268
1269 function _assertThisInitialized(self) {
1270 if (self === void 0) {
1271 throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1272 }
1273 return self;
1274 }
1275 module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports;
1276
1277 /***/ }),
1278
1279 /***/ "../node_modules/@babel/runtime/helpers/classCallCheck.js":
1280 /*!****************************************************************!*\
1281 !*** ../node_modules/@babel/runtime/helpers/classCallCheck.js ***!
1282 \****************************************************************/
1283 /***/ ((module) => {
1284
1285 function _classCallCheck(instance, Constructor) {
1286 if (!(instance instanceof Constructor)) {
1287 throw new TypeError("Cannot call a class as a function");
1288 }
1289 }
1290 module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
1291
1292 /***/ }),
1293
1294 /***/ "../node_modules/@babel/runtime/helpers/createClass.js":
1295 /*!*************************************************************!*\
1296 !*** ../node_modules/@babel/runtime/helpers/createClass.js ***!
1297 \*************************************************************/
1298 /***/ ((module) => {
1299
1300 function _defineProperties(target, props) {
1301 for (var i = 0; i < props.length; i++) {
1302 var descriptor = props[i];
1303 descriptor.enumerable = descriptor.enumerable || false;
1304 descriptor.configurable = true;
1305 if ("value" in descriptor) descriptor.writable = true;
1306 Object.defineProperty(target, descriptor.key, descriptor);
1307 }
1308 }
1309 function _createClass(Constructor, protoProps, staticProps) {
1310 if (protoProps) _defineProperties(Constructor.prototype, protoProps);
1311 if (staticProps) _defineProperties(Constructor, staticProps);
1312 Object.defineProperty(Constructor, "prototype", {
1313 writable: false
1314 });
1315 return Constructor;
1316 }
1317 module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
1318
1319 /***/ }),
1320
1321 /***/ "../node_modules/@babel/runtime/helpers/defineProperty.js":
1322 /*!****************************************************************!*\
1323 !*** ../node_modules/@babel/runtime/helpers/defineProperty.js ***!
1324 \****************************************************************/
1325 /***/ ((module) => {
1326
1327 function _defineProperty(obj, key, value) {
1328 if (key in obj) {
1329 Object.defineProperty(obj, key, {
1330 value: value,
1331 enumerable: true,
1332 configurable: true,
1333 writable: true
1334 });
1335 } else {
1336 obj[key] = value;
1337 }
1338 return obj;
1339 }
1340 module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
1341
1342 /***/ }),
1343
1344 /***/ "../node_modules/@babel/runtime/helpers/get.js":
1345 /*!*****************************************************!*\
1346 !*** ../node_modules/@babel/runtime/helpers/get.js ***!
1347 \*****************************************************/
1348 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1349
1350 var superPropBase = __webpack_require__(/*! ./superPropBase.js */ "../node_modules/@babel/runtime/helpers/superPropBase.js");
1351 function _get() {
1352 if (typeof Reflect !== "undefined" && Reflect.get) {
1353 module.exports = _get = Reflect.get.bind(), module.exports.__esModule = true, module.exports["default"] = module.exports;
1354 } else {
1355 module.exports = _get = function _get(target, property, receiver) {
1356 var base = superPropBase(target, property);
1357 if (!base) return;
1358 var desc = Object.getOwnPropertyDescriptor(base, property);
1359 if (desc.get) {
1360 return desc.get.call(arguments.length < 3 ? target : receiver);
1361 }
1362 return desc.value;
1363 }, module.exports.__esModule = true, module.exports["default"] = module.exports;
1364 }
1365 return _get.apply(this, arguments);
1366 }
1367 module.exports = _get, module.exports.__esModule = true, module.exports["default"] = module.exports;
1368
1369 /***/ }),
1370
1371 /***/ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js":
1372 /*!****************************************************************!*\
1373 !*** ../node_modules/@babel/runtime/helpers/getPrototypeOf.js ***!
1374 \****************************************************************/
1375 /***/ ((module) => {
1376
1377 function _getPrototypeOf(o) {
1378 module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
1379 return o.__proto__ || Object.getPrototypeOf(o);
1380 }, module.exports.__esModule = true, module.exports["default"] = module.exports;
1381 return _getPrototypeOf(o);
1382 }
1383 module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
1384
1385 /***/ }),
1386
1387 /***/ "../node_modules/@babel/runtime/helpers/inherits.js":
1388 /*!**********************************************************!*\
1389 !*** ../node_modules/@babel/runtime/helpers/inherits.js ***!
1390 \**********************************************************/
1391 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1392
1393 var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js");
1394 function _inherits(subClass, superClass) {
1395 if (typeof superClass !== "function" && superClass !== null) {
1396 throw new TypeError("Super expression must either be null or a function");
1397 }
1398 subClass.prototype = Object.create(superClass && superClass.prototype, {
1399 constructor: {
1400 value: subClass,
1401 writable: true,
1402 configurable: true
1403 }
1404 });
1405 Object.defineProperty(subClass, "prototype", {
1406 writable: false
1407 });
1408 if (superClass) setPrototypeOf(subClass, superClass);
1409 }
1410 module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports;
1411
1412 /***/ }),
1413
1414 /***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js":
1415 /*!***********************************************************************!*\
1416 !*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
1417 \***********************************************************************/
1418 /***/ ((module) => {
1419
1420 function _interopRequireDefault(obj) {
1421 return obj && obj.__esModule ? obj : {
1422 "default": obj
1423 };
1424 }
1425 module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
1426
1427 /***/ }),
1428
1429 /***/ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js":
1430 /*!**********************************************************************!*\
1431 !*** ../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
1432 \**********************************************************************/
1433 /***/ ((module) => {
1434
1435 function _iterableToArrayLimit(arr, i) {
1436 var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
1437 if (_i == null) return;
1438 var _arr = [];
1439 var _n = true;
1440 var _d = false;
1441 var _s, _e;
1442 try {
1443 for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
1444 _arr.push(_s.value);
1445 if (i && _arr.length === i) break;
1446 }
1447 } catch (err) {
1448 _d = true;
1449 _e = err;
1450 } finally {
1451 try {
1452 if (!_n && _i["return"] != null) _i["return"]();
1453 } finally {
1454 if (_d) throw _e;
1455 }
1456 }
1457 return _arr;
1458 }
1459 module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
1460
1461 /***/ }),
1462
1463 /***/ "../node_modules/@babel/runtime/helpers/nonIterableRest.js":
1464 /*!*****************************************************************!*\
1465 !*** ../node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
1466 \*****************************************************************/
1467 /***/ ((module) => {
1468
1469 function _nonIterableRest() {
1470 throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1471 }
1472 module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
1473
1474 /***/ }),
1475
1476 /***/ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js":
1477 /*!***************************************************************************!*\
1478 !*** ../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***!
1479 \***************************************************************************/
1480 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1481
1482 var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]);
1483 var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js");
1484 function _possibleConstructorReturn(self, call) {
1485 if (call && (_typeof(call) === "object" || typeof call === "function")) {
1486 return call;
1487 } else if (call !== void 0) {
1488 throw new TypeError("Derived constructors may only return object or undefined");
1489 }
1490 return assertThisInitialized(self);
1491 }
1492 module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports;
1493
1494 /***/ }),
1495
1496 /***/ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js":
1497 /*!****************************************************************!*\
1498 !*** ../node_modules/@babel/runtime/helpers/setPrototypeOf.js ***!
1499 \****************************************************************/
1500 /***/ ((module) => {
1501
1502 function _setPrototypeOf(o, p) {
1503 module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
1504 o.__proto__ = p;
1505 return o;
1506 }, module.exports.__esModule = true, module.exports["default"] = module.exports;
1507 return _setPrototypeOf(o, p);
1508 }
1509 module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
1510
1511 /***/ }),
1512
1513 /***/ "../node_modules/@babel/runtime/helpers/slicedToArray.js":
1514 /*!***************************************************************!*\
1515 !*** ../node_modules/@babel/runtime/helpers/slicedToArray.js ***!
1516 \***************************************************************/
1517 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1518
1519 var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js");
1520 var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js");
1521 var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js");
1522 var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "../node_modules/@babel/runtime/helpers/nonIterableRest.js");
1523 function _slicedToArray(arr, i) {
1524 return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
1525 }
1526 module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
1527
1528 /***/ }),
1529
1530 /***/ "../node_modules/@babel/runtime/helpers/superPropBase.js":
1531 /*!***************************************************************!*\
1532 !*** ../node_modules/@babel/runtime/helpers/superPropBase.js ***!
1533 \***************************************************************/
1534 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1535
1536 var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js");
1537 function _superPropBase(object, property) {
1538 while (!Object.prototype.hasOwnProperty.call(object, property)) {
1539 object = getPrototypeOf(object);
1540 if (object === null) break;
1541 }
1542 return object;
1543 }
1544 module.exports = _superPropBase, module.exports.__esModule = true, module.exports["default"] = module.exports;
1545
1546 /***/ }),
1547
1548 /***/ "../node_modules/@babel/runtime/helpers/typeof.js":
1549 /*!********************************************************!*\
1550 !*** ../node_modules/@babel/runtime/helpers/typeof.js ***!
1551 \********************************************************/
1552 /***/ ((module) => {
1553
1554 function _typeof(obj) {
1555 "@babel/helpers - typeof";
1556
1557 return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
1558 return typeof obj;
1559 } : function (obj) {
1560 return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
1561 }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
1562 }
1563 module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
1564
1565 /***/ }),
1566
1567 /***/ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js":
1568 /*!****************************************************************************!*\
1569 !*** ../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
1570 \****************************************************************************/
1571 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1572
1573 var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js");
1574 function _unsupportedIterableToArray(o, minLen) {
1575 if (!o) return;
1576 if (typeof o === "string") return arrayLikeToArray(o, minLen);
1577 var n = Object.prototype.toString.call(o).slice(8, -1);
1578 if (n === "Object" && o.constructor) n = o.constructor.name;
1579 if (n === "Map" || n === "Set") return Array.from(o);
1580 if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
1581 }
1582 module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
1583
1584 /***/ })
1585
1586 /******/ });
1587 /************************************************************************/
1588 /******/ // The module cache
1589 /******/ var __webpack_module_cache__ = {};
1590 /******/
1591 /******/ // The require function
1592 /******/ function __webpack_require__(moduleId) {
1593 /******/ // Check if module is in cache
1594 /******/ var cachedModule = __webpack_module_cache__[moduleId];
1595 /******/ if (cachedModule !== undefined) {
1596 /******/ return cachedModule.exports;
1597 /******/ }
1598 /******/ // Create a new module (and put it into the cache)
1599 /******/ var module = __webpack_module_cache__[moduleId] = {
1600 /******/ // no module.id needed
1601 /******/ // no module.loaded needed
1602 /******/ exports: {}
1603 /******/ };
1604 /******/
1605 /******/ // Execute the module function
1606 /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
1607 /******/
1608 /******/ // Return the exports of the module
1609 /******/ return module.exports;
1610 /******/ }
1611 /******/
1612 /************************************************************************/
1613 var __webpack_exports__ = {};
1614 // This entry need to be wrapped in an IIFE because it need to be in strict mode.
1615 (() => {
1616 "use strict";
1617 /*!**************************************************!*\
1618 !*** ../assets/dev/js/editor/editor-document.js ***!
1619 \**************************************************/
1620
1621
1622 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
1623 var _commandContainerBase = _interopRequireDefault(__webpack_require__(/*! ./command-bases/command-container-base */ "../assets/dev/js/editor/command-bases/command-container-base.js"));
1624 var _commandContainerInternalBase = _interopRequireDefault(__webpack_require__(/*! ./command-bases/command-container-internal-base */ "../assets/dev/js/editor/command-bases/command-container-internal-base.js"));
1625 var _commandHistoryBase = _interopRequireDefault(__webpack_require__(/*! elementor-document/command-bases/command-history-base */ "../assets/dev/js/editor/document/command-bases/command-history-base.js"));
1626 var _commandHistoryDebounceBase = _interopRequireDefault(__webpack_require__(/*! elementor-document/command-bases/command-history-debounce-base */ "../assets/dev/js/editor/document/command-bases/command-history-debounce-base.js"));
1627 $e.modules.editor = {
1628 CommandContainerBase: _commandContainerBase.default,
1629 CommandContainerInternalBase: _commandContainerInternalBase.default,
1630 document: {
1631 CommandHistoryBase: _commandHistoryBase.default,
1632 CommandHistoryDebounceBase: _commandHistoryDebounceBase.default
1633 }
1634 };
1635
1636 // TODO: Remove, BC.
1637 $e.modules.document = {
1638 get CommandHistory() {
1639 elementorDevTools.deprecation.deprecated('$e.modules.document.CommandHistory', '3.7.0', '$e.modules.editor.document.CommandHistoryBase');
1640 return $e.modules.editor.document.CommandHistoryBase;
1641 },
1642 get CommandHistoryDebounce() {
1643 elementorDevTools.deprecation.deprecated('$e.modules.CommandHistoryDebounce', '3.7.0', '$e.modules.editor.document.CommandHistoryDebounceBase');
1644 return $e.modules.editor.document.CommandHistoryDebounceBase;
1645 }
1646 };
1647 })();
1648
1649 /******/ })()
1650 ;
1651 //# sourceMappingURL=editor-document.js.map