| 1 |
/******/ (() => { // webpackBootstrap |
| 2 |
/******/ var __webpack_modules__ = ({ |
| 3 |
|
| 4 |
/***/ "../app/assets/js/loader/commands/close.js": |
| 5 |
/*!*************************************************!*\ |
| 6 |
!*** ../app/assets/js/loader/commands/close.js ***! |
| 7 |
\*************************************************/ |
| 8 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 9 |
|
| 10 |
"use strict"; |
| 11 |
|
| 12 |
|
| 13 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 14 |
Object.defineProperty(exports, "__esModule", ({ |
| 15 |
value: true |
| 16 |
})); |
| 17 |
exports["default"] = exports.Close = void 0; |
| 18 |
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 19 |
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 20 |
var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 21 |
var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 22 |
var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); |
| 23 |
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } |
| 24 |
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } |
| 25 |
var Close = exports.Close = /*#__PURE__*/function (_$e$modules$CommandBa) { |
| 26 |
function Close() { |
| 27 |
(0, _classCallCheck2.default)(this, Close); |
| 28 |
return _callSuper(this, Close, arguments); |
| 29 |
} |
| 30 |
(0, _inherits2.default)(Close, _$e$modules$CommandBa); |
| 31 |
return (0, _createClass2.default)(Close, [{ |
| 32 |
key: "apply", |
| 33 |
value: function apply() { |
| 34 |
if (!this.component.close()) { |
| 35 |
return false; |
| 36 |
} |
| 37 |
this.component.iframe.remove(); |
| 38 |
this.component.iframe = null; |
| 39 |
return true; |
| 40 |
} |
| 41 |
}]); |
| 42 |
}($e.modules.CommandBase); |
| 43 |
var _default = exports["default"] = Close; |
| 44 |
|
| 45 |
/***/ }), |
| 46 |
|
| 47 |
/***/ "../app/assets/js/loader/commands/index.js": |
| 48 |
/*!*************************************************!*\ |
| 49 |
!*** ../app/assets/js/loader/commands/index.js ***! |
| 50 |
\*************************************************/ |
| 51 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 52 |
|
| 53 |
"use strict"; |
| 54 |
|
| 55 |
|
| 56 |
Object.defineProperty(exports, "__esModule", ({ |
| 57 |
value: true |
| 58 |
})); |
| 59 |
Object.defineProperty(exports, "Close", ({ |
| 60 |
enumerable: true, |
| 61 |
get: function get() { |
| 62 |
return _close.Close; |
| 63 |
} |
| 64 |
})); |
| 65 |
Object.defineProperty(exports, "Load", ({ |
| 66 |
enumerable: true, |
| 67 |
get: function get() { |
| 68 |
return _load.Load; |
| 69 |
} |
| 70 |
})); |
| 71 |
Object.defineProperty(exports, "Open", ({ |
| 72 |
enumerable: true, |
| 73 |
get: function get() { |
| 74 |
return _open.Open; |
| 75 |
} |
| 76 |
})); |
| 77 |
var _close = __webpack_require__(/*! ./close */ "../app/assets/js/loader/commands/close.js"); |
| 78 |
var _load = __webpack_require__(/*! ./load */ "../app/assets/js/loader/commands/load.js"); |
| 79 |
var _open = __webpack_require__(/*! ./open */ "../app/assets/js/loader/commands/open.js"); |
| 80 |
|
| 81 |
/***/ }), |
| 82 |
|
| 83 |
/***/ "../app/assets/js/loader/commands/load.js": |
| 84 |
/*!************************************************!*\ |
| 85 |
!*** ../app/assets/js/loader/commands/load.js ***! |
| 86 |
\************************************************/ |
| 87 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 88 |
|
| 89 |
"use strict"; |
| 90 |
|
| 91 |
|
| 92 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 93 |
Object.defineProperty(exports, "__esModule", ({ |
| 94 |
value: true |
| 95 |
})); |
| 96 |
exports["default"] = exports.Load = void 0; |
| 97 |
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 98 |
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 99 |
var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 100 |
var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 101 |
var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); |
| 102 |
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } |
| 103 |
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } |
| 104 |
var Load = exports.Load = /*#__PURE__*/function (_$e$modules$CommandBa) { |
| 105 |
function Load() { |
| 106 |
(0, _classCallCheck2.default)(this, Load); |
| 107 |
return _callSuper(this, Load, arguments); |
| 108 |
} |
| 109 |
(0, _inherits2.default)(Load, _$e$modules$CommandBa); |
| 110 |
return (0, _createClass2.default)(Load, [{ |
| 111 |
key: "apply", |
| 112 |
value: function apply(args) { |
| 113 |
var component = this.component; |
| 114 |
if (!component.iframe) { |
| 115 |
component.iframe = document.createElement('iframe'); |
| 116 |
component.iframe.className = 'elementor-app-iframe'; |
| 117 |
component.iframe.style.cssText = '' + 'display: none;' + 'width: 100%;' + 'height: 100%;' + 'position: fixed;' + 'top: 0;' + 'left: 0;' + 'z-index: 99999; /* Over WP Admin Bar */' + 'background-color: rgba(0, 0, 0, 0.8);'; |
| 118 |
document.body.appendChild(component.iframe); |
| 119 |
} |
| 120 |
if (args.url === component.iframe.src) { |
| 121 |
return; |
| 122 |
} |
| 123 |
component.iframe.src = args.url; |
| 124 |
} |
| 125 |
}]); |
| 126 |
}($e.modules.CommandBase); |
| 127 |
var _default = exports["default"] = Load; |
| 128 |
|
| 129 |
/***/ }), |
| 130 |
|
| 131 |
/***/ "../app/assets/js/loader/commands/open.js": |
| 132 |
/*!************************************************!*\ |
| 133 |
!*** ../app/assets/js/loader/commands/open.js ***! |
| 134 |
\************************************************/ |
| 135 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 136 |
|
| 137 |
"use strict"; |
| 138 |
|
| 139 |
|
| 140 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 141 |
Object.defineProperty(exports, "__esModule", ({ |
| 142 |
value: true |
| 143 |
})); |
| 144 |
exports["default"] = exports.Open = void 0; |
| 145 |
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 146 |
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 147 |
var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 148 |
var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 149 |
var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); |
| 150 |
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } |
| 151 |
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } |
| 152 |
var Open = exports.Open = /*#__PURE__*/function (_$e$modules$CommandBa) { |
| 153 |
function Open() { |
| 154 |
(0, _classCallCheck2.default)(this, Open); |
| 155 |
return _callSuper(this, Open, arguments); |
| 156 |
} |
| 157 |
(0, _inherits2.default)(Open, _$e$modules$CommandBa); |
| 158 |
return (0, _createClass2.default)(Open, [{ |
| 159 |
key: "apply", |
| 160 |
value: function apply(args) { |
| 161 |
$e.route('app', args); |
| 162 |
return true; |
| 163 |
} |
| 164 |
}]); |
| 165 |
}($e.modules.CommandBase); |
| 166 |
var _default = exports["default"] = Open; |
| 167 |
|
| 168 |
/***/ }), |
| 169 |
|
| 170 |
/***/ "../app/assets/js/loader/component.js": |
| 171 |
/*!********************************************!*\ |
| 172 |
!*** ../app/assets/js/loader/component.js ***! |
| 173 |
\********************************************/ |
| 174 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 175 |
|
| 176 |
"use strict"; |
| 177 |
|
| 178 |
|
| 179 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 180 |
var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"); |
| 181 |
Object.defineProperty(exports, "__esModule", ({ |
| 182 |
value: true |
| 183 |
})); |
| 184 |
exports["default"] = void 0; |
| 185 |
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 186 |
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 187 |
var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 188 |
var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 189 |
var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); |
| 190 |
var _componentBase = _interopRequireDefault(__webpack_require__(/*! elementor-api/modules/component-base */ "../modules/web-cli/assets/js/modules/component-base.js")); |
| 191 |
var commands = _interopRequireWildcard(__webpack_require__(/*! ./commands/ */ "../app/assets/js/loader/commands/index.js")); |
| 192 |
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } |
| 193 |
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } |
| 194 |
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } |
| 195 |
var Component = exports["default"] = /*#__PURE__*/function (_ComponentModalBase) { |
| 196 |
function Component() { |
| 197 |
(0, _classCallCheck2.default)(this, Component); |
| 198 |
return _callSuper(this, Component, arguments); |
| 199 |
} |
| 200 |
(0, _inherits2.default)(Component, _ComponentModalBase); |
| 201 |
return (0, _createClass2.default)(Component, [{ |
| 202 |
key: "getNamespace", |
| 203 |
value: function getNamespace() { |
| 204 |
return 'app'; |
| 205 |
} |
| 206 |
}, { |
| 207 |
key: "defaultRoutes", |
| 208 |
value: function defaultRoutes() { |
| 209 |
var _this = this; |
| 210 |
return { |
| 211 |
'': function _(args) { |
| 212 |
args.url = args.url || elementorAppConfig.menu_url; |
| 213 |
$e.run('app/load', args); |
| 214 |
_this.iframe.style.display = ''; |
| 215 |
document.body.style.overflow = 'hidden'; |
| 216 |
} |
| 217 |
}; |
| 218 |
} |
| 219 |
}, { |
| 220 |
key: "defaultCommands", |
| 221 |
value: function defaultCommands() { |
| 222 |
return this.importCommands(commands); |
| 223 |
} |
| 224 |
}, { |
| 225 |
key: "defaultShortcuts", |
| 226 |
value: function defaultShortcuts() { |
| 227 |
return { |
| 228 |
'': { |
| 229 |
keys: 'ctrl+shift+e' |
| 230 |
}, |
| 231 |
close: { |
| 232 |
keys: 'esc', |
| 233 |
scopes: [this.getNamespace()] |
| 234 |
} |
| 235 |
}; |
| 236 |
} |
| 237 |
}]); |
| 238 |
}(_componentBase.default); |
| 239 |
|
| 240 |
/***/ }), |
| 241 |
|
| 242 |
/***/ "../assets/dev/js/editor/utils/is-instanceof.js": |
| 243 |
/*!******************************************************!*\ |
| 244 |
!*** ../assets/dev/js/editor/utils/is-instanceof.js ***! |
| 245 |
\******************************************************/ |
| 246 |
/***/ ((__unused_webpack_module, exports) => { |
| 247 |
|
| 248 |
"use strict"; |
| 249 |
|
| 250 |
|
| 251 |
Object.defineProperty(exports, "__esModule", ({ |
| 252 |
value: true |
| 253 |
})); |
| 254 |
exports["default"] = void 0; |
| 255 |
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; } |
| 256 |
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } |
| 257 |
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } |
| 258 |
/** |
| 259 |
* Some FileAPI objects such as FileList, DataTransferItem and DataTransferItemList has inconsistency with the retrieved |
| 260 |
* object (from events, etc.) and the actual JavaScript object so a regular instanceof doesn't work. This function can |
| 261 |
* check whether it's instanceof by using the objects constructor and prototype names. |
| 262 |
* |
| 263 |
* @param object |
| 264 |
* @param constructors |
| 265 |
* @return {boolean} |
| 266 |
*/ |
| 267 |
var _default = exports["default"] = function _default(object, constructors) { |
| 268 |
constructors = Array.isArray(constructors) ? constructors : [constructors]; |
| 269 |
var _iterator = _createForOfIteratorHelper(constructors), |
| 270 |
_step; |
| 271 |
try { |
| 272 |
for (_iterator.s(); !(_step = _iterator.n()).done;) { |
| 273 |
var constructor = _step.value; |
| 274 |
if (object.constructor.name === constructor.prototype[Symbol.toStringTag]) { |
| 275 |
return true; |
| 276 |
} |
| 277 |
} |
| 278 |
} catch (err) { |
| 279 |
_iterator.e(err); |
| 280 |
} finally { |
| 281 |
_iterator.f(); |
| 282 |
} |
| 283 |
return false; |
| 284 |
}; |
| 285 |
|
| 286 |
/***/ }), |
| 287 |
|
| 288 |
/***/ "../assets/dev/js/modules/imports/args-object.js": |
| 289 |
/*!*******************************************************!*\ |
| 290 |
!*** ../assets/dev/js/modules/imports/args-object.js ***! |
| 291 |
\*******************************************************/ |
| 292 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 293 |
|
| 294 |
"use strict"; |
| 295 |
|
| 296 |
|
| 297 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 298 |
Object.defineProperty(exports, "__esModule", ({ |
| 299 |
value: true |
| 300 |
})); |
| 301 |
exports["default"] = void 0; |
| 302 |
var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js")); |
| 303 |
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 304 |
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 305 |
var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 306 |
var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 307 |
var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); |
| 308 |
var _instanceType = _interopRequireDefault(__webpack_require__(/*! ./instance-type */ "../assets/dev/js/modules/imports/instance-type.js")); |
| 309 |
var _isInstanceof = _interopRequireDefault(__webpack_require__(/*! ../../editor/utils/is-instanceof */ "../assets/dev/js/editor/utils/is-instanceof.js")); |
| 310 |
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } |
| 311 |
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } |
| 312 |
var ArgsObject = exports["default"] = /*#__PURE__*/function (_InstanceType) { |
| 313 |
/** |
| 314 |
* Function constructor(). |
| 315 |
* |
| 316 |
* Create ArgsObject. |
| 317 |
* |
| 318 |
* @param {{}} args |
| 319 |
*/ |
| 320 |
function ArgsObject(args) { |
| 321 |
var _this; |
| 322 |
(0, _classCallCheck2.default)(this, ArgsObject); |
| 323 |
_this = _callSuper(this, ArgsObject); |
| 324 |
_this.args = args; |
| 325 |
return _this; |
| 326 |
} |
| 327 |
|
| 328 |
/** |
| 329 |
* Function requireArgument(). |
| 330 |
* |
| 331 |
* Validate property in args. |
| 332 |
* |
| 333 |
* @param {string} property |
| 334 |
* @param {{}} args |
| 335 |
* |
| 336 |
* @throws {Error} |
| 337 |
*/ |
| 338 |
(0, _inherits2.default)(ArgsObject, _InstanceType); |
| 339 |
return (0, _createClass2.default)(ArgsObject, [{ |
| 340 |
key: "requireArgument", |
| 341 |
value: function requireArgument(property) { |
| 342 |
var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.args; |
| 343 |
if (!Object.prototype.hasOwnProperty.call(args, property)) { |
| 344 |
throw Error("".concat(property, " is required.")); |
| 345 |
} |
| 346 |
} |
| 347 |
|
| 348 |
/** |
| 349 |
* Function requireArgumentType(). |
| 350 |
* |
| 351 |
* Validate property in args using `type === typeof(args.whatever)`. |
| 352 |
* |
| 353 |
* @param {string} property |
| 354 |
* @param {string} type |
| 355 |
* @param {{}} args |
| 356 |
* |
| 357 |
* @throws {Error} |
| 358 |
*/ |
| 359 |
}, { |
| 360 |
key: "requireArgumentType", |
| 361 |
value: function requireArgumentType(property, type) { |
| 362 |
var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.args; |
| 363 |
this.requireArgument(property, args); |
| 364 |
if ((0, _typeof2.default)(args[property]) !== type) { |
| 365 |
throw Error("".concat(property, " invalid type: ").concat(type, ".")); |
| 366 |
} |
| 367 |
} |
| 368 |
|
| 369 |
/** |
| 370 |
* Function requireArgumentInstance(). |
| 371 |
* |
| 372 |
* Validate property in args using `args.whatever instanceof instance`. |
| 373 |
* |
| 374 |
* @param {string} property |
| 375 |
* @param {*} instance |
| 376 |
* @param {{}} args |
| 377 |
* |
| 378 |
* @throws {Error} |
| 379 |
*/ |
| 380 |
}, { |
| 381 |
key: "requireArgumentInstance", |
| 382 |
value: function requireArgumentInstance(property, instance) { |
| 383 |
var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.args; |
| 384 |
this.requireArgument(property, args); |
| 385 |
if (!(args[property] instanceof instance) && !(0, _isInstanceof.default)(args[property], instance)) { |
| 386 |
throw Error("".concat(property, " invalid instance.")); |
| 387 |
} |
| 388 |
} |
| 389 |
|
| 390 |
/** |
| 391 |
* Function requireArgumentConstructor(). |
| 392 |
* |
| 393 |
* Validate property in args using `type === args.whatever.constructor`. |
| 394 |
* |
| 395 |
* @param {string} property |
| 396 |
* @param {*} type |
| 397 |
* @param {{}} args |
| 398 |
* |
| 399 |
* @throws {Error} |
| 400 |
*/ |
| 401 |
}, { |
| 402 |
key: "requireArgumentConstructor", |
| 403 |
value: function requireArgumentConstructor(property, type) { |
| 404 |
var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.args; |
| 405 |
this.requireArgument(property, args); |
| 406 |
|
| 407 |
// Note: Converting the constructor to string in order to avoid equation issues |
| 408 |
// due to different memory addresses between iframes (window.Object !== window.top.Object). |
| 409 |
if (args[property].constructor.toString() !== type.prototype.constructor.toString()) { |
| 410 |
throw Error("".concat(property, " invalid constructor type.")); |
| 411 |
} |
| 412 |
} |
| 413 |
}], [{ |
| 414 |
key: "getInstanceType", |
| 415 |
value: function getInstanceType() { |
| 416 |
return 'ArgsObject'; |
| 417 |
} |
| 418 |
}]); |
| 419 |
}(_instanceType.default); |
| 420 |
|
| 421 |
/***/ }), |
| 422 |
|
| 423 |
/***/ "../assets/dev/js/modules/imports/instance-type.js": |
| 424 |
/*!*********************************************************!*\ |
| 425 |
!*** ../assets/dev/js/modules/imports/instance-type.js ***! |
| 426 |
\*********************************************************/ |
| 427 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 428 |
|
| 429 |
"use strict"; |
| 430 |
|
| 431 |
|
| 432 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 433 |
Object.defineProperty(exports, "__esModule", ({ |
| 434 |
value: true |
| 435 |
})); |
| 436 |
exports["default"] = void 0; |
| 437 |
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 438 |
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 439 |
var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 440 |
var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js")); |
| 441 |
function _superPropGet(t, o, e, r) { var p = (0, _get2.default)((0, _getPrototypeOf2.default)(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; } |
| 442 |
var InstanceType = exports["default"] = /*#__PURE__*/function () { |
| 443 |
function InstanceType() { |
| 444 |
var _this = this; |
| 445 |
(0, _classCallCheck2.default)(this, InstanceType); |
| 446 |
// Since anonymous classes sometimes do not get validated by babel, do it manually. |
| 447 |
var target = this instanceof InstanceType ? this.constructor : void 0; |
| 448 |
var prototypes = []; |
| 449 |
while (target.__proto__ && target.__proto__.name) { |
| 450 |
prototypes.push(target.__proto__); |
| 451 |
target = target.__proto__; |
| 452 |
} |
| 453 |
prototypes.reverse().forEach(function (proto) { |
| 454 |
return _this instanceof proto; |
| 455 |
}); |
| 456 |
} |
| 457 |
return (0, _createClass2.default)(InstanceType, null, [{ |
| 458 |
key: Symbol.hasInstance, |
| 459 |
value: function value(target) { |
| 460 |
/** |
| 461 |
* This is function extending being called each time JS uses instanceOf, since babel use it each time it create new class |
| 462 |
* its give's opportunity to mange capabilities of instanceOf operator. |
| 463 |
* saving current class each time will give option later to handle instanceOf manually. |
| 464 |
*/ |
| 465 |
var result = _superPropGet(InstanceType, Symbol.hasInstance, this, 2)([target]); |
| 466 |
|
| 467 |
// Act normal when validate a class, which does not have instance type. |
| 468 |
if (target && !target.constructor.getInstanceType) { |
| 469 |
return result; |
| 470 |
} |
| 471 |
if (target) { |
| 472 |
if (!target.instanceTypes) { |
| 473 |
target.instanceTypes = []; |
| 474 |
} |
| 475 |
if (!result) { |
| 476 |
if (this.getInstanceType() === target.constructor.getInstanceType()) { |
| 477 |
result = true; |
| 478 |
} |
| 479 |
} |
| 480 |
if (result) { |
| 481 |
var name = this.getInstanceType === InstanceType.getInstanceType ? 'BaseInstanceType' : this.getInstanceType(); |
| 482 |
if (-1 === target.instanceTypes.indexOf(name)) { |
| 483 |
target.instanceTypes.push(name); |
| 484 |
} |
| 485 |
} |
| 486 |
} |
| 487 |
if (!result && target) { |
| 488 |
// Check if the given 'target', is instance of known types. |
| 489 |
result = target.instanceTypes && Array.isArray(target.instanceTypes) && -1 !== target.instanceTypes.indexOf(this.getInstanceType()); |
| 490 |
} |
| 491 |
return result; |
| 492 |
} |
| 493 |
}, { |
| 494 |
key: "getInstanceType", |
| 495 |
value: function getInstanceType() { |
| 496 |
elementorModules.ForceMethodImplementation(); |
| 497 |
} |
| 498 |
}]); |
| 499 |
}(); |
| 500 |
|
| 501 |
/***/ }), |
| 502 |
|
| 503 |
/***/ "../assets/dev/js/modules/imports/module.js": |
| 504 |
/*!**************************************************!*\ |
| 505 |
!*** ../assets/dev/js/modules/imports/module.js ***! |
| 506 |
\**************************************************/ |
| 507 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 508 |
|
| 509 |
"use strict"; |
| 510 |
|
| 511 |
|
| 512 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 513 |
var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js")); |
| 514 |
var Module = function Module() { |
| 515 |
var $ = jQuery, |
| 516 |
instanceParams = arguments, |
| 517 |
self = this, |
| 518 |
events = {}; |
| 519 |
var settings; |
| 520 |
var ensureClosureMethods = function ensureClosureMethods() { |
| 521 |
$.each(self, function (methodName) { |
| 522 |
var oldMethod = self[methodName]; |
| 523 |
if ('function' !== typeof oldMethod) { |
| 524 |
return; |
| 525 |
} |
| 526 |
self[methodName] = function () { |
| 527 |
return oldMethod.apply(self, arguments); |
| 528 |
}; |
| 529 |
}); |
| 530 |
}; |
| 531 |
var initSettings = function initSettings() { |
| 532 |
settings = self.getDefaultSettings(); |
| 533 |
var instanceSettings = instanceParams[0]; |
| 534 |
if (instanceSettings) { |
| 535 |
$.extend(true, settings, instanceSettings); |
| 536 |
} |
| 537 |
}; |
| 538 |
var init = function init() { |
| 539 |
self.__construct.apply(self, instanceParams); |
| 540 |
ensureClosureMethods(); |
| 541 |
initSettings(); |
| 542 |
self.trigger('init'); |
| 543 |
}; |
| 544 |
this.getItems = function (items, itemKey) { |
| 545 |
if (itemKey) { |
| 546 |
var keyStack = itemKey.split('.'), |
| 547 |
currentKey = keyStack.splice(0, 1); |
| 548 |
if (!keyStack.length) { |
| 549 |
return items[currentKey]; |
| 550 |
} |
| 551 |
if (!items[currentKey]) { |
| 552 |
return; |
| 553 |
} |
| 554 |
return this.getItems(items[currentKey], keyStack.join('.')); |
| 555 |
} |
| 556 |
return items; |
| 557 |
}; |
| 558 |
this.getSettings = function (setting) { |
| 559 |
return this.getItems(settings, setting); |
| 560 |
}; |
| 561 |
this.setSettings = function (settingKey, value, settingsContainer) { |
| 562 |
if (!settingsContainer) { |
| 563 |
settingsContainer = settings; |
| 564 |
} |
| 565 |
if ('object' === (0, _typeof2.default)(settingKey)) { |
| 566 |
$.extend(settingsContainer, settingKey); |
| 567 |
return self; |
| 568 |
} |
| 569 |
var keyStack = settingKey.split('.'), |
| 570 |
currentKey = keyStack.splice(0, 1); |
| 571 |
if (!keyStack.length) { |
| 572 |
settingsContainer[currentKey] = value; |
| 573 |
return self; |
| 574 |
} |
| 575 |
if (!settingsContainer[currentKey]) { |
| 576 |
settingsContainer[currentKey] = {}; |
| 577 |
} |
| 578 |
return self.setSettings(keyStack.join('.'), value, settingsContainer[currentKey]); |
| 579 |
}; |
| 580 |
this.getErrorMessage = function (type, functionName) { |
| 581 |
var message; |
| 582 |
switch (type) { |
| 583 |
case 'forceMethodImplementation': |
| 584 |
message = "The method '".concat(functionName, "' must to be implemented in the inheritor child."); |
| 585 |
break; |
| 586 |
default: |
| 587 |
message = 'An error occurs'; |
| 588 |
} |
| 589 |
return message; |
| 590 |
}; |
| 591 |
|
| 592 |
// TODO: This function should be deleted ?. |
| 593 |
this.forceMethodImplementation = function (functionName) { |
| 594 |
throw new Error(this.getErrorMessage('forceMethodImplementation', functionName)); |
| 595 |
}; |
| 596 |
this.on = function (eventName, callback) { |
| 597 |
if ('object' === (0, _typeof2.default)(eventName)) { |
| 598 |
$.each(eventName, function (singleEventName) { |
| 599 |
self.on(singleEventName, this); |
| 600 |
}); |
| 601 |
return self; |
| 602 |
} |
| 603 |
var eventNames = eventName.split(' '); |
| 604 |
eventNames.forEach(function (singleEventName) { |
| 605 |
if (!events[singleEventName]) { |
| 606 |
events[singleEventName] = []; |
| 607 |
} |
| 608 |
events[singleEventName].push(callback); |
| 609 |
}); |
| 610 |
return self; |
| 611 |
}; |
| 612 |
this.off = function (eventName, callback) { |
| 613 |
if (!events[eventName]) { |
| 614 |
return self; |
| 615 |
} |
| 616 |
if (!callback) { |
| 617 |
delete events[eventName]; |
| 618 |
return self; |
| 619 |
} |
| 620 |
var callbackIndex = events[eventName].indexOf(callback); |
| 621 |
if (-1 !== callbackIndex) { |
| 622 |
delete events[eventName][callbackIndex]; |
| 623 |
|
| 624 |
// Reset array index (for next off on same event). |
| 625 |
events[eventName] = events[eventName].filter(function (val) { |
| 626 |
return val; |
| 627 |
}); |
| 628 |
} |
| 629 |
return self; |
| 630 |
}; |
| 631 |
this.trigger = function (eventName) { |
| 632 |
var methodName = 'on' + eventName[0].toUpperCase() + eventName.slice(1), |
| 633 |
params = Array.prototype.slice.call(arguments, 1); |
| 634 |
if (self[methodName]) { |
| 635 |
self[methodName].apply(self, params); |
| 636 |
} |
| 637 |
var callbacks = events[eventName]; |
| 638 |
if (!callbacks) { |
| 639 |
return self; |
| 640 |
} |
| 641 |
$.each(callbacks, function (index, callback) { |
| 642 |
callback.apply(self, params); |
| 643 |
}); |
| 644 |
return self; |
| 645 |
}; |
| 646 |
init(); |
| 647 |
}; |
| 648 |
Module.prototype.__construct = function () {}; |
| 649 |
Module.prototype.getDefaultSettings = function () { |
| 650 |
return {}; |
| 651 |
}; |
| 652 |
Module.prototype.getConstructorID = function () { |
| 653 |
return this.constructor.name; |
| 654 |
}; |
| 655 |
Module.extend = function (properties) { |
| 656 |
var $ = jQuery, |
| 657 |
parent = this; |
| 658 |
var child = function child() { |
| 659 |
return parent.apply(this, arguments); |
| 660 |
}; |
| 661 |
$.extend(child, parent); |
| 662 |
child.prototype = Object.create($.extend({}, parent.prototype, properties)); |
| 663 |
child.prototype.constructor = child; |
| 664 |
child.__super__ = parent.prototype; |
| 665 |
return child; |
| 666 |
}; |
| 667 |
module.exports = Module; |
| 668 |
|
| 669 |
/***/ }), |
| 670 |
|
| 671 |
/***/ "../modules/web-cli/assets/js/modules/command-base.js": |
| 672 |
/*!************************************************************!*\ |
| 673 |
!*** ../modules/web-cli/assets/js/modules/command-base.js ***! |
| 674 |
\************************************************************/ |
| 675 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 676 |
|
| 677 |
"use strict"; |
| 678 |
|
| 679 |
|
| 680 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 681 |
Object.defineProperty(exports, "__esModule", ({ |
| 682 |
value: true |
| 683 |
})); |
| 684 |
exports["default"] = void 0; |
| 685 |
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 686 |
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 687 |
var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 688 |
var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 689 |
var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); |
| 690 |
var _commandInfra = _interopRequireDefault(__webpack_require__(/*! ./command-infra */ "../modules/web-cli/assets/js/modules/command-infra.js")); |
| 691 |
var _deprecation = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/deprecation */ "../modules/web-cli/assets/js/utils/deprecation.js")); |
| 692 |
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } |
| 693 |
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } |
| 694 |
/** |
| 695 |
* @name $e.modules.CommandBase |
| 696 |
*/ |
| 697 |
var CommandBase = exports["default"] = /*#__PURE__*/function (_CommandInfra) { |
| 698 |
function CommandBase() { |
| 699 |
(0, _classCallCheck2.default)(this, CommandBase); |
| 700 |
return _callSuper(this, CommandBase, arguments); |
| 701 |
} |
| 702 |
(0, _inherits2.default)(CommandBase, _CommandInfra); |
| 703 |
return (0, _createClass2.default)(CommandBase, [{ |
| 704 |
key: "onBeforeRun", |
| 705 |
value: function onBeforeRun() { |
| 706 |
var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
| 707 |
$e.hooks.runUIBefore(this.command, args); |
| 708 |
} |
| 709 |
}, { |
| 710 |
key: "onAfterRun", |
| 711 |
value: function onAfterRun() { |
| 712 |
var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
| 713 |
var result = arguments.length > 1 ? arguments[1] : undefined; |
| 714 |
$e.hooks.runUIAfter(this.command, args, result); |
| 715 |
} |
| 716 |
}, { |
| 717 |
key: "onBeforeApply", |
| 718 |
value: function onBeforeApply() { |
| 719 |
var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
| 720 |
$e.hooks.runDataDependency(this.command, args); |
| 721 |
} |
| 722 |
}, { |
| 723 |
key: "onAfterApply", |
| 724 |
value: function onAfterApply() { |
| 725 |
var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
| 726 |
var result = arguments.length > 1 ? arguments[1] : undefined; |
| 727 |
return $e.hooks.runDataAfter(this.command, args, result); |
| 728 |
} |
| 729 |
}, { |
| 730 |
key: "onCatchApply", |
| 731 |
value: function onCatchApply(e) { |
| 732 |
this.runCatchHooks(e); |
| 733 |
} |
| 734 |
|
| 735 |
/** |
| 736 |
* Run all the catch hooks. |
| 737 |
* |
| 738 |
* @param {Error} e |
| 739 |
*/ |
| 740 |
}, { |
| 741 |
key: "runCatchHooks", |
| 742 |
value: function runCatchHooks(e) { |
| 743 |
$e.hooks.runDataCatch(this.command, this.args, e); |
| 744 |
$e.hooks.runUICatch(this.command, this.args, e); |
| 745 |
} |
| 746 |
|
| 747 |
/** |
| 748 |
* TODO - Remove - Backwards compatibility. |
| 749 |
* |
| 750 |
* Function requireContainer(). |
| 751 |
* |
| 752 |
* Validate `arg.container` & `arg.containers`. |
| 753 |
* |
| 754 |
* @param {{}} args |
| 755 |
* @deprecated since 3.7.0, extend `$e.modules.editor.CommandContainerBase` or `$e.modules.editor.CommandContainerInternalBase` instead. |
| 756 |
* |
| 757 |
* @throws {Error} |
| 758 |
*/ |
| 759 |
}, { |
| 760 |
key: "requireContainer", |
| 761 |
value: function requireContainer() { |
| 762 |
var _this = this; |
| 763 |
var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.args; |
| 764 |
_deprecation.default.deprecated('requireContainer()', '3.7.0', 'Extend `$e.modules.editor.CommandContainerBase` or `$e.modules.editor.CommandContainerInternalBase`'); |
| 765 |
if (!args.container && !args.containers) { |
| 766 |
throw Error('container or containers are required.'); |
| 767 |
} |
| 768 |
if (args.container && args.containers) { |
| 769 |
throw Error('container and containers cannot go together please select one of them.'); |
| 770 |
} |
| 771 |
var containers = args.containers || [args.container]; |
| 772 |
containers.forEach(function (container) { |
| 773 |
_this.requireArgumentInstance('container', elementorModules.editor.Container, { |
| 774 |
container: container |
| 775 |
}); |
| 776 |
}); |
| 777 |
} |
| 778 |
}], [{ |
| 779 |
key: "getInstanceType", |
| 780 |
value: function getInstanceType() { |
| 781 |
return 'CommandBase'; |
| 782 |
} |
| 783 |
}]); |
| 784 |
}(_commandInfra.default); |
| 785 |
|
| 786 |
/***/ }), |
| 787 |
|
| 788 |
/***/ "../modules/web-cli/assets/js/modules/command-callback-base.js": |
| 789 |
/*!*********************************************************************!*\ |
| 790 |
!*** ../modules/web-cli/assets/js/modules/command-callback-base.js ***! |
| 791 |
\*********************************************************************/ |
| 792 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 793 |
|
| 794 |
"use strict"; |
| 795 |
|
| 796 |
|
| 797 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 798 |
Object.defineProperty(exports, "__esModule", ({ |
| 799 |
value: true |
| 800 |
})); |
| 801 |
exports["default"] = void 0; |
| 802 |
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 803 |
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 804 |
var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 805 |
var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 806 |
var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); |
| 807 |
var _commandBase = _interopRequireDefault(__webpack_require__(/*! ./command-base */ "../modules/web-cli/assets/js/modules/command-base.js")); |
| 808 |
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } |
| 809 |
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } |
| 810 |
/** |
| 811 |
* To support pure callbacks in the API(commands.js), to ensure they have registered with the proper context. |
| 812 |
*/ |
| 813 |
var CommandCallbackBase = exports["default"] = /*#__PURE__*/function (_CommandBase) { |
| 814 |
function CommandCallbackBase() { |
| 815 |
(0, _classCallCheck2.default)(this, CommandCallbackBase); |
| 816 |
return _callSuper(this, CommandCallbackBase, arguments); |
| 817 |
} |
| 818 |
(0, _inherits2.default)(CommandCallbackBase, _CommandBase); |
| 819 |
return (0, _createClass2.default)(CommandCallbackBase, [{ |
| 820 |
key: "apply", |
| 821 |
value: function apply() { |
| 822 |
var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
| 823 |
return this.constructor.getCallback()(args); |
| 824 |
} |
| 825 |
}], [{ |
| 826 |
key: "getInstanceType", |
| 827 |
value: function getInstanceType() { |
| 828 |
return 'CommandCallbackBase'; |
| 829 |
} |
| 830 |
|
| 831 |
/** |
| 832 |
* Get original callback of the command. |
| 833 |
* |
| 834 |
* Support pure callbacks ( Non command-base ). |
| 835 |
* |
| 836 |
* @return {()=>{}} Command Results. |
| 837 |
*/ |
| 838 |
}, { |
| 839 |
key: "getCallback", |
| 840 |
value: function getCallback() { |
| 841 |
return this.registerConfig.callback; |
| 842 |
} |
| 843 |
}]); |
| 844 |
}(_commandBase.default); |
| 845 |
|
| 846 |
/***/ }), |
| 847 |
|
| 848 |
/***/ "../modules/web-cli/assets/js/modules/command-infra.js": |
| 849 |
/*!*************************************************************!*\ |
| 850 |
!*** ../modules/web-cli/assets/js/modules/command-infra.js ***! |
| 851 |
\*************************************************************/ |
| 852 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 853 |
|
| 854 |
"use strict"; |
| 855 |
|
| 856 |
|
| 857 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 858 |
Object.defineProperty(exports, "__esModule", ({ |
| 859 |
value: true |
| 860 |
})); |
| 861 |
exports["default"] = void 0; |
| 862 |
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 863 |
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 864 |
var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 865 |
var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 866 |
var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); |
| 867 |
var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); |
| 868 |
var _argsObject = _interopRequireDefault(__webpack_require__(/*! elementor-assets-js/modules/imports/args-object */ "../assets/dev/js/modules/imports/args-object.js")); |
| 869 |
var _deprecation = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/deprecation */ "../modules/web-cli/assets/js/utils/deprecation.js")); |
| 870 |
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } |
| 871 |
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } |
| 872 |
/** |
| 873 |
* @typedef {import('../modules/component-base')} ComponentBase |
| 874 |
*/ |
| 875 |
var CommandInfra = exports["default"] = /*#__PURE__*/function (_ArgsObject) { |
| 876 |
/** |
| 877 |
* Function constructor(). |
| 878 |
* |
| 879 |
* Create Commands Base. |
| 880 |
* |
| 881 |
* @param {{}} args |
| 882 |
*/ |
| 883 |
function CommandInfra() { |
| 884 |
var _this; |
| 885 |
var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
| 886 |
(0, _classCallCheck2.default)(this, CommandInfra); |
| 887 |
_this = _callSuper(this, CommandInfra, [args]); |
| 888 |
if (!_this.constructor.registerConfig) { |
| 889 |
throw RangeError('Doing it wrong: Each command type should have `registerConfig`.'); |
| 890 |
} |
| 891 |
|
| 892 |
// Acknowledge self about which command it run. |
| 893 |
_this.command = _this.constructor.getCommand(); |
| 894 |
|
| 895 |
// Assign instance of current component. |
| 896 |
_this.component = _this.constructor.getComponent(); |
| 897 |
|
| 898 |
// Who ever need do something before without `super` the constructor can use `initialize` method. |
| 899 |
_this.initialize(args); |
| 900 |
|
| 901 |
// Refresh args, maybe the changed via `initialize`. |
| 902 |
args = _this.args; |
| 903 |
|
| 904 |
// Validate args before run. |
| 905 |
_this.validateArgs(args); |
| 906 |
return _this; |
| 907 |
} |
| 908 |
|
| 909 |
/** |
| 910 |
* Function initialize(). |
| 911 |
* |
| 912 |
* Initialize command, called after construction. |
| 913 |
* |
| 914 |
* @param {{}} args |
| 915 |
*/ |
| 916 |
(0, _inherits2.default)(CommandInfra, _ArgsObject); |
| 917 |
return (0, _createClass2.default)(CommandInfra, [{ |
| 918 |
key: "currentCommand", |
| 919 |
get: |
| 920 |
/** |
| 921 |
* @deprecated since 3.7.0, use `this.command` instead. |
| 922 |
*/ |
| 923 |
function get() { |
| 924 |
_deprecation.default.deprecated('this.currentCommand', '3.7.0', 'this.command'); |
| 925 |
return this.command; |
| 926 |
} |
| 927 |
}, { |
| 928 |
key: "initialize", |
| 929 |
value: function initialize() { |
| 930 |
var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
| 931 |
} // eslint-disable-line no-unused-vars |
| 932 |
|
| 933 |
/** |
| 934 |
* Function validateArgs(). |
| 935 |
* |
| 936 |
* Validate command arguments. |
| 937 |
* |
| 938 |
* @param {{}} args |
| 939 |
*/ |
| 940 |
}, { |
| 941 |
key: "validateArgs", |
| 942 |
value: function validateArgs() { |
| 943 |
var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
| 944 |
} // eslint-disable-line no-unused-vars |
| 945 |
|
| 946 |
// eslint-disable-next-line jsdoc/require-returns-check |
| 947 |
/** |
| 948 |
* Function apply(). |
| 949 |
* |
| 950 |
* Do the actual command. |
| 951 |
* |
| 952 |
* @param {{}} args |
| 953 |
* |
| 954 |
* @return {*} Command results. |
| 955 |
*/ |
| 956 |
}, { |
| 957 |
key: "apply", |
| 958 |
value: function apply() { |
| 959 |
var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
| 960 |
// eslint-disable-line no-unused-vars |
| 961 |
elementorModules.ForceMethodImplementation(); |
| 962 |
} |
| 963 |
|
| 964 |
/** |
| 965 |
* Function run(). |
| 966 |
* |
| 967 |
* Run command with history & hooks. |
| 968 |
* |
| 969 |
* @return {*} Command results. |
| 970 |
*/ |
| 971 |
}, { |
| 972 |
key: "run", |
| 973 |
value: function run() { |
| 974 |
return this.apply(this.args); |
| 975 |
} |
| 976 |
|
| 977 |
/** |
| 978 |
* Function onBeforeRun. |
| 979 |
* |
| 980 |
* Called before run(). |
| 981 |
* |
| 982 |
* @param {{}} args |
| 983 |
*/ |
| 984 |
}, { |
| 985 |
key: "onBeforeRun", |
| 986 |
value: function onBeforeRun() { |
| 987 |
var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
| 988 |
} // eslint-disable-line no-unused-vars |
| 989 |
|
| 990 |
/** |
| 991 |
* Function onAfterRun. |
| 992 |
* |
| 993 |
* Called after run(). |
| 994 |
* |
| 995 |
* @param {{}} args |
| 996 |
* @param {*} result |
| 997 |
*/ |
| 998 |
}, { |
| 999 |
key: "onAfterRun", |
| 1000 |
value: function onAfterRun() { |
| 1001 |
var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
| 1002 |
var result = arguments.length > 1 ? arguments[1] : undefined; |
| 1003 |
} // eslint-disable-line no-unused-vars |
| 1004 |
|
| 1005 |
/** |
| 1006 |
* Function onBeforeApply. |
| 1007 |
* |
| 1008 |
* Called before apply(). |
| 1009 |
* |
| 1010 |
* @param {{}} args |
| 1011 |
*/ |
| 1012 |
}, { |
| 1013 |
key: "onBeforeApply", |
| 1014 |
value: function onBeforeApply() { |
| 1015 |
var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
| 1016 |
} // eslint-disable-line no-unused-vars |
| 1017 |
|
| 1018 |
/** |
| 1019 |
* Function onAfterApply. |
| 1020 |
* |
| 1021 |
* Called after apply(). |
| 1022 |
* |
| 1023 |
* @param {{}} args |
| 1024 |
* @param {*} result |
| 1025 |
*/ |
| 1026 |
}, { |
| 1027 |
key: "onAfterApply", |
| 1028 |
value: function onAfterApply() { |
| 1029 |
var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
| 1030 |
var result = arguments.length > 1 ? arguments[1] : undefined; |
| 1031 |
} // eslint-disable-line no-unused-vars |
| 1032 |
|
| 1033 |
/** |
| 1034 |
* Function onCatchApply. |
| 1035 |
* |
| 1036 |
* Called after apply() failed. |
| 1037 |
* |
| 1038 |
* @param {Error} e |
| 1039 |
*/ |
| 1040 |
}, { |
| 1041 |
key: "onCatchApply", |
| 1042 |
value: function onCatchApply(e) {} // eslint-disable-line no-unused-vars |
| 1043 |
}], [{ |
| 1044 |
key: "getInstanceType", |
| 1045 |
value: function getInstanceType() { |
| 1046 |
return 'CommandInfra'; |
| 1047 |
} |
| 1048 |
|
| 1049 |
/** |
| 1050 |
* Get info of command. |
| 1051 |
* |
| 1052 |
* @return {Object} Extra information about the command. |
| 1053 |
*/ |
| 1054 |
}, { |
| 1055 |
key: "getInfo", |
| 1056 |
value: function getInfo() { |
| 1057 |
return {}; |
| 1058 |
} |
| 1059 |
|
| 1060 |
/** |
| 1061 |
* @return {string} Self command name. |
| 1062 |
*/ |
| 1063 |
}, { |
| 1064 |
key: "getCommand", |
| 1065 |
value: function getCommand() { |
| 1066 |
return this.registerConfig.command; |
| 1067 |
} |
| 1068 |
|
| 1069 |
/** |
| 1070 |
* @return {ComponentBase} Self component |
| 1071 |
*/ |
| 1072 |
}, { |
| 1073 |
key: "getComponent", |
| 1074 |
value: function getComponent() { |
| 1075 |
return this.registerConfig.component; |
| 1076 |
} |
| 1077 |
}, { |
| 1078 |
key: "setRegisterConfig", |
| 1079 |
value: function setRegisterConfig(config) { |
| 1080 |
this.registerConfig = Object.freeze(config); |
| 1081 |
} |
| 1082 |
}]); |
| 1083 |
}(_argsObject.default); |
| 1084 |
/** |
| 1085 |
* @type {Object} |
| 1086 |
*/ |
| 1087 |
(0, _defineProperty2.default)(CommandInfra, "registerConfig", null); |
| 1088 |
|
| 1089 |
/***/ }), |
| 1090 |
|
| 1091 |
/***/ "../modules/web-cli/assets/js/modules/component-base.js": |
| 1092 |
/*!**************************************************************!*\ |
| 1093 |
!*** ../modules/web-cli/assets/js/modules/component-base.js ***! |
| 1094 |
\**************************************************************/ |
| 1095 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 1096 |
|
| 1097 |
"use strict"; |
| 1098 |
|
| 1099 |
|
| 1100 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 1101 |
Object.defineProperty(exports, "__esModule", ({ |
| 1102 |
value: true |
| 1103 |
})); |
| 1104 |
exports["default"] = void 0; |
| 1105 |
var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); |
| 1106 |
var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); |
| 1107 |
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 1108 |
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 1109 |
var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 1110 |
var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 1111 |
var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); |
| 1112 |
var _commandCallbackBase = _interopRequireDefault(__webpack_require__(/*! elementor-api/modules/command-callback-base */ "../modules/web-cli/assets/js/modules/command-callback-base.js")); |
| 1113 |
var _toolkit = __webpack_require__(/*! @reduxjs/toolkit */ "@reduxjs/toolkit"); |
| 1114 |
var _module = _interopRequireDefault(__webpack_require__(/*! elementor/assets/dev/js/modules/imports/module.js */ "../assets/dev/js/modules/imports/module.js")); |
| 1115 |
var _forceMethodImplementation = _interopRequireDefault(__webpack_require__(/*! ../utils/force-method-implementation */ "../modules/web-cli/assets/js/utils/force-method-implementation.js")); |
| 1116 |
var _deprecation = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/deprecation */ "../modules/web-cli/assets/js/utils/deprecation.js")); |
| 1117 |
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } |
| 1118 |
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } |
| 1119 |
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } |
| 1120 |
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } |
| 1121 |
/** |
| 1122 |
* @typedef {import('./command-infra')} CommandInfra |
| 1123 |
* @typedef {import('./hook-base')} HookBase |
| 1124 |
* @typedef {import('../core/states/ui-state-base')} UiStateBase |
| 1125 |
*/ |
| 1126 |
var ComponentBase = exports["default"] = /*#__PURE__*/function (_Module) { |
| 1127 |
function ComponentBase() { |
| 1128 |
(0, _classCallCheck2.default)(this, ComponentBase); |
| 1129 |
return _callSuper(this, ComponentBase, arguments); |
| 1130 |
} |
| 1131 |
(0, _inherits2.default)(ComponentBase, _Module); |
| 1132 |
return (0, _createClass2.default)(ComponentBase, [{ |
| 1133 |
key: "__construct", |
| 1134 |
value: function __construct() { |
| 1135 |
var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
| 1136 |
if (args.manager) { |
| 1137 |
this.manager = args.manager; |
| 1138 |
} |
| 1139 |
this.commands = this.defaultCommands(); |
| 1140 |
this.commandsInternal = this.defaultCommandsInternal(); |
| 1141 |
this.hooks = this.defaultHooks(); |
| 1142 |
this.routes = this.defaultRoutes(); |
| 1143 |
this.tabs = this.defaultTabs(); |
| 1144 |
this.shortcuts = this.defaultShortcuts(); |
| 1145 |
this.utils = this.defaultUtils(); |
| 1146 |
this.data = this.defaultData(); |
| 1147 |
this.uiStates = this.defaultUiStates(); |
| 1148 |
this.states = this.defaultStates(); |
| 1149 |
this.defaultRoute = ''; |
| 1150 |
this.currentTab = ''; |
| 1151 |
} |
| 1152 |
}, { |
| 1153 |
key: "registerAPI", |
| 1154 |
value: function registerAPI() { |
| 1155 |
var _this = this; |
| 1156 |
Object.entries(this.getTabs()).forEach(function (tab) { |
| 1157 |
return _this.registerTabRoute(tab[0]); |
| 1158 |
}); |
| 1159 |
Object.entries(this.getRoutes()).forEach(function (_ref) { |
| 1160 |
var _ref2 = (0, _slicedToArray2.default)(_ref, 2), |
| 1161 |
route = _ref2[0], |
| 1162 |
callback = _ref2[1]; |
| 1163 |
return _this.registerRoute(route, callback); |
| 1164 |
}); |
| 1165 |
Object.entries(this.getCommands()).forEach(function (_ref3) { |
| 1166 |
var _ref4 = (0, _slicedToArray2.default)(_ref3, 2), |
| 1167 |
command = _ref4[0], |
| 1168 |
callback = _ref4[1]; |
| 1169 |
return _this.registerCommand(command, callback); |
| 1170 |
}); |
| 1171 |
Object.entries(this.getCommandsInternal()).forEach(function (_ref5) { |
| 1172 |
var _ref6 = (0, _slicedToArray2.default)(_ref5, 2), |
| 1173 |
command = _ref6[0], |
| 1174 |
callback = _ref6[1]; |
| 1175 |
return _this.registerCommandInternal(command, callback); |
| 1176 |
}); |
| 1177 |
Object.values(this.getHooks()).forEach(function (instance) { |
| 1178 |
return _this.registerHook(instance); |
| 1179 |
}); |
| 1180 |
Object.entries(this.getData()).forEach(function (_ref7) { |
| 1181 |
var _ref8 = (0, _slicedToArray2.default)(_ref7, 2), |
| 1182 |
command = _ref8[0], |
| 1183 |
callback = _ref8[1]; |
| 1184 |
return _this.registerData(command, callback); |
| 1185 |
}); |
| 1186 |
Object.values(this.getUiStates()).forEach(function (instance) { |
| 1187 |
return _this.registerUiState(instance); |
| 1188 |
}); |
| 1189 |
Object.entries(this.getStates()).forEach(function (_ref9) { |
| 1190 |
var _ref0 = (0, _slicedToArray2.default)(_ref9, 2), |
| 1191 |
id = _ref0[0], |
| 1192 |
state = _ref0[1]; |
| 1193 |
return _this.registerState(id, state); |
| 1194 |
}); |
| 1195 |
} |
| 1196 |
|
| 1197 |
// eslint-disable-next-line jsdoc/require-returns-check |
| 1198 |
/** |
| 1199 |
* @return {string} namespace |
| 1200 |
*/ |
| 1201 |
}, { |
| 1202 |
key: "getNamespace", |
| 1203 |
value: function getNamespace() { |
| 1204 |
(0, _forceMethodImplementation.default)(); |
| 1205 |
} |
| 1206 |
|
| 1207 |
/** |
| 1208 |
* @deprecated since 3.7.0, use `getServiceName()` instead. |
| 1209 |
*/ |
| 1210 |
}, { |
| 1211 |
key: "getRootContainer", |
| 1212 |
value: function getRootContainer() { |
| 1213 |
_deprecation.default.deprecated('getRootContainer()', '3.7.0', 'getServiceName()'); |
| 1214 |
return this.getServiceName(); |
| 1215 |
} |
| 1216 |
}, { |
| 1217 |
key: "getServiceName", |
| 1218 |
value: function getServiceName() { |
| 1219 |
return this.getNamespace().split('/')[0]; |
| 1220 |
} |
| 1221 |
}, { |
| 1222 |
key: "store", |
| 1223 |
get: function get() { |
| 1224 |
return $e.store.get(this.getNamespace()); |
| 1225 |
} |
| 1226 |
}, { |
| 1227 |
key: "defaultTabs", |
| 1228 |
value: function defaultTabs() { |
| 1229 |
return {}; |
| 1230 |
} |
| 1231 |
}, { |
| 1232 |
key: "defaultRoutes", |
| 1233 |
value: function defaultRoutes() { |
| 1234 |
return {}; |
| 1235 |
} |
| 1236 |
}, { |
| 1237 |
key: "defaultCommands", |
| 1238 |
value: function defaultCommands() { |
| 1239 |
return {}; |
| 1240 |
} |
| 1241 |
}, { |
| 1242 |
key: "defaultCommandsInternal", |
| 1243 |
value: function defaultCommandsInternal() { |
| 1244 |
return {}; |
| 1245 |
} |
| 1246 |
}, { |
| 1247 |
key: "defaultHooks", |
| 1248 |
value: function defaultHooks() { |
| 1249 |
return {}; |
| 1250 |
} |
| 1251 |
|
| 1252 |
/** |
| 1253 |
* Get the component's default UI states. |
| 1254 |
* |
| 1255 |
* @return {Object} default UI states |
| 1256 |
*/ |
| 1257 |
}, { |
| 1258 |
key: "defaultUiStates", |
| 1259 |
value: function defaultUiStates() { |
| 1260 |
return {}; |
| 1261 |
} |
| 1262 |
|
| 1263 |
/** |
| 1264 |
* Get the component's Redux slice settings. |
| 1265 |
* |
| 1266 |
* @return {Object} Redux slice settings |
| 1267 |
*/ |
| 1268 |
}, { |
| 1269 |
key: "defaultStates", |
| 1270 |
value: function defaultStates() { |
| 1271 |
return {}; |
| 1272 |
} |
| 1273 |
}, { |
| 1274 |
key: "defaultShortcuts", |
| 1275 |
value: function defaultShortcuts() { |
| 1276 |
return {}; |
| 1277 |
} |
| 1278 |
}, { |
| 1279 |
key: "defaultUtils", |
| 1280 |
value: function defaultUtils() { |
| 1281 |
return {}; |
| 1282 |
} |
| 1283 |
}, { |
| 1284 |
key: "defaultData", |
| 1285 |
value: function defaultData() { |
| 1286 |
return {}; |
| 1287 |
} |
| 1288 |
}, { |
| 1289 |
key: "getCommands", |
| 1290 |
value: function getCommands() { |
| 1291 |
return this.commands; |
| 1292 |
} |
| 1293 |
}, { |
| 1294 |
key: "getCommandsInternal", |
| 1295 |
value: function getCommandsInternal() { |
| 1296 |
return this.commandsInternal; |
| 1297 |
} |
| 1298 |
}, { |
| 1299 |
key: "getHooks", |
| 1300 |
value: function getHooks() { |
| 1301 |
return this.hooks; |
| 1302 |
} |
| 1303 |
|
| 1304 |
/** |
| 1305 |
* Retrieve the component's UI states. |
| 1306 |
* |
| 1307 |
* @return {Object} UI states |
| 1308 |
*/ |
| 1309 |
}, { |
| 1310 |
key: "getUiStates", |
| 1311 |
value: function getUiStates() { |
| 1312 |
return this.uiStates; |
| 1313 |
} |
| 1314 |
|
| 1315 |
/** |
| 1316 |
* Retrieve the component's Redux Slice. |
| 1317 |
* |
| 1318 |
* @return {Object} Redux Slice |
| 1319 |
*/ |
| 1320 |
}, { |
| 1321 |
key: "getStates", |
| 1322 |
value: function getStates() { |
| 1323 |
return this.states; |
| 1324 |
} |
| 1325 |
}, { |
| 1326 |
key: "getRoutes", |
| 1327 |
value: function getRoutes() { |
| 1328 |
return this.routes; |
| 1329 |
} |
| 1330 |
}, { |
| 1331 |
key: "getTabs", |
| 1332 |
value: function getTabs() { |
| 1333 |
return this.tabs; |
| 1334 |
} |
| 1335 |
}, { |
| 1336 |
key: "getShortcuts", |
| 1337 |
value: function getShortcuts() { |
| 1338 |
return this.shortcuts; |
| 1339 |
} |
| 1340 |
}, { |
| 1341 |
key: "getData", |
| 1342 |
value: function getData() { |
| 1343 |
return this.data; |
| 1344 |
} |
| 1345 |
|
| 1346 |
/** |
| 1347 |
* @param {string} command |
| 1348 |
* @param {(()=>{}|CommandInfra)} context |
| 1349 |
* @param {'default'|'internal'|'data'} commandsType |
| 1350 |
*/ |
| 1351 |
}, { |
| 1352 |
key: "registerCommand", |
| 1353 |
value: function registerCommand(command, context) { |
| 1354 |
var commandsType = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'default'; |
| 1355 |
var commandsManager; |
| 1356 |
switch (commandsType) { |
| 1357 |
case 'default': |
| 1358 |
commandsManager = $e.commands; |
| 1359 |
break; |
| 1360 |
case 'internal': |
| 1361 |
commandsManager = $e.commandsInternal; |
| 1362 |
break; |
| 1363 |
case 'data': |
| 1364 |
commandsManager = $e.data; |
| 1365 |
break; |
| 1366 |
default: |
| 1367 |
throw new Error("Invalid commands type: '".concat(command, "'")); |
| 1368 |
} |
| 1369 |
var fullCommand = this.getNamespace() + '/' + command, |
| 1370 |
instanceType = context.getInstanceType ? context.getInstanceType() : false, |
| 1371 |
registerConfig = { |
| 1372 |
command: fullCommand, |
| 1373 |
component: this |
| 1374 |
}; |
| 1375 |
|
| 1376 |
// Support pure callback. |
| 1377 |
if (!instanceType) { |
| 1378 |
if ($e.devTools) { |
| 1379 |
$e.devTools.log.warn("Attach command-callback-base, on command: '".concat(fullCommand, "', context is unknown type.")); |
| 1380 |
} |
| 1381 |
registerConfig.callback = context; |
| 1382 |
|
| 1383 |
// Unique class. |
| 1384 |
context = /*#__PURE__*/function (_CommandCallbackBase) { |
| 1385 |
function context() { |
| 1386 |
(0, _classCallCheck2.default)(this, context); |
| 1387 |
return _callSuper(this, context, arguments); |
| 1388 |
} |
| 1389 |
(0, _inherits2.default)(context, _CommandCallbackBase); |
| 1390 |
return (0, _createClass2.default)(context); |
| 1391 |
}(_commandCallbackBase.default); |
| 1392 |
} |
| 1393 |
context.setRegisterConfig(registerConfig); |
| 1394 |
commandsManager.register(this, command, context); |
| 1395 |
} |
| 1396 |
|
| 1397 |
/** |
| 1398 |
* @param {HookBase} instance |
| 1399 |
*/ |
| 1400 |
}, { |
| 1401 |
key: "registerHook", |
| 1402 |
value: function registerHook(instance) { |
| 1403 |
return instance.register(); |
| 1404 |
} |
| 1405 |
}, { |
| 1406 |
key: "registerCommandInternal", |
| 1407 |
value: function registerCommandInternal(command, context) { |
| 1408 |
this.registerCommand(command, context, 'internal'); |
| 1409 |
} |
| 1410 |
|
| 1411 |
/** |
| 1412 |
* Register a UI state. |
| 1413 |
* |
| 1414 |
* @param {UiStateBase} instance - UI state instance. |
| 1415 |
* |
| 1416 |
* @return {void} |
| 1417 |
*/ |
| 1418 |
}, { |
| 1419 |
key: "registerUiState", |
| 1420 |
value: function registerUiState(instance) { |
| 1421 |
$e.uiStates.register(instance); |
| 1422 |
} |
| 1423 |
|
| 1424 |
/** |
| 1425 |
* Register a Redux Slice. |
| 1426 |
* |
| 1427 |
* @param {string} id - State id. |
| 1428 |
* @param {Object} stateConfig - The state config. |
| 1429 |
* |
| 1430 |
* @return {void} |
| 1431 |
*/ |
| 1432 |
}, { |
| 1433 |
key: "registerState", |
| 1434 |
value: function registerState(id, stateConfig) { |
| 1435 |
id = this.getNamespace() + (id ? "/".concat(id) : ''); |
| 1436 |
var slice = (0, _toolkit.createSlice)(_objectSpread(_objectSpread({}, stateConfig), {}, { |
| 1437 |
name: id |
| 1438 |
})); |
| 1439 |
$e.store.register(id, slice); |
| 1440 |
} |
| 1441 |
}, { |
| 1442 |
key: "registerRoute", |
| 1443 |
value: function registerRoute(route, callback) { |
| 1444 |
$e.routes.register(this, route, callback); |
| 1445 |
} |
| 1446 |
}, { |
| 1447 |
key: "registerData", |
| 1448 |
value: function registerData(command, context) { |
| 1449 |
this.registerCommand(command, context, 'data'); |
| 1450 |
} |
| 1451 |
}, { |
| 1452 |
key: "unregisterRoute", |
| 1453 |
value: function unregisterRoute(route) { |
| 1454 |
$e.routes.unregister(this, route); |
| 1455 |
} |
| 1456 |
}, { |
| 1457 |
key: "registerTabRoute", |
| 1458 |
value: function registerTabRoute(tab) { |
| 1459 |
var _this2 = this; |
| 1460 |
this.registerRoute(tab, function (args) { |
| 1461 |
return _this2.activateTab(tab, args); |
| 1462 |
}); |
| 1463 |
} |
| 1464 |
}, { |
| 1465 |
key: "dependency", |
| 1466 |
value: function dependency() { |
| 1467 |
return true; |
| 1468 |
} |
| 1469 |
}, { |
| 1470 |
key: "open", |
| 1471 |
value: function open() { |
| 1472 |
return true; |
| 1473 |
} |
| 1474 |
}, { |
| 1475 |
key: "close", |
| 1476 |
value: function close() { |
| 1477 |
if (!this.isOpen) { |
| 1478 |
return false; |
| 1479 |
} |
| 1480 |
this.isOpen = false; |
| 1481 |
this.inactivate(); |
| 1482 |
$e.routes.clearCurrent(this.getNamespace()); |
| 1483 |
$e.routes.clearHistory(this.getServiceName()); |
| 1484 |
return true; |
| 1485 |
} |
| 1486 |
}, { |
| 1487 |
key: "activate", |
| 1488 |
value: function activate() { |
| 1489 |
$e.components.activate(this.getNamespace()); |
| 1490 |
} |
| 1491 |
}, { |
| 1492 |
key: "inactivate", |
| 1493 |
value: function inactivate() { |
| 1494 |
$e.components.inactivate(this.getNamespace()); |
| 1495 |
} |
| 1496 |
}, { |
| 1497 |
key: "isActive", |
| 1498 |
value: function isActive() { |
| 1499 |
return $e.components.isActive(this.getNamespace()); |
| 1500 |
} |
| 1501 |
}, { |
| 1502 |
key: "onRoute", |
| 1503 |
value: function onRoute(route) { |
| 1504 |
this.toggleRouteClass(route, true); |
| 1505 |
this.toggleHistoryClass(); |
| 1506 |
this.activate(); |
| 1507 |
this.trigger('route/open', route); |
| 1508 |
} |
| 1509 |
}, { |
| 1510 |
key: "onCloseRoute", |
| 1511 |
value: function onCloseRoute(route) { |
| 1512 |
this.toggleRouteClass(route, false); |
| 1513 |
this.inactivate(); |
| 1514 |
this.trigger('route/close', route); |
| 1515 |
} |
| 1516 |
}, { |
| 1517 |
key: "setDefaultRoute", |
| 1518 |
value: function setDefaultRoute(route) { |
| 1519 |
this.defaultRoute = this.getNamespace() + '/' + route; |
| 1520 |
} |
| 1521 |
}, { |
| 1522 |
key: "getDefaultRoute", |
| 1523 |
value: function getDefaultRoute() { |
| 1524 |
return this.defaultRoute; |
| 1525 |
} |
| 1526 |
}, { |
| 1527 |
key: "removeTab", |
| 1528 |
value: function removeTab(tab) { |
| 1529 |
delete this.tabs[tab]; |
| 1530 |
this.unregisterRoute(tab); |
| 1531 |
} |
| 1532 |
}, { |
| 1533 |
key: "hasTab", |
| 1534 |
value: function hasTab(tab) { |
| 1535 |
return !!this.tabs[tab]; |
| 1536 |
} |
| 1537 |
}, { |
| 1538 |
key: "addTab", |
| 1539 |
value: function addTab(tab, args, position) { |
| 1540 |
var _this3 = this; |
| 1541 |
this.tabs[tab] = args; |
| 1542 |
// It can be 0. |
| 1543 |
if ('undefined' !== typeof position) { |
| 1544 |
var newTabs = {}; |
| 1545 |
var ids = Object.keys(this.tabs); |
| 1546 |
// Remove new tab |
| 1547 |
ids.pop(); |
| 1548 |
|
| 1549 |
// Add it to position. |
| 1550 |
ids.splice(position, 0, tab); |
| 1551 |
ids.forEach(function (id) { |
| 1552 |
newTabs[id] = _this3.tabs[id]; |
| 1553 |
}); |
| 1554 |
this.tabs = newTabs; |
| 1555 |
} |
| 1556 |
this.registerTabRoute(tab); |
| 1557 |
} |
| 1558 |
}, { |
| 1559 |
key: "getTabsWrapperSelector", |
| 1560 |
value: function getTabsWrapperSelector() { |
| 1561 |
return ''; |
| 1562 |
} |
| 1563 |
}, { |
| 1564 |
key: "getTabRoute", |
| 1565 |
value: function getTabRoute(tab) { |
| 1566 |
return this.getNamespace() + '/' + tab; |
| 1567 |
} |
| 1568 |
}, { |
| 1569 |
key: "renderTab", |
| 1570 |
value: function renderTab(tab) {} // eslint-disable-line |
| 1571 |
}, { |
| 1572 |
key: "activateTab", |
| 1573 |
value: function activateTab(tab, args) { |
| 1574 |
var _this4 = this; |
| 1575 |
this.renderTab(tab, args); |
| 1576 |
jQuery(this.getTabsWrapperSelector() + ' .elementor-component-tab').off('click').on('click', function (event) { |
| 1577 |
$e.route(_this4.getTabRoute(event.currentTarget.dataset.tab), args); |
| 1578 |
}).removeClass('elementor-active').filter('[data-tab="' + tab + '"]').addClass('elementor-active'); |
| 1579 |
} |
| 1580 |
}, { |
| 1581 |
key: "getActiveTabConfig", |
| 1582 |
value: function getActiveTabConfig() { |
| 1583 |
return this.tabs[this.currentTab] || {}; |
| 1584 |
} |
| 1585 |
}, { |
| 1586 |
key: "getBodyClass", |
| 1587 |
value: function getBodyClass(route) { |
| 1588 |
return 'e-route-' + route.replace(/\//g, '-'); |
| 1589 |
} |
| 1590 |
|
| 1591 |
/** |
| 1592 |
* If command includes uppercase character convert it to lowercase and add `-`. |
| 1593 |
* e.g: `CopyAll` is converted to `copy-all`. |
| 1594 |
* |
| 1595 |
* @param {string} commandName |
| 1596 |
*/ |
| 1597 |
}, { |
| 1598 |
key: "normalizeCommandName", |
| 1599 |
value: function normalizeCommandName(commandName) { |
| 1600 |
return commandName.replace(/[A-Z]/g, function (match, offset) { |
| 1601 |
return (offset > 0 ? '-' : '') + match.toLowerCase(); |
| 1602 |
}); |
| 1603 |
} |
| 1604 |
|
| 1605 |
/** |
| 1606 |
* @param {{}} commandsFromImport |
| 1607 |
* @return {{}} imported commands |
| 1608 |
*/ |
| 1609 |
}, { |
| 1610 |
key: "importCommands", |
| 1611 |
value: function importCommands(commandsFromImport) { |
| 1612 |
var _this5 = this; |
| 1613 |
var commands = {}; |
| 1614 |
|
| 1615 |
// Convert `Commands` to `ComponentBase` workable format. |
| 1616 |
Object.entries(commandsFromImport).forEach(function (_ref1) { |
| 1617 |
var _ref10 = (0, _slicedToArray2.default)(_ref1, 2), |
| 1618 |
className = _ref10[0], |
| 1619 |
Class = _ref10[1]; |
| 1620 |
var command = _this5.normalizeCommandName(className); |
| 1621 |
commands[command] = Class; |
| 1622 |
}); |
| 1623 |
return commands; |
| 1624 |
} |
| 1625 |
}, { |
| 1626 |
key: "importHooks", |
| 1627 |
value: function importHooks(hooksFromImport) { |
| 1628 |
var hooks = {}; |
| 1629 |
for (var key in hooksFromImport) { |
| 1630 |
var hook = new hooksFromImport[key](); |
| 1631 |
hooks[hook.getId()] = hook; |
| 1632 |
} |
| 1633 |
return hooks; |
| 1634 |
} |
| 1635 |
|
| 1636 |
/** |
| 1637 |
* Import & initialize the component's UI states. |
| 1638 |
* Should be used inside `defaultUiState()`. |
| 1639 |
* |
| 1640 |
* @param {Object} statesFromImport - UI states from import. |
| 1641 |
* |
| 1642 |
* @return {Object} UI States |
| 1643 |
*/ |
| 1644 |
}, { |
| 1645 |
key: "importUiStates", |
| 1646 |
value: function importUiStates(statesFromImport) { |
| 1647 |
var _this6 = this; |
| 1648 |
var uiStates = {}; |
| 1649 |
Object.values(statesFromImport).forEach(function (className) { |
| 1650 |
var uiState = new className(_this6); |
| 1651 |
uiStates[uiState.getId()] = uiState; |
| 1652 |
}); |
| 1653 |
return uiStates; |
| 1654 |
} |
| 1655 |
|
| 1656 |
/** |
| 1657 |
* Set a UI state value. |
| 1658 |
* TODO: Should we provide such function? Maybe the developer should implicitly pass the full state ID? |
| 1659 |
* |
| 1660 |
* @param {string} state - Non-prefixed state ID. |
| 1661 |
* @param {*} value - New state value. |
| 1662 |
* |
| 1663 |
* @return {void} |
| 1664 |
*/ |
| 1665 |
}, { |
| 1666 |
key: "setUiState", |
| 1667 |
value: function setUiState(state, value) { |
| 1668 |
$e.uiStates.set("".concat(this.getNamespace(), "/").concat(state), value); |
| 1669 |
} |
| 1670 |
}, { |
| 1671 |
key: "toggleRouteClass", |
| 1672 |
value: function toggleRouteClass(route, state) { |
| 1673 |
document.body.classList.toggle(this.getBodyClass(route), state); |
| 1674 |
} |
| 1675 |
}, { |
| 1676 |
key: "toggleHistoryClass", |
| 1677 |
value: function toggleHistoryClass() { |
| 1678 |
document.body.classList.toggle('e-routes-has-history', !!$e.routes.getHistory(this.getServiceName()).length); |
| 1679 |
} |
| 1680 |
}]); |
| 1681 |
}(_module.default); |
| 1682 |
|
| 1683 |
/***/ }), |
| 1684 |
|
| 1685 |
/***/ "../modules/web-cli/assets/js/utils/console.js": |
| 1686 |
/*!*****************************************************!*\ |
| 1687 |
!*** ../modules/web-cli/assets/js/utils/console.js ***! |
| 1688 |
\*****************************************************/ |
| 1689 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 1690 |
|
| 1691 |
"use strict"; |
| 1692 |
|
| 1693 |
|
| 1694 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 1695 |
Object.defineProperty(exports, "__esModule", ({ |
| 1696 |
value: true |
| 1697 |
})); |
| 1698 |
exports["default"] = void 0; |
| 1699 |
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 1700 |
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 1701 |
var Console = exports["default"] = /*#__PURE__*/function () { |
| 1702 |
function Console() { |
| 1703 |
(0, _classCallCheck2.default)(this, Console); |
| 1704 |
} |
| 1705 |
return (0, _createClass2.default)(Console, null, [{ |
| 1706 |
key: "error", |
| 1707 |
value: function error(message) { |
| 1708 |
// Show an error if devTools is available. |
| 1709 |
if ($e.devTools) { |
| 1710 |
$e.devTools.log.error(message); |
| 1711 |
} |
| 1712 |
|
| 1713 |
// If not a 'Hook-Break' then show error. |
| 1714 |
if (!(message instanceof $e.modules.HookBreak)) { |
| 1715 |
// eslint-disable-next-line no-console |
| 1716 |
console.error(message); |
| 1717 |
} |
| 1718 |
} |
| 1719 |
}, { |
| 1720 |
key: "warn", |
| 1721 |
value: function warn() { |
| 1722 |
var _console; |
| 1723 |
var style = "font-size: 12px; background-image: url(\"".concat(elementorWebCliConfig.urls.assets, "images/logo-icon.png\"); background-repeat: no-repeat; background-size: contain;"); |
| 1724 |
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { |
| 1725 |
args[_key] = arguments[_key]; |
| 1726 |
} |
| 1727 |
args.unshift('%c %c', style, ''); |
| 1728 |
(_console = console).warn.apply(_console, args); // eslint-disable-line no-console |
| 1729 |
} |
| 1730 |
}]); |
| 1731 |
}(); |
| 1732 |
|
| 1733 |
/***/ }), |
| 1734 |
|
| 1735 |
/***/ "../modules/web-cli/assets/js/utils/deprecation.js": |
| 1736 |
/*!*********************************************************!*\ |
| 1737 |
!*** ../modules/web-cli/assets/js/utils/deprecation.js ***! |
| 1738 |
\*********************************************************/ |
| 1739 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 1740 |
|
| 1741 |
"use strict"; |
| 1742 |
|
| 1743 |
|
| 1744 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 1745 |
Object.defineProperty(exports, "__esModule", ({ |
| 1746 |
value: true |
| 1747 |
})); |
| 1748 |
exports["default"] = void 0; |
| 1749 |
var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); |
| 1750 |
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 1751 |
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 1752 |
var _console = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/console */ "../modules/web-cli/assets/js/utils/console.js")); |
| 1753 |
// Copied from `modules/dev-tools/assets/js/deprecation.js` |
| 1754 |
/** |
| 1755 |
* @typedef {Object} Version |
| 1756 |
* @property {number} major1 The first number |
| 1757 |
* @property {number} major2 The second number |
| 1758 |
* @property {number} minor The third number |
| 1759 |
* @property {string} build The fourth number |
| 1760 |
*/ |
| 1761 |
|
| 1762 |
var softDeprecated = function softDeprecated(name, version, replacement) { |
| 1763 |
if (elementorWebCliConfig.isDebug) { |
| 1764 |
deprecatedMessage('soft', name, version, replacement); |
| 1765 |
} |
| 1766 |
}; |
| 1767 |
var hardDeprecated = function hardDeprecated(name, version, replacement) { |
| 1768 |
deprecatedMessage('hard', name, version, replacement); |
| 1769 |
}; |
| 1770 |
var deprecatedMessage = function deprecatedMessage(type, name, version, replacement) { |
| 1771 |
var message = "`".concat(name, "` is ").concat(type, " deprecated since ").concat(version); |
| 1772 |
if (replacement) { |
| 1773 |
message += " - Use `".concat(replacement, "` instead"); |
| 1774 |
} |
| 1775 |
_console.default.warn(message); |
| 1776 |
}; |
| 1777 |
var Deprecation = exports["default"] = /*#__PURE__*/function () { |
| 1778 |
function Deprecation() { |
| 1779 |
(0, _classCallCheck2.default)(this, Deprecation); |
| 1780 |
} |
| 1781 |
return (0, _createClass2.default)(Deprecation, null, [{ |
| 1782 |
key: "deprecated", |
| 1783 |
value: function deprecated(name, version, replacement) { |
| 1784 |
if (this.isHardDeprecated(version)) { |
| 1785 |
hardDeprecated(name, version, replacement); |
| 1786 |
} else { |
| 1787 |
softDeprecated(name, version, replacement); |
| 1788 |
} |
| 1789 |
} |
| 1790 |
|
| 1791 |
/** |
| 1792 |
* @param {string} version |
| 1793 |
* |
| 1794 |
* @return {Version} |
| 1795 |
*/ |
| 1796 |
}, { |
| 1797 |
key: "parseVersion", |
| 1798 |
value: function parseVersion(version) { |
| 1799 |
var versionParts = version.split('.'); |
| 1800 |
if (versionParts.length < 3 || versionParts.length > 4) { |
| 1801 |
throw new RangeError('Invalid Semantic Version string provided'); |
| 1802 |
} |
| 1803 |
var _versionParts = (0, _slicedToArray2.default)(versionParts, 4), |
| 1804 |
major1 = _versionParts[0], |
| 1805 |
major2 = _versionParts[1], |
| 1806 |
minor = _versionParts[2], |
| 1807 |
_versionParts$ = _versionParts[3], |
| 1808 |
build = _versionParts$ === void 0 ? '' : _versionParts$; |
| 1809 |
return { |
| 1810 |
major1: parseInt(major1), |
| 1811 |
major2: parseInt(major2), |
| 1812 |
minor: parseInt(minor), |
| 1813 |
build: build |
| 1814 |
}; |
| 1815 |
} |
| 1816 |
|
| 1817 |
/** |
| 1818 |
* Get total of major. |
| 1819 |
* |
| 1820 |
* Since `get_total_major` cannot determine how much really versions between 2.9.0 and 3.3.0 if there is 2.10.0 version for example, |
| 1821 |
* versions with major2 more then 9 will be added to total. |
| 1822 |
* |
| 1823 |
* @param {Version} versionObj |
| 1824 |
* |
| 1825 |
* @return {number} |
| 1826 |
*/ |
| 1827 |
}, { |
| 1828 |
key: "getTotalMajor", |
| 1829 |
value: function getTotalMajor(versionObj) { |
| 1830 |
var total = parseInt("".concat(versionObj.major1).concat(versionObj.major2, "0")); |
| 1831 |
total = Number((total / 10).toFixed(0)); |
| 1832 |
if (versionObj.major2 > 9) { |
| 1833 |
total = versionObj.major2 - 9; |
| 1834 |
} |
| 1835 |
return total; |
| 1836 |
} |
| 1837 |
|
| 1838 |
/** |
| 1839 |
* @param {string} version1 |
| 1840 |
* @param {string} version2 |
| 1841 |
* |
| 1842 |
* @return {number} |
| 1843 |
*/ |
| 1844 |
}, { |
| 1845 |
key: "compareVersion", |
| 1846 |
value: function compareVersion(version1, version2) { |
| 1847 |
var _this = this; |
| 1848 |
return [this.parseVersion(version1), this.parseVersion(version2)].map(function (versionObj) { |
| 1849 |
return _this.getTotalMajor(versionObj); |
| 1850 |
}).reduce(function (acc, major) { |
| 1851 |
return acc - major; |
| 1852 |
}); |
| 1853 |
} |
| 1854 |
|
| 1855 |
/** |
| 1856 |
* @param {string} version |
| 1857 |
* |
| 1858 |
* @return {boolean} |
| 1859 |
*/ |
| 1860 |
}, { |
| 1861 |
key: "isSoftDeprecated", |
| 1862 |
value: function isSoftDeprecated(version) { |
| 1863 |
var total = this.compareVersion(version, elementorWebCliConfig.version); |
| 1864 |
return total <= 4; |
| 1865 |
} |
| 1866 |
|
| 1867 |
/** |
| 1868 |
* @param {string} version |
| 1869 |
* @return {boolean} |
| 1870 |
*/ |
| 1871 |
}, { |
| 1872 |
key: "isHardDeprecated", |
| 1873 |
value: function isHardDeprecated(version) { |
| 1874 |
var total = this.compareVersion(version, elementorWebCliConfig.version); |
| 1875 |
return total < 0 || total >= 8; |
| 1876 |
} |
| 1877 |
}]); |
| 1878 |
}(); |
| 1879 |
|
| 1880 |
/***/ }), |
| 1881 |
|
| 1882 |
/***/ "../modules/web-cli/assets/js/utils/force-method-implementation.js": |
| 1883 |
/*!*************************************************************************!*\ |
| 1884 |
!*** ../modules/web-cli/assets/js/utils/force-method-implementation.js ***! |
| 1885 |
\*************************************************************************/ |
| 1886 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 1887 |
|
| 1888 |
"use strict"; |
| 1889 |
|
| 1890 |
|
| 1891 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 1892 |
Object.defineProperty(exports, "__esModule", ({ |
| 1893 |
value: true |
| 1894 |
})); |
| 1895 |
exports["default"] = exports.ForceMethodImplementation = void 0; |
| 1896 |
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 1897 |
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 1898 |
var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 1899 |
var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 1900 |
var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); |
| 1901 |
var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/wrapNativeSuper */ "../node_modules/@babel/runtime/helpers/wrapNativeSuper.js")); |
| 1902 |
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } |
| 1903 |
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } |
| 1904 |
// TODO: Copied from `assets/dev/js/modules/imports/force-method-implementation.js`; |
| 1905 |
var ForceMethodImplementation = exports.ForceMethodImplementation = /*#__PURE__*/function (_Error) { |
| 1906 |
function ForceMethodImplementation() { |
| 1907 |
var _this; |
| 1908 |
var info = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
| 1909 |
(0, _classCallCheck2.default)(this, ForceMethodImplementation); |
| 1910 |
_this = _callSuper(this, ForceMethodImplementation, ["".concat(info.isStatic ? 'static ' : '').concat(info.fullName, "() should be implemented, please provide '").concat(info.functionName || info.fullName, "' functionality.")]); |
| 1911 |
Error.captureStackTrace(_this, ForceMethodImplementation); |
| 1912 |
return _this; |
| 1913 |
} |
| 1914 |
(0, _inherits2.default)(ForceMethodImplementation, _Error); |
| 1915 |
return (0, _createClass2.default)(ForceMethodImplementation); |
| 1916 |
}(/*#__PURE__*/(0, _wrapNativeSuper2.default)(Error)); |
| 1917 |
var _default = exports["default"] = function _default() { |
| 1918 |
var stack = Error().stack, |
| 1919 |
caller = stack.split('\n')[2].trim(), |
| 1920 |
callerName = caller.startsWith('at new') ? 'constructor' : caller.split(' ')[1], |
| 1921 |
info = {}; |
| 1922 |
info.functionName = callerName; |
| 1923 |
info.fullName = callerName; |
| 1924 |
if (info.functionName.includes('.')) { |
| 1925 |
var parts = info.functionName.split('.'); |
| 1926 |
info.className = parts[0]; |
| 1927 |
info.functionName = parts[1]; |
| 1928 |
} else { |
| 1929 |
info.isStatic = true; |
| 1930 |
} |
| 1931 |
throw new ForceMethodImplementation(info); |
| 1932 |
}; |
| 1933 |
|
| 1934 |
/***/ }), |
| 1935 |
|
| 1936 |
/***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js": |
| 1937 |
/*!******************************************************************!*\ |
| 1938 |
!*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***! |
| 1939 |
\******************************************************************/ |
| 1940 |
/***/ ((module) => { |
| 1941 |
|
| 1942 |
function _arrayLikeToArray(r, a) { |
| 1943 |
(null == a || a > r.length) && (a = r.length); |
| 1944 |
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; |
| 1945 |
return n; |
| 1946 |
} |
| 1947 |
module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1948 |
|
| 1949 |
/***/ }), |
| 1950 |
|
| 1951 |
/***/ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js": |
| 1952 |
/*!****************************************************************!*\ |
| 1953 |
!*** ../node_modules/@babel/runtime/helpers/arrayWithHoles.js ***! |
| 1954 |
\****************************************************************/ |
| 1955 |
/***/ ((module) => { |
| 1956 |
|
| 1957 |
function _arrayWithHoles(r) { |
| 1958 |
if (Array.isArray(r)) return r; |
| 1959 |
} |
| 1960 |
module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1961 |
|
| 1962 |
/***/ }), |
| 1963 |
|
| 1964 |
/***/ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js": |
| 1965 |
/*!***********************************************************************!*\ |
| 1966 |
!*** ../node_modules/@babel/runtime/helpers/assertThisInitialized.js ***! |
| 1967 |
\***********************************************************************/ |
| 1968 |
/***/ ((module) => { |
| 1969 |
|
| 1970 |
function _assertThisInitialized(e) { |
| 1971 |
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); |
| 1972 |
return e; |
| 1973 |
} |
| 1974 |
module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1975 |
|
| 1976 |
/***/ }), |
| 1977 |
|
| 1978 |
/***/ "../node_modules/@babel/runtime/helpers/classCallCheck.js": |
| 1979 |
/*!****************************************************************!*\ |
| 1980 |
!*** ../node_modules/@babel/runtime/helpers/classCallCheck.js ***! |
| 1981 |
\****************************************************************/ |
| 1982 |
/***/ ((module) => { |
| 1983 |
|
| 1984 |
function _classCallCheck(a, n) { |
| 1985 |
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); |
| 1986 |
} |
| 1987 |
module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1988 |
|
| 1989 |
/***/ }), |
| 1990 |
|
| 1991 |
/***/ "../node_modules/@babel/runtime/helpers/construct.js": |
| 1992 |
/*!***********************************************************!*\ |
| 1993 |
!*** ../node_modules/@babel/runtime/helpers/construct.js ***! |
| 1994 |
\***********************************************************/ |
| 1995 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 1996 |
|
| 1997 |
var isNativeReflectConstruct = __webpack_require__(/*! ./isNativeReflectConstruct.js */ "../node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js"); |
| 1998 |
var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js"); |
| 1999 |
function _construct(t, e, r) { |
| 2000 |
if (isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments); |
| 2001 |
var o = [null]; |
| 2002 |
o.push.apply(o, e); |
| 2003 |
var p = new (t.bind.apply(t, o))(); |
| 2004 |
return r && setPrototypeOf(p, r.prototype), p; |
| 2005 |
} |
| 2006 |
module.exports = _construct, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2007 |
|
| 2008 |
/***/ }), |
| 2009 |
|
| 2010 |
/***/ "../node_modules/@babel/runtime/helpers/createClass.js": |
| 2011 |
/*!*************************************************************!*\ |
| 2012 |
!*** ../node_modules/@babel/runtime/helpers/createClass.js ***! |
| 2013 |
\*************************************************************/ |
| 2014 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 2015 |
|
| 2016 |
var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); |
| 2017 |
function _defineProperties(e, r) { |
| 2018 |
for (var t = 0; t < r.length; t++) { |
| 2019 |
var o = r[t]; |
| 2020 |
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o); |
| 2021 |
} |
| 2022 |
} |
| 2023 |
function _createClass(e, r, t) { |
| 2024 |
return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { |
| 2025 |
writable: !1 |
| 2026 |
}), e; |
| 2027 |
} |
| 2028 |
module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2029 |
|
| 2030 |
/***/ }), |
| 2031 |
|
| 2032 |
/***/ "../node_modules/@babel/runtime/helpers/defineProperty.js": |
| 2033 |
/*!****************************************************************!*\ |
| 2034 |
!*** ../node_modules/@babel/runtime/helpers/defineProperty.js ***! |
| 2035 |
\****************************************************************/ |
| 2036 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 2037 |
|
| 2038 |
var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); |
| 2039 |
function _defineProperty(e, r, t) { |
| 2040 |
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, { |
| 2041 |
value: t, |
| 2042 |
enumerable: !0, |
| 2043 |
configurable: !0, |
| 2044 |
writable: !0 |
| 2045 |
}) : e[r] = t, e; |
| 2046 |
} |
| 2047 |
module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2048 |
|
| 2049 |
/***/ }), |
| 2050 |
|
| 2051 |
/***/ "../node_modules/@babel/runtime/helpers/get.js": |
| 2052 |
/*!*****************************************************!*\ |
| 2053 |
!*** ../node_modules/@babel/runtime/helpers/get.js ***! |
| 2054 |
\*****************************************************/ |
| 2055 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 2056 |
|
| 2057 |
var superPropBase = __webpack_require__(/*! ./superPropBase.js */ "../node_modules/@babel/runtime/helpers/superPropBase.js"); |
| 2058 |
function _get() { |
| 2059 |
return module.exports = _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { |
| 2060 |
var p = superPropBase(e, t); |
| 2061 |
if (p) { |
| 2062 |
var n = Object.getOwnPropertyDescriptor(p, t); |
| 2063 |
return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; |
| 2064 |
} |
| 2065 |
}, module.exports.__esModule = true, module.exports["default"] = module.exports, _get.apply(null, arguments); |
| 2066 |
} |
| 2067 |
module.exports = _get, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2068 |
|
| 2069 |
/***/ }), |
| 2070 |
|
| 2071 |
/***/ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js": |
| 2072 |
/*!****************************************************************!*\ |
| 2073 |
!*** ../node_modules/@babel/runtime/helpers/getPrototypeOf.js ***! |
| 2074 |
\****************************************************************/ |
| 2075 |
/***/ ((module) => { |
| 2076 |
|
| 2077 |
function _getPrototypeOf(t) { |
| 2078 |
return module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { |
| 2079 |
return t.__proto__ || Object.getPrototypeOf(t); |
| 2080 |
}, module.exports.__esModule = true, module.exports["default"] = module.exports, _getPrototypeOf(t); |
| 2081 |
} |
| 2082 |
module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2083 |
|
| 2084 |
/***/ }), |
| 2085 |
|
| 2086 |
/***/ "../node_modules/@babel/runtime/helpers/inherits.js": |
| 2087 |
/*!**********************************************************!*\ |
| 2088 |
!*** ../node_modules/@babel/runtime/helpers/inherits.js ***! |
| 2089 |
\**********************************************************/ |
| 2090 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 2091 |
|
| 2092 |
var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js"); |
| 2093 |
function _inherits(t, e) { |
| 2094 |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); |
| 2095 |
t.prototype = Object.create(e && e.prototype, { |
| 2096 |
constructor: { |
| 2097 |
value: t, |
| 2098 |
writable: !0, |
| 2099 |
configurable: !0 |
| 2100 |
} |
| 2101 |
}), Object.defineProperty(t, "prototype", { |
| 2102 |
writable: !1 |
| 2103 |
}), e && setPrototypeOf(t, e); |
| 2104 |
} |
| 2105 |
module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2106 |
|
| 2107 |
/***/ }), |
| 2108 |
|
| 2109 |
/***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js": |
| 2110 |
/*!***********************************************************************!*\ |
| 2111 |
!*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***! |
| 2112 |
\***********************************************************************/ |
| 2113 |
/***/ ((module) => { |
| 2114 |
|
| 2115 |
function _interopRequireDefault(e) { |
| 2116 |
return e && e.__esModule ? e : { |
| 2117 |
"default": e |
| 2118 |
}; |
| 2119 |
} |
| 2120 |
module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2121 |
|
| 2122 |
/***/ }), |
| 2123 |
|
| 2124 |
/***/ "../node_modules/@babel/runtime/helpers/isNativeFunction.js": |
| 2125 |
/*!******************************************************************!*\ |
| 2126 |
!*** ../node_modules/@babel/runtime/helpers/isNativeFunction.js ***! |
| 2127 |
\******************************************************************/ |
| 2128 |
/***/ ((module) => { |
| 2129 |
|
| 2130 |
function _isNativeFunction(t) { |
| 2131 |
try { |
| 2132 |
return -1 !== Function.toString.call(t).indexOf("[native code]"); |
| 2133 |
} catch (n) { |
| 2134 |
return "function" == typeof t; |
| 2135 |
} |
| 2136 |
} |
| 2137 |
module.exports = _isNativeFunction, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2138 |
|
| 2139 |
/***/ }), |
| 2140 |
|
| 2141 |
/***/ "../node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js": |
| 2142 |
/*!**************************************************************************!*\ |
| 2143 |
!*** ../node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js ***! |
| 2144 |
\**************************************************************************/ |
| 2145 |
/***/ ((module) => { |
| 2146 |
|
| 2147 |
function _isNativeReflectConstruct() { |
| 2148 |
try { |
| 2149 |
var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); |
| 2150 |
} catch (t) {} |
| 2151 |
return (module.exports = _isNativeReflectConstruct = function _isNativeReflectConstruct() { |
| 2152 |
return !!t; |
| 2153 |
}, module.exports.__esModule = true, module.exports["default"] = module.exports)(); |
| 2154 |
} |
| 2155 |
module.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2156 |
|
| 2157 |
/***/ }), |
| 2158 |
|
| 2159 |
/***/ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js": |
| 2160 |
/*!**********************************************************************!*\ |
| 2161 |
!*** ../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***! |
| 2162 |
\**********************************************************************/ |
| 2163 |
/***/ ((module) => { |
| 2164 |
|
| 2165 |
function _iterableToArrayLimit(r, l) { |
| 2166 |
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; |
| 2167 |
if (null != t) { |
| 2168 |
var e, |
| 2169 |
n, |
| 2170 |
i, |
| 2171 |
u, |
| 2172 |
a = [], |
| 2173 |
f = !0, |
| 2174 |
o = !1; |
| 2175 |
try { |
| 2176 |
if (i = (t = t.call(r)).next, 0 === l) { |
| 2177 |
if (Object(t) !== t) return; |
| 2178 |
f = !1; |
| 2179 |
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); |
| 2180 |
} catch (r) { |
| 2181 |
o = !0, n = r; |
| 2182 |
} finally { |
| 2183 |
try { |
| 2184 |
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; |
| 2185 |
} finally { |
| 2186 |
if (o) throw n; |
| 2187 |
} |
| 2188 |
} |
| 2189 |
return a; |
| 2190 |
} |
| 2191 |
} |
| 2192 |
module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2193 |
|
| 2194 |
/***/ }), |
| 2195 |
|
| 2196 |
/***/ "../node_modules/@babel/runtime/helpers/nonIterableRest.js": |
| 2197 |
/*!*****************************************************************!*\ |
| 2198 |
!*** ../node_modules/@babel/runtime/helpers/nonIterableRest.js ***! |
| 2199 |
\*****************************************************************/ |
| 2200 |
/***/ ((module) => { |
| 2201 |
|
| 2202 |
function _nonIterableRest() { |
| 2203 |
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); |
| 2204 |
} |
| 2205 |
module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2206 |
|
| 2207 |
/***/ }), |
| 2208 |
|
| 2209 |
/***/ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js": |
| 2210 |
/*!***************************************************************************!*\ |
| 2211 |
!*** ../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***! |
| 2212 |
\***************************************************************************/ |
| 2213 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 2214 |
|
| 2215 |
var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); |
| 2216 |
var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js"); |
| 2217 |
function _possibleConstructorReturn(t, e) { |
| 2218 |
if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; |
| 2219 |
if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); |
| 2220 |
return assertThisInitialized(t); |
| 2221 |
} |
| 2222 |
module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2223 |
|
| 2224 |
/***/ }), |
| 2225 |
|
| 2226 |
/***/ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js": |
| 2227 |
/*!****************************************************************!*\ |
| 2228 |
!*** ../node_modules/@babel/runtime/helpers/setPrototypeOf.js ***! |
| 2229 |
\****************************************************************/ |
| 2230 |
/***/ ((module) => { |
| 2231 |
|
| 2232 |
function _setPrototypeOf(t, e) { |
| 2233 |
return module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { |
| 2234 |
return t.__proto__ = e, t; |
| 2235 |
}, module.exports.__esModule = true, module.exports["default"] = module.exports, _setPrototypeOf(t, e); |
| 2236 |
} |
| 2237 |
module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2238 |
|
| 2239 |
/***/ }), |
| 2240 |
|
| 2241 |
/***/ "../node_modules/@babel/runtime/helpers/slicedToArray.js": |
| 2242 |
/*!***************************************************************!*\ |
| 2243 |
!*** ../node_modules/@babel/runtime/helpers/slicedToArray.js ***! |
| 2244 |
\***************************************************************/ |
| 2245 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 2246 |
|
| 2247 |
var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js"); |
| 2248 |
var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js"); |
| 2249 |
var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"); |
| 2250 |
var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "../node_modules/@babel/runtime/helpers/nonIterableRest.js"); |
| 2251 |
function _slicedToArray(r, e) { |
| 2252 |
return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest(); |
| 2253 |
} |
| 2254 |
module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2255 |
|
| 2256 |
/***/ }), |
| 2257 |
|
| 2258 |
/***/ "../node_modules/@babel/runtime/helpers/superPropBase.js": |
| 2259 |
/*!***************************************************************!*\ |
| 2260 |
!*** ../node_modules/@babel/runtime/helpers/superPropBase.js ***! |
| 2261 |
\***************************************************************/ |
| 2262 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 2263 |
|
| 2264 |
var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"); |
| 2265 |
function _superPropBase(t, o) { |
| 2266 |
for (; !{}.hasOwnProperty.call(t, o) && null !== (t = getPrototypeOf(t));); |
| 2267 |
return t; |
| 2268 |
} |
| 2269 |
module.exports = _superPropBase, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2270 |
|
| 2271 |
/***/ }), |
| 2272 |
|
| 2273 |
/***/ "../node_modules/@babel/runtime/helpers/toPrimitive.js": |
| 2274 |
/*!*************************************************************!*\ |
| 2275 |
!*** ../node_modules/@babel/runtime/helpers/toPrimitive.js ***! |
| 2276 |
\*************************************************************/ |
| 2277 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 2278 |
|
| 2279 |
var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); |
| 2280 |
function toPrimitive(t, r) { |
| 2281 |
if ("object" != _typeof(t) || !t) return t; |
| 2282 |
var e = t[Symbol.toPrimitive]; |
| 2283 |
if (void 0 !== e) { |
| 2284 |
var i = e.call(t, r || "default"); |
| 2285 |
if ("object" != _typeof(i)) return i; |
| 2286 |
throw new TypeError("@@toPrimitive must return a primitive value."); |
| 2287 |
} |
| 2288 |
return ("string" === r ? String : Number)(t); |
| 2289 |
} |
| 2290 |
module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2291 |
|
| 2292 |
/***/ }), |
| 2293 |
|
| 2294 |
/***/ "../node_modules/@babel/runtime/helpers/toPropertyKey.js": |
| 2295 |
/*!***************************************************************!*\ |
| 2296 |
!*** ../node_modules/@babel/runtime/helpers/toPropertyKey.js ***! |
| 2297 |
\***************************************************************/ |
| 2298 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 2299 |
|
| 2300 |
var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); |
| 2301 |
var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ "../node_modules/@babel/runtime/helpers/toPrimitive.js"); |
| 2302 |
function toPropertyKey(t) { |
| 2303 |
var i = toPrimitive(t, "string"); |
| 2304 |
return "symbol" == _typeof(i) ? i : i + ""; |
| 2305 |
} |
| 2306 |
module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2307 |
|
| 2308 |
/***/ }), |
| 2309 |
|
| 2310 |
/***/ "../node_modules/@babel/runtime/helpers/typeof.js": |
| 2311 |
/*!********************************************************!*\ |
| 2312 |
!*** ../node_modules/@babel/runtime/helpers/typeof.js ***! |
| 2313 |
\********************************************************/ |
| 2314 |
/***/ ((module) => { |
| 2315 |
|
| 2316 |
function _typeof(o) { |
| 2317 |
"@babel/helpers - typeof"; |
| 2318 |
|
| 2319 |
return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { |
| 2320 |
return typeof o; |
| 2321 |
} : function (o) { |
| 2322 |
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; |
| 2323 |
}, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o); |
| 2324 |
} |
| 2325 |
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2326 |
|
| 2327 |
/***/ }), |
| 2328 |
|
| 2329 |
/***/ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js": |
| 2330 |
/*!****************************************************************************!*\ |
| 2331 |
!*** ../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***! |
| 2332 |
\****************************************************************************/ |
| 2333 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 2334 |
|
| 2335 |
var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js"); |
| 2336 |
function _unsupportedIterableToArray(r, a) { |
| 2337 |
if (r) { |
| 2338 |
if ("string" == typeof r) return arrayLikeToArray(r, a); |
| 2339 |
var t = {}.toString.call(r).slice(8, -1); |
| 2340 |
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? arrayLikeToArray(r, a) : void 0; |
| 2341 |
} |
| 2342 |
} |
| 2343 |
module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2344 |
|
| 2345 |
/***/ }), |
| 2346 |
|
| 2347 |
/***/ "../node_modules/@babel/runtime/helpers/wrapNativeSuper.js": |
| 2348 |
/*!*****************************************************************!*\ |
| 2349 |
!*** ../node_modules/@babel/runtime/helpers/wrapNativeSuper.js ***! |
| 2350 |
\*****************************************************************/ |
| 2351 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 2352 |
|
| 2353 |
var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"); |
| 2354 |
var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js"); |
| 2355 |
var isNativeFunction = __webpack_require__(/*! ./isNativeFunction.js */ "../node_modules/@babel/runtime/helpers/isNativeFunction.js"); |
| 2356 |
var construct = __webpack_require__(/*! ./construct.js */ "../node_modules/@babel/runtime/helpers/construct.js"); |
| 2357 |
function _wrapNativeSuper(t) { |
| 2358 |
var r = "function" == typeof Map ? new Map() : void 0; |
| 2359 |
return module.exports = _wrapNativeSuper = function _wrapNativeSuper(t) { |
| 2360 |
if (null === t || !isNativeFunction(t)) return t; |
| 2361 |
if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function"); |
| 2362 |
if (void 0 !== r) { |
| 2363 |
if (r.has(t)) return r.get(t); |
| 2364 |
r.set(t, Wrapper); |
| 2365 |
} |
| 2366 |
function Wrapper() { |
| 2367 |
return construct(t, arguments, getPrototypeOf(this).constructor); |
| 2368 |
} |
| 2369 |
return Wrapper.prototype = Object.create(t.prototype, { |
| 2370 |
constructor: { |
| 2371 |
value: Wrapper, |
| 2372 |
enumerable: !1, |
| 2373 |
writable: !0, |
| 2374 |
configurable: !0 |
| 2375 |
} |
| 2376 |
}), setPrototypeOf(Wrapper, t); |
| 2377 |
}, module.exports.__esModule = true, module.exports["default"] = module.exports, _wrapNativeSuper(t); |
| 2378 |
} |
| 2379 |
module.exports = _wrapNativeSuper, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2380 |
|
| 2381 |
/***/ }), |
| 2382 |
|
| 2383 |
/***/ "@reduxjs/toolkit": |
| 2384 |
/*!************************************************!*\ |
| 2385 |
!*** external "elementorVendors.reduxToolkit" ***! |
| 2386 |
\************************************************/ |
| 2387 |
/***/ ((module) => { |
| 2388 |
|
| 2389 |
"use strict"; |
| 2390 |
module.exports = elementorVendors.reduxToolkit; |
| 2391 |
|
| 2392 |
/***/ }) |
| 2393 |
|
| 2394 |
/******/ }); |
| 2395 |
/************************************************************************/ |
| 2396 |
/******/ // The module cache |
| 2397 |
/******/ var __webpack_module_cache__ = {}; |
| 2398 |
/******/ |
| 2399 |
/******/ // The require function |
| 2400 |
/******/ function __webpack_require__(moduleId) { |
| 2401 |
/******/ // Check if module is in cache |
| 2402 |
/******/ var cachedModule = __webpack_module_cache__[moduleId]; |
| 2403 |
/******/ if (cachedModule !== undefined) { |
| 2404 |
/******/ return cachedModule.exports; |
| 2405 |
/******/ } |
| 2406 |
/******/ // Create a new module (and put it into the cache) |
| 2407 |
/******/ var module = __webpack_module_cache__[moduleId] = { |
| 2408 |
/******/ // no module.id needed |
| 2409 |
/******/ // no module.loaded needed |
| 2410 |
/******/ exports: {} |
| 2411 |
/******/ }; |
| 2412 |
/******/ |
| 2413 |
/******/ // Execute the module function |
| 2414 |
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); |
| 2415 |
/******/ |
| 2416 |
/******/ // Return the exports of the module |
| 2417 |
/******/ return module.exports; |
| 2418 |
/******/ } |
| 2419 |
/******/ |
| 2420 |
/************************************************************************/ |
| 2421 |
var __webpack_exports__ = {}; |
| 2422 |
// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. |
| 2423 |
(() => { |
| 2424 |
"use strict"; |
| 2425 |
/*!**************************************!*\ |
| 2426 |
!*** ../app/assets/js/app-loader.js ***! |
| 2427 |
\**************************************/ |
| 2428 |
|
| 2429 |
|
| 2430 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 2431 |
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 2432 |
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 2433 |
var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); |
| 2434 |
var _component = _interopRequireDefault(__webpack_require__(/*! ./loader/component */ "../app/assets/js/loader/component.js")); |
| 2435 |
var AppLoader = /*#__PURE__*/function () { |
| 2436 |
function AppLoader() { |
| 2437 |
(0, _classCallCheck2.default)(this, AppLoader); |
| 2438 |
(0, _defineProperty2.default)(this, "selector", 'a.elementor-app-link, .elementor-app-link .ab-item'); |
| 2439 |
$e.components.register(new _component.default()); |
| 2440 |
window.addEventListener('DOMContentLoaded', this.onLoad.bind(this)); |
| 2441 |
} |
| 2442 |
return (0, _createClass2.default)(AppLoader, [{ |
| 2443 |
key: "onLoad", |
| 2444 |
value: function onLoad() { |
| 2445 |
var links = document.querySelectorAll(this.selector); |
| 2446 |
if (!links.length) { |
| 2447 |
return; |
| 2448 |
} |
| 2449 |
links.forEach(function (link) { |
| 2450 |
link.addEventListener('click', function (event) { |
| 2451 |
event.preventDefault(); |
| 2452 |
$e.run('app/open', { |
| 2453 |
url: link.href |
| 2454 |
}); |
| 2455 |
}); |
| 2456 |
link.addEventListener('mouseenter', function () { |
| 2457 |
$e.run('app/load', { |
| 2458 |
url: link.href |
| 2459 |
}); |
| 2460 |
}); |
| 2461 |
}); |
| 2462 |
} |
| 2463 |
}]); |
| 2464 |
}(); |
| 2465 |
window.elementorAppLoader = new AppLoader(); |
| 2466 |
})(); |
| 2467 |
|
| 2468 |
/******/ })() |
| 2469 |
; |
| 2470 |
//# sourceMappingURL=app-loader.js.map |