PluginProbe
Elementor Website Builder – more than just a page builder / 3.6.7
Elementor Website Builder – more than just a page builder v3.6.7
4.3.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-modules.js

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

2,862 lines 99.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /*! elementor - v3.6.7 - 03-07-2022 */
2 /******/ (() => { // webpackBootstrap
3 /******/ var __webpack_modules__ = ({
4
5 /***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js":
6 /*!******************************************************************!*\
7 !*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
8 \******************************************************************/
9 /***/ ((module) => {
10
11 function _arrayLikeToArray(arr, len) {
12 if (len == null || len > arr.length) len = arr.length;
13
14 for (var i = 0, arr2 = new Array(len); i < len; i++) {
15 arr2[i] = arr[i];
16 }
17
18 return arr2;
19 }
20
21 module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
22
23 /***/ }),
24
25 /***/ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js":
26 /*!****************************************************************!*\
27 !*** ../node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
28 \****************************************************************/
29 /***/ ((module) => {
30
31 function _arrayWithHoles(arr) {
32 if (Array.isArray(arr)) return arr;
33 }
34
35 module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
36
37 /***/ }),
38
39 /***/ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js":
40 /*!***********************************************************************!*\
41 !*** ../node_modules/@babel/runtime/helpers/assertThisInitialized.js ***!
42 \***********************************************************************/
43 /***/ ((module) => {
44
45 function _assertThisInitialized(self) {
46 if (self === void 0) {
47 throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
48 }
49
50 return self;
51 }
52
53 module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports;
54
55 /***/ }),
56
57 /***/ "../node_modules/@babel/runtime/helpers/classCallCheck.js":
58 /*!****************************************************************!*\
59 !*** ../node_modules/@babel/runtime/helpers/classCallCheck.js ***!
60 \****************************************************************/
61 /***/ ((module) => {
62
63 function _classCallCheck(instance, Constructor) {
64 if (!(instance instanceof Constructor)) {
65 throw new TypeError("Cannot call a class as a function");
66 }
67 }
68
69 module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
70
71 /***/ }),
72
73 /***/ "../node_modules/@babel/runtime/helpers/construct.js":
74 /*!***********************************************************!*\
75 !*** ../node_modules/@babel/runtime/helpers/construct.js ***!
76 \***********************************************************/
77 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
78
79 var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js");
80
81 var isNativeReflectConstruct = __webpack_require__(/*! ./isNativeReflectConstruct.js */ "../node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js");
82
83 function _construct(Parent, args, Class) {
84 if (isNativeReflectConstruct()) {
85 module.exports = _construct = Reflect.construct.bind(), module.exports.__esModule = true, module.exports["default"] = module.exports;
86 } else {
87 module.exports = _construct = function _construct(Parent, args, Class) {
88 var a = [null];
89 a.push.apply(a, args);
90 var Constructor = Function.bind.apply(Parent, a);
91 var instance = new Constructor();
92 if (Class) setPrototypeOf(instance, Class.prototype);
93 return instance;
94 }, module.exports.__esModule = true, module.exports["default"] = module.exports;
95 }
96
97 return _construct.apply(null, arguments);
98 }
99
100 module.exports = _construct, module.exports.__esModule = true, module.exports["default"] = module.exports;
101
102 /***/ }),
103
104 /***/ "../node_modules/@babel/runtime/helpers/createClass.js":
105 /*!*************************************************************!*\
106 !*** ../node_modules/@babel/runtime/helpers/createClass.js ***!
107 \*************************************************************/
108 /***/ ((module) => {
109
110 function _defineProperties(target, props) {
111 for (var i = 0; i < props.length; i++) {
112 var descriptor = props[i];
113 descriptor.enumerable = descriptor.enumerable || false;
114 descriptor.configurable = true;
115 if ("value" in descriptor) descriptor.writable = true;
116 Object.defineProperty(target, descriptor.key, descriptor);
117 }
118 }
119
120 function _createClass(Constructor, protoProps, staticProps) {
121 if (protoProps) _defineProperties(Constructor.prototype, protoProps);
122 if (staticProps) _defineProperties(Constructor, staticProps);
123 Object.defineProperty(Constructor, "prototype", {
124 writable: false
125 });
126 return Constructor;
127 }
128
129 module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
130
131 /***/ }),
132
133 /***/ "../node_modules/@babel/runtime/helpers/defineProperty.js":
134 /*!****************************************************************!*\
135 !*** ../node_modules/@babel/runtime/helpers/defineProperty.js ***!
136 \****************************************************************/
137 /***/ ((module) => {
138
139 function _defineProperty(obj, key, value) {
140 if (key in obj) {
141 Object.defineProperty(obj, key, {
142 value: value,
143 enumerable: true,
144 configurable: true,
145 writable: true
146 });
147 } else {
148 obj[key] = value;
149 }
150
151 return obj;
152 }
153
154 module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
155
156 /***/ }),
157
158 /***/ "../node_modules/@babel/runtime/helpers/get.js":
159 /*!*****************************************************!*\
160 !*** ../node_modules/@babel/runtime/helpers/get.js ***!
161 \*****************************************************/
162 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
163
164 var superPropBase = __webpack_require__(/*! ./superPropBase.js */ "../node_modules/@babel/runtime/helpers/superPropBase.js");
165
166 function _get() {
167 if (typeof Reflect !== "undefined" && Reflect.get) {
168 module.exports = _get = Reflect.get.bind(), module.exports.__esModule = true, module.exports["default"] = module.exports;
169 } else {
170 module.exports = _get = function _get(target, property, receiver) {
171 var base = superPropBase(target, property);
172 if (!base) return;
173 var desc = Object.getOwnPropertyDescriptor(base, property);
174
175 if (desc.get) {
176 return desc.get.call(arguments.length < 3 ? target : receiver);
177 }
178
179 return desc.value;
180 }, module.exports.__esModule = true, module.exports["default"] = module.exports;
181 }
182
183 return _get.apply(this, arguments);
184 }
185
186 module.exports = _get, module.exports.__esModule = true, module.exports["default"] = module.exports;
187
188 /***/ }),
189
190 /***/ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js":
191 /*!****************************************************************!*\
192 !*** ../node_modules/@babel/runtime/helpers/getPrototypeOf.js ***!
193 \****************************************************************/
194 /***/ ((module) => {
195
196 function _getPrototypeOf(o) {
197 module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
198 return o.__proto__ || Object.getPrototypeOf(o);
199 }, module.exports.__esModule = true, module.exports["default"] = module.exports;
200 return _getPrototypeOf(o);
201 }
202
203 module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
204
205 /***/ }),
206
207 /***/ "../node_modules/@babel/runtime/helpers/inherits.js":
208 /*!**********************************************************!*\
209 !*** ../node_modules/@babel/runtime/helpers/inherits.js ***!
210 \**********************************************************/
211 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
212
213 var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js");
214
215 function _inherits(subClass, superClass) {
216 if (typeof superClass !== "function" && superClass !== null) {
217 throw new TypeError("Super expression must either be null or a function");
218 }
219
220 subClass.prototype = Object.create(superClass && superClass.prototype, {
221 constructor: {
222 value: subClass,
223 writable: true,
224 configurable: true
225 }
226 });
227 Object.defineProperty(subClass, "prototype", {
228 writable: false
229 });
230 if (superClass) setPrototypeOf(subClass, superClass);
231 }
232
233 module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports;
234
235 /***/ }),
236
237 /***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js":
238 /*!***********************************************************************!*\
239 !*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
240 \***********************************************************************/
241 /***/ ((module) => {
242
243 function _interopRequireDefault(obj) {
244 return obj && obj.__esModule ? obj : {
245 "default": obj
246 };
247 }
248
249 module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
250
251 /***/ }),
252
253 /***/ "../node_modules/@babel/runtime/helpers/isNativeFunction.js":
254 /*!******************************************************************!*\
255 !*** ../node_modules/@babel/runtime/helpers/isNativeFunction.js ***!
256 \******************************************************************/
257 /***/ ((module) => {
258
259 function _isNativeFunction(fn) {
260 return Function.toString.call(fn).indexOf("[native code]") !== -1;
261 }
262
263 module.exports = _isNativeFunction, module.exports.__esModule = true, module.exports["default"] = module.exports;
264
265 /***/ }),
266
267 /***/ "../node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js":
268 /*!**************************************************************************!*\
269 !*** ../node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js ***!
270 \**************************************************************************/
271 /***/ ((module) => {
272
273 function _isNativeReflectConstruct() {
274 if (typeof Reflect === "undefined" || !Reflect.construct) return false;
275 if (Reflect.construct.sham) return false;
276 if (typeof Proxy === "function") return true;
277
278 try {
279 Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
280 return true;
281 } catch (e) {
282 return false;
283 }
284 }
285
286 module.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports["default"] = module.exports;
287
288 /***/ }),
289
290 /***/ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js":
291 /*!**********************************************************************!*\
292 !*** ../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
293 \**********************************************************************/
294 /***/ ((module) => {
295
296 function _iterableToArrayLimit(arr, i) {
297 var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
298
299 if (_i == null) return;
300 var _arr = [];
301 var _n = true;
302 var _d = false;
303
304 var _s, _e;
305
306 try {
307 for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
308 _arr.push(_s.value);
309
310 if (i && _arr.length === i) break;
311 }
312 } catch (err) {
313 _d = true;
314 _e = err;
315 } finally {
316 try {
317 if (!_n && _i["return"] != null) _i["return"]();
318 } finally {
319 if (_d) throw _e;
320 }
321 }
322
323 return _arr;
324 }
325
326 module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
327
328 /***/ }),
329
330 /***/ "../node_modules/@babel/runtime/helpers/nonIterableRest.js":
331 /*!*****************************************************************!*\
332 !*** ../node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
333 \*****************************************************************/
334 /***/ ((module) => {
335
336 function _nonIterableRest() {
337 throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
338 }
339
340 module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
341
342 /***/ }),
343
344 /***/ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js":
345 /*!***************************************************************************!*\
346 !*** ../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***!
347 \***************************************************************************/
348 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
349
350 var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]);
351
352 var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js");
353
354 function _possibleConstructorReturn(self, call) {
355 if (call && (_typeof(call) === "object" || typeof call === "function")) {
356 return call;
357 } else if (call !== void 0) {
358 throw new TypeError("Derived constructors may only return object or undefined");
359 }
360
361 return assertThisInitialized(self);
362 }
363
364 module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports;
365
366 /***/ }),
367
368 /***/ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js":
369 /*!****************************************************************!*\
370 !*** ../node_modules/@babel/runtime/helpers/setPrototypeOf.js ***!
371 \****************************************************************/
372 /***/ ((module) => {
373
374 function _setPrototypeOf(o, p) {
375 module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
376 o.__proto__ = p;
377 return o;
378 }, module.exports.__esModule = true, module.exports["default"] = module.exports;
379 return _setPrototypeOf(o, p);
380 }
381
382 module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
383
384 /***/ }),
385
386 /***/ "../node_modules/@babel/runtime/helpers/slicedToArray.js":
387 /*!***************************************************************!*\
388 !*** ../node_modules/@babel/runtime/helpers/slicedToArray.js ***!
389 \***************************************************************/
390 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
391
392 var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js");
393
394 var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js");
395
396 var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js");
397
398 var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "../node_modules/@babel/runtime/helpers/nonIterableRest.js");
399
400 function _slicedToArray(arr, i) {
401 return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
402 }
403
404 module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
405
406 /***/ }),
407
408 /***/ "../node_modules/@babel/runtime/helpers/superPropBase.js":
409 /*!***************************************************************!*\
410 !*** ../node_modules/@babel/runtime/helpers/superPropBase.js ***!
411 \***************************************************************/
412 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
413
414 var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js");
415
416 function _superPropBase(object, property) {
417 while (!Object.prototype.hasOwnProperty.call(object, property)) {
418 object = getPrototypeOf(object);
419 if (object === null) break;
420 }
421
422 return object;
423 }
424
425 module.exports = _superPropBase, module.exports.__esModule = true, module.exports["default"] = module.exports;
426
427 /***/ }),
428
429 /***/ "../node_modules/@babel/runtime/helpers/typeof.js":
430 /*!********************************************************!*\
431 !*** ../node_modules/@babel/runtime/helpers/typeof.js ***!
432 \********************************************************/
433 /***/ ((module) => {
434
435 function _typeof(obj) {
436 "@babel/helpers - typeof";
437
438 return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
439 return typeof obj;
440 } : function (obj) {
441 return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
442 }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
443 }
444
445 module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
446
447 /***/ }),
448
449 /***/ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js":
450 /*!****************************************************************************!*\
451 !*** ../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
452 \****************************************************************************/
453 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
454
455 var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js");
456
457 function _unsupportedIterableToArray(o, minLen) {
458 if (!o) return;
459 if (typeof o === "string") return arrayLikeToArray(o, minLen);
460 var n = Object.prototype.toString.call(o).slice(8, -1);
461 if (n === "Object" && o.constructor) n = o.constructor.name;
462 if (n === "Map" || n === "Set") return Array.from(o);
463 if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
464 }
465
466 module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
467
468 /***/ }),
469
470 /***/ "../node_modules/@babel/runtime/helpers/wrapNativeSuper.js":
471 /*!*****************************************************************!*\
472 !*** ../node_modules/@babel/runtime/helpers/wrapNativeSuper.js ***!
473 \*****************************************************************/
474 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
475
476 var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js");
477
478 var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js");
479
480 var isNativeFunction = __webpack_require__(/*! ./isNativeFunction.js */ "../node_modules/@babel/runtime/helpers/isNativeFunction.js");
481
482 var construct = __webpack_require__(/*! ./construct.js */ "../node_modules/@babel/runtime/helpers/construct.js");
483
484 function _wrapNativeSuper(Class) {
485 var _cache = typeof Map === "function" ? new Map() : undefined;
486
487 module.exports = _wrapNativeSuper = function _wrapNativeSuper(Class) {
488 if (Class === null || !isNativeFunction(Class)) return Class;
489
490 if (typeof Class !== "function") {
491 throw new TypeError("Super expression must either be null or a function");
492 }
493
494 if (typeof _cache !== "undefined") {
495 if (_cache.has(Class)) return _cache.get(Class);
496
497 _cache.set(Class, Wrapper);
498 }
499
500 function Wrapper() {
501 return construct(Class, arguments, getPrototypeOf(this).constructor);
502 }
503
504 Wrapper.prototype = Object.create(Class.prototype, {
505 constructor: {
506 value: Wrapper,
507 enumerable: false,
508 writable: true,
509 configurable: true
510 }
511 });
512 return setPrototypeOf(Wrapper, Class);
513 }, module.exports.__esModule = true, module.exports["default"] = module.exports;
514 return _wrapNativeSuper(Class);
515 }
516
517 module.exports = _wrapNativeSuper, module.exports.__esModule = true, module.exports["default"] = module.exports;
518
519 /***/ }),
520
521 /***/ "../assets/dev/js/editor/container/container.js":
522 /*!******************************************************!*\
523 !*** ../assets/dev/js/editor/container/container.js ***!
524 \******************************************************/
525 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
526
527 "use strict";
528 /* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"];
529
530
531 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
532
533 Object.defineProperty(exports, "__esModule", ({
534 value: true
535 }));
536 exports["default"] = void 0;
537
538 var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"));
539
540 var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js"));
541
542 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
543
544 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
545
546 var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js"));
547
548 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
549
550 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
551
552 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
553
554 var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
555
556 var _argsObject = _interopRequireDefault(__webpack_require__(/*! ../../modules/imports/args-object */ "../assets/dev/js/modules/imports/args-object.js"));
557
558 var _panel = _interopRequireDefault(__webpack_require__(/*! ./panel */ "../assets/dev/js/editor/container/panel.js"));
559
560 var _childrenArray = _interopRequireDefault(__webpack_require__(/*! ./model/children-array */ "../assets/dev/js/editor/container/model/children-array.js"));
561
562 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); }; }
563
564 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; } }
565
566 /**
567 * @typedef {import('../../../../lib/backbone/backbone.marionette')} Backbone
568 */
569
570 /**
571 * @typedef {import('../../../../lib/backbone/backbone.marionette')} Marionette
572 */
573
574 /**
575 * @typedef {import('../elements/views/base')} BaseElementView
576 */
577
578 /**
579 * @typedef {import('../elements/views/section')} SectionView
580 */
581
582 /**
583 * @typedef {import('../views/base-container')} BaseContainer
584 */
585
586 /**
587 * TODO: ViewsOptions
588 *
589 * @typedef {(Marionette.View|Marionette.CompositeView|BaseElementView|SectionView|BaseContainer)} ViewsOptions
590 */
591 var Container = /*#__PURE__*/function (_ArgsObject) {
592 (0, _inherits2.default)(Container, _ArgsObject);
593
594 var _super = _createSuper(Container);
595
596 // TODO: Swap those backwards compatibility is required.
597
598 /**
599 * Container type.
600 *
601 * @type {string}
602 */
603
604 /**
605 * Container id.
606 *
607 * @type {string}
608 */
609
610 /**
611 * Document Object.
612 *
613 * @type {{}}
614 */
615
616 /**
617 * Container model.
618 *
619 * @type {Backbone.Model}
620 */
621
622 /**
623 * Container settings.
624 *
625 * @type {Backbone.Model}
626 */
627
628 /**
629 * Container view.
630 *
631 * @type {ViewsOptions}
632 */
633
634 /**
635 * Container parent.
636 *
637 * @type {Container}
638 */
639
640 /**
641 * Container children(s).
642 *
643 * @type {ChildrenArray}
644 */
645
646 /**
647 * Container dynamic.
648 *
649 * @type {Backbone.Model}
650 */
651
652 /**
653 * Container globals.
654 *
655 * @type {Backbone.Model}
656 */
657
658 /**
659 * Container label.
660 *
661 * @type {string}
662 */
663
664 /**
665 * Container controls.
666 *
667 * @type {{}}
668 */
669
670 /**
671 * Repeaters containers
672 *
673 * @type {{}}
674 */
675
676 /**
677 * Container renderer (The one who render).
678 *
679 * @type {Container}
680 */
681
682 /**
683 * Container panel.
684 *
685 * @type {Panel}
686 */
687
688 /**
689 * Controls placeholders.
690 *
691 * @type {{}}
692 */
693
694 /**
695 * Function constructor().
696 *
697 * Create container.
698 *
699 * @param {{}} args
700 *
701 * @throws {Error}
702 */
703 function Container(args) {
704 var _this;
705
706 (0, _classCallCheck2.default)(this, Container);
707 _this = _super.call(this, args); // Validate args.
708
709 (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "type", void 0);
710 (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "id", void 0);
711 (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "document", void 0);
712 (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "model", void 0);
713 (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "settings", void 0);
714 (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "view", void 0);
715 (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "parent", void 0);
716 (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "children", new _childrenArray.default());
717 (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "dynamic", void 0);
718 (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "globals", void 0);
719 (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "label", void 0);
720 (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "controls", {});
721 (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "repeaters", {});
722 (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "renderer", void 0);
723 (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "panel", void 0);
724 (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "placeholders", {});
725
726 _this.validateArgs(args);
727
728 args = Object.entries(args); // If empty.
729
730 if (0 === args.length) {
731 throw Error('Container cannot be empty.');
732 } // Set properties, if not defined - keep the defaults.
733
734
735 args.forEach(function (_ref) {
736 var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
737 key = _ref2[0],
738 value = _ref2[1];
739
740 _this[key] = 'undefined' === typeof value ? _this[key] : value;
741 });
742
743 if ('undefined' === typeof _this.renderer) {
744 _this.renderer = (0, _assertThisInitialized2.default)(_this);
745 }
746
747 if (!_this.document) {
748 _this.document = elementor.documents.getCurrent();
749 }
750
751 _this.dynamic = new Backbone.Model(_this.settings.get('__dynamic__'));
752 _this.globals = new Backbone.Model(_this.settings.get('__globals__'));
753 _this.panel = new _panel.default((0, _assertThisInitialized2.default)(_this));
754
755 _this.initialize();
756
757 return _this;
758 }
759
760 (0, _createClass2.default)(Container, [{
761 key: "initialize",
762 value: function initialize() {
763 if (this.isViewElement()) {
764 this.addToParent();
765 this.handleChildrenRecursive();
766 this.view.on('destroy', this.removeFromParent.bind(this));
767 }
768
769 this.handleRepeaterChildren();
770 }
771 }, {
772 key: "validateArgs",
773 value: function validateArgs(args) {
774 this.requireArgumentType('type', 'string', args);
775 this.requireArgumentType('id', 'string', args);
776 this.requireArgumentInstance('settings', Backbone.Model, args);
777 this.requireArgumentInstance('model', Backbone.Model, args);
778 }
779 /**
780 * Function getGroupRelatedControls().
781 *
782 * Example:
783 * Settings = { typography_typography: 'whatever', button_text_color: 'whatever' };
784 * Result { control_name: controlValue, ... - and so on };
785 * `Object.keys( Result ) = [ 'typography_typography', 'typography_font_family', 'typography_font_size', 'typography_font_size_tablet', 'typography_font_size_mobile', 'typography_font_weight', 'typography_text_transform', 'typography_font_style', 'typography_text_decoration', 'typography_line_height', 'typography_line_height_tablet', 'typography_line_height_mobile', 'typography_letter_spacing', 'typography_letter_spacing_tablet', 'typography_letter_spacing_mobile', 'button_text_color' ]`.
786 *
787 * @param {{}} settings
788 *
789 * @return {{}} result
790 */
791
792 }, {
793 key: "getGroupRelatedControls",
794 value: function getGroupRelatedControls(settings) {
795 var _this2 = this;
796
797 var result = {};
798 Object.keys(settings).forEach(function (settingKey) {
799 Object.values(_this2.controls).forEach(function (control) {
800 var _this2$controls$setti;
801
802 if (settingKey === control.name) {
803 result[control.name] = control;
804 } else if ((_this2$controls$setti = _this2.controls[settingKey]) !== null && _this2$controls$setti !== void 0 && _this2$controls$setti.groupPrefix) {
805 var groupPrefix = _this2.controls[settingKey].groupPrefix;
806
807 if (control.name.toString().startsWith(groupPrefix)) {
808 result[control.name] = control;
809 }
810 }
811 });
812 });
813 return result;
814 }
815 /**
816 * Function getAffectingControls().
817 *
818 * Should return all controls that effecting the container.
819 */
820
821 }, {
822 key: "getAffectingControls",
823 value: function getAffectingControls() {
824 var _this3 = this;
825
826 var result = {},
827 activeControls = this.settings.getActiveControls();
828 Object.entries(activeControls).forEach(function (_ref3) {
829 var _ref4 = (0, _slicedToArray2.default)(_ref3, 2),
830 controlName = _ref4[0],
831 control = _ref4[1];
832
833 var controlValue = _this3.settings.get(control.name);
834
835 if (control.global && !(controlValue !== null && controlValue !== void 0 && controlValue.length)) {
836 var _this3$globals$get;
837
838 if ((_this3$globals$get = _this3.globals.get(control.name)) !== null && _this3$globals$get !== void 0 && _this3$globals$get.length || _this3.getGlobalDefault(controlName).length) {
839 control.global.utilized = true;
840 result[controlName] = control;
841 return;
842 }
843 }
844
845 if (control.dynamic) {
846 if (_this3.dynamic.get(controlName)) {
847 control.dynamic.utilized = true;
848 result[controlName] = control;
849 return;
850 }
851 }
852
853 if (controlValue === control.default) {
854 return;
855 }
856
857 if (!controlValue) {
858 return;
859 }
860
861 if ('object' === (0, _typeof2.default)(controlValue) && Object.values(controlValue).join() === Object.values(control.default).join()) {
862 return;
863 }
864
865 result[controlName] = control;
866 });
867 return result;
868 }
869 }, {
870 key: "handleChildrenRecursive",
871 value: function handleChildrenRecursive() {
872 var _this$view$children;
873
874 if ((_this$view$children = this.view.children) !== null && _this$view$children !== void 0 && _this$view$children.length) {
875 Object.values(this.view.children._views).forEach(function (view) {
876 if (!view.container) {
877 return;
878 }
879
880 var container = view.container; // Since the way 'global-widget' rendered, it does not have parent sometimes.
881
882 if (container.parent.children) {
883 container.parent.children[view._index] = container;
884 }
885
886 container.handleChildrenRecursive();
887 });
888 } else {
889 this.children.clear();
890 }
891 }
892 }, {
893 key: "addToParent",
894 value: function addToParent() {
895 if (!this.parent.children || this.isRepeaterItem()) {
896 return;
897 } // On create container tell the parent where it was created.
898
899
900 this.parent.children.splice(this.view._index, 0, this);
901 }
902 }, {
903 key: "removeFromParent",
904 value: function removeFromParent() {
905 var _this4 = this;
906
907 if (!this.parent.children || this.isRepeater()) {
908 return;
909 } // When delete container its should notify its parent, that his children is dead.
910
911
912 this.parent.children = this.parent.children.filter(function (filtered) {
913 return filtered.id !== _this4.id;
914 });
915 }
916 }, {
917 key: "handleRepeaterChildren",
918 value: function handleRepeaterChildren() {
919 var _this5 = this;
920
921 Object.values(this.controls).forEach(function (control) {
922 if (!control.is_repeater) {
923 return;
924 }
925
926 var model = new Backbone.Model({
927 name: control.name
928 });
929 _this5.repeaters[control.name] = new elementorModules.editor.Container({
930 type: Container.TYPE_REPEATER,
931 id: control.name,
932 model: model,
933 settings: model,
934 view: _this5.view,
935 parent: _this5,
936 label: control.label || control.name,
937 controls: {},
938 renderer: _this5.renderer
939 });
940
941 _this5.settings.get(control.name).forEach(function (rowModel, index) {
942 _this5.addRepeaterItem(control.name, rowModel, index);
943 });
944 }); // Backwards Compatibility: if there is only one repeater (type=repeater), set it's children as current children.
945 // Since 3.0.0.
946
947 if (['widget', 'document'].includes(this.type)) {
948 var repeaters = Object.values(this.controls).filter(function (control) {
949 return 'repeater' === control.type;
950 });
951
952 if (1 === repeaters.length) {
953 Object.defineProperty(this, 'children', {
954 get: function get() {
955 elementorCommon.helpers.softDeprecated('children', '3.0.0', 'container.repeaters[ repeaterName ].children');
956 return this.repeaters[repeaters[0].name].children;
957 }
958 });
959 }
960 }
961 }
962 /**
963 * Function addRepeaterItem().
964 *
965 * The method add repeater item, find the repeater control by it name, and create new container for the item.
966 *
967 * @param {string} repeaterName
968 * @param {Backbone.Model} rowSettingsModel
969 * @param {number} index
970 *
971 * @return {Container} container
972 */
973
974 }, {
975 key: "addRepeaterItem",
976 value: function addRepeaterItem(repeaterName, rowSettingsModel, index) {
977 var rowId = rowSettingsModel.get('_id'); // TODO: Temp backwards compatibility. since 2.8.0.
978
979 if (!rowId) {
980 rowId = 'bc-' + elementorCommon.helpers.getUniqueId();
981 rowSettingsModel.set('_id', rowId);
982 }
983
984 this.repeaters[repeaterName].children.splice(index, 0, new elementorModules.editor.Container({
985 type: Container.TYPE_REPEATER_ITEM,
986 id: rowSettingsModel.get('_id'),
987 model: new Backbone.Model({
988 name: repeaterName
989 }),
990 settings: rowSettingsModel,
991 view: this.view,
992 parent: this.repeaters[repeaterName],
993 label: this.label + ' ' + __('Item', 'elementor'),
994 controls: rowSettingsModel.options.controls,
995 renderer: this.renderer
996 }));
997 return this.repeaters[repeaterName];
998 }
999 /**
1000 * Function lookup().
1001 *
1002 * If the view were destroyed, try to find it again if it exists.
1003 *
1004 * TODO: Refactor.
1005 *
1006 * @return {Container} container
1007 */
1008
1009 }, {
1010 key: "lookup",
1011 value: function lookup() {
1012 var _this$renderer$view;
1013
1014 var result = this;
1015
1016 if (!this.renderer) {
1017 return this;
1018 }
1019
1020 if (this !== this.renderer && (_this$renderer$view = this.renderer.view) !== null && _this$renderer$view !== void 0 && _this$renderer$view.isDisconnected && this.renderer.view.isDisconnected()) {
1021 this.renderer = this.renderer.lookup();
1022 }
1023
1024 if (undefined === this.view || !this.view.lookup || !this.view.isDisconnected()) {
1025 // Hack For repeater item the result is the parent container.
1026 if (Container.TYPE_REPEATER_ITEM === this.type) {
1027 this.settings = this.parent.parent.settings.get(this.model.get('name')).findWhere({
1028 _id: this.id
1029 });
1030 }
1031
1032 return result;
1033 }
1034
1035 var lookup = this.view.lookup();
1036
1037 if (lookup) {
1038 result = lookup.getContainer(); // Hack For repeater item the result is the parent container.
1039
1040 if (Container.REPEATER === this.type) {
1041 this.settings = result.settings.get(this.model.get('name')).findWhere({
1042 _id: this.id
1043 });
1044 return this;
1045 } // If lookup were done, new container were created and parent does not know about it.
1046
1047
1048 if (result.parent.children) {
1049 result.parent.children[result.view._index] = result;
1050 }
1051 }
1052
1053 return result;
1054 }
1055 }, {
1056 key: "findChildrenRecursive",
1057 value: function findChildrenRecursive(callback) {
1058 elementorCommon.helpers.softDeprecated('container.findChildrenRecursive( callback )', '3.5.0', 'container.children.findRecursive( callback )');
1059 return this.children.findRecursive(callback);
1060 }
1061 }, {
1062 key: "forEachChildrenRecursive",
1063 value: function forEachChildrenRecursive(callback) {
1064 elementorCommon.helpers.softDeprecated('container.forEachChildrenRecursive( callback )', '3.5.0', 'container.children.forEachRecursive( callback )');
1065 return this.children.forEachRecursive(callback);
1066 }
1067 /**
1068 * Function render().
1069 *
1070 * Call view render.
1071 *
1072 * Run's `this.renderer.view.renderOnChange( this.settings ) `.
1073 * When `this.renderer` exist.
1074 *
1075 */
1076
1077 }, {
1078 key: "render",
1079 value: function render() {
1080 if (!this.renderer) {
1081 return;
1082 }
1083
1084 this.renderer.view.renderOnChange(this.settings);
1085 }
1086 }, {
1087 key: "renderUI",
1088 value: function renderUI() {
1089 if (!this.renderer) {
1090 return;
1091 }
1092
1093 this.renderer.view.renderUI();
1094 }
1095 }, {
1096 key: "isEditable",
1097 value: function isEditable() {
1098 return 'edit' === elementor.channels.dataEditMode.request('activeMode') && 'open' === this.document.editor.status;
1099 }
1100 }, {
1101 key: "isDesignable",
1102 value: function isDesignable() {
1103 return elementor.userCan('design') && this.isEditable();
1104 }
1105 }, {
1106 key: "isRepeater",
1107 value: function isRepeater() {
1108 return Container.TYPE_REPEATER === this.type;
1109 }
1110 }, {
1111 key: "isRepeaterItem",
1112 value: function isRepeaterItem() {
1113 return Container.TYPE_REPEATER_ITEM === this.type;
1114 }
1115 }, {
1116 key: "isViewElement",
1117 value: function isViewElement() {
1118 return this.view && this.model.get('elType');
1119 }
1120 }, {
1121 key: "getSetting",
1122 value: function getSetting(name) {
1123 var localOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
1124 var localValue = this.settings.get(name);
1125
1126 if (localOnly) {
1127 return localValue;
1128 } // Try to get the value in the order: Global, Local, Global default.
1129
1130
1131 var globalValue;
1132
1133 if (this.getGlobalKey(name)) {
1134 globalValue = this.getGlobalValue(name);
1135 }
1136
1137 return globalValue || localValue || this.getGlobalDefault(name);
1138 }
1139 }, {
1140 key: "getGlobalKey",
1141 value: function getGlobalKey(name) {
1142 return this.globals.get(name);
1143 }
1144 }, {
1145 key: "getGlobalValue",
1146 value: function getGlobalValue(name) {
1147 var control = this.controls[name],
1148 globalKey = this.getGlobalKey(name),
1149 globalArgs = $e.data.commandExtractArgs(globalKey),
1150 data = $e.data.getCache($e.components.get('globals'), globalArgs.command, globalArgs.args.query);
1151
1152 if (!(data !== null && data !== void 0 && data.value)) {
1153 return;
1154 }
1155
1156 var id = data.id;
1157 var value; // it's a global settings with additional controls in group.
1158
1159 if (control.groupType) {
1160 // A regex containing all of the active breakpoints' prefixes ('_mobile', '_tablet' etc.).
1161 var responsivePrefixRegex = elementor.breakpoints.getActiveMatchRegex();
1162 var propertyName = control.name.replace(control.groupPrefix, '').replace(responsivePrefixRegex, '');
1163
1164 if (!data.value[elementor.config.kit_config.typography_prefix + propertyName]) {
1165 return;
1166 }
1167
1168 propertyName = propertyName.replace('_', '-');
1169 value = "var( --e-global-".concat(control.groupType, "-").concat(id, "-").concat(propertyName, " )");
1170
1171 if (elementor.config.ui.defaultGenericFonts && control.groupPrefix + 'font_family' === control.name) {
1172 value += ", ".concat(elementor.config.ui.defaultGenericFonts);
1173 }
1174 } else {
1175 value = "var( --e-global-".concat(control.type, "-").concat(id, " )");
1176 }
1177
1178 return value;
1179 }
1180 /**
1181 * Determine if a control's global value is applied.
1182 * It actually checks if the local value is different than the global value.
1183 *
1184 * @param {string} controlName - Control name
1185 * @return {boolean} true if a control's global value is applied
1186 */
1187
1188 }, {
1189 key: "isGlobalApplied",
1190 value: function isGlobalApplied(controlName) {
1191 return this.getSetting(controlName) !== this.settings.get(controlName);
1192 }
1193 }, {
1194 key: "getGlobalDefault",
1195 value: function getGlobalDefault(controlName) {
1196 var _this$controls$contro;
1197
1198 var controlGlobalArgs = (_this$controls$contro = this.controls[controlName]) === null || _this$controls$contro === void 0 ? void 0 : _this$controls$contro.global;
1199
1200 if (controlGlobalArgs !== null && controlGlobalArgs !== void 0 && controlGlobalArgs.default) {
1201 // Temp fix.
1202 var controlType = this.controls[controlName].type;
1203
1204 if ('color' === controlType) {
1205 controlType = 'colors';
1206 } // End temp fix
1207 // If the control is a color/typography control and default colors/typography are disabled, don't return the global value.
1208
1209
1210 if (!elementor.config.globals.defaults_enabled[controlType]) {
1211 return '';
1212 }
1213
1214 var _$e$data$commandExtra = $e.data.commandExtractArgs(controlGlobalArgs.default),
1215 command = _$e$data$commandExtra.command,
1216 args = _$e$data$commandExtra.args,
1217 result = $e.data.getCache($e.components.get('globals'), command, args.query);
1218
1219 return result === null || result === void 0 ? void 0 : result.value;
1220 } // No global default.
1221
1222
1223 return '';
1224 }
1225 }]);
1226 return Container;
1227 }(_argsObject.default);
1228
1229 exports["default"] = Container;
1230 (0, _defineProperty2.default)(Container, "TYPE_REPEATER", 'repeater-control');
1231 (0, _defineProperty2.default)(Container, "TYPE_REPEATER_ITEM", 'repeater');
1232
1233 /***/ }),
1234
1235 /***/ "../assets/dev/js/editor/container/model/children-array.js":
1236 /*!*****************************************************************!*\
1237 !*** ../assets/dev/js/editor/container/model/children-array.js ***!
1238 \*****************************************************************/
1239 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1240
1241 "use strict";
1242
1243
1244 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
1245
1246 Object.defineProperty(exports, "__esModule", ({
1247 value: true
1248 }));
1249 exports["default"] = void 0;
1250
1251 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
1252
1253 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
1254
1255 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
1256
1257 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
1258
1259 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
1260
1261 var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/wrapNativeSuper */ "../node_modules/@babel/runtime/helpers/wrapNativeSuper.js"));
1262
1263 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; } } }; }
1264
1265 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); }
1266
1267 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; }
1268
1269 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); }; }
1270
1271 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; } }
1272
1273 /**
1274 * @typedef {import('../container')} Container
1275 */
1276 var ChildrenArray = /*#__PURE__*/function (_Array) {
1277 (0, _inherits2.default)(ChildrenArray, _Array);
1278
1279 var _super = _createSuper(ChildrenArray);
1280
1281 function ChildrenArray() {
1282 (0, _classCallCheck2.default)(this, ChildrenArray);
1283 return _super.apply(this, arguments);
1284 }
1285
1286 (0, _createClass2.default)(ChildrenArray, [{
1287 key: "clear",
1288 value: function clear() {
1289 this.length = 0;
1290 }
1291 /**
1292 * Function findRecursive().
1293 *
1294 * Will run over children recursively and pass the children to the callback till the callback returns positive value.
1295 *
1296 * @param {function(Container) : *} callback
1297 *
1298 * @return {Container|false} child
1299 */
1300
1301 }, {
1302 key: "findRecursive",
1303 value: function findRecursive(callback) {
1304 var _iterator = _createForOfIteratorHelper(this),
1305 _step;
1306
1307 try {
1308 for (_iterator.s(); !(_step = _iterator.n()).done;) {
1309 var container = _step.value;
1310
1311 if (callback(container)) {
1312 return container;
1313 }
1314
1315 if (container.children.length) {
1316 var foundChildren = container.children.findRecursive(callback);
1317
1318 if (foundChildren) {
1319 return foundChildren;
1320 }
1321 }
1322 }
1323 } catch (err) {
1324 _iterator.e(err);
1325 } finally {
1326 _iterator.f();
1327 }
1328
1329 return false;
1330 }
1331 /**
1332 * Function forEachRecursive().
1333 *
1334 * Will run over children recursively.
1335 *
1336 * @param {function(Container) : *} callback
1337 *
1338 * @return {void}
1339 */
1340
1341 }, {
1342 key: "forEachRecursive",
1343 value: function forEachRecursive(callback) {
1344 var _iterator2 = _createForOfIteratorHelper(this),
1345 _step2;
1346
1347 try {
1348 for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
1349 var container = _step2.value;
1350 callback(container);
1351
1352 if (container.children.length) {
1353 container.children.forEachRecursive(callback);
1354 }
1355 }
1356 } catch (err) {
1357 _iterator2.e(err);
1358 } finally {
1359 _iterator2.f();
1360 }
1361 }
1362 /**
1363 * Function someRecursive().
1364 *
1365 * Will run over children recursively, breaks if the callback return true.
1366 *
1367 * @param {function(Container) : *} callback
1368 *
1369 */
1370
1371 }, {
1372 key: "someRecursive",
1373 value: function someRecursive(callback) {
1374 var _iterator3 = _createForOfIteratorHelper(this),
1375 _step3;
1376
1377 try {
1378 for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
1379 var _container$children;
1380
1381 var container = _step3.value;
1382
1383 if (callback(container)) {
1384 return true;
1385 }
1386
1387 if ((_container$children = container.children) !== null && _container$children !== void 0 && _container$children.length) {
1388 if (container.children.someRecursive(callback)) {
1389 return true;
1390 }
1391 }
1392 }
1393 } catch (err) {
1394 _iterator3.e(err);
1395 } finally {
1396 _iterator3.f();
1397 }
1398
1399 return false;
1400 }
1401 }]);
1402 return ChildrenArray;
1403 }( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Array));
1404
1405 exports["default"] = ChildrenArray;
1406
1407 /***/ }),
1408
1409 /***/ "../assets/dev/js/editor/container/panel.js":
1410 /*!**************************************************!*\
1411 !*** ../assets/dev/js/editor/container/panel.js ***!
1412 \**************************************************/
1413 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1414
1415 "use strict";
1416
1417
1418 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
1419
1420 Object.defineProperty(exports, "__esModule", ({
1421 value: true
1422 }));
1423 exports["default"] = void 0;
1424
1425 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
1426
1427 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
1428
1429 /**
1430 * @typedef {import('./container')} Container
1431 */
1432 var Panel = /*#__PURE__*/function () {
1433 /**
1434 * Function constructor().
1435 *
1436 * Create constructor panel.
1437 *
1438 * @param {Container} container
1439 */
1440 function Panel(container) {
1441 (0, _classCallCheck2.default)(this, Panel);
1442 this.container = container;
1443 }
1444 /**
1445 * Function refresh().
1446 *
1447 * Refresh the panel.
1448 */
1449
1450
1451 (0, _createClass2.default)(Panel, [{
1452 key: "refresh",
1453 value: function refresh() {
1454 if ($e.routes.isPartOf('panel/editor')) {
1455 $e.routes.refreshContainer('panel');
1456 }
1457 }
1458 /**
1459 * Function closeEditor().
1460 *
1461 * Route to `panel/elements/categories`
1462 */
1463
1464 }, {
1465 key: "closeEditor",
1466 value: function closeEditor() {
1467 $e.route('panel/elements/categories');
1468 }
1469 }, {
1470 key: "getControlView",
1471 value: function getControlView(name) {
1472 var editor = elementor.getPanelView().getCurrentPageView();
1473 return editor.children.findByModelCid(this.getControlModel(name).cid);
1474 }
1475 }, {
1476 key: "getControlModel",
1477 value: function getControlModel(name) {
1478 var editor = elementor.getPanelView().getCurrentPageView();
1479 return editor.collection.findWhere({
1480 name: name
1481 });
1482 }
1483 }]);
1484 return Panel;
1485 }();
1486
1487 exports["default"] = Panel;
1488
1489 /***/ }),
1490
1491 /***/ "../assets/dev/js/editor/elements/models/base-settings.js":
1492 /*!****************************************************************!*\
1493 !*** ../assets/dev/js/editor/elements/models/base-settings.js ***!
1494 \****************************************************************/
1495 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1496
1497 "use strict";
1498
1499
1500 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
1501
1502 var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"));
1503
1504 var BaseSettingsModel;
1505 BaseSettingsModel = Backbone.Model.extend({
1506 options: {},
1507 initialize: function initialize(data, options) {
1508 var self = this; // Keep the options for cloning
1509
1510 self.options = options;
1511 self.controls = elementor.mergeControlsSettings(options.controls);
1512 self.validators = {};
1513
1514 if (!self.controls) {
1515 return;
1516 }
1517
1518 var attrs = data || {},
1519 defaults = {};
1520
1521 _.each(self.controls, function (control) {
1522 // Check features since they does not exist in tests.
1523 var isUIControl = control.features && -1 !== control.features.indexOf('ui');
1524
1525 if (isUIControl) {
1526 return;
1527 }
1528
1529 var controlName = control.name;
1530
1531 if ('object' === (0, _typeof2.default)(control.default)) {
1532 defaults[controlName] = elementorCommon.helpers.cloneObject(control.default);
1533 } else {
1534 defaults[controlName] = control.default;
1535 }
1536
1537 var isDynamicControl = control.dynamic && control.dynamic.active,
1538 hasDynamicSettings = isDynamicControl && attrs.__dynamic__ && attrs.__dynamic__[controlName];
1539
1540 if (isDynamicControl && !hasDynamicSettings && control.dynamic.default) {
1541 if (!attrs.__dynamic__) {
1542 attrs.__dynamic__ = {};
1543 }
1544
1545 attrs.__dynamic__[controlName] = control.dynamic.default;
1546 hasDynamicSettings = true;
1547 } // Check if the value is a plain object ( and not an array )
1548
1549
1550 var isMultipleControl = jQuery.isPlainObject(control.default);
1551
1552 if (undefined !== attrs[controlName] && isMultipleControl && !_.isObject(attrs[controlName]) && !hasDynamicSettings) {
1553 elementorCommon.debug.addCustomError(new TypeError('An invalid argument supplied as multiple control value'), 'InvalidElementData', 'Element `' + (self.get('widgetType') || self.get('elType')) + '` got <' + attrs[controlName] + '> as `' + controlName + '` value. Expected array or object.');
1554 delete attrs[controlName];
1555 }
1556
1557 if (undefined === attrs[controlName]) {
1558 attrs[controlName] = defaults[controlName];
1559 }
1560 });
1561
1562 self.defaults = defaults;
1563 self.handleRepeaterData(attrs);
1564 self.set(attrs);
1565 },
1566 handleRepeaterData: function handleRepeaterData(attrs) {
1567 _.each(this.controls, function (field) {
1568 if (field.is_repeater) {
1569 // TODO: Apply defaults on each field in repeater fields
1570 if (!(attrs[field.name] instanceof Backbone.Collection)) {
1571 attrs[field.name] = new Backbone.Collection(attrs[field.name], {
1572 model: function model(attributes, options) {
1573 options = options || {};
1574 options.controls = {};
1575 Object.values(field.fields).forEach(function (item) {
1576 options.controls[item.name] = item;
1577 }); // TODO: Cannot be deleted, since it handle repeater items after repeater widget creation.
1578
1579 if (!attributes._id) {
1580 attributes._id = elementorCommon.helpers.getUniqueId();
1581 }
1582
1583 return new BaseSettingsModel(attributes, options);
1584 }
1585 });
1586 }
1587 }
1588 });
1589 },
1590 getFontControls: function getFontControls() {
1591 return this.getControlsByType('font');
1592 },
1593 getIconsControls: function getIconsControls() {
1594 return this.getControlsByType('icons');
1595 },
1596 getControlsByType: function getControlsByType(type) {
1597 return _.filter(this.getActiveControls(), function (control) {
1598 return type === control.type;
1599 });
1600 },
1601 getStyleControls: function getStyleControls(controls, attributes) {
1602 var self = this;
1603 controls = elementorCommon.helpers.cloneObject(self.getActiveControls(controls, attributes));
1604 var styleControls = [];
1605 jQuery.each(controls, function () {
1606 var _control$dynamic;
1607
1608 var control = this,
1609 controlDefaultSettings = elementor.config.controls[control.type];
1610 control = jQuery.extend({}, controlDefaultSettings, control);
1611
1612 if (control.fields) {
1613 var styleFields = [];
1614 self.attributes[control.name].each(function (item) {
1615 styleFields.push(self.getStyleControls(control.fields, item.attributes));
1616 });
1617 control.styleFields = styleFields;
1618 }
1619
1620 if (control.fields || (_control$dynamic = control.dynamic) !== null && _control$dynamic !== void 0 && _control$dynamic.active || self.isGlobalControl(control, controls) || self.isStyleControl(control.name, controls)) {
1621 styleControls.push(control);
1622 }
1623 });
1624 return styleControls;
1625 },
1626 isGlobalControl: function isGlobalControl(control, controls) {
1627 var _globalControl$global, _this$attributes$__gl;
1628
1629 var controlGlobalKey = control.name;
1630
1631 if (control.groupType) {
1632 controlGlobalKey = control.groupPrefix + control.groupType;
1633 }
1634
1635 var globalControl = controls[controlGlobalKey];
1636
1637 if (!((_globalControl$global = globalControl.global) !== null && _globalControl$global !== void 0 && _globalControl$global.active)) {
1638 return false;
1639 }
1640
1641 var globalValue = (_this$attributes$__gl = this.attributes.__globals__) === null || _this$attributes$__gl === void 0 ? void 0 : _this$attributes$__gl[controlGlobalKey];
1642 return !!globalValue;
1643 },
1644 isStyleControl: function isStyleControl(attribute, controls) {
1645 controls = controls || this.controls;
1646
1647 var currentControl = _.find(controls, function (control) {
1648 return attribute === control.name;
1649 });
1650
1651 return currentControl && !_.isEmpty(currentControl.selectors);
1652 },
1653 getClassControls: function getClassControls(controls) {
1654 controls = controls || this.controls;
1655 return _.filter(controls, function (control) {
1656 return !_.isUndefined(control.prefix_class);
1657 });
1658 },
1659 isClassControl: function isClassControl(attribute) {
1660 var currentControl = _.find(this.controls, function (control) {
1661 return attribute === control.name;
1662 });
1663
1664 return currentControl && !_.isUndefined(currentControl.prefix_class);
1665 },
1666 getControl: function getControl(id) {
1667 return _.find(this.controls, function (control) {
1668 return id === control.name;
1669 });
1670 },
1671 getActiveControls: function getActiveControls(controls, attributes) {
1672 var activeControls = {};
1673
1674 if (!controls) {
1675 controls = this.controls;
1676 }
1677
1678 if (!attributes) {
1679 attributes = this.attributes;
1680 }
1681
1682 attributes = this.parseGlobalSettings(attributes, controls);
1683 jQuery.each(controls, function (controlKey, control) {
1684 if (elementor.helpers.isActiveControl(control, attributes, controls)) {
1685 activeControls[controlKey] = control;
1686 }
1687 });
1688 return activeControls;
1689 },
1690 clone: function clone() {
1691 return new BaseSettingsModel(elementorCommon.helpers.cloneObject(this.attributes), elementorCommon.helpers.cloneObject(this.options));
1692 },
1693 setExternalChange: function setExternalChange(key, value) {
1694 var self = this,
1695 settingsToChange;
1696
1697 if ('object' === (0, _typeof2.default)(key)) {
1698 settingsToChange = key;
1699 } else {
1700 settingsToChange = {};
1701 settingsToChange[key] = value;
1702 }
1703
1704 self.set(settingsToChange);
1705 jQuery.each(settingsToChange, function (changedKey, changedValue) {
1706 self.trigger('change:external:' + changedKey, changedValue);
1707 });
1708 },
1709 parseDynamicSettings: function parseDynamicSettings(settings, options, controls) {
1710 var self = this;
1711 settings = elementorCommon.helpers.cloneObject(settings || self.attributes);
1712 options = options || {};
1713 controls = controls || this.controls;
1714 jQuery.each(controls, function () {
1715 var control = this,
1716 valueToParse;
1717
1718 if (control.is_repeater) {
1719 valueToParse = settings[control.name];
1720 valueToParse.forEach(function (value, key) {
1721 valueToParse[key] = self.parseDynamicSettings(value, options, control.fields);
1722 });
1723 return;
1724 }
1725
1726 valueToParse = settings.__dynamic__ && settings.__dynamic__[control.name];
1727
1728 if (!valueToParse) {
1729 return;
1730 }
1731
1732 var dynamicSettings = control.dynamic;
1733
1734 if (undefined === dynamicSettings) {
1735 dynamicSettings = elementor.config.controls[control.type].dynamic;
1736 }
1737
1738 if (!dynamicSettings || !dynamicSettings.active) {
1739 return;
1740 }
1741
1742 var dynamicValue;
1743
1744 try {
1745 dynamicValue = elementor.dynamicTags.parseTagsText(valueToParse, dynamicSettings, elementor.dynamicTags.getTagDataContent);
1746 } catch (error) {
1747 if (elementor.dynamicTags.CACHE_KEY_NOT_FOUND_ERROR !== error.message) {
1748 throw error;
1749 }
1750
1751 dynamicValue = '';
1752
1753 if (options.onServerRequestStart) {
1754 options.onServerRequestStart();
1755 }
1756
1757 elementor.dynamicTags.refreshCacheFromServer(function () {
1758 if (options.onServerRequestEnd) {
1759 options.onServerRequestEnd();
1760 }
1761 });
1762 }
1763
1764 if (dynamicSettings.property) {
1765 settings[control.name][dynamicSettings.property] = dynamicValue;
1766 } else {
1767 settings[control.name] = dynamicValue;
1768 }
1769 });
1770 return settings;
1771 },
1772 parseGlobalSettings: function parseGlobalSettings(settings, controls) {
1773 var _this = this;
1774
1775 settings = elementorCommon.helpers.cloneObject(settings);
1776 controls = controls || this.controls;
1777 jQuery.each(controls, function (index, control) {
1778 var _settings$__globals__, _globalSettings;
1779
1780 var valueToParse;
1781
1782 if (control.is_repeater) {
1783 valueToParse = settings[control.name];
1784 valueToParse.forEach(function (value, key) {
1785 valueToParse[key] = _this.parseGlobalSettings(value, control.fields);
1786 });
1787 return;
1788 }
1789
1790 valueToParse = (_settings$__globals__ = settings.__globals__) === null || _settings$__globals__ === void 0 ? void 0 : _settings$__globals__[control.name];
1791
1792 if (!valueToParse) {
1793 return;
1794 }
1795
1796 var globalSettings = control.global;
1797
1798 if (undefined === globalSettings) {
1799 globalSettings = elementor.config.controls[control.type].global;
1800 }
1801
1802 if (!((_globalSettings = globalSettings) !== null && _globalSettings !== void 0 && _globalSettings.active)) {
1803 return;
1804 }
1805
1806 var _$e$data$commandExtra = $e.data.commandExtractArgs(valueToParse),
1807 command = _$e$data$commandExtra.command,
1808 args = _$e$data$commandExtra.args,
1809 globalValue = $e.data.getCache($e.components.get('globals'), command, args.query);
1810
1811 if (control.groupType) {
1812 settings[control.name] = 'custom';
1813 } else {
1814 settings[control.name] = globalValue;
1815 }
1816 });
1817 return settings;
1818 },
1819 removeDataDefaults: function removeDataDefaults(data, controls) {
1820 var _this2 = this;
1821
1822 jQuery.each(data, function (key) {
1823 var control = controls[key];
1824
1825 if (!control) {
1826 return;
1827 } // TODO: use `save_default` in text|textarea controls.
1828
1829
1830 if (control.save_default || ('text' === control.type || 'textarea' === control.type) && data[key]) {
1831 return;
1832 }
1833
1834 if (control.is_repeater) {
1835 data[key].forEach(function (repeaterRow) {
1836 _this2.removeDataDefaults(repeaterRow, control.fields);
1837 });
1838 return;
1839 }
1840
1841 if (_.isEqual(data[key], control.default)) {
1842 delete data[key];
1843 }
1844 });
1845 },
1846 toJSON: function toJSON(options) {
1847 var data = Backbone.Model.prototype.toJSON.call(this);
1848 options = options || {};
1849 delete data.widgetType;
1850 delete data.elType;
1851 delete data.isInner;
1852
1853 _.each(data, function (attribute, key) {
1854 if (attribute && attribute.toJSON) {
1855 data[key] = attribute.toJSON();
1856 }
1857 });
1858
1859 if (options.remove && -1 !== options.remove.indexOf('default')) {
1860 this.removeDataDefaults(data, this.controls);
1861 }
1862
1863 return elementorCommon.helpers.cloneObject(data);
1864 }
1865 });
1866 module.exports = BaseSettingsModel;
1867
1868 /***/ }),
1869
1870 /***/ "../assets/dev/js/editor/elements/views/behaviors/inner-tabs.js":
1871 /*!**********************************************************************!*\
1872 !*** ../assets/dev/js/editor/elements/views/behaviors/inner-tabs.js ***!
1873 \**********************************************************************/
1874 /***/ ((module) => {
1875
1876 "use strict";
1877
1878
1879 var InnerTabsBehavior;
1880 InnerTabsBehavior = Marionette.Behavior.extend({
1881 onRenderCollection: function onRenderCollection() {
1882 this.handleInnerTabs(this.view);
1883 },
1884 handleInnerTabs: function handleInnerTabs(parent) {
1885 var closedClass = 'elementor-tab-close',
1886 activeClass = 'elementor-tab-active',
1887 tabsWrappers = parent.children.filter(function (view) {
1888 return 'tabs' === view.model.get('type');
1889 });
1890
1891 _.each(tabsWrappers, function (view) {
1892 view.$el.find('.elementor-control-content').remove();
1893 var tabsId = view.model.get('name'),
1894 tabs = parent.children.filter(function (childView) {
1895 return 'tab' === childView.model.get('type') && childView.model.get('tabs_wrapper') === tabsId;
1896 });
1897
1898 _.each(tabs, function (childView, index) {
1899 view._addChildView(childView);
1900
1901 var tabId = childView.model.get('name'),
1902 controlsUnderTab = parent.children.filter(function (controlView) {
1903 return tabId === controlView.model.get('inner_tab');
1904 });
1905
1906 if (0 === index) {
1907 childView.$el.addClass(activeClass);
1908 } else {
1909 _.each(controlsUnderTab, function (controlView) {
1910 controlView.$el.addClass(closedClass);
1911 });
1912 }
1913 });
1914 });
1915 },
1916 onChildviewControlTabClicked: function onChildviewControlTabClicked(childView) {
1917 var closedClass = 'elementor-tab-close',
1918 activeClass = 'elementor-tab-active',
1919 tabClicked = childView.model.get('name'),
1920 childrenUnderTab = this.view.children.filter(function (view) {
1921 return 'tab' !== view.model.get('type') && childView.model.get('tabs_wrapper') === view.model.get('tabs_wrapper');
1922 }),
1923 siblingTabs = this.view.children.filter(function (view) {
1924 return 'tab' === view.model.get('type') && childView.model.get('tabs_wrapper') === view.model.get('tabs_wrapper');
1925 });
1926
1927 _.each(siblingTabs, function (view) {
1928 view.$el.removeClass(activeClass);
1929 });
1930
1931 childView.$el.addClass(activeClass);
1932
1933 _.each(childrenUnderTab, function (view) {
1934 if (view.model.get('inner_tab') === tabClicked) {
1935 view.$el.removeClass(closedClass);
1936 } else {
1937 view.$el.addClass(closedClass);
1938 }
1939 });
1940
1941 elementor.getPanelView().updateScrollbar();
1942 }
1943 });
1944 module.exports = InnerTabsBehavior;
1945
1946 /***/ }),
1947
1948 /***/ "../assets/dev/js/editor/utils/introduction.js":
1949 /*!*****************************************************!*\
1950 !*** ../assets/dev/js/editor/utils/introduction.js ***!
1951 \*****************************************************/
1952 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1953
1954 "use strict";
1955
1956
1957 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
1958
1959 Object.defineProperty(exports, "__esModule", ({
1960 value: true
1961 }));
1962 exports["default"] = void 0;
1963
1964 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
1965
1966 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
1967
1968 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
1969
1970 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
1971
1972 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
1973
1974 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); }; }
1975
1976 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; } }
1977
1978 var _default = /*#__PURE__*/function (_elementorModules$Mod) {
1979 (0, _inherits2.default)(_default, _elementorModules$Mod);
1980
1981 var _super = _createSuper(_default);
1982
1983 function _default() {
1984 var _this;
1985
1986 (0, _classCallCheck2.default)(this, _default);
1987
1988 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
1989 args[_key] = arguments[_key];
1990 }
1991
1992 _this = _super.call.apply(_super, [this].concat(args));
1993
1994 _this.initDialog();
1995
1996 return _this;
1997 }
1998
1999 (0, _createClass2.default)(_default, [{
2000 key: "getDefaultSettings",
2001 value: function getDefaultSettings() {
2002 return {
2003 dialogType: 'buttons',
2004 dialogOptions: {
2005 effects: {
2006 hide: 'hide',
2007 show: 'show'
2008 },
2009 hide: {
2010 onBackgroundClick: false
2011 }
2012 }
2013 };
2014 }
2015 }, {
2016 key: "initDialog",
2017 value: function initDialog() {
2018 var _this2 = this;
2019
2020 var dialog;
2021
2022 this.getDialog = function () {
2023 if (!dialog) {
2024 var settings = _this2.getSettings();
2025
2026 dialog = elementorCommon.dialogsManager.createWidget(settings.dialogType, settings.dialogOptions);
2027
2028 if (settings.onDialogInitCallback) {
2029 settings.onDialogInitCallback.call(_this2, dialog);
2030 }
2031 }
2032
2033 return dialog;
2034 };
2035 }
2036 }, {
2037 key: "show",
2038 value: function show(target) {
2039 if (this.introductionViewed) {
2040 return;
2041 }
2042
2043 var dialog = this.getDialog();
2044
2045 if (target) {
2046 dialog.setSettings('position', {
2047 of: target
2048 });
2049 }
2050
2051 dialog.show();
2052 }
2053 }, {
2054 key: "setViewed",
2055 value: function setViewed() {
2056 this.introductionViewed = true;
2057 elementorCommon.ajax.addRequest('introduction_viewed', {
2058 data: {
2059 introductionKey: this.getSettings('introductionKey')
2060 }
2061 });
2062 }
2063 }]);
2064 return _default;
2065 }(elementorModules.Module);
2066
2067 exports["default"] = _default;
2068
2069 /***/ }),
2070
2071 /***/ "../assets/dev/js/editor/utils/is-instanceof.js":
2072 /*!******************************************************!*\
2073 !*** ../assets/dev/js/editor/utils/is-instanceof.js ***!
2074 \******************************************************/
2075 /***/ ((__unused_webpack_module, exports) => {
2076
2077 "use strict";
2078
2079
2080 Object.defineProperty(exports, "__esModule", ({
2081 value: true
2082 }));
2083 exports["default"] = void 0;
2084
2085 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; } } }; }
2086
2087 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); }
2088
2089 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; }
2090
2091 /**
2092 * Some FileAPI objects such as FileList, DataTransferItem and DataTransferItemList has inconsistency with the retrieved
2093 * object (from events, etc.) and the actual JavaScript object so a regular instanceof doesn't work. This function can
2094 * check whether it's instanceof by using the objects constructor and prototype names.
2095 *
2096 * @param object
2097 * @param constructors
2098 * @return {boolean}
2099 */
2100 var _default = function _default(object, constructors) {
2101 constructors = Array.isArray(constructors) ? constructors : [constructors];
2102
2103 var _iterator = _createForOfIteratorHelper(constructors),
2104 _step;
2105
2106 try {
2107 for (_iterator.s(); !(_step = _iterator.n()).done;) {
2108 var _constructor = _step.value;
2109
2110 if (object.constructor.name === _constructor.prototype[Symbol.toStringTag]) {
2111 return true;
2112 }
2113 }
2114 } catch (err) {
2115 _iterator.e(err);
2116 } finally {
2117 _iterator.f();
2118 }
2119
2120 return false;
2121 };
2122
2123 exports["default"] = _default;
2124
2125 /***/ }),
2126
2127 /***/ "../assets/dev/js/editor/utils/module.js":
2128 /*!***********************************************!*\
2129 !*** ../assets/dev/js/editor/utils/module.js ***!
2130 \***********************************************/
2131 /***/ ((module) => {
2132
2133 "use strict";
2134
2135
2136 var EditorModule = elementorModules.Module.extend({
2137 onInit: function onInit() {
2138 var _this = this;
2139
2140 var $window = jQuery(window);
2141 $window.on('elementor:init-components', this.onElementorInitComponents.bind(this));
2142 $window.on('elementor:loaded', function () {
2143 _this.onElementorLoaded();
2144
2145 elementor.on('document:loaded', _this.onDocumentLoaded.bind(_this));
2146 });
2147 $window.on('elementor:init', this.onElementorReady);
2148 },
2149 // TODO: Delete as soon as possible.
2150 getEditorControlView: function getEditorControlView(name) {
2151 var editor = elementor.getPanelView().getCurrentPageView();
2152 return editor.children.findByModelCid(this.getEditorControlModel(name).cid);
2153 },
2154 // TODO: Delete as soon as possible.
2155 getEditorControlModel: function getEditorControlModel(name) {
2156 var editor = elementor.getPanelView().getCurrentPageView();
2157 return editor.collection.findWhere({
2158 name: name
2159 });
2160 },
2161 onElementorReady: function onElementorReady() {
2162 this.onElementorInit();
2163 elementor.on('frontend:init', this.onElementorFrontendInit.bind(this)).on('preview:loaded', this.onElementorPreviewLoaded.bind(this));
2164 }
2165 });
2166
2167 EditorModule.prototype.onElementorLoaded = function () {};
2168
2169 EditorModule.prototype.onElementorInit = function () {};
2170
2171 EditorModule.prototype.onElementorPreviewLoaded = function () {};
2172
2173 EditorModule.prototype.onDocumentLoaded = function () {};
2174
2175 EditorModule.prototype.onElementorFrontendInit = function () {};
2176
2177 EditorModule.prototype.onElementorInitComponents = function () {};
2178
2179 module.exports = EditorModule;
2180
2181 /***/ }),
2182
2183 /***/ "../assets/dev/js/editor/views/controls-popover.js":
2184 /*!*********************************************************!*\
2185 !*** ../assets/dev/js/editor/views/controls-popover.js ***!
2186 \*********************************************************/
2187 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
2188
2189 "use strict";
2190 /* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"];
2191
2192
2193 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
2194
2195 Object.defineProperty(exports, "__esModule", ({
2196 value: true
2197 }));
2198 exports["default"] = void 0;
2199
2200 var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
2201
2202 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
2203
2204 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
2205
2206 var ControlsPopover = /*#__PURE__*/function () {
2207 function ControlsPopover(child) {
2208 (0, _classCallCheck2.default)(this, ControlsPopover);
2209 this.child = child;
2210 this.$popover = jQuery('<div>', {
2211 class: 'elementor-controls-popover'
2212 });
2213 child.$el.before(this.$popover);
2214 this.$popover.append(child.$el);
2215 this.popoverToggleView = child._parent.children.findByIndex(child._index - 1); // Add the "Typography" header to the popover
2216
2217 if ('typography' === this.child.model.attributes.groupType) {
2218 this.createPopoverHeader();
2219 }
2220 }
2221
2222 (0, _createClass2.default)(ControlsPopover, [{
2223 key: "addChild",
2224 value: function addChild(child) {
2225 this.$popover.append(child.$el);
2226 }
2227 }, {
2228 key: "createPopoverHeader",
2229 value: function createPopoverHeader() {
2230 var _this = this;
2231
2232 var $popoverToggleControl = this.$popover.prev(),
2233 // Get the existing reset button.
2234 $resetLabel = $popoverToggleControl.find('.elementor-control-popover-toggle-reset-label');
2235 this.$popoverHeader = jQuery('<div>', {
2236 class: 'e-group-control-header'
2237 }).html('<span>' + __('Typography', 'elementor') + '</span>');
2238 this.$headerControlsWrapper = jQuery('<div>', {
2239 class: 'e-control-tools'
2240 }); // Give the reset button the control tool styling, and add a click event so clicking on it closes the popover.
2241
2242 $resetLabel.addClass('e-control-tool').on('click', function () {
2243 return _this.onResetButtonClick();
2244 }); // Move the popover toggle reset button into the popover header.
2245
2246 this.$headerControlsWrapper.append($resetLabel);
2247 this.$popoverHeader.append(this.$headerControlsWrapper);
2248 var globalConfig = this.popoverToggleView.model.get('global');
2249
2250 if (globalConfig !== null && globalConfig !== void 0 && globalConfig.active) {
2251 this.createAddButton();
2252 }
2253
2254 this.$popover.prepend(this.$popoverHeader).addClass('e-controls-popover--typography');
2255 }
2256 }, {
2257 key: "onResetButtonClick",
2258 value: function onResetButtonClick() {
2259 this.$popover.hide();
2260 var groupControlName = this.child.model.get('groupPrefix') + 'typography',
2261 args = {
2262 container: this.child.options.container,
2263 settings: (0, _defineProperty2.default)({}, groupControlName, '')
2264 };
2265
2266 if (this.child.options.container.globals.get(groupControlName)) {
2267 // The Disable Globals command applies global settings locally,
2268 // so disabling the global shouldn't actually change the appearance of the widget.
2269 $e.run('document/globals/disable', args);
2270 } else {
2271 $e.run('document/elements/settings', args);
2272 }
2273 }
2274 }, {
2275 key: "onAddButtonClick",
2276 value: function onAddButtonClick() {
2277 this.popoverToggleView.onAddGlobalButtonClick();
2278 }
2279 }, {
2280 key: "createAddButton",
2281 value: function createAddButton() {
2282 var _this2 = this;
2283
2284 this.$addButton = jQuery('<button>', {
2285 class: 'e-control-tool'
2286 }).html(jQuery('<i>', {
2287 class: 'eicon-plus'
2288 }));
2289 this.$headerControlsWrapper.append(this.$addButton);
2290 this.$addButton.on('click', function () {
2291 return _this2.onAddButtonClick();
2292 });
2293 this.$addButton.tipsy({
2294 title: function title() {
2295 return __('Create New Global Font', 'elementor');
2296 },
2297 gravity: function gravity() {
2298 return 's';
2299 }
2300 });
2301 }
2302 }, {
2303 key: "destroy",
2304 value: function destroy() {
2305 this.$popover.remove();
2306 }
2307 }]);
2308 return ControlsPopover;
2309 }();
2310
2311 exports["default"] = ControlsPopover;
2312
2313 /***/ }),
2314
2315 /***/ "../assets/dev/js/editor/views/controls-stack.js":
2316 /*!*******************************************************!*\
2317 !*** ../assets/dev/js/editor/views/controls-stack.js ***!
2318 \*******************************************************/
2319 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2320
2321 "use strict";
2322
2323
2324 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
2325
2326 var _controlsPopover = _interopRequireDefault(__webpack_require__(/*! ./controls-popover */ "../assets/dev/js/editor/views/controls-popover.js"));
2327
2328 var ControlsStack;
2329 ControlsStack = Marionette.CompositeView.extend({
2330 classes: {
2331 popover: 'elementor-controls-popover'
2332 },
2333 activeTab: null,
2334 activeSection: null,
2335 className: function className() {
2336 return 'elementor-controls-stack';
2337 },
2338 templateHelpers: function templateHelpers() {
2339 return {
2340 elementData: elementor.getElementData(this.model)
2341 };
2342 },
2343 childViewOptions: function childViewOptions() {
2344 return {
2345 // TODO: elementSettingsModel is deprecated since 2.8.0.
2346 elementSettingsModel: this.model
2347 };
2348 },
2349 ui: function ui() {
2350 return {
2351 tabs: '.elementor-panel-navigation-tab',
2352 reloadButton: '.elementor-update-preview-button'
2353 };
2354 },
2355 events: function events() {
2356 return {
2357 'click @ui.reloadButton': 'onReloadButtonClick'
2358 };
2359 },
2360 modelEvents: {
2361 destroy: 'onModelDestroy'
2362 },
2363 behaviors: {
2364 HandleInnerTabs: {
2365 behaviorClass: __webpack_require__(/*! elementor-behaviors/inner-tabs */ "../assets/dev/js/editor/elements/views/behaviors/inner-tabs.js")
2366 }
2367 },
2368 initialize: function initialize(options) {
2369 this.initCollection();
2370
2371 if (options.tab) {
2372 this.activeTab = options.tab;
2373 this.activateFirstSection();
2374 }
2375
2376 this.listenTo(elementor.channels.deviceMode, 'change', this.onDeviceModeChange);
2377 },
2378 initCollection: function initCollection() {
2379 this.collection = new Backbone.Collection(_.values(elementor.mergeControlsSettings(this.getOption('controls'))));
2380 },
2381 filter: function filter(controlModel) {
2382 if (controlModel.get('tab') !== this.activeTab) {
2383 return false;
2384 }
2385
2386 if ('section' === controlModel.get('type')) {
2387 return true;
2388 }
2389
2390 var section = controlModel.get('section');
2391 return !section || section === this.activeSection;
2392 },
2393 getControlViewByModel: function getControlViewByModel(model) {
2394 return this.children.findByModelCid(model.cid);
2395 },
2396 getControlViewByName: function getControlViewByName(name) {
2397 return this.getControlViewByModel(this.getControlModel(name));
2398 },
2399 getControlModel: function getControlModel(name) {
2400 return this.collection.findWhere({
2401 name: name
2402 });
2403 },
2404 isVisibleSectionControl: function isVisibleSectionControl(sectionControlModel) {
2405 return this.activeTab === sectionControlModel.get('tab');
2406 },
2407 activateTab: function activateTab(tab) {
2408 this.activeTab = tab;
2409 this.activateFirstSection();
2410
2411 this._renderChildren();
2412
2413 return this;
2414 },
2415 activateSection: function activateSection(sectionName) {
2416 this.activeSection = sectionName;
2417 return this;
2418 },
2419 activateFirstSection: function activateFirstSection() {
2420 var self = this;
2421 var sectionControls = self.collection.filter(function (controlModel) {
2422 return 'section' === controlModel.get('type') && self.isVisibleSectionControl(controlModel);
2423 });
2424 var sectionToActivate;
2425
2426 if (!sectionControls[0]) {
2427 self.activeSection = null;
2428 sectionToActivate = null;
2429 } else {
2430 sectionToActivate = sectionControls[0].get('name');
2431 }
2432
2433 var preActivatedSection = sectionControls.filter(function (controlModel) {
2434 return self.activeSection === controlModel.get('name');
2435 });
2436
2437 if (preActivatedSection[0]) {
2438 return;
2439 }
2440
2441 self.activateSection(sectionToActivate);
2442 return this;
2443 },
2444 getChildView: function getChildView(item) {
2445 var controlType = item.get('type');
2446 return elementor.getControlView(controlType);
2447 },
2448 getNamespaceArray: function getNamespaceArray() {
2449 return [elementor.getPanelView().getCurrentPageName()];
2450 },
2451 openActiveSection: function openActiveSection() {
2452 var activeSection = this.activeSection,
2453 activeSectionView = this.children.filter(function (view) {
2454 return activeSection === view.model.get('name');
2455 });
2456
2457 if (activeSectionView[0]) {
2458 activeSectionView[0].$el.addClass('elementor-open');
2459 var eventNamespace = this.getNamespaceArray();
2460 eventNamespace.push(activeSection, 'activated');
2461 elementor.channels.editor.trigger(eventNamespace.join(':'), this);
2462 }
2463 },
2464 onRenderCollection: function onRenderCollection() {
2465 this.openActiveSection();
2466 ControlsStack.handlePopovers(this);
2467 },
2468 onModelDestroy: function onModelDestroy() {
2469 this.destroy();
2470 },
2471 onReloadButtonClick: function onReloadButtonClick() {
2472 elementor.reloadPreview();
2473 },
2474 onDeviceModeChange: function onDeviceModeChange() {
2475 if ('desktop' === elementor.channels.deviceMode.request('currentMode')) {
2476 this.$el.removeClass('elementor-responsive-switchers-open');
2477 }
2478 },
2479 onChildviewControlSectionClicked: function onChildviewControlSectionClicked(childView) {
2480 var isSectionOpen = childView.$el.hasClass('elementor-open');
2481 this.activateSection(isSectionOpen ? null : childView.model.get('name'));
2482
2483 this._renderChildren();
2484 },
2485 onChildviewResponsiveSwitcherClick: function onChildviewResponsiveSwitcherClick(childView, device) {
2486 if ('desktop' === device) {
2487 this.$el.toggleClass('elementor-responsive-switchers-open');
2488 }
2489 }
2490 }, {
2491 handlePopovers: function handlePopovers(view) {
2492 var popover;
2493 view.popovers = [];
2494 this.removePopovers(view);
2495 view.children.each(function (control) {
2496 if (popover) {
2497 popover.addChild(control);
2498 }
2499
2500 var popoverData = control.model.get('popover');
2501
2502 if (!popoverData) {
2503 return;
2504 }
2505
2506 if (popoverData.start) {
2507 popover = new _controlsPopover.default(control);
2508 view.popovers.push(popover);
2509 }
2510
2511 if (popoverData.end) {
2512 popover = null;
2513 }
2514 });
2515 },
2516 removePopovers: function removePopovers(view) {
2517 view.popovers.forEach(function (popover) {
2518 return popover.destroy();
2519 });
2520 }
2521 });
2522 module.exports = ControlsStack;
2523
2524 /***/ }),
2525
2526 /***/ "../assets/dev/js/modules/imports/args-object.js":
2527 /*!*******************************************************!*\
2528 !*** ../assets/dev/js/modules/imports/args-object.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 _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"));
2543
2544 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
2545
2546 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
2547
2548 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
2549
2550 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
2551
2552 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
2553
2554 var _instanceType = _interopRequireDefault(__webpack_require__(/*! ./instance-type */ "../assets/dev/js/modules/imports/instance-type.js"));
2555
2556 var _isInstanceof = _interopRequireDefault(__webpack_require__(/*! ../../editor/utils/is-instanceof */ "../assets/dev/js/editor/utils/is-instanceof.js"));
2557
2558 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); }; }
2559
2560 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; } }
2561
2562 var ArgsObject = /*#__PURE__*/function (_InstanceType) {
2563 (0, _inherits2.default)(ArgsObject, _InstanceType);
2564
2565 var _super = _createSuper(ArgsObject);
2566
2567 /**
2568 * Function constructor().
2569 *
2570 * Create ArgsObject.
2571 *
2572 * @param {{}} args
2573 */
2574 function ArgsObject(args) {
2575 var _this;
2576
2577 (0, _classCallCheck2.default)(this, ArgsObject);
2578 _this = _super.call(this);
2579 _this.args = args;
2580 return _this;
2581 }
2582 /**
2583 * Function requireArgument().
2584 *
2585 * Validate property in args.
2586 *
2587 * @param {string} property
2588 * @param {{}} args
2589 *
2590 * @throws {Error}
2591 *
2592 */
2593
2594
2595 (0, _createClass2.default)(ArgsObject, [{
2596 key: "requireArgument",
2597 value: function requireArgument(property) {
2598 var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.args;
2599
2600 if (!args.hasOwnProperty(property)) {
2601 throw Error("".concat(property, " is required."));
2602 }
2603 }
2604 /**
2605 * Function requireArgumentType().
2606 *
2607 * Validate property in args using `type === typeof(args.whatever)`.
2608 *
2609 * @param {string} property
2610 * @param {string} type
2611 * @param {{}} args
2612 *
2613 * @throws {Error}
2614 *
2615 */
2616
2617 }, {
2618 key: "requireArgumentType",
2619 value: function requireArgumentType(property, type) {
2620 var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.args;
2621 this.requireArgument(property, args);
2622
2623 if ((0, _typeof2.default)(args[property]) !== type) {
2624 throw Error("".concat(property, " invalid type: ").concat(type, "."));
2625 }
2626 }
2627 /**
2628 * Function requireArgumentInstance().
2629 *
2630 * Validate property in args using `args.whatever instanceof instance`.
2631 *
2632 * @param {string} property
2633 * @param {*} instance
2634 * @param {{}} args
2635 *
2636 * @throws {Error}
2637 *
2638 */
2639
2640 }, {
2641 key: "requireArgumentInstance",
2642 value: function requireArgumentInstance(property, instance) {
2643 var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.args;
2644 this.requireArgument(property, args);
2645
2646 if (!(args[property] instanceof instance) && !(0, _isInstanceof.default)(args[property], instance)) {
2647 throw Error("".concat(property, " invalid instance."));
2648 }
2649 }
2650 /**
2651 * Function requireArgumentConstructor().
2652 *
2653 * Validate property in args using `type === args.whatever.constructor`.
2654 *
2655 * @param {string} property
2656 * @param {*} type
2657 * @param {{}} args
2658 *
2659 * @throws {Error}
2660 *
2661 */
2662
2663 }, {
2664 key: "requireArgumentConstructor",
2665 value: function requireArgumentConstructor(property, type) {
2666 var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.args;
2667 this.requireArgument(property, args); // Note: Converting the constructor to string in order to avoid equation issues
2668 // due to different memory addresses between iframes (window.Object !== window.top.Object).
2669
2670 if (args[property].constructor.toString() !== type.prototype.constructor.toString()) {
2671 throw Error("".concat(property, " invalid constructor type."));
2672 }
2673 }
2674 }], [{
2675 key: "getInstanceType",
2676 value: function getInstanceType() {
2677 return 'ArgsObject';
2678 }
2679 }]);
2680 return ArgsObject;
2681 }(_instanceType.default);
2682
2683 exports["default"] = ArgsObject;
2684
2685 /***/ }),
2686
2687 /***/ "../assets/dev/js/modules/imports/instance-type.js":
2688 /*!*********************************************************!*\
2689 !*** ../assets/dev/js/modules/imports/instance-type.js ***!
2690 \*********************************************************/
2691 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
2692
2693 "use strict";
2694
2695
2696 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
2697
2698 Object.defineProperty(exports, "__esModule", ({
2699 value: true
2700 }));
2701 exports["default"] = void 0;
2702
2703 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
2704
2705 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
2706
2707 var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js"));
2708
2709 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
2710
2711 var InstanceType = /*#__PURE__*/function (_Symbol$hasInstance) {
2712 function InstanceType() {
2713 var _this = this;
2714
2715 (0, _classCallCheck2.default)(this, InstanceType);
2716 // Since anonymous classes sometimes do not get validated by babel, do it manually.
2717 var target = this instanceof InstanceType ? this.constructor : void 0;
2718 var prototypes = [];
2719
2720 while (target.__proto__ && target.__proto__.name) {
2721 prototypes.push(target.__proto__);
2722 target = target.__proto__;
2723 }
2724
2725 prototypes.reverse().forEach(function (proto) {
2726 return _this instanceof proto;
2727 });
2728 }
2729
2730 (0, _createClass2.default)(InstanceType, null, [{
2731 key: _Symbol$hasInstance,
2732 value: function value(target) {
2733 /**
2734 * This is function extending being called each time JS uses instanceOf, since babel use it each time it create new class
2735 * its give's opportunity to mange capabilities of instanceOf operator.
2736 * saving current class each time will give option later to handle instanceOf manually.
2737 */
2738 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.
2739
2740 if (target && !target.constructor.getInstanceType) {
2741 return result;
2742 }
2743
2744 if (target) {
2745 if (!target.instanceTypes) {
2746 target.instanceTypes = [];
2747 }
2748
2749 if (!result) {
2750 if (this.getInstanceType() === target.constructor.getInstanceType()) {
2751 result = true;
2752 }
2753 }
2754
2755 if (result) {
2756 var name = this.getInstanceType === InstanceType.getInstanceType ? 'BaseInstanceType' : this.getInstanceType();
2757
2758 if (-1 === target.instanceTypes.indexOf(name)) {
2759 target.instanceTypes.push(name);
2760 }
2761 }
2762 }
2763
2764 if (!result && target) {
2765 // Check if the given 'target', is instance of known types.
2766 result = target.instanceTypes && Array.isArray(target.instanceTypes) && -1 !== target.instanceTypes.indexOf(this.getInstanceType());
2767 }
2768
2769 return result;
2770 }
2771 }, {
2772 key: "getInstanceType",
2773 value: function getInstanceType() {
2774 elementorModules.ForceMethodImplementation();
2775 }
2776 }]);
2777 return InstanceType;
2778 }(Symbol.hasInstance);
2779
2780 exports["default"] = InstanceType;
2781
2782 /***/ }),
2783
2784 /***/ "@wordpress/i18n":
2785 /*!**************************!*\
2786 !*** external "wp.i18n" ***!
2787 \**************************/
2788 /***/ ((module) => {
2789
2790 "use strict";
2791 module.exports = wp.i18n;
2792
2793 /***/ })
2794
2795 /******/ });
2796 /************************************************************************/
2797 /******/ // The module cache
2798 /******/ var __webpack_module_cache__ = {};
2799 /******/
2800 /******/ // The require function
2801 /******/ function __webpack_require__(moduleId) {
2802 /******/ // Check if module is in cache
2803 /******/ var cachedModule = __webpack_module_cache__[moduleId];
2804 /******/ if (cachedModule !== undefined) {
2805 /******/ return cachedModule.exports;
2806 /******/ }
2807 /******/ // Create a new module (and put it into the cache)
2808 /******/ var module = __webpack_module_cache__[moduleId] = {
2809 /******/ // no module.id needed
2810 /******/ // no module.loaded needed
2811 /******/ exports: {}
2812 /******/ };
2813 /******/
2814 /******/ // Execute the module function
2815 /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
2816 /******/
2817 /******/ // Return the exports of the module
2818 /******/ return module.exports;
2819 /******/ }
2820 /******/
2821 /************************************************************************/
2822 var __webpack_exports__ = {};
2823 // This entry need to be wrapped in an IIFE because it need to be in strict mode.
2824 (() => {
2825 "use strict";
2826 /*!******************************************!*\
2827 !*** ../assets/dev/js/editor/modules.js ***!
2828 \******************************************/
2829
2830
2831 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
2832
2833 var _module = _interopRequireDefault(__webpack_require__(/*! ./utils/module */ "../assets/dev/js/editor/utils/module.js"));
2834
2835 var _introduction = _interopRequireDefault(__webpack_require__(/*! ./utils/introduction */ "../assets/dev/js/editor/utils/introduction.js"));
2836
2837 var _controlsStack = _interopRequireDefault(__webpack_require__(/*! ./views/controls-stack */ "../assets/dev/js/editor/views/controls-stack.js"));
2838
2839 var _baseSettings = _interopRequireDefault(__webpack_require__(/*! ./elements/models/base-settings */ "../assets/dev/js/editor/elements/models/base-settings.js"));
2840
2841 var _container = _interopRequireDefault(__webpack_require__(/*! ./container/container */ "../assets/dev/js/editor/container/container.js"));
2842
2843 elementorModules.editor = {
2844 elements: {
2845 models: {
2846 BaseSettings: _baseSettings.default
2847 }
2848 },
2849 utils: {
2850 Module: _module.default,
2851 Introduction: _introduction.default
2852 },
2853 views: {
2854 ControlsStack: _controlsStack.default
2855 },
2856 Container: _container.default
2857 };
2858 })();
2859
2860 /******/ })()
2861 ;
2862 //# sourceMappingURL=editor-modules.js.map