| @@ -1,184 +1,4258 @@ | ||
| 1 | -/******/ (() => { // webpackBootstrap | |
| 2 | -/******/ var __webpack_modules__ = ({ | |
| 1 | +/*! elementor - v3.0.13 - 04-11-2020 */ | |
| 2 | +/******/ (function(modules) { // webpackBootstrap | |
| 3 | +/******/ // The module cache | |
| 4 | +/******/ var installedModules = {}; | |
| 5 | +/******/ | |
| 6 | +/******/ // The require function | |
| 7 | +/******/ function __webpack_require__(moduleId) { | |
| 8 | +/******/ | |
| 9 | +/******/ // Check if module is in cache | |
| 10 | +/******/ if(installedModules[moduleId]) { | |
| 11 | +/******/ return installedModules[moduleId].exports; | |
| 12 | +/******/ } | |
| 13 | +/******/ // Create a new module (and put it into the cache) | |
| 14 | +/******/ var module = installedModules[moduleId] = { | |
| 15 | +/******/ i: moduleId, | |
| 16 | +/******/ l: false, | |
| 17 | +/******/ exports: {} | |
| 18 | +/******/ }; | |
| 19 | +/******/ | |
| 20 | +/******/ // Execute the module function | |
| 21 | +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); | |
| 22 | +/******/ | |
| 23 | +/******/ // Flag the module as loaded | |
| 24 | +/******/ module.l = true; | |
| 25 | +/******/ | |
| 26 | +/******/ // Return the exports of the module | |
| 27 | +/******/ return module.exports; | |
| 28 | +/******/ } | |
| 29 | +/******/ | |
| 30 | +/******/ | |
| 31 | +/******/ // expose the modules object (__webpack_modules__) | |
| 32 | +/******/ __webpack_require__.m = modules; | |
| 33 | +/******/ | |
| 34 | +/******/ // expose the module cache | |
| 35 | +/******/ __webpack_require__.c = installedModules; | |
| 36 | +/******/ | |
| 37 | +/******/ // define getter function for harmony exports | |
| 38 | +/******/ __webpack_require__.d = function(exports, name, getter) { | |
| 39 | +/******/ if(!__webpack_require__.o(exports, name)) { | |
| 40 | +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); | |
| 41 | +/******/ } | |
| 42 | +/******/ }; | |
| 43 | +/******/ | |
| 44 | +/******/ // define __esModule on exports | |
| 45 | +/******/ __webpack_require__.r = function(exports) { | |
| 46 | +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { | |
| 47 | +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); | |
| 48 | +/******/ } | |
| 49 | +/******/ Object.defineProperty(exports, '__esModule', { value: true }); | |
| 50 | +/******/ }; | |
| 51 | +/******/ | |
| 52 | +/******/ // create a fake namespace object | |
| 53 | +/******/ // mode & 1: value is a module id, require it | |
| 54 | +/******/ // mode & 2: merge all properties of value into the ns | |
| 55 | +/******/ // mode & 4: return value when already ns object | |
| 56 | +/******/ // mode & 8|1: behave like require | |
| 57 | +/******/ __webpack_require__.t = function(value, mode) { | |
| 58 | +/******/ if(mode & 1) value = __webpack_require__(value); | |
| 59 | +/******/ if(mode & 8) return value; | |
| 60 | +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; | |
| 61 | +/******/ var ns = Object.create(null); | |
| 62 | +/******/ __webpack_require__.r(ns); | |
| 63 | +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); | |
| 64 | +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); | |
| 65 | +/******/ return ns; | |
| 66 | +/******/ }; | |
| 67 | +/******/ | |
| 68 | +/******/ // getDefaultExport function for compatibility with non-harmony modules | |
| 69 | +/******/ __webpack_require__.n = function(module) { | |
| 70 | +/******/ var getter = module && module.__esModule ? | |
| 71 | +/******/ function getDefault() { return module['default']; } : | |
| 72 | +/******/ function getModuleExports() { return module; }; | |
| 73 | +/******/ __webpack_require__.d(getter, 'a', getter); | |
| 74 | +/******/ return getter; | |
| 75 | +/******/ }; | |
| 76 | +/******/ | |
| 77 | +/******/ // Object.prototype.hasOwnProperty.call | |
| 78 | +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; | |
| 79 | +/******/ | |
| 80 | +/******/ // __webpack_public_path__ | |
| 81 | +/******/ __webpack_require__.p = ""; | |
| 82 | +/******/ | |
| 83 | +/******/ | |
| 84 | +/******/ // Load entry module and return exports | |
| 85 | +/******/ return __webpack_require__(__webpack_require__.s = 827); | |
| 86 | +/******/ }) | |
| 87 | +/************************************************************************/ | |
| 88 | +/******/ ([ | |
| 89 | +/* 0 */ | |
| 90 | +/***/ (function(module, exports) { | |
| 3 | 91 | |
| 4 | -/***/ "../assets/dev/js/editor/command-bases/command-container-base.js": | |
| 5 | -/*!***********************************************************************!*\ | |
| 6 | - !*** ../assets/dev/js/editor/command-bases/command-container-base.js ***! | |
| 7 | - \***********************************************************************/ | |
| 8 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 92 | +function _interopRequireDefault(obj) { | |
| 93 | + return obj && obj.__esModule ? obj : { | |
| 94 | + "default": obj | |
| 95 | + }; | |
| 96 | +} | |
| 9 | 97 | |
| 98 | +module.exports = _interopRequireDefault; | |
| 99 | + | |
| 100 | +/***/ }), | |
| 101 | +/* 1 */ | |
| 102 | +/***/ (function(module, exports, __webpack_require__) { | |
| 103 | + | |
| 104 | +module.exports = __webpack_require__(152); | |
| 105 | + | |
| 106 | +/***/ }), | |
| 107 | +/* 2 */ | |
| 108 | +/***/ (function(module, exports) { | |
| 109 | + | |
| 110 | +function _classCallCheck(instance, Constructor) { | |
| 111 | + if (!(instance instanceof Constructor)) { | |
| 112 | + throw new TypeError("Cannot call a class as a function"); | |
| 113 | + } | |
| 114 | +} | |
| 115 | + | |
| 116 | +module.exports = _classCallCheck; | |
| 117 | + | |
| 118 | +/***/ }), | |
| 119 | +/* 3 */ | |
| 120 | +/***/ (function(module, exports, __webpack_require__) { | |
| 121 | + | |
| 122 | +var _Object$defineProperty = __webpack_require__(1); | |
| 123 | + | |
| 124 | +function _defineProperties(target, props) { | |
| 125 | + for (var i = 0; i < props.length; i++) { | |
| 126 | + var descriptor = props[i]; | |
| 127 | + descriptor.enumerable = descriptor.enumerable || false; | |
| 128 | + descriptor.configurable = true; | |
| 129 | + if ("value" in descriptor) descriptor.writable = true; | |
| 130 | + | |
| 131 | + _Object$defineProperty(target, descriptor.key, descriptor); | |
| 132 | + } | |
| 133 | +} | |
| 134 | + | |
| 135 | +function _createClass(Constructor, protoProps, staticProps) { | |
| 136 | + if (protoProps) _defineProperties(Constructor.prototype, protoProps); | |
| 137 | + if (staticProps) _defineProperties(Constructor, staticProps); | |
| 138 | + return Constructor; | |
| 139 | +} | |
| 140 | + | |
| 141 | +module.exports = _createClass; | |
| 142 | + | |
| 143 | +/***/ }), | |
| 144 | +/* 4 */ | |
| 145 | +/***/ (function(module, exports, __webpack_require__) { | |
| 146 | + | |
| 147 | +var _Object$create = __webpack_require__(130); | |
| 148 | + | |
| 149 | +var setPrototypeOf = __webpack_require__(119); | |
| 150 | + | |
| 151 | +function _inherits(subClass, superClass) { | |
| 152 | + if (typeof superClass !== "function" && superClass !== null) { | |
| 153 | + throw new TypeError("Super expression must either be null or a function"); | |
| 154 | + } | |
| 155 | + | |
| 156 | + subClass.prototype = _Object$create(superClass && superClass.prototype, { | |
| 157 | + constructor: { | |
| 158 | + value: subClass, | |
| 159 | + writable: true, | |
| 160 | + configurable: true | |
| 161 | + } | |
| 162 | + }); | |
| 163 | + if (superClass) setPrototypeOf(subClass, superClass); | |
| 164 | +} | |
| 165 | + | |
| 166 | +module.exports = _inherits; | |
| 167 | + | |
| 168 | +/***/ }), | |
| 169 | +/* 5 */ | |
| 170 | +/***/ (function(module, exports, __webpack_require__) { | |
| 171 | + | |
| 172 | +var _Reflect$construct = __webpack_require__(95); | |
| 173 | + | |
| 174 | +var getPrototypeOf = __webpack_require__(16); | |
| 175 | + | |
| 176 | +var isNativeReflectConstruct = __webpack_require__(138); | |
| 177 | + | |
| 178 | +var possibleConstructorReturn = __webpack_require__(167); | |
| 179 | + | |
| 180 | +function _createSuper(Derived) { | |
| 181 | + var hasNativeReflectConstruct = isNativeReflectConstruct(); | |
| 182 | + return function _createSuperInternal() { | |
| 183 | + var Super = getPrototypeOf(Derived), | |
| 184 | + result; | |
| 185 | + | |
| 186 | + if (hasNativeReflectConstruct) { | |
| 187 | + var NewTarget = getPrototypeOf(this).constructor; | |
| 188 | + result = _Reflect$construct(Super, arguments, NewTarget); | |
| 189 | + } else { | |
| 190 | + result = Super.apply(this, arguments); | |
| 191 | + } | |
| 192 | + | |
| 193 | + return possibleConstructorReturn(this, result); | |
| 194 | + }; | |
| 195 | +} | |
| 196 | + | |
| 197 | +module.exports = _createSuper; | |
| 198 | + | |
| 199 | +/***/ }), | |
| 200 | +/* 6 */ | |
| 201 | +/***/ (function(module, exports) { | |
| 202 | + | |
| 203 | +var core = module.exports = { version: '2.6.11' }; | |
| 204 | +if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef | |
| 205 | + | |
| 206 | + | |
| 207 | +/***/ }), | |
| 208 | +/* 7 */ | |
| 209 | +/***/ (function(module, exports, __webpack_require__) { | |
| 210 | + | |
| 211 | +var global = __webpack_require__(8); | |
| 212 | +var core = __webpack_require__(6); | |
| 213 | +var ctx = __webpack_require__(29); | |
| 214 | +var hide = __webpack_require__(22); | |
| 215 | +var has = __webpack_require__(17); | |
| 216 | +var PROTOTYPE = 'prototype'; | |
| 217 | + | |
| 218 | +var $export = function (type, name, source) { | |
| 219 | + var IS_FORCED = type & $export.F; | |
| 220 | + var IS_GLOBAL = type & $export.G; | |
| 221 | + var IS_STATIC = type & $export.S; | |
| 222 | + var IS_PROTO = type & $export.P; | |
| 223 | + var IS_BIND = type & $export.B; | |
| 224 | + var IS_WRAP = type & $export.W; | |
| 225 | + var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); | |
| 226 | + var expProto = exports[PROTOTYPE]; | |
| 227 | + var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]; | |
| 228 | + var key, own, out; | |
| 229 | + if (IS_GLOBAL) source = name; | |
| 230 | + for (key in source) { | |
| 231 | + // contains in native | |
| 232 | + own = !IS_FORCED && target && target[key] !== undefined; | |
| 233 | + if (own && has(exports, key)) continue; | |
| 234 | + // export native or passed | |
| 235 | + out = own ? target[key] : source[key]; | |
| 236 | + // prevent global pollution for namespaces | |
| 237 | + exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] | |
| 238 | + // bind timers to global for call from export context | |
| 239 | + : IS_BIND && own ? ctx(out, global) | |
| 240 | + // wrap global constructors for prevent change them in library | |
| 241 | + : IS_WRAP && target[key] == out ? (function (C) { | |
| 242 | + var F = function (a, b, c) { | |
| 243 | + if (this instanceof C) { | |
| 244 | + switch (arguments.length) { | |
| 245 | + case 0: return new C(); | |
| 246 | + case 1: return new C(a); | |
| 247 | + case 2: return new C(a, b); | |
| 248 | + } return new C(a, b, c); | |
| 249 | + } return C.apply(this, arguments); | |
| 250 | + }; | |
| 251 | + F[PROTOTYPE] = C[PROTOTYPE]; | |
| 252 | + return F; | |
| 253 | + // make static versions for prototype methods | |
| 254 | + })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; | |
| 255 | + // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% | |
| 256 | + if (IS_PROTO) { | |
| 257 | + (exports.virtual || (exports.virtual = {}))[key] = out; | |
| 258 | + // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% | |
| 259 | + if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out); | |
| 260 | + } | |
| 261 | + } | |
| 262 | +}; | |
| 263 | +// type bitmap | |
| 264 | +$export.F = 1; // forced | |
| 265 | +$export.G = 2; // global | |
| 266 | +$export.S = 4; // static | |
| 267 | +$export.P = 8; // proto | |
| 268 | +$export.B = 16; // bind | |
| 269 | +$export.W = 32; // wrap | |
| 270 | +$export.U = 64; // safe | |
| 271 | +$export.R = 128; // real proto method for `library` | |
| 272 | +module.exports = $export; | |
| 273 | + | |
| 274 | + | |
| 275 | +/***/ }), | |
| 276 | +/* 8 */ | |
| 277 | +/***/ (function(module, exports) { | |
| 278 | + | |
| 279 | +// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 | |
| 280 | +var global = module.exports = typeof window != 'undefined' && window.Math == Math | |
| 281 | + ? window : typeof self != 'undefined' && self.Math == Math ? self | |
| 282 | + // eslint-disable-next-line no-new-func | |
| 283 | + : Function('return this')(); | |
| 284 | +if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef | |
| 285 | + | |
| 286 | + | |
| 287 | +/***/ }), | |
| 288 | +/* 9 */ | |
| 289 | +/***/ (function(module, exports) { | |
| 290 | + | |
| 291 | +module.exports = function (it) { | |
| 292 | + return typeof it === 'object' ? it !== null : typeof it === 'function'; | |
| 293 | +}; | |
| 294 | + | |
| 295 | + | |
| 296 | +/***/ }), | |
| 297 | +/* 10 */ | |
| 298 | +/***/ (function(module, exports, __webpack_require__) { | |
| 299 | + | |
| 300 | +var store = __webpack_require__(71)('wks'); | |
| 301 | +var uid = __webpack_require__(55); | |
| 302 | +var Symbol = __webpack_require__(8).Symbol; | |
| 303 | +var USE_SYMBOL = typeof Symbol == 'function'; | |
| 304 | + | |
| 305 | +var $exports = module.exports = function (name) { | |
| 306 | + return store[name] || (store[name] = | |
| 307 | + USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); | |
| 308 | +}; | |
| 309 | + | |
| 310 | +$exports.store = store; | |
| 311 | + | |
| 312 | + | |
| 313 | +/***/ }), | |
| 314 | +/* 11 */ | |
| 315 | +/***/ (function(module, exports, __webpack_require__) { | |
| 316 | + | |
| 317 | +var isObject = __webpack_require__(9); | |
| 318 | +module.exports = function (it) { | |
| 319 | + if (!isObject(it)) throw TypeError(it + ' is not an object!'); | |
| 320 | + return it; | |
| 321 | +}; | |
| 322 | + | |
| 323 | + | |
| 324 | +/***/ }), | |
| 325 | +/* 12 */, | |
| 326 | +/* 13 */ | |
| 327 | +/***/ (function(module, exports, __webpack_require__) { | |
| 328 | + | |
| 329 | +var store = __webpack_require__(76)('wks'); | |
| 330 | +var uid = __webpack_require__(77); | |
| 331 | +var Symbol = __webpack_require__(18).Symbol; | |
| 332 | +var USE_SYMBOL = typeof Symbol == 'function'; | |
| 333 | + | |
| 334 | +var $exports = module.exports = function (name) { | |
| 335 | + return store[name] || (store[name] = | |
| 336 | + USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); | |
| 337 | +}; | |
| 338 | + | |
| 339 | +$exports.store = store; | |
| 340 | + | |
| 341 | + | |
| 342 | +/***/ }), | |
| 343 | +/* 14 */ | |
| 344 | +/***/ (function(module, exports, __webpack_require__) { | |
| 345 | + | |
| 346 | +// Thank's IE8 for his funny defineProperty | |
| 347 | +module.exports = !__webpack_require__(21)(function () { | |
| 348 | + return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; | |
| 349 | +}); | |
| 350 | + | |
| 351 | + | |
| 352 | +/***/ }), | |
| 353 | +/* 15 */ | |
| 354 | +/***/ (function(module, exports, __webpack_require__) { | |
| 355 | + | |
| 356 | +var anObject = __webpack_require__(11); | |
| 357 | +var IE8_DOM_DEFINE = __webpack_require__(110); | |
| 358 | +var toPrimitive = __webpack_require__(69); | |
| 359 | +var dP = Object.defineProperty; | |
| 360 | + | |
| 361 | +exports.f = __webpack_require__(14) ? Object.defineProperty : function defineProperty(O, P, Attributes) { | |
| 362 | + anObject(O); | |
| 363 | + P = toPrimitive(P, true); | |
| 364 | + anObject(Attributes); | |
| 365 | + if (IE8_DOM_DEFINE) try { | |
| 366 | + return dP(O, P, Attributes); | |
| 367 | + } catch (e) { /* empty */ } | |
| 368 | + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); | |
| 369 | + if ('value' in Attributes) O[P] = Attributes.value; | |
| 370 | + return O; | |
| 371 | +}; | |
| 372 | + | |
| 373 | + | |
| 374 | +/***/ }), | |
| 375 | +/* 16 */ | |
| 376 | +/***/ (function(module, exports, __webpack_require__) { | |
| 377 | + | |
| 378 | +var _Object$getPrototypeOf = __webpack_require__(154); | |
| 379 | + | |
| 380 | +var _Object$setPrototypeOf = __webpack_require__(111); | |
| 381 | + | |
| 382 | +function _getPrototypeOf(o) { | |
| 383 | + module.exports = _getPrototypeOf = _Object$setPrototypeOf ? _Object$getPrototypeOf : function _getPrototypeOf(o) { | |
| 384 | + return o.__proto__ || _Object$getPrototypeOf(o); | |
| 385 | + }; | |
| 386 | + return _getPrototypeOf(o); | |
| 387 | +} | |
| 388 | + | |
| 389 | +module.exports = _getPrototypeOf; | |
| 390 | + | |
| 391 | +/***/ }), | |
| 392 | +/* 17 */ | |
| 393 | +/***/ (function(module, exports) { | |
| 394 | + | |
| 395 | +var hasOwnProperty = {}.hasOwnProperty; | |
| 396 | +module.exports = function (it, key) { | |
| 397 | + return hasOwnProperty.call(it, key); | |
| 398 | +}; | |
| 399 | + | |
| 400 | + | |
| 401 | +/***/ }), | |
| 402 | +/* 18 */ | |
| 403 | +/***/ (function(module, exports) { | |
| 404 | + | |
| 405 | +// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 | |
| 406 | +var global = module.exports = typeof window != 'undefined' && window.Math == Math | |
| 407 | + ? window : typeof self != 'undefined' && self.Math == Math ? self | |
| 408 | + // eslint-disable-next-line no-new-func | |
| 409 | + : Function('return this')(); | |
| 410 | +if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef | |
| 411 | + | |
| 412 | + | |
| 413 | +/***/ }), | |
| 414 | +/* 19 */ | |
| 415 | +/***/ (function(module, exports, __webpack_require__) { | |
| 416 | + | |
| 417 | +// to indexed object, toObject with fallback for non-array-like ES3 strings | |
| 418 | +var IObject = __webpack_require__(103); | |
| 419 | +var defined = __webpack_require__(65); | |
| 420 | +module.exports = function (it) { | |
| 421 | + return IObject(defined(it)); | |
| 422 | +}; | |
| 423 | + | |
| 424 | + | |
| 425 | +/***/ }), | |
| 426 | +/* 20 */ | |
| 427 | +/***/ (function(module, exports, __webpack_require__) { | |
| 428 | + | |
| 429 | +var isObject = __webpack_require__(31); | |
| 430 | +module.exports = function (it) { | |
| 431 | + if (!isObject(it)) throw TypeError(it + ' is not an object!'); | |
| 432 | + return it; | |
| 433 | +}; | |
| 434 | + | |
| 435 | + | |
| 436 | +/***/ }), | |
| 437 | +/* 21 */ | |
| 438 | +/***/ (function(module, exports) { | |
| 439 | + | |
| 440 | +module.exports = function (exec) { | |
| 441 | + try { | |
| 442 | + return !!exec(); | |
| 443 | + } catch (e) { | |
| 444 | + return true; | |
| 445 | + } | |
| 446 | +}; | |
| 447 | + | |
| 448 | + | |
| 449 | +/***/ }), | |
| 450 | +/* 22 */ | |
| 451 | +/***/ (function(module, exports, __webpack_require__) { | |
| 452 | + | |
| 453 | +var dP = __webpack_require__(15); | |
| 454 | +var createDesc = __webpack_require__(42); | |
| 455 | +module.exports = __webpack_require__(14) ? function (object, key, value) { | |
| 456 | + return dP.f(object, key, createDesc(1, value)); | |
| 457 | +} : function (object, key, value) { | |
| 458 | + object[key] = value; | |
| 459 | + return object; | |
| 460 | +}; | |
| 461 | + | |
| 462 | + | |
| 463 | +/***/ }), | |
| 464 | +/* 23 */ | |
| 465 | +/***/ (function(module, exports, __webpack_require__) { | |
| 466 | + | |
| 10 | 467 | "use strict"; |
| 11 | 468 | |
| 12 | 469 | |
| 13 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 14 | -Object.defineProperty(exports, "__esModule", ({ | |
| 470 | +var _interopRequireDefault = __webpack_require__(0); | |
| 471 | + | |
| 472 | +var _Object$defineProperty = __webpack_require__(1); | |
| 473 | + | |
| 474 | +_Object$defineProperty(exports, "__esModule", { | |
| 15 | 475 | value: true |
| 16 | -})); | |
| 17 | -exports["default"] = 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 | -var _commandBase = _interopRequireDefault(__webpack_require__(/*! elementor-api/modules/command-base */ "../modules/web-cli/assets/js/modules/command-base.js")); | |
| 24 | -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)); } | |
| 25 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 26 | -/** | |
| 27 | - * @name $e.modules.editor.CommandContainerBase | |
| 28 | - */ | |
| 29 | -var CommandContainerBase = exports["default"] = /*#__PURE__*/function (_CommandBase) { | |
| 30 | - function CommandContainerBase() { | |
| 31 | - (0, _classCallCheck2.default)(this, CommandContainerBase); | |
| 32 | - return _callSuper(this, CommandContainerBase, arguments); | |
| 33 | - } | |
| 34 | - (0, _inherits2.default)(CommandContainerBase, _CommandBase); | |
| 35 | - return (0, _createClass2.default)(CommandContainerBase, [{ | |
| 36 | - key: "requireContainer", | |
| 37 | - value: | |
| 476 | +}); | |
| 477 | + | |
| 478 | +exports.default = void 0; | |
| 479 | + | |
| 480 | +var _typeof2 = _interopRequireDefault(__webpack_require__(50)); | |
| 481 | + | |
| 482 | +var _regenerator = _interopRequireDefault(__webpack_require__(84)); | |
| 483 | + | |
| 484 | +__webpack_require__(150); | |
| 485 | + | |
| 486 | +__webpack_require__(122); | |
| 487 | + | |
| 488 | +__webpack_require__(80); | |
| 489 | + | |
| 490 | +__webpack_require__(271); | |
| 491 | + | |
| 492 | +var _promise = _interopRequireDefault(__webpack_require__(134)); | |
| 493 | + | |
| 494 | +var _isArray = _interopRequireDefault(__webpack_require__(86)); | |
| 495 | + | |
| 496 | +__webpack_require__(68); | |
| 497 | + | |
| 498 | +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(85)); | |
| 499 | + | |
| 500 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 501 | + | |
| 502 | +var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(45)); | |
| 503 | + | |
| 504 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 505 | + | |
| 506 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 507 | + | |
| 508 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 509 | + | |
| 510 | +var _defineProperty2 = _interopRequireDefault(__webpack_require__(27)); | |
| 511 | + | |
| 512 | +var _argsObject = _interopRequireDefault(__webpack_require__(227)); | |
| 513 | + | |
| 514 | +var CommandBase = /*#__PURE__*/function (_ArgsObject) { | |
| 515 | + (0, _inherits2.default)(CommandBase, _ArgsObject); | |
| 516 | + | |
| 517 | + var _super = (0, _createSuper2.default)(CommandBase); | |
| 518 | + | |
| 519 | + (0, _createClass2.default)(CommandBase, null, [{ | |
| 520 | + key: "getInstanceType", | |
| 521 | + value: function getInstanceType() { | |
| 522 | + return 'CommandBase'; | |
| 523 | + } | |
| 38 | 524 | /** |
| 39 | - * Function requireContainer(). | |
| 525 | + * Current component. | |
| 40 | 526 | * |
| 41 | - * Validate `arg.container` & `arg.containers`. | |
| 42 | - * | |
| 43 | - * @param {{}} args | |
| 44 | - * | |
| 45 | - * @throws {Error} | |
| 527 | + * @type {Component} | |
| 46 | 528 | */ |
| 47 | - function requireContainer() { | |
| 48 | - var _this = this; | |
| 529 | + | |
| 530 | + }]); | |
| 531 | + | |
| 532 | + /** | |
| 533 | + * Function constructor(). | |
| 534 | + * | |
| 535 | + * Create Commands Base. | |
| 536 | + * | |
| 537 | + * @param [args={}] | |
| 538 | + * @param [commandsAPI={}] | |
| 539 | + */ | |
| 540 | + function CommandBase(args) { | |
| 541 | + var _this; | |
| 542 | + | |
| 543 | + var commandsAPI = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : $e.commands; | |
| 544 | + (0, _classCallCheck2.default)(this, CommandBase); | |
| 545 | + _this = _super.call(this, args); // Acknowledge self about which command it run. | |
| 546 | + | |
| 547 | + (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "component", void 0); | |
| 548 | + _this.currentCommand = commandsAPI.getCurrentLast(); // Assign instance of current component. | |
| 549 | + | |
| 550 | + _this.component = commandsAPI.getComponent(_this.currentCommand); // Who ever need do something before without `super` the constructor can use `initialize` method. | |
| 551 | + | |
| 552 | + _this.initialize(args); // Refresh args, maybe the changed via `initialize`. | |
| 553 | + | |
| 554 | + | |
| 555 | + args = _this.args; // Validate args before run. | |
| 556 | + | |
| 557 | + _this.validateArgs(args); | |
| 558 | + | |
| 559 | + return _this; | |
| 560 | + } | |
| 561 | + /** | |
| 562 | + * Function requireContainer(). | |
| 563 | + * | |
| 564 | + * Validate `arg.container` & `arg.containers`. | |
| 565 | + * | |
| 566 | + * @param {{}} args | |
| 567 | + * | |
| 568 | + * @throws {Error} | |
| 569 | + */ | |
| 570 | + | |
| 571 | + | |
| 572 | + (0, _createClass2.default)(CommandBase, [{ | |
| 573 | + key: "requireContainer", | |
| 574 | + value: function requireContainer() { | |
| 575 | + var _this2 = this; | |
| 576 | + | |
| 49 | 577 | var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.args; |
| 578 | + | |
| 50 | 579 | if (!args.container && !args.containers) { |
| 51 | 580 | throw Error('container or containers are required.'); |
| 52 | 581 | } |
| 582 | + | |
| 53 | 583 | if (args.container && args.containers) { |
| 54 | 584 | throw Error('container and containers cannot go together please select one of them.'); |
| 55 | 585 | } |
| 586 | + | |
| 56 | 587 | var containers = args.containers || [args.container]; |
| 57 | 588 | containers.forEach(function (container) { |
| 58 | - _this.requireArgumentInstance('container', elementorModules.editor.Container, { | |
| 589 | + _this2.requireArgumentInstance('container', elementorModules.editor.Container, { | |
| 59 | 590 | container: container |
| 60 | 591 | }); |
| 61 | 592 | }); |
| 62 | 593 | } |
| 63 | - }], [{ | |
| 64 | - key: "getInstanceType", | |
| 65 | - value: function getInstanceType() { | |
| 66 | - return 'CommandContainerBase'; | |
| 594 | + /** | |
| 595 | + * Function initialize(). | |
| 596 | + * | |
| 597 | + * Initialize command, called after construction. | |
| 598 | + * | |
| 599 | + * @param [args={}] | |
| 600 | + */ | |
| 601 | + | |
| 602 | + }, { | |
| 603 | + key: "initialize", | |
| 604 | + value: function initialize() { | |
| 605 | + var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 606 | + } // eslint-disable-line no-unused-vars | |
| 607 | + | |
| 608 | + /** | |
| 609 | + * Function validateArgs(). | |
| 610 | + * | |
| 611 | + * Validate command arguments. | |
| 612 | + * | |
| 613 | + * @param [args={}] | |
| 614 | + */ | |
| 615 | + | |
| 616 | + }, { | |
| 617 | + key: "validateArgs", | |
| 618 | + value: function validateArgs() { | |
| 619 | + var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 620 | + } // eslint-disable-line no-unused-vars | |
| 621 | + | |
| 622 | + /** | |
| 623 | + * Function isDataChanged(). | |
| 624 | + * | |
| 625 | + * Whether the editor needs to set change flag on/off. | |
| 626 | + * | |
| 627 | + * @returns {boolean} | |
| 628 | + */ | |
| 629 | + | |
| 630 | + }, { | |
| 631 | + key: "isDataChanged", | |
| 632 | + value: function isDataChanged() { | |
| 633 | + return false; | |
| 67 | 634 | } |
| 635 | + /** | |
| 636 | + * Function apply(). | |
| 637 | + * | |
| 638 | + * Do the actual command. | |
| 639 | + * | |
| 640 | + * @param [args={}] | |
| 641 | + * | |
| 642 | + * @returns {*} | |
| 643 | + */ | |
| 644 | + | |
| 645 | + }, { | |
| 646 | + key: "apply", | |
| 647 | + value: function apply() { | |
| 648 | + var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 649 | + // eslint-disable-line no-unused-vars | |
| 650 | + elementorModules.ForceMethodImplementation(); | |
| 651 | + } | |
| 652 | + /** | |
| 653 | + * Function run(). | |
| 654 | + * | |
| 655 | + * Run command with history & hooks. | |
| 656 | + * | |
| 657 | + * @returns {*} | |
| 658 | + */ | |
| 659 | + | |
| 660 | + }, { | |
| 661 | + key: "run", | |
| 662 | + value: function run() { | |
| 663 | + var result; // For UI Hooks. | |
| 664 | + | |
| 665 | + this.onBeforeRun(this.args); | |
| 666 | + | |
| 667 | + try { | |
| 668 | + // For Data hooks. | |
| 669 | + this.onBeforeApply(this.args); | |
| 670 | + result = this.apply(this.args); | |
| 671 | + } catch (e) { | |
| 672 | + this.onCatchApply(e); // Catch 'Hook-Break' that comes from hooks base. | |
| 673 | + | |
| 674 | + if (e instanceof $e.modules.HookBreak) { | |
| 675 | + // Bypass. | |
| 676 | + return false; | |
| 677 | + } | |
| 678 | + } | |
| 679 | + | |
| 680 | + return this.runAfter(result); | |
| 681 | + } | |
| 682 | + }, { | |
| 683 | + key: "runAfter", | |
| 684 | + value: function runAfter(result) { | |
| 685 | + var _this3 = this; | |
| 686 | + | |
| 687 | + var onAfter = function onAfter(_result) { | |
| 688 | + // Run Data hooks. | |
| 689 | + _this3.onAfterApply(_this3.args, _result); // TODO: Create Command-Base for Command-Document and apply it on after. | |
| 690 | + | |
| 691 | + | |
| 692 | + if (_this3.isDataChanged()) { | |
| 693 | + $e.internal('document/save/set-is-modified', { | |
| 694 | + status: true | |
| 695 | + }); | |
| 696 | + } // For UI hooks. | |
| 697 | + | |
| 698 | + | |
| 699 | + _this3.onAfterRun(_this3.args, _result); | |
| 700 | + }, | |
| 701 | + asyncOnAfter = /*#__PURE__*/function () { | |
| 702 | + var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(_result) { | |
| 703 | + var results, promises; | |
| 704 | + return _regenerator.default.wrap(function _callee$(_context) { | |
| 705 | + while (1) { | |
| 706 | + switch (_context.prev = _context.next) { | |
| 707 | + case 0: | |
| 708 | + // Run Data hooks. | |
| 709 | + results = _this3.onAfterApply(_this3.args, _result), promises = (0, _isArray.default)(results) ? results.flat().filter(function (filtered) { | |
| 710 | + return filtered instanceof _promise.default; | |
| 711 | + }) : []; | |
| 712 | + | |
| 713 | + if (!promises.length) { | |
| 714 | + _context.next = 4; | |
| 715 | + break; | |
| 716 | + } | |
| 717 | + | |
| 718 | + _context.next = 4; | |
| 719 | + return _promise.default.all(promises); | |
| 720 | + | |
| 721 | + case 4: | |
| 722 | + if (_this3.isDataChanged()) { | |
| 723 | + // TODO: Create Command-Base for Command-Document and apply it on after. | |
| 724 | + $e.internal('document/save/set-is-modified', { | |
| 725 | + status: true | |
| 726 | + }); | |
| 727 | + } // For UI hooks. | |
| 728 | + | |
| 729 | + | |
| 730 | + _this3.onAfterRun(_this3.args, _result); | |
| 731 | + | |
| 732 | + case 6: | |
| 733 | + case "end": | |
| 734 | + return _context.stop(); | |
| 735 | + } | |
| 736 | + } | |
| 737 | + }, _callee); | |
| 738 | + })); | |
| 739 | + | |
| 740 | + return function asyncOnAfter(_x) { | |
| 741 | + return _ref.apply(this, arguments); | |
| 742 | + }; | |
| 743 | + }(); // TODO: Temp code determine if it's a jQuery deferred object. | |
| 744 | + | |
| 745 | + | |
| 746 | + if (result && 'object' === (0, _typeof2.default)(result) && result.promise && result.then && result.fail) { | |
| 747 | + result.fail(this.onCatchApply.bind(this)); | |
| 748 | + result.done(onAfter); | |
| 749 | + } else if (result instanceof _promise.default) { | |
| 750 | + // Override initial result ( promise ) to await onAfter promises, first!. | |
| 751 | + return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() { | |
| 752 | + return _regenerator.default.wrap(function _callee2$(_context2) { | |
| 753 | + while (1) { | |
| 754 | + switch (_context2.prev = _context2.next) { | |
| 755 | + case 0: | |
| 756 | + _context2.next = 2; | |
| 757 | + return result.catch(_this3.onCatchApply.bind(_this3)); | |
| 758 | + | |
| 759 | + case 2: | |
| 760 | + _context2.next = 4; | |
| 761 | + return result.then(function (_result) { | |
| 762 | + return asyncOnAfter(_result); | |
| 763 | + }); | |
| 764 | + | |
| 765 | + case 4: | |
| 766 | + return _context2.abrupt("return", result); | |
| 767 | + | |
| 768 | + case 5: | |
| 769 | + case "end": | |
| 770 | + return _context2.stop(); | |
| 771 | + } | |
| 772 | + } | |
| 773 | + }, _callee2); | |
| 774 | + }))(); | |
| 775 | + } else { | |
| 776 | + onAfter(result); | |
| 777 | + } | |
| 778 | + | |
| 779 | + return result; | |
| 780 | + } | |
| 781 | + /** | |
| 782 | + * Run all the catch hooks. | |
| 783 | + * | |
| 784 | + * @param {Error} e | |
| 785 | + */ | |
| 786 | + | |
| 787 | + }, { | |
| 788 | + key: "runCatchHooks", | |
| 789 | + value: function runCatchHooks(e) { | |
| 790 | + $e.hooks.runDataCatch(this.currentCommand, this.args, e); | |
| 791 | + $e.hooks.runUICatch(this.currentCommand, this.args, e); | |
| 792 | + } | |
| 793 | + /** | |
| 794 | + * Function onBeforeRun. | |
| 795 | + * | |
| 796 | + * Called before run(). | |
| 797 | + * | |
| 798 | + * @param [args={}] | |
| 799 | + */ | |
| 800 | + | |
| 801 | + }, { | |
| 802 | + key: "onBeforeRun", | |
| 803 | + value: function onBeforeRun() { | |
| 804 | + var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 805 | + $e.hooks.runUIBefore(this.currentCommand, args); | |
| 806 | + } | |
| 807 | + /** | |
| 808 | + * Function onAfterRun. | |
| 809 | + * | |
| 810 | + * Called after run(). | |
| 811 | + * | |
| 812 | + * @param [args={}] | |
| 813 | + * @param [result={*}] | |
| 814 | + */ | |
| 815 | + | |
| 816 | + }, { | |
| 817 | + key: "onAfterRun", | |
| 818 | + value: function onAfterRun() { | |
| 819 | + var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 820 | + var result = arguments.length > 1 ? arguments[1] : undefined; | |
| 821 | + $e.hooks.runUIAfter(this.currentCommand, args, result); | |
| 822 | + } | |
| 823 | + /** | |
| 824 | + * Function onBeforeApply. | |
| 825 | + * | |
| 826 | + * Called before apply(). | |
| 827 | + * | |
| 828 | + * @param [args={}] | |
| 829 | + */ | |
| 830 | + | |
| 831 | + }, { | |
| 832 | + key: "onBeforeApply", | |
| 833 | + value: function onBeforeApply() { | |
| 834 | + var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 835 | + $e.hooks.runDataDependency(this.currentCommand, args); | |
| 836 | + } | |
| 837 | + /** | |
| 838 | + * Function onAfterApply. | |
| 839 | + * | |
| 840 | + * Called after apply(). | |
| 841 | + * | |
| 842 | + * @param [args={}] | |
| 843 | + * @param [result={*}] | |
| 844 | + */ | |
| 845 | + | |
| 846 | + }, { | |
| 847 | + key: "onAfterApply", | |
| 848 | + value: function onAfterApply() { | |
| 849 | + var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 850 | + var result = arguments.length > 1 ? arguments[1] : undefined; | |
| 851 | + return $e.hooks.runDataAfter(this.currentCommand, args, result); | |
| 852 | + } | |
| 853 | + /** | |
| 854 | + * Function onCatchApply. | |
| 855 | + * | |
| 856 | + * Called after apply() failed. | |
| 857 | + * | |
| 858 | + * @param {Error} e | |
| 859 | + */ | |
| 860 | + | |
| 861 | + }, { | |
| 862 | + key: "onCatchApply", | |
| 863 | + value: function onCatchApply(e) { | |
| 864 | + this.runCatchHooks(e); | |
| 865 | + elementorCommon.helpers.consoleError(e); | |
| 866 | + } | |
| 68 | 867 | }]); |
| 69 | -}(_commandBase.default); | |
| 868 | + return CommandBase; | |
| 869 | +}(_argsObject.default); | |
| 70 | 870 | |
| 871 | +exports.default = CommandBase; | |
| 872 | + | |
| 71 | 873 | /***/ }), |
| 874 | +/* 24 */ | |
| 875 | +/***/ (function(module, exports, __webpack_require__) { | |
| 72 | 876 | |
| 73 | -/***/ "../assets/dev/js/editor/command-bases/command-container-internal-base.js": | |
| 74 | -/*!********************************************************************************!*\ | |
| 75 | - !*** ../assets/dev/js/editor/command-bases/command-container-internal-base.js ***! | |
| 76 | - \********************************************************************************/ | |
| 77 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 877 | +"use strict"; | |
| 78 | 878 | |
| 879 | +// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined) | |
| 880 | +var $export = __webpack_require__(38); | |
| 881 | +var $find = __webpack_require__(190)(5); | |
| 882 | +var KEY = 'find'; | |
| 883 | +var forced = true; | |
| 884 | +// Shouldn't skip holes | |
| 885 | +if (KEY in []) Array(1)[KEY](function () { forced = false; }); | |
| 886 | +$export($export.P + $export.F * forced, 'Array', { | |
| 887 | + find: function find(callbackfn /* , that = undefined */) { | |
| 888 | + return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); | |
| 889 | + } | |
| 890 | +}); | |
| 891 | +__webpack_require__(90)(KEY); | |
| 892 | + | |
| 893 | + | |
| 894 | +/***/ }), | |
| 895 | +/* 25 */ | |
| 896 | +/***/ (function(module, exports, __webpack_require__) { | |
| 897 | + | |
| 898 | +module.exports = __webpack_require__(202); | |
| 899 | + | |
| 900 | +/***/ }), | |
| 901 | +/* 26 */ | |
| 902 | +/***/ (function(module, exports, __webpack_require__) { | |
| 903 | + | |
| 904 | +var _Object$getOwnPropertyDescriptor = __webpack_require__(116); | |
| 905 | + | |
| 906 | +var _Reflect$get = __webpack_require__(186); | |
| 907 | + | |
| 908 | +var superPropBase = __webpack_require__(189); | |
| 909 | + | |
| 910 | +function _get(target, property, receiver) { | |
| 911 | + if (typeof Reflect !== "undefined" && _Reflect$get) { | |
| 912 | + module.exports = _get = _Reflect$get; | |
| 913 | + } else { | |
| 914 | + module.exports = _get = function _get(target, property, receiver) { | |
| 915 | + var base = superPropBase(target, property); | |
| 916 | + if (!base) return; | |
| 917 | + | |
| 918 | + var desc = _Object$getOwnPropertyDescriptor(base, property); | |
| 919 | + | |
| 920 | + if (desc.get) { | |
| 921 | + return desc.get.call(receiver); | |
| 922 | + } | |
| 923 | + | |
| 924 | + return desc.value; | |
| 925 | + }; | |
| 926 | + } | |
| 927 | + | |
| 928 | + return _get(target, property, receiver || target); | |
| 929 | +} | |
| 930 | + | |
| 931 | +module.exports = _get; | |
| 932 | + | |
| 933 | +/***/ }), | |
| 934 | +/* 27 */ | |
| 935 | +/***/ (function(module, exports, __webpack_require__) { | |
| 936 | + | |
| 937 | +var _Object$defineProperty = __webpack_require__(1); | |
| 938 | + | |
| 939 | +function _defineProperty(obj, key, value) { | |
| 940 | + if (key in obj) { | |
| 941 | + _Object$defineProperty(obj, key, { | |
| 942 | + value: value, | |
| 943 | + enumerable: true, | |
| 944 | + configurable: true, | |
| 945 | + writable: true | |
| 946 | + }); | |
| 947 | + } else { | |
| 948 | + obj[key] = value; | |
| 949 | + } | |
| 950 | + | |
| 951 | + return obj; | |
| 952 | +} | |
| 953 | + | |
| 954 | +module.exports = _defineProperty; | |
| 955 | + | |
| 956 | +/***/ }), | |
| 957 | +/* 28 */ | |
| 958 | +/***/ (function(module, exports, __webpack_require__) { | |
| 959 | + | |
| 960 | +// Thank's IE8 for his funny defineProperty | |
| 961 | +module.exports = !__webpack_require__(36)(function () { | |
| 962 | + return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; | |
| 963 | +}); | |
| 964 | + | |
| 965 | + | |
| 966 | +/***/ }), | |
| 967 | +/* 29 */ | |
| 968 | +/***/ (function(module, exports, __webpack_require__) { | |
| 969 | + | |
| 970 | +// optional / simple context binding | |
| 971 | +var aFunction = __webpack_require__(35); | |
| 972 | +module.exports = function (fn, that, length) { | |
| 973 | + aFunction(fn); | |
| 974 | + if (that === undefined) return fn; | |
| 975 | + switch (length) { | |
| 976 | + case 1: return function (a) { | |
| 977 | + return fn.call(that, a); | |
| 978 | + }; | |
| 979 | + case 2: return function (a, b) { | |
| 980 | + return fn.call(that, a, b); | |
| 981 | + }; | |
| 982 | + case 3: return function (a, b, c) { | |
| 983 | + return fn.call(that, a, b, c); | |
| 984 | + }; | |
| 985 | + } | |
| 986 | + return function (/* ...args */) { | |
| 987 | + return fn.apply(that, arguments); | |
| 988 | + }; | |
| 989 | +}; | |
| 990 | + | |
| 991 | + | |
| 992 | +/***/ }), | |
| 993 | +/* 30 */ | |
| 994 | +/***/ (function(module, exports, __webpack_require__) { | |
| 995 | + | |
| 996 | +var dP = __webpack_require__(51); | |
| 997 | +var createDesc = __webpack_require__(106); | |
| 998 | +module.exports = __webpack_require__(28) ? function (object, key, value) { | |
| 999 | + return dP.f(object, key, createDesc(1, value)); | |
| 1000 | +} : function (object, key, value) { | |
| 1001 | + object[key] = value; | |
| 1002 | + return object; | |
| 1003 | +}; | |
| 1004 | + | |
| 1005 | + | |
| 1006 | +/***/ }), | |
| 1007 | +/* 31 */ | |
| 1008 | +/***/ (function(module, exports) { | |
| 1009 | + | |
| 1010 | +module.exports = function (it) { | |
| 1011 | + return typeof it === 'object' ? it !== null : typeof it === 'function'; | |
| 1012 | +}; | |
| 1013 | + | |
| 1014 | + | |
| 1015 | +/***/ }), | |
| 1016 | +/* 32 */ | |
| 1017 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1018 | + | |
| 1019 | +// 7.1.13 ToObject(argument) | |
| 1020 | +var defined = __webpack_require__(65); | |
| 1021 | +module.exports = function (it) { | |
| 1022 | + return Object(defined(it)); | |
| 1023 | +}; | |
| 1024 | + | |
| 1025 | + | |
| 1026 | +/***/ }), | |
| 1027 | +/* 33 */ | |
| 1028 | +/***/ (function(module, exports) { | |
| 1029 | + | |
| 1030 | +module.exports = {}; | |
| 1031 | + | |
| 1032 | + | |
| 1033 | +/***/ }), | |
| 1034 | +/* 34 */ | |
| 1035 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1036 | + | |
| 1037 | +var _Object$getOwnPropertyDescriptor = __webpack_require__(116); | |
| 1038 | + | |
| 1039 | +var _Object$defineProperty = __webpack_require__(1); | |
| 1040 | + | |
| 1041 | +var _typeof = __webpack_require__(50); | |
| 1042 | + | |
| 1043 | +var _WeakMap = __webpack_require__(263); | |
| 1044 | + | |
| 1045 | +function _getRequireWildcardCache() { | |
| 1046 | + if (typeof _WeakMap !== "function") return null; | |
| 1047 | + var cache = new _WeakMap(); | |
| 1048 | + | |
| 1049 | + _getRequireWildcardCache = function _getRequireWildcardCache() { | |
| 1050 | + return cache; | |
| 1051 | + }; | |
| 1052 | + | |
| 1053 | + return cache; | |
| 1054 | +} | |
| 1055 | + | |
| 1056 | +function _interopRequireWildcard(obj) { | |
| 1057 | + if (obj && obj.__esModule) { | |
| 1058 | + return obj; | |
| 1059 | + } | |
| 1060 | + | |
| 1061 | + if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { | |
| 1062 | + return { | |
| 1063 | + "default": obj | |
| 1064 | + }; | |
| 1065 | + } | |
| 1066 | + | |
| 1067 | + var cache = _getRequireWildcardCache(); | |
| 1068 | + | |
| 1069 | + if (cache && cache.has(obj)) { | |
| 1070 | + return cache.get(obj); | |
| 1071 | + } | |
| 1072 | + | |
| 1073 | + var newObj = {}; | |
| 1074 | + var hasPropertyDescriptor = _Object$defineProperty && _Object$getOwnPropertyDescriptor; | |
| 1075 | + | |
| 1076 | + for (var key in obj) { | |
| 1077 | + if (Object.prototype.hasOwnProperty.call(obj, key)) { | |
| 1078 | + var desc = hasPropertyDescriptor ? _Object$getOwnPropertyDescriptor(obj, key) : null; | |
| 1079 | + | |
| 1080 | + if (desc && (desc.get || desc.set)) { | |
| 1081 | + _Object$defineProperty(newObj, key, desc); | |
| 1082 | + } else { | |
| 1083 | + newObj[key] = obj[key]; | |
| 1084 | + } | |
| 1085 | + } | |
| 1086 | + } | |
| 1087 | + | |
| 1088 | + newObj["default"] = obj; | |
| 1089 | + | |
| 1090 | + if (cache) { | |
| 1091 | + cache.set(obj, newObj); | |
| 1092 | + } | |
| 1093 | + | |
| 1094 | + return newObj; | |
| 1095 | +} | |
| 1096 | + | |
| 1097 | +module.exports = _interopRequireWildcard; | |
| 1098 | + | |
| 1099 | +/***/ }), | |
| 1100 | +/* 35 */ | |
| 1101 | +/***/ (function(module, exports) { | |
| 1102 | + | |
| 1103 | +module.exports = function (it) { | |
| 1104 | + if (typeof it != 'function') throw TypeError(it + ' is not a function!'); | |
| 1105 | + return it; | |
| 1106 | +}; | |
| 1107 | + | |
| 1108 | + | |
| 1109 | +/***/ }), | |
| 1110 | +/* 36 */ | |
| 1111 | +/***/ (function(module, exports) { | |
| 1112 | + | |
| 1113 | +module.exports = function (exec) { | |
| 1114 | + try { | |
| 1115 | + return !!exec(); | |
| 1116 | + } catch (e) { | |
| 1117 | + return true; | |
| 1118 | + } | |
| 1119 | +}; | |
| 1120 | + | |
| 1121 | + | |
| 1122 | +/***/ }), | |
| 1123 | +/* 37 */ | |
| 1124 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1125 | + | |
| 1126 | +// 19.1.2.14 / 15.2.3.14 Object.keys(O) | |
| 1127 | +var $keys = __webpack_require__(112); | |
| 1128 | +var enumBugKeys = __webpack_require__(74); | |
| 1129 | + | |
| 1130 | +module.exports = Object.keys || function keys(O) { | |
| 1131 | + return $keys(O, enumBugKeys); | |
| 1132 | +}; | |
| 1133 | + | |
| 1134 | + | |
| 1135 | +/***/ }), | |
| 1136 | +/* 38 */ | |
| 1137 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1138 | + | |
| 1139 | +var global = __webpack_require__(18); | |
| 1140 | +var core = __webpack_require__(58); | |
| 1141 | +var hide = __webpack_require__(30); | |
| 1142 | +var redefine = __webpack_require__(39); | |
| 1143 | +var ctx = __webpack_require__(81); | |
| 1144 | +var PROTOTYPE = 'prototype'; | |
| 1145 | + | |
| 1146 | +var $export = function (type, name, source) { | |
| 1147 | + var IS_FORCED = type & $export.F; | |
| 1148 | + var IS_GLOBAL = type & $export.G; | |
| 1149 | + var IS_STATIC = type & $export.S; | |
| 1150 | + var IS_PROTO = type & $export.P; | |
| 1151 | + var IS_BIND = type & $export.B; | |
| 1152 | + var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE]; | |
| 1153 | + var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); | |
| 1154 | + var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}); | |
| 1155 | + var key, own, out, exp; | |
| 1156 | + if (IS_GLOBAL) source = name; | |
| 1157 | + for (key in source) { | |
| 1158 | + // contains in native | |
| 1159 | + own = !IS_FORCED && target && target[key] !== undefined; | |
| 1160 | + // export native or passed | |
| 1161 | + out = (own ? target : source)[key]; | |
| 1162 | + // bind timers to global for call from export context | |
| 1163 | + exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; | |
| 1164 | + // extend global | |
| 1165 | + if (target) redefine(target, key, out, type & $export.U); | |
| 1166 | + // export | |
| 1167 | + if (exports[key] != out) hide(exports, key, exp); | |
| 1168 | + if (IS_PROTO && expProto[key] != out) expProto[key] = out; | |
| 1169 | + } | |
| 1170 | +}; | |
| 1171 | +global.core = core; | |
| 1172 | +// type bitmap | |
| 1173 | +$export.F = 1; // forced | |
| 1174 | +$export.G = 2; // global | |
| 1175 | +$export.S = 4; // static | |
| 1176 | +$export.P = 8; // proto | |
| 1177 | +$export.B = 16; // bind | |
| 1178 | +$export.W = 32; // wrap | |
| 1179 | +$export.U = 64; // safe | |
| 1180 | +$export.R = 128; // real proto method for `library` | |
| 1181 | +module.exports = $export; | |
| 1182 | + | |
| 1183 | + | |
| 1184 | +/***/ }), | |
| 1185 | +/* 39 */ | |
| 1186 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1187 | + | |
| 1188 | +var global = __webpack_require__(18); | |
| 1189 | +var hide = __webpack_require__(30); | |
| 1190 | +var has = __webpack_require__(64); | |
| 1191 | +var SRC = __webpack_require__(77)('src'); | |
| 1192 | +var $toString = __webpack_require__(147); | |
| 1193 | +var TO_STRING = 'toString'; | |
| 1194 | +var TPL = ('' + $toString).split(TO_STRING); | |
| 1195 | + | |
| 1196 | +__webpack_require__(58).inspectSource = function (it) { | |
| 1197 | + return $toString.call(it); | |
| 1198 | +}; | |
| 1199 | + | |
| 1200 | +(module.exports = function (O, key, val, safe) { | |
| 1201 | + var isFunction = typeof val == 'function'; | |
| 1202 | + if (isFunction) has(val, 'name') || hide(val, 'name', key); | |
| 1203 | + if (O[key] === val) return; | |
| 1204 | + if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key))); | |
| 1205 | + if (O === global) { | |
| 1206 | + O[key] = val; | |
| 1207 | + } else if (!safe) { | |
| 1208 | + delete O[key]; | |
| 1209 | + hide(O, key, val); | |
| 1210 | + } else if (O[key]) { | |
| 1211 | + O[key] = val; | |
| 1212 | + } else { | |
| 1213 | + hide(O, key, val); | |
| 1214 | + } | |
| 1215 | +// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative | |
| 1216 | +})(Function.prototype, TO_STRING, function toString() { | |
| 1217 | + return typeof this == 'function' && this[SRC] || $toString.call(this); | |
| 1218 | +}); | |
| 1219 | + | |
| 1220 | + | |
| 1221 | +/***/ }), | |
| 1222 | +/* 40 */ | |
| 1223 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1224 | + | |
| 1225 | +var dP = __webpack_require__(51).f; | |
| 1226 | +var FProto = Function.prototype; | |
| 1227 | +var nameRE = /^\s*function ([^ (]*)/; | |
| 1228 | +var NAME = 'name'; | |
| 1229 | + | |
| 1230 | +// 19.2.4.2 name | |
| 1231 | +NAME in FProto || __webpack_require__(28) && dP(FProto, NAME, { | |
| 1232 | + configurable: true, | |
| 1233 | + get: function () { | |
| 1234 | + try { | |
| 1235 | + return ('' + this).match(nameRE)[1]; | |
| 1236 | + } catch (e) { | |
| 1237 | + return ''; | |
| 1238 | + } | |
| 1239 | + } | |
| 1240 | +}); | |
| 1241 | + | |
| 1242 | + | |
| 1243 | +/***/ }), | |
| 1244 | +/* 41 */, | |
| 1245 | +/* 42 */ | |
| 1246 | +/***/ (function(module, exports) { | |
| 1247 | + | |
| 1248 | +module.exports = function (bitmap, value) { | |
| 1249 | + return { | |
| 1250 | + enumerable: !(bitmap & 1), | |
| 1251 | + configurable: !(bitmap & 2), | |
| 1252 | + writable: !(bitmap & 4), | |
| 1253 | + value: value | |
| 1254 | + }; | |
| 1255 | +}; | |
| 1256 | + | |
| 1257 | + | |
| 1258 | +/***/ }), | |
| 1259 | +/* 43 */ | |
| 1260 | +/***/ (function(module, exports) { | |
| 1261 | + | |
| 1262 | +// 7.2.1 RequireObjectCoercible(argument) | |
| 1263 | +module.exports = function (it) { | |
| 1264 | + if (it == undefined) throw TypeError("Can't call method on " + it); | |
| 1265 | + return it; | |
| 1266 | +}; | |
| 1267 | + | |
| 1268 | + | |
| 1269 | +/***/ }), | |
| 1270 | +/* 44 */ | |
| 1271 | +/***/ (function(module, exports) { | |
| 1272 | + | |
| 1273 | +module.exports = true; | |
| 1274 | + | |
| 1275 | + | |
| 1276 | +/***/ }), | |
| 1277 | +/* 45 */ | |
| 1278 | +/***/ (function(module, exports) { | |
| 1279 | + | |
| 1280 | +function _assertThisInitialized(self) { | |
| 1281 | + if (self === void 0) { | |
| 1282 | + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
| 1283 | + } | |
| 1284 | + | |
| 1285 | + return self; | |
| 1286 | +} | |
| 1287 | + | |
| 1288 | +module.exports = _assertThisInitialized; | |
| 1289 | + | |
| 1290 | +/***/ }), | |
| 1291 | +/* 46 */ | |
| 1292 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1293 | + | |
| 1294 | +// 7.1.15 ToLength | |
| 1295 | +var toInteger = __webpack_require__(60); | |
| 1296 | +var min = Math.min; | |
| 1297 | +module.exports = function (it) { | |
| 1298 | + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 | |
| 1299 | +}; | |
| 1300 | + | |
| 1301 | + | |
| 1302 | +/***/ }), | |
| 1303 | +/* 47 */ | |
| 1304 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1305 | + | |
| 1306 | +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) | |
| 1307 | +var anObject = __webpack_require__(11); | |
| 1308 | +var dPs = __webpack_require__(131); | |
| 1309 | +var enumBugKeys = __webpack_require__(74); | |
| 1310 | +var IE_PROTO = __webpack_require__(70)('IE_PROTO'); | |
| 1311 | +var Empty = function () { /* empty */ }; | |
| 1312 | +var PROTOTYPE = 'prototype'; | |
| 1313 | + | |
| 1314 | +// Create object with fake `null` prototype: use iframe Object with cleared prototype | |
| 1315 | +var createDict = function () { | |
| 1316 | + // Thrash, waste and sodomy: IE GC bug | |
| 1317 | + var iframe = __webpack_require__(88)('iframe'); | |
| 1318 | + var i = enumBugKeys.length; | |
| 1319 | + var lt = '<'; | |
| 1320 | + var gt = '>'; | |
| 1321 | + var iframeDocument; | |
| 1322 | + iframe.style.display = 'none'; | |
| 1323 | + __webpack_require__(132).appendChild(iframe); | |
| 1324 | + iframe.src = 'javascript:'; // eslint-disable-line no-script-url | |
| 1325 | + // createDict = iframe.contentWindow.Object; | |
| 1326 | + // html.removeChild(iframe); | |
| 1327 | + iframeDocument = iframe.contentWindow.document; | |
| 1328 | + iframeDocument.open(); | |
| 1329 | + iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); | |
| 1330 | + iframeDocument.close(); | |
| 1331 | + createDict = iframeDocument.F; | |
| 1332 | + while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; | |
| 1333 | + return createDict(); | |
| 1334 | +}; | |
| 1335 | + | |
| 1336 | +module.exports = Object.create || function create(O, Properties) { | |
| 1337 | + var result; | |
| 1338 | + if (O !== null) { | |
| 1339 | + Empty[PROTOTYPE] = anObject(O); | |
| 1340 | + result = new Empty(); | |
| 1341 | + Empty[PROTOTYPE] = null; | |
| 1342 | + // add "__proto__" for Object.getPrototypeOf polyfill | |
| 1343 | + result[IE_PROTO] = O; | |
| 1344 | + } else result = createDict(); | |
| 1345 | + return Properties === undefined ? result : dPs(result, Properties); | |
| 1346 | +}; | |
| 1347 | + | |
| 1348 | + | |
| 1349 | +/***/ }), | |
| 1350 | +/* 48 */ | |
| 1351 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1352 | + | |
| 1353 | +var pIE = __webpack_require__(49); | |
| 1354 | +var createDesc = __webpack_require__(42); | |
| 1355 | +var toIObject = __webpack_require__(19); | |
| 1356 | +var toPrimitive = __webpack_require__(69); | |
| 1357 | +var has = __webpack_require__(17); | |
| 1358 | +var IE8_DOM_DEFINE = __webpack_require__(110); | |
| 1359 | +var gOPD = Object.getOwnPropertyDescriptor; | |
| 1360 | + | |
| 1361 | +exports.f = __webpack_require__(14) ? gOPD : function getOwnPropertyDescriptor(O, P) { | |
| 1362 | + O = toIObject(O); | |
| 1363 | + P = toPrimitive(P, true); | |
| 1364 | + if (IE8_DOM_DEFINE) try { | |
| 1365 | + return gOPD(O, P); | |
| 1366 | + } catch (e) { /* empty */ } | |
| 1367 | + if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]); | |
| 1368 | +}; | |
| 1369 | + | |
| 1370 | + | |
| 1371 | +/***/ }), | |
| 1372 | +/* 49 */ | |
| 1373 | +/***/ (function(module, exports) { | |
| 1374 | + | |
| 1375 | +exports.f = {}.propertyIsEnumerable; | |
| 1376 | + | |
| 1377 | + | |
| 1378 | +/***/ }), | |
| 1379 | +/* 50 */ | |
| 1380 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1381 | + | |
| 1382 | +var _Symbol$iterator = __webpack_require__(148); | |
| 1383 | + | |
| 1384 | +var _Symbol = __webpack_require__(107); | |
| 1385 | + | |
| 1386 | +function _typeof(obj) { | |
| 1387 | + "@babel/helpers - typeof"; | |
| 1388 | + | |
| 1389 | + if (typeof _Symbol === "function" && typeof _Symbol$iterator === "symbol") { | |
| 1390 | + module.exports = _typeof = function _typeof(obj) { | |
| 1391 | + return typeof obj; | |
| 1392 | + }; | |
| 1393 | + } else { | |
| 1394 | + module.exports = _typeof = function _typeof(obj) { | |
| 1395 | + return obj && typeof _Symbol === "function" && obj.constructor === _Symbol && obj !== _Symbol.prototype ? "symbol" : typeof obj; | |
| 1396 | + }; | |
| 1397 | + } | |
| 1398 | + | |
| 1399 | + return _typeof(obj); | |
| 1400 | +} | |
| 1401 | + | |
| 1402 | +module.exports = _typeof; | |
| 1403 | + | |
| 1404 | +/***/ }), | |
| 1405 | +/* 51 */ | |
| 1406 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1407 | + | |
| 1408 | +var anObject = __webpack_require__(20); | |
| 1409 | +var IE8_DOM_DEFINE = __webpack_require__(135); | |
| 1410 | +var toPrimitive = __webpack_require__(127); | |
| 1411 | +var dP = Object.defineProperty; | |
| 1412 | + | |
| 1413 | +exports.f = __webpack_require__(28) ? Object.defineProperty : function defineProperty(O, P, Attributes) { | |
| 1414 | + anObject(O); | |
| 1415 | + P = toPrimitive(P, true); | |
| 1416 | + anObject(Attributes); | |
| 1417 | + if (IE8_DOM_DEFINE) try { | |
| 1418 | + return dP(O, P, Attributes); | |
| 1419 | + } catch (e) { /* empty */ } | |
| 1420 | + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); | |
| 1421 | + if ('value' in Attributes) O[P] = Attributes.value; | |
| 1422 | + return O; | |
| 1423 | +}; | |
| 1424 | + | |
| 1425 | + | |
| 1426 | +/***/ }), | |
| 1427 | +/* 52 */ | |
| 1428 | +/***/ (function(module, exports) { | |
| 1429 | + | |
| 1430 | +var toString = {}.toString; | |
| 1431 | + | |
| 1432 | +module.exports = function (it) { | |
| 1433 | + return toString.call(it).slice(8, -1); | |
| 1434 | +}; | |
| 1435 | + | |
| 1436 | + | |
| 1437 | +/***/ }), | |
| 1438 | +/* 53 */ | |
| 1439 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1440 | + | |
| 1441 | +var def = __webpack_require__(15).f; | |
| 1442 | +var has = __webpack_require__(17); | |
| 1443 | +var TAG = __webpack_require__(10)('toStringTag'); | |
| 1444 | + | |
| 1445 | +module.exports = function (it, tag, stat) { | |
| 1446 | + if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); | |
| 1447 | +}; | |
| 1448 | + | |
| 1449 | + | |
| 1450 | +/***/ }), | |
| 1451 | +/* 54 */ | |
| 1452 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1453 | + | |
| 1454 | +module.exports = __webpack_require__(229); | |
| 1455 | + | |
| 1456 | +/***/ }), | |
| 1457 | +/* 55 */ | |
| 1458 | +/***/ (function(module, exports) { | |
| 1459 | + | |
| 1460 | +var id = 0; | |
| 1461 | +var px = Math.random(); | |
| 1462 | +module.exports = function (key) { | |
| 1463 | + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); | |
| 1464 | +}; | |
| 1465 | + | |
| 1466 | + | |
| 1467 | +/***/ }), | |
| 1468 | +/* 56 */ | |
| 1469 | +/***/ (function(module, exports) { | |
| 1470 | + | |
| 1471 | +var toString = {}.toString; | |
| 1472 | + | |
| 1473 | +module.exports = function (it) { | |
| 1474 | + return toString.call(it).slice(8, -1); | |
| 1475 | +}; | |
| 1476 | + | |
| 1477 | + | |
| 1478 | +/***/ }), | |
| 1479 | +/* 57 */ | |
| 1480 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1481 | + | |
| 79 | 1482 | "use strict"; |
| 80 | 1483 | |
| 1484 | +var $at = __webpack_require__(169)(true); | |
| 81 | 1485 | |
| 82 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 83 | -Object.defineProperty(exports, "__esModule", ({ | |
| 84 | - value: true | |
| 85 | -})); | |
| 86 | -exports["default"] = void 0; | |
| 87 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 88 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 89 | -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 90 | -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 91 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 92 | -var _commandContainerBase = _interopRequireDefault(__webpack_require__(/*! ./command-container-base */ "../assets/dev/js/editor/command-bases/command-container-base.js")); | |
| 93 | -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)); } | |
| 94 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 1486 | +// 21.1.3.27 String.prototype[@@iterator]() | |
| 1487 | +__webpack_require__(96)(String, 'String', function (iterated) { | |
| 1488 | + this._t = String(iterated); // target | |
| 1489 | + this._i = 0; // next index | |
| 1490 | +// 21.1.5.2.1 %StringIteratorPrototype%.next() | |
| 1491 | +}, function () { | |
| 1492 | + var O = this._t; | |
| 1493 | + var index = this._i; | |
| 1494 | + var point; | |
| 1495 | + if (index >= O.length) return { value: undefined, done: true }; | |
| 1496 | + point = $at(O, index); | |
| 1497 | + this._i += point.length; | |
| 1498 | + return { value: point, done: false }; | |
| 1499 | +}); | |
| 1500 | + | |
| 1501 | + | |
| 1502 | +/***/ }), | |
| 1503 | +/* 58 */ | |
| 1504 | +/***/ (function(module, exports) { | |
| 1505 | + | |
| 1506 | +var core = module.exports = { version: '2.6.11' }; | |
| 1507 | +if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef | |
| 1508 | + | |
| 1509 | + | |
| 1510 | +/***/ }), | |
| 1511 | +/* 59 */ | |
| 1512 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1513 | + | |
| 1514 | +__webpack_require__(171); | |
| 1515 | +var global = __webpack_require__(8); | |
| 1516 | +var hide = __webpack_require__(22); | |
| 1517 | +var Iterators = __webpack_require__(33); | |
| 1518 | +var TO_STRING_TAG = __webpack_require__(10)('toStringTag'); | |
| 1519 | + | |
| 1520 | +var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' + | |
| 1521 | + 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' + | |
| 1522 | + 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' + | |
| 1523 | + 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' + | |
| 1524 | + 'TextTrackList,TouchList').split(','); | |
| 1525 | + | |
| 1526 | +for (var i = 0; i < DOMIterables.length; i++) { | |
| 1527 | + var NAME = DOMIterables[i]; | |
| 1528 | + var Collection = global[NAME]; | |
| 1529 | + var proto = Collection && Collection.prototype; | |
| 1530 | + if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); | |
| 1531 | + Iterators[NAME] = Iterators.Array; | |
| 1532 | +} | |
| 1533 | + | |
| 1534 | + | |
| 1535 | +/***/ }), | |
| 1536 | +/* 60 */ | |
| 1537 | +/***/ (function(module, exports) { | |
| 1538 | + | |
| 1539 | +// 7.1.4 ToInteger | |
| 1540 | +var ceil = Math.ceil; | |
| 1541 | +var floor = Math.floor; | |
| 1542 | +module.exports = function (it) { | |
| 1543 | + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); | |
| 1544 | +}; | |
| 1545 | + | |
| 1546 | + | |
| 1547 | +/***/ }), | |
| 1548 | +/* 61 */ | |
| 1549 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1550 | + | |
| 1551 | +"use strict"; | |
| 1552 | + | |
| 1553 | + | |
| 1554 | +var anObject = __webpack_require__(20); | |
| 1555 | +var toObject = __webpack_require__(102); | |
| 1556 | +var toLength = __webpack_require__(46); | |
| 1557 | +var toInteger = __webpack_require__(60); | |
| 1558 | +var advanceStringIndex = __webpack_require__(108); | |
| 1559 | +var regExpExec = __webpack_require__(100); | |
| 1560 | +var max = Math.max; | |
| 1561 | +var min = Math.min; | |
| 1562 | +var floor = Math.floor; | |
| 1563 | +var SUBSTITUTION_SYMBOLS = /\$([$&`']|\d\d?|<[^>]*>)/g; | |
| 1564 | +var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&`']|\d\d?)/g; | |
| 1565 | + | |
| 1566 | +var maybeToString = function (it) { | |
| 1567 | + return it === undefined ? it : String(it); | |
| 1568 | +}; | |
| 1569 | + | |
| 1570 | +// @@replace logic | |
| 1571 | +__webpack_require__(101)('replace', 2, function (defined, REPLACE, $replace, maybeCallNative) { | |
| 1572 | + return [ | |
| 1573 | + // `String.prototype.replace` method | |
| 1574 | + // https://tc39.github.io/ecma262/#sec-string.prototype.replace | |
| 1575 | + function replace(searchValue, replaceValue) { | |
| 1576 | + var O = defined(this); | |
| 1577 | + var fn = searchValue == undefined ? undefined : searchValue[REPLACE]; | |
| 1578 | + return fn !== undefined | |
| 1579 | + ? fn.call(searchValue, O, replaceValue) | |
| 1580 | + : $replace.call(String(O), searchValue, replaceValue); | |
| 1581 | + }, | |
| 1582 | + // `RegExp.prototype[@@replace]` method | |
| 1583 | + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace | |
| 1584 | + function (regexp, replaceValue) { | |
| 1585 | + var res = maybeCallNative($replace, regexp, this, replaceValue); | |
| 1586 | + if (res.done) return res.value; | |
| 1587 | + | |
| 1588 | + var rx = anObject(regexp); | |
| 1589 | + var S = String(this); | |
| 1590 | + var functionalReplace = typeof replaceValue === 'function'; | |
| 1591 | + if (!functionalReplace) replaceValue = String(replaceValue); | |
| 1592 | + var global = rx.global; | |
| 1593 | + if (global) { | |
| 1594 | + var fullUnicode = rx.unicode; | |
| 1595 | + rx.lastIndex = 0; | |
| 1596 | + } | |
| 1597 | + var results = []; | |
| 1598 | + while (true) { | |
| 1599 | + var result = regExpExec(rx, S); | |
| 1600 | + if (result === null) break; | |
| 1601 | + results.push(result); | |
| 1602 | + if (!global) break; | |
| 1603 | + var matchStr = String(result[0]); | |
| 1604 | + if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); | |
| 1605 | + } | |
| 1606 | + var accumulatedResult = ''; | |
| 1607 | + var nextSourcePosition = 0; | |
| 1608 | + for (var i = 0; i < results.length; i++) { | |
| 1609 | + result = results[i]; | |
| 1610 | + var matched = String(result[0]); | |
| 1611 | + var position = max(min(toInteger(result.index), S.length), 0); | |
| 1612 | + var captures = []; | |
| 1613 | + // NOTE: This is equivalent to | |
| 1614 | + // captures = result.slice(1).map(maybeToString) | |
| 1615 | + // but for some reason `nativeSlice.call(result, 1, result.length)` (called in | |
| 1616 | + // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and | |
| 1617 | + // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it. | |
| 1618 | + for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j])); | |
| 1619 | + var namedCaptures = result.groups; | |
| 1620 | + if (functionalReplace) { | |
| 1621 | + var replacerArgs = [matched].concat(captures, position, S); | |
| 1622 | + if (namedCaptures !== undefined) replacerArgs.push(namedCaptures); | |
| 1623 | + var replacement = String(replaceValue.apply(undefined, replacerArgs)); | |
| 1624 | + } else { | |
| 1625 | + replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue); | |
| 1626 | + } | |
| 1627 | + if (position >= nextSourcePosition) { | |
| 1628 | + accumulatedResult += S.slice(nextSourcePosition, position) + replacement; | |
| 1629 | + nextSourcePosition = position + matched.length; | |
| 1630 | + } | |
| 1631 | + } | |
| 1632 | + return accumulatedResult + S.slice(nextSourcePosition); | |
| 1633 | + } | |
| 1634 | + ]; | |
| 1635 | + | |
| 1636 | + // https://tc39.github.io/ecma262/#sec-getsubstitution | |
| 1637 | + function getSubstitution(matched, str, position, captures, namedCaptures, replacement) { | |
| 1638 | + var tailPos = position + matched.length; | |
| 1639 | + var m = captures.length; | |
| 1640 | + var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED; | |
| 1641 | + if (namedCaptures !== undefined) { | |
| 1642 | + namedCaptures = toObject(namedCaptures); | |
| 1643 | + symbols = SUBSTITUTION_SYMBOLS; | |
| 1644 | + } | |
| 1645 | + return $replace.call(replacement, symbols, function (match, ch) { | |
| 1646 | + var capture; | |
| 1647 | + switch (ch.charAt(0)) { | |
| 1648 | + case '$': return '$'; | |
| 1649 | + case '&': return matched; | |
| 1650 | + case '`': return str.slice(0, position); | |
| 1651 | + case "'": return str.slice(tailPos); | |
| 1652 | + case '<': | |
| 1653 | + capture = namedCaptures[ch.slice(1, -1)]; | |
| 1654 | + break; | |
| 1655 | + default: // \d\d? | |
| 1656 | + var n = +ch; | |
| 1657 | + if (n === 0) return match; | |
| 1658 | + if (n > m) { | |
| 1659 | + var f = floor(n / 10); | |
| 1660 | + if (f === 0) return match; | |
| 1661 | + if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1); | |
| 1662 | + return match; | |
| 1663 | + } | |
| 1664 | + capture = captures[n - 1]; | |
| 1665 | + } | |
| 1666 | + return capture === undefined ? '' : capture; | |
| 1667 | + }); | |
| 1668 | + } | |
| 1669 | +}); | |
| 1670 | + | |
| 1671 | + | |
| 1672 | +/***/ }), | |
| 1673 | +/* 62 */ | |
| 1674 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1675 | + | |
| 1676 | +exports.f = __webpack_require__(10); | |
| 1677 | + | |
| 1678 | + | |
| 1679 | +/***/ }), | |
| 1680 | +/* 63 */ | |
| 1681 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1682 | + | |
| 1683 | +// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) | |
| 1684 | +var has = __webpack_require__(17); | |
| 1685 | +var toObject = __webpack_require__(32); | |
| 1686 | +var IE_PROTO = __webpack_require__(70)('IE_PROTO'); | |
| 1687 | +var ObjectProto = Object.prototype; | |
| 1688 | + | |
| 1689 | +module.exports = Object.getPrototypeOf || function (O) { | |
| 1690 | + O = toObject(O); | |
| 1691 | + if (has(O, IE_PROTO)) return O[IE_PROTO]; | |
| 1692 | + if (typeof O.constructor == 'function' && O instanceof O.constructor) { | |
| 1693 | + return O.constructor.prototype; | |
| 1694 | + } return O instanceof Object ? ObjectProto : null; | |
| 1695 | +}; | |
| 1696 | + | |
| 1697 | + | |
| 1698 | +/***/ }), | |
| 1699 | +/* 64 */ | |
| 1700 | +/***/ (function(module, exports) { | |
| 1701 | + | |
| 1702 | +var hasOwnProperty = {}.hasOwnProperty; | |
| 1703 | +module.exports = function (it, key) { | |
| 1704 | + return hasOwnProperty.call(it, key); | |
| 1705 | +}; | |
| 1706 | + | |
| 1707 | + | |
| 1708 | +/***/ }), | |
| 1709 | +/* 65 */ | |
| 1710 | +/***/ (function(module, exports) { | |
| 1711 | + | |
| 1712 | +// 7.2.1 RequireObjectCoercible(argument) | |
| 1713 | +module.exports = function (it) { | |
| 1714 | + if (it == undefined) throw TypeError("Can't call method on " + it); | |
| 1715 | + return it; | |
| 1716 | +}; | |
| 1717 | + | |
| 1718 | + | |
| 1719 | +/***/ }), | |
| 1720 | +/* 66 */ | |
| 1721 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1722 | + | |
| 1723 | +var META = __webpack_require__(55)('meta'); | |
| 1724 | +var isObject = __webpack_require__(9); | |
| 1725 | +var has = __webpack_require__(17); | |
| 1726 | +var setDesc = __webpack_require__(15).f; | |
| 1727 | +var id = 0; | |
| 1728 | +var isExtensible = Object.isExtensible || function () { | |
| 1729 | + return true; | |
| 1730 | +}; | |
| 1731 | +var FREEZE = !__webpack_require__(21)(function () { | |
| 1732 | + return isExtensible(Object.preventExtensions({})); | |
| 1733 | +}); | |
| 1734 | +var setMeta = function (it) { | |
| 1735 | + setDesc(it, META, { value: { | |
| 1736 | + i: 'O' + ++id, // object ID | |
| 1737 | + w: {} // weak collections IDs | |
| 1738 | + } }); | |
| 1739 | +}; | |
| 1740 | +var fastKey = function (it, create) { | |
| 1741 | + // return primitive with prefix | |
| 1742 | + if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; | |
| 1743 | + if (!has(it, META)) { | |
| 1744 | + // can't set metadata to uncaught frozen object | |
| 1745 | + if (!isExtensible(it)) return 'F'; | |
| 1746 | + // not necessary to add metadata | |
| 1747 | + if (!create) return 'E'; | |
| 1748 | + // add missing metadata | |
| 1749 | + setMeta(it); | |
| 1750 | + // return object ID | |
| 1751 | + } return it[META].i; | |
| 1752 | +}; | |
| 1753 | +var getWeak = function (it, create) { | |
| 1754 | + if (!has(it, META)) { | |
| 1755 | + // can't set metadata to uncaught frozen object | |
| 1756 | + if (!isExtensible(it)) return true; | |
| 1757 | + // not necessary to add metadata | |
| 1758 | + if (!create) return false; | |
| 1759 | + // add missing metadata | |
| 1760 | + setMeta(it); | |
| 1761 | + // return hash weak collections IDs | |
| 1762 | + } return it[META].w; | |
| 1763 | +}; | |
| 1764 | +// add metadata on freeze-family methods calling | |
| 1765 | +var onFreeze = function (it) { | |
| 1766 | + if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it); | |
| 1767 | + return it; | |
| 1768 | +}; | |
| 1769 | +var meta = module.exports = { | |
| 1770 | + KEY: META, | |
| 1771 | + NEED: false, | |
| 1772 | + fastKey: fastKey, | |
| 1773 | + getWeak: getWeak, | |
| 1774 | + onFreeze: onFreeze | |
| 1775 | +}; | |
| 1776 | + | |
| 1777 | + | |
| 1778 | +/***/ }), | |
| 1779 | +/* 67 */ | |
| 1780 | +/***/ (function(module, exports) { | |
| 1781 | + | |
| 1782 | +exports.f = Object.getOwnPropertySymbols; | |
| 1783 | + | |
| 1784 | + | |
| 1785 | +/***/ }), | |
| 1786 | +/* 68 */ | |
| 1787 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1788 | + | |
| 95 | 1789 | /** |
| 96 | - * @name $e.modules.editor.CommandContainerInternalBase | |
| 1790 | + * Copyright (c) 2014-present, Facebook, Inc. | |
| 1791 | + * | |
| 1792 | + * This source code is licensed under the MIT license found in the | |
| 1793 | + * LICENSE file in the root directory of this source tree. | |
| 97 | 1794 | */ |
| 98 | -var CommandContainerInternalBase = exports["default"] = /*#__PURE__*/function (_CommandContainerBase) { | |
| 99 | - function CommandContainerInternalBase(args) { | |
| 100 | - (0, _classCallCheck2.default)(this, CommandContainerInternalBase); | |
| 101 | - return _callSuper(this, CommandContainerInternalBase, [args, $e.commandsInternal]); | |
| 1795 | + | |
| 1796 | +var runtime = (function (exports) { | |
| 1797 | + "use strict"; | |
| 1798 | + | |
| 1799 | + var Op = Object.prototype; | |
| 1800 | + var hasOwn = Op.hasOwnProperty; | |
| 1801 | + var undefined; // More compressible than void 0. | |
| 1802 | + var $Symbol = typeof Symbol === "function" ? Symbol : {}; | |
| 1803 | + var iteratorSymbol = $Symbol.iterator || "@@iterator"; | |
| 1804 | + var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator"; | |
| 1805 | + var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; | |
| 1806 | + | |
| 1807 | + function define(obj, key, value) { | |
| 1808 | + Object.defineProperty(obj, key, { | |
| 1809 | + value: value, | |
| 1810 | + enumerable: true, | |
| 1811 | + configurable: true, | |
| 1812 | + writable: true | |
| 1813 | + }); | |
| 1814 | + return obj[key]; | |
| 102 | 1815 | } |
| 103 | - (0, _inherits2.default)(CommandContainerInternalBase, _CommandContainerBase); | |
| 104 | - return (0, _createClass2.default)(CommandContainerInternalBase, null, [{ | |
| 105 | - key: "getInstanceType", | |
| 106 | - value: function getInstanceType() { | |
| 107 | - return 'CommandContainerInternalBase'; | |
| 1816 | + try { | |
| 1817 | + // IE 8 has a broken Object.defineProperty that only works on DOM objects. | |
| 1818 | + define({}, ""); | |
| 1819 | + } catch (err) { | |
| 1820 | + define = function(obj, key, value) { | |
| 1821 | + return obj[key] = value; | |
| 1822 | + }; | |
| 1823 | + } | |
| 1824 | + | |
| 1825 | + function wrap(innerFn, outerFn, self, tryLocsList) { | |
| 1826 | + // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator. | |
| 1827 | + var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; | |
| 1828 | + var generator = Object.create(protoGenerator.prototype); | |
| 1829 | + var context = new Context(tryLocsList || []); | |
| 1830 | + | |
| 1831 | + // The ._invoke method unifies the implementations of the .next, | |
| 1832 | + // .throw, and .return methods. | |
| 1833 | + generator._invoke = makeInvokeMethod(innerFn, self, context); | |
| 1834 | + | |
| 1835 | + return generator; | |
| 1836 | + } | |
| 1837 | + exports.wrap = wrap; | |
| 1838 | + | |
| 1839 | + // Try/catch helper to minimize deoptimizations. Returns a completion | |
| 1840 | + // record like context.tryEntries[i].completion. This interface could | |
| 1841 | + // have been (and was previously) designed to take a closure to be | |
| 1842 | + // invoked without arguments, but in all the cases we care about we | |
| 1843 | + // already have an existing method we want to call, so there's no need | |
| 1844 | + // to create a new function object. We can even get away with assuming | |
| 1845 | + // the method takes exactly one argument, since that happens to be true | |
| 1846 | + // in every case, so we don't have to touch the arguments object. The | |
| 1847 | + // only additional allocation required is the completion record, which | |
| 1848 | + // has a stable shape and so hopefully should be cheap to allocate. | |
| 1849 | + function tryCatch(fn, obj, arg) { | |
| 1850 | + try { | |
| 1851 | + return { type: "normal", arg: fn.call(obj, arg) }; | |
| 1852 | + } catch (err) { | |
| 1853 | + return { type: "throw", arg: err }; | |
| 108 | 1854 | } |
| 109 | - }]); | |
| 110 | -}(_commandContainerBase.default); | |
| 1855 | + } | |
| 111 | 1856 | |
| 1857 | + var GenStateSuspendedStart = "suspendedStart"; | |
| 1858 | + var GenStateSuspendedYield = "suspendedYield"; | |
| 1859 | + var GenStateExecuting = "executing"; | |
| 1860 | + var GenStateCompleted = "completed"; | |
| 1861 | + | |
| 1862 | + // Returning this object from the innerFn has the same effect as | |
| 1863 | + // breaking out of the dispatch switch statement. | |
| 1864 | + var ContinueSentinel = {}; | |
| 1865 | + | |
| 1866 | + // Dummy constructor functions that we use as the .constructor and | |
| 1867 | + // .constructor.prototype properties for functions that return Generator | |
| 1868 | + // objects. For full spec compliance, you may wish to configure your | |
| 1869 | + // minifier not to mangle the names of these two functions. | |
| 1870 | + function Generator() {} | |
| 1871 | + function GeneratorFunction() {} | |
| 1872 | + function GeneratorFunctionPrototype() {} | |
| 1873 | + | |
| 1874 | + // This is a polyfill for %IteratorPrototype% for environments that | |
| 1875 | + // don't natively support it. | |
| 1876 | + var IteratorPrototype = {}; | |
| 1877 | + IteratorPrototype[iteratorSymbol] = function () { | |
| 1878 | + return this; | |
| 1879 | + }; | |
| 1880 | + | |
| 1881 | + var getProto = Object.getPrototypeOf; | |
| 1882 | + var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); | |
| 1883 | + if (NativeIteratorPrototype && | |
| 1884 | + NativeIteratorPrototype !== Op && | |
| 1885 | + hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) { | |
| 1886 | + // This environment has a native %IteratorPrototype%; use it instead | |
| 1887 | + // of the polyfill. | |
| 1888 | + IteratorPrototype = NativeIteratorPrototype; | |
| 1889 | + } | |
| 1890 | + | |
| 1891 | + var Gp = GeneratorFunctionPrototype.prototype = | |
| 1892 | + Generator.prototype = Object.create(IteratorPrototype); | |
| 1893 | + GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; | |
| 1894 | + GeneratorFunctionPrototype.constructor = GeneratorFunction; | |
| 1895 | + GeneratorFunction.displayName = define( | |
| 1896 | + GeneratorFunctionPrototype, | |
| 1897 | + toStringTagSymbol, | |
| 1898 | + "GeneratorFunction" | |
| 1899 | + ); | |
| 1900 | + | |
| 1901 | + // Helper for defining the .next, .throw, and .return methods of the | |
| 1902 | + // Iterator interface in terms of a single ._invoke method. | |
| 1903 | + function defineIteratorMethods(prototype) { | |
| 1904 | + ["next", "throw", "return"].forEach(function(method) { | |
| 1905 | + define(prototype, method, function(arg) { | |
| 1906 | + return this._invoke(method, arg); | |
| 1907 | + }); | |
| 1908 | + }); | |
| 1909 | + } | |
| 1910 | + | |
| 1911 | + exports.isGeneratorFunction = function(genFun) { | |
| 1912 | + var ctor = typeof genFun === "function" && genFun.constructor; | |
| 1913 | + return ctor | |
| 1914 | + ? ctor === GeneratorFunction || | |
| 1915 | + // For the native GeneratorFunction constructor, the best we can | |
| 1916 | + // do is to check its .name property. | |
| 1917 | + (ctor.displayName || ctor.name) === "GeneratorFunction" | |
| 1918 | + : false; | |
| 1919 | + }; | |
| 1920 | + | |
| 1921 | + exports.mark = function(genFun) { | |
| 1922 | + if (Object.setPrototypeOf) { | |
| 1923 | + Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); | |
| 1924 | + } else { | |
| 1925 | + genFun.__proto__ = GeneratorFunctionPrototype; | |
| 1926 | + define(genFun, toStringTagSymbol, "GeneratorFunction"); | |
| 1927 | + } | |
| 1928 | + genFun.prototype = Object.create(Gp); | |
| 1929 | + return genFun; | |
| 1930 | + }; | |
| 1931 | + | |
| 1932 | + // Within the body of any async function, `await x` is transformed to | |
| 1933 | + // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test | |
| 1934 | + // `hasOwn.call(value, "__await")` to determine if the yielded value is | |
| 1935 | + // meant to be awaited. | |
| 1936 | + exports.awrap = function(arg) { | |
| 1937 | + return { __await: arg }; | |
| 1938 | + }; | |
| 1939 | + | |
| 1940 | + function AsyncIterator(generator, PromiseImpl) { | |
| 1941 | + function invoke(method, arg, resolve, reject) { | |
| 1942 | + var record = tryCatch(generator[method], generator, arg); | |
| 1943 | + if (record.type === "throw") { | |
| 1944 | + reject(record.arg); | |
| 1945 | + } else { | |
| 1946 | + var result = record.arg; | |
| 1947 | + var value = result.value; | |
| 1948 | + if (value && | |
| 1949 | + typeof value === "object" && | |
| 1950 | + hasOwn.call(value, "__await")) { | |
| 1951 | + return PromiseImpl.resolve(value.__await).then(function(value) { | |
| 1952 | + invoke("next", value, resolve, reject); | |
| 1953 | + }, function(err) { | |
| 1954 | + invoke("throw", err, resolve, reject); | |
| 1955 | + }); | |
| 1956 | + } | |
| 1957 | + | |
| 1958 | + return PromiseImpl.resolve(value).then(function(unwrapped) { | |
| 1959 | + // When a yielded Promise is resolved, its final value becomes | |
| 1960 | + // the .value of the Promise<{value,done}> result for the | |
| 1961 | + // current iteration. | |
| 1962 | + result.value = unwrapped; | |
| 1963 | + resolve(result); | |
| 1964 | + }, function(error) { | |
| 1965 | + // If a rejected Promise was yielded, throw the rejection back | |
| 1966 | + // into the async generator function so it can be handled there. | |
| 1967 | + return invoke("throw", error, resolve, reject); | |
| 1968 | + }); | |
| 1969 | + } | |
| 1970 | + } | |
| 1971 | + | |
| 1972 | + var previousPromise; | |
| 1973 | + | |
| 1974 | + function enqueue(method, arg) { | |
| 1975 | + function callInvokeWithMethodAndArg() { | |
| 1976 | + return new PromiseImpl(function(resolve, reject) { | |
| 1977 | + invoke(method, arg, resolve, reject); | |
| 1978 | + }); | |
| 1979 | + } | |
| 1980 | + | |
| 1981 | + return previousPromise = | |
| 1982 | + // If enqueue has been called before, then we want to wait until | |
| 1983 | + // all previous Promises have been resolved before calling invoke, | |
| 1984 | + // so that results are always delivered in the correct order. If | |
| 1985 | + // enqueue has not been called before, then it is important to | |
| 1986 | + // call invoke immediately, without waiting on a callback to fire, | |
| 1987 | + // so that the async generator function has the opportunity to do | |
| 1988 | + // any necessary setup in a predictable way. This predictability | |
| 1989 | + // is why the Promise constructor synchronously invokes its | |
| 1990 | + // executor callback, and why async functions synchronously | |
| 1991 | + // execute code before the first await. Since we implement simple | |
| 1992 | + // async functions in terms of async generators, it is especially | |
| 1993 | + // important to get this right, even though it requires care. | |
| 1994 | + previousPromise ? previousPromise.then( | |
| 1995 | + callInvokeWithMethodAndArg, | |
| 1996 | + // Avoid propagating failures to Promises returned by later | |
| 1997 | + // invocations of the iterator. | |
| 1998 | + callInvokeWithMethodAndArg | |
| 1999 | + ) : callInvokeWithMethodAndArg(); | |
| 2000 | + } | |
| 2001 | + | |
| 2002 | + // Define the unified helper method that is used to implement .next, | |
| 2003 | + // .throw, and .return (see defineIteratorMethods). | |
| 2004 | + this._invoke = enqueue; | |
| 2005 | + } | |
| 2006 | + | |
| 2007 | + defineIteratorMethods(AsyncIterator.prototype); | |
| 2008 | + AsyncIterator.prototype[asyncIteratorSymbol] = function () { | |
| 2009 | + return this; | |
| 2010 | + }; | |
| 2011 | + exports.AsyncIterator = AsyncIterator; | |
| 2012 | + | |
| 2013 | + // Note that simple async functions are implemented on top of | |
| 2014 | + // AsyncIterator objects; they just return a Promise for the value of | |
| 2015 | + // the final result produced by the iterator. | |
| 2016 | + exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) { | |
| 2017 | + if (PromiseImpl === void 0) PromiseImpl = Promise; | |
| 2018 | + | |
| 2019 | + var iter = new AsyncIterator( | |
| 2020 | + wrap(innerFn, outerFn, self, tryLocsList), | |
| 2021 | + PromiseImpl | |
| 2022 | + ); | |
| 2023 | + | |
| 2024 | + return exports.isGeneratorFunction(outerFn) | |
| 2025 | + ? iter // If outerFn is a generator, return the full iterator. | |
| 2026 | + : iter.next().then(function(result) { | |
| 2027 | + return result.done ? result.value : iter.next(); | |
| 2028 | + }); | |
| 2029 | + }; | |
| 2030 | + | |
| 2031 | + function makeInvokeMethod(innerFn, self, context) { | |
| 2032 | + var state = GenStateSuspendedStart; | |
| 2033 | + | |
| 2034 | + return function invoke(method, arg) { | |
| 2035 | + if (state === GenStateExecuting) { | |
| 2036 | + throw new Error("Generator is already running"); | |
| 2037 | + } | |
| 2038 | + | |
| 2039 | + if (state === GenStateCompleted) { | |
| 2040 | + if (method === "throw") { | |
| 2041 | + throw arg; | |
| 2042 | + } | |
| 2043 | + | |
| 2044 | + // Be forgiving, per 25.3.3.3.3 of the spec: | |
| 2045 | + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume | |
| 2046 | + return doneResult(); | |
| 2047 | + } | |
| 2048 | + | |
| 2049 | + context.method = method; | |
| 2050 | + context.arg = arg; | |
| 2051 | + | |
| 2052 | + while (true) { | |
| 2053 | + var delegate = context.delegate; | |
| 2054 | + if (delegate) { | |
| 2055 | + var delegateResult = maybeInvokeDelegate(delegate, context); | |
| 2056 | + if (delegateResult) { | |
| 2057 | + if (delegateResult === ContinueSentinel) continue; | |
| 2058 | + return delegateResult; | |
| 2059 | + } | |
| 2060 | + } | |
| 2061 | + | |
| 2062 | + if (context.method === "next") { | |
| 2063 | + // Setting context._sent for legacy support of Babel's | |
| 2064 | + // function.sent implementation. | |
| 2065 | + context.sent = context._sent = context.arg; | |
| 2066 | + | |
| 2067 | + } else if (context.method === "throw") { | |
| 2068 | + if (state === GenStateSuspendedStart) { | |
| 2069 | + state = GenStateCompleted; | |
| 2070 | + throw context.arg; | |
| 2071 | + } | |
| 2072 | + | |
| 2073 | + context.dispatchException(context.arg); | |
| 2074 | + | |
| 2075 | + } else if (context.method === "return") { | |
| 2076 | + context.abrupt("return", context.arg); | |
| 2077 | + } | |
| 2078 | + | |
| 2079 | + state = GenStateExecuting; | |
| 2080 | + | |
| 2081 | + var record = tryCatch(innerFn, self, context); | |
| 2082 | + if (record.type === "normal") { | |
| 2083 | + // If an exception is thrown from innerFn, we leave state === | |
| 2084 | + // GenStateExecuting and loop back for another invocation. | |
| 2085 | + state = context.done | |
| 2086 | + ? GenStateCompleted | |
| 2087 | + : GenStateSuspendedYield; | |
| 2088 | + | |
| 2089 | + if (record.arg === ContinueSentinel) { | |
| 2090 | + continue; | |
| 2091 | + } | |
| 2092 | + | |
| 2093 | + return { | |
| 2094 | + value: record.arg, | |
| 2095 | + done: context.done | |
| 2096 | + }; | |
| 2097 | + | |
| 2098 | + } else if (record.type === "throw") { | |
| 2099 | + state = GenStateCompleted; | |
| 2100 | + // Dispatch the exception by looping back around to the | |
| 2101 | + // context.dispatchException(context.arg) call above. | |
| 2102 | + context.method = "throw"; | |
| 2103 | + context.arg = record.arg; | |
| 2104 | + } | |
| 2105 | + } | |
| 2106 | + }; | |
| 2107 | + } | |
| 2108 | + | |
| 2109 | + // Call delegate.iterator[context.method](context.arg) and handle the | |
| 2110 | + // result, either by returning a { value, done } result from the | |
| 2111 | + // delegate iterator, or by modifying context.method and context.arg, | |
| 2112 | + // setting context.delegate to null, and returning the ContinueSentinel. | |
| 2113 | + function maybeInvokeDelegate(delegate, context) { | |
| 2114 | + var method = delegate.iterator[context.method]; | |
| 2115 | + if (method === undefined) { | |
| 2116 | + // A .throw or .return when the delegate iterator has no .throw | |
| 2117 | + // method always terminates the yield* loop. | |
| 2118 | + context.delegate = null; | |
| 2119 | + | |
| 2120 | + if (context.method === "throw") { | |
| 2121 | + // Note: ["return"] must be used for ES3 parsing compatibility. | |
| 2122 | + if (delegate.iterator["return"]) { | |
| 2123 | + // If the delegate iterator has a return method, give it a | |
| 2124 | + // chance to clean up. | |
| 2125 | + context.method = "return"; | |
| 2126 | + context.arg = undefined; | |
| 2127 | + maybeInvokeDelegate(delegate, context); | |
| 2128 | + | |
| 2129 | + if (context.method === "throw") { | |
| 2130 | + // If maybeInvokeDelegate(context) changed context.method from | |
| 2131 | + // "return" to "throw", let that override the TypeError below. | |
| 2132 | + return ContinueSentinel; | |
| 2133 | + } | |
| 2134 | + } | |
| 2135 | + | |
| 2136 | + context.method = "throw"; | |
| 2137 | + context.arg = new TypeError( | |
| 2138 | + "The iterator does not provide a 'throw' method"); | |
| 2139 | + } | |
| 2140 | + | |
| 2141 | + return ContinueSentinel; | |
| 2142 | + } | |
| 2143 | + | |
| 2144 | + var record = tryCatch(method, delegate.iterator, context.arg); | |
| 2145 | + | |
| 2146 | + if (record.type === "throw") { | |
| 2147 | + context.method = "throw"; | |
| 2148 | + context.arg = record.arg; | |
| 2149 | + context.delegate = null; | |
| 2150 | + return ContinueSentinel; | |
| 2151 | + } | |
| 2152 | + | |
| 2153 | + var info = record.arg; | |
| 2154 | + | |
| 2155 | + if (! info) { | |
| 2156 | + context.method = "throw"; | |
| 2157 | + context.arg = new TypeError("iterator result is not an object"); | |
| 2158 | + context.delegate = null; | |
| 2159 | + return ContinueSentinel; | |
| 2160 | + } | |
| 2161 | + | |
| 2162 | + if (info.done) { | |
| 2163 | + // Assign the result of the finished delegate to the temporary | |
| 2164 | + // variable specified by delegate.resultName (see delegateYield). | |
| 2165 | + context[delegate.resultName] = info.value; | |
| 2166 | + | |
| 2167 | + // Resume execution at the desired location (see delegateYield). | |
| 2168 | + context.next = delegate.nextLoc; | |
| 2169 | + | |
| 2170 | + // If context.method was "throw" but the delegate handled the | |
| 2171 | + // exception, let the outer generator proceed normally. If | |
| 2172 | + // context.method was "next", forget context.arg since it has been | |
| 2173 | + // "consumed" by the delegate iterator. If context.method was | |
| 2174 | + // "return", allow the original .return call to continue in the | |
| 2175 | + // outer generator. | |
| 2176 | + if (context.method !== "return") { | |
| 2177 | + context.method = "next"; | |
| 2178 | + context.arg = undefined; | |
| 2179 | + } | |
| 2180 | + | |
| 2181 | + } else { | |
| 2182 | + // Re-yield the result returned by the delegate method. | |
| 2183 | + return info; | |
| 2184 | + } | |
| 2185 | + | |
| 2186 | + // The delegate iterator is finished, so forget it and continue with | |
| 2187 | + // the outer generator. | |
| 2188 | + context.delegate = null; | |
| 2189 | + return ContinueSentinel; | |
| 2190 | + } | |
| 2191 | + | |
| 2192 | + // Define Generator.prototype.{next,throw,return} in terms of the | |
| 2193 | + // unified ._invoke helper method. | |
| 2194 | + defineIteratorMethods(Gp); | |
| 2195 | + | |
| 2196 | + define(Gp, toStringTagSymbol, "Generator"); | |
| 2197 | + | |
| 2198 | + // A Generator should always return itself as the iterator object when the | |
| 2199 | + // @@iterator function is called on it. Some browsers' implementations of the | |
| 2200 | + // iterator prototype chain incorrectly implement this, causing the Generator | |
| 2201 | + // object to not be returned from this call. This ensures that doesn't happen. | |
| 2202 | + // See https://github.com/facebook/regenerator/issues/274 for more details. | |
| 2203 | + Gp[iteratorSymbol] = function() { | |
| 2204 | + return this; | |
| 2205 | + }; | |
| 2206 | + | |
| 2207 | + Gp.toString = function() { | |
| 2208 | + return "[object Generator]"; | |
| 2209 | + }; | |
| 2210 | + | |
| 2211 | + function pushTryEntry(locs) { | |
| 2212 | + var entry = { tryLoc: locs[0] }; | |
| 2213 | + | |
| 2214 | + if (1 in locs) { | |
| 2215 | + entry.catchLoc = locs[1]; | |
| 2216 | + } | |
| 2217 | + | |
| 2218 | + if (2 in locs) { | |
| 2219 | + entry.finallyLoc = locs[2]; | |
| 2220 | + entry.afterLoc = locs[3]; | |
| 2221 | + } | |
| 2222 | + | |
| 2223 | + this.tryEntries.push(entry); | |
| 2224 | + } | |
| 2225 | + | |
| 2226 | + function resetTryEntry(entry) { | |
| 2227 | + var record = entry.completion || {}; | |
| 2228 | + record.type = "normal"; | |
| 2229 | + delete record.arg; | |
| 2230 | + entry.completion = record; | |
| 2231 | + } | |
| 2232 | + | |
| 2233 | + function Context(tryLocsList) { | |
| 2234 | + // The root entry object (effectively a try statement without a catch | |
| 2235 | + // or a finally block) gives us a place to store values thrown from | |
| 2236 | + // locations where there is no enclosing try statement. | |
| 2237 | + this.tryEntries = [{ tryLoc: "root" }]; | |
| 2238 | + tryLocsList.forEach(pushTryEntry, this); | |
| 2239 | + this.reset(true); | |
| 2240 | + } | |
| 2241 | + | |
| 2242 | + exports.keys = function(object) { | |
| 2243 | + var keys = []; | |
| 2244 | + for (var key in object) { | |
| 2245 | + keys.push(key); | |
| 2246 | + } | |
| 2247 | + keys.reverse(); | |
| 2248 | + | |
| 2249 | + // Rather than returning an object with a next method, we keep | |
| 2250 | + // things simple and return the next function itself. | |
| 2251 | + return function next() { | |
| 2252 | + while (keys.length) { | |
| 2253 | + var key = keys.pop(); | |
| 2254 | + if (key in object) { | |
| 2255 | + next.value = key; | |
| 2256 | + next.done = false; | |
| 2257 | + return next; | |
| 2258 | + } | |
| 2259 | + } | |
| 2260 | + | |
| 2261 | + // To avoid creating an additional object, we just hang the .value | |
| 2262 | + // and .done properties off the next function object itself. This | |
| 2263 | + // also ensures that the minifier will not anonymize the function. | |
| 2264 | + next.done = true; | |
| 2265 | + return next; | |
| 2266 | + }; | |
| 2267 | + }; | |
| 2268 | + | |
| 2269 | + function values(iterable) { | |
| 2270 | + if (iterable) { | |
| 2271 | + var iteratorMethod = iterable[iteratorSymbol]; | |
| 2272 | + if (iteratorMethod) { | |
| 2273 | + return iteratorMethod.call(iterable); | |
| 2274 | + } | |
| 2275 | + | |
| 2276 | + if (typeof iterable.next === "function") { | |
| 2277 | + return iterable; | |
| 2278 | + } | |
| 2279 | + | |
| 2280 | + if (!isNaN(iterable.length)) { | |
| 2281 | + var i = -1, next = function next() { | |
| 2282 | + while (++i < iterable.length) { | |
| 2283 | + if (hasOwn.call(iterable, i)) { | |
| 2284 | + next.value = iterable[i]; | |
| 2285 | + next.done = false; | |
| 2286 | + return next; | |
| 2287 | + } | |
| 2288 | + } | |
| 2289 | + | |
| 2290 | + next.value = undefined; | |
| 2291 | + next.done = true; | |
| 2292 | + | |
| 2293 | + return next; | |
| 2294 | + }; | |
| 2295 | + | |
| 2296 | + return next.next = next; | |
| 2297 | + } | |
| 2298 | + } | |
| 2299 | + | |
| 2300 | + // Return an iterator with no values. | |
| 2301 | + return { next: doneResult }; | |
| 2302 | + } | |
| 2303 | + exports.values = values; | |
| 2304 | + | |
| 2305 | + function doneResult() { | |
| 2306 | + return { value: undefined, done: true }; | |
| 2307 | + } | |
| 2308 | + | |
| 2309 | + Context.prototype = { | |
| 2310 | + constructor: Context, | |
| 2311 | + | |
| 2312 | + reset: function(skipTempReset) { | |
| 2313 | + this.prev = 0; | |
| 2314 | + this.next = 0; | |
| 2315 | + // Resetting context._sent for legacy support of Babel's | |
| 2316 | + // function.sent implementation. | |
| 2317 | + this.sent = this._sent = undefined; | |
| 2318 | + this.done = false; | |
| 2319 | + this.delegate = null; | |
| 2320 | + | |
| 2321 | + this.method = "next"; | |
| 2322 | + this.arg = undefined; | |
| 2323 | + | |
| 2324 | + this.tryEntries.forEach(resetTryEntry); | |
| 2325 | + | |
| 2326 | + if (!skipTempReset) { | |
| 2327 | + for (var name in this) { | |
| 2328 | + // Not sure about the optimal order of these conditions: | |
| 2329 | + if (name.charAt(0) === "t" && | |
| 2330 | + hasOwn.call(this, name) && | |
| 2331 | + !isNaN(+name.slice(1))) { | |
| 2332 | + this[name] = undefined; | |
| 2333 | + } | |
| 2334 | + } | |
| 2335 | + } | |
| 2336 | + }, | |
| 2337 | + | |
| 2338 | + stop: function() { | |
| 2339 | + this.done = true; | |
| 2340 | + | |
| 2341 | + var rootEntry = this.tryEntries[0]; | |
| 2342 | + var rootRecord = rootEntry.completion; | |
| 2343 | + if (rootRecord.type === "throw") { | |
| 2344 | + throw rootRecord.arg; | |
| 2345 | + } | |
| 2346 | + | |
| 2347 | + return this.rval; | |
| 2348 | + }, | |
| 2349 | + | |
| 2350 | + dispatchException: function(exception) { | |
| 2351 | + if (this.done) { | |
| 2352 | + throw exception; | |
| 2353 | + } | |
| 2354 | + | |
| 2355 | + var context = this; | |
| 2356 | + function handle(loc, caught) { | |
| 2357 | + record.type = "throw"; | |
| 2358 | + record.arg = exception; | |
| 2359 | + context.next = loc; | |
| 2360 | + | |
| 2361 | + if (caught) { | |
| 2362 | + // If the dispatched exception was caught by a catch block, | |
| 2363 | + // then let that catch block handle the exception normally. | |
| 2364 | + context.method = "next"; | |
| 2365 | + context.arg = undefined; | |
| 2366 | + } | |
| 2367 | + | |
| 2368 | + return !! caught; | |
| 2369 | + } | |
| 2370 | + | |
| 2371 | + for (var i = this.tryEntries.length - 1; i >= 0; --i) { | |
| 2372 | + var entry = this.tryEntries[i]; | |
| 2373 | + var record = entry.completion; | |
| 2374 | + | |
| 2375 | + if (entry.tryLoc === "root") { | |
| 2376 | + // Exception thrown outside of any try block that could handle | |
| 2377 | + // it, so set the completion value of the entire function to | |
| 2378 | + // throw the exception. | |
| 2379 | + return handle("end"); | |
| 2380 | + } | |
| 2381 | + | |
| 2382 | + if (entry.tryLoc <= this.prev) { | |
| 2383 | + var hasCatch = hasOwn.call(entry, "catchLoc"); | |
| 2384 | + var hasFinally = hasOwn.call(entry, "finallyLoc"); | |
| 2385 | + | |
| 2386 | + if (hasCatch && hasFinally) { | |
| 2387 | + if (this.prev < entry.catchLoc) { | |
| 2388 | + return handle(entry.catchLoc, true); | |
| 2389 | + } else if (this.prev < entry.finallyLoc) { | |
| 2390 | + return handle(entry.finallyLoc); | |
| 2391 | + } | |
| 2392 | + | |
| 2393 | + } else if (hasCatch) { | |
| 2394 | + if (this.prev < entry.catchLoc) { | |
| 2395 | + return handle(entry.catchLoc, true); | |
| 2396 | + } | |
| 2397 | + | |
| 2398 | + } else if (hasFinally) { | |
| 2399 | + if (this.prev < entry.finallyLoc) { | |
| 2400 | + return handle(entry.finallyLoc); | |
| 2401 | + } | |
| 2402 | + | |
| 2403 | + } else { | |
| 2404 | + throw new Error("try statement without catch or finally"); | |
| 2405 | + } | |
| 2406 | + } | |
| 2407 | + } | |
| 2408 | + }, | |
| 2409 | + | |
| 2410 | + abrupt: function(type, arg) { | |
| 2411 | + for (var i = this.tryEntries.length - 1; i >= 0; --i) { | |
| 2412 | + var entry = this.tryEntries[i]; | |
| 2413 | + if (entry.tryLoc <= this.prev && | |
| 2414 | + hasOwn.call(entry, "finallyLoc") && | |
| 2415 | + this.prev < entry.finallyLoc) { | |
| 2416 | + var finallyEntry = entry; | |
| 2417 | + break; | |
| 2418 | + } | |
| 2419 | + } | |
| 2420 | + | |
| 2421 | + if (finallyEntry && | |
| 2422 | + (type === "break" || | |
| 2423 | + type === "continue") && | |
| 2424 | + finallyEntry.tryLoc <= arg && | |
| 2425 | + arg <= finallyEntry.finallyLoc) { | |
| 2426 | + // Ignore the finally entry if control is not jumping to a | |
| 2427 | + // location outside the try/catch block. | |
| 2428 | + finallyEntry = null; | |
| 2429 | + } | |
| 2430 | + | |
| 2431 | + var record = finallyEntry ? finallyEntry.completion : {}; | |
| 2432 | + record.type = type; | |
| 2433 | + record.arg = arg; | |
| 2434 | + | |
| 2435 | + if (finallyEntry) { | |
| 2436 | + this.method = "next"; | |
| 2437 | + this.next = finallyEntry.finallyLoc; | |
| 2438 | + return ContinueSentinel; | |
| 2439 | + } | |
| 2440 | + | |
| 2441 | + return this.complete(record); | |
| 2442 | + }, | |
| 2443 | + | |
| 2444 | + complete: function(record, afterLoc) { | |
| 2445 | + if (record.type === "throw") { | |
| 2446 | + throw record.arg; | |
| 2447 | + } | |
| 2448 | + | |
| 2449 | + if (record.type === "break" || | |
| 2450 | + record.type === "continue") { | |
| 2451 | + this.next = record.arg; | |
| 2452 | + } else if (record.type === "return") { | |
| 2453 | + this.rval = this.arg = record.arg; | |
| 2454 | + this.method = "return"; | |
| 2455 | + this.next = "end"; | |
| 2456 | + } else if (record.type === "normal" && afterLoc) { | |
| 2457 | + this.next = afterLoc; | |
| 2458 | + } | |
| 2459 | + | |
| 2460 | + return ContinueSentinel; | |
| 2461 | + }, | |
| 2462 | + | |
| 2463 | + finish: function(finallyLoc) { | |
| 2464 | + for (var i = this.tryEntries.length - 1; i >= 0; --i) { | |
| 2465 | + var entry = this.tryEntries[i]; | |
| 2466 | + if (entry.finallyLoc === finallyLoc) { | |
| 2467 | + this.complete(entry.completion, entry.afterLoc); | |
| 2468 | + resetTryEntry(entry); | |
| 2469 | + return ContinueSentinel; | |
| 2470 | + } | |
| 2471 | + } | |
| 2472 | + }, | |
| 2473 | + | |
| 2474 | + "catch": function(tryLoc) { | |
| 2475 | + for (var i = this.tryEntries.length - 1; i >= 0; --i) { | |
| 2476 | + var entry = this.tryEntries[i]; | |
| 2477 | + if (entry.tryLoc === tryLoc) { | |
| 2478 | + var record = entry.completion; | |
| 2479 | + if (record.type === "throw") { | |
| 2480 | + var thrown = record.arg; | |
| 2481 | + resetTryEntry(entry); | |
| 2482 | + } | |
| 2483 | + return thrown; | |
| 2484 | + } | |
| 2485 | + } | |
| 2486 | + | |
| 2487 | + // The context.catch method must only be called with a location | |
| 2488 | + // argument that corresponds to a known catch block. | |
| 2489 | + throw new Error("illegal catch attempt"); | |
| 2490 | + }, | |
| 2491 | + | |
| 2492 | + delegateYield: function(iterable, resultName, nextLoc) { | |
| 2493 | + this.delegate = { | |
| 2494 | + iterator: values(iterable), | |
| 2495 | + resultName: resultName, | |
| 2496 | + nextLoc: nextLoc | |
| 2497 | + }; | |
| 2498 | + | |
| 2499 | + if (this.method === "next") { | |
| 2500 | + // Deliberately forget the last sent value so that we don't | |
| 2501 | + // accidentally pass it on to the delegate. | |
| 2502 | + this.arg = undefined; | |
| 2503 | + } | |
| 2504 | + | |
| 2505 | + return ContinueSentinel; | |
| 2506 | + } | |
| 2507 | + }; | |
| 2508 | + | |
| 2509 | + // Regardless of whether this script is executing as a CommonJS module | |
| 2510 | + // or not, return the runtime object so that we can declare the variable | |
| 2511 | + // regeneratorRuntime in the outer scope, which allows this module to be | |
| 2512 | + // injected easily by `bin/regenerator --include-runtime script.js`. | |
| 2513 | + return exports; | |
| 2514 | + | |
| 2515 | +}( | |
| 2516 | + // If this script is executing as a CommonJS module, use module.exports | |
| 2517 | + // as the regeneratorRuntime namespace. Otherwise create a new empty | |
| 2518 | + // object. Either way, the resulting object will be used to initialize | |
| 2519 | + // the regeneratorRuntime variable at the top of this file. | |
| 2520 | + true ? module.exports : undefined | |
| 2521 | +)); | |
| 2522 | + | |
| 2523 | +try { | |
| 2524 | + regeneratorRuntime = runtime; | |
| 2525 | +} catch (accidentalStrictMode) { | |
| 2526 | + // This module should not be running in strict mode, so the above | |
| 2527 | + // assignment should always work unless something is misconfigured. Just | |
| 2528 | + // in case runtime.js accidentally runs in strict mode, we can escape | |
| 2529 | + // strict mode using a global Function call. This could conceivably fail | |
| 2530 | + // if a Content Security Policy forbids using Function, but in that case | |
| 2531 | + // the proper solution is to fix the accidental strict mode problem. If | |
| 2532 | + // you've misconfigured your bundler to force strict mode and applied a | |
| 2533 | + // CSP to forbid Function, and you're not willing to fix either of those | |
| 2534 | + // problems, please detail your unique predicament in a GitHub issue. | |
| 2535 | + Function("r", "regeneratorRuntime = r")(runtime); | |
| 2536 | +} | |
| 2537 | + | |
| 2538 | + | |
| 112 | 2539 | /***/ }), |
| 2540 | +/* 69 */ | |
| 2541 | +/***/ (function(module, exports, __webpack_require__) { | |
| 113 | 2542 | |
| 114 | -/***/ "../assets/dev/js/editor/document/command-bases/command-history-base.js": | |
| 115 | -/*!******************************************************************************!*\ | |
| 116 | - !*** ../assets/dev/js/editor/document/command-bases/command-history-base.js ***! | |
| 117 | - \******************************************************************************/ | |
| 118 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 2543 | +// 7.1.1 ToPrimitive(input [, PreferredType]) | |
| 2544 | +var isObject = __webpack_require__(9); | |
| 2545 | +// instead of the ES6 spec version, we didn't implement @@toPrimitive case | |
| 2546 | +// and the second argument - flag - preferred type is a string | |
| 2547 | +module.exports = function (it, S) { | |
| 2548 | + if (!isObject(it)) return it; | |
| 2549 | + var fn, val; | |
| 2550 | + if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; | |
| 2551 | + if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; | |
| 2552 | + if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; | |
| 2553 | + throw TypeError("Can't convert object to primitive value"); | |
| 2554 | +}; | |
| 119 | 2555 | |
| 2556 | + | |
| 2557 | +/***/ }), | |
| 2558 | +/* 70 */ | |
| 2559 | +/***/ (function(module, exports, __webpack_require__) { | |
| 2560 | + | |
| 2561 | +var shared = __webpack_require__(71)('keys'); | |
| 2562 | +var uid = __webpack_require__(55); | |
| 2563 | +module.exports = function (key) { | |
| 2564 | + return shared[key] || (shared[key] = uid(key)); | |
| 2565 | +}; | |
| 2566 | + | |
| 2567 | + | |
| 2568 | +/***/ }), | |
| 2569 | +/* 71 */ | |
| 2570 | +/***/ (function(module, exports, __webpack_require__) { | |
| 2571 | + | |
| 2572 | +var core = __webpack_require__(6); | |
| 2573 | +var global = __webpack_require__(8); | |
| 2574 | +var SHARED = '__core-js_shared__'; | |
| 2575 | +var store = global[SHARED] || (global[SHARED] = {}); | |
| 2576 | + | |
| 2577 | +(module.exports = function (key, value) { | |
| 2578 | + return store[key] || (store[key] = value !== undefined ? value : {}); | |
| 2579 | +})('versions', []).push({ | |
| 2580 | + version: core.version, | |
| 2581 | + mode: __webpack_require__(44) ? 'pure' : 'global', | |
| 2582 | + copyright: '© 2019 Denis Pushkarev (zloirock.ru)' | |
| 2583 | +}); | |
| 2584 | + | |
| 2585 | + | |
| 2586 | +/***/ }), | |
| 2587 | +/* 72 */ | |
| 2588 | +/***/ (function(module, exports, __webpack_require__) { | |
| 2589 | + | |
| 2590 | +// 7.1.15 ToLength | |
| 2591 | +var toInteger = __webpack_require__(73); | |
| 2592 | +var min = Math.min; | |
| 2593 | +module.exports = function (it) { | |
| 2594 | + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 | |
| 2595 | +}; | |
| 2596 | + | |
| 2597 | + | |
| 2598 | +/***/ }), | |
| 2599 | +/* 73 */ | |
| 2600 | +/***/ (function(module, exports) { | |
| 2601 | + | |
| 2602 | +// 7.1.4 ToInteger | |
| 2603 | +var ceil = Math.ceil; | |
| 2604 | +var floor = Math.floor; | |
| 2605 | +module.exports = function (it) { | |
| 2606 | + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); | |
| 2607 | +}; | |
| 2608 | + | |
| 2609 | + | |
| 2610 | +/***/ }), | |
| 2611 | +/* 74 */ | |
| 2612 | +/***/ (function(module, exports) { | |
| 2613 | + | |
| 2614 | +// IE 8- don't enum bug keys | |
| 2615 | +module.exports = ( | |
| 2616 | + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' | |
| 2617 | +).split(','); | |
| 2618 | + | |
| 2619 | + | |
| 2620 | +/***/ }), | |
| 2621 | +/* 75 */ | |
| 2622 | +/***/ (function(module, exports, __webpack_require__) { | |
| 2623 | + | |
| 2624 | +var global = __webpack_require__(8); | |
| 2625 | +var core = __webpack_require__(6); | |
| 2626 | +var LIBRARY = __webpack_require__(44); | |
| 2627 | +var wksExt = __webpack_require__(62); | |
| 2628 | +var defineProperty = __webpack_require__(15).f; | |
| 2629 | +module.exports = function (name) { | |
| 2630 | + var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); | |
| 2631 | + if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) }); | |
| 2632 | +}; | |
| 2633 | + | |
| 2634 | + | |
| 2635 | +/***/ }), | |
| 2636 | +/* 76 */ | |
| 2637 | +/***/ (function(module, exports, __webpack_require__) { | |
| 2638 | + | |
| 2639 | +var core = __webpack_require__(58); | |
| 2640 | +var global = __webpack_require__(18); | |
| 2641 | +var SHARED = '__core-js_shared__'; | |
| 2642 | +var store = global[SHARED] || (global[SHARED] = {}); | |
| 2643 | + | |
| 2644 | +(module.exports = function (key, value) { | |
| 2645 | + return store[key] || (store[key] = value !== undefined ? value : {}); | |
| 2646 | +})('versions', []).push({ | |
| 2647 | + version: core.version, | |
| 2648 | + mode: __webpack_require__(115) ? 'pure' : 'global', | |
| 2649 | + copyright: '© 2019 Denis Pushkarev (zloirock.ru)' | |
| 2650 | +}); | |
| 2651 | + | |
| 2652 | + | |
| 2653 | +/***/ }), | |
| 2654 | +/* 77 */ | |
| 2655 | +/***/ (function(module, exports) { | |
| 2656 | + | |
| 2657 | +var id = 0; | |
| 2658 | +var px = Math.random(); | |
| 2659 | +module.exports = function (key) { | |
| 2660 | + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); | |
| 2661 | +}; | |
| 2662 | + | |
| 2663 | + | |
| 2664 | +/***/ }), | |
| 2665 | +/* 78 */ | |
| 2666 | +/***/ (function(module, exports, __webpack_require__) { | |
| 2667 | + | |
| 2668 | +// most Object methods by ES6 should accept primitives | |
| 2669 | +var $export = __webpack_require__(7); | |
| 2670 | +var core = __webpack_require__(6); | |
| 2671 | +var fails = __webpack_require__(21); | |
| 2672 | +module.exports = function (KEY, exec) { | |
| 2673 | + var fn = (core.Object || {})[KEY] || Object[KEY]; | |
| 2674 | + var exp = {}; | |
| 2675 | + exp[KEY] = exec(fn); | |
| 2676 | + $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp); | |
| 2677 | +}; | |
| 2678 | + | |
| 2679 | + | |
| 2680 | +/***/ }), | |
| 2681 | +/* 79 */ | |
| 2682 | +/***/ (function(module, exports, __webpack_require__) { | |
| 2683 | + | |
| 2684 | +var ctx = __webpack_require__(29); | |
| 2685 | +var call = __webpack_require__(143); | |
| 2686 | +var isArrayIter = __webpack_require__(144); | |
| 2687 | +var anObject = __webpack_require__(11); | |
| 2688 | +var toLength = __webpack_require__(72); | |
| 2689 | +var getIterFn = __webpack_require__(117); | |
| 2690 | +var BREAK = {}; | |
| 2691 | +var RETURN = {}; | |
| 2692 | +var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) { | |
| 2693 | + var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable); | |
| 2694 | + var f = ctx(fn, that, entries ? 2 : 1); | |
| 2695 | + var index = 0; | |
| 2696 | + var length, step, iterator, result; | |
| 2697 | + if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!'); | |
| 2698 | + // fast case for arrays with default iterator | |
| 2699 | + if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) { | |
| 2700 | + result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); | |
| 2701 | + if (result === BREAK || result === RETURN) return result; | |
| 2702 | + } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) { | |
| 2703 | + result = call(iterator, f, step.value, entries); | |
| 2704 | + if (result === BREAK || result === RETURN) return result; | |
| 2705 | + } | |
| 2706 | +}; | |
| 2707 | +exports.BREAK = BREAK; | |
| 2708 | +exports.RETURN = RETURN; | |
| 2709 | + | |
| 2710 | + | |
| 2711 | +/***/ }), | |
| 2712 | +/* 80 */ | |
| 2713 | +/***/ (function(module, exports, __webpack_require__) { | |
| 2714 | + | |
| 120 | 2715 | "use strict"; |
| 121 | 2716 | |
| 2717 | +// 19.1.3.6 Object.prototype.toString() | |
| 2718 | +var classof = __webpack_require__(118); | |
| 2719 | +var test = {}; | |
| 2720 | +test[__webpack_require__(13)('toStringTag')] = 'z'; | |
| 2721 | +if (test + '' != '[object z]') { | |
| 2722 | + __webpack_require__(39)(Object.prototype, 'toString', function toString() { | |
| 2723 | + return '[object ' + classof(this) + ']'; | |
| 2724 | + }, true); | |
| 2725 | +} | |
| 122 | 2726 | |
| 123 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 124 | -Object.defineProperty(exports, "__esModule", ({ | |
| 2727 | + | |
| 2728 | +/***/ }), | |
| 2729 | +/* 81 */ | |
| 2730 | +/***/ (function(module, exports, __webpack_require__) { | |
| 2731 | + | |
| 2732 | +// optional / simple context binding | |
| 2733 | +var aFunction = __webpack_require__(98); | |
| 2734 | +module.exports = function (fn, that, length) { | |
| 2735 | + aFunction(fn); | |
| 2736 | + if (that === undefined) return fn; | |
| 2737 | + switch (length) { | |
| 2738 | + case 1: return function (a) { | |
| 2739 | + return fn.call(that, a); | |
| 2740 | + }; | |
| 2741 | + case 2: return function (a, b) { | |
| 2742 | + return fn.call(that, a, b); | |
| 2743 | + }; | |
| 2744 | + case 3: return function (a, b, c) { | |
| 2745 | + return fn.call(that, a, b, c); | |
| 2746 | + }; | |
| 2747 | + } | |
| 2748 | + return function (/* ...args */) { | |
| 2749 | + return fn.apply(that, arguments); | |
| 2750 | + }; | |
| 2751 | +}; | |
| 2752 | + | |
| 2753 | + | |
| 2754 | +/***/ }), | |
| 2755 | +/* 82 */ | |
| 2756 | +/***/ (function(module, exports, __webpack_require__) { | |
| 2757 | + | |
| 2758 | +"use strict"; | |
| 2759 | + | |
| 2760 | + | |
| 2761 | +var isRegExp = __webpack_require__(126); | |
| 2762 | +var anObject = __webpack_require__(20); | |
| 2763 | +var speciesConstructor = __webpack_require__(180); | |
| 2764 | +var advanceStringIndex = __webpack_require__(108); | |
| 2765 | +var toLength = __webpack_require__(46); | |
| 2766 | +var callRegExpExec = __webpack_require__(100); | |
| 2767 | +var regexpExec = __webpack_require__(94); | |
| 2768 | +var fails = __webpack_require__(36); | |
| 2769 | +var $min = Math.min; | |
| 2770 | +var $push = [].push; | |
| 2771 | +var $SPLIT = 'split'; | |
| 2772 | +var LENGTH = 'length'; | |
| 2773 | +var LAST_INDEX = 'lastIndex'; | |
| 2774 | +var MAX_UINT32 = 0xffffffff; | |
| 2775 | + | |
| 2776 | +// babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError | |
| 2777 | +var SUPPORTS_Y = !fails(function () { RegExp(MAX_UINT32, 'y'); }); | |
| 2778 | + | |
| 2779 | +// @@split logic | |
| 2780 | +__webpack_require__(101)('split', 2, function (defined, SPLIT, $split, maybeCallNative) { | |
| 2781 | + var internalSplit; | |
| 2782 | + if ( | |
| 2783 | + 'abbc'[$SPLIT](/(b)*/)[1] == 'c' || | |
| 2784 | + 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 || | |
| 2785 | + 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 || | |
| 2786 | + '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 || | |
| 2787 | + '.'[$SPLIT](/()()/)[LENGTH] > 1 || | |
| 2788 | + ''[$SPLIT](/.?/)[LENGTH] | |
| 2789 | + ) { | |
| 2790 | + // based on es5-shim implementation, need to rework it | |
| 2791 | + internalSplit = function (separator, limit) { | |
| 2792 | + var string = String(this); | |
| 2793 | + if (separator === undefined && limit === 0) return []; | |
| 2794 | + // If `separator` is not a regex, use native split | |
| 2795 | + if (!isRegExp(separator)) return $split.call(string, separator, limit); | |
| 2796 | + var output = []; | |
| 2797 | + var flags = (separator.ignoreCase ? 'i' : '') + | |
| 2798 | + (separator.multiline ? 'm' : '') + | |
| 2799 | + (separator.unicode ? 'u' : '') + | |
| 2800 | + (separator.sticky ? 'y' : ''); | |
| 2801 | + var lastLastIndex = 0; | |
| 2802 | + var splitLimit = limit === undefined ? MAX_UINT32 : limit >>> 0; | |
| 2803 | + // Make `global` and avoid `lastIndex` issues by working with a copy | |
| 2804 | + var separatorCopy = new RegExp(separator.source, flags + 'g'); | |
| 2805 | + var match, lastIndex, lastLength; | |
| 2806 | + while (match = regexpExec.call(separatorCopy, string)) { | |
| 2807 | + lastIndex = separatorCopy[LAST_INDEX]; | |
| 2808 | + if (lastIndex > lastLastIndex) { | |
| 2809 | + output.push(string.slice(lastLastIndex, match.index)); | |
| 2810 | + if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1)); | |
| 2811 | + lastLength = match[0][LENGTH]; | |
| 2812 | + lastLastIndex = lastIndex; | |
| 2813 | + if (output[LENGTH] >= splitLimit) break; | |
| 2814 | + } | |
| 2815 | + if (separatorCopy[LAST_INDEX] === match.index) separatorCopy[LAST_INDEX]++; // Avoid an infinite loop | |
| 2816 | + } | |
| 2817 | + if (lastLastIndex === string[LENGTH]) { | |
| 2818 | + if (lastLength || !separatorCopy.test('')) output.push(''); | |
| 2819 | + } else output.push(string.slice(lastLastIndex)); | |
| 2820 | + return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output; | |
| 2821 | + }; | |
| 2822 | + // Chakra, V8 | |
| 2823 | + } else if ('0'[$SPLIT](undefined, 0)[LENGTH]) { | |
| 2824 | + internalSplit = function (separator, limit) { | |
| 2825 | + return separator === undefined && limit === 0 ? [] : $split.call(this, separator, limit); | |
| 2826 | + }; | |
| 2827 | + } else { | |
| 2828 | + internalSplit = $split; | |
| 2829 | + } | |
| 2830 | + | |
| 2831 | + return [ | |
| 2832 | + // `String.prototype.split` method | |
| 2833 | + // https://tc39.github.io/ecma262/#sec-string.prototype.split | |
| 2834 | + function split(separator, limit) { | |
| 2835 | + var O = defined(this); | |
| 2836 | + var splitter = separator == undefined ? undefined : separator[SPLIT]; | |
| 2837 | + return splitter !== undefined | |
| 2838 | + ? splitter.call(separator, O, limit) | |
| 2839 | + : internalSplit.call(String(O), separator, limit); | |
| 2840 | + }, | |
| 2841 | + // `RegExp.prototype[@@split]` method | |
| 2842 | + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split | |
| 2843 | + // | |
| 2844 | + // NOTE: This cannot be properly polyfilled in engines that don't support | |
| 2845 | + // the 'y' flag. | |
| 2846 | + function (regexp, limit) { | |
| 2847 | + var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== $split); | |
| 2848 | + if (res.done) return res.value; | |
| 2849 | + | |
| 2850 | + var rx = anObject(regexp); | |
| 2851 | + var S = String(this); | |
| 2852 | + var C = speciesConstructor(rx, RegExp); | |
| 2853 | + | |
| 2854 | + var unicodeMatching = rx.unicode; | |
| 2855 | + var flags = (rx.ignoreCase ? 'i' : '') + | |
| 2856 | + (rx.multiline ? 'm' : '') + | |
| 2857 | + (rx.unicode ? 'u' : '') + | |
| 2858 | + (SUPPORTS_Y ? 'y' : 'g'); | |
| 2859 | + | |
| 2860 | + // ^(? + rx + ) is needed, in combination with some S slicing, to | |
| 2861 | + // simulate the 'y' flag. | |
| 2862 | + var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags); | |
| 2863 | + var lim = limit === undefined ? MAX_UINT32 : limit >>> 0; | |
| 2864 | + if (lim === 0) return []; | |
| 2865 | + if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : []; | |
| 2866 | + var p = 0; | |
| 2867 | + var q = 0; | |
| 2868 | + var A = []; | |
| 2869 | + while (q < S.length) { | |
| 2870 | + splitter.lastIndex = SUPPORTS_Y ? q : 0; | |
| 2871 | + var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q)); | |
| 2872 | + var e; | |
| 2873 | + if ( | |
| 2874 | + z === null || | |
| 2875 | + (e = $min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p | |
| 2876 | + ) { | |
| 2877 | + q = advanceStringIndex(S, q, unicodeMatching); | |
| 2878 | + } else { | |
| 2879 | + A.push(S.slice(p, q)); | |
| 2880 | + if (A.length === lim) return A; | |
| 2881 | + for (var i = 1; i <= z.length - 1; i++) { | |
| 2882 | + A.push(z[i]); | |
| 2883 | + if (A.length === lim) return A; | |
| 2884 | + } | |
| 2885 | + q = p = e; | |
| 2886 | + } | |
| 2887 | + } | |
| 2888 | + A.push(S.slice(p)); | |
| 2889 | + return A; | |
| 2890 | + } | |
| 2891 | + ]; | |
| 2892 | +}); | |
| 2893 | + | |
| 2894 | + | |
| 2895 | +/***/ }), | |
| 2896 | +/* 83 */, | |
| 2897 | +/* 84 */ | |
| 2898 | +/***/ (function(module, exports, __webpack_require__) { | |
| 2899 | + | |
| 2900 | +module.exports = __webpack_require__(68); | |
| 2901 | + | |
| 2902 | + | |
| 2903 | +/***/ }), | |
| 2904 | +/* 85 */ | |
| 2905 | +/***/ (function(module, exports, __webpack_require__) { | |
| 2906 | + | |
| 2907 | +var _Promise = __webpack_require__(134); | |
| 2908 | + | |
| 2909 | +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { | |
| 2910 | + try { | |
| 2911 | + var info = gen[key](arg); | |
| 2912 | + var value = info.value; | |
| 2913 | + } catch (error) { | |
| 2914 | + reject(error); | |
| 2915 | + return; | |
| 2916 | + } | |
| 2917 | + | |
| 2918 | + if (info.done) { | |
| 2919 | + resolve(value); | |
| 2920 | + } else { | |
| 2921 | + _Promise.resolve(value).then(_next, _throw); | |
| 2922 | + } | |
| 2923 | +} | |
| 2924 | + | |
| 2925 | +function _asyncToGenerator(fn) { | |
| 2926 | + return function () { | |
| 2927 | + var self = this, | |
| 2928 | + args = arguments; | |
| 2929 | + return new _Promise(function (resolve, reject) { | |
| 2930 | + var gen = fn.apply(self, args); | |
| 2931 | + | |
| 2932 | + function _next(value) { | |
| 2933 | + asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); | |
| 2934 | + } | |
| 2935 | + | |
| 2936 | + function _throw(err) { | |
| 2937 | + asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); | |
| 2938 | + } | |
| 2939 | + | |
| 2940 | + _next(undefined); | |
| 2941 | + }); | |
| 2942 | + }; | |
| 2943 | +} | |
| 2944 | + | |
| 2945 | +module.exports = _asyncToGenerator; | |
| 2946 | + | |
| 2947 | +/***/ }), | |
| 2948 | +/* 86 */ | |
| 2949 | +/***/ (function(module, exports, __webpack_require__) { | |
| 2950 | + | |
| 2951 | +module.exports = __webpack_require__(221); | |
| 2952 | + | |
| 2953 | +/***/ }), | |
| 2954 | +/* 87 */ | |
| 2955 | +/***/ (function(module, exports, __webpack_require__) { | |
| 2956 | + | |
| 2957 | +"use strict"; | |
| 2958 | + | |
| 2959 | + | |
| 2960 | +var _interopRequireDefault = __webpack_require__(0); | |
| 2961 | + | |
| 2962 | +var _Object$defineProperty = __webpack_require__(1); | |
| 2963 | + | |
| 2964 | +_Object$defineProperty(exports, "__esModule", { | |
| 125 | 2965 | value: true |
| 126 | -})); | |
| 127 | -exports["default"] = void 0; | |
| 128 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 129 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 130 | -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 131 | -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 132 | -var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js")); | |
| 133 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 134 | -var _commandContainerBase = _interopRequireDefault(__webpack_require__(/*! elementor-editor/command-bases/command-container-base */ "../assets/dev/js/editor/command-bases/command-container-base.js")); | |
| 135 | -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)); } | |
| 136 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 137 | -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; } | |
| 138 | -/** | |
| 139 | - * @name $e.modules.editor.document.CommandHistoryBase | |
| 140 | - */ | |
| 141 | -var CommandHistoryBase = exports["default"] = /*#__PURE__*/function (_CommandContainerBase) { | |
| 142 | - function CommandHistoryBase() { | |
| 143 | - (0, _classCallCheck2.default)(this, CommandHistoryBase); | |
| 144 | - return _callSuper(this, CommandHistoryBase, arguments); | |
| 2966 | +}); | |
| 2967 | + | |
| 2968 | +exports.default = void 0; | |
| 2969 | + | |
| 2970 | +__webpack_require__(61); | |
| 2971 | + | |
| 2972 | +var _keys = _interopRequireDefault(__webpack_require__(25)); | |
| 2973 | + | |
| 2974 | +__webpack_require__(82); | |
| 2975 | + | |
| 2976 | +var _values = _interopRequireDefault(__webpack_require__(54)); | |
| 2977 | + | |
| 2978 | +var _slicedToArray2 = _interopRequireDefault(__webpack_require__(105)); | |
| 2979 | + | |
| 2980 | +var _entries = _interopRequireDefault(__webpack_require__(93)); | |
| 2981 | + | |
| 2982 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 2983 | + | |
| 2984 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 2985 | + | |
| 2986 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 2987 | + | |
| 2988 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 2989 | + | |
| 2990 | +var ComponentBase = /*#__PURE__*/function (_elementorModules$Mod) { | |
| 2991 | + (0, _inherits2.default)(ComponentBase, _elementorModules$Mod); | |
| 2992 | + | |
| 2993 | + var _super = (0, _createSuper2.default)(ComponentBase); | |
| 2994 | + | |
| 2995 | + function ComponentBase() { | |
| 2996 | + (0, _classCallCheck2.default)(this, ComponentBase); | |
| 2997 | + return _super.apply(this, arguments); | |
| 145 | 2998 | } |
| 146 | - (0, _inherits2.default)(CommandHistoryBase, _CommandContainerBase); | |
| 147 | - return (0, _createClass2.default)(CommandHistoryBase, [{ | |
| 148 | - key: "initialize", | |
| 149 | - value: function initialize() { | |
| 2999 | + | |
| 3000 | + (0, _createClass2.default)(ComponentBase, [{ | |
| 3001 | + key: "__construct", | |
| 3002 | + value: function __construct() { | |
| 150 | 3003 | var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
| 151 | - var _args$options = args.options, | |
| 152 | - options = _args$options === void 0 ? {} : _args$options, | |
| 153 | - _options$useHistory = options.useHistory, | |
| 154 | - useHistory = _options$useHistory === void 0 ? true : _options$useHistory; | |
| 155 | - if (useHistory) { | |
| 156 | - /** | |
| 157 | - * Get History from child command. | |
| 158 | - * | |
| 159 | - * @type {{}|boolean} | |
| 160 | - */ | |
| 161 | - this.history = this.getHistory(args); | |
| 162 | 3004 | |
| 163 | - /** | |
| 164 | - * @type {number|boolean} | |
| 165 | - */ | |
| 166 | - this.historyId = false; | |
| 3005 | + if (args.manager) { | |
| 3006 | + this.manager = args.manager; | |
| 167 | 3007 | } |
| 3008 | + | |
| 3009 | + this.commands = this.defaultCommands(); | |
| 3010 | + this.commandsInternal = this.defaultCommandsInternal(); | |
| 3011 | + this.hooks = this.defaultHooks(); | |
| 3012 | + this.routes = this.defaultRoutes(); | |
| 3013 | + this.tabs = this.defaultTabs(); | |
| 3014 | + this.shortcuts = this.defaultShortcuts(); | |
| 3015 | + this.utils = this.defaultUtils(); | |
| 3016 | + this.data = this.defaultData(); | |
| 3017 | + this.defaultRoute = ''; | |
| 3018 | + this.currentTab = ''; | |
| 168 | 3019 | } |
| 3020 | + }, { | |
| 3021 | + key: "registerAPI", | |
| 3022 | + value: function registerAPI() { | |
| 3023 | + var _this = this; | |
| 169 | 3024 | |
| 170 | - // eslint-disable-next-line jsdoc/require-returns-check | |
| 3025 | + (0, _entries.default)(this.getTabs()).forEach(function (tab) { | |
| 3026 | + return _this.registerTabRoute(tab[0]); | |
| 3027 | + }); | |
| 3028 | + (0, _entries.default)(this.getRoutes()).forEach(function (_ref) { | |
| 3029 | + var _ref2 = (0, _slicedToArray2.default)(_ref, 2), | |
| 3030 | + route = _ref2[0], | |
| 3031 | + callback = _ref2[1]; | |
| 3032 | + | |
| 3033 | + return _this.registerRoute(route, callback); | |
| 3034 | + }); | |
| 3035 | + (0, _entries.default)(this.getCommands()).forEach(function (_ref3) { | |
| 3036 | + var _ref4 = (0, _slicedToArray2.default)(_ref3, 2), | |
| 3037 | + command = _ref4[0], | |
| 3038 | + callback = _ref4[1]; | |
| 3039 | + | |
| 3040 | + return _this.registerCommand(command, callback); | |
| 3041 | + }); | |
| 3042 | + (0, _entries.default)(this.getCommandsInternal()).forEach(function (_ref5) { | |
| 3043 | + var _ref6 = (0, _slicedToArray2.default)(_ref5, 2), | |
| 3044 | + command = _ref6[0], | |
| 3045 | + callback = _ref6[1]; | |
| 3046 | + | |
| 3047 | + return _this.registerCommandInternal(command, callback); | |
| 3048 | + }); | |
| 3049 | + (0, _values.default)(this.getHooks()).forEach(function (instance) { | |
| 3050 | + return _this.registerHook(instance); | |
| 3051 | + }); | |
| 3052 | + (0, _entries.default)(this.getData()).forEach(function (_ref7) { | |
| 3053 | + var _ref8 = (0, _slicedToArray2.default)(_ref7, 2), | |
| 3054 | + command = _ref8[0], | |
| 3055 | + callback = _ref8[1]; | |
| 3056 | + | |
| 3057 | + return _this.registerData(command, callback); | |
| 3058 | + }); | |
| 3059 | + } | |
| 171 | 3060 | /** |
| 172 | - * Function getHistory(). | |
| 3061 | + * @returns {string} | |
| 3062 | + */ | |
| 3063 | + | |
| 3064 | + }, { | |
| 3065 | + key: "getNamespace", | |
| 3066 | + value: function getNamespace() { | |
| 3067 | + elementorModules.ForceMethodImplementation(); | |
| 3068 | + } | |
| 3069 | + }, { | |
| 3070 | + key: "getRootContainer", | |
| 3071 | + value: function getRootContainer() { | |
| 3072 | + var parts = this.getNamespace().split('/'); | |
| 3073 | + return parts[0]; | |
| 3074 | + } | |
| 3075 | + }, { | |
| 3076 | + key: "defaultTabs", | |
| 3077 | + value: function defaultTabs() { | |
| 3078 | + return {}; | |
| 3079 | + } | |
| 3080 | + }, { | |
| 3081 | + key: "defaultRoutes", | |
| 3082 | + value: function defaultRoutes() { | |
| 3083 | + return {}; | |
| 3084 | + } | |
| 3085 | + }, { | |
| 3086 | + key: "defaultCommands", | |
| 3087 | + value: function defaultCommands() { | |
| 3088 | + return {}; | |
| 3089 | + } | |
| 3090 | + }, { | |
| 3091 | + key: "defaultCommandsInternal", | |
| 3092 | + value: function defaultCommandsInternal() { | |
| 3093 | + return {}; | |
| 3094 | + } | |
| 3095 | + }, { | |
| 3096 | + key: "defaultHooks", | |
| 3097 | + value: function defaultHooks() { | |
| 3098 | + return {}; | |
| 3099 | + } | |
| 3100 | + }, { | |
| 3101 | + key: "defaultShortcuts", | |
| 3102 | + value: function defaultShortcuts() { | |
| 3103 | + return {}; | |
| 3104 | + } | |
| 3105 | + }, { | |
| 3106 | + key: "defaultUtils", | |
| 3107 | + value: function defaultUtils() { | |
| 3108 | + return {}; | |
| 3109 | + } | |
| 3110 | + }, { | |
| 3111 | + key: "defaultData", | |
| 3112 | + value: function defaultData() { | |
| 3113 | + return {}; | |
| 3114 | + } | |
| 3115 | + }, { | |
| 3116 | + key: "getCommands", | |
| 3117 | + value: function getCommands() { | |
| 3118 | + return this.commands; | |
| 3119 | + } | |
| 3120 | + }, { | |
| 3121 | + key: "getCommandsInternal", | |
| 3122 | + value: function getCommandsInternal() { | |
| 3123 | + return this.commandsInternal; | |
| 3124 | + } | |
| 3125 | + }, { | |
| 3126 | + key: "getHooks", | |
| 3127 | + value: function getHooks() { | |
| 3128 | + return this.hooks; | |
| 3129 | + } | |
| 3130 | + }, { | |
| 3131 | + key: "getRoutes", | |
| 3132 | + value: function getRoutes() { | |
| 3133 | + return this.routes; | |
| 3134 | + } | |
| 3135 | + }, { | |
| 3136 | + key: "getTabs", | |
| 3137 | + value: function getTabs() { | |
| 3138 | + return this.tabs; | |
| 3139 | + } | |
| 3140 | + }, { | |
| 3141 | + key: "getShortcuts", | |
| 3142 | + value: function getShortcuts() { | |
| 3143 | + return this.shortcuts; | |
| 3144 | + } | |
| 3145 | + }, { | |
| 3146 | + key: "getData", | |
| 3147 | + value: function getData() { | |
| 3148 | + return this.data; | |
| 3149 | + } | |
| 3150 | + }, { | |
| 3151 | + key: "registerCommand", | |
| 3152 | + value: function registerCommand(command, callback) { | |
| 3153 | + $e.commands.register(this, command, callback); | |
| 3154 | + } | |
| 3155 | + /** | |
| 3156 | + * @param {HookBase} instance | |
| 3157 | + */ | |
| 3158 | + | |
| 3159 | + }, { | |
| 3160 | + key: "registerHook", | |
| 3161 | + value: function registerHook(instance) { | |
| 3162 | + return instance.register(); | |
| 3163 | + } | |
| 3164 | + }, { | |
| 3165 | + key: "registerCommandInternal", | |
| 3166 | + value: function registerCommandInternal(command, callback) { | |
| 3167 | + $e.commandsInternal.register(this, command, callback); | |
| 3168 | + } | |
| 3169 | + }, { | |
| 3170 | + key: "registerRoute", | |
| 3171 | + value: function registerRoute(route, callback) { | |
| 3172 | + $e.routes.register(this, route, callback); | |
| 3173 | + } | |
| 3174 | + }, { | |
| 3175 | + key: "registerData", | |
| 3176 | + value: function registerData(command, callback) { | |
| 3177 | + $e.data.register(this, command, callback); | |
| 3178 | + } | |
| 3179 | + }, { | |
| 3180 | + key: "unregisterRoute", | |
| 3181 | + value: function unregisterRoute(route) { | |
| 3182 | + $e.routes.unregister(this, route); | |
| 3183 | + } | |
| 3184 | + }, { | |
| 3185 | + key: "registerTabRoute", | |
| 3186 | + value: function registerTabRoute(tab) { | |
| 3187 | + var _this2 = this; | |
| 3188 | + | |
| 3189 | + this.registerRoute(tab, function (args) { | |
| 3190 | + return _this2.activateTab(tab, args); | |
| 3191 | + }); | |
| 3192 | + } | |
| 3193 | + }, { | |
| 3194 | + key: "dependency", | |
| 3195 | + value: function dependency() { | |
| 3196 | + return true; | |
| 3197 | + } | |
| 3198 | + }, { | |
| 3199 | + key: "open", | |
| 3200 | + value: function open() { | |
| 3201 | + return true; | |
| 3202 | + } | |
| 3203 | + }, { | |
| 3204 | + key: "close", | |
| 3205 | + value: function close() { | |
| 3206 | + if (!this.isOpen) { | |
| 3207 | + return false; | |
| 3208 | + } | |
| 3209 | + | |
| 3210 | + this.isOpen = false; | |
| 3211 | + this.inactivate(); | |
| 3212 | + $e.routes.clearCurrent(this.getNamespace()); | |
| 3213 | + $e.routes.clearHistory(this.getRootContainer()); | |
| 3214 | + return true; | |
| 3215 | + } | |
| 3216 | + }, { | |
| 3217 | + key: "activate", | |
| 3218 | + value: function activate() { | |
| 3219 | + $e.components.activate(this.getNamespace()); | |
| 3220 | + } | |
| 3221 | + }, { | |
| 3222 | + key: "inactivate", | |
| 3223 | + value: function inactivate() { | |
| 3224 | + $e.components.inactivate(this.getNamespace()); | |
| 3225 | + } | |
| 3226 | + }, { | |
| 3227 | + key: "isActive", | |
| 3228 | + value: function isActive() { | |
| 3229 | + return $e.components.isActive(this.getNamespace()); | |
| 3230 | + } | |
| 3231 | + }, { | |
| 3232 | + key: "onRoute", | |
| 3233 | + value: function onRoute(route) { | |
| 3234 | + this.toggleRouteClass(route, true); | |
| 3235 | + this.toggleHistoryClass(); | |
| 3236 | + this.activate(); | |
| 3237 | + this.trigger('route/open', route); | |
| 3238 | + } | |
| 3239 | + }, { | |
| 3240 | + key: "onCloseRoute", | |
| 3241 | + value: function onCloseRoute(route) { | |
| 3242 | + this.toggleRouteClass(route, false); | |
| 3243 | + this.inactivate(); | |
| 3244 | + this.trigger('route/close', route); | |
| 3245 | + } | |
| 3246 | + }, { | |
| 3247 | + key: "setDefaultRoute", | |
| 3248 | + value: function setDefaultRoute(route) { | |
| 3249 | + this.defaultRoute = this.getNamespace() + '/' + route; | |
| 3250 | + } | |
| 3251 | + }, { | |
| 3252 | + key: "getDefaultRoute", | |
| 3253 | + value: function getDefaultRoute() { | |
| 3254 | + return this.defaultRoute; | |
| 3255 | + } | |
| 3256 | + }, { | |
| 3257 | + key: "removeTab", | |
| 3258 | + value: function removeTab(tab) { | |
| 3259 | + delete this.tabs[tab]; | |
| 3260 | + this.unregisterRoute(tab); | |
| 3261 | + } | |
| 3262 | + }, { | |
| 3263 | + key: "hasTab", | |
| 3264 | + value: function hasTab(tab) { | |
| 3265 | + return !!this.tabs[tab]; | |
| 3266 | + } | |
| 3267 | + }, { | |
| 3268 | + key: "addTab", | |
| 3269 | + value: function addTab(tab, args, position) { | |
| 3270 | + var _this3 = this; | |
| 3271 | + | |
| 3272 | + this.tabs[tab] = args; // It can be 0. | |
| 3273 | + | |
| 3274 | + if ('undefined' !== typeof position) { | |
| 3275 | + var newTabs = {}; | |
| 3276 | + var ids = (0, _keys.default)(this.tabs); // Remove new tab | |
| 3277 | + | |
| 3278 | + ids.pop(); // Add it to position. | |
| 3279 | + | |
| 3280 | + ids.splice(position, 0, tab); | |
| 3281 | + ids.forEach(function (id) { | |
| 3282 | + newTabs[id] = _this3.tabs[id]; | |
| 3283 | + }); | |
| 3284 | + this.tabs = newTabs; | |
| 3285 | + } | |
| 3286 | + | |
| 3287 | + this.registerTabRoute(tab); | |
| 3288 | + } | |
| 3289 | + }, { | |
| 3290 | + key: "getTabsWrapperSelector", | |
| 3291 | + value: function getTabsWrapperSelector() { | |
| 3292 | + return ''; | |
| 3293 | + } | |
| 3294 | + }, { | |
| 3295 | + key: "getTabRoute", | |
| 3296 | + value: function getTabRoute(tab) { | |
| 3297 | + return this.getNamespace() + '/' + tab; | |
| 3298 | + } | |
| 3299 | + }, { | |
| 3300 | + key: "renderTab", | |
| 3301 | + value: function renderTab(tab) {} // eslint-disable-line | |
| 3302 | + | |
| 3303 | + }, { | |
| 3304 | + key: "activateTab", | |
| 3305 | + value: function activateTab(tab, args) { | |
| 3306 | + var _this4 = this; | |
| 3307 | + | |
| 3308 | + this.currentTab = tab; | |
| 3309 | + this.renderTab(tab, args); | |
| 3310 | + jQuery(this.getTabsWrapperSelector() + ' .elementor-component-tab').off('click').on('click', function (event) { | |
| 3311 | + $e.route(_this4.getTabRoute(event.currentTarget.dataset.tab), args); | |
| 3312 | + }).removeClass('elementor-active').filter('[data-tab="' + tab + '"]').addClass('elementor-active'); | |
| 3313 | + } | |
| 3314 | + }, { | |
| 3315 | + key: "getActiveTabConfig", | |
| 3316 | + value: function getActiveTabConfig() { | |
| 3317 | + return this.tabs[this.currentTab] || {}; | |
| 3318 | + } | |
| 3319 | + }, { | |
| 3320 | + key: "getBodyClass", | |
| 3321 | + value: function getBodyClass(route) { | |
| 3322 | + return 'e-route-' + route.replace(/\//g, '-'); | |
| 3323 | + } | |
| 3324 | + /** | |
| 3325 | + * If command includes uppercase character convert it to lowercase and add `-`. | |
| 3326 | + * e.g: `CopyAll` is converted to `copy-all`. | |
| 3327 | + */ | |
| 3328 | + | |
| 3329 | + }, { | |
| 3330 | + key: "normalizeCommandName", | |
| 3331 | + value: function normalizeCommandName(commandName) { | |
| 3332 | + return commandName.replace(/[A-Z]/g, function (match, offset) { | |
| 3333 | + return (offset > 0 ? '-' : '') + match.toLowerCase(); | |
| 3334 | + }); | |
| 3335 | + } | |
| 3336 | + }, { | |
| 3337 | + key: "importCommands", | |
| 3338 | + value: function importCommands(commandsFromImport) { | |
| 3339 | + var _this5 = this; | |
| 3340 | + | |
| 3341 | + var commands = {}; // Convert `Commands` to `ComponentBase` workable format. | |
| 3342 | + | |
| 3343 | + (0, _entries.default)(commandsFromImport).forEach(function (_ref9) { | |
| 3344 | + var _ref10 = (0, _slicedToArray2.default)(_ref9, 2), | |
| 3345 | + className = _ref10[0], | |
| 3346 | + Class = _ref10[1]; | |
| 3347 | + | |
| 3348 | + var command = _this5.normalizeCommandName(className); | |
| 3349 | + | |
| 3350 | + commands[command] = function (args) { | |
| 3351 | + return new Class(args).run(); | |
| 3352 | + }; // TODO: Temporary code, remove after merge with 'require-commands-base' branch. | |
| 3353 | + // should not return callback, but Class or Instance without run ( gain performance ). | |
| 3354 | + | |
| 3355 | + | |
| 3356 | + $e.commands.classes[_this5.getNamespace() + '/' + command] = Class; | |
| 3357 | + }); | |
| 3358 | + return commands; | |
| 3359 | + } | |
| 3360 | + }, { | |
| 3361 | + key: "importHooks", | |
| 3362 | + value: function importHooks(hooksFromImport) { | |
| 3363 | + var hooks = {}; | |
| 3364 | + | |
| 3365 | + for (var key in hooksFromImport) { | |
| 3366 | + var hook = new hooksFromImport[key](); | |
| 3367 | + hooks[hook.getId()] = hook; | |
| 3368 | + } | |
| 3369 | + | |
| 3370 | + return hooks; | |
| 3371 | + } | |
| 3372 | + }, { | |
| 3373 | + key: "toggleRouteClass", | |
| 3374 | + value: function toggleRouteClass(route, state) { | |
| 3375 | + elementorCommon.elements.$body.toggleClass(this.getBodyClass(route), state); | |
| 3376 | + } | |
| 3377 | + }, { | |
| 3378 | + key: "toggleHistoryClass", | |
| 3379 | + value: function toggleHistoryClass() { | |
| 3380 | + elementorCommon.elements.$body.toggleClass('e-routes-has-history', !!$e.routes.getHistory(this.getRootContainer()).length); | |
| 3381 | + } | |
| 3382 | + }]); | |
| 3383 | + return ComponentBase; | |
| 3384 | +}(elementorModules.Module); | |
| 3385 | + | |
| 3386 | +exports.default = ComponentBase; | |
| 3387 | + | |
| 3388 | +/***/ }), | |
| 3389 | +/* 88 */ | |
| 3390 | +/***/ (function(module, exports, __webpack_require__) { | |
| 3391 | + | |
| 3392 | +var isObject = __webpack_require__(9); | |
| 3393 | +var document = __webpack_require__(8).document; | |
| 3394 | +// typeof document.createElement is 'object' in old IE | |
| 3395 | +var is = isObject(document) && isObject(document.createElement); | |
| 3396 | +module.exports = function (it) { | |
| 3397 | + return is ? document.createElement(it) : {}; | |
| 3398 | +}; | |
| 3399 | + | |
| 3400 | + | |
| 3401 | +/***/ }), | |
| 3402 | +/* 89 */ | |
| 3403 | +/***/ (function(module, exports, __webpack_require__) { | |
| 3404 | + | |
| 3405 | +module.exports = __webpack_require__(22); | |
| 3406 | + | |
| 3407 | + | |
| 3408 | +/***/ }), | |
| 3409 | +/* 90 */ | |
| 3410 | +/***/ (function(module, exports, __webpack_require__) { | |
| 3411 | + | |
| 3412 | +// 22.1.3.31 Array.prototype[@@unscopables] | |
| 3413 | +var UNSCOPABLES = __webpack_require__(13)('unscopables'); | |
| 3414 | +var ArrayProto = Array.prototype; | |
| 3415 | +if (ArrayProto[UNSCOPABLES] == undefined) __webpack_require__(30)(ArrayProto, UNSCOPABLES, {}); | |
| 3416 | +module.exports = function (key) { | |
| 3417 | + ArrayProto[UNSCOPABLES][key] = true; | |
| 3418 | +}; | |
| 3419 | + | |
| 3420 | + | |
| 3421 | +/***/ }), | |
| 3422 | +/* 91 */ | |
| 3423 | +/***/ (function(module, exports, __webpack_require__) { | |
| 3424 | + | |
| 3425 | +// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) | |
| 3426 | +var $keys = __webpack_require__(112); | |
| 3427 | +var hiddenKeys = __webpack_require__(74).concat('length', 'prototype'); | |
| 3428 | + | |
| 3429 | +exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { | |
| 3430 | + return $keys(O, hiddenKeys); | |
| 3431 | +}; | |
| 3432 | + | |
| 3433 | + | |
| 3434 | +/***/ }), | |
| 3435 | +/* 92 */ | |
| 3436 | +/***/ (function(module, exports) { | |
| 3437 | + | |
| 3438 | + | |
| 3439 | + | |
| 3440 | +/***/ }), | |
| 3441 | +/* 93 */ | |
| 3442 | +/***/ (function(module, exports, __webpack_require__) { | |
| 3443 | + | |
| 3444 | +module.exports = __webpack_require__(269); | |
| 3445 | + | |
| 3446 | +/***/ }), | |
| 3447 | +/* 94 */ | |
| 3448 | +/***/ (function(module, exports, __webpack_require__) { | |
| 3449 | + | |
| 3450 | +"use strict"; | |
| 3451 | + | |
| 3452 | + | |
| 3453 | +var regexpFlags = __webpack_require__(109); | |
| 3454 | + | |
| 3455 | +var nativeExec = RegExp.prototype.exec; | |
| 3456 | +// This always refers to the native implementation, because the | |
| 3457 | +// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js, | |
| 3458 | +// which loads this file before patching the method. | |
| 3459 | +var nativeReplace = String.prototype.replace; | |
| 3460 | + | |
| 3461 | +var patchedExec = nativeExec; | |
| 3462 | + | |
| 3463 | +var LAST_INDEX = 'lastIndex'; | |
| 3464 | + | |
| 3465 | +var UPDATES_LAST_INDEX_WRONG = (function () { | |
| 3466 | + var re1 = /a/, | |
| 3467 | + re2 = /b*/g; | |
| 3468 | + nativeExec.call(re1, 'a'); | |
| 3469 | + nativeExec.call(re2, 'a'); | |
| 3470 | + return re1[LAST_INDEX] !== 0 || re2[LAST_INDEX] !== 0; | |
| 3471 | +})(); | |
| 3472 | + | |
| 3473 | +// nonparticipating capturing group, copied from es5-shim's String#split patch. | |
| 3474 | +var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined; | |
| 3475 | + | |
| 3476 | +var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED; | |
| 3477 | + | |
| 3478 | +if (PATCH) { | |
| 3479 | + patchedExec = function exec(str) { | |
| 3480 | + var re = this; | |
| 3481 | + var lastIndex, reCopy, match, i; | |
| 3482 | + | |
| 3483 | + if (NPCG_INCLUDED) { | |
| 3484 | + reCopy = new RegExp('^' + re.source + '$(?!\\s)', regexpFlags.call(re)); | |
| 3485 | + } | |
| 3486 | + if (UPDATES_LAST_INDEX_WRONG) lastIndex = re[LAST_INDEX]; | |
| 3487 | + | |
| 3488 | + match = nativeExec.call(re, str); | |
| 3489 | + | |
| 3490 | + if (UPDATES_LAST_INDEX_WRONG && match) { | |
| 3491 | + re[LAST_INDEX] = re.global ? match.index + match[0].length : lastIndex; | |
| 3492 | + } | |
| 3493 | + if (NPCG_INCLUDED && match && match.length > 1) { | |
| 3494 | + // Fix browsers whose `exec` methods don't consistently return `undefined` | |
| 3495 | + // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/ | |
| 3496 | + // eslint-disable-next-line no-loop-func | |
| 3497 | + nativeReplace.call(match[0], reCopy, function () { | |
| 3498 | + for (i = 1; i < arguments.length - 2; i++) { | |
| 3499 | + if (arguments[i] === undefined) match[i] = undefined; | |
| 3500 | + } | |
| 3501 | + }); | |
| 3502 | + } | |
| 3503 | + | |
| 3504 | + return match; | |
| 3505 | + }; | |
| 3506 | +} | |
| 3507 | + | |
| 3508 | +module.exports = patchedExec; | |
| 3509 | + | |
| 3510 | + | |
| 3511 | +/***/ }), | |
| 3512 | +/* 95 */ | |
| 3513 | +/***/ (function(module, exports, __webpack_require__) { | |
| 3514 | + | |
| 3515 | +module.exports = __webpack_require__(164); | |
| 3516 | + | |
| 3517 | +/***/ }), | |
| 3518 | +/* 96 */ | |
| 3519 | +/***/ (function(module, exports, __webpack_require__) { | |
| 3520 | + | |
| 3521 | +"use strict"; | |
| 3522 | + | |
| 3523 | +var LIBRARY = __webpack_require__(44); | |
| 3524 | +var $export = __webpack_require__(7); | |
| 3525 | +var redefine = __webpack_require__(89); | |
| 3526 | +var hide = __webpack_require__(22); | |
| 3527 | +var Iterators = __webpack_require__(33); | |
| 3528 | +var $iterCreate = __webpack_require__(170); | |
| 3529 | +var setToStringTag = __webpack_require__(53); | |
| 3530 | +var getPrototypeOf = __webpack_require__(63); | |
| 3531 | +var ITERATOR = __webpack_require__(10)('iterator'); | |
| 3532 | +var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` | |
| 3533 | +var FF_ITERATOR = '@@iterator'; | |
| 3534 | +var KEYS = 'keys'; | |
| 3535 | +var VALUES = 'values'; | |
| 3536 | + | |
| 3537 | +var returnThis = function () { return this; }; | |
| 3538 | + | |
| 3539 | +module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { | |
| 3540 | + $iterCreate(Constructor, NAME, next); | |
| 3541 | + var getMethod = function (kind) { | |
| 3542 | + if (!BUGGY && kind in proto) return proto[kind]; | |
| 3543 | + switch (kind) { | |
| 3544 | + case KEYS: return function keys() { return new Constructor(this, kind); }; | |
| 3545 | + case VALUES: return function values() { return new Constructor(this, kind); }; | |
| 3546 | + } return function entries() { return new Constructor(this, kind); }; | |
| 3547 | + }; | |
| 3548 | + var TAG = NAME + ' Iterator'; | |
| 3549 | + var DEF_VALUES = DEFAULT == VALUES; | |
| 3550 | + var VALUES_BUG = false; | |
| 3551 | + var proto = Base.prototype; | |
| 3552 | + var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; | |
| 3553 | + var $default = $native || getMethod(DEFAULT); | |
| 3554 | + var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; | |
| 3555 | + var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; | |
| 3556 | + var methods, key, IteratorPrototype; | |
| 3557 | + // Fix native | |
| 3558 | + if ($anyNative) { | |
| 3559 | + IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); | |
| 3560 | + if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { | |
| 3561 | + // Set @@toStringTag to native iterators | |
| 3562 | + setToStringTag(IteratorPrototype, TAG, true); | |
| 3563 | + // fix for some old engines | |
| 3564 | + if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis); | |
| 3565 | + } | |
| 3566 | + } | |
| 3567 | + // fix Array#{values, @@iterator}.name in V8 / FF | |
| 3568 | + if (DEF_VALUES && $native && $native.name !== VALUES) { | |
| 3569 | + VALUES_BUG = true; | |
| 3570 | + $default = function values() { return $native.call(this); }; | |
| 3571 | + } | |
| 3572 | + // Define iterator | |
| 3573 | + if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { | |
| 3574 | + hide(proto, ITERATOR, $default); | |
| 3575 | + } | |
| 3576 | + // Plug for library | |
| 3577 | + Iterators[NAME] = $default; | |
| 3578 | + Iterators[TAG] = returnThis; | |
| 3579 | + if (DEFAULT) { | |
| 3580 | + methods = { | |
| 3581 | + values: DEF_VALUES ? $default : getMethod(VALUES), | |
| 3582 | + keys: IS_SET ? $default : getMethod(KEYS), | |
| 3583 | + entries: $entries | |
| 3584 | + }; | |
| 3585 | + if (FORCED) for (key in methods) { | |
| 3586 | + if (!(key in proto)) redefine(proto, key, methods[key]); | |
| 3587 | + } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); | |
| 3588 | + } | |
| 3589 | + return methods; | |
| 3590 | +}; | |
| 3591 | + | |
| 3592 | + | |
| 3593 | +/***/ }), | |
| 3594 | +/* 97 */ | |
| 3595 | +/***/ (function(module, exports, __webpack_require__) { | |
| 3596 | + | |
| 3597 | +// 7.2.2 IsArray(argument) | |
| 3598 | +var cof = __webpack_require__(56); | |
| 3599 | +module.exports = Array.isArray || function isArray(arg) { | |
| 3600 | + return cof(arg) == 'Array'; | |
| 3601 | +}; | |
| 3602 | + | |
| 3603 | + | |
| 3604 | +/***/ }), | |
| 3605 | +/* 98 */ | |
| 3606 | +/***/ (function(module, exports) { | |
| 3607 | + | |
| 3608 | +module.exports = function (it) { | |
| 3609 | + if (typeof it != 'function') throw TypeError(it + ' is not a function!'); | |
| 3610 | + return it; | |
| 3611 | +}; | |
| 3612 | + | |
| 3613 | + | |
| 3614 | +/***/ }), | |
| 3615 | +/* 99 */ | |
| 3616 | +/***/ (function(module, exports, __webpack_require__) { | |
| 3617 | + | |
| 3618 | +// getting tag from 19.1.3.6 Object.prototype.toString() | |
| 3619 | +var cof = __webpack_require__(56); | |
| 3620 | +var TAG = __webpack_require__(10)('toStringTag'); | |
| 3621 | +// ES3 wrong here | |
| 3622 | +var ARG = cof(function () { return arguments; }()) == 'Arguments'; | |
| 3623 | + | |
| 3624 | +// fallback for IE11 Script Access Denied error | |
| 3625 | +var tryGet = function (it, key) { | |
| 3626 | + try { | |
| 3627 | + return it[key]; | |
| 3628 | + } catch (e) { /* empty */ } | |
| 3629 | +}; | |
| 3630 | + | |
| 3631 | +module.exports = function (it) { | |
| 3632 | + var O, T, B; | |
| 3633 | + return it === undefined ? 'Undefined' : it === null ? 'Null' | |
| 3634 | + // @@toStringTag case | |
| 3635 | + : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T | |
| 3636 | + // builtinTag case | |
| 3637 | + : ARG ? cof(O) | |
| 3638 | + // ES3 arguments fallback | |
| 3639 | + : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; | |
| 3640 | +}; | |
| 3641 | + | |
| 3642 | + | |
| 3643 | +/***/ }), | |
| 3644 | +/* 100 */ | |
| 3645 | +/***/ (function(module, exports, __webpack_require__) { | |
| 3646 | + | |
| 3647 | +"use strict"; | |
| 3648 | + | |
| 3649 | + | |
| 3650 | +var classof = __webpack_require__(118); | |
| 3651 | +var builtinExec = RegExp.prototype.exec; | |
| 3652 | + | |
| 3653 | + // `RegExpExec` abstract operation | |
| 3654 | +// https://tc39.github.io/ecma262/#sec-regexpexec | |
| 3655 | +module.exports = function (R, S) { | |
| 3656 | + var exec = R.exec; | |
| 3657 | + if (typeof exec === 'function') { | |
| 3658 | + var result = exec.call(R, S); | |
| 3659 | + if (typeof result !== 'object') { | |
| 3660 | + throw new TypeError('RegExp exec method returned something other than an Object or null'); | |
| 3661 | + } | |
| 3662 | + return result; | |
| 3663 | + } | |
| 3664 | + if (classof(R) !== 'RegExp') { | |
| 3665 | + throw new TypeError('RegExp#exec called on incompatible receiver'); | |
| 3666 | + } | |
| 3667 | + return builtinExec.call(R, S); | |
| 3668 | +}; | |
| 3669 | + | |
| 3670 | + | |
| 3671 | +/***/ }), | |
| 3672 | +/* 101 */ | |
| 3673 | +/***/ (function(module, exports, __webpack_require__) { | |
| 3674 | + | |
| 3675 | +"use strict"; | |
| 3676 | + | |
| 3677 | +__webpack_require__(197); | |
| 3678 | +var redefine = __webpack_require__(39); | |
| 3679 | +var hide = __webpack_require__(30); | |
| 3680 | +var fails = __webpack_require__(36); | |
| 3681 | +var defined = __webpack_require__(43); | |
| 3682 | +var wks = __webpack_require__(13); | |
| 3683 | +var regexpExec = __webpack_require__(94); | |
| 3684 | + | |
| 3685 | +var SPECIES = wks('species'); | |
| 3686 | + | |
| 3687 | +var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () { | |
| 3688 | + // #replace needs built-in support for named groups. | |
| 3689 | + // #match works fine because it just return the exec results, even if it has | |
| 3690 | + // a "grops" property. | |
| 3691 | + var re = /./; | |
| 3692 | + re.exec = function () { | |
| 3693 | + var result = []; | |
| 3694 | + result.groups = { a: '7' }; | |
| 3695 | + return result; | |
| 3696 | + }; | |
| 3697 | + return ''.replace(re, '$<a>') !== '7'; | |
| 3698 | +}); | |
| 3699 | + | |
| 3700 | +var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = (function () { | |
| 3701 | + // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec | |
| 3702 | + var re = /(?:)/; | |
| 3703 | + var originalExec = re.exec; | |
| 3704 | + re.exec = function () { return originalExec.apply(this, arguments); }; | |
| 3705 | + var result = 'ab'.split(re); | |
| 3706 | + return result.length === 2 && result[0] === 'a' && result[1] === 'b'; | |
| 3707 | +})(); | |
| 3708 | + | |
| 3709 | +module.exports = function (KEY, length, exec) { | |
| 3710 | + var SYMBOL = wks(KEY); | |
| 3711 | + | |
| 3712 | + var DELEGATES_TO_SYMBOL = !fails(function () { | |
| 3713 | + // String methods call symbol-named RegEp methods | |
| 3714 | + var O = {}; | |
| 3715 | + O[SYMBOL] = function () { return 7; }; | |
| 3716 | + return ''[KEY](O) != 7; | |
| 3717 | + }); | |
| 3718 | + | |
| 3719 | + var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL ? !fails(function () { | |
| 3720 | + // Symbol-named RegExp methods call .exec | |
| 3721 | + var execCalled = false; | |
| 3722 | + var re = /a/; | |
| 3723 | + re.exec = function () { execCalled = true; return null; }; | |
| 3724 | + if (KEY === 'split') { | |
| 3725 | + // RegExp[@@split] doesn't call the regex's exec method, but first creates | |
| 3726 | + // a new one. We need to return the patched regex when creating the new one. | |
| 3727 | + re.constructor = {}; | |
| 3728 | + re.constructor[SPECIES] = function () { return re; }; | |
| 3729 | + } | |
| 3730 | + re[SYMBOL](''); | |
| 3731 | + return !execCalled; | |
| 3732 | + }) : undefined; | |
| 3733 | + | |
| 3734 | + if ( | |
| 3735 | + !DELEGATES_TO_SYMBOL || | |
| 3736 | + !DELEGATES_TO_EXEC || | |
| 3737 | + (KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) || | |
| 3738 | + (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC) | |
| 3739 | + ) { | |
| 3740 | + var nativeRegExpMethod = /./[SYMBOL]; | |
| 3741 | + var fns = exec( | |
| 3742 | + defined, | |
| 3743 | + SYMBOL, | |
| 3744 | + ''[KEY], | |
| 3745 | + function maybeCallNative(nativeMethod, regexp, str, arg2, forceStringMethod) { | |
| 3746 | + if (regexp.exec === regexpExec) { | |
| 3747 | + if (DELEGATES_TO_SYMBOL && !forceStringMethod) { | |
| 3748 | + // The native String method already delegates to @@method (this | |
| 3749 | + // polyfilled function), leasing to infinite recursion. | |
| 3750 | + // We avoid it by directly calling the native @@method method. | |
| 3751 | + return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) }; | |
| 3752 | + } | |
| 3753 | + return { done: true, value: nativeMethod.call(str, regexp, arg2) }; | |
| 3754 | + } | |
| 3755 | + return { done: false }; | |
| 3756 | + } | |
| 3757 | + ); | |
| 3758 | + var strfn = fns[0]; | |
| 3759 | + var rxfn = fns[1]; | |
| 3760 | + | |
| 3761 | + redefine(String.prototype, KEY, strfn); | |
| 3762 | + hide(RegExp.prototype, SYMBOL, length == 2 | |
| 3763 | + // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue) | |
| 3764 | + // 21.2.5.11 RegExp.prototype[@@split](string, limit) | |
| 3765 | + ? function (string, arg) { return rxfn.call(string, this, arg); } | |
| 3766 | + // 21.2.5.6 RegExp.prototype[@@match](string) | |
| 3767 | + // 21.2.5.9 RegExp.prototype[@@search](string) | |
| 3768 | + : function (string) { return rxfn.call(string, this); } | |
| 3769 | + ); | |
| 3770 | + } | |
| 3771 | +}; | |
| 3772 | + | |
| 3773 | + | |
| 3774 | +/***/ }), | |
| 3775 | +/* 102 */ | |
| 3776 | +/***/ (function(module, exports, __webpack_require__) { | |
| 3777 | + | |
| 3778 | +// 7.1.13 ToObject(argument) | |
| 3779 | +var defined = __webpack_require__(43); | |
| 3780 | +module.exports = function (it) { | |
| 3781 | + return Object(defined(it)); | |
| 3782 | +}; | |
| 3783 | + | |
| 3784 | + | |
| 3785 | +/***/ }), | |
| 3786 | +/* 103 */ | |
| 3787 | +/***/ (function(module, exports, __webpack_require__) { | |
| 3788 | + | |
| 3789 | +// fallback for non-array-like ES3 and non-enumerable old V8 strings | |
| 3790 | +var cof = __webpack_require__(56); | |
| 3791 | +// eslint-disable-next-line no-prototype-builtins | |
| 3792 | +module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { | |
| 3793 | + return cof(it) == 'String' ? it.split('') : Object(it); | |
| 3794 | +}; | |
| 3795 | + | |
| 3796 | + | |
| 3797 | +/***/ }), | |
| 3798 | +/* 104 */ | |
| 3799 | +/***/ (function(module, exports, __webpack_require__) { | |
| 3800 | + | |
| 3801 | +// to indexed object, toObject with fallback for non-array-like ES3 strings | |
| 3802 | +var IObject = __webpack_require__(125); | |
| 3803 | +var defined = __webpack_require__(43); | |
| 3804 | +module.exports = function (it) { | |
| 3805 | + return IObject(defined(it)); | |
| 3806 | +}; | |
| 3807 | + | |
| 3808 | + | |
| 3809 | +/***/ }), | |
| 3810 | +/* 105 */ | |
| 3811 | +/***/ (function(module, exports, __webpack_require__) { | |
| 3812 | + | |
| 3813 | +var arrayWithHoles = __webpack_require__(247); | |
| 3814 | + | |
| 3815 | +var iterableToArrayLimit = __webpack_require__(248); | |
| 3816 | + | |
| 3817 | +var unsupportedIterableToArray = __webpack_require__(194); | |
| 3818 | + | |
| 3819 | +var nonIterableRest = __webpack_require__(251); | |
| 3820 | + | |
| 3821 | +function _slicedToArray(arr, i) { | |
| 3822 | + return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest(); | |
| 3823 | +} | |
| 3824 | + | |
| 3825 | +module.exports = _slicedToArray; | |
| 3826 | + | |
| 3827 | +/***/ }), | |
| 3828 | +/* 106 */ | |
| 3829 | +/***/ (function(module, exports) { | |
| 3830 | + | |
| 3831 | +module.exports = function (bitmap, value) { | |
| 3832 | + return { | |
| 3833 | + enumerable: !(bitmap & 1), | |
| 3834 | + configurable: !(bitmap & 2), | |
| 3835 | + writable: !(bitmap & 4), | |
| 3836 | + value: value | |
| 3837 | + }; | |
| 3838 | +}; | |
| 3839 | + | |
| 3840 | + | |
| 3841 | +/***/ }), | |
| 3842 | +/* 107 */ | |
| 3843 | +/***/ (function(module, exports, __webpack_require__) { | |
| 3844 | + | |
| 3845 | +module.exports = __webpack_require__(173); | |
| 3846 | + | |
| 3847 | +/***/ }), | |
| 3848 | +/* 108 */ | |
| 3849 | +/***/ (function(module, exports, __webpack_require__) { | |
| 3850 | + | |
| 3851 | +"use strict"; | |
| 3852 | + | |
| 3853 | +var at = __webpack_require__(146)(true); | |
| 3854 | + | |
| 3855 | + // `AdvanceStringIndex` abstract operation | |
| 3856 | +// https://tc39.github.io/ecma262/#sec-advancestringindex | |
| 3857 | +module.exports = function (S, index, unicode) { | |
| 3858 | + return index + (unicode ? at(S, index).length : 1); | |
| 3859 | +}; | |
| 3860 | + | |
| 3861 | + | |
| 3862 | +/***/ }), | |
| 3863 | +/* 109 */ | |
| 3864 | +/***/ (function(module, exports, __webpack_require__) { | |
| 3865 | + | |
| 3866 | +"use strict"; | |
| 3867 | + | |
| 3868 | +// 21.2.5.3 get RegExp.prototype.flags | |
| 3869 | +var anObject = __webpack_require__(20); | |
| 3870 | +module.exports = function () { | |
| 3871 | + var that = anObject(this); | |
| 3872 | + var result = ''; | |
| 3873 | + if (that.global) result += 'g'; | |
| 3874 | + if (that.ignoreCase) result += 'i'; | |
| 3875 | + if (that.multiline) result += 'm'; | |
| 3876 | + if (that.unicode) result += 'u'; | |
| 3877 | + if (that.sticky) result += 'y'; | |
| 3878 | + return result; | |
| 3879 | +}; | |
| 3880 | + | |
| 3881 | + | |
| 3882 | +/***/ }), | |
| 3883 | +/* 110 */ | |
| 3884 | +/***/ (function(module, exports, __webpack_require__) { | |
| 3885 | + | |
| 3886 | +module.exports = !__webpack_require__(14) && !__webpack_require__(21)(function () { | |
| 3887 | + return Object.defineProperty(__webpack_require__(88)('div'), 'a', { get: function () { return 7; } }).a != 7; | |
| 3888 | +}); | |
| 3889 | + | |
| 3890 | + | |
| 3891 | +/***/ }), | |
| 3892 | +/* 111 */ | |
| 3893 | +/***/ (function(module, exports, __webpack_require__) { | |
| 3894 | + | |
| 3895 | +module.exports = __webpack_require__(157); | |
| 3896 | + | |
| 3897 | +/***/ }), | |
| 3898 | +/* 112 */ | |
| 3899 | +/***/ (function(module, exports, __webpack_require__) { | |
| 3900 | + | |
| 3901 | +var has = __webpack_require__(17); | |
| 3902 | +var toIObject = __webpack_require__(19); | |
| 3903 | +var arrayIndexOf = __webpack_require__(162)(false); | |
| 3904 | +var IE_PROTO = __webpack_require__(70)('IE_PROTO'); | |
| 3905 | + | |
| 3906 | +module.exports = function (object, names) { | |
| 3907 | + var O = toIObject(object); | |
| 3908 | + var i = 0; | |
| 3909 | + var result = []; | |
| 3910 | + var key; | |
| 3911 | + for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); | |
| 3912 | + // Don't enum bug & hidden keys | |
| 3913 | + while (names.length > i) if (has(O, key = names[i++])) { | |
| 3914 | + ~arrayIndexOf(result, key) || result.push(key); | |
| 3915 | + } | |
| 3916 | + return result; | |
| 3917 | +}; | |
| 3918 | + | |
| 3919 | + | |
| 3920 | +/***/ }), | |
| 3921 | +/* 113 */ | |
| 3922 | +/***/ (function(module, exports, __webpack_require__) { | |
| 3923 | + | |
| 3924 | +var isObject = __webpack_require__(9); | |
| 3925 | +module.exports = function (it, TYPE) { | |
| 3926 | + if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!'); | |
| 3927 | + return it; | |
| 3928 | +}; | |
| 3929 | + | |
| 3930 | + | |
| 3931 | +/***/ }), | |
| 3932 | +/* 114 */ | |
| 3933 | +/***/ (function(module, exports, __webpack_require__) { | |
| 3934 | + | |
| 3935 | +var isObject = __webpack_require__(31); | |
| 3936 | +var document = __webpack_require__(18).document; | |
| 3937 | +// typeof document.createElement is 'object' in old IE | |
| 3938 | +var is = isObject(document) && isObject(document.createElement); | |
| 3939 | +module.exports = function (it) { | |
| 3940 | + return is ? document.createElement(it) : {}; | |
| 3941 | +}; | |
| 3942 | + | |
| 3943 | + | |
| 3944 | +/***/ }), | |
| 3945 | +/* 115 */ | |
| 3946 | +/***/ (function(module, exports) { | |
| 3947 | + | |
| 3948 | +module.exports = false; | |
| 3949 | + | |
| 3950 | + | |
| 3951 | +/***/ }), | |
| 3952 | +/* 116 */ | |
| 3953 | +/***/ (function(module, exports, __webpack_require__) { | |
| 3954 | + | |
| 3955 | +module.exports = __webpack_require__(184); | |
| 3956 | + | |
| 3957 | +/***/ }), | |
| 3958 | +/* 117 */ | |
| 3959 | +/***/ (function(module, exports, __webpack_require__) { | |
| 3960 | + | |
| 3961 | +var classof = __webpack_require__(99); | |
| 3962 | +var ITERATOR = __webpack_require__(10)('iterator'); | |
| 3963 | +var Iterators = __webpack_require__(33); | |
| 3964 | +module.exports = __webpack_require__(6).getIteratorMethod = function (it) { | |
| 3965 | + if (it != undefined) return it[ITERATOR] | |
| 3966 | + || it['@@iterator'] | |
| 3967 | + || Iterators[classof(it)]; | |
| 3968 | +}; | |
| 3969 | + | |
| 3970 | + | |
| 3971 | +/***/ }), | |
| 3972 | +/* 118 */ | |
| 3973 | +/***/ (function(module, exports, __webpack_require__) { | |
| 3974 | + | |
| 3975 | +// getting tag from 19.1.3.6 Object.prototype.toString() | |
| 3976 | +var cof = __webpack_require__(52); | |
| 3977 | +var TAG = __webpack_require__(13)('toStringTag'); | |
| 3978 | +// ES3 wrong here | |
| 3979 | +var ARG = cof(function () { return arguments; }()) == 'Arguments'; | |
| 3980 | + | |
| 3981 | +// fallback for IE11 Script Access Denied error | |
| 3982 | +var tryGet = function (it, key) { | |
| 3983 | + try { | |
| 3984 | + return it[key]; | |
| 3985 | + } catch (e) { /* empty */ } | |
| 3986 | +}; | |
| 3987 | + | |
| 3988 | +module.exports = function (it) { | |
| 3989 | + var O, T, B; | |
| 3990 | + return it === undefined ? 'Undefined' : it === null ? 'Null' | |
| 3991 | + // @@toStringTag case | |
| 3992 | + : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T | |
| 3993 | + // builtinTag case | |
| 3994 | + : ARG ? cof(O) | |
| 3995 | + // ES3 arguments fallback | |
| 3996 | + : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; | |
| 3997 | +}; | |
| 3998 | + | |
| 3999 | + | |
| 4000 | +/***/ }), | |
| 4001 | +/* 119 */ | |
| 4002 | +/***/ (function(module, exports, __webpack_require__) { | |
| 4003 | + | |
| 4004 | +var _Object$setPrototypeOf = __webpack_require__(111); | |
| 4005 | + | |
| 4006 | +function _setPrototypeOf(o, p) { | |
| 4007 | + module.exports = _setPrototypeOf = _Object$setPrototypeOf || function _setPrototypeOf(o, p) { | |
| 4008 | + o.__proto__ = p; | |
| 4009 | + return o; | |
| 4010 | + }; | |
| 4011 | + | |
| 4012 | + return _setPrototypeOf(o, p); | |
| 4013 | +} | |
| 4014 | + | |
| 4015 | +module.exports = _setPrototypeOf; | |
| 4016 | + | |
| 4017 | +/***/ }), | |
| 4018 | +/* 120 */ | |
| 4019 | +/***/ (function(module, exports) { | |
| 4020 | + | |
| 4021 | +module.exports = function (it, Constructor, name, forbiddenField) { | |
| 4022 | + if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) { | |
| 4023 | + throw TypeError(name + ': incorrect invocation!'); | |
| 4024 | + } return it; | |
| 4025 | +}; | |
| 4026 | + | |
| 4027 | + | |
| 4028 | +/***/ }), | |
| 4029 | +/* 121 */ | |
| 4030 | +/***/ (function(module, exports, __webpack_require__) { | |
| 4031 | + | |
| 4032 | +var hide = __webpack_require__(22); | |
| 4033 | +module.exports = function (target, src, safe) { | |
| 4034 | + for (var key in src) { | |
| 4035 | + if (safe && target[key]) target[key] = src[key]; | |
| 4036 | + else hide(target, key, src[key]); | |
| 4037 | + } return target; | |
| 4038 | +}; | |
| 4039 | + | |
| 4040 | + | |
| 4041 | +/***/ }), | |
| 4042 | +/* 122 */ | |
| 4043 | +/***/ (function(module, exports, __webpack_require__) { | |
| 4044 | + | |
| 4045 | +"use strict"; | |
| 4046 | + | |
| 4047 | +var addToUnscopables = __webpack_require__(90); | |
| 4048 | +var step = __webpack_require__(241); | |
| 4049 | +var Iterators = __webpack_require__(123); | |
| 4050 | +var toIObject = __webpack_require__(104); | |
| 4051 | + | |
| 4052 | +// 22.1.3.4 Array.prototype.entries() | |
| 4053 | +// 22.1.3.13 Array.prototype.keys() | |
| 4054 | +// 22.1.3.29 Array.prototype.values() | |
| 4055 | +// 22.1.3.30 Array.prototype[@@iterator]() | |
| 4056 | +module.exports = __webpack_require__(198)(Array, 'Array', function (iterated, kind) { | |
| 4057 | + this._t = toIObject(iterated); // target | |
| 4058 | + this._i = 0; // next index | |
| 4059 | + this._k = kind; // kind | |
| 4060 | +// 22.1.5.2.1 %ArrayIteratorPrototype%.next() | |
| 4061 | +}, function () { | |
| 4062 | + var O = this._t; | |
| 4063 | + var kind = this._k; | |
| 4064 | + var index = this._i++; | |
| 4065 | + if (!O || index >= O.length) { | |
| 4066 | + this._t = undefined; | |
| 4067 | + return step(1); | |
| 4068 | + } | |
| 4069 | + if (kind == 'keys') return step(0, index); | |
| 4070 | + if (kind == 'values') return step(0, O[index]); | |
| 4071 | + return step(0, [index, O[index]]); | |
| 4072 | +}, 'values'); | |
| 4073 | + | |
| 4074 | +// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) | |
| 4075 | +Iterators.Arguments = Iterators.Array; | |
| 4076 | + | |
| 4077 | +addToUnscopables('keys'); | |
| 4078 | +addToUnscopables('values'); | |
| 4079 | +addToUnscopables('entries'); | |
| 4080 | + | |
| 4081 | + | |
| 4082 | +/***/ }), | |
| 4083 | +/* 123 */ | |
| 4084 | +/***/ (function(module, exports) { | |
| 4085 | + | |
| 4086 | +module.exports = {}; | |
| 4087 | + | |
| 4088 | + | |
| 4089 | +/***/ }), | |
| 4090 | +/* 124 */ | |
| 4091 | +/***/ (function(module, exports, __webpack_require__) { | |
| 4092 | + | |
| 4093 | +"use strict"; | |
| 4094 | + | |
| 4095 | + | |
| 4096 | +var anObject = __webpack_require__(20); | |
| 4097 | +var toLength = __webpack_require__(46); | |
| 4098 | +var advanceStringIndex = __webpack_require__(108); | |
| 4099 | +var regExpExec = __webpack_require__(100); | |
| 4100 | + | |
| 4101 | +// @@match logic | |
| 4102 | +__webpack_require__(101)('match', 1, function (defined, MATCH, $match, maybeCallNative) { | |
| 4103 | + return [ | |
| 4104 | + // `String.prototype.match` method | |
| 4105 | + // https://tc39.github.io/ecma262/#sec-string.prototype.match | |
| 4106 | + function match(regexp) { | |
| 4107 | + var O = defined(this); | |
| 4108 | + var fn = regexp == undefined ? undefined : regexp[MATCH]; | |
| 4109 | + return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O)); | |
| 4110 | + }, | |
| 4111 | + // `RegExp.prototype[@@match]` method | |
| 4112 | + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@match | |
| 4113 | + function (regexp) { | |
| 4114 | + var res = maybeCallNative($match, regexp, this); | |
| 4115 | + if (res.done) return res.value; | |
| 4116 | + var rx = anObject(regexp); | |
| 4117 | + var S = String(this); | |
| 4118 | + if (!rx.global) return regExpExec(rx, S); | |
| 4119 | + var fullUnicode = rx.unicode; | |
| 4120 | + rx.lastIndex = 0; | |
| 4121 | + var A = []; | |
| 4122 | + var n = 0; | |
| 4123 | + var result; | |
| 4124 | + while ((result = regExpExec(rx, S)) !== null) { | |
| 4125 | + var matchStr = String(result[0]); | |
| 4126 | + A[n] = matchStr; | |
| 4127 | + if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); | |
| 4128 | + n++; | |
| 4129 | + } | |
| 4130 | + return n === 0 ? null : A; | |
| 4131 | + } | |
| 4132 | + ]; | |
| 4133 | +}); | |
| 4134 | + | |
| 4135 | + | |
| 4136 | +/***/ }), | |
| 4137 | +/* 125 */ | |
| 4138 | +/***/ (function(module, exports, __webpack_require__) { | |
| 4139 | + | |
| 4140 | +// fallback for non-array-like ES3 and non-enumerable old V8 strings | |
| 4141 | +var cof = __webpack_require__(52); | |
| 4142 | +// eslint-disable-next-line no-prototype-builtins | |
| 4143 | +module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { | |
| 4144 | + return cof(it) == 'String' ? it.split('') : Object(it); | |
| 4145 | +}; | |
| 4146 | + | |
| 4147 | + | |
| 4148 | +/***/ }), | |
| 4149 | +/* 126 */ | |
| 4150 | +/***/ (function(module, exports, __webpack_require__) { | |
| 4151 | + | |
| 4152 | +// 7.2.8 IsRegExp(argument) | |
| 4153 | +var isObject = __webpack_require__(31); | |
| 4154 | +var cof = __webpack_require__(52); | |
| 4155 | +var MATCH = __webpack_require__(13)('match'); | |
| 4156 | +module.exports = function (it) { | |
| 4157 | + var isRegExp; | |
| 4158 | + return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp'); | |
| 4159 | +}; | |
| 4160 | + | |
| 4161 | + | |
| 4162 | +/***/ }), | |
| 4163 | +/* 127 */ | |
| 4164 | +/***/ (function(module, exports, __webpack_require__) { | |
| 4165 | + | |
| 4166 | +// 7.1.1 ToPrimitive(input [, PreferredType]) | |
| 4167 | +var isObject = __webpack_require__(31); | |
| 4168 | +// instead of the ES6 spec version, we didn't implement @@toPrimitive case | |
| 4169 | +// and the second argument - flag - preferred type is a string | |
| 4170 | +module.exports = function (it, S) { | |
| 4171 | + if (!isObject(it)) return it; | |
| 4172 | + var fn, val; | |
| 4173 | + if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; | |
| 4174 | + if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; | |
| 4175 | + if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; | |
| 4176 | + throw TypeError("Can't convert object to primitive value"); | |
| 4177 | +}; | |
| 4178 | + | |
| 4179 | + | |
| 4180 | +/***/ }), | |
| 4181 | +/* 128 */, | |
| 4182 | +/* 129 */ | |
| 4183 | +/***/ (function(module, exports, __webpack_require__) { | |
| 4184 | + | |
| 4185 | +"use strict"; | |
| 4186 | + | |
| 4187 | + | |
| 4188 | +var _interopRequireDefault = __webpack_require__(0); | |
| 4189 | + | |
| 4190 | +var _Object$defineProperty = __webpack_require__(1); | |
| 4191 | + | |
| 4192 | +_Object$defineProperty(exports, "__esModule", { | |
| 4193 | + value: true | |
| 4194 | +}); | |
| 4195 | + | |
| 4196 | +exports.default = void 0; | |
| 4197 | + | |
| 4198 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 4199 | + | |
| 4200 | +var _get2 = _interopRequireDefault(__webpack_require__(26)); | |
| 4201 | + | |
| 4202 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(16)); | |
| 4203 | + | |
| 4204 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 4205 | + | |
| 4206 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 4207 | + | |
| 4208 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 4209 | + | |
| 4210 | +var _commandBase = _interopRequireDefault(__webpack_require__(23)); | |
| 4211 | + | |
| 4212 | +var CommandHistory = /*#__PURE__*/function (_CommandBase) { | |
| 4213 | + (0, _inherits2.default)(CommandHistory, _CommandBase); | |
| 4214 | + | |
| 4215 | + var _super = (0, _createSuper2.default)(CommandHistory); | |
| 4216 | + | |
| 4217 | + (0, _createClass2.default)(CommandHistory, null, [{ | |
| 4218 | + key: "getInstanceType", | |
| 4219 | + value: function getInstanceType() { | |
| 4220 | + return 'CommandHistory'; | |
| 4221 | + } | |
| 4222 | + }]); | |
| 4223 | + | |
| 4224 | + function CommandHistory(args) { | |
| 4225 | + var _this; | |
| 4226 | + | |
| 4227 | + (0, _classCallCheck2.default)(this, CommandHistory); | |
| 4228 | + _this = _super.call(this, args); | |
| 4229 | + /** | |
| 4230 | + * Get History from child command. | |
| 173 | 4231 | * |
| 174 | - * Get history object from child, do nothing if it false. | |
| 175 | - * | |
| 176 | - * @param {*} [args={}] | |
| 177 | - * | |
| 178 | - * @return {({}|boolean)} history object | |
| 4232 | + * @type {{}|boolean} | |
| 179 | 4233 | */ |
| 180 | - }, { | |
| 4234 | + | |
| 4235 | + _this.history = _this.getHistory(args); | |
| 4236 | + /** | |
| 4237 | + * @type {number|boolean} | |
| 4238 | + */ | |
| 4239 | + | |
| 4240 | + _this.historyId = false; | |
| 4241 | + return _this; | |
| 4242 | + } | |
| 4243 | + /** | |
| 4244 | + * Function getHistory(). | |
| 4245 | + * | |
| 4246 | + * Get history object from child, do nothing if it false. | |
| 4247 | + * | |
| 4248 | + * @param [args={}] | |
| 4249 | + * | |
| 4250 | + * @returns {({}|boolean)} | |
| 4251 | + */ | |
| 4252 | + | |
| 4253 | + | |
| 4254 | + (0, _createClass2.default)(CommandHistory, [{ | |
| 181 | 4255 | key: "getHistory", |
| 182 | 4256 | value: function getHistory() { |
| 183 | 4257 | var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
| 184 | 4258 | // eslint-disable-line no-unused-vars |
| @@ -183,16 +4257,16 @@ | ||
| 183 | 4257 | var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
| 184 | 4258 | // eslint-disable-line no-unused-vars |
| 185 | 4259 | elementorModules.ForceMethodImplementation(); |
| 186 | 4260 | } |
| 187 | - | |
| 188 | 4261 | /** |
| 189 | 4262 | * Function isHistoryActive(). |
| 190 | 4263 | * |
| 191 | 4264 | * Return `elementor.documents.getCurrent().history.getActive()`. |
| 192 | 4265 | * |
| 193 | - * @return {boolean} is history active | |
| 4266 | + * @returns {boolean} | |
| 194 | 4267 | */ |
| 4268 | + | |
| 195 | 4269 | }, { |
| 196 | 4270 | key: "isHistoryActive", |
| 197 | 4271 | value: function isHistoryActive() { |
| 198 | 4272 | return elementor.documents.getCurrent().history.getActive(); |
| @@ -199,9 +4273,10 @@ | ||
| 199 | 4273 | } |
| 200 | 4274 | }, { |
| 201 | 4275 | key: "onBeforeRun", |
| 202 | 4276 | value: function onBeforeRun(args) { |
| 203 | - _superPropGet(CommandHistoryBase, "onBeforeRun", this, 3)([args]); | |
| 4277 | + (0, _get2.default)((0, _getPrototypeOf2.default)(CommandHistory.prototype), "onBeforeRun", this).call(this, args); | |
| 4278 | + | |
| 204 | 4279 | if (this.history && this.isHistoryActive()) { |
| 205 | 4280 | this.historyId = $e.internal('document/history/start-log', this.history); |
| 206 | 4281 | } |
| 207 | 4282 | } |
| @@ -207,9 +4282,10 @@ | ||
| 207 | 4282 | } |
| 208 | 4283 | }, { |
| 209 | 4284 | key: "onAfterRun", |
| 210 | 4285 | value: function onAfterRun(args, result) { |
| 211 | - _superPropGet(CommandHistoryBase, "onAfterRun", this, 3)([args, result]); | |
| 4286 | + (0, _get2.default)((0, _getPrototypeOf2.default)(CommandHistory.prototype), "onAfterRun", this).call(this, args, result); | |
| 4287 | + | |
| 212 | 4288 | if (this.history && this.isHistoryActive()) { |
| 213 | 4289 | $e.internal('document/history/end-log', { |
| 214 | 4290 | id: this.historyId |
| 215 | 4291 | }); |
| @@ -215,257 +4291,2321 @@ | ||
| 215 | 4291 | }); |
| 216 | 4292 | } |
| 217 | 4293 | } |
| 218 | 4294 | }, { |
| 219 | - key: "onAfterApply", | |
| 220 | - value: function onAfterApply() { | |
| 221 | - var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 222 | - var result = arguments.length > 1 ? arguments[1] : undefined; | |
| 223 | - _superPropGet(CommandHistoryBase, "onAfterApply", this, 3)([args, result]); | |
| 224 | - if (this.isDataChanged()) { | |
| 225 | - $e.internal('document/save/set-is-modified', { | |
| 226 | - status: true | |
| 227 | - }); | |
| 228 | - } | |
| 229 | - } | |
| 230 | - }, { | |
| 231 | 4295 | key: "onCatchApply", |
| 232 | 4296 | value: function onCatchApply(e) { |
| 233 | - // Rollback history on failure. | |
| 4297 | + (0, _get2.default)((0, _getPrototypeOf2.default)(CommandHistory.prototype), "onCatchApply", this).call(this, e); // Rollback history on failure. | |
| 4298 | + | |
| 234 | 4299 | if (e instanceof $e.modules.HookBreak && this.historyId) { |
| 235 | 4300 | $e.internal('document/history/delete-log', { |
| 236 | 4301 | id: this.historyId |
| 237 | 4302 | }); |
| 238 | 4303 | } |
| 239 | - _superPropGet(CommandHistoryBase, "onCatchApply", this, 3)([e]); | |
| 240 | 4304 | } |
| 241 | - }, { | |
| 242 | - key: "isDataChanged", | |
| 243 | - value: function isDataChanged() { | |
| 244 | - // All the commands who use history are commands that changing the data. | |
| 245 | - return true; | |
| 246 | - } | |
| 247 | - }], [{ | |
| 248 | - key: "getInstanceType", | |
| 249 | - value: function getInstanceType() { | |
| 250 | - return 'CommandHistoryBase'; | |
| 251 | - } | |
| 252 | 4305 | }]); |
| 253 | -}(_commandContainerBase.default); | |
| 4306 | + return CommandHistory; | |
| 4307 | +}(_commandBase.default); | |
| 254 | 4308 | |
| 4309 | +exports.default = CommandHistory; | |
| 4310 | + | |
| 255 | 4311 | /***/ }), |
| 4312 | +/* 130 */ | |
| 4313 | +/***/ (function(module, exports, __webpack_require__) { | |
| 256 | 4314 | |
| 257 | -/***/ "../assets/dev/js/editor/document/command-bases/command-history-debounce-base.js": | |
| 258 | -/*!***************************************************************************************!*\ | |
| 259 | - !*** ../assets/dev/js/editor/document/command-bases/command-history-debounce-base.js ***! | |
| 260 | - \***************************************************************************************/ | |
| 261 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 4315 | +module.exports = __webpack_require__(160); | |
| 262 | 4316 | |
| 4317 | +/***/ }), | |
| 4318 | +/* 131 */ | |
| 4319 | +/***/ (function(module, exports, __webpack_require__) { | |
| 4320 | + | |
| 4321 | +var dP = __webpack_require__(15); | |
| 4322 | +var anObject = __webpack_require__(11); | |
| 4323 | +var getKeys = __webpack_require__(37); | |
| 4324 | + | |
| 4325 | +module.exports = __webpack_require__(14) ? Object.defineProperties : function defineProperties(O, Properties) { | |
| 4326 | + anObject(O); | |
| 4327 | + var keys = getKeys(Properties); | |
| 4328 | + var length = keys.length; | |
| 4329 | + var i = 0; | |
| 4330 | + var P; | |
| 4331 | + while (length > i) dP.f(O, P = keys[i++], Properties[P]); | |
| 4332 | + return O; | |
| 4333 | +}; | |
| 4334 | + | |
| 4335 | + | |
| 4336 | +/***/ }), | |
| 4337 | +/* 132 */ | |
| 4338 | +/***/ (function(module, exports, __webpack_require__) { | |
| 4339 | + | |
| 4340 | +var document = __webpack_require__(8).document; | |
| 4341 | +module.exports = document && document.documentElement; | |
| 4342 | + | |
| 4343 | + | |
| 4344 | +/***/ }), | |
| 4345 | +/* 133 */ | |
| 4346 | +/***/ (function(module, exports) { | |
| 4347 | + | |
| 4348 | +// fast apply, http://jsperf.lnkit.com/fast-apply/5 | |
| 4349 | +module.exports = function (fn, args, that) { | |
| 4350 | + var un = that === undefined; | |
| 4351 | + switch (args.length) { | |
| 4352 | + case 0: return un ? fn() | |
| 4353 | + : fn.call(that); | |
| 4354 | + case 1: return un ? fn(args[0]) | |
| 4355 | + : fn.call(that, args[0]); | |
| 4356 | + case 2: return un ? fn(args[0], args[1]) | |
| 4357 | + : fn.call(that, args[0], args[1]); | |
| 4358 | + case 3: return un ? fn(args[0], args[1], args[2]) | |
| 4359 | + : fn.call(that, args[0], args[1], args[2]); | |
| 4360 | + case 4: return un ? fn(args[0], args[1], args[2], args[3]) | |
| 4361 | + : fn.call(that, args[0], args[1], args[2], args[3]); | |
| 4362 | + } return fn.apply(that, args); | |
| 4363 | +}; | |
| 4364 | + | |
| 4365 | + | |
| 4366 | +/***/ }), | |
| 4367 | +/* 134 */ | |
| 4368 | +/***/ (function(module, exports, __webpack_require__) { | |
| 4369 | + | |
| 4370 | +module.exports = __webpack_require__(257); | |
| 4371 | + | |
| 4372 | +/***/ }), | |
| 4373 | +/* 135 */ | |
| 4374 | +/***/ (function(module, exports, __webpack_require__) { | |
| 4375 | + | |
| 4376 | +module.exports = !__webpack_require__(28) && !__webpack_require__(36)(function () { | |
| 4377 | + return Object.defineProperty(__webpack_require__(114)('div'), 'a', { get: function () { return 7; } }).a != 7; | |
| 4378 | +}); | |
| 4379 | + | |
| 4380 | + | |
| 4381 | +/***/ }), | |
| 4382 | +/* 136 */ | |
| 4383 | +/***/ (function(module, exports, __webpack_require__) { | |
| 4384 | + | |
| 263 | 4385 | "use strict"; |
| 264 | 4386 | |
| 4387 | +// ECMAScript 6 symbols shim | |
| 4388 | +var global = __webpack_require__(8); | |
| 4389 | +var has = __webpack_require__(17); | |
| 4390 | +var DESCRIPTORS = __webpack_require__(14); | |
| 4391 | +var $export = __webpack_require__(7); | |
| 4392 | +var redefine = __webpack_require__(89); | |
| 4393 | +var META = __webpack_require__(66).KEY; | |
| 4394 | +var $fails = __webpack_require__(21); | |
| 4395 | +var shared = __webpack_require__(71); | |
| 4396 | +var setToStringTag = __webpack_require__(53); | |
| 4397 | +var uid = __webpack_require__(55); | |
| 4398 | +var wks = __webpack_require__(10); | |
| 4399 | +var wksExt = __webpack_require__(62); | |
| 4400 | +var wksDefine = __webpack_require__(75); | |
| 4401 | +var enumKeys = __webpack_require__(174); | |
| 4402 | +var isArray = __webpack_require__(97); | |
| 4403 | +var anObject = __webpack_require__(11); | |
| 4404 | +var isObject = __webpack_require__(9); | |
| 4405 | +var toObject = __webpack_require__(32); | |
| 4406 | +var toIObject = __webpack_require__(19); | |
| 4407 | +var toPrimitive = __webpack_require__(69); | |
| 4408 | +var createDesc = __webpack_require__(42); | |
| 4409 | +var _create = __webpack_require__(47); | |
| 4410 | +var gOPNExt = __webpack_require__(175); | |
| 4411 | +var $GOPD = __webpack_require__(48); | |
| 4412 | +var $GOPS = __webpack_require__(67); | |
| 4413 | +var $DP = __webpack_require__(15); | |
| 4414 | +var $keys = __webpack_require__(37); | |
| 4415 | +var gOPD = $GOPD.f; | |
| 4416 | +var dP = $DP.f; | |
| 4417 | +var gOPN = gOPNExt.f; | |
| 4418 | +var $Symbol = global.Symbol; | |
| 4419 | +var $JSON = global.JSON; | |
| 4420 | +var _stringify = $JSON && $JSON.stringify; | |
| 4421 | +var PROTOTYPE = 'prototype'; | |
| 4422 | +var HIDDEN = wks('_hidden'); | |
| 4423 | +var TO_PRIMITIVE = wks('toPrimitive'); | |
| 4424 | +var isEnum = {}.propertyIsEnumerable; | |
| 4425 | +var SymbolRegistry = shared('symbol-registry'); | |
| 4426 | +var AllSymbols = shared('symbols'); | |
| 4427 | +var OPSymbols = shared('op-symbols'); | |
| 4428 | +var ObjectProto = Object[PROTOTYPE]; | |
| 4429 | +var USE_NATIVE = typeof $Symbol == 'function' && !!$GOPS.f; | |
| 4430 | +var QObject = global.QObject; | |
| 4431 | +// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 | |
| 4432 | +var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; | |
| 265 | 4433 | |
| 266 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 267 | -Object.defineProperty(exports, "__esModule", ({ | |
| 268 | - value: true | |
| 269 | -})); | |
| 270 | -exports.getDefaultDebounceDelay = exports["default"] = exports.DEFAULT_DEBOUNCE_DELAY = void 0; | |
| 271 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 272 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 273 | -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 274 | -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 275 | -var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js")); | |
| 276 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 277 | -var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); | |
| 278 | -var _commandHistoryBase = _interopRequireDefault(__webpack_require__(/*! ./command-history-base */ "../assets/dev/js/editor/document/command-bases/command-history-base.js")); | |
| 279 | -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)); } | |
| 280 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 281 | -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; } | |
| 282 | -var DEFAULT_DEBOUNCE_DELAY = exports.DEFAULT_DEBOUNCE_DELAY = 800; | |
| 4434 | +// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 | |
| 4435 | +var setSymbolDesc = DESCRIPTORS && $fails(function () { | |
| 4436 | + return _create(dP({}, 'a', { | |
| 4437 | + get: function () { return dP(this, 'a', { value: 7 }).a; } | |
| 4438 | + })).a != 7; | |
| 4439 | +}) ? function (it, key, D) { | |
| 4440 | + var protoDesc = gOPD(ObjectProto, key); | |
| 4441 | + if (protoDesc) delete ObjectProto[key]; | |
| 4442 | + dP(it, key, D); | |
| 4443 | + if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc); | |
| 4444 | +} : dP; | |
| 283 | 4445 | |
| 284 | -/** | |
| 285 | - * Function getDefaultDebounceDelay(). | |
| 286 | - * | |
| 287 | - * Returns default debounce delay time, if exists in config override. | |
| 288 | - * | |
| 289 | - * @return {number} default debounce delay time | |
| 290 | - */ | |
| 291 | -var getDefaultDebounceDelay = exports.getDefaultDebounceDelay = function getDefaultDebounceDelay() { | |
| 292 | - var result = DEFAULT_DEBOUNCE_DELAY; | |
| 293 | - if (elementor.config.document && undefined !== elementor.config.document.debounceDelay) { | |
| 294 | - result = elementor.config.document.debounceDelay; | |
| 4446 | +var wrap = function (tag) { | |
| 4447 | + var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]); | |
| 4448 | + sym._k = tag; | |
| 4449 | + return sym; | |
| 4450 | +}; | |
| 4451 | + | |
| 4452 | +var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) { | |
| 4453 | + return typeof it == 'symbol'; | |
| 4454 | +} : function (it) { | |
| 4455 | + return it instanceof $Symbol; | |
| 4456 | +}; | |
| 4457 | + | |
| 4458 | +var $defineProperty = function defineProperty(it, key, D) { | |
| 4459 | + if (it === ObjectProto) $defineProperty(OPSymbols, key, D); | |
| 4460 | + anObject(it); | |
| 4461 | + key = toPrimitive(key, true); | |
| 4462 | + anObject(D); | |
| 4463 | + if (has(AllSymbols, key)) { | |
| 4464 | + if (!D.enumerable) { | |
| 4465 | + if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {})); | |
| 4466 | + it[HIDDEN][key] = true; | |
| 4467 | + } else { | |
| 4468 | + if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false; | |
| 4469 | + D = _create(D, { enumerable: createDesc(0, false) }); | |
| 4470 | + } return setSymbolDesc(it, key, D); | |
| 4471 | + } return dP(it, key, D); | |
| 4472 | +}; | |
| 4473 | +var $defineProperties = function defineProperties(it, P) { | |
| 4474 | + anObject(it); | |
| 4475 | + var keys = enumKeys(P = toIObject(P)); | |
| 4476 | + var i = 0; | |
| 4477 | + var l = keys.length; | |
| 4478 | + var key; | |
| 4479 | + while (l > i) $defineProperty(it, key = keys[i++], P[key]); | |
| 4480 | + return it; | |
| 4481 | +}; | |
| 4482 | +var $create = function create(it, P) { | |
| 4483 | + return P === undefined ? _create(it) : $defineProperties(_create(it), P); | |
| 4484 | +}; | |
| 4485 | +var $propertyIsEnumerable = function propertyIsEnumerable(key) { | |
| 4486 | + var E = isEnum.call(this, key = toPrimitive(key, true)); | |
| 4487 | + if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false; | |
| 4488 | + return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; | |
| 4489 | +}; | |
| 4490 | +var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { | |
| 4491 | + it = toIObject(it); | |
| 4492 | + key = toPrimitive(key, true); | |
| 4493 | + if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return; | |
| 4494 | + var D = gOPD(it, key); | |
| 4495 | + if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true; | |
| 4496 | + return D; | |
| 4497 | +}; | |
| 4498 | +var $getOwnPropertyNames = function getOwnPropertyNames(it) { | |
| 4499 | + var names = gOPN(toIObject(it)); | |
| 4500 | + var result = []; | |
| 4501 | + var i = 0; | |
| 4502 | + var key; | |
| 4503 | + while (names.length > i) { | |
| 4504 | + if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key); | |
| 4505 | + } return result; | |
| 4506 | +}; | |
| 4507 | +var $getOwnPropertySymbols = function getOwnPropertySymbols(it) { | |
| 4508 | + var IS_OP = it === ObjectProto; | |
| 4509 | + var names = gOPN(IS_OP ? OPSymbols : toIObject(it)); | |
| 4510 | + var result = []; | |
| 4511 | + var i = 0; | |
| 4512 | + var key; | |
| 4513 | + while (names.length > i) { | |
| 4514 | + if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]); | |
| 4515 | + } return result; | |
| 4516 | +}; | |
| 4517 | + | |
| 4518 | +// 19.4.1.1 Symbol([description]) | |
| 4519 | +if (!USE_NATIVE) { | |
| 4520 | + $Symbol = function Symbol() { | |
| 4521 | + if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!'); | |
| 4522 | + var tag = uid(arguments.length > 0 ? arguments[0] : undefined); | |
| 4523 | + var $set = function (value) { | |
| 4524 | + if (this === ObjectProto) $set.call(OPSymbols, value); | |
| 4525 | + if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; | |
| 4526 | + setSymbolDesc(this, tag, createDesc(1, value)); | |
| 4527 | + }; | |
| 4528 | + if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set }); | |
| 4529 | + return wrap(tag); | |
| 4530 | + }; | |
| 4531 | + redefine($Symbol[PROTOTYPE], 'toString', function toString() { | |
| 4532 | + return this._k; | |
| 4533 | + }); | |
| 4534 | + | |
| 4535 | + $GOPD.f = $getOwnPropertyDescriptor; | |
| 4536 | + $DP.f = $defineProperty; | |
| 4537 | + __webpack_require__(91).f = gOPNExt.f = $getOwnPropertyNames; | |
| 4538 | + __webpack_require__(49).f = $propertyIsEnumerable; | |
| 4539 | + $GOPS.f = $getOwnPropertySymbols; | |
| 4540 | + | |
| 4541 | + if (DESCRIPTORS && !__webpack_require__(44)) { | |
| 4542 | + redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); | |
| 295 | 4543 | } |
| 296 | - return result; | |
| 4544 | + | |
| 4545 | + wksExt.f = function (name) { | |
| 4546 | + return wrap(wks(name)); | |
| 4547 | + }; | |
| 4548 | +} | |
| 4549 | + | |
| 4550 | +$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol }); | |
| 4551 | + | |
| 4552 | +for (var es6Symbols = ( | |
| 4553 | + // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 | |
| 4554 | + 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' | |
| 4555 | +).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]); | |
| 4556 | + | |
| 4557 | +for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]); | |
| 4558 | + | |
| 4559 | +$export($export.S + $export.F * !USE_NATIVE, 'Symbol', { | |
| 4560 | + // 19.4.2.1 Symbol.for(key) | |
| 4561 | + 'for': function (key) { | |
| 4562 | + return has(SymbolRegistry, key += '') | |
| 4563 | + ? SymbolRegistry[key] | |
| 4564 | + : SymbolRegistry[key] = $Symbol(key); | |
| 4565 | + }, | |
| 4566 | + // 19.4.2.5 Symbol.keyFor(sym) | |
| 4567 | + keyFor: function keyFor(sym) { | |
| 4568 | + if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!'); | |
| 4569 | + for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key; | |
| 4570 | + }, | |
| 4571 | + useSetter: function () { setter = true; }, | |
| 4572 | + useSimple: function () { setter = false; } | |
| 4573 | +}); | |
| 4574 | + | |
| 4575 | +$export($export.S + $export.F * !USE_NATIVE, 'Object', { | |
| 4576 | + // 19.1.2.2 Object.create(O [, Properties]) | |
| 4577 | + create: $create, | |
| 4578 | + // 19.1.2.4 Object.defineProperty(O, P, Attributes) | |
| 4579 | + defineProperty: $defineProperty, | |
| 4580 | + // 19.1.2.3 Object.defineProperties(O, Properties) | |
| 4581 | + defineProperties: $defineProperties, | |
| 4582 | + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) | |
| 4583 | + getOwnPropertyDescriptor: $getOwnPropertyDescriptor, | |
| 4584 | + // 19.1.2.7 Object.getOwnPropertyNames(O) | |
| 4585 | + getOwnPropertyNames: $getOwnPropertyNames, | |
| 4586 | + // 19.1.2.8 Object.getOwnPropertySymbols(O) | |
| 4587 | + getOwnPropertySymbols: $getOwnPropertySymbols | |
| 4588 | +}); | |
| 4589 | + | |
| 4590 | +// Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives | |
| 4591 | +// https://bugs.chromium.org/p/v8/issues/detail?id=3443 | |
| 4592 | +var FAILS_ON_PRIMITIVES = $fails(function () { $GOPS.f(1); }); | |
| 4593 | + | |
| 4594 | +$export($export.S + $export.F * FAILS_ON_PRIMITIVES, 'Object', { | |
| 4595 | + getOwnPropertySymbols: function getOwnPropertySymbols(it) { | |
| 4596 | + return $GOPS.f(toObject(it)); | |
| 4597 | + } | |
| 4598 | +}); | |
| 4599 | + | |
| 4600 | +// 24.3.2 JSON.stringify(value [, replacer [, space]]) | |
| 4601 | +$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () { | |
| 4602 | + var S = $Symbol(); | |
| 4603 | + // MS Edge converts symbol values to JSON as {} | |
| 4604 | + // WebKit converts symbol values to JSON as null | |
| 4605 | + // V8 throws on boxed symbols | |
| 4606 | + return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}'; | |
| 4607 | +})), 'JSON', { | |
| 4608 | + stringify: function stringify(it) { | |
| 4609 | + var args = [it]; | |
| 4610 | + var i = 1; | |
| 4611 | + var replacer, $replacer; | |
| 4612 | + while (arguments.length > i) args.push(arguments[i++]); | |
| 4613 | + $replacer = replacer = args[1]; | |
| 4614 | + if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined | |
| 4615 | + if (!isArray(replacer)) replacer = function (key, value) { | |
| 4616 | + if (typeof $replacer == 'function') value = $replacer.call(this, key, value); | |
| 4617 | + if (!isSymbol(value)) return value; | |
| 4618 | + }; | |
| 4619 | + args[1] = replacer; | |
| 4620 | + return _stringify.apply($JSON, args); | |
| 4621 | + } | |
| 4622 | +}); | |
| 4623 | + | |
| 4624 | +// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) | |
| 4625 | +$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(22)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); | |
| 4626 | +// 19.4.3.5 Symbol.prototype[@@toStringTag] | |
| 4627 | +setToStringTag($Symbol, 'Symbol'); | |
| 4628 | +// 20.2.1.9 Math[@@toStringTag] | |
| 4629 | +setToStringTag(Math, 'Math', true); | |
| 4630 | +// 24.3.3 JSON[@@toStringTag] | |
| 4631 | +setToStringTag(global.JSON, 'JSON', true); | |
| 4632 | + | |
| 4633 | + | |
| 4634 | +/***/ }), | |
| 4635 | +/* 137 */ | |
| 4636 | +/***/ (function(module, exports, __webpack_require__) { | |
| 4637 | + | |
| 4638 | +var shared = __webpack_require__(76)('keys'); | |
| 4639 | +var uid = __webpack_require__(77); | |
| 4640 | +module.exports = function (key) { | |
| 4641 | + return shared[key] || (shared[key] = uid(key)); | |
| 297 | 4642 | }; |
| 298 | 4643 | |
| 299 | -/** | |
| 300 | - * @name $e.modules.editor.document.CommandHistoryDebounceBase | |
| 301 | - */ | |
| 302 | -var CommandHistoryDebounceBase = exports["default"] = /*#__PURE__*/function (_CommandHistoryBase) { | |
| 303 | - function CommandHistoryDebounceBase() { | |
| 304 | - (0, _classCallCheck2.default)(this, CommandHistoryDebounceBase); | |
| 305 | - return _callSuper(this, CommandHistoryDebounceBase, arguments); | |
| 4644 | + | |
| 4645 | +/***/ }), | |
| 4646 | +/* 138 */ | |
| 4647 | +/***/ (function(module, exports, __webpack_require__) { | |
| 4648 | + | |
| 4649 | +var _Reflect$construct = __webpack_require__(95); | |
| 4650 | + | |
| 4651 | +function _isNativeReflectConstruct() { | |
| 4652 | + if (typeof Reflect === "undefined" || !_Reflect$construct) return false; | |
| 4653 | + if (_Reflect$construct.sham) return false; | |
| 4654 | + if (typeof Proxy === "function") return true; | |
| 4655 | + | |
| 4656 | + try { | |
| 4657 | + Date.prototype.toString.call(_Reflect$construct(Date, [], function () {})); | |
| 4658 | + return true; | |
| 4659 | + } catch (e) { | |
| 4660 | + return false; | |
| 306 | 4661 | } |
| 307 | - (0, _inherits2.default)(CommandHistoryDebounceBase, _CommandHistoryBase); | |
| 308 | - return (0, _createClass2.default)(CommandHistoryDebounceBase, [{ | |
| 309 | - key: "initialize", | |
| 310 | - value: function initialize(args) { | |
| 311 | - var _args$options = args.options, | |
| 312 | - options = _args$options === void 0 ? {} : _args$options; | |
| 313 | - _superPropGet(CommandHistoryDebounceBase, "initialize", this, 3)([args]); | |
| 314 | - if (!this.constructor.debounce) { | |
| 315 | - this.constructor.debounce = _.debounce(function (fn) { | |
| 316 | - return fn(); | |
| 317 | - }, getDefaultDebounceDelay()); | |
| 4662 | +} | |
| 4663 | + | |
| 4664 | +module.exports = _isNativeReflectConstruct; | |
| 4665 | + | |
| 4666 | +/***/ }), | |
| 4667 | +/* 139 */ | |
| 4668 | +/***/ (function(module, exports) { | |
| 4669 | + | |
| 4670 | +module.exports = function (done, value) { | |
| 4671 | + return { value: value, done: !!done }; | |
| 4672 | +}; | |
| 4673 | + | |
| 4674 | + | |
| 4675 | +/***/ }), | |
| 4676 | +/* 140 */ | |
| 4677 | +/***/ (function(module, exports, __webpack_require__) { | |
| 4678 | + | |
| 4679 | +module.exports = __webpack_require__(291); | |
| 4680 | + | |
| 4681 | +/***/ }), | |
| 4682 | +/* 141 */ | |
| 4683 | +/***/ (function(module, exports, __webpack_require__) { | |
| 4684 | + | |
| 4685 | +"use strict"; | |
| 4686 | + | |
| 4687 | +// https://github.com/tc39/Array.prototype.includes | |
| 4688 | +var $export = __webpack_require__(38); | |
| 4689 | +var $includes = __webpack_require__(145)(true); | |
| 4690 | + | |
| 4691 | +$export($export.P, 'Array', { | |
| 4692 | + includes: function includes(el /* , fromIndex = 0 */) { | |
| 4693 | + return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); | |
| 4694 | + } | |
| 4695 | +}); | |
| 4696 | + | |
| 4697 | +__webpack_require__(90)('includes'); | |
| 4698 | + | |
| 4699 | + | |
| 4700 | +/***/ }), | |
| 4701 | +/* 142 */ | |
| 4702 | +/***/ (function(module, exports, __webpack_require__) { | |
| 4703 | + | |
| 4704 | +// 0 -> Array#forEach | |
| 4705 | +// 1 -> Array#map | |
| 4706 | +// 2 -> Array#filter | |
| 4707 | +// 3 -> Array#some | |
| 4708 | +// 4 -> Array#every | |
| 4709 | +// 5 -> Array#find | |
| 4710 | +// 6 -> Array#findIndex | |
| 4711 | +var ctx = __webpack_require__(29); | |
| 4712 | +var IObject = __webpack_require__(103); | |
| 4713 | +var toObject = __webpack_require__(32); | |
| 4714 | +var toLength = __webpack_require__(72); | |
| 4715 | +var asc = __webpack_require__(245); | |
| 4716 | +module.exports = function (TYPE, $create) { | |
| 4717 | + var IS_MAP = TYPE == 1; | |
| 4718 | + var IS_FILTER = TYPE == 2; | |
| 4719 | + var IS_SOME = TYPE == 3; | |
| 4720 | + var IS_EVERY = TYPE == 4; | |
| 4721 | + var IS_FIND_INDEX = TYPE == 6; | |
| 4722 | + var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; | |
| 4723 | + var create = $create || asc; | |
| 4724 | + return function ($this, callbackfn, that) { | |
| 4725 | + var O = toObject($this); | |
| 4726 | + var self = IObject(O); | |
| 4727 | + var f = ctx(callbackfn, that, 3); | |
| 4728 | + var length = toLength(self.length); | |
| 4729 | + var index = 0; | |
| 4730 | + var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined; | |
| 4731 | + var val, res; | |
| 4732 | + for (;length > index; index++) if (NO_HOLES || index in self) { | |
| 4733 | + val = self[index]; | |
| 4734 | + res = f(val, index, O); | |
| 4735 | + if (TYPE) { | |
| 4736 | + if (IS_MAP) result[index] = res; // map | |
| 4737 | + else if (res) switch (TYPE) { | |
| 4738 | + case 3: return true; // some | |
| 4739 | + case 5: return val; // find | |
| 4740 | + case 6: return index; // findIndex | |
| 4741 | + case 2: result.push(val); // filter | |
| 4742 | + } else if (IS_EVERY) return false; // every | |
| 318 | 4743 | } |
| 4744 | + } | |
| 4745 | + return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; | |
| 4746 | + }; | |
| 4747 | +}; | |
| 319 | 4748 | |
| 320 | - // If its head command, and not called within another command. | |
| 321 | - if (1 === $e.commands.currentTrace.length || options.debounce) { | |
| 322 | - this.isDebounceRequired = true; | |
| 4749 | + | |
| 4750 | +/***/ }), | |
| 4751 | +/* 143 */ | |
| 4752 | +/***/ (function(module, exports, __webpack_require__) { | |
| 4753 | + | |
| 4754 | +// call something on iterator step with safe closing on error | |
| 4755 | +var anObject = __webpack_require__(11); | |
| 4756 | +module.exports = function (iterator, fn, value, entries) { | |
| 4757 | + try { | |
| 4758 | + return entries ? fn(anObject(value)[0], value[1]) : fn(value); | |
| 4759 | + // 7.4.6 IteratorClose(iterator, completion) | |
| 4760 | + } catch (e) { | |
| 4761 | + var ret = iterator['return']; | |
| 4762 | + if (ret !== undefined) anObject(ret.call(iterator)); | |
| 4763 | + throw e; | |
| 4764 | + } | |
| 4765 | +}; | |
| 4766 | + | |
| 4767 | + | |
| 4768 | +/***/ }), | |
| 4769 | +/* 144 */ | |
| 4770 | +/***/ (function(module, exports, __webpack_require__) { | |
| 4771 | + | |
| 4772 | +// check on default Array iterator | |
| 4773 | +var Iterators = __webpack_require__(33); | |
| 4774 | +var ITERATOR = __webpack_require__(10)('iterator'); | |
| 4775 | +var ArrayProto = Array.prototype; | |
| 4776 | + | |
| 4777 | +module.exports = function (it) { | |
| 4778 | + return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); | |
| 4779 | +}; | |
| 4780 | + | |
| 4781 | + | |
| 4782 | +/***/ }), | |
| 4783 | +/* 145 */ | |
| 4784 | +/***/ (function(module, exports, __webpack_require__) { | |
| 4785 | + | |
| 4786 | +// false -> Array#indexOf | |
| 4787 | +// true -> Array#includes | |
| 4788 | +var toIObject = __webpack_require__(104); | |
| 4789 | +var toLength = __webpack_require__(46); | |
| 4790 | +var toAbsoluteIndex = __webpack_require__(199); | |
| 4791 | +module.exports = function (IS_INCLUDES) { | |
| 4792 | + return function ($this, el, fromIndex) { | |
| 4793 | + var O = toIObject($this); | |
| 4794 | + var length = toLength(O.length); | |
| 4795 | + var index = toAbsoluteIndex(fromIndex, length); | |
| 4796 | + var value; | |
| 4797 | + // Array#includes uses SameValueZero equality algorithm | |
| 4798 | + // eslint-disable-next-line no-self-compare | |
| 4799 | + if (IS_INCLUDES && el != el) while (length > index) { | |
| 4800 | + value = O[index++]; | |
| 4801 | + // eslint-disable-next-line no-self-compare | |
| 4802 | + if (value != value) return true; | |
| 4803 | + // Array#indexOf ignores holes, Array#includes - not | |
| 4804 | + } else for (;length > index; index++) if (IS_INCLUDES || index in O) { | |
| 4805 | + if (O[index] === el) return IS_INCLUDES || index || 0; | |
| 4806 | + } return !IS_INCLUDES && -1; | |
| 4807 | + }; | |
| 4808 | +}; | |
| 4809 | + | |
| 4810 | + | |
| 4811 | +/***/ }), | |
| 4812 | +/* 146 */ | |
| 4813 | +/***/ (function(module, exports, __webpack_require__) { | |
| 4814 | + | |
| 4815 | +var toInteger = __webpack_require__(60); | |
| 4816 | +var defined = __webpack_require__(43); | |
| 4817 | +// true -> String#at | |
| 4818 | +// false -> String#codePointAt | |
| 4819 | +module.exports = function (TO_STRING) { | |
| 4820 | + return function (that, pos) { | |
| 4821 | + var s = String(defined(that)); | |
| 4822 | + var i = toInteger(pos); | |
| 4823 | + var l = s.length; | |
| 4824 | + var a, b; | |
| 4825 | + if (i < 0 || i >= l) return TO_STRING ? '' : undefined; | |
| 4826 | + a = s.charCodeAt(i); | |
| 4827 | + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff | |
| 4828 | + ? TO_STRING ? s.charAt(i) : a | |
| 4829 | + : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; | |
| 4830 | + }; | |
| 4831 | +}; | |
| 4832 | + | |
| 4833 | + | |
| 4834 | +/***/ }), | |
| 4835 | +/* 147 */ | |
| 4836 | +/***/ (function(module, exports, __webpack_require__) { | |
| 4837 | + | |
| 4838 | +module.exports = __webpack_require__(76)('native-function-to-string', Function.toString); | |
| 4839 | + | |
| 4840 | + | |
| 4841 | +/***/ }), | |
| 4842 | +/* 148 */ | |
| 4843 | +/***/ (function(module, exports, __webpack_require__) { | |
| 4844 | + | |
| 4845 | +module.exports = __webpack_require__(168); | |
| 4846 | + | |
| 4847 | +/***/ }), | |
| 4848 | +/* 149 */ | |
| 4849 | +/***/ (function(module, exports, __webpack_require__) { | |
| 4850 | + | |
| 4851 | +"use strict"; | |
| 4852 | + | |
| 4853 | +// 25.4.1.5 NewPromiseCapability(C) | |
| 4854 | +var aFunction = __webpack_require__(35); | |
| 4855 | + | |
| 4856 | +function PromiseCapability(C) { | |
| 4857 | + var resolve, reject; | |
| 4858 | + this.promise = new C(function ($$resolve, $$reject) { | |
| 4859 | + if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor'); | |
| 4860 | + resolve = $$resolve; | |
| 4861 | + reject = $$reject; | |
| 4862 | + }); | |
| 4863 | + this.resolve = aFunction(resolve); | |
| 4864 | + this.reject = aFunction(reject); | |
| 4865 | +} | |
| 4866 | + | |
| 4867 | +module.exports.f = function (C) { | |
| 4868 | + return new PromiseCapability(C); | |
| 4869 | +}; | |
| 4870 | + | |
| 4871 | + | |
| 4872 | +/***/ }), | |
| 4873 | +/* 150 */ | |
| 4874 | +/***/ (function(module, exports, __webpack_require__) { | |
| 4875 | + | |
| 4876 | +var $iterators = __webpack_require__(122); | |
| 4877 | +var getKeys = __webpack_require__(192); | |
| 4878 | +var redefine = __webpack_require__(39); | |
| 4879 | +var global = __webpack_require__(18); | |
| 4880 | +var hide = __webpack_require__(30); | |
| 4881 | +var Iterators = __webpack_require__(123); | |
| 4882 | +var wks = __webpack_require__(13); | |
| 4883 | +var ITERATOR = wks('iterator'); | |
| 4884 | +var TO_STRING_TAG = wks('toStringTag'); | |
| 4885 | +var ArrayValues = Iterators.Array; | |
| 4886 | + | |
| 4887 | +var DOMIterables = { | |
| 4888 | + CSSRuleList: true, // TODO: Not spec compliant, should be false. | |
| 4889 | + CSSStyleDeclaration: false, | |
| 4890 | + CSSValueList: false, | |
| 4891 | + ClientRectList: false, | |
| 4892 | + DOMRectList: false, | |
| 4893 | + DOMStringList: false, | |
| 4894 | + DOMTokenList: true, | |
| 4895 | + DataTransferItemList: false, | |
| 4896 | + FileList: false, | |
| 4897 | + HTMLAllCollection: false, | |
| 4898 | + HTMLCollection: false, | |
| 4899 | + HTMLFormElement: false, | |
| 4900 | + HTMLSelectElement: false, | |
| 4901 | + MediaList: true, // TODO: Not spec compliant, should be false. | |
| 4902 | + MimeTypeArray: false, | |
| 4903 | + NamedNodeMap: false, | |
| 4904 | + NodeList: true, | |
| 4905 | + PaintRequestList: false, | |
| 4906 | + Plugin: false, | |
| 4907 | + PluginArray: false, | |
| 4908 | + SVGLengthList: false, | |
| 4909 | + SVGNumberList: false, | |
| 4910 | + SVGPathSegList: false, | |
| 4911 | + SVGPointList: false, | |
| 4912 | + SVGStringList: false, | |
| 4913 | + SVGTransformList: false, | |
| 4914 | + SourceBufferList: false, | |
| 4915 | + StyleSheetList: true, // TODO: Not spec compliant, should be false. | |
| 4916 | + TextTrackCueList: false, | |
| 4917 | + TextTrackList: false, | |
| 4918 | + TouchList: false | |
| 4919 | +}; | |
| 4920 | + | |
| 4921 | +for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) { | |
| 4922 | + var NAME = collections[i]; | |
| 4923 | + var explicit = DOMIterables[NAME]; | |
| 4924 | + var Collection = global[NAME]; | |
| 4925 | + var proto = Collection && Collection.prototype; | |
| 4926 | + var key; | |
| 4927 | + if (proto) { | |
| 4928 | + if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues); | |
| 4929 | + if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); | |
| 4930 | + Iterators[NAME] = ArrayValues; | |
| 4931 | + if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true); | |
| 4932 | + } | |
| 4933 | +} | |
| 4934 | + | |
| 4935 | + | |
| 4936 | +/***/ }), | |
| 4937 | +/* 151 */ | |
| 4938 | +/***/ (function(module, exports) { | |
| 4939 | + | |
| 4940 | +// IE 8- don't enum bug keys | |
| 4941 | +module.exports = ( | |
| 4942 | + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' | |
| 4943 | +).split(','); | |
| 4944 | + | |
| 4945 | + | |
| 4946 | +/***/ }), | |
| 4947 | +/* 152 */ | |
| 4948 | +/***/ (function(module, exports, __webpack_require__) { | |
| 4949 | + | |
| 4950 | +__webpack_require__(153); | |
| 4951 | +var $Object = __webpack_require__(6).Object; | |
| 4952 | +module.exports = function defineProperty(it, key, desc) { | |
| 4953 | + return $Object.defineProperty(it, key, desc); | |
| 4954 | +}; | |
| 4955 | + | |
| 4956 | + | |
| 4957 | +/***/ }), | |
| 4958 | +/* 153 */ | |
| 4959 | +/***/ (function(module, exports, __webpack_require__) { | |
| 4960 | + | |
| 4961 | +var $export = __webpack_require__(7); | |
| 4962 | +// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) | |
| 4963 | +$export($export.S + $export.F * !__webpack_require__(14), 'Object', { defineProperty: __webpack_require__(15).f }); | |
| 4964 | + | |
| 4965 | + | |
| 4966 | +/***/ }), | |
| 4967 | +/* 154 */ | |
| 4968 | +/***/ (function(module, exports, __webpack_require__) { | |
| 4969 | + | |
| 4970 | +module.exports = __webpack_require__(155); | |
| 4971 | + | |
| 4972 | +/***/ }), | |
| 4973 | +/* 155 */ | |
| 4974 | +/***/ (function(module, exports, __webpack_require__) { | |
| 4975 | + | |
| 4976 | +__webpack_require__(156); | |
| 4977 | +module.exports = __webpack_require__(6).Object.getPrototypeOf; | |
| 4978 | + | |
| 4979 | + | |
| 4980 | +/***/ }), | |
| 4981 | +/* 156 */ | |
| 4982 | +/***/ (function(module, exports, __webpack_require__) { | |
| 4983 | + | |
| 4984 | +// 19.1.2.9 Object.getPrototypeOf(O) | |
| 4985 | +var toObject = __webpack_require__(32); | |
| 4986 | +var $getPrototypeOf = __webpack_require__(63); | |
| 4987 | + | |
| 4988 | +__webpack_require__(78)('getPrototypeOf', function () { | |
| 4989 | + return function getPrototypeOf(it) { | |
| 4990 | + return $getPrototypeOf(toObject(it)); | |
| 4991 | + }; | |
| 4992 | +}); | |
| 4993 | + | |
| 4994 | + | |
| 4995 | +/***/ }), | |
| 4996 | +/* 157 */ | |
| 4997 | +/***/ (function(module, exports, __webpack_require__) { | |
| 4998 | + | |
| 4999 | +__webpack_require__(158); | |
| 5000 | +module.exports = __webpack_require__(6).Object.setPrototypeOf; | |
| 5001 | + | |
| 5002 | + | |
| 5003 | +/***/ }), | |
| 5004 | +/* 158 */ | |
| 5005 | +/***/ (function(module, exports, __webpack_require__) { | |
| 5006 | + | |
| 5007 | +// 19.1.3.19 Object.setPrototypeOf(O, proto) | |
| 5008 | +var $export = __webpack_require__(7); | |
| 5009 | +$export($export.S, 'Object', { setPrototypeOf: __webpack_require__(159).set }); | |
| 5010 | + | |
| 5011 | + | |
| 5012 | +/***/ }), | |
| 5013 | +/* 159 */ | |
| 5014 | +/***/ (function(module, exports, __webpack_require__) { | |
| 5015 | + | |
| 5016 | +// Works with __proto__ only. Old v8 can't work with null proto objects. | |
| 5017 | +/* eslint-disable no-proto */ | |
| 5018 | +var isObject = __webpack_require__(9); | |
| 5019 | +var anObject = __webpack_require__(11); | |
| 5020 | +var check = function (O, proto) { | |
| 5021 | + anObject(O); | |
| 5022 | + if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!"); | |
| 5023 | +}; | |
| 5024 | +module.exports = { | |
| 5025 | + set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line | |
| 5026 | + function (test, buggy, set) { | |
| 5027 | + try { | |
| 5028 | + set = __webpack_require__(29)(Function.call, __webpack_require__(48).f(Object.prototype, '__proto__').set, 2); | |
| 5029 | + set(test, []); | |
| 5030 | + buggy = !(test instanceof Array); | |
| 5031 | + } catch (e) { buggy = true; } | |
| 5032 | + return function setPrototypeOf(O, proto) { | |
| 5033 | + check(O, proto); | |
| 5034 | + if (buggy) O.__proto__ = proto; | |
| 5035 | + else set(O, proto); | |
| 5036 | + return O; | |
| 5037 | + }; | |
| 5038 | + }({}, false) : undefined), | |
| 5039 | + check: check | |
| 5040 | +}; | |
| 5041 | + | |
| 5042 | + | |
| 5043 | +/***/ }), | |
| 5044 | +/* 160 */ | |
| 5045 | +/***/ (function(module, exports, __webpack_require__) { | |
| 5046 | + | |
| 5047 | +__webpack_require__(161); | |
| 5048 | +var $Object = __webpack_require__(6).Object; | |
| 5049 | +module.exports = function create(P, D) { | |
| 5050 | + return $Object.create(P, D); | |
| 5051 | +}; | |
| 5052 | + | |
| 5053 | + | |
| 5054 | +/***/ }), | |
| 5055 | +/* 161 */ | |
| 5056 | +/***/ (function(module, exports, __webpack_require__) { | |
| 5057 | + | |
| 5058 | +var $export = __webpack_require__(7); | |
| 5059 | +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) | |
| 5060 | +$export($export.S, 'Object', { create: __webpack_require__(47) }); | |
| 5061 | + | |
| 5062 | + | |
| 5063 | +/***/ }), | |
| 5064 | +/* 162 */ | |
| 5065 | +/***/ (function(module, exports, __webpack_require__) { | |
| 5066 | + | |
| 5067 | +// false -> Array#indexOf | |
| 5068 | +// true -> Array#includes | |
| 5069 | +var toIObject = __webpack_require__(19); | |
| 5070 | +var toLength = __webpack_require__(72); | |
| 5071 | +var toAbsoluteIndex = __webpack_require__(163); | |
| 5072 | +module.exports = function (IS_INCLUDES) { | |
| 5073 | + return function ($this, el, fromIndex) { | |
| 5074 | + var O = toIObject($this); | |
| 5075 | + var length = toLength(O.length); | |
| 5076 | + var index = toAbsoluteIndex(fromIndex, length); | |
| 5077 | + var value; | |
| 5078 | + // Array#includes uses SameValueZero equality algorithm | |
| 5079 | + // eslint-disable-next-line no-self-compare | |
| 5080 | + if (IS_INCLUDES && el != el) while (length > index) { | |
| 5081 | + value = O[index++]; | |
| 5082 | + // eslint-disable-next-line no-self-compare | |
| 5083 | + if (value != value) return true; | |
| 5084 | + // Array#indexOf ignores holes, Array#includes - not | |
| 5085 | + } else for (;length > index; index++) if (IS_INCLUDES || index in O) { | |
| 5086 | + if (O[index] === el) return IS_INCLUDES || index || 0; | |
| 5087 | + } return !IS_INCLUDES && -1; | |
| 5088 | + }; | |
| 5089 | +}; | |
| 5090 | + | |
| 5091 | + | |
| 5092 | +/***/ }), | |
| 5093 | +/* 163 */ | |
| 5094 | +/***/ (function(module, exports, __webpack_require__) { | |
| 5095 | + | |
| 5096 | +var toInteger = __webpack_require__(73); | |
| 5097 | +var max = Math.max; | |
| 5098 | +var min = Math.min; | |
| 5099 | +module.exports = function (index, length) { | |
| 5100 | + index = toInteger(index); | |
| 5101 | + return index < 0 ? max(index + length, 0) : min(index, length); | |
| 5102 | +}; | |
| 5103 | + | |
| 5104 | + | |
| 5105 | +/***/ }), | |
| 5106 | +/* 164 */ | |
| 5107 | +/***/ (function(module, exports, __webpack_require__) { | |
| 5108 | + | |
| 5109 | +__webpack_require__(165); | |
| 5110 | +module.exports = __webpack_require__(6).Reflect.construct; | |
| 5111 | + | |
| 5112 | + | |
| 5113 | +/***/ }), | |
| 5114 | +/* 165 */ | |
| 5115 | +/***/ (function(module, exports, __webpack_require__) { | |
| 5116 | + | |
| 5117 | +// 26.1.2 Reflect.construct(target, argumentsList [, newTarget]) | |
| 5118 | +var $export = __webpack_require__(7); | |
| 5119 | +var create = __webpack_require__(47); | |
| 5120 | +var aFunction = __webpack_require__(35); | |
| 5121 | +var anObject = __webpack_require__(11); | |
| 5122 | +var isObject = __webpack_require__(9); | |
| 5123 | +var fails = __webpack_require__(21); | |
| 5124 | +var bind = __webpack_require__(166); | |
| 5125 | +var rConstruct = (__webpack_require__(8).Reflect || {}).construct; | |
| 5126 | + | |
| 5127 | +// MS Edge supports only 2 arguments and argumentsList argument is optional | |
| 5128 | +// FF Nightly sets third argument as `new.target`, but does not create `this` from it | |
| 5129 | +var NEW_TARGET_BUG = fails(function () { | |
| 5130 | + function F() { /* empty */ } | |
| 5131 | + return !(rConstruct(function () { /* empty */ }, [], F) instanceof F); | |
| 5132 | +}); | |
| 5133 | +var ARGS_BUG = !fails(function () { | |
| 5134 | + rConstruct(function () { /* empty */ }); | |
| 5135 | +}); | |
| 5136 | + | |
| 5137 | +$export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', { | |
| 5138 | + construct: function construct(Target, args /* , newTarget */) { | |
| 5139 | + aFunction(Target); | |
| 5140 | + anObject(args); | |
| 5141 | + var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]); | |
| 5142 | + if (ARGS_BUG && !NEW_TARGET_BUG) return rConstruct(Target, args, newTarget); | |
| 5143 | + if (Target == newTarget) { | |
| 5144 | + // w/o altered newTarget, optimization for 0-4 arguments | |
| 5145 | + switch (args.length) { | |
| 5146 | + case 0: return new Target(); | |
| 5147 | + case 1: return new Target(args[0]); | |
| 5148 | + case 2: return new Target(args[0], args[1]); | |
| 5149 | + case 3: return new Target(args[0], args[1], args[2]); | |
| 5150 | + case 4: return new Target(args[0], args[1], args[2], args[3]); | |
| 323 | 5151 | } |
| 5152 | + // w/o altered newTarget, lot of arguments case | |
| 5153 | + var $args = [null]; | |
| 5154 | + $args.push.apply($args, args); | |
| 5155 | + return new (bind.apply(Target, $args))(); | |
| 324 | 5156 | } |
| 325 | - }, { | |
| 326 | - key: "onBeforeRun", | |
| 327 | - value: function onBeforeRun(args) { | |
| 328 | - $e.modules.CommandBase.prototype.onBeforeRun.call(this, args); | |
| 329 | - if (this.history && this.isHistoryActive()) { | |
| 330 | - $e.internal('document/history/add-transaction', this.history); | |
| 5157 | + // with altered newTarget, not support built-in constructors | |
| 5158 | + var proto = newTarget.prototype; | |
| 5159 | + var instance = create(isObject(proto) ? proto : Object.prototype); | |
| 5160 | + var result = Function.apply.call(Target, instance, args); | |
| 5161 | + return isObject(result) ? result : instance; | |
| 5162 | + } | |
| 5163 | +}); | |
| 5164 | + | |
| 5165 | + | |
| 5166 | +/***/ }), | |
| 5167 | +/* 166 */ | |
| 5168 | +/***/ (function(module, exports, __webpack_require__) { | |
| 5169 | + | |
| 5170 | +"use strict"; | |
| 5171 | + | |
| 5172 | +var aFunction = __webpack_require__(35); | |
| 5173 | +var isObject = __webpack_require__(9); | |
| 5174 | +var invoke = __webpack_require__(133); | |
| 5175 | +var arraySlice = [].slice; | |
| 5176 | +var factories = {}; | |
| 5177 | + | |
| 5178 | +var construct = function (F, len, args) { | |
| 5179 | + if (!(len in factories)) { | |
| 5180 | + for (var n = [], i = 0; i < len; i++) n[i] = 'a[' + i + ']'; | |
| 5181 | + // eslint-disable-next-line no-new-func | |
| 5182 | + factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')'); | |
| 5183 | + } return factories[len](F, args); | |
| 5184 | +}; | |
| 5185 | + | |
| 5186 | +module.exports = Function.bind || function bind(that /* , ...args */) { | |
| 5187 | + var fn = aFunction(this); | |
| 5188 | + var partArgs = arraySlice.call(arguments, 1); | |
| 5189 | + var bound = function (/* args... */) { | |
| 5190 | + var args = partArgs.concat(arraySlice.call(arguments)); | |
| 5191 | + return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that); | |
| 5192 | + }; | |
| 5193 | + if (isObject(fn.prototype)) bound.prototype = fn.prototype; | |
| 5194 | + return bound; | |
| 5195 | +}; | |
| 5196 | + | |
| 5197 | + | |
| 5198 | +/***/ }), | |
| 5199 | +/* 167 */ | |
| 5200 | +/***/ (function(module, exports, __webpack_require__) { | |
| 5201 | + | |
| 5202 | +var _typeof = __webpack_require__(50); | |
| 5203 | + | |
| 5204 | +var assertThisInitialized = __webpack_require__(45); | |
| 5205 | + | |
| 5206 | +function _possibleConstructorReturn(self, call) { | |
| 5207 | + if (call && (_typeof(call) === "object" || typeof call === "function")) { | |
| 5208 | + return call; | |
| 5209 | + } | |
| 5210 | + | |
| 5211 | + return assertThisInitialized(self); | |
| 5212 | +} | |
| 5213 | + | |
| 5214 | +module.exports = _possibleConstructorReturn; | |
| 5215 | + | |
| 5216 | +/***/ }), | |
| 5217 | +/* 168 */ | |
| 5218 | +/***/ (function(module, exports, __webpack_require__) { | |
| 5219 | + | |
| 5220 | +__webpack_require__(57); | |
| 5221 | +__webpack_require__(59); | |
| 5222 | +module.exports = __webpack_require__(62).f('iterator'); | |
| 5223 | + | |
| 5224 | + | |
| 5225 | +/***/ }), | |
| 5226 | +/* 169 */ | |
| 5227 | +/***/ (function(module, exports, __webpack_require__) { | |
| 5228 | + | |
| 5229 | +var toInteger = __webpack_require__(73); | |
| 5230 | +var defined = __webpack_require__(65); | |
| 5231 | +// true -> String#at | |
| 5232 | +// false -> String#codePointAt | |
| 5233 | +module.exports = function (TO_STRING) { | |
| 5234 | + return function (that, pos) { | |
| 5235 | + var s = String(defined(that)); | |
| 5236 | + var i = toInteger(pos); | |
| 5237 | + var l = s.length; | |
| 5238 | + var a, b; | |
| 5239 | + if (i < 0 || i >= l) return TO_STRING ? '' : undefined; | |
| 5240 | + a = s.charCodeAt(i); | |
| 5241 | + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff | |
| 5242 | + ? TO_STRING ? s.charAt(i) : a | |
| 5243 | + : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; | |
| 5244 | + }; | |
| 5245 | +}; | |
| 5246 | + | |
| 5247 | + | |
| 5248 | +/***/ }), | |
| 5249 | +/* 170 */ | |
| 5250 | +/***/ (function(module, exports, __webpack_require__) { | |
| 5251 | + | |
| 5252 | +"use strict"; | |
| 5253 | + | |
| 5254 | +var create = __webpack_require__(47); | |
| 5255 | +var descriptor = __webpack_require__(42); | |
| 5256 | +var setToStringTag = __webpack_require__(53); | |
| 5257 | +var IteratorPrototype = {}; | |
| 5258 | + | |
| 5259 | +// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() | |
| 5260 | +__webpack_require__(22)(IteratorPrototype, __webpack_require__(10)('iterator'), function () { return this; }); | |
| 5261 | + | |
| 5262 | +module.exports = function (Constructor, NAME, next) { | |
| 5263 | + Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); | |
| 5264 | + setToStringTag(Constructor, NAME + ' Iterator'); | |
| 5265 | +}; | |
| 5266 | + | |
| 5267 | + | |
| 5268 | +/***/ }), | |
| 5269 | +/* 171 */ | |
| 5270 | +/***/ (function(module, exports, __webpack_require__) { | |
| 5271 | + | |
| 5272 | +"use strict"; | |
| 5273 | + | |
| 5274 | +var addToUnscopables = __webpack_require__(172); | |
| 5275 | +var step = __webpack_require__(139); | |
| 5276 | +var Iterators = __webpack_require__(33); | |
| 5277 | +var toIObject = __webpack_require__(19); | |
| 5278 | + | |
| 5279 | +// 22.1.3.4 Array.prototype.entries() | |
| 5280 | +// 22.1.3.13 Array.prototype.keys() | |
| 5281 | +// 22.1.3.29 Array.prototype.values() | |
| 5282 | +// 22.1.3.30 Array.prototype[@@iterator]() | |
| 5283 | +module.exports = __webpack_require__(96)(Array, 'Array', function (iterated, kind) { | |
| 5284 | + this._t = toIObject(iterated); // target | |
| 5285 | + this._i = 0; // next index | |
| 5286 | + this._k = kind; // kind | |
| 5287 | +// 22.1.5.2.1 %ArrayIteratorPrototype%.next() | |
| 5288 | +}, function () { | |
| 5289 | + var O = this._t; | |
| 5290 | + var kind = this._k; | |
| 5291 | + var index = this._i++; | |
| 5292 | + if (!O || index >= O.length) { | |
| 5293 | + this._t = undefined; | |
| 5294 | + return step(1); | |
| 5295 | + } | |
| 5296 | + if (kind == 'keys') return step(0, index); | |
| 5297 | + if (kind == 'values') return step(0, O[index]); | |
| 5298 | + return step(0, [index, O[index]]); | |
| 5299 | +}, 'values'); | |
| 5300 | + | |
| 5301 | +// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) | |
| 5302 | +Iterators.Arguments = Iterators.Array; | |
| 5303 | + | |
| 5304 | +addToUnscopables('keys'); | |
| 5305 | +addToUnscopables('values'); | |
| 5306 | +addToUnscopables('entries'); | |
| 5307 | + | |
| 5308 | + | |
| 5309 | +/***/ }), | |
| 5310 | +/* 172 */ | |
| 5311 | +/***/ (function(module, exports) { | |
| 5312 | + | |
| 5313 | +module.exports = function () { /* empty */ }; | |
| 5314 | + | |
| 5315 | + | |
| 5316 | +/***/ }), | |
| 5317 | +/* 173 */ | |
| 5318 | +/***/ (function(module, exports, __webpack_require__) { | |
| 5319 | + | |
| 5320 | +__webpack_require__(136); | |
| 5321 | +__webpack_require__(92); | |
| 5322 | +__webpack_require__(176); | |
| 5323 | +__webpack_require__(177); | |
| 5324 | +module.exports = __webpack_require__(6).Symbol; | |
| 5325 | + | |
| 5326 | + | |
| 5327 | +/***/ }), | |
| 5328 | +/* 174 */ | |
| 5329 | +/***/ (function(module, exports, __webpack_require__) { | |
| 5330 | + | |
| 5331 | +// all enumerable object keys, includes symbols | |
| 5332 | +var getKeys = __webpack_require__(37); | |
| 5333 | +var gOPS = __webpack_require__(67); | |
| 5334 | +var pIE = __webpack_require__(49); | |
| 5335 | +module.exports = function (it) { | |
| 5336 | + var result = getKeys(it); | |
| 5337 | + var getSymbols = gOPS.f; | |
| 5338 | + if (getSymbols) { | |
| 5339 | + var symbols = getSymbols(it); | |
| 5340 | + var isEnum = pIE.f; | |
| 5341 | + var i = 0; | |
| 5342 | + var key; | |
| 5343 | + while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key); | |
| 5344 | + } return result; | |
| 5345 | +}; | |
| 5346 | + | |
| 5347 | + | |
| 5348 | +/***/ }), | |
| 5349 | +/* 175 */ | |
| 5350 | +/***/ (function(module, exports, __webpack_require__) { | |
| 5351 | + | |
| 5352 | +// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window | |
| 5353 | +var toIObject = __webpack_require__(19); | |
| 5354 | +var gOPN = __webpack_require__(91).f; | |
| 5355 | +var toString = {}.toString; | |
| 5356 | + | |
| 5357 | +var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames | |
| 5358 | + ? Object.getOwnPropertyNames(window) : []; | |
| 5359 | + | |
| 5360 | +var getWindowNames = function (it) { | |
| 5361 | + try { | |
| 5362 | + return gOPN(it); | |
| 5363 | + } catch (e) { | |
| 5364 | + return windowNames.slice(); | |
| 5365 | + } | |
| 5366 | +}; | |
| 5367 | + | |
| 5368 | +module.exports.f = function getOwnPropertyNames(it) { | |
| 5369 | + return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); | |
| 5370 | +}; | |
| 5371 | + | |
| 5372 | + | |
| 5373 | +/***/ }), | |
| 5374 | +/* 176 */ | |
| 5375 | +/***/ (function(module, exports, __webpack_require__) { | |
| 5376 | + | |
| 5377 | +__webpack_require__(75)('asyncIterator'); | |
| 5378 | + | |
| 5379 | + | |
| 5380 | +/***/ }), | |
| 5381 | +/* 177 */ | |
| 5382 | +/***/ (function(module, exports, __webpack_require__) { | |
| 5383 | + | |
| 5384 | +__webpack_require__(75)('observable'); | |
| 5385 | + | |
| 5386 | + | |
| 5387 | +/***/ }), | |
| 5388 | +/* 178 */ | |
| 5389 | +/***/ (function(module, exports, __webpack_require__) { | |
| 5390 | + | |
| 5391 | +var ITERATOR = __webpack_require__(10)('iterator'); | |
| 5392 | +var SAFE_CLOSING = false; | |
| 5393 | + | |
| 5394 | +try { | |
| 5395 | + var riter = [7][ITERATOR](); | |
| 5396 | + riter['return'] = function () { SAFE_CLOSING = true; }; | |
| 5397 | + // eslint-disable-next-line no-throw-literal | |
| 5398 | + Array.from(riter, function () { throw 2; }); | |
| 5399 | +} catch (e) { /* empty */ } | |
| 5400 | + | |
| 5401 | +module.exports = function (exec, skipClosing) { | |
| 5402 | + if (!skipClosing && !SAFE_CLOSING) return false; | |
| 5403 | + var safe = false; | |
| 5404 | + try { | |
| 5405 | + var arr = [7]; | |
| 5406 | + var iter = arr[ITERATOR](); | |
| 5407 | + iter.next = function () { return { done: safe = true }; }; | |
| 5408 | + arr[ITERATOR] = function () { return iter; }; | |
| 5409 | + exec(arr); | |
| 5410 | + } catch (e) { /* empty */ } | |
| 5411 | + return safe; | |
| 5412 | +}; | |
| 5413 | + | |
| 5414 | + | |
| 5415 | +/***/ }), | |
| 5416 | +/* 179 */ | |
| 5417 | +/***/ (function(module, exports, __webpack_require__) { | |
| 5418 | + | |
| 5419 | +var def = __webpack_require__(51).f; | |
| 5420 | +var has = __webpack_require__(64); | |
| 5421 | +var TAG = __webpack_require__(13)('toStringTag'); | |
| 5422 | + | |
| 5423 | +module.exports = function (it, tag, stat) { | |
| 5424 | + if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); | |
| 5425 | +}; | |
| 5426 | + | |
| 5427 | + | |
| 5428 | +/***/ }), | |
| 5429 | +/* 180 */ | |
| 5430 | +/***/ (function(module, exports, __webpack_require__) { | |
| 5431 | + | |
| 5432 | +// 7.3.20 SpeciesConstructor(O, defaultConstructor) | |
| 5433 | +var anObject = __webpack_require__(20); | |
| 5434 | +var aFunction = __webpack_require__(98); | |
| 5435 | +var SPECIES = __webpack_require__(13)('species'); | |
| 5436 | +module.exports = function (O, D) { | |
| 5437 | + var C = anObject(O).constructor; | |
| 5438 | + var S; | |
| 5439 | + return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); | |
| 5440 | +}; | |
| 5441 | + | |
| 5442 | + | |
| 5443 | +/***/ }), | |
| 5444 | +/* 181 */ | |
| 5445 | +/***/ (function(module, exports, __webpack_require__) { | |
| 5446 | + | |
| 5447 | +var DESCRIPTORS = __webpack_require__(14); | |
| 5448 | +var getKeys = __webpack_require__(37); | |
| 5449 | +var toIObject = __webpack_require__(19); | |
| 5450 | +var isEnum = __webpack_require__(49).f; | |
| 5451 | +module.exports = function (isEntries) { | |
| 5452 | + return function (it) { | |
| 5453 | + var O = toIObject(it); | |
| 5454 | + var keys = getKeys(O); | |
| 5455 | + var length = keys.length; | |
| 5456 | + var i = 0; | |
| 5457 | + var result = []; | |
| 5458 | + var key; | |
| 5459 | + while (length > i) { | |
| 5460 | + key = keys[i++]; | |
| 5461 | + if (!DESCRIPTORS || isEnum.call(O, key)) { | |
| 5462 | + result.push(isEntries ? [key, O[key]] : O[key]); | |
| 331 | 5463 | } |
| 332 | 5464 | } |
| 333 | - }, { | |
| 334 | - key: "onAfterRun", | |
| 335 | - value: function onAfterRun(args, result) { | |
| 336 | - $e.modules.CommandBase.prototype.onAfterRun.call(this, args, result); | |
| 337 | - if (this.isHistoryActive()) { | |
| 338 | - if (this.isDebounceRequired) { | |
| 339 | - this.constructor.debounce(function () { | |
| 340 | - return $e.internal('document/history/end-transaction'); | |
| 341 | - }); | |
| 342 | - } else { | |
| 343 | - $e.internal('document/history/end-transaction'); | |
| 344 | - } | |
| 5465 | + return result; | |
| 5466 | + }; | |
| 5467 | +}; | |
| 5468 | + | |
| 5469 | + | |
| 5470 | +/***/ }), | |
| 5471 | +/* 182 */ | |
| 5472 | +/***/ (function(module, exports, __webpack_require__) { | |
| 5473 | + | |
| 5474 | +var _Object$defineProperty = __webpack_require__(1); | |
| 5475 | + | |
| 5476 | +var _Object$defineProperties = __webpack_require__(273); | |
| 5477 | + | |
| 5478 | +var _Object$getOwnPropertyDescriptors = __webpack_require__(293); | |
| 5479 | + | |
| 5480 | +var _Object$getOwnPropertyDescriptor = __webpack_require__(116); | |
| 5481 | + | |
| 5482 | +var _Object$getOwnPropertySymbols = __webpack_require__(297); | |
| 5483 | + | |
| 5484 | +var _Object$keys = __webpack_require__(25); | |
| 5485 | + | |
| 5486 | +var defineProperty = __webpack_require__(27); | |
| 5487 | + | |
| 5488 | +function ownKeys(object, enumerableOnly) { | |
| 5489 | + var keys = _Object$keys(object); | |
| 5490 | + | |
| 5491 | + if (_Object$getOwnPropertySymbols) { | |
| 5492 | + var symbols = _Object$getOwnPropertySymbols(object); | |
| 5493 | + | |
| 5494 | + if (enumerableOnly) symbols = symbols.filter(function (sym) { | |
| 5495 | + return _Object$getOwnPropertyDescriptor(object, sym).enumerable; | |
| 5496 | + }); | |
| 5497 | + keys.push.apply(keys, symbols); | |
| 5498 | + } | |
| 5499 | + | |
| 5500 | + return keys; | |
| 5501 | +} | |
| 5502 | + | |
| 5503 | +function _objectSpread2(target) { | |
| 5504 | + for (var i = 1; i < arguments.length; i++) { | |
| 5505 | + var source = arguments[i] != null ? arguments[i] : {}; | |
| 5506 | + | |
| 5507 | + if (i % 2) { | |
| 5508 | + ownKeys(Object(source), true).forEach(function (key) { | |
| 5509 | + defineProperty(target, key, source[key]); | |
| 5510 | + }); | |
| 5511 | + } else if (_Object$getOwnPropertyDescriptors) { | |
| 5512 | + _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)); | |
| 5513 | + } else { | |
| 5514 | + ownKeys(Object(source)).forEach(function (key) { | |
| 5515 | + _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); | |
| 5516 | + }); | |
| 5517 | + } | |
| 5518 | + } | |
| 5519 | + | |
| 5520 | + return target; | |
| 5521 | +} | |
| 5522 | + | |
| 5523 | +module.exports = _objectSpread2; | |
| 5524 | + | |
| 5525 | +/***/ }), | |
| 5526 | +/* 183 */ | |
| 5527 | +/***/ (function(module, exports, __webpack_require__) { | |
| 5528 | + | |
| 5529 | +"use strict"; | |
| 5530 | +// 21.1.3.7 String.prototype.includes(searchString, position = 0) | |
| 5531 | + | |
| 5532 | +var $export = __webpack_require__(38); | |
| 5533 | +var context = __webpack_require__(205); | |
| 5534 | +var INCLUDES = 'includes'; | |
| 5535 | + | |
| 5536 | +$export($export.P + $export.F * __webpack_require__(206)(INCLUDES), 'String', { | |
| 5537 | + includes: function includes(searchString /* , position = 0 */) { | |
| 5538 | + return !!~context(this, searchString, INCLUDES) | |
| 5539 | + .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined); | |
| 5540 | + } | |
| 5541 | +}); | |
| 5542 | + | |
| 5543 | + | |
| 5544 | +/***/ }), | |
| 5545 | +/* 184 */ | |
| 5546 | +/***/ (function(module, exports, __webpack_require__) { | |
| 5547 | + | |
| 5548 | +__webpack_require__(185); | |
| 5549 | +var $Object = __webpack_require__(6).Object; | |
| 5550 | +module.exports = function getOwnPropertyDescriptor(it, key) { | |
| 5551 | + return $Object.getOwnPropertyDescriptor(it, key); | |
| 5552 | +}; | |
| 5553 | + | |
| 5554 | + | |
| 5555 | +/***/ }), | |
| 5556 | +/* 185 */ | |
| 5557 | +/***/ (function(module, exports, __webpack_require__) { | |
| 5558 | + | |
| 5559 | +// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) | |
| 5560 | +var toIObject = __webpack_require__(19); | |
| 5561 | +var $getOwnPropertyDescriptor = __webpack_require__(48).f; | |
| 5562 | + | |
| 5563 | +__webpack_require__(78)('getOwnPropertyDescriptor', function () { | |
| 5564 | + return function getOwnPropertyDescriptor(it, key) { | |
| 5565 | + return $getOwnPropertyDescriptor(toIObject(it), key); | |
| 5566 | + }; | |
| 5567 | +}); | |
| 5568 | + | |
| 5569 | + | |
| 5570 | +/***/ }), | |
| 5571 | +/* 186 */ | |
| 5572 | +/***/ (function(module, exports, __webpack_require__) { | |
| 5573 | + | |
| 5574 | +module.exports = __webpack_require__(187); | |
| 5575 | + | |
| 5576 | +/***/ }), | |
| 5577 | +/* 187 */ | |
| 5578 | +/***/ (function(module, exports, __webpack_require__) { | |
| 5579 | + | |
| 5580 | +__webpack_require__(188); | |
| 5581 | +module.exports = __webpack_require__(6).Reflect.get; | |
| 5582 | + | |
| 5583 | + | |
| 5584 | +/***/ }), | |
| 5585 | +/* 188 */ | |
| 5586 | +/***/ (function(module, exports, __webpack_require__) { | |
| 5587 | + | |
| 5588 | +// 26.1.6 Reflect.get(target, propertyKey [, receiver]) | |
| 5589 | +var gOPD = __webpack_require__(48); | |
| 5590 | +var getPrototypeOf = __webpack_require__(63); | |
| 5591 | +var has = __webpack_require__(17); | |
| 5592 | +var $export = __webpack_require__(7); | |
| 5593 | +var isObject = __webpack_require__(9); | |
| 5594 | +var anObject = __webpack_require__(11); | |
| 5595 | + | |
| 5596 | +function get(target, propertyKey /* , receiver */) { | |
| 5597 | + var receiver = arguments.length < 3 ? target : arguments[2]; | |
| 5598 | + var desc, proto; | |
| 5599 | + if (anObject(target) === receiver) return target[propertyKey]; | |
| 5600 | + if (desc = gOPD.f(target, propertyKey)) return has(desc, 'value') | |
| 5601 | + ? desc.value | |
| 5602 | + : desc.get !== undefined | |
| 5603 | + ? desc.get.call(receiver) | |
| 5604 | + : undefined; | |
| 5605 | + if (isObject(proto = getPrototypeOf(target))) return get(proto, propertyKey, receiver); | |
| 5606 | +} | |
| 5607 | + | |
| 5608 | +$export($export.S, 'Reflect', { get: get }); | |
| 5609 | + | |
| 5610 | + | |
| 5611 | +/***/ }), | |
| 5612 | +/* 189 */ | |
| 5613 | +/***/ (function(module, exports, __webpack_require__) { | |
| 5614 | + | |
| 5615 | +var getPrototypeOf = __webpack_require__(16); | |
| 5616 | + | |
| 5617 | +function _superPropBase(object, property) { | |
| 5618 | + while (!Object.prototype.hasOwnProperty.call(object, property)) { | |
| 5619 | + object = getPrototypeOf(object); | |
| 5620 | + if (object === null) break; | |
| 5621 | + } | |
| 5622 | + | |
| 5623 | + return object; | |
| 5624 | +} | |
| 5625 | + | |
| 5626 | +module.exports = _superPropBase; | |
| 5627 | + | |
| 5628 | +/***/ }), | |
| 5629 | +/* 190 */ | |
| 5630 | +/***/ (function(module, exports, __webpack_require__) { | |
| 5631 | + | |
| 5632 | +// 0 -> Array#forEach | |
| 5633 | +// 1 -> Array#map | |
| 5634 | +// 2 -> Array#filter | |
| 5635 | +// 3 -> Array#some | |
| 5636 | +// 4 -> Array#every | |
| 5637 | +// 5 -> Array#find | |
| 5638 | +// 6 -> Array#findIndex | |
| 5639 | +var ctx = __webpack_require__(81); | |
| 5640 | +var IObject = __webpack_require__(125); | |
| 5641 | +var toObject = __webpack_require__(102); | |
| 5642 | +var toLength = __webpack_require__(46); | |
| 5643 | +var asc = __webpack_require__(216); | |
| 5644 | +module.exports = function (TYPE, $create) { | |
| 5645 | + var IS_MAP = TYPE == 1; | |
| 5646 | + var IS_FILTER = TYPE == 2; | |
| 5647 | + var IS_SOME = TYPE == 3; | |
| 5648 | + var IS_EVERY = TYPE == 4; | |
| 5649 | + var IS_FIND_INDEX = TYPE == 6; | |
| 5650 | + var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; | |
| 5651 | + var create = $create || asc; | |
| 5652 | + return function ($this, callbackfn, that) { | |
| 5653 | + var O = toObject($this); | |
| 5654 | + var self = IObject(O); | |
| 5655 | + var f = ctx(callbackfn, that, 3); | |
| 5656 | + var length = toLength(self.length); | |
| 5657 | + var index = 0; | |
| 5658 | + var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined; | |
| 5659 | + var val, res; | |
| 5660 | + for (;length > index; index++) if (NO_HOLES || index in self) { | |
| 5661 | + val = self[index]; | |
| 5662 | + res = f(val, index, O); | |
| 5663 | + if (TYPE) { | |
| 5664 | + if (IS_MAP) result[index] = res; // map | |
| 5665 | + else if (res) switch (TYPE) { | |
| 5666 | + case 3: return true; // some | |
| 5667 | + case 5: return val; // find | |
| 5668 | + case 6: return index; // findIndex | |
| 5669 | + case 2: result.push(val); // filter | |
| 5670 | + } else if (IS_EVERY) return false; // every | |
| 345 | 5671 | } |
| 346 | 5672 | } |
| 347 | - }, { | |
| 348 | - key: "onCatchApply", | |
| 349 | - value: function onCatchApply(e) { | |
| 350 | - $e.modules.CommandBase.prototype.onCatchApply.call(this, e); | |
| 5673 | + return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; | |
| 5674 | + }; | |
| 5675 | +}; | |
| 351 | 5676 | |
| 352 | - // Rollback history on failure. | |
| 353 | - if (e instanceof $e.modules.HookBreak && this.history) { | |
| 354 | - if (this.isDebounceRequired) { | |
| 355 | - // `clear-transaction` is under debounce, because it should `clear-transaction` after `end-transaction`. | |
| 356 | - this.constructor.debounce(function () { | |
| 357 | - return $e.internal('document/history/clear-transaction'); | |
| 358 | - }); | |
| 359 | - } else { | |
| 360 | - $e.internal('document/history/clear-transaction'); | |
| 361 | - } | |
| 362 | - } | |
| 5677 | + | |
| 5678 | +/***/ }), | |
| 5679 | +/* 191 */ | |
| 5680 | +/***/ (function(module, exports, __webpack_require__) { | |
| 5681 | + | |
| 5682 | +"use strict"; | |
| 5683 | + | |
| 5684 | +__webpack_require__(283); | |
| 5685 | +var anObject = __webpack_require__(20); | |
| 5686 | +var $flags = __webpack_require__(109); | |
| 5687 | +var DESCRIPTORS = __webpack_require__(28); | |
| 5688 | +var TO_STRING = 'toString'; | |
| 5689 | +var $toString = /./[TO_STRING]; | |
| 5690 | + | |
| 5691 | +var define = function (fn) { | |
| 5692 | + __webpack_require__(39)(RegExp.prototype, TO_STRING, fn, true); | |
| 5693 | +}; | |
| 5694 | + | |
| 5695 | +// 21.2.5.14 RegExp.prototype.toString() | |
| 5696 | +if (__webpack_require__(36)(function () { return $toString.call({ source: 'a', flags: 'b' }) != '/a/b'; })) { | |
| 5697 | + define(function toString() { | |
| 5698 | + var R = anObject(this); | |
| 5699 | + return '/'.concat(R.source, '/', | |
| 5700 | + 'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined); | |
| 5701 | + }); | |
| 5702 | +// FF44- RegExp#toString has a wrong name | |
| 5703 | +} else if ($toString.name != TO_STRING) { | |
| 5704 | + define(function toString() { | |
| 5705 | + return $toString.call(this); | |
| 5706 | + }); | |
| 5707 | +} | |
| 5708 | + | |
| 5709 | + | |
| 5710 | +/***/ }), | |
| 5711 | +/* 192 */ | |
| 5712 | +/***/ (function(module, exports, __webpack_require__) { | |
| 5713 | + | |
| 5714 | +// 19.1.2.14 / 15.2.3.14 Object.keys(O) | |
| 5715 | +var $keys = __webpack_require__(220); | |
| 5716 | +var enumBugKeys = __webpack_require__(151); | |
| 5717 | + | |
| 5718 | +module.exports = Object.keys || function keys(O) { | |
| 5719 | + return $keys(O, enumBugKeys); | |
| 5720 | +}; | |
| 5721 | + | |
| 5722 | + | |
| 5723 | +/***/ }), | |
| 5724 | +/* 193 */ | |
| 5725 | +/***/ (function(module, exports, __webpack_require__) { | |
| 5726 | + | |
| 5727 | +"use strict"; | |
| 5728 | + | |
| 5729 | +var $defineProperty = __webpack_require__(15); | |
| 5730 | +var createDesc = __webpack_require__(42); | |
| 5731 | + | |
| 5732 | +module.exports = function (object, index, value) { | |
| 5733 | + if (index in object) $defineProperty.f(object, index, createDesc(0, value)); | |
| 5734 | + else object[index] = value; | |
| 5735 | +}; | |
| 5736 | + | |
| 5737 | + | |
| 5738 | +/***/ }), | |
| 5739 | +/* 194 */ | |
| 5740 | +/***/ (function(module, exports, __webpack_require__) { | |
| 5741 | + | |
| 5742 | +var _Array$from = __webpack_require__(201); | |
| 5743 | + | |
| 5744 | +var arrayLikeToArray = __webpack_require__(200); | |
| 5745 | + | |
| 5746 | +function _unsupportedIterableToArray(o, minLen) { | |
| 5747 | + if (!o) return; | |
| 5748 | + if (typeof o === "string") return arrayLikeToArray(o, minLen); | |
| 5749 | + var n = Object.prototype.toString.call(o).slice(8, -1); | |
| 5750 | + if (n === "Object" && o.constructor) n = o.constructor.name; | |
| 5751 | + if (n === "Map" || n === "Set") return _Array$from(o); | |
| 5752 | + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen); | |
| 5753 | +} | |
| 5754 | + | |
| 5755 | +module.exports = _unsupportedIterableToArray; | |
| 5756 | + | |
| 5757 | +/***/ }), | |
| 5758 | +/* 195 */, | |
| 5759 | +/* 196 */, | |
| 5760 | +/* 197 */ | |
| 5761 | +/***/ (function(module, exports, __webpack_require__) { | |
| 5762 | + | |
| 5763 | +"use strict"; | |
| 5764 | + | |
| 5765 | +var regexpExec = __webpack_require__(94); | |
| 5766 | +__webpack_require__(38)({ | |
| 5767 | + target: 'RegExp', | |
| 5768 | + proto: true, | |
| 5769 | + forced: regexpExec !== /./.exec | |
| 5770 | +}, { | |
| 5771 | + exec: regexpExec | |
| 5772 | +}); | |
| 5773 | + | |
| 5774 | + | |
| 5775 | +/***/ }), | |
| 5776 | +/* 198 */ | |
| 5777 | +/***/ (function(module, exports, __webpack_require__) { | |
| 5778 | + | |
| 5779 | +"use strict"; | |
| 5780 | + | |
| 5781 | +var LIBRARY = __webpack_require__(115); | |
| 5782 | +var $export = __webpack_require__(38); | |
| 5783 | +var redefine = __webpack_require__(39); | |
| 5784 | +var hide = __webpack_require__(30); | |
| 5785 | +var Iterators = __webpack_require__(123); | |
| 5786 | +var $iterCreate = __webpack_require__(242); | |
| 5787 | +var setToStringTag = __webpack_require__(179); | |
| 5788 | +var getPrototypeOf = __webpack_require__(244); | |
| 5789 | +var ITERATOR = __webpack_require__(13)('iterator'); | |
| 5790 | +var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` | |
| 5791 | +var FF_ITERATOR = '@@iterator'; | |
| 5792 | +var KEYS = 'keys'; | |
| 5793 | +var VALUES = 'values'; | |
| 5794 | + | |
| 5795 | +var returnThis = function () { return this; }; | |
| 5796 | + | |
| 5797 | +module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { | |
| 5798 | + $iterCreate(Constructor, NAME, next); | |
| 5799 | + var getMethod = function (kind) { | |
| 5800 | + if (!BUGGY && kind in proto) return proto[kind]; | |
| 5801 | + switch (kind) { | |
| 5802 | + case KEYS: return function keys() { return new Constructor(this, kind); }; | |
| 5803 | + case VALUES: return function values() { return new Constructor(this, kind); }; | |
| 5804 | + } return function entries() { return new Constructor(this, kind); }; | |
| 5805 | + }; | |
| 5806 | + var TAG = NAME + ' Iterator'; | |
| 5807 | + var DEF_VALUES = DEFAULT == VALUES; | |
| 5808 | + var VALUES_BUG = false; | |
| 5809 | + var proto = Base.prototype; | |
| 5810 | + var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; | |
| 5811 | + var $default = $native || getMethod(DEFAULT); | |
| 5812 | + var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; | |
| 5813 | + var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; | |
| 5814 | + var methods, key, IteratorPrototype; | |
| 5815 | + // Fix native | |
| 5816 | + if ($anyNative) { | |
| 5817 | + IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); | |
| 5818 | + if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { | |
| 5819 | + // Set @@toStringTag to native iterators | |
| 5820 | + setToStringTag(IteratorPrototype, TAG, true); | |
| 5821 | + // fix for some old engines | |
| 5822 | + if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis); | |
| 363 | 5823 | } |
| 364 | - }], [{ | |
| 5824 | + } | |
| 5825 | + // fix Array#{values, @@iterator}.name in V8 / FF | |
| 5826 | + if (DEF_VALUES && $native && $native.name !== VALUES) { | |
| 5827 | + VALUES_BUG = true; | |
| 5828 | + $default = function values() { return $native.call(this); }; | |
| 5829 | + } | |
| 5830 | + // Define iterator | |
| 5831 | + if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { | |
| 5832 | + hide(proto, ITERATOR, $default); | |
| 5833 | + } | |
| 5834 | + // Plug for library | |
| 5835 | + Iterators[NAME] = $default; | |
| 5836 | + Iterators[TAG] = returnThis; | |
| 5837 | + if (DEFAULT) { | |
| 5838 | + methods = { | |
| 5839 | + values: DEF_VALUES ? $default : getMethod(VALUES), | |
| 5840 | + keys: IS_SET ? $default : getMethod(KEYS), | |
| 5841 | + entries: $entries | |
| 5842 | + }; | |
| 5843 | + if (FORCED) for (key in methods) { | |
| 5844 | + if (!(key in proto)) redefine(proto, key, methods[key]); | |
| 5845 | + } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); | |
| 5846 | + } | |
| 5847 | + return methods; | |
| 5848 | +}; | |
| 5849 | + | |
| 5850 | + | |
| 5851 | +/***/ }), | |
| 5852 | +/* 199 */ | |
| 5853 | +/***/ (function(module, exports, __webpack_require__) { | |
| 5854 | + | |
| 5855 | +var toInteger = __webpack_require__(60); | |
| 5856 | +var max = Math.max; | |
| 5857 | +var min = Math.min; | |
| 5858 | +module.exports = function (index, length) { | |
| 5859 | + index = toInteger(index); | |
| 5860 | + return index < 0 ? max(index + length, 0) : min(index, length); | |
| 5861 | +}; | |
| 5862 | + | |
| 5863 | + | |
| 5864 | +/***/ }), | |
| 5865 | +/* 200 */ | |
| 5866 | +/***/ (function(module, exports) { | |
| 5867 | + | |
| 5868 | +function _arrayLikeToArray(arr, len) { | |
| 5869 | + if (len == null || len > arr.length) len = arr.length; | |
| 5870 | + | |
| 5871 | + for (var i = 0, arr2 = new Array(len); i < len; i++) { | |
| 5872 | + arr2[i] = arr[i]; | |
| 5873 | + } | |
| 5874 | + | |
| 5875 | + return arr2; | |
| 5876 | +} | |
| 5877 | + | |
| 5878 | +module.exports = _arrayLikeToArray; | |
| 5879 | + | |
| 5880 | +/***/ }), | |
| 5881 | +/* 201 */ | |
| 5882 | +/***/ (function(module, exports, __webpack_require__) { | |
| 5883 | + | |
| 5884 | +module.exports = __webpack_require__(233); | |
| 5885 | + | |
| 5886 | +/***/ }), | |
| 5887 | +/* 202 */ | |
| 5888 | +/***/ (function(module, exports, __webpack_require__) { | |
| 5889 | + | |
| 5890 | +__webpack_require__(203); | |
| 5891 | +module.exports = __webpack_require__(6).Object.keys; | |
| 5892 | + | |
| 5893 | + | |
| 5894 | +/***/ }), | |
| 5895 | +/* 203 */ | |
| 5896 | +/***/ (function(module, exports, __webpack_require__) { | |
| 5897 | + | |
| 5898 | +// 19.1.2.14 Object.keys(O) | |
| 5899 | +var toObject = __webpack_require__(32); | |
| 5900 | +var $keys = __webpack_require__(37); | |
| 5901 | + | |
| 5902 | +__webpack_require__(78)('keys', function () { | |
| 5903 | + return function keys(it) { | |
| 5904 | + return $keys(toObject(it)); | |
| 5905 | + }; | |
| 5906 | +}); | |
| 5907 | + | |
| 5908 | + | |
| 5909 | +/***/ }), | |
| 5910 | +/* 204 */ | |
| 5911 | +/***/ (function(module, exports, __webpack_require__) { | |
| 5912 | + | |
| 5913 | +"use strict"; | |
| 5914 | + | |
| 5915 | + | |
| 5916 | +var _interopRequireDefault = __webpack_require__(0); | |
| 5917 | + | |
| 5918 | +var _Object$defineProperty = __webpack_require__(1); | |
| 5919 | + | |
| 5920 | +_Object$defineProperty(exports, "__esModule", { | |
| 5921 | + value: true | |
| 5922 | +}); | |
| 5923 | + | |
| 5924 | +exports.default = void 0; | |
| 5925 | + | |
| 5926 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 5927 | + | |
| 5928 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 5929 | + | |
| 5930 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 5931 | + | |
| 5932 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 5933 | + | |
| 5934 | +var _commandBase = _interopRequireDefault(__webpack_require__(23)); | |
| 5935 | + | |
| 5936 | +var CommandInternalBase = /*#__PURE__*/function (_CommandBase) { | |
| 5937 | + (0, _inherits2.default)(CommandInternalBase, _CommandBase); | |
| 5938 | + | |
| 5939 | + var _super = (0, _createSuper2.default)(CommandInternalBase); | |
| 5940 | + | |
| 5941 | + (0, _createClass2.default)(CommandInternalBase, null, [{ | |
| 365 | 5942 | key: "getInstanceType", |
| 366 | 5943 | value: function getInstanceType() { |
| 367 | - return 'CommandHistoryDebounceBase'; | |
| 5944 | + return 'CommandInternalBase'; | |
| 368 | 5945 | } |
| 369 | 5946 | }]); |
| 370 | -}(_commandHistoryBase.default); | |
| 371 | -/** | |
| 372 | - * Function debounce(). | |
| 373 | - * | |
| 374 | - * Will debounce every function you pass in, at the same debounce flow. | |
| 375 | - * | |
| 376 | - * @param {Function} | |
| 377 | - */ | |
| 378 | -(0, _defineProperty2.default)(CommandHistoryDebounceBase, "debounce", undefined); | |
| 379 | 5947 | |
| 5948 | + function CommandInternalBase(args) { | |
| 5949 | + var commandsAPI = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : $e.commandsInternal; | |
| 5950 | + (0, _classCallCheck2.default)(this, CommandInternalBase); | |
| 5951 | + return _super.call(this, args, commandsAPI); | |
| 5952 | + } | |
| 5953 | + | |
| 5954 | + return CommandInternalBase; | |
| 5955 | +}(_commandBase.default); | |
| 5956 | + | |
| 5957 | +exports.default = CommandInternalBase; | |
| 5958 | + | |
| 380 | 5959 | /***/ }), |
| 5960 | +/* 205 */ | |
| 5961 | +/***/ (function(module, exports, __webpack_require__) { | |
| 381 | 5962 | |
| 382 | -/***/ "../assets/dev/js/editor/utils/is-instanceof.js": | |
| 383 | -/*!******************************************************!*\ | |
| 384 | - !*** ../assets/dev/js/editor/utils/is-instanceof.js ***! | |
| 385 | - \******************************************************/ | |
| 386 | -/***/ ((__unused_webpack_module, exports) => { | |
| 5963 | +// helper for String#{startsWith, endsWith, includes} | |
| 5964 | +var isRegExp = __webpack_require__(126); | |
| 5965 | +var defined = __webpack_require__(43); | |
| 387 | 5966 | |
| 5967 | +module.exports = function (that, searchString, NAME) { | |
| 5968 | + if (isRegExp(searchString)) throw TypeError('String#' + NAME + " doesn't accept regex!"); | |
| 5969 | + return String(defined(that)); | |
| 5970 | +}; | |
| 5971 | + | |
| 5972 | + | |
| 5973 | +/***/ }), | |
| 5974 | +/* 206 */ | |
| 5975 | +/***/ (function(module, exports, __webpack_require__) { | |
| 5976 | + | |
| 5977 | +var MATCH = __webpack_require__(13)('match'); | |
| 5978 | +module.exports = function (KEY) { | |
| 5979 | + var re = /./; | |
| 5980 | + try { | |
| 5981 | + '/./'[KEY](re); | |
| 5982 | + } catch (e) { | |
| 5983 | + try { | |
| 5984 | + re[MATCH] = false; | |
| 5985 | + return !'/./'[KEY](re); | |
| 5986 | + } catch (f) { /* empty */ } | |
| 5987 | + } return true; | |
| 5988 | +}; | |
| 5989 | + | |
| 5990 | + | |
| 5991 | +/***/ }), | |
| 5992 | +/* 207 */, | |
| 5993 | +/* 208 */ | |
| 5994 | +/***/ (function(module, exports, __webpack_require__) { | |
| 5995 | + | |
| 5996 | +// 7.3.20 SpeciesConstructor(O, defaultConstructor) | |
| 5997 | +var anObject = __webpack_require__(11); | |
| 5998 | +var aFunction = __webpack_require__(35); | |
| 5999 | +var SPECIES = __webpack_require__(10)('species'); | |
| 6000 | +module.exports = function (O, D) { | |
| 6001 | + var C = anObject(O).constructor; | |
| 6002 | + var S; | |
| 6003 | + return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); | |
| 6004 | +}; | |
| 6005 | + | |
| 6006 | + | |
| 6007 | +/***/ }), | |
| 6008 | +/* 209 */ | |
| 6009 | +/***/ (function(module, exports, __webpack_require__) { | |
| 6010 | + | |
| 6011 | +var ctx = __webpack_require__(29); | |
| 6012 | +var invoke = __webpack_require__(133); | |
| 6013 | +var html = __webpack_require__(132); | |
| 6014 | +var cel = __webpack_require__(88); | |
| 6015 | +var global = __webpack_require__(8); | |
| 6016 | +var process = global.process; | |
| 6017 | +var setTask = global.setImmediate; | |
| 6018 | +var clearTask = global.clearImmediate; | |
| 6019 | +var MessageChannel = global.MessageChannel; | |
| 6020 | +var Dispatch = global.Dispatch; | |
| 6021 | +var counter = 0; | |
| 6022 | +var queue = {}; | |
| 6023 | +var ONREADYSTATECHANGE = 'onreadystatechange'; | |
| 6024 | +var defer, channel, port; | |
| 6025 | +var run = function () { | |
| 6026 | + var id = +this; | |
| 6027 | + // eslint-disable-next-line no-prototype-builtins | |
| 6028 | + if (queue.hasOwnProperty(id)) { | |
| 6029 | + var fn = queue[id]; | |
| 6030 | + delete queue[id]; | |
| 6031 | + fn(); | |
| 6032 | + } | |
| 6033 | +}; | |
| 6034 | +var listener = function (event) { | |
| 6035 | + run.call(event.data); | |
| 6036 | +}; | |
| 6037 | +// Node.js 0.9+ & IE10+ has setImmediate, otherwise: | |
| 6038 | +if (!setTask || !clearTask) { | |
| 6039 | + setTask = function setImmediate(fn) { | |
| 6040 | + var args = []; | |
| 6041 | + var i = 1; | |
| 6042 | + while (arguments.length > i) args.push(arguments[i++]); | |
| 6043 | + queue[++counter] = function () { | |
| 6044 | + // eslint-disable-next-line no-new-func | |
| 6045 | + invoke(typeof fn == 'function' ? fn : Function(fn), args); | |
| 6046 | + }; | |
| 6047 | + defer(counter); | |
| 6048 | + return counter; | |
| 6049 | + }; | |
| 6050 | + clearTask = function clearImmediate(id) { | |
| 6051 | + delete queue[id]; | |
| 6052 | + }; | |
| 6053 | + // Node.js 0.8- | |
| 6054 | + if (__webpack_require__(56)(process) == 'process') { | |
| 6055 | + defer = function (id) { | |
| 6056 | + process.nextTick(ctx(run, id, 1)); | |
| 6057 | + }; | |
| 6058 | + // Sphere (JS game engine) Dispatch API | |
| 6059 | + } else if (Dispatch && Dispatch.now) { | |
| 6060 | + defer = function (id) { | |
| 6061 | + Dispatch.now(ctx(run, id, 1)); | |
| 6062 | + }; | |
| 6063 | + // Browsers with MessageChannel, includes WebWorkers | |
| 6064 | + } else if (MessageChannel) { | |
| 6065 | + channel = new MessageChannel(); | |
| 6066 | + port = channel.port2; | |
| 6067 | + channel.port1.onmessage = listener; | |
| 6068 | + defer = ctx(port.postMessage, port, 1); | |
| 6069 | + // Browsers with postMessage, skip WebWorkers | |
| 6070 | + // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' | |
| 6071 | + } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) { | |
| 6072 | + defer = function (id) { | |
| 6073 | + global.postMessage(id + '', '*'); | |
| 6074 | + }; | |
| 6075 | + global.addEventListener('message', listener, false); | |
| 6076 | + // IE8- | |
| 6077 | + } else if (ONREADYSTATECHANGE in cel('script')) { | |
| 6078 | + defer = function (id) { | |
| 6079 | + html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () { | |
| 6080 | + html.removeChild(this); | |
| 6081 | + run.call(id); | |
| 6082 | + }; | |
| 6083 | + }; | |
| 6084 | + // Rest old browsers | |
| 6085 | + } else { | |
| 6086 | + defer = function (id) { | |
| 6087 | + setTimeout(ctx(run, id, 1), 0); | |
| 6088 | + }; | |
| 6089 | + } | |
| 6090 | +} | |
| 6091 | +module.exports = { | |
| 6092 | + set: setTask, | |
| 6093 | + clear: clearTask | |
| 6094 | +}; | |
| 6095 | + | |
| 6096 | + | |
| 6097 | +/***/ }), | |
| 6098 | +/* 210 */ | |
| 6099 | +/***/ (function(module, exports) { | |
| 6100 | + | |
| 6101 | +module.exports = function (exec) { | |
| 6102 | + try { | |
| 6103 | + return { e: false, v: exec() }; | |
| 6104 | + } catch (e) { | |
| 6105 | + return { e: true, v: e }; | |
| 6106 | + } | |
| 6107 | +}; | |
| 6108 | + | |
| 6109 | + | |
| 6110 | +/***/ }), | |
| 6111 | +/* 211 */ | |
| 6112 | +/***/ (function(module, exports, __webpack_require__) { | |
| 6113 | + | |
| 6114 | +var anObject = __webpack_require__(11); | |
| 6115 | +var isObject = __webpack_require__(9); | |
| 6116 | +var newPromiseCapability = __webpack_require__(149); | |
| 6117 | + | |
| 6118 | +module.exports = function (C, x) { | |
| 6119 | + anObject(C); | |
| 6120 | + if (isObject(x) && x.constructor === C) return x; | |
| 6121 | + var promiseCapability = newPromiseCapability.f(C); | |
| 6122 | + var resolve = promiseCapability.resolve; | |
| 6123 | + resolve(x); | |
| 6124 | + return promiseCapability.promise; | |
| 6125 | +}; | |
| 6126 | + | |
| 6127 | + | |
| 6128 | +/***/ }), | |
| 6129 | +/* 212 */ | |
| 6130 | +/***/ (function(module, exports, __webpack_require__) { | |
| 6131 | + | |
| 6132 | +module.exports = __webpack_require__(235); | |
| 6133 | + | |
| 6134 | +/***/ }), | |
| 6135 | +/* 213 */ | |
| 6136 | +/***/ (function(module, exports, __webpack_require__) { | |
| 6137 | + | |
| 388 | 6138 | "use strict"; |
| 389 | 6139 | |
| 6140 | +// 19.1.2.1 Object.assign(target, source, ...) | |
| 6141 | +var DESCRIPTORS = __webpack_require__(14); | |
| 6142 | +var getKeys = __webpack_require__(37); | |
| 6143 | +var gOPS = __webpack_require__(67); | |
| 6144 | +var pIE = __webpack_require__(49); | |
| 6145 | +var toObject = __webpack_require__(32); | |
| 6146 | +var IObject = __webpack_require__(103); | |
| 6147 | +var $assign = Object.assign; | |
| 390 | 6148 | |
| 391 | -Object.defineProperty(exports, "__esModule", ({ | |
| 6149 | +// should work with symbols and should have deterministic property order (V8 bug) | |
| 6150 | +module.exports = !$assign || __webpack_require__(21)(function () { | |
| 6151 | + var A = {}; | |
| 6152 | + var B = {}; | |
| 6153 | + // eslint-disable-next-line no-undef | |
| 6154 | + var S = Symbol(); | |
| 6155 | + var K = 'abcdefghijklmnopqrst'; | |
| 6156 | + A[S] = 7; | |
| 6157 | + K.split('').forEach(function (k) { B[k] = k; }); | |
| 6158 | + return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; | |
| 6159 | +}) ? function assign(target, source) { // eslint-disable-line no-unused-vars | |
| 6160 | + var T = toObject(target); | |
| 6161 | + var aLen = arguments.length; | |
| 6162 | + var index = 1; | |
| 6163 | + var getSymbols = gOPS.f; | |
| 6164 | + var isEnum = pIE.f; | |
| 6165 | + while (aLen > index) { | |
| 6166 | + var S = IObject(arguments[index++]); | |
| 6167 | + var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S); | |
| 6168 | + var length = keys.length; | |
| 6169 | + var j = 0; | |
| 6170 | + var key; | |
| 6171 | + while (length > j) { | |
| 6172 | + key = keys[j++]; | |
| 6173 | + if (!DESCRIPTORS || isEnum.call(S, key)) T[key] = S[key]; | |
| 6174 | + } | |
| 6175 | + } return T; | |
| 6176 | +} : $assign; | |
| 6177 | + | |
| 6178 | + | |
| 6179 | +/***/ }), | |
| 6180 | +/* 214 */ | |
| 6181 | +/***/ (function(module, exports, __webpack_require__) { | |
| 6182 | + | |
| 6183 | +module.exports = __webpack_require__(285); | |
| 6184 | + | |
| 6185 | +/***/ }), | |
| 6186 | +/* 215 */ | |
| 6187 | +/***/ (function(module, exports, __webpack_require__) { | |
| 6188 | + | |
| 6189 | +"use strict"; | |
| 6190 | + | |
| 6191 | + | |
| 6192 | +var _interopRequireDefault = __webpack_require__(0); | |
| 6193 | + | |
| 6194 | +var _Object$defineProperty = __webpack_require__(1); | |
| 6195 | + | |
| 6196 | +_Object$defineProperty(exports, "__esModule", { | |
| 392 | 6197 | value: true |
| 393 | -})); | |
| 394 | -exports["default"] = void 0; | |
| 395 | -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; } } }; } | |
| 396 | -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; } } | |
| 397 | -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; } | |
| 398 | -/** | |
| 399 | - * Some FileAPI objects such as FileList, DataTransferItem and DataTransferItemList has inconsistency with the retrieved | |
| 400 | - * object (from events, etc.) and the actual JavaScript object so a regular instanceof doesn't work. This function can | |
| 401 | - * check whether it's instanceof by using the objects constructor and prototype names. | |
| 402 | - * | |
| 403 | - * @param object | |
| 404 | - * @param constructors | |
| 405 | - * @return {boolean} | |
| 406 | - */ | |
| 407 | -var _default = exports["default"] = function _default(object, constructors) { | |
| 408 | - constructors = Array.isArray(constructors) ? constructors : [constructors]; | |
| 409 | - var _iterator = _createForOfIteratorHelper(constructors), | |
| 410 | - _step; | |
| 411 | - try { | |
| 412 | - for (_iterator.s(); !(_step = _iterator.n()).done;) { | |
| 413 | - var constructor = _step.value; | |
| 414 | - if (object.constructor.name === constructor.prototype[Symbol.toStringTag]) { | |
| 6198 | +}); | |
| 6199 | + | |
| 6200 | +exports.default = void 0; | |
| 6201 | + | |
| 6202 | +var _values = _interopRequireDefault(__webpack_require__(54)); | |
| 6203 | + | |
| 6204 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 6205 | + | |
| 6206 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 6207 | + | |
| 6208 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 6209 | + | |
| 6210 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 6211 | + | |
| 6212 | +var _helperBc = _interopRequireDefault(__webpack_require__(383)); | |
| 6213 | + | |
| 6214 | +// TODO: this file should be deleted. | |
| 6215 | +var Helper = /*#__PURE__*/function (_BackwardsCompatibili) { | |
| 6216 | + (0, _inherits2.default)(Helper, _BackwardsCompatibili); | |
| 6217 | + | |
| 6218 | + var _super = (0, _createSuper2.default)(Helper); | |
| 6219 | + | |
| 6220 | + function Helper() { | |
| 6221 | + (0, _classCallCheck2.default)(this, Helper); | |
| 6222 | + return _super.apply(this, arguments); | |
| 6223 | + } | |
| 6224 | + | |
| 6225 | + (0, _createClass2.default)(Helper, null, [{ | |
| 6226 | + key: "isValidChild", | |
| 6227 | + // TODO: This is not the right place for this function | |
| 6228 | + value: function isValidChild(childModel, parentModel) { | |
| 6229 | + var parentElType = parentModel.get('elType'), | |
| 6230 | + draggedElType = childModel.get('elType'), | |
| 6231 | + parentIsInner = parentModel.get('isInner'), | |
| 6232 | + draggedIsInner = childModel.get('isInner'); // Block's inner-section at inner-section column. | |
| 6233 | + | |
| 6234 | + if (draggedIsInner && 'section' === draggedElType && parentIsInner && 'column' === parentElType) { | |
| 6235 | + return false; | |
| 6236 | + } | |
| 6237 | + | |
| 6238 | + if (draggedElType === parentElType) { | |
| 6239 | + return false; | |
| 6240 | + } | |
| 6241 | + | |
| 6242 | + if ('section' === draggedElType && !draggedIsInner && 'column' === parentElType) { | |
| 6243 | + return false; | |
| 6244 | + } | |
| 6245 | + | |
| 6246 | + var childTypes = elementor.helpers.getElementChildType(parentElType); | |
| 6247 | + return childTypes && -1 !== childTypes.indexOf(childModel.get('elType')); | |
| 6248 | + } // TODO: This is not the right place for this function | |
| 6249 | + | |
| 6250 | + }, { | |
| 6251 | + key: "isValidGrandChild", | |
| 6252 | + value: function isValidGrandChild(childModel, targetContainer) { | |
| 6253 | + var result; | |
| 6254 | + var childElType = childModel.get('elType'); | |
| 6255 | + | |
| 6256 | + switch (targetContainer.model.get('elType')) { | |
| 6257 | + case 'document': | |
| 6258 | + result = true; | |
| 6259 | + break; | |
| 6260 | + | |
| 6261 | + case 'section': | |
| 6262 | + result = 'widget' === childElType; | |
| 6263 | + break; | |
| 6264 | + | |
| 6265 | + default: | |
| 6266 | + result = false; | |
| 6267 | + } | |
| 6268 | + | |
| 6269 | + return result; | |
| 6270 | + } // TODO: This is not the right place for this function | |
| 6271 | + | |
| 6272 | + }, { | |
| 6273 | + key: "isSameElement", | |
| 6274 | + value: function isSameElement(sourceModel, targetContainer) { | |
| 6275 | + var targetElType = targetContainer.model.get('elType'), | |
| 6276 | + sourceElType = sourceModel.get('elType'); | |
| 6277 | + | |
| 6278 | + if (targetElType !== sourceElType) { | |
| 6279 | + return false; | |
| 6280 | + } | |
| 6281 | + | |
| 6282 | + if ('column' === targetElType && 'column' === sourceElType) { | |
| 415 | 6283 | return true; |
| 416 | 6284 | } |
| 6285 | + | |
| 6286 | + return targetContainer.model.get('isInner') === sourceModel.get('isInner'); | |
| 6287 | + } // TODO: This is not the right place for this function | |
| 6288 | + | |
| 6289 | + }, { | |
| 6290 | + key: "getPasteOptions", | |
| 6291 | + value: function getPasteOptions(sourceModel, targetContainer) { | |
| 6292 | + var result = {}; | |
| 6293 | + result.isValidChild = this.isValidChild(sourceModel, targetContainer.model); | |
| 6294 | + result.isSameElement = this.isSameElement(sourceModel, targetContainer); | |
| 6295 | + result.isValidGrandChild = this.isValidGrandChild(sourceModel, targetContainer); | |
| 6296 | + return result; | |
| 6297 | + } // TODO: This is not the right place for this function | |
| 6298 | + | |
| 6299 | + }, { | |
| 6300 | + key: "isPasteEnabled", | |
| 6301 | + value: function isPasteEnabled(targetContainer) { | |
| 6302 | + var storage = elementorCommon.storage.get('clipboard'); // No storage? no paste. | |
| 6303 | + | |
| 6304 | + if (!storage || !storage[0]) { | |
| 6305 | + return false; | |
| 6306 | + } | |
| 6307 | + | |
| 6308 | + if (!(storage[0] instanceof Backbone.Model)) { | |
| 6309 | + storage[0] = new Backbone.Model(storage[0]); | |
| 6310 | + } | |
| 6311 | + | |
| 6312 | + var pasteOptions = this.getPasteOptions(storage[0], targetContainer); | |
| 6313 | + return (0, _values.default)(pasteOptions).some(function (opt) { | |
| 6314 | + return !!opt; | |
| 6315 | + }); | |
| 417 | 6316 | } |
| 418 | - } catch (err) { | |
| 419 | - _iterator.e(err); | |
| 420 | - } finally { | |
| 421 | - _iterator.f(); | |
| 6317 | + }]); | |
| 6318 | + return Helper; | |
| 6319 | +}(_helperBc.default); | |
| 6320 | + | |
| 6321 | +exports.default = Helper; | |
| 6322 | + | |
| 6323 | +/***/ }), | |
| 6324 | +/* 216 */ | |
| 6325 | +/***/ (function(module, exports, __webpack_require__) { | |
| 6326 | + | |
| 6327 | +// 9.4.2.3 ArraySpeciesCreate(originalArray, length) | |
| 6328 | +var speciesConstructor = __webpack_require__(217); | |
| 6329 | + | |
| 6330 | +module.exports = function (original, length) { | |
| 6331 | + return new (speciesConstructor(original))(length); | |
| 6332 | +}; | |
| 6333 | + | |
| 6334 | + | |
| 6335 | +/***/ }), | |
| 6336 | +/* 217 */ | |
| 6337 | +/***/ (function(module, exports, __webpack_require__) { | |
| 6338 | + | |
| 6339 | +var isObject = __webpack_require__(31); | |
| 6340 | +var isArray = __webpack_require__(218); | |
| 6341 | +var SPECIES = __webpack_require__(13)('species'); | |
| 6342 | + | |
| 6343 | +module.exports = function (original) { | |
| 6344 | + var C; | |
| 6345 | + if (isArray(original)) { | |
| 6346 | + C = original.constructor; | |
| 6347 | + // cross-realm fallback | |
| 6348 | + if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined; | |
| 6349 | + if (isObject(C)) { | |
| 6350 | + C = C[SPECIES]; | |
| 6351 | + if (C === null) C = undefined; | |
| 6352 | + } | |
| 6353 | + } return C === undefined ? Array : C; | |
| 6354 | +}; | |
| 6355 | + | |
| 6356 | + | |
| 6357 | +/***/ }), | |
| 6358 | +/* 218 */ | |
| 6359 | +/***/ (function(module, exports, __webpack_require__) { | |
| 6360 | + | |
| 6361 | +// 7.2.2 IsArray(argument) | |
| 6362 | +var cof = __webpack_require__(52); | |
| 6363 | +module.exports = Array.isArray || function isArray(arg) { | |
| 6364 | + return cof(arg) == 'Array'; | |
| 6365 | +}; | |
| 6366 | + | |
| 6367 | + | |
| 6368 | +/***/ }), | |
| 6369 | +/* 219 */ | |
| 6370 | +/***/ (function(module, exports, __webpack_require__) { | |
| 6371 | + | |
| 6372 | +"use strict"; | |
| 6373 | + | |
| 6374 | +var global = __webpack_require__(8); | |
| 6375 | +var core = __webpack_require__(6); | |
| 6376 | +var dP = __webpack_require__(15); | |
| 6377 | +var DESCRIPTORS = __webpack_require__(14); | |
| 6378 | +var SPECIES = __webpack_require__(10)('species'); | |
| 6379 | + | |
| 6380 | +module.exports = function (KEY) { | |
| 6381 | + var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY]; | |
| 6382 | + if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, { | |
| 6383 | + configurable: true, | |
| 6384 | + get: function () { return this; } | |
| 6385 | + }); | |
| 6386 | +}; | |
| 6387 | + | |
| 6388 | + | |
| 6389 | +/***/ }), | |
| 6390 | +/* 220 */ | |
| 6391 | +/***/ (function(module, exports, __webpack_require__) { | |
| 6392 | + | |
| 6393 | +var has = __webpack_require__(64); | |
| 6394 | +var toIObject = __webpack_require__(104); | |
| 6395 | +var arrayIndexOf = __webpack_require__(145)(false); | |
| 6396 | +var IE_PROTO = __webpack_require__(137)('IE_PROTO'); | |
| 6397 | + | |
| 6398 | +module.exports = function (object, names) { | |
| 6399 | + var O = toIObject(object); | |
| 6400 | + var i = 0; | |
| 6401 | + var result = []; | |
| 6402 | + var key; | |
| 6403 | + for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); | |
| 6404 | + // Don't enum bug & hidden keys | |
| 6405 | + while (names.length > i) if (has(O, key = names[i++])) { | |
| 6406 | + ~arrayIndexOf(result, key) || result.push(key); | |
| 422 | 6407 | } |
| 423 | - return false; | |
| 6408 | + return result; | |
| 424 | 6409 | }; |
| 425 | 6410 | |
| 6411 | + | |
| 426 | 6412 | /***/ }), |
| 6413 | +/* 221 */ | |
| 6414 | +/***/ (function(module, exports, __webpack_require__) { | |
| 427 | 6415 | |
| 428 | -/***/ "../assets/dev/js/modules/imports/args-object.js": | |
| 429 | -/*!*******************************************************!*\ | |
| 430 | - !*** ../assets/dev/js/modules/imports/args-object.js ***! | |
| 431 | - \*******************************************************/ | |
| 432 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 6416 | +__webpack_require__(222); | |
| 6417 | +module.exports = __webpack_require__(6).Array.isArray; | |
| 433 | 6418 | |
| 6419 | + | |
| 6420 | +/***/ }), | |
| 6421 | +/* 222 */ | |
| 6422 | +/***/ (function(module, exports, __webpack_require__) { | |
| 6423 | + | |
| 6424 | +// 22.1.2.2 / 15.4.3.2 Array.isArray(arg) | |
| 6425 | +var $export = __webpack_require__(7); | |
| 6426 | + | |
| 6427 | +$export($export.S, 'Array', { isArray: __webpack_require__(97) }); | |
| 6428 | + | |
| 6429 | + | |
| 6430 | +/***/ }), | |
| 6431 | +/* 223 */ | |
| 6432 | +/***/ (function(module, exports, __webpack_require__) { | |
| 6433 | + | |
| 434 | 6434 | "use strict"; |
| 435 | 6435 | |
| 6436 | +var global = __webpack_require__(8); | |
| 6437 | +var $export = __webpack_require__(7); | |
| 6438 | +var meta = __webpack_require__(66); | |
| 6439 | +var fails = __webpack_require__(21); | |
| 6440 | +var hide = __webpack_require__(22); | |
| 6441 | +var redefineAll = __webpack_require__(121); | |
| 6442 | +var forOf = __webpack_require__(79); | |
| 6443 | +var anInstance = __webpack_require__(120); | |
| 6444 | +var isObject = __webpack_require__(9); | |
| 6445 | +var setToStringTag = __webpack_require__(53); | |
| 6446 | +var dP = __webpack_require__(15).f; | |
| 6447 | +var each = __webpack_require__(142)(0); | |
| 6448 | +var DESCRIPTORS = __webpack_require__(14); | |
| 436 | 6449 | |
| 437 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 438 | -Object.defineProperty(exports, "__esModule", ({ | |
| 6450 | +module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) { | |
| 6451 | + var Base = global[NAME]; | |
| 6452 | + var C = Base; | |
| 6453 | + var ADDER = IS_MAP ? 'set' : 'add'; | |
| 6454 | + var proto = C && C.prototype; | |
| 6455 | + var O = {}; | |
| 6456 | + if (!DESCRIPTORS || typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function () { | |
| 6457 | + new C().entries().next(); | |
| 6458 | + }))) { | |
| 6459 | + // create collection constructor | |
| 6460 | + C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); | |
| 6461 | + redefineAll(C.prototype, methods); | |
| 6462 | + meta.NEED = true; | |
| 6463 | + } else { | |
| 6464 | + C = wrapper(function (target, iterable) { | |
| 6465 | + anInstance(target, C, NAME, '_c'); | |
| 6466 | + target._c = new Base(); | |
| 6467 | + if (iterable != undefined) forOf(iterable, IS_MAP, target[ADDER], target); | |
| 6468 | + }); | |
| 6469 | + each('add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON'.split(','), function (KEY) { | |
| 6470 | + var IS_ADDER = KEY == 'add' || KEY == 'set'; | |
| 6471 | + if (KEY in proto && !(IS_WEAK && KEY == 'clear')) hide(C.prototype, KEY, function (a, b) { | |
| 6472 | + anInstance(this, C, KEY); | |
| 6473 | + if (!IS_ADDER && IS_WEAK && !isObject(a)) return KEY == 'get' ? undefined : false; | |
| 6474 | + var result = this._c[KEY](a === 0 ? 0 : a, b); | |
| 6475 | + return IS_ADDER ? this : result; | |
| 6476 | + }); | |
| 6477 | + }); | |
| 6478 | + IS_WEAK || dP(C.prototype, 'size', { | |
| 6479 | + get: function () { | |
| 6480 | + return this._c.size; | |
| 6481 | + } | |
| 6482 | + }); | |
| 6483 | + } | |
| 6484 | + | |
| 6485 | + setToStringTag(C, NAME); | |
| 6486 | + | |
| 6487 | + O[NAME] = C; | |
| 6488 | + $export($export.G + $export.W + $export.F, O); | |
| 6489 | + | |
| 6490 | + if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP); | |
| 6491 | + | |
| 6492 | + return C; | |
| 6493 | +}; | |
| 6494 | + | |
| 6495 | + | |
| 6496 | +/***/ }), | |
| 6497 | +/* 224 */ | |
| 6498 | +/***/ (function(module, exports, __webpack_require__) { | |
| 6499 | + | |
| 6500 | +"use strict"; | |
| 6501 | + | |
| 6502 | +// https://tc39.github.io/proposal-setmap-offrom/ | |
| 6503 | +var $export = __webpack_require__(7); | |
| 6504 | + | |
| 6505 | +module.exports = function (COLLECTION) { | |
| 6506 | + $export($export.S, COLLECTION, { of: function of() { | |
| 6507 | + var length = arguments.length; | |
| 6508 | + var A = new Array(length); | |
| 6509 | + while (length--) A[length] = arguments[length]; | |
| 6510 | + return new this(A); | |
| 6511 | + } }); | |
| 6512 | +}; | |
| 6513 | + | |
| 6514 | + | |
| 6515 | +/***/ }), | |
| 6516 | +/* 225 */ | |
| 6517 | +/***/ (function(module, exports, __webpack_require__) { | |
| 6518 | + | |
| 6519 | +"use strict"; | |
| 6520 | + | |
| 6521 | +// https://tc39.github.io/proposal-setmap-offrom/ | |
| 6522 | +var $export = __webpack_require__(7); | |
| 6523 | +var aFunction = __webpack_require__(35); | |
| 6524 | +var ctx = __webpack_require__(29); | |
| 6525 | +var forOf = __webpack_require__(79); | |
| 6526 | + | |
| 6527 | +module.exports = function (COLLECTION) { | |
| 6528 | + $export($export.S, COLLECTION, { from: function from(source /* , mapFn, thisArg */) { | |
| 6529 | + var mapFn = arguments[1]; | |
| 6530 | + var mapping, A, n, cb; | |
| 6531 | + aFunction(this); | |
| 6532 | + mapping = mapFn !== undefined; | |
| 6533 | + if (mapping) aFunction(mapFn); | |
| 6534 | + if (source == undefined) return new this(); | |
| 6535 | + A = []; | |
| 6536 | + if (mapping) { | |
| 6537 | + n = 0; | |
| 6538 | + cb = ctx(mapFn, arguments[2], 2); | |
| 6539 | + forOf(source, false, function (nextItem) { | |
| 6540 | + A.push(cb(nextItem, n++)); | |
| 6541 | + }); | |
| 6542 | + } else { | |
| 6543 | + forOf(source, false, A.push, A); | |
| 6544 | + } | |
| 6545 | + return new this(A); | |
| 6546 | + } }); | |
| 6547 | +}; | |
| 6548 | + | |
| 6549 | + | |
| 6550 | +/***/ }), | |
| 6551 | +/* 226 */, | |
| 6552 | +/* 227 */ | |
| 6553 | +/***/ (function(module, exports, __webpack_require__) { | |
| 6554 | + | |
| 6555 | +"use strict"; | |
| 6556 | + | |
| 6557 | + | |
| 6558 | +var _interopRequireDefault = __webpack_require__(0); | |
| 6559 | + | |
| 6560 | +var _Object$defineProperty = __webpack_require__(1); | |
| 6561 | + | |
| 6562 | +_Object$defineProperty(exports, "__esModule", { | |
| 439 | 6563 | value: true |
| 440 | -})); | |
| 441 | -exports["default"] = void 0; | |
| 442 | -var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js")); | |
| 443 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 444 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 445 | -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 446 | -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 447 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 448 | -var _instanceType = _interopRequireDefault(__webpack_require__(/*! ./instance-type */ "../assets/dev/js/modules/imports/instance-type.js")); | |
| 449 | -var _isInstanceof = _interopRequireDefault(__webpack_require__(/*! ../../editor/utils/is-instanceof */ "../assets/dev/js/editor/utils/is-instanceof.js")); | |
| 450 | -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)); } | |
| 451 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 452 | -var ArgsObject = exports["default"] = /*#__PURE__*/function (_InstanceType) { | |
| 453 | - /** | |
| 454 | - * Function constructor(). | |
| 455 | - * | |
| 456 | - * Create ArgsObject. | |
| 457 | - * | |
| 458 | - * @param {{}} args | |
| 459 | - */ | |
| 6564 | +}); | |
| 6565 | + | |
| 6566 | +exports.default = void 0; | |
| 6567 | + | |
| 6568 | +var _typeof2 = _interopRequireDefault(__webpack_require__(50)); | |
| 6569 | + | |
| 6570 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 6571 | + | |
| 6572 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 6573 | + | |
| 6574 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 6575 | + | |
| 6576 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 6577 | + | |
| 6578 | +var _instanceType = _interopRequireDefault(__webpack_require__(252)); | |
| 6579 | + | |
| 6580 | +var ArgsObject = /*#__PURE__*/function (_InstanceType) { | |
| 6581 | + (0, _inherits2.default)(ArgsObject, _InstanceType); | |
| 6582 | + | |
| 6583 | + var _super = (0, _createSuper2.default)(ArgsObject); | |
| 6584 | + | |
| 6585 | + (0, _createClass2.default)(ArgsObject, null, [{ | |
| 6586 | + key: "getInstanceType", | |
| 6587 | + value: function getInstanceType() { | |
| 6588 | + return 'ArgsObject'; | |
| 6589 | + } | |
| 6590 | + /** | |
| 6591 | + * Function constructor(). | |
| 6592 | + * | |
| 6593 | + * Create ArgsObject. | |
| 6594 | + * | |
| 6595 | + * @param {{}} args | |
| 6596 | + */ | |
| 6597 | + | |
| 6598 | + }]); | |
| 6599 | + | |
| 460 | 6600 | function ArgsObject(args) { |
| 461 | 6601 | var _this; |
| 6602 | + | |
| 462 | 6603 | (0, _classCallCheck2.default)(this, ArgsObject); |
| 463 | - _this = _callSuper(this, ArgsObject); | |
| 6604 | + _this = _super.call(this); | |
| 464 | 6605 | _this.args = args; |
| 465 | 6606 | return _this; |
| 466 | 6607 | } |
| 467 | - | |
| 468 | 6608 | /** |
| 469 | 6609 | * Function requireArgument(). |
| 470 | 6610 | * |
| 471 | 6611 | * Validate property in args. |
| @@ -470,22 +6610,24 @@ | ||
| 470 | 6610 | * |
| 471 | 6611 | * Validate property in args. |
| 472 | 6612 | * |
| 473 | 6613 | * @param {string} property |
| 474 | - * @param {{}} args | |
| 6614 | + * @param {{}} args | |
| 475 | 6615 | * |
| 476 | 6616 | * @throws {Error} |
| 6617 | + * | |
| 477 | 6618 | */ |
| 478 | - (0, _inherits2.default)(ArgsObject, _InstanceType); | |
| 479 | - return (0, _createClass2.default)(ArgsObject, [{ | |
| 6619 | + | |
| 6620 | + | |
| 6621 | + (0, _createClass2.default)(ArgsObject, [{ | |
| 480 | 6622 | key: "requireArgument", |
| 481 | 6623 | value: function requireArgument(property) { |
| 482 | 6624 | var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.args; |
| 483 | - if (!Object.prototype.hasOwnProperty.call(args, property)) { | |
| 6625 | + | |
| 6626 | + if (!args.hasOwnProperty(property)) { | |
| 484 | 6627 | throw Error("".concat(property, " is required.")); |
| 485 | 6628 | } |
| 486 | 6629 | } |
| 487 | - | |
| 488 | 6630 | /** |
| 489 | 6631 | * Function requireArgumentType(). |
| 490 | 6632 | * |
| 491 | 6633 | * Validate property in args using `type === typeof(args.whatever)`. |
| @@ -491,22 +6633,24 @@ | ||
| 491 | 6633 | * Validate property in args using `type === typeof(args.whatever)`. |
| 492 | 6634 | * |
| 493 | 6635 | * @param {string} property |
| 494 | 6636 | * @param {string} type |
| 495 | - * @param {{}} args | |
| 6637 | + * @param {{}} args | |
| 496 | 6638 | * |
| 497 | 6639 | * @throws {Error} |
| 6640 | + * | |
| 498 | 6641 | */ |
| 6642 | + | |
| 499 | 6643 | }, { |
| 500 | 6644 | key: "requireArgumentType", |
| 501 | 6645 | value: function requireArgumentType(property, type) { |
| 502 | 6646 | var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.args; |
| 503 | 6647 | this.requireArgument(property, args); |
| 6648 | + | |
| 504 | 6649 | if ((0, _typeof2.default)(args[property]) !== type) { |
| 505 | 6650 | throw Error("".concat(property, " invalid type: ").concat(type, ".")); |
| 506 | 6651 | } |
| 507 | 6652 | } |
| 508 | - | |
| 509 | 6653 | /** |
| 510 | 6654 | * Function requireArgumentInstance(). |
| 511 | 6655 | * |
| 512 | 6656 | * Validate property in args using `args.whatever instanceof instance`. |
| @@ -511,23 +6655,25 @@ | ||
| 511 | 6655 | * |
| 512 | 6656 | * Validate property in args using `args.whatever instanceof instance`. |
| 513 | 6657 | * |
| 514 | 6658 | * @param {string} property |
| 515 | - * @param {*} instance | |
| 516 | - * @param {{}} args | |
| 6659 | + * @param {instanceof} instance | |
| 6660 | + * @param {{}} args | |
| 517 | 6661 | * |
| 518 | 6662 | * @throws {Error} |
| 6663 | + * | |
| 519 | 6664 | */ |
| 6665 | + | |
| 520 | 6666 | }, { |
| 521 | 6667 | key: "requireArgumentInstance", |
| 522 | 6668 | value: function requireArgumentInstance(property, instance) { |
| 523 | 6669 | var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.args; |
| 524 | 6670 | this.requireArgument(property, args); |
| 525 | - if (!(args[property] instanceof instance) && !(0, _isInstanceof.default)(args[property], instance)) { | |
| 6671 | + | |
| 6672 | + if (!(args[property] instanceof instance)) { | |
| 526 | 6673 | throw Error("".concat(property, " invalid instance.")); |
| 527 | 6674 | } |
| 528 | 6675 | } |
| 529 | - | |
| 530 | 6676 | /** |
| 531 | 6677 | * Function requireArgumentConstructor(). |
| 532 | 6678 | * |
| 533 | 6679 | * Validate property in args using `type === args.whatever.constructor`. |
| @@ -532,13 +6678,15 @@ | ||
| 532 | 6678 | * |
| 533 | 6679 | * Validate property in args using `type === args.whatever.constructor`. |
| 534 | 6680 | * |
| 535 | 6681 | * @param {string} property |
| 536 | - * @param {*} type | |
| 537 | - * @param {{}} args | |
| 6682 | + * @param {*} type | |
| 6683 | + * @param {{}} args | |
| 538 | 6684 | * |
| 539 | 6685 | * @throws {Error} |
| 6686 | + * | |
| 540 | 6687 | */ |
| 6688 | + | |
| 541 | 6689 | }, { |
| 542 | 6690 | key: "requireArgumentConstructor", |
| 543 | 6691 | value: function requireArgumentConstructor(property, type) { |
| 544 | 6692 | var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.args; |
| @@ -543,60 +6691,458 @@ | ||
| 543 | 6691 | value: function requireArgumentConstructor(property, type) { |
| 544 | 6692 | var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.args; |
| 545 | 6693 | this.requireArgument(property, args); |
| 546 | 6694 | |
| 547 | - // Note: Converting the constructor to string in order to avoid equation issues | |
| 548 | - // due to different memory addresses between iframes (window.Object !== window.top.Object). | |
| 549 | - if (args[property].constructor.toString() !== type.prototype.constructor.toString()) { | |
| 6695 | + if (args[property].constructor !== type) { | |
| 550 | 6696 | throw Error("".concat(property, " invalid constructor type.")); |
| 551 | 6697 | } |
| 552 | 6698 | } |
| 553 | - }], [{ | |
| 554 | - key: "getInstanceType", | |
| 555 | - value: function getInstanceType() { | |
| 556 | - return 'ArgsObject'; | |
| 6699 | + }]); | |
| 6700 | + return ArgsObject; | |
| 6701 | +}(_instanceType.default); | |
| 6702 | + | |
| 6703 | +exports.default = ArgsObject; | |
| 6704 | + | |
| 6705 | +/***/ }), | |
| 6706 | +/* 228 */ | |
| 6707 | +/***/ (function(module, exports, __webpack_require__) { | |
| 6708 | + | |
| 6709 | +"use strict"; | |
| 6710 | + | |
| 6711 | + | |
| 6712 | +var _interopRequireDefault = __webpack_require__(0); | |
| 6713 | + | |
| 6714 | +var _Object$defineProperty = __webpack_require__(1); | |
| 6715 | + | |
| 6716 | +_Object$defineProperty(exports, "__esModule", { | |
| 6717 | + value: true | |
| 6718 | +}); | |
| 6719 | + | |
| 6720 | +exports.default = exports.After = void 0; | |
| 6721 | + | |
| 6722 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 6723 | + | |
| 6724 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 6725 | + | |
| 6726 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 6727 | + | |
| 6728 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 6729 | + | |
| 6730 | +var _base = _interopRequireDefault(__webpack_require__(289)); | |
| 6731 | + | |
| 6732 | +var After = /*#__PURE__*/function (_Base) { | |
| 6733 | + (0, _inherits2.default)(After, _Base); | |
| 6734 | + | |
| 6735 | + var _super = (0, _createSuper2.default)(After); | |
| 6736 | + | |
| 6737 | + function After() { | |
| 6738 | + (0, _classCallCheck2.default)(this, After); | |
| 6739 | + return _super.apply(this, arguments); | |
| 6740 | + } | |
| 6741 | + | |
| 6742 | + (0, _createClass2.default)(After, [{ | |
| 6743 | + key: "register", | |
| 6744 | + value: function register() { | |
| 6745 | + $e.hooks.registerDataAfter(this); | |
| 557 | 6746 | } |
| 558 | 6747 | }]); |
| 559 | -}(_instanceType.default); | |
| 6748 | + return After; | |
| 6749 | +}(_base.default); | |
| 560 | 6750 | |
| 6751 | +exports.After = After; | |
| 6752 | +var _default = After; | |
| 6753 | +exports.default = _default; | |
| 6754 | + | |
| 561 | 6755 | /***/ }), |
| 6756 | +/* 229 */ | |
| 6757 | +/***/ (function(module, exports, __webpack_require__) { | |
| 562 | 6758 | |
| 563 | -/***/ "../assets/dev/js/modules/imports/instance-type.js": | |
| 564 | -/*!*********************************************************!*\ | |
| 565 | - !*** ../assets/dev/js/modules/imports/instance-type.js ***! | |
| 566 | - \*********************************************************/ | |
| 567 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 6759 | +__webpack_require__(230); | |
| 6760 | +module.exports = __webpack_require__(6).Object.values; | |
| 568 | 6761 | |
| 6762 | + | |
| 6763 | +/***/ }), | |
| 6764 | +/* 230 */ | |
| 6765 | +/***/ (function(module, exports, __webpack_require__) { | |
| 6766 | + | |
| 6767 | +// https://github.com/tc39/proposal-object-values-entries | |
| 6768 | +var $export = __webpack_require__(7); | |
| 6769 | +var $values = __webpack_require__(181)(false); | |
| 6770 | + | |
| 6771 | +$export($export.S, 'Object', { | |
| 6772 | + values: function values(it) { | |
| 6773 | + return $values(it); | |
| 6774 | + } | |
| 6775 | +}); | |
| 6776 | + | |
| 6777 | + | |
| 6778 | +/***/ }), | |
| 6779 | +/* 231 */ | |
| 6780 | +/***/ (function(module, exports, __webpack_require__) { | |
| 6781 | + | |
| 6782 | +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) | |
| 6783 | +var anObject = __webpack_require__(20); | |
| 6784 | +var dPs = __webpack_require__(243); | |
| 6785 | +var enumBugKeys = __webpack_require__(151); | |
| 6786 | +var IE_PROTO = __webpack_require__(137)('IE_PROTO'); | |
| 6787 | +var Empty = function () { /* empty */ }; | |
| 6788 | +var PROTOTYPE = 'prototype'; | |
| 6789 | + | |
| 6790 | +// Create object with fake `null` prototype: use iframe Object with cleared prototype | |
| 6791 | +var createDict = function () { | |
| 6792 | + // Thrash, waste and sodomy: IE GC bug | |
| 6793 | + var iframe = __webpack_require__(114)('iframe'); | |
| 6794 | + var i = enumBugKeys.length; | |
| 6795 | + var lt = '<'; | |
| 6796 | + var gt = '>'; | |
| 6797 | + var iframeDocument; | |
| 6798 | + iframe.style.display = 'none'; | |
| 6799 | + __webpack_require__(232).appendChild(iframe); | |
| 6800 | + iframe.src = 'javascript:'; // eslint-disable-line no-script-url | |
| 6801 | + // createDict = iframe.contentWindow.Object; | |
| 6802 | + // html.removeChild(iframe); | |
| 6803 | + iframeDocument = iframe.contentWindow.document; | |
| 6804 | + iframeDocument.open(); | |
| 6805 | + iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); | |
| 6806 | + iframeDocument.close(); | |
| 6807 | + createDict = iframeDocument.F; | |
| 6808 | + while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; | |
| 6809 | + return createDict(); | |
| 6810 | +}; | |
| 6811 | + | |
| 6812 | +module.exports = Object.create || function create(O, Properties) { | |
| 6813 | + var result; | |
| 6814 | + if (O !== null) { | |
| 6815 | + Empty[PROTOTYPE] = anObject(O); | |
| 6816 | + result = new Empty(); | |
| 6817 | + Empty[PROTOTYPE] = null; | |
| 6818 | + // add "__proto__" for Object.getPrototypeOf polyfill | |
| 6819 | + result[IE_PROTO] = O; | |
| 6820 | + } else result = createDict(); | |
| 6821 | + return Properties === undefined ? result : dPs(result, Properties); | |
| 6822 | +}; | |
| 6823 | + | |
| 6824 | + | |
| 6825 | +/***/ }), | |
| 6826 | +/* 232 */ | |
| 6827 | +/***/ (function(module, exports, __webpack_require__) { | |
| 6828 | + | |
| 6829 | +var document = __webpack_require__(18).document; | |
| 6830 | +module.exports = document && document.documentElement; | |
| 6831 | + | |
| 6832 | + | |
| 6833 | +/***/ }), | |
| 6834 | +/* 233 */ | |
| 6835 | +/***/ (function(module, exports, __webpack_require__) { | |
| 6836 | + | |
| 6837 | +__webpack_require__(57); | |
| 6838 | +__webpack_require__(234); | |
| 6839 | +module.exports = __webpack_require__(6).Array.from; | |
| 6840 | + | |
| 6841 | + | |
| 6842 | +/***/ }), | |
| 6843 | +/* 234 */ | |
| 6844 | +/***/ (function(module, exports, __webpack_require__) { | |
| 6845 | + | |
| 569 | 6846 | "use strict"; |
| 570 | 6847 | |
| 6848 | +var ctx = __webpack_require__(29); | |
| 6849 | +var $export = __webpack_require__(7); | |
| 6850 | +var toObject = __webpack_require__(32); | |
| 6851 | +var call = __webpack_require__(143); | |
| 6852 | +var isArrayIter = __webpack_require__(144); | |
| 6853 | +var toLength = __webpack_require__(72); | |
| 6854 | +var createProperty = __webpack_require__(193); | |
| 6855 | +var getIterFn = __webpack_require__(117); | |
| 571 | 6856 | |
| 572 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 573 | -Object.defineProperty(exports, "__esModule", ({ | |
| 574 | - value: true | |
| 575 | -})); | |
| 576 | -exports["default"] = void 0; | |
| 577 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 578 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 579 | -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 580 | -var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js")); | |
| 581 | -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; } | |
| 582 | -var InstanceType = exports["default"] = /*#__PURE__*/function () { | |
| 583 | - function InstanceType() { | |
| 584 | - var _this = this; | |
| 585 | - (0, _classCallCheck2.default)(this, InstanceType); | |
| 586 | - // Since anonymous classes sometimes do not get validated by babel, do it manually. | |
| 587 | - var target = this instanceof InstanceType ? this.constructor : void 0; | |
| 588 | - var prototypes = []; | |
| 589 | - while (target.__proto__ && target.__proto__.name) { | |
| 590 | - prototypes.push(target.__proto__); | |
| 591 | - target = target.__proto__; | |
| 6857 | +$export($export.S + $export.F * !__webpack_require__(178)(function (iter) { Array.from(iter); }), 'Array', { | |
| 6858 | + // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) | |
| 6859 | + from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { | |
| 6860 | + var O = toObject(arrayLike); | |
| 6861 | + var C = typeof this == 'function' ? this : Array; | |
| 6862 | + var aLen = arguments.length; | |
| 6863 | + var mapfn = aLen > 1 ? arguments[1] : undefined; | |
| 6864 | + var mapping = mapfn !== undefined; | |
| 6865 | + var index = 0; | |
| 6866 | + var iterFn = getIterFn(O); | |
| 6867 | + var length, result, step, iterator; | |
| 6868 | + if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); | |
| 6869 | + // if object isn't iterable or it's array with default iterator - use simple case | |
| 6870 | + if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) { | |
| 6871 | + for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) { | |
| 6872 | + createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value); | |
| 6873 | + } | |
| 6874 | + } else { | |
| 6875 | + length = toLength(O.length); | |
| 6876 | + for (result = new C(length); length > index; index++) { | |
| 6877 | + createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); | |
| 6878 | + } | |
| 592 | 6879 | } |
| 593 | - prototypes.reverse().forEach(function (proto) { | |
| 594 | - return _this instanceof proto; | |
| 595 | - }); | |
| 6880 | + result.length = index; | |
| 6881 | + return result; | |
| 596 | 6882 | } |
| 597 | - return (0, _createClass2.default)(InstanceType, null, [{ | |
| 598 | - key: Symbol.hasInstance, | |
| 6883 | +}); | |
| 6884 | + | |
| 6885 | + | |
| 6886 | +/***/ }), | |
| 6887 | +/* 235 */ | |
| 6888 | +/***/ (function(module, exports, __webpack_require__) { | |
| 6889 | + | |
| 6890 | +__webpack_require__(59); | |
| 6891 | +__webpack_require__(57); | |
| 6892 | +module.exports = __webpack_require__(236); | |
| 6893 | + | |
| 6894 | + | |
| 6895 | +/***/ }), | |
| 6896 | +/* 236 */ | |
| 6897 | +/***/ (function(module, exports, __webpack_require__) { | |
| 6898 | + | |
| 6899 | +var classof = __webpack_require__(99); | |
| 6900 | +var ITERATOR = __webpack_require__(10)('iterator'); | |
| 6901 | +var Iterators = __webpack_require__(33); | |
| 6902 | +module.exports = __webpack_require__(6).isIterable = function (it) { | |
| 6903 | + var O = Object(it); | |
| 6904 | + return O[ITERATOR] !== undefined | |
| 6905 | + || '@@iterator' in O | |
| 6906 | + // eslint-disable-next-line no-prototype-builtins | |
| 6907 | + || Iterators.hasOwnProperty(classof(O)); | |
| 6908 | +}; | |
| 6909 | + | |
| 6910 | + | |
| 6911 | +/***/ }), | |
| 6912 | +/* 237 */ | |
| 6913 | +/***/ (function(module, exports) { | |
| 6914 | + | |
| 6915 | +module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + | |
| 6916 | + '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; | |
| 6917 | + | |
| 6918 | + | |
| 6919 | +/***/ }), | |
| 6920 | +/* 238 */ | |
| 6921 | +/***/ (function(module, exports, __webpack_require__) { | |
| 6922 | + | |
| 6923 | +module.exports = __webpack_require__(249); | |
| 6924 | + | |
| 6925 | +/***/ }), | |
| 6926 | +/* 239 */, | |
| 6927 | +/* 240 */, | |
| 6928 | +/* 241 */ | |
| 6929 | +/***/ (function(module, exports) { | |
| 6930 | + | |
| 6931 | +module.exports = function (done, value) { | |
| 6932 | + return { value: value, done: !!done }; | |
| 6933 | +}; | |
| 6934 | + | |
| 6935 | + | |
| 6936 | +/***/ }), | |
| 6937 | +/* 242 */ | |
| 6938 | +/***/ (function(module, exports, __webpack_require__) { | |
| 6939 | + | |
| 6940 | +"use strict"; | |
| 6941 | + | |
| 6942 | +var create = __webpack_require__(231); | |
| 6943 | +var descriptor = __webpack_require__(106); | |
| 6944 | +var setToStringTag = __webpack_require__(179); | |
| 6945 | +var IteratorPrototype = {}; | |
| 6946 | + | |
| 6947 | +// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() | |
| 6948 | +__webpack_require__(30)(IteratorPrototype, __webpack_require__(13)('iterator'), function () { return this; }); | |
| 6949 | + | |
| 6950 | +module.exports = function (Constructor, NAME, next) { | |
| 6951 | + Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); | |
| 6952 | + setToStringTag(Constructor, NAME + ' Iterator'); | |
| 6953 | +}; | |
| 6954 | + | |
| 6955 | + | |
| 6956 | +/***/ }), | |
| 6957 | +/* 243 */ | |
| 6958 | +/***/ (function(module, exports, __webpack_require__) { | |
| 6959 | + | |
| 6960 | +var dP = __webpack_require__(51); | |
| 6961 | +var anObject = __webpack_require__(20); | |
| 6962 | +var getKeys = __webpack_require__(192); | |
| 6963 | + | |
| 6964 | +module.exports = __webpack_require__(28) ? Object.defineProperties : function defineProperties(O, Properties) { | |
| 6965 | + anObject(O); | |
| 6966 | + var keys = getKeys(Properties); | |
| 6967 | + var length = keys.length; | |
| 6968 | + var i = 0; | |
| 6969 | + var P; | |
| 6970 | + while (length > i) dP.f(O, P = keys[i++], Properties[P]); | |
| 6971 | + return O; | |
| 6972 | +}; | |
| 6973 | + | |
| 6974 | + | |
| 6975 | +/***/ }), | |
| 6976 | +/* 244 */ | |
| 6977 | +/***/ (function(module, exports, __webpack_require__) { | |
| 6978 | + | |
| 6979 | +// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) | |
| 6980 | +var has = __webpack_require__(64); | |
| 6981 | +var toObject = __webpack_require__(102); | |
| 6982 | +var IE_PROTO = __webpack_require__(137)('IE_PROTO'); | |
| 6983 | +var ObjectProto = Object.prototype; | |
| 6984 | + | |
| 6985 | +module.exports = Object.getPrototypeOf || function (O) { | |
| 6986 | + O = toObject(O); | |
| 6987 | + if (has(O, IE_PROTO)) return O[IE_PROTO]; | |
| 6988 | + if (typeof O.constructor == 'function' && O instanceof O.constructor) { | |
| 6989 | + return O.constructor.prototype; | |
| 6990 | + } return O instanceof Object ? ObjectProto : null; | |
| 6991 | +}; | |
| 6992 | + | |
| 6993 | + | |
| 6994 | +/***/ }), | |
| 6995 | +/* 245 */ | |
| 6996 | +/***/ (function(module, exports, __webpack_require__) { | |
| 6997 | + | |
| 6998 | +// 9.4.2.3 ArraySpeciesCreate(originalArray, length) | |
| 6999 | +var speciesConstructor = __webpack_require__(246); | |
| 7000 | + | |
| 7001 | +module.exports = function (original, length) { | |
| 7002 | + return new (speciesConstructor(original))(length); | |
| 7003 | +}; | |
| 7004 | + | |
| 7005 | + | |
| 7006 | +/***/ }), | |
| 7007 | +/* 246 */ | |
| 7008 | +/***/ (function(module, exports, __webpack_require__) { | |
| 7009 | + | |
| 7010 | +var isObject = __webpack_require__(9); | |
| 7011 | +var isArray = __webpack_require__(97); | |
| 7012 | +var SPECIES = __webpack_require__(10)('species'); | |
| 7013 | + | |
| 7014 | +module.exports = function (original) { | |
| 7015 | + var C; | |
| 7016 | + if (isArray(original)) { | |
| 7017 | + C = original.constructor; | |
| 7018 | + // cross-realm fallback | |
| 7019 | + if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined; | |
| 7020 | + if (isObject(C)) { | |
| 7021 | + C = C[SPECIES]; | |
| 7022 | + if (C === null) C = undefined; | |
| 7023 | + } | |
| 7024 | + } return C === undefined ? Array : C; | |
| 7025 | +}; | |
| 7026 | + | |
| 7027 | + | |
| 7028 | +/***/ }), | |
| 7029 | +/* 247 */ | |
| 7030 | +/***/ (function(module, exports, __webpack_require__) { | |
| 7031 | + | |
| 7032 | +var _Array$isArray = __webpack_require__(86); | |
| 7033 | + | |
| 7034 | +function _arrayWithHoles(arr) { | |
| 7035 | + if (_Array$isArray(arr)) return arr; | |
| 7036 | +} | |
| 7037 | + | |
| 7038 | +module.exports = _arrayWithHoles; | |
| 7039 | + | |
| 7040 | +/***/ }), | |
| 7041 | +/* 248 */ | |
| 7042 | +/***/ (function(module, exports, __webpack_require__) { | |
| 7043 | + | |
| 7044 | +var _getIterator = __webpack_require__(238); | |
| 7045 | + | |
| 7046 | +var _isIterable = __webpack_require__(212); | |
| 7047 | + | |
| 7048 | +var _Symbol = __webpack_require__(107); | |
| 7049 | + | |
| 7050 | +function _iterableToArrayLimit(arr, i) { | |
| 7051 | + if (typeof _Symbol === "undefined" || !_isIterable(Object(arr))) return; | |
| 7052 | + var _arr = []; | |
| 7053 | + var _n = true; | |
| 7054 | + var _d = false; | |
| 7055 | + var _e = undefined; | |
| 7056 | + | |
| 7057 | + try { | |
| 7058 | + for (var _i = _getIterator(arr), _s; !(_n = (_s = _i.next()).done); _n = true) { | |
| 7059 | + _arr.push(_s.value); | |
| 7060 | + | |
| 7061 | + if (i && _arr.length === i) break; | |
| 7062 | + } | |
| 7063 | + } catch (err) { | |
| 7064 | + _d = true; | |
| 7065 | + _e = err; | |
| 7066 | + } finally { | |
| 7067 | + try { | |
| 7068 | + if (!_n && _i["return"] != null) _i["return"](); | |
| 7069 | + } finally { | |
| 7070 | + if (_d) throw _e; | |
| 7071 | + } | |
| 7072 | + } | |
| 7073 | + | |
| 7074 | + return _arr; | |
| 7075 | +} | |
| 7076 | + | |
| 7077 | +module.exports = _iterableToArrayLimit; | |
| 7078 | + | |
| 7079 | +/***/ }), | |
| 7080 | +/* 249 */ | |
| 7081 | +/***/ (function(module, exports, __webpack_require__) { | |
| 7082 | + | |
| 7083 | +__webpack_require__(59); | |
| 7084 | +__webpack_require__(57); | |
| 7085 | +module.exports = __webpack_require__(250); | |
| 7086 | + | |
| 7087 | + | |
| 7088 | +/***/ }), | |
| 7089 | +/* 250 */ | |
| 7090 | +/***/ (function(module, exports, __webpack_require__) { | |
| 7091 | + | |
| 7092 | +var anObject = __webpack_require__(11); | |
| 7093 | +var get = __webpack_require__(117); | |
| 7094 | +module.exports = __webpack_require__(6).getIterator = function (it) { | |
| 7095 | + var iterFn = get(it); | |
| 7096 | + if (typeof iterFn != 'function') throw TypeError(it + ' is not iterable!'); | |
| 7097 | + return anObject(iterFn.call(it)); | |
| 7098 | +}; | |
| 7099 | + | |
| 7100 | + | |
| 7101 | +/***/ }), | |
| 7102 | +/* 251 */ | |
| 7103 | +/***/ (function(module, exports) { | |
| 7104 | + | |
| 7105 | +function _nonIterableRest() { | |
| 7106 | + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | |
| 7107 | +} | |
| 7108 | + | |
| 7109 | +module.exports = _nonIterableRest; | |
| 7110 | + | |
| 7111 | +/***/ }), | |
| 7112 | +/* 252 */ | |
| 7113 | +/***/ (function(module, exports, __webpack_require__) { | |
| 7114 | + | |
| 7115 | +"use strict"; | |
| 7116 | + | |
| 7117 | + | |
| 7118 | +var _interopRequireDefault = __webpack_require__(0); | |
| 7119 | + | |
| 7120 | +var _Object$defineProperty = __webpack_require__(1); | |
| 7121 | + | |
| 7122 | +_Object$defineProperty(exports, "__esModule", { | |
| 7123 | + value: true | |
| 7124 | +}); | |
| 7125 | + | |
| 7126 | +exports.default = void 0; | |
| 7127 | + | |
| 7128 | +__webpack_require__(40); | |
| 7129 | + | |
| 7130 | +var _isArray = _interopRequireDefault(__webpack_require__(86)); | |
| 7131 | + | |
| 7132 | +var _hasInstance = _interopRequireDefault(__webpack_require__(253)); | |
| 7133 | + | |
| 7134 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 7135 | + | |
| 7136 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 7137 | + | |
| 7138 | +var _get2 = _interopRequireDefault(__webpack_require__(26)); | |
| 7139 | + | |
| 7140 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(16)); | |
| 7141 | + | |
| 7142 | +var InstanceType = /*#__PURE__*/function () { | |
| 7143 | + (0, _createClass2.default)(InstanceType, null, [{ | |
| 7144 | + key: _hasInstance.default, | |
| 599 | 7145 | value: function value(target) { |
| 600 | 7146 | /** |
| 601 | 7147 | * This is function extending being called each time JS uses instanceOf, since babel use it each time it create new class |
| 602 | 7148 | * its give's opportunity to mange capabilities of instanceOf operator. |
| @@ -601,1028 +7147,16065 @@ | ||
| 601 | 7147 | * This is function extending being called each time JS uses instanceOf, since babel use it each time it create new class |
| 602 | 7148 | * its give's opportunity to mange capabilities of instanceOf operator. |
| 603 | 7149 | * saving current class each time will give option later to handle instanceOf manually. |
| 604 | 7150 | */ |
| 605 | - var result = _superPropGet(InstanceType, Symbol.hasInstance, this, 2)([target]); | |
| 7151 | + var result = (0, _get2.default)((0, _getPrototypeOf2.default)(InstanceType), _hasInstance.default, this).call(this, target); // Act normal when validate a class, which does not have instance type. | |
| 606 | 7152 | |
| 607 | - // Act normal when validate a class, which does not have instance type. | |
| 608 | 7153 | if (target && !target.constructor.getInstanceType) { |
| 609 | 7154 | return result; |
| 610 | 7155 | } |
| 7156 | + | |
| 611 | 7157 | if (target) { |
| 612 | 7158 | if (!target.instanceTypes) { |
| 613 | 7159 | target.instanceTypes = []; |
| 614 | 7160 | } |
| 7161 | + | |
| 615 | 7162 | if (!result) { |
| 616 | 7163 | if (this.getInstanceType() === target.constructor.getInstanceType()) { |
| 617 | 7164 | result = true; |
| 618 | 7165 | } |
| 619 | 7166 | } |
| 7167 | + | |
| 620 | 7168 | if (result) { |
| 621 | 7169 | var name = this.getInstanceType === InstanceType.getInstanceType ? 'BaseInstanceType' : this.getInstanceType(); |
| 7170 | + | |
| 622 | 7171 | if (-1 === target.instanceTypes.indexOf(name)) { |
| 623 | 7172 | target.instanceTypes.push(name); |
| 624 | 7173 | } |
| 625 | 7174 | } |
| 626 | 7175 | } |
| 7176 | + | |
| 627 | 7177 | if (!result && target) { |
| 628 | 7178 | // Check if the given 'target', is instance of known types. |
| 629 | - result = target.instanceTypes && Array.isArray(target.instanceTypes) && -1 !== target.instanceTypes.indexOf(this.getInstanceType()); | |
| 7179 | + result = target.instanceTypes && (0, _isArray.default)(target.instanceTypes) && -1 !== target.instanceTypes.indexOf(this.getInstanceType()); | |
| 630 | 7180 | } |
| 7181 | + | |
| 631 | 7182 | return result; |
| 632 | 7183 | } |
| 633 | - }, { | |
| 7184 | + }]); | |
| 7185 | + | |
| 7186 | + function InstanceType() { | |
| 7187 | + var _this = this; | |
| 7188 | + | |
| 7189 | + (0, _classCallCheck2.default)(this, InstanceType); | |
| 7190 | + // Since anonymous classes sometimes do not get validated by babel, do it manually. | |
| 7191 | + var target = this instanceof InstanceType ? this.constructor : void 0; | |
| 7192 | + var prototypes = []; | |
| 7193 | + | |
| 7194 | + while (target.__proto__ && target.__proto__.name) { | |
| 7195 | + prototypes.push(target.__proto__); | |
| 7196 | + target = target.__proto__; | |
| 7197 | + } | |
| 7198 | + | |
| 7199 | + prototypes.reverse().forEach(function (proto) { | |
| 7200 | + return _this instanceof proto; | |
| 7201 | + }); | |
| 7202 | + } | |
| 7203 | + | |
| 7204 | + (0, _createClass2.default)(InstanceType, null, [{ | |
| 634 | 7205 | key: "getInstanceType", |
| 635 | 7206 | value: function getInstanceType() { |
| 636 | 7207 | elementorModules.ForceMethodImplementation(); |
| 637 | 7208 | } |
| 638 | 7209 | }]); |
| 7210 | + return InstanceType; | |
| 639 | 7211 | }(); |
| 640 | 7212 | |
| 7213 | +exports.default = InstanceType; | |
| 7214 | + | |
| 641 | 7215 | /***/ }), |
| 7216 | +/* 253 */ | |
| 7217 | +/***/ (function(module, exports, __webpack_require__) { | |
| 642 | 7218 | |
| 643 | -/***/ "../modules/web-cli/assets/js/modules/command-base.js": | |
| 644 | -/*!************************************************************!*\ | |
| 645 | - !*** ../modules/web-cli/assets/js/modules/command-base.js ***! | |
| 646 | - \************************************************************/ | |
| 647 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 7219 | +module.exports = __webpack_require__(254); | |
| 648 | 7220 | |
| 7221 | +/***/ }), | |
| 7222 | +/* 254 */ | |
| 7223 | +/***/ (function(module, exports, __webpack_require__) { | |
| 7224 | + | |
| 7225 | +__webpack_require__(255); | |
| 7226 | +module.exports = __webpack_require__(62).f('hasInstance'); | |
| 7227 | + | |
| 7228 | + | |
| 7229 | +/***/ }), | |
| 7230 | +/* 255 */ | |
| 7231 | +/***/ (function(module, exports, __webpack_require__) { | |
| 7232 | + | |
| 649 | 7233 | "use strict"; |
| 650 | 7234 | |
| 7235 | +var isObject = __webpack_require__(9); | |
| 7236 | +var getPrototypeOf = __webpack_require__(63); | |
| 7237 | +var HAS_INSTANCE = __webpack_require__(10)('hasInstance'); | |
| 7238 | +var FunctionProto = Function.prototype; | |
| 7239 | +// 19.2.3.6 Function.prototype[@@hasInstance](V) | |
| 7240 | +if (!(HAS_INSTANCE in FunctionProto)) __webpack_require__(15).f(FunctionProto, HAS_INSTANCE, { value: function (O) { | |
| 7241 | + if (typeof this != 'function' || !isObject(O)) return false; | |
| 7242 | + if (!isObject(this.prototype)) return O instanceof this; | |
| 7243 | + // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this: | |
| 7244 | + while (O = getPrototypeOf(O)) if (this.prototype === O) return true; | |
| 7245 | + return false; | |
| 7246 | +} }); | |
| 651 | 7247 | |
| 652 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 653 | -Object.defineProperty(exports, "__esModule", ({ | |
| 7248 | + | |
| 7249 | +/***/ }), | |
| 7250 | +/* 256 */ | |
| 7251 | +/***/ (function(module, exports, __webpack_require__) { | |
| 7252 | + | |
| 7253 | +"use strict"; | |
| 7254 | + | |
| 7255 | + | |
| 7256 | +var _interopRequireDefault = __webpack_require__(0); | |
| 7257 | + | |
| 7258 | +__webpack_require__(24); | |
| 7259 | + | |
| 7260 | +var _inline = _interopRequireDefault(__webpack_require__(386)); | |
| 7261 | + | |
| 7262 | +var BaseElementView = __webpack_require__(304); | |
| 7263 | + | |
| 7264 | +var DEFAULT_INNER_SECTION_COLUMNS = 2, | |
| 7265 | + DEFAULT_MIN_COLUMN_SIZE = 2, | |
| 7266 | + DEFAULT_MAX_COLUMNS = 10; | |
| 7267 | +var SectionView = BaseElementView.extend({ | |
| 7268 | + childViewContainer: function childViewContainer() { | |
| 7269 | + return elementor.config.legacyMode.elementWrappers ? '> .elementor-container > .elementor-row' : '> .elementor-container'; | |
| 7270 | + }, | |
| 7271 | + template: Marionette.TemplateCache.get('#tmpl-elementor-section-content'), | |
| 7272 | + addSectionView: null, | |
| 7273 | + _checkIsFull: function _checkIsFull() { | |
| 7274 | + this.toggleSectionIsFull(); | |
| 7275 | + elementorCommon.helpers.softDeprecated('_checkIsFull', '2.9.0', 'toggleSectionIsFull()'); | |
| 7276 | + }, | |
| 7277 | + toggleSectionIsFull: function toggleSectionIsFull() { | |
| 7278 | + this.$el.toggleClass('elementor-section-filled', this.isCollectionFilled()); | |
| 7279 | + }, | |
| 7280 | + addChildModel: function addChildModel(model) { | |
| 7281 | + /// TODO: maybe should be part of $e.hooks. | |
| 7282 | + var isModelInstance = model instanceof Backbone.Model, | |
| 7283 | + isInner = this.isInner(); | |
| 7284 | + | |
| 7285 | + if (isModelInstance) { | |
| 7286 | + // TODO: change to command. | |
| 7287 | + model.set('isInner', isInner); | |
| 7288 | + } else { | |
| 7289 | + model.isInner = isInner; | |
| 7290 | + } | |
| 7291 | + | |
| 7292 | + return BaseElementView.prototype.addChildModel.apply(this, arguments); | |
| 7293 | + }, | |
| 7294 | + className: function className() { | |
| 7295 | + var classes = BaseElementView.prototype.className.apply(this, arguments), | |
| 7296 | + type = this.isInner() ? 'inner' : 'top'; | |
| 7297 | + return classes + ' elementor-section elementor-' + type + '-section'; | |
| 7298 | + }, | |
| 7299 | + tagName: function tagName() { | |
| 7300 | + return this.model.getSetting('html_tag') || 'section'; | |
| 7301 | + }, | |
| 7302 | + behaviors: function behaviors() { | |
| 7303 | + var behaviors = BaseElementView.prototype.behaviors.apply(this, arguments); | |
| 7304 | + | |
| 7305 | + _.extend(behaviors, { | |
| 7306 | + Sortable: { | |
| 7307 | + behaviorClass: __webpack_require__(305), | |
| 7308 | + elChildType: 'column' | |
| 7309 | + } | |
| 7310 | + }); | |
| 7311 | + | |
| 7312 | + return elementor.hooks.applyFilters('elements/section/behaviors', behaviors, this); | |
| 7313 | + }, | |
| 7314 | + initialize: function initialize() { | |
| 7315 | + BaseElementView.prototype.initialize.apply(this, arguments); | |
| 7316 | + this.model.get('editSettings').set('defaultEditRoute', 'layout'); | |
| 7317 | + }, | |
| 7318 | + getEditButtons: function getEditButtons() { | |
| 7319 | + var elementData = elementor.getElementData(this.model), | |
| 7320 | + editTools = {}; | |
| 7321 | + | |
| 7322 | + if (!this.isInner()) { | |
| 7323 | + editTools.add = { | |
| 7324 | + title: elementor.translate('add_element', [elementData.title]), | |
| 7325 | + icon: 'plus' | |
| 7326 | + }; | |
| 7327 | + } | |
| 7328 | + | |
| 7329 | + editTools.edit = { | |
| 7330 | + title: elementor.translate('edit_element', [elementData.title]), | |
| 7331 | + icon: 'handle' | |
| 7332 | + }; | |
| 7333 | + | |
| 7334 | + if (elementor.getPreferences('edit_buttons')) { | |
| 7335 | + editTools.duplicate = { | |
| 7336 | + title: elementor.translate('duplicate_element', [elementData.title]), | |
| 7337 | + icon: 'clone' | |
| 7338 | + }; | |
| 7339 | + } | |
| 7340 | + | |
| 7341 | + editTools.remove = { | |
| 7342 | + title: elementor.translate('delete_element', [elementData.title]), | |
| 7343 | + icon: 'close' | |
| 7344 | + }; | |
| 7345 | + return editTools; | |
| 7346 | + }, | |
| 7347 | + getContextMenuGroups: function getContextMenuGroups() { | |
| 7348 | + var groups = BaseElementView.prototype.getContextMenuGroups.apply(this, arguments), | |
| 7349 | + transferGroupIndex = groups.indexOf(_.findWhere(groups, { | |
| 7350 | + name: 'clipboard' | |
| 7351 | + })); | |
| 7352 | + groups.splice(transferGroupIndex + 1, 0, { | |
| 7353 | + name: 'save', | |
| 7354 | + actions: [{ | |
| 7355 | + name: 'save', | |
| 7356 | + title: elementor.translate('save_as_block'), | |
| 7357 | + callback: this.save.bind(this) | |
| 7358 | + }] | |
| 7359 | + }); | |
| 7360 | + return groups; | |
| 7361 | + }, | |
| 7362 | + getSortableOptions: function getSortableOptions() { | |
| 7363 | + var sectionConnectClass = this.isInner() ? '.elementor-inner-section' : '.elementor-top-section'; | |
| 7364 | + return { | |
| 7365 | + connectWith: sectionConnectClass + this.childViewContainer(), | |
| 7366 | + handle: '> .elementor-element-overlay .elementor-editor-element-edit', | |
| 7367 | + items: '> .elementor-column', | |
| 7368 | + forcePlaceholderSize: true, | |
| 7369 | + tolerance: 'pointer' | |
| 7370 | + }; | |
| 7371 | + }, | |
| 7372 | + getColumnPercentSize: function getColumnPercentSize(element, size) { | |
| 7373 | + return +(size / element.parent().width() * 100).toFixed(3); | |
| 7374 | + }, | |
| 7375 | + getDefaultStructure: function getDefaultStructure() { | |
| 7376 | + return this.collection.length + '0'; | |
| 7377 | + }, | |
| 7378 | + getStructure: function getStructure() { | |
| 7379 | + return this.model.getSetting('structure'); | |
| 7380 | + }, | |
| 7381 | + getColumnAt: function getColumnAt(index) { | |
| 7382 | + var model = this.collection.at(index); | |
| 7383 | + return model ? this.children.findByModelCid(model.cid) : null; | |
| 7384 | + }, | |
| 7385 | + getNextColumn: function getNextColumn(columnView) { | |
| 7386 | + return this.getColumnAt(this.collection.indexOf(columnView.model) + 1); | |
| 7387 | + }, | |
| 7388 | + getPreviousColumn: function getPreviousColumn(columnView) { | |
| 7389 | + return this.getColumnAt(this.collection.indexOf(columnView.model) - 1); | |
| 7390 | + }, | |
| 7391 | + getNeighborContainer: function getNeighborContainer(container) { | |
| 7392 | + var parentView = container.parent.view, | |
| 7393 | + nextView = parentView.getNextColumn(container.view) || parentView.getPreviousColumn(container.view); | |
| 7394 | + | |
| 7395 | + if (!nextView) { | |
| 7396 | + return false; | |
| 7397 | + } | |
| 7398 | + | |
| 7399 | + return nextView.getContainer(); | |
| 7400 | + }, | |
| 7401 | + setStructure: function setStructure(structure) { | |
| 7402 | + var shouldAdjustColumns = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; | |
| 7403 | + var parsedStructure = elementor.presetsFactory.getParsedStructure(structure); | |
| 7404 | + | |
| 7405 | + if (+parsedStructure.columnsCount !== this.collection.length) { | |
| 7406 | + throw new TypeError('The provided structure doesn\'t match the columns count.'); | |
| 7407 | + } | |
| 7408 | + | |
| 7409 | + $e.run('document/elements/settings', { | |
| 7410 | + container: this.getContainer(), | |
| 7411 | + settings: { | |
| 7412 | + structure: structure | |
| 7413 | + }, | |
| 7414 | + options: { | |
| 7415 | + external: true | |
| 7416 | + } | |
| 7417 | + }); | |
| 7418 | + | |
| 7419 | + if (shouldAdjustColumns) { | |
| 7420 | + this.adjustColumns(); | |
| 7421 | + } | |
| 7422 | + }, | |
| 7423 | + adjustColumns: function adjustColumns() { | |
| 7424 | + var preset = elementor.presetsFactory.getPresetByStructure(this.getStructure()); | |
| 7425 | + this.children.each(function (columnView, index) { | |
| 7426 | + var container = columnView.getContainer(); | |
| 7427 | + $e.run('document/elements/settings', { | |
| 7428 | + container: container, | |
| 7429 | + settings: { | |
| 7430 | + _column_size: preset.preset[index], | |
| 7431 | + _inline_size: null | |
| 7432 | + } | |
| 7433 | + }); | |
| 7434 | + }); | |
| 7435 | + }, | |
| 7436 | + resetLayout: function resetLayout() { | |
| 7437 | + var shouldAdjustColumns = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; | |
| 7438 | + this.setStructure(this.getDefaultStructure(), shouldAdjustColumns); | |
| 7439 | + }, | |
| 7440 | + resetColumnsCustomSize: function resetColumnsCustomSize() { | |
| 7441 | + this.children.each(function (columnView) { | |
| 7442 | + $e.run('document/elements/settings', { | |
| 7443 | + container: columnView.getContainer(), | |
| 7444 | + settings: { | |
| 7445 | + _inline_size: null | |
| 7446 | + }, | |
| 7447 | + options: { | |
| 7448 | + external: true | |
| 7449 | + } | |
| 7450 | + }); | |
| 7451 | + }); | |
| 7452 | + }, | |
| 7453 | + isCollectionFilled: function isCollectionFilled() { | |
| 7454 | + return DEFAULT_MAX_COLUMNS <= this.collection.length; | |
| 7455 | + }, | |
| 7456 | + showChildrenPercentsTooltip: function showChildrenPercentsTooltip(columnView, nextColumnView) { | |
| 7457 | + columnView.ui.percentsTooltip.show(); | |
| 7458 | + columnView.ui.percentsTooltip.attr('data-side', elementorCommon.config.isRTL ? 'right' : 'left'); | |
| 7459 | + nextColumnView.ui.percentsTooltip.show(); | |
| 7460 | + nextColumnView.ui.percentsTooltip.attr('data-side', elementorCommon.config.isRTL ? 'left' : 'right'); | |
| 7461 | + }, | |
| 7462 | + hideChildrenPercentsTooltip: function hideChildrenPercentsTooltip(columnView, nextColumnView) { | |
| 7463 | + columnView.ui.percentsTooltip.hide(); | |
| 7464 | + nextColumnView.ui.percentsTooltip.hide(); | |
| 7465 | + }, | |
| 7466 | + destroyAddSectionView: function destroyAddSectionView() { | |
| 7467 | + if (this.addSectionView && !this.addSectionView.isDestroyed) { | |
| 7468 | + this.addSectionView.destroy(); | |
| 7469 | + } | |
| 7470 | + }, | |
| 7471 | + onRender: function onRender() { | |
| 7472 | + BaseElementView.prototype.onRender.apply(this, arguments); | |
| 7473 | + this.toggleSectionIsFull(); | |
| 7474 | + }, | |
| 7475 | + onAddButtonClick: function onAddButtonClick() { | |
| 7476 | + if (this.addSectionView && !this.addSectionView.isDestroyed) { | |
| 7477 | + this.addSectionView.fadeToDeath(); | |
| 7478 | + return; | |
| 7479 | + } | |
| 7480 | + | |
| 7481 | + var addSectionView = new _inline.default({ | |
| 7482 | + at: this.model.collection.indexOf(this.model) | |
| 7483 | + }); | |
| 7484 | + addSectionView.render(); | |
| 7485 | + this.$el.before(addSectionView.$el); | |
| 7486 | + addSectionView.$el.hide(); // Delaying the slide down for slow-render browsers (such as FF) | |
| 7487 | + | |
| 7488 | + setTimeout(function () { | |
| 7489 | + addSectionView.$el.slideDown(null, function () { | |
| 7490 | + // Remove inline style, for preview mode. | |
| 7491 | + jQuery(this).css('display', ''); | |
| 7492 | + }); | |
| 7493 | + }); | |
| 7494 | + this.addSectionView = addSectionView; | |
| 7495 | + }, | |
| 7496 | + onChildviewRequestResizeStart: function onChildviewRequestResizeStart(columnView) { | |
| 7497 | + var nextColumnView = this.getNextColumn(columnView); | |
| 7498 | + | |
| 7499 | + if (!nextColumnView) { | |
| 7500 | + return; | |
| 7501 | + } | |
| 7502 | + | |
| 7503 | + this.showChildrenPercentsTooltip(columnView, nextColumnView); | |
| 7504 | + var $iframes = columnView.$el.find('iframe').add(nextColumnView.$el.find('iframe')); | |
| 7505 | + elementor.helpers.disableElementEvents($iframes); | |
| 7506 | + }, | |
| 7507 | + onChildviewRequestResizeStop: function onChildviewRequestResizeStop(columnView) { | |
| 7508 | + var nextColumnView = this.getNextColumn(columnView); | |
| 7509 | + | |
| 7510 | + if (!nextColumnView) { | |
| 7511 | + return; | |
| 7512 | + } | |
| 7513 | + | |
| 7514 | + this.hideChildrenPercentsTooltip(columnView, nextColumnView); | |
| 7515 | + var $iframes = columnView.$el.find('iframe').add(nextColumnView.$el.find('iframe')); | |
| 7516 | + elementor.helpers.enableElementEvents($iframes); | |
| 7517 | + }, | |
| 7518 | + onChildviewRequestResize: function onChildviewRequestResize(columnView, ui) { | |
| 7519 | + ui.element.css({ | |
| 7520 | + width: '', | |
| 7521 | + left: 'initial' // Fix for RTL resizing | |
| 7522 | + | |
| 7523 | + }); | |
| 7524 | + $e.run('document/elements/settings', { | |
| 7525 | + container: columnView.getContainer(), | |
| 7526 | + settings: { | |
| 7527 | + _inline_size: this.getColumnPercentSize(ui.element, ui.size.width) | |
| 7528 | + } | |
| 7529 | + }); | |
| 7530 | + }, | |
| 7531 | + onDestroy: function onDestroy() { | |
| 7532 | + BaseElementView.prototype.onDestroy.apply(this, arguments); | |
| 7533 | + this.destroyAddSectionView(); | |
| 7534 | + } | |
| 7535 | +}); | |
| 7536 | +module.exports = SectionView; | |
| 7537 | +module.exports.DEFAULT_INNER_SECTION_COLUMNS = DEFAULT_INNER_SECTION_COLUMNS; | |
| 7538 | +module.exports.DEFAULT_MIN_COLUMN_SIZE = DEFAULT_MIN_COLUMN_SIZE; | |
| 7539 | +module.exports.DEFAULT_MAX_COLUMNS = DEFAULT_MAX_COLUMNS; | |
| 7540 | + | |
| 7541 | +/***/ }), | |
| 7542 | +/* 257 */ | |
| 7543 | +/***/ (function(module, exports, __webpack_require__) { | |
| 7544 | + | |
| 7545 | +__webpack_require__(92); | |
| 7546 | +__webpack_require__(57); | |
| 7547 | +__webpack_require__(59); | |
| 7548 | +__webpack_require__(258); | |
| 7549 | +__webpack_require__(261); | |
| 7550 | +__webpack_require__(262); | |
| 7551 | +module.exports = __webpack_require__(6).Promise; | |
| 7552 | + | |
| 7553 | + | |
| 7554 | +/***/ }), | |
| 7555 | +/* 258 */ | |
| 7556 | +/***/ (function(module, exports, __webpack_require__) { | |
| 7557 | + | |
| 7558 | +"use strict"; | |
| 7559 | + | |
| 7560 | +var LIBRARY = __webpack_require__(44); | |
| 7561 | +var global = __webpack_require__(8); | |
| 7562 | +var ctx = __webpack_require__(29); | |
| 7563 | +var classof = __webpack_require__(99); | |
| 7564 | +var $export = __webpack_require__(7); | |
| 7565 | +var isObject = __webpack_require__(9); | |
| 7566 | +var aFunction = __webpack_require__(35); | |
| 7567 | +var anInstance = __webpack_require__(120); | |
| 7568 | +var forOf = __webpack_require__(79); | |
| 7569 | +var speciesConstructor = __webpack_require__(208); | |
| 7570 | +var task = __webpack_require__(209).set; | |
| 7571 | +var microtask = __webpack_require__(259)(); | |
| 7572 | +var newPromiseCapabilityModule = __webpack_require__(149); | |
| 7573 | +var perform = __webpack_require__(210); | |
| 7574 | +var userAgent = __webpack_require__(260); | |
| 7575 | +var promiseResolve = __webpack_require__(211); | |
| 7576 | +var PROMISE = 'Promise'; | |
| 7577 | +var TypeError = global.TypeError; | |
| 7578 | +var process = global.process; | |
| 7579 | +var versions = process && process.versions; | |
| 7580 | +var v8 = versions && versions.v8 || ''; | |
| 7581 | +var $Promise = global[PROMISE]; | |
| 7582 | +var isNode = classof(process) == 'process'; | |
| 7583 | +var empty = function () { /* empty */ }; | |
| 7584 | +var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper; | |
| 7585 | +var newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f; | |
| 7586 | + | |
| 7587 | +var USE_NATIVE = !!function () { | |
| 7588 | + try { | |
| 7589 | + // correct subclassing with @@species support | |
| 7590 | + var promise = $Promise.resolve(1); | |
| 7591 | + var FakePromise = (promise.constructor = {})[__webpack_require__(10)('species')] = function (exec) { | |
| 7592 | + exec(empty, empty); | |
| 7593 | + }; | |
| 7594 | + // unhandled rejections tracking support, NodeJS Promise without it fails @@species test | |
| 7595 | + return (isNode || typeof PromiseRejectionEvent == 'function') | |
| 7596 | + && promise.then(empty) instanceof FakePromise | |
| 7597 | + // v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables | |
| 7598 | + // https://bugs.chromium.org/p/chromium/issues/detail?id=830565 | |
| 7599 | + // we can't detect it synchronously, so just check versions | |
| 7600 | + && v8.indexOf('6.6') !== 0 | |
| 7601 | + && userAgent.indexOf('Chrome/66') === -1; | |
| 7602 | + } catch (e) { /* empty */ } | |
| 7603 | +}(); | |
| 7604 | + | |
| 7605 | +// helpers | |
| 7606 | +var isThenable = function (it) { | |
| 7607 | + var then; | |
| 7608 | + return isObject(it) && typeof (then = it.then) == 'function' ? then : false; | |
| 7609 | +}; | |
| 7610 | +var notify = function (promise, isReject) { | |
| 7611 | + if (promise._n) return; | |
| 7612 | + promise._n = true; | |
| 7613 | + var chain = promise._c; | |
| 7614 | + microtask(function () { | |
| 7615 | + var value = promise._v; | |
| 7616 | + var ok = promise._s == 1; | |
| 7617 | + var i = 0; | |
| 7618 | + var run = function (reaction) { | |
| 7619 | + var handler = ok ? reaction.ok : reaction.fail; | |
| 7620 | + var resolve = reaction.resolve; | |
| 7621 | + var reject = reaction.reject; | |
| 7622 | + var domain = reaction.domain; | |
| 7623 | + var result, then, exited; | |
| 7624 | + try { | |
| 7625 | + if (handler) { | |
| 7626 | + if (!ok) { | |
| 7627 | + if (promise._h == 2) onHandleUnhandled(promise); | |
| 7628 | + promise._h = 1; | |
| 7629 | + } | |
| 7630 | + if (handler === true) result = value; | |
| 7631 | + else { | |
| 7632 | + if (domain) domain.enter(); | |
| 7633 | + result = handler(value); // may throw | |
| 7634 | + if (domain) { | |
| 7635 | + domain.exit(); | |
| 7636 | + exited = true; | |
| 7637 | + } | |
| 7638 | + } | |
| 7639 | + if (result === reaction.promise) { | |
| 7640 | + reject(TypeError('Promise-chain cycle')); | |
| 7641 | + } else if (then = isThenable(result)) { | |
| 7642 | + then.call(result, resolve, reject); | |
| 7643 | + } else resolve(result); | |
| 7644 | + } else reject(value); | |
| 7645 | + } catch (e) { | |
| 7646 | + if (domain && !exited) domain.exit(); | |
| 7647 | + reject(e); | |
| 7648 | + } | |
| 7649 | + }; | |
| 7650 | + while (chain.length > i) run(chain[i++]); // variable length - can't use forEach | |
| 7651 | + promise._c = []; | |
| 7652 | + promise._n = false; | |
| 7653 | + if (isReject && !promise._h) onUnhandled(promise); | |
| 7654 | + }); | |
| 7655 | +}; | |
| 7656 | +var onUnhandled = function (promise) { | |
| 7657 | + task.call(global, function () { | |
| 7658 | + var value = promise._v; | |
| 7659 | + var unhandled = isUnhandled(promise); | |
| 7660 | + var result, handler, console; | |
| 7661 | + if (unhandled) { | |
| 7662 | + result = perform(function () { | |
| 7663 | + if (isNode) { | |
| 7664 | + process.emit('unhandledRejection', value, promise); | |
| 7665 | + } else if (handler = global.onunhandledrejection) { | |
| 7666 | + handler({ promise: promise, reason: value }); | |
| 7667 | + } else if ((console = global.console) && console.error) { | |
| 7668 | + console.error('Unhandled promise rejection', value); | |
| 7669 | + } | |
| 7670 | + }); | |
| 7671 | + // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should | |
| 7672 | + promise._h = isNode || isUnhandled(promise) ? 2 : 1; | |
| 7673 | + } promise._a = undefined; | |
| 7674 | + if (unhandled && result.e) throw result.v; | |
| 7675 | + }); | |
| 7676 | +}; | |
| 7677 | +var isUnhandled = function (promise) { | |
| 7678 | + return promise._h !== 1 && (promise._a || promise._c).length === 0; | |
| 7679 | +}; | |
| 7680 | +var onHandleUnhandled = function (promise) { | |
| 7681 | + task.call(global, function () { | |
| 7682 | + var handler; | |
| 7683 | + if (isNode) { | |
| 7684 | + process.emit('rejectionHandled', promise); | |
| 7685 | + } else if (handler = global.onrejectionhandled) { | |
| 7686 | + handler({ promise: promise, reason: promise._v }); | |
| 7687 | + } | |
| 7688 | + }); | |
| 7689 | +}; | |
| 7690 | +var $reject = function (value) { | |
| 7691 | + var promise = this; | |
| 7692 | + if (promise._d) return; | |
| 7693 | + promise._d = true; | |
| 7694 | + promise = promise._w || promise; // unwrap | |
| 7695 | + promise._v = value; | |
| 7696 | + promise._s = 2; | |
| 7697 | + if (!promise._a) promise._a = promise._c.slice(); | |
| 7698 | + notify(promise, true); | |
| 7699 | +}; | |
| 7700 | +var $resolve = function (value) { | |
| 7701 | + var promise = this; | |
| 7702 | + var then; | |
| 7703 | + if (promise._d) return; | |
| 7704 | + promise._d = true; | |
| 7705 | + promise = promise._w || promise; // unwrap | |
| 7706 | + try { | |
| 7707 | + if (promise === value) throw TypeError("Promise can't be resolved itself"); | |
| 7708 | + if (then = isThenable(value)) { | |
| 7709 | + microtask(function () { | |
| 7710 | + var wrapper = { _w: promise, _d: false }; // wrap | |
| 7711 | + try { | |
| 7712 | + then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); | |
| 7713 | + } catch (e) { | |
| 7714 | + $reject.call(wrapper, e); | |
| 7715 | + } | |
| 7716 | + }); | |
| 7717 | + } else { | |
| 7718 | + promise._v = value; | |
| 7719 | + promise._s = 1; | |
| 7720 | + notify(promise, false); | |
| 7721 | + } | |
| 7722 | + } catch (e) { | |
| 7723 | + $reject.call({ _w: promise, _d: false }, e); // wrap | |
| 7724 | + } | |
| 7725 | +}; | |
| 7726 | + | |
| 7727 | +// constructor polyfill | |
| 7728 | +if (!USE_NATIVE) { | |
| 7729 | + // 25.4.3.1 Promise(executor) | |
| 7730 | + $Promise = function Promise(executor) { | |
| 7731 | + anInstance(this, $Promise, PROMISE, '_h'); | |
| 7732 | + aFunction(executor); | |
| 7733 | + Internal.call(this); | |
| 7734 | + try { | |
| 7735 | + executor(ctx($resolve, this, 1), ctx($reject, this, 1)); | |
| 7736 | + } catch (err) { | |
| 7737 | + $reject.call(this, err); | |
| 7738 | + } | |
| 7739 | + }; | |
| 7740 | + // eslint-disable-next-line no-unused-vars | |
| 7741 | + Internal = function Promise(executor) { | |
| 7742 | + this._c = []; // <- awaiting reactions | |
| 7743 | + this._a = undefined; // <- checked in isUnhandled reactions | |
| 7744 | + this._s = 0; // <- state | |
| 7745 | + this._d = false; // <- done | |
| 7746 | + this._v = undefined; // <- value | |
| 7747 | + this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled | |
| 7748 | + this._n = false; // <- notify | |
| 7749 | + }; | |
| 7750 | + Internal.prototype = __webpack_require__(121)($Promise.prototype, { | |
| 7751 | + // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) | |
| 7752 | + then: function then(onFulfilled, onRejected) { | |
| 7753 | + var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); | |
| 7754 | + reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; | |
| 7755 | + reaction.fail = typeof onRejected == 'function' && onRejected; | |
| 7756 | + reaction.domain = isNode ? process.domain : undefined; | |
| 7757 | + this._c.push(reaction); | |
| 7758 | + if (this._a) this._a.push(reaction); | |
| 7759 | + if (this._s) notify(this, false); | |
| 7760 | + return reaction.promise; | |
| 7761 | + }, | |
| 7762 | + // 25.4.5.1 Promise.prototype.catch(onRejected) | |
| 7763 | + 'catch': function (onRejected) { | |
| 7764 | + return this.then(undefined, onRejected); | |
| 7765 | + } | |
| 7766 | + }); | |
| 7767 | + OwnPromiseCapability = function () { | |
| 7768 | + var promise = new Internal(); | |
| 7769 | + this.promise = promise; | |
| 7770 | + this.resolve = ctx($resolve, promise, 1); | |
| 7771 | + this.reject = ctx($reject, promise, 1); | |
| 7772 | + }; | |
| 7773 | + newPromiseCapabilityModule.f = newPromiseCapability = function (C) { | |
| 7774 | + return C === $Promise || C === Wrapper | |
| 7775 | + ? new OwnPromiseCapability(C) | |
| 7776 | + : newGenericPromiseCapability(C); | |
| 7777 | + }; | |
| 7778 | +} | |
| 7779 | + | |
| 7780 | +$export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise }); | |
| 7781 | +__webpack_require__(53)($Promise, PROMISE); | |
| 7782 | +__webpack_require__(219)(PROMISE); | |
| 7783 | +Wrapper = __webpack_require__(6)[PROMISE]; | |
| 7784 | + | |
| 7785 | +// statics | |
| 7786 | +$export($export.S + $export.F * !USE_NATIVE, PROMISE, { | |
| 7787 | + // 25.4.4.5 Promise.reject(r) | |
| 7788 | + reject: function reject(r) { | |
| 7789 | + var capability = newPromiseCapability(this); | |
| 7790 | + var $$reject = capability.reject; | |
| 7791 | + $$reject(r); | |
| 7792 | + return capability.promise; | |
| 7793 | + } | |
| 7794 | +}); | |
| 7795 | +$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { | |
| 7796 | + // 25.4.4.6 Promise.resolve(x) | |
| 7797 | + resolve: function resolve(x) { | |
| 7798 | + return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x); | |
| 7799 | + } | |
| 7800 | +}); | |
| 7801 | +$export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(178)(function (iter) { | |
| 7802 | + $Promise.all(iter)['catch'](empty); | |
| 7803 | +})), PROMISE, { | |
| 7804 | + // 25.4.4.1 Promise.all(iterable) | |
| 7805 | + all: function all(iterable) { | |
| 7806 | + var C = this; | |
| 7807 | + var capability = newPromiseCapability(C); | |
| 7808 | + var resolve = capability.resolve; | |
| 7809 | + var reject = capability.reject; | |
| 7810 | + var result = perform(function () { | |
| 7811 | + var values = []; | |
| 7812 | + var index = 0; | |
| 7813 | + var remaining = 1; | |
| 7814 | + forOf(iterable, false, function (promise) { | |
| 7815 | + var $index = index++; | |
| 7816 | + var alreadyCalled = false; | |
| 7817 | + values.push(undefined); | |
| 7818 | + remaining++; | |
| 7819 | + C.resolve(promise).then(function (value) { | |
| 7820 | + if (alreadyCalled) return; | |
| 7821 | + alreadyCalled = true; | |
| 7822 | + values[$index] = value; | |
| 7823 | + --remaining || resolve(values); | |
| 7824 | + }, reject); | |
| 7825 | + }); | |
| 7826 | + --remaining || resolve(values); | |
| 7827 | + }); | |
| 7828 | + if (result.e) reject(result.v); | |
| 7829 | + return capability.promise; | |
| 7830 | + }, | |
| 7831 | + // 25.4.4.4 Promise.race(iterable) | |
| 7832 | + race: function race(iterable) { | |
| 7833 | + var C = this; | |
| 7834 | + var capability = newPromiseCapability(C); | |
| 7835 | + var reject = capability.reject; | |
| 7836 | + var result = perform(function () { | |
| 7837 | + forOf(iterable, false, function (promise) { | |
| 7838 | + C.resolve(promise).then(capability.resolve, reject); | |
| 7839 | + }); | |
| 7840 | + }); | |
| 7841 | + if (result.e) reject(result.v); | |
| 7842 | + return capability.promise; | |
| 7843 | + } | |
| 7844 | +}); | |
| 7845 | + | |
| 7846 | + | |
| 7847 | +/***/ }), | |
| 7848 | +/* 259 */ | |
| 7849 | +/***/ (function(module, exports, __webpack_require__) { | |
| 7850 | + | |
| 7851 | +var global = __webpack_require__(8); | |
| 7852 | +var macrotask = __webpack_require__(209).set; | |
| 7853 | +var Observer = global.MutationObserver || global.WebKitMutationObserver; | |
| 7854 | +var process = global.process; | |
| 7855 | +var Promise = global.Promise; | |
| 7856 | +var isNode = __webpack_require__(56)(process) == 'process'; | |
| 7857 | + | |
| 7858 | +module.exports = function () { | |
| 7859 | + var head, last, notify; | |
| 7860 | + | |
| 7861 | + var flush = function () { | |
| 7862 | + var parent, fn; | |
| 7863 | + if (isNode && (parent = process.domain)) parent.exit(); | |
| 7864 | + while (head) { | |
| 7865 | + fn = head.fn; | |
| 7866 | + head = head.next; | |
| 7867 | + try { | |
| 7868 | + fn(); | |
| 7869 | + } catch (e) { | |
| 7870 | + if (head) notify(); | |
| 7871 | + else last = undefined; | |
| 7872 | + throw e; | |
| 7873 | + } | |
| 7874 | + } last = undefined; | |
| 7875 | + if (parent) parent.enter(); | |
| 7876 | + }; | |
| 7877 | + | |
| 7878 | + // Node.js | |
| 7879 | + if (isNode) { | |
| 7880 | + notify = function () { | |
| 7881 | + process.nextTick(flush); | |
| 7882 | + }; | |
| 7883 | + // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339 | |
| 7884 | + } else if (Observer && !(global.navigator && global.navigator.standalone)) { | |
| 7885 | + var toggle = true; | |
| 7886 | + var node = document.createTextNode(''); | |
| 7887 | + new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new | |
| 7888 | + notify = function () { | |
| 7889 | + node.data = toggle = !toggle; | |
| 7890 | + }; | |
| 7891 | + // environments with maybe non-completely correct, but existent Promise | |
| 7892 | + } else if (Promise && Promise.resolve) { | |
| 7893 | + // Promise.resolve without an argument throws an error in LG WebOS 2 | |
| 7894 | + var promise = Promise.resolve(undefined); | |
| 7895 | + notify = function () { | |
| 7896 | + promise.then(flush); | |
| 7897 | + }; | |
| 7898 | + // for other environments - macrotask based on: | |
| 7899 | + // - setImmediate | |
| 7900 | + // - MessageChannel | |
| 7901 | + // - window.postMessag | |
| 7902 | + // - onreadystatechange | |
| 7903 | + // - setTimeout | |
| 7904 | + } else { | |
| 7905 | + notify = function () { | |
| 7906 | + // strange IE + webpack dev server bug - use .call(global) | |
| 7907 | + macrotask.call(global, flush); | |
| 7908 | + }; | |
| 7909 | + } | |
| 7910 | + | |
| 7911 | + return function (fn) { | |
| 7912 | + var task = { fn: fn, next: undefined }; | |
| 7913 | + if (last) last.next = task; | |
| 7914 | + if (!head) { | |
| 7915 | + head = task; | |
| 7916 | + notify(); | |
| 7917 | + } last = task; | |
| 7918 | + }; | |
| 7919 | +}; | |
| 7920 | + | |
| 7921 | + | |
| 7922 | +/***/ }), | |
| 7923 | +/* 260 */ | |
| 7924 | +/***/ (function(module, exports, __webpack_require__) { | |
| 7925 | + | |
| 7926 | +var global = __webpack_require__(8); | |
| 7927 | +var navigator = global.navigator; | |
| 7928 | + | |
| 7929 | +module.exports = navigator && navigator.userAgent || ''; | |
| 7930 | + | |
| 7931 | + | |
| 7932 | +/***/ }), | |
| 7933 | +/* 261 */ | |
| 7934 | +/***/ (function(module, exports, __webpack_require__) { | |
| 7935 | + | |
| 7936 | +"use strict"; | |
| 7937 | +// https://github.com/tc39/proposal-promise-finally | |
| 7938 | + | |
| 7939 | +var $export = __webpack_require__(7); | |
| 7940 | +var core = __webpack_require__(6); | |
| 7941 | +var global = __webpack_require__(8); | |
| 7942 | +var speciesConstructor = __webpack_require__(208); | |
| 7943 | +var promiseResolve = __webpack_require__(211); | |
| 7944 | + | |
| 7945 | +$export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) { | |
| 7946 | + var C = speciesConstructor(this, core.Promise || global.Promise); | |
| 7947 | + var isFunction = typeof onFinally == 'function'; | |
| 7948 | + return this.then( | |
| 7949 | + isFunction ? function (x) { | |
| 7950 | + return promiseResolve(C, onFinally()).then(function () { return x; }); | |
| 7951 | + } : onFinally, | |
| 7952 | + isFunction ? function (e) { | |
| 7953 | + return promiseResolve(C, onFinally()).then(function () { throw e; }); | |
| 7954 | + } : onFinally | |
| 7955 | + ); | |
| 7956 | +} }); | |
| 7957 | + | |
| 7958 | + | |
| 7959 | +/***/ }), | |
| 7960 | +/* 262 */ | |
| 7961 | +/***/ (function(module, exports, __webpack_require__) { | |
| 7962 | + | |
| 7963 | +"use strict"; | |
| 7964 | + | |
| 7965 | +// https://github.com/tc39/proposal-promise-try | |
| 7966 | +var $export = __webpack_require__(7); | |
| 7967 | +var newPromiseCapability = __webpack_require__(149); | |
| 7968 | +var perform = __webpack_require__(210); | |
| 7969 | + | |
| 7970 | +$export($export.S, 'Promise', { 'try': function (callbackfn) { | |
| 7971 | + var promiseCapability = newPromiseCapability.f(this); | |
| 7972 | + var result = perform(callbackfn); | |
| 7973 | + (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v); | |
| 7974 | + return promiseCapability.promise; | |
| 7975 | +} }); | |
| 7976 | + | |
| 7977 | + | |
| 7978 | +/***/ }), | |
| 7979 | +/* 263 */ | |
| 7980 | +/***/ (function(module, exports, __webpack_require__) { | |
| 7981 | + | |
| 7982 | +module.exports = __webpack_require__(264); | |
| 7983 | + | |
| 7984 | +/***/ }), | |
| 7985 | +/* 264 */ | |
| 7986 | +/***/ (function(module, exports, __webpack_require__) { | |
| 7987 | + | |
| 7988 | +__webpack_require__(92); | |
| 7989 | +__webpack_require__(59); | |
| 7990 | +__webpack_require__(265); | |
| 7991 | +__webpack_require__(267); | |
| 7992 | +__webpack_require__(268); | |
| 7993 | +module.exports = __webpack_require__(6).WeakMap; | |
| 7994 | + | |
| 7995 | + | |
| 7996 | +/***/ }), | |
| 7997 | +/* 265 */ | |
| 7998 | +/***/ (function(module, exports, __webpack_require__) { | |
| 7999 | + | |
| 8000 | +"use strict"; | |
| 8001 | + | |
| 8002 | +var global = __webpack_require__(8); | |
| 8003 | +var each = __webpack_require__(142)(0); | |
| 8004 | +var redefine = __webpack_require__(89); | |
| 8005 | +var meta = __webpack_require__(66); | |
| 8006 | +var assign = __webpack_require__(213); | |
| 8007 | +var weak = __webpack_require__(266); | |
| 8008 | +var isObject = __webpack_require__(9); | |
| 8009 | +var validate = __webpack_require__(113); | |
| 8010 | +var NATIVE_WEAK_MAP = __webpack_require__(113); | |
| 8011 | +var IS_IE11 = !global.ActiveXObject && 'ActiveXObject' in global; | |
| 8012 | +var WEAK_MAP = 'WeakMap'; | |
| 8013 | +var getWeak = meta.getWeak; | |
| 8014 | +var isExtensible = Object.isExtensible; | |
| 8015 | +var uncaughtFrozenStore = weak.ufstore; | |
| 8016 | +var InternalMap; | |
| 8017 | + | |
| 8018 | +var wrapper = function (get) { | |
| 8019 | + return function WeakMap() { | |
| 8020 | + return get(this, arguments.length > 0 ? arguments[0] : undefined); | |
| 8021 | + }; | |
| 8022 | +}; | |
| 8023 | + | |
| 8024 | +var methods = { | |
| 8025 | + // 23.3.3.3 WeakMap.prototype.get(key) | |
| 8026 | + get: function get(key) { | |
| 8027 | + if (isObject(key)) { | |
| 8028 | + var data = getWeak(key); | |
| 8029 | + if (data === true) return uncaughtFrozenStore(validate(this, WEAK_MAP)).get(key); | |
| 8030 | + return data ? data[this._i] : undefined; | |
| 8031 | + } | |
| 8032 | + }, | |
| 8033 | + // 23.3.3.5 WeakMap.prototype.set(key, value) | |
| 8034 | + set: function set(key, value) { | |
| 8035 | + return weak.def(validate(this, WEAK_MAP), key, value); | |
| 8036 | + } | |
| 8037 | +}; | |
| 8038 | + | |
| 8039 | +// 23.3 WeakMap Objects | |
| 8040 | +var $WeakMap = module.exports = __webpack_require__(223)(WEAK_MAP, wrapper, methods, weak, true, true); | |
| 8041 | + | |
| 8042 | +// IE11 WeakMap frozen keys fix | |
| 8043 | +if (NATIVE_WEAK_MAP && IS_IE11) { | |
| 8044 | + InternalMap = weak.getConstructor(wrapper, WEAK_MAP); | |
| 8045 | + assign(InternalMap.prototype, methods); | |
| 8046 | + meta.NEED = true; | |
| 8047 | + each(['delete', 'has', 'get', 'set'], function (key) { | |
| 8048 | + var proto = $WeakMap.prototype; | |
| 8049 | + var method = proto[key]; | |
| 8050 | + redefine(proto, key, function (a, b) { | |
| 8051 | + // store frozen objects on internal weakmap shim | |
| 8052 | + if (isObject(a) && !isExtensible(a)) { | |
| 8053 | + if (!this._f) this._f = new InternalMap(); | |
| 8054 | + var result = this._f[key](a, b); | |
| 8055 | + return key == 'set' ? this : result; | |
| 8056 | + // store all the rest on native weakmap | |
| 8057 | + } return method.call(this, a, b); | |
| 8058 | + }); | |
| 8059 | + }); | |
| 8060 | +} | |
| 8061 | + | |
| 8062 | + | |
| 8063 | +/***/ }), | |
| 8064 | +/* 266 */ | |
| 8065 | +/***/ (function(module, exports, __webpack_require__) { | |
| 8066 | + | |
| 8067 | +"use strict"; | |
| 8068 | + | |
| 8069 | +var redefineAll = __webpack_require__(121); | |
| 8070 | +var getWeak = __webpack_require__(66).getWeak; | |
| 8071 | +var anObject = __webpack_require__(11); | |
| 8072 | +var isObject = __webpack_require__(9); | |
| 8073 | +var anInstance = __webpack_require__(120); | |
| 8074 | +var forOf = __webpack_require__(79); | |
| 8075 | +var createArrayMethod = __webpack_require__(142); | |
| 8076 | +var $has = __webpack_require__(17); | |
| 8077 | +var validate = __webpack_require__(113); | |
| 8078 | +var arrayFind = createArrayMethod(5); | |
| 8079 | +var arrayFindIndex = createArrayMethod(6); | |
| 8080 | +var id = 0; | |
| 8081 | + | |
| 8082 | +// fallback for uncaught frozen keys | |
| 8083 | +var uncaughtFrozenStore = function (that) { | |
| 8084 | + return that._l || (that._l = new UncaughtFrozenStore()); | |
| 8085 | +}; | |
| 8086 | +var UncaughtFrozenStore = function () { | |
| 8087 | + this.a = []; | |
| 8088 | +}; | |
| 8089 | +var findUncaughtFrozen = function (store, key) { | |
| 8090 | + return arrayFind(store.a, function (it) { | |
| 8091 | + return it[0] === key; | |
| 8092 | + }); | |
| 8093 | +}; | |
| 8094 | +UncaughtFrozenStore.prototype = { | |
| 8095 | + get: function (key) { | |
| 8096 | + var entry = findUncaughtFrozen(this, key); | |
| 8097 | + if (entry) return entry[1]; | |
| 8098 | + }, | |
| 8099 | + has: function (key) { | |
| 8100 | + return !!findUncaughtFrozen(this, key); | |
| 8101 | + }, | |
| 8102 | + set: function (key, value) { | |
| 8103 | + var entry = findUncaughtFrozen(this, key); | |
| 8104 | + if (entry) entry[1] = value; | |
| 8105 | + else this.a.push([key, value]); | |
| 8106 | + }, | |
| 8107 | + 'delete': function (key) { | |
| 8108 | + var index = arrayFindIndex(this.a, function (it) { | |
| 8109 | + return it[0] === key; | |
| 8110 | + }); | |
| 8111 | + if (~index) this.a.splice(index, 1); | |
| 8112 | + return !!~index; | |
| 8113 | + } | |
| 8114 | +}; | |
| 8115 | + | |
| 8116 | +module.exports = { | |
| 8117 | + getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { | |
| 8118 | + var C = wrapper(function (that, iterable) { | |
| 8119 | + anInstance(that, C, NAME, '_i'); | |
| 8120 | + that._t = NAME; // collection type | |
| 8121 | + that._i = id++; // collection id | |
| 8122 | + that._l = undefined; // leak store for uncaught frozen objects | |
| 8123 | + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); | |
| 8124 | + }); | |
| 8125 | + redefineAll(C.prototype, { | |
| 8126 | + // 23.3.3.2 WeakMap.prototype.delete(key) | |
| 8127 | + // 23.4.3.3 WeakSet.prototype.delete(value) | |
| 8128 | + 'delete': function (key) { | |
| 8129 | + if (!isObject(key)) return false; | |
| 8130 | + var data = getWeak(key); | |
| 8131 | + if (data === true) return uncaughtFrozenStore(validate(this, NAME))['delete'](key); | |
| 8132 | + return data && $has(data, this._i) && delete data[this._i]; | |
| 8133 | + }, | |
| 8134 | + // 23.3.3.4 WeakMap.prototype.has(key) | |
| 8135 | + // 23.4.3.4 WeakSet.prototype.has(value) | |
| 8136 | + has: function has(key) { | |
| 8137 | + if (!isObject(key)) return false; | |
| 8138 | + var data = getWeak(key); | |
| 8139 | + if (data === true) return uncaughtFrozenStore(validate(this, NAME)).has(key); | |
| 8140 | + return data && $has(data, this._i); | |
| 8141 | + } | |
| 8142 | + }); | |
| 8143 | + return C; | |
| 8144 | + }, | |
| 8145 | + def: function (that, key, value) { | |
| 8146 | + var data = getWeak(anObject(key), true); | |
| 8147 | + if (data === true) uncaughtFrozenStore(that).set(key, value); | |
| 8148 | + else data[that._i] = value; | |
| 8149 | + return that; | |
| 8150 | + }, | |
| 8151 | + ufstore: uncaughtFrozenStore | |
| 8152 | +}; | |
| 8153 | + | |
| 8154 | + | |
| 8155 | +/***/ }), | |
| 8156 | +/* 267 */ | |
| 8157 | +/***/ (function(module, exports, __webpack_require__) { | |
| 8158 | + | |
| 8159 | +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.of | |
| 8160 | +__webpack_require__(224)('WeakMap'); | |
| 8161 | + | |
| 8162 | + | |
| 8163 | +/***/ }), | |
| 8164 | +/* 268 */ | |
| 8165 | +/***/ (function(module, exports, __webpack_require__) { | |
| 8166 | + | |
| 8167 | +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.from | |
| 8168 | +__webpack_require__(225)('WeakMap'); | |
| 8169 | + | |
| 8170 | + | |
| 8171 | +/***/ }), | |
| 8172 | +/* 269 */ | |
| 8173 | +/***/ (function(module, exports, __webpack_require__) { | |
| 8174 | + | |
| 8175 | +__webpack_require__(270); | |
| 8176 | +module.exports = __webpack_require__(6).Object.entries; | |
| 8177 | + | |
| 8178 | + | |
| 8179 | +/***/ }), | |
| 8180 | +/* 270 */ | |
| 8181 | +/***/ (function(module, exports, __webpack_require__) { | |
| 8182 | + | |
| 8183 | +// https://github.com/tc39/proposal-object-values-entries | |
| 8184 | +var $export = __webpack_require__(7); | |
| 8185 | +var $entries = __webpack_require__(181)(true); | |
| 8186 | + | |
| 8187 | +$export($export.S, 'Object', { | |
| 8188 | + entries: function entries(it) { | |
| 8189 | + return $entries(it); | |
| 8190 | + } | |
| 8191 | +}); | |
| 8192 | + | |
| 8193 | + | |
| 8194 | +/***/ }), | |
| 8195 | +/* 271 */ | |
| 8196 | +/***/ (function(module, exports, __webpack_require__) { | |
| 8197 | + | |
| 8198 | +"use strict"; | |
| 8199 | + | |
| 8200 | +var $at = __webpack_require__(146)(true); | |
| 8201 | + | |
| 8202 | +// 21.1.3.27 String.prototype[@@iterator]() | |
| 8203 | +__webpack_require__(198)(String, 'String', function (iterated) { | |
| 8204 | + this._t = String(iterated); // target | |
| 8205 | + this._i = 0; // next index | |
| 8206 | +// 21.1.5.2.1 %StringIteratorPrototype%.next() | |
| 8207 | +}, function () { | |
| 8208 | + var O = this._t; | |
| 8209 | + var index = this._i; | |
| 8210 | + var point; | |
| 8211 | + if (index >= O.length) return { value: undefined, done: true }; | |
| 8212 | + point = $at(O, index); | |
| 8213 | + this._i += point.length; | |
| 8214 | + return { value: point, done: false }; | |
| 8215 | +}); | |
| 8216 | + | |
| 8217 | + | |
| 8218 | +/***/ }), | |
| 8219 | +/* 272 */ | |
| 8220 | +/***/ (function(module, exports, __webpack_require__) { | |
| 8221 | + | |
| 8222 | +"use strict"; | |
| 8223 | + | |
| 8224 | + | |
| 8225 | +var _Object$defineProperty = __webpack_require__(1); | |
| 8226 | + | |
| 8227 | +_Object$defineProperty(exports, "__esModule", { | |
| 654 | 8228 | value: true |
| 655 | -})); | |
| 656 | -exports["default"] = void 0; | |
| 657 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 658 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 659 | -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 660 | -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 661 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 662 | -var _commandInfra = _interopRequireDefault(__webpack_require__(/*! ./command-infra */ "../modules/web-cli/assets/js/modules/command-infra.js")); | |
| 663 | -var _deprecation = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/deprecation */ "../modules/web-cli/assets/js/utils/deprecation.js")); | |
| 664 | -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)); } | |
| 665 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 666 | -/** | |
| 667 | - * @name $e.modules.CommandBase | |
| 668 | - */ | |
| 669 | -var CommandBase = exports["default"] = /*#__PURE__*/function (_CommandInfra) { | |
| 670 | - function CommandBase() { | |
| 671 | - (0, _classCallCheck2.default)(this, CommandBase); | |
| 672 | - return _callSuper(this, CommandBase, arguments); | |
| 8229 | +}); | |
| 8230 | + | |
| 8231 | +exports.default = void 0; | |
| 8232 | +var userAgent = navigator.userAgent; | |
| 8233 | +var _default = { | |
| 8234 | + webkit: -1 !== userAgent.indexOf('AppleWebKit'), | |
| 8235 | + firefox: -1 !== userAgent.indexOf('Firefox'), | |
| 8236 | + ie: /Trident|MSIE/.test(userAgent), | |
| 8237 | + edge: -1 !== userAgent.indexOf('Edge'), | |
| 8238 | + mac: -1 !== userAgent.indexOf('Macintosh'), | |
| 8239 | + safari: /^((?!chrome|android).)*safari/i.test(userAgent) | |
| 8240 | +}; | |
| 8241 | +exports.default = _default; | |
| 8242 | + | |
| 8243 | +/***/ }), | |
| 8244 | +/* 273 */ | |
| 8245 | +/***/ (function(module, exports, __webpack_require__) { | |
| 8246 | + | |
| 8247 | +module.exports = __webpack_require__(274); | |
| 8248 | + | |
| 8249 | +/***/ }), | |
| 8250 | +/* 274 */ | |
| 8251 | +/***/ (function(module, exports, __webpack_require__) { | |
| 8252 | + | |
| 8253 | +__webpack_require__(275); | |
| 8254 | +var $Object = __webpack_require__(6).Object; | |
| 8255 | +module.exports = function defineProperties(T, D) { | |
| 8256 | + return $Object.defineProperties(T, D); | |
| 8257 | +}; | |
| 8258 | + | |
| 8259 | + | |
| 8260 | +/***/ }), | |
| 8261 | +/* 275 */ | |
| 8262 | +/***/ (function(module, exports, __webpack_require__) { | |
| 8263 | + | |
| 8264 | +var $export = __webpack_require__(7); | |
| 8265 | +// 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties) | |
| 8266 | +$export($export.S + $export.F * !__webpack_require__(14), 'Object', { defineProperties: __webpack_require__(131) }); | |
| 8267 | + | |
| 8268 | + | |
| 8269 | +/***/ }), | |
| 8270 | +/* 276 */ | |
| 8271 | +/***/ (function(module, exports, __webpack_require__) { | |
| 8272 | + | |
| 8273 | +"use strict"; | |
| 8274 | + | |
| 8275 | + | |
| 8276 | +var _interopRequireDefault = __webpack_require__(0); | |
| 8277 | + | |
| 8278 | +var _base = _interopRequireDefault(__webpack_require__(303)); | |
| 8279 | + | |
| 8280 | +var ContextMenu = __webpack_require__(385); | |
| 8281 | + | |
| 8282 | +module.exports = Marionette.Behavior.extend({ | |
| 8283 | + defaults: { | |
| 8284 | + groups: [], | |
| 8285 | + eventTargets: ['el'] | |
| 8286 | + }, | |
| 8287 | + events: function events() { | |
| 8288 | + var events = {}; | |
| 8289 | + this.getOption('eventTargets').forEach(function (eventTarget) { | |
| 8290 | + var eventName = 'contextmenu'; | |
| 8291 | + | |
| 8292 | + if ('el' !== eventTarget) { | |
| 8293 | + eventName += ' ' + eventTarget; | |
| 8294 | + } | |
| 8295 | + | |
| 8296 | + events[eventName] = 'onContextMenu'; | |
| 8297 | + }); | |
| 8298 | + return events; | |
| 8299 | + }, | |
| 8300 | + initialize: function initialize() { | |
| 8301 | + this.listenTo(this.view.options.model, 'request:contextmenu', this.onRequestContextMenu); | |
| 8302 | + }, | |
| 8303 | + initContextMenu: function initContextMenu() { | |
| 8304 | + var _this = this; | |
| 8305 | + | |
| 8306 | + var contextMenuGroups = this.getOption('groups'), | |
| 8307 | + deleteGroup = _.findWhere(contextMenuGroups, { | |
| 8308 | + name: 'delete' | |
| 8309 | + }), | |
| 8310 | + afterGroupIndex = contextMenuGroups.indexOf(deleteGroup); | |
| 8311 | + | |
| 8312 | + if (-1 === afterGroupIndex) { | |
| 8313 | + afterGroupIndex = contextMenuGroups.length; | |
| 8314 | + } | |
| 8315 | + | |
| 8316 | + contextMenuGroups.splice(afterGroupIndex, 0, { | |
| 8317 | + name: 'tools', | |
| 8318 | + actions: [{ | |
| 8319 | + name: 'navigator', | |
| 8320 | + title: elementor.translate('navigator'), | |
| 8321 | + callback: function callback() { | |
| 8322 | + return $e.route('navigator', { | |
| 8323 | + reOpen: true, | |
| 8324 | + model: _this.view.model | |
| 8325 | + }); | |
| 8326 | + } | |
| 8327 | + }] | |
| 8328 | + }); | |
| 8329 | + this.contextMenu = new ContextMenu({ | |
| 8330 | + groups: contextMenuGroups | |
| 8331 | + }); | |
| 8332 | + this.contextMenu.getModal().on('hide', this.onContextMenuHide); | |
| 8333 | + }, | |
| 8334 | + getContextMenu: function getContextMenu() { | |
| 8335 | + if (!this.contextMenu) { | |
| 8336 | + this.initContextMenu(); | |
| 8337 | + } | |
| 8338 | + | |
| 8339 | + return this.contextMenu; | |
| 8340 | + }, | |
| 8341 | + onContextMenu: function onContextMenu(event) { | |
| 8342 | + if ($e.shortcuts.isControlEvent(event)) { | |
| 8343 | + return; | |
| 8344 | + } | |
| 8345 | + | |
| 8346 | + var isAddSectionView = this.view instanceof _base.default; | |
| 8347 | + | |
| 8348 | + if (!isAddSectionView && (!this.view.container || !this.view.container.isDesignable())) { | |
| 8349 | + return; | |
| 8350 | + } | |
| 8351 | + | |
| 8352 | + event.preventDefault(); | |
| 8353 | + event.stopPropagation(); | |
| 8354 | + this.getContextMenu().show(event); | |
| 8355 | + elementor.channels.editor.reply('contextMenu:targetView', this.view); | |
| 8356 | + }, | |
| 8357 | + onRequestContextMenu: function onRequestContextMenu(event) { | |
| 8358 | + var modal = this.getContextMenu().getModal(), | |
| 8359 | + iframe = modal.getSettings('iframe'), | |
| 8360 | + toolsGroup = _.findWhere(this.contextMenu.getSettings('groups'), { | |
| 8361 | + name: 'tools' | |
| 8362 | + }); | |
| 8363 | + | |
| 8364 | + toolsGroup.isVisible = false; | |
| 8365 | + modal.setSettings('iframe', null); | |
| 8366 | + this.onContextMenu(event); | |
| 8367 | + toolsGroup.isVisible = true; | |
| 8368 | + modal.setSettings('iframe', iframe); | |
| 8369 | + }, | |
| 8370 | + onContextMenuHide: function onContextMenuHide() { | |
| 8371 | + elementor.channels.editor.reply('contextMenu:targetView', null); | |
| 8372 | + }, | |
| 8373 | + onDestroy: function onDestroy() { | |
| 8374 | + if (this.contextMenu) { | |
| 8375 | + this.contextMenu.destroy(); | |
| 8376 | + } | |
| 673 | 8377 | } |
| 674 | - (0, _inherits2.default)(CommandBase, _CommandInfra); | |
| 675 | - return (0, _createClass2.default)(CommandBase, [{ | |
| 676 | - key: "onBeforeRun", | |
| 677 | - value: function onBeforeRun() { | |
| 678 | - var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 679 | - $e.hooks.runUIBefore(this.command, args); | |
| 8378 | +}); | |
| 8379 | + | |
| 8380 | +/***/ }), | |
| 8381 | +/* 277 */, | |
| 8382 | +/* 278 */, | |
| 8383 | +/* 279 */, | |
| 8384 | +/* 280 */, | |
| 8385 | +/* 281 */ | |
| 8386 | +/***/ (function(module, exports, __webpack_require__) { | |
| 8387 | + | |
| 8388 | +"use strict"; | |
| 8389 | + | |
| 8390 | + | |
| 8391 | +var _interopRequireDefault = __webpack_require__(0); | |
| 8392 | + | |
| 8393 | +var _Object$defineProperty = __webpack_require__(1); | |
| 8394 | + | |
| 8395 | +_Object$defineProperty(exports, "__esModule", { | |
| 8396 | + value: true | |
| 8397 | +}); | |
| 8398 | + | |
| 8399 | +exports.default = exports.After = void 0; | |
| 8400 | + | |
| 8401 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 8402 | + | |
| 8403 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 8404 | + | |
| 8405 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 8406 | + | |
| 8407 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 8408 | + | |
| 8409 | +var _base = _interopRequireDefault(__webpack_require__(327)); | |
| 8410 | + | |
| 8411 | +var After = /*#__PURE__*/function (_Base) { | |
| 8412 | + (0, _inherits2.default)(After, _Base); | |
| 8413 | + | |
| 8414 | + var _super = (0, _createSuper2.default)(After); | |
| 8415 | + | |
| 8416 | + function After() { | |
| 8417 | + (0, _classCallCheck2.default)(this, After); | |
| 8418 | + return _super.apply(this, arguments); | |
| 8419 | + } | |
| 8420 | + | |
| 8421 | + (0, _createClass2.default)(After, [{ | |
| 8422 | + key: "register", | |
| 8423 | + value: function register() { | |
| 8424 | + $e.hooks.registerUIAfter(this); | |
| 680 | 8425 | } |
| 8426 | + }]); | |
| 8427 | + return After; | |
| 8428 | +}(_base.default); | |
| 8429 | + | |
| 8430 | +exports.After = After; | |
| 8431 | +var _default = After; | |
| 8432 | +exports.default = _default; | |
| 8433 | + | |
| 8434 | +/***/ }), | |
| 8435 | +/* 282 */, | |
| 8436 | +/* 283 */ | |
| 8437 | +/***/ (function(module, exports, __webpack_require__) { | |
| 8438 | + | |
| 8439 | +// 21.2.5.3 get RegExp.prototype.flags() | |
| 8440 | +if (__webpack_require__(28) && /./g.flags != 'g') __webpack_require__(51).f(RegExp.prototype, 'flags', { | |
| 8441 | + configurable: true, | |
| 8442 | + get: __webpack_require__(109) | |
| 8443 | +}); | |
| 8444 | + | |
| 8445 | + | |
| 8446 | +/***/ }), | |
| 8447 | +/* 284 */, | |
| 8448 | +/* 285 */ | |
| 8449 | +/***/ (function(module, exports, __webpack_require__) { | |
| 8450 | + | |
| 8451 | +__webpack_require__(286); | |
| 8452 | +module.exports = __webpack_require__(6).parseInt; | |
| 8453 | + | |
| 8454 | + | |
| 8455 | +/***/ }), | |
| 8456 | +/* 286 */ | |
| 8457 | +/***/ (function(module, exports, __webpack_require__) { | |
| 8458 | + | |
| 8459 | +var $export = __webpack_require__(7); | |
| 8460 | +var $parseInt = __webpack_require__(287); | |
| 8461 | +// 18.2.5 parseInt(string, radix) | |
| 8462 | +$export($export.G + $export.F * (parseInt != $parseInt), { parseInt: $parseInt }); | |
| 8463 | + | |
| 8464 | + | |
| 8465 | +/***/ }), | |
| 8466 | +/* 287 */ | |
| 8467 | +/***/ (function(module, exports, __webpack_require__) { | |
| 8468 | + | |
| 8469 | +var $parseInt = __webpack_require__(8).parseInt; | |
| 8470 | +var $trim = __webpack_require__(288).trim; | |
| 8471 | +var ws = __webpack_require__(237); | |
| 8472 | +var hex = /^[-+]?0[xX]/; | |
| 8473 | + | |
| 8474 | +module.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? function parseInt(str, radix) { | |
| 8475 | + var string = $trim(String(str), 3); | |
| 8476 | + return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10)); | |
| 8477 | +} : $parseInt; | |
| 8478 | + | |
| 8479 | + | |
| 8480 | +/***/ }), | |
| 8481 | +/* 288 */ | |
| 8482 | +/***/ (function(module, exports, __webpack_require__) { | |
| 8483 | + | |
| 8484 | +var $export = __webpack_require__(7); | |
| 8485 | +var defined = __webpack_require__(65); | |
| 8486 | +var fails = __webpack_require__(21); | |
| 8487 | +var spaces = __webpack_require__(237); | |
| 8488 | +var space = '[' + spaces + ']'; | |
| 8489 | +var non = '\u200b\u0085'; | |
| 8490 | +var ltrim = RegExp('^' + space + space + '*'); | |
| 8491 | +var rtrim = RegExp(space + space + '*$'); | |
| 8492 | + | |
| 8493 | +var exporter = function (KEY, exec, ALIAS) { | |
| 8494 | + var exp = {}; | |
| 8495 | + var FORCE = fails(function () { | |
| 8496 | + return !!spaces[KEY]() || non[KEY]() != non; | |
| 8497 | + }); | |
| 8498 | + var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY]; | |
| 8499 | + if (ALIAS) exp[ALIAS] = fn; | |
| 8500 | + $export($export.P + $export.F * FORCE, 'String', exp); | |
| 8501 | +}; | |
| 8502 | + | |
| 8503 | +// 1 -> String#trimLeft | |
| 8504 | +// 2 -> String#trimRight | |
| 8505 | +// 3 -> String#trim | |
| 8506 | +var trim = exporter.trim = function (string, TYPE) { | |
| 8507 | + string = String(defined(string)); | |
| 8508 | + if (TYPE & 1) string = string.replace(ltrim, ''); | |
| 8509 | + if (TYPE & 2) string = string.replace(rtrim, ''); | |
| 8510 | + return string; | |
| 8511 | +}; | |
| 8512 | + | |
| 8513 | +module.exports = exporter; | |
| 8514 | + | |
| 8515 | + | |
| 8516 | +/***/ }), | |
| 8517 | +/* 289 */ | |
| 8518 | +/***/ (function(module, exports, __webpack_require__) { | |
| 8519 | + | |
| 8520 | +"use strict"; | |
| 8521 | + | |
| 8522 | + | |
| 8523 | +var _interopRequireDefault = __webpack_require__(0); | |
| 8524 | + | |
| 8525 | +var _Object$defineProperty = __webpack_require__(1); | |
| 8526 | + | |
| 8527 | +_Object$defineProperty(exports, "__esModule", { | |
| 8528 | + value: true | |
| 8529 | +}); | |
| 8530 | + | |
| 8531 | +exports.default = exports.Base = void 0; | |
| 8532 | + | |
| 8533 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 8534 | + | |
| 8535 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 8536 | + | |
| 8537 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 8538 | + | |
| 8539 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 8540 | + | |
| 8541 | +var _hookBase = _interopRequireDefault(__webpack_require__(301)); | |
| 8542 | + | |
| 8543 | +var Base = /*#__PURE__*/function (_HookBase) { | |
| 8544 | + (0, _inherits2.default)(Base, _HookBase); | |
| 8545 | + | |
| 8546 | + var _super = (0, _createSuper2.default)(Base); | |
| 8547 | + | |
| 8548 | + function Base() { | |
| 8549 | + (0, _classCallCheck2.default)(this, Base); | |
| 8550 | + return _super.apply(this, arguments); | |
| 8551 | + } | |
| 8552 | + | |
| 8553 | + (0, _createClass2.default)(Base, [{ | |
| 8554 | + key: "getType", | |
| 8555 | + value: function getType() { | |
| 8556 | + return 'data'; | |
| 8557 | + } | |
| 8558 | + }]); | |
| 8559 | + return Base; | |
| 8560 | +}(_hookBase.default); | |
| 8561 | + | |
| 8562 | +exports.Base = Base; | |
| 8563 | +var _default = Base; | |
| 8564 | +exports.default = _default; | |
| 8565 | + | |
| 8566 | +/***/ }), | |
| 8567 | +/* 290 */, | |
| 8568 | +/* 291 */ | |
| 8569 | +/***/ (function(module, exports, __webpack_require__) { | |
| 8570 | + | |
| 8571 | +__webpack_require__(292); | |
| 8572 | +module.exports = __webpack_require__(6).Object.assign; | |
| 8573 | + | |
| 8574 | + | |
| 8575 | +/***/ }), | |
| 8576 | +/* 292 */ | |
| 8577 | +/***/ (function(module, exports, __webpack_require__) { | |
| 8578 | + | |
| 8579 | +// 19.1.3.1 Object.assign(target, source) | |
| 8580 | +var $export = __webpack_require__(7); | |
| 8581 | + | |
| 8582 | +$export($export.S + $export.F, 'Object', { assign: __webpack_require__(213) }); | |
| 8583 | + | |
| 8584 | + | |
| 8585 | +/***/ }), | |
| 8586 | +/* 293 */ | |
| 8587 | +/***/ (function(module, exports, __webpack_require__) { | |
| 8588 | + | |
| 8589 | +module.exports = __webpack_require__(294); | |
| 8590 | + | |
| 8591 | +/***/ }), | |
| 8592 | +/* 294 */ | |
| 8593 | +/***/ (function(module, exports, __webpack_require__) { | |
| 8594 | + | |
| 8595 | +__webpack_require__(295); | |
| 8596 | +module.exports = __webpack_require__(6).Object.getOwnPropertyDescriptors; | |
| 8597 | + | |
| 8598 | + | |
| 8599 | +/***/ }), | |
| 8600 | +/* 295 */ | |
| 8601 | +/***/ (function(module, exports, __webpack_require__) { | |
| 8602 | + | |
| 8603 | +// https://github.com/tc39/proposal-object-getownpropertydescriptors | |
| 8604 | +var $export = __webpack_require__(7); | |
| 8605 | +var ownKeys = __webpack_require__(296); | |
| 8606 | +var toIObject = __webpack_require__(19); | |
| 8607 | +var gOPD = __webpack_require__(48); | |
| 8608 | +var createProperty = __webpack_require__(193); | |
| 8609 | + | |
| 8610 | +$export($export.S, 'Object', { | |
| 8611 | + getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) { | |
| 8612 | + var O = toIObject(object); | |
| 8613 | + var getDesc = gOPD.f; | |
| 8614 | + var keys = ownKeys(O); | |
| 8615 | + var result = {}; | |
| 8616 | + var i = 0; | |
| 8617 | + var key, desc; | |
| 8618 | + while (keys.length > i) { | |
| 8619 | + desc = getDesc(O, key = keys[i++]); | |
| 8620 | + if (desc !== undefined) createProperty(result, key, desc); | |
| 8621 | + } | |
| 8622 | + return result; | |
| 8623 | + } | |
| 8624 | +}); | |
| 8625 | + | |
| 8626 | + | |
| 8627 | +/***/ }), | |
| 8628 | +/* 296 */ | |
| 8629 | +/***/ (function(module, exports, __webpack_require__) { | |
| 8630 | + | |
| 8631 | +// all object keys, includes non-enumerable and symbols | |
| 8632 | +var gOPN = __webpack_require__(91); | |
| 8633 | +var gOPS = __webpack_require__(67); | |
| 8634 | +var anObject = __webpack_require__(11); | |
| 8635 | +var Reflect = __webpack_require__(8).Reflect; | |
| 8636 | +module.exports = Reflect && Reflect.ownKeys || function ownKeys(it) { | |
| 8637 | + var keys = gOPN.f(anObject(it)); | |
| 8638 | + var getSymbols = gOPS.f; | |
| 8639 | + return getSymbols ? keys.concat(getSymbols(it)) : keys; | |
| 8640 | +}; | |
| 8641 | + | |
| 8642 | + | |
| 8643 | +/***/ }), | |
| 8644 | +/* 297 */ | |
| 8645 | +/***/ (function(module, exports, __webpack_require__) { | |
| 8646 | + | |
| 8647 | +module.exports = __webpack_require__(298); | |
| 8648 | + | |
| 8649 | +/***/ }), | |
| 8650 | +/* 298 */ | |
| 8651 | +/***/ (function(module, exports, __webpack_require__) { | |
| 8652 | + | |
| 8653 | +__webpack_require__(136); | |
| 8654 | +module.exports = __webpack_require__(6).Object.getOwnPropertySymbols; | |
| 8655 | + | |
| 8656 | + | |
| 8657 | +/***/ }), | |
| 8658 | +/* 299 */ | |
| 8659 | +/***/ (function(module, exports, __webpack_require__) { | |
| 8660 | + | |
| 8661 | +"use strict"; | |
| 8662 | + | |
| 8663 | + | |
| 8664 | +var _interopRequireDefault = __webpack_require__(0); | |
| 8665 | + | |
| 8666 | +var _keys = _interopRequireDefault(__webpack_require__(25)); | |
| 8667 | + | |
| 8668 | +__webpack_require__(302); | |
| 8669 | + | |
| 8670 | +__webpack_require__(124); | |
| 8671 | + | |
| 8672 | +__webpack_require__(61); | |
| 8673 | + | |
| 8674 | +__webpack_require__(40); | |
| 8675 | + | |
| 8676 | +__webpack_require__(24); | |
| 8677 | + | |
| 8678 | +var Stylesheet = __webpack_require__(345), | |
| 8679 | + ControlsCSSParser; | |
| 8680 | + | |
| 8681 | +ControlsCSSParser = elementorModules.ViewModule.extend({ | |
| 8682 | + stylesheet: null, | |
| 8683 | + getDefaultSettings: function getDefaultSettings() { | |
| 8684 | + return { | |
| 8685 | + id: 0, | |
| 8686 | + context: null, | |
| 8687 | + settingsModel: null, | |
| 8688 | + dynamicParsing: {} | |
| 8689 | + }; | |
| 8690 | + }, | |
| 8691 | + getDefaultElements: function getDefaultElements() { | |
| 8692 | + var id = "elementor-style-".concat(this.getSettings('id')); | |
| 8693 | + var $stylesheet = elementor.$previewContents.find("#".concat(id)); | |
| 8694 | + | |
| 8695 | + if (!$stylesheet.length) { | |
| 8696 | + $stylesheet = jQuery('<style>', { | |
| 8697 | + id: id | |
| 8698 | + }); | |
| 8699 | + } | |
| 8700 | + | |
| 8701 | + return { | |
| 8702 | + $stylesheetElement: $stylesheet | |
| 8703 | + }; | |
| 8704 | + }, | |
| 8705 | + initStylesheet: function initStylesheet() { | |
| 8706 | + var breakpoints = elementorFrontend.config.breakpoints; | |
| 8707 | + this.stylesheet = new Stylesheet(); | |
| 8708 | + this.stylesheet.addDevice('mobile', 0).addDevice('tablet', breakpoints.md).addDevice('desktop', breakpoints.lg); | |
| 8709 | + }, | |
| 8710 | + addStyleRules: function addStyleRules(styleControls, values, controls, placeholders, replacements) { | |
| 8711 | + var _this = this; | |
| 8712 | + | |
| 8713 | + // If the current element contains dynamic values, parse these values | |
| 8714 | + var dynamicParsedValues = this.getSettings('settingsModel').parseDynamicSettings(values, this.getSettings('dynamicParsing'), styleControls); | |
| 8715 | + | |
| 8716 | + _.each(styleControls, function (control) { | |
| 8717 | + var _control$dynamic, _values$__dynamic__; | |
| 8718 | + | |
| 8719 | + if (control.styleFields && control.styleFields.length) { | |
| 8720 | + _this.addRepeaterControlsStyleRules(values[control.name], control.styleFields, control.fields, placeholders, replacements); | |
| 8721 | + } // If a dynamic tag includes controls with CSS implementations, Take their CSS and apply it. | |
| 8722 | + | |
| 8723 | + | |
| 8724 | + if (((_control$dynamic = control.dynamic) === null || _control$dynamic === void 0 ? void 0 : _control$dynamic.active) && ((_values$__dynamic__ = values.__dynamic__) === null || _values$__dynamic__ === void 0 ? void 0 : _values$__dynamic__[control.name])) { | |
| 8725 | + _this.addDynamicControlStyleRules(values.__dynamic__[control.name], control); | |
| 8726 | + } | |
| 8727 | + | |
| 8728 | + if (!control.selectors) { | |
| 8729 | + return; | |
| 8730 | + } | |
| 8731 | + | |
| 8732 | + var context = _this.getSettings('context'); | |
| 8733 | + | |
| 8734 | + var globalKeys; | |
| 8735 | + | |
| 8736 | + if (context) { | |
| 8737 | + globalKeys = context.model.get('settings').get('__globals__'); | |
| 8738 | + } | |
| 8739 | + | |
| 8740 | + _this.addControlStyleRules(control, dynamicParsedValues, controls, placeholders, replacements, globalKeys); | |
| 8741 | + }); | |
| 8742 | + }, | |
| 8743 | + addControlStyleRules: function addControlStyleRules(control, values, controls, placeholders, replacements, globalKeys) { | |
| 8744 | + var _this2 = this; | |
| 8745 | + | |
| 8746 | + var globalKey; | |
| 8747 | + | |
| 8748 | + if (globalKeys) { | |
| 8749 | + var controlGlobalKey = control.name; | |
| 8750 | + | |
| 8751 | + if (control.groupType) { | |
| 8752 | + controlGlobalKey = control.groupPrefix + control.groupType; | |
| 8753 | + } | |
| 8754 | + | |
| 8755 | + globalKey = globalKeys[controlGlobalKey]; | |
| 8756 | + } | |
| 8757 | + | |
| 8758 | + var value; | |
| 8759 | + | |
| 8760 | + if (!globalKey) { | |
| 8761 | + value = this.getStyleControlValue(control, values); | |
| 8762 | + | |
| 8763 | + if (undefined === value) { | |
| 8764 | + return; | |
| 8765 | + } | |
| 8766 | + } | |
| 8767 | + | |
| 8768 | + _.each(control.selectors, function (cssProperty, selector) { | |
| 8769 | + var outputCssProperty; | |
| 8770 | + | |
| 8771 | + if (globalKey) { | |
| 8772 | + var selectorGlobalValue = _this2.getSelectorGlobalValue(control, globalKey); | |
| 8773 | + | |
| 8774 | + if (selectorGlobalValue) { | |
| 8775 | + if ('font' === control.type) { | |
| 8776 | + $e.data.get(globalKey).then(function (response) { | |
| 8777 | + elementor.helpers.enqueueFont(response.data.value.typography_font_family); | |
| 8778 | + }); | |
| 8779 | + } // This regex handles a case where a control's selector property value includes more than one CSS selector. | |
| 8780 | + // Example: 'selector' => 'background: {{VALUE}}; background-color: {{VALUE}};'. | |
| 8781 | + | |
| 8782 | + | |
| 8783 | + outputCssProperty = cssProperty.replace(/(:)[^;]+(;?)/g, '$1' + selectorGlobalValue + '$2'); | |
| 8784 | + } | |
| 8785 | + } else { | |
| 8786 | + try { | |
| 8787 | + outputCssProperty = cssProperty.replace(/{{(?:([^.}]+)\.)?([^}| ]*)(?: *\|\| *(?:([^.}]+)\.)?([^}| ]*) *)*}}/g, function (originalPhrase, controlName, placeholder, fallbackControlName, fallbackValue) { | |
| 8788 | + var externalControlMissing = controlName && !controls[controlName]; | |
| 8789 | + var parsedValue = ''; | |
| 8790 | + | |
| 8791 | + if (!externalControlMissing) { | |
| 8792 | + parsedValue = _this2.parsePropertyPlaceholder(control, value, controls, values, placeholder, controlName); | |
| 8793 | + } | |
| 8794 | + | |
| 8795 | + if (!parsedValue && 0 !== parsedValue) { | |
| 8796 | + if (fallbackValue) { | |
| 8797 | + parsedValue = fallbackValue; | |
| 8798 | + var stringValueMatches = parsedValue.match(/^(['"])(.*)\1$/); | |
| 8799 | + | |
| 8800 | + if (stringValueMatches) { | |
| 8801 | + parsedValue = stringValueMatches[2]; | |
| 8802 | + } else if (!isFinite(parsedValue)) { | |
| 8803 | + if (fallbackControlName && !controls[fallbackControlName]) { | |
| 8804 | + return ''; | |
| 8805 | + } | |
| 8806 | + | |
| 8807 | + parsedValue = _this2.parsePropertyPlaceholder(control, value, controls, values, fallbackValue, fallbackControlName); | |
| 8808 | + } | |
| 8809 | + } | |
| 8810 | + | |
| 8811 | + if (!parsedValue && 0 !== parsedValue) { | |
| 8812 | + if (externalControlMissing) { | |
| 8813 | + return ''; | |
| 8814 | + } | |
| 8815 | + | |
| 8816 | + throw ''; | |
| 8817 | + } | |
| 8818 | + } | |
| 8819 | + | |
| 8820 | + if ('font' === control.type) { | |
| 8821 | + elementor.helpers.enqueueFont(parsedValue); | |
| 8822 | + } | |
| 8823 | + | |
| 8824 | + return parsedValue; | |
| 8825 | + }); | |
| 8826 | + } catch (e) { | |
| 8827 | + return; | |
| 8828 | + } | |
| 8829 | + } | |
| 8830 | + | |
| 8831 | + if (_.isEmpty(outputCssProperty)) { | |
| 8832 | + return; | |
| 8833 | + } | |
| 8834 | + | |
| 8835 | + var devicePattern = /^(?:\([^)]+\)){1,2}/, | |
| 8836 | + deviceRules = selector.match(devicePattern), | |
| 8837 | + query = {}; | |
| 8838 | + | |
| 8839 | + if (deviceRules) { | |
| 8840 | + deviceRules = deviceRules[0]; | |
| 8841 | + selector = selector.replace(devicePattern, ''); | |
| 8842 | + var pureDevicePattern = /\(([^)]+)\)/g, | |
| 8843 | + pureDeviceRules = [], | |
| 8844 | + matches; | |
| 8845 | + matches = pureDevicePattern.exec(deviceRules); | |
| 8846 | + | |
| 8847 | + while (matches) { | |
| 8848 | + pureDeviceRules.push(matches[1]); | |
| 8849 | + matches = pureDevicePattern.exec(deviceRules); | |
| 8850 | + } | |
| 8851 | + | |
| 8852 | + _.each(pureDeviceRules, function (deviceRule) { | |
| 8853 | + if ('desktop' === deviceRule) { | |
| 8854 | + return; | |
| 8855 | + } | |
| 8856 | + | |
| 8857 | + var device = deviceRule.replace(/\+$/, ''), | |
| 8858 | + endPoint = device === deviceRule ? 'max' : 'min'; | |
| 8859 | + query[endPoint] = device; | |
| 8860 | + }); | |
| 8861 | + } | |
| 8862 | + | |
| 8863 | + _.each(placeholders, function (placeholder, index) { | |
| 8864 | + // Check if it's a RegExp | |
| 8865 | + var regexp = placeholder.source ? placeholder.source : placeholder, | |
| 8866 | + placeholderPattern = new RegExp(regexp, 'g'); | |
| 8867 | + selector = selector.replace(placeholderPattern, replacements[index]); | |
| 8868 | + }); | |
| 8869 | + | |
| 8870 | + if (!(0, _keys.default)(query).length && control.responsive) { | |
| 8871 | + query = _.pick(elementorCommon.helpers.cloneObject(control.responsive), ['min', 'max']); | |
| 8872 | + | |
| 8873 | + if ('desktop' === query.max) { | |
| 8874 | + delete query.max; | |
| 8875 | + } | |
| 8876 | + } | |
| 8877 | + | |
| 8878 | + _this2.stylesheet.addRules(selector, outputCssProperty, query); | |
| 8879 | + }); | |
| 8880 | + }, | |
| 8881 | + parsePropertyPlaceholder: function parsePropertyPlaceholder(control, value, controls, values, placeholder, parserControlName) { | |
| 8882 | + if (parserControlName) { | |
| 8883 | + control = _.findWhere(controls, { | |
| 8884 | + name: parserControlName | |
| 8885 | + }); | |
| 8886 | + value = this.getStyleControlValue(control, values); | |
| 8887 | + } | |
| 8888 | + | |
| 8889 | + return elementor.getControlView(control.type).getStyleValue(placeholder, value, control); | |
| 8890 | + }, | |
| 8891 | + getStyleControlValue: function getStyleControlValue(control, values) { | |
| 8892 | + var _values$__globals__; | |
| 8893 | + | |
| 8894 | + if ((_values$__globals__ = values.__globals__) === null || _values$__globals__ === void 0 ? void 0 : _values$__globals__[control.name]) { | |
| 8895 | + // When the control itself has no global value, but it refers to another control global value | |
| 8896 | + return this.getSelectorGlobalValue(control, values.__globals__[control.name]); | |
| 8897 | + } | |
| 8898 | + | |
| 8899 | + var value = values[control.name]; | |
| 8900 | + | |
| 8901 | + if (control.selectors_dictionary) { | |
| 8902 | + value = control.selectors_dictionary[value] || value; | |
| 8903 | + } | |
| 8904 | + | |
| 8905 | + if (!_.isNumber(value) && _.isEmpty(value)) { | |
| 8906 | + return; | |
| 8907 | + } | |
| 8908 | + | |
| 8909 | + return value; | |
| 8910 | + }, | |
| 8911 | + getSelectorGlobalValue: function getSelectorGlobalValue(control, globalKey) { | |
| 8912 | + var globalArgs = $e.data.commandExtractArgs(globalKey), | |
| 8913 | + data = $e.data.getCache($e.components.get('globals'), globalArgs.command, globalArgs.args.query); | |
| 8914 | + | |
| 8915 | + if (!(data === null || data === void 0 ? void 0 : data.value)) { | |
| 8916 | + return; | |
| 8917 | + } | |
| 8918 | + | |
| 8919 | + var id = data.id; | |
| 8920 | + var value; // it's a global settings with additional controls in group. | |
| 8921 | + | |
| 8922 | + if (control.groupType) { | |
| 8923 | + var propertyName = control.name.replace(control.groupPrefix, '').replace(/(_tablet|_mobile)$/, ''); | |
| 8924 | + | |
| 8925 | + if (!data.value[elementor.config.kit_config.typography_prefix + propertyName]) { | |
| 8926 | + return; | |
| 8927 | + } | |
| 8928 | + | |
| 8929 | + propertyName = propertyName.replace('_', '-'); | |
| 8930 | + value = "var( --e-global-".concat(control.groupType, "-").concat(id, "-").concat(propertyName, " )"); | |
| 8931 | + | |
| 8932 | + if (elementor.config.ui.defaultGenericFonts && control.groupPrefix + 'font_family' === control.name) { | |
| 8933 | + value += ", ".concat(elementor.config.ui.defaultGenericFonts); | |
| 8934 | + } | |
| 8935 | + } else { | |
| 8936 | + value = "var( --e-global-".concat(control.type, "-").concat(id, " )"); | |
| 8937 | + } | |
| 8938 | + | |
| 8939 | + return value; | |
| 8940 | + }, | |
| 8941 | + addRepeaterControlsStyleRules: function addRepeaterControlsStyleRules(repeaterValues, repeaterControlsItems, controls, placeholders, replacements) { | |
| 8942 | + var _this3 = this; | |
| 8943 | + | |
| 8944 | + repeaterControlsItems.forEach(function (item, index) { | |
| 8945 | + var itemModel = repeaterValues.models[index]; | |
| 8946 | + | |
| 8947 | + _this3.addStyleRules(item, itemModel.attributes, controls, placeholders.concat(['{{CURRENT_ITEM}}']), replacements.concat(['.elementor-repeater-item-' + itemModel.get('_id')])); | |
| 8948 | + }); | |
| 8949 | + }, | |
| 8950 | + addDynamicControlStyleRules: function addDynamicControlStyleRules(value, control) { | |
| 8951 | + var self = this; | |
| 8952 | + elementor.dynamicTags.parseTagsText(value, control.dynamic, function (id, name, settings) { | |
| 8953 | + var tag = elementor.dynamicTags.createTag(id, name, settings); | |
| 8954 | + | |
| 8955 | + if (!tag) { | |
| 8956 | + return; | |
| 8957 | + } | |
| 8958 | + | |
| 8959 | + var tagSettingsModel = tag.model, | |
| 8960 | + styleControls = tagSettingsModel.getStyleControls(); | |
| 8961 | + | |
| 8962 | + if (!styleControls.length) { | |
| 8963 | + return; | |
| 8964 | + } | |
| 8965 | + | |
| 8966 | + self.addStyleRules(tagSettingsModel.getStyleControls(), tagSettingsModel.attributes, tagSettingsModel.controls, ['{{WRAPPER}}'], ['#elementor-tag-' + id]); | |
| 8967 | + }); | |
| 8968 | + }, | |
| 8969 | + addStyleToDocument: function addStyleToDocument(position) { | |
| 8970 | + var $head = elementor.$previewContents.find('head'); | |
| 8971 | + var insertMethod = 'append', | |
| 8972 | + $insertBy = $head; | |
| 8973 | + | |
| 8974 | + if (position) { | |
| 8975 | + var $targetElement = $head.children(position.of); | |
| 8976 | + | |
| 8977 | + if ($targetElement.length) { | |
| 8978 | + insertMethod = position.at; | |
| 8979 | + $insertBy = $targetElement; | |
| 8980 | + } | |
| 8981 | + } | |
| 8982 | + | |
| 8983 | + $insertBy[insertMethod](this.elements.$stylesheetElement); | |
| 8984 | + var extraCSS = elementor.hooks.applyFilters('editor/style/styleText', '', this.getSettings('context')); | |
| 8985 | + this.elements.$stylesheetElement.text(this.stylesheet + extraCSS); | |
| 8986 | + }, | |
| 8987 | + removeStyleFromDocument: function removeStyleFromDocument() { | |
| 8988 | + this.elements.$stylesheetElement.remove(); | |
| 8989 | + }, | |
| 8990 | + onInit: function onInit() { | |
| 8991 | + elementorModules.ViewModule.prototype.onInit.apply(this, arguments); | |
| 8992 | + this.initStylesheet(); | |
| 8993 | + } | |
| 8994 | +}); | |
| 8995 | +module.exports = ControlsCSSParser; | |
| 8996 | + | |
| 8997 | +/***/ }), | |
| 8998 | +/* 300 */ | |
| 8999 | +/***/ (function(module, exports, __webpack_require__) { | |
| 9000 | + | |
| 9001 | +var _Object$create = __webpack_require__(130); | |
| 9002 | + | |
| 9003 | +var _Map = __webpack_require__(315); | |
| 9004 | + | |
| 9005 | +var getPrototypeOf = __webpack_require__(16); | |
| 9006 | + | |
| 9007 | +var setPrototypeOf = __webpack_require__(119); | |
| 9008 | + | |
| 9009 | +var isNativeFunction = __webpack_require__(324); | |
| 9010 | + | |
| 9011 | +var construct = __webpack_require__(325); | |
| 9012 | + | |
| 9013 | +function _wrapNativeSuper(Class) { | |
| 9014 | + var _cache = typeof _Map === "function" ? new _Map() : undefined; | |
| 9015 | + | |
| 9016 | + module.exports = _wrapNativeSuper = function _wrapNativeSuper(Class) { | |
| 9017 | + if (Class === null || !isNativeFunction(Class)) return Class; | |
| 9018 | + | |
| 9019 | + if (typeof Class !== "function") { | |
| 9020 | + throw new TypeError("Super expression must either be null or a function"); | |
| 9021 | + } | |
| 9022 | + | |
| 9023 | + if (typeof _cache !== "undefined") { | |
| 9024 | + if (_cache.has(Class)) return _cache.get(Class); | |
| 9025 | + | |
| 9026 | + _cache.set(Class, Wrapper); | |
| 9027 | + } | |
| 9028 | + | |
| 9029 | + function Wrapper() { | |
| 9030 | + return construct(Class, arguments, getPrototypeOf(this).constructor); | |
| 9031 | + } | |
| 9032 | + | |
| 9033 | + Wrapper.prototype = _Object$create(Class.prototype, { | |
| 9034 | + constructor: { | |
| 9035 | + value: Wrapper, | |
| 9036 | + enumerable: false, | |
| 9037 | + writable: true, | |
| 9038 | + configurable: true | |
| 9039 | + } | |
| 9040 | + }); | |
| 9041 | + return setPrototypeOf(Wrapper, Class); | |
| 9042 | + }; | |
| 9043 | + | |
| 9044 | + return _wrapNativeSuper(Class); | |
| 9045 | +} | |
| 9046 | + | |
| 9047 | +module.exports = _wrapNativeSuper; | |
| 9048 | + | |
| 9049 | +/***/ }), | |
| 9050 | +/* 301 */ | |
| 9051 | +/***/ (function(module, exports, __webpack_require__) { | |
| 9052 | + | |
| 9053 | +"use strict"; | |
| 9054 | + | |
| 9055 | + | |
| 9056 | +var _interopRequireDefault = __webpack_require__(0); | |
| 9057 | + | |
| 9058 | +var _Object$defineProperty = __webpack_require__(1); | |
| 9059 | + | |
| 9060 | +_Object$defineProperty(exports, "__esModule", { | |
| 9061 | + value: true | |
| 9062 | +}); | |
| 9063 | + | |
| 9064 | +exports.default = void 0; | |
| 9065 | + | |
| 9066 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 9067 | + | |
| 9068 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 9069 | + | |
| 9070 | +var _defineProperty2 = _interopRequireDefault(__webpack_require__(27)); | |
| 9071 | + | |
| 9072 | +var HookBase = /*#__PURE__*/function () { | |
| 9073 | + /** | |
| 9074 | + * Callback type, eg ( hook, event ). | |
| 9075 | + * | |
| 9076 | + * @type {string} | |
| 9077 | + */ | |
| 9078 | + | |
| 9079 | + /** | |
| 9080 | + * Full command address, that will hook the callback. | |
| 9081 | + * | |
| 9082 | + * @type (string) | |
| 9083 | + */ | |
| 9084 | + | |
| 9085 | + /** | |
| 9086 | + * Unique id of the callback. | |
| 9087 | + * | |
| 9088 | + * @type {string} | |
| 9089 | + */ | |
| 9090 | + | |
| 9091 | + /** | |
| 9092 | + * Function constructor(). | |
| 9093 | + * | |
| 9094 | + * Create callback base. | |
| 9095 | + */ | |
| 9096 | + function HookBase() { | |
| 9097 | + (0, _classCallCheck2.default)(this, HookBase); | |
| 9098 | + (0, _defineProperty2.default)(this, "type", void 0); | |
| 9099 | + (0, _defineProperty2.default)(this, "command", void 0); | |
| 9100 | + (0, _defineProperty2.default)(this, "id", void 0); | |
| 9101 | + this.initialize(); | |
| 9102 | + this.type = this.getType(); | |
| 9103 | + this.command = this.getCommand(); | |
| 9104 | + this.id = this.getId(); | |
| 9105 | + } | |
| 9106 | + /** | |
| 9107 | + * Function initialize(). | |
| 9108 | + * | |
| 9109 | + * Called after creation of the base, used for initialize extras. | |
| 9110 | + * Without expending constructor. | |
| 9111 | + */ | |
| 9112 | + | |
| 9113 | + | |
| 9114 | + (0, _createClass2.default)(HookBase, [{ | |
| 9115 | + key: "initialize", | |
| 9116 | + value: function initialize() {} | |
| 9117 | + /** | |
| 9118 | + * Function register(). | |
| 9119 | + * | |
| 9120 | + * Used to register the callback. | |
| 9121 | + * | |
| 9122 | + * @throws {Error} | |
| 9123 | + */ | |
| 9124 | + | |
| 681 | 9125 | }, { |
| 682 | - key: "onAfterRun", | |
| 683 | - value: function onAfterRun() { | |
| 684 | - var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 685 | - var result = arguments.length > 1 ? arguments[1] : undefined; | |
| 686 | - $e.hooks.runUIAfter(this.command, args, result); | |
| 9126 | + key: "register", | |
| 9127 | + value: function register() { | |
| 9128 | + elementorModules.ForceMethodImplementation(); | |
| 687 | 9129 | } |
| 9130 | + /** | |
| 9131 | + * Function getType(). | |
| 9132 | + * | |
| 9133 | + * Get type eg: ( hook, event, etc ... ). | |
| 9134 | + * | |
| 9135 | + * @returns {string} | |
| 9136 | + * | |
| 9137 | + * @throws {Error} | |
| 9138 | + */ | |
| 9139 | + | |
| 688 | 9140 | }, { |
| 689 | - key: "onBeforeApply", | |
| 690 | - value: function onBeforeApply() { | |
| 691 | - var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 692 | - $e.hooks.runDataDependency(this.command, args); | |
| 9141 | + key: "getType", | |
| 9142 | + value: function getType() { | |
| 9143 | + elementorModules.ForceMethodImplementation(); | |
| 693 | 9144 | } |
| 9145 | + /** | |
| 9146 | + * Function getCommand(). | |
| 9147 | + * | |
| 9148 | + * Returns the full command path for callback binding. | |
| 9149 | + * | |
| 9150 | + * Supports array of strings ( commands ). | |
| 9151 | + * | |
| 9152 | + * @returns {string} | |
| 9153 | + * | |
| 9154 | + * @throws {Error} | |
| 9155 | + */ | |
| 9156 | + | |
| 694 | 9157 | }, { |
| 695 | - key: "onAfterApply", | |
| 696 | - value: function onAfterApply() { | |
| 697 | - var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 698 | - var result = arguments.length > 1 ? arguments[1] : undefined; | |
| 699 | - return $e.hooks.runDataAfter(this.command, args, result); | |
| 9158 | + key: "getCommand", | |
| 9159 | + value: function getCommand() { | |
| 9160 | + elementorModules.ForceMethodImplementation(); | |
| 700 | 9161 | } |
| 9162 | + /** | |
| 9163 | + * Function getId(). | |
| 9164 | + * | |
| 9165 | + * Returns command id for the hook (should be unique). | |
| 9166 | + * | |
| 9167 | + * @returns {string} | |
| 9168 | + * | |
| 9169 | + * @throws {Error} | |
| 9170 | + */ | |
| 9171 | + | |
| 701 | 9172 | }, { |
| 702 | - key: "onCatchApply", | |
| 703 | - value: function onCatchApply(e) { | |
| 704 | - this.runCatchHooks(e); | |
| 9173 | + key: "getId", | |
| 9174 | + value: function getId() { | |
| 9175 | + elementorModules.ForceMethodImplementation(); | |
| 705 | 9176 | } |
| 9177 | + /** | |
| 9178 | + * Function getContainerType(). | |
| 9179 | + * | |
| 9180 | + * Bind eContainer type to callback. | |
| 9181 | + * | |
| 9182 | + * Used to gain performance. | |
| 9183 | + * | |
| 9184 | + * @return {string} type | |
| 9185 | + */ | |
| 706 | 9186 | |
| 9187 | + }, { | |
| 9188 | + key: "getContainerType", | |
| 9189 | + value: function getContainerType() {} | |
| 707 | 9190 | /** |
| 708 | - * Run all the catch hooks. | |
| 9191 | + * Function getConditions(). | |
| 709 | 9192 | * |
| 710 | - * @param {Error} e | |
| 9193 | + * Condition for running the callback, if true, call to apply(). | |
| 9194 | + * | |
| 9195 | + * @param [args={}] | |
| 9196 | + * @param [result=*] | |
| 9197 | + * | |
| 9198 | + * @returns {boolean} | |
| 711 | 9199 | */ |
| 9200 | + | |
| 712 | 9201 | }, { |
| 713 | - key: "runCatchHooks", | |
| 714 | - value: function runCatchHooks(e) { | |
| 715 | - $e.hooks.runDataCatch(this.command, this.args, e); | |
| 716 | - $e.hooks.runUICatch(this.command, this.args, e); | |
| 9202 | + key: "getConditions", | |
| 9203 | + value: function getConditions() { | |
| 9204 | + var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 9205 | + var result = arguments.length > 1 ? arguments[1] : undefined; | |
| 9206 | + // eslint-disable-line no-unused-vars | |
| 9207 | + return true; | |
| 717 | 9208 | } |
| 9209 | + /** | |
| 9210 | + * Function apply(). | |
| 9211 | + * | |
| 9212 | + * Apply the callback, ( The actual affect of the callback ). | |
| 9213 | + * | |
| 9214 | + * @param [args={}] | |
| 9215 | + * | |
| 9216 | + * @returns {*} | |
| 9217 | + */ | |
| 718 | 9218 | |
| 9219 | + }, { | |
| 9220 | + key: "apply", | |
| 9221 | + value: function apply(args) { | |
| 9222 | + // eslint-disable-line no-unused-vars | |
| 9223 | + elementorModules.ForceMethodImplementation(); | |
| 9224 | + } | |
| 719 | 9225 | /** |
| 720 | - * TODO - Remove - Backwards compatibility. | |
| 9226 | + * Function run(). | |
| 721 | 9227 | * |
| 722 | - * Function requireContainer(). | |
| 9228 | + * Run the callback. | |
| 723 | 9229 | * |
| 724 | - * Validate `arg.container` & `arg.containers`. | |
| 9230 | + * @param {*} args | |
| 725 | 9231 | * |
| 726 | - * @param {{}} args | |
| 727 | - * @deprecated since 3.7.0, extend `$e.modules.editor.CommandContainerBase` or `$e.modules.editor.CommandContainerInternalBase` instead. | |
| 728 | - * | |
| 729 | - * @throws {Error} | |
| 9232 | + * @returns {*} | |
| 730 | 9233 | */ |
| 9234 | + | |
| 731 | 9235 | }, { |
| 732 | - key: "requireContainer", | |
| 733 | - value: function requireContainer() { | |
| 9236 | + key: "run", | |
| 9237 | + value: function run() { | |
| 9238 | + var _ref = arguments.length <= 0 ? undefined : arguments[0], | |
| 9239 | + _ref$options = _ref.options, | |
| 9240 | + options = _ref$options === void 0 ? {} : _ref$options; // Disable callback if requested by args.options. | |
| 9241 | + | |
| 9242 | + | |
| 9243 | + if (options.callbacks && false === options.callbacks[this.id]) { | |
| 9244 | + return true; | |
| 9245 | + } | |
| 9246 | + | |
| 9247 | + if (this.getConditions.apply(this, arguments)) { | |
| 9248 | + if ($e.devTools) { | |
| 9249 | + $e.devTools.log.callbacks().active(this.type, this.command, this.id); | |
| 9250 | + } | |
| 9251 | + | |
| 9252 | + return this.apply.apply(this, arguments); | |
| 9253 | + } | |
| 9254 | + | |
| 9255 | + return true; | |
| 9256 | + } | |
| 9257 | + }]); | |
| 9258 | + return HookBase; | |
| 9259 | +}(); | |
| 9260 | + | |
| 9261 | +exports.default = HookBase; | |
| 9262 | + | |
| 9263 | +/***/ }), | |
| 9264 | +/* 302 */ | |
| 9265 | +/***/ (function(module, exports, __webpack_require__) { | |
| 9266 | + | |
| 9267 | +var global = __webpack_require__(18); | |
| 9268 | +var inheritIfRequired = __webpack_require__(311); | |
| 9269 | +var dP = __webpack_require__(51).f; | |
| 9270 | +var gOPN = __webpack_require__(313).f; | |
| 9271 | +var isRegExp = __webpack_require__(126); | |
| 9272 | +var $flags = __webpack_require__(109); | |
| 9273 | +var $RegExp = global.RegExp; | |
| 9274 | +var Base = $RegExp; | |
| 9275 | +var proto = $RegExp.prototype; | |
| 9276 | +var re1 = /a/g; | |
| 9277 | +var re2 = /a/g; | |
| 9278 | +// "new" creates a new object, old webkit buggy here | |
| 9279 | +var CORRECT_NEW = new $RegExp(re1) !== re1; | |
| 9280 | + | |
| 9281 | +if (__webpack_require__(28) && (!CORRECT_NEW || __webpack_require__(36)(function () { | |
| 9282 | + re2[__webpack_require__(13)('match')] = false; | |
| 9283 | + // RegExp constructor can alter flags and IsRegExp works correct with @@match | |
| 9284 | + return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i'; | |
| 9285 | +}))) { | |
| 9286 | + $RegExp = function RegExp(p, f) { | |
| 9287 | + var tiRE = this instanceof $RegExp; | |
| 9288 | + var piRE = isRegExp(p); | |
| 9289 | + var fiU = f === undefined; | |
| 9290 | + return !tiRE && piRE && p.constructor === $RegExp && fiU ? p | |
| 9291 | + : inheritIfRequired(CORRECT_NEW | |
| 9292 | + ? new Base(piRE && !fiU ? p.source : p, f) | |
| 9293 | + : Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f) | |
| 9294 | + , tiRE ? this : proto, $RegExp); | |
| 9295 | + }; | |
| 9296 | + var proxy = function (key) { | |
| 9297 | + key in $RegExp || dP($RegExp, key, { | |
| 9298 | + configurable: true, | |
| 9299 | + get: function () { return Base[key]; }, | |
| 9300 | + set: function (it) { Base[key] = it; } | |
| 9301 | + }); | |
| 9302 | + }; | |
| 9303 | + for (var keys = gOPN(Base), i = 0; keys.length > i;) proxy(keys[i++]); | |
| 9304 | + proto.constructor = $RegExp; | |
| 9305 | + $RegExp.prototype = proto; | |
| 9306 | + __webpack_require__(39)(global, 'RegExp', $RegExp); | |
| 9307 | +} | |
| 9308 | + | |
| 9309 | +__webpack_require__(310)('RegExp'); | |
| 9310 | + | |
| 9311 | + | |
| 9312 | +/***/ }), | |
| 9313 | +/* 303 */ | |
| 9314 | +/***/ (function(module, exports, __webpack_require__) { | |
| 9315 | + | |
| 9316 | +"use strict"; | |
| 9317 | + | |
| 9318 | + | |
| 9319 | +var _interopRequireDefault = __webpack_require__(0); | |
| 9320 | + | |
| 9321 | +var _Object$defineProperty = __webpack_require__(1); | |
| 9322 | + | |
| 9323 | +_Object$defineProperty(exports, "__esModule", { | |
| 9324 | + value: true | |
| 9325 | +}); | |
| 9326 | + | |
| 9327 | +exports.default = void 0; | |
| 9328 | + | |
| 9329 | +var _assign = _interopRequireDefault(__webpack_require__(140)); | |
| 9330 | + | |
| 9331 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 9332 | + | |
| 9333 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 9334 | + | |
| 9335 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 9336 | + | |
| 9337 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 9338 | + | |
| 9339 | +var _helper = _interopRequireDefault(__webpack_require__(215)); | |
| 9340 | + | |
| 9341 | +var AddSectionBase = /*#__PURE__*/function (_Marionette$ItemView) { | |
| 9342 | + (0, _inherits2.default)(AddSectionBase, _Marionette$ItemView); | |
| 9343 | + | |
| 9344 | + var _super = (0, _createSuper2.default)(AddSectionBase); | |
| 9345 | + | |
| 9346 | + function AddSectionBase() { | |
| 9347 | + (0, _classCallCheck2.default)(this, AddSectionBase); | |
| 9348 | + return _super.apply(this, arguments); | |
| 9349 | + } | |
| 9350 | + | |
| 9351 | + (0, _createClass2.default)(AddSectionBase, [{ | |
| 9352 | + key: "template", | |
| 9353 | + value: function template() { | |
| 9354 | + return Marionette.TemplateCache.get('#tmpl-elementor-add-section'); | |
| 9355 | + } | |
| 9356 | + }, { | |
| 9357 | + key: "attributes", | |
| 9358 | + value: function attributes() { | |
| 9359 | + return { | |
| 9360 | + 'data-view': 'choose-action' | |
| 9361 | + }; | |
| 9362 | + } | |
| 9363 | + }, { | |
| 9364 | + key: "ui", | |
| 9365 | + value: function ui() { | |
| 9366 | + return { | |
| 9367 | + addNewSection: '.elementor-add-new-section', | |
| 9368 | + closeButton: '.elementor-add-section-close', | |
| 9369 | + addSectionButton: '.elementor-add-section-button', | |
| 9370 | + addTemplateButton: '.elementor-add-template-button', | |
| 9371 | + selectPreset: '.elementor-select-preset', | |
| 9372 | + presets: '.elementor-preset' | |
| 9373 | + }; | |
| 9374 | + } | |
| 9375 | + }, { | |
| 9376 | + key: "events", | |
| 9377 | + value: function events() { | |
| 9378 | + return { | |
| 9379 | + 'click @ui.addSectionButton': 'onAddSectionButtonClick', | |
| 9380 | + 'click @ui.addTemplateButton': 'onAddTemplateButtonClick', | |
| 9381 | + 'click @ui.closeButton': 'onCloseButtonClick', | |
| 9382 | + 'click @ui.presets': 'onPresetSelected' | |
| 9383 | + }; | |
| 9384 | + } | |
| 9385 | + }, { | |
| 9386 | + key: "behaviors", | |
| 9387 | + value: function behaviors() { | |
| 9388 | + return { | |
| 9389 | + contextMenu: { | |
| 9390 | + behaviorClass: __webpack_require__(276), | |
| 9391 | + groups: this.getContextMenuGroups() | |
| 9392 | + } | |
| 9393 | + }; | |
| 9394 | + } | |
| 9395 | + }, { | |
| 9396 | + key: "className", | |
| 9397 | + value: function className() { | |
| 9398 | + return 'elementor-add-section elementor-visible-desktop'; | |
| 9399 | + } | |
| 9400 | + }, { | |
| 9401 | + key: "setView", | |
| 9402 | + value: function setView(view) { | |
| 9403 | + this.$el.attr('data-view', view); | |
| 9404 | + } | |
| 9405 | + }, { | |
| 9406 | + key: "showSelectPresets", | |
| 9407 | + value: function showSelectPresets() { | |
| 9408 | + this.setView('select-preset'); | |
| 9409 | + } | |
| 9410 | + }, { | |
| 9411 | + key: "closeSelectPresets", | |
| 9412 | + value: function closeSelectPresets() { | |
| 9413 | + this.setView('choose-action'); | |
| 9414 | + } | |
| 9415 | + }, { | |
| 9416 | + key: "getTemplatesModalOptions", | |
| 9417 | + value: function getTemplatesModalOptions() { | |
| 9418 | + return { | |
| 9419 | + importOptions: { | |
| 9420 | + at: this.getOption('at') | |
| 9421 | + } | |
| 9422 | + }; | |
| 9423 | + } | |
| 9424 | + }, { | |
| 9425 | + key: "getContextMenuGroups", | |
| 9426 | + value: function getContextMenuGroups() { | |
| 734 | 9427 | var _this = this; |
| 735 | - var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.args; | |
| 736 | - _deprecation.default.deprecated('requireContainer()', '3.7.0', 'Extend `$e.modules.editor.CommandContainerBase` or `$e.modules.editor.CommandContainerInternalBase`'); | |
| 737 | - if (!args.container && !args.containers) { | |
| 738 | - throw Error('container or containers are required.'); | |
| 9428 | + | |
| 9429 | + var hasContent = function hasContent() { | |
| 9430 | + return elementor.elements.length > 0; | |
| 9431 | + }; | |
| 9432 | + | |
| 9433 | + return [{ | |
| 9434 | + name: 'paste', | |
| 9435 | + actions: [{ | |
| 9436 | + name: 'paste', | |
| 9437 | + title: elementor.translate('paste'), | |
| 9438 | + isEnabled: function isEnabled() { | |
| 9439 | + return _helper.default.isPasteEnabled(elementor.getPreviewContainer()); | |
| 9440 | + }, | |
| 9441 | + callback: function callback() { | |
| 9442 | + return $e.run('document/ui/paste', { | |
| 9443 | + container: elementor.getPreviewContainer(), | |
| 9444 | + options: { | |
| 9445 | + at: _this.getOption('at'), | |
| 9446 | + rebuild: true | |
| 9447 | + }, | |
| 9448 | + onAfter: function onAfter() { | |
| 9449 | + return _this.onAfterPaste(); | |
| 9450 | + } | |
| 9451 | + }); | |
| 9452 | + } | |
| 9453 | + }] | |
| 9454 | + }, { | |
| 9455 | + name: 'content', | |
| 9456 | + actions: [{ | |
| 9457 | + name: 'copy_all_content', | |
| 9458 | + title: elementor.translate('copy_all_content'), | |
| 9459 | + isEnabled: hasContent, | |
| 9460 | + callback: function callback() { | |
| 9461 | + return $e.run('document/elements/copy-all'); | |
| 9462 | + } | |
| 9463 | + }, { | |
| 9464 | + name: 'delete_all_content', | |
| 9465 | + title: elementor.translate('delete_all_content'), | |
| 9466 | + isEnabled: hasContent, | |
| 9467 | + callback: function callback() { | |
| 9468 | + return $e.run('document/elements/empty'); | |
| 9469 | + } | |
| 9470 | + }] | |
| 9471 | + }]; | |
| 9472 | + } | |
| 9473 | + }, { | |
| 9474 | + key: "onAddSectionButtonClick", | |
| 9475 | + value: function onAddSectionButtonClick() { | |
| 9476 | + this.showSelectPresets(); | |
| 9477 | + } | |
| 9478 | + }, { | |
| 9479 | + key: "onAddTemplateButtonClick", | |
| 9480 | + value: function onAddTemplateButtonClick() { | |
| 9481 | + $e.run('library/open', this.getTemplatesModalOptions()); | |
| 9482 | + } | |
| 9483 | + }, { | |
| 9484 | + key: "onRender", | |
| 9485 | + value: function onRender() { | |
| 9486 | + this.$el.html5Droppable({ | |
| 9487 | + axis: ['vertical'], | |
| 9488 | + groups: ['elementor-element'], | |
| 9489 | + placeholder: false, | |
| 9490 | + currentElementClass: 'elementor-html5dnd-current-element', | |
| 9491 | + hasDraggingOnChildClass: 'elementor-dragging-on-child', | |
| 9492 | + onDropping: this.onDropping.bind(this) | |
| 9493 | + }); | |
| 9494 | + } | |
| 9495 | + }, { | |
| 9496 | + key: "onPresetSelected", | |
| 9497 | + value: function onPresetSelected(event) { | |
| 9498 | + this.closeSelectPresets(); | |
| 9499 | + var selectedStructure = event.currentTarget.dataset.structure, | |
| 9500 | + parsedStructure = elementor.presetsFactory.getParsedStructure(selectedStructure); | |
| 9501 | + $e.run('document/elements/create', { | |
| 9502 | + model: { | |
| 9503 | + elType: 'section' | |
| 9504 | + }, | |
| 9505 | + container: elementor.getPreviewContainer(), | |
| 9506 | + columns: parsedStructure.columnsCount, | |
| 9507 | + structure: selectedStructure, | |
| 9508 | + options: (0, _assign.default)({}, this.options) | |
| 9509 | + }); | |
| 9510 | + } | |
| 9511 | + }, { | |
| 9512 | + key: "onDropping", | |
| 9513 | + value: function onDropping() { | |
| 9514 | + if (elementor.helpers.maybeDisableWidget()) { | |
| 9515 | + return; | |
| 739 | 9516 | } |
| 740 | - if (args.container && args.containers) { | |
| 741 | - throw Error('container and containers cannot go together please select one of them.'); | |
| 9517 | + | |
| 9518 | + var selectedElement = elementor.channels.panelElements.request('element:selected'), | |
| 9519 | + historyId = $e.internal('document/history/start-log', { | |
| 9520 | + type: 'add', | |
| 9521 | + title: elementor.helpers.getModelLabel(selectedElement.model) | |
| 9522 | + }), | |
| 9523 | + eSection = $e.run('document/elements/create', { | |
| 9524 | + model: { | |
| 9525 | + elType: 'section' | |
| 9526 | + }, | |
| 9527 | + container: elementor.getPreviewContainer(), | |
| 9528 | + columns: 1, | |
| 9529 | + options: { | |
| 9530 | + at: this.getOption('at'), | |
| 9531 | + // BC: Deprecated since 2.8.0 - use `$e.hooks`. | |
| 9532 | + trigger: { | |
| 9533 | + beforeAdd: 'section:before:drop', | |
| 9534 | + afterAdd: 'section:after:drop' | |
| 9535 | + } | |
| 9536 | + } | |
| 9537 | + }); // Create the element in column. | |
| 9538 | + | |
| 9539 | + eSection.view.children.findByIndex(0).addElementFromPanel(); | |
| 9540 | + $e.internal('document/history/end-log', { | |
| 9541 | + id: historyId | |
| 9542 | + }); | |
| 9543 | + } | |
| 9544 | + }, { | |
| 9545 | + key: "onAfterPaste", | |
| 9546 | + value: function onAfterPaste() {} | |
| 9547 | + }]); | |
| 9548 | + return AddSectionBase; | |
| 9549 | +}(Marionette.ItemView); | |
| 9550 | + | |
| 9551 | +var _default = AddSectionBase; | |
| 9552 | +exports.default = _default; | |
| 9553 | + | |
| 9554 | +/***/ }), | |
| 9555 | +/* 304 */ | |
| 9556 | +/***/ (function(module, exports, __webpack_require__) { | |
| 9557 | + | |
| 9558 | +"use strict"; | |
| 9559 | + | |
| 9560 | + | |
| 9561 | +var _interopRequireDefault = __webpack_require__(0); | |
| 9562 | + | |
| 9563 | +__webpack_require__(24); | |
| 9564 | + | |
| 9565 | +__webpack_require__(40); | |
| 9566 | + | |
| 9567 | +var _isArray = _interopRequireDefault(__webpack_require__(86)); | |
| 9568 | + | |
| 9569 | +var _typeof2 = _interopRequireDefault(__webpack_require__(50)); | |
| 9570 | + | |
| 9571 | +var _parseInt2 = _interopRequireDefault(__webpack_require__(214)); | |
| 9572 | + | |
| 9573 | +var _keys = _interopRequireDefault(__webpack_require__(25)); | |
| 9574 | + | |
| 9575 | +var _environment = _interopRequireDefault(__webpack_require__(272)); | |
| 9576 | + | |
| 9577 | +var _helper = _interopRequireDefault(__webpack_require__(215)); | |
| 9578 | + | |
| 9579 | +var ControlsCSSParser = __webpack_require__(299), | |
| 9580 | + Validator = __webpack_require__(307), | |
| 9581 | + BaseContainer = __webpack_require__(346), | |
| 9582 | + BaseElementView; | |
| 9583 | + | |
| 9584 | +BaseElementView = BaseContainer.extend({ | |
| 9585 | + tagName: 'div', | |
| 9586 | + controlsCSSParser: null, | |
| 9587 | + allowRender: true, | |
| 9588 | + toggleEditTools: false, | |
| 9589 | + renderAttributes: {}, | |
| 9590 | + className: function className() { | |
| 9591 | + var classes = 'elementor-element elementor-element-edit-mode ' + this.getElementUniqueID(); | |
| 9592 | + | |
| 9593 | + if (this.toggleEditTools) { | |
| 9594 | + classes += ' elementor-element--toggle-edit-tools'; | |
| 9595 | + } | |
| 9596 | + | |
| 9597 | + return classes; | |
| 9598 | + }, | |
| 9599 | + attributes: function attributes() { | |
| 9600 | + return { | |
| 9601 | + 'data-id': this.getID(), | |
| 9602 | + 'data-element_type': this.model.get('elType') | |
| 9603 | + }; | |
| 9604 | + }, | |
| 9605 | + ui: function ui() { | |
| 9606 | + return { | |
| 9607 | + tools: '> .elementor-element-overlay > .elementor-editor-element-settings', | |
| 9608 | + editButton: '> .elementor-element-overlay .elementor-editor-element-edit', | |
| 9609 | + duplicateButton: '> .elementor-element-overlay .elementor-editor-element-duplicate', | |
| 9610 | + addButton: '> .elementor-element-overlay .elementor-editor-element-add', | |
| 9611 | + removeButton: '> .elementor-element-overlay .elementor-editor-element-remove' | |
| 9612 | + }; | |
| 9613 | + }, | |
| 9614 | + behaviors: function behaviors() { | |
| 9615 | + var groups = elementor.hooks.applyFilters('elements/' + this.options.model.get('elType') + '/contextMenuGroups', this.getContextMenuGroups(), this); | |
| 9616 | + var behaviors = { | |
| 9617 | + contextMenu: { | |
| 9618 | + behaviorClass: __webpack_require__(276), | |
| 9619 | + groups: groups | |
| 742 | 9620 | } |
| 743 | - var containers = args.containers || [args.container]; | |
| 744 | - containers.forEach(function (container) { | |
| 745 | - _this.requireArgumentInstance('container', elementorModules.editor.Container, { | |
| 746 | - container: container | |
| 9621 | + }; | |
| 9622 | + return elementor.hooks.applyFilters('elements/base/behaviors', behaviors, this); | |
| 9623 | + }, | |
| 9624 | + getBehavior: function getBehavior(name) { | |
| 9625 | + return this._behaviors[(0, _keys.default)(this.behaviors()).indexOf(name)]; | |
| 9626 | + }, | |
| 9627 | + events: function events() { | |
| 9628 | + return { | |
| 9629 | + mousedown: 'onMouseDown', | |
| 9630 | + 'click @ui.editButton': 'onEditButtonClick', | |
| 9631 | + 'click @ui.duplicateButton': 'onDuplicateButtonClick', | |
| 9632 | + 'click @ui.addButton': 'onAddButtonClick', | |
| 9633 | + 'click @ui.removeButton': 'onRemoveButtonClick' | |
| 9634 | + }; | |
| 9635 | + }, | |
| 9636 | + getElementType: function getElementType() { | |
| 9637 | + return this.model.get('elType'); | |
| 9638 | + }, | |
| 9639 | + getIDInt: function getIDInt() { | |
| 9640 | + return (0, _parseInt2.default)(this.getID(), 16); | |
| 9641 | + }, | |
| 9642 | + getChildType: function getChildType() { | |
| 9643 | + return elementor.helpers.getElementChildType(this.getElementType()); | |
| 9644 | + }, | |
| 9645 | + getChildView: function getChildView(model) { | |
| 9646 | + var ChildView; | |
| 9647 | + var elType = model.get('elType'); | |
| 9648 | + | |
| 9649 | + if ('section' === elType) { | |
| 9650 | + ChildView = __webpack_require__(256); | |
| 9651 | + } else if ('column' === elType) { | |
| 9652 | + ChildView = __webpack_require__(387); | |
| 9653 | + } else { | |
| 9654 | + ChildView = elementor.modules.elements.views.Widget; | |
| 9655 | + } | |
| 9656 | + | |
| 9657 | + return elementor.hooks.applyFilters('element/view', ChildView, model, this); | |
| 9658 | + }, | |
| 9659 | + getTemplateType: function getTemplateType() { | |
| 9660 | + return 'js'; | |
| 9661 | + }, | |
| 9662 | + getEditModel: function getEditModel() { | |
| 9663 | + return this.model; | |
| 9664 | + }, | |
| 9665 | + getContainer: function getContainer() { | |
| 9666 | + var _this = this; | |
| 9667 | + | |
| 9668 | + if (!this.container) { | |
| 9669 | + var settingsModel = this.model.get('settings'); | |
| 9670 | + this.container = new elementorModules.editor.Container({ | |
| 9671 | + type: this.model.get('elType'), | |
| 9672 | + id: this.model.id, | |
| 9673 | + model: this.model, | |
| 9674 | + settings: settingsModel, | |
| 9675 | + view: this, | |
| 9676 | + parent: this._parent ? this._parent.getContainer() : {}, | |
| 9677 | + children: [], | |
| 9678 | + label: elementor.helpers.getModelLabel(this.model), | |
| 9679 | + controls: settingsModel.options.controls | |
| 9680 | + }); | |
| 9681 | + | |
| 9682 | + if ((0, _keys.default)(this.container.parent).length) { | |
| 9683 | + this.container.parent.children[this._index] = this.container; | |
| 9684 | + this.on('destroy', function () { | |
| 9685 | + delete _this.container.parent.children[_this._index]; | |
| 9686 | + _this.container.parent.children = _this.container.parent.children.filter(function (child) { | |
| 9687 | + return null !== child; | |
| 9688 | + }); | |
| 747 | 9689 | }); |
| 9690 | + } | |
| 9691 | + } | |
| 9692 | + | |
| 9693 | + return this.container; | |
| 9694 | + }, | |
| 9695 | + getContextMenuGroups: function getContextMenuGroups() { | |
| 9696 | + var _this2 = this; | |
| 9697 | + | |
| 9698 | + var controlSign = _environment.default.mac ? '⌘' : '^'; | |
| 9699 | + return [{ | |
| 9700 | + name: 'general', | |
| 9701 | + actions: [{ | |
| 9702 | + name: 'edit', | |
| 9703 | + icon: 'eicon-edit', | |
| 9704 | + title: elementor.translate('edit_element', [this.options.model.getTitle()]), | |
| 9705 | + callback: function callback() { | |
| 9706 | + return $e.run('panel/editor/open', { | |
| 9707 | + model: _this2.options.model, | |
| 9708 | + // Todo: remove on merge router | |
| 9709 | + view: _this2, | |
| 9710 | + // Todo: remove on merge router | |
| 9711 | + container: _this2.getContainer() | |
| 9712 | + }); | |
| 9713 | + } | |
| 9714 | + }, { | |
| 9715 | + name: 'duplicate', | |
| 9716 | + icon: 'eicon-clone', | |
| 9717 | + title: elementor.translate('duplicate'), | |
| 9718 | + shortcut: controlSign + '+D', | |
| 9719 | + callback: function callback() { | |
| 9720 | + return $e.run('document/elements/duplicate', { | |
| 9721 | + container: _this2.getContainer() | |
| 9722 | + }); | |
| 9723 | + } | |
| 9724 | + }] | |
| 9725 | + }, { | |
| 9726 | + name: 'clipboard', | |
| 9727 | + actions: [{ | |
| 9728 | + name: 'copy', | |
| 9729 | + title: elementor.translate('copy'), | |
| 9730 | + shortcut: controlSign + '+C', | |
| 9731 | + callback: function callback() { | |
| 9732 | + return $e.run('document/elements/copy', { | |
| 9733 | + container: _this2.getContainer() | |
| 9734 | + }); | |
| 9735 | + } | |
| 9736 | + }, { | |
| 9737 | + name: 'paste', | |
| 9738 | + title: elementor.translate('paste'), | |
| 9739 | + shortcut: controlSign + '+V', | |
| 9740 | + isEnabled: function isEnabled() { | |
| 9741 | + return _helper.default.isPasteEnabled(_this2.getContainer()); | |
| 9742 | + }, | |
| 9743 | + callback: function callback() { | |
| 9744 | + return $e.run('document/ui/paste', { | |
| 9745 | + container: _this2.getContainer() | |
| 9746 | + }); | |
| 9747 | + } | |
| 9748 | + }, { | |
| 9749 | + name: 'pasteStyle', | |
| 9750 | + title: elementor.translate('paste_style'), | |
| 9751 | + shortcut: controlSign + '+⇧+V', | |
| 9752 | + isEnabled: function isEnabled() { | |
| 9753 | + return !!elementorCommon.storage.get('clipboard'); | |
| 9754 | + }, | |
| 9755 | + callback: function callback() { | |
| 9756 | + return $e.run('document/elements/paste-style', { | |
| 9757 | + container: _this2.getContainer() | |
| 9758 | + }); | |
| 9759 | + } | |
| 9760 | + }, { | |
| 9761 | + name: 'resetStyle', | |
| 9762 | + title: elementor.translate('reset_style'), | |
| 9763 | + callback: function callback() { | |
| 9764 | + return $e.run('document/elements/reset-style', { | |
| 9765 | + container: _this2.getContainer() | |
| 9766 | + }); | |
| 9767 | + } | |
| 9768 | + }] | |
| 9769 | + }, { | |
| 9770 | + name: 'delete', | |
| 9771 | + actions: [{ | |
| 9772 | + name: 'delete', | |
| 9773 | + icon: 'eicon-trash', | |
| 9774 | + title: elementor.translate('delete'), | |
| 9775 | + shortcut: '⌦', | |
| 9776 | + callback: function callback() { | |
| 9777 | + return $e.run('document/elements/delete', { | |
| 9778 | + container: _this2.getContainer() | |
| 9779 | + }); | |
| 9780 | + } | |
| 9781 | + }] | |
| 9782 | + }]; | |
| 9783 | + }, | |
| 9784 | + getEditButtons: function getEditButtons() { | |
| 9785 | + return {}; | |
| 9786 | + }, | |
| 9787 | + initialize: function initialize() { | |
| 9788 | + var _this3 = this; | |
| 9789 | + | |
| 9790 | + BaseContainer.prototype.initialize.apply(this, arguments); | |
| 9791 | + var editModel = this.getEditModel(); | |
| 9792 | + | |
| 9793 | + if (this.collection && this.onCollectionChanged) { | |
| 9794 | + elementorCommon.helpers.softDeprecated('onCollectionChanged', '2.8.0', '$e.hooks'); | |
| 9795 | + this.listenTo(this.collection, 'add remove reset', this.onCollectionChanged, this); | |
| 9796 | + } | |
| 9797 | + | |
| 9798 | + if (this.onSettingsChanged) { | |
| 9799 | + elementorCommon.helpers.softDeprecated('onSettingsChanged', '2.8.0', '$e.hooks'); | |
| 9800 | + this.listenTo(editModel.get('settings'), 'change', this.onSettingsChanged); | |
| 9801 | + } | |
| 9802 | + | |
| 9803 | + this.listenTo(editModel.get('editSettings'), 'change', this.onEditSettingsChanged).listenTo(this.model, 'request:edit', this.onEditRequest).listenTo(this.model, 'request:toggleVisibility', this.toggleVisibility); | |
| 9804 | + this.initControlsCSSParser(); | |
| 9805 | + | |
| 9806 | + _.defer(function () { | |
| 9807 | + // Init container. Defer - in order to init the container after the element is fully initialized, and properties like `_parent` are available. | |
| 9808 | + _this3.getContainer(); | |
| 9809 | + }); | |
| 9810 | + }, | |
| 9811 | + getHandlesOverlay: function getHandlesOverlay() { | |
| 9812 | + var $handlesOverlay = jQuery('<div>', { | |
| 9813 | + class: 'elementor-element-overlay' | |
| 9814 | + }), | |
| 9815 | + $overlayList = jQuery('<ul>', { | |
| 9816 | + class: "elementor-editor-element-settings elementor-editor-".concat(this.getElementType(), "-settings") | |
| 9817 | + }); | |
| 9818 | + jQuery.each(this.getEditButtons(), function (toolName, tool) { | |
| 9819 | + var $item = jQuery('<li>', { | |
| 9820 | + class: "elementor-editor-element-setting elementor-editor-element-".concat(toolName), | |
| 9821 | + title: tool.title | |
| 9822 | + }), | |
| 9823 | + $icon = jQuery('<i>', { | |
| 9824 | + class: "eicon-".concat(tool.icon), | |
| 9825 | + 'aria-hidden': true | |
| 9826 | + }), | |
| 9827 | + $a11y = jQuery('<span>', { | |
| 9828 | + class: 'elementor-screen-only' | |
| 748 | 9829 | }); |
| 9830 | + $a11y.text(tool.title); | |
| 9831 | + $item.append($icon, $a11y); | |
| 9832 | + $overlayList.append($item); | |
| 9833 | + }); | |
| 9834 | + $handlesOverlay.append($overlayList); | |
| 9835 | + return $handlesOverlay; | |
| 9836 | + }, | |
| 9837 | + attachElContent: function attachElContent(html) { | |
| 9838 | + this.$el.empty().append(this.getHandlesOverlay(), html); | |
| 9839 | + }, | |
| 9840 | + startTransport: function startTransport() { | |
| 9841 | + elementorCommon.helpers.softDeprecated('element.startTransport', '2.8.0', "$e.run( 'document/elements/copy' )"); | |
| 9842 | + $e.run('document/elements/copy', { | |
| 9843 | + container: this.getContainer() | |
| 9844 | + }); | |
| 9845 | + }, | |
| 9846 | + copy: function copy() { | |
| 9847 | + elementorCommon.helpers.softDeprecated('element.copy', '2.8.0', "$e.run( 'document/elements/copy' )"); | |
| 9848 | + $e.run('document/elements/copy', { | |
| 9849 | + container: this.getContainer() | |
| 9850 | + }); | |
| 9851 | + }, | |
| 9852 | + cut: function cut() { | |
| 9853 | + elementorCommon.helpers.softDeprecated('element.cut', '2.8.0'); | |
| 9854 | + }, | |
| 9855 | + paste: function paste() { | |
| 9856 | + elementorCommon.helpers.softDeprecated('element.paste', '2.8.0', "$e.run( 'document/elements/paste' )"); | |
| 9857 | + $e.run('document/elements/paste', { | |
| 9858 | + container: this.getContainer(), | |
| 9859 | + at: this._parent.collection.indexOf(this.model) | |
| 9860 | + }); | |
| 9861 | + }, | |
| 9862 | + duplicate: function duplicate() { | |
| 9863 | + elementorCommon.helpers.softDeprecated('element.duplicate', '2.8.0', "$e.run( 'document/elements/duplicate' )"); | |
| 9864 | + $e.run('document/elements/duplicate', { | |
| 9865 | + container: this.getContainer() | |
| 9866 | + }); | |
| 9867 | + }, | |
| 9868 | + pasteStyle: function pasteStyle() { | |
| 9869 | + elementorCommon.helpers.softDeprecated('element.pasteStyle', '2.8.0', "$e.run( 'document/elements/paste-style' )"); | |
| 9870 | + $e.run('document/elements/paste-style', { | |
| 9871 | + container: this.getContainer() | |
| 9872 | + }); | |
| 9873 | + }, | |
| 9874 | + resetStyle: function resetStyle() { | |
| 9875 | + elementorCommon.helpers.softDeprecated('element.resetStyle', '2.8.0', "$e.run( 'document/elements/reset-style' )"); | |
| 9876 | + $e.run('document/elements/reset-style', { | |
| 9877 | + container: this.getContainer() | |
| 9878 | + }); | |
| 9879 | + }, | |
| 9880 | + isStyleTransferControl: function isStyleTransferControl(control) { | |
| 9881 | + if (undefined !== control.style_transfer) { | |
| 9882 | + return control.style_transfer; | |
| 749 | 9883 | } |
| 750 | - }], [{ | |
| 751 | - key: "getInstanceType", | |
| 752 | - value: function getInstanceType() { | |
| 753 | - return 'CommandBase'; | |
| 9884 | + | |
| 9885 | + return 'content' !== control.tab || control.selectors || control.prefix_class; | |
| 9886 | + }, | |
| 9887 | + toggleVisibility: function toggleVisibility() { | |
| 9888 | + this.model.set('hidden', !this.model.get('hidden')); | |
| 9889 | + this.toggleVisibilityClass(); | |
| 9890 | + }, | |
| 9891 | + toggleVisibilityClass: function toggleVisibilityClass() { | |
| 9892 | + this.$el.toggleClass('elementor-edit-hidden', !!this.model.get('hidden')); | |
| 9893 | + }, | |
| 9894 | + addElementFromPanel: function addElementFromPanel(options) { | |
| 9895 | + options = options || {}; | |
| 9896 | + var elementView = elementor.channels.panelElements.request('element:selected'), | |
| 9897 | + model = { | |
| 9898 | + elType: elementView.model.get('elType') | |
| 9899 | + }; | |
| 9900 | + | |
| 9901 | + if (elementor.helpers.maybeDisableWidget()) { | |
| 9902 | + return; | |
| 754 | 9903 | } |
| 755 | - }]); | |
| 756 | -}(_commandInfra.default); | |
| 757 | 9904 | |
| 9905 | + if ('widget' === model.elType) { | |
| 9906 | + model.widgetType = elementView.model.get('widgetType'); | |
| 9907 | + } else if ('section' === model.elType) { | |
| 9908 | + model.isInner = true; | |
| 9909 | + } else { | |
| 9910 | + return; | |
| 9911 | + } | |
| 9912 | + | |
| 9913 | + var customData = elementView.model.get('custom'); | |
| 9914 | + | |
| 9915 | + if (customData) { | |
| 9916 | + jQuery.extend(model, customData); | |
| 9917 | + } | |
| 9918 | + | |
| 9919 | + return $e.run('document/elements/create', { | |
| 9920 | + container: this.getContainer(), | |
| 9921 | + model: model, | |
| 9922 | + options: options | |
| 9923 | + }); | |
| 9924 | + }, | |
| 9925 | + // TODO: Unused function. | |
| 9926 | + addControlValidator: function addControlValidator(controlName, validationCallback) { | |
| 9927 | + validationCallback = validationCallback.bind(this); | |
| 9928 | + var validator = new Validator({ | |
| 9929 | + customValidationMethod: validationCallback | |
| 9930 | + }), | |
| 9931 | + validators = this.getEditModel().get('settings').validators; | |
| 9932 | + | |
| 9933 | + if (!validators[controlName]) { | |
| 9934 | + validators[controlName] = []; | |
| 9935 | + } | |
| 9936 | + | |
| 9937 | + validators[controlName].push(validator); | |
| 9938 | + }, | |
| 9939 | + addRenderAttribute: function addRenderAttribute(element, key, value, overwrite) { | |
| 9940 | + var self = this; | |
| 9941 | + | |
| 9942 | + if ('object' === (0, _typeof2.default)(element)) { | |
| 9943 | + jQuery.each(element, function (elementKey, elementValue) { | |
| 9944 | + self.addRenderAttribute(elementKey, elementValue, null, overwrite); | |
| 9945 | + }); | |
| 9946 | + return self; | |
| 9947 | + } | |
| 9948 | + | |
| 9949 | + if ('object' === (0, _typeof2.default)(key)) { | |
| 9950 | + jQuery.each(key, function (attributeKey, attributeValue) { | |
| 9951 | + self.addRenderAttribute(element, attributeKey, attributeValue, overwrite); | |
| 9952 | + }); | |
| 9953 | + return self; | |
| 9954 | + } | |
| 9955 | + | |
| 9956 | + if (!self.renderAttributes[element]) { | |
| 9957 | + self.renderAttributes[element] = {}; | |
| 9958 | + } | |
| 9959 | + | |
| 9960 | + if (!self.renderAttributes[element][key]) { | |
| 9961 | + self.renderAttributes[element][key] = []; | |
| 9962 | + } | |
| 9963 | + | |
| 9964 | + if (!(0, _isArray.default)(value)) { | |
| 9965 | + value = [value]; | |
| 9966 | + } | |
| 9967 | + | |
| 9968 | + if (overwrite) { | |
| 9969 | + self.renderAttributes[element][key] = value; | |
| 9970 | + } else { | |
| 9971 | + self.renderAttributes[element][key] = self.renderAttributes[element][key].concat(value); | |
| 9972 | + } | |
| 9973 | + }, | |
| 9974 | + getRenderAttributeString: function getRenderAttributeString(element) { | |
| 9975 | + if (!this.renderAttributes[element]) { | |
| 9976 | + return ''; | |
| 9977 | + } | |
| 9978 | + | |
| 9979 | + var renderAttributes = this.renderAttributes[element], | |
| 9980 | + attributes = []; | |
| 9981 | + jQuery.each(renderAttributes, function (attributeKey, attributeValue) { | |
| 9982 | + attributes.push(attributeKey + '="' + _.escape(attributeValue.join(' ')) + '"'); | |
| 9983 | + }); | |
| 9984 | + return attributes.join(' '); | |
| 9985 | + }, | |
| 9986 | + isInner: function isInner() { | |
| 9987 | + return !!this.model.get('isInner'); | |
| 9988 | + }, | |
| 9989 | + initControlsCSSParser: function initControlsCSSParser() { | |
| 9990 | + this.controlsCSSParser = new ControlsCSSParser({ | |
| 9991 | + id: this.model.get('id'), | |
| 9992 | + context: this, | |
| 9993 | + settingsModel: this.getEditModel().get('settings'), | |
| 9994 | + dynamicParsing: this.getDynamicParsingSettings() | |
| 9995 | + }); | |
| 9996 | + }, | |
| 9997 | + enqueueFonts: function enqueueFonts() { | |
| 9998 | + var editModel = this.getEditModel(), | |
| 9999 | + settings = editModel.get('settings'); // Enqueue Icon Fonts | |
| 10000 | + | |
| 10001 | + jQuery.each(settings.getIconsControls(), function (index, control) { | |
| 10002 | + var iconType = editModel.getSetting(control.name); | |
| 10003 | + | |
| 10004 | + if (!iconType || !iconType.library) { | |
| 10005 | + return; | |
| 10006 | + } | |
| 10007 | + | |
| 10008 | + elementor.helpers.enqueueIconFonts(iconType.library); | |
| 10009 | + }); | |
| 10010 | + }, | |
| 10011 | + renderStyles: function renderStyles(settings) { | |
| 10012 | + if (!settings) { | |
| 10013 | + settings = this.getEditModel().get('settings'); | |
| 10014 | + } | |
| 10015 | + | |
| 10016 | + this.controlsCSSParser.stylesheet.empty(); | |
| 10017 | + this.controlsCSSParser.addStyleRules(settings.getStyleControls(), settings.attributes, this.getEditModel().get('settings').controls, [/{{ID}}/g, /{{WRAPPER}}/g], [this.getID(), '.elementor-' + elementor.config.document.id + ' .elementor-element.' + this.getElementUniqueID()]); | |
| 10018 | + this.controlsCSSParser.addStyleToDocument(); | |
| 10019 | + }, | |
| 10020 | + renderCustomClasses: function renderCustomClasses() { | |
| 10021 | + var self = this; | |
| 10022 | + var settings = self.getEditModel().get('settings'), | |
| 10023 | + classControls = settings.getClassControls(); // Remove all previous classes | |
| 10024 | + | |
| 10025 | + _.each(classControls, function (control) { | |
| 10026 | + var previousClassValue = settings.previous(control.name); | |
| 10027 | + | |
| 10028 | + if (control.classes_dictionary) { | |
| 10029 | + if (undefined !== control.classes_dictionary[previousClassValue]) { | |
| 10030 | + previousClassValue = control.classes_dictionary[previousClassValue]; | |
| 10031 | + } | |
| 10032 | + } | |
| 10033 | + | |
| 10034 | + self.$el.removeClass(control.prefix_class + previousClassValue); | |
| 10035 | + }); // Add new classes | |
| 10036 | + | |
| 10037 | + | |
| 10038 | + _.each(classControls, function (control) { | |
| 10039 | + var value = settings.attributes[control.name]; | |
| 10040 | + var classValue = value; | |
| 10041 | + | |
| 10042 | + if (control.classes_dictionary) { | |
| 10043 | + if (undefined !== control.classes_dictionary[value]) { | |
| 10044 | + classValue = control.classes_dictionary[value]; | |
| 10045 | + } | |
| 10046 | + } | |
| 10047 | + | |
| 10048 | + var isVisible = elementor.helpers.isActiveControl(control, settings.attributes); | |
| 10049 | + | |
| 10050 | + if (isVisible && (classValue || 0 === classValue)) { | |
| 10051 | + self.$el.addClass(control.prefix_class + classValue); | |
| 10052 | + } | |
| 10053 | + }); | |
| 10054 | + | |
| 10055 | + self.$el.addClass(_.result(self, 'className')); | |
| 10056 | + self.toggleVisibilityClass(); | |
| 10057 | + }, | |
| 10058 | + renderCustomElementID: function renderCustomElementID() { | |
| 10059 | + var customElementID = this.getEditModel().get('settings').get('_element_id'); | |
| 10060 | + this.$el.attr('id', customElementID); | |
| 10061 | + }, | |
| 10062 | + renderUI: function renderUI() { | |
| 10063 | + this.renderStyles(); | |
| 10064 | + this.renderCustomClasses(); | |
| 10065 | + this.renderCustomElementID(); | |
| 10066 | + this.enqueueFonts(); | |
| 10067 | + }, | |
| 10068 | + runReadyTrigger: function runReadyTrigger() { | |
| 10069 | + var self = this; | |
| 10070 | + | |
| 10071 | + _.defer(function () { | |
| 10072 | + elementorFrontend.elementsHandler.runReadyTrigger(self.el); | |
| 10073 | + | |
| 10074 | + if (!elementorFrontend.isEditMode()) { | |
| 10075 | + return; | |
| 10076 | + } // In edit mode - handle an external elements that loaded by another elements like shortcode etc. | |
| 10077 | + | |
| 10078 | + | |
| 10079 | + self.$el.find('.elementor-element.elementor-' + self.model.get('elType') + ':not(.elementor-element-edit-mode)').each(function () { | |
| 10080 | + elementorFrontend.elementsHandler.runReadyTrigger(this); | |
| 10081 | + }); | |
| 10082 | + }); | |
| 10083 | + }, | |
| 10084 | + getID: function getID() { | |
| 10085 | + return this.model.get('id'); | |
| 10086 | + }, | |
| 10087 | + getElementUniqueID: function getElementUniqueID() { | |
| 10088 | + return 'elementor-element-' + this.getID(); | |
| 10089 | + }, | |
| 10090 | + renderHTML: function renderHTML() { | |
| 10091 | + var templateType = this.getTemplateType(), | |
| 10092 | + editModel = this.getEditModel(); | |
| 10093 | + | |
| 10094 | + if ('js' === templateType) { | |
| 10095 | + this.getEditModel().setHtmlCache(); | |
| 10096 | + this.render(); | |
| 10097 | + editModel.renderOnLeave = true; | |
| 10098 | + } else { | |
| 10099 | + editModel.renderRemoteServer(); | |
| 10100 | + } | |
| 10101 | + }, | |
| 10102 | + renderOnChange: function renderOnChange(settings) { | |
| 10103 | + if (!this.allowRender) { | |
| 10104 | + return; | |
| 10105 | + } // Make sure is correct model | |
| 10106 | + | |
| 10107 | + | |
| 10108 | + if (settings instanceof elementorModules.editor.elements.models.BaseSettings) { | |
| 10109 | + var hasChanged = settings.hasChanged(); | |
| 10110 | + var isContentChanged = !hasChanged, | |
| 10111 | + isRenderRequired = !hasChanged; | |
| 10112 | + | |
| 10113 | + _.each(settings.changedAttributes(), function (settingValue, settingKey) { | |
| 10114 | + var control = settings.getControl(settingKey); | |
| 10115 | + | |
| 10116 | + if ('_column_size' === settingKey) { | |
| 10117 | + isRenderRequired = true; | |
| 10118 | + return; | |
| 10119 | + } | |
| 10120 | + | |
| 10121 | + if (!control) { | |
| 10122 | + isRenderRequired = true; | |
| 10123 | + isContentChanged = true; | |
| 10124 | + return; | |
| 10125 | + } | |
| 10126 | + | |
| 10127 | + if ('none' !== control.render_type) { | |
| 10128 | + isRenderRequired = true; | |
| 10129 | + } | |
| 10130 | + | |
| 10131 | + if (-1 !== ['none', 'ui'].indexOf(control.render_type)) { | |
| 10132 | + return; | |
| 10133 | + } | |
| 10134 | + | |
| 10135 | + if ('template' === control.render_type || !settings.isStyleControl(settingKey) && !settings.isClassControl(settingKey) && '_element_id' !== settingKey) { | |
| 10136 | + isContentChanged = true; | |
| 10137 | + } | |
| 10138 | + }); | |
| 10139 | + | |
| 10140 | + if (!isRenderRequired) { | |
| 10141 | + return; | |
| 10142 | + } | |
| 10143 | + | |
| 10144 | + if (!isContentChanged) { | |
| 10145 | + this.renderUI(); | |
| 10146 | + return; | |
| 10147 | + } | |
| 10148 | + } // Re-render the template | |
| 10149 | + | |
| 10150 | + | |
| 10151 | + this.renderHTML(); | |
| 10152 | + }, | |
| 10153 | + getDynamicParsingSettings: function getDynamicParsingSettings() { | |
| 10154 | + var self = this; | |
| 10155 | + return { | |
| 10156 | + onServerRequestStart: function onServerRequestStart() { | |
| 10157 | + self.$el.addClass('elementor-loading'); | |
| 10158 | + }, | |
| 10159 | + onServerRequestEnd: function onServerRequestEnd() { | |
| 10160 | + self.render(); | |
| 10161 | + self.$el.removeClass('elementor-loading'); | |
| 10162 | + } | |
| 10163 | + }; | |
| 10164 | + }, | |
| 10165 | + serializeData: function serializeData() { | |
| 10166 | + var data = BaseContainer.prototype.serializeData.apply(this, arguments); | |
| 10167 | + data.settings = this.getEditModel().get('settings').parseDynamicSettings(data.settings, this.getDynamicParsingSettings()); | |
| 10168 | + return data; | |
| 10169 | + }, | |
| 10170 | + save: function save() { | |
| 10171 | + $e.route('library/save-template', { | |
| 10172 | + model: this.model | |
| 10173 | + }); | |
| 10174 | + }, | |
| 10175 | + onBeforeRender: function onBeforeRender() { | |
| 10176 | + this.renderAttributes = {}; | |
| 10177 | + }, | |
| 10178 | + onRender: function onRender() { | |
| 10179 | + this.renderUI(); | |
| 10180 | + this.runReadyTrigger(); | |
| 10181 | + | |
| 10182 | + if (this.toggleEditTools) { | |
| 10183 | + var editButton = this.ui.editButton; // Since this.ui.tools does not exist while testing. | |
| 10184 | + | |
| 10185 | + if (this.ui.tools) { | |
| 10186 | + this.ui.tools.hoverIntent(function () { | |
| 10187 | + editButton.addClass('elementor-active'); | |
| 10188 | + }, function () { | |
| 10189 | + editButton.removeClass('elementor-active'); | |
| 10190 | + }, { | |
| 10191 | + timeout: 500 | |
| 10192 | + }); | |
| 10193 | + } | |
| 10194 | + } | |
| 10195 | + }, | |
| 10196 | + onEditSettingsChanged: function onEditSettingsChanged(changedModel) { | |
| 10197 | + elementor.channels.editor.trigger('change:editSettings', changedModel, this); | |
| 10198 | + }, | |
| 10199 | + onEditButtonClick: function onEditButtonClick() { | |
| 10200 | + this.model.trigger('request:edit'); | |
| 10201 | + }, | |
| 10202 | + onEditRequest: function onEditRequest() { | |
| 10203 | + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 10204 | + | |
| 10205 | + if (!this.container.isEditable()) { | |
| 10206 | + return; | |
| 10207 | + } | |
| 10208 | + | |
| 10209 | + var model = this.getEditModel(), | |
| 10210 | + panel = elementor.getPanelView(); | |
| 10211 | + | |
| 10212 | + if ($e.routes.isPartOf('panel/editor') && panel.getCurrentPageView().model === model) { | |
| 10213 | + return; | |
| 10214 | + } | |
| 10215 | + | |
| 10216 | + if (options.scrollIntoView) { | |
| 10217 | + elementor.helpers.scrollToView(this.$el, 200); | |
| 10218 | + } | |
| 10219 | + | |
| 10220 | + $e.run('panel/editor/open', { | |
| 10221 | + model: model, | |
| 10222 | + view: this | |
| 10223 | + }); | |
| 10224 | + }, | |
| 10225 | + onDuplicateButtonClick: function onDuplicateButtonClick(event) { | |
| 10226 | + event.stopPropagation(); | |
| 10227 | + $e.run('document/elements/duplicate', { | |
| 10228 | + container: this.getContainer() | |
| 10229 | + }); | |
| 10230 | + }, | |
| 10231 | + onRemoveButtonClick: function onRemoveButtonClick(event) { | |
| 10232 | + event.stopPropagation(); | |
| 10233 | + $e.run('document/elements/delete', { | |
| 10234 | + container: this.getContainer() | |
| 10235 | + }); | |
| 10236 | + }, | |
| 10237 | + | |
| 10238 | + /* jQuery ui sortable preventing any `mousedown` event above any element, and as a result is preventing the `blur` | |
| 10239 | + * event on the currently active element. Therefor, we need to blur the active element manually. | |
| 10240 | + */ | |
| 10241 | + onMouseDown: function onMouseDown(event) { | |
| 10242 | + if (jQuery(event.target).closest('.elementor-inline-editing').length) { | |
| 10243 | + return; | |
| 10244 | + } | |
| 10245 | + | |
| 10246 | + elementorFrontend.elements.window.document.activeElement.blur(); | |
| 10247 | + }, | |
| 10248 | + onDestroy: function onDestroy() { | |
| 10249 | + this.controlsCSSParser.removeStyleFromDocument(); | |
| 10250 | + this.getEditModel().get('settings').validators = {}; | |
| 10251 | + elementor.channels.data.trigger('element:destroy', this.model); | |
| 10252 | + } | |
| 10253 | +}); | |
| 10254 | +module.exports = BaseElementView; | |
| 10255 | + | |
| 758 | 10256 | /***/ }), |
| 10257 | +/* 305 */ | |
| 10258 | +/***/ (function(module, exports, __webpack_require__) { | |
| 759 | 10259 | |
| 760 | -/***/ "../modules/web-cli/assets/js/modules/command-infra.js": | |
| 761 | -/*!*************************************************************!*\ | |
| 762 | - !*** ../modules/web-cli/assets/js/modules/command-infra.js ***! | |
| 763 | - \*************************************************************/ | |
| 764 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 10260 | +"use strict"; | |
| 765 | 10261 | |
| 10262 | + | |
| 10263 | +var SortableBehavior; | |
| 10264 | +SortableBehavior = Marionette.Behavior.extend({ | |
| 10265 | + defaults: { | |
| 10266 | + elChildType: 'widget' | |
| 10267 | + }, | |
| 10268 | + events: { | |
| 10269 | + sortstart: 'onSortStart', | |
| 10270 | + sortreceive: 'onSortReceive', | |
| 10271 | + sortupdate: 'onSortUpdate', | |
| 10272 | + sortover: 'onSortOver', | |
| 10273 | + sortout: 'onSortOut' | |
| 10274 | + }, | |
| 10275 | + initialize: function initialize() { | |
| 10276 | + this.listenTo(elementor.channels.dataEditMode, 'switch', this.onEditModeSwitched).listenTo(this.view.options.model, 'request:sort:start', this.startSort).listenTo(this.view.options.model, 'request:sort:update', this.updateSort).listenTo(this.view.options.model, 'request:sort:receive', this.receiveSort); | |
| 10277 | + }, | |
| 10278 | + onEditModeSwitched: function onEditModeSwitched(activeMode) { | |
| 10279 | + if ('edit' === activeMode) { | |
| 10280 | + this.activate(); | |
| 10281 | + } else { | |
| 10282 | + this.deactivate(); | |
| 10283 | + } | |
| 10284 | + }, | |
| 10285 | + onRender: function onRender() { | |
| 10286 | + var self = this; | |
| 10287 | + | |
| 10288 | + _.defer(function () { | |
| 10289 | + self.onEditModeSwitched(elementor.channels.dataEditMode.request('activeMode')); | |
| 10290 | + }); | |
| 10291 | + }, | |
| 10292 | + onDestroy: function onDestroy() { | |
| 10293 | + this.deactivate(); | |
| 10294 | + }, | |
| 10295 | + activate: function activate() { | |
| 10296 | + if (!elementor.userCan('design')) { | |
| 10297 | + return; | |
| 10298 | + } | |
| 10299 | + | |
| 10300 | + if (this.getChildViewContainer().sortable('instance')) { | |
| 10301 | + return; | |
| 10302 | + } | |
| 10303 | + | |
| 10304 | + var $childViewContainer = this.getChildViewContainer(), | |
| 10305 | + defaultSortableOptions = { | |
| 10306 | + connectWith: $childViewContainer.selector, | |
| 10307 | + placeholder: 'elementor-sortable-placeholder elementor-' + this.getOption('elChildType') + '-placeholder', | |
| 10308 | + cursorAt: { | |
| 10309 | + top: 20, | |
| 10310 | + left: 25 | |
| 10311 | + }, | |
| 10312 | + helper: this._getSortableHelper.bind(this), | |
| 10313 | + cancel: 'input, textarea, button, select, option, .elementor-inline-editing, .elementor-tab-title' | |
| 10314 | + }, | |
| 10315 | + sortableOptions = _.extend(defaultSortableOptions, this.view.getSortableOptions()); | |
| 10316 | + | |
| 10317 | + $childViewContainer.sortable(sortableOptions); | |
| 10318 | + }, | |
| 10319 | + _getSortableHelper: function _getSortableHelper(event, $item) { | |
| 10320 | + var model = this.view.collection.get({ | |
| 10321 | + cid: $item.data('model-cid') | |
| 10322 | + }); | |
| 10323 | + return '<div style="height: 84px; width: 125px;" class="elementor-sortable-helper elementor-sortable-helper-' + model.get('elType') + '"><div class="icon"><i class="' + model.getIcon() + '"></i></div><div class="elementor-element-title-wrapper"><div class="title">' + model.getTitle() + '</div></div></div>'; | |
| 10324 | + }, | |
| 10325 | + getChildViewContainer: function getChildViewContainer() { | |
| 10326 | + return this.view.getChildViewContainer(this.view); | |
| 10327 | + }, | |
| 10328 | + getSortedElementNewIndex: function getSortedElementNewIndex($element) { | |
| 10329 | + var draggedModel = elementor.channels.data.request('dragging:model'), | |
| 10330 | + draggedElType = draggedModel.get('elType'); | |
| 10331 | + var newIndex = $element.index(); | |
| 10332 | + | |
| 10333 | + if ('widget' === draggedElType && !elementor.config.legacyMode.elementWrappers) { | |
| 10334 | + newIndex--; | |
| 10335 | + } | |
| 10336 | + | |
| 10337 | + return newIndex; | |
| 10338 | + }, | |
| 10339 | + deactivate: function deactivate() { | |
| 10340 | + var childViewContainer = this.getChildViewContainer(); | |
| 10341 | + | |
| 10342 | + if (childViewContainer.sortable('instance')) { | |
| 10343 | + childViewContainer.sortable('destroy'); | |
| 10344 | + } | |
| 10345 | + }, | |
| 10346 | + startSort: function startSort(event, ui) { | |
| 10347 | + event.stopPropagation(); | |
| 10348 | + var container = elementor.getContainer(ui.item.attr('data-id')); | |
| 10349 | + elementor.channels.data.reply('dragging:model', container.model).reply('dragging:view', container.view).reply('dragging:parent:view', this.view).trigger('drag:start', container.model).trigger(container.model.get('elType') + ':drag:start'); | |
| 10350 | + }, | |
| 10351 | + // On sorting element | |
| 10352 | + updateSort: function updateSort(ui) { | |
| 10353 | + $e.run('document/elements/move', { | |
| 10354 | + container: elementor.channels.data.request('dragging:view').getContainer(), | |
| 10355 | + target: this.view.getContainer(), | |
| 10356 | + options: { | |
| 10357 | + at: this.getSortedElementNewIndex(ui.item) | |
| 10358 | + } | |
| 10359 | + }); | |
| 10360 | + }, | |
| 10361 | + // On receiving element from another container | |
| 10362 | + receiveSort: function receiveSort(event, ui) { | |
| 10363 | + event.stopPropagation(); | |
| 10364 | + | |
| 10365 | + if (this.view.isCollectionFilled()) { | |
| 10366 | + jQuery(ui.sender).sortable('cancel'); | |
| 10367 | + return; | |
| 10368 | + } | |
| 10369 | + | |
| 10370 | + var model = elementor.channels.data.request('dragging:model'), | |
| 10371 | + draggedElType = model.get('elType'), | |
| 10372 | + draggedIsInnerSection = 'section' === draggedElType && model.get('isInner'), | |
| 10373 | + targetIsInnerColumn = 'column' === this.view.getElementType() && this.view.isInner(); | |
| 10374 | + | |
| 10375 | + if (draggedIsInnerSection && targetIsInnerColumn) { | |
| 10376 | + jQuery(ui.sender).sortable('cancel'); | |
| 10377 | + return; | |
| 10378 | + } | |
| 10379 | + | |
| 10380 | + $e.run('document/elements/move', { | |
| 10381 | + container: elementor.channels.data.request('dragging:view').getContainer(), | |
| 10382 | + target: this.view.getContainer(), | |
| 10383 | + options: { | |
| 10384 | + at: this.getSortedElementNewIndex(ui.item) | |
| 10385 | + } | |
| 10386 | + }); | |
| 10387 | + }, | |
| 10388 | + onSortStart: function onSortStart(event, ui) { | |
| 10389 | + if ('column' === this.options.elChildType) { | |
| 10390 | + var uiData = ui.item.data('sortableItem'), | |
| 10391 | + uiItems = uiData.items, | |
| 10392 | + itemHeight = 0; | |
| 10393 | + uiItems.forEach(function (item) { | |
| 10394 | + if (item.item[0] === ui.item[0]) { | |
| 10395 | + itemHeight = item.height; | |
| 10396 | + return false; | |
| 10397 | + } | |
| 10398 | + }); | |
| 10399 | + ui.placeholder.height(itemHeight); | |
| 10400 | + } | |
| 10401 | + | |
| 10402 | + this.startSort(event, ui); | |
| 10403 | + }, | |
| 10404 | + onSortOver: function onSortOver(event) { | |
| 10405 | + event.stopPropagation(); | |
| 10406 | + var model = elementor.channels.data.request('dragging:model'); | |
| 10407 | + jQuery(event.target).addClass('elementor-draggable-over').attr({ | |
| 10408 | + 'data-dragged-element': model.get('elType'), | |
| 10409 | + 'data-dragged-is-inner': model.get('isInner') | |
| 10410 | + }); | |
| 10411 | + this.$el.addClass('elementor-dragging-on-child'); | |
| 10412 | + }, | |
| 10413 | + onSortOut: function onSortOut(event) { | |
| 10414 | + event.stopPropagation(); | |
| 10415 | + jQuery(event.target).removeClass('elementor-draggable-over').removeAttr('data-dragged-element data-dragged-is-inner'); | |
| 10416 | + this.$el.removeClass('elementor-dragging-on-child'); | |
| 10417 | + }, | |
| 10418 | + onSortReceive: function onSortReceive(event, ui) { | |
| 10419 | + this.receiveSort(event, ui); | |
| 10420 | + }, | |
| 10421 | + onSortUpdate: function onSortUpdate(event, ui) { | |
| 10422 | + event.stopPropagation(); | |
| 10423 | + | |
| 10424 | + if (this.getChildViewContainer()[0] !== ui.item.parent()[0]) { | |
| 10425 | + return; | |
| 10426 | + } | |
| 10427 | + | |
| 10428 | + this.updateSort(ui); | |
| 10429 | + }, | |
| 10430 | + onAddChild: function onAddChild(view) { | |
| 10431 | + view.$el.attr('data-model-cid', view.model.cid); | |
| 10432 | + } | |
| 10433 | +}); | |
| 10434 | +module.exports = SortableBehavior; | |
| 10435 | + | |
| 10436 | +/***/ }), | |
| 10437 | +/* 306 */, | |
| 10438 | +/* 307 */ | |
| 10439 | +/***/ (function(module, exports, __webpack_require__) { | |
| 10440 | + | |
| 766 | 10441 | "use strict"; |
| 767 | 10442 | |
| 768 | 10443 | |
| 769 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 770 | -Object.defineProperty(exports, "__esModule", ({ | |
| 10444 | +module.exports = elementorModules.Module.extend({ | |
| 10445 | + errors: [], | |
| 10446 | + __construct: function __construct(settings) { | |
| 10447 | + var customValidationMethod = settings.customValidationMethod; | |
| 10448 | + | |
| 10449 | + if (customValidationMethod) { | |
| 10450 | + this.validationMethod = customValidationMethod; | |
| 10451 | + } | |
| 10452 | + }, | |
| 10453 | + getDefaultSettings: function getDefaultSettings() { | |
| 10454 | + return { | |
| 10455 | + validationTerms: {} | |
| 10456 | + }; | |
| 10457 | + }, | |
| 10458 | + isValid: function isValid() { | |
| 10459 | + var validationErrors = this.validationMethod.apply(this, arguments); | |
| 10460 | + | |
| 10461 | + if (validationErrors.length) { | |
| 10462 | + this.errors = validationErrors; | |
| 10463 | + return false; | |
| 10464 | + } | |
| 10465 | + | |
| 10466 | + return true; | |
| 10467 | + }, | |
| 10468 | + validationMethod: function validationMethod(newValue) { | |
| 10469 | + var validationTerms = this.getSettings('validationTerms'), | |
| 10470 | + errors = []; | |
| 10471 | + | |
| 10472 | + if (validationTerms.required) { | |
| 10473 | + if (!('' + newValue).length) { | |
| 10474 | + errors.push('Required value is empty'); | |
| 10475 | + } | |
| 10476 | + } | |
| 10477 | + | |
| 10478 | + return errors; | |
| 10479 | + } | |
| 10480 | +}); | |
| 10481 | + | |
| 10482 | +/***/ }), | |
| 10483 | +/* 308 */, | |
| 10484 | +/* 309 */ | |
| 10485 | +/***/ (function(module, exports, __webpack_require__) { | |
| 10486 | + | |
| 10487 | +"use strict"; | |
| 10488 | + | |
| 10489 | +// 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined) | |
| 10490 | +var $export = __webpack_require__(38); | |
| 10491 | +var $find = __webpack_require__(190)(6); | |
| 10492 | +var KEY = 'findIndex'; | |
| 10493 | +var forced = true; | |
| 10494 | +// Shouldn't skip holes | |
| 10495 | +if (KEY in []) Array(1)[KEY](function () { forced = false; }); | |
| 10496 | +$export($export.P + $export.F * forced, 'Array', { | |
| 10497 | + findIndex: function findIndex(callbackfn /* , that = undefined */) { | |
| 10498 | + return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); | |
| 10499 | + } | |
| 10500 | +}); | |
| 10501 | +__webpack_require__(90)(KEY); | |
| 10502 | + | |
| 10503 | + | |
| 10504 | +/***/ }), | |
| 10505 | +/* 310 */ | |
| 10506 | +/***/ (function(module, exports, __webpack_require__) { | |
| 10507 | + | |
| 10508 | +"use strict"; | |
| 10509 | + | |
| 10510 | +var global = __webpack_require__(18); | |
| 10511 | +var dP = __webpack_require__(51); | |
| 10512 | +var DESCRIPTORS = __webpack_require__(28); | |
| 10513 | +var SPECIES = __webpack_require__(13)('species'); | |
| 10514 | + | |
| 10515 | +module.exports = function (KEY) { | |
| 10516 | + var C = global[KEY]; | |
| 10517 | + if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, { | |
| 10518 | + configurable: true, | |
| 10519 | + get: function () { return this; } | |
| 10520 | + }); | |
| 10521 | +}; | |
| 10522 | + | |
| 10523 | + | |
| 10524 | +/***/ }), | |
| 10525 | +/* 311 */ | |
| 10526 | +/***/ (function(module, exports, __webpack_require__) { | |
| 10527 | + | |
| 10528 | +var isObject = __webpack_require__(31); | |
| 10529 | +var setPrototypeOf = __webpack_require__(343).set; | |
| 10530 | +module.exports = function (that, target, C) { | |
| 10531 | + var S = target.constructor; | |
| 10532 | + var P; | |
| 10533 | + if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) { | |
| 10534 | + setPrototypeOf(that, P); | |
| 10535 | + } return that; | |
| 10536 | +}; | |
| 10537 | + | |
| 10538 | + | |
| 10539 | +/***/ }), | |
| 10540 | +/* 312 */ | |
| 10541 | +/***/ (function(module, exports, __webpack_require__) { | |
| 10542 | + | |
| 10543 | +var pIE = __webpack_require__(344); | |
| 10544 | +var createDesc = __webpack_require__(106); | |
| 10545 | +var toIObject = __webpack_require__(104); | |
| 10546 | +var toPrimitive = __webpack_require__(127); | |
| 10547 | +var has = __webpack_require__(64); | |
| 10548 | +var IE8_DOM_DEFINE = __webpack_require__(135); | |
| 10549 | +var gOPD = Object.getOwnPropertyDescriptor; | |
| 10550 | + | |
| 10551 | +exports.f = __webpack_require__(28) ? gOPD : function getOwnPropertyDescriptor(O, P) { | |
| 10552 | + O = toIObject(O); | |
| 10553 | + P = toPrimitive(P, true); | |
| 10554 | + if (IE8_DOM_DEFINE) try { | |
| 10555 | + return gOPD(O, P); | |
| 10556 | + } catch (e) { /* empty */ } | |
| 10557 | + if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]); | |
| 10558 | +}; | |
| 10559 | + | |
| 10560 | + | |
| 10561 | +/***/ }), | |
| 10562 | +/* 313 */ | |
| 10563 | +/***/ (function(module, exports, __webpack_require__) { | |
| 10564 | + | |
| 10565 | +// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) | |
| 10566 | +var $keys = __webpack_require__(220); | |
| 10567 | +var hiddenKeys = __webpack_require__(151).concat('length', 'prototype'); | |
| 10568 | + | |
| 10569 | +exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { | |
| 10570 | + return $keys(O, hiddenKeys); | |
| 10571 | +}; | |
| 10572 | + | |
| 10573 | + | |
| 10574 | +/***/ }), | |
| 10575 | +/* 314 */ | |
| 10576 | +/***/ (function(module, exports, __webpack_require__) { | |
| 10577 | + | |
| 10578 | +"use strict"; | |
| 10579 | + | |
| 10580 | + | |
| 10581 | +var _interopRequireWildcard = __webpack_require__(34); | |
| 10582 | + | |
| 10583 | +var _interopRequireDefault = __webpack_require__(0); | |
| 10584 | + | |
| 10585 | +var _Object$defineProperty = __webpack_require__(1); | |
| 10586 | + | |
| 10587 | +_Object$defineProperty(exports, "__esModule", { | |
| 771 | 10588 | value: true |
| 772 | -})); | |
| 773 | -exports["default"] = void 0; | |
| 774 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 775 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 776 | -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 777 | -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 778 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 779 | -var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); | |
| 780 | -var _argsObject = _interopRequireDefault(__webpack_require__(/*! elementor-assets-js/modules/imports/args-object */ "../assets/dev/js/modules/imports/args-object.js")); | |
| 781 | -var _deprecation = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/deprecation */ "../modules/web-cli/assets/js/utils/deprecation.js")); | |
| 782 | -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)); } | |
| 783 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 784 | -/** | |
| 785 | - * @typedef {import('../modules/component-base')} ComponentBase | |
| 786 | - */ | |
| 787 | -var CommandInfra = exports["default"] = /*#__PURE__*/function (_ArgsObject) { | |
| 788 | - /** | |
| 789 | - * Function constructor(). | |
| 790 | - * | |
| 791 | - * Create Commands Base. | |
| 792 | - * | |
| 793 | - * @param {{}} args | |
| 794 | - */ | |
| 795 | - function CommandInfra() { | |
| 796 | - var _this; | |
| 797 | - var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 798 | - (0, _classCallCheck2.default)(this, CommandInfra); | |
| 799 | - _this = _callSuper(this, CommandInfra, [args]); | |
| 800 | - if (!_this.constructor.registerConfig) { | |
| 801 | - throw RangeError('Doing it wrong: Each command type should have `registerConfig`.'); | |
| 10589 | +}); | |
| 10590 | + | |
| 10591 | +exports.default = void 0; | |
| 10592 | + | |
| 10593 | +var _values = _interopRequireDefault(__webpack_require__(54)); | |
| 10594 | + | |
| 10595 | +__webpack_require__(24); | |
| 10596 | + | |
| 10597 | +var _assign = _interopRequireDefault(__webpack_require__(140)); | |
| 10598 | + | |
| 10599 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 10600 | + | |
| 10601 | +var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(45)); | |
| 10602 | + | |
| 10603 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 10604 | + | |
| 10605 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 10606 | + | |
| 10607 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 10608 | + | |
| 10609 | +var _defineProperty2 = _interopRequireDefault(__webpack_require__(27)); | |
| 10610 | + | |
| 10611 | +var _commandBase = _interopRequireDefault(__webpack_require__(23)); | |
| 10612 | + | |
| 10613 | +var errors = _interopRequireWildcard(__webpack_require__(354)); | |
| 10614 | + | |
| 10615 | +var CommandData = /*#__PURE__*/function (_CommandBase) { | |
| 10616 | + (0, _inherits2.default)(CommandData, _CommandBase); | |
| 10617 | + | |
| 10618 | + var _super = (0, _createSuper2.default)(CommandData); | |
| 10619 | + | |
| 10620 | + (0, _createClass2.default)(CommandData, null, [{ | |
| 10621 | + key: "getInstanceType", | |
| 10622 | + | |
| 10623 | + /** | |
| 10624 | + * Data returned from remote. | |
| 10625 | + * | |
| 10626 | + * @type {*} | |
| 10627 | + */ | |
| 10628 | + | |
| 10629 | + /** | |
| 10630 | + * Fetch type. | |
| 10631 | + * | |
| 10632 | + * @type {DataTypes} | |
| 10633 | + */ | |
| 10634 | + value: function getInstanceType() { | |
| 10635 | + return 'CommandData'; | |
| 802 | 10636 | } |
| 10637 | + }]); | |
| 803 | 10638 | |
| 804 | - // Acknowledge self about which command it run. | |
| 805 | - _this.command = _this.constructor.getCommand(); | |
| 10639 | + function CommandData(args) { | |
| 10640 | + var _this$args$options; | |
| 806 | 10641 | |
| 807 | - // Assign instance of current component. | |
| 808 | - _this.component = _this.constructor.getComponent(); | |
| 10642 | + var _this; | |
| 809 | 10643 | |
| 810 | - // Who ever need do something before without `super` the constructor can use `initialize` method. | |
| 811 | - _this.initialize(args); | |
| 10644 | + var commandsAPI = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : $e.data; | |
| 10645 | + (0, _classCallCheck2.default)(this, CommandData); | |
| 10646 | + _this = _super.call(this, args, commandsAPI); | |
| 10647 | + (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "data", void 0); | |
| 10648 | + (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "type", void 0); | |
| 812 | 10649 | |
| 813 | - // Refresh args, maybe the changed via `initialize`. | |
| 814 | - args = _this.args; | |
| 10650 | + if ((_this$args$options = _this.args.options) === null || _this$args$options === void 0 ? void 0 : _this$args$options.type) { | |
| 10651 | + _this.type = _this.args.options.type; | |
| 10652 | + } | |
| 815 | 10653 | |
| 816 | - // Validate args before run. | |
| 817 | - _this.validateArgs(args); | |
| 818 | 10654 | return _this; |
| 819 | 10655 | } |
| 820 | - | |
| 821 | 10656 | /** |
| 822 | - * Function initialize(). | |
| 10657 | + * Function getEndpointFormat(). | |
| 823 | 10658 | * |
| 824 | - * Initialize command, called after construction. | |
| 825 | - * | |
| 826 | - * @param {{}} args | |
| 10659 | + * @returns {(null|string)} | |
| 827 | 10660 | */ |
| 828 | - (0, _inherits2.default)(CommandInfra, _ArgsObject); | |
| 829 | - return (0, _createClass2.default)(CommandInfra, [{ | |
| 830 | - key: "currentCommand", | |
| 831 | - get: | |
| 10661 | + | |
| 10662 | + | |
| 10663 | + (0, _createClass2.default)(CommandData, [{ | |
| 10664 | + key: "getApplyMethods", | |
| 10665 | + | |
| 832 | 10666 | /** |
| 833 | - * @deprecated since 3.7.0, use `this.command` instead. | |
| 10667 | + * @param {DataTypes} type | |
| 10668 | + * | |
| 10669 | + * @returns {boolean|{before: (function(*=): {}), after: (function({}, *=): {})}} | |
| 834 | 10670 | */ |
| 835 | - function get() { | |
| 836 | - _deprecation.default.deprecated('this.currentCommand', '3.7.0', 'this.command'); | |
| 837 | - return this.command; | |
| 10671 | + value: function getApplyMethods() { | |
| 10672 | + var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.type; | |
| 10673 | + var before, after; | |
| 10674 | + | |
| 10675 | + switch (type) { | |
| 10676 | + case 'create': | |
| 10677 | + before = this.applyBeforeCreate; | |
| 10678 | + after = this.applyAfterCreate; | |
| 10679 | + break; | |
| 10680 | + | |
| 10681 | + case 'delete': | |
| 10682 | + before = this.applyBeforeDelete; | |
| 10683 | + after = this.applyAfterDelete; | |
| 10684 | + break; | |
| 10685 | + | |
| 10686 | + case 'get': | |
| 10687 | + before = this.applyBeforeGet; | |
| 10688 | + after = this.applyAfterGet; | |
| 10689 | + break; | |
| 10690 | + | |
| 10691 | + case 'update': | |
| 10692 | + before = this.applyBeforeUpdate; | |
| 10693 | + after = this.applyAfterUpdate; | |
| 10694 | + break; | |
| 10695 | + | |
| 10696 | + default: | |
| 10697 | + return false; | |
| 10698 | + } | |
| 10699 | + | |
| 10700 | + return { | |
| 10701 | + before: before, | |
| 10702 | + after: after | |
| 10703 | + }; | |
| 838 | 10704 | } |
| 10705 | + /** | |
| 10706 | + * Function getRequestData(). | |
| 10707 | + * | |
| 10708 | + * @returns {RequestData} | |
| 10709 | + */ | |
| 10710 | + | |
| 839 | 10711 | }, { |
| 840 | - key: "initialize", | |
| 841 | - value: function initialize() { | |
| 10712 | + key: "getRequestData", | |
| 10713 | + value: function getRequestData() { | |
| 10714 | + return { | |
| 10715 | + type: this.type, | |
| 10716 | + args: this.args, | |
| 10717 | + timestamp: new Date().getTime(), | |
| 10718 | + component: this.component, | |
| 10719 | + command: this.currentCommand, | |
| 10720 | + endpoint: $e.data.commandToEndpoint(this.currentCommand, elementorCommon.helpers.cloneObject(this.args), this.constructor.getEndpointFormat()) | |
| 10721 | + }; | |
| 10722 | + } | |
| 10723 | + }, { | |
| 10724 | + key: "apply", | |
| 10725 | + value: function apply() { | |
| 10726 | + var _this2 = this; | |
| 10727 | + | |
| 10728 | + var applyMethods = this.getApplyMethods(); // Run 'before' method. | |
| 10729 | + | |
| 10730 | + this.args = applyMethods.before(this.args); | |
| 10731 | + var requestData = this.getRequestData(); | |
| 10732 | + return $e.data.fetch(requestData).then(function (data) { | |
| 10733 | + _this2.data = data; // Run 'after' method. | |
| 10734 | + | |
| 10735 | + _this2.data = applyMethods.after(data, _this2.args); | |
| 10736 | + _this2.data = { | |
| 10737 | + data: _this2.data | |
| 10738 | + }; // Append requestData. | |
| 10739 | + | |
| 10740 | + _this2.data = (0, _assign.default)({ | |
| 10741 | + __requestData__: requestData | |
| 10742 | + }, _this2.data); | |
| 10743 | + return _this2.data; | |
| 10744 | + }); | |
| 10745 | + } | |
| 10746 | + /** | |
| 10747 | + * @param [args={}] | |
| 10748 | + * @returns {{}} filtered args | |
| 10749 | + */ | |
| 10750 | + | |
| 10751 | + }, { | |
| 10752 | + key: "applyBeforeCreate", | |
| 10753 | + value: function applyBeforeCreate() { | |
| 842 | 10754 | var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
| 843 | - } // eslint-disable-line no-unused-vars | |
| 10755 | + return args; | |
| 10756 | + } | |
| 10757 | + /** | |
| 10758 | + * @param {{}} data | |
| 10759 | + * @param [args={}] | |
| 10760 | + * @returns {{}} filtered result | |
| 10761 | + */ | |
| 844 | 10762 | |
| 10763 | + }, { | |
| 10764 | + key: "applyAfterCreate", | |
| 10765 | + value: function applyAfterCreate(data) { | |
| 10766 | + var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; | |
| 10767 | + // eslint-disable-line no-unused-vars | |
| 10768 | + return data; | |
| 10769 | + } | |
| 845 | 10770 | /** |
| 846 | - * Function validateArgs(). | |
| 847 | - * | |
| 848 | - * Validate command arguments. | |
| 849 | - * | |
| 850 | - * @param {{}} args | |
| 10771 | + * @param [args={}] | |
| 10772 | + * @returns {{}} filtered args | |
| 851 | 10773 | */ |
| 10774 | + | |
| 852 | 10775 | }, { |
| 853 | - key: "validateArgs", | |
| 854 | - value: function validateArgs() { | |
| 10776 | + key: "applyBeforeDelete", | |
| 10777 | + value: function applyBeforeDelete() { | |
| 855 | 10778 | var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
| 856 | - } // eslint-disable-line no-unused-vars | |
| 10779 | + return args; | |
| 10780 | + } | |
| 10781 | + /** | |
| 10782 | + * @param {{}} data | |
| 10783 | + * @param [args={}] | |
| 10784 | + * @returns {{}} filtered result | |
| 10785 | + */ | |
| 857 | 10786 | |
| 858 | - // eslint-disable-next-line jsdoc/require-returns-check | |
| 10787 | + }, { | |
| 10788 | + key: "applyAfterDelete", | |
| 10789 | + value: function applyAfterDelete(data) { | |
| 10790 | + var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; | |
| 10791 | + // eslint-disable-line no-unused-vars | |
| 10792 | + return data; | |
| 10793 | + } | |
| 859 | 10794 | /** |
| 860 | - * Function apply(). | |
| 861 | - * | |
| 862 | - * Do the actual command. | |
| 863 | - * | |
| 864 | - * @param {{}} args | |
| 865 | - * | |
| 866 | - * @return {*} Command results. | |
| 10795 | + * @param [args={}] | |
| 10796 | + * @returns {{}} filtered args | |
| 867 | 10797 | */ |
| 10798 | + | |
| 868 | 10799 | }, { |
| 869 | - key: "apply", | |
| 870 | - value: function apply() { | |
| 10800 | + key: "applyBeforeGet", | |
| 10801 | + value: function applyBeforeGet() { | |
| 871 | 10802 | var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
| 10803 | + return args; | |
| 10804 | + } | |
| 10805 | + /** | |
| 10806 | + * @param {{}} data | |
| 10807 | + * @param [args={}] | |
| 10808 | + * @returns {{}} filtered result | |
| 10809 | + */ | |
| 10810 | + | |
| 10811 | + }, { | |
| 10812 | + key: "applyAfterGet", | |
| 10813 | + value: function applyAfterGet(data) { | |
| 10814 | + var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; | |
| 872 | 10815 | // eslint-disable-line no-unused-vars |
| 873 | - elementorModules.ForceMethodImplementation(); | |
| 10816 | + return data; | |
| 874 | 10817 | } |
| 10818 | + /** | |
| 10819 | + * @param [args={}] | |
| 10820 | + * @returns {{}} filtered args | |
| 10821 | + */ | |
| 875 | 10822 | |
| 10823 | + }, { | |
| 10824 | + key: "applyBeforeUpdate", | |
| 10825 | + value: function applyBeforeUpdate() { | |
| 10826 | + var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 10827 | + return args; | |
| 10828 | + } | |
| 876 | 10829 | /** |
| 877 | - * Function run(). | |
| 10830 | + * @param {{}} data | |
| 10831 | + * @param [args={}] | |
| 10832 | + * @returns {{}} filtered result | |
| 10833 | + */ | |
| 10834 | + | |
| 10835 | + }, { | |
| 10836 | + key: "applyAfterUpdate", | |
| 10837 | + value: function applyAfterUpdate(data) { | |
| 10838 | + var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; | |
| 10839 | + // eslint-disable-line no-unused-vars | |
| 10840 | + return data; | |
| 10841 | + } | |
| 10842 | + /** | |
| 10843 | + * Called after apply() failed. | |
| 878 | 10844 | * |
| 879 | - * Run command with history & hooks. | |
| 880 | - * | |
| 881 | - * @return {*} Command results. | |
| 10845 | + * @param e | |
| 882 | 10846 | */ |
| 10847 | + | |
| 883 | 10848 | }, { |
| 884 | - key: "run", | |
| 885 | - value: function run() { | |
| 886 | - return this.apply(this.args); | |
| 10849 | + key: "onCatchApply", | |
| 10850 | + value: function onCatchApply(e) { | |
| 10851 | + var _e, _e$data; | |
| 10852 | + | |
| 10853 | + // TODO: If the errors that returns from the server is consistent remove the '?' from 'e' | |
| 10854 | + var status = ((_e = e) === null || _e === void 0 ? void 0 : (_e$data = _e.data) === null || _e$data === void 0 ? void 0 : _e$data.status) || 0, | |
| 10855 | + dataError = (0, _values.default)(errors).find(function (error) { | |
| 10856 | + return error.getStatus() === status; | |
| 10857 | + }); | |
| 10858 | + e = dataError.create(e.message, e.code, e.data || []); | |
| 10859 | + this.runCatchHooks(e); | |
| 10860 | + e.notify(); | |
| 887 | 10861 | } |
| 10862 | + }], [{ | |
| 10863 | + key: "getEndpointFormat", | |
| 10864 | + value: function getEndpointFormat() { | |
| 10865 | + return null; | |
| 10866 | + } | |
| 10867 | + }]); | |
| 10868 | + return CommandData; | |
| 10869 | +}(_commandBase.default); | |
| 888 | 10870 | |
| 10871 | +exports.default = CommandData; | |
| 10872 | + | |
| 10873 | +/***/ }), | |
| 10874 | +/* 315 */ | |
| 10875 | +/***/ (function(module, exports, __webpack_require__) { | |
| 10876 | + | |
| 10877 | +module.exports = __webpack_require__(316); | |
| 10878 | + | |
| 10879 | +/***/ }), | |
| 10880 | +/* 316 */ | |
| 10881 | +/***/ (function(module, exports, __webpack_require__) { | |
| 10882 | + | |
| 10883 | +__webpack_require__(92); | |
| 10884 | +__webpack_require__(57); | |
| 10885 | +__webpack_require__(59); | |
| 10886 | +__webpack_require__(317); | |
| 10887 | +__webpack_require__(319); | |
| 10888 | +__webpack_require__(322); | |
| 10889 | +__webpack_require__(323); | |
| 10890 | +module.exports = __webpack_require__(6).Map; | |
| 10891 | + | |
| 10892 | + | |
| 10893 | +/***/ }), | |
| 10894 | +/* 317 */ | |
| 10895 | +/***/ (function(module, exports, __webpack_require__) { | |
| 10896 | + | |
| 10897 | +"use strict"; | |
| 10898 | + | |
| 10899 | +var strong = __webpack_require__(318); | |
| 10900 | +var validate = __webpack_require__(113); | |
| 10901 | +var MAP = 'Map'; | |
| 10902 | + | |
| 10903 | +// 23.1 Map Objects | |
| 10904 | +module.exports = __webpack_require__(223)(MAP, function (get) { | |
| 10905 | + return function Map() { return get(this, arguments.length > 0 ? arguments[0] : undefined); }; | |
| 10906 | +}, { | |
| 10907 | + // 23.1.3.6 Map.prototype.get(key) | |
| 10908 | + get: function get(key) { | |
| 10909 | + var entry = strong.getEntry(validate(this, MAP), key); | |
| 10910 | + return entry && entry.v; | |
| 10911 | + }, | |
| 10912 | + // 23.1.3.9 Map.prototype.set(key, value) | |
| 10913 | + set: function set(key, value) { | |
| 10914 | + return strong.def(validate(this, MAP), key === 0 ? 0 : key, value); | |
| 10915 | + } | |
| 10916 | +}, strong, true); | |
| 10917 | + | |
| 10918 | + | |
| 10919 | +/***/ }), | |
| 10920 | +/* 318 */ | |
| 10921 | +/***/ (function(module, exports, __webpack_require__) { | |
| 10922 | + | |
| 10923 | +"use strict"; | |
| 10924 | + | |
| 10925 | +var dP = __webpack_require__(15).f; | |
| 10926 | +var create = __webpack_require__(47); | |
| 10927 | +var redefineAll = __webpack_require__(121); | |
| 10928 | +var ctx = __webpack_require__(29); | |
| 10929 | +var anInstance = __webpack_require__(120); | |
| 10930 | +var forOf = __webpack_require__(79); | |
| 10931 | +var $iterDefine = __webpack_require__(96); | |
| 10932 | +var step = __webpack_require__(139); | |
| 10933 | +var setSpecies = __webpack_require__(219); | |
| 10934 | +var DESCRIPTORS = __webpack_require__(14); | |
| 10935 | +var fastKey = __webpack_require__(66).fastKey; | |
| 10936 | +var validate = __webpack_require__(113); | |
| 10937 | +var SIZE = DESCRIPTORS ? '_s' : 'size'; | |
| 10938 | + | |
| 10939 | +var getEntry = function (that, key) { | |
| 10940 | + // fast case | |
| 10941 | + var index = fastKey(key); | |
| 10942 | + var entry; | |
| 10943 | + if (index !== 'F') return that._i[index]; | |
| 10944 | + // frozen object case | |
| 10945 | + for (entry = that._f; entry; entry = entry.n) { | |
| 10946 | + if (entry.k == key) return entry; | |
| 10947 | + } | |
| 10948 | +}; | |
| 10949 | + | |
| 10950 | +module.exports = { | |
| 10951 | + getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { | |
| 10952 | + var C = wrapper(function (that, iterable) { | |
| 10953 | + anInstance(that, C, NAME, '_i'); | |
| 10954 | + that._t = NAME; // collection type | |
| 10955 | + that._i = create(null); // index | |
| 10956 | + that._f = undefined; // first entry | |
| 10957 | + that._l = undefined; // last entry | |
| 10958 | + that[SIZE] = 0; // size | |
| 10959 | + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); | |
| 10960 | + }); | |
| 10961 | + redefineAll(C.prototype, { | |
| 10962 | + // 23.1.3.1 Map.prototype.clear() | |
| 10963 | + // 23.2.3.2 Set.prototype.clear() | |
| 10964 | + clear: function clear() { | |
| 10965 | + for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) { | |
| 10966 | + entry.r = true; | |
| 10967 | + if (entry.p) entry.p = entry.p.n = undefined; | |
| 10968 | + delete data[entry.i]; | |
| 10969 | + } | |
| 10970 | + that._f = that._l = undefined; | |
| 10971 | + that[SIZE] = 0; | |
| 10972 | + }, | |
| 10973 | + // 23.1.3.3 Map.prototype.delete(key) | |
| 10974 | + // 23.2.3.4 Set.prototype.delete(value) | |
| 10975 | + 'delete': function (key) { | |
| 10976 | + var that = validate(this, NAME); | |
| 10977 | + var entry = getEntry(that, key); | |
| 10978 | + if (entry) { | |
| 10979 | + var next = entry.n; | |
| 10980 | + var prev = entry.p; | |
| 10981 | + delete that._i[entry.i]; | |
| 10982 | + entry.r = true; | |
| 10983 | + if (prev) prev.n = next; | |
| 10984 | + if (next) next.p = prev; | |
| 10985 | + if (that._f == entry) that._f = next; | |
| 10986 | + if (that._l == entry) that._l = prev; | |
| 10987 | + that[SIZE]--; | |
| 10988 | + } return !!entry; | |
| 10989 | + }, | |
| 10990 | + // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) | |
| 10991 | + // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) | |
| 10992 | + forEach: function forEach(callbackfn /* , that = undefined */) { | |
| 10993 | + validate(this, NAME); | |
| 10994 | + var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); | |
| 10995 | + var entry; | |
| 10996 | + while (entry = entry ? entry.n : this._f) { | |
| 10997 | + f(entry.v, entry.k, this); | |
| 10998 | + // revert to the last existing entry | |
| 10999 | + while (entry && entry.r) entry = entry.p; | |
| 11000 | + } | |
| 11001 | + }, | |
| 11002 | + // 23.1.3.7 Map.prototype.has(key) | |
| 11003 | + // 23.2.3.7 Set.prototype.has(value) | |
| 11004 | + has: function has(key) { | |
| 11005 | + return !!getEntry(validate(this, NAME), key); | |
| 11006 | + } | |
| 11007 | + }); | |
| 11008 | + if (DESCRIPTORS) dP(C.prototype, 'size', { | |
| 11009 | + get: function () { | |
| 11010 | + return validate(this, NAME)[SIZE]; | |
| 11011 | + } | |
| 11012 | + }); | |
| 11013 | + return C; | |
| 11014 | + }, | |
| 11015 | + def: function (that, key, value) { | |
| 11016 | + var entry = getEntry(that, key); | |
| 11017 | + var prev, index; | |
| 11018 | + // change existing entry | |
| 11019 | + if (entry) { | |
| 11020 | + entry.v = value; | |
| 11021 | + // create new entry | |
| 11022 | + } else { | |
| 11023 | + that._l = entry = { | |
| 11024 | + i: index = fastKey(key, true), // <- index | |
| 11025 | + k: key, // <- key | |
| 11026 | + v: value, // <- value | |
| 11027 | + p: prev = that._l, // <- previous entry | |
| 11028 | + n: undefined, // <- next entry | |
| 11029 | + r: false // <- removed | |
| 11030 | + }; | |
| 11031 | + if (!that._f) that._f = entry; | |
| 11032 | + if (prev) prev.n = entry; | |
| 11033 | + that[SIZE]++; | |
| 11034 | + // add to index | |
| 11035 | + if (index !== 'F') that._i[index] = entry; | |
| 11036 | + } return that; | |
| 11037 | + }, | |
| 11038 | + getEntry: getEntry, | |
| 11039 | + setStrong: function (C, NAME, IS_MAP) { | |
| 11040 | + // add .keys, .values, .entries, [@@iterator] | |
| 11041 | + // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 | |
| 11042 | + $iterDefine(C, NAME, function (iterated, kind) { | |
| 11043 | + this._t = validate(iterated, NAME); // target | |
| 11044 | + this._k = kind; // kind | |
| 11045 | + this._l = undefined; // previous | |
| 11046 | + }, function () { | |
| 11047 | + var that = this; | |
| 11048 | + var kind = that._k; | |
| 11049 | + var entry = that._l; | |
| 11050 | + // revert to the last existing entry | |
| 11051 | + while (entry && entry.r) entry = entry.p; | |
| 11052 | + // get next entry | |
| 11053 | + if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) { | |
| 11054 | + // or finish the iteration | |
| 11055 | + that._t = undefined; | |
| 11056 | + return step(1); | |
| 11057 | + } | |
| 11058 | + // return step by kind | |
| 11059 | + if (kind == 'keys') return step(0, entry.k); | |
| 11060 | + if (kind == 'values') return step(0, entry.v); | |
| 11061 | + return step(0, [entry.k, entry.v]); | |
| 11062 | + }, IS_MAP ? 'entries' : 'values', !IS_MAP, true); | |
| 11063 | + | |
| 11064 | + // add [@@species], 23.1.2.2, 23.2.2.2 | |
| 11065 | + setSpecies(NAME); | |
| 11066 | + } | |
| 11067 | +}; | |
| 11068 | + | |
| 11069 | + | |
| 11070 | +/***/ }), | |
| 11071 | +/* 319 */ | |
| 11072 | +/***/ (function(module, exports, __webpack_require__) { | |
| 11073 | + | |
| 11074 | +// https://github.com/DavidBruant/Map-Set.prototype.toJSON | |
| 11075 | +var $export = __webpack_require__(7); | |
| 11076 | + | |
| 11077 | +$export($export.P + $export.R, 'Map', { toJSON: __webpack_require__(320)('Map') }); | |
| 11078 | + | |
| 11079 | + | |
| 11080 | +/***/ }), | |
| 11081 | +/* 320 */ | |
| 11082 | +/***/ (function(module, exports, __webpack_require__) { | |
| 11083 | + | |
| 11084 | +// https://github.com/DavidBruant/Map-Set.prototype.toJSON | |
| 11085 | +var classof = __webpack_require__(99); | |
| 11086 | +var from = __webpack_require__(321); | |
| 11087 | +module.exports = function (NAME) { | |
| 11088 | + return function toJSON() { | |
| 11089 | + if (classof(this) != NAME) throw TypeError(NAME + "#toJSON isn't generic"); | |
| 11090 | + return from(this); | |
| 11091 | + }; | |
| 11092 | +}; | |
| 11093 | + | |
| 11094 | + | |
| 11095 | +/***/ }), | |
| 11096 | +/* 321 */ | |
| 11097 | +/***/ (function(module, exports, __webpack_require__) { | |
| 11098 | + | |
| 11099 | +var forOf = __webpack_require__(79); | |
| 11100 | + | |
| 11101 | +module.exports = function (iter, ITERATOR) { | |
| 11102 | + var result = []; | |
| 11103 | + forOf(iter, false, result.push, result, ITERATOR); | |
| 11104 | + return result; | |
| 11105 | +}; | |
| 11106 | + | |
| 11107 | + | |
| 11108 | +/***/ }), | |
| 11109 | +/* 322 */ | |
| 11110 | +/***/ (function(module, exports, __webpack_require__) { | |
| 11111 | + | |
| 11112 | +// https://tc39.github.io/proposal-setmap-offrom/#sec-map.of | |
| 11113 | +__webpack_require__(224)('Map'); | |
| 11114 | + | |
| 11115 | + | |
| 11116 | +/***/ }), | |
| 11117 | +/* 323 */ | |
| 11118 | +/***/ (function(module, exports, __webpack_require__) { | |
| 11119 | + | |
| 11120 | +// https://tc39.github.io/proposal-setmap-offrom/#sec-map.from | |
| 11121 | +__webpack_require__(225)('Map'); | |
| 11122 | + | |
| 11123 | + | |
| 11124 | +/***/ }), | |
| 11125 | +/* 324 */ | |
| 11126 | +/***/ (function(module, exports) { | |
| 11127 | + | |
| 11128 | +function _isNativeFunction(fn) { | |
| 11129 | + return Function.toString.call(fn).indexOf("[native code]") !== -1; | |
| 11130 | +} | |
| 11131 | + | |
| 11132 | +module.exports = _isNativeFunction; | |
| 11133 | + | |
| 11134 | +/***/ }), | |
| 11135 | +/* 325 */ | |
| 11136 | +/***/ (function(module, exports, __webpack_require__) { | |
| 11137 | + | |
| 11138 | +var _Reflect$construct = __webpack_require__(95); | |
| 11139 | + | |
| 11140 | +var setPrototypeOf = __webpack_require__(119); | |
| 11141 | + | |
| 11142 | +var isNativeReflectConstruct = __webpack_require__(138); | |
| 11143 | + | |
| 11144 | +function _construct(Parent, args, Class) { | |
| 11145 | + if (isNativeReflectConstruct()) { | |
| 11146 | + module.exports = _construct = _Reflect$construct; | |
| 11147 | + } else { | |
| 11148 | + module.exports = _construct = function _construct(Parent, args, Class) { | |
| 11149 | + var a = [null]; | |
| 11150 | + a.push.apply(a, args); | |
| 11151 | + var Constructor = Function.bind.apply(Parent, a); | |
| 11152 | + var instance = new Constructor(); | |
| 11153 | + if (Class) setPrototypeOf(instance, Class.prototype); | |
| 11154 | + return instance; | |
| 11155 | + }; | |
| 11156 | + } | |
| 11157 | + | |
| 11158 | + return _construct.apply(null, arguments); | |
| 11159 | +} | |
| 11160 | + | |
| 11161 | +module.exports = _construct; | |
| 11162 | + | |
| 11163 | +/***/ }), | |
| 11164 | +/* 326 */ | |
| 11165 | +/***/ (function(module, exports, __webpack_require__) { | |
| 11166 | + | |
| 11167 | +"use strict"; | |
| 11168 | + | |
| 11169 | + | |
| 11170 | +var _interopRequireDefault = __webpack_require__(0); | |
| 11171 | + | |
| 11172 | +var _Object$defineProperty = __webpack_require__(1); | |
| 11173 | + | |
| 11174 | +_Object$defineProperty(exports, "__esModule", { | |
| 11175 | + value: true | |
| 11176 | +}); | |
| 11177 | + | |
| 11178 | +exports.default = void 0; | |
| 11179 | + | |
| 11180 | +var _objectSpread2 = _interopRequireDefault(__webpack_require__(182)); | |
| 11181 | + | |
| 11182 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 11183 | + | |
| 11184 | +var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(45)); | |
| 11185 | + | |
| 11186 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 11187 | + | |
| 11188 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 11189 | + | |
| 11190 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 11191 | + | |
| 11192 | +var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(300)); | |
| 11193 | + | |
| 11194 | +var _defineProperty2 = _interopRequireDefault(__webpack_require__(27)); | |
| 11195 | + | |
| 11196 | +var BaseError = /*#__PURE__*/function (_Error) { | |
| 11197 | + (0, _inherits2.default)(BaseError, _Error); | |
| 11198 | + | |
| 11199 | + var _super = (0, _createSuper2.default)(BaseError); | |
| 11200 | + | |
| 11201 | + (0, _createClass2.default)(BaseError, null, [{ | |
| 11202 | + key: "create", | |
| 11203 | + | |
| 889 | 11204 | /** |
| 890 | - * Function onBeforeRun. | |
| 11205 | + * The server error code. | |
| 891 | 11206 | * |
| 892 | - * Called before run(). | |
| 11207 | + * @type {string} | |
| 11208 | + */ | |
| 11209 | + | |
| 11210 | + /** | |
| 11211 | + * Additional data about the current error. | |
| 893 | 11212 | * |
| 894 | - * @param {{}} args | |
| 11213 | + * @type {*[]} | |
| 895 | 11214 | */ |
| 896 | - }, { | |
| 897 | - key: "onBeforeRun", | |
| 898 | - value: function onBeforeRun() { | |
| 899 | - var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 900 | - } // eslint-disable-line no-unused-vars | |
| 901 | 11215 | |
| 902 | 11216 | /** |
| 903 | - * Function onAfterRun. | |
| 11217 | + * Static helper function to create the error. | |
| 904 | 11218 | * |
| 905 | - * Called after run(). | |
| 11219 | + * @param message | |
| 11220 | + * @param code | |
| 11221 | + * @param data | |
| 11222 | + * @returns {BaseError} | |
| 11223 | + */ | |
| 11224 | + value: function create(message) { | |
| 11225 | + var code = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; | |
| 11226 | + var data = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : []; | |
| 11227 | + return new this(message, code, data); | |
| 11228 | + } | |
| 11229 | + /** | |
| 11230 | + * Returns the status code of the error. | |
| 11231 | + */ | |
| 11232 | + | |
| 11233 | + }, { | |
| 11234 | + key: "getStatus", | |
| 11235 | + value: function getStatus() { | |
| 11236 | + elementorModules.ForceMethodImplementation(); | |
| 11237 | + } | |
| 11238 | + /** | |
| 11239 | + * Error constructor. | |
| 906 | 11240 | * |
| 907 | - * @param {{}} args | |
| 908 | - * @param {*} result | |
| 11241 | + * @param code | |
| 11242 | + * @param message | |
| 11243 | + * @param data | |
| 909 | 11244 | */ |
| 11245 | + | |
| 11246 | + }]); | |
| 11247 | + | |
| 11248 | + function BaseError() { | |
| 11249 | + var _this; | |
| 11250 | + | |
| 11251 | + var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; | |
| 11252 | + var code = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; | |
| 11253 | + var data = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : []; | |
| 11254 | + (0, _classCallCheck2.default)(this, BaseError); | |
| 11255 | + _this = _super.call(this, message); | |
| 11256 | + (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "code", ''); | |
| 11257 | + (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "data", []); | |
| 11258 | + _this.code = code; | |
| 11259 | + _this.data = data; | |
| 11260 | + return _this; | |
| 11261 | + } | |
| 11262 | + /** | |
| 11263 | + * Notify a message when the error occurs. | |
| 11264 | + */ | |
| 11265 | + | |
| 11266 | + | |
| 11267 | + (0, _createClass2.default)(BaseError, [{ | |
| 11268 | + key: "notify", | |
| 11269 | + value: function notify() { | |
| 11270 | + elementorCommon.helpers.consoleError((0, _objectSpread2.default)({ | |
| 11271 | + message: this.message | |
| 11272 | + }, this)); | |
| 11273 | + } | |
| 11274 | + }]); | |
| 11275 | + return BaseError; | |
| 11276 | +}( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error)); | |
| 11277 | + | |
| 11278 | +exports.default = BaseError; | |
| 11279 | + | |
| 11280 | +/***/ }), | |
| 11281 | +/* 327 */ | |
| 11282 | +/***/ (function(module, exports, __webpack_require__) { | |
| 11283 | + | |
| 11284 | +"use strict"; | |
| 11285 | + | |
| 11286 | + | |
| 11287 | +var _interopRequireDefault = __webpack_require__(0); | |
| 11288 | + | |
| 11289 | +var _Object$defineProperty = __webpack_require__(1); | |
| 11290 | + | |
| 11291 | +_Object$defineProperty(exports, "__esModule", { | |
| 11292 | + value: true | |
| 11293 | +}); | |
| 11294 | + | |
| 11295 | +exports.default = exports.Base = void 0; | |
| 11296 | + | |
| 11297 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 11298 | + | |
| 11299 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 11300 | + | |
| 11301 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 11302 | + | |
| 11303 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 11304 | + | |
| 11305 | +var _hookBase = _interopRequireDefault(__webpack_require__(301)); | |
| 11306 | + | |
| 11307 | +var Base = /*#__PURE__*/function (_HookBase) { | |
| 11308 | + (0, _inherits2.default)(Base, _HookBase); | |
| 11309 | + | |
| 11310 | + var _super = (0, _createSuper2.default)(Base); | |
| 11311 | + | |
| 11312 | + function Base() { | |
| 11313 | + (0, _classCallCheck2.default)(this, Base); | |
| 11314 | + return _super.apply(this, arguments); | |
| 11315 | + } | |
| 11316 | + | |
| 11317 | + (0, _createClass2.default)(Base, [{ | |
| 11318 | + key: "getType", | |
| 11319 | + value: function getType() { | |
| 11320 | + return 'ui'; | |
| 11321 | + } | |
| 11322 | + }]); | |
| 11323 | + return Base; | |
| 11324 | +}(_hookBase.default); | |
| 11325 | + | |
| 11326 | +exports.Base = Base; | |
| 11327 | +var _default = Base; | |
| 11328 | +exports.default = _default; | |
| 11329 | + | |
| 11330 | +/***/ }), | |
| 11331 | +/* 328 */ | |
| 11332 | +/***/ (function(module, exports, __webpack_require__) { | |
| 11333 | + | |
| 11334 | +"use strict"; | |
| 11335 | + | |
| 11336 | + | |
| 11337 | +var _interopRequireDefault = __webpack_require__(0); | |
| 11338 | + | |
| 11339 | +var _Object$defineProperty = __webpack_require__(1); | |
| 11340 | + | |
| 11341 | +_Object$defineProperty(exports, "__esModule", { | |
| 11342 | + value: true | |
| 11343 | +}); | |
| 11344 | + | |
| 11345 | +exports.default = exports.getDefaultDebounceDelay = exports.DEFAULT_DEBOUNCE_DELAY = void 0; | |
| 11346 | + | |
| 11347 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 11348 | + | |
| 11349 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 11350 | + | |
| 11351 | +var _get2 = _interopRequireDefault(__webpack_require__(26)); | |
| 11352 | + | |
| 11353 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(16)); | |
| 11354 | + | |
| 11355 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 11356 | + | |
| 11357 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 11358 | + | |
| 11359 | +var _defineProperty2 = _interopRequireDefault(__webpack_require__(27)); | |
| 11360 | + | |
| 11361 | +var _commandBase = _interopRequireDefault(__webpack_require__(23)); | |
| 11362 | + | |
| 11363 | +var _commandHistory = _interopRequireDefault(__webpack_require__(129)); | |
| 11364 | + | |
| 11365 | +var DEFAULT_DEBOUNCE_DELAY = 800; | |
| 11366 | +/** | |
| 11367 | + * Function getDefaultDebounceDelay(). | |
| 11368 | + * | |
| 11369 | + * Returns default debounce delay time, if exists in config override. | |
| 11370 | + * | |
| 11371 | + * @returns {number} | |
| 11372 | + */ | |
| 11373 | + | |
| 11374 | +exports.DEFAULT_DEBOUNCE_DELAY = DEFAULT_DEBOUNCE_DELAY; | |
| 11375 | + | |
| 11376 | +var getDefaultDebounceDelay = function getDefaultDebounceDelay() { | |
| 11377 | + var result = DEFAULT_DEBOUNCE_DELAY; | |
| 11378 | + | |
| 11379 | + if (elementor.config.document && undefined !== elementor.config.document.debounceDelay) { | |
| 11380 | + result = elementor.config.document.debounceDelay; | |
| 11381 | + } | |
| 11382 | + | |
| 11383 | + return result; | |
| 11384 | +}; | |
| 11385 | + | |
| 11386 | +exports.getDefaultDebounceDelay = getDefaultDebounceDelay; | |
| 11387 | + | |
| 11388 | +var CommandHistoryDebounce = /*#__PURE__*/function (_CommandHistory) { | |
| 11389 | + (0, _inherits2.default)(CommandHistoryDebounce, _CommandHistory); | |
| 11390 | + | |
| 11391 | + var _super = (0, _createSuper2.default)(CommandHistoryDebounce); | |
| 11392 | + | |
| 11393 | + function CommandHistoryDebounce() { | |
| 11394 | + (0, _classCallCheck2.default)(this, CommandHistoryDebounce); | |
| 11395 | + return _super.apply(this, arguments); | |
| 11396 | + } | |
| 11397 | + | |
| 11398 | + (0, _createClass2.default)(CommandHistoryDebounce, [{ | |
| 11399 | + key: "initialize", | |
| 11400 | + value: function initialize(args) { | |
| 11401 | + var _args$options = args.options, | |
| 11402 | + options = _args$options === void 0 ? {} : _args$options; | |
| 11403 | + (0, _get2.default)((0, _getPrototypeOf2.default)(CommandHistoryDebounce.prototype), "initialize", this).call(this, args); | |
| 11404 | + | |
| 11405 | + if (!this.constructor.debounce) { | |
| 11406 | + this.constructor.debounce = _.debounce(function (fn) { | |
| 11407 | + return fn(); | |
| 11408 | + }, getDefaultDebounceDelay()); | |
| 11409 | + } // If its head command, and not called within another command. | |
| 11410 | + | |
| 11411 | + | |
| 11412 | + if (1 === $e.commands.currentTrace.length || options.debounce) { | |
| 11413 | + this.isDebounceRequired = true; | |
| 11414 | + } | |
| 11415 | + } | |
| 910 | 11416 | }, { |
| 11417 | + key: "onBeforeRun", | |
| 11418 | + value: function onBeforeRun(args) { | |
| 11419 | + _commandBase.default.prototype.onBeforeRun.call(this, args); | |
| 11420 | + | |
| 11421 | + if (this.history && this.isHistoryActive()) { | |
| 11422 | + $e.internal('document/history/add-transaction', this.history); | |
| 11423 | + } | |
| 11424 | + } | |
| 11425 | + }, { | |
| 911 | 11426 | key: "onAfterRun", |
| 912 | - value: function onAfterRun() { | |
| 913 | - var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 914 | - var result = arguments.length > 1 ? arguments[1] : undefined; | |
| 915 | - } // eslint-disable-line no-unused-vars | |
| 11427 | + value: function onAfterRun(args, result) { | |
| 11428 | + _commandBase.default.prototype.onAfterRun.call(this, args, result); | |
| 916 | 11429 | |
| 11430 | + if (this.isHistoryActive()) { | |
| 11431 | + if (this.isDebounceRequired) { | |
| 11432 | + this.constructor.debounce(function () { | |
| 11433 | + return $e.internal('document/history/end-transaction'); | |
| 11434 | + }); | |
| 11435 | + } else { | |
| 11436 | + $e.internal('document/history/end-transaction'); | |
| 11437 | + } | |
| 11438 | + } | |
| 11439 | + } | |
| 11440 | + }, { | |
| 11441 | + key: "onCatchApply", | |
| 11442 | + value: function onCatchApply(e) { | |
| 11443 | + _commandBase.default.prototype.onCatchApply.call(this, e); // Rollback history on failure. | |
| 11444 | + | |
| 11445 | + | |
| 11446 | + if (e instanceof $e.modules.HookBreak && this.history) { | |
| 11447 | + if (this.isDebounceRequired) { | |
| 11448 | + // `clear-transaction` is under debounce, because it should `clear-transaction` after `end-transaction`. | |
| 11449 | + this.constructor.debounce(function () { | |
| 11450 | + return $e.internal('document/history/clear-transaction'); | |
| 11451 | + }); | |
| 11452 | + } else { | |
| 11453 | + $e.internal('document/history/clear-transaction'); | |
| 11454 | + } | |
| 11455 | + } | |
| 11456 | + } | |
| 11457 | + }], [{ | |
| 11458 | + key: "getInstanceType", | |
| 11459 | + | |
| 917 | 11460 | /** |
| 918 | - * Function onBeforeApply. | |
| 11461 | + * Function debounce(). | |
| 919 | 11462 | * |
| 920 | - * Called before apply(). | |
| 11463 | + * Will debounce every function you pass in, at the same debounce flow. | |
| 921 | 11464 | * |
| 922 | - * @param {{}} args | |
| 11465 | + * @param {(function())} | |
| 923 | 11466 | */ |
| 11467 | + value: function getInstanceType() { | |
| 11468 | + return 'CommandHistoryDebounce'; | |
| 11469 | + } | |
| 11470 | + }]); | |
| 11471 | + return CommandHistoryDebounce; | |
| 11472 | +}(_commandHistory.default); | |
| 11473 | + | |
| 11474 | +exports.default = CommandHistoryDebounce; | |
| 11475 | +(0, _defineProperty2.default)(CommandHistoryDebounce, "debounce", undefined); | |
| 11476 | + | |
| 11477 | +/***/ }), | |
| 11478 | +/* 329 */, | |
| 11479 | +/* 330 */, | |
| 11480 | +/* 331 */, | |
| 11481 | +/* 332 */, | |
| 11482 | +/* 333 */, | |
| 11483 | +/* 334 */, | |
| 11484 | +/* 335 */, | |
| 11485 | +/* 336 */, | |
| 11486 | +/* 337 */, | |
| 11487 | +/* 338 */, | |
| 11488 | +/* 339 */, | |
| 11489 | +/* 340 */, | |
| 11490 | +/* 341 */, | |
| 11491 | +/* 342 */, | |
| 11492 | +/* 343 */ | |
| 11493 | +/***/ (function(module, exports, __webpack_require__) { | |
| 11494 | + | |
| 11495 | +// Works with __proto__ only. Old v8 can't work with null proto objects. | |
| 11496 | +/* eslint-disable no-proto */ | |
| 11497 | +var isObject = __webpack_require__(31); | |
| 11498 | +var anObject = __webpack_require__(20); | |
| 11499 | +var check = function (O, proto) { | |
| 11500 | + anObject(O); | |
| 11501 | + if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!"); | |
| 11502 | +}; | |
| 11503 | +module.exports = { | |
| 11504 | + set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line | |
| 11505 | + function (test, buggy, set) { | |
| 11506 | + try { | |
| 11507 | + set = __webpack_require__(81)(Function.call, __webpack_require__(312).f(Object.prototype, '__proto__').set, 2); | |
| 11508 | + set(test, []); | |
| 11509 | + buggy = !(test instanceof Array); | |
| 11510 | + } catch (e) { buggy = true; } | |
| 11511 | + return function setPrototypeOf(O, proto) { | |
| 11512 | + check(O, proto); | |
| 11513 | + if (buggy) O.__proto__ = proto; | |
| 11514 | + else set(O, proto); | |
| 11515 | + return O; | |
| 11516 | + }; | |
| 11517 | + }({}, false) : undefined), | |
| 11518 | + check: check | |
| 11519 | +}; | |
| 11520 | + | |
| 11521 | + | |
| 11522 | +/***/ }), | |
| 11523 | +/* 344 */ | |
| 11524 | +/***/ (function(module, exports) { | |
| 11525 | + | |
| 11526 | +exports.f = {}.propertyIsEnumerable; | |
| 11527 | + | |
| 11528 | + | |
| 11529 | +/***/ }), | |
| 11530 | +/* 345 */ | |
| 11531 | +/***/ (function(module, exports, __webpack_require__) { | |
| 11532 | + | |
| 11533 | +"use strict"; | |
| 11534 | + | |
| 11535 | + | |
| 11536 | +var _interopRequireDefault = __webpack_require__(0); | |
| 11537 | + | |
| 11538 | +__webpack_require__(191); | |
| 11539 | + | |
| 11540 | +__webpack_require__(80); | |
| 11541 | + | |
| 11542 | +__webpack_require__(61); | |
| 11543 | + | |
| 11544 | +__webpack_require__(124); | |
| 11545 | + | |
| 11546 | +__webpack_require__(82); | |
| 11547 | + | |
| 11548 | +var _keys = _interopRequireDefault(__webpack_require__(25)); | |
| 11549 | + | |
| 11550 | +(function ($) { | |
| 11551 | + var Stylesheet = function Stylesheet() { | |
| 11552 | + var self = this, | |
| 11553 | + rules = {}, | |
| 11554 | + rawCSS = {}, | |
| 11555 | + devices = {}; | |
| 11556 | + | |
| 11557 | + var getDeviceMaxValue = function getDeviceMaxValue(deviceName) { | |
| 11558 | + var deviceNames = (0, _keys.default)(devices), | |
| 11559 | + deviceNameIndex = deviceNames.indexOf(deviceName), | |
| 11560 | + nextIndex = deviceNameIndex + 1; | |
| 11561 | + | |
| 11562 | + if (nextIndex >= deviceNames.length) { | |
| 11563 | + throw new RangeError('Max value for this device is out of range.'); | |
| 11564 | + } | |
| 11565 | + | |
| 11566 | + return devices[deviceNames[nextIndex]] - 1; | |
| 11567 | + }; | |
| 11568 | + | |
| 11569 | + var queryToHash = function queryToHash(query) { | |
| 11570 | + var hash = []; | |
| 11571 | + $.each(query, function (endPoint) { | |
| 11572 | + hash.push(endPoint + '_' + this); | |
| 11573 | + }); | |
| 11574 | + return hash.join('-'); | |
| 11575 | + }; | |
| 11576 | + | |
| 11577 | + var hashToQuery = function hashToQuery(hash) { | |
| 11578 | + var query = {}; | |
| 11579 | + hash = hash.split('-').filter(String); | |
| 11580 | + hash.forEach(function (singleQuery) { | |
| 11581 | + var queryParts = singleQuery.split('_'), | |
| 11582 | + endPoint = queryParts[0], | |
| 11583 | + deviceName = queryParts[1]; | |
| 11584 | + query[endPoint] = 'max' === endPoint ? getDeviceMaxValue(deviceName) : devices[deviceName]; | |
| 11585 | + }); | |
| 11586 | + return query; | |
| 11587 | + }; | |
| 11588 | + | |
| 11589 | + var addQueryHash = function addQueryHash(queryHash) { | |
| 11590 | + rules[queryHash] = {}; | |
| 11591 | + var hashes = (0, _keys.default)(rules); | |
| 11592 | + | |
| 11593 | + if (hashes.length < 2) { | |
| 11594 | + return; | |
| 11595 | + } // Sort the devices from narrowest to widest | |
| 11596 | + | |
| 11597 | + | |
| 11598 | + hashes.sort(function (a, b) { | |
| 11599 | + if ('all' === a) { | |
| 11600 | + return -1; | |
| 11601 | + } | |
| 11602 | + | |
| 11603 | + if ('all' === b) { | |
| 11604 | + return 1; | |
| 11605 | + } | |
| 11606 | + | |
| 11607 | + var aQuery = hashToQuery(a), | |
| 11608 | + bQuery = hashToQuery(b); | |
| 11609 | + return bQuery.max - aQuery.max; | |
| 11610 | + }); | |
| 11611 | + var sortedRules = {}; | |
| 11612 | + hashes.forEach(function (deviceName) { | |
| 11613 | + sortedRules[deviceName] = rules[deviceName]; | |
| 11614 | + }); | |
| 11615 | + rules = sortedRules; | |
| 11616 | + }; | |
| 11617 | + | |
| 11618 | + var getQueryHashStyleFormat = function getQueryHashStyleFormat(queryHash) { | |
| 11619 | + var query = hashToQuery(queryHash), | |
| 11620 | + styleFormat = []; | |
| 11621 | + $.each(query, function (endPoint) { | |
| 11622 | + styleFormat.push('(' + endPoint + '-width:' + this + 'px)'); | |
| 11623 | + }); | |
| 11624 | + return '@media' + styleFormat.join(' and '); | |
| 11625 | + }; | |
| 11626 | + | |
| 11627 | + this.addDevice = function (newDeviceName, deviceValue) { | |
| 11628 | + devices[newDeviceName] = deviceValue; | |
| 11629 | + var deviceNames = (0, _keys.default)(devices); | |
| 11630 | + | |
| 11631 | + if (deviceNames.length < 2) { | |
| 11632 | + return self; | |
| 11633 | + } // Sort the devices from narrowest to widest | |
| 11634 | + | |
| 11635 | + | |
| 11636 | + deviceNames.sort(function (a, b) { | |
| 11637 | + return devices[a] - devices[b]; | |
| 11638 | + }); | |
| 11639 | + var sortedDevices = {}; | |
| 11640 | + deviceNames.forEach(function (deviceName) { | |
| 11641 | + sortedDevices[deviceName] = devices[deviceName]; | |
| 11642 | + }); | |
| 11643 | + devices = sortedDevices; | |
| 11644 | + return self; | |
| 11645 | + }; | |
| 11646 | + | |
| 11647 | + this.addRawCSS = function (key, css) { | |
| 11648 | + rawCSS[key] = css; | |
| 11649 | + }; | |
| 11650 | + | |
| 11651 | + this.addRules = function (selector, styleRules, query) { | |
| 11652 | + var queryHash = 'all'; | |
| 11653 | + | |
| 11654 | + if (!_.isEmpty(query)) { | |
| 11655 | + queryHash = queryToHash(query); | |
| 11656 | + } | |
| 11657 | + | |
| 11658 | + if (!rules[queryHash]) { | |
| 11659 | + addQueryHash(queryHash); | |
| 11660 | + } | |
| 11661 | + | |
| 11662 | + if (!styleRules) { | |
| 11663 | + var parsedRules = selector.match(/[^{]+\{[^}]+}/g); | |
| 11664 | + $.each(parsedRules, function () { | |
| 11665 | + var parsedRule = this.match(/([^{]+)\{([^}]+)}/); | |
| 11666 | + | |
| 11667 | + if (parsedRule) { | |
| 11668 | + self.addRules(parsedRule[1].trim(), parsedRule[2].trim(), query); | |
| 11669 | + } | |
| 11670 | + }); | |
| 11671 | + return; | |
| 11672 | + } | |
| 11673 | + | |
| 11674 | + if (!rules[queryHash][selector]) { | |
| 11675 | + rules[queryHash][selector] = {}; | |
| 11676 | + } | |
| 11677 | + | |
| 11678 | + if ('string' === typeof styleRules) { | |
| 11679 | + styleRules = styleRules.split(';').filter(String); | |
| 11680 | + var orderedRules = {}; | |
| 11681 | + | |
| 11682 | + try { | |
| 11683 | + $.each(styleRules, function () { | |
| 11684 | + var property = this.split(/:(.*)?/); | |
| 11685 | + orderedRules[property[0].trim()] = property[1].trim().replace(';', ''); | |
| 11686 | + }); | |
| 11687 | + } catch (error) { | |
| 11688 | + // At least one of the properties is incorrect | |
| 11689 | + return; | |
| 11690 | + } | |
| 11691 | + | |
| 11692 | + styleRules = orderedRules; | |
| 11693 | + } | |
| 11694 | + | |
| 11695 | + $.extend(rules[queryHash][selector], styleRules); | |
| 11696 | + return self; | |
| 11697 | + }; | |
| 11698 | + | |
| 11699 | + this.getRules = function () { | |
| 11700 | + return rules; | |
| 11701 | + }; | |
| 11702 | + | |
| 11703 | + this.empty = function () { | |
| 11704 | + rules = {}; | |
| 11705 | + rawCSS = {}; | |
| 11706 | + }; | |
| 11707 | + | |
| 11708 | + this.toString = function () { | |
| 11709 | + var styleText = ''; | |
| 11710 | + $.each(rules, function (queryHash) { | |
| 11711 | + var deviceText = Stylesheet.parseRules(this); | |
| 11712 | + | |
| 11713 | + if ('all' !== queryHash) { | |
| 11714 | + deviceText = getQueryHashStyleFormat(queryHash) + '{' + deviceText + '}'; | |
| 11715 | + } | |
| 11716 | + | |
| 11717 | + styleText += deviceText; | |
| 11718 | + }); | |
| 11719 | + $.each(rawCSS, function () { | |
| 11720 | + styleText += this; | |
| 11721 | + }); | |
| 11722 | + return styleText; | |
| 11723 | + }; | |
| 11724 | + }; | |
| 11725 | + | |
| 11726 | + Stylesheet.parseRules = function (rules) { | |
| 11727 | + var parsedRules = ''; | |
| 11728 | + $.each(rules, function (selector) { | |
| 11729 | + var selectorContent = Stylesheet.parseProperties(this); | |
| 11730 | + | |
| 11731 | + if (selectorContent) { | |
| 11732 | + parsedRules += selector + '{' + selectorContent + '}'; | |
| 11733 | + } | |
| 11734 | + }); | |
| 11735 | + return parsedRules; | |
| 11736 | + }; | |
| 11737 | + | |
| 11738 | + Stylesheet.parseProperties = function (properties) { | |
| 11739 | + var parsedProperties = ''; | |
| 11740 | + $.each(properties, function (propertyKey) { | |
| 11741 | + if (this) { | |
| 11742 | + parsedProperties += propertyKey + ':' + this + ';'; | |
| 11743 | + } | |
| 11744 | + }); | |
| 11745 | + return parsedProperties; | |
| 11746 | + }; | |
| 11747 | + | |
| 11748 | + module.exports = Stylesheet; | |
| 11749 | +})(jQuery); | |
| 11750 | + | |
| 11751 | +/***/ }), | |
| 11752 | +/* 346 */ | |
| 11753 | +/***/ (function(module, exports, __webpack_require__) { | |
| 11754 | + | |
| 11755 | +"use strict"; | |
| 11756 | + | |
| 11757 | + | |
| 11758 | +var _interopRequireDefault = __webpack_require__(0); | |
| 11759 | + | |
| 11760 | +var _keys = _interopRequireDefault(__webpack_require__(25)); | |
| 11761 | + | |
| 11762 | +module.exports = Marionette.CompositeView.extend({ | |
| 11763 | + templateHelpers: function templateHelpers() { | |
| 11764 | + return { | |
| 11765 | + view: this | |
| 11766 | + }; | |
| 11767 | + }, | |
| 11768 | + getBehavior: function getBehavior(name) { | |
| 11769 | + return this._behaviors[(0, _keys.default)(this.behaviors()).indexOf(name)]; | |
| 11770 | + }, | |
| 11771 | + initialize: function initialize() { | |
| 11772 | + this.collection = this.model.get('elements'); | |
| 11773 | + }, | |
| 11774 | + addChildModel: function addChildModel(model, options) { | |
| 11775 | + return this.collection.add(model, options, true); | |
| 11776 | + }, | |
| 11777 | + addElement: function addElement(data, options) { | |
| 11778 | + if (this.isCollectionFilled()) { | |
| 11779 | + return; | |
| 11780 | + } | |
| 11781 | + | |
| 11782 | + options = jQuery.extend({ | |
| 11783 | + trigger: false, | |
| 11784 | + edit: true, | |
| 11785 | + onBeforeAdd: null, | |
| 11786 | + onAfterAdd: null | |
| 11787 | + }, options); | |
| 11788 | + var childTypes = this.getChildType(); | |
| 11789 | + var newItem, elType; | |
| 11790 | + | |
| 11791 | + if (data instanceof Backbone.Model) { | |
| 11792 | + newItem = data; | |
| 11793 | + elType = newItem.get('elType'); | |
| 11794 | + } else { | |
| 11795 | + newItem = { | |
| 11796 | + id: elementorCommon.helpers.getUniqueId(), | |
| 11797 | + elType: childTypes[0], | |
| 11798 | + settings: {}, | |
| 11799 | + elements: [] | |
| 11800 | + }; | |
| 11801 | + | |
| 11802 | + if (data) { | |
| 11803 | + jQuery.extend(newItem, data); | |
| 11804 | + } | |
| 11805 | + | |
| 11806 | + elType = newItem.elType; | |
| 11807 | + } | |
| 11808 | + | |
| 11809 | + if (-1 === childTypes.indexOf(elType)) { | |
| 11810 | + return this.children.last().addElement(newItem, options); | |
| 11811 | + } | |
| 11812 | + | |
| 11813 | + if (options.clone) { | |
| 11814 | + newItem = this.cloneItem(newItem); | |
| 11815 | + } | |
| 11816 | + | |
| 11817 | + if (options.trigger) { | |
| 11818 | + elementor.channels.data.trigger(options.trigger.beforeAdd, newItem); | |
| 11819 | + } | |
| 11820 | + | |
| 11821 | + if (options.onBeforeAdd) { | |
| 11822 | + options.onBeforeAdd(); | |
| 11823 | + } | |
| 11824 | + | |
| 11825 | + var newModel = this.addChildModel(newItem, { | |
| 11826 | + at: options.at | |
| 11827 | + }), | |
| 11828 | + newView = this.children.findByModel(newModel); | |
| 11829 | + | |
| 11830 | + if (options.onAfterAdd) { | |
| 11831 | + options.onAfterAdd(newModel, newView); | |
| 11832 | + } | |
| 11833 | + | |
| 11834 | + if (options.trigger) { | |
| 11835 | + elementor.channels.data.trigger(options.trigger.afterAdd, newItem); | |
| 11836 | + } | |
| 11837 | + | |
| 11838 | + if (options.edit && elementor.documents.getCurrent().history.getActive()) { | |
| 11839 | + // Ensure container is created. TODO: Open editor via UI hook after `document/elements/create`. | |
| 11840 | + newView.getContainer(); | |
| 11841 | + newModel.trigger('request:edit'); | |
| 11842 | + } | |
| 11843 | + | |
| 11844 | + return newView; | |
| 11845 | + }, | |
| 11846 | + addChildElement: function addChildElement(data, options) { | |
| 11847 | + elementorCommon.helpers.softDeprecated('addChildElement', '2.8.0', "$e.run( 'document/elements/create' )"); | |
| 11848 | + | |
| 11849 | + if (Object !== data.constructor) { | |
| 11850 | + data = jQuery.extend({}, data); | |
| 11851 | + } | |
| 11852 | + | |
| 11853 | + $e.run('document/elements/create', { | |
| 11854 | + container: this.getContainer(), | |
| 11855 | + model: data, | |
| 11856 | + options: options | |
| 11857 | + }); | |
| 11858 | + }, | |
| 11859 | + cloneItem: function cloneItem(item) { | |
| 11860 | + var self = this; | |
| 11861 | + | |
| 11862 | + if (item instanceof Backbone.Model) { | |
| 11863 | + return item.clone(); | |
| 11864 | + } | |
| 11865 | + | |
| 11866 | + item.id = elementorCommon.helpers.getUniqueId(); | |
| 11867 | + item.settings._element_id = ''; | |
| 11868 | + item.elements.forEach(function (childItem, index) { | |
| 11869 | + item.elements[index] = self.cloneItem(childItem); | |
| 11870 | + }); | |
| 11871 | + return item; | |
| 11872 | + }, | |
| 11873 | + lookup: function lookup() { | |
| 11874 | + var element = this; | |
| 11875 | + | |
| 11876 | + if (element.isDisconnected()) { | |
| 11877 | + element = $e.components.get('document').utils.findViewById(element.model.id); | |
| 11878 | + } | |
| 11879 | + | |
| 11880 | + return element; | |
| 11881 | + }, | |
| 11882 | + isDisconnected: function isDisconnected() { | |
| 11883 | + return this.isDestroyed || !this.el.isConnected; | |
| 11884 | + }, | |
| 11885 | + isCollectionFilled: function isCollectionFilled() { | |
| 11886 | + return false; | |
| 11887 | + } | |
| 11888 | +}); | |
| 11889 | + | |
| 11890 | +/***/ }), | |
| 11891 | +/* 347 */, | |
| 11892 | +/* 348 */, | |
| 11893 | +/* 349 */, | |
| 11894 | +/* 350 */ | |
| 11895 | +/***/ (function(module, exports, __webpack_require__) { | |
| 11896 | + | |
| 11897 | +"use strict"; | |
| 11898 | + | |
| 11899 | + | |
| 11900 | +var _interopRequireDefault = __webpack_require__(0); | |
| 11901 | + | |
| 11902 | +var _Object$defineProperty = __webpack_require__(1); | |
| 11903 | + | |
| 11904 | +_Object$defineProperty(exports, "__esModule", { | |
| 11905 | + value: true | |
| 11906 | +}); | |
| 11907 | + | |
| 11908 | +exports.default = exports.Settings = void 0; | |
| 11909 | + | |
| 11910 | +var _keys = _interopRequireDefault(__webpack_require__(25)); | |
| 11911 | + | |
| 11912 | +var _defineProperty2 = _interopRequireDefault(__webpack_require__(27)); | |
| 11913 | + | |
| 11914 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 11915 | + | |
| 11916 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 11917 | + | |
| 11918 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 11919 | + | |
| 11920 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 11921 | + | |
| 11922 | +var _commandHistoryDebounce = _interopRequireDefault(__webpack_require__(328)); | |
| 11923 | + | |
| 11924 | +var Settings = /*#__PURE__*/function (_CommandHistoryDeboun) { | |
| 11925 | + (0, _inherits2.default)(Settings, _CommandHistoryDeboun); | |
| 11926 | + | |
| 11927 | + var _super = (0, _createSuper2.default)(Settings); | |
| 11928 | + | |
| 11929 | + function Settings() { | |
| 11930 | + (0, _classCallCheck2.default)(this, Settings); | |
| 11931 | + return _super.apply(this, arguments); | |
| 11932 | + } | |
| 11933 | + | |
| 11934 | + (0, _createClass2.default)(Settings, [{ | |
| 11935 | + key: "addToHistory", | |
| 11936 | + | |
| 11937 | + /** | |
| 11938 | + * Function addToHistory(). | |
| 11939 | + * | |
| 11940 | + * @param {Container} container | |
| 11941 | + * @param {{}} newSettings | |
| 11942 | + * @param {{}} oldSettings | |
| 11943 | + */ | |
| 11944 | + value: function addToHistory(container, newSettings, oldSettings) { | |
| 11945 | + var changes = (0, _defineProperty2.default)({}, container.id, { | |
| 11946 | + old: oldSettings, | |
| 11947 | + new: newSettings | |
| 11948 | + }), | |
| 11949 | + historyItem = { | |
| 11950 | + containers: [container], | |
| 11951 | + data: { | |
| 11952 | + changes: changes | |
| 11953 | + }, | |
| 11954 | + type: 'change', | |
| 11955 | + restore: Settings.restore | |
| 11956 | + }; | |
| 11957 | + $e.internal('document/history/add-transaction', historyItem); | |
| 11958 | + } | |
| 924 | 11959 | }, { |
| 925 | - key: "onBeforeApply", | |
| 926 | - value: function onBeforeApply() { | |
| 927 | - var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 928 | - } // eslint-disable-line no-unused-vars | |
| 11960 | + key: "validateArgs", | |
| 11961 | + value: function validateArgs(args) { | |
| 11962 | + this.requireContainer(args); | |
| 11963 | + this.requireArgumentConstructor('settings', Object, args); | |
| 11964 | + } | |
| 11965 | + }, { | |
| 11966 | + key: "getHistory", | |
| 11967 | + value: function getHistory(args) { | |
| 11968 | + var _args$containers = args.containers, | |
| 11969 | + containers = _args$containers === void 0 ? [args.container] : _args$containers, | |
| 11970 | + subTitle = this.constructor.getSubTitle(args); | |
| 11971 | + return { | |
| 11972 | + containers: containers, | |
| 11973 | + subTitle: subTitle, | |
| 11974 | + type: 'change' | |
| 11975 | + }; | |
| 11976 | + } | |
| 11977 | + }, { | |
| 11978 | + key: "apply", | |
| 11979 | + value: function apply(args) { | |
| 11980 | + var _this = this; | |
| 929 | 11981 | |
| 11982 | + var _args$containers2 = args.containers, | |
| 11983 | + containers = _args$containers2 === void 0 ? [args.container] : _args$containers2, | |
| 11984 | + _args$settings = args.settings, | |
| 11985 | + settings = _args$settings === void 0 ? {} : _args$settings, | |
| 11986 | + _args$isMultiSettings = args.isMultiSettings, | |
| 11987 | + isMultiSettings = _args$isMultiSettings === void 0 ? false : _args$isMultiSettings, | |
| 11988 | + _args$options = args.options, | |
| 11989 | + options = _args$options === void 0 ? {} : _args$options, | |
| 11990 | + external = options.external, | |
| 11991 | + _options$render = options.render, | |
| 11992 | + render = _options$render === void 0 ? true : _options$render; | |
| 11993 | + containers.forEach(function (container) { | |
| 11994 | + container = container.lookup(); | |
| 11995 | + /** | |
| 11996 | + * Settings support multi settings for each container, eg use: | |
| 11997 | + * settings: { '{ container-id }': { someSettingKey: someSettingValue } } etc. | |
| 11998 | + */ | |
| 11999 | + | |
| 12000 | + var newSettings = isMultiSettings ? settings[container.id] : settings, | |
| 12001 | + oldSettings = container.settings.toJSON(); // Clear old oldValues. | |
| 12002 | + | |
| 12003 | + container.oldValues = {}; // Set oldValues, For each setting is about to change save setting value. | |
| 12004 | + | |
| 12005 | + (0, _keys.default)(newSettings).forEach(function (key) { | |
| 12006 | + container.oldValues[key] = oldSettings[key]; | |
| 12007 | + }); // If history active, add history transaction with old and new settings. | |
| 12008 | + | |
| 12009 | + if (_this.isHistoryActive()) { | |
| 12010 | + _this.addToHistory(container, newSettings, container.oldValues); | |
| 12011 | + } | |
| 12012 | + | |
| 12013 | + if (external) { | |
| 12014 | + container.settings.setExternalChange(newSettings); | |
| 12015 | + } else { | |
| 12016 | + container.settings.set(newSettings); | |
| 12017 | + } | |
| 12018 | + | |
| 12019 | + if (render) { | |
| 12020 | + container.render(); | |
| 12021 | + } | |
| 12022 | + }); | |
| 12023 | + } | |
| 12024 | + }, { | |
| 12025 | + key: "isDataChanged", | |
| 12026 | + value: function isDataChanged() { | |
| 12027 | + return true; | |
| 12028 | + } | |
| 12029 | + }], [{ | |
| 12030 | + key: "getSubTitle", | |
| 12031 | + | |
| 930 | 12032 | /** |
| 931 | - * Function onAfterApply. | |
| 12033 | + * Function getSubTitle(). | |
| 932 | 12034 | * |
| 933 | - * Called after apply(). | |
| 12035 | + * Get sub title by container. | |
| 934 | 12036 | * |
| 935 | 12037 | * @param {{}} args |
| 936 | - * @param {*} result | |
| 12038 | + * | |
| 12039 | + * @returns {string} | |
| 937 | 12040 | */ |
| 938 | - }, { | |
| 939 | - key: "onAfterApply", | |
| 940 | - value: function onAfterApply() { | |
| 941 | - var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 942 | - var result = arguments.length > 1 ? arguments[1] : undefined; | |
| 943 | - } // eslint-disable-line no-unused-vars | |
| 12041 | + value: function getSubTitle(args) { | |
| 12042 | + var _args$containers3 = args.containers, | |
| 12043 | + containers = _args$containers3 === void 0 ? [args.container] : _args$containers3, | |
| 12044 | + _args$settings2 = args.settings, | |
| 12045 | + settings = _args$settings2 === void 0 ? {} : _args$settings2, | |
| 12046 | + isMultiSettings = args.isMultiSettings, | |
| 12047 | + settingsKeys = (0, _keys.default)(settings), | |
| 12048 | + controls = containers[0].controls, | |
| 12049 | + firstSettingKey = settingsKeys[0]; | |
| 12050 | + var result = ''; | |
| 944 | 12051 | |
| 12052 | + if (!isMultiSettings && 1 === settingsKeys.length && controls && controls[firstSettingKey]) { | |
| 12053 | + result = controls[firstSettingKey].label; | |
| 12054 | + } | |
| 12055 | + | |
| 12056 | + return result; | |
| 12057 | + } | |
| 945 | 12058 | /** |
| 946 | - * Function onCatchApply. | |
| 12059 | + * Function restore(). | |
| 947 | 12060 | * |
| 948 | - * Called after apply() failed. | |
| 12061 | + * Redo/Restore. | |
| 949 | 12062 | * |
| 950 | - * @param {Error} e | |
| 12063 | + * @param {{}} historyItem | |
| 12064 | + * @param {boolean} isRedo | |
| 951 | 12065 | */ |
| 12066 | + | |
| 952 | 12067 | }, { |
| 953 | - key: "onCatchApply", | |
| 954 | - value: function onCatchApply(e) {} // eslint-disable-line no-unused-vars | |
| 12068 | + key: "restore", | |
| 12069 | + value: function restore(historyItem, isRedo) { | |
| 12070 | + var data = historyItem.get('data'); | |
| 12071 | + historyItem.get('containers').forEach(function ( | |
| 12072 | + /* Container */ | |
| 12073 | + container) { | |
| 12074 | + var changes = data.changes[container.id]; | |
| 12075 | + $e.run('document/elements/settings', { | |
| 12076 | + container: container, | |
| 12077 | + settings: isRedo ? changes.new : changes.old, | |
| 12078 | + options: { | |
| 12079 | + external: true | |
| 12080 | + } | |
| 12081 | + }); | |
| 12082 | + }); | |
| 12083 | + } | |
| 12084 | + }]); | |
| 12085 | + return Settings; | |
| 12086 | +}(_commandHistoryDebounce.default); | |
| 12087 | + | |
| 12088 | +exports.Settings = Settings; | |
| 12089 | +var _default = Settings; | |
| 12090 | +exports.default = _default; | |
| 12091 | + | |
| 12092 | +/***/ }), | |
| 12093 | +/* 351 */ | |
| 12094 | +/***/ (function(module, exports, __webpack_require__) { | |
| 12095 | + | |
| 12096 | +"use strict"; | |
| 12097 | + | |
| 12098 | + | |
| 12099 | +var _interopRequireDefault = __webpack_require__(0); | |
| 12100 | + | |
| 12101 | +var _Object$defineProperty = __webpack_require__(1); | |
| 12102 | + | |
| 12103 | +_Object$defineProperty(exports, "__esModule", { | |
| 12104 | + value: true | |
| 12105 | +}); | |
| 12106 | + | |
| 12107 | +exports.default = void 0; | |
| 12108 | + | |
| 12109 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 12110 | + | |
| 12111 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 12112 | + | |
| 12113 | +var _get2 = _interopRequireDefault(__webpack_require__(26)); | |
| 12114 | + | |
| 12115 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(16)); | |
| 12116 | + | |
| 12117 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 12118 | + | |
| 12119 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 12120 | + | |
| 12121 | +var _commandInternalBase = _interopRequireDefault(__webpack_require__(204)); | |
| 12122 | + | |
| 12123 | +var Base = /*#__PURE__*/function (_CommandInternalBase) { | |
| 12124 | + (0, _inherits2.default)(Base, _CommandInternalBase); | |
| 12125 | + | |
| 12126 | + var _super = (0, _createSuper2.default)(Base); | |
| 12127 | + | |
| 12128 | + function Base() { | |
| 12129 | + (0, _classCallCheck2.default)(this, Base); | |
| 12130 | + return _super.apply(this, arguments); | |
| 12131 | + } | |
| 12132 | + | |
| 12133 | + (0, _createClass2.default)(Base, [{ | |
| 12134 | + key: "initialize", | |
| 12135 | + value: function initialize(args) { | |
| 12136 | + (0, _get2.default)((0, _getPrototypeOf2.default)(Base.prototype), "initialize", this).call(this, args); | |
| 12137 | + /** | |
| 12138 | + * @type {HistoryManager} | |
| 12139 | + */ | |
| 12140 | + | |
| 12141 | + this.history = elementor.documents.getCurrent().history; | |
| 12142 | + } | |
| 12143 | + }]); | |
| 12144 | + return Base; | |
| 12145 | +}(_commandInternalBase.default); | |
| 12146 | + | |
| 12147 | +exports.default = Base; | |
| 12148 | + | |
| 12149 | +/***/ }), | |
| 12150 | +/* 352 */ | |
| 12151 | +/***/ (function(module, exports, __webpack_require__) { | |
| 12152 | + | |
| 12153 | +"use strict"; | |
| 12154 | + | |
| 12155 | + | |
| 12156 | +var _interopRequireDefault = __webpack_require__(0); | |
| 12157 | + | |
| 12158 | +var _Object$defineProperty = __webpack_require__(1); | |
| 12159 | + | |
| 12160 | +_Object$defineProperty(exports, "__esModule", { | |
| 12161 | + value: true | |
| 12162 | +}); | |
| 12163 | + | |
| 12164 | +exports.default = void 0; | |
| 12165 | + | |
| 12166 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 12167 | + | |
| 12168 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 12169 | + | |
| 12170 | +var _get2 = _interopRequireDefault(__webpack_require__(26)); | |
| 12171 | + | |
| 12172 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(16)); | |
| 12173 | + | |
| 12174 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 12175 | + | |
| 12176 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 12177 | + | |
| 12178 | +var _commandBase = _interopRequireDefault(__webpack_require__(23)); | |
| 12179 | + | |
| 12180 | +var Base = /*#__PURE__*/function (_CommandBase) { | |
| 12181 | + (0, _inherits2.default)(Base, _CommandBase); | |
| 12182 | + | |
| 12183 | + var _super = (0, _createSuper2.default)(Base); | |
| 12184 | + | |
| 12185 | + function Base() { | |
| 12186 | + (0, _classCallCheck2.default)(this, Base); | |
| 12187 | + return _super.apply(this, arguments); | |
| 12188 | + } | |
| 12189 | + | |
| 12190 | + (0, _createClass2.default)(Base, [{ | |
| 12191 | + key: "initialize", | |
| 12192 | + value: function initialize(args) { | |
| 12193 | + (0, _get2.default)((0, _getPrototypeOf2.default)(Base.prototype), "initialize", this).call(this, args); | |
| 12194 | + var _args$document = args.document, | |
| 12195 | + document = _args$document === void 0 ? elementor.documents.getCurrent() : _args$document; | |
| 12196 | + this.document = document; | |
| 12197 | + } | |
| 12198 | + }]); | |
| 12199 | + return Base; | |
| 12200 | +}(_commandBase.default); | |
| 12201 | + | |
| 12202 | +exports.default = Base; | |
| 12203 | + | |
| 12204 | +/***/ }), | |
| 12205 | +/* 353 */, | |
| 12206 | +/* 354 */ | |
| 12207 | +/***/ (function(module, exports, __webpack_require__) { | |
| 12208 | + | |
| 12209 | +"use strict"; | |
| 12210 | + | |
| 12211 | + | |
| 12212 | +var _Object$defineProperty = __webpack_require__(1); | |
| 12213 | + | |
| 12214 | +_Object$defineProperty(exports, "__esModule", { | |
| 12215 | + value: true | |
| 12216 | +}); | |
| 12217 | + | |
| 12218 | +_Object$defineProperty(exports, "NotFoundError", { | |
| 12219 | + enumerable: true, | |
| 12220 | + get: function get() { | |
| 12221 | + return _notFoundError.NotFoundError; | |
| 12222 | + } | |
| 12223 | +}); | |
| 12224 | + | |
| 12225 | +_Object$defineProperty(exports, "DefaultError", { | |
| 12226 | + enumerable: true, | |
| 12227 | + get: function get() { | |
| 12228 | + return _defaultError.DefaultError; | |
| 12229 | + } | |
| 12230 | +}); | |
| 12231 | + | |
| 12232 | +var _notFoundError = __webpack_require__(406); | |
| 12233 | + | |
| 12234 | +var _defaultError = __webpack_require__(407); | |
| 12235 | + | |
| 12236 | +/***/ }), | |
| 12237 | +/* 355 */, | |
| 12238 | +/* 356 */ | |
| 12239 | +/***/ (function(module, exports, __webpack_require__) { | |
| 12240 | + | |
| 12241 | +"use strict"; | |
| 12242 | + | |
| 12243 | + | |
| 12244 | +var _interopRequireDefault = __webpack_require__(0); | |
| 12245 | + | |
| 12246 | +var _Object$defineProperty = __webpack_require__(1); | |
| 12247 | + | |
| 12248 | +_Object$defineProperty(exports, "__esModule", { | |
| 12249 | + value: true | |
| 12250 | +}); | |
| 12251 | + | |
| 12252 | +exports.default = exports.Dependency = void 0; | |
| 12253 | + | |
| 12254 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 12255 | + | |
| 12256 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 12257 | + | |
| 12258 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 12259 | + | |
| 12260 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 12261 | + | |
| 12262 | +var _base = _interopRequireDefault(__webpack_require__(289)); | |
| 12263 | + | |
| 12264 | +var Dependency = /*#__PURE__*/function (_Base) { | |
| 12265 | + (0, _inherits2.default)(Dependency, _Base); | |
| 12266 | + | |
| 12267 | + var _super = (0, _createSuper2.default)(Dependency); | |
| 12268 | + | |
| 12269 | + function Dependency() { | |
| 12270 | + (0, _classCallCheck2.default)(this, Dependency); | |
| 12271 | + return _super.apply(this, arguments); | |
| 12272 | + } | |
| 12273 | + | |
| 12274 | + (0, _createClass2.default)(Dependency, [{ | |
| 12275 | + key: "register", | |
| 12276 | + value: function register() { | |
| 12277 | + $e.hooks.registerDataDependency(this); | |
| 12278 | + } | |
| 12279 | + }]); | |
| 12280 | + return Dependency; | |
| 12281 | +}(_base.default); | |
| 12282 | + | |
| 12283 | +exports.Dependency = Dependency; | |
| 12284 | +var _default = Dependency; | |
| 12285 | +exports.default = _default; | |
| 12286 | + | |
| 12287 | +/***/ }), | |
| 12288 | +/* 357 */, | |
| 12289 | +/* 358 */, | |
| 12290 | +/* 359 */, | |
| 12291 | +/* 360 */, | |
| 12292 | +/* 361 */, | |
| 12293 | +/* 362 */, | |
| 12294 | +/* 363 */ | |
| 12295 | +/***/ (function(module, exports, __webpack_require__) { | |
| 12296 | + | |
| 12297 | +"use strict"; | |
| 12298 | + | |
| 12299 | + | |
| 12300 | +var _Object$defineProperty = __webpack_require__(1); | |
| 12301 | + | |
| 12302 | +_Object$defineProperty(exports, "__esModule", { | |
| 12303 | + value: true | |
| 12304 | +}); | |
| 12305 | + | |
| 12306 | +_Object$defineProperty(exports, "Do", { | |
| 12307 | + enumerable: true, | |
| 12308 | + get: function get() { | |
| 12309 | + return _do.Do; | |
| 12310 | + } | |
| 12311 | +}); | |
| 12312 | + | |
| 12313 | +_Object$defineProperty(exports, "Redo", { | |
| 12314 | + enumerable: true, | |
| 12315 | + get: function get() { | |
| 12316 | + return _redo.Redo; | |
| 12317 | + } | |
| 12318 | +}); | |
| 12319 | + | |
| 12320 | +_Object$defineProperty(exports, "Undo", { | |
| 12321 | + enumerable: true, | |
| 12322 | + get: function get() { | |
| 12323 | + return _undo.Undo; | |
| 12324 | + } | |
| 12325 | +}); | |
| 12326 | + | |
| 12327 | +_Object$defineProperty(exports, "UndoAll", { | |
| 12328 | + enumerable: true, | |
| 12329 | + get: function get() { | |
| 12330 | + return _undoAll.UndoAll; | |
| 12331 | + } | |
| 12332 | +}); | |
| 12333 | + | |
| 12334 | +var _do = __webpack_require__(364); | |
| 12335 | + | |
| 12336 | +var _redo = __webpack_require__(365); | |
| 12337 | + | |
| 12338 | +var _undo = __webpack_require__(366); | |
| 12339 | + | |
| 12340 | +var _undoAll = __webpack_require__(367); | |
| 12341 | + | |
| 12342 | +/***/ }), | |
| 12343 | +/* 364 */ | |
| 12344 | +/***/ (function(module, exports, __webpack_require__) { | |
| 12345 | + | |
| 12346 | +"use strict"; | |
| 12347 | + | |
| 12348 | + | |
| 12349 | +var _interopRequireDefault = __webpack_require__(0); | |
| 12350 | + | |
| 12351 | +var _Object$defineProperty = __webpack_require__(1); | |
| 12352 | + | |
| 12353 | +_Object$defineProperty(exports, "__esModule", { | |
| 12354 | + value: true | |
| 12355 | +}); | |
| 12356 | + | |
| 12357 | +exports.default = exports.Do = void 0; | |
| 12358 | + | |
| 12359 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 12360 | + | |
| 12361 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 12362 | + | |
| 12363 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 12364 | + | |
| 12365 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 12366 | + | |
| 12367 | +var _commandBase = _interopRequireDefault(__webpack_require__(23)); | |
| 12368 | + | |
| 12369 | +var Do = /*#__PURE__*/function (_CommandBase) { | |
| 12370 | + (0, _inherits2.default)(Do, _CommandBase); | |
| 12371 | + | |
| 12372 | + var _super = (0, _createSuper2.default)(Do); | |
| 12373 | + | |
| 12374 | + function Do() { | |
| 12375 | + (0, _classCallCheck2.default)(this, Do); | |
| 12376 | + return _super.apply(this, arguments); | |
| 12377 | + } | |
| 12378 | + | |
| 12379 | + (0, _createClass2.default)(Do, [{ | |
| 12380 | + key: "apply", | |
| 12381 | + value: function apply(args) { | |
| 12382 | + var index = args.index; | |
| 12383 | + return elementor.documents.getCurrent().history.doItem(index); | |
| 12384 | + } | |
| 12385 | + }]); | |
| 12386 | + return Do; | |
| 12387 | +}(_commandBase.default); | |
| 12388 | + | |
| 12389 | +exports.Do = Do; | |
| 12390 | +var _default = Do; | |
| 12391 | +exports.default = _default; | |
| 12392 | + | |
| 12393 | +/***/ }), | |
| 12394 | +/* 365 */ | |
| 12395 | +/***/ (function(module, exports, __webpack_require__) { | |
| 12396 | + | |
| 12397 | +"use strict"; | |
| 12398 | + | |
| 12399 | + | |
| 12400 | +var _interopRequireDefault = __webpack_require__(0); | |
| 12401 | + | |
| 12402 | +var _Object$defineProperty = __webpack_require__(1); | |
| 12403 | + | |
| 12404 | +_Object$defineProperty(exports, "__esModule", { | |
| 12405 | + value: true | |
| 12406 | +}); | |
| 12407 | + | |
| 12408 | +exports.default = exports.Redo = void 0; | |
| 12409 | + | |
| 12410 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 12411 | + | |
| 12412 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 12413 | + | |
| 12414 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 12415 | + | |
| 12416 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 12417 | + | |
| 12418 | +var _commandBase = _interopRequireDefault(__webpack_require__(23)); | |
| 12419 | + | |
| 12420 | +var Redo = /*#__PURE__*/function (_CommandBase) { | |
| 12421 | + (0, _inherits2.default)(Redo, _CommandBase); | |
| 12422 | + | |
| 12423 | + var _super = (0, _createSuper2.default)(Redo); | |
| 12424 | + | |
| 12425 | + function Redo() { | |
| 12426 | + (0, _classCallCheck2.default)(this, Redo); | |
| 12427 | + return _super.apply(this, arguments); | |
| 12428 | + } | |
| 12429 | + | |
| 12430 | + (0, _createClass2.default)(Redo, [{ | |
| 12431 | + key: "apply", | |
| 12432 | + value: function apply() { | |
| 12433 | + elementor.documents.getCurrent().history.navigate(true); | |
| 12434 | + } | |
| 12435 | + }]); | |
| 12436 | + return Redo; | |
| 12437 | +}(_commandBase.default); | |
| 12438 | + | |
| 12439 | +exports.Redo = Redo; | |
| 12440 | +var _default = Redo; | |
| 12441 | +exports.default = _default; | |
| 12442 | + | |
| 12443 | +/***/ }), | |
| 12444 | +/* 366 */ | |
| 12445 | +/***/ (function(module, exports, __webpack_require__) { | |
| 12446 | + | |
| 12447 | +"use strict"; | |
| 12448 | + | |
| 12449 | + | |
| 12450 | +var _interopRequireDefault = __webpack_require__(0); | |
| 12451 | + | |
| 12452 | +var _Object$defineProperty = __webpack_require__(1); | |
| 12453 | + | |
| 12454 | +_Object$defineProperty(exports, "__esModule", { | |
| 12455 | + value: true | |
| 12456 | +}); | |
| 12457 | + | |
| 12458 | +exports.default = exports.Undo = void 0; | |
| 12459 | + | |
| 12460 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 12461 | + | |
| 12462 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 12463 | + | |
| 12464 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 12465 | + | |
| 12466 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 12467 | + | |
| 12468 | +var _commandBase = _interopRequireDefault(__webpack_require__(23)); | |
| 12469 | + | |
| 12470 | +var Undo = /*#__PURE__*/function (_CommandBase) { | |
| 12471 | + (0, _inherits2.default)(Undo, _CommandBase); | |
| 12472 | + | |
| 12473 | + var _super = (0, _createSuper2.default)(Undo); | |
| 12474 | + | |
| 12475 | + function Undo() { | |
| 12476 | + (0, _classCallCheck2.default)(this, Undo); | |
| 12477 | + return _super.apply(this, arguments); | |
| 12478 | + } | |
| 12479 | + | |
| 12480 | + (0, _createClass2.default)(Undo, [{ | |
| 12481 | + key: "apply", | |
| 12482 | + value: function apply() { | |
| 12483 | + elementor.documents.getCurrent().history.navigate(); | |
| 12484 | + } | |
| 12485 | + }]); | |
| 12486 | + return Undo; | |
| 12487 | +}(_commandBase.default); | |
| 12488 | + | |
| 12489 | +exports.Undo = Undo; | |
| 12490 | +var _default = Undo; | |
| 12491 | +exports.default = _default; | |
| 12492 | + | |
| 12493 | +/***/ }), | |
| 12494 | +/* 367 */ | |
| 12495 | +/***/ (function(module, exports, __webpack_require__) { | |
| 12496 | + | |
| 12497 | +"use strict"; | |
| 12498 | + | |
| 12499 | + | |
| 12500 | +var _interopRequireDefault = __webpack_require__(0); | |
| 12501 | + | |
| 12502 | +var _Object$defineProperty = __webpack_require__(1); | |
| 12503 | + | |
| 12504 | +_Object$defineProperty(exports, "__esModule", { | |
| 12505 | + value: true | |
| 12506 | +}); | |
| 12507 | + | |
| 12508 | +exports.default = exports.UndoAll = void 0; | |
| 12509 | + | |
| 12510 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 12511 | + | |
| 12512 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 12513 | + | |
| 12514 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 12515 | + | |
| 12516 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 12517 | + | |
| 12518 | +var _commandBase = _interopRequireDefault(__webpack_require__(23)); | |
| 12519 | + | |
| 12520 | +var UndoAll = /*#__PURE__*/function (_CommandBase) { | |
| 12521 | + (0, _inherits2.default)(UndoAll, _CommandBase); | |
| 12522 | + | |
| 12523 | + var _super = (0, _createSuper2.default)(UndoAll); | |
| 12524 | + | |
| 12525 | + function UndoAll() { | |
| 12526 | + (0, _classCallCheck2.default)(this, UndoAll); | |
| 12527 | + return _super.apply(this, arguments); | |
| 12528 | + } | |
| 12529 | + | |
| 12530 | + (0, _createClass2.default)(UndoAll, [{ | |
| 12531 | + key: "apply", | |
| 12532 | + value: function apply(args) { | |
| 12533 | + var document = args.document; | |
| 12534 | + document.history.doItem(document.history.getItems().length - 1); | |
| 12535 | + } | |
| 12536 | + }]); | |
| 12537 | + return UndoAll; | |
| 12538 | +}(_commandBase.default); | |
| 12539 | + | |
| 12540 | +exports.UndoAll = UndoAll; | |
| 12541 | +var _default = UndoAll; | |
| 12542 | +exports.default = _default; | |
| 12543 | + | |
| 12544 | +/***/ }), | |
| 12545 | +/* 368 */, | |
| 12546 | +/* 369 */, | |
| 12547 | +/* 370 */, | |
| 12548 | +/* 371 */, | |
| 12549 | +/* 372 */, | |
| 12550 | +/* 373 */, | |
| 12551 | +/* 374 */, | |
| 12552 | +/* 375 */, | |
| 12553 | +/* 376 */, | |
| 12554 | +/* 377 */, | |
| 12555 | +/* 378 */, | |
| 12556 | +/* 379 */, | |
| 12557 | +/* 380 */, | |
| 12558 | +/* 381 */, | |
| 12559 | +/* 382 */, | |
| 12560 | +/* 383 */ | |
| 12561 | +/***/ (function(module, exports, __webpack_require__) { | |
| 12562 | + | |
| 12563 | +"use strict"; | |
| 12564 | + | |
| 12565 | + | |
| 12566 | +var _interopRequireDefault = __webpack_require__(0); | |
| 12567 | + | |
| 12568 | +var _Object$defineProperty = __webpack_require__(1); | |
| 12569 | + | |
| 12570 | +_Object$defineProperty(exports, "__esModule", { | |
| 12571 | + value: true | |
| 12572 | +}); | |
| 12573 | + | |
| 12574 | +exports.default = void 0; | |
| 12575 | + | |
| 12576 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 12577 | + | |
| 12578 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 12579 | + | |
| 12580 | +var BackwardsCompatibility = /*#__PURE__*/function () { | |
| 12581 | + function BackwardsCompatibility() { | |
| 12582 | + (0, _classCallCheck2.default)(this, BackwardsCompatibility); | |
| 12583 | + } | |
| 12584 | + | |
| 12585 | + (0, _createClass2.default)(BackwardsCompatibility, null, [{ | |
| 12586 | + key: "findViewRecursive", | |
| 12587 | + value: function findViewRecursive(parent, key, value) { | |
| 12588 | + var multiple = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true; | |
| 12589 | + elementorCommon.helpers.softDeprecated('findViewRecursive', '2.9.0', "$e.components.get( 'document' ).utils.findViewRecursive( parent, key, value, multiple )"); | |
| 12590 | + return $e.components.get('document').utils.findViewRecursive(parent, key, value, multiple); | |
| 12591 | + } | |
| 12592 | + }, { | |
| 12593 | + key: "findViewById", | |
| 12594 | + value: function findViewById(id) { | |
| 12595 | + elementorCommon.helpers.softDeprecated('findViewById', '2.9.0', "$e.components.get( 'document' ).utils.findViewById( id )"); | |
| 12596 | + return $e.components.get('document').utils.findViewById(id); | |
| 12597 | + } | |
| 12598 | + }, { | |
| 12599 | + key: "findContainerById", | |
| 12600 | + value: function findContainerById(id) { | |
| 12601 | + elementorCommon.helpers.softDeprecated('findContainerById', '2.9.0', "$e.components.get( 'document' ).utils.findContainerById( id )"); | |
| 12602 | + return $e.components.get('document').utils.findContainerById(id); | |
| 12603 | + } | |
| 12604 | + }]); | |
| 12605 | + return BackwardsCompatibility; | |
| 12606 | +}(); | |
| 12607 | + | |
| 12608 | +exports.default = BackwardsCompatibility; | |
| 12609 | + | |
| 12610 | +/***/ }), | |
| 12611 | +/* 384 */, | |
| 12612 | +/* 385 */ | |
| 12613 | +/***/ (function(module, exports, __webpack_require__) { | |
| 12614 | + | |
| 12615 | +"use strict"; | |
| 12616 | + | |
| 12617 | + | |
| 12618 | +__webpack_require__(40); | |
| 12619 | + | |
| 12620 | +module.exports = elementorModules.Module.extend({ | |
| 12621 | + getDefaultSettings: function getDefaultSettings() { | |
| 12622 | + return { | |
| 12623 | + actions: {}, | |
| 12624 | + classes: { | |
| 12625 | + list: 'elementor-context-menu-list', | |
| 12626 | + group: 'elementor-context-menu-list__group', | |
| 12627 | + groupPrefix: 'elementor-context-menu-list__group-', | |
| 12628 | + item: 'elementor-context-menu-list__item', | |
| 12629 | + itemTypePrefix: 'elementor-context-menu-list__item-', | |
| 12630 | + itemTitle: 'elementor-context-menu-list__item__title', | |
| 12631 | + itemShortcut: 'elementor-context-menu-list__item__shortcut', | |
| 12632 | + iconShortcut: 'elementor-context-menu-list__item__icon', | |
| 12633 | + itemDisabled: 'elementor-context-menu-list__item--disabled', | |
| 12634 | + divider: 'elementor-context-menu-list__divider', | |
| 12635 | + hidden: 'elementor-hidden' | |
| 12636 | + } | |
| 12637 | + }; | |
| 12638 | + }, | |
| 12639 | + buildActionItem: function buildActionItem(action) { | |
| 12640 | + var self = this, | |
| 12641 | + classes = self.getSettings('classes'), | |
| 12642 | + $item = jQuery('<div>', { | |
| 12643 | + class: classes.item + ' ' + classes.itemTypePrefix + action.name | |
| 12644 | + }), | |
| 12645 | + $itemTitle = jQuery('<div>', { | |
| 12646 | + class: classes.itemTitle | |
| 12647 | + }).text(action.title), | |
| 12648 | + $itemIcon = jQuery('<div>', { | |
| 12649 | + class: classes.iconShortcut | |
| 12650 | + }); | |
| 12651 | + | |
| 12652 | + if (action.icon) { | |
| 12653 | + $itemIcon.html(jQuery('<i>', { | |
| 12654 | + class: action.icon | |
| 12655 | + })); | |
| 12656 | + } | |
| 12657 | + | |
| 12658 | + $item.append($itemIcon, $itemTitle); | |
| 12659 | + | |
| 12660 | + if (action.shortcut) { | |
| 12661 | + var $itemShortcut = jQuery('<div>', { | |
| 12662 | + class: classes.itemShortcut | |
| 12663 | + }).html(action.shortcut); | |
| 12664 | + $item.append($itemShortcut); | |
| 12665 | + } | |
| 12666 | + | |
| 12667 | + if (action.callback) { | |
| 12668 | + $item.on('click', function () { | |
| 12669 | + self.runAction(action); | |
| 12670 | + }); | |
| 12671 | + } | |
| 12672 | + | |
| 12673 | + action.$item = $item; | |
| 12674 | + return $item; | |
| 12675 | + }, | |
| 12676 | + buildActionsList: function buildActionsList() { | |
| 12677 | + var self = this, | |
| 12678 | + classes = self.getSettings('classes'), | |
| 12679 | + groups = self.getSettings('groups'), | |
| 12680 | + $list = jQuery('<div>', { | |
| 12681 | + class: classes.list | |
| 12682 | + }); | |
| 12683 | + groups.forEach(function (group) { | |
| 12684 | + var $group = jQuery('<div>', { | |
| 12685 | + class: classes.group + ' ' + classes.groupPrefix + group.name | |
| 12686 | + }); | |
| 12687 | + group.actions.forEach(function (action) { | |
| 12688 | + $group.append(self.buildActionItem(action)); | |
| 12689 | + }); | |
| 12690 | + $list.append($group); | |
| 12691 | + group.$item = $group; | |
| 12692 | + }); | |
| 12693 | + return $list; | |
| 12694 | + }, | |
| 12695 | + toggleGroupVisibility: function toggleGroupVisibility(group, state) { | |
| 12696 | + group.$item.toggleClass(this.getSettings('classes.hidden'), !state); | |
| 12697 | + }, | |
| 12698 | + toggleActionVisibility: function toggleActionVisibility(action, state) { | |
| 12699 | + action.$item.toggleClass(this.getSettings('classes.hidden'), !state); | |
| 12700 | + }, | |
| 12701 | + toggleActionUsability: function toggleActionUsability(action, state) { | |
| 12702 | + action.$item.toggleClass(this.getSettings('classes.itemDisabled'), !state); | |
| 12703 | + }, | |
| 12704 | + isActionEnabled: function isActionEnabled(action) { | |
| 12705 | + if (!action.callback && !action.groups) { | |
| 12706 | + return false; | |
| 12707 | + } | |
| 12708 | + | |
| 12709 | + return action.isEnabled ? action.isEnabled() : true; | |
| 12710 | + }, | |
| 12711 | + runAction: function runAction(action) { | |
| 12712 | + if (!this.isActionEnabled(action)) { | |
| 12713 | + return; | |
| 12714 | + } | |
| 12715 | + | |
| 12716 | + action.callback(); | |
| 12717 | + this.getModal().hide(); | |
| 12718 | + }, | |
| 12719 | + initModal: function initModal() { | |
| 12720 | + var modal; | |
| 12721 | + | |
| 12722 | + this.getModal = function () { | |
| 12723 | + if (!modal) { | |
| 12724 | + modal = elementorCommon.dialogsManager.createWidget('simple', { | |
| 12725 | + className: 'elementor-context-menu', | |
| 12726 | + message: this.buildActionsList(), | |
| 12727 | + iframe: elementor.$preview, | |
| 12728 | + effects: { | |
| 12729 | + hide: 'hide', | |
| 12730 | + show: 'show' | |
| 12731 | + }, | |
| 12732 | + hide: { | |
| 12733 | + onOutsideContextMenu: true | |
| 12734 | + }, | |
| 12735 | + position: { | |
| 12736 | + my: (elementorCommon.config.isRTL ? 'right' : 'left') + ' top', | |
| 12737 | + collision: 'fit' | |
| 12738 | + } | |
| 12739 | + }); | |
| 12740 | + } | |
| 12741 | + | |
| 12742 | + return modal; | |
| 12743 | + }; | |
| 12744 | + }, | |
| 12745 | + show: function show(event) { | |
| 12746 | + var self = this, | |
| 12747 | + modal = self.getModal(); | |
| 12748 | + modal.setSettings('position', { | |
| 12749 | + of: event | |
| 12750 | + }); | |
| 12751 | + self.getSettings('groups').forEach(function (group) { | |
| 12752 | + var isGroupVisible = false !== group.isVisible; | |
| 12753 | + self.toggleGroupVisibility(group, isGroupVisible); | |
| 12754 | + | |
| 12755 | + if (isGroupVisible) { | |
| 12756 | + group.actions.forEach(function (action) { | |
| 12757 | + var isActionVisible = false !== action.isVisible; | |
| 12758 | + self.toggleActionVisibility(action, isActionVisible); | |
| 12759 | + | |
| 12760 | + if (isActionVisible) { | |
| 12761 | + self.toggleActionUsability(action, self.isActionEnabled(action)); | |
| 12762 | + } | |
| 12763 | + }); | |
| 12764 | + } | |
| 12765 | + }); | |
| 12766 | + modal.show(); | |
| 12767 | + }, | |
| 12768 | + destroy: function destroy() { | |
| 12769 | + this.getModal().destroy(); | |
| 12770 | + }, | |
| 12771 | + onInit: function onInit() { | |
| 12772 | + this.initModal(); | |
| 12773 | + } | |
| 12774 | +}); | |
| 12775 | + | |
| 12776 | +/***/ }), | |
| 12777 | +/* 386 */ | |
| 12778 | +/***/ (function(module, exports, __webpack_require__) { | |
| 12779 | + | |
| 12780 | +"use strict"; | |
| 12781 | + | |
| 12782 | + | |
| 12783 | +var _interopRequireDefault = __webpack_require__(0); | |
| 12784 | + | |
| 12785 | +var _Object$defineProperty = __webpack_require__(1); | |
| 12786 | + | |
| 12787 | +_Object$defineProperty(exports, "__esModule", { | |
| 12788 | + value: true | |
| 12789 | +}); | |
| 12790 | + | |
| 12791 | +exports.default = void 0; | |
| 12792 | + | |
| 12793 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 12794 | + | |
| 12795 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 12796 | + | |
| 12797 | +var _get2 = _interopRequireDefault(__webpack_require__(26)); | |
| 12798 | + | |
| 12799 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(16)); | |
| 12800 | + | |
| 12801 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 12802 | + | |
| 12803 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 12804 | + | |
| 12805 | +var _base = _interopRequireDefault(__webpack_require__(303)); | |
| 12806 | + | |
| 12807 | +var AddSectionView = /*#__PURE__*/function (_BaseAddSectionView) { | |
| 12808 | + (0, _inherits2.default)(AddSectionView, _BaseAddSectionView); | |
| 12809 | + | |
| 12810 | + var _super = (0, _createSuper2.default)(AddSectionView); | |
| 12811 | + | |
| 12812 | + function AddSectionView() { | |
| 12813 | + (0, _classCallCheck2.default)(this, AddSectionView); | |
| 12814 | + return _super.apply(this, arguments); | |
| 12815 | + } | |
| 12816 | + | |
| 12817 | + (0, _createClass2.default)(AddSectionView, [{ | |
| 12818 | + key: "className", | |
| 12819 | + value: function className() { | |
| 12820 | + return (0, _get2.default)((0, _getPrototypeOf2.default)(AddSectionView.prototype), "className", this).call(this) + ' elementor-add-section-inline'; | |
| 12821 | + } | |
| 12822 | + }, { | |
| 12823 | + key: "fadeToDeath", | |
| 12824 | + value: function fadeToDeath() { | |
| 12825 | + var self = this; | |
| 12826 | + self.$el.slideUp(function () { | |
| 12827 | + self.destroy(); | |
| 12828 | + }); | |
| 12829 | + } | |
| 12830 | + }, { | |
| 12831 | + key: "onAfterPaste", | |
| 12832 | + value: function onAfterPaste() { | |
| 12833 | + (0, _get2.default)((0, _getPrototypeOf2.default)(AddSectionView.prototype), "onAfterPaste", this).call(this); | |
| 12834 | + this.destroy(); | |
| 12835 | + } | |
| 12836 | + }, { | |
| 12837 | + key: "onCloseButtonClick", | |
| 12838 | + value: function onCloseButtonClick() { | |
| 12839 | + this.fadeToDeath(); | |
| 12840 | + } | |
| 12841 | + }, { | |
| 12842 | + key: "onPresetSelected", | |
| 12843 | + value: function onPresetSelected(event) { | |
| 12844 | + (0, _get2.default)((0, _getPrototypeOf2.default)(AddSectionView.prototype), "onPresetSelected", this).call(this, event); | |
| 12845 | + this.destroy(); | |
| 12846 | + } | |
| 12847 | + }, { | |
| 12848 | + key: "onAddTemplateButtonClick", | |
| 12849 | + value: function onAddTemplateButtonClick() { | |
| 12850 | + (0, _get2.default)((0, _getPrototypeOf2.default)(AddSectionView.prototype), "onAddTemplateButtonClick", this).call(this); | |
| 12851 | + this.destroy(); | |
| 12852 | + } | |
| 12853 | + }, { | |
| 12854 | + key: "onDropping", | |
| 12855 | + value: function onDropping() { | |
| 12856 | + (0, _get2.default)((0, _getPrototypeOf2.default)(AddSectionView.prototype), "onDropping", this).call(this); | |
| 12857 | + this.destroy(); | |
| 12858 | + } | |
| 12859 | + }]); | |
| 12860 | + return AddSectionView; | |
| 12861 | +}(_base.default); | |
| 12862 | + | |
| 12863 | +var _default = AddSectionView; | |
| 12864 | +exports.default = _default; | |
| 12865 | + | |
| 12866 | +/***/ }), | |
| 12867 | +/* 387 */ | |
| 12868 | +/***/ (function(module, exports, __webpack_require__) { | |
| 12869 | + | |
| 12870 | +"use strict"; | |
| 12871 | + | |
| 12872 | + | |
| 12873 | +var _section = __webpack_require__(256); | |
| 12874 | + | |
| 12875 | +var BaseElementView = __webpack_require__(304), | |
| 12876 | + ColumnEmptyView = __webpack_require__(388), | |
| 12877 | + ColumnView; | |
| 12878 | + | |
| 12879 | +ColumnView = BaseElementView.extend({ | |
| 12880 | + template: Marionette.TemplateCache.get('#tmpl-elementor-column-content'), | |
| 12881 | + emptyView: ColumnEmptyView, | |
| 12882 | + childViewContainer: elementor.config.legacyMode.elementWrappers ? '> .elementor-column-wrap > .elementor-widget-wrap' : '> .elementor-widget-wrap', | |
| 12883 | + toggleEditTools: true, | |
| 12884 | + behaviors: function behaviors() { | |
| 12885 | + var behaviors = BaseElementView.prototype.behaviors.apply(this, arguments); | |
| 12886 | + | |
| 12887 | + _.extend(behaviors, { | |
| 12888 | + Sortable: { | |
| 12889 | + behaviorClass: __webpack_require__(305), | |
| 12890 | + elChildType: 'widget' | |
| 12891 | + }, | |
| 12892 | + Resizable: { | |
| 12893 | + behaviorClass: __webpack_require__(389) | |
| 12894 | + } | |
| 12895 | + }); | |
| 12896 | + | |
| 12897 | + return elementor.hooks.applyFilters('elements/column/behaviors', behaviors, this); | |
| 12898 | + }, | |
| 12899 | + className: function className() { | |
| 12900 | + var classes = BaseElementView.prototype.className.apply(this, arguments), | |
| 12901 | + type = this.isInner() ? 'inner' : 'top'; | |
| 12902 | + return classes + ' elementor-column elementor-' + type + '-column'; | |
| 12903 | + }, | |
| 12904 | + tagName: function tagName() { | |
| 12905 | + return this.model.getSetting('html_tag') || 'div'; | |
| 12906 | + }, | |
| 12907 | + ui: function ui() { | |
| 12908 | + var ui = BaseElementView.prototype.ui.apply(this, arguments); | |
| 12909 | + ui.columnInner = elementor.config.legacyMode.elementWrappers ? '> .elementor-column-wrap' : '> .elementor-widget-wrap'; | |
| 12910 | + ui.percentsTooltip = '> .elementor-element-overlay .elementor-column-percents-tooltip'; | |
| 12911 | + return ui; | |
| 12912 | + }, | |
| 12913 | + getEditButtons: function getEditButtons() { | |
| 12914 | + var elementData = elementor.getElementData(this.model), | |
| 12915 | + editTools = {}; | |
| 12916 | + editTools.edit = { | |
| 12917 | + title: elementor.translate('edit_element', [elementData.title]), | |
| 12918 | + icon: 'column' | |
| 12919 | + }; | |
| 12920 | + | |
| 12921 | + if (elementor.getPreferences('edit_buttons')) { | |
| 12922 | + editTools.duplicate = { | |
| 12923 | + title: elementor.translate('duplicate_element', [elementData.title]), | |
| 12924 | + icon: 'clone' | |
| 12925 | + }; | |
| 12926 | + editTools.add = { | |
| 12927 | + title: elementor.translate('add_element', [elementData.title]), | |
| 12928 | + icon: 'plus' | |
| 12929 | + }; | |
| 12930 | + editTools.remove = { | |
| 12931 | + title: elementor.translate('delete_element', [elementData.title]), | |
| 12932 | + icon: 'close' | |
| 12933 | + }; | |
| 12934 | + } | |
| 12935 | + | |
| 12936 | + return editTools; | |
| 12937 | + }, | |
| 12938 | + initialize: function initialize() { | |
| 12939 | + BaseElementView.prototype.initialize.apply(this, arguments); | |
| 12940 | + this.model.get('editSettings').set('defaultEditRoute', 'layout'); | |
| 12941 | + }, | |
| 12942 | + attachElContent: function attachElContent() { | |
| 12943 | + BaseElementView.prototype.attachElContent.apply(this, arguments); | |
| 12944 | + var $tooltip = jQuery('<div>', { | |
| 12945 | + class: 'elementor-column-percents-tooltip' | |
| 12946 | + }); | |
| 12947 | + this.$el.children('.elementor-element-overlay').append($tooltip); | |
| 12948 | + }, | |
| 12949 | + getContextMenuGroups: function getContextMenuGroups() { | |
| 12950 | + var self = this, | |
| 12951 | + groups = BaseElementView.prototype.getContextMenuGroups.apply(this, arguments), | |
| 12952 | + generalGroupIndex = groups.indexOf(_.findWhere(groups, { | |
| 12953 | + name: 'general' | |
| 12954 | + })); | |
| 12955 | + groups.splice(generalGroupIndex + 1, 0, { | |
| 12956 | + name: 'addNew', | |
| 12957 | + actions: [{ | |
| 12958 | + name: 'addNew', | |
| 12959 | + icon: 'eicon-plus', | |
| 12960 | + title: elementor.translate('new_column'), | |
| 12961 | + callback: this.addNewColumn.bind(this), | |
| 12962 | + isEnabled: function isEnabled() { | |
| 12963 | + return self.model.collection.length < _section.DEFAULT_MAX_COLUMNS; | |
| 12964 | + } | |
| 12965 | + }] | |
| 12966 | + }); | |
| 12967 | + return groups; | |
| 12968 | + }, | |
| 12969 | + isDroppingAllowed: function isDroppingAllowed() { | |
| 12970 | + // Don't allow dragging items to document which is not editable. | |
| 12971 | + if (!this.getContainer().isEditable()) { | |
| 12972 | + return false; | |
| 12973 | + } | |
| 12974 | + | |
| 12975 | + var elementView = elementor.channels.panelElements.request('element:selected'); | |
| 12976 | + | |
| 12977 | + if (!elementView) { | |
| 12978 | + return false; | |
| 12979 | + } | |
| 12980 | + | |
| 12981 | + var elType = elementView.model.get('elType'); | |
| 12982 | + | |
| 12983 | + if ('section' === elType) { | |
| 12984 | + return !this.isInner(); | |
| 12985 | + } | |
| 12986 | + | |
| 12987 | + return 'widget' === elType; | |
| 12988 | + }, | |
| 12989 | + getPercentsForDisplay: function getPercentsForDisplay() { | |
| 12990 | + var inlineSize = +this.model.getSetting('_inline_size') || this.getPercentSize(); | |
| 12991 | + return inlineSize.toFixed(1) + '%'; | |
| 12992 | + }, | |
| 12993 | + changeSizeUI: function changeSizeUI() { | |
| 12994 | + var self = this, | |
| 12995 | + columnSize = self.model.getSetting('_column_size'); | |
| 12996 | + self.$el.attr('data-col', columnSize); | |
| 12997 | + | |
| 12998 | + _.defer(function () { | |
| 12999 | + // Wait for the column size to be applied | |
| 13000 | + if (self.ui.percentsTooltip) { | |
| 13001 | + self.ui.percentsTooltip.text(self.getPercentsForDisplay()); | |
| 13002 | + } | |
| 13003 | + }); | |
| 13004 | + }, | |
| 13005 | + getPercentSize: function getPercentSize(size) { | |
| 13006 | + if (!size) { | |
| 13007 | + size = this.el.getBoundingClientRect().width; | |
| 13008 | + } | |
| 13009 | + | |
| 13010 | + return +(size / this.$el.parent().width() * 100).toFixed(3); | |
| 13011 | + }, | |
| 13012 | + getSortableOptions: function getSortableOptions() { | |
| 13013 | + return { | |
| 13014 | + connectWith: '.elementor-widget-wrap', | |
| 13015 | + items: '> .elementor-element' | |
| 13016 | + }; | |
| 13017 | + }, | |
| 13018 | + changeChildContainerClasses: function changeChildContainerClasses() { | |
| 13019 | + var emptyClass = 'elementor-element-empty', | |
| 13020 | + populatedClass = 'elementor-element-populated'; | |
| 13021 | + | |
| 13022 | + if (this.ui.columnInner) { | |
| 13023 | + if (this.collection.isEmpty()) { | |
| 13024 | + this.ui.columnInner.removeClass(populatedClass).addClass(emptyClass); | |
| 13025 | + } else { | |
| 13026 | + this.ui.columnInner.removeClass(emptyClass).addClass(populatedClass); | |
| 13027 | + } | |
| 13028 | + } | |
| 13029 | + }, | |
| 13030 | + addNewColumn: function addNewColumn() { | |
| 13031 | + $e.run('document/elements/create', { | |
| 13032 | + model: { | |
| 13033 | + elType: 'column' | |
| 13034 | + }, | |
| 13035 | + container: this.getContainer().parent, | |
| 13036 | + options: { | |
| 13037 | + at: this.$el.index() + 1 | |
| 13038 | + } | |
| 13039 | + }); | |
| 13040 | + }, | |
| 13041 | + onRender: function onRender() { | |
| 13042 | + var _this = this; | |
| 13043 | + | |
| 13044 | + var isLegacyMode = elementor.config.legacyMode.elementWrappers; | |
| 13045 | + var itemsClasses = ''; | |
| 13046 | + | |
| 13047 | + if (isLegacyMode) { | |
| 13048 | + itemsClasses = ' > .elementor-column-wrap > .elementor-widget-wrap > .elementor-element, >.elementor-column-wrap > .elementor-widget-wrap > .elementor-empty-view > .elementor-first-add'; | |
| 13049 | + } else { | |
| 13050 | + itemsClasses = ' > .elementor-widget-wrap > .elementor-element, >.elementor-widget-wrap > .elementor-empty-view > .elementor-first-add'; | |
| 13051 | + } | |
| 13052 | + | |
| 13053 | + BaseElementView.prototype.onRender.apply(this, arguments); | |
| 13054 | + this.changeChildContainerClasses(); | |
| 13055 | + this.changeSizeUI(); | |
| 13056 | + this.$el.html5Droppable({ | |
| 13057 | + items: itemsClasses, | |
| 13058 | + axis: ['vertical'], | |
| 13059 | + groups: ['elementor-element'], | |
| 13060 | + isDroppingAllowed: this.isDroppingAllowed.bind(this), | |
| 13061 | + currentElementClass: 'elementor-html5dnd-current-element', | |
| 13062 | + placeholderClass: 'elementor-sortable-placeholder elementor-widget-placeholder', | |
| 13063 | + hasDraggingOnChildClass: 'elementor-dragging-on-child', | |
| 13064 | + onDropping: function onDropping(side, event) { | |
| 13065 | + event.stopPropagation(); // Triggering drag end manually, since it won't fired above iframe | |
| 13066 | + | |
| 13067 | + elementor.getPreviewView().onPanelElementDragEnd(); | |
| 13068 | + var newIndex = jQuery(event.currentTarget).index(); // Since 3.0.0, the `.elementor-background-overlay` element sit at the same level as widgets | |
| 13069 | + | |
| 13070 | + if ('bottom' === side && isLegacyMode) { | |
| 13071 | + newIndex++; | |
| 13072 | + } else if ('top' === side && !isLegacyMode) { | |
| 13073 | + newIndex--; | |
| 13074 | + } | |
| 13075 | + | |
| 13076 | + _this.addElementFromPanel({ | |
| 13077 | + at: newIndex | |
| 13078 | + }); | |
| 13079 | + } | |
| 13080 | + }); | |
| 13081 | + }, | |
| 13082 | + onAddButtonClick: function onAddButtonClick(event) { | |
| 13083 | + event.stopPropagation(); | |
| 13084 | + this.addNewColumn(); | |
| 13085 | + } | |
| 13086 | +}); | |
| 13087 | +module.exports = ColumnView; | |
| 13088 | + | |
| 13089 | +/***/ }), | |
| 13090 | +/* 388 */ | |
| 13091 | +/***/ (function(module, exports, __webpack_require__) { | |
| 13092 | + | |
| 13093 | +"use strict"; | |
| 13094 | + | |
| 13095 | + | |
| 13096 | +var _interopRequireDefault = __webpack_require__(0); | |
| 13097 | + | |
| 13098 | +var _helper = _interopRequireDefault(__webpack_require__(215)); | |
| 13099 | + | |
| 13100 | +module.exports = Marionette.ItemView.extend({ | |
| 13101 | + template: '#tmpl-elementor-empty-preview', | |
| 13102 | + className: 'elementor-empty-view', | |
| 13103 | + events: { | |
| 13104 | + click: 'onClickAdd' | |
| 13105 | + }, | |
| 13106 | + behaviors: function behaviors() { | |
| 13107 | + return { | |
| 13108 | + contextMenu: { | |
| 13109 | + behaviorClass: __webpack_require__(276), | |
| 13110 | + groups: this.getContextMenuGroups() | |
| 13111 | + } | |
| 13112 | + }; | |
| 13113 | + }, | |
| 13114 | + getContextMenuGroups: function getContextMenuGroups() { | |
| 13115 | + var _this = this; | |
| 13116 | + | |
| 13117 | + return [{ | |
| 13118 | + name: 'general', | |
| 13119 | + actions: [{ | |
| 13120 | + name: 'paste', | |
| 13121 | + title: elementor.translate('paste'), | |
| 13122 | + isEnabled: function isEnabled() { | |
| 13123 | + return _helper.default.isPasteEnabled(_this._parent.getContainer()); | |
| 13124 | + }, | |
| 13125 | + callback: function callback() { | |
| 13126 | + return $e.run('document/ui/paste', { | |
| 13127 | + container: _this._parent.getContainer() | |
| 13128 | + }); | |
| 13129 | + } | |
| 13130 | + }] | |
| 13131 | + }]; | |
| 13132 | + }, | |
| 13133 | + onClickAdd: function onClickAdd() { | |
| 13134 | + $e.route('panel/elements/categories'); | |
| 13135 | + } | |
| 13136 | +}); | |
| 13137 | + | |
| 13138 | +/***/ }), | |
| 13139 | +/* 389 */ | |
| 13140 | +/***/ (function(module, exports, __webpack_require__) { | |
| 13141 | + | |
| 13142 | +"use strict"; | |
| 13143 | + | |
| 13144 | + | |
| 13145 | +var ResizableBehavior; | |
| 13146 | +ResizableBehavior = Marionette.Behavior.extend({ | |
| 13147 | + defaults: { | |
| 13148 | + handles: elementorCommon.config.isRTL ? 'w' : 'e' | |
| 13149 | + }, | |
| 13150 | + events: { | |
| 13151 | + resizestart: 'onResizeStart', | |
| 13152 | + resizestop: 'onResizeStop', | |
| 13153 | + resize: 'onResize' | |
| 13154 | + }, | |
| 13155 | + initialize: function initialize() { | |
| 13156 | + Marionette.Behavior.prototype.initialize.apply(this, arguments); | |
| 13157 | + this.listenTo(elementor.channels.dataEditMode, 'switch', this.onEditModeSwitched); | |
| 13158 | + }, | |
| 13159 | + active: function active() { | |
| 13160 | + if (!elementor.userCan('design')) { | |
| 13161 | + return; | |
| 13162 | + } | |
| 13163 | + | |
| 13164 | + this.deactivate(); | |
| 13165 | + | |
| 13166 | + var options = _.clone(this.options); | |
| 13167 | + | |
| 13168 | + delete options.behaviorClass; | |
| 13169 | + | |
| 13170 | + var $childViewContainer = this.getChildViewContainer(), | |
| 13171 | + defaultResizableOptions = {}, | |
| 13172 | + resizableOptions = _.extend(defaultResizableOptions, options); | |
| 13173 | + | |
| 13174 | + $childViewContainer.resizable(resizableOptions); | |
| 13175 | + }, | |
| 13176 | + deactivate: function deactivate() { | |
| 13177 | + if (this.getChildViewContainer().resizable('instance')) { | |
| 13178 | + this.getChildViewContainer().resizable('destroy'); | |
| 13179 | + } | |
| 13180 | + }, | |
| 13181 | + onEditModeSwitched: function onEditModeSwitched(activeMode) { | |
| 13182 | + if ('edit' === activeMode) { | |
| 13183 | + this.active(); | |
| 13184 | + } else { | |
| 13185 | + this.deactivate(); | |
| 13186 | + } | |
| 13187 | + }, | |
| 13188 | + onRender: function onRender() { | |
| 13189 | + var self = this; | |
| 13190 | + | |
| 13191 | + _.defer(function () { | |
| 13192 | + self.onEditModeSwitched(elementor.channels.dataEditMode.request('activeMode')); | |
| 13193 | + }); | |
| 13194 | + }, | |
| 13195 | + onDestroy: function onDestroy() { | |
| 13196 | + this.deactivate(); | |
| 13197 | + }, | |
| 13198 | + onResizeStart: function onResizeStart(event) { | |
| 13199 | + event.stopPropagation(); | |
| 13200 | + this.view.$el.data('originalWidth', this.view.el.getBoundingClientRect().width); | |
| 13201 | + this.view.triggerMethod('request:resize:start', event); | |
| 13202 | + }, | |
| 13203 | + onResizeStop: function onResizeStop(event) { | |
| 13204 | + event.stopPropagation(); | |
| 13205 | + this.view.triggerMethod('request:resize:stop'); | |
| 13206 | + }, | |
| 13207 | + onResize: function onResize(event, ui) { | |
| 13208 | + event.stopPropagation(); | |
| 13209 | + this.view.triggerMethod('request:resize', ui, event); | |
| 13210 | + }, | |
| 13211 | + getChildViewContainer: function getChildViewContainer() { | |
| 13212 | + return this.$el; | |
| 13213 | + } | |
| 13214 | +}); | |
| 13215 | +module.exports = ResizableBehavior; | |
| 13216 | + | |
| 13217 | +/***/ }), | |
| 13218 | +/* 390 */, | |
| 13219 | +/* 391 */, | |
| 13220 | +/* 392 */, | |
| 13221 | +/* 393 */, | |
| 13222 | +/* 394 */, | |
| 13223 | +/* 395 */, | |
| 13224 | +/* 396 */, | |
| 13225 | +/* 397 */, | |
| 13226 | +/* 398 */, | |
| 13227 | +/* 399 */, | |
| 13228 | +/* 400 */, | |
| 13229 | +/* 401 */, | |
| 13230 | +/* 402 */, | |
| 13231 | +/* 403 */, | |
| 13232 | +/* 404 */, | |
| 13233 | +/* 405 */, | |
| 13234 | +/* 406 */ | |
| 13235 | +/***/ (function(module, exports, __webpack_require__) { | |
| 13236 | + | |
| 13237 | +"use strict"; | |
| 13238 | + | |
| 13239 | + | |
| 13240 | +var _interopRequireDefault = __webpack_require__(0); | |
| 13241 | + | |
| 13242 | +var _Object$defineProperty = __webpack_require__(1); | |
| 13243 | + | |
| 13244 | +_Object$defineProperty(exports, "__esModule", { | |
| 13245 | + value: true | |
| 13246 | +}); | |
| 13247 | + | |
| 13248 | +exports.default = exports.NotFoundError = void 0; | |
| 13249 | + | |
| 13250 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 13251 | + | |
| 13252 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 13253 | + | |
| 13254 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 13255 | + | |
| 13256 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 13257 | + | |
| 13258 | +var _baseError = _interopRequireDefault(__webpack_require__(326)); | |
| 13259 | + | |
| 13260 | +var NotFoundError = /*#__PURE__*/function (_BaseError) { | |
| 13261 | + (0, _inherits2.default)(NotFoundError, _BaseError); | |
| 13262 | + | |
| 13263 | + var _super = (0, _createSuper2.default)(NotFoundError); | |
| 13264 | + | |
| 13265 | + function NotFoundError() { | |
| 13266 | + (0, _classCallCheck2.default)(this, NotFoundError); | |
| 13267 | + return _super.apply(this, arguments); | |
| 13268 | + } | |
| 13269 | + | |
| 13270 | + (0, _createClass2.default)(NotFoundError, [{ | |
| 13271 | + key: "notify", | |
| 13272 | + value: function notify() { | |
| 13273 | + elementorCommon.helpers.consoleWarn(this.message); | |
| 13274 | + } | |
| 955 | 13275 | }], [{ |
| 956 | - key: "getInstanceType", | |
| 957 | - value: function getInstanceType() { | |
| 958 | - return 'CommandInfra'; | |
| 13276 | + key: "getStatus", | |
| 13277 | + value: function getStatus() { | |
| 13278 | + return 404; | |
| 959 | 13279 | } |
| 13280 | + }]); | |
| 13281 | + return NotFoundError; | |
| 13282 | +}(_baseError.default); | |
| 960 | 13283 | |
| 13284 | +exports.NotFoundError = NotFoundError; | |
| 13285 | +var _default = NotFoundError; | |
| 13286 | +exports.default = _default; | |
| 13287 | + | |
| 13288 | +/***/ }), | |
| 13289 | +/* 407 */ | |
| 13290 | +/***/ (function(module, exports, __webpack_require__) { | |
| 13291 | + | |
| 13292 | +"use strict"; | |
| 13293 | + | |
| 13294 | + | |
| 13295 | +var _interopRequireDefault = __webpack_require__(0); | |
| 13296 | + | |
| 13297 | +var _Object$defineProperty = __webpack_require__(1); | |
| 13298 | + | |
| 13299 | +_Object$defineProperty(exports, "__esModule", { | |
| 13300 | + value: true | |
| 13301 | +}); | |
| 13302 | + | |
| 13303 | +exports.default = exports.DefaultError = void 0; | |
| 13304 | + | |
| 13305 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 13306 | + | |
| 13307 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 13308 | + | |
| 13309 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 13310 | + | |
| 13311 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 13312 | + | |
| 13313 | +var _baseError = _interopRequireDefault(__webpack_require__(326)); | |
| 13314 | + | |
| 13315 | +var DefaultError = /*#__PURE__*/function (_BaseError) { | |
| 13316 | + (0, _inherits2.default)(DefaultError, _BaseError); | |
| 13317 | + | |
| 13318 | + var _super = (0, _createSuper2.default)(DefaultError); | |
| 13319 | + | |
| 13320 | + function DefaultError() { | |
| 13321 | + (0, _classCallCheck2.default)(this, DefaultError); | |
| 13322 | + return _super.apply(this, arguments); | |
| 13323 | + } | |
| 13324 | + | |
| 13325 | + (0, _createClass2.default)(DefaultError, null, [{ | |
| 13326 | + key: "getStatus", | |
| 13327 | + value: function getStatus() { | |
| 13328 | + return 0; | |
| 13329 | + } | |
| 13330 | + }]); | |
| 13331 | + return DefaultError; | |
| 13332 | +}(_baseError.default); | |
| 13333 | + | |
| 13334 | +exports.DefaultError = DefaultError; | |
| 13335 | +var _default = DefaultError; | |
| 13336 | +exports.default = _default; | |
| 13337 | + | |
| 13338 | +/***/ }), | |
| 13339 | +/* 408 */, | |
| 13340 | +/* 409 */, | |
| 13341 | +/* 410 */, | |
| 13342 | +/* 411 */, | |
| 13343 | +/* 412 */ | |
| 13344 | +/***/ (function(module, exports, __webpack_require__) { | |
| 13345 | + | |
| 13346 | +"use strict"; | |
| 13347 | + | |
| 13348 | + | |
| 13349 | +var _interopRequireDefault = __webpack_require__(0); | |
| 13350 | + | |
| 13351 | +var _Object$defineProperty = __webpack_require__(1); | |
| 13352 | + | |
| 13353 | +_Object$defineProperty(exports, "__esModule", { | |
| 13354 | + value: true | |
| 13355 | +}); | |
| 13356 | + | |
| 13357 | +exports.default = void 0; | |
| 13358 | + | |
| 13359 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 13360 | + | |
| 13361 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 13362 | + | |
| 13363 | +var _get2 = _interopRequireDefault(__webpack_require__(26)); | |
| 13364 | + | |
| 13365 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(16)); | |
| 13366 | + | |
| 13367 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 13368 | + | |
| 13369 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 13370 | + | |
| 13371 | +var _commandHistory = _interopRequireDefault(__webpack_require__(129)); | |
| 13372 | + | |
| 13373 | +var _settings = _interopRequireDefault(__webpack_require__(350)); | |
| 13374 | + | |
| 13375 | +var CommandDisableEnable = /*#__PURE__*/function (_CommandHistory) { | |
| 13376 | + (0, _inherits2.default)(CommandDisableEnable, _CommandHistory); | |
| 13377 | + | |
| 13378 | + var _super = (0, _createSuper2.default)(CommandDisableEnable); | |
| 13379 | + | |
| 13380 | + function CommandDisableEnable() { | |
| 13381 | + (0, _classCallCheck2.default)(this, CommandDisableEnable); | |
| 13382 | + return _super.apply(this, arguments); | |
| 13383 | + } | |
| 13384 | + | |
| 13385 | + (0, _createClass2.default)(CommandDisableEnable, [{ | |
| 13386 | + key: "initialize", | |
| 13387 | + value: function initialize(args) { | |
| 13388 | + (0, _get2.default)((0, _getPrototypeOf2.default)(CommandDisableEnable.prototype), "initialize", this).call(this, args); | |
| 13389 | + /** | |
| 13390 | + * Which command is running. | |
| 13391 | + * | |
| 13392 | + * @type {string} | |
| 13393 | + */ | |
| 13394 | + | |
| 13395 | + this.type = this.currentCommand === this.constructor.getEnableCommand() ? 'enable' : 'disable'; | |
| 13396 | + } | |
| 13397 | + }, { | |
| 13398 | + key: "validateArgs", | |
| 13399 | + value: function validateArgs(args) { | |
| 13400 | + this.requireContainer(args); | |
| 13401 | + this.requireArgumentConstructor('settings', Object, args); | |
| 13402 | + } | |
| 13403 | + }, { | |
| 13404 | + key: "getHistory", | |
| 13405 | + value: function getHistory(args) { | |
| 13406 | + var settings = args.settings, | |
| 13407 | + _args$containers = args.containers, | |
| 13408 | + containers = _args$containers === void 0 ? [args.container] : _args$containers, | |
| 13409 | + changes = {}; | |
| 13410 | + containers.forEach(function (container) { | |
| 13411 | + var id = container.id; | |
| 13412 | + | |
| 13413 | + if (!changes[id]) { | |
| 13414 | + changes[id] = {}; | |
| 13415 | + } | |
| 13416 | + | |
| 13417 | + changes[id] = settings; | |
| 13418 | + }); | |
| 13419 | + | |
| 13420 | + var subTitle = elementor.translate(this.constructor.getName()) + ' ' + _settings.default.getSubTitle(args), | |
| 13421 | + type = this.type; | |
| 13422 | + | |
| 13423 | + return { | |
| 13424 | + containers: containers, | |
| 13425 | + subTitle: subTitle, | |
| 13426 | + data: { | |
| 13427 | + changes: changes, | |
| 13428 | + command: this.currentCommand | |
| 13429 | + }, | |
| 13430 | + type: type, | |
| 13431 | + restore: this.constructor.restore | |
| 13432 | + }; | |
| 13433 | + } | |
| 13434 | + }, { | |
| 13435 | + key: "isDataChanged", | |
| 13436 | + value: function isDataChanged() { | |
| 13437 | + return true; | |
| 13438 | + } | |
| 13439 | + }], [{ | |
| 13440 | + key: "getName", | |
| 13441 | + value: function getName() { | |
| 13442 | + elementorModules.ForceMethodImplementation(); | |
| 13443 | + } | |
| 961 | 13444 | /** |
| 962 | - * Get info of command. | |
| 963 | - * | |
| 964 | - * @return {Object} Extra information about the command. | |
| 13445 | + * @returns {string} | |
| 965 | 13446 | */ |
| 13447 | + | |
| 966 | 13448 | }, { |
| 967 | - key: "getInfo", | |
| 968 | - value: function getInfo() { | |
| 969 | - return {}; | |
| 13449 | + key: "getEnableCommand", | |
| 13450 | + value: function getEnableCommand() { | |
| 13451 | + elementorModules.ForceMethodImplementation(); | |
| 970 | 13452 | } |
| 971 | - | |
| 972 | 13453 | /** |
| 973 | - * @return {string} Self command name. | |
| 13454 | + * @returns {string} | |
| 974 | 13455 | */ |
| 13456 | + | |
| 975 | 13457 | }, { |
| 976 | - key: "getCommand", | |
| 977 | - value: function getCommand() { | |
| 978 | - return this.registerConfig.command; | |
| 13458 | + key: "getDisableCommand", | |
| 13459 | + value: function getDisableCommand() { | |
| 13460 | + elementorModules.ForceMethodImplementation(); | |
| 979 | 13461 | } |
| 13462 | + }, { | |
| 13463 | + key: "restore", | |
| 13464 | + value: function restore(historyItem, isRedo) { | |
| 13465 | + var data = historyItem.get('data'), | |
| 13466 | + CommandClass = $e.commands.getCommandClass(data.command); // Upon `disable` command toggle `isRedo`. | |
| 980 | 13467 | |
| 13468 | + if (CommandClass.getDisableCommand() === data.command) { | |
| 13469 | + isRedo = !isRedo; | |
| 13470 | + } | |
| 13471 | + | |
| 13472 | + historyItem.get('containers').forEach(function (container) { | |
| 13473 | + var settings = data.changes[container.id], | |
| 13474 | + toggle = isRedo ? CommandClass.getEnableCommand() : CommandClass.getDisableCommand(); | |
| 13475 | + $e.run(toggle, { | |
| 13476 | + container: container, | |
| 13477 | + settings: settings | |
| 13478 | + }); | |
| 13479 | + container.panel.refresh(); | |
| 13480 | + }); | |
| 13481 | + } | |
| 13482 | + }]); | |
| 13483 | + return CommandDisableEnable; | |
| 13484 | +}(_commandHistory.default); | |
| 13485 | + | |
| 13486 | +exports.default = CommandDisableEnable; | |
| 13487 | + | |
| 13488 | +/***/ }), | |
| 13489 | +/* 413 */, | |
| 13490 | +/* 414 */, | |
| 13491 | +/* 415 */, | |
| 13492 | +/* 416 */, | |
| 13493 | +/* 417 */, | |
| 13494 | +/* 418 */ | |
| 13495 | +/***/ (function(module, exports, __webpack_require__) { | |
| 13496 | + | |
| 13497 | +"use strict"; | |
| 13498 | + | |
| 13499 | + | |
| 13500 | +var _interopRequireDefault = __webpack_require__(0); | |
| 13501 | + | |
| 13502 | +var _Object$defineProperty = __webpack_require__(1); | |
| 13503 | + | |
| 13504 | +_Object$defineProperty(exports, "__esModule", { | |
| 13505 | + value: true | |
| 13506 | +}); | |
| 13507 | + | |
| 13508 | +exports.default = void 0; | |
| 13509 | + | |
| 13510 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 13511 | + | |
| 13512 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 13513 | + | |
| 13514 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 13515 | + | |
| 13516 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 13517 | + | |
| 13518 | +var _commandDisableEnable = _interopRequireDefault(__webpack_require__(412)); | |
| 13519 | + | |
| 13520 | +var DisableEnable = /*#__PURE__*/function (_CommandDisableEnable) { | |
| 13521 | + (0, _inherits2.default)(DisableEnable, _CommandDisableEnable); | |
| 13522 | + | |
| 13523 | + var _super = (0, _createSuper2.default)(DisableEnable); | |
| 13524 | + | |
| 13525 | + function DisableEnable() { | |
| 13526 | + (0, _classCallCheck2.default)(this, DisableEnable); | |
| 13527 | + return _super.apply(this, arguments); | |
| 13528 | + } | |
| 13529 | + | |
| 13530 | + (0, _createClass2.default)(DisableEnable, null, [{ | |
| 13531 | + key: "getName", | |
| 13532 | + value: function getName() { | |
| 13533 | + return 'dynamic'; | |
| 13534 | + } | |
| 13535 | + }, { | |
| 13536 | + key: "getEnableCommand", | |
| 13537 | + value: function getEnableCommand() { | |
| 13538 | + return 'document/dynamic/enable'; | |
| 13539 | + } | |
| 13540 | + }, { | |
| 13541 | + key: "getDisableCommand", | |
| 13542 | + value: function getDisableCommand() { | |
| 13543 | + return 'document/dynamic/disable'; | |
| 13544 | + } | |
| 13545 | + }]); | |
| 13546 | + return DisableEnable; | |
| 13547 | +}(_commandDisableEnable.default); | |
| 13548 | + | |
| 13549 | +exports.default = DisableEnable; | |
| 13550 | + | |
| 13551 | +/***/ }), | |
| 13552 | +/* 419 */ | |
| 13553 | +/***/ (function(module, exports, __webpack_require__) { | |
| 13554 | + | |
| 13555 | +"use strict"; | |
| 13556 | + | |
| 13557 | + | |
| 13558 | +var _Object$defineProperty = __webpack_require__(1); | |
| 13559 | + | |
| 13560 | +_Object$defineProperty(exports, "__esModule", { | |
| 13561 | + value: true | |
| 13562 | +}); | |
| 13563 | + | |
| 13564 | +_Object$defineProperty(exports, "Copy", { | |
| 13565 | + enumerable: true, | |
| 13566 | + get: function get() { | |
| 13567 | + return _copy.Copy; | |
| 13568 | + } | |
| 13569 | +}); | |
| 13570 | + | |
| 13571 | +_Object$defineProperty(exports, "CopyAll", { | |
| 13572 | + enumerable: true, | |
| 13573 | + get: function get() { | |
| 13574 | + return _copyAll.CopyAll; | |
| 13575 | + } | |
| 13576 | +}); | |
| 13577 | + | |
| 13578 | +_Object$defineProperty(exports, "Create", { | |
| 13579 | + enumerable: true, | |
| 13580 | + get: function get() { | |
| 13581 | + return _create.Create; | |
| 13582 | + } | |
| 13583 | +}); | |
| 13584 | + | |
| 13585 | +_Object$defineProperty(exports, "Delete", { | |
| 13586 | + enumerable: true, | |
| 13587 | + get: function get() { | |
| 13588 | + return _delete.Delete; | |
| 13589 | + } | |
| 13590 | +}); | |
| 13591 | + | |
| 13592 | +_Object$defineProperty(exports, "Duplicate", { | |
| 13593 | + enumerable: true, | |
| 13594 | + get: function get() { | |
| 13595 | + return _duplicate.Duplicate; | |
| 13596 | + } | |
| 13597 | +}); | |
| 13598 | + | |
| 13599 | +_Object$defineProperty(exports, "Empty", { | |
| 13600 | + enumerable: true, | |
| 13601 | + get: function get() { | |
| 13602 | + return _empty.Empty; | |
| 13603 | + } | |
| 13604 | +}); | |
| 13605 | + | |
| 13606 | +_Object$defineProperty(exports, "Import", { | |
| 13607 | + enumerable: true, | |
| 13608 | + get: function get() { | |
| 13609 | + return _import.Import; | |
| 13610 | + } | |
| 13611 | +}); | |
| 13612 | + | |
| 13613 | +_Object$defineProperty(exports, "Paste", { | |
| 13614 | + enumerable: true, | |
| 13615 | + get: function get() { | |
| 13616 | + return _paste.Paste; | |
| 13617 | + } | |
| 13618 | +}); | |
| 13619 | + | |
| 13620 | +_Object$defineProperty(exports, "Move", { | |
| 13621 | + enumerable: true, | |
| 13622 | + get: function get() { | |
| 13623 | + return _move.Move; | |
| 13624 | + } | |
| 13625 | +}); | |
| 13626 | + | |
| 13627 | +_Object$defineProperty(exports, "PasteStyle", { | |
| 13628 | + enumerable: true, | |
| 13629 | + get: function get() { | |
| 13630 | + return _pasteStyle.PasteStyle; | |
| 13631 | + } | |
| 13632 | +}); | |
| 13633 | + | |
| 13634 | +_Object$defineProperty(exports, "ResetSettings", { | |
| 13635 | + enumerable: true, | |
| 13636 | + get: function get() { | |
| 13637 | + return _resetSettings.ResetSettings; | |
| 13638 | + } | |
| 13639 | +}); | |
| 13640 | + | |
| 13641 | +_Object$defineProperty(exports, "ResetStyle", { | |
| 13642 | + enumerable: true, | |
| 13643 | + get: function get() { | |
| 13644 | + return _resetStyle.ResetStyle; | |
| 13645 | + } | |
| 13646 | +}); | |
| 13647 | + | |
| 13648 | +_Object$defineProperty(exports, "Settings", { | |
| 13649 | + enumerable: true, | |
| 13650 | + get: function get() { | |
| 13651 | + return _settings.Settings; | |
| 13652 | + } | |
| 13653 | +}); | |
| 13654 | + | |
| 13655 | +var _copy = __webpack_require__(670); | |
| 13656 | + | |
| 13657 | +var _copyAll = __webpack_require__(671); | |
| 13658 | + | |
| 13659 | +var _create = __webpack_require__(672); | |
| 13660 | + | |
| 13661 | +var _delete = __webpack_require__(673); | |
| 13662 | + | |
| 13663 | +var _duplicate = __webpack_require__(674); | |
| 13664 | + | |
| 13665 | +var _empty = __webpack_require__(675); | |
| 13666 | + | |
| 13667 | +var _import = __webpack_require__(676); | |
| 13668 | + | |
| 13669 | +var _paste = __webpack_require__(677); | |
| 13670 | + | |
| 13671 | +var _move = __webpack_require__(678); | |
| 13672 | + | |
| 13673 | +var _pasteStyle = __webpack_require__(679); | |
| 13674 | + | |
| 13675 | +var _resetSettings = __webpack_require__(680); | |
| 13676 | + | |
| 13677 | +var _resetStyle = __webpack_require__(681); | |
| 13678 | + | |
| 13679 | +var _settings = __webpack_require__(350); | |
| 13680 | + | |
| 13681 | +/***/ }), | |
| 13682 | +/* 420 */ | |
| 13683 | +/***/ (function(module, exports, __webpack_require__) { | |
| 13684 | + | |
| 13685 | +"use strict"; | |
| 13686 | + | |
| 13687 | + | |
| 13688 | +var _interopRequireDefault = __webpack_require__(0); | |
| 13689 | + | |
| 13690 | +var _Object$defineProperty = __webpack_require__(1); | |
| 13691 | + | |
| 13692 | +_Object$defineProperty(exports, "__esModule", { | |
| 13693 | + value: true | |
| 13694 | +}); | |
| 13695 | + | |
| 13696 | +exports.default = void 0; | |
| 13697 | + | |
| 13698 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 13699 | + | |
| 13700 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 13701 | + | |
| 13702 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 13703 | + | |
| 13704 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 13705 | + | |
| 13706 | +var _commandDisableEnable = _interopRequireDefault(__webpack_require__(412)); | |
| 13707 | + | |
| 13708 | +var DisableEnable = /*#__PURE__*/function (_CommandDisableEnable) { | |
| 13709 | + (0, _inherits2.default)(DisableEnable, _CommandDisableEnable); | |
| 13710 | + | |
| 13711 | + var _super = (0, _createSuper2.default)(DisableEnable); | |
| 13712 | + | |
| 13713 | + function DisableEnable() { | |
| 13714 | + (0, _classCallCheck2.default)(this, DisableEnable); | |
| 13715 | + return _super.apply(this, arguments); | |
| 13716 | + } | |
| 13717 | + | |
| 13718 | + (0, _createClass2.default)(DisableEnable, null, [{ | |
| 13719 | + key: "getName", | |
| 13720 | + value: function getName() { | |
| 13721 | + return 'Global'; | |
| 13722 | + } | |
| 13723 | + }, { | |
| 13724 | + key: "getEnableCommand", | |
| 13725 | + value: function getEnableCommand() { | |
| 13726 | + return 'document/globals/enable'; | |
| 13727 | + } | |
| 13728 | + }, { | |
| 13729 | + key: "getDisableCommand", | |
| 13730 | + value: function getDisableCommand() { | |
| 13731 | + return 'document/globals/disable'; | |
| 13732 | + } | |
| 13733 | + }]); | |
| 13734 | + return DisableEnable; | |
| 13735 | +}(_commandDisableEnable.default); | |
| 13736 | + | |
| 13737 | +exports.default = DisableEnable; | |
| 13738 | + | |
| 13739 | +/***/ }), | |
| 13740 | +/* 421 */, | |
| 13741 | +/* 422 */, | |
| 13742 | +/* 423 */, | |
| 13743 | +/* 424 */, | |
| 13744 | +/* 425 */, | |
| 13745 | +/* 426 */, | |
| 13746 | +/* 427 */, | |
| 13747 | +/* 428 */, | |
| 13748 | +/* 429 */, | |
| 13749 | +/* 430 */, | |
| 13750 | +/* 431 */, | |
| 13751 | +/* 432 */, | |
| 13752 | +/* 433 */, | |
| 13753 | +/* 434 */, | |
| 13754 | +/* 435 */, | |
| 13755 | +/* 436 */, | |
| 13756 | +/* 437 */, | |
| 13757 | +/* 438 */, | |
| 13758 | +/* 439 */, | |
| 13759 | +/* 440 */, | |
| 13760 | +/* 441 */, | |
| 13761 | +/* 442 */, | |
| 13762 | +/* 443 */, | |
| 13763 | +/* 444 */, | |
| 13764 | +/* 445 */, | |
| 13765 | +/* 446 */, | |
| 13766 | +/* 447 */, | |
| 13767 | +/* 448 */, | |
| 13768 | +/* 449 */, | |
| 13769 | +/* 450 */, | |
| 13770 | +/* 451 */, | |
| 13771 | +/* 452 */, | |
| 13772 | +/* 453 */, | |
| 13773 | +/* 454 */, | |
| 13774 | +/* 455 */, | |
| 13775 | +/* 456 */, | |
| 13776 | +/* 457 */, | |
| 13777 | +/* 458 */, | |
| 13778 | +/* 459 */, | |
| 13779 | +/* 460 */, | |
| 13780 | +/* 461 */, | |
| 13781 | +/* 462 */, | |
| 13782 | +/* 463 */, | |
| 13783 | +/* 464 */, | |
| 13784 | +/* 465 */, | |
| 13785 | +/* 466 */, | |
| 13786 | +/* 467 */, | |
| 13787 | +/* 468 */, | |
| 13788 | +/* 469 */, | |
| 13789 | +/* 470 */, | |
| 13790 | +/* 471 */, | |
| 13791 | +/* 472 */, | |
| 13792 | +/* 473 */, | |
| 13793 | +/* 474 */, | |
| 13794 | +/* 475 */, | |
| 13795 | +/* 476 */, | |
| 13796 | +/* 477 */, | |
| 13797 | +/* 478 */, | |
| 13798 | +/* 479 */, | |
| 13799 | +/* 480 */, | |
| 13800 | +/* 481 */, | |
| 13801 | +/* 482 */, | |
| 13802 | +/* 483 */, | |
| 13803 | +/* 484 */, | |
| 13804 | +/* 485 */, | |
| 13805 | +/* 486 */, | |
| 13806 | +/* 487 */, | |
| 13807 | +/* 488 */, | |
| 13808 | +/* 489 */, | |
| 13809 | +/* 490 */, | |
| 13810 | +/* 491 */, | |
| 13811 | +/* 492 */, | |
| 13812 | +/* 493 */, | |
| 13813 | +/* 494 */, | |
| 13814 | +/* 495 */, | |
| 13815 | +/* 496 */, | |
| 13816 | +/* 497 */, | |
| 13817 | +/* 498 */, | |
| 13818 | +/* 499 */, | |
| 13819 | +/* 500 */, | |
| 13820 | +/* 501 */, | |
| 13821 | +/* 502 */, | |
| 13822 | +/* 503 */, | |
| 13823 | +/* 504 */, | |
| 13824 | +/* 505 */, | |
| 13825 | +/* 506 */, | |
| 13826 | +/* 507 */, | |
| 13827 | +/* 508 */, | |
| 13828 | +/* 509 */, | |
| 13829 | +/* 510 */, | |
| 13830 | +/* 511 */, | |
| 13831 | +/* 512 */, | |
| 13832 | +/* 513 */, | |
| 13833 | +/* 514 */, | |
| 13834 | +/* 515 */, | |
| 13835 | +/* 516 */, | |
| 13836 | +/* 517 */, | |
| 13837 | +/* 518 */, | |
| 13838 | +/* 519 */, | |
| 13839 | +/* 520 */, | |
| 13840 | +/* 521 */, | |
| 13841 | +/* 522 */, | |
| 13842 | +/* 523 */, | |
| 13843 | +/* 524 */, | |
| 13844 | +/* 525 */, | |
| 13845 | +/* 526 */, | |
| 13846 | +/* 527 */, | |
| 13847 | +/* 528 */, | |
| 13848 | +/* 529 */, | |
| 13849 | +/* 530 */, | |
| 13850 | +/* 531 */, | |
| 13851 | +/* 532 */, | |
| 13852 | +/* 533 */, | |
| 13853 | +/* 534 */, | |
| 13854 | +/* 535 */, | |
| 13855 | +/* 536 */, | |
| 13856 | +/* 537 */, | |
| 13857 | +/* 538 */, | |
| 13858 | +/* 539 */, | |
| 13859 | +/* 540 */, | |
| 13860 | +/* 541 */, | |
| 13861 | +/* 542 */, | |
| 13862 | +/* 543 */, | |
| 13863 | +/* 544 */, | |
| 13864 | +/* 545 */, | |
| 13865 | +/* 546 */, | |
| 13866 | +/* 547 */, | |
| 13867 | +/* 548 */, | |
| 13868 | +/* 549 */, | |
| 13869 | +/* 550 */, | |
| 13870 | +/* 551 */, | |
| 13871 | +/* 552 */, | |
| 13872 | +/* 553 */, | |
| 13873 | +/* 554 */, | |
| 13874 | +/* 555 */, | |
| 13875 | +/* 556 */, | |
| 13876 | +/* 557 */, | |
| 13877 | +/* 558 */, | |
| 13878 | +/* 559 */, | |
| 13879 | +/* 560 */, | |
| 13880 | +/* 561 */, | |
| 13881 | +/* 562 */, | |
| 13882 | +/* 563 */, | |
| 13883 | +/* 564 */, | |
| 13884 | +/* 565 */, | |
| 13885 | +/* 566 */, | |
| 13886 | +/* 567 */, | |
| 13887 | +/* 568 */, | |
| 13888 | +/* 569 */, | |
| 13889 | +/* 570 */, | |
| 13890 | +/* 571 */, | |
| 13891 | +/* 572 */, | |
| 13892 | +/* 573 */, | |
| 13893 | +/* 574 */, | |
| 13894 | +/* 575 */, | |
| 13895 | +/* 576 */, | |
| 13896 | +/* 577 */, | |
| 13897 | +/* 578 */, | |
| 13898 | +/* 579 */, | |
| 13899 | +/* 580 */, | |
| 13900 | +/* 581 */, | |
| 13901 | +/* 582 */, | |
| 13902 | +/* 583 */, | |
| 13903 | +/* 584 */, | |
| 13904 | +/* 585 */, | |
| 13905 | +/* 586 */, | |
| 13906 | +/* 587 */, | |
| 13907 | +/* 588 */, | |
| 13908 | +/* 589 */, | |
| 13909 | +/* 590 */, | |
| 13910 | +/* 591 */, | |
| 13911 | +/* 592 */, | |
| 13912 | +/* 593 */, | |
| 13913 | +/* 594 */, | |
| 13914 | +/* 595 */, | |
| 13915 | +/* 596 */, | |
| 13916 | +/* 597 */, | |
| 13917 | +/* 598 */, | |
| 13918 | +/* 599 */, | |
| 13919 | +/* 600 */, | |
| 13920 | +/* 601 */, | |
| 13921 | +/* 602 */, | |
| 13922 | +/* 603 */, | |
| 13923 | +/* 604 */, | |
| 13924 | +/* 605 */, | |
| 13925 | +/* 606 */, | |
| 13926 | +/* 607 */, | |
| 13927 | +/* 608 */, | |
| 13928 | +/* 609 */, | |
| 13929 | +/* 610 */, | |
| 13930 | +/* 611 */, | |
| 13931 | +/* 612 */, | |
| 13932 | +/* 613 */, | |
| 13933 | +/* 614 */, | |
| 13934 | +/* 615 */, | |
| 13935 | +/* 616 */, | |
| 13936 | +/* 617 */, | |
| 13937 | +/* 618 */, | |
| 13938 | +/* 619 */, | |
| 13939 | +/* 620 */, | |
| 13940 | +/* 621 */, | |
| 13941 | +/* 622 */, | |
| 13942 | +/* 623 */, | |
| 13943 | +/* 624 */, | |
| 13944 | +/* 625 */, | |
| 13945 | +/* 626 */, | |
| 13946 | +/* 627 */, | |
| 13947 | +/* 628 */, | |
| 13948 | +/* 629 */, | |
| 13949 | +/* 630 */, | |
| 13950 | +/* 631 */, | |
| 13951 | +/* 632 */, | |
| 13952 | +/* 633 */, | |
| 13953 | +/* 634 */, | |
| 13954 | +/* 635 */, | |
| 13955 | +/* 636 */, | |
| 13956 | +/* 637 */, | |
| 13957 | +/* 638 */, | |
| 13958 | +/* 639 */, | |
| 13959 | +/* 640 */, | |
| 13960 | +/* 641 */, | |
| 13961 | +/* 642 */ | |
| 13962 | +/***/ (function(module, exports, __webpack_require__) { | |
| 13963 | + | |
| 13964 | +"use strict"; | |
| 13965 | + | |
| 13966 | + | |
| 13967 | +var _interopRequireDefault = __webpack_require__(0); | |
| 13968 | + | |
| 13969 | +var _Object$defineProperty = __webpack_require__(1); | |
| 13970 | + | |
| 13971 | +_Object$defineProperty(exports, "__esModule", { | |
| 13972 | + value: true | |
| 13973 | +}); | |
| 13974 | + | |
| 13975 | +exports.default = exports.Before = void 0; | |
| 13976 | + | |
| 13977 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 13978 | + | |
| 13979 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 13980 | + | |
| 13981 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 13982 | + | |
| 13983 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 13984 | + | |
| 13985 | +var _base = _interopRequireDefault(__webpack_require__(327)); | |
| 13986 | + | |
| 13987 | +var Before = /*#__PURE__*/function (_Base) { | |
| 13988 | + (0, _inherits2.default)(Before, _Base); | |
| 13989 | + | |
| 13990 | + var _super = (0, _createSuper2.default)(Before); | |
| 13991 | + | |
| 13992 | + function Before() { | |
| 13993 | + (0, _classCallCheck2.default)(this, Before); | |
| 13994 | + return _super.apply(this, arguments); | |
| 13995 | + } | |
| 13996 | + | |
| 13997 | + (0, _createClass2.default)(Before, [{ | |
| 13998 | + key: "register", | |
| 13999 | + value: function register() { | |
| 14000 | + $e.hooks.registerUIBefore(this); | |
| 14001 | + } | |
| 14002 | + }]); | |
| 14003 | + return Before; | |
| 14004 | +}(_base.default); | |
| 14005 | + | |
| 14006 | +exports.Before = Before; | |
| 14007 | +var _default = Before; | |
| 14008 | +exports.default = _default; | |
| 14009 | + | |
| 14010 | +/***/ }), | |
| 14011 | +/* 643 */ | |
| 14012 | +/***/ (function(module, exports, __webpack_require__) { | |
| 14013 | + | |
| 14014 | +"use strict"; | |
| 14015 | + | |
| 14016 | + | |
| 14017 | +var _interopRequireDefault = __webpack_require__(0); | |
| 14018 | + | |
| 14019 | +var _Object$defineProperty = __webpack_require__(1); | |
| 14020 | + | |
| 14021 | +_Object$defineProperty(exports, "__esModule", { | |
| 14022 | + value: true | |
| 14023 | +}); | |
| 14024 | + | |
| 14025 | +exports.default = exports.Catch = void 0; | |
| 14026 | + | |
| 14027 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 14028 | + | |
| 14029 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 14030 | + | |
| 14031 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 14032 | + | |
| 14033 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 14034 | + | |
| 14035 | +var _base = _interopRequireDefault(__webpack_require__(327)); | |
| 14036 | + | |
| 14037 | +var Catch = /*#__PURE__*/function (_Base) { | |
| 14038 | + (0, _inherits2.default)(Catch, _Base); | |
| 14039 | + | |
| 14040 | + var _super = (0, _createSuper2.default)(Catch); | |
| 14041 | + | |
| 14042 | + function Catch() { | |
| 14043 | + (0, _classCallCheck2.default)(this, Catch); | |
| 14044 | + return _super.apply(this, arguments); | |
| 14045 | + } | |
| 14046 | + | |
| 14047 | + (0, _createClass2.default)(Catch, [{ | |
| 14048 | + key: "register", | |
| 14049 | + value: function register() { | |
| 14050 | + $e.hooks.registerUICatch(this); | |
| 14051 | + } | |
| 14052 | + }]); | |
| 14053 | + return Catch; | |
| 14054 | +}(_base.default); | |
| 14055 | + | |
| 14056 | +exports.Catch = Catch; | |
| 14057 | +var _default = Catch; | |
| 14058 | +exports.default = _default; | |
| 14059 | + | |
| 14060 | +/***/ }), | |
| 14061 | +/* 644 */, | |
| 14062 | +/* 645 */, | |
| 14063 | +/* 646 */, | |
| 14064 | +/* 647 */, | |
| 14065 | +/* 648 */, | |
| 14066 | +/* 649 */, | |
| 14067 | +/* 650 */, | |
| 14068 | +/* 651 */, | |
| 14069 | +/* 652 */, | |
| 14070 | +/* 653 */, | |
| 14071 | +/* 654 */, | |
| 14072 | +/* 655 */, | |
| 14073 | +/* 656 */, | |
| 14074 | +/* 657 */, | |
| 14075 | +/* 658 */, | |
| 14076 | +/* 659 */, | |
| 14077 | +/* 660 */, | |
| 14078 | +/* 661 */, | |
| 14079 | +/* 662 */, | |
| 14080 | +/* 663 */, | |
| 14081 | +/* 664 */, | |
| 14082 | +/* 665 */, | |
| 14083 | +/* 666 */, | |
| 14084 | +/* 667 */, | |
| 14085 | +/* 668 */, | |
| 14086 | +/* 669 */, | |
| 14087 | +/* 670 */ | |
| 14088 | +/***/ (function(module, exports, __webpack_require__) { | |
| 14089 | + | |
| 14090 | +"use strict"; | |
| 14091 | + | |
| 14092 | + | |
| 14093 | +var _interopRequireDefault = __webpack_require__(0); | |
| 14094 | + | |
| 14095 | +var _Object$defineProperty = __webpack_require__(1); | |
| 14096 | + | |
| 14097 | +_Object$defineProperty(exports, "__esModule", { | |
| 14098 | + value: true | |
| 14099 | +}); | |
| 14100 | + | |
| 14101 | +exports.default = exports.Copy = void 0; | |
| 14102 | + | |
| 14103 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 14104 | + | |
| 14105 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 14106 | + | |
| 14107 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 14108 | + | |
| 14109 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 14110 | + | |
| 14111 | +var _commandBase = _interopRequireDefault(__webpack_require__(23)); | |
| 14112 | + | |
| 14113 | +var Copy = /*#__PURE__*/function (_CommandBase) { | |
| 14114 | + (0, _inherits2.default)(Copy, _CommandBase); | |
| 14115 | + | |
| 14116 | + var _super = (0, _createSuper2.default)(Copy); | |
| 14117 | + | |
| 14118 | + function Copy() { | |
| 14119 | + (0, _classCallCheck2.default)(this, Copy); | |
| 14120 | + return _super.apply(this, arguments); | |
| 14121 | + } | |
| 14122 | + | |
| 14123 | + (0, _createClass2.default)(Copy, [{ | |
| 14124 | + key: "validateArgs", | |
| 14125 | + value: function validateArgs(args) { | |
| 14126 | + this.requireContainer(args); | |
| 14127 | + } | |
| 14128 | + }, { | |
| 14129 | + key: "apply", | |
| 14130 | + value: function apply(args) { | |
| 14131 | + var _args$storageKey = args.storageKey, | |
| 14132 | + storageKey = _args$storageKey === void 0 ? 'clipboard' : _args$storageKey, | |
| 14133 | + _args$containers = args.containers, | |
| 14134 | + containers = _args$containers === void 0 ? [args.container] : _args$containers; | |
| 14135 | + elementorCommon.storage.set(storageKey, containers.map(function (container) { | |
| 14136 | + return container.model.toJSON({ | |
| 14137 | + copyHtmlCache: true | |
| 14138 | + }); | |
| 14139 | + })); | |
| 14140 | + } | |
| 14141 | + }]); | |
| 14142 | + return Copy; | |
| 14143 | +}(_commandBase.default); | |
| 14144 | + | |
| 14145 | +exports.Copy = Copy; | |
| 14146 | +var _default = Copy; | |
| 14147 | +exports.default = _default; | |
| 14148 | + | |
| 14149 | +/***/ }), | |
| 14150 | +/* 671 */ | |
| 14151 | +/***/ (function(module, exports, __webpack_require__) { | |
| 14152 | + | |
| 14153 | +"use strict"; | |
| 14154 | + | |
| 14155 | + | |
| 14156 | +var _interopRequireDefault = __webpack_require__(0); | |
| 14157 | + | |
| 14158 | +var _Object$defineProperty = __webpack_require__(1); | |
| 14159 | + | |
| 14160 | +_Object$defineProperty(exports, "__esModule", { | |
| 14161 | + value: true | |
| 14162 | +}); | |
| 14163 | + | |
| 14164 | +exports.default = exports.CopyAll = void 0; | |
| 14165 | + | |
| 14166 | +var _values = _interopRequireDefault(__webpack_require__(54)); | |
| 14167 | + | |
| 14168 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 14169 | + | |
| 14170 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 14171 | + | |
| 14172 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 14173 | + | |
| 14174 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 14175 | + | |
| 14176 | +var _commandBase = _interopRequireDefault(__webpack_require__(23)); | |
| 14177 | + | |
| 14178 | +var CopyAll = /*#__PURE__*/function (_CommandBase) { | |
| 14179 | + (0, _inherits2.default)(CopyAll, _CommandBase); | |
| 14180 | + | |
| 14181 | + var _super = (0, _createSuper2.default)(CopyAll); | |
| 14182 | + | |
| 14183 | + function CopyAll() { | |
| 14184 | + (0, _classCallCheck2.default)(this, CopyAll); | |
| 14185 | + return _super.apply(this, arguments); | |
| 14186 | + } | |
| 14187 | + | |
| 14188 | + (0, _createClass2.default)(CopyAll, [{ | |
| 14189 | + key: "apply", | |
| 14190 | + value: function apply() { | |
| 14191 | + $e.run('document/elements/copy', { | |
| 14192 | + containers: (0, _values.default)(elementor.getPreviewView().children._views).map(function (view) { | |
| 14193 | + return view.getContainer(); | |
| 14194 | + }) | |
| 14195 | + }); | |
| 14196 | + } | |
| 14197 | + }]); | |
| 14198 | + return CopyAll; | |
| 14199 | +}(_commandBase.default); | |
| 14200 | + | |
| 14201 | +exports.CopyAll = CopyAll; | |
| 14202 | +var _default = CopyAll; | |
| 14203 | +exports.default = _default; | |
| 14204 | + | |
| 14205 | +/***/ }), | |
| 14206 | +/* 672 */ | |
| 14207 | +/***/ (function(module, exports, __webpack_require__) { | |
| 14208 | + | |
| 14209 | +"use strict"; | |
| 14210 | + | |
| 14211 | + | |
| 14212 | +var _interopRequireDefault = __webpack_require__(0); | |
| 14213 | + | |
| 14214 | +var _Object$defineProperty = __webpack_require__(1); | |
| 14215 | + | |
| 14216 | +_Object$defineProperty(exports, "__esModule", { | |
| 14217 | + value: true | |
| 14218 | +}); | |
| 14219 | + | |
| 14220 | +exports.default = exports.Create = void 0; | |
| 14221 | + | |
| 14222 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 14223 | + | |
| 14224 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 14225 | + | |
| 14226 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 14227 | + | |
| 14228 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 14229 | + | |
| 14230 | +var _commandHistory = _interopRequireDefault(__webpack_require__(129)); | |
| 14231 | + | |
| 14232 | +var Create = /*#__PURE__*/function (_CommandHistory) { | |
| 14233 | + (0, _inherits2.default)(Create, _CommandHistory); | |
| 14234 | + | |
| 14235 | + var _super = (0, _createSuper2.default)(Create); | |
| 14236 | + | |
| 14237 | + function Create() { | |
| 14238 | + (0, _classCallCheck2.default)(this, Create); | |
| 14239 | + return _super.apply(this, arguments); | |
| 14240 | + } | |
| 14241 | + | |
| 14242 | + (0, _createClass2.default)(Create, [{ | |
| 14243 | + key: "validateArgs", | |
| 14244 | + value: function validateArgs(args) { | |
| 14245 | + this.requireContainer(args); // Avoid Backbone model & etc. | |
| 14246 | + | |
| 14247 | + this.requireArgumentConstructor('model', Object, args); | |
| 14248 | + } | |
| 14249 | + }, { | |
| 14250 | + key: "getHistory", | |
| 14251 | + value: function getHistory(args) { | |
| 14252 | + var model = args.model, | |
| 14253 | + _args$containers = args.containers, | |
| 14254 | + containers = _args$containers === void 0 ? [args.container] : _args$containers; | |
| 14255 | + return { | |
| 14256 | + containers: containers, | |
| 14257 | + model: model, | |
| 14258 | + type: 'add', | |
| 14259 | + title: elementor.helpers.getModelLabel(model) | |
| 14260 | + }; | |
| 14261 | + } | |
| 14262 | + }, { | |
| 14263 | + key: "apply", | |
| 14264 | + value: function apply(args) { | |
| 14265 | + var _this = this; | |
| 14266 | + | |
| 14267 | + var model = args.model, | |
| 14268 | + _args$options = args.options, | |
| 14269 | + options = _args$options === void 0 ? {} : _args$options, | |
| 14270 | + _args$containers2 = args.containers, | |
| 14271 | + containers = _args$containers2 === void 0 ? [args.container] : _args$containers2; | |
| 14272 | + var result = []; // BC: Deprecated since 2.8.0 - use `$e.hooks`. | |
| 14273 | + | |
| 14274 | + if (!options.trigger) { | |
| 14275 | + options.trigger = { | |
| 14276 | + beforeAdd: 'element:before:add', | |
| 14277 | + afterAdd: 'element:after:add' | |
| 14278 | + }; | |
| 14279 | + } | |
| 14280 | + | |
| 14281 | + containers.forEach(function (container) { | |
| 14282 | + container = container.lookup(); | |
| 14283 | + var createdContainer = container.view.addElement(model, options).getContainer(); | |
| 14284 | + result.push(createdContainer); | |
| 14285 | + /** | |
| 14286 | + * Acknowledge history of each created item, because we cannot pass the elements when they do not exist | |
| 14287 | + * in getHistory(). | |
| 14288 | + */ | |
| 14289 | + | |
| 14290 | + if (_this.isHistoryActive()) { | |
| 14291 | + $e.internal('document/history/log-sub-item', { | |
| 14292 | + container: container, | |
| 14293 | + type: 'sub-add', | |
| 14294 | + restore: _this.constructor.restore, | |
| 14295 | + options: options, | |
| 14296 | + data: { | |
| 14297 | + containerToRestore: createdContainer, | |
| 14298 | + modelToRestore: createdContainer.model.toJSON() | |
| 14299 | + } | |
| 14300 | + }); | |
| 14301 | + } | |
| 14302 | + }); | |
| 14303 | + | |
| 14304 | + if (1 === result.length) { | |
| 14305 | + result = result[0]; | |
| 14306 | + } | |
| 14307 | + | |
| 14308 | + return result; | |
| 14309 | + } | |
| 14310 | + }, { | |
| 14311 | + key: "isDataChanged", | |
| 14312 | + value: function isDataChanged() { | |
| 14313 | + return true; | |
| 14314 | + } | |
| 14315 | + }], [{ | |
| 14316 | + key: "restore", | |
| 14317 | + value: function restore(historyItem, isRedo) { | |
| 14318 | + var data = historyItem.get('data'), | |
| 14319 | + container = historyItem.get('container'), | |
| 14320 | + options = historyItem.get('options') || {}; // No clone when restoring. e.g: duplicate will generate unique ids while restoring. | |
| 14321 | + | |
| 14322 | + if (options.clone) { | |
| 14323 | + options.clone = false; | |
| 14324 | + } | |
| 14325 | + | |
| 14326 | + if (isRedo) { | |
| 14327 | + $e.run('document/elements/create', { | |
| 14328 | + container: container, | |
| 14329 | + model: data.modelToRestore, | |
| 14330 | + options: options | |
| 14331 | + }); | |
| 14332 | + } else { | |
| 14333 | + $e.run('document/elements/delete', { | |
| 14334 | + container: data.containerToRestore | |
| 14335 | + }); | |
| 14336 | + } | |
| 14337 | + } | |
| 14338 | + }]); | |
| 14339 | + return Create; | |
| 14340 | +}(_commandHistory.default); | |
| 14341 | + | |
| 14342 | +exports.Create = Create; | |
| 14343 | +var _default = Create; | |
| 14344 | +exports.default = _default; | |
| 14345 | + | |
| 14346 | +/***/ }), | |
| 14347 | +/* 673 */ | |
| 14348 | +/***/ (function(module, exports, __webpack_require__) { | |
| 14349 | + | |
| 14350 | +"use strict"; | |
| 14351 | + | |
| 14352 | + | |
| 14353 | +var _interopRequireDefault = __webpack_require__(0); | |
| 14354 | + | |
| 14355 | +var _Object$defineProperty = __webpack_require__(1); | |
| 14356 | + | |
| 14357 | +_Object$defineProperty(exports, "__esModule", { | |
| 14358 | + value: true | |
| 14359 | +}); | |
| 14360 | + | |
| 14361 | +exports.default = exports.Delete = void 0; | |
| 14362 | + | |
| 14363 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 14364 | + | |
| 14365 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 14366 | + | |
| 14367 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 14368 | + | |
| 14369 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 14370 | + | |
| 14371 | +var _commandHistory = _interopRequireDefault(__webpack_require__(129)); | |
| 14372 | + | |
| 14373 | +var Delete = /*#__PURE__*/function (_CommandHistory) { | |
| 14374 | + (0, _inherits2.default)(Delete, _CommandHistory); | |
| 14375 | + | |
| 14376 | + var _super = (0, _createSuper2.default)(Delete); | |
| 14377 | + | |
| 14378 | + function Delete() { | |
| 14379 | + (0, _classCallCheck2.default)(this, Delete); | |
| 14380 | + return _super.apply(this, arguments); | |
| 14381 | + } | |
| 14382 | + | |
| 14383 | + (0, _createClass2.default)(Delete, [{ | |
| 14384 | + key: "validateArgs", | |
| 14385 | + value: function validateArgs(args) { | |
| 14386 | + this.requireContainer(args); | |
| 14387 | + } | |
| 14388 | + }, { | |
| 14389 | + key: "getHistory", | |
| 14390 | + value: function getHistory(args) { | |
| 14391 | + var _args$containers = args.containers, | |
| 14392 | + containers = _args$containers === void 0 ? [args.container] : _args$containers; | |
| 14393 | + return { | |
| 14394 | + containers: containers, | |
| 14395 | + type: 'remove' | |
| 14396 | + }; | |
| 14397 | + } | |
| 14398 | + }, { | |
| 14399 | + key: "apply", | |
| 14400 | + value: function apply(args) { | |
| 14401 | + var _this = this; | |
| 14402 | + | |
| 14403 | + var _args$containers2 = args.containers, | |
| 14404 | + containers = _args$containers2 === void 0 ? [args.container] : _args$containers2; | |
| 14405 | + containers.forEach(function (container) { | |
| 14406 | + container = container.lookup(); | |
| 14407 | + | |
| 14408 | + if (_this.isHistoryActive()) { | |
| 14409 | + $e.internal('document/history/log-sub-item', { | |
| 14410 | + container: container, | |
| 14411 | + type: 'sub-remove', | |
| 14412 | + restore: _this.constructor.restore, | |
| 14413 | + data: { | |
| 14414 | + model: container.model.toJSON(), | |
| 14415 | + parent: container.parent, | |
| 14416 | + at: container.view._index | |
| 14417 | + } | |
| 14418 | + }); | |
| 14419 | + } // BC: Deprecated since 2.8.0 - use `$e.hooks`. | |
| 14420 | + | |
| 14421 | + | |
| 14422 | + elementor.channels.data.trigger('element:before:remove', container.model); | |
| 14423 | + container.model.destroy(); // BC: Deprecated since 2.8.0 - use `$e.hooks`. | |
| 14424 | + | |
| 14425 | + elementor.channels.data.trigger('element:after:remove', container.model); | |
| 14426 | + container.panel.refresh(); | |
| 14427 | + }); | |
| 14428 | + | |
| 14429 | + if (1 === containers.length) { | |
| 14430 | + return containers[0]; | |
| 14431 | + } | |
| 14432 | + | |
| 14433 | + return containers; | |
| 14434 | + } | |
| 14435 | + }, { | |
| 14436 | + key: "isDataChanged", | |
| 14437 | + value: function isDataChanged() { | |
| 14438 | + return true; | |
| 14439 | + } | |
| 14440 | + }], [{ | |
| 14441 | + key: "restore", | |
| 14442 | + value: function restore(historyItem, isRedo) { | |
| 14443 | + var container = historyItem.get('container'), | |
| 14444 | + data = historyItem.get('data'); | |
| 14445 | + | |
| 14446 | + if (isRedo) { | |
| 14447 | + $e.run('document/elements/delete', { | |
| 14448 | + container: container | |
| 14449 | + }); | |
| 14450 | + } else { | |
| 14451 | + $e.run('document/elements/create', { | |
| 14452 | + container: data.parent, | |
| 14453 | + model: data.model, | |
| 14454 | + options: { | |
| 14455 | + at: data.at | |
| 14456 | + } | |
| 14457 | + }); | |
| 14458 | + } | |
| 14459 | + } | |
| 14460 | + }]); | |
| 14461 | + return Delete; | |
| 14462 | +}(_commandHistory.default); | |
| 14463 | + | |
| 14464 | +exports.Delete = Delete; | |
| 14465 | +var _default = Delete; | |
| 14466 | +exports.default = _default; | |
| 14467 | + | |
| 14468 | +/***/ }), | |
| 14469 | +/* 674 */ | |
| 14470 | +/***/ (function(module, exports, __webpack_require__) { | |
| 14471 | + | |
| 14472 | +"use strict"; | |
| 14473 | + | |
| 14474 | + | |
| 14475 | +var _interopRequireDefault = __webpack_require__(0); | |
| 14476 | + | |
| 14477 | +var _Object$defineProperty = __webpack_require__(1); | |
| 14478 | + | |
| 14479 | +_Object$defineProperty(exports, "__esModule", { | |
| 14480 | + value: true | |
| 14481 | +}); | |
| 14482 | + | |
| 14483 | +exports.default = exports.Duplicate = void 0; | |
| 14484 | + | |
| 14485 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 14486 | + | |
| 14487 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 14488 | + | |
| 14489 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 14490 | + | |
| 14491 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 14492 | + | |
| 14493 | +var _commandHistory = _interopRequireDefault(__webpack_require__(129)); | |
| 14494 | + | |
| 14495 | +var Duplicate = /*#__PURE__*/function (_CommandHistory) { | |
| 14496 | + (0, _inherits2.default)(Duplicate, _CommandHistory); | |
| 14497 | + | |
| 14498 | + var _super = (0, _createSuper2.default)(Duplicate); | |
| 14499 | + | |
| 14500 | + function Duplicate() { | |
| 14501 | + (0, _classCallCheck2.default)(this, Duplicate); | |
| 14502 | + return _super.apply(this, arguments); | |
| 14503 | + } | |
| 14504 | + | |
| 14505 | + (0, _createClass2.default)(Duplicate, [{ | |
| 14506 | + key: "validateArgs", | |
| 14507 | + value: function validateArgs(args) { | |
| 14508 | + this.requireContainer(args); | |
| 14509 | + } | |
| 14510 | + }, { | |
| 14511 | + key: "getHistory", | |
| 14512 | + value: function getHistory(args) { | |
| 14513 | + var _args$containers = args.containers, | |
| 14514 | + containers = _args$containers === void 0 ? [args.container] : _args$containers; | |
| 14515 | + return { | |
| 14516 | + containers: containers, | |
| 14517 | + type: 'duplicate' | |
| 14518 | + }; | |
| 14519 | + } | |
| 14520 | + }, { | |
| 14521 | + key: "apply", | |
| 14522 | + value: function apply(args) { | |
| 14523 | + var _args$containers2 = args.containers, | |
| 14524 | + containers = _args$containers2 === void 0 ? [args.container] : _args$containers2, | |
| 14525 | + result = []; | |
| 14526 | + containers.forEach(function (container) { | |
| 14527 | + var parent = container.parent, | |
| 14528 | + at = container.view._index + 1; | |
| 14529 | + result.push($e.run('document/elements/create', { | |
| 14530 | + container: parent, | |
| 14531 | + model: container.model.toJSON(), | |
| 14532 | + options: { | |
| 14533 | + at: at, | |
| 14534 | + clone: true | |
| 14535 | + } | |
| 14536 | + })); | |
| 14537 | + }); | |
| 14538 | + | |
| 14539 | + if (1 === result.length) { | |
| 14540 | + return result[0]; | |
| 14541 | + } | |
| 14542 | + | |
| 14543 | + return result; | |
| 14544 | + } | |
| 14545 | + }]); | |
| 14546 | + return Duplicate; | |
| 14547 | +}(_commandHistory.default); | |
| 14548 | + | |
| 14549 | +exports.Duplicate = Duplicate; | |
| 14550 | +var _default = Duplicate; | |
| 14551 | +exports.default = _default; | |
| 14552 | + | |
| 14553 | +/***/ }), | |
| 14554 | +/* 675 */ | |
| 14555 | +/***/ (function(module, exports, __webpack_require__) { | |
| 14556 | + | |
| 14557 | +"use strict"; | |
| 14558 | + | |
| 14559 | + | |
| 14560 | +var _interopRequireDefault = __webpack_require__(0); | |
| 14561 | + | |
| 14562 | +var _Object$defineProperty = __webpack_require__(1); | |
| 14563 | + | |
| 14564 | +_Object$defineProperty(exports, "__esModule", { | |
| 14565 | + value: true | |
| 14566 | +}); | |
| 14567 | + | |
| 14568 | +exports.default = exports.Empty = void 0; | |
| 14569 | + | |
| 14570 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 14571 | + | |
| 14572 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 14573 | + | |
| 14574 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 14575 | + | |
| 14576 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 14577 | + | |
| 14578 | +var _commandHistory = _interopRequireDefault(__webpack_require__(129)); | |
| 14579 | + | |
| 14580 | +var Empty = /*#__PURE__*/function (_CommandHistory) { | |
| 14581 | + (0, _inherits2.default)(Empty, _CommandHistory); | |
| 14582 | + | |
| 14583 | + var _super = (0, _createSuper2.default)(Empty); | |
| 14584 | + | |
| 14585 | + function Empty() { | |
| 14586 | + (0, _classCallCheck2.default)(this, Empty); | |
| 14587 | + return _super.apply(this, arguments); | |
| 14588 | + } | |
| 14589 | + | |
| 14590 | + (0, _createClass2.default)(Empty, [{ | |
| 14591 | + key: "getHistory", | |
| 14592 | + value: function getHistory(args) { | |
| 14593 | + if (args.force) { | |
| 14594 | + return { | |
| 14595 | + type: 'remove', | |
| 14596 | + title: elementor.translate('all_content'), | |
| 14597 | + data: elementor.elements ? elementor.elements.toJSON() : null, | |
| 14598 | + restore: this.constructor.restore | |
| 14599 | + }; | |
| 14600 | + } | |
| 14601 | + | |
| 14602 | + return false; | |
| 14603 | + } | |
| 14604 | + }, { | |
| 14605 | + key: "apply", | |
| 14606 | + value: function apply(args) { | |
| 14607 | + if (args.force && elementor.elements) { | |
| 14608 | + elementor.elements.reset(); | |
| 14609 | + elementor.getPreviewContainer().panel.closeEditor(); | |
| 14610 | + return; | |
| 14611 | + } | |
| 14612 | + | |
| 14613 | + elementor.getClearPageDialog().show(); | |
| 14614 | + } | |
| 14615 | + }, { | |
| 14616 | + key: "isDataChanged", | |
| 14617 | + value: function isDataChanged() { | |
| 14618 | + if (this.args.force) { | |
| 14619 | + return true; | |
| 14620 | + } | |
| 14621 | + } | |
| 14622 | + }], [{ | |
| 14623 | + key: "restore", | |
| 14624 | + value: function restore(historyItem, isRedo) { | |
| 14625 | + if (isRedo) { | |
| 14626 | + $e.run('document/elements/empty', { | |
| 14627 | + force: true | |
| 14628 | + }); | |
| 14629 | + } else { | |
| 14630 | + var data = historyItem.get('data'); | |
| 14631 | + | |
| 14632 | + if (data) { | |
| 14633 | + elementor.getPreviewView().addChildModel(data); | |
| 14634 | + } | |
| 14635 | + | |
| 14636 | + $e.internal('document/save/set-is-modified', { | |
| 14637 | + status: true | |
| 14638 | + }); | |
| 14639 | + } | |
| 14640 | + } | |
| 14641 | + }]); | |
| 14642 | + return Empty; | |
| 14643 | +}(_commandHistory.default); | |
| 14644 | + | |
| 14645 | +exports.Empty = Empty; | |
| 14646 | +var _default = Empty; | |
| 14647 | +exports.default = _default; | |
| 14648 | + | |
| 14649 | +/***/ }), | |
| 14650 | +/* 676 */ | |
| 14651 | +/***/ (function(module, exports, __webpack_require__) { | |
| 14652 | + | |
| 14653 | +"use strict"; | |
| 14654 | + | |
| 14655 | + | |
| 14656 | +var _interopRequireDefault = __webpack_require__(0); | |
| 14657 | + | |
| 14658 | +var _Object$defineProperty = __webpack_require__(1); | |
| 14659 | + | |
| 14660 | +_Object$defineProperty(exports, "__esModule", { | |
| 14661 | + value: true | |
| 14662 | +}); | |
| 14663 | + | |
| 14664 | +exports.default = exports.Import = void 0; | |
| 14665 | + | |
| 14666 | +var _assign = _interopRequireDefault(__webpack_require__(140)); | |
| 14667 | + | |
| 14668 | +var _values = _interopRequireDefault(__webpack_require__(54)); | |
| 14669 | + | |
| 14670 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 14671 | + | |
| 14672 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 14673 | + | |
| 14674 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 14675 | + | |
| 14676 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 14677 | + | |
| 14678 | +var _commandHistory = _interopRequireDefault(__webpack_require__(129)); | |
| 14679 | + | |
| 14680 | +var Import = /*#__PURE__*/function (_CommandHistory) { | |
| 14681 | + (0, _inherits2.default)(Import, _CommandHistory); | |
| 14682 | + | |
| 14683 | + var _super = (0, _createSuper2.default)(Import); | |
| 14684 | + | |
| 14685 | + function Import() { | |
| 14686 | + (0, _classCallCheck2.default)(this, Import); | |
| 14687 | + return _super.apply(this, arguments); | |
| 14688 | + } | |
| 14689 | + | |
| 14690 | + (0, _createClass2.default)(Import, [{ | |
| 14691 | + key: "validateArgs", | |
| 14692 | + value: function validateArgs(args) { | |
| 14693 | + this.requireArgumentInstance('model', Backbone.Model, args); | |
| 14694 | + this.requireArgumentConstructor('data', Object, args); | |
| 14695 | + } | |
| 14696 | + }, { | |
| 14697 | + key: "getHistory", | |
| 14698 | + value: function getHistory(args) { | |
| 14699 | + var model = args.model; | |
| 14700 | + return { | |
| 14701 | + type: 'add', | |
| 14702 | + title: elementor.translate('template'), | |
| 14703 | + subTitle: model.get('title') | |
| 14704 | + }; | |
| 14705 | + } | |
| 14706 | + }, { | |
| 14707 | + key: "apply", | |
| 14708 | + value: function apply(args) { | |
| 14709 | + var data = args.data, | |
| 14710 | + _args$options = args.options, | |
| 14711 | + options = _args$options === void 0 ? args.options || {} : _args$options, | |
| 14712 | + previewContainer = elementor.getPreviewContainer(), | |
| 14713 | + result = []; | |
| 14714 | + var at = isNaN(options.at) ? previewContainer.view.collection.length : options.at; // Each `data.content`. | |
| 14715 | + | |
| 14716 | + (0, _values.default)(data.content).forEach(function (model) { | |
| 14717 | + result.push($e.run('document/elements/create', { | |
| 14718 | + container: elementor.getPreviewContainer(), | |
| 14719 | + model: model, | |
| 14720 | + options: (0, _assign.default)(options, { | |
| 14721 | + at: at | |
| 14722 | + }) | |
| 14723 | + })); | |
| 14724 | + at++; | |
| 14725 | + }); | |
| 14726 | + | |
| 14727 | + if (options.withPageSettings) { | |
| 14728 | + $e.run('document/elements/settings', { | |
| 14729 | + container: elementor.settings.page.getEditedView().getContainer(), | |
| 14730 | + settings: data.page_settings, | |
| 14731 | + options: { | |
| 14732 | + external: true | |
| 14733 | + } | |
| 14734 | + }); | |
| 14735 | + } | |
| 14736 | + | |
| 14737 | + return result; | |
| 14738 | + } | |
| 14739 | + }]); | |
| 14740 | + return Import; | |
| 14741 | +}(_commandHistory.default); | |
| 14742 | + | |
| 14743 | +exports.Import = Import; | |
| 14744 | +var _default = Import; | |
| 14745 | +exports.default = _default; | |
| 14746 | + | |
| 14747 | +/***/ }), | |
| 14748 | +/* 677 */ | |
| 14749 | +/***/ (function(module, exports, __webpack_require__) { | |
| 14750 | + | |
| 14751 | +"use strict"; | |
| 14752 | + | |
| 14753 | + | |
| 14754 | +var _interopRequireDefault = __webpack_require__(0); | |
| 14755 | + | |
| 14756 | +var _Object$defineProperty = __webpack_require__(1); | |
| 14757 | + | |
| 14758 | +_Object$defineProperty(exports, "__esModule", { | |
| 14759 | + value: true | |
| 14760 | +}); | |
| 14761 | + | |
| 14762 | +exports.default = exports.Paste = void 0; | |
| 14763 | + | |
| 14764 | +var _assign = _interopRequireDefault(__webpack_require__(140)); | |
| 14765 | + | |
| 14766 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 14767 | + | |
| 14768 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 14769 | + | |
| 14770 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 14771 | + | |
| 14772 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 14773 | + | |
| 14774 | +var _commandHistory = _interopRequireDefault(__webpack_require__(129)); | |
| 14775 | + | |
| 14776 | +var Paste = /*#__PURE__*/function (_CommandHistory) { | |
| 14777 | + (0, _inherits2.default)(Paste, _CommandHistory); | |
| 14778 | + | |
| 14779 | + var _super = (0, _createSuper2.default)(Paste); | |
| 14780 | + | |
| 14781 | + function Paste() { | |
| 14782 | + (0, _classCallCheck2.default)(this, Paste); | |
| 14783 | + return _super.apply(this, arguments); | |
| 14784 | + } | |
| 14785 | + | |
| 14786 | + (0, _createClass2.default)(Paste, [{ | |
| 14787 | + key: "validateArgs", | |
| 14788 | + value: function validateArgs(args) { | |
| 14789 | + this.requireContainer(args); // Validate if storage have data. | |
| 14790 | + | |
| 14791 | + var _args$storageKey = args.storageKey, | |
| 14792 | + storageKey = _args$storageKey === void 0 ? 'clipboard' : _args$storageKey, | |
| 14793 | + storageData = elementorCommon.storage.get(storageKey); | |
| 14794 | + this.requireArgumentType('storageData', 'object', { | |
| 14795 | + storageData: storageData | |
| 14796 | + }); | |
| 14797 | + } | |
| 14798 | + }, { | |
| 14799 | + key: "getHistory", | |
| 14800 | + value: function getHistory() { | |
| 14801 | + return { | |
| 14802 | + type: 'paste', | |
| 14803 | + title: elementor.translate('elements') | |
| 14804 | + }; | |
| 14805 | + } | |
| 14806 | + }, { | |
| 14807 | + key: "apply", | |
| 14808 | + value: function apply(args) { | |
| 14809 | + var _this = this; | |
| 14810 | + | |
| 14811 | + var at = args.at, | |
| 14812 | + _args$rebuild = args.rebuild, | |
| 14813 | + rebuild = _args$rebuild === void 0 ? false : _args$rebuild, | |
| 14814 | + _args$storageKey2 = args.storageKey, | |
| 14815 | + storageKey = _args$storageKey2 === void 0 ? 'clipboard' : _args$storageKey2, | |
| 14816 | + _args$containers = args.containers, | |
| 14817 | + containers = _args$containers === void 0 ? [args.container] : _args$containers, | |
| 14818 | + _args$options = args.options, | |
| 14819 | + options = _args$options === void 0 ? {} : _args$options, | |
| 14820 | + storageData = elementorCommon.storage.get(storageKey), | |
| 14821 | + result = []; // Paste on "Add Section" area. | |
| 14822 | + | |
| 14823 | + if (rebuild) { | |
| 14824 | + // Paste at each target. | |
| 14825 | + containers.forEach(function (targetContainer) { | |
| 14826 | + var index = 'undefined' === typeof at ? targetContainer.view.collection.length : at; | |
| 14827 | + storageData.forEach(function (model) { | |
| 14828 | + switch (model.elType) { | |
| 14829 | + case 'section': | |
| 14830 | + { | |
| 14831 | + // If is inner create section for `inner-section`. | |
| 14832 | + if (model.isInner) { | |
| 14833 | + var section = $e.run('document/elements/create', { | |
| 14834 | + container: targetContainer, | |
| 14835 | + model: { | |
| 14836 | + elType: 'section' | |
| 14837 | + }, | |
| 14838 | + columns: 1, | |
| 14839 | + options: { | |
| 14840 | + at: index, | |
| 14841 | + edit: false | |
| 14842 | + } | |
| 14843 | + }); // `targetContainer` = first column at `section`. | |
| 14844 | + | |
| 14845 | + targetContainer = section.view.children.findByIndex(0).getContainer(); | |
| 14846 | + } // Will be not affected by hook since it always have `model.elements`. | |
| 14847 | + | |
| 14848 | + | |
| 14849 | + result.push(_this.pasteTo([targetContainer], [model], { | |
| 14850 | + at: index, | |
| 14851 | + edit: false | |
| 14852 | + })); | |
| 14853 | + index++; | |
| 14854 | + } | |
| 14855 | + break; | |
| 14856 | + | |
| 14857 | + case 'column': | |
| 14858 | + { | |
| 14859 | + // Next code changed from original since `_checkIsEmpty()` was removed. | |
| 14860 | + var _section = $e.run('document/elements/create', { | |
| 14861 | + container: targetContainer, | |
| 14862 | + model: { | |
| 14863 | + elType: 'section' | |
| 14864 | + }, | |
| 14865 | + columns: 0, | |
| 14866 | + // section with no columns. | |
| 14867 | + options: { | |
| 14868 | + at: index, | |
| 14869 | + edit: false | |
| 14870 | + } | |
| 14871 | + }); | |
| 14872 | + | |
| 14873 | + result.push(_this.pasteTo([_section], [model])); | |
| 14874 | + } | |
| 14875 | + break; | |
| 14876 | + | |
| 14877 | + default: | |
| 14878 | + // In case it widget: | |
| 14879 | + var target; // If you trying to paste widget on section, then paste should be at the first column. | |
| 14880 | + | |
| 14881 | + if ('section' === targetContainer.model.get('elType')) { | |
| 14882 | + target = [targetContainer.view.children.findByIndex(0).getContainer()]; | |
| 14883 | + } else { | |
| 14884 | + // Else, create section with one column for element. | |
| 14885 | + var _section2 = $e.run('document/elements/create', { | |
| 14886 | + container: targetContainer, | |
| 14887 | + model: { | |
| 14888 | + elType: 'section' | |
| 14889 | + }, | |
| 14890 | + columns: 1, | |
| 14891 | + options: { | |
| 14892 | + at: index | |
| 14893 | + } | |
| 14894 | + }); // Create the element in the column that just was created. | |
| 14895 | + | |
| 14896 | + | |
| 14897 | + target = [_section2.view.children.first().getContainer()]; | |
| 14898 | + } | |
| 14899 | + | |
| 14900 | + result.push(_this.pasteTo(target, [model])); | |
| 14901 | + } | |
| 14902 | + }); | |
| 14903 | + }); | |
| 14904 | + } else { | |
| 14905 | + if (undefined !== at) { | |
| 14906 | + options.at = at; | |
| 14907 | + } | |
| 14908 | + | |
| 14909 | + result.push(this.pasteTo(containers, storageData, options)); | |
| 14910 | + } | |
| 14911 | + | |
| 14912 | + if (1 === result.length) { | |
| 14913 | + return result[0]; | |
| 14914 | + } | |
| 14915 | + | |
| 14916 | + return result; | |
| 14917 | + } | |
| 14918 | + }, { | |
| 14919 | + key: "pasteTo", | |
| 14920 | + value: function pasteTo(targetContainers, models) { | |
| 14921 | + var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; | |
| 14922 | + options = (0, _assign.default)({ | |
| 14923 | + at: null, | |
| 14924 | + clone: true | |
| 14925 | + }, options); | |
| 14926 | + var result = []; | |
| 14927 | + models.forEach(function (model) { | |
| 14928 | + result.push($e.run('document/elements/create', { | |
| 14929 | + containers: targetContainers, | |
| 14930 | + model: model, | |
| 14931 | + options: options | |
| 14932 | + })); // On paste sections, increase the `at` for every section. | |
| 14933 | + | |
| 14934 | + if (null !== options.at) { | |
| 14935 | + options.at++; | |
| 14936 | + } | |
| 14937 | + }); | |
| 14938 | + | |
| 14939 | + if (1 === result.length) { | |
| 14940 | + return result[0]; | |
| 14941 | + } | |
| 14942 | + | |
| 14943 | + return result; | |
| 14944 | + } | |
| 14945 | + }]); | |
| 14946 | + return Paste; | |
| 14947 | +}(_commandHistory.default); | |
| 14948 | + | |
| 14949 | +exports.Paste = Paste; | |
| 14950 | +var _default = Paste; | |
| 14951 | +exports.default = _default; | |
| 14952 | + | |
| 14953 | +/***/ }), | |
| 14954 | +/* 678 */ | |
| 14955 | +/***/ (function(module, exports, __webpack_require__) { | |
| 14956 | + | |
| 14957 | +"use strict"; | |
| 14958 | + | |
| 14959 | + | |
| 14960 | +var _interopRequireDefault = __webpack_require__(0); | |
| 14961 | + | |
| 14962 | +var _Object$defineProperty = __webpack_require__(1); | |
| 14963 | + | |
| 14964 | +_Object$defineProperty(exports, "__esModule", { | |
| 14965 | + value: true | |
| 14966 | +}); | |
| 14967 | + | |
| 14968 | +exports.default = exports.Move = void 0; | |
| 14969 | + | |
| 14970 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 14971 | + | |
| 14972 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 14973 | + | |
| 14974 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 14975 | + | |
| 14976 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 14977 | + | |
| 14978 | +var _commandHistory = _interopRequireDefault(__webpack_require__(129)); | |
| 14979 | + | |
| 14980 | +var Move = /*#__PURE__*/function (_CommandHistory) { | |
| 14981 | + (0, _inherits2.default)(Move, _CommandHistory); | |
| 14982 | + | |
| 14983 | + var _super = (0, _createSuper2.default)(Move); | |
| 14984 | + | |
| 14985 | + function Move() { | |
| 14986 | + (0, _classCallCheck2.default)(this, Move); | |
| 14987 | + return _super.apply(this, arguments); | |
| 14988 | + } | |
| 14989 | + | |
| 14990 | + (0, _createClass2.default)(Move, [{ | |
| 14991 | + key: "validateArgs", | |
| 14992 | + value: function validateArgs(args) { | |
| 14993 | + this.requireContainer(args); | |
| 14994 | + this.requireArgumentInstance('target', elementorModules.editor.Container, args); | |
| 14995 | + } | |
| 14996 | + }, { | |
| 14997 | + key: "getHistory", | |
| 14998 | + value: function getHistory(args) { | |
| 14999 | + var _args$containers = args.containers, | |
| 15000 | + containers = _args$containers === void 0 ? [args.container] : _args$containers; | |
| 15001 | + return { | |
| 15002 | + containers: containers, | |
| 15003 | + type: 'move' | |
| 15004 | + }; | |
| 15005 | + } | |
| 15006 | + }, { | |
| 15007 | + key: "apply", | |
| 15008 | + value: function apply(args) { | |
| 15009 | + var target = args.target, | |
| 15010 | + _args$options = args.options, | |
| 15011 | + options = _args$options === void 0 ? {} : _args$options, | |
| 15012 | + _args$containers2 = args.containers, | |
| 15013 | + containers = _args$containers2 === void 0 ? [args.container] : _args$containers2, | |
| 15014 | + reCreate = []; | |
| 15015 | + containers.forEach(function (container) { | |
| 15016 | + reCreate.push(container.model.toJSON()); | |
| 15017 | + $e.run('document/elements/delete', { | |
| 15018 | + container: container | |
| 15019 | + }); | |
| 15020 | + }); | |
| 15021 | + var count = 0; | |
| 15022 | + reCreate.forEach(function (model) { | |
| 15023 | + // If multiple fix position. | |
| 15024 | + if (options.hasOwnProperty('at') && reCreate.length > 1) { | |
| 15025 | + if (0 !== count) { | |
| 15026 | + options.at += count; | |
| 15027 | + } | |
| 15028 | + } // BC: Deprecated since 2.8.0 - use `$e.hooks`. | |
| 15029 | + | |
| 15030 | + | |
| 15031 | + options.trigger = { | |
| 15032 | + beforeAdd: 'drag:before:update', | |
| 15033 | + afterAdd: 'drag:after:update' | |
| 15034 | + }; | |
| 15035 | + $e.run('document/elements/create', { | |
| 15036 | + container: target, | |
| 15037 | + model: model, | |
| 15038 | + options: options | |
| 15039 | + }); | |
| 15040 | + count++; | |
| 15041 | + }); | |
| 15042 | + } | |
| 15043 | + }]); | |
| 15044 | + return Move; | |
| 15045 | +}(_commandHistory.default); | |
| 15046 | + | |
| 15047 | +exports.Move = Move; | |
| 15048 | +var _default = Move; | |
| 15049 | +exports.default = _default; | |
| 15050 | + | |
| 15051 | +/***/ }), | |
| 15052 | +/* 679 */ | |
| 15053 | +/***/ (function(module, exports, __webpack_require__) { | |
| 15054 | + | |
| 15055 | +"use strict"; | |
| 15056 | + | |
| 15057 | + | |
| 15058 | +var _interopRequireDefault = __webpack_require__(0); | |
| 15059 | + | |
| 15060 | +var _Object$defineProperty = __webpack_require__(1); | |
| 15061 | + | |
| 15062 | +_Object$defineProperty(exports, "__esModule", { | |
| 15063 | + value: true | |
| 15064 | +}); | |
| 15065 | + | |
| 15066 | +exports.default = exports.PasteStyle = void 0; | |
| 15067 | + | |
| 15068 | +var _keys = _interopRequireDefault(__webpack_require__(25)); | |
| 15069 | + | |
| 15070 | +var _slicedToArray2 = _interopRequireDefault(__webpack_require__(105)); | |
| 15071 | + | |
| 15072 | +var _entries = _interopRequireDefault(__webpack_require__(93)); | |
| 15073 | + | |
| 15074 | +var _typeof2 = _interopRequireDefault(__webpack_require__(50)); | |
| 15075 | + | |
| 15076 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 15077 | + | |
| 15078 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 15079 | + | |
| 15080 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 15081 | + | |
| 15082 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 15083 | + | |
| 15084 | +var _commandHistory = _interopRequireDefault(__webpack_require__(129)); | |
| 15085 | + | |
| 15086 | +var PasteStyle = /*#__PURE__*/function (_CommandHistory) { | |
| 15087 | + (0, _inherits2.default)(PasteStyle, _CommandHistory); | |
| 15088 | + | |
| 15089 | + var _super = (0, _createSuper2.default)(PasteStyle); | |
| 15090 | + | |
| 15091 | + function PasteStyle() { | |
| 15092 | + (0, _classCallCheck2.default)(this, PasteStyle); | |
| 15093 | + return _super.apply(this, arguments); | |
| 15094 | + } | |
| 15095 | + | |
| 15096 | + (0, _createClass2.default)(PasteStyle, [{ | |
| 15097 | + key: "validateArgs", | |
| 15098 | + value: function validateArgs(args) { | |
| 15099 | + this.requireContainer(args); // Validate if storage have data. | |
| 15100 | + | |
| 15101 | + var _args$storageKey = args.storageKey, | |
| 15102 | + storageKey = _args$storageKey === void 0 ? 'clipboard' : _args$storageKey, | |
| 15103 | + storageData = elementorCommon.storage.get(storageKey); | |
| 15104 | + this.requireArgumentType('storageData', 'object', { | |
| 15105 | + storageData: storageData | |
| 15106 | + }); | |
| 15107 | + } | |
| 15108 | + }, { | |
| 15109 | + key: "validateControls", | |
| 15110 | + value: function validateControls(source, target) { | |
| 15111 | + var result = true; // Cannot use `_.isEmpty()` does not pass paste style test. | |
| 15112 | + | |
| 15113 | + if (null === source || null === target || undefined === source || undefined === target || 'object' === (0, _typeof2.default)(source) ^ 'object' === (0, _typeof2.default)(target)) { | |
| 15114 | + result = false; | |
| 15115 | + } | |
| 15116 | + | |
| 15117 | + return result; | |
| 15118 | + } | |
| 15119 | + }, { | |
| 15120 | + key: "getHistory", | |
| 15121 | + value: function getHistory(args) { | |
| 15122 | + var _args$containers = args.containers, | |
| 15123 | + containers = _args$containers === void 0 ? [args.container] : _args$containers; | |
| 15124 | + return { | |
| 15125 | + containers: containers, | |
| 15126 | + type: 'paste_style' | |
| 15127 | + }; | |
| 15128 | + } | |
| 15129 | + }, { | |
| 15130 | + key: "apply", | |
| 15131 | + value: function apply(args) { | |
| 15132 | + var _this = this; | |
| 15133 | + | |
| 15134 | + var _args$containers2 = args.containers, | |
| 15135 | + containers = _args$containers2 === void 0 ? [args.container] : _args$containers2, | |
| 15136 | + _args$storageKey2 = args.storageKey, | |
| 15137 | + storageKey = _args$storageKey2 === void 0 ? 'clipboard' : _args$storageKey2, | |
| 15138 | + storageData = elementorCommon.storage.get(storageKey); | |
| 15139 | + containers.forEach(function (targetContainer) { | |
| 15140 | + var targetSettings = targetContainer.settings, | |
| 15141 | + targetSettingsAttributes = targetSettings.attributes, | |
| 15142 | + targetControls = targetSettings.controls, | |
| 15143 | + diffSettings = {}, | |
| 15144 | + addExtraControls = function addExtraControls(sourceSettings, extraType) { | |
| 15145 | + if (sourceSettings[extraType]) { | |
| 15146 | + (0, _entries.default)(sourceSettings[extraType]).forEach(function (_ref) { | |
| 15147 | + var _ref2 = (0, _slicedToArray2.default)(_ref, 2), | |
| 15148 | + controlName = _ref2[0], | |
| 15149 | + value = _ref2[1]; | |
| 15150 | + | |
| 15151 | + var control = targetControls[controlName]; | |
| 15152 | + | |
| 15153 | + if (targetContainer.view.isStyleTransferControl(control)) { | |
| 15154 | + diffSettings[extraType] = diffSettings[extraType] || {}; | |
| 15155 | + diffSettings[extraType][controlName] = value; | |
| 15156 | + } | |
| 15157 | + }); | |
| 15158 | + } | |
| 15159 | + }; | |
| 15160 | + | |
| 15161 | + storageData.forEach(function (sourceModel) { | |
| 15162 | + var sourceSettings = sourceModel.settings; | |
| 15163 | + addExtraControls(sourceSettings, '__globals__'); | |
| 15164 | + addExtraControls(sourceSettings, '__dynamic__'); | |
| 15165 | + (0, _entries.default)(targetControls).forEach(function (_ref3) { | |
| 15166 | + var _ref4 = (0, _slicedToArray2.default)(_ref3, 2), | |
| 15167 | + controlName = _ref4[0], | |
| 15168 | + control = _ref4[1]; | |
| 15169 | + | |
| 15170 | + if (!targetContainer.view.isStyleTransferControl(control)) { | |
| 15171 | + return; | |
| 15172 | + } | |
| 15173 | + | |
| 15174 | + var controlSourceValue = sourceSettings[controlName], | |
| 15175 | + controlTargetValue = targetSettingsAttributes[controlName]; | |
| 15176 | + | |
| 15177 | + if (!_this.validateControls(controlSourceValue, controlTargetValue)) { | |
| 15178 | + return; | |
| 15179 | + } | |
| 15180 | + | |
| 15181 | + if ('object' === (0, _typeof2.default)(controlSourceValue)) { | |
| 15182 | + var isEqual = (0, _keys.default)(controlSourceValue).some(function (propertyKey) { | |
| 15183 | + if (controlSourceValue[propertyKey] !== controlTargetValue[propertyKey]) { | |
| 15184 | + return false; | |
| 15185 | + } | |
| 15186 | + }); | |
| 15187 | + | |
| 15188 | + if (isEqual) { | |
| 15189 | + return; | |
| 15190 | + } | |
| 15191 | + } | |
| 15192 | + | |
| 15193 | + if (controlSourceValue === controlTargetValue || !elementor.getControlView(control.type).onPasteStyle(control, controlSourceValue)) { | |
| 15194 | + return; | |
| 15195 | + } | |
| 15196 | + | |
| 15197 | + diffSettings[controlName] = controlSourceValue; | |
| 15198 | + }); | |
| 15199 | + | |
| 15200 | + _this.pasteStyle(targetContainer, diffSettings); | |
| 15201 | + }); | |
| 15202 | + }); | |
| 15203 | + } | |
| 981 | 15204 | /** |
| 982 | - * @return {ComponentBase} Self component | |
| 15205 | + * @param {Container} targetContainer | |
| 15206 | + * @param {{}} settings | |
| 983 | 15207 | */ |
| 15208 | + | |
| 984 | 15209 | }, { |
| 985 | - key: "getComponent", | |
| 986 | - value: function getComponent() { | |
| 987 | - return this.registerConfig.component; | |
| 15210 | + key: "pasteStyle", | |
| 15211 | + value: function pasteStyle(targetContainer, settings) { | |
| 15212 | + // BC: Deprecated since 2.8.0 - use `$e.hooks`. | |
| 15213 | + elementor.channels.data.trigger('element:before:paste:style', targetContainer.model); | |
| 15214 | + var globals = settings.__globals__; | |
| 15215 | + | |
| 15216 | + if (globals) { | |
| 15217 | + delete settings.__globals__; | |
| 15218 | + } | |
| 15219 | + | |
| 15220 | + $e.run('document/elements/settings', { | |
| 15221 | + container: targetContainer, | |
| 15222 | + settings: settings, | |
| 15223 | + options: { | |
| 15224 | + external: true, | |
| 15225 | + render: false | |
| 15226 | + } | |
| 15227 | + }); | |
| 15228 | + | |
| 15229 | + if (globals) { | |
| 15230 | + $e.run('document/globals/settings', { | |
| 15231 | + container: targetContainer, | |
| 15232 | + settings: globals, | |
| 15233 | + options: { | |
| 15234 | + external: true, | |
| 15235 | + render: false | |
| 15236 | + } | |
| 15237 | + }); | |
| 15238 | + targetContainer.panel.refresh(); | |
| 15239 | + } // BC: Deprecated since 2.8.0 - use `$e.hooks`. | |
| 15240 | + | |
| 15241 | + | |
| 15242 | + elementor.channels.data.trigger('element:after:paste:style', targetContainer.model); | |
| 15243 | + targetContainer.render(); | |
| 988 | 15244 | } |
| 15245 | + }]); | |
| 15246 | + return PasteStyle; | |
| 15247 | +}(_commandHistory.default); | |
| 15248 | + | |
| 15249 | +exports.PasteStyle = PasteStyle; | |
| 15250 | +var _default = PasteStyle; | |
| 15251 | +exports.default = _default; | |
| 15252 | + | |
| 15253 | +/***/ }), | |
| 15254 | +/* 680 */ | |
| 15255 | +/***/ (function(module, exports, __webpack_require__) { | |
| 15256 | + | |
| 15257 | +"use strict"; | |
| 15258 | + | |
| 15259 | + | |
| 15260 | +var _interopRequireDefault = __webpack_require__(0); | |
| 15261 | + | |
| 15262 | +var _Object$defineProperty = __webpack_require__(1); | |
| 15263 | + | |
| 15264 | +_Object$defineProperty(exports, "__esModule", { | |
| 15265 | + value: true | |
| 15266 | +}); | |
| 15267 | + | |
| 15268 | +exports.default = exports.ResetSettings = void 0; | |
| 15269 | + | |
| 15270 | +__webpack_require__(24); | |
| 15271 | + | |
| 15272 | +var _slicedToArray2 = _interopRequireDefault(__webpack_require__(105)); | |
| 15273 | + | |
| 15274 | +var _entries = _interopRequireDefault(__webpack_require__(93)); | |
| 15275 | + | |
| 15276 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 15277 | + | |
| 15278 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 15279 | + | |
| 15280 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 15281 | + | |
| 15282 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 15283 | + | |
| 15284 | +var _commandHistory = _interopRequireDefault(__webpack_require__(129)); | |
| 15285 | + | |
| 15286 | +var ResetSettings = /*#__PURE__*/function (_CommandHistory) { | |
| 15287 | + (0, _inherits2.default)(ResetSettings, _CommandHistory); | |
| 15288 | + | |
| 15289 | + var _super = (0, _createSuper2.default)(ResetSettings); | |
| 15290 | + | |
| 15291 | + function ResetSettings() { | |
| 15292 | + (0, _classCallCheck2.default)(this, ResetSettings); | |
| 15293 | + return _super.apply(this, arguments); | |
| 15294 | + } | |
| 15295 | + | |
| 15296 | + (0, _createClass2.default)(ResetSettings, [{ | |
| 15297 | + key: "validateArgs", | |
| 15298 | + value: function validateArgs(args) { | |
| 15299 | + this.requireContainer(args); | |
| 15300 | + } | |
| 989 | 15301 | }, { |
| 990 | - key: "setRegisterConfig", | |
| 991 | - value: function setRegisterConfig(config) { | |
| 992 | - this.registerConfig = Object.freeze(config); | |
| 15302 | + key: "getHistory", | |
| 15303 | + value: function getHistory(args) { | |
| 15304 | + var _args$containers = args.containers, | |
| 15305 | + containers = _args$containers === void 0 ? [args.container] : _args$containers; | |
| 15306 | + return { | |
| 15307 | + containers: containers, | |
| 15308 | + type: 'reset_settings' | |
| 15309 | + }; | |
| 993 | 15310 | } |
| 15311 | + }, { | |
| 15312 | + key: "apply", | |
| 15313 | + value: function apply(args) { | |
| 15314 | + var _args$containers2 = args.containers, | |
| 15315 | + containers = _args$containers2 === void 0 ? [args.container] : _args$containers2, | |
| 15316 | + _args$settings = args.settings, | |
| 15317 | + settings = _args$settings === void 0 ? [] : _args$settings; | |
| 15318 | + containers.forEach(function (container) { | |
| 15319 | + var controls = (0, _entries.default)(container.settings.controls), | |
| 15320 | + defaultValues = {}; | |
| 15321 | + controls.forEach(function (_ref) { | |
| 15322 | + var _ref2 = (0, _slicedToArray2.default)(_ref, 2), | |
| 15323 | + controlName = _ref2[0], | |
| 15324 | + control = _ref2[1]; | |
| 15325 | + | |
| 15326 | + // If settings were specific, restore only them. | |
| 15327 | + if (settings && settings.length) { | |
| 15328 | + if (!settings.find(function (key) { | |
| 15329 | + return key === controlName; | |
| 15330 | + })) { | |
| 15331 | + return; | |
| 15332 | + } | |
| 15333 | + } | |
| 15334 | + | |
| 15335 | + defaultValues[controlName] = control.default; | |
| 15336 | + }); | |
| 15337 | + $e.run('document/elements/settings', { | |
| 15338 | + container: container, | |
| 15339 | + settings: defaultValues | |
| 15340 | + }); | |
| 15341 | + container.render(); | |
| 15342 | + }); | |
| 15343 | + } | |
| 994 | 15344 | }]); |
| 995 | -}(_argsObject.default); | |
| 15345 | + return ResetSettings; | |
| 15346 | +}(_commandHistory.default); | |
| 15347 | + | |
| 15348 | +exports.ResetSettings = ResetSettings; | |
| 15349 | +var _default = ResetSettings; | |
| 15350 | +exports.default = _default; | |
| 15351 | + | |
| 15352 | +/***/ }), | |
| 15353 | +/* 681 */ | |
| 15354 | +/***/ (function(module, exports, __webpack_require__) { | |
| 15355 | + | |
| 15356 | +"use strict"; | |
| 15357 | + | |
| 15358 | + | |
| 15359 | +var _interopRequireDefault = __webpack_require__(0); | |
| 15360 | + | |
| 15361 | +var _Object$defineProperty = __webpack_require__(1); | |
| 15362 | + | |
| 15363 | +_Object$defineProperty(exports, "__esModule", { | |
| 15364 | + value: true | |
| 15365 | +}); | |
| 15366 | + | |
| 15367 | +exports.default = exports.ResetStyle = void 0; | |
| 15368 | + | |
| 15369 | +var _slicedToArray2 = _interopRequireDefault(__webpack_require__(105)); | |
| 15370 | + | |
| 15371 | +var _entries = _interopRequireDefault(__webpack_require__(93)); | |
| 15372 | + | |
| 15373 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 15374 | + | |
| 15375 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 15376 | + | |
| 15377 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 15378 | + | |
| 15379 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 15380 | + | |
| 15381 | +var _commandHistory = _interopRequireDefault(__webpack_require__(129)); | |
| 15382 | + | |
| 15383 | +var ResetStyle = /*#__PURE__*/function (_CommandHistory) { | |
| 15384 | + (0, _inherits2.default)(ResetStyle, _CommandHistory); | |
| 15385 | + | |
| 15386 | + var _super = (0, _createSuper2.default)(ResetStyle); | |
| 15387 | + | |
| 15388 | + function ResetStyle() { | |
| 15389 | + (0, _classCallCheck2.default)(this, ResetStyle); | |
| 15390 | + return _super.apply(this, arguments); | |
| 15391 | + } | |
| 15392 | + | |
| 15393 | + (0, _createClass2.default)(ResetStyle, [{ | |
| 15394 | + key: "validateArgs", | |
| 15395 | + value: function validateArgs(args) { | |
| 15396 | + this.requireContainer(args); | |
| 15397 | + } | |
| 15398 | + }, { | |
| 15399 | + key: "getHistory", | |
| 15400 | + value: function getHistory(args) { | |
| 15401 | + var _args$containers = args.containers, | |
| 15402 | + containers = _args$containers === void 0 ? [args.container] : _args$containers; | |
| 15403 | + return { | |
| 15404 | + containers: containers, | |
| 15405 | + type: 'reset_style' | |
| 15406 | + }; | |
| 15407 | + } | |
| 15408 | + }, { | |
| 15409 | + key: "apply", | |
| 15410 | + value: function apply(args) { | |
| 15411 | + var _args$containers2 = args.containers, | |
| 15412 | + containers = _args$containers2 === void 0 ? [args.container] : _args$containers2; | |
| 15413 | + containers.forEach(function (container) { | |
| 15414 | + var controls = container.settings.controls, | |
| 15415 | + settingsKeys = []; | |
| 15416 | + container.view.allowRender = false; | |
| 15417 | + (0, _entries.default)(controls).forEach(function (_ref) { | |
| 15418 | + var _ref2 = (0, _slicedToArray2.default)(_ref, 2), | |
| 15419 | + controlName = _ref2[0], | |
| 15420 | + control = _ref2[1]; | |
| 15421 | + | |
| 15422 | + if (!container.view.isStyleTransferControl(control)) { | |
| 15423 | + return; | |
| 15424 | + } | |
| 15425 | + | |
| 15426 | + settingsKeys.push(controlName); | |
| 15427 | + }); // BC: Deprecated since 2.8.0 - use `$e.hooks`. | |
| 15428 | + | |
| 15429 | + elementor.channels.data.trigger('element:before:reset:style', container.model); | |
| 15430 | + $e.run('document/elements/reset-settings', { | |
| 15431 | + container: container, | |
| 15432 | + settings: settingsKeys, | |
| 15433 | + options: { | |
| 15434 | + external: true | |
| 15435 | + } | |
| 15436 | + }); // BC: Deprecated since 2.8.0 - use `$e.hooks`. | |
| 15437 | + | |
| 15438 | + elementor.channels.data.trigger('element:after:reset:style', container.model); | |
| 15439 | + container.view.allowRender = true; | |
| 15440 | + container.render(); | |
| 15441 | + }); | |
| 15442 | + } | |
| 15443 | + }]); | |
| 15444 | + return ResetStyle; | |
| 15445 | +}(_commandHistory.default); | |
| 15446 | + | |
| 15447 | +exports.ResetStyle = ResetStyle; | |
| 15448 | +var _default = ResetStyle; | |
| 15449 | +exports.default = _default; | |
| 15450 | + | |
| 15451 | +/***/ }), | |
| 15452 | +/* 682 */, | |
| 15453 | +/* 683 */, | |
| 15454 | +/* 684 */, | |
| 15455 | +/* 685 */, | |
| 15456 | +/* 686 */, | |
| 15457 | +/* 687 */, | |
| 15458 | +/* 688 */, | |
| 15459 | +/* 689 */, | |
| 15460 | +/* 690 */, | |
| 15461 | +/* 691 */, | |
| 15462 | +/* 692 */, | |
| 15463 | +/* 693 */, | |
| 15464 | +/* 694 */, | |
| 15465 | +/* 695 */, | |
| 15466 | +/* 696 */, | |
| 15467 | +/* 697 */, | |
| 15468 | +/* 698 */, | |
| 15469 | +/* 699 */, | |
| 15470 | +/* 700 */, | |
| 15471 | +/* 701 */, | |
| 15472 | +/* 702 */, | |
| 15473 | +/* 703 */, | |
| 15474 | +/* 704 */, | |
| 15475 | +/* 705 */, | |
| 15476 | +/* 706 */ | |
| 15477 | +/***/ (function(module, exports, __webpack_require__) { | |
| 15478 | + | |
| 15479 | +"use strict"; | |
| 15480 | + | |
| 15481 | + | |
| 15482 | +var _interopRequireDefault = __webpack_require__(0); | |
| 15483 | + | |
| 15484 | +var _Object$defineProperty = __webpack_require__(1); | |
| 15485 | + | |
| 15486 | +_Object$defineProperty(exports, "__esModule", { | |
| 15487 | + value: true | |
| 15488 | +}); | |
| 15489 | + | |
| 15490 | +exports.default = void 0; | |
| 15491 | + | |
| 15492 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 15493 | + | |
| 15494 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 15495 | + | |
| 15496 | +var _commands = __webpack_require__(419); | |
| 15497 | + | |
| 15498 | +var Helper = /*#__PURE__*/function () { | |
| 15499 | + function Helper() { | |
| 15500 | + (0, _classCallCheck2.default)(this, Helper); | |
| 15501 | + } | |
| 15502 | + | |
| 15503 | + (0, _createClass2.default)(Helper, null, [{ | |
| 15504 | + key: "createSectionColumns", | |
| 15505 | + value: function createSectionColumns(containers, columns, options) { | |
| 15506 | + var structure = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; | |
| 15507 | + containers.forEach(function ( | |
| 15508 | + /**Container*/ | |
| 15509 | + container) { | |
| 15510 | + for (var loopIndex = 0; loopIndex < columns; loopIndex++) { | |
| 15511 | + var model = { | |
| 15512 | + id: elementorCommon.helpers.getUniqueId(), | |
| 15513 | + elType: 'column', | |
| 15514 | + settings: {}, | |
| 15515 | + elements: [] | |
| 15516 | + }; | |
| 15517 | + /** | |
| 15518 | + * TODO: Try improve performance of using 'document/elements/create` instead of manual create. | |
| 15519 | + */ | |
| 15520 | + | |
| 15521 | + container.view.addChildModel(model, options); | |
| 15522 | + /** | |
| 15523 | + * Manual history & not using of `$e.run('document/elements/create')` | |
| 15524 | + * For performance reasons. | |
| 15525 | + */ | |
| 15526 | + | |
| 15527 | + $e.internal('document/history/log-sub-item', { | |
| 15528 | + container: container, | |
| 15529 | + type: 'sub-add', | |
| 15530 | + restore: _commands.Create.restore, | |
| 15531 | + options: options, | |
| 15532 | + data: { | |
| 15533 | + containerToRestore: container, | |
| 15534 | + modelToRestore: model | |
| 15535 | + } | |
| 15536 | + }); | |
| 15537 | + } | |
| 15538 | + }); | |
| 15539 | + | |
| 15540 | + if (structure) { | |
| 15541 | + containers.forEach(function ( | |
| 15542 | + /* Container */ | |
| 15543 | + container) { | |
| 15544 | + container.view.setStructure(structure, false); | |
| 15545 | + }); | |
| 15546 | + } else if (columns) { | |
| 15547 | + containers.forEach(function ( | |
| 15548 | + /* Container */ | |
| 15549 | + container) { | |
| 15550 | + return container.view.resetLayout(); | |
| 15551 | + }); // Focus on last container. | |
| 15552 | + | |
| 15553 | + containers[containers.length - 1].model.trigger('request:edit'); | |
| 15554 | + } | |
| 15555 | + } | |
| 15556 | + }]); | |
| 15557 | + return Helper; | |
| 15558 | +}(); | |
| 15559 | + | |
| 15560 | +exports.default = Helper; | |
| 15561 | + | |
| 15562 | +/***/ }), | |
| 15563 | +/* 707 */ | |
| 15564 | +/***/ (function(module, exports, __webpack_require__) { | |
| 15565 | + | |
| 15566 | +"use strict"; | |
| 15567 | + | |
| 15568 | + | |
| 15569 | +var _interopRequireDefault = __webpack_require__(0); | |
| 15570 | + | |
| 15571 | +var _Object$defineProperty = __webpack_require__(1); | |
| 15572 | + | |
| 15573 | +_Object$defineProperty(exports, "__esModule", { | |
| 15574 | + value: true | |
| 15575 | +}); | |
| 15576 | + | |
| 15577 | +exports.default = void 0; | |
| 15578 | + | |
| 15579 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 15580 | + | |
| 15581 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 15582 | + | |
| 15583 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 15584 | + | |
| 15585 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 15586 | + | |
| 15587 | +var _commandBase = _interopRequireDefault(__webpack_require__(23)); | |
| 15588 | + | |
| 15589 | +var CreateBase = /*#__PURE__*/function (_CommandBase) { | |
| 15590 | + (0, _inherits2.default)(CreateBase, _CommandBase); | |
| 15591 | + | |
| 15592 | + var _super = (0, _createSuper2.default)(CreateBase); | |
| 15593 | + | |
| 15594 | + function CreateBase() { | |
| 15595 | + (0, _classCallCheck2.default)(this, CreateBase); | |
| 15596 | + return _super.apply(this, arguments); | |
| 15597 | + } | |
| 15598 | + | |
| 15599 | + (0, _createClass2.default)(CreateBase, [{ | |
| 15600 | + key: "validateArgs", | |
| 15601 | + value: function validateArgs() { | |
| 15602 | + var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 15603 | + this.requireContainer(args); | |
| 15604 | + this.requireArgumentType('setting', 'string', args); | |
| 15605 | + this.requireArgumentType('title', 'string', args); | |
| 15606 | + } | |
| 15607 | + }]); | |
| 15608 | + return CreateBase; | |
| 15609 | +}(_commandBase.default); | |
| 15610 | + | |
| 15611 | +exports.default = CreateBase; | |
| 15612 | + | |
| 15613 | +/***/ }), | |
| 15614 | +/* 708 */, | |
| 15615 | +/* 709 */, | |
| 15616 | +/* 710 */, | |
| 15617 | +/* 711 */, | |
| 15618 | +/* 712 */, | |
| 15619 | +/* 713 */, | |
| 15620 | +/* 714 */, | |
| 15621 | +/* 715 */, | |
| 15622 | +/* 716 */, | |
| 15623 | +/* 717 */, | |
| 15624 | +/* 718 */, | |
| 15625 | +/* 719 */, | |
| 15626 | +/* 720 */, | |
| 15627 | +/* 721 */, | |
| 15628 | +/* 722 */, | |
| 15629 | +/* 723 */, | |
| 15630 | +/* 724 */, | |
| 15631 | +/* 725 */, | |
| 15632 | +/* 726 */, | |
| 15633 | +/* 727 */, | |
| 15634 | +/* 728 */, | |
| 15635 | +/* 729 */, | |
| 15636 | +/* 730 */, | |
| 15637 | +/* 731 */, | |
| 15638 | +/* 732 */, | |
| 15639 | +/* 733 */, | |
| 15640 | +/* 734 */, | |
| 15641 | +/* 735 */, | |
| 15642 | +/* 736 */, | |
| 15643 | +/* 737 */, | |
| 15644 | +/* 738 */, | |
| 15645 | +/* 739 */, | |
| 15646 | +/* 740 */, | |
| 15647 | +/* 741 */, | |
| 15648 | +/* 742 */, | |
| 15649 | +/* 743 */, | |
| 15650 | +/* 744 */, | |
| 15651 | +/* 745 */, | |
| 15652 | +/* 746 */, | |
| 15653 | +/* 747 */, | |
| 15654 | +/* 748 */, | |
| 15655 | +/* 749 */, | |
| 15656 | +/* 750 */, | |
| 15657 | +/* 751 */, | |
| 15658 | +/* 752 */, | |
| 15659 | +/* 753 */, | |
| 15660 | +/* 754 */, | |
| 15661 | +/* 755 */, | |
| 15662 | +/* 756 */, | |
| 15663 | +/* 757 */, | |
| 15664 | +/* 758 */, | |
| 15665 | +/* 759 */, | |
| 15666 | +/* 760 */, | |
| 15667 | +/* 761 */, | |
| 15668 | +/* 762 */, | |
| 15669 | +/* 763 */, | |
| 15670 | +/* 764 */, | |
| 15671 | +/* 765 */, | |
| 15672 | +/* 766 */, | |
| 15673 | +/* 767 */, | |
| 15674 | +/* 768 */, | |
| 15675 | +/* 769 */, | |
| 15676 | +/* 770 */, | |
| 15677 | +/* 771 */, | |
| 15678 | +/* 772 */, | |
| 15679 | +/* 773 */, | |
| 15680 | +/* 774 */, | |
| 15681 | +/* 775 */, | |
| 15682 | +/* 776 */, | |
| 15683 | +/* 777 */, | |
| 15684 | +/* 778 */, | |
| 15685 | +/* 779 */, | |
| 15686 | +/* 780 */, | |
| 15687 | +/* 781 */, | |
| 15688 | +/* 782 */, | |
| 15689 | +/* 783 */, | |
| 15690 | +/* 784 */, | |
| 15691 | +/* 785 */, | |
| 15692 | +/* 786 */, | |
| 15693 | +/* 787 */, | |
| 15694 | +/* 788 */, | |
| 15695 | +/* 789 */, | |
| 15696 | +/* 790 */, | |
| 15697 | +/* 791 */, | |
| 15698 | +/* 792 */, | |
| 15699 | +/* 793 */, | |
| 15700 | +/* 794 */, | |
| 15701 | +/* 795 */, | |
| 15702 | +/* 796 */, | |
| 15703 | +/* 797 */, | |
| 15704 | +/* 798 */, | |
| 15705 | +/* 799 */, | |
| 15706 | +/* 800 */, | |
| 15707 | +/* 801 */, | |
| 15708 | +/* 802 */, | |
| 15709 | +/* 803 */, | |
| 15710 | +/* 804 */, | |
| 15711 | +/* 805 */, | |
| 15712 | +/* 806 */, | |
| 15713 | +/* 807 */, | |
| 15714 | +/* 808 */, | |
| 15715 | +/* 809 */, | |
| 15716 | +/* 810 */, | |
| 15717 | +/* 811 */, | |
| 15718 | +/* 812 */, | |
| 15719 | +/* 813 */, | |
| 15720 | +/* 814 */, | |
| 15721 | +/* 815 */, | |
| 15722 | +/* 816 */, | |
| 15723 | +/* 817 */, | |
| 15724 | +/* 818 */, | |
| 15725 | +/* 819 */, | |
| 15726 | +/* 820 */, | |
| 15727 | +/* 821 */, | |
| 15728 | +/* 822 */, | |
| 15729 | +/* 823 */, | |
| 15730 | +/* 824 */, | |
| 15731 | +/* 825 */, | |
| 15732 | +/* 826 */, | |
| 15733 | +/* 827 */ | |
| 15734 | +/***/ (function(module, exports, __webpack_require__) { | |
| 15735 | + | |
| 15736 | +"use strict"; | |
| 15737 | + | |
| 15738 | + | |
| 15739 | +var _interopRequireDefault = __webpack_require__(0); | |
| 15740 | + | |
| 15741 | +var _component = _interopRequireDefault(__webpack_require__(828)); | |
| 15742 | + | |
| 15743 | +var _component2 = _interopRequireDefault(__webpack_require__(917)); | |
| 15744 | + | |
| 15745 | +elementorCommon.elements.$window.on('elementor:init-components', function () { | |
| 15746 | + // TODO: Move to elementor:init-data-components | |
| 15747 | + $e.components.register(new _component2.default()); | |
| 15748 | + $e.components.register(new _component.default()); // TODO: Remove, BC Since 2.9.0. | |
| 15749 | + | |
| 15750 | + elementor.saver = $e.components.get('document/save'); | |
| 15751 | +}); | |
| 15752 | +$e.modules.document = _component.default.getModules(); | |
| 15753 | + | |
| 15754 | +/***/ }), | |
| 15755 | +/* 828 */ | |
| 15756 | +/***/ (function(module, exports, __webpack_require__) { | |
| 15757 | + | |
| 15758 | +"use strict"; | |
| 15759 | + | |
| 15760 | + | |
| 15761 | +var _interopRequireWildcard = __webpack_require__(34); | |
| 15762 | + | |
| 15763 | +var _interopRequireDefault = __webpack_require__(0); | |
| 15764 | + | |
| 15765 | +var _Object$defineProperty = __webpack_require__(1); | |
| 15766 | + | |
| 15767 | +_Object$defineProperty(exports, "__esModule", { | |
| 15768 | + value: true | |
| 15769 | +}); | |
| 15770 | + | |
| 15771 | +exports.default = void 0; | |
| 15772 | + | |
| 15773 | +var _values = _interopRequireDefault(__webpack_require__(54)); | |
| 15774 | + | |
| 15775 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 15776 | + | |
| 15777 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 15778 | + | |
| 15779 | +var _get2 = _interopRequireDefault(__webpack_require__(26)); | |
| 15780 | + | |
| 15781 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(16)); | |
| 15782 | + | |
| 15783 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 15784 | + | |
| 15785 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 15786 | + | |
| 15787 | +var _componentBase = _interopRequireDefault(__webpack_require__(87)); | |
| 15788 | + | |
| 15789 | +var _backwardsCompatibility = _interopRequireDefault(__webpack_require__(829)); | |
| 15790 | + | |
| 15791 | +var _commandHistory = _interopRequireDefault(__webpack_require__(129)); | |
| 15792 | + | |
| 15793 | +var _commandHistoryDebounce = _interopRequireDefault(__webpack_require__(328)); | |
| 15794 | + | |
| 15795 | +var components = _interopRequireWildcard(__webpack_require__(830)); | |
| 15796 | + | |
| 15797 | +var hooks = _interopRequireWildcard(__webpack_require__(887)); | |
| 15798 | + | |
| 15799 | +var Component = /*#__PURE__*/function (_ComponentBase) { | |
| 15800 | + (0, _inherits2.default)(Component, _ComponentBase); | |
| 15801 | + | |
| 15802 | + var _super = (0, _createSuper2.default)(Component); | |
| 15803 | + | |
| 15804 | + function Component() { | |
| 15805 | + (0, _classCallCheck2.default)(this, Component); | |
| 15806 | + return _super.apply(this, arguments); | |
| 15807 | + } | |
| 15808 | + | |
| 15809 | + (0, _createClass2.default)(Component, [{ | |
| 15810 | + key: "getNamespace", | |
| 15811 | + value: function getNamespace() { | |
| 15812 | + return 'document'; | |
| 15813 | + } | |
| 15814 | + }, { | |
| 15815 | + key: "registerAPI", | |
| 15816 | + value: function registerAPI() { | |
| 15817 | + new _backwardsCompatibility.default(); | |
| 15818 | + (0, _values.default)(components).forEach(function (ComponentClass) { | |
| 15819 | + return $e.components.register(new ComponentClass()); | |
| 15820 | + }); | |
| 15821 | + (0, _get2.default)((0, _getPrototypeOf2.default)(Component.prototype), "registerAPI", this).call(this); | |
| 15822 | + } | |
| 15823 | + }, { | |
| 15824 | + key: "defaultCommands", | |
| 15825 | + value: function defaultCommands() { | |
| 15826 | + return {//example: ( args ) => ( new Commands.Example( args ).run() ), | |
| 15827 | + }; | |
| 15828 | + } | |
| 15829 | + }, { | |
| 15830 | + key: "defaultHooks", | |
| 15831 | + value: function defaultHooks() { | |
| 15832 | + return this.importHooks(hooks); | |
| 15833 | + } | |
| 15834 | + }, { | |
| 15835 | + key: "defaultUtils", | |
| 15836 | + value: function defaultUtils() { | |
| 15837 | + var _this = this; | |
| 15838 | + | |
| 15839 | + return { | |
| 15840 | + findViewRecursive: function findViewRecursive(parent, key, value) { | |
| 15841 | + var multiple = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true; | |
| 15842 | + var found = []; | |
| 15843 | + | |
| 15844 | + for (var x in parent._views) { | |
| 15845 | + var view = parent._views[x]; | |
| 15846 | + | |
| 15847 | + if (value === view.model.get(key)) { | |
| 15848 | + found.push(view); | |
| 15849 | + | |
| 15850 | + if (!multiple) { | |
| 15851 | + return found; | |
| 15852 | + } | |
| 15853 | + } | |
| 15854 | + | |
| 15855 | + if (view.children) { | |
| 15856 | + var views = _this.utils.findViewRecursive(view.children, key, value, multiple); | |
| 15857 | + | |
| 15858 | + if (views.length) { | |
| 15859 | + found = found.concat(views); | |
| 15860 | + | |
| 15861 | + if (!multiple) { | |
| 15862 | + return found; | |
| 15863 | + } | |
| 15864 | + } | |
| 15865 | + } | |
| 15866 | + } | |
| 15867 | + | |
| 15868 | + return found; | |
| 15869 | + }, | |
| 15870 | + findViewById: function findViewById(id) { | |
| 15871 | + var elements = _this.utils.findViewRecursive(elementor.getPreviewView().children, 'id', id, false); | |
| 15872 | + | |
| 15873 | + return elements ? elements[0] : false; | |
| 15874 | + }, | |
| 15875 | + findContainerById: function findContainerById(id) { | |
| 15876 | + var result = _this.utils.findViewById(id); | |
| 15877 | + | |
| 15878 | + if (result) { | |
| 15879 | + result = result.getContainer(); | |
| 15880 | + } | |
| 15881 | + | |
| 15882 | + return result; | |
| 15883 | + } | |
| 15884 | + }; | |
| 15885 | + } | |
| 15886 | + }], [{ | |
| 15887 | + key: "getModules", | |
| 15888 | + value: function getModules() { | |
| 15889 | + var modules = { | |
| 15890 | + get CommandHistoryBase() { | |
| 15891 | + elementorCommon.helpers.hardDeprecated('$e.modules.document.CommandHistoryBase', '3.0.0', '$e.modules.document.CommandHistory'); | |
| 15892 | + return this.CommandHistory; | |
| 15893 | + }, | |
| 15894 | + | |
| 15895 | + get CommandHistoryDebounceBase() { | |
| 15896 | + elementorCommon.helpers.hardDeprecated('$e.modules.document.CommandHistoryDebounceBase', '3.0.0', '$e.modules.document.CommandHistoryDebounce'); | |
| 15897 | + return this.CommandHistoryDebounce; | |
| 15898 | + }, | |
| 15899 | + | |
| 15900 | + CommandHistory: _commandHistory.default, | |
| 15901 | + CommandHistoryDebounce: _commandHistoryDebounce.default | |
| 15902 | + }; | |
| 15903 | + return modules; | |
| 15904 | + } | |
| 15905 | + }]); | |
| 15906 | + return Component; | |
| 15907 | +}(_componentBase.default); | |
| 15908 | + | |
| 15909 | +exports.default = Component; | |
| 15910 | + | |
| 15911 | +/***/ }), | |
| 15912 | +/* 829 */ | |
| 15913 | +/***/ (function(module, exports, __webpack_require__) { | |
| 15914 | + | |
| 15915 | +"use strict"; | |
| 15916 | + | |
| 15917 | + | |
| 15918 | +var _interopRequireDefault = __webpack_require__(0); | |
| 15919 | + | |
| 15920 | +var _Object$defineProperty = __webpack_require__(1); | |
| 15921 | + | |
| 15922 | +_Object$defineProperty(exports, "__esModule", { | |
| 15923 | + value: true | |
| 15924 | +}); | |
| 15925 | + | |
| 15926 | +exports.default = void 0; | |
| 15927 | + | |
| 15928 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 15929 | + | |
| 15930 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 15931 | + | |
| 15932 | +var BackwardsCompatibility = /*#__PURE__*/function () { | |
| 15933 | + function BackwardsCompatibility() { | |
| 15934 | + (0, _classCallCheck2.default)(this, BackwardsCompatibility); | |
| 15935 | + elementorCommon.elements.$window.on('elementor:init', this.deprecatedEvents); | |
| 15936 | + elementor.channels.data.on('template:before:insert', this.startInsertTemplate).on('template:after:insert', this.endItem); | |
| 15937 | + } | |
| 15938 | + | |
| 15939 | + (0, _createClass2.default)(BackwardsCompatibility, [{ | |
| 15940 | + key: "deprecatedEvents", | |
| 15941 | + value: function deprecatedEvents() { | |
| 15942 | + var elementorDataEvents = elementor.channels.data._events, | |
| 15943 | + deprecatedEvents = ['drag:before:update', 'drag:after:update', 'element:before:add', 'element:after:add', 'element:before:remove', 'element:after:remove', 'element:before:paste:style', 'element:after:paste:style', 'element:before:reset:style', 'element:after:reset:style', 'section:before:drop', 'section:after:drop']; | |
| 15944 | + deprecatedEvents.forEach(function (event) { | |
| 15945 | + if (elementorDataEvents[event] && elementorDataEvents[event].length) { | |
| 15946 | + elementorCommon.helpers.softDeprecated("event: ".concat(event), '2.8.0', '$e.hooks'); | |
| 15947 | + } | |
| 15948 | + }); | |
| 15949 | + } | |
| 15950 | + }, { | |
| 15951 | + key: "startInsertTemplate", | |
| 15952 | + value: function startInsertTemplate(model) { | |
| 15953 | + elementorCommon.helpers.softDeprecated('event: template:before:insert', '2.8.0', "$e.run( 'document/import' )"); | |
| 15954 | + elementor.documents.getCurrent().history.startItem({ | |
| 15955 | + type: 'add', | |
| 15956 | + title: elementor.translate('template'), | |
| 15957 | + subTitle: model.get('title'), | |
| 15958 | + elementType: 'template' | |
| 15959 | + }); | |
| 15960 | + } | |
| 15961 | + }, { | |
| 15962 | + key: "endItem", | |
| 15963 | + value: function endItem() { | |
| 15964 | + elementor.documents.getCurrent().history.endItem(); | |
| 15965 | + } | |
| 15966 | + }]); | |
| 15967 | + return BackwardsCompatibility; | |
| 15968 | +}(); | |
| 15969 | + | |
| 15970 | +exports.default = BackwardsCompatibility; | |
| 15971 | + | |
| 15972 | +/***/ }), | |
| 15973 | +/* 830 */ | |
| 15974 | +/***/ (function(module, exports, __webpack_require__) { | |
| 15975 | + | |
| 15976 | +"use strict"; | |
| 15977 | + | |
| 15978 | + | |
| 15979 | +var _interopRequireDefault = __webpack_require__(0); | |
| 15980 | + | |
| 15981 | +var _Object$defineProperty = __webpack_require__(1); | |
| 15982 | + | |
| 15983 | +_Object$defineProperty(exports, "__esModule", { | |
| 15984 | + value: true | |
| 15985 | +}); | |
| 15986 | + | |
| 15987 | +_Object$defineProperty(exports, "DynamicComponent", { | |
| 15988 | + enumerable: true, | |
| 15989 | + get: function get() { | |
| 15990 | + return _component.default; | |
| 15991 | + } | |
| 15992 | +}); | |
| 15993 | + | |
| 15994 | +_Object$defineProperty(exports, "ElementsComponent", { | |
| 15995 | + enumerable: true, | |
| 15996 | + get: function get() { | |
| 15997 | + return _component2.default; | |
| 15998 | + } | |
| 15999 | +}); | |
| 16000 | + | |
| 16001 | +_Object$defineProperty(exports, "GlobalsComponent", { | |
| 16002 | + enumerable: true, | |
| 16003 | + get: function get() { | |
| 16004 | + return _component3.default; | |
| 16005 | + } | |
| 16006 | +}); | |
| 16007 | + | |
| 16008 | +_Object$defineProperty(exports, "HistoryComponent", { | |
| 16009 | + enumerable: true, | |
| 16010 | + get: function get() { | |
| 16011 | + return _component4.default; | |
| 16012 | + } | |
| 16013 | +}); | |
| 16014 | + | |
| 16015 | +_Object$defineProperty(exports, "RepeaterComponent", { | |
| 16016 | + enumerable: true, | |
| 16017 | + get: function get() { | |
| 16018 | + return _component5.default; | |
| 16019 | + } | |
| 16020 | +}); | |
| 16021 | + | |
| 16022 | +_Object$defineProperty(exports, "SaveComponent", { | |
| 16023 | + enumerable: true, | |
| 16024 | + get: function get() { | |
| 16025 | + return _component6.default; | |
| 16026 | + } | |
| 16027 | +}); | |
| 16028 | + | |
| 16029 | +_Object$defineProperty(exports, "UIComponent", { | |
| 16030 | + enumerable: true, | |
| 16031 | + get: function get() { | |
| 16032 | + return _component7.default; | |
| 16033 | + } | |
| 16034 | +}); | |
| 16035 | + | |
| 16036 | +var _component = _interopRequireDefault(__webpack_require__(831)); | |
| 16037 | + | |
| 16038 | +var _component2 = _interopRequireDefault(__webpack_require__(836)); | |
| 16039 | + | |
| 16040 | +var _component3 = _interopRequireDefault(__webpack_require__(837)); | |
| 16041 | + | |
| 16042 | +var _component4 = _interopRequireDefault(__webpack_require__(843)); | |
| 16043 | + | |
| 16044 | +var _component5 = _interopRequireDefault(__webpack_require__(852)); | |
| 16045 | + | |
| 16046 | +var _component6 = _interopRequireDefault(__webpack_require__(858)); | |
| 16047 | + | |
| 16048 | +var _component7 = _interopRequireDefault(__webpack_require__(880)); | |
| 16049 | + | |
| 16050 | +/***/ }), | |
| 16051 | +/* 831 */ | |
| 16052 | +/***/ (function(module, exports, __webpack_require__) { | |
| 16053 | + | |
| 16054 | +"use strict"; | |
| 16055 | + | |
| 16056 | + | |
| 16057 | +var _interopRequireWildcard = __webpack_require__(34); | |
| 16058 | + | |
| 16059 | +var _interopRequireDefault = __webpack_require__(0); | |
| 16060 | + | |
| 16061 | +var _Object$defineProperty = __webpack_require__(1); | |
| 16062 | + | |
| 16063 | +_Object$defineProperty(exports, "__esModule", { | |
| 16064 | + value: true | |
| 16065 | +}); | |
| 16066 | + | |
| 16067 | +exports.default = void 0; | |
| 16068 | + | |
| 16069 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 16070 | + | |
| 16071 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 16072 | + | |
| 16073 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 16074 | + | |
| 16075 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 16076 | + | |
| 16077 | +var _componentBase = _interopRequireDefault(__webpack_require__(87)); | |
| 16078 | + | |
| 16079 | +var commands = _interopRequireWildcard(__webpack_require__(832)); | |
| 16080 | + | |
| 16081 | +var Component = /*#__PURE__*/function (_ComponentBase) { | |
| 16082 | + (0, _inherits2.default)(Component, _ComponentBase); | |
| 16083 | + | |
| 16084 | + var _super = (0, _createSuper2.default)(Component); | |
| 16085 | + | |
| 16086 | + function Component() { | |
| 16087 | + (0, _classCallCheck2.default)(this, Component); | |
| 16088 | + return _super.apply(this, arguments); | |
| 16089 | + } | |
| 16090 | + | |
| 16091 | + (0, _createClass2.default)(Component, [{ | |
| 16092 | + key: "getNamespace", | |
| 16093 | + value: function getNamespace() { | |
| 16094 | + return 'document/dynamic'; | |
| 16095 | + } | |
| 16096 | + }, { | |
| 16097 | + key: "defaultCommands", | |
| 16098 | + value: function defaultCommands() { | |
| 16099 | + return this.importCommands(commands); | |
| 16100 | + } | |
| 16101 | + }]); | |
| 16102 | + return Component; | |
| 16103 | +}(_componentBase.default); | |
| 16104 | + | |
| 16105 | +exports.default = Component; | |
| 16106 | + | |
| 16107 | +/***/ }), | |
| 16108 | +/* 832 */ | |
| 16109 | +/***/ (function(module, exports, __webpack_require__) { | |
| 16110 | + | |
| 16111 | +"use strict"; | |
| 16112 | + | |
| 16113 | + | |
| 16114 | +var _Object$defineProperty = __webpack_require__(1); | |
| 16115 | + | |
| 16116 | +_Object$defineProperty(exports, "__esModule", { | |
| 16117 | + value: true | |
| 16118 | +}); | |
| 16119 | + | |
| 16120 | +_Object$defineProperty(exports, "Disable", { | |
| 16121 | + enumerable: true, | |
| 16122 | + get: function get() { | |
| 16123 | + return _disable.Disable; | |
| 16124 | + } | |
| 16125 | +}); | |
| 16126 | + | |
| 16127 | +_Object$defineProperty(exports, "Enable", { | |
| 16128 | + enumerable: true, | |
| 16129 | + get: function get() { | |
| 16130 | + return _enable.Enable; | |
| 16131 | + } | |
| 16132 | +}); | |
| 16133 | + | |
| 16134 | +_Object$defineProperty(exports, "Settings", { | |
| 16135 | + enumerable: true, | |
| 16136 | + get: function get() { | |
| 16137 | + return _settings.Settings; | |
| 16138 | + } | |
| 16139 | +}); | |
| 16140 | + | |
| 16141 | +var _disable = __webpack_require__(833); | |
| 16142 | + | |
| 16143 | +var _enable = __webpack_require__(834); | |
| 16144 | + | |
| 16145 | +var _settings = __webpack_require__(835); | |
| 16146 | + | |
| 16147 | +/***/ }), | |
| 16148 | +/* 833 */ | |
| 16149 | +/***/ (function(module, exports, __webpack_require__) { | |
| 16150 | + | |
| 16151 | +"use strict"; | |
| 16152 | + | |
| 16153 | + | |
| 16154 | +var _interopRequireDefault = __webpack_require__(0); | |
| 16155 | + | |
| 16156 | +var _Object$defineProperty = __webpack_require__(1); | |
| 16157 | + | |
| 16158 | +_Object$defineProperty(exports, "__esModule", { | |
| 16159 | + value: true | |
| 16160 | +}); | |
| 16161 | + | |
| 16162 | +exports.default = exports.Disable = void 0; | |
| 16163 | + | |
| 16164 | +var _keys = _interopRequireDefault(__webpack_require__(25)); | |
| 16165 | + | |
| 16166 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 16167 | + | |
| 16168 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 16169 | + | |
| 16170 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 16171 | + | |
| 16172 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 16173 | + | |
| 16174 | +var _disableEnable = _interopRequireDefault(__webpack_require__(418)); | |
| 16175 | + | |
| 16176 | +var Disable = /*#__PURE__*/function (_DisableEnable) { | |
| 16177 | + (0, _inherits2.default)(Disable, _DisableEnable); | |
| 16178 | + | |
| 16179 | + var _super = (0, _createSuper2.default)(Disable); | |
| 16180 | + | |
| 16181 | + function Disable() { | |
| 16182 | + (0, _classCallCheck2.default)(this, Disable); | |
| 16183 | + return _super.apply(this, arguments); | |
| 16184 | + } | |
| 16185 | + | |
| 16186 | + (0, _createClass2.default)(Disable, [{ | |
| 16187 | + key: "apply", | |
| 16188 | + value: function apply(args) { | |
| 16189 | + var settings = args.settings, | |
| 16190 | + _args$containers = args.containers, | |
| 16191 | + containers = _args$containers === void 0 ? [args.container] : _args$containers; | |
| 16192 | + containers.forEach(function (container) { | |
| 16193 | + container = container.lookup(); | |
| 16194 | + (0, _keys.default)(settings).forEach(function (setting) { | |
| 16195 | + container.dynamic.unset(setting); | |
| 16196 | + }); | |
| 16197 | + container.settings.set('__dynamic__', container.dynamic.toJSON()); | |
| 16198 | + container.render(); | |
| 16199 | + }); | |
| 16200 | + } | |
| 16201 | + }]); | |
| 16202 | + return Disable; | |
| 16203 | +}(_disableEnable.default); | |
| 16204 | + | |
| 16205 | +exports.Disable = Disable; | |
| 16206 | +var _default = Disable; | |
| 16207 | +exports.default = _default; | |
| 16208 | + | |
| 16209 | +/***/ }), | |
| 16210 | +/* 834 */ | |
| 16211 | +/***/ (function(module, exports, __webpack_require__) { | |
| 16212 | + | |
| 16213 | +"use strict"; | |
| 16214 | + | |
| 16215 | + | |
| 16216 | +var _interopRequireDefault = __webpack_require__(0); | |
| 16217 | + | |
| 16218 | +var _Object$defineProperty = __webpack_require__(1); | |
| 16219 | + | |
| 16220 | +_Object$defineProperty(exports, "__esModule", { | |
| 16221 | + value: true | |
| 16222 | +}); | |
| 16223 | + | |
| 16224 | +exports.default = exports.Enable = void 0; | |
| 16225 | + | |
| 16226 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 16227 | + | |
| 16228 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 16229 | + | |
| 16230 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 16231 | + | |
| 16232 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 16233 | + | |
| 16234 | +var _disableEnable = _interopRequireDefault(__webpack_require__(418)); | |
| 16235 | + | |
| 16236 | +var Enable = /*#__PURE__*/function (_DisableEnable) { | |
| 16237 | + (0, _inherits2.default)(Enable, _DisableEnable); | |
| 16238 | + | |
| 16239 | + var _super = (0, _createSuper2.default)(Enable); | |
| 16240 | + | |
| 16241 | + function Enable() { | |
| 16242 | + (0, _classCallCheck2.default)(this, Enable); | |
| 16243 | + return _super.apply(this, arguments); | |
| 16244 | + } | |
| 16245 | + | |
| 16246 | + (0, _createClass2.default)(Enable, [{ | |
| 16247 | + key: "apply", | |
| 16248 | + value: function apply(args) { | |
| 16249 | + var settings = args.settings, | |
| 16250 | + _args$containers = args.containers, | |
| 16251 | + containers = _args$containers === void 0 ? [args.container] : _args$containers; | |
| 16252 | + containers.forEach(function (container) { | |
| 16253 | + container = container.lookup(); | |
| 16254 | + container.dynamic.set(settings); | |
| 16255 | + container.settings.set('__dynamic__', container.dynamic.toJSON()); | |
| 16256 | + container.render(); | |
| 16257 | + }); | |
| 16258 | + } | |
| 16259 | + }]); | |
| 16260 | + return Enable; | |
| 16261 | +}(_disableEnable.default); | |
| 16262 | + | |
| 16263 | +exports.Enable = Enable; | |
| 16264 | +var _default = Enable; | |
| 16265 | +exports.default = _default; | |
| 16266 | + | |
| 16267 | +/***/ }), | |
| 16268 | +/* 835 */ | |
| 16269 | +/***/ (function(module, exports, __webpack_require__) { | |
| 16270 | + | |
| 16271 | +"use strict"; | |
| 16272 | + | |
| 16273 | + | |
| 16274 | +var _interopRequireDefault = __webpack_require__(0); | |
| 16275 | + | |
| 16276 | +var _Object$defineProperty = __webpack_require__(1); | |
| 16277 | + | |
| 16278 | +_Object$defineProperty(exports, "__esModule", { | |
| 16279 | + value: true | |
| 16280 | +}); | |
| 16281 | + | |
| 16282 | +exports.default = exports.Settings = void 0; | |
| 16283 | + | |
| 16284 | +var _keys = _interopRequireDefault(__webpack_require__(25)); | |
| 16285 | + | |
| 16286 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 16287 | + | |
| 16288 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 16289 | + | |
| 16290 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 16291 | + | |
| 16292 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 16293 | + | |
| 16294 | +var _commandHistoryDebounce = _interopRequireDefault(__webpack_require__(328)); | |
| 16295 | + | |
| 16296 | +var _settings = _interopRequireDefault(__webpack_require__(350)); | |
| 16297 | + | |
| 996 | 16298 | /** |
| 997 | - * @type {Object} | |
| 16299 | + * The difference between 'document/elements/settings` and `document/dynamic/settings` is: | |
| 16300 | + * that `document/elements/settings` apply settings to `container.settings` and `document/dynamic/settings` affect | |
| 16301 | + * `container.settings.__dynamic__`, also clearing the dynamic if `args.settings` is empty. | |
| 998 | 16302 | */ |
| 999 | -(0, _defineProperty2.default)(CommandInfra, "registerConfig", null); | |
| 16303 | +var Settings = /*#__PURE__*/function (_CommandHistoryDeboun) { | |
| 16304 | + (0, _inherits2.default)(Settings, _CommandHistoryDeboun); | |
| 1000 | 16305 | |
| 16306 | + var _super = (0, _createSuper2.default)(Settings); | |
| 16307 | + | |
| 16308 | + function Settings() { | |
| 16309 | + (0, _classCallCheck2.default)(this, Settings); | |
| 16310 | + return _super.apply(this, arguments); | |
| 16311 | + } | |
| 16312 | + | |
| 16313 | + (0, _createClass2.default)(Settings, [{ | |
| 16314 | + key: "validateArgs", | |
| 16315 | + value: function validateArgs(args) { | |
| 16316 | + this.requireContainer(args); | |
| 16317 | + this.requireArgumentConstructor('settings', Object, args); | |
| 16318 | + } | |
| 16319 | + }, { | |
| 16320 | + key: "getHistory", | |
| 16321 | + value: function getHistory(args) { | |
| 16322 | + var settings = args.settings, | |
| 16323 | + _args$containers = args.containers, | |
| 16324 | + containers = _args$containers === void 0 ? [args.container] : _args$containers, | |
| 16325 | + changes = {}; | |
| 16326 | + containers.forEach(function (container) { | |
| 16327 | + var id = container.id; | |
| 16328 | + | |
| 16329 | + if (!changes[id]) { | |
| 16330 | + changes[id] = {}; | |
| 16331 | + } | |
| 16332 | + | |
| 16333 | + changes[id] = { | |
| 16334 | + old: container.dynamic.toJSON(), | |
| 16335 | + new: settings | |
| 16336 | + }; | |
| 16337 | + }); | |
| 16338 | + | |
| 16339 | + var subTitle = _settings.default.getSubTitle(args); | |
| 16340 | + | |
| 16341 | + return { | |
| 16342 | + containers: containers, | |
| 16343 | + subTitle: subTitle, | |
| 16344 | + data: { | |
| 16345 | + changes: changes | |
| 16346 | + }, | |
| 16347 | + type: 'change', | |
| 16348 | + restore: this.constructor.restore | |
| 16349 | + }; | |
| 16350 | + } | |
| 16351 | + }, { | |
| 16352 | + key: "apply", | |
| 16353 | + value: function apply(args) { | |
| 16354 | + var settings = args.settings, | |
| 16355 | + _args$containers2 = args.containers, | |
| 16356 | + containers = _args$containers2 === void 0 ? [args.container] : _args$containers2; | |
| 16357 | + containers.forEach(function (container) { | |
| 16358 | + container = container.lookup(); | |
| 16359 | + | |
| 16360 | + if (!(0, _keys.default)(settings).length) { | |
| 16361 | + container.dynamic.clear(); | |
| 16362 | + } else { | |
| 16363 | + container.dynamic.set(settings); | |
| 16364 | + } | |
| 16365 | + | |
| 16366 | + container.settings.set('__dynamic__', container.dynamic.toJSON()); | |
| 16367 | + container.render(); | |
| 16368 | + }); | |
| 16369 | + } | |
| 16370 | + }], [{ | |
| 16371 | + key: "restore", | |
| 16372 | + value: function restore(historyItem, isRedo) { | |
| 16373 | + var data = historyItem.get('data'); | |
| 16374 | + historyItem.get('containers').forEach(function (container) { | |
| 16375 | + var changes = data.changes[container.id]; | |
| 16376 | + $e.run('document/dynamic/settings', { | |
| 16377 | + container: container, | |
| 16378 | + settings: isRedo ? changes.new : changes.old | |
| 16379 | + }); | |
| 16380 | + container.panel.refresh(); | |
| 16381 | + }); | |
| 16382 | + } | |
| 16383 | + }]); | |
| 16384 | + return Settings; | |
| 16385 | +}(_commandHistoryDebounce.default); | |
| 16386 | + | |
| 16387 | +exports.Settings = Settings; | |
| 16388 | +var _default = Settings; | |
| 16389 | +exports.default = _default; | |
| 16390 | + | |
| 1001 | 16391 | /***/ }), |
| 16392 | +/* 836 */ | |
| 16393 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1002 | 16394 | |
| 1003 | -/***/ "../modules/web-cli/assets/js/utils/console.js": | |
| 1004 | -/*!*****************************************************!*\ | |
| 1005 | - !*** ../modules/web-cli/assets/js/utils/console.js ***! | |
| 1006 | - \*****************************************************/ | |
| 1007 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 16395 | +"use strict"; | |
| 1008 | 16396 | |
| 16397 | + | |
| 16398 | +var _interopRequireWildcard = __webpack_require__(34); | |
| 16399 | + | |
| 16400 | +var _interopRequireDefault = __webpack_require__(0); | |
| 16401 | + | |
| 16402 | +var _Object$defineProperty = __webpack_require__(1); | |
| 16403 | + | |
| 16404 | +_Object$defineProperty(exports, "__esModule", { | |
| 16405 | + value: true | |
| 16406 | +}); | |
| 16407 | + | |
| 16408 | +exports.default = void 0; | |
| 16409 | + | |
| 16410 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 16411 | + | |
| 16412 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 16413 | + | |
| 16414 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 16415 | + | |
| 16416 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 16417 | + | |
| 16418 | +var _componentBase = _interopRequireDefault(__webpack_require__(87)); | |
| 16419 | + | |
| 16420 | +var commands = _interopRequireWildcard(__webpack_require__(419)); | |
| 16421 | + | |
| 16422 | +var Component = /*#__PURE__*/function (_ComponentBase) { | |
| 16423 | + (0, _inherits2.default)(Component, _ComponentBase); | |
| 16424 | + | |
| 16425 | + var _super = (0, _createSuper2.default)(Component); | |
| 16426 | + | |
| 16427 | + function Component() { | |
| 16428 | + (0, _classCallCheck2.default)(this, Component); | |
| 16429 | + return _super.apply(this, arguments); | |
| 16430 | + } | |
| 16431 | + | |
| 16432 | + (0, _createClass2.default)(Component, [{ | |
| 16433 | + key: "getNamespace", | |
| 16434 | + value: function getNamespace() { | |
| 16435 | + return 'document/elements'; | |
| 16436 | + } | |
| 16437 | + }, { | |
| 16438 | + key: "defaultCommands", | |
| 16439 | + value: function defaultCommands() { | |
| 16440 | + return this.importCommands(commands); | |
| 16441 | + } | |
| 16442 | + }]); | |
| 16443 | + return Component; | |
| 16444 | +}(_componentBase.default); | |
| 16445 | + | |
| 16446 | +exports.default = Component; | |
| 16447 | + | |
| 16448 | +/***/ }), | |
| 16449 | +/* 837 */ | |
| 16450 | +/***/ (function(module, exports, __webpack_require__) { | |
| 16451 | + | |
| 1009 | 16452 | "use strict"; |
| 1010 | 16453 | |
| 1011 | 16454 | |
| 1012 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1013 | -Object.defineProperty(exports, "__esModule", ({ | |
| 16455 | +var _interopRequireWildcard = __webpack_require__(34); | |
| 16456 | + | |
| 16457 | +var _interopRequireDefault = __webpack_require__(0); | |
| 16458 | + | |
| 16459 | +var _Object$defineProperty = __webpack_require__(1); | |
| 16460 | + | |
| 16461 | +_Object$defineProperty(exports, "__esModule", { | |
| 1014 | 16462 | value: true |
| 1015 | -})); | |
| 1016 | -exports["default"] = void 0; | |
| 1017 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 1018 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 1019 | -var Console = exports["default"] = /*#__PURE__*/function () { | |
| 1020 | - function Console() { | |
| 1021 | - (0, _classCallCheck2.default)(this, Console); | |
| 16463 | +}); | |
| 16464 | + | |
| 16465 | +exports.default = void 0; | |
| 16466 | + | |
| 16467 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 16468 | + | |
| 16469 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 16470 | + | |
| 16471 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 16472 | + | |
| 16473 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 16474 | + | |
| 16475 | +var _componentBase = _interopRequireDefault(__webpack_require__(87)); | |
| 16476 | + | |
| 16477 | +var commands = _interopRequireWildcard(__webpack_require__(838)); | |
| 16478 | + | |
| 16479 | +var Component = /*#__PURE__*/function (_ComponentBase) { | |
| 16480 | + (0, _inherits2.default)(Component, _ComponentBase); | |
| 16481 | + | |
| 16482 | + var _super = (0, _createSuper2.default)(Component); | |
| 16483 | + | |
| 16484 | + function Component() { | |
| 16485 | + (0, _classCallCheck2.default)(this, Component); | |
| 16486 | + return _super.apply(this, arguments); | |
| 1022 | 16487 | } |
| 1023 | - return (0, _createClass2.default)(Console, null, [{ | |
| 1024 | - key: "error", | |
| 1025 | - value: function error(message) { | |
| 1026 | - // Show an error if devTools is available. | |
| 1027 | - if ($e.devTools) { | |
| 1028 | - $e.devTools.log.error(message); | |
| 16488 | + | |
| 16489 | + (0, _createClass2.default)(Component, [{ | |
| 16490 | + key: "getNamespace", | |
| 16491 | + value: function getNamespace() { | |
| 16492 | + return 'document/globals'; | |
| 16493 | + } | |
| 16494 | + }, { | |
| 16495 | + key: "defaultCommands", | |
| 16496 | + value: function defaultCommands() { | |
| 16497 | + return this.importCommands(commands); | |
| 16498 | + } | |
| 16499 | + }]); | |
| 16500 | + return Component; | |
| 16501 | +}(_componentBase.default); | |
| 16502 | + | |
| 16503 | +exports.default = Component; | |
| 16504 | + | |
| 16505 | +/***/ }), | |
| 16506 | +/* 838 */ | |
| 16507 | +/***/ (function(module, exports, __webpack_require__) { | |
| 16508 | + | |
| 16509 | +"use strict"; | |
| 16510 | + | |
| 16511 | + | |
| 16512 | +var _Object$defineProperty = __webpack_require__(1); | |
| 16513 | + | |
| 16514 | +_Object$defineProperty(exports, "__esModule", { | |
| 16515 | + value: true | |
| 16516 | +}); | |
| 16517 | + | |
| 16518 | +_Object$defineProperty(exports, "Disable", { | |
| 16519 | + enumerable: true, | |
| 16520 | + get: function get() { | |
| 16521 | + return _disable.Disable; | |
| 16522 | + } | |
| 16523 | +}); | |
| 16524 | + | |
| 16525 | +_Object$defineProperty(exports, "Enable", { | |
| 16526 | + enumerable: true, | |
| 16527 | + get: function get() { | |
| 16528 | + return _enable.Enable; | |
| 16529 | + } | |
| 16530 | +}); | |
| 16531 | + | |
| 16532 | +_Object$defineProperty(exports, "Settings", { | |
| 16533 | + enumerable: true, | |
| 16534 | + get: function get() { | |
| 16535 | + return _settings.Settings; | |
| 16536 | + } | |
| 16537 | +}); | |
| 16538 | + | |
| 16539 | +_Object$defineProperty(exports, "Unlink", { | |
| 16540 | + enumerable: true, | |
| 16541 | + get: function get() { | |
| 16542 | + return _unlink.Unlink; | |
| 16543 | + } | |
| 16544 | +}); | |
| 16545 | + | |
| 16546 | +var _disable = __webpack_require__(839); | |
| 16547 | + | |
| 16548 | +var _enable = __webpack_require__(840); | |
| 16549 | + | |
| 16550 | +var _settings = __webpack_require__(841); | |
| 16551 | + | |
| 16552 | +var _unlink = __webpack_require__(842); | |
| 16553 | + | |
| 16554 | +/***/ }), | |
| 16555 | +/* 839 */ | |
| 16556 | +/***/ (function(module, exports, __webpack_require__) { | |
| 16557 | + | |
| 16558 | +"use strict"; | |
| 16559 | + | |
| 16560 | + | |
| 16561 | +var _interopRequireDefault = __webpack_require__(0); | |
| 16562 | + | |
| 16563 | +var _Object$defineProperty = __webpack_require__(1); | |
| 16564 | + | |
| 16565 | +_Object$defineProperty(exports, "__esModule", { | |
| 16566 | + value: true | |
| 16567 | +}); | |
| 16568 | + | |
| 16569 | +exports.default = exports.Disable = void 0; | |
| 16570 | + | |
| 16571 | +var _keys = _interopRequireDefault(__webpack_require__(25)); | |
| 16572 | + | |
| 16573 | +var _promise = _interopRequireDefault(__webpack_require__(134)); | |
| 16574 | + | |
| 16575 | +__webpack_require__(150); | |
| 16576 | + | |
| 16577 | +__webpack_require__(122); | |
| 16578 | + | |
| 16579 | +__webpack_require__(80); | |
| 16580 | + | |
| 16581 | +__webpack_require__(271); | |
| 16582 | + | |
| 16583 | +var _regenerator = _interopRequireDefault(__webpack_require__(84)); | |
| 16584 | + | |
| 16585 | +var _slicedToArray2 = _interopRequireDefault(__webpack_require__(105)); | |
| 16586 | + | |
| 16587 | +var _entries = _interopRequireDefault(__webpack_require__(93)); | |
| 16588 | + | |
| 16589 | +__webpack_require__(68); | |
| 16590 | + | |
| 16591 | +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(85)); | |
| 16592 | + | |
| 16593 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 16594 | + | |
| 16595 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 16596 | + | |
| 16597 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 16598 | + | |
| 16599 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 16600 | + | |
| 16601 | +var _disableEnable = _interopRequireDefault(__webpack_require__(420)); | |
| 16602 | + | |
| 16603 | +// TODO: Disable is the only command that extends DisableEnable which is async. | |
| 16604 | +var Disable = /*#__PURE__*/function (_DisableEnable) { | |
| 16605 | + (0, _inherits2.default)(Disable, _DisableEnable); | |
| 16606 | + | |
| 16607 | + var _super = (0, _createSuper2.default)(Disable); | |
| 16608 | + | |
| 16609 | + function Disable() { | |
| 16610 | + (0, _classCallCheck2.default)(this, Disable); | |
| 16611 | + return _super.apply(this, arguments); | |
| 16612 | + } | |
| 16613 | + | |
| 16614 | + (0, _createClass2.default)(Disable, [{ | |
| 16615 | + key: "apply", | |
| 16616 | + value: function () { | |
| 16617 | + var _apply = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(args) { | |
| 16618 | + var settings, _args$containers, containers, _args$options, options, all; | |
| 16619 | + | |
| 16620 | + return _regenerator.default.wrap(function _callee3$(_context3) { | |
| 16621 | + while (1) { | |
| 16622 | + switch (_context3.prev = _context3.next) { | |
| 16623 | + case 0: | |
| 16624 | + settings = args.settings, _args$containers = args.containers, containers = _args$containers === void 0 ? [args.container] : _args$containers, _args$options = args.options, options = _args$options === void 0 ? {} : _args$options; | |
| 16625 | + all = containers.map( /*#__PURE__*/function () { | |
| 16626 | + var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2( | |
| 16627 | + /* Container */ | |
| 16628 | + container) { | |
| 16629 | + var promises; | |
| 16630 | + return _regenerator.default.wrap(function _callee2$(_context2) { | |
| 16631 | + while (1) { | |
| 16632 | + switch (_context2.prev = _context2.next) { | |
| 16633 | + case 0: | |
| 16634 | + container = container.lookup(); | |
| 16635 | + promises = []; // TODO rename `options.restore` => `options.unlink`. | |
| 16636 | + | |
| 16637 | + if (!options.restore) { | |
| 16638 | + _context2.next = 6; | |
| 16639 | + break; | |
| 16640 | + } | |
| 16641 | + | |
| 16642 | + promises = (0, _entries.default)(container.globals.attributes).map( /*#__PURE__*/function () { | |
| 16643 | + var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(_ref2) { | |
| 16644 | + var _ref4, globalKey, globalValue; | |
| 16645 | + | |
| 16646 | + return _regenerator.default.wrap(function _callee$(_context) { | |
| 16647 | + while (1) { | |
| 16648 | + switch (_context.prev = _context.next) { | |
| 16649 | + case 0: | |
| 16650 | + _ref4 = (0, _slicedToArray2.default)(_ref2, 2), globalKey = _ref4[0], globalValue = _ref4[1]; | |
| 16651 | + | |
| 16652 | + if (globalValue) { | |
| 16653 | + _context.next = 3; | |
| 16654 | + break; | |
| 16655 | + } | |
| 16656 | + | |
| 16657 | + return _context.abrupt("return"); | |
| 16658 | + | |
| 16659 | + case 3: | |
| 16660 | + return _context.abrupt("return", $e.run('document/globals/unlink', { | |
| 16661 | + container: container, | |
| 16662 | + options: { | |
| 16663 | + external: true | |
| 16664 | + }, | |
| 16665 | + globalValue: globalValue, | |
| 16666 | + setting: globalKey | |
| 16667 | + })); | |
| 16668 | + | |
| 16669 | + case 4: | |
| 16670 | + case "end": | |
| 16671 | + return _context.stop(); | |
| 16672 | + } | |
| 16673 | + } | |
| 16674 | + }, _callee); | |
| 16675 | + })); | |
| 16676 | + | |
| 16677 | + return function (_x3) { | |
| 16678 | + return _ref3.apply(this, arguments); | |
| 16679 | + }; | |
| 16680 | + }()); | |
| 16681 | + _context2.next = 6; | |
| 16682 | + return _promise.default.all(promises); | |
| 16683 | + | |
| 16684 | + case 6: | |
| 16685 | + // Clear globals. | |
| 16686 | + (0, _keys.default)(settings).forEach(function (setting) { | |
| 16687 | + return container.globals.set(setting, ''); | |
| 16688 | + }); | |
| 16689 | + container.settings.set('__globals__', container.globals.toJSON()); | |
| 16690 | + container.renderUI(); | |
| 16691 | + | |
| 16692 | + case 9: | |
| 16693 | + case "end": | |
| 16694 | + return _context2.stop(); | |
| 16695 | + } | |
| 16696 | + } | |
| 16697 | + }, _callee2); | |
| 16698 | + })); | |
| 16699 | + | |
| 16700 | + return function (_x2) { | |
| 16701 | + return _ref.apply(this, arguments); | |
| 16702 | + }; | |
| 16703 | + }()); | |
| 16704 | + _context3.next = 4; | |
| 16705 | + return _promise.default.all(all); | |
| 16706 | + | |
| 16707 | + case 4: | |
| 16708 | + case "end": | |
| 16709 | + return _context3.stop(); | |
| 16710 | + } | |
| 16711 | + } | |
| 16712 | + }, _callee3); | |
| 16713 | + })); | |
| 16714 | + | |
| 16715 | + function apply(_x) { | |
| 16716 | + return _apply.apply(this, arguments); | |
| 1029 | 16717 | } |
| 1030 | 16718 | |
| 1031 | - // If not a 'Hook-Break' then show error. | |
| 1032 | - if (!(message instanceof $e.modules.HookBreak)) { | |
| 1033 | - // eslint-disable-next-line no-console | |
| 1034 | - console.error(message); | |
| 16719 | + return apply; | |
| 16720 | + }() | |
| 16721 | + }]); | |
| 16722 | + return Disable; | |
| 16723 | +}(_disableEnable.default); | |
| 16724 | + | |
| 16725 | +exports.Disable = Disable; | |
| 16726 | +var _default = Disable; | |
| 16727 | +exports.default = _default; | |
| 16728 | + | |
| 16729 | +/***/ }), | |
| 16730 | +/* 840 */ | |
| 16731 | +/***/ (function(module, exports, __webpack_require__) { | |
| 16732 | + | |
| 16733 | +"use strict"; | |
| 16734 | + | |
| 16735 | + | |
| 16736 | +var _interopRequireDefault = __webpack_require__(0); | |
| 16737 | + | |
| 16738 | +var _Object$defineProperty = __webpack_require__(1); | |
| 16739 | + | |
| 16740 | +_Object$defineProperty(exports, "__esModule", { | |
| 16741 | + value: true | |
| 16742 | +}); | |
| 16743 | + | |
| 16744 | +exports.default = exports.Enable = void 0; | |
| 16745 | + | |
| 16746 | +__webpack_require__(40); | |
| 16747 | + | |
| 16748 | +var _values = _interopRequireDefault(__webpack_require__(54)); | |
| 16749 | + | |
| 16750 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 16751 | + | |
| 16752 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 16753 | + | |
| 16754 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 16755 | + | |
| 16756 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 16757 | + | |
| 16758 | +var _disableEnable = _interopRequireDefault(__webpack_require__(420)); | |
| 16759 | + | |
| 16760 | +// Run when a global control value is chosen while the active value is custom. | |
| 16761 | +var Enable = /*#__PURE__*/function (_DisableEnable) { | |
| 16762 | + (0, _inherits2.default)(Enable, _DisableEnable); | |
| 16763 | + | |
| 16764 | + var _super = (0, _createSuper2.default)(Enable); | |
| 16765 | + | |
| 16766 | + function Enable() { | |
| 16767 | + (0, _classCallCheck2.default)(this, Enable); | |
| 16768 | + return _super.apply(this, arguments); | |
| 16769 | + } | |
| 16770 | + | |
| 16771 | + (0, _createClass2.default)(Enable, [{ | |
| 16772 | + key: "apply", | |
| 16773 | + value: function apply(args) { | |
| 16774 | + var settings = args.settings, | |
| 16775 | + _args$containers = args.containers, | |
| 16776 | + containers = _args$containers === void 0 ? [args.container] : _args$containers; | |
| 16777 | + containers.forEach(function (container) { | |
| 16778 | + container = container.lookup(); | |
| 16779 | + container.globals.set(settings); | |
| 16780 | + container.settings.set('__globals__', container.globals.toJSON()); | |
| 16781 | + container.renderUI(); // Clear custom local settings. | |
| 16782 | + | |
| 16783 | + (0, _values.default)(container.getGroupRelatedControls(settings)).forEach(function (control) { | |
| 16784 | + container.settings.set(control.name, control.default); | |
| 16785 | + }); | |
| 16786 | + }); | |
| 16787 | + } | |
| 16788 | + }]); | |
| 16789 | + return Enable; | |
| 16790 | +}(_disableEnable.default); | |
| 16791 | + | |
| 16792 | +exports.Enable = Enable; | |
| 16793 | +var _default = Enable; | |
| 16794 | +exports.default = _default; | |
| 16795 | + | |
| 16796 | +/***/ }), | |
| 16797 | +/* 841 */ | |
| 16798 | +/***/ (function(module, exports, __webpack_require__) { | |
| 16799 | + | |
| 16800 | +"use strict"; | |
| 16801 | + | |
| 16802 | + | |
| 16803 | +var _interopRequireDefault = __webpack_require__(0); | |
| 16804 | + | |
| 16805 | +var _Object$defineProperty = __webpack_require__(1); | |
| 16806 | + | |
| 16807 | +_Object$defineProperty(exports, "__esModule", { | |
| 16808 | + value: true | |
| 16809 | +}); | |
| 16810 | + | |
| 16811 | +exports.default = exports.Settings = void 0; | |
| 16812 | + | |
| 16813 | +var _keys = _interopRequireDefault(__webpack_require__(25)); | |
| 16814 | + | |
| 16815 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 16816 | + | |
| 16817 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 16818 | + | |
| 16819 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 16820 | + | |
| 16821 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 16822 | + | |
| 16823 | +var _commandHistoryDebounce = _interopRequireDefault(__webpack_require__(328)); | |
| 16824 | + | |
| 16825 | +var _settings = _interopRequireDefault(__webpack_require__(350)); | |
| 16826 | + | |
| 16827 | +var Settings = /*#__PURE__*/function (_CommandHistoryDeboun) { | |
| 16828 | + (0, _inherits2.default)(Settings, _CommandHistoryDeboun); | |
| 16829 | + | |
| 16830 | + var _super = (0, _createSuper2.default)(Settings); | |
| 16831 | + | |
| 16832 | + function Settings() { | |
| 16833 | + (0, _classCallCheck2.default)(this, Settings); | |
| 16834 | + return _super.apply(this, arguments); | |
| 16835 | + } | |
| 16836 | + | |
| 16837 | + (0, _createClass2.default)(Settings, [{ | |
| 16838 | + key: "validateArgs", | |
| 16839 | + value: function validateArgs(args) { | |
| 16840 | + this.requireContainer(args); | |
| 16841 | + this.requireArgumentConstructor('settings', Object, args); | |
| 16842 | + } | |
| 16843 | + }, { | |
| 16844 | + key: "getHistory", | |
| 16845 | + value: function getHistory(args) { | |
| 16846 | + var settings = args.settings, | |
| 16847 | + _args$containers = args.containers, | |
| 16848 | + containers = _args$containers === void 0 ? [args.container] : _args$containers, | |
| 16849 | + changes = {}; | |
| 16850 | + containers.forEach(function (container) { | |
| 16851 | + var id = container.id; | |
| 16852 | + | |
| 16853 | + if (!changes[id]) { | |
| 16854 | + changes[id] = {}; | |
| 16855 | + } | |
| 16856 | + | |
| 16857 | + changes[id] = { | |
| 16858 | + old: container.globals.toJSON(), | |
| 16859 | + new: settings | |
| 16860 | + }; | |
| 16861 | + }); | |
| 16862 | + | |
| 16863 | + var subTitle = _settings.default.getSubTitle(args); | |
| 16864 | + | |
| 16865 | + return { | |
| 16866 | + containers: containers, | |
| 16867 | + subTitle: subTitle, | |
| 16868 | + data: { | |
| 16869 | + changes: changes | |
| 16870 | + }, | |
| 16871 | + type: 'change', | |
| 16872 | + restore: this.constructor.restore | |
| 16873 | + }; | |
| 16874 | + } | |
| 16875 | + }, { | |
| 16876 | + key: "apply", | |
| 16877 | + value: function apply(args) { | |
| 16878 | + var settings = args.settings, | |
| 16879 | + _args$containers2 = args.containers, | |
| 16880 | + containers = _args$containers2 === void 0 ? [args.container] : _args$containers2, | |
| 16881 | + _args$options = args.options, | |
| 16882 | + options = _args$options === void 0 ? {} : _args$options, | |
| 16883 | + external = options.external, | |
| 16884 | + _options$render = options.render, | |
| 16885 | + render = _options$render === void 0 ? true : _options$render; | |
| 16886 | + containers.forEach(function (container) { | |
| 16887 | + container = container.lookup(); | |
| 16888 | + | |
| 16889 | + if (!(0, _keys.default)(settings).length) { | |
| 16890 | + container.globals.clear(); | |
| 16891 | + } else { | |
| 16892 | + container.globals.set(settings); | |
| 16893 | + } | |
| 16894 | + | |
| 16895 | + var globalSettings = container.globals.toJSON(); | |
| 16896 | + | |
| 16897 | + if (external) { | |
| 16898 | + container.settings.setExternalChange('__globals__', globalSettings); | |
| 16899 | + } else { | |
| 16900 | + container.settings.set('__globals__', globalSettings); | |
| 16901 | + } | |
| 16902 | + | |
| 16903 | + if (render) { | |
| 16904 | + container.render(); | |
| 16905 | + } | |
| 16906 | + }); | |
| 16907 | + } | |
| 16908 | + }, { | |
| 16909 | + key: "isDataChanged", | |
| 16910 | + value: function isDataChanged() { | |
| 16911 | + return true; | |
| 16912 | + } | |
| 16913 | + }], [{ | |
| 16914 | + key: "restore", | |
| 16915 | + value: function restore(historyItem, isRedo) { | |
| 16916 | + var data = historyItem.get('data'); | |
| 16917 | + historyItem.get('containers').forEach(function (container) { | |
| 16918 | + var changes = data.changes[container.id]; | |
| 16919 | + $e.run('document/globals/settings', { | |
| 16920 | + container: container, | |
| 16921 | + settings: isRedo ? changes.new : changes.old | |
| 16922 | + }); | |
| 16923 | + container.panel.refresh(); | |
| 16924 | + }); | |
| 16925 | + } | |
| 16926 | + }]); | |
| 16927 | + return Settings; | |
| 16928 | +}(_commandHistoryDebounce.default); | |
| 16929 | + | |
| 16930 | +exports.Settings = Settings; | |
| 16931 | +var _default = Settings; | |
| 16932 | +exports.default = _default; | |
| 16933 | + | |
| 16934 | +/***/ }), | |
| 16935 | +/* 842 */ | |
| 16936 | +/***/ (function(module, exports, __webpack_require__) { | |
| 16937 | + | |
| 16938 | +"use strict"; | |
| 16939 | + | |
| 16940 | + | |
| 16941 | +var _interopRequireDefault = __webpack_require__(0); | |
| 16942 | + | |
| 16943 | +var _Object$defineProperty = __webpack_require__(1); | |
| 16944 | + | |
| 16945 | +_Object$defineProperty(exports, "__esModule", { | |
| 16946 | + value: true | |
| 16947 | +}); | |
| 16948 | + | |
| 16949 | +exports.default = exports.Unlink = void 0; | |
| 16950 | + | |
| 16951 | +var _keys = _interopRequireDefault(__webpack_require__(25)); | |
| 16952 | + | |
| 16953 | +var _regenerator = _interopRequireDefault(__webpack_require__(84)); | |
| 16954 | + | |
| 16955 | +__webpack_require__(61); | |
| 16956 | + | |
| 16957 | +var _slicedToArray2 = _interopRequireDefault(__webpack_require__(105)); | |
| 16958 | + | |
| 16959 | +var _entries = _interopRequireDefault(__webpack_require__(93)); | |
| 16960 | + | |
| 16961 | +var _promise = _interopRequireDefault(__webpack_require__(134)); | |
| 16962 | + | |
| 16963 | +__webpack_require__(150); | |
| 16964 | + | |
| 16965 | +__webpack_require__(122); | |
| 16966 | + | |
| 16967 | +__webpack_require__(80); | |
| 16968 | + | |
| 16969 | +__webpack_require__(271); | |
| 16970 | + | |
| 16971 | +__webpack_require__(68); | |
| 16972 | + | |
| 16973 | +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(85)); | |
| 16974 | + | |
| 16975 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 16976 | + | |
| 16977 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 16978 | + | |
| 16979 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 16980 | + | |
| 16981 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 16982 | + | |
| 16983 | +var _commandBase = _interopRequireDefault(__webpack_require__(23)); | |
| 16984 | + | |
| 16985 | +// TODO: Add dev-tools CSS to see if widget have globals. | |
| 16986 | +var Unlink = /*#__PURE__*/function (_CommandBase) { | |
| 16987 | + (0, _inherits2.default)(Unlink, _CommandBase); | |
| 16988 | + | |
| 16989 | + var _super = (0, _createSuper2.default)(Unlink); | |
| 16990 | + | |
| 16991 | + function Unlink() { | |
| 16992 | + (0, _classCallCheck2.default)(this, Unlink); | |
| 16993 | + return _super.apply(this, arguments); | |
| 16994 | + } | |
| 16995 | + | |
| 16996 | + (0, _createClass2.default)(Unlink, [{ | |
| 16997 | + key: "validateArgs", | |
| 16998 | + value: function validateArgs() { | |
| 16999 | + var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 17000 | + this.requireContainer(args); | |
| 17001 | + this.requireArgumentType('setting', 'string', args); | |
| 17002 | + this.requireArgumentType('globalValue', 'string', args); // TODO: validate global value is command format. | |
| 17003 | + } | |
| 17004 | + }, { | |
| 17005 | + key: "apply", | |
| 17006 | + value: function () { | |
| 17007 | + var _apply = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(args) { | |
| 17008 | + var _args$containers, containers, setting, globalValue, _args$options, options, localSettings; | |
| 17009 | + | |
| 17010 | + return _regenerator.default.wrap(function _callee2$(_context2) { | |
| 17011 | + while (1) { | |
| 17012 | + switch (_context2.prev = _context2.next) { | |
| 17013 | + case 0: | |
| 17014 | + _args$containers = args.containers, containers = _args$containers === void 0 ? [args.container] : _args$containers, setting = args.setting, globalValue = args.globalValue, _args$options = args.options, options = _args$options === void 0 ? {} : _args$options, localSettings = {}; | |
| 17015 | + _context2.next = 3; | |
| 17016 | + return _promise.default.all(containers.map( /*#__PURE__*/function () { | |
| 17017 | + var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee( | |
| 17018 | + /* Container */ | |
| 17019 | + container) { | |
| 17020 | + var result, _container$controls$s, value, groupPrefix; | |
| 17021 | + | |
| 17022 | + return _regenerator.default.wrap(function _callee$(_context) { | |
| 17023 | + while (1) { | |
| 17024 | + switch (_context.prev = _context.next) { | |
| 17025 | + case 0: | |
| 17026 | + _context.next = 2; | |
| 17027 | + return $e.data.get(globalValue); | |
| 17028 | + | |
| 17029 | + case 2: | |
| 17030 | + result = _context.sent; | |
| 17031 | + | |
| 17032 | + if (result) { | |
| 17033 | + // Prepare global value to mapping. | |
| 17034 | + value = result.data.value, groupPrefix = (_container$controls$s = container.controls[setting]) === null || _container$controls$s === void 0 ? void 0 : _container$controls$s.groupPrefix; | |
| 17035 | + | |
| 17036 | + if (groupPrefix) { | |
| 17037 | + (0, _entries.default)(value).forEach(function (_ref2) { | |
| 17038 | + var _ref3 = (0, _slicedToArray2.default)(_ref2, 2), | |
| 17039 | + dataKey = _ref3[0], | |
| 17040 | + dataValue = _ref3[1]; | |
| 17041 | + | |
| 17042 | + dataKey = dataKey.replace(elementor.config.kit_config.typography_prefix, groupPrefix); | |
| 17043 | + localSettings[dataKey] = dataValue; | |
| 17044 | + }); | |
| 17045 | + } else { | |
| 17046 | + localSettings[setting] = value; | |
| 17047 | + } | |
| 17048 | + } | |
| 17049 | + | |
| 17050 | + return _context.abrupt("return", _promise.default.resolve()); | |
| 17051 | + | |
| 17052 | + case 5: | |
| 17053 | + case "end": | |
| 17054 | + return _context.stop(); | |
| 17055 | + } | |
| 17056 | + } | |
| 17057 | + }, _callee); | |
| 17058 | + })); | |
| 17059 | + | |
| 17060 | + return function (_x2) { | |
| 17061 | + return _ref.apply(this, arguments); | |
| 17062 | + }; | |
| 17063 | + }())); | |
| 17064 | + | |
| 17065 | + case 3: | |
| 17066 | + // Restore globals settings as custom local settings. | |
| 17067 | + if ((0, _keys.default)(localSettings).length) { | |
| 17068 | + $e.run('document/elements/settings', { | |
| 17069 | + containers: containers, | |
| 17070 | + options: options, | |
| 17071 | + settings: localSettings | |
| 17072 | + }); | |
| 17073 | + } | |
| 17074 | + | |
| 17075 | + case 4: | |
| 17076 | + case "end": | |
| 17077 | + return _context2.stop(); | |
| 17078 | + } | |
| 17079 | + } | |
| 17080 | + }, _callee2); | |
| 17081 | + })); | |
| 17082 | + | |
| 17083 | + function apply(_x) { | |
| 17084 | + return _apply.apply(this, arguments); | |
| 1035 | 17085 | } |
| 17086 | + | |
| 17087 | + return apply; | |
| 17088 | + }() | |
| 17089 | + }, { | |
| 17090 | + key: "isDataChanged", | |
| 17091 | + value: function isDataChanged() { | |
| 17092 | + return true; | |
| 1036 | 17093 | } |
| 17094 | + }]); | |
| 17095 | + return Unlink; | |
| 17096 | +}(_commandBase.default); | |
| 17097 | + | |
| 17098 | +exports.Unlink = Unlink; | |
| 17099 | +var _default = Unlink; | |
| 17100 | +exports.default = _default; | |
| 17101 | + | |
| 17102 | +/***/ }), | |
| 17103 | +/* 843 */ | |
| 17104 | +/***/ (function(module, exports, __webpack_require__) { | |
| 17105 | + | |
| 17106 | +"use strict"; | |
| 17107 | + | |
| 17108 | + | |
| 17109 | +var _interopRequireWildcard = __webpack_require__(34); | |
| 17110 | + | |
| 17111 | +var _interopRequireDefault = __webpack_require__(0); | |
| 17112 | + | |
| 17113 | +var _Object$defineProperty = __webpack_require__(1); | |
| 17114 | + | |
| 17115 | +_Object$defineProperty(exports, "__esModule", { | |
| 17116 | + value: true | |
| 17117 | +}); | |
| 17118 | + | |
| 17119 | +exports.default = void 0; | |
| 17120 | + | |
| 17121 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 17122 | + | |
| 17123 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 17124 | + | |
| 17125 | +var _get2 = _interopRequireDefault(__webpack_require__(26)); | |
| 17126 | + | |
| 17127 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(16)); | |
| 17128 | + | |
| 17129 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 17130 | + | |
| 17131 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 17132 | + | |
| 17133 | +var _componentBase = _interopRequireDefault(__webpack_require__(87)); | |
| 17134 | + | |
| 17135 | +var commands = _interopRequireWildcard(__webpack_require__(363)); | |
| 17136 | + | |
| 17137 | +var commandsInternal = _interopRequireWildcard(__webpack_require__(844)); | |
| 17138 | + | |
| 17139 | +var Component = /*#__PURE__*/function (_ComponentBase) { | |
| 17140 | + (0, _inherits2.default)(Component, _ComponentBase); | |
| 17141 | + | |
| 17142 | + var _super = (0, _createSuper2.default)(Component); | |
| 17143 | + | |
| 17144 | + function Component() { | |
| 17145 | + (0, _classCallCheck2.default)(this, Component); | |
| 17146 | + return _super.apply(this, arguments); | |
| 17147 | + } | |
| 17148 | + | |
| 17149 | + (0, _createClass2.default)(Component, [{ | |
| 17150 | + key: "__construct", | |
| 17151 | + value: function __construct(args) { | |
| 17152 | + (0, _get2.default)((0, _getPrototypeOf2.default)(Component.prototype), "__construct", this).call(this, args); | |
| 17153 | + /** | |
| 17154 | + * Transactions holder. | |
| 17155 | + * | |
| 17156 | + * @type {Array} | |
| 17157 | + */ | |
| 17158 | + | |
| 17159 | + this.transactions = []; | |
| 17160 | + } | |
| 1037 | 17161 | }, { |
| 1038 | - key: "warn", | |
| 1039 | - value: function warn() { | |
| 1040 | - var _console; | |
| 1041 | - var style = "font-size: 12px; background-image: url(\"".concat(elementorWebCliConfig.urls.assets, "images/logo-icon.png\"); background-repeat: no-repeat; background-size: contain;"); | |
| 1042 | - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { | |
| 1043 | - args[_key] = arguments[_key]; | |
| 17162 | + key: "getNamespace", | |
| 17163 | + value: function getNamespace() { | |
| 17164 | + return 'document/history'; | |
| 17165 | + } | |
| 17166 | + }, { | |
| 17167 | + key: "defaultCommands", | |
| 17168 | + value: function defaultCommands() { | |
| 17169 | + return this.importCommands(commands); | |
| 17170 | + } | |
| 17171 | + }, { | |
| 17172 | + key: "defaultCommandsInternal", | |
| 17173 | + value: function defaultCommandsInternal() { | |
| 17174 | + return this.importCommands(commandsInternal); | |
| 17175 | + } | |
| 17176 | + }, { | |
| 17177 | + key: "normalizeLogTitle", | |
| 17178 | + value: function normalizeLogTitle(args) { | |
| 17179 | + var _args$containers = args.containers, | |
| 17180 | + containers = _args$containers === void 0 ? [args.container] : _args$containers; | |
| 17181 | + | |
| 17182 | + if (!args.title && containers[0]) { | |
| 17183 | + if (1 === containers.length) { | |
| 17184 | + args.title = containers[0].label; | |
| 17185 | + } else { | |
| 17186 | + args.title = elementor.translate('elements'); | |
| 17187 | + } | |
| 1044 | 17188 | } |
| 1045 | - args.unshift('%c %c', style, ''); | |
| 1046 | - (_console = console).warn.apply(_console, args); // eslint-disable-line no-console | |
| 17189 | + | |
| 17190 | + return args; | |
| 1047 | 17191 | } |
| 17192 | + }, { | |
| 17193 | + key: "mergeTransactions", | |
| 17194 | + value: function mergeTransactions(transactions) { | |
| 17195 | + var result = {}; | |
| 17196 | + transactions.forEach(function (itemArgs) { | |
| 17197 | + // If no containers at the current transaction. | |
| 17198 | + if (!itemArgs.container && !itemArgs.containers) { | |
| 17199 | + return; | |
| 17200 | + } | |
| 17201 | + | |
| 17202 | + var _itemArgs$containers = itemArgs.containers, | |
| 17203 | + containers = _itemArgs$containers === void 0 ? [itemArgs.container] : _itemArgs$containers; | |
| 17204 | + | |
| 17205 | + if (containers) { | |
| 17206 | + containers.forEach(function (container) { | |
| 17207 | + if (!itemArgs.data) { | |
| 17208 | + return; | |
| 17209 | + } // Replace new changes by current itemArgs. | |
| 17210 | + | |
| 17211 | + | |
| 17212 | + if (result[container.id]) { | |
| 17213 | + result[container.id].data.changes[container.id].new = itemArgs.data.changes[container.id].new; | |
| 17214 | + return; | |
| 17215 | + } | |
| 17216 | + | |
| 17217 | + result[container.id] = itemArgs; | |
| 17218 | + }); | |
| 17219 | + } | |
| 17220 | + }); | |
| 17221 | + return result; | |
| 17222 | + } | |
| 17223 | + }, { | |
| 17224 | + key: "isTransactionStarted", | |
| 17225 | + value: function isTransactionStarted() { | |
| 17226 | + return Boolean(this.transactions.length); | |
| 17227 | + } | |
| 1048 | 17228 | }]); |
| 1049 | -}(); | |
| 17229 | + return Component; | |
| 17230 | +}(_componentBase.default); | |
| 1050 | 17231 | |
| 17232 | +exports.default = Component; | |
| 17233 | + | |
| 1051 | 17234 | /***/ }), |
| 17235 | +/* 844 */ | |
| 17236 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1052 | 17237 | |
| 1053 | -/***/ "../modules/web-cli/assets/js/utils/deprecation.js": | |
| 1054 | -/*!*********************************************************!*\ | |
| 1055 | - !*** ../modules/web-cli/assets/js/utils/deprecation.js ***! | |
| 1056 | - \*********************************************************/ | |
| 1057 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 17238 | +"use strict"; | |
| 1058 | 17239 | |
| 17240 | + | |
| 17241 | +var _Object$defineProperty = __webpack_require__(1); | |
| 17242 | + | |
| 17243 | +_Object$defineProperty(exports, "__esModule", { | |
| 17244 | + value: true | |
| 17245 | +}); | |
| 17246 | + | |
| 17247 | +_Object$defineProperty(exports, "AddTransaction", { | |
| 17248 | + enumerable: true, | |
| 17249 | + get: function get() { | |
| 17250 | + return _addTransaction.AddTransaction; | |
| 17251 | + } | |
| 17252 | +}); | |
| 17253 | + | |
| 17254 | +_Object$defineProperty(exports, "ClearTransaction", { | |
| 17255 | + enumerable: true, | |
| 17256 | + get: function get() { | |
| 17257 | + return _clearTransaction.ClearTransaction; | |
| 17258 | + } | |
| 17259 | +}); | |
| 17260 | + | |
| 17261 | +_Object$defineProperty(exports, "DeleteLog", { | |
| 17262 | + enumerable: true, | |
| 17263 | + get: function get() { | |
| 17264 | + return _deleteLog.DeleteLog; | |
| 17265 | + } | |
| 17266 | +}); | |
| 17267 | + | |
| 17268 | +_Object$defineProperty(exports, "EndLog", { | |
| 17269 | + enumerable: true, | |
| 17270 | + get: function get() { | |
| 17271 | + return _endLog.EndLog; | |
| 17272 | + } | |
| 17273 | +}); | |
| 17274 | + | |
| 17275 | +_Object$defineProperty(exports, "EndTransaction", { | |
| 17276 | + enumerable: true, | |
| 17277 | + get: function get() { | |
| 17278 | + return _endTransaction.EndTransaction; | |
| 17279 | + } | |
| 17280 | +}); | |
| 17281 | + | |
| 17282 | +_Object$defineProperty(exports, "LogSubItem", { | |
| 17283 | + enumerable: true, | |
| 17284 | + get: function get() { | |
| 17285 | + return _logSubItem.LogSubItem; | |
| 17286 | + } | |
| 17287 | +}); | |
| 17288 | + | |
| 17289 | +_Object$defineProperty(exports, "StartLog", { | |
| 17290 | + enumerable: true, | |
| 17291 | + get: function get() { | |
| 17292 | + return _startLog.StartLog; | |
| 17293 | + } | |
| 17294 | +}); | |
| 17295 | + | |
| 17296 | +var _addTransaction = __webpack_require__(845); | |
| 17297 | + | |
| 17298 | +var _clearTransaction = __webpack_require__(846); | |
| 17299 | + | |
| 17300 | +var _deleteLog = __webpack_require__(847); | |
| 17301 | + | |
| 17302 | +var _endLog = __webpack_require__(848); | |
| 17303 | + | |
| 17304 | +var _endTransaction = __webpack_require__(849); | |
| 17305 | + | |
| 17306 | +var _logSubItem = __webpack_require__(850); | |
| 17307 | + | |
| 17308 | +var _startLog = __webpack_require__(851); | |
| 17309 | + | |
| 17310 | +/***/ }), | |
| 17311 | +/* 845 */ | |
| 17312 | +/***/ (function(module, exports, __webpack_require__) { | |
| 17313 | + | |
| 1059 | 17314 | "use strict"; |
| 1060 | 17315 | |
| 1061 | 17316 | |
| 1062 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1063 | -Object.defineProperty(exports, "__esModule", ({ | |
| 17317 | +var _interopRequireDefault = __webpack_require__(0); | |
| 17318 | + | |
| 17319 | +var _Object$defineProperty = __webpack_require__(1); | |
| 17320 | + | |
| 17321 | +_Object$defineProperty(exports, "__esModule", { | |
| 1064 | 17322 | value: true |
| 1065 | -})); | |
| 1066 | -exports["default"] = void 0; | |
| 1067 | -var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); | |
| 1068 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 1069 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 1070 | -var _console = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/console */ "../modules/web-cli/assets/js/utils/console.js")); | |
| 1071 | -// Copied from `modules/dev-tools/assets/js/deprecation.js` | |
| 1072 | -/** | |
| 1073 | - * @typedef {Object} Version | |
| 1074 | - * @property {number} major1 The first number | |
| 1075 | - * @property {number} major2 The second number | |
| 1076 | - * @property {number} minor The third number | |
| 1077 | - * @property {string} build The fourth number | |
| 1078 | - */ | |
| 17323 | +}); | |
| 1079 | 17324 | |
| 1080 | -var softDeprecated = function softDeprecated(name, version, replacement) { | |
| 1081 | - if (elementorWebCliConfig.isDebug) { | |
| 1082 | - deprecatedMessage('soft', name, version, replacement); | |
| 17325 | +exports.default = exports.AddTransaction = void 0; | |
| 17326 | + | |
| 17327 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 17328 | + | |
| 17329 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 17330 | + | |
| 17331 | +var _get2 = _interopRequireDefault(__webpack_require__(26)); | |
| 17332 | + | |
| 17333 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(16)); | |
| 17334 | + | |
| 17335 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 17336 | + | |
| 17337 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 17338 | + | |
| 17339 | +var _base = _interopRequireDefault(__webpack_require__(351)); | |
| 17340 | + | |
| 17341 | +var AddTransaction = /*#__PURE__*/function (_Base) { | |
| 17342 | + (0, _inherits2.default)(AddTransaction, _Base); | |
| 17343 | + | |
| 17344 | + var _super = (0, _createSuper2.default)(AddTransaction); | |
| 17345 | + | |
| 17346 | + function AddTransaction() { | |
| 17347 | + (0, _classCallCheck2.default)(this, AddTransaction); | |
| 17348 | + return _super.apply(this, arguments); | |
| 1083 | 17349 | } |
| 1084 | -}; | |
| 1085 | -var hardDeprecated = function hardDeprecated(name, version, replacement) { | |
| 1086 | - deprecatedMessage('hard', name, version, replacement); | |
| 1087 | -}; | |
| 1088 | -var deprecatedMessage = function deprecatedMessage(type, name, version, replacement) { | |
| 1089 | - var message = "`".concat(name, "` is ").concat(type, " deprecated since ").concat(version); | |
| 1090 | - if (replacement) { | |
| 1091 | - message += " - Use `".concat(replacement, "` instead"); | |
| 17350 | + | |
| 17351 | + (0, _createClass2.default)(AddTransaction, [{ | |
| 17352 | + key: "initialize", | |
| 17353 | + value: function initialize(args) { | |
| 17354 | + (0, _get2.default)((0, _getPrototypeOf2.default)(AddTransaction.prototype), "initialize", this).call(this, args); | |
| 17355 | + /** | |
| 17356 | + * Debounce always send 'add-transaction' with title & subTitle, when the transaction | |
| 17357 | + * already started, there is no need to save those args they are useless. | |
| 17358 | + */ | |
| 17359 | + | |
| 17360 | + if (this.component.isTransactionStarted()) { | |
| 17361 | + delete args.title; | |
| 17362 | + delete args.subTitle; | |
| 17363 | + } | |
| 17364 | + } | |
| 17365 | + }, { | |
| 17366 | + key: "validateArgs", | |
| 17367 | + value: function validateArgs(args) { | |
| 17368 | + this.requireContainer(); | |
| 17369 | + this.requireArgumentType('type', 'string', args); | |
| 17370 | + } | |
| 17371 | + }, { | |
| 17372 | + key: "apply", | |
| 17373 | + value: function apply(args) { | |
| 17374 | + var currentId = this.history.getCurrentId(); | |
| 17375 | + | |
| 17376 | + if (currentId) { | |
| 17377 | + // If log already started chain his historyId. | |
| 17378 | + args.id = currentId; | |
| 17379 | + } | |
| 17380 | + | |
| 17381 | + args = this.component.normalizeLogTitle(args); | |
| 17382 | + this.component.transactions.push(args); | |
| 17383 | + } | |
| 17384 | + }]); | |
| 17385 | + return AddTransaction; | |
| 17386 | +}(_base.default); | |
| 17387 | + | |
| 17388 | +exports.AddTransaction = AddTransaction; | |
| 17389 | +var _default = AddTransaction; | |
| 17390 | +exports.default = _default; | |
| 17391 | + | |
| 17392 | +/***/ }), | |
| 17393 | +/* 846 */ | |
| 17394 | +/***/ (function(module, exports, __webpack_require__) { | |
| 17395 | + | |
| 17396 | +"use strict"; | |
| 17397 | + | |
| 17398 | + | |
| 17399 | +var _interopRequireDefault = __webpack_require__(0); | |
| 17400 | + | |
| 17401 | +var _Object$defineProperty = __webpack_require__(1); | |
| 17402 | + | |
| 17403 | +_Object$defineProperty(exports, "__esModule", { | |
| 17404 | + value: true | |
| 17405 | +}); | |
| 17406 | + | |
| 17407 | +exports.default = exports.ClearTransaction = void 0; | |
| 17408 | + | |
| 17409 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 17410 | + | |
| 17411 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 17412 | + | |
| 17413 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 17414 | + | |
| 17415 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 17416 | + | |
| 17417 | +var _base = _interopRequireDefault(__webpack_require__(351)); | |
| 17418 | + | |
| 17419 | +var ClearTransaction = /*#__PURE__*/function (_Base) { | |
| 17420 | + (0, _inherits2.default)(ClearTransaction, _Base); | |
| 17421 | + | |
| 17422 | + var _super = (0, _createSuper2.default)(ClearTransaction); | |
| 17423 | + | |
| 17424 | + function ClearTransaction() { | |
| 17425 | + (0, _classCallCheck2.default)(this, ClearTransaction); | |
| 17426 | + return _super.apply(this, arguments); | |
| 1092 | 17427 | } |
| 1093 | - _console.default.warn(message); | |
| 1094 | -}; | |
| 1095 | -var Deprecation = exports["default"] = /*#__PURE__*/function () { | |
| 1096 | - function Deprecation() { | |
| 1097 | - (0, _classCallCheck2.default)(this, Deprecation); | |
| 17428 | + | |
| 17429 | + (0, _createClass2.default)(ClearTransaction, [{ | |
| 17430 | + key: "apply", | |
| 17431 | + value: function apply() { | |
| 17432 | + this.component.transactions = []; | |
| 17433 | + } | |
| 17434 | + }]); | |
| 17435 | + return ClearTransaction; | |
| 17436 | +}(_base.default); | |
| 17437 | + | |
| 17438 | +exports.ClearTransaction = ClearTransaction; | |
| 17439 | +var _default = ClearTransaction; | |
| 17440 | +exports.default = _default; | |
| 17441 | + | |
| 17442 | +/***/ }), | |
| 17443 | +/* 847 */ | |
| 17444 | +/***/ (function(module, exports, __webpack_require__) { | |
| 17445 | + | |
| 17446 | +"use strict"; | |
| 17447 | + | |
| 17448 | + | |
| 17449 | +var _interopRequireDefault = __webpack_require__(0); | |
| 17450 | + | |
| 17451 | +var _Object$defineProperty = __webpack_require__(1); | |
| 17452 | + | |
| 17453 | +_Object$defineProperty(exports, "__esModule", { | |
| 17454 | + value: true | |
| 17455 | +}); | |
| 17456 | + | |
| 17457 | +exports.default = exports.DeleteLog = void 0; | |
| 17458 | + | |
| 17459 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 17460 | + | |
| 17461 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 17462 | + | |
| 17463 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 17464 | + | |
| 17465 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 17466 | + | |
| 17467 | +var _base = _interopRequireDefault(__webpack_require__(351)); | |
| 17468 | + | |
| 17469 | +var DeleteLog = /*#__PURE__*/function (_Base) { | |
| 17470 | + (0, _inherits2.default)(DeleteLog, _Base); | |
| 17471 | + | |
| 17472 | + var _super = (0, _createSuper2.default)(DeleteLog); | |
| 17473 | + | |
| 17474 | + function DeleteLog() { | |
| 17475 | + (0, _classCallCheck2.default)(this, DeleteLog); | |
| 17476 | + return _super.apply(this, arguments); | |
| 1098 | 17477 | } |
| 1099 | - return (0, _createClass2.default)(Deprecation, null, [{ | |
| 1100 | - key: "deprecated", | |
| 1101 | - value: function deprecated(name, version, replacement) { | |
| 1102 | - if (this.isHardDeprecated(version)) { | |
| 1103 | - hardDeprecated(name, version, replacement); | |
| 17478 | + | |
| 17479 | + (0, _createClass2.default)(DeleteLog, [{ | |
| 17480 | + key: "apply", | |
| 17481 | + value: function apply(args) { | |
| 17482 | + if (args.id) { | |
| 17483 | + this.history.deleteItem(args.id); | |
| 17484 | + } | |
| 17485 | + } | |
| 17486 | + }]); | |
| 17487 | + return DeleteLog; | |
| 17488 | +}(_base.default); | |
| 17489 | + | |
| 17490 | +exports.DeleteLog = DeleteLog; | |
| 17491 | +var _default = DeleteLog; | |
| 17492 | +exports.default = _default; | |
| 17493 | + | |
| 17494 | +/***/ }), | |
| 17495 | +/* 848 */ | |
| 17496 | +/***/ (function(module, exports, __webpack_require__) { | |
| 17497 | + | |
| 17498 | +"use strict"; | |
| 17499 | + | |
| 17500 | + | |
| 17501 | +var _interopRequireDefault = __webpack_require__(0); | |
| 17502 | + | |
| 17503 | +var _Object$defineProperty = __webpack_require__(1); | |
| 17504 | + | |
| 17505 | +_Object$defineProperty(exports, "__esModule", { | |
| 17506 | + value: true | |
| 17507 | +}); | |
| 17508 | + | |
| 17509 | +exports.default = exports.EndLog = void 0; | |
| 17510 | + | |
| 17511 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 17512 | + | |
| 17513 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 17514 | + | |
| 17515 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 17516 | + | |
| 17517 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 17518 | + | |
| 17519 | +var _base = _interopRequireDefault(__webpack_require__(351)); | |
| 17520 | + | |
| 17521 | +var EndLog = /*#__PURE__*/function (_Base) { | |
| 17522 | + (0, _inherits2.default)(EndLog, _Base); | |
| 17523 | + | |
| 17524 | + var _super = (0, _createSuper2.default)(EndLog); | |
| 17525 | + | |
| 17526 | + function EndLog() { | |
| 17527 | + (0, _classCallCheck2.default)(this, EndLog); | |
| 17528 | + return _super.apply(this, arguments); | |
| 17529 | + } | |
| 17530 | + | |
| 17531 | + (0, _createClass2.default)(EndLog, [{ | |
| 17532 | + key: "apply", | |
| 17533 | + value: function apply(args) { | |
| 17534 | + if (args.id) { | |
| 17535 | + this.history.endItem(args.id); | |
| 17536 | + } | |
| 17537 | + } | |
| 17538 | + }]); | |
| 17539 | + return EndLog; | |
| 17540 | +}(_base.default); | |
| 17541 | + | |
| 17542 | +exports.EndLog = EndLog; | |
| 17543 | +var _default = EndLog; | |
| 17544 | +exports.default = _default; | |
| 17545 | + | |
| 17546 | +/***/ }), | |
| 17547 | +/* 849 */ | |
| 17548 | +/***/ (function(module, exports, __webpack_require__) { | |
| 17549 | + | |
| 17550 | +"use strict"; | |
| 17551 | + | |
| 17552 | + | |
| 17553 | +var _interopRequireDefault = __webpack_require__(0); | |
| 17554 | + | |
| 17555 | +var _Object$defineProperty = __webpack_require__(1); | |
| 17556 | + | |
| 17557 | +_Object$defineProperty(exports, "__esModule", { | |
| 17558 | + value: true | |
| 17559 | +}); | |
| 17560 | + | |
| 17561 | +exports.default = exports.EndTransaction = void 0; | |
| 17562 | + | |
| 17563 | +var _values = _interopRequireDefault(__webpack_require__(54)); | |
| 17564 | + | |
| 17565 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 17566 | + | |
| 17567 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 17568 | + | |
| 17569 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 17570 | + | |
| 17571 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 17572 | + | |
| 17573 | +var _base = _interopRequireDefault(__webpack_require__(351)); | |
| 17574 | + | |
| 17575 | +var EndTransaction = /*#__PURE__*/function (_Base) { | |
| 17576 | + (0, _inherits2.default)(EndTransaction, _Base); | |
| 17577 | + | |
| 17578 | + var _super = (0, _createSuper2.default)(EndTransaction); | |
| 17579 | + | |
| 17580 | + function EndTransaction() { | |
| 17581 | + (0, _classCallCheck2.default)(this, EndTransaction); | |
| 17582 | + return _super.apply(this, arguments); | |
| 17583 | + } | |
| 17584 | + | |
| 17585 | + (0, _createClass2.default)(EndTransaction, [{ | |
| 17586 | + key: "apply", | |
| 17587 | + value: function apply() { | |
| 17588 | + if (!this.component.isTransactionStarted()) { | |
| 17589 | + return; | |
| 17590 | + } | |
| 17591 | + | |
| 17592 | + var firstItem = this.component.transactions[0], | |
| 17593 | + type = firstItem.type, | |
| 17594 | + transactions = this.component.mergeTransactions(this.component.transactions); | |
| 17595 | + var _firstItem$title = firstItem.title, | |
| 17596 | + title = _firstItem$title === void 0 ? '' : _firstItem$title, | |
| 17597 | + _firstItem$subTitle = firstItem.subTitle, | |
| 17598 | + subTitle = _firstItem$subTitle === void 0 ? '' : _firstItem$subTitle; // 'elements' title for multiple containers. | |
| 17599 | + | |
| 17600 | + if (transactions.length > 1) { | |
| 17601 | + title = elementor.translate('elements'); | |
| 17602 | + subTitle = ''; | |
| 17603 | + } | |
| 17604 | + | |
| 17605 | + var history = { | |
| 17606 | + title: title, | |
| 17607 | + subTitle: subTitle, | |
| 17608 | + type: type | |
| 17609 | + }; // If firstItem have id already it means that log already started for that transaction. | |
| 17610 | + | |
| 17611 | + if (firstItem.id) { | |
| 17612 | + history.id = firstItem.id; | |
| 17613 | + } | |
| 17614 | + | |
| 17615 | + var historyId = $e.internal('document/history/start-log', history); | |
| 17616 | + (0, _values.default)(transactions).forEach(function (item) { | |
| 17617 | + var itemArgs = item; // If log already started chain his historyId. | |
| 17618 | + | |
| 17619 | + if (firstItem.id) { | |
| 17620 | + itemArgs.id = firstItem.id; | |
| 17621 | + } | |
| 17622 | + | |
| 17623 | + $e.internal('document/history/log-sub-item', itemArgs); | |
| 17624 | + }); | |
| 17625 | + $e.internal('document/history/end-log', { | |
| 17626 | + id: historyId | |
| 17627 | + }); // Clear transactions before leave. | |
| 17628 | + | |
| 17629 | + $e.internal('document/history/clear-transaction'); | |
| 17630 | + } | |
| 17631 | + }]); | |
| 17632 | + return EndTransaction; | |
| 17633 | +}(_base.default); | |
| 17634 | + | |
| 17635 | +exports.EndTransaction = EndTransaction; | |
| 17636 | +var _default = EndTransaction; | |
| 17637 | +exports.default = _default; | |
| 17638 | + | |
| 17639 | +/***/ }), | |
| 17640 | +/* 850 */ | |
| 17641 | +/***/ (function(module, exports, __webpack_require__) { | |
| 17642 | + | |
| 17643 | +"use strict"; | |
| 17644 | + | |
| 17645 | + | |
| 17646 | +var _interopRequireDefault = __webpack_require__(0); | |
| 17647 | + | |
| 17648 | +var _Object$defineProperty = __webpack_require__(1); | |
| 17649 | + | |
| 17650 | +_Object$defineProperty(exports, "__esModule", { | |
| 17651 | + value: true | |
| 17652 | +}); | |
| 17653 | + | |
| 17654 | +exports.default = exports.LogSubItem = void 0; | |
| 17655 | + | |
| 17656 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 17657 | + | |
| 17658 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 17659 | + | |
| 17660 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 17661 | + | |
| 17662 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 17663 | + | |
| 17664 | +var _base = _interopRequireDefault(__webpack_require__(351)); | |
| 17665 | + | |
| 17666 | +var LogSubItem = /*#__PURE__*/function (_Base) { | |
| 17667 | + (0, _inherits2.default)(LogSubItem, _Base); | |
| 17668 | + | |
| 17669 | + var _super = (0, _createSuper2.default)(LogSubItem); | |
| 17670 | + | |
| 17671 | + function LogSubItem() { | |
| 17672 | + (0, _classCallCheck2.default)(this, LogSubItem); | |
| 17673 | + return _super.apply(this, arguments); | |
| 17674 | + } | |
| 17675 | + | |
| 17676 | + (0, _createClass2.default)(LogSubItem, [{ | |
| 17677 | + key: "apply", | |
| 17678 | + value: function apply(args) { | |
| 17679 | + if (!this.history.getActive()) { | |
| 17680 | + return; | |
| 17681 | + } | |
| 17682 | + | |
| 17683 | + var id = args.id || this.history.getCurrentId(); | |
| 17684 | + args = this.component.normalizeLogTitle(args); | |
| 17685 | + var items = this.history.getItems(), | |
| 17686 | + item = items.findWhere({ | |
| 17687 | + id: id | |
| 17688 | + }); | |
| 17689 | + | |
| 17690 | + if (!item) { | |
| 17691 | + throw new Error('History item not found.'); | |
| 17692 | + } | |
| 17693 | + /** | |
| 17694 | + * Sometimes `args.id` passed to `LogSubItem`, to add sub item for specific id. | |
| 17695 | + * this `id` should not be passed as sub-item. | |
| 17696 | + */ | |
| 17697 | + | |
| 17698 | + | |
| 17699 | + if (args.id) { | |
| 17700 | + delete args.id; | |
| 17701 | + } | |
| 17702 | + | |
| 17703 | + item.get('items').unshift(args); | |
| 17704 | + } | |
| 17705 | + }]); | |
| 17706 | + return LogSubItem; | |
| 17707 | +}(_base.default); | |
| 17708 | + | |
| 17709 | +exports.LogSubItem = LogSubItem; | |
| 17710 | +var _default = LogSubItem; | |
| 17711 | +exports.default = _default; | |
| 17712 | + | |
| 17713 | +/***/ }), | |
| 17714 | +/* 851 */ | |
| 17715 | +/***/ (function(module, exports, __webpack_require__) { | |
| 17716 | + | |
| 17717 | +"use strict"; | |
| 17718 | + | |
| 17719 | + | |
| 17720 | +var _interopRequireDefault = __webpack_require__(0); | |
| 17721 | + | |
| 17722 | +var _Object$defineProperty = __webpack_require__(1); | |
| 17723 | + | |
| 17724 | +_Object$defineProperty(exports, "__esModule", { | |
| 17725 | + value: true | |
| 17726 | +}); | |
| 17727 | + | |
| 17728 | +exports.default = exports.StartLog = void 0; | |
| 17729 | + | |
| 17730 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 17731 | + | |
| 17732 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 17733 | + | |
| 17734 | +var _get2 = _interopRequireDefault(__webpack_require__(26)); | |
| 17735 | + | |
| 17736 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(16)); | |
| 17737 | + | |
| 17738 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 17739 | + | |
| 17740 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 17741 | + | |
| 17742 | +var _base = _interopRequireDefault(__webpack_require__(351)); | |
| 17743 | + | |
| 17744 | +var StartLog = /*#__PURE__*/function (_Base) { | |
| 17745 | + (0, _inherits2.default)(StartLog, _Base); | |
| 17746 | + | |
| 17747 | + var _super = (0, _createSuper2.default)(StartLog); | |
| 17748 | + | |
| 17749 | + function StartLog() { | |
| 17750 | + (0, _classCallCheck2.default)(this, StartLog); | |
| 17751 | + return _super.apply(this, arguments); | |
| 17752 | + } | |
| 17753 | + | |
| 17754 | + (0, _createClass2.default)(StartLog, [{ | |
| 17755 | + key: "initialize", | |
| 17756 | + value: function initialize(args) { | |
| 17757 | + (0, _get2.default)((0, _getPrototypeOf2.default)(StartLog.prototype), "initialize", this).call(this, args); | |
| 17758 | + | |
| 17759 | + if (this.history.isItemStarted() || args.id) { | |
| 17760 | + this.isSubItem = true; | |
| 17761 | + return; | |
| 17762 | + } | |
| 17763 | + | |
| 17764 | + this.args = this.component.normalizeLogTitle(args); | |
| 17765 | + } | |
| 17766 | + }, { | |
| 17767 | + key: "validateArgs", | |
| 17768 | + value: function validateArgs(args) { | |
| 17769 | + if (!this.isSubItem) { | |
| 17770 | + this.requireArgumentType('type', 'string', args); | |
| 17771 | + this.requireArgumentType('title', 'string', args); | |
| 17772 | + } | |
| 17773 | + } | |
| 17774 | + }, { | |
| 17775 | + key: "apply", | |
| 17776 | + value: function apply(args) { | |
| 17777 | + if (this.isSubItem) { | |
| 17778 | + $e.internal('document/history/log-sub-item', args); | |
| 17779 | + return null; | |
| 17780 | + } | |
| 17781 | + | |
| 17782 | + return this.history.startItem(args); | |
| 17783 | + } | |
| 17784 | + }]); | |
| 17785 | + return StartLog; | |
| 17786 | +}(_base.default); | |
| 17787 | + | |
| 17788 | +exports.StartLog = StartLog; | |
| 17789 | +var _default = StartLog; | |
| 17790 | +exports.default = _default; | |
| 17791 | + | |
| 17792 | +/***/ }), | |
| 17793 | +/* 852 */ | |
| 17794 | +/***/ (function(module, exports, __webpack_require__) { | |
| 17795 | + | |
| 17796 | +"use strict"; | |
| 17797 | + | |
| 17798 | + | |
| 17799 | +var _interopRequireWildcard = __webpack_require__(34); | |
| 17800 | + | |
| 17801 | +var _interopRequireDefault = __webpack_require__(0); | |
| 17802 | + | |
| 17803 | +var _Object$defineProperty = __webpack_require__(1); | |
| 17804 | + | |
| 17805 | +_Object$defineProperty(exports, "__esModule", { | |
| 17806 | + value: true | |
| 17807 | +}); | |
| 17808 | + | |
| 17809 | +exports.default = void 0; | |
| 17810 | + | |
| 17811 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 17812 | + | |
| 17813 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 17814 | + | |
| 17815 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 17816 | + | |
| 17817 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 17818 | + | |
| 17819 | +var _componentBase = _interopRequireDefault(__webpack_require__(87)); | |
| 17820 | + | |
| 17821 | +var commands = _interopRequireWildcard(__webpack_require__(853)); | |
| 17822 | + | |
| 17823 | +var Component = /*#__PURE__*/function (_ComponentBase) { | |
| 17824 | + (0, _inherits2.default)(Component, _ComponentBase); | |
| 17825 | + | |
| 17826 | + var _super = (0, _createSuper2.default)(Component); | |
| 17827 | + | |
| 17828 | + function Component() { | |
| 17829 | + (0, _classCallCheck2.default)(this, Component); | |
| 17830 | + return _super.apply(this, arguments); | |
| 17831 | + } | |
| 17832 | + | |
| 17833 | + (0, _createClass2.default)(Component, [{ | |
| 17834 | + key: "getNamespace", | |
| 17835 | + value: function getNamespace() { | |
| 17836 | + return 'document/repeater'; | |
| 17837 | + } | |
| 17838 | + }, { | |
| 17839 | + key: "defaultCommands", | |
| 17840 | + value: function defaultCommands() { | |
| 17841 | + return this.importCommands(commands); | |
| 17842 | + } | |
| 17843 | + }]); | |
| 17844 | + return Component; | |
| 17845 | +}(_componentBase.default); | |
| 17846 | + | |
| 17847 | +exports.default = Component; | |
| 17848 | + | |
| 17849 | +/***/ }), | |
| 17850 | +/* 853 */ | |
| 17851 | +/***/ (function(module, exports, __webpack_require__) { | |
| 17852 | + | |
| 17853 | +"use strict"; | |
| 17854 | + | |
| 17855 | + | |
| 17856 | +var _Object$defineProperty = __webpack_require__(1); | |
| 17857 | + | |
| 17858 | +_Object$defineProperty(exports, "__esModule", { | |
| 17859 | + value: true | |
| 17860 | +}); | |
| 17861 | + | |
| 17862 | +_Object$defineProperty(exports, "Duplicate", { | |
| 17863 | + enumerable: true, | |
| 17864 | + get: function get() { | |
| 17865 | + return _duplicate.Duplicate; | |
| 17866 | + } | |
| 17867 | +}); | |
| 17868 | + | |
| 17869 | +_Object$defineProperty(exports, "Insert", { | |
| 17870 | + enumerable: true, | |
| 17871 | + get: function get() { | |
| 17872 | + return _insert.Insert; | |
| 17873 | + } | |
| 17874 | +}); | |
| 17875 | + | |
| 17876 | +_Object$defineProperty(exports, "Move", { | |
| 17877 | + enumerable: true, | |
| 17878 | + get: function get() { | |
| 17879 | + return _move.Move; | |
| 17880 | + } | |
| 17881 | +}); | |
| 17882 | + | |
| 17883 | +_Object$defineProperty(exports, "Remove", { | |
| 17884 | + enumerable: true, | |
| 17885 | + get: function get() { | |
| 17886 | + return _remove.Remove; | |
| 17887 | + } | |
| 17888 | +}); | |
| 17889 | + | |
| 17890 | +var _duplicate = __webpack_require__(854); | |
| 17891 | + | |
| 17892 | +var _insert = __webpack_require__(855); | |
| 17893 | + | |
| 17894 | +var _move = __webpack_require__(856); | |
| 17895 | + | |
| 17896 | +var _remove = __webpack_require__(857); | |
| 17897 | + | |
| 17898 | +/***/ }), | |
| 17899 | +/* 854 */ | |
| 17900 | +/***/ (function(module, exports, __webpack_require__) { | |
| 17901 | + | |
| 17902 | +"use strict"; | |
| 17903 | + | |
| 17904 | + | |
| 17905 | +var _interopRequireDefault = __webpack_require__(0); | |
| 17906 | + | |
| 17907 | +var _Object$defineProperty = __webpack_require__(1); | |
| 17908 | + | |
| 17909 | +_Object$defineProperty(exports, "__esModule", { | |
| 17910 | + value: true | |
| 17911 | +}); | |
| 17912 | + | |
| 17913 | +exports.default = exports.Duplicate = void 0; | |
| 17914 | + | |
| 17915 | +var _assign = _interopRequireDefault(__webpack_require__(140)); | |
| 17916 | + | |
| 17917 | +__webpack_require__(40); | |
| 17918 | + | |
| 17919 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 17920 | + | |
| 17921 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 17922 | + | |
| 17923 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 17924 | + | |
| 17925 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 17926 | + | |
| 17927 | +var _commandHistory = _interopRequireDefault(__webpack_require__(129)); | |
| 17928 | + | |
| 17929 | +var Duplicate = /*#__PURE__*/function (_CommandHistory) { | |
| 17930 | + (0, _inherits2.default)(Duplicate, _CommandHistory); | |
| 17931 | + | |
| 17932 | + var _super = (0, _createSuper2.default)(Duplicate); | |
| 17933 | + | |
| 17934 | + function Duplicate() { | |
| 17935 | + (0, _classCallCheck2.default)(this, Duplicate); | |
| 17936 | + return _super.apply(this, arguments); | |
| 17937 | + } | |
| 17938 | + | |
| 17939 | + (0, _createClass2.default)(Duplicate, [{ | |
| 17940 | + key: "validateArgs", | |
| 17941 | + value: function validateArgs(args) { | |
| 17942 | + this.requireContainer(args); | |
| 17943 | + this.requireArgumentType('name', 'string', args); | |
| 17944 | + this.requireArgumentType('index', 'number', args); | |
| 17945 | + } | |
| 17946 | + }, { | |
| 17947 | + key: "getHistory", | |
| 17948 | + value: function getHistory(args) { | |
| 17949 | + var _args$containers = args.containers, | |
| 17950 | + containers = _args$containers === void 0 ? [args.container] : _args$containers; | |
| 17951 | + return { | |
| 17952 | + containers: containers, | |
| 17953 | + type: 'duplicate', | |
| 17954 | + subTitle: elementor.translate('Item') | |
| 17955 | + }; | |
| 17956 | + } | |
| 17957 | + }, { | |
| 17958 | + key: "apply", | |
| 17959 | + value: function apply(args) { | |
| 17960 | + var index = args.index, | |
| 17961 | + name = args.name, | |
| 17962 | + _args$options = args.options, | |
| 17963 | + options = _args$options === void 0 ? {} : _args$options, | |
| 17964 | + _args$containers2 = args.containers, | |
| 17965 | + containers = _args$containers2 === void 0 ? [args.container] : _args$containers2, | |
| 17966 | + result = []; | |
| 17967 | + containers.forEach(function (container) { | |
| 17968 | + var settingsModel = container.settings, | |
| 17969 | + collection = settingsModel.get(name), | |
| 17970 | + model = collection.at(index).toJSON(); // Let the insert handle it, do not use the duplicated id. | |
| 17971 | + | |
| 17972 | + if (model._id) { | |
| 17973 | + delete model._id; | |
| 17974 | + } | |
| 17975 | + | |
| 17976 | + result.push($e.run('document/repeater/insert', { | |
| 17977 | + container: container, | |
| 17978 | + name: name, | |
| 17979 | + model: model, | |
| 17980 | + options: (0, _assign.default)({ | |
| 17981 | + at: index + 1 | |
| 17982 | + }, options) | |
| 17983 | + })); | |
| 17984 | + }); | |
| 17985 | + | |
| 17986 | + if (1 === result.length) { | |
| 17987 | + return result[0]; | |
| 17988 | + } | |
| 17989 | + | |
| 17990 | + return result; | |
| 17991 | + } | |
| 17992 | + }]); | |
| 17993 | + return Duplicate; | |
| 17994 | +}(_commandHistory.default); | |
| 17995 | + | |
| 17996 | +exports.Duplicate = Duplicate; | |
| 17997 | +var _default = Duplicate; | |
| 17998 | +exports.default = _default; | |
| 17999 | + | |
| 18000 | +/***/ }), | |
| 18001 | +/* 855 */ | |
| 18002 | +/***/ (function(module, exports, __webpack_require__) { | |
| 18003 | + | |
| 18004 | +"use strict"; | |
| 18005 | + | |
| 18006 | + | |
| 18007 | +var _interopRequireDefault = __webpack_require__(0); | |
| 18008 | + | |
| 18009 | +var _Object$defineProperty = __webpack_require__(1); | |
| 18010 | + | |
| 18011 | +_Object$defineProperty(exports, "__esModule", { | |
| 18012 | + value: true | |
| 18013 | +}); | |
| 18014 | + | |
| 18015 | +exports.default = exports.Insert = void 0; | |
| 18016 | + | |
| 18017 | +__webpack_require__(40); | |
| 18018 | + | |
| 18019 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 18020 | + | |
| 18021 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 18022 | + | |
| 18023 | +var _get2 = _interopRequireDefault(__webpack_require__(26)); | |
| 18024 | + | |
| 18025 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(16)); | |
| 18026 | + | |
| 18027 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 18028 | + | |
| 18029 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 18030 | + | |
| 18031 | +var _commandHistory = _interopRequireDefault(__webpack_require__(129)); | |
| 18032 | + | |
| 18033 | +var Insert = /*#__PURE__*/function (_CommandHistory) { | |
| 18034 | + (0, _inherits2.default)(Insert, _CommandHistory); | |
| 18035 | + | |
| 18036 | + var _super = (0, _createSuper2.default)(Insert); | |
| 18037 | + | |
| 18038 | + function Insert() { | |
| 18039 | + (0, _classCallCheck2.default)(this, Insert); | |
| 18040 | + return _super.apply(this, arguments); | |
| 18041 | + } | |
| 18042 | + | |
| 18043 | + (0, _createClass2.default)(Insert, [{ | |
| 18044 | + key: "initialize", | |
| 18045 | + value: function initialize(args) { | |
| 18046 | + (0, _get2.default)((0, _getPrototypeOf2.default)(Insert.prototype), "initialize", this).call(this, args); | |
| 18047 | + | |
| 18048 | + if (!args.model._id) { | |
| 18049 | + args.model._id = elementorCommon.helpers.getUniqueId(); | |
| 18050 | + } | |
| 18051 | + } | |
| 18052 | + }, { | |
| 18053 | + key: "validateArgs", | |
| 18054 | + value: function validateArgs(args) { | |
| 18055 | + this.requireContainer(args); | |
| 18056 | + this.requireArgumentType('model', 'object', args); | |
| 18057 | + this.requireArgumentConstructor('name', String, args); | |
| 18058 | + } | |
| 18059 | + }, { | |
| 18060 | + key: "getHistory", | |
| 18061 | + value: function getHistory(args) { | |
| 18062 | + var model = args.model, | |
| 18063 | + name = args.name, | |
| 18064 | + _args$options = args.options, | |
| 18065 | + options = _args$options === void 0 ? { | |
| 18066 | + at: null | |
| 18067 | + } : _args$options, | |
| 18068 | + _args$containers = args.containers, | |
| 18069 | + containers = _args$containers === void 0 ? [args.container] : _args$containers; | |
| 18070 | + return { | |
| 18071 | + containers: containers, | |
| 18072 | + type: 'add', | |
| 18073 | + subTitle: elementor.translate('Item'), | |
| 18074 | + data: { | |
| 18075 | + model: model, | |
| 18076 | + name: name, | |
| 18077 | + index: options.at | |
| 18078 | + }, | |
| 18079 | + restore: this.constructor.restore | |
| 18080 | + }; | |
| 18081 | + } | |
| 18082 | + }, { | |
| 18083 | + key: "isDataChanged", | |
| 18084 | + value: function isDataChanged() { | |
| 18085 | + return true; | |
| 18086 | + } | |
| 18087 | + }, { | |
| 18088 | + key: "apply", | |
| 18089 | + value: function apply(args) { | |
| 18090 | + var model = args.model, | |
| 18091 | + name = args.name, | |
| 18092 | + _args$options2 = args.options, | |
| 18093 | + options = _args$options2 === void 0 ? { | |
| 18094 | + at: null | |
| 18095 | + } : _args$options2, | |
| 18096 | + _args$containers2 = args.containers, | |
| 18097 | + containers = _args$containers2 === void 0 ? [args.container] : _args$containers2, | |
| 18098 | + result = []; | |
| 18099 | + containers.forEach(function (container) { | |
| 18100 | + container = container.lookup(); | |
| 18101 | + var collection = container.settings.get(name); | |
| 18102 | + options.at = null === options.at ? collection.length : options.at; // On `collection.push` the renderer needs a container, the container needs a settingsModel. | |
| 18103 | + | |
| 18104 | + var rowSettingsModel = collection._prepareModel(model); | |
| 18105 | + | |
| 18106 | + container.addRepeaterItem(name, rowSettingsModel, options.at); | |
| 18107 | + result.push(collection.push(rowSettingsModel, options)); | |
| 18108 | + container.render(); | |
| 18109 | + }); | |
| 18110 | + | |
| 18111 | + if (1 === result.length) { | |
| 18112 | + return result[0]; | |
| 18113 | + } | |
| 18114 | + | |
| 18115 | + return result; | |
| 18116 | + } | |
| 18117 | + }], [{ | |
| 18118 | + key: "restore", | |
| 18119 | + value: function restore(historyItem, isRedo) { | |
| 18120 | + var containers = historyItem.get('containers'), | |
| 18121 | + data = historyItem.get('data'); | |
| 18122 | + | |
| 18123 | + if (isRedo) { | |
| 18124 | + $e.run('document/repeater/insert', { | |
| 18125 | + containers: containers, | |
| 18126 | + model: data.model, | |
| 18127 | + name: data.name, | |
| 18128 | + options: { | |
| 18129 | + at: data.index | |
| 18130 | + } | |
| 18131 | + }); | |
| 1104 | 18132 | } else { |
| 1105 | - softDeprecated(name, version, replacement); | |
| 18133 | + $e.run('document/repeater/remove', { | |
| 18134 | + containers: containers, | |
| 18135 | + name: data.name, | |
| 18136 | + index: data.index | |
| 18137 | + }); | |
| 1106 | 18138 | } |
| 1107 | 18139 | } |
| 18140 | + }]); | |
| 18141 | + return Insert; | |
| 18142 | +}(_commandHistory.default); | |
| 1108 | 18143 | |
| 18144 | +exports.Insert = Insert; | |
| 18145 | +var _default = Insert; | |
| 18146 | +exports.default = _default; | |
| 18147 | + | |
| 18148 | +/***/ }), | |
| 18149 | +/* 856 */ | |
| 18150 | +/***/ (function(module, exports, __webpack_require__) { | |
| 18151 | + | |
| 18152 | +"use strict"; | |
| 18153 | + | |
| 18154 | + | |
| 18155 | +var _interopRequireDefault = __webpack_require__(0); | |
| 18156 | + | |
| 18157 | +var _Object$defineProperty = __webpack_require__(1); | |
| 18158 | + | |
| 18159 | +_Object$defineProperty(exports, "__esModule", { | |
| 18160 | + value: true | |
| 18161 | +}); | |
| 18162 | + | |
| 18163 | +exports.default = exports.Move = void 0; | |
| 18164 | + | |
| 18165 | +__webpack_require__(40); | |
| 18166 | + | |
| 18167 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 18168 | + | |
| 18169 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 18170 | + | |
| 18171 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 18172 | + | |
| 18173 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 18174 | + | |
| 18175 | +var _commandHistory = _interopRequireDefault(__webpack_require__(129)); | |
| 18176 | + | |
| 18177 | +var Move = /*#__PURE__*/function (_CommandHistory) { | |
| 18178 | + (0, _inherits2.default)(Move, _CommandHistory); | |
| 18179 | + | |
| 18180 | + var _super = (0, _createSuper2.default)(Move); | |
| 18181 | + | |
| 18182 | + function Move() { | |
| 18183 | + (0, _classCallCheck2.default)(this, Move); | |
| 18184 | + return _super.apply(this, arguments); | |
| 18185 | + } | |
| 18186 | + | |
| 18187 | + (0, _createClass2.default)(Move, [{ | |
| 18188 | + key: "validateArgs", | |
| 18189 | + value: function validateArgs(args) { | |
| 18190 | + this.requireContainer(args); | |
| 18191 | + this.requireArgumentType('name', 'string', args); | |
| 18192 | + this.requireArgumentType('sourceIndex', 'number', args); | |
| 18193 | + this.requireArgumentType('targetIndex', 'number', args); | |
| 18194 | + } | |
| 18195 | + }, { | |
| 18196 | + key: "getHistory", | |
| 18197 | + value: function getHistory(args) { | |
| 18198 | + var _args$containers = args.containers, | |
| 18199 | + containers = _args$containers === void 0 ? [args.container] : _args$containers; | |
| 18200 | + return { | |
| 18201 | + containers: containers, | |
| 18202 | + type: 'move', | |
| 18203 | + subTitle: elementor.translate('Item') | |
| 18204 | + }; | |
| 18205 | + } | |
| 18206 | + }, { | |
| 18207 | + key: "apply", | |
| 18208 | + value: function apply(args) { | |
| 18209 | + var sourceIndex = args.sourceIndex, | |
| 18210 | + targetIndex = args.targetIndex, | |
| 18211 | + name = args.name, | |
| 18212 | + _args$containers2 = args.containers, | |
| 18213 | + containers = _args$containers2 === void 0 ? [args.container] : _args$containers2, | |
| 18214 | + result = []; | |
| 18215 | + containers.forEach(function (container) { | |
| 18216 | + var collection = container.settings.get(name), | |
| 18217 | + model = elementorCommon.helpers.cloneObject(collection.at(sourceIndex)); | |
| 18218 | + $e.run('document/repeater/remove', { | |
| 18219 | + container: container, | |
| 18220 | + name: name, | |
| 18221 | + index: sourceIndex | |
| 18222 | + }); | |
| 18223 | + result.push($e.run('document/repeater/insert', { | |
| 18224 | + container: container, | |
| 18225 | + name: name, | |
| 18226 | + model: model, | |
| 18227 | + options: { | |
| 18228 | + at: targetIndex | |
| 18229 | + } | |
| 18230 | + })); | |
| 18231 | + }); | |
| 18232 | + | |
| 18233 | + if (1 === result.length) { | |
| 18234 | + return result[0]; | |
| 18235 | + } | |
| 18236 | + | |
| 18237 | + return result; | |
| 18238 | + } | |
| 18239 | + }]); | |
| 18240 | + return Move; | |
| 18241 | +}(_commandHistory.default); | |
| 18242 | + | |
| 18243 | +exports.Move = Move; | |
| 18244 | +var _default = Move; | |
| 18245 | +exports.default = _default; | |
| 18246 | + | |
| 18247 | +/***/ }), | |
| 18248 | +/* 857 */ | |
| 18249 | +/***/ (function(module, exports, __webpack_require__) { | |
| 18250 | + | |
| 18251 | +"use strict"; | |
| 18252 | + | |
| 18253 | + | |
| 18254 | +var _interopRequireDefault = __webpack_require__(0); | |
| 18255 | + | |
| 18256 | +var _Object$defineProperty = __webpack_require__(1); | |
| 18257 | + | |
| 18258 | +_Object$defineProperty(exports, "__esModule", { | |
| 18259 | + value: true | |
| 18260 | +}); | |
| 18261 | + | |
| 18262 | +exports.default = exports.Remove = void 0; | |
| 18263 | + | |
| 18264 | +__webpack_require__(40); | |
| 18265 | + | |
| 18266 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 18267 | + | |
| 18268 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 18269 | + | |
| 18270 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 18271 | + | |
| 18272 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 18273 | + | |
| 18274 | +var _commandHistory = _interopRequireDefault(__webpack_require__(129)); | |
| 18275 | + | |
| 18276 | +var Remove = /*#__PURE__*/function (_CommandHistory) { | |
| 18277 | + (0, _inherits2.default)(Remove, _CommandHistory); | |
| 18278 | + | |
| 18279 | + var _super = (0, _createSuper2.default)(Remove); | |
| 18280 | + | |
| 18281 | + function Remove() { | |
| 18282 | + (0, _classCallCheck2.default)(this, Remove); | |
| 18283 | + return _super.apply(this, arguments); | |
| 18284 | + } | |
| 18285 | + | |
| 18286 | + (0, _createClass2.default)(Remove, [{ | |
| 18287 | + key: "validateArgs", | |
| 18288 | + value: function validateArgs(args) { | |
| 18289 | + this.requireContainer(args); | |
| 18290 | + this.requireArgumentType('name', 'string', args); | |
| 18291 | + this.requireArgument('index', args); // sometimes null. | |
| 18292 | + } | |
| 18293 | + }, { | |
| 18294 | + key: "getHistory", | |
| 18295 | + value: function getHistory(args) { | |
| 18296 | + var _args$containers = args.containers, | |
| 18297 | + containers = _args$containers === void 0 ? [args.container] : _args$containers; | |
| 18298 | + return { | |
| 18299 | + containers: containers, | |
| 18300 | + type: 'remove', | |
| 18301 | + subTitle: elementor.translate('Item') | |
| 18302 | + }; | |
| 18303 | + } | |
| 18304 | + }, { | |
| 18305 | + key: "isDataChanged", | |
| 18306 | + value: function isDataChanged() { | |
| 18307 | + return true; | |
| 18308 | + } | |
| 18309 | + }, { | |
| 18310 | + key: "apply", | |
| 18311 | + value: function apply(args) { | |
| 18312 | + var _this = this; | |
| 18313 | + | |
| 18314 | + var name = args.name, | |
| 18315 | + _args$containers2 = args.containers, | |
| 18316 | + containers = _args$containers2 === void 0 ? [args.container] : _args$containers2, | |
| 18317 | + index = null === args.index ? -1 : args.index, | |
| 18318 | + result = []; | |
| 18319 | + containers.forEach(function (container) { | |
| 18320 | + container = container.lookup(); | |
| 18321 | + var collection = container.settings.get(name), | |
| 18322 | + model = collection.at(index); | |
| 18323 | + | |
| 18324 | + if (_this.isHistoryActive()) { | |
| 18325 | + $e.internal('document/history/log-sub-item', { | |
| 18326 | + container: container, | |
| 18327 | + data: { | |
| 18328 | + name: name, | |
| 18329 | + model: model, | |
| 18330 | + index: index | |
| 18331 | + }, | |
| 18332 | + restore: _this.constructor.restore | |
| 18333 | + }); | |
| 18334 | + } // Remove from container and add to result. | |
| 18335 | + | |
| 18336 | + | |
| 18337 | + result.push(container.repeaters[name].children.splice(index, 1)); | |
| 18338 | + collection.remove(model); | |
| 18339 | + container.render(); | |
| 18340 | + }); | |
| 18341 | + | |
| 18342 | + if (1 === result.length) { | |
| 18343 | + return result[0]; | |
| 18344 | + } | |
| 18345 | + | |
| 18346 | + return result; | |
| 18347 | + } | |
| 18348 | + }], [{ | |
| 18349 | + key: "restore", | |
| 18350 | + value: function restore(historyItem, isRedo) { | |
| 18351 | + var data = historyItem.get('data'), | |
| 18352 | + container = historyItem.get('container'); | |
| 18353 | + | |
| 18354 | + if (isRedo) { | |
| 18355 | + $e.run('document/repeater/remove', { | |
| 18356 | + container: container, | |
| 18357 | + name: data.name, | |
| 18358 | + index: data.index | |
| 18359 | + }); | |
| 18360 | + } else { | |
| 18361 | + $e.run('document/repeater/insert', { | |
| 18362 | + container: container, | |
| 18363 | + model: data.model, | |
| 18364 | + name: data.name, | |
| 18365 | + options: { | |
| 18366 | + at: data.index | |
| 18367 | + } | |
| 18368 | + }); | |
| 18369 | + } | |
| 18370 | + } | |
| 18371 | + }]); | |
| 18372 | + return Remove; | |
| 18373 | +}(_commandHistory.default); | |
| 18374 | + | |
| 18375 | +exports.Remove = Remove; | |
| 18376 | +var _default = Remove; | |
| 18377 | +exports.default = _default; | |
| 18378 | + | |
| 18379 | +/***/ }), | |
| 18380 | +/* 858 */ | |
| 18381 | +/***/ (function(module, exports, __webpack_require__) { | |
| 18382 | + | |
| 18383 | +"use strict"; | |
| 18384 | + | |
| 18385 | + | |
| 18386 | +var _interopRequireWildcard = __webpack_require__(34); | |
| 18387 | + | |
| 18388 | +var _interopRequireDefault = __webpack_require__(0); | |
| 18389 | + | |
| 18390 | +var _Object$defineProperty = __webpack_require__(1); | |
| 18391 | + | |
| 18392 | +_Object$defineProperty(exports, "__esModule", { | |
| 18393 | + value: true | |
| 18394 | +}); | |
| 18395 | + | |
| 18396 | +exports.default = void 0; | |
| 18397 | + | |
| 18398 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 18399 | + | |
| 18400 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 18401 | + | |
| 18402 | +var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(45)); | |
| 18403 | + | |
| 18404 | +var _get2 = _interopRequireDefault(__webpack_require__(26)); | |
| 18405 | + | |
| 18406 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(16)); | |
| 18407 | + | |
| 18408 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 18409 | + | |
| 18410 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 18411 | + | |
| 18412 | +var _defineProperty2 = _interopRequireDefault(__webpack_require__(27)); | |
| 18413 | + | |
| 18414 | +var _backwardsCompatibility = _interopRequireDefault(__webpack_require__(859)); | |
| 18415 | + | |
| 18416 | +var commands = _interopRequireWildcard(__webpack_require__(860)); | |
| 18417 | + | |
| 18418 | +var commandsInternal = _interopRequireWildcard(__webpack_require__(868)); | |
| 18419 | + | |
| 18420 | +var hooks = _interopRequireWildcard(__webpack_require__(871)); | |
| 18421 | + | |
| 18422 | +var Component = /*#__PURE__*/function (_BackwardsCompatibili) { | |
| 18423 | + (0, _inherits2.default)(Component, _BackwardsCompatibili); | |
| 18424 | + | |
| 18425 | + var _super = (0, _createSuper2.default)(Component); | |
| 18426 | + | |
| 18427 | + function Component() { | |
| 18428 | + var _this; | |
| 18429 | + | |
| 18430 | + (0, _classCallCheck2.default)(this, Component); | |
| 18431 | + | |
| 18432 | + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { | |
| 18433 | + args[_key] = arguments[_key]; | |
| 18434 | + } | |
| 18435 | + | |
| 18436 | + _this = _super.call.apply(_super, [this].concat(args)); | |
| 18437 | + (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "footerSaver", void 0); | |
| 18438 | + return _this; | |
| 18439 | + } | |
| 18440 | + | |
| 18441 | + (0, _createClass2.default)(Component, [{ | |
| 18442 | + key: "__construct", | |
| 18443 | + value: function __construct() { | |
| 18444 | + var _this2 = this; | |
| 18445 | + | |
| 18446 | + var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 18447 | + (0, _get2.default)((0, _getPrototypeOf2.default)(Component.prototype), "__construct", this).call(this, args); | |
| 18448 | + /** | |
| 18449 | + * Auto save timer handlers. | |
| 18450 | + * | |
| 18451 | + * @type {Object} | |
| 18452 | + */ | |
| 18453 | + | |
| 18454 | + this.autoSaveTimers = {}; | |
| 18455 | + /** | |
| 18456 | + * Auto save interval. | |
| 18457 | + * | |
| 18458 | + * @type {number} | |
| 18459 | + */ | |
| 18460 | + | |
| 18461 | + this.autoSaveInterval = elementor.config.autosave_interval * 1000; | |
| 18462 | + elementorCommon.elements.$window.on('beforeunload', function () { | |
| 18463 | + if (_this2.isEditorChanged()) { | |
| 18464 | + // Returns a message to confirm dialog. | |
| 18465 | + return elementor.translate('before_unload_alert'); | |
| 18466 | + } | |
| 18467 | + }); | |
| 18468 | + } | |
| 18469 | + }, { | |
| 18470 | + key: "getNamespace", | |
| 18471 | + value: function getNamespace() { | |
| 18472 | + return 'document/save'; | |
| 18473 | + } | |
| 1109 | 18474 | /** |
| 1110 | - * @param {string} version | |
| 1111 | - * | |
| 1112 | - * @return {Version} | |
| 18475 | + * TODO: test | |
| 18476 | + * @param {Document} document | |
| 1113 | 18477 | */ |
| 18478 | + | |
| 1114 | 18479 | }, { |
| 1115 | - key: "parseVersion", | |
| 1116 | - value: function parseVersion(version) { | |
| 1117 | - var versionParts = version.split('.'); | |
| 1118 | - if (versionParts.length < 3 || versionParts.length > 4) { | |
| 1119 | - throw new RangeError('Invalid Semantic Version string provided'); | |
| 18480 | + key: "startAutoSave", | |
| 18481 | + value: function startAutoSave(document) { | |
| 18482 | + var _this3 = this; | |
| 18483 | + | |
| 18484 | + this.stopAutoSave(document); | |
| 18485 | + this.autoSaveTimers[document.id] = setTimeout(function () { | |
| 18486 | + $e.run('document/save/auto', { | |
| 18487 | + document: document | |
| 18488 | + }); | |
| 18489 | + delete _this3.autoSaveTimers[document.id]; | |
| 18490 | + }, this.autoSaveInterval); | |
| 18491 | + } | |
| 18492 | + /** | |
| 18493 | + * TODO: test | |
| 18494 | + * @param {Document} document | |
| 18495 | + */ | |
| 18496 | + | |
| 18497 | + }, { | |
| 18498 | + key: "stopAutoSave", | |
| 18499 | + value: function stopAutoSave(document) { | |
| 18500 | + if (this.autoSaveTimers[document.id]) { | |
| 18501 | + clearTimeout(this.autoSaveTimers[document.id]); | |
| 18502 | + delete this.autoSaveTimers[document.id]; | |
| 1120 | 18503 | } |
| 1121 | - var _versionParts = (0, _slicedToArray2.default)(versionParts, 4), | |
| 1122 | - major1 = _versionParts[0], | |
| 1123 | - major2 = _versionParts[1], | |
| 1124 | - minor = _versionParts[2], | |
| 1125 | - _versionParts$ = _versionParts[3], | |
| 1126 | - build = _versionParts$ === void 0 ? '' : _versionParts$; | |
| 18504 | + } | |
| 18505 | + }, { | |
| 18506 | + key: "defaultCommands", | |
| 18507 | + value: function defaultCommands() { | |
| 18508 | + return this.importCommands(commands); | |
| 18509 | + } | |
| 18510 | + }, { | |
| 18511 | + key: "defaultCommandsInternal", | |
| 18512 | + value: function defaultCommandsInternal() { | |
| 18513 | + return this.importCommands(commandsInternal); | |
| 18514 | + } | |
| 18515 | + }, { | |
| 18516 | + key: "defaultHooks", | |
| 18517 | + value: function defaultHooks() { | |
| 18518 | + return this.importHooks(hooks); | |
| 18519 | + } | |
| 18520 | + }, { | |
| 18521 | + key: "isEditorChanged", | |
| 18522 | + value: function isEditorChanged() { | |
| 18523 | + return true === elementor.channels.editor.request('status'); | |
| 18524 | + } | |
| 18525 | + }]); | |
| 18526 | + return Component; | |
| 18527 | +}(_backwardsCompatibility.default); | |
| 18528 | + | |
| 18529 | +exports.default = Component; | |
| 18530 | + | |
| 18531 | +/***/ }), | |
| 18532 | +/* 859 */ | |
| 18533 | +/***/ (function(module, exports, __webpack_require__) { | |
| 18534 | + | |
| 18535 | +"use strict"; | |
| 18536 | + | |
| 18537 | + | |
| 18538 | +var _interopRequireDefault = __webpack_require__(0); | |
| 18539 | + | |
| 18540 | +var _Object$defineProperty2 = __webpack_require__(1); | |
| 18541 | + | |
| 18542 | +_Object$defineProperty2(exports, "__esModule", { | |
| 18543 | + value: true | |
| 18544 | +}); | |
| 18545 | + | |
| 18546 | +exports.default = void 0; | |
| 18547 | + | |
| 18548 | +var _defineProperty = _interopRequireDefault(__webpack_require__(1)); | |
| 18549 | + | |
| 18550 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 18551 | + | |
| 18552 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 18553 | + | |
| 18554 | +var _get2 = _interopRequireDefault(__webpack_require__(26)); | |
| 18555 | + | |
| 18556 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(16)); | |
| 18557 | + | |
| 18558 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 18559 | + | |
| 18560 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 18561 | + | |
| 18562 | +var _componentBase = _interopRequireDefault(__webpack_require__(87)); | |
| 18563 | + | |
| 18564 | +var BackwardsCompatibility = /*#__PURE__*/function (_ComponentBase) { | |
| 18565 | + (0, _inherits2.default)(BackwardsCompatibility, _ComponentBase); | |
| 18566 | + | |
| 18567 | + var _super = (0, _createSuper2.default)(BackwardsCompatibility); | |
| 18568 | + | |
| 18569 | + function BackwardsCompatibility() { | |
| 18570 | + (0, _classCallCheck2.default)(this, BackwardsCompatibility); | |
| 18571 | + return _super.apply(this, arguments); | |
| 18572 | + } | |
| 18573 | + | |
| 18574 | + (0, _createClass2.default)(BackwardsCompatibility, [{ | |
| 18575 | + key: "__construct", | |
| 18576 | + value: function __construct() { | |
| 18577 | + var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 18578 | + (0, _get2.default)((0, _getPrototypeOf2.default)(BackwardsCompatibility.prototype), "__construct", this).call(this, args); | |
| 18579 | + (0, _defineProperty.default)(this, 'autoSaveTimer', { | |
| 18580 | + get: function get() { | |
| 18581 | + elementorCommon.helpers.softDeprecated('elementor.saver.autoSaveTimer', '2.9.0', "$e.components.get( 'editor/documents' ).autoSaveTimers"); | |
| 18582 | + return $e.components.get('editor/documents').autoSaveTimers; | |
| 18583 | + }, | |
| 18584 | + set: function set(value) { | |
| 18585 | + elementorCommon.helpers.softDeprecated('elementor.saver.autoSaveTimer', '2.9.0', "$e.components.get( 'editor/documents' ).autoSaveTimers[ documentId ]"); | |
| 18586 | + var documentId = elementor.documents.getCurrent(); | |
| 18587 | + $e.components.get('editor/documents').autoSaveTimers[documentId] = value; | |
| 18588 | + } | |
| 18589 | + }); | |
| 18590 | + var onOrig = this.on; | |
| 18591 | + | |
| 18592 | + this.on = function (eventName, callback, context) { | |
| 18593 | + elementorCommon.helpers.softDeprecated('elementor.saver.on', '2.9.0', '$e.hooks'); | |
| 18594 | + onOrig(eventName, callback, context); | |
| 18595 | + }; | |
| 18596 | + | |
| 18597 | + elementor.on('document:loaded', function () { | |
| 18598 | + if (elementor.channels.editor._events && elementor.channels.editor._events.saved) { | |
| 18599 | + elementorCommon.helpers.softDeprecated("elementor.channels.editor.on( 'saved', ... )", '2.9.0', '$e.hooks'); | |
| 18600 | + } | |
| 18601 | + }); | |
| 18602 | + } | |
| 18603 | + }, { | |
| 18604 | + key: "defaultSave", | |
| 18605 | + value: function defaultSave() { | |
| 18606 | + elementorCommon.helpers.softDeprecated('defaultSave', '2.9.0', "$e.run( 'document/save/default' )"); | |
| 18607 | + return $e.run('document/save/default'); | |
| 18608 | + } | |
| 18609 | + }, { | |
| 18610 | + key: "discard", | |
| 18611 | + value: function discard() { | |
| 18612 | + elementorCommon.helpers.softDeprecated('discard', '2.9.0', "$e.run( 'document/save/discard' )"); | |
| 18613 | + return $e.run('document/save/discard'); | |
| 18614 | + } | |
| 18615 | + }, { | |
| 18616 | + key: "doAutoSave", | |
| 18617 | + value: function doAutoSave() { | |
| 18618 | + elementorCommon.helpers.softDeprecated('doAutoSave', '2.9.0', "$e.run( 'document/save/auto' )"); | |
| 18619 | + return $e.run('document/save/auto'); | |
| 18620 | + } | |
| 18621 | + }, { | |
| 18622 | + key: "publish", | |
| 18623 | + value: function publish(options) { | |
| 18624 | + elementorCommon.helpers.softDeprecated('publish', '2.9.0', "$e.run( 'document/save/publish' )"); | |
| 18625 | + return $e.run('document/save/auto', { | |
| 18626 | + options: options | |
| 18627 | + }); | |
| 18628 | + } | |
| 18629 | + }, { | |
| 18630 | + key: "saveAutoSave", | |
| 18631 | + value: function saveAutoSave(options) { | |
| 18632 | + elementorCommon.helpers.softDeprecated('saveAutoSave', '2.9.0', "$e.run( 'document/save/auto', { force: true } )"); | |
| 18633 | + options.force = true; | |
| 18634 | + return $e.run('document/save/auto', options); | |
| 18635 | + } | |
| 18636 | + }, { | |
| 18637 | + key: "saveDraft", | |
| 18638 | + value: function saveDraft() { | |
| 18639 | + elementorCommon.helpers.softDeprecated('saveDraft', '2.9.0', "$e.run( 'document/save/draft' )"); | |
| 18640 | + return $e.run('document/save/draft'); | |
| 18641 | + } | |
| 18642 | + }, { | |
| 18643 | + key: "savePending", | |
| 18644 | + value: function savePending() { | |
| 18645 | + elementorCommon.helpers.softDeprecated('savePending', '2.9.0', "$e.run( 'document/save/pending' )"); | |
| 18646 | + return $e.run('document/save/pending'); | |
| 18647 | + } | |
| 18648 | + }, { | |
| 18649 | + key: "update", | |
| 18650 | + value: function update(options) { | |
| 18651 | + elementorCommon.helpers.softDeprecated('update', '2.9.0', "$e.run( 'document/save/update' )"); | |
| 18652 | + return $e.run('document/save/update', options); | |
| 18653 | + } | |
| 18654 | + }, { | |
| 18655 | + key: "startTimer", | |
| 18656 | + value: function startTimer() { | |
| 18657 | + elementorCommon.helpers.softDeprecated('startTimer', '2.9.0', "$e.components.get( 'document/save' ).startAutoSave"); | |
| 18658 | + throw Error('Deprecated'); | |
| 18659 | + } | |
| 18660 | + }, { | |
| 18661 | + key: "saveEditor", | |
| 18662 | + value: function saveEditor(options) { | |
| 18663 | + elementorCommon.helpers.softDeprecated('saveEditor', '2.9.0', "$e.internal( 'document/save/save' )"); | |
| 18664 | + $e.internal('document/save/save', options); | |
| 18665 | + } | |
| 18666 | + }, { | |
| 18667 | + key: "setFlagEditorChange", | |
| 18668 | + value: function setFlagEditorChange(status) { | |
| 18669 | + elementorCommon.helpers.softDeprecated('setFlagEditorChange', '2.9.0', "$e.internal( 'document/save/set-is-modified' )"); | |
| 18670 | + $e.internal('document/save/set-is-modified', { | |
| 18671 | + status: status | |
| 18672 | + }); | |
| 18673 | + } | |
| 18674 | + }]); | |
| 18675 | + return BackwardsCompatibility; | |
| 18676 | +}(_componentBase.default); | |
| 18677 | + | |
| 18678 | +exports.default = BackwardsCompatibility; | |
| 18679 | + | |
| 18680 | +/***/ }), | |
| 18681 | +/* 860 */ | |
| 18682 | +/***/ (function(module, exports, __webpack_require__) { | |
| 18683 | + | |
| 18684 | +"use strict"; | |
| 18685 | + | |
| 18686 | + | |
| 18687 | +var _Object$defineProperty = __webpack_require__(1); | |
| 18688 | + | |
| 18689 | +_Object$defineProperty(exports, "__esModule", { | |
| 18690 | + value: true | |
| 18691 | +}); | |
| 18692 | + | |
| 18693 | +_Object$defineProperty(exports, "Auto", { | |
| 18694 | + enumerable: true, | |
| 18695 | + get: function get() { | |
| 18696 | + return _auto.Auto; | |
| 18697 | + } | |
| 18698 | +}); | |
| 18699 | + | |
| 18700 | +_Object$defineProperty(exports, "Default", { | |
| 18701 | + enumerable: true, | |
| 18702 | + get: function get() { | |
| 18703 | + return _default.Default; | |
| 18704 | + } | |
| 18705 | +}); | |
| 18706 | + | |
| 18707 | +_Object$defineProperty(exports, "Discard", { | |
| 18708 | + enumerable: true, | |
| 18709 | + get: function get() { | |
| 18710 | + return _discard.Discard; | |
| 18711 | + } | |
| 18712 | +}); | |
| 18713 | + | |
| 18714 | +_Object$defineProperty(exports, "Draft", { | |
| 18715 | + enumerable: true, | |
| 18716 | + get: function get() { | |
| 18717 | + return _draft.Draft; | |
| 18718 | + } | |
| 18719 | +}); | |
| 18720 | + | |
| 18721 | +_Object$defineProperty(exports, "Pending", { | |
| 18722 | + enumerable: true, | |
| 18723 | + get: function get() { | |
| 18724 | + return _pending.Pending; | |
| 18725 | + } | |
| 18726 | +}); | |
| 18727 | + | |
| 18728 | +_Object$defineProperty(exports, "Publish", { | |
| 18729 | + enumerable: true, | |
| 18730 | + get: function get() { | |
| 18731 | + return _publish.Publish; | |
| 18732 | + } | |
| 18733 | +}); | |
| 18734 | + | |
| 18735 | +_Object$defineProperty(exports, "Update", { | |
| 18736 | + enumerable: true, | |
| 18737 | + get: function get() { | |
| 18738 | + return _update.Update; | |
| 18739 | + } | |
| 18740 | +}); | |
| 18741 | + | |
| 18742 | +var _auto = __webpack_require__(861); | |
| 18743 | + | |
| 18744 | +var _default = __webpack_require__(862); | |
| 18745 | + | |
| 18746 | +var _discard = __webpack_require__(863); | |
| 18747 | + | |
| 18748 | +var _draft = __webpack_require__(864); | |
| 18749 | + | |
| 18750 | +var _pending = __webpack_require__(865); | |
| 18751 | + | |
| 18752 | +var _publish = __webpack_require__(866); | |
| 18753 | + | |
| 18754 | +var _update = __webpack_require__(867); | |
| 18755 | + | |
| 18756 | +/***/ }), | |
| 18757 | +/* 861 */ | |
| 18758 | +/***/ (function(module, exports, __webpack_require__) { | |
| 18759 | + | |
| 18760 | +"use strict"; | |
| 18761 | + | |
| 18762 | + | |
| 18763 | +var _interopRequireDefault = __webpack_require__(0); | |
| 18764 | + | |
| 18765 | +var _Object$defineProperty = __webpack_require__(1); | |
| 18766 | + | |
| 18767 | +_Object$defineProperty(exports, "__esModule", { | |
| 18768 | + value: true | |
| 18769 | +}); | |
| 18770 | + | |
| 18771 | +exports.default = exports.Auto = void 0; | |
| 18772 | + | |
| 18773 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 18774 | + | |
| 18775 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 18776 | + | |
| 18777 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 18778 | + | |
| 18779 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 18780 | + | |
| 18781 | +var _base = _interopRequireDefault(__webpack_require__(352)); | |
| 18782 | + | |
| 18783 | +var Auto = /*#__PURE__*/function (_Base) { | |
| 18784 | + (0, _inherits2.default)(Auto, _Base); | |
| 18785 | + | |
| 18786 | + var _super = (0, _createSuper2.default)(Auto); | |
| 18787 | + | |
| 18788 | + function Auto() { | |
| 18789 | + (0, _classCallCheck2.default)(this, Auto); | |
| 18790 | + return _super.apply(this, arguments); | |
| 18791 | + } | |
| 18792 | + | |
| 18793 | + (0, _createClass2.default)(Auto, [{ | |
| 18794 | + key: "apply", | |
| 18795 | + value: function apply(args) { | |
| 18796 | + var _args$force = args.force, | |
| 18797 | + force = _args$force === void 0 ? false : _args$force, | |
| 18798 | + _args$document = args.document, | |
| 18799 | + document = _args$document === void 0 ? this.document : _args$document; | |
| 18800 | + | |
| 18801 | + if (!force && !document.container.isEditable()) { | |
| 18802 | + return jQuery.Deferred().reject('Document is not editable'); | |
| 18803 | + } | |
| 18804 | + | |
| 18805 | + if (!document.editor.isChanged) { | |
| 18806 | + return jQuery.Deferred().resolve('Document is not changed'); | |
| 18807 | + } | |
| 18808 | + | |
| 18809 | + args.status = 'autosave'; | |
| 18810 | + args.document = document; | |
| 18811 | + return $e.internal('document/save/save', args); | |
| 18812 | + } | |
| 18813 | + }]); | |
| 18814 | + return Auto; | |
| 18815 | +}(_base.default); | |
| 18816 | + | |
| 18817 | +exports.Auto = Auto; | |
| 18818 | +var _default = Auto; | |
| 18819 | +exports.default = _default; | |
| 18820 | + | |
| 18821 | +/***/ }), | |
| 18822 | +/* 862 */ | |
| 18823 | +/***/ (function(module, exports, __webpack_require__) { | |
| 18824 | + | |
| 18825 | +"use strict"; | |
| 18826 | + | |
| 18827 | + | |
| 18828 | +var _interopRequireDefault = __webpack_require__(0); | |
| 18829 | + | |
| 18830 | +var _Object$defineProperty = __webpack_require__(1); | |
| 18831 | + | |
| 18832 | +_Object$defineProperty(exports, "__esModule", { | |
| 18833 | + value: true | |
| 18834 | +}); | |
| 18835 | + | |
| 18836 | +exports.default = exports.Default = void 0; | |
| 18837 | + | |
| 18838 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 18839 | + | |
| 18840 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 18841 | + | |
| 18842 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 18843 | + | |
| 18844 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 18845 | + | |
| 18846 | +var _base = _interopRequireDefault(__webpack_require__(352)); | |
| 18847 | + | |
| 18848 | +var Default = /*#__PURE__*/function (_Base) { | |
| 18849 | + (0, _inherits2.default)(Default, _Base); | |
| 18850 | + | |
| 18851 | + var _super = (0, _createSuper2.default)(Default); | |
| 18852 | + | |
| 18853 | + function Default() { | |
| 18854 | + (0, _classCallCheck2.default)(this, Default); | |
| 18855 | + return _super.apply(this, arguments); | |
| 18856 | + } | |
| 18857 | + | |
| 18858 | + (0, _createClass2.default)(Default, [{ | |
| 18859 | + key: "apply", | |
| 18860 | + value: function apply() { | |
| 18861 | + var document = this.document, | |
| 18862 | + postStatus = document.container.settings.get('post_status'); | |
| 18863 | + var deferred; | |
| 18864 | + | |
| 18865 | + switch (postStatus) { | |
| 18866 | + case 'publish': | |
| 18867 | + case 'future': | |
| 18868 | + case 'private': | |
| 18869 | + deferred = $e.run('document/save/update', { | |
| 18870 | + document: document | |
| 18871 | + }); | |
| 18872 | + break; | |
| 18873 | + | |
| 18874 | + case 'draft': | |
| 18875 | + if (document.config.user.can_publish) { | |
| 18876 | + deferred = $e.run('document/save/publish', { | |
| 18877 | + document: document | |
| 18878 | + }); | |
| 18879 | + } else { | |
| 18880 | + deferred = $e.run('document/save/pending', { | |
| 18881 | + document: document | |
| 18882 | + }); | |
| 18883 | + } | |
| 18884 | + | |
| 18885 | + break; | |
| 18886 | + | |
| 18887 | + case 'pending': // User cannot change post status | |
| 18888 | + | |
| 18889 | + case undefined: | |
| 18890 | + // TODO: as a contributor it's undefined instead of 'pending'. | |
| 18891 | + if (document.config.user.can_publish) { | |
| 18892 | + deferred = $e.run('document/save/publish', { | |
| 18893 | + document: document | |
| 18894 | + }); | |
| 18895 | + } else { | |
| 18896 | + deferred = $e.run('document/save/update', { | |
| 18897 | + document: document | |
| 18898 | + }); | |
| 18899 | + } | |
| 18900 | + | |
| 18901 | + } | |
| 18902 | + | |
| 18903 | + return deferred; | |
| 18904 | + } | |
| 18905 | + }]); | |
| 18906 | + return Default; | |
| 18907 | +}(_base.default); | |
| 18908 | + | |
| 18909 | +exports.Default = Default; | |
| 18910 | +var _default = Default; | |
| 18911 | +exports.default = _default; | |
| 18912 | + | |
| 18913 | +/***/ }), | |
| 18914 | +/* 863 */ | |
| 18915 | +/***/ (function(module, exports, __webpack_require__) { | |
| 18916 | + | |
| 18917 | +"use strict"; | |
| 18918 | + | |
| 18919 | + | |
| 18920 | +var _interopRequireDefault = __webpack_require__(0); | |
| 18921 | + | |
| 18922 | +var _Object$defineProperty = __webpack_require__(1); | |
| 18923 | + | |
| 18924 | +_Object$defineProperty(exports, "__esModule", { | |
| 18925 | + value: true | |
| 18926 | +}); | |
| 18927 | + | |
| 18928 | +exports.default = exports.Discard = void 0; | |
| 18929 | + | |
| 18930 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 18931 | + | |
| 18932 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 18933 | + | |
| 18934 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 18935 | + | |
| 18936 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 18937 | + | |
| 18938 | +var _base = _interopRequireDefault(__webpack_require__(352)); | |
| 18939 | + | |
| 18940 | +var Discard = /*#__PURE__*/function (_Base) { | |
| 18941 | + (0, _inherits2.default)(Discard, _Base); | |
| 18942 | + | |
| 18943 | + var _super = (0, _createSuper2.default)(Discard); | |
| 18944 | + | |
| 18945 | + function Discard() { | |
| 18946 | + (0, _classCallCheck2.default)(this, Discard); | |
| 18947 | + return _super.apply(this, arguments); | |
| 18948 | + } | |
| 18949 | + | |
| 18950 | + (0, _createClass2.default)(Discard, [{ | |
| 18951 | + key: "apply", | |
| 18952 | + value: function apply(args) { | |
| 18953 | + var _args$document = args.document, | |
| 18954 | + document = _args$document === void 0 ? elementor.documents.getCurrent() : _args$document; // Start server request before undo, because the undo can take time. | |
| 18955 | + | |
| 18956 | + var deferred = elementorCommon.ajax.addRequest('discard_changes'); | |
| 18957 | + $e.run('document/history/undo-all', { | |
| 18958 | + document: document | |
| 18959 | + }); // Discard autosave revision if exist. | |
| 18960 | + | |
| 18961 | + return deferred; | |
| 18962 | + } | |
| 18963 | + }]); | |
| 18964 | + return Discard; | |
| 18965 | +}(_base.default); | |
| 18966 | + | |
| 18967 | +exports.Discard = Discard; | |
| 18968 | +var _default = Discard; | |
| 18969 | +exports.default = _default; | |
| 18970 | + | |
| 18971 | +/***/ }), | |
| 18972 | +/* 864 */ | |
| 18973 | +/***/ (function(module, exports, __webpack_require__) { | |
| 18974 | + | |
| 18975 | +"use strict"; | |
| 18976 | + | |
| 18977 | + | |
| 18978 | +var _interopRequireDefault = __webpack_require__(0); | |
| 18979 | + | |
| 18980 | +var _Object$defineProperty = __webpack_require__(1); | |
| 18981 | + | |
| 18982 | +_Object$defineProperty(exports, "__esModule", { | |
| 18983 | + value: true | |
| 18984 | +}); | |
| 18985 | + | |
| 18986 | +exports.default = exports.Draft = void 0; | |
| 18987 | + | |
| 18988 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 18989 | + | |
| 18990 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 18991 | + | |
| 18992 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 18993 | + | |
| 18994 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 18995 | + | |
| 18996 | +var _base = _interopRequireDefault(__webpack_require__(352)); | |
| 18997 | + | |
| 18998 | +var Draft = /*#__PURE__*/function (_Base) { | |
| 18999 | + (0, _inherits2.default)(Draft, _Base); | |
| 19000 | + | |
| 19001 | + var _super = (0, _createSuper2.default)(Draft); | |
| 19002 | + | |
| 19003 | + function Draft() { | |
| 19004 | + (0, _classCallCheck2.default)(this, Draft); | |
| 19005 | + return _super.apply(this, arguments); | |
| 19006 | + } | |
| 19007 | + | |
| 19008 | + (0, _createClass2.default)(Draft, [{ | |
| 19009 | + key: "apply", | |
| 19010 | + value: function apply() { | |
| 19011 | + var document = this.document, | |
| 19012 | + postStatus = document.container.settings.get('post_status'); // If no changes - don't save but allow un-publish. | |
| 19013 | + | |
| 19014 | + if (!document.editor.isChanged && 'draft' !== postStatus) { | |
| 19015 | + return jQuery.Deferred().reject('Document is not editable'); | |
| 19016 | + } | |
| 19017 | + | |
| 19018 | + var deferred; | |
| 19019 | + | |
| 19020 | + switch (postStatus) { | |
| 19021 | + case 'publish': | |
| 19022 | + case 'private': | |
| 19023 | + deferred = $e.run('document/save/auto', { | |
| 19024 | + document: document | |
| 19025 | + }); | |
| 19026 | + break; | |
| 19027 | + | |
| 19028 | + default: | |
| 19029 | + // Update and create a revision | |
| 19030 | + deferred = $e.run('document/save/update', { | |
| 19031 | + document: document | |
| 19032 | + }); | |
| 19033 | + } | |
| 19034 | + | |
| 19035 | + return deferred; | |
| 19036 | + } | |
| 19037 | + }]); | |
| 19038 | + return Draft; | |
| 19039 | +}(_base.default); | |
| 19040 | + | |
| 19041 | +exports.Draft = Draft; | |
| 19042 | +var _default = Draft; | |
| 19043 | +exports.default = _default; | |
| 19044 | + | |
| 19045 | +/***/ }), | |
| 19046 | +/* 865 */ | |
| 19047 | +/***/ (function(module, exports, __webpack_require__) { | |
| 19048 | + | |
| 19049 | +"use strict"; | |
| 19050 | + | |
| 19051 | + | |
| 19052 | +var _interopRequireDefault = __webpack_require__(0); | |
| 19053 | + | |
| 19054 | +var _Object$defineProperty = __webpack_require__(1); | |
| 19055 | + | |
| 19056 | +_Object$defineProperty(exports, "__esModule", { | |
| 19057 | + value: true | |
| 19058 | +}); | |
| 19059 | + | |
| 19060 | +exports.Pending = void 0; | |
| 19061 | + | |
| 19062 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 19063 | + | |
| 19064 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 19065 | + | |
| 19066 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 19067 | + | |
| 19068 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 19069 | + | |
| 19070 | +var _base = _interopRequireDefault(__webpack_require__(352)); | |
| 19071 | + | |
| 19072 | +var Pending = /*#__PURE__*/function (_Base) { | |
| 19073 | + (0, _inherits2.default)(Pending, _Base); | |
| 19074 | + | |
| 19075 | + var _super = (0, _createSuper2.default)(Pending); | |
| 19076 | + | |
| 19077 | + function Pending() { | |
| 19078 | + (0, _classCallCheck2.default)(this, Pending); | |
| 19079 | + return _super.apply(this, arguments); | |
| 19080 | + } | |
| 19081 | + | |
| 19082 | + (0, _createClass2.default)(Pending, [{ | |
| 19083 | + key: "apply", | |
| 19084 | + value: function apply(args) { | |
| 19085 | + var _args$status = args.status, | |
| 19086 | + status = _args$status === void 0 ? 'pending' : _args$status, | |
| 19087 | + _args$document = args.document, | |
| 19088 | + document = _args$document === void 0 ? this.document : _args$document; | |
| 19089 | + return $e.internal('document/save/save', { | |
| 19090 | + status: status, | |
| 19091 | + document: document | |
| 19092 | + }); | |
| 19093 | + } | |
| 19094 | + }]); | |
| 19095 | + return Pending; | |
| 19096 | +}(_base.default); | |
| 19097 | + | |
| 19098 | +exports.Pending = Pending; | |
| 19099 | + | |
| 19100 | +/***/ }), | |
| 19101 | +/* 866 */ | |
| 19102 | +/***/ (function(module, exports, __webpack_require__) { | |
| 19103 | + | |
| 19104 | +"use strict"; | |
| 19105 | + | |
| 19106 | + | |
| 19107 | +var _interopRequireDefault = __webpack_require__(0); | |
| 19108 | + | |
| 19109 | +var _Object$defineProperty = __webpack_require__(1); | |
| 19110 | + | |
| 19111 | +_Object$defineProperty(exports, "__esModule", { | |
| 19112 | + value: true | |
| 19113 | +}); | |
| 19114 | + | |
| 19115 | +exports.Publish = void 0; | |
| 19116 | + | |
| 19117 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 19118 | + | |
| 19119 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 19120 | + | |
| 19121 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 19122 | + | |
| 19123 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 19124 | + | |
| 19125 | +var _base = _interopRequireDefault(__webpack_require__(352)); | |
| 19126 | + | |
| 19127 | +var Publish = /*#__PURE__*/function (_Base) { | |
| 19128 | + (0, _inherits2.default)(Publish, _Base); | |
| 19129 | + | |
| 19130 | + var _super = (0, _createSuper2.default)(Publish); | |
| 19131 | + | |
| 19132 | + function Publish() { | |
| 19133 | + (0, _classCallCheck2.default)(this, Publish); | |
| 19134 | + return _super.apply(this, arguments); | |
| 19135 | + } | |
| 19136 | + | |
| 19137 | + (0, _createClass2.default)(Publish, [{ | |
| 19138 | + key: "apply", | |
| 19139 | + value: function apply(args) { | |
| 19140 | + var _args$status = args.status, | |
| 19141 | + status = _args$status === void 0 ? 'publish' : _args$status, | |
| 19142 | + _args$document = args.document, | |
| 19143 | + document = _args$document === void 0 ? this.document : _args$document; | |
| 19144 | + return $e.internal('document/save/save', { | |
| 19145 | + status: status, | |
| 19146 | + document: document | |
| 19147 | + }); | |
| 19148 | + } | |
| 19149 | + }]); | |
| 19150 | + return Publish; | |
| 19151 | +}(_base.default); | |
| 19152 | + | |
| 19153 | +exports.Publish = Publish; | |
| 19154 | + | |
| 19155 | +/***/ }), | |
| 19156 | +/* 867 */ | |
| 19157 | +/***/ (function(module, exports, __webpack_require__) { | |
| 19158 | + | |
| 19159 | +"use strict"; | |
| 19160 | + | |
| 19161 | + | |
| 19162 | +var _interopRequireDefault = __webpack_require__(0); | |
| 19163 | + | |
| 19164 | +var _Object$defineProperty = __webpack_require__(1); | |
| 19165 | + | |
| 19166 | +_Object$defineProperty(exports, "__esModule", { | |
| 19167 | + value: true | |
| 19168 | +}); | |
| 19169 | + | |
| 19170 | +exports.Update = void 0; | |
| 19171 | + | |
| 19172 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 19173 | + | |
| 19174 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 19175 | + | |
| 19176 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 19177 | + | |
| 19178 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 19179 | + | |
| 19180 | +var _base = _interopRequireDefault(__webpack_require__(352)); | |
| 19181 | + | |
| 19182 | +var Update = /*#__PURE__*/function (_Base) { | |
| 19183 | + (0, _inherits2.default)(Update, _Base); | |
| 19184 | + | |
| 19185 | + var _super = (0, _createSuper2.default)(Update); | |
| 19186 | + | |
| 19187 | + function Update() { | |
| 19188 | + (0, _classCallCheck2.default)(this, Update); | |
| 19189 | + return _super.apply(this, arguments); | |
| 19190 | + } | |
| 19191 | + | |
| 19192 | + (0, _createClass2.default)(Update, [{ | |
| 19193 | + key: "apply", | |
| 19194 | + value: function apply(args) { | |
| 19195 | + var _args$document = args.document, | |
| 19196 | + document = _args$document === void 0 ? this.document : _args$document, | |
| 19197 | + _args$status = args.status, | |
| 19198 | + status = _args$status === void 0 ? document.container.settings.get('post_status') : _args$status; | |
| 19199 | + return $e.internal('document/save/save', { | |
| 19200 | + status: status, | |
| 19201 | + document: document | |
| 19202 | + }); | |
| 19203 | + } | |
| 19204 | + }]); | |
| 19205 | + return Update; | |
| 19206 | +}(_base.default); | |
| 19207 | + | |
| 19208 | +exports.Update = Update; | |
| 19209 | + | |
| 19210 | +/***/ }), | |
| 19211 | +/* 868 */ | |
| 19212 | +/***/ (function(module, exports, __webpack_require__) { | |
| 19213 | + | |
| 19214 | +"use strict"; | |
| 19215 | + | |
| 19216 | + | |
| 19217 | +var _Object$defineProperty = __webpack_require__(1); | |
| 19218 | + | |
| 19219 | +_Object$defineProperty(exports, "__esModule", { | |
| 19220 | + value: true | |
| 19221 | +}); | |
| 19222 | + | |
| 19223 | +_Object$defineProperty(exports, "Save", { | |
| 19224 | + enumerable: true, | |
| 19225 | + get: function get() { | |
| 19226 | + return _save.Save; | |
| 19227 | + } | |
| 19228 | +}); | |
| 19229 | + | |
| 19230 | +_Object$defineProperty(exports, "SetIsModified", { | |
| 19231 | + enumerable: true, | |
| 19232 | + get: function get() { | |
| 19233 | + return _setIsModified.SetIsModified; | |
| 19234 | + } | |
| 19235 | +}); | |
| 19236 | + | |
| 19237 | +var _save = __webpack_require__(869); | |
| 19238 | + | |
| 19239 | +var _setIsModified = __webpack_require__(870); | |
| 19240 | + | |
| 19241 | +/***/ }), | |
| 19242 | +/* 869 */ | |
| 19243 | +/***/ (function(module, exports, __webpack_require__) { | |
| 19244 | + | |
| 19245 | +"use strict"; | |
| 19246 | + | |
| 19247 | + | |
| 19248 | +var _interopRequireDefault = __webpack_require__(0); | |
| 19249 | + | |
| 19250 | +var _Object$defineProperty = __webpack_require__(1); | |
| 19251 | + | |
| 19252 | +_Object$defineProperty(exports, "__esModule", { | |
| 19253 | + value: true | |
| 19254 | +}); | |
| 19255 | + | |
| 19256 | +exports.default = exports.Save = void 0; | |
| 19257 | + | |
| 19258 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 19259 | + | |
| 19260 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 19261 | + | |
| 19262 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 19263 | + | |
| 19264 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 19265 | + | |
| 19266 | +var _commandInternalBase = _interopRequireDefault(__webpack_require__(204)); | |
| 19267 | + | |
| 19268 | +var Save = /*#__PURE__*/function (_CommandInternalBase) { | |
| 19269 | + (0, _inherits2.default)(Save, _CommandInternalBase); | |
| 19270 | + | |
| 19271 | + var _super = (0, _createSuper2.default)(Save); | |
| 19272 | + | |
| 19273 | + function Save() { | |
| 19274 | + (0, _classCallCheck2.default)(this, Save); | |
| 19275 | + return _super.apply(this, arguments); | |
| 19276 | + } | |
| 19277 | + | |
| 19278 | + (0, _createClass2.default)(Save, [{ | |
| 19279 | + key: "apply", | |
| 19280 | + value: function apply(args) { | |
| 19281 | + var _this = this; | |
| 19282 | + | |
| 19283 | + var _args$status = args.status, | |
| 19284 | + status = _args$status === void 0 ? 'draft' : _args$status, | |
| 19285 | + _args$force = args.force, | |
| 19286 | + force = _args$force === void 0 ? false : _args$force, | |
| 19287 | + _args$onSuccess = args.onSuccess, | |
| 19288 | + onSuccess = _args$onSuccess === void 0 ? null : _args$onSuccess, | |
| 19289 | + _args$document = args.document, | |
| 19290 | + document = _args$document === void 0 ? elementor.documents.getCurrent() : _args$document; | |
| 19291 | + | |
| 19292 | + if (!force && document.editor.isSaving) { | |
| 19293 | + return jQuery.Deferred().reject('Document already in save progress'); | |
| 19294 | + } | |
| 19295 | + | |
| 19296 | + var container = document.container, | |
| 19297 | + settings = container.settings.toJSON({ | |
| 19298 | + remove: ['default'] | |
| 19299 | + }), | |
| 19300 | + oldStatus = container.settings.get('post_status'); // TODO: Remove - Backwards compatibility. | |
| 19301 | + | |
| 19302 | + elementor.saver.trigger('before:save', args).trigger('before:save:' + status, args); | |
| 19303 | + document.editor.isSaving = true; | |
| 19304 | + document.editor.isChangedDuringSave = false; | |
| 19305 | + settings.post_status = status; | |
| 19306 | + var elements = []; | |
| 19307 | + | |
| 19308 | + if (elementor.config.document.panel.has_elements) { | |
| 19309 | + elements = container.model.get('elements').toJSON({ | |
| 19310 | + remove: ['default', 'editSettings', 'defaultEditSettings'] | |
| 19311 | + }); | |
| 19312 | + } | |
| 19313 | + | |
| 19314 | + var successArgs = { | |
| 19315 | + status: status, | |
| 19316 | + oldStatus: oldStatus, | |
| 19317 | + elements: elements, | |
| 19318 | + document: document, | |
| 19319 | + currentHistoryId: document.history.currentItem.get('id') | |
| 19320 | + }; | |
| 19321 | + var deferred = elementorCommon.ajax.addRequest('save_builder', { | |
| 19322 | + data: { | |
| 19323 | + status: status, | |
| 19324 | + elements: elements, | |
| 19325 | + settings: settings | |
| 19326 | + }, | |
| 19327 | + error: function error(data) { | |
| 19328 | + return _this.onSaveError(data, status, document); | |
| 19329 | + } | |
| 19330 | + }).then(function (data) { | |
| 19331 | + return _this.onSaveSuccess(data, successArgs, onSuccess); | |
| 19332 | + }); // TODO: Remove - Backwards compatibility | |
| 19333 | + | |
| 19334 | + elementor.saver.trigger('save', args); | |
| 19335 | + return deferred; | |
| 19336 | + } | |
| 19337 | + }, { | |
| 19338 | + key: "onSaveSuccess", | |
| 19339 | + value: function onSaveSuccess(data, args) { | |
| 19340 | + var callback = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; | |
| 19341 | + var status = args.status, | |
| 19342 | + oldStatus = args.oldStatus, | |
| 19343 | + elements = args.elements, | |
| 19344 | + document = args.document, | |
| 19345 | + currentHistoryId = args.currentHistoryId; | |
| 19346 | + this.onAfterAjax(document); | |
| 19347 | + document.editor.lastSaveHistoryId = currentHistoryId; // Remove document cache. | |
| 19348 | + | |
| 19349 | + elementor.documents.invalidateCache(document.id); | |
| 19350 | + var statusChanged = status !== oldStatus, | |
| 19351 | + result = { | |
| 19352 | + data: data, | |
| 19353 | + statusChanged: statusChanged | |
| 19354 | + }; // Document is switched during the save, do nothing. | |
| 19355 | + | |
| 19356 | + if (document !== elementor.documents.getCurrent()) { | |
| 19357 | + return result; | |
| 19358 | + } | |
| 19359 | + | |
| 19360 | + if (!document.editor.isChangedDuringSave) { | |
| 19361 | + document.editor.isSaved = true; | |
| 19362 | + } // TODO: Move to hook. | |
| 19363 | + | |
| 19364 | + | |
| 19365 | + if ('autosave' !== status) { | |
| 19366 | + if (statusChanged) { | |
| 19367 | + $e.run('document/elements/settings', { | |
| 19368 | + container: elementor.settings.page.getEditedView().getContainer(), | |
| 19369 | + settings: { | |
| 19370 | + post_status: status | |
| 19371 | + }, | |
| 19372 | + options: { | |
| 19373 | + external: true | |
| 19374 | + } | |
| 19375 | + }); | |
| 19376 | + } // Notice: Must be after update page.model.post_status to the new status. | |
| 19377 | + | |
| 19378 | + | |
| 19379 | + if (!document.editor.isChangedDuringSave) { | |
| 19380 | + $e.internal('document/save/set-is-modified', { | |
| 19381 | + status: false | |
| 19382 | + }); | |
| 19383 | + } | |
| 19384 | + } | |
| 19385 | + | |
| 19386 | + if (data.config) { | |
| 19387 | + // TODO: Move to es6. | |
| 19388 | + jQuery.extend(true, document.config, data.config.document); | |
| 19389 | + } | |
| 19390 | + | |
| 19391 | + if (document.config.elements) { | |
| 19392 | + document.config.elements = elements; | |
| 19393 | + } // TODO: Remove - Backwards compatibility | |
| 19394 | + | |
| 19395 | + | |
| 19396 | + elementor.channels.editor.trigger('saved', data); // TODO: Remove - Backwards compatibility | |
| 19397 | + | |
| 19398 | + elementor.saver.trigger('after:save', data).trigger('after:save:' + status, data); // TODO: Remove - Backwards compatibility | |
| 19399 | + | |
| 19400 | + if (statusChanged) { | |
| 19401 | + elementor.saver.trigger('page:status:change', status, oldStatus); | |
| 19402 | + } | |
| 19403 | + | |
| 19404 | + if (_.isFunction(callback)) { | |
| 19405 | + callback.call(this, result); | |
| 19406 | + } | |
| 19407 | + | |
| 19408 | + return result; | |
| 19409 | + } | |
| 19410 | + }, { | |
| 19411 | + key: "onSaveError", | |
| 19412 | + value: function onSaveError(data, status, document) { | |
| 19413 | + this.onAfterAjax(document); // TODO: Remove - Backwards compatibility | |
| 19414 | + | |
| 19415 | + elementor.saver.trigger('after:saveError', data).trigger('after:saveError:' + status, data); | |
| 19416 | + var message; | |
| 19417 | + | |
| 19418 | + if (_.isString(data)) { | |
| 19419 | + message = data; | |
| 19420 | + } else if (data.statusText) { | |
| 19421 | + message = elementor.createAjaxErrorMessage(data); | |
| 19422 | + | |
| 19423 | + if (0 === data.readyState) { | |
| 19424 | + message += ' ' + elementor.translate('saving_disabled'); | |
| 19425 | + } | |
| 19426 | + } else if (data[0] && data[0].code) { | |
| 19427 | + message = elementor.translate('server_error') + ' ' + data[0].code; | |
| 19428 | + } | |
| 19429 | + | |
| 19430 | + elementor.notifications.showToast({ | |
| 19431 | + message: message | |
| 19432 | + }); | |
| 19433 | + } | |
| 19434 | + }, { | |
| 19435 | + key: "onAfterAjax", | |
| 19436 | + value: function onAfterAjax(document) { | |
| 19437 | + document.editor.isSaving = false; | |
| 19438 | + } | |
| 19439 | + }]); | |
| 19440 | + return Save; | |
| 19441 | +}(_commandInternalBase.default); | |
| 19442 | + | |
| 19443 | +exports.Save = Save; | |
| 19444 | +var _default = Save; | |
| 19445 | +exports.default = _default; | |
| 19446 | + | |
| 19447 | +/***/ }), | |
| 19448 | +/* 870 */ | |
| 19449 | +/***/ (function(module, exports, __webpack_require__) { | |
| 19450 | + | |
| 19451 | +"use strict"; | |
| 19452 | + | |
| 19453 | + | |
| 19454 | +var _interopRequireDefault = __webpack_require__(0); | |
| 19455 | + | |
| 19456 | +var _Object$defineProperty = __webpack_require__(1); | |
| 19457 | + | |
| 19458 | +_Object$defineProperty(exports, "__esModule", { | |
| 19459 | + value: true | |
| 19460 | +}); | |
| 19461 | + | |
| 19462 | +exports.default = exports.SetIsModified = void 0; | |
| 19463 | + | |
| 19464 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 19465 | + | |
| 19466 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 19467 | + | |
| 19468 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 19469 | + | |
| 19470 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 19471 | + | |
| 19472 | +var _commandInternalBase = _interopRequireDefault(__webpack_require__(204)); | |
| 19473 | + | |
| 19474 | +var SetIsModified = /*#__PURE__*/function (_CommandInternalBase) { | |
| 19475 | + (0, _inherits2.default)(SetIsModified, _CommandInternalBase); | |
| 19476 | + | |
| 19477 | + var _super = (0, _createSuper2.default)(SetIsModified); | |
| 19478 | + | |
| 19479 | + function SetIsModified() { | |
| 19480 | + (0, _classCallCheck2.default)(this, SetIsModified); | |
| 19481 | + return _super.apply(this, arguments); | |
| 19482 | + } | |
| 19483 | + | |
| 19484 | + (0, _createClass2.default)(SetIsModified, [{ | |
| 19485 | + key: "validateArgs", | |
| 19486 | + value: function validateArgs(args) { | |
| 19487 | + this.requireArgumentType('status', 'boolean', args); | |
| 19488 | + } | |
| 19489 | + }, { | |
| 19490 | + key: "apply", | |
| 19491 | + value: function apply(args) { | |
| 19492 | + var status = args.status, | |
| 19493 | + _args$document = args.document, | |
| 19494 | + document = _args$document === void 0 ? elementor.documents.getCurrent() : _args$document; // Save document for hooks. | |
| 19495 | + | |
| 19496 | + args.document = document; | |
| 19497 | + document.editor.isChanged = status; | |
| 19498 | + | |
| 19499 | + if (status && document.editor.isSaving) { | |
| 19500 | + document.editor.isChangedDuringSave = true; | |
| 19501 | + } | |
| 19502 | + | |
| 19503 | + if (status) { | |
| 19504 | + document.editor.isSaved = false; | |
| 19505 | + } // TODO: BC. | |
| 19506 | + | |
| 19507 | + | |
| 19508 | + elementor.channels.editor.reply('status', status).trigger('status:change', status); | |
| 19509 | + | |
| 19510 | + if (document.editor.isChanged) { | |
| 19511 | + this.component.startAutoSave(document); | |
| 19512 | + } | |
| 19513 | + } | |
| 19514 | + }]); | |
| 19515 | + return SetIsModified; | |
| 19516 | +}(_commandInternalBase.default); | |
| 19517 | + | |
| 19518 | +exports.SetIsModified = SetIsModified; | |
| 19519 | +var _default = SetIsModified; | |
| 19520 | +exports.default = _default; | |
| 19521 | + | |
| 19522 | +/***/ }), | |
| 19523 | +/* 871 */ | |
| 19524 | +/***/ (function(module, exports, __webpack_require__) { | |
| 19525 | + | |
| 19526 | +"use strict"; | |
| 19527 | + | |
| 19528 | + | |
| 19529 | +var _Object$keys = __webpack_require__(25); | |
| 19530 | + | |
| 19531 | +var _Object$defineProperty = __webpack_require__(1); | |
| 19532 | + | |
| 19533 | +_Object$defineProperty(exports, "__esModule", { | |
| 19534 | + value: true | |
| 19535 | +}); | |
| 19536 | + | |
| 19537 | +var _ui = __webpack_require__(872); | |
| 19538 | + | |
| 19539 | +_Object$keys(_ui).forEach(function (key) { | |
| 19540 | + if (key === "default" || key === "__esModule") return; | |
| 19541 | + | |
| 19542 | + _Object$defineProperty(exports, key, { | |
| 19543 | + enumerable: true, | |
| 19544 | + get: function get() { | |
| 19545 | + return _ui[key]; | |
| 19546 | + } | |
| 19547 | + }); | |
| 19548 | +}); | |
| 19549 | + | |
| 19550 | +/***/ }), | |
| 19551 | +/* 872 */ | |
| 19552 | +/***/ (function(module, exports, __webpack_require__) { | |
| 19553 | + | |
| 19554 | +"use strict"; | |
| 19555 | + | |
| 19556 | + | |
| 19557 | +var _Object$keys = __webpack_require__(25); | |
| 19558 | + | |
| 19559 | +var _Object$defineProperty = __webpack_require__(1); | |
| 19560 | + | |
| 19561 | +_Object$defineProperty(exports, "__esModule", { | |
| 19562 | + value: true | |
| 19563 | +}); | |
| 19564 | + | |
| 19565 | +var _save = __webpack_require__(873); | |
| 19566 | + | |
| 19567 | +_Object$keys(_save).forEach(function (key) { | |
| 19568 | + if (key === "default" || key === "__esModule") return; | |
| 19569 | + | |
| 19570 | + _Object$defineProperty(exports, key, { | |
| 19571 | + enumerable: true, | |
| 19572 | + get: function get() { | |
| 19573 | + return _save[key]; | |
| 19574 | + } | |
| 19575 | + }); | |
| 19576 | +}); | |
| 19577 | + | |
| 19578 | +var _setIsModified = __webpack_require__(877); | |
| 19579 | + | |
| 19580 | +_Object$keys(_setIsModified).forEach(function (key) { | |
| 19581 | + if (key === "default" || key === "__esModule") return; | |
| 19582 | + | |
| 19583 | + _Object$defineProperty(exports, key, { | |
| 19584 | + enumerable: true, | |
| 19585 | + get: function get() { | |
| 19586 | + return _setIsModified[key]; | |
| 19587 | + } | |
| 19588 | + }); | |
| 19589 | +}); | |
| 19590 | + | |
| 19591 | +var _settings = __webpack_require__(879); | |
| 19592 | + | |
| 19593 | +_Object$keys(_settings).forEach(function (key) { | |
| 19594 | + if (key === "default" || key === "__esModule") return; | |
| 19595 | + | |
| 19596 | + _Object$defineProperty(exports, key, { | |
| 19597 | + enumerable: true, | |
| 19598 | + get: function get() { | |
| 19599 | + return _settings[key]; | |
| 19600 | + } | |
| 19601 | + }); | |
| 19602 | +}); | |
| 19603 | + | |
| 19604 | +/***/ }), | |
| 19605 | +/* 873 */ | |
| 19606 | +/***/ (function(module, exports, __webpack_require__) { | |
| 19607 | + | |
| 19608 | +"use strict"; | |
| 19609 | + | |
| 19610 | + | |
| 19611 | +var _Object$defineProperty = __webpack_require__(1); | |
| 19612 | + | |
| 19613 | +_Object$defineProperty(exports, "__esModule", { | |
| 19614 | + value: true | |
| 19615 | +}); | |
| 19616 | + | |
| 19617 | +_Object$defineProperty(exports, "FooterSaverAfterSave", { | |
| 19618 | + enumerable: true, | |
| 19619 | + get: function get() { | |
| 19620 | + return _after.FooterSaverAfterSave; | |
| 19621 | + } | |
| 19622 | +}); | |
| 19623 | + | |
| 19624 | +_Object$defineProperty(exports, "FooterSaverBeforeSave", { | |
| 19625 | + enumerable: true, | |
| 19626 | + get: function get() { | |
| 19627 | + return _before.FooterSaverBeforeSave; | |
| 19628 | + } | |
| 19629 | +}); | |
| 19630 | + | |
| 19631 | +_Object$defineProperty(exports, "FooterSaverCatchSave", { | |
| 19632 | + enumerable: true, | |
| 19633 | + get: function get() { | |
| 19634 | + return _catch.FooterSaverCatchSave; | |
| 19635 | + } | |
| 19636 | +}); | |
| 19637 | + | |
| 19638 | +var _after = __webpack_require__(874); | |
| 19639 | + | |
| 19640 | +var _before = __webpack_require__(875); | |
| 19641 | + | |
| 19642 | +var _catch = __webpack_require__(876); | |
| 19643 | + | |
| 19644 | +/***/ }), | |
| 19645 | +/* 874 */ | |
| 19646 | +/***/ (function(module, exports, __webpack_require__) { | |
| 19647 | + | |
| 19648 | +"use strict"; | |
| 19649 | + | |
| 19650 | + | |
| 19651 | +var _interopRequireDefault = __webpack_require__(0); | |
| 19652 | + | |
| 19653 | +var _Object$defineProperty = __webpack_require__(1); | |
| 19654 | + | |
| 19655 | +_Object$defineProperty(exports, "__esModule", { | |
| 19656 | + value: true | |
| 19657 | +}); | |
| 19658 | + | |
| 19659 | +exports.default = exports.FooterSaverAfterSave = void 0; | |
| 19660 | + | |
| 19661 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 19662 | + | |
| 19663 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 19664 | + | |
| 19665 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 19666 | + | |
| 19667 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 19668 | + | |
| 19669 | +var _after = _interopRequireDefault(__webpack_require__(281)); | |
| 19670 | + | |
| 19671 | +var FooterSaverAfterSave = /*#__PURE__*/function (_HookUIAfter) { | |
| 19672 | + (0, _inherits2.default)(FooterSaverAfterSave, _HookUIAfter); | |
| 19673 | + | |
| 19674 | + var _super = (0, _createSuper2.default)(FooterSaverAfterSave); | |
| 19675 | + | |
| 19676 | + function FooterSaverAfterSave() { | |
| 19677 | + (0, _classCallCheck2.default)(this, FooterSaverAfterSave); | |
| 19678 | + return _super.apply(this, arguments); | |
| 19679 | + } | |
| 19680 | + | |
| 19681 | + (0, _createClass2.default)(FooterSaverAfterSave, [{ | |
| 19682 | + key: "getCommand", | |
| 19683 | + value: function getCommand() { | |
| 19684 | + return 'document/save/save'; | |
| 19685 | + } | |
| 19686 | + }, { | |
| 19687 | + key: "getId", | |
| 19688 | + value: function getId() { | |
| 19689 | + return 'footer-saver-after-save'; | |
| 19690 | + } | |
| 19691 | + }, { | |
| 19692 | + key: "apply", | |
| 19693 | + value: function apply(args, result) { | |
| 19694 | + var status = args.status, | |
| 19695 | + data = result.data, | |
| 19696 | + _$e$components$get = $e.components.get('document/save'), | |
| 19697 | + footerSaver = _$e$components$get.footerSaver; | |
| 19698 | + | |
| 19699 | + NProgress.done(); | |
| 19700 | + footerSaver.ui.buttonPublish.removeClass('elementor-button-state'); | |
| 19701 | + footerSaver.ui.lastEditedWrapper.removeClass('elementor-state-active'); | |
| 19702 | + footerSaver.refreshWpPreview(); | |
| 19703 | + footerSaver.setLastEdited(data.config.document.last_edited); | |
| 19704 | + | |
| 19705 | + if (result.statusChanged && 'publish' === status && elementor.config.document.urls.have_a_look) { | |
| 19706 | + this.onPageStatusChange(); | |
| 19707 | + } | |
| 19708 | + } | |
| 19709 | + }, { | |
| 19710 | + key: "onPageStatusChange", | |
| 19711 | + value: function onPageStatusChange() { | |
| 19712 | + var buttons = []; | |
| 19713 | + buttons.push({ | |
| 19714 | + name: 'view_page', | |
| 19715 | + text: elementor.translate('have_a_look'), | |
| 19716 | + callback: function callback() { | |
| 19717 | + open(elementor.config.document.urls.have_a_look); | |
| 19718 | + } | |
| 19719 | + }); | |
| 19720 | + elementor.notifications.showToast({ | |
| 19721 | + message: elementor.config.document.panel.messages.publish_notification, | |
| 19722 | + buttons: buttons | |
| 19723 | + }); | |
| 19724 | + } | |
| 19725 | + }]); | |
| 19726 | + return FooterSaverAfterSave; | |
| 19727 | +}(_after.default); | |
| 19728 | + | |
| 19729 | +exports.FooterSaverAfterSave = FooterSaverAfterSave; | |
| 19730 | +var _default = FooterSaverAfterSave; | |
| 19731 | +exports.default = _default; | |
| 19732 | + | |
| 19733 | +/***/ }), | |
| 19734 | +/* 875 */ | |
| 19735 | +/***/ (function(module, exports, __webpack_require__) { | |
| 19736 | + | |
| 19737 | +"use strict"; | |
| 19738 | + | |
| 19739 | + | |
| 19740 | +var _interopRequireDefault = __webpack_require__(0); | |
| 19741 | + | |
| 19742 | +var _Object$defineProperty = __webpack_require__(1); | |
| 19743 | + | |
| 19744 | +_Object$defineProperty(exports, "__esModule", { | |
| 19745 | + value: true | |
| 19746 | +}); | |
| 19747 | + | |
| 19748 | +exports.default = exports.FooterSaverBeforeSave = void 0; | |
| 19749 | + | |
| 19750 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 19751 | + | |
| 19752 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 19753 | + | |
| 19754 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 19755 | + | |
| 19756 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 19757 | + | |
| 19758 | +var _before = _interopRequireDefault(__webpack_require__(642)); | |
| 19759 | + | |
| 19760 | +var FooterSaverBeforeSave = /*#__PURE__*/function (_HookUIBefore) { | |
| 19761 | + (0, _inherits2.default)(FooterSaverBeforeSave, _HookUIBefore); | |
| 19762 | + | |
| 19763 | + var _super = (0, _createSuper2.default)(FooterSaverBeforeSave); | |
| 19764 | + | |
| 19765 | + function FooterSaverBeforeSave() { | |
| 19766 | + (0, _classCallCheck2.default)(this, FooterSaverBeforeSave); | |
| 19767 | + return _super.apply(this, arguments); | |
| 19768 | + } | |
| 19769 | + | |
| 19770 | + (0, _createClass2.default)(FooterSaverBeforeSave, [{ | |
| 19771 | + key: "getCommand", | |
| 19772 | + value: function getCommand() { | |
| 19773 | + return 'document/save/save'; | |
| 19774 | + } | |
| 19775 | + }, { | |
| 19776 | + key: "getId", | |
| 19777 | + value: function getId() { | |
| 19778 | + return 'footer-saver-before-save'; | |
| 19779 | + } | |
| 19780 | + }, { | |
| 19781 | + key: "apply", | |
| 19782 | + value: function apply(args) { | |
| 19783 | + var status = args.status, | |
| 19784 | + _$e$components$get = $e.components.get('document/save'), | |
| 19785 | + footerSaver = _$e$components$get.footerSaver; | |
| 19786 | + | |
| 19787 | + NProgress.start(); | |
| 19788 | + | |
| 19789 | + if ('autosave' === status) { | |
| 19790 | + footerSaver.ui.lastEditedWrapper.addClass('elementor-state-active'); | |
| 19791 | + } else { | |
| 19792 | + footerSaver.ui.buttonPublish.addClass('elementor-button-state'); | |
| 19793 | + } | |
| 19794 | + } | |
| 19795 | + }]); | |
| 19796 | + return FooterSaverBeforeSave; | |
| 19797 | +}(_before.default); | |
| 19798 | + | |
| 19799 | +exports.FooterSaverBeforeSave = FooterSaverBeforeSave; | |
| 19800 | +var _default = FooterSaverBeforeSave; | |
| 19801 | +exports.default = _default; | |
| 19802 | + | |
| 19803 | +/***/ }), | |
| 19804 | +/* 876 */ | |
| 19805 | +/***/ (function(module, exports, __webpack_require__) { | |
| 19806 | + | |
| 19807 | +"use strict"; | |
| 19808 | + | |
| 19809 | + | |
| 19810 | +var _interopRequireDefault = __webpack_require__(0); | |
| 19811 | + | |
| 19812 | +var _Object$defineProperty = __webpack_require__(1); | |
| 19813 | + | |
| 19814 | +_Object$defineProperty(exports, "__esModule", { | |
| 19815 | + value: true | |
| 19816 | +}); | |
| 19817 | + | |
| 19818 | +exports.default = exports.FooterSaverCatchSave = void 0; | |
| 19819 | + | |
| 19820 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 19821 | + | |
| 19822 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 19823 | + | |
| 19824 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 19825 | + | |
| 19826 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 19827 | + | |
| 19828 | +var _catch = _interopRequireDefault(__webpack_require__(643)); | |
| 19829 | + | |
| 19830 | +var FooterSaverCatchSave = /*#__PURE__*/function (_HookUICatch) { | |
| 19831 | + (0, _inherits2.default)(FooterSaverCatchSave, _HookUICatch); | |
| 19832 | + | |
| 19833 | + var _super = (0, _createSuper2.default)(FooterSaverCatchSave); | |
| 19834 | + | |
| 19835 | + function FooterSaverCatchSave() { | |
| 19836 | + (0, _classCallCheck2.default)(this, FooterSaverCatchSave); | |
| 19837 | + return _super.apply(this, arguments); | |
| 19838 | + } | |
| 19839 | + | |
| 19840 | + (0, _createClass2.default)(FooterSaverCatchSave, [{ | |
| 19841 | + key: "getCommand", | |
| 19842 | + value: function getCommand() { | |
| 19843 | + return 'document/save/save'; | |
| 19844 | + } | |
| 19845 | + }, { | |
| 19846 | + key: "getId", | |
| 19847 | + value: function getId() { | |
| 19848 | + return 'footer-saver-catch-save'; | |
| 19849 | + } | |
| 19850 | + }, { | |
| 19851 | + key: "apply", | |
| 19852 | + value: function apply() { | |
| 19853 | + NProgress.done(); | |
| 19854 | + $e.components.get('document/save').footerSaver.ui.buttonPublish.removeClass('elementor-button-state'); | |
| 19855 | + } | |
| 19856 | + }]); | |
| 19857 | + return FooterSaverCatchSave; | |
| 19858 | +}(_catch.default); | |
| 19859 | + | |
| 19860 | +exports.FooterSaverCatchSave = FooterSaverCatchSave; | |
| 19861 | +var _default = FooterSaverCatchSave; | |
| 19862 | +exports.default = _default; | |
| 19863 | + | |
| 19864 | +/***/ }), | |
| 19865 | +/* 877 */ | |
| 19866 | +/***/ (function(module, exports, __webpack_require__) { | |
| 19867 | + | |
| 19868 | +"use strict"; | |
| 19869 | + | |
| 19870 | + | |
| 19871 | +var _Object$defineProperty = __webpack_require__(1); | |
| 19872 | + | |
| 19873 | +_Object$defineProperty(exports, "__esModule", { | |
| 19874 | + value: true | |
| 19875 | +}); | |
| 19876 | + | |
| 19877 | +_Object$defineProperty(exports, "FooterSaverActiveSaveButtons", { | |
| 19878 | + enumerable: true, | |
| 19879 | + get: function get() { | |
| 19880 | + return _after.FooterSaverActiveSaveButtons; | |
| 19881 | + } | |
| 19882 | +}); | |
| 19883 | + | |
| 19884 | +var _after = __webpack_require__(878); | |
| 19885 | + | |
| 19886 | +/***/ }), | |
| 19887 | +/* 878 */ | |
| 19888 | +/***/ (function(module, exports, __webpack_require__) { | |
| 19889 | + | |
| 19890 | +"use strict"; | |
| 19891 | + | |
| 19892 | + | |
| 19893 | +var _interopRequireDefault = __webpack_require__(0); | |
| 19894 | + | |
| 19895 | +var _Object$defineProperty = __webpack_require__(1); | |
| 19896 | + | |
| 19897 | +_Object$defineProperty(exports, "__esModule", { | |
| 19898 | + value: true | |
| 19899 | +}); | |
| 19900 | + | |
| 19901 | +exports.default = exports.FooterSaverActiveSaveButtons = void 0; | |
| 19902 | + | |
| 19903 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 19904 | + | |
| 19905 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 19906 | + | |
| 19907 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 19908 | + | |
| 19909 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 19910 | + | |
| 19911 | +var _after = _interopRequireDefault(__webpack_require__(281)); | |
| 19912 | + | |
| 19913 | +var FooterSaverActiveSaveButtons = /*#__PURE__*/function (_HookUIAfter) { | |
| 19914 | + (0, _inherits2.default)(FooterSaverActiveSaveButtons, _HookUIAfter); | |
| 19915 | + | |
| 19916 | + var _super = (0, _createSuper2.default)(FooterSaverActiveSaveButtons); | |
| 19917 | + | |
| 19918 | + function FooterSaverActiveSaveButtons() { | |
| 19919 | + (0, _classCallCheck2.default)(this, FooterSaverActiveSaveButtons); | |
| 19920 | + return _super.apply(this, arguments); | |
| 19921 | + } | |
| 19922 | + | |
| 19923 | + (0, _createClass2.default)(FooterSaverActiveSaveButtons, [{ | |
| 19924 | + key: "getCommand", | |
| 19925 | + value: function getCommand() { | |
| 19926 | + return 'document/save/set-is-modified'; | |
| 19927 | + } | |
| 19928 | + }, { | |
| 19929 | + key: "getId", | |
| 19930 | + value: function getId() { | |
| 19931 | + return 'footer-saver-activate-save-buttons'; | |
| 19932 | + } | |
| 19933 | + }, { | |
| 19934 | + key: "apply", | |
| 19935 | + value: function apply(args) { | |
| 19936 | + var status = args.status, | |
| 19937 | + document = args.document; | |
| 19938 | + $e.components.get('document/save').footerSaver.activateSaveButtons(document, status); | |
| 19939 | + } | |
| 19940 | + }]); | |
| 19941 | + return FooterSaverActiveSaveButtons; | |
| 19942 | +}(_after.default); | |
| 19943 | + | |
| 19944 | +exports.FooterSaverActiveSaveButtons = FooterSaverActiveSaveButtons; | |
| 19945 | +var _default = FooterSaverActiveSaveButtons; | |
| 19946 | +exports.default = _default; | |
| 19947 | + | |
| 19948 | +/***/ }), | |
| 19949 | +/* 879 */ | |
| 19950 | +/***/ (function(module, exports, __webpack_require__) { | |
| 19951 | + | |
| 19952 | +"use strict"; | |
| 19953 | + | |
| 19954 | + | |
| 19955 | +var _interopRequireDefault = __webpack_require__(0); | |
| 19956 | + | |
| 19957 | +var _Object$defineProperty = __webpack_require__(1); | |
| 19958 | + | |
| 19959 | +_Object$defineProperty(exports, "__esModule", { | |
| 19960 | + value: true | |
| 19961 | +}); | |
| 19962 | + | |
| 19963 | +exports.default = exports.FooterSeverRefreshMenu = void 0; | |
| 19964 | + | |
| 19965 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 19966 | + | |
| 19967 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 19968 | + | |
| 19969 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 19970 | + | |
| 19971 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 19972 | + | |
| 19973 | +var _after = _interopRequireDefault(__webpack_require__(281)); | |
| 19974 | + | |
| 19975 | +var FooterSeverRefreshMenu = /*#__PURE__*/function (_HookUIAfter) { | |
| 19976 | + (0, _inherits2.default)(FooterSeverRefreshMenu, _HookUIAfter); | |
| 19977 | + | |
| 19978 | + var _super = (0, _createSuper2.default)(FooterSeverRefreshMenu); | |
| 19979 | + | |
| 19980 | + function FooterSeverRefreshMenu() { | |
| 19981 | + (0, _classCallCheck2.default)(this, FooterSeverRefreshMenu); | |
| 19982 | + return _super.apply(this, arguments); | |
| 19983 | + } | |
| 19984 | + | |
| 19985 | + (0, _createClass2.default)(FooterSeverRefreshMenu, [{ | |
| 19986 | + key: "getCommand", | |
| 19987 | + value: function getCommand() { | |
| 19988 | + return 'document/elements/settings'; | |
| 19989 | + } | |
| 19990 | + }, { | |
| 19991 | + key: "getId", | |
| 19992 | + value: function getId() { | |
| 19993 | + return 'footer-saver-refresh-menu'; | |
| 19994 | + } | |
| 19995 | + }, { | |
| 19996 | + key: "getContainerType", | |
| 19997 | + value: function getContainerType() { | |
| 19998 | + return 'document'; | |
| 19999 | + } | |
| 20000 | + }, { | |
| 20001 | + key: "getConditions", | |
| 20002 | + value: function getConditions(args) { | |
| 20003 | + return args.settings && 'undefined' !== typeof args.settings.post_status; | |
| 20004 | + } | |
| 20005 | + }, { | |
| 20006 | + key: "apply", | |
| 20007 | + value: function apply(args) { | |
| 20008 | + var _$e$components$get = $e.components.get('document/save'), | |
| 20009 | + footerSaver = _$e$components$get.footerSaver; | |
| 20010 | + | |
| 20011 | + footerSaver.setMenuItems(args.container.document); | |
| 20012 | + footerSaver.refreshWpPreview(); | |
| 20013 | + } | |
| 20014 | + }]); | |
| 20015 | + return FooterSeverRefreshMenu; | |
| 20016 | +}(_after.default); | |
| 20017 | + | |
| 20018 | +exports.FooterSeverRefreshMenu = FooterSeverRefreshMenu; | |
| 20019 | +var _default = FooterSeverRefreshMenu; | |
| 20020 | +exports.default = _default; | |
| 20021 | + | |
| 20022 | +/***/ }), | |
| 20023 | +/* 880 */ | |
| 20024 | +/***/ (function(module, exports, __webpack_require__) { | |
| 20025 | + | |
| 20026 | +"use strict"; | |
| 20027 | + | |
| 20028 | + | |
| 20029 | +var _interopRequireWildcard = __webpack_require__(34); | |
| 20030 | + | |
| 20031 | +var _interopRequireDefault = __webpack_require__(0); | |
| 20032 | + | |
| 20033 | +var _Object$defineProperty = __webpack_require__(1); | |
| 20034 | + | |
| 20035 | +_Object$defineProperty(exports, "__esModule", { | |
| 20036 | + value: true | |
| 20037 | +}); | |
| 20038 | + | |
| 20039 | +exports.default = void 0; | |
| 20040 | + | |
| 20041 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 20042 | + | |
| 20043 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 20044 | + | |
| 20045 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 20046 | + | |
| 20047 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 20048 | + | |
| 20049 | +var _componentBase = _interopRequireDefault(__webpack_require__(87)); | |
| 20050 | + | |
| 20051 | +var commands = _interopRequireWildcard(__webpack_require__(881)); | |
| 20052 | + | |
| 20053 | +var Component = /*#__PURE__*/function (_ComponentBase) { | |
| 20054 | + (0, _inherits2.default)(Component, _ComponentBase); | |
| 20055 | + | |
| 20056 | + var _super = (0, _createSuper2.default)(Component); | |
| 20057 | + | |
| 20058 | + function Component() { | |
| 20059 | + (0, _classCallCheck2.default)(this, Component); | |
| 20060 | + return _super.apply(this, arguments); | |
| 20061 | + } | |
| 20062 | + | |
| 20063 | + (0, _createClass2.default)(Component, [{ | |
| 20064 | + key: "getNamespace", | |
| 20065 | + value: function getNamespace() { | |
| 20066 | + return 'document/ui'; | |
| 20067 | + } | |
| 20068 | + }, { | |
| 20069 | + key: "defaultCommands", | |
| 20070 | + value: function defaultCommands() { | |
| 20071 | + return this.importCommands(commands); | |
| 20072 | + } | |
| 20073 | + }, { | |
| 20074 | + key: "defaultShortcuts", | |
| 20075 | + value: function defaultShortcuts() { | |
| 1127 | 20076 | return { |
| 1128 | - major1: parseInt(major1), | |
| 1129 | - major2: parseInt(major2), | |
| 1130 | - minor: parseInt(minor), | |
| 1131 | - build: build | |
| 20077 | + copy: { | |
| 20078 | + keys: 'ctrl+c', | |
| 20079 | + exclude: ['input'] | |
| 20080 | + }, | |
| 20081 | + delete: { | |
| 20082 | + keys: 'del', | |
| 20083 | + exclude: ['input'] | |
| 20084 | + }, | |
| 20085 | + duplicate: { | |
| 20086 | + keys: 'ctrl+d' | |
| 20087 | + }, | |
| 20088 | + paste: { | |
| 20089 | + keys: 'ctrl+v', | |
| 20090 | + exclude: ['input'] | |
| 20091 | + }, | |
| 20092 | + 'paste-style': { | |
| 20093 | + keys: 'ctrl+shift+v', | |
| 20094 | + exclude: ['input'] | |
| 20095 | + } | |
| 1132 | 20096 | }; |
| 1133 | 20097 | } |
| 20098 | + }]); | |
| 20099 | + return Component; | |
| 20100 | +}(_componentBase.default); | |
| 1134 | 20101 | |
| 20102 | +exports.default = Component; | |
| 20103 | + | |
| 20104 | +/***/ }), | |
| 20105 | +/* 881 */ | |
| 20106 | +/***/ (function(module, exports, __webpack_require__) { | |
| 20107 | + | |
| 20108 | +"use strict"; | |
| 20109 | + | |
| 20110 | + | |
| 20111 | +var _Object$defineProperty = __webpack_require__(1); | |
| 20112 | + | |
| 20113 | +_Object$defineProperty(exports, "__esModule", { | |
| 20114 | + value: true | |
| 20115 | +}); | |
| 20116 | + | |
| 20117 | +_Object$defineProperty(exports, "Copy", { | |
| 20118 | + enumerable: true, | |
| 20119 | + get: function get() { | |
| 20120 | + return _copy.Copy; | |
| 20121 | + } | |
| 20122 | +}); | |
| 20123 | + | |
| 20124 | +_Object$defineProperty(exports, "Delete", { | |
| 20125 | + enumerable: true, | |
| 20126 | + get: function get() { | |
| 20127 | + return _delete.Delete; | |
| 20128 | + } | |
| 20129 | +}); | |
| 20130 | + | |
| 20131 | +_Object$defineProperty(exports, "Duplicate", { | |
| 20132 | + enumerable: true, | |
| 20133 | + get: function get() { | |
| 20134 | + return _duplicate.Duplicate; | |
| 20135 | + } | |
| 20136 | +}); | |
| 20137 | + | |
| 20138 | +_Object$defineProperty(exports, "Paste", { | |
| 20139 | + enumerable: true, | |
| 20140 | + get: function get() { | |
| 20141 | + return _paste.Paste; | |
| 20142 | + } | |
| 20143 | +}); | |
| 20144 | + | |
| 20145 | +_Object$defineProperty(exports, "PasteStyle", { | |
| 20146 | + enumerable: true, | |
| 20147 | + get: function get() { | |
| 20148 | + return _pasteStyle.PasteStyle; | |
| 20149 | + } | |
| 20150 | +}); | |
| 20151 | + | |
| 20152 | +var _copy = __webpack_require__(882); | |
| 20153 | + | |
| 20154 | +var _delete = __webpack_require__(883); | |
| 20155 | + | |
| 20156 | +var _duplicate = __webpack_require__(884); | |
| 20157 | + | |
| 20158 | +var _paste = __webpack_require__(885); | |
| 20159 | + | |
| 20160 | +var _pasteStyle = __webpack_require__(886); | |
| 20161 | + | |
| 20162 | +/***/ }), | |
| 20163 | +/* 882 */ | |
| 20164 | +/***/ (function(module, exports, __webpack_require__) { | |
| 20165 | + | |
| 20166 | +"use strict"; | |
| 20167 | + | |
| 20168 | + | |
| 20169 | +var _interopRequireDefault = __webpack_require__(0); | |
| 20170 | + | |
| 20171 | +var _Object$defineProperty = __webpack_require__(1); | |
| 20172 | + | |
| 20173 | +_Object$defineProperty(exports, "__esModule", { | |
| 20174 | + value: true | |
| 20175 | +}); | |
| 20176 | + | |
| 20177 | +exports.default = exports.Copy = void 0; | |
| 20178 | + | |
| 20179 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 20180 | + | |
| 20181 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 20182 | + | |
| 20183 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 20184 | + | |
| 20185 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 20186 | + | |
| 20187 | +var _commandBase = _interopRequireDefault(__webpack_require__(23)); | |
| 20188 | + | |
| 20189 | +var Copy = /*#__PURE__*/function (_CommandBase) { | |
| 20190 | + (0, _inherits2.default)(Copy, _CommandBase); | |
| 20191 | + | |
| 20192 | + var _super = (0, _createSuper2.default)(Copy); | |
| 20193 | + | |
| 20194 | + function Copy() { | |
| 20195 | + (0, _classCallCheck2.default)(this, Copy); | |
| 20196 | + return _super.apply(this, arguments); | |
| 20197 | + } | |
| 20198 | + | |
| 20199 | + (0, _createClass2.default)(Copy, [{ | |
| 20200 | + key: "apply", | |
| 20201 | + value: function apply() { | |
| 20202 | + var selectedElement = elementor.getCurrentElement(); | |
| 20203 | + | |
| 20204 | + if (selectedElement) { | |
| 20205 | + return $e.run('document/elements/copy', { | |
| 20206 | + container: selectedElement.getContainer() | |
| 20207 | + }); | |
| 20208 | + } | |
| 20209 | + | |
| 20210 | + return false; | |
| 20211 | + } | |
| 20212 | + }]); | |
| 20213 | + return Copy; | |
| 20214 | +}(_commandBase.default); | |
| 20215 | + | |
| 20216 | +exports.Copy = Copy; | |
| 20217 | +var _default = Copy; | |
| 20218 | +exports.default = _default; | |
| 20219 | + | |
| 20220 | +/***/ }), | |
| 20221 | +/* 883 */ | |
| 20222 | +/***/ (function(module, exports, __webpack_require__) { | |
| 20223 | + | |
| 20224 | +"use strict"; | |
| 20225 | + | |
| 20226 | + | |
| 20227 | +var _interopRequireDefault = __webpack_require__(0); | |
| 20228 | + | |
| 20229 | +var _Object$defineProperty = __webpack_require__(1); | |
| 20230 | + | |
| 20231 | +_Object$defineProperty(exports, "__esModule", { | |
| 20232 | + value: true | |
| 20233 | +}); | |
| 20234 | + | |
| 20235 | +exports.default = exports.Delete = void 0; | |
| 20236 | + | |
| 20237 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 20238 | + | |
| 20239 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 20240 | + | |
| 20241 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 20242 | + | |
| 20243 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 20244 | + | |
| 20245 | +var _commandBase = _interopRequireDefault(__webpack_require__(23)); | |
| 20246 | + | |
| 20247 | +var Delete = /*#__PURE__*/function (_CommandBase) { | |
| 20248 | + (0, _inherits2.default)(Delete, _CommandBase); | |
| 20249 | + | |
| 20250 | + var _super = (0, _createSuper2.default)(Delete); | |
| 20251 | + | |
| 20252 | + function Delete() { | |
| 20253 | + (0, _classCallCheck2.default)(this, Delete); | |
| 20254 | + return _super.apply(this, arguments); | |
| 20255 | + } | |
| 20256 | + | |
| 20257 | + (0, _createClass2.default)(Delete, [{ | |
| 20258 | + key: "apply", | |
| 20259 | + value: function apply() { | |
| 20260 | + var selectedElement = elementor.getCurrentElement(); | |
| 20261 | + | |
| 20262 | + if (selectedElement) { | |
| 20263 | + return $e.run('document/elements/delete', { | |
| 20264 | + container: selectedElement.getContainer() | |
| 20265 | + }); | |
| 20266 | + } | |
| 20267 | + | |
| 20268 | + return false; | |
| 20269 | + } | |
| 20270 | + }]); | |
| 20271 | + return Delete; | |
| 20272 | +}(_commandBase.default); | |
| 20273 | + | |
| 20274 | +exports.Delete = Delete; | |
| 20275 | +var _default = Delete; | |
| 20276 | +exports.default = _default; | |
| 20277 | + | |
| 20278 | +/***/ }), | |
| 20279 | +/* 884 */ | |
| 20280 | +/***/ (function(module, exports, __webpack_require__) { | |
| 20281 | + | |
| 20282 | +"use strict"; | |
| 20283 | + | |
| 20284 | + | |
| 20285 | +var _interopRequireDefault = __webpack_require__(0); | |
| 20286 | + | |
| 20287 | +var _Object$defineProperty = __webpack_require__(1); | |
| 20288 | + | |
| 20289 | +_Object$defineProperty(exports, "__esModule", { | |
| 20290 | + value: true | |
| 20291 | +}); | |
| 20292 | + | |
| 20293 | +exports.default = exports.Duplicate = void 0; | |
| 20294 | + | |
| 20295 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 20296 | + | |
| 20297 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 20298 | + | |
| 20299 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 20300 | + | |
| 20301 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 20302 | + | |
| 20303 | +var _commandBase = _interopRequireDefault(__webpack_require__(23)); | |
| 20304 | + | |
| 20305 | +var Duplicate = /*#__PURE__*/function (_CommandBase) { | |
| 20306 | + (0, _inherits2.default)(Duplicate, _CommandBase); | |
| 20307 | + | |
| 20308 | + var _super = (0, _createSuper2.default)(Duplicate); | |
| 20309 | + | |
| 20310 | + function Duplicate() { | |
| 20311 | + (0, _classCallCheck2.default)(this, Duplicate); | |
| 20312 | + return _super.apply(this, arguments); | |
| 20313 | + } | |
| 20314 | + | |
| 20315 | + (0, _createClass2.default)(Duplicate, [{ | |
| 20316 | + key: "apply", | |
| 20317 | + value: function apply() { | |
| 20318 | + var selectedElement = elementor.getCurrentElement(); | |
| 20319 | + | |
| 20320 | + if (selectedElement) { | |
| 20321 | + return $e.run('document/elements/duplicate', { | |
| 20322 | + container: selectedElement.getContainer() | |
| 20323 | + }); | |
| 20324 | + } | |
| 20325 | + | |
| 20326 | + return false; | |
| 20327 | + } | |
| 20328 | + }]); | |
| 20329 | + return Duplicate; | |
| 20330 | +}(_commandBase.default); | |
| 20331 | + | |
| 20332 | +exports.Duplicate = Duplicate; | |
| 20333 | +var _default = Duplicate; | |
| 20334 | +exports.default = _default; | |
| 20335 | + | |
| 20336 | +/***/ }), | |
| 20337 | +/* 885 */ | |
| 20338 | +/***/ (function(module, exports, __webpack_require__) { | |
| 20339 | + | |
| 20340 | +"use strict"; | |
| 20341 | + | |
| 20342 | + | |
| 20343 | +var _interopRequireDefault = __webpack_require__(0); | |
| 20344 | + | |
| 20345 | +var _Object$defineProperty = __webpack_require__(1); | |
| 20346 | + | |
| 20347 | +_Object$defineProperty(exports, "__esModule", { | |
| 20348 | + value: true | |
| 20349 | +}); | |
| 20350 | + | |
| 20351 | +exports.default = exports.Paste = void 0; | |
| 20352 | + | |
| 20353 | +var _values = _interopRequireDefault(__webpack_require__(54)); | |
| 20354 | + | |
| 20355 | +__webpack_require__(309); | |
| 20356 | + | |
| 20357 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 20358 | + | |
| 20359 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 20360 | + | |
| 20361 | +var _get2 = _interopRequireDefault(__webpack_require__(26)); | |
| 20362 | + | |
| 20363 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(16)); | |
| 20364 | + | |
| 20365 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 20366 | + | |
| 20367 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 20368 | + | |
| 20369 | +var _commandBase = _interopRequireDefault(__webpack_require__(23)); | |
| 20370 | + | |
| 20371 | +var _helper = _interopRequireDefault(__webpack_require__(215)); | |
| 20372 | + | |
| 20373 | +var Paste = /*#__PURE__*/function (_CommandBase) { | |
| 20374 | + (0, _inherits2.default)(Paste, _CommandBase); | |
| 20375 | + | |
| 20376 | + var _super = (0, _createSuper2.default)(Paste); | |
| 20377 | + | |
| 20378 | + function Paste() { | |
| 20379 | + (0, _classCallCheck2.default)(this, Paste); | |
| 20380 | + return _super.apply(this, arguments); | |
| 20381 | + } | |
| 20382 | + | |
| 20383 | + (0, _createClass2.default)(Paste, [{ | |
| 20384 | + key: "initialize", | |
| 20385 | + value: function initialize(args) { | |
| 20386 | + var _args$containers = args.containers, | |
| 20387 | + containers = _args$containers === void 0 ? [args.container] : _args$containers; | |
| 20388 | + (0, _get2.default)((0, _getPrototypeOf2.default)(Paste.prototype), "initialize", this).call(this, args); | |
| 20389 | + this.storage = elementorCommon.storage.get('clipboard') || []; | |
| 20390 | + this.storage = this.storage.map(function (model) { | |
| 20391 | + return new Backbone.Model(model); | |
| 20392 | + }); | |
| 20393 | + | |
| 20394 | + if (!containers[0]) { | |
| 20395 | + this.target = elementor.getCurrentElement(); | |
| 20396 | + this.target = this.target ? [this.target.getContainer()] : null; | |
| 20397 | + } else { | |
| 20398 | + this.target = containers; | |
| 20399 | + } | |
| 20400 | + } | |
| 20401 | + }, { | |
| 20402 | + key: "apply", | |
| 20403 | + value: function apply(args) { | |
| 20404 | + var _this = this; | |
| 20405 | + | |
| 20406 | + if (!this.target || 0 === this.storage.length) { | |
| 20407 | + return false; | |
| 20408 | + } | |
| 20409 | + | |
| 20410 | + var result = []; | |
| 20411 | + this.target.forEach(function ( | |
| 20412 | + /* Container */ | |
| 20413 | + container) { | |
| 20414 | + var _args$options = args.options, | |
| 20415 | + options = _args$options === void 0 ? {} : _args$options, | |
| 20416 | + pasteOptions = _helper.default.getPasteOptions(_this.storage[0], container); | |
| 20417 | + | |
| 20418 | + if (!pasteOptions.isValidChild) { | |
| 20419 | + if (pasteOptions.isSameElement) { | |
| 20420 | + options.at = container.parent.model.get('elements').findIndex(container.model) + 1; // For same element always paste on his parent. | |
| 20421 | + | |
| 20422 | + container = container.parent; | |
| 20423 | + } else if (pasteOptions.isValidGrandChild) { | |
| 20424 | + options.rebuild = true; | |
| 20425 | + } | |
| 20426 | + } | |
| 20427 | + | |
| 20428 | + if ((0, _values.default)(pasteOptions).some(function (opt) { | |
| 20429 | + return !!opt; | |
| 20430 | + })) { | |
| 20431 | + var commandArgs = { | |
| 20432 | + container: container | |
| 20433 | + }; | |
| 20434 | + | |
| 20435 | + if (undefined !== options.rebuild) { | |
| 20436 | + commandArgs.rebuild = options.rebuild; | |
| 20437 | + } | |
| 20438 | + | |
| 20439 | + if (undefined !== options.at) { | |
| 20440 | + commandArgs.at = options.at; | |
| 20441 | + } | |
| 20442 | + | |
| 20443 | + result.push($e.run('document/elements/paste', commandArgs)); | |
| 20444 | + } | |
| 20445 | + }); | |
| 20446 | + | |
| 20447 | + if (0 === result.length) { | |
| 20448 | + return false; | |
| 20449 | + } else if (1 === result.length) { | |
| 20450 | + return result[0]; | |
| 20451 | + } | |
| 20452 | + | |
| 20453 | + return result; | |
| 20454 | + } | |
| 20455 | + }]); | |
| 20456 | + return Paste; | |
| 20457 | +}(_commandBase.default); | |
| 20458 | + | |
| 20459 | +exports.Paste = Paste; | |
| 20460 | +var _default = Paste; | |
| 20461 | +exports.default = _default; | |
| 20462 | + | |
| 20463 | +/***/ }), | |
| 20464 | +/* 886 */ | |
| 20465 | +/***/ (function(module, exports, __webpack_require__) { | |
| 20466 | + | |
| 20467 | +"use strict"; | |
| 20468 | + | |
| 20469 | + | |
| 20470 | +var _interopRequireDefault = __webpack_require__(0); | |
| 20471 | + | |
| 20472 | +var _Object$defineProperty = __webpack_require__(1); | |
| 20473 | + | |
| 20474 | +_Object$defineProperty(exports, "__esModule", { | |
| 20475 | + value: true | |
| 20476 | +}); | |
| 20477 | + | |
| 20478 | +exports.default = exports.PasteStyle = void 0; | |
| 20479 | + | |
| 20480 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 20481 | + | |
| 20482 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 20483 | + | |
| 20484 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 20485 | + | |
| 20486 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 20487 | + | |
| 20488 | +var _commandBase = _interopRequireDefault(__webpack_require__(23)); | |
| 20489 | + | |
| 20490 | +var PasteStyle = /*#__PURE__*/function (_CommandBase) { | |
| 20491 | + (0, _inherits2.default)(PasteStyle, _CommandBase); | |
| 20492 | + | |
| 20493 | + var _super = (0, _createSuper2.default)(PasteStyle); | |
| 20494 | + | |
| 20495 | + function PasteStyle() { | |
| 20496 | + (0, _classCallCheck2.default)(this, PasteStyle); | |
| 20497 | + return _super.apply(this, arguments); | |
| 20498 | + } | |
| 20499 | + | |
| 20500 | + (0, _createClass2.default)(PasteStyle, [{ | |
| 20501 | + key: "apply", | |
| 20502 | + value: function apply() { | |
| 20503 | + var selectedElement = elementor.getCurrentElement(); | |
| 20504 | + | |
| 20505 | + if (selectedElement) { | |
| 20506 | + return $e.run('document/elements/paste-style', { | |
| 20507 | + container: selectedElement.getContainer() | |
| 20508 | + }); | |
| 20509 | + } | |
| 20510 | + | |
| 20511 | + return false; | |
| 20512 | + } | |
| 20513 | + }]); | |
| 20514 | + return PasteStyle; | |
| 20515 | +}(_commandBase.default); | |
| 20516 | + | |
| 20517 | +exports.PasteStyle = PasteStyle; | |
| 20518 | +var _default = PasteStyle; | |
| 20519 | +exports.default = _default; | |
| 20520 | + | |
| 20521 | +/***/ }), | |
| 20522 | +/* 887 */ | |
| 20523 | +/***/ (function(module, exports, __webpack_require__) { | |
| 20524 | + | |
| 20525 | +"use strict"; | |
| 20526 | + | |
| 20527 | + | |
| 20528 | +var _Object$keys = __webpack_require__(25); | |
| 20529 | + | |
| 20530 | +var _Object$defineProperty = __webpack_require__(1); | |
| 20531 | + | |
| 20532 | +_Object$defineProperty(exports, "__esModule", { | |
| 20533 | + value: true | |
| 20534 | +}); | |
| 20535 | + | |
| 20536 | +var _data = __webpack_require__(888); | |
| 20537 | + | |
| 20538 | +_Object$keys(_data).forEach(function (key) { | |
| 20539 | + if (key === "default" || key === "__esModule") return; | |
| 20540 | + | |
| 20541 | + _Object$defineProperty(exports, key, { | |
| 20542 | + enumerable: true, | |
| 20543 | + get: function get() { | |
| 20544 | + return _data[key]; | |
| 20545 | + } | |
| 20546 | + }); | |
| 20547 | +}); | |
| 20548 | + | |
| 20549 | +var _ui = __webpack_require__(906); | |
| 20550 | + | |
| 20551 | +_Object$keys(_ui).forEach(function (key) { | |
| 20552 | + if (key === "default" || key === "__esModule") return; | |
| 20553 | + | |
| 20554 | + _Object$defineProperty(exports, key, { | |
| 20555 | + enumerable: true, | |
| 20556 | + get: function get() { | |
| 20557 | + return _ui[key]; | |
| 20558 | + } | |
| 20559 | + }); | |
| 20560 | +}); | |
| 20561 | + | |
| 20562 | +/***/ }), | |
| 20563 | +/* 888 */ | |
| 20564 | +/***/ (function(module, exports, __webpack_require__) { | |
| 20565 | + | |
| 20566 | +"use strict"; | |
| 20567 | + | |
| 20568 | + | |
| 20569 | +var _Object$keys = __webpack_require__(25); | |
| 20570 | + | |
| 20571 | +var _Object$defineProperty = __webpack_require__(1); | |
| 20572 | + | |
| 20573 | +_Object$defineProperty(exports, "__esModule", { | |
| 20574 | + value: true | |
| 20575 | +}); | |
| 20576 | + | |
| 20577 | +var _create = __webpack_require__(889); | |
| 20578 | + | |
| 20579 | +_Object$keys(_create).forEach(function (key) { | |
| 20580 | + if (key === "default" || key === "__esModule") return; | |
| 20581 | + | |
| 20582 | + _Object$defineProperty(exports, key, { | |
| 20583 | + enumerable: true, | |
| 20584 | + get: function get() { | |
| 20585 | + return _create[key]; | |
| 20586 | + } | |
| 20587 | + }); | |
| 20588 | +}); | |
| 20589 | + | |
| 20590 | +var _delete = __webpack_require__(895); | |
| 20591 | + | |
| 20592 | +_Object$keys(_delete).forEach(function (key) { | |
| 20593 | + if (key === "default" || key === "__esModule") return; | |
| 20594 | + | |
| 20595 | + _Object$defineProperty(exports, key, { | |
| 20596 | + enumerable: true, | |
| 20597 | + get: function get() { | |
| 20598 | + return _delete[key]; | |
| 20599 | + } | |
| 20600 | + }); | |
| 20601 | +}); | |
| 20602 | + | |
| 20603 | +var _move = __webpack_require__(897); | |
| 20604 | + | |
| 20605 | +_Object$keys(_move).forEach(function (key) { | |
| 20606 | + if (key === "default" || key === "__esModule") return; | |
| 20607 | + | |
| 20608 | + _Object$defineProperty(exports, key, { | |
| 20609 | + enumerable: true, | |
| 20610 | + get: function get() { | |
| 20611 | + return _move[key]; | |
| 20612 | + } | |
| 20613 | + }); | |
| 20614 | +}); | |
| 20615 | + | |
| 20616 | +var _paste = __webpack_require__(899); | |
| 20617 | + | |
| 20618 | +_Object$keys(_paste).forEach(function (key) { | |
| 20619 | + if (key === "default" || key === "__esModule") return; | |
| 20620 | + | |
| 20621 | + _Object$defineProperty(exports, key, { | |
| 20622 | + enumerable: true, | |
| 20623 | + get: function get() { | |
| 20624 | + return _paste[key]; | |
| 20625 | + } | |
| 20626 | + }); | |
| 20627 | +}); | |
| 20628 | + | |
| 20629 | +var _settings = __webpack_require__(901); | |
| 20630 | + | |
| 20631 | +_Object$keys(_settings).forEach(function (key) { | |
| 20632 | + if (key === "default" || key === "__esModule") return; | |
| 20633 | + | |
| 20634 | + _Object$defineProperty(exports, key, { | |
| 20635 | + enumerable: true, | |
| 20636 | + get: function get() { | |
| 20637 | + return _settings[key]; | |
| 20638 | + } | |
| 20639 | + }); | |
| 20640 | +}); | |
| 20641 | + | |
| 20642 | +/***/ }), | |
| 20643 | +/* 889 */ | |
| 20644 | +/***/ (function(module, exports, __webpack_require__) { | |
| 20645 | + | |
| 20646 | +"use strict"; | |
| 20647 | + | |
| 20648 | + | |
| 20649 | +var _Object$defineProperty = __webpack_require__(1); | |
| 20650 | + | |
| 20651 | +_Object$defineProperty(exports, "__esModule", { | |
| 20652 | + value: true | |
| 20653 | +}); | |
| 20654 | + | |
| 20655 | +_Object$defineProperty(exports, "InnerSectionColumns", { | |
| 20656 | + enumerable: true, | |
| 20657 | + get: function get() { | |
| 20658 | + return _innerSectionColumns.InnerSectionColumns; | |
| 20659 | + } | |
| 20660 | +}); | |
| 20661 | + | |
| 20662 | +_Object$defineProperty(exports, "IsValidChild", { | |
| 20663 | + enumerable: true, | |
| 20664 | + get: function get() { | |
| 20665 | + return _isValidChild.IsValidChild; | |
| 20666 | + } | |
| 20667 | +}); | |
| 20668 | + | |
| 20669 | +_Object$defineProperty(exports, "SectionColumns", { | |
| 20670 | + enumerable: true, | |
| 20671 | + get: function get() { | |
| 20672 | + return _sectionColumns.SectionColumns; | |
| 20673 | + } | |
| 20674 | +}); | |
| 20675 | + | |
| 20676 | +_Object$defineProperty(exports, "SectionColumnsLimit", { | |
| 20677 | + enumerable: true, | |
| 20678 | + get: function get() { | |
| 20679 | + return _sectionColumnsLimit.SectionColumnsLimit; | |
| 20680 | + } | |
| 20681 | +}); | |
| 20682 | + | |
| 20683 | +_Object$defineProperty(exports, "SectionColumnsResetLayout", { | |
| 20684 | + enumerable: true, | |
| 20685 | + get: function get() { | |
| 20686 | + return _sectionColumnsResetLayout.SectionColumnsResetLayout; | |
| 20687 | + } | |
| 20688 | +}); | |
| 20689 | + | |
| 20690 | +var _innerSectionColumns = __webpack_require__(890); | |
| 20691 | + | |
| 20692 | +var _isValidChild = __webpack_require__(891); | |
| 20693 | + | |
| 20694 | +var _sectionColumns = __webpack_require__(892); | |
| 20695 | + | |
| 20696 | +var _sectionColumnsLimit = __webpack_require__(893); | |
| 20697 | + | |
| 20698 | +var _sectionColumnsResetLayout = __webpack_require__(894); | |
| 20699 | + | |
| 20700 | +/***/ }), | |
| 20701 | +/* 890 */ | |
| 20702 | +/***/ (function(module, exports, __webpack_require__) { | |
| 20703 | + | |
| 20704 | +"use strict"; | |
| 20705 | + | |
| 20706 | + | |
| 20707 | +var _interopRequireDefault = __webpack_require__(0); | |
| 20708 | + | |
| 20709 | +var _Object$defineProperty = __webpack_require__(1); | |
| 20710 | + | |
| 20711 | +_Object$defineProperty(exports, "__esModule", { | |
| 20712 | + value: true | |
| 20713 | +}); | |
| 20714 | + | |
| 20715 | +exports.default = exports.InnerSectionColumns = void 0; | |
| 20716 | + | |
| 20717 | +var _isArray = _interopRequireDefault(__webpack_require__(86)); | |
| 20718 | + | |
| 20719 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 20720 | + | |
| 20721 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 20722 | + | |
| 20723 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 20724 | + | |
| 20725 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 20726 | + | |
| 20727 | +var _after = _interopRequireDefault(__webpack_require__(228)); | |
| 20728 | + | |
| 20729 | +var _helper = _interopRequireDefault(__webpack_require__(706)); | |
| 20730 | + | |
| 20731 | +var _section = __webpack_require__(256); | |
| 20732 | + | |
| 20733 | +var InnerSectionColumns = /*#__PURE__*/function (_After) { | |
| 20734 | + (0, _inherits2.default)(InnerSectionColumns, _After); | |
| 20735 | + | |
| 20736 | + var _super = (0, _createSuper2.default)(InnerSectionColumns); | |
| 20737 | + | |
| 20738 | + function InnerSectionColumns() { | |
| 20739 | + (0, _classCallCheck2.default)(this, InnerSectionColumns); | |
| 20740 | + return _super.apply(this, arguments); | |
| 20741 | + } | |
| 20742 | + | |
| 20743 | + (0, _createClass2.default)(InnerSectionColumns, [{ | |
| 20744 | + key: "getCommand", | |
| 20745 | + value: function getCommand() { | |
| 20746 | + return 'document/elements/create'; | |
| 20747 | + } | |
| 20748 | + }, { | |
| 20749 | + key: "getId", | |
| 20750 | + value: function getId() { | |
| 20751 | + return 'create-inner-section-columns'; | |
| 20752 | + } | |
| 20753 | + }, { | |
| 20754 | + key: "getContainerType", | |
| 20755 | + value: function getContainerType() { | |
| 20756 | + return 'column'; | |
| 20757 | + } | |
| 20758 | + }, { | |
| 20759 | + key: "getConditions", | |
| 20760 | + value: function getConditions(args) { | |
| 20761 | + return args.model.isInner && !args.model.elements; | |
| 20762 | + } | |
| 1135 | 20763 | /** |
| 1136 | - * Get total of major. | |
| 20764 | + * @inheritDoc | |
| 1137 | 20765 | * |
| 1138 | - * 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, | |
| 1139 | - * versions with major2 more then 9 will be added to total. | |
| 20766 | + * @param {{}} args | |
| 20767 | + * @param {Container||Container[]} containers | |
| 1140 | 20768 | * |
| 1141 | - * @param {Version} versionObj | |
| 1142 | - * | |
| 1143 | - * @return {number} | |
| 20769 | + * @returns {boolean} | |
| 1144 | 20770 | */ |
| 20771 | + | |
| 1145 | 20772 | }, { |
| 1146 | - key: "getTotalMajor", | |
| 1147 | - value: function getTotalMajor(versionObj) { | |
| 1148 | - var total = parseInt("".concat(versionObj.major1).concat(versionObj.major2, "0")); | |
| 1149 | - total = Number((total / 10).toFixed(0)); | |
| 1150 | - if (versionObj.major2 > 9) { | |
| 1151 | - total = versionObj.major2 - 9; | |
| 20773 | + key: "apply", | |
| 20774 | + value: function apply(args, containers) { | |
| 20775 | + var _args$structure = args.structure, | |
| 20776 | + structure = _args$structure === void 0 ? '20' : _args$structure, | |
| 20777 | + _args$options = args.options, | |
| 20778 | + options = _args$options === void 0 ? {} : _args$options; | |
| 20779 | + | |
| 20780 | + if (!(0, _isArray.default)(containers)) { | |
| 20781 | + containers = [containers]; | |
| 1152 | 20782 | } |
| 1153 | - return total; | |
| 20783 | + | |
| 20784 | + _helper.default.createSectionColumns(containers, _section.DEFAULT_INNER_SECTION_COLUMNS, options, structure); | |
| 1154 | 20785 | } |
| 20786 | + }]); | |
| 20787 | + return InnerSectionColumns; | |
| 20788 | +}(_after.default); | |
| 1155 | 20789 | |
| 20790 | +exports.InnerSectionColumns = InnerSectionColumns; | |
| 20791 | +var _default = InnerSectionColumns; | |
| 20792 | +exports.default = _default; | |
| 20793 | + | |
| 20794 | +/***/ }), | |
| 20795 | +/* 891 */ | |
| 20796 | +/***/ (function(module, exports, __webpack_require__) { | |
| 20797 | + | |
| 20798 | +"use strict"; | |
| 20799 | + | |
| 20800 | + | |
| 20801 | +var _interopRequireDefault = __webpack_require__(0); | |
| 20802 | + | |
| 20803 | +var _Object$defineProperty = __webpack_require__(1); | |
| 20804 | + | |
| 20805 | +_Object$defineProperty(exports, "__esModule", { | |
| 20806 | + value: true | |
| 20807 | +}); | |
| 20808 | + | |
| 20809 | +exports.default = exports.IsValidChild = void 0; | |
| 20810 | + | |
| 20811 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 20812 | + | |
| 20813 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 20814 | + | |
| 20815 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 20816 | + | |
| 20817 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 20818 | + | |
| 20819 | +var _dependency = _interopRequireDefault(__webpack_require__(356)); | |
| 20820 | + | |
| 20821 | +var _helper = _interopRequireDefault(__webpack_require__(215)); | |
| 20822 | + | |
| 20823 | +var IsValidChild = /*#__PURE__*/function (_Dependency) { | |
| 20824 | + (0, _inherits2.default)(IsValidChild, _Dependency); | |
| 20825 | + | |
| 20826 | + var _super = (0, _createSuper2.default)(IsValidChild); | |
| 20827 | + | |
| 20828 | + function IsValidChild() { | |
| 20829 | + (0, _classCallCheck2.default)(this, IsValidChild); | |
| 20830 | + return _super.apply(this, arguments); | |
| 20831 | + } | |
| 20832 | + | |
| 20833 | + (0, _createClass2.default)(IsValidChild, [{ | |
| 20834 | + key: "getCommand", | |
| 20835 | + value: function getCommand() { | |
| 20836 | + return 'document/elements/create'; | |
| 20837 | + } | |
| 20838 | + }, { | |
| 20839 | + key: "getId", | |
| 20840 | + value: function getId() { | |
| 20841 | + return 'is-valid-child'; | |
| 20842 | + } | |
| 20843 | + }, { | |
| 20844 | + key: "apply", | |
| 20845 | + value: function apply(args) { | |
| 20846 | + var _args$containers = args.containers, | |
| 20847 | + containers = _args$containers === void 0 ? [args.container] : _args$containers, | |
| 20848 | + _args$model = args.model, | |
| 20849 | + model = _args$model === void 0 ? {} : _args$model, | |
| 20850 | + modelToCreate = new Backbone.Model(model); | |
| 20851 | + return containers.some(function ( | |
| 20852 | + /* Container */ | |
| 20853 | + container) { | |
| 20854 | + return _helper.default.isValidChild(modelToCreate, container.model); | |
| 20855 | + }); | |
| 20856 | + } | |
| 20857 | + }]); | |
| 20858 | + return IsValidChild; | |
| 20859 | +}(_dependency.default); | |
| 20860 | + | |
| 20861 | +exports.IsValidChild = IsValidChild; | |
| 20862 | +var _default = IsValidChild; | |
| 20863 | +exports.default = _default; | |
| 20864 | + | |
| 20865 | +/***/ }), | |
| 20866 | +/* 892 */ | |
| 20867 | +/***/ (function(module, exports, __webpack_require__) { | |
| 20868 | + | |
| 20869 | +"use strict"; | |
| 20870 | + | |
| 20871 | + | |
| 20872 | +var _interopRequireDefault = __webpack_require__(0); | |
| 20873 | + | |
| 20874 | +var _Object$defineProperty = __webpack_require__(1); | |
| 20875 | + | |
| 20876 | +_Object$defineProperty(exports, "__esModule", { | |
| 20877 | + value: true | |
| 20878 | +}); | |
| 20879 | + | |
| 20880 | +exports.default = exports.SectionColumns = void 0; | |
| 20881 | + | |
| 20882 | +var _isArray = _interopRequireDefault(__webpack_require__(86)); | |
| 20883 | + | |
| 20884 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 20885 | + | |
| 20886 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 20887 | + | |
| 20888 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 20889 | + | |
| 20890 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 20891 | + | |
| 20892 | +var _after = _interopRequireDefault(__webpack_require__(228)); | |
| 20893 | + | |
| 20894 | +var _helper = _interopRequireDefault(__webpack_require__(706)); | |
| 20895 | + | |
| 20896 | +var _section = __webpack_require__(256); | |
| 20897 | + | |
| 20898 | +var SectionColumns = /*#__PURE__*/function (_After) { | |
| 20899 | + (0, _inherits2.default)(SectionColumns, _After); | |
| 20900 | + | |
| 20901 | + var _super = (0, _createSuper2.default)(SectionColumns); | |
| 20902 | + | |
| 20903 | + function SectionColumns() { | |
| 20904 | + (0, _classCallCheck2.default)(this, SectionColumns); | |
| 20905 | + return _super.apply(this, arguments); | |
| 20906 | + } | |
| 20907 | + | |
| 20908 | + (0, _createClass2.default)(SectionColumns, [{ | |
| 20909 | + key: "getCommand", | |
| 20910 | + value: function getCommand() { | |
| 20911 | + return 'document/elements/create'; | |
| 20912 | + } | |
| 20913 | + }, { | |
| 20914 | + key: "getId", | |
| 20915 | + value: function getId() { | |
| 20916 | + return 'create-section-columns'; | |
| 20917 | + } | |
| 20918 | + }, { | |
| 20919 | + key: "getContainerType", | |
| 20920 | + value: function getContainerType() { | |
| 20921 | + return 'document'; | |
| 20922 | + } | |
| 20923 | + }, { | |
| 20924 | + key: "getConditions", | |
| 20925 | + value: function getConditions(args) { | |
| 20926 | + return !args.model.elements; | |
| 20927 | + } | |
| 1156 | 20928 | /** |
| 1157 | - * @param {string} version1 | |
| 1158 | - * @param {string} version2 | |
| 20929 | + * @inheritDoc | |
| 1159 | 20930 | * |
| 1160 | - * @return {number} | |
| 20931 | + * @param {{}} args | |
| 20932 | + * @param {Container||Container[]} containers | |
| 20933 | + * | |
| 20934 | + * @returns {boolean} | |
| 1161 | 20935 | */ |
| 20936 | + | |
| 1162 | 20937 | }, { |
| 1163 | - key: "compareVersion", | |
| 1164 | - value: function compareVersion(version1, version2) { | |
| 1165 | - var _this = this; | |
| 1166 | - return [this.parseVersion(version1), this.parseVersion(version2)].map(function (versionObj) { | |
| 1167 | - return _this.getTotalMajor(versionObj); | |
| 1168 | - }).reduce(function (acc, major) { | |
| 1169 | - return acc - major; | |
| 20938 | + key: "apply", | |
| 20939 | + value: function apply(args, containers) { | |
| 20940 | + var _args$structure = args.structure, | |
| 20941 | + structure = _args$structure === void 0 ? false : _args$structure, | |
| 20942 | + _args$options = args.options, | |
| 20943 | + options = _args$options === void 0 ? {} : _args$options; | |
| 20944 | + | |
| 20945 | + if (!(0, _isArray.default)(containers)) { | |
| 20946 | + containers = [containers]; | |
| 20947 | + } | |
| 20948 | + | |
| 20949 | + var _args$columns = args.columns, | |
| 20950 | + columns = _args$columns === void 0 ? 1 : _args$columns; | |
| 20951 | + | |
| 20952 | + if (args.model.isInner && 1 === columns) { | |
| 20953 | + columns = _section.DEFAULT_INNER_SECTION_COLUMNS; | |
| 20954 | + } | |
| 20955 | + | |
| 20956 | + _helper.default.createSectionColumns(containers, columns, options, structure); | |
| 20957 | + } | |
| 20958 | + }]); | |
| 20959 | + return SectionColumns; | |
| 20960 | +}(_after.default); | |
| 20961 | + | |
| 20962 | +exports.SectionColumns = SectionColumns; | |
| 20963 | +var _default = SectionColumns; | |
| 20964 | +exports.default = _default; | |
| 20965 | + | |
| 20966 | +/***/ }), | |
| 20967 | +/* 893 */ | |
| 20968 | +/***/ (function(module, exports, __webpack_require__) { | |
| 20969 | + | |
| 20970 | +"use strict"; | |
| 20971 | + | |
| 20972 | + | |
| 20973 | +var _interopRequireDefault = __webpack_require__(0); | |
| 20974 | + | |
| 20975 | +var _Object$defineProperty = __webpack_require__(1); | |
| 20976 | + | |
| 20977 | +_Object$defineProperty(exports, "__esModule", { | |
| 20978 | + value: true | |
| 20979 | +}); | |
| 20980 | + | |
| 20981 | +exports.default = exports.SectionColumnsLimit = void 0; | |
| 20982 | + | |
| 20983 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 20984 | + | |
| 20985 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 20986 | + | |
| 20987 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 20988 | + | |
| 20989 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 20990 | + | |
| 20991 | +var _dependency = _interopRequireDefault(__webpack_require__(356)); | |
| 20992 | + | |
| 20993 | +var SectionColumnsLimit = /*#__PURE__*/function (_Dependency) { | |
| 20994 | + (0, _inherits2.default)(SectionColumnsLimit, _Dependency); | |
| 20995 | + | |
| 20996 | + var _super = (0, _createSuper2.default)(SectionColumnsLimit); | |
| 20997 | + | |
| 20998 | + function SectionColumnsLimit() { | |
| 20999 | + (0, _classCallCheck2.default)(this, SectionColumnsLimit); | |
| 21000 | + return _super.apply(this, arguments); | |
| 21001 | + } | |
| 21002 | + | |
| 21003 | + (0, _createClass2.default)(SectionColumnsLimit, [{ | |
| 21004 | + key: "getCommand", | |
| 21005 | + value: function getCommand() { | |
| 21006 | + return 'document/elements/create'; | |
| 21007 | + } | |
| 21008 | + }, { | |
| 21009 | + key: "getId", | |
| 21010 | + value: function getId() { | |
| 21011 | + return 'section-columns-limit'; | |
| 21012 | + } | |
| 21013 | + }, { | |
| 21014 | + key: "getContainerType", | |
| 21015 | + value: function getContainerType() { | |
| 21016 | + return 'section'; | |
| 21017 | + } | |
| 21018 | + }, { | |
| 21019 | + key: "apply", | |
| 21020 | + value: function apply(args) { | |
| 21021 | + var _args$containers = args.containers, | |
| 21022 | + containers = _args$containers === void 0 ? [args.container] : _args$containers; // If one of the targets have maximum columns reached break the command. | |
| 21023 | + | |
| 21024 | + return !containers.some(function ( | |
| 21025 | + /**Container*/ | |
| 21026 | + container) { | |
| 21027 | + return container.view.isCollectionFilled(); | |
| 1170 | 21028 | }); |
| 1171 | 21029 | } |
| 21030 | + }]); | |
| 21031 | + return SectionColumnsLimit; | |
| 21032 | +}(_dependency.default); | |
| 1172 | 21033 | |
| 21034 | +exports.SectionColumnsLimit = SectionColumnsLimit; | |
| 21035 | +var _default = SectionColumnsLimit; | |
| 21036 | +exports.default = _default; | |
| 21037 | + | |
| 21038 | +/***/ }), | |
| 21039 | +/* 894 */ | |
| 21040 | +/***/ (function(module, exports, __webpack_require__) { | |
| 21041 | + | |
| 21042 | +"use strict"; | |
| 21043 | + | |
| 21044 | + | |
| 21045 | +var _interopRequireDefault = __webpack_require__(0); | |
| 21046 | + | |
| 21047 | +var _Object$defineProperty = __webpack_require__(1); | |
| 21048 | + | |
| 21049 | +_Object$defineProperty(exports, "__esModule", { | |
| 21050 | + value: true | |
| 21051 | +}); | |
| 21052 | + | |
| 21053 | +exports.default = exports.SectionColumnsResetLayout = void 0; | |
| 21054 | + | |
| 21055 | +var _isArray = _interopRequireDefault(__webpack_require__(86)); | |
| 21056 | + | |
| 21057 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 21058 | + | |
| 21059 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 21060 | + | |
| 21061 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 21062 | + | |
| 21063 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 21064 | + | |
| 21065 | +var _after = _interopRequireDefault(__webpack_require__(228)); | |
| 21066 | + | |
| 21067 | +var SectionColumnsResetLayout = /*#__PURE__*/function (_After) { | |
| 21068 | + (0, _inherits2.default)(SectionColumnsResetLayout, _After); | |
| 21069 | + | |
| 21070 | + var _super = (0, _createSuper2.default)(SectionColumnsResetLayout); | |
| 21071 | + | |
| 21072 | + function SectionColumnsResetLayout() { | |
| 21073 | + (0, _classCallCheck2.default)(this, SectionColumnsResetLayout); | |
| 21074 | + return _super.apply(this, arguments); | |
| 21075 | + } | |
| 21076 | + | |
| 21077 | + (0, _createClass2.default)(SectionColumnsResetLayout, [{ | |
| 21078 | + key: "getCommand", | |
| 21079 | + value: function getCommand() { | |
| 21080 | + return 'document/elements/create'; | |
| 21081 | + } | |
| 21082 | + }, { | |
| 21083 | + key: "getId", | |
| 21084 | + value: function getId() { | |
| 21085 | + return 'section-columns-reset-layout'; | |
| 21086 | + } | |
| 21087 | + }, { | |
| 21088 | + key: "getContainerType", | |
| 21089 | + value: function getContainerType() { | |
| 21090 | + return 'section'; | |
| 21091 | + } | |
| 21092 | + }, { | |
| 21093 | + key: "getConditions", | |
| 21094 | + value: function getConditions() { | |
| 21095 | + // On `document/elements/move` do not fire the hook!. | |
| 21096 | + return !$e.commands.isCurrentFirstTrace('document/elements/move'); | |
| 21097 | + } | |
| 1173 | 21098 | /** |
| 1174 | - * @param {string} version | |
| 21099 | + * @inheritDoc | |
| 1175 | 21100 | * |
| 1176 | - * @return {boolean} | |
| 21101 | + * @param {{}} args | |
| 21102 | + * @param {Container||Container[]} containers | |
| 21103 | + * | |
| 21104 | + * @returns {boolean} | |
| 1177 | 21105 | */ |
| 21106 | + | |
| 1178 | 21107 | }, { |
| 1179 | - key: "isSoftDeprecated", | |
| 1180 | - value: function isSoftDeprecated(version) { | |
| 1181 | - var total = this.compareVersion(version, elementorWebCliConfig.version); | |
| 1182 | - return total <= 4; | |
| 21108 | + key: "apply", | |
| 21109 | + value: function apply(args, containers) { | |
| 21110 | + if (!(0, _isArray.default)(containers)) { | |
| 21111 | + containers = [containers]; | |
| 21112 | + } | |
| 21113 | + | |
| 21114 | + containers.forEach(function ( | |
| 21115 | + /**Container*/ | |
| 21116 | + container) { | |
| 21117 | + return container.parent.view.resetLayout(false); | |
| 21118 | + }); | |
| 1183 | 21119 | } |
| 21120 | + }]); | |
| 21121 | + return SectionColumnsResetLayout; | |
| 21122 | +}(_after.default); | |
| 1184 | 21123 | |
| 21124 | +exports.SectionColumnsResetLayout = SectionColumnsResetLayout; | |
| 21125 | +var _default = SectionColumnsResetLayout; | |
| 21126 | +exports.default = _default; | |
| 21127 | + | |
| 21128 | +/***/ }), | |
| 21129 | +/* 895 */ | |
| 21130 | +/***/ (function(module, exports, __webpack_require__) { | |
| 21131 | + | |
| 21132 | +"use strict"; | |
| 21133 | + | |
| 21134 | + | |
| 21135 | +var _Object$defineProperty = __webpack_require__(1); | |
| 21136 | + | |
| 21137 | +_Object$defineProperty(exports, "__esModule", { | |
| 21138 | + value: true | |
| 21139 | +}); | |
| 21140 | + | |
| 21141 | +_Object$defineProperty(exports, "SectionsColumns", { | |
| 21142 | + enumerable: true, | |
| 21143 | + get: function get() { | |
| 21144 | + return _sectionColumns.SectionsColumns; | |
| 21145 | + } | |
| 21146 | +}); | |
| 21147 | + | |
| 21148 | +var _sectionColumns = __webpack_require__(896); | |
| 21149 | + | |
| 21150 | +/***/ }), | |
| 21151 | +/* 896 */ | |
| 21152 | +/***/ (function(module, exports, __webpack_require__) { | |
| 21153 | + | |
| 21154 | +"use strict"; | |
| 21155 | + | |
| 21156 | + | |
| 21157 | +var _interopRequireDefault = __webpack_require__(0); | |
| 21158 | + | |
| 21159 | +var _Object$defineProperty = __webpack_require__(1); | |
| 21160 | + | |
| 21161 | +_Object$defineProperty(exports, "__esModule", { | |
| 21162 | + value: true | |
| 21163 | +}); | |
| 21164 | + | |
| 21165 | +exports.default = exports.SectionsColumns = void 0; | |
| 21166 | + | |
| 21167 | +var _isArray = _interopRequireDefault(__webpack_require__(86)); | |
| 21168 | + | |
| 21169 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 21170 | + | |
| 21171 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 21172 | + | |
| 21173 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 21174 | + | |
| 21175 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 21176 | + | |
| 21177 | +var _after = _interopRequireDefault(__webpack_require__(228)); | |
| 21178 | + | |
| 21179 | +var SectionsColumns = /*#__PURE__*/function (_After) { | |
| 21180 | + (0, _inherits2.default)(SectionsColumns, _After); | |
| 21181 | + | |
| 21182 | + var _super = (0, _createSuper2.default)(SectionsColumns); | |
| 21183 | + | |
| 21184 | + function SectionsColumns() { | |
| 21185 | + (0, _classCallCheck2.default)(this, SectionsColumns); | |
| 21186 | + return _super.apply(this, arguments); | |
| 21187 | + } | |
| 21188 | + | |
| 21189 | + (0, _createClass2.default)(SectionsColumns, [{ | |
| 21190 | + key: "getCommand", | |
| 21191 | + value: function getCommand() { | |
| 21192 | + return 'document/elements/delete'; | |
| 21193 | + } | |
| 21194 | + }, { | |
| 21195 | + key: "getId", | |
| 21196 | + value: function getId() { | |
| 21197 | + return 'delete-section-columns'; | |
| 21198 | + } | |
| 21199 | + }, { | |
| 21200 | + key: "getContainerType", | |
| 21201 | + value: function getContainerType() { | |
| 21202 | + return 'column'; | |
| 21203 | + } | |
| 21204 | + }, { | |
| 21205 | + key: "getConditions", | |
| 21206 | + value: function getConditions(args) { | |
| 21207 | + var _args$containers = args.containers, | |
| 21208 | + containers = _args$containers === void 0 ? [args.container] : _args$containers; // On `document/elements/move` do not fire the hook!. | |
| 21209 | + | |
| 21210 | + return !$e.commands.isCurrentFirstTrace('document/elements/move') && containers.some(function (container) { | |
| 21211 | + return (// If one of the targets is column. | |
| 21212 | + 'column' === container.model.get('elType') | |
| 21213 | + ); | |
| 21214 | + }); | |
| 21215 | + } | |
| 1185 | 21216 | /** |
| 1186 | - * @param {string} version | |
| 1187 | - * @return {boolean} | |
| 21217 | + * @inheritDoc | |
| 21218 | + * | |
| 21219 | + * @param {{}} args | |
| 21220 | + * @param {Container||Container[]} containers | |
| 21221 | + * | |
| 21222 | + * @returns {boolean} | |
| 1188 | 21223 | */ |
| 21224 | + | |
| 1189 | 21225 | }, { |
| 1190 | - key: "isHardDeprecated", | |
| 1191 | - value: function isHardDeprecated(version) { | |
| 1192 | - var total = this.compareVersion(version, elementorWebCliConfig.version); | |
| 1193 | - return total < 0 || total >= 8; | |
| 21226 | + key: "apply", | |
| 21227 | + value: function apply(args, containers) { | |
| 21228 | + if (!(0, _isArray.default)(containers)) { | |
| 21229 | + containers = [containers]; | |
| 21230 | + } | |
| 21231 | + | |
| 21232 | + containers.forEach(function ( | |
| 21233 | + /**Container*/ | |
| 21234 | + container) { | |
| 21235 | + var parent = container.parent; // If its not column, continue. | |
| 21236 | + | |
| 21237 | + if ('section' !== parent.model.get('elType')) { | |
| 21238 | + return; | |
| 21239 | + } // If deleted the last column, should recreate it. | |
| 21240 | + | |
| 21241 | + | |
| 21242 | + if (0 === parent.view.collection.length) { | |
| 21243 | + $e.run('document/elements/create', { | |
| 21244 | + container: parent, | |
| 21245 | + model: { | |
| 21246 | + elType: 'column' | |
| 21247 | + } | |
| 21248 | + }); | |
| 21249 | + } else { | |
| 21250 | + // Else, just reset section layout. | |
| 21251 | + parent.view.resetLayout(); | |
| 21252 | + } | |
| 21253 | + }); | |
| 1194 | 21254 | } |
| 1195 | 21255 | }]); |
| 1196 | -}(); | |
| 21256 | + return SectionsColumns; | |
| 21257 | +}(_after.default); | |
| 1197 | 21258 | |
| 21259 | +exports.SectionsColumns = SectionsColumns; | |
| 21260 | +var _default = SectionsColumns; | |
| 21261 | +exports.default = _default; | |
| 21262 | + | |
| 1198 | 21263 | /***/ }), |
| 21264 | +/* 897 */ | |
| 21265 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1199 | 21266 | |
| 1200 | -/***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js": | |
| 1201 | -/*!******************************************************************!*\ | |
| 1202 | - !*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***! | |
| 1203 | - \******************************************************************/ | |
| 1204 | -/***/ ((module) => { | |
| 21267 | +"use strict"; | |
| 1205 | 21268 | |
| 1206 | -function _arrayLikeToArray(r, a) { | |
| 1207 | - (null == a || a > r.length) && (a = r.length); | |
| 1208 | - for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; | |
| 1209 | - return n; | |
| 1210 | -} | |
| 1211 | -module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1212 | 21269 | |
| 21270 | +var _Object$defineProperty = __webpack_require__(1); | |
| 21271 | + | |
| 21272 | +_Object$defineProperty(exports, "__esModule", { | |
| 21273 | + value: true | |
| 21274 | +}); | |
| 21275 | + | |
| 21276 | +_Object$defineProperty(exports, "SectionColumnsSetStructure", { | |
| 21277 | + enumerable: true, | |
| 21278 | + get: function get() { | |
| 21279 | + return _sectionColumnsSetStructure.SectionColumnsSetStructure; | |
| 21280 | + } | |
| 21281 | +}); | |
| 21282 | + | |
| 21283 | +var _sectionColumnsSetStructure = __webpack_require__(898); | |
| 21284 | + | |
| 1213 | 21285 | /***/ }), |
| 21286 | +/* 898 */ | |
| 21287 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1214 | 21288 | |
| 1215 | -/***/ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js": | |
| 1216 | -/*!****************************************************************!*\ | |
| 1217 | - !*** ../node_modules/@babel/runtime/helpers/arrayWithHoles.js ***! | |
| 1218 | - \****************************************************************/ | |
| 1219 | -/***/ ((module) => { | |
| 21289 | +"use strict"; | |
| 1220 | 21290 | |
| 1221 | -function _arrayWithHoles(r) { | |
| 1222 | - if (Array.isArray(r)) return r; | |
| 1223 | -} | |
| 1224 | -module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1225 | 21291 | |
| 21292 | +var _interopRequireDefault = __webpack_require__(0); | |
| 21293 | + | |
| 21294 | +var _Object$defineProperty = __webpack_require__(1); | |
| 21295 | + | |
| 21296 | +_Object$defineProperty(exports, "__esModule", { | |
| 21297 | + value: true | |
| 21298 | +}); | |
| 21299 | + | |
| 21300 | +exports.default = exports.SectionColumnsSetStructure = void 0; | |
| 21301 | + | |
| 21302 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 21303 | + | |
| 21304 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 21305 | + | |
| 21306 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 21307 | + | |
| 21308 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 21309 | + | |
| 21310 | +var _after = _interopRequireDefault(__webpack_require__(228)); | |
| 21311 | + | |
| 21312 | +var SectionColumnsSetStructure = /*#__PURE__*/function (_After) { | |
| 21313 | + (0, _inherits2.default)(SectionColumnsSetStructure, _After); | |
| 21314 | + | |
| 21315 | + var _super = (0, _createSuper2.default)(SectionColumnsSetStructure); | |
| 21316 | + | |
| 21317 | + function SectionColumnsSetStructure() { | |
| 21318 | + (0, _classCallCheck2.default)(this, SectionColumnsSetStructure); | |
| 21319 | + return _super.apply(this, arguments); | |
| 21320 | + } | |
| 21321 | + | |
| 21322 | + (0, _createClass2.default)(SectionColumnsSetStructure, [{ | |
| 21323 | + key: "getCommand", | |
| 21324 | + value: function getCommand() { | |
| 21325 | + return 'document/elements/move'; | |
| 21326 | + } | |
| 21327 | + }, { | |
| 21328 | + key: "getId", | |
| 21329 | + value: function getId() { | |
| 21330 | + return 'section-columns-set-structure'; | |
| 21331 | + } | |
| 21332 | + }, { | |
| 21333 | + key: "getContainerType", | |
| 21334 | + value: function getContainerType() { | |
| 21335 | + return 'column'; | |
| 21336 | + } | |
| 21337 | + }, { | |
| 21338 | + key: "getConditions", | |
| 21339 | + value: function getConditions(args) { | |
| 21340 | + var _args$containers = args.containers, | |
| 21341 | + containers = _args$containers === void 0 ? [args.container] : _args$containers, | |
| 21342 | + target = args.target; // Fire the hook only when target is not equals to moved container parent. | |
| 21343 | + | |
| 21344 | + return containers.some(function ( | |
| 21345 | + /* Container */ | |
| 21346 | + container) { | |
| 21347 | + return container.parent !== target; | |
| 21348 | + }); | |
| 21349 | + } | |
| 21350 | + }, { | |
| 21351 | + key: "apply", | |
| 21352 | + value: function apply(args) { | |
| 21353 | + var _args$containers2 = args.containers, | |
| 21354 | + containers = _args$containers2 === void 0 ? [args.container] : _args$containers2, | |
| 21355 | + target = args.target; | |
| 21356 | + containers.forEach(function ( | |
| 21357 | + /* Container */ | |
| 21358 | + container) { | |
| 21359 | + return container.parent.view.resetLayout(); | |
| 21360 | + }); | |
| 21361 | + target.view.resetLayout(); | |
| 21362 | + return true; | |
| 21363 | + } | |
| 21364 | + }]); | |
| 21365 | + return SectionColumnsSetStructure; | |
| 21366 | +}(_after.default); | |
| 21367 | + | |
| 21368 | +exports.SectionColumnsSetStructure = SectionColumnsSetStructure; | |
| 21369 | +var _default = SectionColumnsSetStructure; | |
| 21370 | +exports.default = _default; | |
| 21371 | + | |
| 1226 | 21372 | /***/ }), |
| 21373 | +/* 899 */ | |
| 21374 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1227 | 21375 | |
| 1228 | -/***/ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js": | |
| 1229 | -/*!***********************************************************************!*\ | |
| 1230 | - !*** ../node_modules/@babel/runtime/helpers/assertThisInitialized.js ***! | |
| 1231 | - \***********************************************************************/ | |
| 1232 | -/***/ ((module) => { | |
| 21376 | +"use strict"; | |
| 1233 | 21377 | |
| 1234 | -function _assertThisInitialized(e) { | |
| 1235 | - if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
| 1236 | - return e; | |
| 1237 | -} | |
| 1238 | -module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1239 | 21378 | |
| 21379 | +var _Object$defineProperty = __webpack_require__(1); | |
| 21380 | + | |
| 21381 | +_Object$defineProperty(exports, "__esModule", { | |
| 21382 | + value: true | |
| 21383 | +}); | |
| 21384 | + | |
| 21385 | +_Object$defineProperty(exports, "IsPasteEnabled", { | |
| 21386 | + enumerable: true, | |
| 21387 | + get: function get() { | |
| 21388 | + return _isPasteEnabled.IsPasteEnabled; | |
| 21389 | + } | |
| 21390 | +}); | |
| 21391 | + | |
| 21392 | +var _isPasteEnabled = __webpack_require__(900); | |
| 21393 | + | |
| 1240 | 21394 | /***/ }), |
| 21395 | +/* 900 */ | |
| 21396 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1241 | 21397 | |
| 1242 | -/***/ "../node_modules/@babel/runtime/helpers/classCallCheck.js": | |
| 1243 | -/*!****************************************************************!*\ | |
| 1244 | - !*** ../node_modules/@babel/runtime/helpers/classCallCheck.js ***! | |
| 1245 | - \****************************************************************/ | |
| 1246 | -/***/ ((module) => { | |
| 21398 | +"use strict"; | |
| 1247 | 21399 | |
| 1248 | -function _classCallCheck(a, n) { | |
| 1249 | - if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); | |
| 1250 | -} | |
| 1251 | -module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1252 | 21400 | |
| 21401 | +var _interopRequireDefault = __webpack_require__(0); | |
| 21402 | + | |
| 21403 | +var _Object$defineProperty = __webpack_require__(1); | |
| 21404 | + | |
| 21405 | +_Object$defineProperty(exports, "__esModule", { | |
| 21406 | + value: true | |
| 21407 | +}); | |
| 21408 | + | |
| 21409 | +exports.default = exports.IsPasteEnabled = void 0; | |
| 21410 | + | |
| 21411 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 21412 | + | |
| 21413 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 21414 | + | |
| 21415 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 21416 | + | |
| 21417 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 21418 | + | |
| 21419 | +var _dependency = _interopRequireDefault(__webpack_require__(356)); | |
| 21420 | + | |
| 21421 | +var _helper = _interopRequireDefault(__webpack_require__(215)); | |
| 21422 | + | |
| 21423 | +var IsPasteEnabled = /*#__PURE__*/function (_Dependency) { | |
| 21424 | + (0, _inherits2.default)(IsPasteEnabled, _Dependency); | |
| 21425 | + | |
| 21426 | + var _super = (0, _createSuper2.default)(IsPasteEnabled); | |
| 21427 | + | |
| 21428 | + function IsPasteEnabled() { | |
| 21429 | + (0, _classCallCheck2.default)(this, IsPasteEnabled); | |
| 21430 | + return _super.apply(this, arguments); | |
| 21431 | + } | |
| 21432 | + | |
| 21433 | + (0, _createClass2.default)(IsPasteEnabled, [{ | |
| 21434 | + key: "getCommand", | |
| 21435 | + value: function getCommand() { | |
| 21436 | + return 'document/elements/paste'; | |
| 21437 | + } | |
| 21438 | + }, { | |
| 21439 | + key: "getId", | |
| 21440 | + value: function getId() { | |
| 21441 | + return 'is-paste-enabled'; | |
| 21442 | + } | |
| 21443 | + }, { | |
| 21444 | + key: "getConditions", | |
| 21445 | + value: function getConditions(args) { | |
| 21446 | + return !args.rebuild; | |
| 21447 | + } | |
| 21448 | + }, { | |
| 21449 | + key: "apply", | |
| 21450 | + value: function apply(args) { | |
| 21451 | + var _args$containers = args.containers, | |
| 21452 | + containers = _args$containers === void 0 ? [args.container] : _args$containers; | |
| 21453 | + return containers.some(function (container) { | |
| 21454 | + return _helper.default.isPasteEnabled(container); | |
| 21455 | + }); | |
| 21456 | + } | |
| 21457 | + }]); | |
| 21458 | + return IsPasteEnabled; | |
| 21459 | +}(_dependency.default); | |
| 21460 | + | |
| 21461 | +exports.IsPasteEnabled = IsPasteEnabled; | |
| 21462 | +var _default = IsPasteEnabled; | |
| 21463 | +exports.default = _default; | |
| 21464 | + | |
| 1253 | 21465 | /***/ }), |
| 21466 | +/* 901 */ | |
| 21467 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1254 | 21468 | |
| 1255 | -/***/ "../node_modules/@babel/runtime/helpers/createClass.js": | |
| 1256 | -/*!*************************************************************!*\ | |
| 1257 | - !*** ../node_modules/@babel/runtime/helpers/createClass.js ***! | |
| 1258 | - \*************************************************************/ | |
| 1259 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 21469 | +"use strict"; | |
| 1260 | 21470 | |
| 1261 | -var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); | |
| 1262 | -function _defineProperties(e, r) { | |
| 1263 | - for (var t = 0; t < r.length; t++) { | |
| 1264 | - var o = r[t]; | |
| 1265 | - o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o); | |
| 21471 | + | |
| 21472 | +var _Object$defineProperty = __webpack_require__(1); | |
| 21473 | + | |
| 21474 | +_Object$defineProperty(exports, "__esModule", { | |
| 21475 | + value: true | |
| 21476 | +}); | |
| 21477 | + | |
| 21478 | +_Object$defineProperty(exports, "HandleDynamic", { | |
| 21479 | + enumerable: true, | |
| 21480 | + get: function get() { | |
| 21481 | + return _handleDynamic.HandleDynamic; | |
| 1266 | 21482 | } |
| 1267 | -} | |
| 1268 | -function _createClass(e, r, t) { | |
| 1269 | - return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { | |
| 1270 | - writable: !1 | |
| 1271 | - }), e; | |
| 1272 | -} | |
| 1273 | -module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 21483 | +}); | |
| 1274 | 21484 | |
| 21485 | +_Object$defineProperty(exports, "ResizeColumn", { | |
| 21486 | + enumerable: true, | |
| 21487 | + get: function get() { | |
| 21488 | + return _resizeColumn.ResizeColumn; | |
| 21489 | + } | |
| 21490 | +}); | |
| 21491 | + | |
| 21492 | +_Object$defineProperty(exports, "ResizeColumnLimit", { | |
| 21493 | + enumerable: true, | |
| 21494 | + get: function get() { | |
| 21495 | + return _resizeColumnLimit.ResizeColumnLimit; | |
| 21496 | + } | |
| 21497 | +}); | |
| 21498 | + | |
| 21499 | +_Object$defineProperty(exports, "SetStructure", { | |
| 21500 | + enumerable: true, | |
| 21501 | + get: function get() { | |
| 21502 | + return _setStructure.SetStructure; | |
| 21503 | + } | |
| 21504 | +}); | |
| 21505 | + | |
| 21506 | +var _handleDynamic = __webpack_require__(902); | |
| 21507 | + | |
| 21508 | +var _resizeColumn = __webpack_require__(903); | |
| 21509 | + | |
| 21510 | +var _resizeColumnLimit = __webpack_require__(904); | |
| 21511 | + | |
| 21512 | +var _setStructure = __webpack_require__(905); | |
| 21513 | + | |
| 1275 | 21514 | /***/ }), |
| 21515 | +/* 902 */ | |
| 21516 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1276 | 21517 | |
| 1277 | -/***/ "../node_modules/@babel/runtime/helpers/defineProperty.js": | |
| 1278 | -/*!****************************************************************!*\ | |
| 1279 | - !*** ../node_modules/@babel/runtime/helpers/defineProperty.js ***! | |
| 1280 | - \****************************************************************/ | |
| 1281 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 21518 | +"use strict"; | |
| 1282 | 21519 | |
| 1283 | -var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); | |
| 1284 | -function _defineProperty(e, r, t) { | |
| 1285 | - return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, { | |
| 1286 | - value: t, | |
| 1287 | - enumerable: !0, | |
| 1288 | - configurable: !0, | |
| 1289 | - writable: !0 | |
| 1290 | - }) : e[r] = t, e; | |
| 1291 | -} | |
| 1292 | -module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1293 | 21520 | |
| 21521 | +var _interopRequireDefault = __webpack_require__(0); | |
| 21522 | + | |
| 21523 | +var _Object$defineProperty = __webpack_require__(1); | |
| 21524 | + | |
| 21525 | +_Object$defineProperty(exports, "__esModule", { | |
| 21526 | + value: true | |
| 21527 | +}); | |
| 21528 | + | |
| 21529 | +exports.default = exports.HandleDynamic = void 0; | |
| 21530 | + | |
| 21531 | +var _defineProperty2 = _interopRequireDefault(__webpack_require__(27)); | |
| 21532 | + | |
| 21533 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 21534 | + | |
| 21535 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 21536 | + | |
| 21537 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 21538 | + | |
| 21539 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 21540 | + | |
| 21541 | +var _after = _interopRequireDefault(__webpack_require__(228)); | |
| 21542 | + | |
| 21543 | +var HandleDynamic = /*#__PURE__*/function (_After) { | |
| 21544 | + (0, _inherits2.default)(HandleDynamic, _After); | |
| 21545 | + | |
| 21546 | + var _super = (0, _createSuper2.default)(HandleDynamic); | |
| 21547 | + | |
| 21548 | + function HandleDynamic() { | |
| 21549 | + (0, _classCallCheck2.default)(this, HandleDynamic); | |
| 21550 | + return _super.apply(this, arguments); | |
| 21551 | + } | |
| 21552 | + | |
| 21553 | + (0, _createClass2.default)(HandleDynamic, [{ | |
| 21554 | + key: "getCommand", | |
| 21555 | + value: function getCommand() { | |
| 21556 | + return 'document/elements/settings'; | |
| 21557 | + } | |
| 21558 | + }, { | |
| 21559 | + key: "getId", | |
| 21560 | + value: function getId() { | |
| 21561 | + return 'handle-dynamic'; | |
| 21562 | + } | |
| 21563 | + }, { | |
| 21564 | + key: "getContainerType", | |
| 21565 | + value: function getContainerType() { | |
| 21566 | + return 'dynamic'; | |
| 21567 | + } | |
| 21568 | + }, { | |
| 21569 | + key: "getConditions", | |
| 21570 | + value: function getConditions(args) { | |
| 21571 | + var _args$containers = args.containers, | |
| 21572 | + containers = _args$containers === void 0 ? [args.container] : _args$containers; | |
| 21573 | + return containers.some(function ( | |
| 21574 | + /**Container*/ | |
| 21575 | + container) { | |
| 21576 | + return 'dynamic' === container.type; | |
| 21577 | + }); | |
| 21578 | + } | |
| 21579 | + }, { | |
| 21580 | + key: "apply", | |
| 21581 | + value: function apply(args) { | |
| 21582 | + var _args$containers2 = args.containers, | |
| 21583 | + containers = _args$containers2 === void 0 ? [args.container] : _args$containers2; | |
| 21584 | + containers.forEach(function ( | |
| 21585 | + /**Container*/ | |
| 21586 | + container) { | |
| 21587 | + if ('dynamic' === container.type) { | |
| 21588 | + var tagText = elementor.dynamicTags.tagContainerToTagText(container), | |
| 21589 | + commandArgs = { | |
| 21590 | + container: container.parent, | |
| 21591 | + settings: (0, _defineProperty2.default)({}, container.view.options.controlName, tagText) | |
| 21592 | + }; | |
| 21593 | + $e.run('document/dynamic/settings', commandArgs); | |
| 21594 | + } | |
| 21595 | + }); | |
| 21596 | + return true; | |
| 21597 | + } | |
| 21598 | + }]); | |
| 21599 | + return HandleDynamic; | |
| 21600 | +}(_after.default); | |
| 21601 | + | |
| 21602 | +exports.HandleDynamic = HandleDynamic; | |
| 21603 | +var _default = HandleDynamic; | |
| 21604 | +exports.default = _default; | |
| 21605 | + | |
| 1294 | 21606 | /***/ }), |
| 21607 | +/* 903 */ | |
| 21608 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1295 | 21609 | |
| 1296 | -/***/ "../node_modules/@babel/runtime/helpers/get.js": | |
| 1297 | -/*!*****************************************************!*\ | |
| 1298 | - !*** ../node_modules/@babel/runtime/helpers/get.js ***! | |
| 1299 | - \*****************************************************/ | |
| 1300 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 21610 | +"use strict"; | |
| 1301 | 21611 | |
| 1302 | -var superPropBase = __webpack_require__(/*! ./superPropBase.js */ "../node_modules/@babel/runtime/helpers/superPropBase.js"); | |
| 1303 | -function _get() { | |
| 1304 | - return module.exports = _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { | |
| 1305 | - var p = superPropBase(e, t); | |
| 1306 | - if (p) { | |
| 1307 | - var n = Object.getOwnPropertyDescriptor(p, t); | |
| 1308 | - return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; | |
| 21612 | + | |
| 21613 | +var _interopRequireDefault = __webpack_require__(0); | |
| 21614 | + | |
| 21615 | +var _Object$defineProperty = __webpack_require__(1); | |
| 21616 | + | |
| 21617 | +_Object$defineProperty(exports, "__esModule", { | |
| 21618 | + value: true | |
| 21619 | +}); | |
| 21620 | + | |
| 21621 | +exports.default = exports.ResizeColumn = void 0; | |
| 21622 | + | |
| 21623 | +__webpack_require__(24); | |
| 21624 | + | |
| 21625 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 21626 | + | |
| 21627 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 21628 | + | |
| 21629 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 21630 | + | |
| 21631 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 21632 | + | |
| 21633 | +var _after = _interopRequireDefault(__webpack_require__(228)); | |
| 21634 | + | |
| 21635 | +var ResizeColumn = /*#__PURE__*/function (_After) { | |
| 21636 | + (0, _inherits2.default)(ResizeColumn, _After); | |
| 21637 | + | |
| 21638 | + var _super = (0, _createSuper2.default)(ResizeColumn); | |
| 21639 | + | |
| 21640 | + function ResizeColumn() { | |
| 21641 | + (0, _classCallCheck2.default)(this, ResizeColumn); | |
| 21642 | + return _super.apply(this, arguments); | |
| 21643 | + } | |
| 21644 | + | |
| 21645 | + (0, _createClass2.default)(ResizeColumn, [{ | |
| 21646 | + key: "getCommand", | |
| 21647 | + value: function getCommand() { | |
| 21648 | + return 'document/elements/settings'; | |
| 1309 | 21649 | } |
| 1310 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _get.apply(null, arguments); | |
| 1311 | -} | |
| 1312 | -module.exports = _get, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 21650 | + }, { | |
| 21651 | + key: "getId", | |
| 21652 | + value: function getId() { | |
| 21653 | + return 'resize-column'; | |
| 21654 | + } | |
| 21655 | + }, { | |
| 21656 | + key: "getContainerType", | |
| 21657 | + value: function getContainerType() { | |
| 21658 | + return 'column'; | |
| 21659 | + } | |
| 21660 | + }, { | |
| 21661 | + key: "getConditions", | |
| 21662 | + value: function getConditions(args) { | |
| 21663 | + return args.settings._inline_size; | |
| 21664 | + } | |
| 21665 | + }, { | |
| 21666 | + key: "apply", | |
| 21667 | + value: function apply(args) { | |
| 21668 | + var _this = this; | |
| 1313 | 21669 | |
| 21670 | + var _args$containers = args.containers, | |
| 21671 | + containers = _args$containers === void 0 ? [args.container] : _args$containers; | |
| 21672 | + containers.forEach(function ( | |
| 21673 | + /**Container*/ | |
| 21674 | + container) { | |
| 21675 | + _this.resizeColumn(container, args.settings._inline_size); | |
| 21676 | + }); | |
| 21677 | + return true; | |
| 21678 | + } | |
| 21679 | + }, { | |
| 21680 | + key: "resizeColumn", | |
| 21681 | + value: function resizeColumn(container, newSize) { | |
| 21682 | + var nextContainer = container.parent.view.getNeighborContainer(container); | |
| 21683 | + | |
| 21684 | + if (!nextContainer) { | |
| 21685 | + return false; | |
| 21686 | + } | |
| 21687 | + | |
| 21688 | + var parentView = container.parent.view, | |
| 21689 | + currentColumnView = container.view; | |
| 21690 | + var currentSize = null; | |
| 21691 | + | |
| 21692 | + if (undefined === container.oldValues || null === container.oldValues._inline_size) { | |
| 21693 | + // Mean, that it was not set before ( first time ). | |
| 21694 | + currentSize = container.settings.get('_column_size'); | |
| 21695 | + } else { | |
| 21696 | + var totalWidth = parentView.$el.find(' > .elementor-container')[0].getBoundingClientRect().width; | |
| 21697 | + currentSize = +(container.oldValues._inline_size || currentColumnView.el.getBoundingClientRect().width / totalWidth * 100); | |
| 21698 | + } | |
| 21699 | + | |
| 21700 | + var nextChildView = nextContainer.view, | |
| 21701 | + $nextElement = nextChildView.$el, | |
| 21702 | + nextElementCurrentSize = +nextChildView.model.getSetting('_inline_size') || container.parent.view.getColumnPercentSize($nextElement, $nextElement[0].getBoundingClientRect().width), | |
| 21703 | + nextElementNewSize = +(currentSize + nextElementCurrentSize - newSize).toFixed(3); | |
| 21704 | + /** | |
| 21705 | + * TODO: Hook prevented ( next command will not call recursive hook ), but we didnt tell the hook to be prevented | |
| 21706 | + * consider: '$e.hooks.preventRecursive()'. | |
| 21707 | + */ | |
| 21708 | + | |
| 21709 | + $e.run('document/elements/settings', { | |
| 21710 | + containers: [nextContainer], | |
| 21711 | + settings: { | |
| 21712 | + _inline_size: nextElementNewSize | |
| 21713 | + }, | |
| 21714 | + options: { | |
| 21715 | + callbacks: { | |
| 21716 | + 'resize-column-limit': false | |
| 21717 | + }, | |
| 21718 | + history: { | |
| 21719 | + title: elementor.config.elements.column.controls._inline_size.label | |
| 21720 | + }, | |
| 21721 | + external: true, | |
| 21722 | + debounce: true | |
| 21723 | + } | |
| 21724 | + }); | |
| 21725 | + return true; | |
| 21726 | + } | |
| 21727 | + }]); | |
| 21728 | + return ResizeColumn; | |
| 21729 | +}(_after.default); | |
| 21730 | + | |
| 21731 | +exports.ResizeColumn = ResizeColumn; | |
| 21732 | +var _default = ResizeColumn; | |
| 21733 | +exports.default = _default; | |
| 21734 | + | |
| 1314 | 21735 | /***/ }), |
| 21736 | +/* 904 */ | |
| 21737 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1315 | 21738 | |
| 1316 | -/***/ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js": | |
| 1317 | -/*!****************************************************************!*\ | |
| 1318 | - !*** ../node_modules/@babel/runtime/helpers/getPrototypeOf.js ***! | |
| 1319 | - \****************************************************************/ | |
| 1320 | -/***/ ((module) => { | |
| 21739 | +"use strict"; | |
| 1321 | 21740 | |
| 1322 | -function _getPrototypeOf(t) { | |
| 1323 | - return module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { | |
| 1324 | - return t.__proto__ || Object.getPrototypeOf(t); | |
| 1325 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _getPrototypeOf(t); | |
| 1326 | -} | |
| 1327 | -module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1328 | 21741 | |
| 21742 | +var _interopRequireDefault = __webpack_require__(0); | |
| 21743 | + | |
| 21744 | +var _Object$defineProperty = __webpack_require__(1); | |
| 21745 | + | |
| 21746 | +_Object$defineProperty(exports, "__esModule", { | |
| 21747 | + value: true | |
| 21748 | +}); | |
| 21749 | + | |
| 21750 | +exports.default = exports.ResizeColumnLimit = void 0; | |
| 21751 | + | |
| 21752 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 21753 | + | |
| 21754 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 21755 | + | |
| 21756 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 21757 | + | |
| 21758 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 21759 | + | |
| 21760 | +var _dependency = _interopRequireDefault(__webpack_require__(356)); | |
| 21761 | + | |
| 21762 | +var _section = __webpack_require__(256); | |
| 21763 | + | |
| 21764 | +var ResizeColumnLimit = /*#__PURE__*/function (_Dependency) { | |
| 21765 | + (0, _inherits2.default)(ResizeColumnLimit, _Dependency); | |
| 21766 | + | |
| 21767 | + var _super = (0, _createSuper2.default)(ResizeColumnLimit); | |
| 21768 | + | |
| 21769 | + function ResizeColumnLimit() { | |
| 21770 | + (0, _classCallCheck2.default)(this, ResizeColumnLimit); | |
| 21771 | + return _super.apply(this, arguments); | |
| 21772 | + } | |
| 21773 | + | |
| 21774 | + (0, _createClass2.default)(ResizeColumnLimit, [{ | |
| 21775 | + key: "getCommand", | |
| 21776 | + value: function getCommand() { | |
| 21777 | + return 'document/elements/settings'; | |
| 21778 | + } | |
| 21779 | + }, { | |
| 21780 | + key: "getId", | |
| 21781 | + value: function getId() { | |
| 21782 | + return 'resize-column-limit'; | |
| 21783 | + } | |
| 21784 | + }, { | |
| 21785 | + key: "getContainerType", | |
| 21786 | + value: function getContainerType() { | |
| 21787 | + return 'column'; | |
| 21788 | + } | |
| 21789 | + }, { | |
| 21790 | + key: "getConditions", | |
| 21791 | + value: function getConditions(args) { | |
| 21792 | + return args.settings._inline_size; | |
| 21793 | + } | |
| 21794 | + }, { | |
| 21795 | + key: "apply", | |
| 21796 | + value: function apply(args) { | |
| 21797 | + var _args$containers = args.containers, | |
| 21798 | + containers = _args$containers === void 0 ? [args.container] : _args$containers; | |
| 21799 | + return containers.some(function ( | |
| 21800 | + /**Container*/ | |
| 21801 | + container) { | |
| 21802 | + var parentView = container.parent.view, | |
| 21803 | + columnView = container.view, | |
| 21804 | + currentSize = container.settings.get('_inline_size') || container.settings.get('_column_size'), | |
| 21805 | + newSize = args.settings._inline_size, | |
| 21806 | + nextChildView = parentView.getNextColumn(columnView) || parentView.getPreviousColumn(columnView); | |
| 21807 | + | |
| 21808 | + if (!nextChildView) { | |
| 21809 | + if ($e.devTools) { | |
| 21810 | + $e.devTools.log.error('There is not any next column'); | |
| 21811 | + } | |
| 21812 | + | |
| 21813 | + return false; | |
| 21814 | + } | |
| 21815 | + | |
| 21816 | + var $nextElement = nextChildView.$el, | |
| 21817 | + nextElementCurrentSize = +nextChildView.model.getSetting('_inline_size') || parentView.getColumnPercentSize($nextElement, $nextElement[0].getBoundingClientRect().width), | |
| 21818 | + nextElementNewSize = +(currentSize + nextElementCurrentSize - newSize).toFixed(3); | |
| 21819 | + | |
| 21820 | + if (nextElementNewSize < _section.DEFAULT_INNER_SECTION_COLUMNS) { | |
| 21821 | + if ($e.devTools) { | |
| 21822 | + $e.devTools.log.error('New column width is too large'); | |
| 21823 | + } | |
| 21824 | + | |
| 21825 | + return false; | |
| 21826 | + } | |
| 21827 | + | |
| 21828 | + if (newSize < _section.DEFAULT_INNER_SECTION_COLUMNS) { | |
| 21829 | + if ($e.devTools) { | |
| 21830 | + $e.devTools.log.error('New column width is too small'); | |
| 21831 | + } | |
| 21832 | + | |
| 21833 | + return false; | |
| 21834 | + } | |
| 21835 | + | |
| 21836 | + return true; | |
| 21837 | + }); | |
| 21838 | + } | |
| 21839 | + }]); | |
| 21840 | + return ResizeColumnLimit; | |
| 21841 | +}(_dependency.default); | |
| 21842 | + | |
| 21843 | +exports.ResizeColumnLimit = ResizeColumnLimit; | |
| 21844 | +var _default = ResizeColumnLimit; | |
| 21845 | +exports.default = _default; | |
| 21846 | + | |
| 1329 | 21847 | /***/ }), |
| 21848 | +/* 905 */ | |
| 21849 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1330 | 21850 | |
| 1331 | -/***/ "../node_modules/@babel/runtime/helpers/inherits.js": | |
| 1332 | -/*!**********************************************************!*\ | |
| 1333 | - !*** ../node_modules/@babel/runtime/helpers/inherits.js ***! | |
| 1334 | - \**********************************************************/ | |
| 1335 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 21851 | +"use strict"; | |
| 1336 | 21852 | |
| 1337 | -var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js"); | |
| 1338 | -function _inherits(t, e) { | |
| 1339 | - if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); | |
| 1340 | - t.prototype = Object.create(e && e.prototype, { | |
| 1341 | - constructor: { | |
| 1342 | - value: t, | |
| 1343 | - writable: !0, | |
| 1344 | - configurable: !0 | |
| 21853 | + | |
| 21854 | +var _interopRequireDefault = __webpack_require__(0); | |
| 21855 | + | |
| 21856 | +var _Object$defineProperty = __webpack_require__(1); | |
| 21857 | + | |
| 21858 | +_Object$defineProperty(exports, "__esModule", { | |
| 21859 | + value: true | |
| 21860 | +}); | |
| 21861 | + | |
| 21862 | +exports.default = exports.SetStructure = void 0; | |
| 21863 | + | |
| 21864 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 21865 | + | |
| 21866 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 21867 | + | |
| 21868 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 21869 | + | |
| 21870 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 21871 | + | |
| 21872 | +var _after = _interopRequireDefault(__webpack_require__(228)); | |
| 21873 | + | |
| 21874 | +var SetStructure = /*#__PURE__*/function (_After) { | |
| 21875 | + (0, _inherits2.default)(SetStructure, _After); | |
| 21876 | + | |
| 21877 | + var _super = (0, _createSuper2.default)(SetStructure); | |
| 21878 | + | |
| 21879 | + function SetStructure() { | |
| 21880 | + (0, _classCallCheck2.default)(this, SetStructure); | |
| 21881 | + return _super.apply(this, arguments); | |
| 21882 | + } | |
| 21883 | + | |
| 21884 | + (0, _createClass2.default)(SetStructure, [{ | |
| 21885 | + key: "getCommand", | |
| 21886 | + value: function getCommand() { | |
| 21887 | + return 'document/elements/settings'; | |
| 1345 | 21888 | } |
| 1346 | - }), Object.defineProperty(t, "prototype", { | |
| 1347 | - writable: !1 | |
| 1348 | - }), e && setPrototypeOf(t, e); | |
| 1349 | -} | |
| 1350 | -module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 21889 | + }, { | |
| 21890 | + key: "getId", | |
| 21891 | + value: function getId() { | |
| 21892 | + return 'set-structure'; | |
| 21893 | + } | |
| 21894 | + }, { | |
| 21895 | + key: "getContainerType", | |
| 21896 | + value: function getContainerType() { | |
| 21897 | + return 'section'; | |
| 21898 | + } | |
| 21899 | + }, { | |
| 21900 | + key: "getConditions", | |
| 21901 | + value: function getConditions(args) { | |
| 21902 | + return !!args.settings.structure; | |
| 21903 | + } | |
| 21904 | + }, { | |
| 21905 | + key: "apply", | |
| 21906 | + value: function apply(args) { | |
| 21907 | + var _args$containers = args.containers, | |
| 21908 | + containers = _args$containers === void 0 ? [args.container] : _args$containers; | |
| 21909 | + containers.forEach(function ( | |
| 21910 | + /**Container*/ | |
| 21911 | + container) { | |
| 21912 | + container.view.adjustColumns(); | |
| 21913 | + }); | |
| 21914 | + return true; | |
| 21915 | + } | |
| 21916 | + }]); | |
| 21917 | + return SetStructure; | |
| 21918 | +}(_after.default); | |
| 1351 | 21919 | |
| 21920 | +exports.SetStructure = SetStructure; | |
| 21921 | +var _default = SetStructure; | |
| 21922 | +exports.default = _default; | |
| 21923 | + | |
| 1352 | 21924 | /***/ }), |
| 21925 | +/* 906 */ | |
| 21926 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1353 | 21927 | |
| 1354 | -/***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js": | |
| 1355 | -/*!***********************************************************************!*\ | |
| 1356 | - !*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***! | |
| 1357 | - \***********************************************************************/ | |
| 1358 | -/***/ ((module) => { | |
| 21928 | +"use strict"; | |
| 1359 | 21929 | |
| 1360 | -function _interopRequireDefault(e) { | |
| 1361 | - return e && e.__esModule ? e : { | |
| 1362 | - "default": e | |
| 1363 | - }; | |
| 1364 | -} | |
| 1365 | -module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1366 | 21930 | |
| 21931 | +var _Object$keys = __webpack_require__(25); | |
| 21932 | + | |
| 21933 | +var _Object$defineProperty = __webpack_require__(1); | |
| 21934 | + | |
| 21935 | +_Object$defineProperty(exports, "__esModule", { | |
| 21936 | + value: true | |
| 21937 | +}); | |
| 21938 | + | |
| 21939 | +var _create = __webpack_require__(907); | |
| 21940 | + | |
| 21941 | +_Object$keys(_create).forEach(function (key) { | |
| 21942 | + if (key === "default" || key === "__esModule") return; | |
| 21943 | + | |
| 21944 | + _Object$defineProperty(exports, key, { | |
| 21945 | + enumerable: true, | |
| 21946 | + get: function get() { | |
| 21947 | + return _create[key]; | |
| 21948 | + } | |
| 21949 | + }); | |
| 21950 | +}); | |
| 21951 | + | |
| 21952 | +var _delete = __webpack_require__(910); | |
| 21953 | + | |
| 21954 | +_Object$keys(_delete).forEach(function (key) { | |
| 21955 | + if (key === "default" || key === "__esModule") return; | |
| 21956 | + | |
| 21957 | + _Object$defineProperty(exports, key, { | |
| 21958 | + enumerable: true, | |
| 21959 | + get: function get() { | |
| 21960 | + return _delete[key]; | |
| 21961 | + } | |
| 21962 | + }); | |
| 21963 | +}); | |
| 21964 | + | |
| 21965 | +var _settings = __webpack_require__(913); | |
| 21966 | + | |
| 21967 | +_Object$keys(_settings).forEach(function (key) { | |
| 21968 | + if (key === "default" || key === "__esModule") return; | |
| 21969 | + | |
| 21970 | + _Object$defineProperty(exports, key, { | |
| 21971 | + enumerable: true, | |
| 21972 | + get: function get() { | |
| 21973 | + return _settings[key]; | |
| 21974 | + } | |
| 21975 | + }); | |
| 21976 | +}); | |
| 21977 | + | |
| 1367 | 21978 | /***/ }), |
| 21979 | +/* 907 */ | |
| 21980 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1368 | 21981 | |
| 1369 | -/***/ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js": | |
| 1370 | -/*!**********************************************************************!*\ | |
| 1371 | - !*** ../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***! | |
| 1372 | - \**********************************************************************/ | |
| 1373 | -/***/ ((module) => { | |
| 21982 | +"use strict"; | |
| 1374 | 21983 | |
| 1375 | -function _iterableToArrayLimit(r, l) { | |
| 1376 | - var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; | |
| 1377 | - if (null != t) { | |
| 1378 | - var e, | |
| 1379 | - n, | |
| 1380 | - i, | |
| 1381 | - u, | |
| 1382 | - a = [], | |
| 1383 | - f = !0, | |
| 1384 | - o = !1; | |
| 1385 | - try { | |
| 1386 | - if (i = (t = t.call(r)).next, 0 === l) { | |
| 1387 | - if (Object(t) !== t) return; | |
| 1388 | - f = !1; | |
| 1389 | - } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); | |
| 1390 | - } catch (r) { | |
| 1391 | - o = !0, n = r; | |
| 1392 | - } finally { | |
| 1393 | - try { | |
| 1394 | - if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; | |
| 1395 | - } finally { | |
| 1396 | - if (o) throw n; | |
| 1397 | - } | |
| 21984 | + | |
| 21985 | +var _Object$defineProperty = __webpack_require__(1); | |
| 21986 | + | |
| 21987 | +_Object$defineProperty(exports, "__esModule", { | |
| 21988 | + value: true | |
| 21989 | +}); | |
| 21990 | + | |
| 21991 | +_Object$defineProperty(exports, "ColumnIsPopulated", { | |
| 21992 | + enumerable: true, | |
| 21993 | + get: function get() { | |
| 21994 | + return _columnIsPopulated.ColumnIsPopulated; | |
| 21995 | + } | |
| 21996 | +}); | |
| 21997 | + | |
| 21998 | +_Object$defineProperty(exports, "CreateSectionIsFull", { | |
| 21999 | + enumerable: true, | |
| 22000 | + get: function get() { | |
| 22001 | + return _sectionIsFull.CreateSectionIsFull; | |
| 22002 | + } | |
| 22003 | +}); | |
| 22004 | + | |
| 22005 | +var _columnIsPopulated = __webpack_require__(908); | |
| 22006 | + | |
| 22007 | +var _sectionIsFull = __webpack_require__(909); | |
| 22008 | + | |
| 22009 | +/***/ }), | |
| 22010 | +/* 908 */ | |
| 22011 | +/***/ (function(module, exports, __webpack_require__) { | |
| 22012 | + | |
| 22013 | +"use strict"; | |
| 22014 | + | |
| 22015 | + | |
| 22016 | +var _interopRequireDefault = __webpack_require__(0); | |
| 22017 | + | |
| 22018 | +var _Object$defineProperty = __webpack_require__(1); | |
| 22019 | + | |
| 22020 | +_Object$defineProperty(exports, "__esModule", { | |
| 22021 | + value: true | |
| 22022 | +}); | |
| 22023 | + | |
| 22024 | +exports.default = exports.ColumnIsPopulated = void 0; | |
| 22025 | + | |
| 22026 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 22027 | + | |
| 22028 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 22029 | + | |
| 22030 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 22031 | + | |
| 22032 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 22033 | + | |
| 22034 | +var _after = _interopRequireDefault(__webpack_require__(281)); | |
| 22035 | + | |
| 22036 | +var ColumnIsPopulated = /*#__PURE__*/function (_After) { | |
| 22037 | + (0, _inherits2.default)(ColumnIsPopulated, _After); | |
| 22038 | + | |
| 22039 | + var _super = (0, _createSuper2.default)(ColumnIsPopulated); | |
| 22040 | + | |
| 22041 | + function ColumnIsPopulated() { | |
| 22042 | + (0, _classCallCheck2.default)(this, ColumnIsPopulated); | |
| 22043 | + return _super.apply(this, arguments); | |
| 22044 | + } | |
| 22045 | + | |
| 22046 | + (0, _createClass2.default)(ColumnIsPopulated, [{ | |
| 22047 | + key: "getCommand", | |
| 22048 | + value: function getCommand() { | |
| 22049 | + return 'document/elements/create'; | |
| 1398 | 22050 | } |
| 1399 | - return a; | |
| 22051 | + }, { | |
| 22052 | + key: "getId", | |
| 22053 | + value: function getId() { | |
| 22054 | + return 'column-is-populated'; | |
| 22055 | + } | |
| 22056 | + }, { | |
| 22057 | + key: "getConditions", | |
| 22058 | + value: function getConditions(args) { | |
| 22059 | + var _args$containers = args.containers, | |
| 22060 | + containers = _args$containers === void 0 ? [args.container] : _args$containers; // If the created element, was created at column. | |
| 22061 | + | |
| 22062 | + return containers.some(function ( | |
| 22063 | + /**Container*/ | |
| 22064 | + container) { | |
| 22065 | + return 'column' === container.model.get('elType'); | |
| 22066 | + }); | |
| 22067 | + } | |
| 22068 | + }, { | |
| 22069 | + key: "apply", | |
| 22070 | + value: function apply(args) { | |
| 22071 | + var _args$containers2 = args.containers, | |
| 22072 | + containers = _args$containers2 === void 0 ? [args.container] : _args$containers2; | |
| 22073 | + containers.forEach(function ( | |
| 22074 | + /* Container */ | |
| 22075 | + container) { | |
| 22076 | + if ('column' === container.model.get('elType')) { | |
| 22077 | + container.view.changeChildContainerClasses(); | |
| 22078 | + } | |
| 22079 | + }); | |
| 22080 | + } | |
| 22081 | + }]); | |
| 22082 | + return ColumnIsPopulated; | |
| 22083 | +}(_after.default); | |
| 22084 | + | |
| 22085 | +exports.ColumnIsPopulated = ColumnIsPopulated; | |
| 22086 | +var _default = ColumnIsPopulated; | |
| 22087 | +exports.default = _default; | |
| 22088 | + | |
| 22089 | +/***/ }), | |
| 22090 | +/* 909 */ | |
| 22091 | +/***/ (function(module, exports, __webpack_require__) { | |
| 22092 | + | |
| 22093 | +"use strict"; | |
| 22094 | + | |
| 22095 | + | |
| 22096 | +var _interopRequireDefault = __webpack_require__(0); | |
| 22097 | + | |
| 22098 | +var _Object$defineProperty = __webpack_require__(1); | |
| 22099 | + | |
| 22100 | +_Object$defineProperty(exports, "__esModule", { | |
| 22101 | + value: true | |
| 22102 | +}); | |
| 22103 | + | |
| 22104 | +exports.default = exports.CreateSectionIsFull = void 0; | |
| 22105 | + | |
| 22106 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 22107 | + | |
| 22108 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 22109 | + | |
| 22110 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 22111 | + | |
| 22112 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 22113 | + | |
| 22114 | +var _after = _interopRequireDefault(__webpack_require__(281)); | |
| 22115 | + | |
| 22116 | +var CreateSectionIsFull = /*#__PURE__*/function (_After) { | |
| 22117 | + (0, _inherits2.default)(CreateSectionIsFull, _After); | |
| 22118 | + | |
| 22119 | + var _super = (0, _createSuper2.default)(CreateSectionIsFull); | |
| 22120 | + | |
| 22121 | + function CreateSectionIsFull() { | |
| 22122 | + (0, _classCallCheck2.default)(this, CreateSectionIsFull); | |
| 22123 | + return _super.apply(this, arguments); | |
| 1400 | 22124 | } |
| 1401 | -} | |
| 1402 | -module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1403 | 22125 | |
| 22126 | + (0, _createClass2.default)(CreateSectionIsFull, [{ | |
| 22127 | + key: "getCommand", | |
| 22128 | + value: function getCommand() { | |
| 22129 | + return 'document/elements/create'; | |
| 22130 | + } | |
| 22131 | + }, { | |
| 22132 | + key: "getId", | |
| 22133 | + value: function getId() { | |
| 22134 | + return 'create-section-is-full'; | |
| 22135 | + } | |
| 22136 | + }, { | |
| 22137 | + key: "getConditions", | |
| 22138 | + value: function getConditions(args) { | |
| 22139 | + var _args$containers = args.containers, | |
| 22140 | + containers = _args$containers === void 0 ? [args.container] : _args$containers; | |
| 22141 | + return containers.some(function ( | |
| 22142 | + /* Container */ | |
| 22143 | + container) { | |
| 22144 | + return 'section' === container.model.get('elType'); | |
| 22145 | + }); | |
| 22146 | + } | |
| 22147 | + }, { | |
| 22148 | + key: "apply", | |
| 22149 | + value: function apply(args) { | |
| 22150 | + var _args$containers2 = args.containers, | |
| 22151 | + containers = _args$containers2 === void 0 ? [args.container] : _args$containers2; | |
| 22152 | + containers.forEach(function ( | |
| 22153 | + /* Container */ | |
| 22154 | + container) { | |
| 22155 | + if ('section' === container.model.get('elType')) { | |
| 22156 | + container.view.toggleSectionIsFull(); | |
| 22157 | + } | |
| 22158 | + }); | |
| 22159 | + } | |
| 22160 | + }]); | |
| 22161 | + return CreateSectionIsFull; | |
| 22162 | +}(_after.default); | |
| 22163 | + | |
| 22164 | +exports.CreateSectionIsFull = CreateSectionIsFull; | |
| 22165 | +var _default = CreateSectionIsFull; | |
| 22166 | +exports.default = _default; | |
| 22167 | + | |
| 1404 | 22168 | /***/ }), |
| 22169 | +/* 910 */ | |
| 22170 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1405 | 22171 | |
| 1406 | -/***/ "../node_modules/@babel/runtime/helpers/nonIterableRest.js": | |
| 1407 | -/*!*****************************************************************!*\ | |
| 1408 | - !*** ../node_modules/@babel/runtime/helpers/nonIterableRest.js ***! | |
| 1409 | - \*****************************************************************/ | |
| 1410 | -/***/ ((module) => { | |
| 22172 | +"use strict"; | |
| 1411 | 22173 | |
| 1412 | -function _nonIterableRest() { | |
| 1413 | - throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | |
| 1414 | -} | |
| 1415 | -module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1416 | 22174 | |
| 22175 | +var _Object$defineProperty = __webpack_require__(1); | |
| 22176 | + | |
| 22177 | +_Object$defineProperty(exports, "__esModule", { | |
| 22178 | + value: true | |
| 22179 | +}); | |
| 22180 | + | |
| 22181 | +_Object$defineProperty(exports, "ColumnIsEmpty", { | |
| 22182 | + enumerable: true, | |
| 22183 | + get: function get() { | |
| 22184 | + return _columnIsEmpty.ColumnIsEmpty; | |
| 22185 | + } | |
| 22186 | +}); | |
| 22187 | + | |
| 22188 | +_Object$defineProperty(exports, "DeleteSectionIsFull", { | |
| 22189 | + enumerable: true, | |
| 22190 | + get: function get() { | |
| 22191 | + return _sectionIsFull.DeleteSectionIsFull; | |
| 22192 | + } | |
| 22193 | +}); | |
| 22194 | + | |
| 22195 | +var _columnIsEmpty = __webpack_require__(911); | |
| 22196 | + | |
| 22197 | +var _sectionIsFull = __webpack_require__(912); | |
| 22198 | + | |
| 1417 | 22199 | /***/ }), |
| 22200 | +/* 911 */ | |
| 22201 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1418 | 22202 | |
| 1419 | -/***/ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js": | |
| 1420 | -/*!***************************************************************************!*\ | |
| 1421 | - !*** ../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***! | |
| 1422 | - \***************************************************************************/ | |
| 1423 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 22203 | +"use strict"; | |
| 1424 | 22204 | |
| 1425 | -var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 1426 | -var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js"); | |
| 1427 | -function _possibleConstructorReturn(t, e) { | |
| 1428 | - if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; | |
| 1429 | - if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); | |
| 1430 | - return assertThisInitialized(t); | |
| 1431 | -} | |
| 1432 | -module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1433 | 22205 | |
| 22206 | +var _interopRequireDefault = __webpack_require__(0); | |
| 22207 | + | |
| 22208 | +var _Object$defineProperty = __webpack_require__(1); | |
| 22209 | + | |
| 22210 | +_Object$defineProperty(exports, "__esModule", { | |
| 22211 | + value: true | |
| 22212 | +}); | |
| 22213 | + | |
| 22214 | +exports.default = exports.ColumnIsEmpty = void 0; | |
| 22215 | + | |
| 22216 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 22217 | + | |
| 22218 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 22219 | + | |
| 22220 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 22221 | + | |
| 22222 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 22223 | + | |
| 22224 | +var _after = _interopRequireDefault(__webpack_require__(281)); | |
| 22225 | + | |
| 22226 | +var ColumnIsEmpty = /*#__PURE__*/function (_After) { | |
| 22227 | + (0, _inherits2.default)(ColumnIsEmpty, _After); | |
| 22228 | + | |
| 22229 | + var _super = (0, _createSuper2.default)(ColumnIsEmpty); | |
| 22230 | + | |
| 22231 | + function ColumnIsEmpty() { | |
| 22232 | + (0, _classCallCheck2.default)(this, ColumnIsEmpty); | |
| 22233 | + return _super.apply(this, arguments); | |
| 22234 | + } | |
| 22235 | + | |
| 22236 | + (0, _createClass2.default)(ColumnIsEmpty, [{ | |
| 22237 | + key: "getCommand", | |
| 22238 | + value: function getCommand() { | |
| 22239 | + return 'document/elements/delete'; | |
| 22240 | + } | |
| 22241 | + }, { | |
| 22242 | + key: "getId", | |
| 22243 | + value: function getId() { | |
| 22244 | + return 'column-is-empty'; | |
| 22245 | + } | |
| 22246 | + }, { | |
| 22247 | + key: "getConditions", | |
| 22248 | + value: function getConditions(args) { | |
| 22249 | + var _args$containers = args.containers, | |
| 22250 | + containers = _args$containers === void 0 ? [args.container] : _args$containers; // If the deleted element, was deleted from column. | |
| 22251 | + | |
| 22252 | + return containers.some(function ( | |
| 22253 | + /**Container*/ | |
| 22254 | + container) { | |
| 22255 | + return 'column' === container.parent.model.get('elType'); | |
| 22256 | + }); | |
| 22257 | + } | |
| 22258 | + }, { | |
| 22259 | + key: "apply", | |
| 22260 | + value: function apply(args) { | |
| 22261 | + var _args$containers2 = args.containers, | |
| 22262 | + containers = _args$containers2 === void 0 ? [args.container] : _args$containers2; | |
| 22263 | + containers.forEach(function ( | |
| 22264 | + /* Container */ | |
| 22265 | + container) { | |
| 22266 | + if ('column' === container.parent.model.get('elType')) { | |
| 22267 | + container.parent.view.changeChildContainerClasses(); | |
| 22268 | + } | |
| 22269 | + }); | |
| 22270 | + } | |
| 22271 | + }]); | |
| 22272 | + return ColumnIsEmpty; | |
| 22273 | +}(_after.default); | |
| 22274 | + | |
| 22275 | +exports.ColumnIsEmpty = ColumnIsEmpty; | |
| 22276 | +var _default = ColumnIsEmpty; | |
| 22277 | +exports.default = _default; | |
| 22278 | + | |
| 1434 | 22279 | /***/ }), |
| 22280 | +/* 912 */ | |
| 22281 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1435 | 22282 | |
| 1436 | -/***/ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js": | |
| 1437 | -/*!****************************************************************!*\ | |
| 1438 | - !*** ../node_modules/@babel/runtime/helpers/setPrototypeOf.js ***! | |
| 1439 | - \****************************************************************/ | |
| 1440 | -/***/ ((module) => { | |
| 22283 | +"use strict"; | |
| 1441 | 22284 | |
| 1442 | -function _setPrototypeOf(t, e) { | |
| 1443 | - return module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { | |
| 1444 | - return t.__proto__ = e, t; | |
| 1445 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _setPrototypeOf(t, e); | |
| 1446 | -} | |
| 1447 | -module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1448 | 22285 | |
| 22286 | +var _interopRequireDefault = __webpack_require__(0); | |
| 22287 | + | |
| 22288 | +var _Object$defineProperty = __webpack_require__(1); | |
| 22289 | + | |
| 22290 | +_Object$defineProperty(exports, "__esModule", { | |
| 22291 | + value: true | |
| 22292 | +}); | |
| 22293 | + | |
| 22294 | +exports.default = exports.DeleteSectionIsFull = void 0; | |
| 22295 | + | |
| 22296 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 22297 | + | |
| 22298 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 22299 | + | |
| 22300 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 22301 | + | |
| 22302 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 22303 | + | |
| 22304 | +var _after = _interopRequireDefault(__webpack_require__(281)); | |
| 22305 | + | |
| 22306 | +var DeleteSectionIsFull = /*#__PURE__*/function (_After) { | |
| 22307 | + (0, _inherits2.default)(DeleteSectionIsFull, _After); | |
| 22308 | + | |
| 22309 | + var _super = (0, _createSuper2.default)(DeleteSectionIsFull); | |
| 22310 | + | |
| 22311 | + function DeleteSectionIsFull() { | |
| 22312 | + (0, _classCallCheck2.default)(this, DeleteSectionIsFull); | |
| 22313 | + return _super.apply(this, arguments); | |
| 22314 | + } | |
| 22315 | + | |
| 22316 | + (0, _createClass2.default)(DeleteSectionIsFull, [{ | |
| 22317 | + key: "getCommand", | |
| 22318 | + value: function getCommand() { | |
| 22319 | + return 'document/elements/delete'; | |
| 22320 | + } | |
| 22321 | + }, { | |
| 22322 | + key: "getId", | |
| 22323 | + value: function getId() { | |
| 22324 | + return 'delete-section-is-full'; | |
| 22325 | + } | |
| 22326 | + }, { | |
| 22327 | + key: "getConditions", | |
| 22328 | + value: function getConditions(args) { | |
| 22329 | + var _args$containers = args.containers, | |
| 22330 | + containers = _args$containers === void 0 ? [args.container] : _args$containers; | |
| 22331 | + return containers.some(function ( | |
| 22332 | + /* Container */ | |
| 22333 | + container) { | |
| 22334 | + return 'column' === container.model.get('elType'); | |
| 22335 | + }); | |
| 22336 | + } | |
| 22337 | + }, { | |
| 22338 | + key: "apply", | |
| 22339 | + value: function apply(args) { | |
| 22340 | + var _args$containers2 = args.containers, | |
| 22341 | + containers = _args$containers2 === void 0 ? [args.container] : _args$containers2; | |
| 22342 | + containers.forEach(function ( | |
| 22343 | + /* Container */ | |
| 22344 | + container) { | |
| 22345 | + if ('column' === container.model.get('elType')) { | |
| 22346 | + container.parent.view.toggleSectionIsFull(); | |
| 22347 | + } | |
| 22348 | + }); | |
| 22349 | + } | |
| 22350 | + }]); | |
| 22351 | + return DeleteSectionIsFull; | |
| 22352 | +}(_after.default); | |
| 22353 | + | |
| 22354 | +exports.DeleteSectionIsFull = DeleteSectionIsFull; | |
| 22355 | +var _default = DeleteSectionIsFull; | |
| 22356 | +exports.default = _default; | |
| 22357 | + | |
| 1449 | 22358 | /***/ }), |
| 22359 | +/* 913 */ | |
| 22360 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1450 | 22361 | |
| 1451 | -/***/ "../node_modules/@babel/runtime/helpers/slicedToArray.js": | |
| 1452 | -/*!***************************************************************!*\ | |
| 1453 | - !*** ../node_modules/@babel/runtime/helpers/slicedToArray.js ***! | |
| 1454 | - \***************************************************************/ | |
| 1455 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 22362 | +"use strict"; | |
| 1456 | 22363 | |
| 1457 | -var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js"); | |
| 1458 | -var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js"); | |
| 1459 | -var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"); | |
| 1460 | -var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "../node_modules/@babel/runtime/helpers/nonIterableRest.js"); | |
| 1461 | -function _slicedToArray(r, e) { | |
| 1462 | - return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest(); | |
| 1463 | -} | |
| 1464 | -module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1465 | 22364 | |
| 22365 | +var _Object$defineProperty = __webpack_require__(1); | |
| 22366 | + | |
| 22367 | +_Object$defineProperty(exports, "__esModule", { | |
| 22368 | + value: true | |
| 22369 | +}); | |
| 22370 | + | |
| 22371 | +_Object$defineProperty(exports, "ColumnChangeSize", { | |
| 22372 | + enumerable: true, | |
| 22373 | + get: function get() { | |
| 22374 | + return _columnChangeSize.ColumnChangeSize; | |
| 22375 | + } | |
| 22376 | +}); | |
| 22377 | + | |
| 22378 | +_Object$defineProperty(exports, "Draggable", { | |
| 22379 | + enumerable: true, | |
| 22380 | + get: function get() { | |
| 22381 | + return _draggable.Draggable; | |
| 22382 | + } | |
| 22383 | +}); | |
| 22384 | + | |
| 22385 | +_Object$defineProperty(exports, "Resizeable", { | |
| 22386 | + enumerable: true, | |
| 22387 | + get: function get() { | |
| 22388 | + return _resizeable.Resizeable; | |
| 22389 | + } | |
| 22390 | +}); | |
| 22391 | + | |
| 22392 | +var _columnChangeSize = __webpack_require__(914); | |
| 22393 | + | |
| 22394 | +var _draggable = __webpack_require__(915); | |
| 22395 | + | |
| 22396 | +var _resizeable = __webpack_require__(916); | |
| 22397 | + | |
| 1466 | 22398 | /***/ }), |
| 22399 | +/* 914 */ | |
| 22400 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1467 | 22401 | |
| 1468 | -/***/ "../node_modules/@babel/runtime/helpers/superPropBase.js": | |
| 1469 | -/*!***************************************************************!*\ | |
| 1470 | - !*** ../node_modules/@babel/runtime/helpers/superPropBase.js ***! | |
| 1471 | - \***************************************************************/ | |
| 1472 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 22402 | +"use strict"; | |
| 1473 | 22403 | |
| 1474 | -var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"); | |
| 1475 | -function _superPropBase(t, o) { | |
| 1476 | - for (; !{}.hasOwnProperty.call(t, o) && null !== (t = getPrototypeOf(t));); | |
| 1477 | - return t; | |
| 1478 | -} | |
| 1479 | -module.exports = _superPropBase, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1480 | 22404 | |
| 22405 | +var _interopRequireDefault = __webpack_require__(0); | |
| 22406 | + | |
| 22407 | +var _Object$defineProperty = __webpack_require__(1); | |
| 22408 | + | |
| 22409 | +_Object$defineProperty(exports, "__esModule", { | |
| 22410 | + value: true | |
| 22411 | +}); | |
| 22412 | + | |
| 22413 | +exports.default = exports.ColumnChangeSize = void 0; | |
| 22414 | + | |
| 22415 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 22416 | + | |
| 22417 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 22418 | + | |
| 22419 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 22420 | + | |
| 22421 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 22422 | + | |
| 22423 | +var _after = _interopRequireDefault(__webpack_require__(281)); | |
| 22424 | + | |
| 22425 | +var ColumnChangeSize = /*#__PURE__*/function (_After) { | |
| 22426 | + (0, _inherits2.default)(ColumnChangeSize, _After); | |
| 22427 | + | |
| 22428 | + var _super = (0, _createSuper2.default)(ColumnChangeSize); | |
| 22429 | + | |
| 22430 | + function ColumnChangeSize() { | |
| 22431 | + (0, _classCallCheck2.default)(this, ColumnChangeSize); | |
| 22432 | + return _super.apply(this, arguments); | |
| 22433 | + } | |
| 22434 | + | |
| 22435 | + (0, _createClass2.default)(ColumnChangeSize, [{ | |
| 22436 | + key: "getCommand", | |
| 22437 | + value: function getCommand() { | |
| 22438 | + return 'document/elements/settings'; | |
| 22439 | + } | |
| 22440 | + }, { | |
| 22441 | + key: "getId", | |
| 22442 | + value: function getId() { | |
| 22443 | + return 'column-change-size'; | |
| 22444 | + } | |
| 22445 | + }, { | |
| 22446 | + key: "getConditions", | |
| 22447 | + value: function getConditions(args) { | |
| 22448 | + return undefined !== args.settings._inline_size || undefined !== args.settings._column_size; | |
| 22449 | + } | |
| 22450 | + }, { | |
| 22451 | + key: "apply", | |
| 22452 | + value: function apply(args) { | |
| 22453 | + var _args$containers = args.containers, | |
| 22454 | + containers = _args$containers === void 0 ? [args.container] : _args$containers; | |
| 22455 | + containers.forEach(function ( | |
| 22456 | + /* Container */ | |
| 22457 | + container) { | |
| 22458 | + container.view.changeSizeUI(); | |
| 22459 | + }); | |
| 22460 | + } | |
| 22461 | + }]); | |
| 22462 | + return ColumnChangeSize; | |
| 22463 | +}(_after.default); | |
| 22464 | + | |
| 22465 | +exports.ColumnChangeSize = ColumnChangeSize; | |
| 22466 | +var _default = ColumnChangeSize; | |
| 22467 | +exports.default = _default; | |
| 22468 | + | |
| 1481 | 22469 | /***/ }), |
| 22470 | +/* 915 */ | |
| 22471 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1482 | 22472 | |
| 1483 | -/***/ "../node_modules/@babel/runtime/helpers/toPrimitive.js": | |
| 1484 | -/*!*************************************************************!*\ | |
| 1485 | - !*** ../node_modules/@babel/runtime/helpers/toPrimitive.js ***! | |
| 1486 | - \*************************************************************/ | |
| 1487 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 22473 | +"use strict"; | |
| 1488 | 22474 | |
| 1489 | -var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 1490 | -function toPrimitive(t, r) { | |
| 1491 | - if ("object" != _typeof(t) || !t) return t; | |
| 1492 | - var e = t[Symbol.toPrimitive]; | |
| 1493 | - if (void 0 !== e) { | |
| 1494 | - var i = e.call(t, r || "default"); | |
| 1495 | - if ("object" != _typeof(i)) return i; | |
| 1496 | - throw new TypeError("@@toPrimitive must return a primitive value."); | |
| 22475 | + | |
| 22476 | +var _interopRequireDefault = __webpack_require__(0); | |
| 22477 | + | |
| 22478 | +var _Object$defineProperty = __webpack_require__(1); | |
| 22479 | + | |
| 22480 | +_Object$defineProperty(exports, "__esModule", { | |
| 22481 | + value: true | |
| 22482 | +}); | |
| 22483 | + | |
| 22484 | +exports.default = exports.Draggable = void 0; | |
| 22485 | + | |
| 22486 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 22487 | + | |
| 22488 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 22489 | + | |
| 22490 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 22491 | + | |
| 22492 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 22493 | + | |
| 22494 | +var _after = _interopRequireDefault(__webpack_require__(281)); | |
| 22495 | + | |
| 22496 | +var Draggable = /*#__PURE__*/function (_After) { | |
| 22497 | + (0, _inherits2.default)(Draggable, _After); | |
| 22498 | + | |
| 22499 | + var _super = (0, _createSuper2.default)(Draggable); | |
| 22500 | + | |
| 22501 | + function Draggable() { | |
| 22502 | + (0, _classCallCheck2.default)(this, Draggable); | |
| 22503 | + return _super.apply(this, arguments); | |
| 1497 | 22504 | } |
| 1498 | - return ("string" === r ? String : Number)(t); | |
| 1499 | -} | |
| 1500 | -module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1501 | 22505 | |
| 22506 | + (0, _createClass2.default)(Draggable, [{ | |
| 22507 | + key: "getCommand", | |
| 22508 | + value: function getCommand() { | |
| 22509 | + return 'document/elements/settings'; | |
| 22510 | + } | |
| 22511 | + }, { | |
| 22512 | + key: "getId", | |
| 22513 | + value: function getId() { | |
| 22514 | + return 'draggable'; | |
| 22515 | + } | |
| 22516 | + }, { | |
| 22517 | + key: "getConditions", | |
| 22518 | + value: function getConditions(args) { | |
| 22519 | + return undefined !== args.settings._position; | |
| 22520 | + } | |
| 22521 | + }, { | |
| 22522 | + key: "apply", | |
| 22523 | + value: function apply(args) { | |
| 22524 | + var _args$containers = args.containers, | |
| 22525 | + containers = _args$containers === void 0 ? [args.container] : _args$containers; | |
| 22526 | + containers.forEach(function ( | |
| 22527 | + /* Container */ | |
| 22528 | + container) { | |
| 22529 | + if (container.view.options.draggable) { | |
| 22530 | + container.view.options.draggable.toggle(); | |
| 22531 | + } | |
| 22532 | + }); | |
| 22533 | + } | |
| 22534 | + }]); | |
| 22535 | + return Draggable; | |
| 22536 | +}(_after.default); | |
| 22537 | + | |
| 22538 | +exports.Draggable = Draggable; | |
| 22539 | +var _default = Draggable; | |
| 22540 | +exports.default = _default; | |
| 22541 | + | |
| 1502 | 22542 | /***/ }), |
| 22543 | +/* 916 */ | |
| 22544 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1503 | 22545 | |
| 1504 | -/***/ "../node_modules/@babel/runtime/helpers/toPropertyKey.js": | |
| 1505 | -/*!***************************************************************!*\ | |
| 1506 | - !*** ../node_modules/@babel/runtime/helpers/toPropertyKey.js ***! | |
| 1507 | - \***************************************************************/ | |
| 1508 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 22546 | +"use strict"; | |
| 1509 | 22547 | |
| 1510 | -var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 1511 | -var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ "../node_modules/@babel/runtime/helpers/toPrimitive.js"); | |
| 1512 | -function toPropertyKey(t) { | |
| 1513 | - var i = toPrimitive(t, "string"); | |
| 1514 | - return "symbol" == _typeof(i) ? i : i + ""; | |
| 1515 | -} | |
| 1516 | -module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1517 | 22548 | |
| 22549 | +var _interopRequireDefault = __webpack_require__(0); | |
| 22550 | + | |
| 22551 | +var _Object$defineProperty = __webpack_require__(1); | |
| 22552 | + | |
| 22553 | +_Object$defineProperty(exports, "__esModule", { | |
| 22554 | + value: true | |
| 22555 | +}); | |
| 22556 | + | |
| 22557 | +exports.default = exports.Resizeable = void 0; | |
| 22558 | + | |
| 22559 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 22560 | + | |
| 22561 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 22562 | + | |
| 22563 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 22564 | + | |
| 22565 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 22566 | + | |
| 22567 | +var _after = _interopRequireDefault(__webpack_require__(281)); | |
| 22568 | + | |
| 22569 | +var Resizeable = /*#__PURE__*/function (_After) { | |
| 22570 | + (0, _inherits2.default)(Resizeable, _After); | |
| 22571 | + | |
| 22572 | + var _super = (0, _createSuper2.default)(Resizeable); | |
| 22573 | + | |
| 22574 | + function Resizeable() { | |
| 22575 | + (0, _classCallCheck2.default)(this, Resizeable); | |
| 22576 | + return _super.apply(this, arguments); | |
| 22577 | + } | |
| 22578 | + | |
| 22579 | + (0, _createClass2.default)(Resizeable, [{ | |
| 22580 | + key: "getCommand", | |
| 22581 | + value: function getCommand() { | |
| 22582 | + return 'document/elements/settings'; | |
| 22583 | + } | |
| 22584 | + }, { | |
| 22585 | + key: "getId", | |
| 22586 | + value: function getId() { | |
| 22587 | + return 'resizeable'; | |
| 22588 | + } | |
| 22589 | + }, { | |
| 22590 | + key: "getConditions", | |
| 22591 | + value: function getConditions(args) { | |
| 22592 | + return undefined !== args.settings._position || undefined !== args.settings._element_width; | |
| 22593 | + } | |
| 22594 | + }, { | |
| 22595 | + key: "apply", | |
| 22596 | + value: function apply(args) { | |
| 22597 | + var _args$containers = args.containers, | |
| 22598 | + containers = _args$containers === void 0 ? [args.container] : _args$containers; | |
| 22599 | + containers.forEach(function ( | |
| 22600 | + /* Container */ | |
| 22601 | + container) { | |
| 22602 | + if (container.view.options.resizeable) { | |
| 22603 | + container.view.options.resizeable.toggle(); | |
| 22604 | + } | |
| 22605 | + }); | |
| 22606 | + } | |
| 22607 | + }]); | |
| 22608 | + return Resizeable; | |
| 22609 | +}(_after.default); | |
| 22610 | + | |
| 22611 | +exports.Resizeable = Resizeable; | |
| 22612 | +var _default = Resizeable; | |
| 22613 | +exports.default = _default; | |
| 22614 | + | |
| 1518 | 22615 | /***/ }), |
| 22616 | +/* 917 */ | |
| 22617 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1519 | 22618 | |
| 1520 | -/***/ "../node_modules/@babel/runtime/helpers/typeof.js": | |
| 1521 | -/*!********************************************************!*\ | |
| 1522 | - !*** ../node_modules/@babel/runtime/helpers/typeof.js ***! | |
| 1523 | - \********************************************************/ | |
| 1524 | -/***/ ((module) => { | |
| 22619 | +"use strict"; | |
| 1525 | 22620 | |
| 1526 | -function _typeof(o) { | |
| 1527 | - "@babel/helpers - typeof"; | |
| 1528 | 22621 | |
| 1529 | - return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { | |
| 1530 | - return typeof o; | |
| 1531 | - } : function (o) { | |
| 1532 | - return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; | |
| 1533 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o); | |
| 1534 | -} | |
| 1535 | -module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 22622 | +var _interopRequireWildcard = __webpack_require__(34); | |
| 1536 | 22623 | |
| 22624 | +var _interopRequireDefault = __webpack_require__(0); | |
| 22625 | + | |
| 22626 | +var _Object$defineProperty = __webpack_require__(1); | |
| 22627 | + | |
| 22628 | +_Object$defineProperty(exports, "__esModule", { | |
| 22629 | + value: true | |
| 22630 | +}); | |
| 22631 | + | |
| 22632 | +exports.default = void 0; | |
| 22633 | + | |
| 22634 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 22635 | + | |
| 22636 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 22637 | + | |
| 22638 | +var _get2 = _interopRequireDefault(__webpack_require__(26)); | |
| 22639 | + | |
| 22640 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(16)); | |
| 22641 | + | |
| 22642 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 22643 | + | |
| 22644 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 22645 | + | |
| 22646 | +var _componentBase = _interopRequireDefault(__webpack_require__(87)); | |
| 22647 | + | |
| 22648 | +var _component = _interopRequireDefault(__webpack_require__(918)); | |
| 22649 | + | |
| 22650 | +var _component2 = _interopRequireDefault(__webpack_require__(921)); | |
| 22651 | + | |
| 22652 | +var commandsData = _interopRequireWildcard(__webpack_require__(924)); | |
| 22653 | + | |
| 22654 | +var Component = /*#__PURE__*/function (_ComponentBase) { | |
| 22655 | + (0, _inherits2.default)(Component, _ComponentBase); | |
| 22656 | + | |
| 22657 | + var _super = (0, _createSuper2.default)(Component); | |
| 22658 | + | |
| 22659 | + function Component() { | |
| 22660 | + (0, _classCallCheck2.default)(this, Component); | |
| 22661 | + return _super.apply(this, arguments); | |
| 22662 | + } | |
| 22663 | + | |
| 22664 | + (0, _createClass2.default)(Component, [{ | |
| 22665 | + key: "__construct", | |
| 22666 | + value: function __construct() { | |
| 22667 | + var _this = this; | |
| 22668 | + | |
| 22669 | + var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 22670 | + (0, _get2.default)((0, _getPrototypeOf2.default)(Component.prototype), "__construct", this).call(this, args); | |
| 22671 | + elementorCommon.elements.$window.on('elementor:loaded', function () { | |
| 22672 | + return _this.refreshGlobalData(); | |
| 22673 | + }); | |
| 22674 | + } | |
| 22675 | + }, { | |
| 22676 | + key: "getNamespace", | |
| 22677 | + value: function getNamespace() { | |
| 22678 | + return 'globals'; | |
| 22679 | + } | |
| 22680 | + }, { | |
| 22681 | + key: "registerAPI", | |
| 22682 | + value: function registerAPI() { | |
| 22683 | + $e.components.register(new _component.default({ | |
| 22684 | + manager: this | |
| 22685 | + })); | |
| 22686 | + $e.components.register(new _component2.default({ | |
| 22687 | + manager: this | |
| 22688 | + })); | |
| 22689 | + (0, _get2.default)((0, _getPrototypeOf2.default)(Component.prototype), "registerAPI", this).call(this); | |
| 22690 | + } | |
| 22691 | + }, { | |
| 22692 | + key: "defaultData", | |
| 22693 | + value: function defaultData() { | |
| 22694 | + return this.importCommands(commandsData); | |
| 22695 | + } | |
| 22696 | + }, { | |
| 22697 | + key: "refreshGlobalData", | |
| 22698 | + value: function refreshGlobalData() { | |
| 22699 | + $e.data.deleteCache($e.components.get('globals'), 'globals/index'); | |
| 22700 | + } | |
| 22701 | + }]); | |
| 22702 | + return Component; | |
| 22703 | +}(_componentBase.default); | |
| 22704 | + | |
| 22705 | +exports.default = Component; | |
| 22706 | + | |
| 1537 | 22707 | /***/ }), |
| 22708 | +/* 918 */ | |
| 22709 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1538 | 22710 | |
| 1539 | -/***/ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js": | |
| 1540 | -/*!****************************************************************************!*\ | |
| 1541 | - !*** ../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***! | |
| 1542 | - \****************************************************************************/ | |
| 1543 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 22711 | +"use strict"; | |
| 1544 | 22712 | |
| 1545 | -var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js"); | |
| 1546 | -function _unsupportedIterableToArray(r, a) { | |
| 1547 | - if (r) { | |
| 1548 | - if ("string" == typeof r) return arrayLikeToArray(r, a); | |
| 1549 | - var t = {}.toString.call(r).slice(8, -1); | |
| 1550 | - 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; | |
| 22713 | + | |
| 22714 | +var _interopRequireWildcard = __webpack_require__(34); | |
| 22715 | + | |
| 22716 | +var _interopRequireDefault = __webpack_require__(0); | |
| 22717 | + | |
| 22718 | +var _Object$defineProperty = __webpack_require__(1); | |
| 22719 | + | |
| 22720 | +_Object$defineProperty(exports, "__esModule", { | |
| 22721 | + value: true | |
| 22722 | +}); | |
| 22723 | + | |
| 22724 | +exports.default = void 0; | |
| 22725 | + | |
| 22726 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 22727 | + | |
| 22728 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 22729 | + | |
| 22730 | +var _get2 = _interopRequireDefault(__webpack_require__(26)); | |
| 22731 | + | |
| 22732 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(16)); | |
| 22733 | + | |
| 22734 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 22735 | + | |
| 22736 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 22737 | + | |
| 22738 | +var _componentBase = _interopRequireDefault(__webpack_require__(87)); | |
| 22739 | + | |
| 22740 | +var commands = _interopRequireWildcard(__webpack_require__(919)); | |
| 22741 | + | |
| 22742 | +var Component = /*#__PURE__*/function (_ComponentBase) { | |
| 22743 | + (0, _inherits2.default)(Component, _ComponentBase); | |
| 22744 | + | |
| 22745 | + var _super = (0, _createSuper2.default)(Component); | |
| 22746 | + | |
| 22747 | + function Component() { | |
| 22748 | + (0, _classCallCheck2.default)(this, Component); | |
| 22749 | + return _super.apply(this, arguments); | |
| 1551 | 22750 | } |
| 1552 | -} | |
| 1553 | -module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1554 | 22751 | |
| 1555 | -/***/ }) | |
| 22752 | + (0, _createClass2.default)(Component, [{ | |
| 22753 | + key: "__construct", | |
| 22754 | + value: function __construct() { | |
| 22755 | + var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 22756 | + (0, _get2.default)((0, _getPrototypeOf2.default)(Component.prototype), "__construct", this).call(this, args); | |
| 22757 | + } | |
| 22758 | + }, { | |
| 22759 | + key: "getNamespace", | |
| 22760 | + value: function getNamespace() { | |
| 22761 | + return 'globals/typography'; | |
| 22762 | + } | |
| 22763 | + }, { | |
| 22764 | + key: "defaultCommands", | |
| 22765 | + value: function defaultCommands() { | |
| 22766 | + return this.importCommands(commands); | |
| 22767 | + } | |
| 22768 | + }]); | |
| 22769 | + return Component; | |
| 22770 | +}(_componentBase.default); | |
| 1556 | 22771 | |
| 1557 | -/******/ }); | |
| 1558 | -/************************************************************************/ | |
| 1559 | -/******/ // The module cache | |
| 1560 | -/******/ var __webpack_module_cache__ = {}; | |
| 1561 | -/******/ | |
| 1562 | -/******/ // The require function | |
| 1563 | -/******/ function __webpack_require__(moduleId) { | |
| 1564 | -/******/ // Check if module is in cache | |
| 1565 | -/******/ var cachedModule = __webpack_module_cache__[moduleId]; | |
| 1566 | -/******/ if (cachedModule !== undefined) { | |
| 1567 | -/******/ return cachedModule.exports; | |
| 1568 | -/******/ } | |
| 1569 | -/******/ // Create a new module (and put it into the cache) | |
| 1570 | -/******/ var module = __webpack_module_cache__[moduleId] = { | |
| 1571 | -/******/ // no module.id needed | |
| 1572 | -/******/ // no module.loaded needed | |
| 1573 | -/******/ exports: {} | |
| 1574 | -/******/ }; | |
| 1575 | -/******/ | |
| 1576 | -/******/ // Execute the module function | |
| 1577 | -/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); | |
| 1578 | -/******/ | |
| 1579 | -/******/ // Return the exports of the module | |
| 1580 | -/******/ return module.exports; | |
| 1581 | -/******/ } | |
| 1582 | -/******/ | |
| 1583 | -/************************************************************************/ | |
| 1584 | -var __webpack_exports__ = {}; | |
| 1585 | -// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. | |
| 1586 | -(() => { | |
| 22772 | +exports.default = Component; | |
| 22773 | + | |
| 22774 | +/***/ }), | |
| 22775 | +/* 919 */ | |
| 22776 | +/***/ (function(module, exports, __webpack_require__) { | |
| 22777 | + | |
| 1587 | 22778 | "use strict"; |
| 1588 | -/*!**************************************************!*\ | |
| 1589 | - !*** ../assets/dev/js/editor/editor-document.js ***! | |
| 1590 | - \**************************************************/ | |
| 1591 | 22779 | |
| 1592 | 22780 | |
| 1593 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1594 | -var _commandContainerBase = _interopRequireDefault(__webpack_require__(/*! ./command-bases/command-container-base */ "../assets/dev/js/editor/command-bases/command-container-base.js")); | |
| 1595 | -var _commandContainerInternalBase = _interopRequireDefault(__webpack_require__(/*! ./command-bases/command-container-internal-base */ "../assets/dev/js/editor/command-bases/command-container-internal-base.js")); | |
| 1596 | -var _commandHistoryBase = _interopRequireDefault(__webpack_require__(/*! elementor-document/command-bases/command-history-base */ "../assets/dev/js/editor/document/command-bases/command-history-base.js")); | |
| 1597 | -var _commandHistoryDebounceBase = _interopRequireDefault(__webpack_require__(/*! elementor-document/command-bases/command-history-debounce-base */ "../assets/dev/js/editor/document/command-bases/command-history-debounce-base.js")); | |
| 1598 | -$e.modules.editor = { | |
| 1599 | - CommandContainerBase: _commandContainerBase.default, | |
| 1600 | - CommandContainerInternalBase: _commandContainerInternalBase.default, | |
| 1601 | - document: { | |
| 1602 | - CommandHistoryBase: _commandHistoryBase.default, | |
| 1603 | - CommandHistoryDebounceBase: _commandHistoryDebounceBase.default | |
| 22781 | +var _Object$defineProperty = __webpack_require__(1); | |
| 22782 | + | |
| 22783 | +_Object$defineProperty(exports, "__esModule", { | |
| 22784 | + value: true | |
| 22785 | +}); | |
| 22786 | + | |
| 22787 | +_Object$defineProperty(exports, "Create", { | |
| 22788 | + enumerable: true, | |
| 22789 | + get: function get() { | |
| 22790 | + return _create.Create; | |
| 1604 | 22791 | } |
| 1605 | -}; | |
| 22792 | +}); | |
| 1606 | 22793 | |
| 1607 | -// TODO: Remove, BC. | |
| 1608 | -$e.modules.document = { | |
| 1609 | - /** | |
| 1610 | - * @deprecated since 3.7.0, use `$e.modules.editor.document.CommandHistoryBase` instead. | |
| 1611 | - */ | |
| 1612 | - get CommandHistory() { | |
| 1613 | - elementorDevTools.deprecation.deprecated('$e.modules.document.CommandHistory', '3.7.0', '$e.modules.editor.document.CommandHistoryBase'); | |
| 1614 | - return $e.modules.editor.document.CommandHistoryBase; | |
| 1615 | - }, | |
| 1616 | - /** | |
| 1617 | - * @deprecated since 3.7.0, use `$e.modules.editor.document.CommandHistoryDebounceBase` instead. | |
| 1618 | - */ | |
| 1619 | - get CommandHistoryDebounce() { | |
| 1620 | - elementorDevTools.deprecation.deprecated('$e.modules.CommandHistoryDebounce', '3.7.0', '$e.modules.editor.document.CommandHistoryDebounceBase'); | |
| 1621 | - return $e.modules.editor.document.CommandHistoryDebounceBase; | |
| 22794 | +var _create = __webpack_require__(920); | |
| 22795 | + | |
| 22796 | +/***/ }), | |
| 22797 | +/* 920 */ | |
| 22798 | +/***/ (function(module, exports, __webpack_require__) { | |
| 22799 | + | |
| 22800 | +"use strict"; | |
| 22801 | + | |
| 22802 | + | |
| 22803 | +var _interopRequireDefault = __webpack_require__(0); | |
| 22804 | + | |
| 22805 | +var _Object$defineProperty = __webpack_require__(1); | |
| 22806 | + | |
| 22807 | +_Object$defineProperty(exports, "__esModule", { | |
| 22808 | + value: true | |
| 22809 | +}); | |
| 22810 | + | |
| 22811 | +exports.Create = void 0; | |
| 22812 | + | |
| 22813 | +var _values = _interopRequireDefault(__webpack_require__(54)); | |
| 22814 | + | |
| 22815 | +__webpack_require__(61); | |
| 22816 | + | |
| 22817 | +__webpack_require__(141); | |
| 22818 | + | |
| 22819 | +__webpack_require__(183); | |
| 22820 | + | |
| 22821 | +var _slicedToArray2 = _interopRequireDefault(__webpack_require__(105)); | |
| 22822 | + | |
| 22823 | +var _entries = _interopRequireDefault(__webpack_require__(93)); | |
| 22824 | + | |
| 22825 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 22826 | + | |
| 22827 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 22828 | + | |
| 22829 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 22830 | + | |
| 22831 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 22832 | + | |
| 22833 | +var _createBase = _interopRequireDefault(__webpack_require__(707)); | |
| 22834 | + | |
| 22835 | +var Create = /*#__PURE__*/function (_CreateBase) { | |
| 22836 | + (0, _inherits2.default)(Create, _CreateBase); | |
| 22837 | + | |
| 22838 | + var _super = (0, _createSuper2.default)(Create); | |
| 22839 | + | |
| 22840 | + function Create() { | |
| 22841 | + (0, _classCallCheck2.default)(this, Create); | |
| 22842 | + return _super.apply(this, arguments); | |
| 1622 | 22843 | } |
| 1623 | -}; | |
| 1624 | -})(); | |
| 1625 | 22844 | |
| 1626 | -/******/ })() | |
| 1627 | -; | |
| 22845 | + (0, _createClass2.default)(Create, [{ | |
| 22846 | + key: "apply", | |
| 22847 | + value: function apply() { | |
| 22848 | + var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 22849 | + var container = args.container, | |
| 22850 | + setting = args.setting, | |
| 22851 | + title = args.title, | |
| 22852 | + controls = container.controls, | |
| 22853 | + availableControls = {}; | |
| 22854 | + var result = false, | |
| 22855 | + groupPrefix = ''; | |
| 22856 | + | |
| 22857 | + if (controls[setting] && controls[setting].groupPrefix) { | |
| 22858 | + groupPrefix = controls[setting].groupPrefix; | |
| 22859 | + } else { | |
| 22860 | + throw new Error("Invalid setting: control '".concat(setting, "', not found.")); | |
| 22861 | + } | |
| 22862 | + | |
| 22863 | + if (groupPrefix) { | |
| 22864 | + (0, _entries.default)(controls).forEach(function (_ref) { | |
| 22865 | + var _ref2 = (0, _slicedToArray2.default)(_ref, 1), | |
| 22866 | + key = _ref2[0]; | |
| 22867 | + | |
| 22868 | + if (key.includes(groupPrefix)) { | |
| 22869 | + // Get values but remove defaults. | |
| 22870 | + var value = container.settings.get(key), | |
| 22871 | + defaultValue = container.controls[key].default; | |
| 22872 | + | |
| 22873 | + if (!_.isEqual(value, defaultValue)) { | |
| 22874 | + availableControls[key.replace(groupPrefix, elementor.config.kit_config.typography_prefix)] = container.settings.get(key); | |
| 22875 | + } | |
| 22876 | + } | |
| 22877 | + }); | |
| 22878 | + } | |
| 22879 | + | |
| 22880 | + if ((0, _values.default)(availableControls).length) { | |
| 22881 | + var id = elementorCommon.helpers.getUniqueId(); | |
| 22882 | + result = $e.data.create("globals/typography?id=".concat(id), { | |
| 22883 | + title: title, | |
| 22884 | + value: availableControls | |
| 22885 | + }); | |
| 22886 | + } | |
| 22887 | + | |
| 22888 | + return result; | |
| 22889 | + } | |
| 22890 | + }]); | |
| 22891 | + return Create; | |
| 22892 | +}(_createBase.default); | |
| 22893 | + | |
| 22894 | +exports.Create = Create; | |
| 22895 | + | |
| 22896 | +/***/ }), | |
| 22897 | +/* 921 */ | |
| 22898 | +/***/ (function(module, exports, __webpack_require__) { | |
| 22899 | + | |
| 22900 | +"use strict"; | |
| 22901 | + | |
| 22902 | + | |
| 22903 | +var _interopRequireWildcard = __webpack_require__(34); | |
| 22904 | + | |
| 22905 | +var _interopRequireDefault = __webpack_require__(0); | |
| 22906 | + | |
| 22907 | +var _Object$defineProperty = __webpack_require__(1); | |
| 22908 | + | |
| 22909 | +_Object$defineProperty(exports, "__esModule", { | |
| 22910 | + value: true | |
| 22911 | +}); | |
| 22912 | + | |
| 22913 | +exports.default = void 0; | |
| 22914 | + | |
| 22915 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 22916 | + | |
| 22917 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 22918 | + | |
| 22919 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 22920 | + | |
| 22921 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 22922 | + | |
| 22923 | +var _componentBase = _interopRequireDefault(__webpack_require__(87)); | |
| 22924 | + | |
| 22925 | +var commands = _interopRequireWildcard(__webpack_require__(922)); | |
| 22926 | + | |
| 22927 | +var Component = /*#__PURE__*/function (_ComponentBase) { | |
| 22928 | + (0, _inherits2.default)(Component, _ComponentBase); | |
| 22929 | + | |
| 22930 | + var _super = (0, _createSuper2.default)(Component); | |
| 22931 | + | |
| 22932 | + function Component() { | |
| 22933 | + (0, _classCallCheck2.default)(this, Component); | |
| 22934 | + return _super.apply(this, arguments); | |
| 22935 | + } | |
| 22936 | + | |
| 22937 | + (0, _createClass2.default)(Component, [{ | |
| 22938 | + key: "getNamespace", | |
| 22939 | + value: function getNamespace() { | |
| 22940 | + return 'globals/colors'; | |
| 22941 | + } | |
| 22942 | + }, { | |
| 22943 | + key: "defaultCommands", | |
| 22944 | + value: function defaultCommands() { | |
| 22945 | + return this.importCommands(commands); | |
| 22946 | + } | |
| 22947 | + }]); | |
| 22948 | + return Component; | |
| 22949 | +}(_componentBase.default); | |
| 22950 | + | |
| 22951 | +exports.default = Component; | |
| 22952 | + | |
| 22953 | +/***/ }), | |
| 22954 | +/* 922 */ | |
| 22955 | +/***/ (function(module, exports, __webpack_require__) { | |
| 22956 | + | |
| 22957 | +"use strict"; | |
| 22958 | + | |
| 22959 | + | |
| 22960 | +var _Object$defineProperty = __webpack_require__(1); | |
| 22961 | + | |
| 22962 | +_Object$defineProperty(exports, "__esModule", { | |
| 22963 | + value: true | |
| 22964 | +}); | |
| 22965 | + | |
| 22966 | +_Object$defineProperty(exports, "Create", { | |
| 22967 | + enumerable: true, | |
| 22968 | + get: function get() { | |
| 22969 | + return _create.Create; | |
| 22970 | + } | |
| 22971 | +}); | |
| 22972 | + | |
| 22973 | +var _create = __webpack_require__(923); | |
| 22974 | + | |
| 22975 | +/***/ }), | |
| 22976 | +/* 923 */ | |
| 22977 | +/***/ (function(module, exports, __webpack_require__) { | |
| 22978 | + | |
| 22979 | +"use strict"; | |
| 22980 | + | |
| 22981 | + | |
| 22982 | +var _interopRequireDefault = __webpack_require__(0); | |
| 22983 | + | |
| 22984 | +var _Object$defineProperty = __webpack_require__(1); | |
| 22985 | + | |
| 22986 | +_Object$defineProperty(exports, "__esModule", { | |
| 22987 | + value: true | |
| 22988 | +}); | |
| 22989 | + | |
| 22990 | +exports.Create = void 0; | |
| 22991 | + | |
| 22992 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 22993 | + | |
| 22994 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 22995 | + | |
| 22996 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 22997 | + | |
| 22998 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 22999 | + | |
| 23000 | +var _createBase = _interopRequireDefault(__webpack_require__(707)); | |
| 23001 | + | |
| 23002 | +var Create = /*#__PURE__*/function (_CreateBase) { | |
| 23003 | + (0, _inherits2.default)(Create, _CreateBase); | |
| 23004 | + | |
| 23005 | + var _super = (0, _createSuper2.default)(Create); | |
| 23006 | + | |
| 23007 | + function Create() { | |
| 23008 | + (0, _classCallCheck2.default)(this, Create); | |
| 23009 | + return _super.apply(this, arguments); | |
| 23010 | + } | |
| 23011 | + | |
| 23012 | + (0, _createClass2.default)(Create, [{ | |
| 23013 | + key: "apply", | |
| 23014 | + value: function apply() { | |
| 23015 | + var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 23016 | + var container = args.container, | |
| 23017 | + setting = args.setting, | |
| 23018 | + title = args.title, | |
| 23019 | + controls = container.controls; | |
| 23020 | + var result = false; | |
| 23021 | + | |
| 23022 | + if (!controls[setting]) { | |
| 23023 | + throw new Error("Invalid setting: control '".concat(setting, "', not found.")); | |
| 23024 | + } // `args.id` used by tests. | |
| 23025 | + | |
| 23026 | + | |
| 23027 | + var id = args.id || elementorCommon.helpers.getUniqueId(); | |
| 23028 | + result = $e.data.create("globals/colors?id=".concat(id), { | |
| 23029 | + title: title, | |
| 23030 | + value: container.settings.get(setting) | |
| 23031 | + }); | |
| 23032 | + return result; | |
| 23033 | + } | |
| 23034 | + }]); | |
| 23035 | + return Create; | |
| 23036 | +}(_createBase.default); | |
| 23037 | + | |
| 23038 | +exports.Create = Create; | |
| 23039 | + | |
| 23040 | +/***/ }), | |
| 23041 | +/* 924 */ | |
| 23042 | +/***/ (function(module, exports, __webpack_require__) { | |
| 23043 | + | |
| 23044 | +"use strict"; | |
| 23045 | + | |
| 23046 | + | |
| 23047 | +var _interopRequireDefault = __webpack_require__(0); | |
| 23048 | + | |
| 23049 | +var _Object$defineProperty = __webpack_require__(1); | |
| 23050 | + | |
| 23051 | +_Object$defineProperty(exports, "__esModule", { | |
| 23052 | + value: true | |
| 23053 | +}); | |
| 23054 | + | |
| 23055 | +_Object$defineProperty(exports, "Colors", { | |
| 23056 | + enumerable: true, | |
| 23057 | + get: function get() { | |
| 23058 | + return _colors.Colors; | |
| 23059 | + } | |
| 23060 | +}); | |
| 23061 | + | |
| 23062 | +_Object$defineProperty(exports, "Typography", { | |
| 23063 | + enumerable: true, | |
| 23064 | + get: function get() { | |
| 23065 | + return _typography.Typography; | |
| 23066 | + } | |
| 23067 | +}); | |
| 23068 | + | |
| 23069 | +exports.Index = void 0; | |
| 23070 | + | |
| 23071 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 23072 | + | |
| 23073 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 23074 | + | |
| 23075 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 23076 | + | |
| 23077 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 23078 | + | |
| 23079 | +var _commandData = _interopRequireDefault(__webpack_require__(314)); | |
| 23080 | + | |
| 23081 | +var _colors = __webpack_require__(925); | |
| 23082 | + | |
| 23083 | +var _typography = __webpack_require__(926); | |
| 23084 | + | |
| 23085 | +// Alphabetical order | |
| 23086 | +// TODO: Remove - Move to into base, Possible to handle using ComponentData. | |
| 23087 | +var Index = /*#__PURE__*/function (_CommandData) { | |
| 23088 | + (0, _inherits2.default)(Index, _CommandData); | |
| 23089 | + | |
| 23090 | + var _super = (0, _createSuper2.default)(Index); | |
| 23091 | + | |
| 23092 | + function Index() { | |
| 23093 | + (0, _classCallCheck2.default)(this, Index); | |
| 23094 | + return _super.apply(this, arguments); | |
| 23095 | + } | |
| 23096 | + | |
| 23097 | + (0, _createClass2.default)(Index, null, [{ | |
| 23098 | + key: "getEndpointFormat", | |
| 23099 | + value: function getEndpointFormat() { | |
| 23100 | + // Format 'globals/index' to 'globals'. | |
| 23101 | + return 'globals'; | |
| 23102 | + } | |
| 23103 | + }]); | |
| 23104 | + return Index; | |
| 23105 | +}(_commandData.default); | |
| 23106 | + | |
| 23107 | +exports.Index = Index; | |
| 23108 | + | |
| 23109 | +/***/ }), | |
| 23110 | +/* 925 */ | |
| 23111 | +/***/ (function(module, exports, __webpack_require__) { | |
| 23112 | + | |
| 23113 | +"use strict"; | |
| 23114 | + | |
| 23115 | + | |
| 23116 | +var _interopRequireDefault = __webpack_require__(0); | |
| 23117 | + | |
| 23118 | +var _Object$defineProperty = __webpack_require__(1); | |
| 23119 | + | |
| 23120 | +_Object$defineProperty(exports, "__esModule", { | |
| 23121 | + value: true | |
| 23122 | +}); | |
| 23123 | + | |
| 23124 | +exports.default = exports.Colors = void 0; | |
| 23125 | + | |
| 23126 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 23127 | + | |
| 23128 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 23129 | + | |
| 23130 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 23131 | + | |
| 23132 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 23133 | + | |
| 23134 | +var _commandData = _interopRequireDefault(__webpack_require__(314)); | |
| 23135 | + | |
| 23136 | +var Colors = /*#__PURE__*/function (_CommandData) { | |
| 23137 | + (0, _inherits2.default)(Colors, _CommandData); | |
| 23138 | + | |
| 23139 | + var _super = (0, _createSuper2.default)(Colors); | |
| 23140 | + | |
| 23141 | + function Colors() { | |
| 23142 | + (0, _classCallCheck2.default)(this, Colors); | |
| 23143 | + return _super.apply(this, arguments); | |
| 23144 | + } | |
| 23145 | + | |
| 23146 | + (0, _createClass2.default)(Colors, null, [{ | |
| 23147 | + key: "getEndpointFormat", | |
| 23148 | + value: function getEndpointFormat() { | |
| 23149 | + return 'globals/colors/{id}'; | |
| 23150 | + } | |
| 23151 | + }]); | |
| 23152 | + return Colors; | |
| 23153 | +}(_commandData.default); | |
| 23154 | + | |
| 23155 | +exports.Colors = Colors; | |
| 23156 | +var _default = Colors; | |
| 23157 | +exports.default = _default; | |
| 23158 | + | |
| 23159 | +/***/ }), | |
| 23160 | +/* 926 */ | |
| 23161 | +/***/ (function(module, exports, __webpack_require__) { | |
| 23162 | + | |
| 23163 | +"use strict"; | |
| 23164 | + | |
| 23165 | + | |
| 23166 | +var _interopRequireDefault = __webpack_require__(0); | |
| 23167 | + | |
| 23168 | +var _Object$defineProperty = __webpack_require__(1); | |
| 23169 | + | |
| 23170 | +_Object$defineProperty(exports, "__esModule", { | |
| 23171 | + value: true | |
| 23172 | +}); | |
| 23173 | + | |
| 23174 | +exports.default = exports.Typography = void 0; | |
| 23175 | + | |
| 23176 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); | |
| 23177 | + | |
| 23178 | +var _createClass2 = _interopRequireDefault(__webpack_require__(3)); | |
| 23179 | + | |
| 23180 | +var _inherits2 = _interopRequireDefault(__webpack_require__(4)); | |
| 23181 | + | |
| 23182 | +var _createSuper2 = _interopRequireDefault(__webpack_require__(5)); | |
| 23183 | + | |
| 23184 | +var _commandData = _interopRequireDefault(__webpack_require__(314)); | |
| 23185 | + | |
| 23186 | +var Typography = /*#__PURE__*/function (_CommandData) { | |
| 23187 | + (0, _inherits2.default)(Typography, _CommandData); | |
| 23188 | + | |
| 23189 | + var _super = (0, _createSuper2.default)(Typography); | |
| 23190 | + | |
| 23191 | + function Typography() { | |
| 23192 | + (0, _classCallCheck2.default)(this, Typography); | |
| 23193 | + return _super.apply(this, arguments); | |
| 23194 | + } | |
| 23195 | + | |
| 23196 | + (0, _createClass2.default)(Typography, null, [{ | |
| 23197 | + key: "getEndpointFormat", | |
| 23198 | + value: function getEndpointFormat() { | |
| 23199 | + return 'globals/typography/{id}'; | |
| 23200 | + } | |
| 23201 | + }]); | |
| 23202 | + return Typography; | |
| 23203 | +}(_commandData.default); | |
| 23204 | + | |
| 23205 | +exports.Typography = Typography; | |
| 23206 | +var _default = Typography; | |
| 23207 | +exports.default = _default; | |
| 23208 | + | |
| 23209 | +/***/ }) | |
| 23210 | +/******/ ]); | |
| 1628 | 23211 | //# sourceMappingURL=editor-document.js.map |