← All changes
|
assets/js/kit-elements-defaults-editor.js
+1694
-1298
4.3.0-beta3
→
3.26.0-dev5
View file →
| @@ -1,1350 +1,1746 @@ | ||
| 1 | -(function(_wordpress_i18n) { | |
| 1 | +/*! elementor - v3.26.0 - 12-12-2024 */ | |
| 2 | +/******/ (() => { // webpackBootstrap | |
| 3 | +/******/ var __webpack_modules__ = ({ | |
| 2 | 4 | |
| 3 | -//#region \0rolldown/runtime.js | |
| 4 | - var __create = Object.create; | |
| 5 | - var __defProp = Object.defineProperty; | |
| 6 | - var __name = (target, value) => __defProp(target, "name", { | |
| 7 | - value, | |
| 8 | - configurable: true | |
| 9 | - }); | |
| 10 | - var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 11 | - var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 12 | - var __getProtoOf = Object.getPrototypeOf; | |
| 13 | - var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 14 | - var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports); | |
| 15 | - var __exportAll = (all, no_symbols) => { | |
| 16 | - let target = {}; | |
| 17 | - for (var name in all) { | |
| 18 | - __defProp(target, name, { | |
| 19 | - get: all[name], | |
| 20 | - enumerable: true | |
| 21 | - }); | |
| 22 | - } | |
| 23 | - if (!no_symbols) { | |
| 24 | - __defProp(target, Symbol.toStringTag, { value: "Module" }); | |
| 25 | - } | |
| 26 | - return target; | |
| 27 | - }; | |
| 28 | - var __copyProps = (to, from, except, desc) => { | |
| 29 | - if (from && typeof from === "object" || typeof from === "function") { | |
| 30 | - for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) { | |
| 31 | - key = keys[i]; | |
| 32 | - if (!__hasOwnProp.call(to, key) && key !== except) { | |
| 33 | - __defProp(to, key, { | |
| 34 | - get: ((k) => from[k]).bind(null, key), | |
| 35 | - enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable | |
| 36 | - }); | |
| 37 | - } | |
| 38 | - } | |
| 39 | - } | |
| 40 | - return to; | |
| 41 | - }; | |
| 42 | - var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { | |
| 43 | - value: mod, | |
| 44 | - enumerable: true | |
| 45 | - }) : target, mod)); | |
| 5 | +/***/ "../modules/kit-elements-defaults/assets/js/editor/api.js": | |
| 6 | +/*!****************************************************************!*\ | |
| 7 | + !*** ../modules/kit-elements-defaults/assets/js/editor/api.js ***! | |
| 8 | + \****************************************************************/ | |
| 9 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 46 | 10 | |
| 47 | -//#endregion | |
| 11 | +"use strict"; | |
| 48 | 12 | |
| 49 | -//#region node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js | |
| 50 | - function _arrayLikeToArray(r, a) { | |
| 51 | - (null == a || a > r.length) && (a = r.length); | |
| 52 | - for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; | |
| 53 | - return n; | |
| 54 | - } | |
| 55 | 13 | |
| 56 | -//#endregion | |
| 57 | -//#region node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js | |
| 58 | - function _arrayWithoutHoles(r) { | |
| 59 | - if (Array.isArray(r)) return _arrayLikeToArray(r); | |
| 60 | - } | |
| 14 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 15 | +Object.defineProperty(exports, "__esModule", ({ | |
| 16 | + value: true | |
| 17 | +})); | |
| 18 | +exports.deleteElementDefaults = deleteElementDefaults; | |
| 19 | +exports.getElementDefaults = getElementDefaults; | |
| 20 | +exports.loadElementsDefaults = loadElementsDefaults; | |
| 21 | +exports.updateElementDefaults = updateElementDefaults; | |
| 22 | +var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js")); | |
| 23 | +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js")); | |
| 24 | +var NAMESPACE = 'kit-elements-defaults'; | |
| 25 | +function loadElementsDefaults() { | |
| 26 | + return _loadElementsDefaults.apply(this, arguments); | |
| 27 | +} | |
| 28 | +function _loadElementsDefaults() { | |
| 29 | + _loadElementsDefaults = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { | |
| 30 | + return _regenerator.default.wrap(function _callee$(_context) { | |
| 31 | + while (1) switch (_context.prev = _context.next) { | |
| 32 | + case 0: | |
| 33 | + $e.data.cache.storage.removeItem(NAMESPACE); | |
| 34 | + return _context.abrupt("return", $e.data.get("".concat(NAMESPACE, "/index"))); | |
| 35 | + case 2: | |
| 36 | + case "end": | |
| 37 | + return _context.stop(); | |
| 38 | + } | |
| 39 | + }, _callee); | |
| 40 | + })); | |
| 41 | + return _loadElementsDefaults.apply(this, arguments); | |
| 42 | +} | |
| 43 | +function getElementDefaults(type) { | |
| 44 | + var defaults = $e.data.cache.storage.getItem(NAMESPACE) || {}; | |
| 45 | + return defaults[type] || {}; | |
| 46 | +} | |
| 47 | +function updateElementDefaults(_x, _x2) { | |
| 48 | + return _updateElementDefaults.apply(this, arguments); | |
| 49 | +} | |
| 50 | +function _updateElementDefaults() { | |
| 51 | + _updateElementDefaults = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2(type, settings) { | |
| 52 | + return _regenerator.default.wrap(function _callee2$(_context2) { | |
| 53 | + while (1) switch (_context2.prev = _context2.next) { | |
| 54 | + case 0: | |
| 55 | + _context2.next = 2; | |
| 56 | + return $e.data.update("".concat(NAMESPACE, "/index"), { | |
| 57 | + settings: settings | |
| 58 | + }, { | |
| 59 | + type: type | |
| 60 | + }); | |
| 61 | + case 2: | |
| 62 | + _context2.next = 4; | |
| 63 | + return loadElementsDefaults(); | |
| 64 | + case 4: | |
| 65 | + case "end": | |
| 66 | + return _context2.stop(); | |
| 67 | + } | |
| 68 | + }, _callee2); | |
| 69 | + })); | |
| 70 | + return _updateElementDefaults.apply(this, arguments); | |
| 71 | +} | |
| 72 | +function deleteElementDefaults(_x3) { | |
| 73 | + return _deleteElementDefaults.apply(this, arguments); | |
| 74 | +} | |
| 75 | +function _deleteElementDefaults() { | |
| 76 | + _deleteElementDefaults = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3(type) { | |
| 77 | + return _regenerator.default.wrap(function _callee3$(_context3) { | |
| 78 | + while (1) switch (_context3.prev = _context3.next) { | |
| 79 | + case 0: | |
| 80 | + _context3.next = 2; | |
| 81 | + return $e.data.delete("".concat(NAMESPACE, "/index"), { | |
| 82 | + type: type | |
| 83 | + }); | |
| 84 | + case 2: | |
| 85 | + _context3.next = 4; | |
| 86 | + return loadElementsDefaults(); | |
| 87 | + case 4: | |
| 88 | + case "end": | |
| 89 | + return _context3.stop(); | |
| 90 | + } | |
| 91 | + }, _callee3); | |
| 92 | + })); | |
| 93 | + return _deleteElementDefaults.apply(this, arguments); | |
| 94 | +} | |
| 61 | 95 | |
| 62 | -//#endregion | |
| 63 | -//#region node_modules/@babel/runtime/helpers/esm/iterableToArray.js | |
| 64 | - function _iterableToArray(r) { | |
| 65 | - if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); | |
| 66 | - } | |
| 96 | +/***/ }), | |
| 67 | 97 | |
| 68 | -//#endregion | |
| 69 | -//#region node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js | |
| 70 | - function _unsupportedIterableToArray(r, a) { | |
| 71 | - if (r) { | |
| 72 | - if ("string" == typeof r) return _arrayLikeToArray(r, a); | |
| 73 | - var t = {}.toString.call(r).slice(8, -1); | |
| 74 | - 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; | |
| 75 | - } | |
| 76 | - } | |
| 98 | +/***/ "../modules/kit-elements-defaults/assets/js/editor/commands/confirm-creation.js": | |
| 99 | +/*!**************************************************************************************!*\ | |
| 100 | + !*** ../modules/kit-elements-defaults/assets/js/editor/commands/confirm-creation.js ***! | |
| 101 | + \**************************************************************************************/ | |
| 102 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 77 | 103 | |
| 78 | -//#endregion | |
| 79 | -//#region node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js | |
| 80 | - function _nonIterableSpread() { | |
| 81 | - throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | |
| 82 | - } | |
| 104 | +"use strict"; | |
| 83 | 105 | |
| 84 | -//#endregion | |
| 85 | -//#region node_modules/@babel/runtime/helpers/esm/toConsumableArray.js | |
| 86 | - function _toConsumableArray(r) { | |
| 87 | - return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); | |
| 88 | - } | |
| 89 | 106 | |
| 90 | -//#endregion | |
| 91 | -//#region node_modules/@babel/runtime/helpers/esm/classCallCheck.js | |
| 92 | - function _classCallCheck(a, n) { | |
| 93 | - if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); | |
| 94 | - } | |
| 107 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 108 | +Object.defineProperty(exports, "__esModule", ({ | |
| 109 | + value: true | |
| 110 | +})); | |
| 111 | +exports["default"] = void 0; | |
| 112 | +var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js")); | |
| 113 | +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js")); | |
| 114 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 115 | +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 116 | +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 117 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 118 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 119 | +var _confirmCreationDialog = __webpack_require__(/*! ../confirm-creation-dialog */ "../modules/kit-elements-defaults/assets/js/editor/confirm-creation-dialog.js"); | |
| 120 | +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)); } | |
| 121 | +function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 122 | +var ConfirmCreation = exports["default"] = /*#__PURE__*/function (_$e$modules$editor$Co) { | |
| 123 | + function ConfirmCreation() { | |
| 124 | + (0, _classCallCheck2.default)(this, ConfirmCreation); | |
| 125 | + return _callSuper(this, ConfirmCreation, arguments); | |
| 126 | + } | |
| 127 | + (0, _inherits2.default)(ConfirmCreation, _$e$modules$editor$Co); | |
| 128 | + return (0, _createClass2.default)(ConfirmCreation, [{ | |
| 129 | + key: "validateArgs", | |
| 130 | + value: function validateArgs() { | |
| 131 | + this.requireContainer(); | |
| 132 | + } | |
| 133 | + }, { | |
| 134 | + key: "apply", | |
| 135 | + value: function () { | |
| 136 | + var _apply = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee(_ref) { | |
| 137 | + var container, confirmCreationDialog; | |
| 138 | + return _regenerator.default.wrap(function _callee$(_context) { | |
| 139 | + while (1) switch (_context.prev = _context.next) { | |
| 140 | + case 0: | |
| 141 | + container = _ref.container; | |
| 142 | + confirmCreationDialog = (0, _confirmCreationDialog.getConfirmCreationDialog)({ | |
| 143 | + onConfirm: function onConfirm() { | |
| 144 | + return $e.run('kit-elements-defaults/create', { | |
| 145 | + container: container | |
| 146 | + }); | |
| 147 | + } | |
| 148 | + }); | |
| 149 | + if (!confirmCreationDialog.doNotShowAgain) { | |
| 150 | + _context.next = 5; | |
| 151 | + break; | |
| 152 | + } | |
| 153 | + $e.run('kit-elements-defaults/create', { | |
| 154 | + container: container | |
| 155 | + }); | |
| 156 | + return _context.abrupt("return"); | |
| 157 | + case 5: | |
| 158 | + confirmCreationDialog.show(); | |
| 159 | + case 6: | |
| 160 | + case "end": | |
| 161 | + return _context.stop(); | |
| 162 | + } | |
| 163 | + }, _callee); | |
| 164 | + })); | |
| 165 | + function apply(_x) { | |
| 166 | + return _apply.apply(this, arguments); | |
| 167 | + } | |
| 168 | + return apply; | |
| 169 | + }() | |
| 170 | + }]); | |
| 171 | +}($e.modules.editor.CommandContainerBase); | |
| 95 | 172 | |
| 96 | -//#endregion | |
| 97 | -//#region node_modules/@babel/runtime/helpers/esm/typeof.js | |
| 98 | - function _typeof(o) { | |
| 99 | - "@babel/helpers - typeof"; | |
| 100 | - return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) { | |
| 101 | - return typeof o; | |
| 102 | - } : function(o) { | |
| 103 | - return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; | |
| 104 | - }, _typeof(o); | |
| 105 | - } | |
| 173 | +/***/ }), | |
| 106 | 174 | |
| 107 | -//#endregion | |
| 108 | -//#region node_modules/@babel/runtime/helpers/esm/toPrimitive.js | |
| 109 | - function toPrimitive(t, r) { | |
| 110 | - if ("object" != _typeof(t) || !t) return t; | |
| 111 | - var e = t[Symbol.toPrimitive]; | |
| 112 | - if (void 0 !== e) { | |
| 113 | - var i = e.call(t, r || "default"); | |
| 114 | - if ("object" != _typeof(i)) return i; | |
| 115 | - throw new TypeError("@@toPrimitive must return a primitive value."); | |
| 116 | - } | |
| 117 | - return ("string" === r ? String : Number)(t); | |
| 118 | - } | |
| 175 | +/***/ "../modules/kit-elements-defaults/assets/js/editor/commands/create.js": | |
| 176 | +/*!****************************************************************************!*\ | |
| 177 | + !*** ../modules/kit-elements-defaults/assets/js/editor/commands/create.js ***! | |
| 178 | + \****************************************************************************/ | |
| 179 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 119 | 180 | |
| 120 | -//#endregion | |
| 121 | -//#region node_modules/@babel/runtime/helpers/esm/toPropertyKey.js | |
| 122 | - function toPropertyKey(t) { | |
| 123 | - var i = toPrimitive(t, "string"); | |
| 124 | - return "symbol" == _typeof(i) ? i : i + ""; | |
| 125 | - } | |
| 181 | +"use strict"; | |
| 182 | +/* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"]; | |
| 126 | 183 | |
| 127 | -//#endregion | |
| 128 | -//#region node_modules/@babel/runtime/helpers/esm/createClass.js | |
| 129 | - function _defineProperties(e, r) { | |
| 130 | - for (var t = 0; t < r.length; t++) { | |
| 131 | - var o = r[t]; | |
| 132 | - o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o); | |
| 133 | - } | |
| 134 | - } | |
| 135 | - function _createClass(e, r, t) { | |
| 136 | - return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; | |
| 137 | - } | |
| 138 | 184 | |
| 139 | -//#endregion | |
| 140 | -//#region node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js | |
| 141 | - function _assertThisInitialized(e) { | |
| 142 | - if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
| 143 | - return e; | |
| 144 | - } | |
| 185 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 186 | +Object.defineProperty(exports, "__esModule", ({ | |
| 187 | + value: true | |
| 188 | +})); | |
| 189 | +exports["default"] = void 0; | |
| 190 | +var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js")); | |
| 191 | +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js")); | |
| 192 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 193 | +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 194 | +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 195 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 196 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 197 | +var _api = __webpack_require__(/*! ../api */ "../modules/kit-elements-defaults/assets/js/editor/api.js"); | |
| 198 | +var _extractContainerSettings = _interopRequireDefault(__webpack_require__(/*! ../extract-container-settings */ "../modules/kit-elements-defaults/assets/js/editor/extract-container-settings.js")); | |
| 199 | +var _utils = __webpack_require__(/*! ../utils */ "../modules/kit-elements-defaults/assets/js/editor/utils.js"); | |
| 200 | +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)); } | |
| 201 | +function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 202 | +var Create = exports["default"] = /*#__PURE__*/function (_$e$modules$editor$Co) { | |
| 203 | + function Create() { | |
| 204 | + (0, _classCallCheck2.default)(this, Create); | |
| 205 | + return _callSuper(this, Create, arguments); | |
| 206 | + } | |
| 207 | + (0, _inherits2.default)(Create, _$e$modules$editor$Co); | |
| 208 | + return (0, _createClass2.default)(Create, [{ | |
| 209 | + key: "validateArgs", | |
| 210 | + value: function validateArgs() { | |
| 211 | + this.requireContainer(); | |
| 212 | + } | |
| 213 | + }, { | |
| 214 | + key: "apply", | |
| 215 | + value: function () { | |
| 216 | + var _apply = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee(_ref) { | |
| 217 | + var container, type, previousDefaults, newDefaults; | |
| 218 | + return _regenerator.default.wrap(function _callee$(_context) { | |
| 219 | + while (1) switch (_context.prev = _context.next) { | |
| 220 | + case 0: | |
| 221 | + container = _ref.container; | |
| 222 | + $e.internal('panel/state-loading'); | |
| 223 | + type = (0, _utils.extractElementType)(container.model), previousDefaults = (0, _api.getElementDefaults)(type), newDefaults = (0, _extractContainerSettings.default)(container); | |
| 224 | + _context.prev = 3; | |
| 225 | + _context.next = 6; | |
| 226 | + return (0, _api.updateElementDefaults)(type, newDefaults); | |
| 227 | + case 6: | |
| 228 | + elementor.notifications.showToast({ | |
| 229 | + message: __('Default settings changed.', 'elementor'), | |
| 230 | + buttons: [{ | |
| 231 | + name: 'undo', | |
| 232 | + text: __('Undo', 'elementor'), | |
| 233 | + callback: function callback() { | |
| 234 | + $e.run('kit-elements-defaults/restore', { | |
| 235 | + type: type, | |
| 236 | + settings: previousDefaults | |
| 237 | + }); | |
| 238 | + } | |
| 239 | + }] | |
| 240 | + }); | |
| 241 | + _context.next = 13; | |
| 242 | + break; | |
| 243 | + case 9: | |
| 244 | + _context.prev = 9; | |
| 245 | + _context.t0 = _context["catch"](3); | |
| 246 | + elementor.notifications.showToast({ | |
| 247 | + message: __('An error occurred.', 'elementor') | |
| 248 | + }); | |
| 249 | + throw _context.t0; | |
| 250 | + case 13: | |
| 251 | + _context.prev = 13; | |
| 252 | + $e.internal('panel/state-ready'); | |
| 253 | + return _context.finish(13); | |
| 254 | + case 16: | |
| 255 | + case "end": | |
| 256 | + return _context.stop(); | |
| 257 | + } | |
| 258 | + }, _callee, null, [[3, 9, 13, 16]]); | |
| 259 | + })); | |
| 260 | + function apply(_x) { | |
| 261 | + return _apply.apply(this, arguments); | |
| 262 | + } | |
| 263 | + return apply; | |
| 264 | + }() | |
| 265 | + }]); | |
| 266 | +}($e.modules.editor.CommandContainerBase); | |
| 145 | 267 | |
| 146 | -//#endregion | |
| 147 | -//#region node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js | |
| 148 | - function _possibleConstructorReturn(t, e) { | |
| 149 | - if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; | |
| 150 | - if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); | |
| 151 | - return _assertThisInitialized(t); | |
| 152 | - } | |
| 268 | +/***/ }), | |
| 153 | 269 | |
| 154 | -//#endregion | |
| 155 | -//#region node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js | |
| 156 | - function _getPrototypeOf(t) { | |
| 157 | - return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) { | |
| 158 | - return t.__proto__ || Object.getPrototypeOf(t); | |
| 159 | - }, _getPrototypeOf(t); | |
| 160 | - } | |
| 270 | +/***/ "../modules/kit-elements-defaults/assets/js/editor/commands/delete.js": | |
| 271 | +/*!****************************************************************************!*\ | |
| 272 | + !*** ../modules/kit-elements-defaults/assets/js/editor/commands/delete.js ***! | |
| 273 | + \****************************************************************************/ | |
| 274 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 161 | 275 | |
| 162 | -//#endregion | |
| 163 | -//#region node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js | |
| 164 | - function _setPrototypeOf(t, e) { | |
| 165 | - return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, e) { | |
| 166 | - return t.__proto__ = e, t; | |
| 167 | - }, _setPrototypeOf(t, e); | |
| 168 | - } | |
| 276 | +"use strict"; | |
| 277 | +/* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"]; | |
| 169 | 278 | |
| 170 | -//#endregion | |
| 171 | -//#region node_modules/@babel/runtime/helpers/esm/inherits.js | |
| 172 | - function _inherits(t, e) { | |
| 173 | - if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); | |
| 174 | - t.prototype = Object.create(e && e.prototype, { constructor: { | |
| 175 | - value: t, | |
| 176 | - writable: !0, | |
| 177 | - configurable: !0 | |
| 178 | - } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); | |
| 179 | - } | |
| 180 | 279 | |
| 181 | -//#endregion | |
| 182 | -//#region node_modules/@babel/runtime/helpers/esm/defineProperty.js | |
| 183 | - function _defineProperty(e, r, t) { | |
| 184 | - return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, { | |
| 185 | - value: t, | |
| 186 | - enumerable: !0, | |
| 187 | - configurable: !0, | |
| 188 | - writable: !0 | |
| 189 | - }) : e[r] = t, e; | |
| 190 | - } | |
| 280 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 281 | +Object.defineProperty(exports, "__esModule", ({ | |
| 282 | + value: true | |
| 283 | +})); | |
| 284 | +exports["default"] = void 0; | |
| 285 | +var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js")); | |
| 286 | +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js")); | |
| 287 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 288 | +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 289 | +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 290 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 291 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 292 | +var _api = __webpack_require__(/*! ../api */ "../modules/kit-elements-defaults/assets/js/editor/api.js"); | |
| 293 | +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)); } | |
| 294 | +function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 295 | +var Delete = exports["default"] = /*#__PURE__*/function (_$e$modules$CommandBa) { | |
| 296 | + function Delete() { | |
| 297 | + (0, _classCallCheck2.default)(this, Delete); | |
| 298 | + return _callSuper(this, Delete, arguments); | |
| 299 | + } | |
| 300 | + (0, _inherits2.default)(Delete, _$e$modules$CommandBa); | |
| 301 | + return (0, _createClass2.default)(Delete, [{ | |
| 302 | + key: "apply", | |
| 303 | + value: function () { | |
| 304 | + var _apply = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee(_ref) { | |
| 305 | + var type; | |
| 306 | + return _regenerator.default.wrap(function _callee$(_context) { | |
| 307 | + while (1) switch (_context.prev = _context.next) { | |
| 308 | + case 0: | |
| 309 | + type = _ref.type; | |
| 310 | + $e.internal('panel/state-loading'); | |
| 311 | + _context.prev = 2; | |
| 312 | + _context.next = 5; | |
| 313 | + return (0, _api.deleteElementDefaults)(type); | |
| 314 | + case 5: | |
| 315 | + elementor.notifications.showToast({ | |
| 316 | + message: __('Default settings has been reset.', 'elementor') | |
| 317 | + }); | |
| 318 | + _context.next = 12; | |
| 319 | + break; | |
| 320 | + case 8: | |
| 321 | + _context.prev = 8; | |
| 322 | + _context.t0 = _context["catch"](2); | |
| 323 | + elementor.notifications.showToast({ | |
| 324 | + message: __('An error occurred.', 'elementor') | |
| 325 | + }); | |
| 326 | + throw _context.t0; | |
| 327 | + case 12: | |
| 328 | + _context.prev = 12; | |
| 329 | + $e.internal('panel/state-ready'); | |
| 330 | + return _context.finish(12); | |
| 331 | + case 15: | |
| 332 | + case "end": | |
| 333 | + return _context.stop(); | |
| 334 | + } | |
| 335 | + }, _callee, null, [[2, 8, 12, 15]]); | |
| 336 | + })); | |
| 337 | + function apply(_x) { | |
| 338 | + return _apply.apply(this, arguments); | |
| 339 | + } | |
| 340 | + return apply; | |
| 341 | + }() | |
| 342 | + }]); | |
| 343 | +}($e.modules.CommandBase); | |
| 191 | 344 | |
| 192 | -//#endregion | |
| 193 | -//#region node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js | |
| 194 | - function asyncGeneratorStep(n, t, e, r, o, a, c) { | |
| 195 | - try { | |
| 196 | - var i = n[a](c); | |
| 197 | - var u = i.value; | |
| 198 | - } catch (n) { | |
| 199 | - e(n); | |
| 200 | - return; | |
| 201 | - } | |
| 202 | - i.done ? t(u) : Promise.resolve(u).then(r, o); | |
| 203 | - } | |
| 204 | - function _asyncToGenerator(n) { | |
| 205 | - return function() { | |
| 206 | - var t = this; | |
| 207 | - var e = arguments; | |
| 208 | - return new Promise(function(r, o) { | |
| 209 | - var a = n.apply(t, e); | |
| 210 | - function _next(n) { | |
| 211 | - asyncGeneratorStep(a, r, o, _next, _throw, "next", n); | |
| 212 | - } | |
| 213 | - function _throw(n) { | |
| 214 | - asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); | |
| 215 | - } | |
| 216 | - _next(void 0); | |
| 217 | - }); | |
| 218 | - }; | |
| 219 | - } | |
| 345 | +/***/ }), | |
| 220 | 346 | |
| 221 | -//#endregion | |
| 222 | -//#region node_modules/@babel/runtime/helpers/OverloadYield.js | |
| 223 | - var require_OverloadYield = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 224 | - function _OverloadYield(e, d) { | |
| 225 | - this.v = e, this.k = d; | |
| 226 | - } | |
| 227 | - module.exports = _OverloadYield, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 228 | - })); | |
| 347 | +/***/ "../modules/kit-elements-defaults/assets/js/editor/commands/index.js": | |
| 348 | +/*!***************************************************************************!*\ | |
| 349 | + !*** ../modules/kit-elements-defaults/assets/js/editor/commands/index.js ***! | |
| 350 | + \***************************************************************************/ | |
| 351 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 229 | 352 | |
| 230 | -//#endregion | |
| 231 | -//#region node_modules/@babel/runtime/helpers/regeneratorDefine.js | |
| 232 | - var require_regeneratorDefine = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 233 | - function _regeneratorDefine(e, r, n, t) { | |
| 234 | - var i = Object.defineProperty; | |
| 235 | - try { | |
| 236 | - i({}, "", {}); | |
| 237 | - } catch (e) { | |
| 238 | - i = 0; | |
| 239 | - } | |
| 240 | - module.exports = _regeneratorDefine = function regeneratorDefine(e, r, n, t) { | |
| 241 | - function o(r, n) { | |
| 242 | - _regeneratorDefine(e, r, function(e) { | |
| 243 | - return this._invoke(r, n, e); | |
| 244 | - }); | |
| 245 | - } | |
| 246 | - r ? i ? i(e, r, { | |
| 247 | - value: n, | |
| 248 | - enumerable: !t, | |
| 249 | - configurable: !t, | |
| 250 | - writable: !t | |
| 251 | - }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); | |
| 252 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _regeneratorDefine(e, r, n, t); | |
| 253 | - } | |
| 254 | - module.exports = _regeneratorDefine, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 255 | - })); | |
| 353 | +"use strict"; | |
| 256 | 354 | |
| 257 | -//#endregion | |
| 258 | -//#region node_modules/@babel/runtime/helpers/regenerator.js | |
| 259 | - var require_regenerator$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 260 | - var regeneratorDefine = require_regeneratorDefine(); | |
| 261 | - function _regenerator() { | |
| 262 | - /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ | |
| 263 | - var e; | |
| 264 | - var t; | |
| 265 | - var r = "function" == typeof Symbol ? Symbol : {}; | |
| 266 | - var n = r.iterator || "@@iterator"; | |
| 267 | - var o = r.toStringTag || "@@toStringTag"; | |
| 268 | - function i(r, n, o, i) { | |
| 269 | - var c = n && n.prototype instanceof Generator ? n : Generator; | |
| 270 | - var u = Object.create(c.prototype); | |
| 271 | - return regeneratorDefine(u, "_invoke", function(r, n, o) { | |
| 272 | - var i; | |
| 273 | - var c; | |
| 274 | - var u; | |
| 275 | - var f = 0; | |
| 276 | - var p = o || []; | |
| 277 | - var y = !1; | |
| 278 | - var G = { | |
| 279 | - p: 0, | |
| 280 | - n: 0, | |
| 281 | - v: e, | |
| 282 | - a: d, | |
| 283 | - f: d.bind(e, 4), | |
| 284 | - d: function d(t, r) { | |
| 285 | - return i = t, c = 0, u = e, G.n = r, a; | |
| 286 | - } | |
| 287 | - }; | |
| 288 | - function d(r, n) { | |
| 289 | - for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { | |
| 290 | - var o; | |
| 291 | - var i = p[t]; | |
| 292 | - var d = G.p; | |
| 293 | - var l = i[2]; | |
| 294 | - r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); | |
| 295 | - } | |
| 296 | - if (o || r > 1) return a; | |
| 297 | - throw y = !0, n; | |
| 298 | - } | |
| 299 | - return function(o, p, l) { | |
| 300 | - if (f > 1) throw TypeError("Generator is already running"); | |
| 301 | - for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { | |
| 302 | - i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); | |
| 303 | - try { | |
| 304 | - if (f = 2, i) { | |
| 305 | - if (c || (o = "next"), t = i[o]) { | |
| 306 | - if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); | |
| 307 | - if (!t.done) return t; | |
| 308 | - u = t.value, c < 2 && (c = 0); | |
| 309 | - } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); | |
| 310 | - i = e; | |
| 311 | - } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; | |
| 312 | - } catch (t) { | |
| 313 | - i = e, c = 1, u = t; | |
| 314 | - } finally { | |
| 315 | - f = 1; | |
| 316 | - } | |
| 317 | - } | |
| 318 | - return { | |
| 319 | - value: t, | |
| 320 | - done: y | |
| 321 | - }; | |
| 322 | - }; | |
| 323 | - }(r, o, i), !0), u; | |
| 324 | - } | |
| 325 | - var a = {}; | |
| 326 | - function Generator() {} | |
| 327 | - function GeneratorFunction() {} | |
| 328 | - function GeneratorFunctionPrototype() {} | |
| 329 | - t = Object.getPrototypeOf; | |
| 330 | - var c = [][n] ? t(t([][n]())) : (regeneratorDefine(t = {}, n, function() { | |
| 331 | - return this; | |
| 332 | - }), t); | |
| 333 | - var u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); | |
| 334 | - function f(e) { | |
| 335 | - return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; | |
| 336 | - } | |
| 337 | - return GeneratorFunction.prototype = GeneratorFunctionPrototype, regeneratorDefine(u, "constructor", GeneratorFunctionPrototype), regeneratorDefine(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", regeneratorDefine(GeneratorFunctionPrototype, o, "GeneratorFunction"), regeneratorDefine(u), regeneratorDefine(u, o, "Generator"), regeneratorDefine(u, n, function() { | |
| 338 | - return this; | |
| 339 | - }), regeneratorDefine(u, "toString", function() { | |
| 340 | - return "[object Generator]"; | |
| 341 | - }), (module.exports = _regenerator = function _regenerator() { | |
| 342 | - return { | |
| 343 | - w: i, | |
| 344 | - m: f | |
| 345 | - }; | |
| 346 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); | |
| 347 | - } | |
| 348 | - module.exports = _regenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 349 | - })); | |
| 350 | 355 | |
| 351 | -//#endregion | |
| 352 | -//#region node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js | |
| 353 | - var require_regeneratorAsyncIterator = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 354 | - var OverloadYield = require_OverloadYield(); | |
| 355 | - var regeneratorDefine = require_regeneratorDefine(); | |
| 356 | - function AsyncIterator(t, e) { | |
| 357 | - function n(r, o, i, f) { | |
| 358 | - try { | |
| 359 | - var c = t[r](o); | |
| 360 | - var u = c.value; | |
| 361 | - return u instanceof OverloadYield ? e.resolve(u.v).then(function(t) { | |
| 362 | - n("next", t, i, f); | |
| 363 | - }, function(t) { | |
| 364 | - n("throw", t, i, f); | |
| 365 | - }) : e.resolve(u).then(function(t) { | |
| 366 | - c.value = t, i(c); | |
| 367 | - }, function(t) { | |
| 368 | - return n("throw", t, i, f); | |
| 369 | - }); | |
| 370 | - } catch (t) { | |
| 371 | - f(t); | |
| 372 | - } | |
| 373 | - } | |
| 374 | - var r; | |
| 375 | - this.next || (regeneratorDefine(AsyncIterator.prototype), regeneratorDefine(AsyncIterator.prototype, "function" == typeof Symbol && Symbol.asyncIterator || "@asyncIterator", function() { | |
| 376 | - return this; | |
| 377 | - })), regeneratorDefine(this, "_invoke", function(t, o, i) { | |
| 378 | - function f() { | |
| 379 | - return new e(function(e, r) { | |
| 380 | - n(t, i, e, r); | |
| 381 | - }); | |
| 382 | - } | |
| 383 | - return r = r ? r.then(f, f) : f(); | |
| 384 | - }, !0); | |
| 385 | - } | |
| 386 | - module.exports = AsyncIterator, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 387 | - })); | |
| 356 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 357 | +Object.defineProperty(exports, "__esModule", ({ | |
| 358 | + value: true | |
| 359 | +})); | |
| 360 | +Object.defineProperty(exports, "ConfirmCreation", ({ | |
| 361 | + enumerable: true, | |
| 362 | + get: function get() { | |
| 363 | + return _confirmCreation.default; | |
| 364 | + } | |
| 365 | +})); | |
| 366 | +Object.defineProperty(exports, "Create", ({ | |
| 367 | + enumerable: true, | |
| 368 | + get: function get() { | |
| 369 | + return _create.default; | |
| 370 | + } | |
| 371 | +})); | |
| 372 | +Object.defineProperty(exports, "Delete", ({ | |
| 373 | + enumerable: true, | |
| 374 | + get: function get() { | |
| 375 | + return _delete.default; | |
| 376 | + } | |
| 377 | +})); | |
| 378 | +Object.defineProperty(exports, "Restore", ({ | |
| 379 | + enumerable: true, | |
| 380 | + get: function get() { | |
| 381 | + return _restore.default; | |
| 382 | + } | |
| 383 | +})); | |
| 384 | +var _confirmCreation = _interopRequireDefault(__webpack_require__(/*! ./confirm-creation */ "../modules/kit-elements-defaults/assets/js/editor/commands/confirm-creation.js")); | |
| 385 | +var _create = _interopRequireDefault(__webpack_require__(/*! ./create */ "../modules/kit-elements-defaults/assets/js/editor/commands/create.js")); | |
| 386 | +var _delete = _interopRequireDefault(__webpack_require__(/*! ./delete */ "../modules/kit-elements-defaults/assets/js/editor/commands/delete.js")); | |
| 387 | +var _restore = _interopRequireDefault(__webpack_require__(/*! ./restore */ "../modules/kit-elements-defaults/assets/js/editor/commands/restore.js")); | |
| 388 | 388 | |
| 389 | -//#endregion | |
| 390 | -//#region node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js | |
| 391 | - var require_regeneratorAsyncGen = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 392 | - var regenerator = require_regenerator$1(); | |
| 393 | - var regeneratorAsyncIterator = require_regeneratorAsyncIterator(); | |
| 394 | - function _regeneratorAsyncGen(r, e, t, o, n) { | |
| 395 | - return new regeneratorAsyncIterator(regenerator().w(r, e, t, o), n || Promise); | |
| 396 | - } | |
| 397 | - module.exports = _regeneratorAsyncGen, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 398 | - })); | |
| 389 | +/***/ }), | |
| 399 | 390 | |
| 400 | -//#endregion | |
| 401 | -//#region node_modules/@babel/runtime/helpers/regeneratorAsync.js | |
| 402 | - var require_regeneratorAsync = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 403 | - var regeneratorAsyncGen = require_regeneratorAsyncGen(); | |
| 404 | - function _regeneratorAsync(n, e, r, t, o) { | |
| 405 | - var a = regeneratorAsyncGen(n, e, r, t, o); | |
| 406 | - return a.next().then(function(n) { | |
| 407 | - return n.done ? n.value : a.next(); | |
| 408 | - }); | |
| 409 | - } | |
| 410 | - module.exports = _regeneratorAsync, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 411 | - })); | |
| 391 | +/***/ "../modules/kit-elements-defaults/assets/js/editor/commands/restore.js": | |
| 392 | +/*!*****************************************************************************!*\ | |
| 393 | + !*** ../modules/kit-elements-defaults/assets/js/editor/commands/restore.js ***! | |
| 394 | + \*****************************************************************************/ | |
| 395 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 412 | 396 | |
| 413 | -//#endregion | |
| 414 | -//#region node_modules/@babel/runtime/helpers/regeneratorKeys.js | |
| 415 | - var require_regeneratorKeys = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 416 | - function _regeneratorKeys(e) { | |
| 417 | - var n = Object(e); | |
| 418 | - var r = []; | |
| 419 | - for (var t in n) r.unshift(t); | |
| 420 | - return function e() { | |
| 421 | - for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = !1, e; | |
| 422 | - return e.done = !0, e; | |
| 423 | - }; | |
| 424 | - } | |
| 425 | - module.exports = _regeneratorKeys, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 426 | - })); | |
| 397 | +"use strict"; | |
| 398 | +/* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"]; | |
| 427 | 399 | |
| 428 | -//#endregion | |
| 429 | -//#region node_modules/@babel/runtime/helpers/typeof.js | |
| 430 | - var require_typeof = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 431 | - function _typeof(o) { | |
| 432 | - "@babel/helpers - typeof"; | |
| 433 | - return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) { | |
| 434 | - return typeof o; | |
| 435 | - } : function(o) { | |
| 436 | - return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; | |
| 437 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o); | |
| 438 | - } | |
| 439 | - module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 440 | - })); | |
| 441 | 400 | |
| 442 | -//#endregion | |
| 443 | -//#region node_modules/@babel/runtime/helpers/regeneratorValues.js | |
| 444 | - var require_regeneratorValues = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 445 | - var _typeof = require_typeof()["default"]; | |
| 446 | - function _regeneratorValues(e) { | |
| 447 | - if (null != e) { | |
| 448 | - var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"]; | |
| 449 | - var r = 0; | |
| 450 | - if (t) return t.call(e); | |
| 451 | - if ("function" == typeof e.next) return e; | |
| 452 | - if (!isNaN(e.length)) return { next: function next() { | |
| 453 | - return e && r >= e.length && (e = void 0), { | |
| 454 | - value: e && e[r++], | |
| 455 | - done: !e | |
| 456 | - }; | |
| 457 | - } }; | |
| 458 | - } | |
| 459 | - throw new TypeError(_typeof(e) + " is not iterable"); | |
| 460 | - } | |
| 461 | - module.exports = _regeneratorValues, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 462 | - })); | |
| 401 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 402 | +Object.defineProperty(exports, "__esModule", ({ | |
| 403 | + value: true | |
| 404 | +})); | |
| 405 | +exports["default"] = void 0; | |
| 406 | +var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js")); | |
| 407 | +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js")); | |
| 408 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 409 | +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 410 | +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 411 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 412 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 413 | +var _api = __webpack_require__(/*! ../api */ "../modules/kit-elements-defaults/assets/js/editor/api.js"); | |
| 414 | +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)); } | |
| 415 | +function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 416 | +var Restore = exports["default"] = /*#__PURE__*/function (_$e$modules$CommandBa) { | |
| 417 | + function Restore() { | |
| 418 | + (0, _classCallCheck2.default)(this, Restore); | |
| 419 | + return _callSuper(this, Restore, arguments); | |
| 420 | + } | |
| 421 | + (0, _inherits2.default)(Restore, _$e$modules$CommandBa); | |
| 422 | + return (0, _createClass2.default)(Restore, [{ | |
| 423 | + key: "apply", | |
| 424 | + value: function () { | |
| 425 | + var _apply = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee(_ref) { | |
| 426 | + var type, settings; | |
| 427 | + return _regenerator.default.wrap(function _callee$(_context) { | |
| 428 | + while (1) switch (_context.prev = _context.next) { | |
| 429 | + case 0: | |
| 430 | + type = _ref.type, settings = _ref.settings; | |
| 431 | + $e.internal('panel/state-loading'); | |
| 432 | + _context.prev = 2; | |
| 433 | + _context.next = 5; | |
| 434 | + return (0, _api.updateElementDefaults)(type, settings); | |
| 435 | + case 5: | |
| 436 | + elementor.notifications.showToast({ | |
| 437 | + message: __('Previous settings restored.', 'elementor') | |
| 438 | + }); | |
| 439 | + _context.next = 12; | |
| 440 | + break; | |
| 441 | + case 8: | |
| 442 | + _context.prev = 8; | |
| 443 | + _context.t0 = _context["catch"](2); | |
| 444 | + elementor.notifications.showToast({ | |
| 445 | + message: __('An error occurred.', 'elementor') | |
| 446 | + }); | |
| 447 | + throw _context.t0; | |
| 448 | + case 12: | |
| 449 | + _context.prev = 12; | |
| 450 | + $e.internal('panel/state-ready'); | |
| 451 | + return _context.finish(12); | |
| 452 | + case 15: | |
| 453 | + case "end": | |
| 454 | + return _context.stop(); | |
| 455 | + } | |
| 456 | + }, _callee, null, [[2, 8, 12, 15]]); | |
| 457 | + })); | |
| 458 | + function apply(_x) { | |
| 459 | + return _apply.apply(this, arguments); | |
| 460 | + } | |
| 461 | + return apply; | |
| 462 | + }() | |
| 463 | + }]); | |
| 464 | +}($e.modules.CommandBase); | |
| 463 | 465 | |
| 464 | -//#endregion | |
| 465 | -//#region node_modules/@babel/runtime/helpers/regeneratorRuntime.js | |
| 466 | - var require_regeneratorRuntime = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 467 | - var OverloadYield = require_OverloadYield(); | |
| 468 | - var regenerator = require_regenerator$1(); | |
| 469 | - var regeneratorAsync = require_regeneratorAsync(); | |
| 470 | - var regeneratorAsyncGen = require_regeneratorAsyncGen(); | |
| 471 | - var regeneratorAsyncIterator = require_regeneratorAsyncIterator(); | |
| 472 | - var regeneratorKeys = require_regeneratorKeys(); | |
| 473 | - var regeneratorValues = require_regeneratorValues(); | |
| 474 | - function _regeneratorRuntime() { | |
| 475 | - "use strict"; | |
| 476 | - var r = regenerator(); | |
| 477 | - var e = r.m(_regeneratorRuntime); | |
| 478 | - var t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor; | |
| 479 | - function n(r) { | |
| 480 | - var e = "function" == typeof r && r.constructor; | |
| 481 | - return !!e && (e === t || "GeneratorFunction" === (e.displayName || e.name)); | |
| 482 | - } | |
| 483 | - var o = { | |
| 484 | - "throw": 1, | |
| 485 | - "return": 2, | |
| 486 | - "break": 3, | |
| 487 | - "continue": 3 | |
| 488 | - }; | |
| 489 | - function a(r) { | |
| 490 | - var e; | |
| 491 | - var t; | |
| 492 | - return function(n) { | |
| 493 | - e || (e = { | |
| 494 | - stop: function stop() { | |
| 495 | - return t(n.a, 2); | |
| 496 | - }, | |
| 497 | - "catch": function _catch() { | |
| 498 | - return n.v; | |
| 499 | - }, | |
| 500 | - abrupt: function abrupt(r, e) { | |
| 501 | - return t(n.a, o[r], e); | |
| 502 | - }, | |
| 503 | - delegateYield: function delegateYield(r, o, a) { | |
| 504 | - return e.resultName = o, t(n.d, regeneratorValues(r), a); | |
| 505 | - }, | |
| 506 | - finish: function finish(r) { | |
| 507 | - return t(n.f, r); | |
| 508 | - } | |
| 509 | - }, t = function t(r, _t, o) { | |
| 510 | - n.p = e.prev, n.n = e.next; | |
| 511 | - try { | |
| 512 | - return r(_t, o); | |
| 513 | - } finally { | |
| 514 | - e.next = n.n; | |
| 515 | - } | |
| 516 | - }), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n; | |
| 517 | - try { | |
| 518 | - return r.call(this, e); | |
| 519 | - } finally { | |
| 520 | - n.p = e.prev, n.n = e.next; | |
| 521 | - } | |
| 522 | - }; | |
| 523 | - } | |
| 524 | - return (module.exports = _regeneratorRuntime = function _regeneratorRuntime() { | |
| 525 | - return { | |
| 526 | - wrap: function wrap(e, t, n, o) { | |
| 527 | - return r.w(a(e), t, n, o && o.reverse()); | |
| 528 | - }, | |
| 529 | - isGeneratorFunction: n, | |
| 530 | - mark: r.m, | |
| 531 | - awrap: function awrap(r, e) { | |
| 532 | - return new OverloadYield(r, e); | |
| 533 | - }, | |
| 534 | - AsyncIterator: regeneratorAsyncIterator, | |
| 535 | - async: function async(r, e, t, o, u) { | |
| 536 | - return (n(e) ? regeneratorAsyncGen : regeneratorAsync)(a(r), e, t, o, u); | |
| 537 | - }, | |
| 538 | - keys: regeneratorKeys, | |
| 539 | - values: regeneratorValues | |
| 540 | - }; | |
| 541 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); | |
| 542 | - } | |
| 543 | - module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 544 | - })); | |
| 466 | +/***/ }), | |
| 545 | 467 | |
| 546 | -//#endregion | |
| 547 | -//#region node_modules/@babel/runtime/regenerator/index.js | |
| 548 | - var require_regenerator = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 549 | - var runtime = require_regeneratorRuntime()(); | |
| 550 | - module.exports = runtime; | |
| 551 | - try { | |
| 552 | - regeneratorRuntime = runtime; | |
| 553 | - } catch (accidentalStrictMode) { | |
| 554 | - if (typeof globalThis === "object") globalThis.regeneratorRuntime = runtime; | |
| 555 | - else Function("r", "regeneratorRuntime = r")(runtime); | |
| 556 | - } | |
| 557 | - })); | |
| 468 | +/***/ "../modules/kit-elements-defaults/assets/js/editor/component.js": | |
| 469 | +/*!**********************************************************************!*\ | |
| 470 | + !*** ../modules/kit-elements-defaults/assets/js/editor/component.js ***! | |
| 471 | + \**********************************************************************/ | |
| 472 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 558 | 473 | |
| 559 | -//#endregion | |
| 560 | -//#region modules/kit-elements-defaults/assets/js/editor/api.js | |
| 561 | - var import_regenerator = /* @__PURE__ */ __toESM(require_regenerator()); | |
| 562 | - var NAMESPACE = "kit-elements-defaults"; | |
| 563 | - function loadElementsDefaults() { | |
| 564 | - return _loadElementsDefaults.apply(this, arguments); | |
| 565 | - } | |
| 566 | - function _loadElementsDefaults() { | |
| 567 | - _loadElementsDefaults = _asyncToGenerator(/*#__PURE__*/ import_regenerator.default.mark(function _callee() { | |
| 568 | - return import_regenerator.default.wrap(function(_context) { | |
| 569 | - while (1) switch (_context.prev = _context.next) { | |
| 570 | - case 0: | |
| 571 | - $e.data.cache.storage.removeItem(NAMESPACE); | |
| 572 | - return _context.abrupt("return", $e.data.get("".concat(NAMESPACE, "/index"))); | |
| 573 | - case 1: | |
| 574 | - case "end": return _context.stop(); | |
| 575 | - } | |
| 576 | - }, _callee); | |
| 577 | - })); | |
| 578 | - return _loadElementsDefaults.apply(this, arguments); | |
| 579 | - } | |
| 580 | - function getElementDefaults(type) { | |
| 581 | - return ($e.data.cache.storage.getItem(NAMESPACE) || {})[type] || {}; | |
| 582 | - } | |
| 583 | - function updateElementDefaults(_x, _x2) { | |
| 584 | - return _updateElementDefaults.apply(this, arguments); | |
| 585 | - } | |
| 586 | - function _updateElementDefaults() { | |
| 587 | - _updateElementDefaults = _asyncToGenerator(/*#__PURE__*/ import_regenerator.default.mark(function _callee2(type, settings) { | |
| 588 | - return import_regenerator.default.wrap(function(_context2) { | |
| 589 | - while (1) switch (_context2.prev = _context2.next) { | |
| 590 | - case 0: | |
| 591 | - _context2.next = 1; | |
| 592 | - return $e.data.update("".concat(NAMESPACE, "/index"), { settings }, { type }); | |
| 593 | - case 1: | |
| 594 | - _context2.next = 2; | |
| 595 | - return loadElementsDefaults(); | |
| 596 | - case 2: | |
| 597 | - case "end": return _context2.stop(); | |
| 598 | - } | |
| 599 | - }, _callee2); | |
| 600 | - })); | |
| 601 | - return _updateElementDefaults.apply(this, arguments); | |
| 602 | - } | |
| 603 | - function deleteElementDefaults(_x3) { | |
| 604 | - return _deleteElementDefaults.apply(this, arguments); | |
| 605 | - } | |
| 606 | - function _deleteElementDefaults() { | |
| 607 | - _deleteElementDefaults = _asyncToGenerator(/*#__PURE__*/ import_regenerator.default.mark(function _callee3(type) { | |
| 608 | - return import_regenerator.default.wrap(function(_context3) { | |
| 609 | - while (1) switch (_context3.prev = _context3.next) { | |
| 610 | - case 0: | |
| 611 | - _context3.next = 1; | |
| 612 | - return $e.data.delete("".concat(NAMESPACE, "/index"), { type }); | |
| 613 | - case 1: | |
| 614 | - _context3.next = 2; | |
| 615 | - return loadElementsDefaults(); | |
| 616 | - case 2: | |
| 617 | - case "end": return _context3.stop(); | |
| 618 | - } | |
| 619 | - }, _callee3); | |
| 620 | - })); | |
| 621 | - return _deleteElementDefaults.apply(this, arguments); | |
| 622 | - } | |
| 474 | +"use strict"; | |
| 623 | 475 | |
| 624 | -//#endregion | |
| 625 | -//#region modules/kit-elements-defaults/assets/js/editor/utils.js | |
| 626 | - function isPopulatedObject(obj) { | |
| 627 | - return obj && "object" === _typeof(obj) && !Array.isArray(obj) && Object.keys(obj).length > 0; | |
| 628 | - } | |
| 629 | - function extractElementType(model) { | |
| 630 | - model = model.attributes || model; | |
| 631 | - var elementType = model.widgetType || model.elType; | |
| 632 | - if ("section" === elementType && model.isInner) elementType = "inner-section"; | |
| 633 | - return elementType; | |
| 634 | - } | |
| 635 | 476 | |
| 636 | -//#endregion | |
| 637 | -//#region modules/kit-elements-defaults/assets/js/editor/hooks/data/fill-defaults-on-drop.js | |
| 638 | - function ownKeys$1(e, r) { | |
| 639 | - var t = Object.keys(e); | |
| 640 | - if (Object.getOwnPropertySymbols) { | |
| 641 | - var o = Object.getOwnPropertySymbols(e); | |
| 642 | - r && (o = o.filter(function(r) { | |
| 643 | - return Object.getOwnPropertyDescriptor(e, r).enumerable; | |
| 644 | - })), t.push.apply(t, o); | |
| 645 | - } | |
| 646 | - return t; | |
| 647 | - } | |
| 648 | - __name(ownKeys$1, "ownKeys"); | |
| 649 | - function _objectSpread$1(e) { | |
| 650 | - for (var r = 1; r < arguments.length; r++) { | |
| 651 | - var t = null != arguments[r] ? arguments[r] : {}; | |
| 652 | - r % 2 ? ownKeys$1(Object(t), !0).forEach(function(r) { | |
| 653 | - _defineProperty(e, r, t[r]); | |
| 654 | - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function(r) { | |
| 655 | - Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); | |
| 656 | - }); | |
| 657 | - } | |
| 658 | - return e; | |
| 659 | - } | |
| 660 | - __name(_objectSpread$1, "_objectSpread"); | |
| 661 | - function _callSuper$7(t, o, e) { | |
| 662 | - return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$7() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 663 | - } | |
| 664 | - __name(_callSuper$7, "_callSuper"); | |
| 665 | - function _isNativeReflectConstruct$7() { | |
| 666 | - try { | |
| 667 | - var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 668 | - } catch (t) {} | |
| 669 | - return (_isNativeReflectConstruct$7 = function _isNativeReflectConstruct() { | |
| 670 | - return !!t; | |
| 671 | - })(); | |
| 672 | - } | |
| 673 | - __name(_isNativeReflectConstruct$7, "_isNativeReflectConstruct"); | |
| 674 | - var FillDefaultsOnDrop = /*#__PURE__*/ function(_$e$modules$hookData$) { | |
| 675 | - function FillDefaultsOnDrop() { | |
| 676 | - _classCallCheck(this, FillDefaultsOnDrop); | |
| 677 | - return _callSuper$7(this, FillDefaultsOnDrop, arguments); | |
| 678 | - } | |
| 679 | - _inherits(FillDefaultsOnDrop, _$e$modules$hookData$); | |
| 680 | - return _createClass(FillDefaultsOnDrop, [ | |
| 681 | - { | |
| 682 | - key: "getCommand", | |
| 683 | - value: function getCommand() { | |
| 684 | - return "preview/drop"; | |
| 685 | - } | |
| 686 | - }, | |
| 687 | - { | |
| 688 | - key: "getId", | |
| 689 | - value: function getId() { | |
| 690 | - return "fill-defaults-on-drop"; | |
| 691 | - } | |
| 692 | - }, | |
| 693 | - { | |
| 694 | - key: "getConditions", | |
| 695 | - value: function getConditions(args) { | |
| 696 | - var _args$model; | |
| 697 | - var _args$model2; | |
| 698 | - return ((_args$model = args.model) === null || _args$model === void 0 ? void 0 : _args$model.widgetType) || ((_args$model2 = args.model) === null || _args$model2 === void 0 ? void 0 : _args$model2.elType); | |
| 699 | - } | |
| 700 | - }, | |
| 701 | - { | |
| 702 | - key: "apply", | |
| 703 | - value: function apply(args) { | |
| 704 | - var model = args.model; | |
| 705 | - var elementDefaultSettings = getElementDefaults(extractElementType(model)); | |
| 706 | - if (!isPopulatedObject(elementDefaultSettings)) return true; | |
| 707 | - var settings = _objectSpread$1(_objectSpread$1({}, elementDefaultSettings), args.model.settings || {}); | |
| 708 | - ["__dynamic__", "__globals__"].forEach(function(type) { | |
| 709 | - var _args$model$settings; | |
| 710 | - if (!isPopulatedObject(elementDefaultSettings[type])) return; | |
| 711 | - settings[type] = _objectSpread$1(_objectSpread$1({}, elementDefaultSettings[type] || {}), ((_args$model$settings = args.model.settings) === null || _args$model$settings === void 0 ? void 0 : _args$model$settings[type]) || {}); | |
| 712 | - }); | |
| 713 | - args.model = _objectSpread$1(_objectSpread$1({}, args.model), {}, { settings }); | |
| 714 | - return true; | |
| 715 | - } | |
| 716 | - } | |
| 717 | - ]); | |
| 718 | - }($e.modules.hookData.Dependency); | |
| 477 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 478 | +var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"); | |
| 479 | +Object.defineProperty(exports, "__esModule", ({ | |
| 480 | + value: true | |
| 481 | +})); | |
| 482 | +exports["default"] = void 0; | |
| 483 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 484 | +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 485 | +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 486 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 487 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 488 | +var hooks = _interopRequireWildcard(__webpack_require__(/*! ./hooks */ "../modules/kit-elements-defaults/assets/js/editor/hooks/index.js")); | |
| 489 | +var dataCommands = _interopRequireWildcard(__webpack_require__(/*! ./data-commands/ */ "../modules/kit-elements-defaults/assets/js/editor/data-commands/index.js")); | |
| 490 | +var commands = _interopRequireWildcard(__webpack_require__(/*! ./commands/ */ "../modules/kit-elements-defaults/assets/js/editor/commands/index.js")); | |
| 491 | +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } | |
| 492 | +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } | |
| 493 | +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)); } | |
| 494 | +function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 495 | +var Component = exports["default"] = /*#__PURE__*/function (_$e$modules$Component) { | |
| 496 | + function Component() { | |
| 497 | + (0, _classCallCheck2.default)(this, Component); | |
| 498 | + return _callSuper(this, Component, arguments); | |
| 499 | + } | |
| 500 | + (0, _inherits2.default)(Component, _$e$modules$Component); | |
| 501 | + return (0, _createClass2.default)(Component, [{ | |
| 502 | + key: "getNamespace", | |
| 503 | + value: function getNamespace() { | |
| 504 | + return 'kit-elements-defaults'; | |
| 505 | + } | |
| 506 | + }, { | |
| 507 | + key: "defaultHooks", | |
| 508 | + value: function defaultHooks() { | |
| 509 | + return this.importHooks(hooks); | |
| 510 | + } | |
| 511 | + }, { | |
| 512 | + key: "defaultData", | |
| 513 | + value: function defaultData() { | |
| 514 | + return this.importCommands(dataCommands); | |
| 515 | + } | |
| 516 | + }, { | |
| 517 | + key: "defaultCommands", | |
| 518 | + value: function defaultCommands() { | |
| 519 | + return this.importCommands(commands); | |
| 520 | + } | |
| 521 | + }]); | |
| 522 | +}($e.modules.ComponentBase); | |
| 719 | 523 | |
| 720 | -//#endregion | |
| 721 | -//#region modules/kit-elements-defaults/assets/js/editor/hooks/index.js | |
| 722 | - var hooks_exports = /* @__PURE__ */ __exportAll({ FillDefaultsOnDrop: () => FillDefaultsOnDrop }); | |
| 524 | +/***/ }), | |
| 723 | 525 | |
| 724 | -//#endregion | |
| 725 | -//#region modules/kit-elements-defaults/assets/js/editor/data-commands/index.js | |
| 726 | - var data_commands_exports = /* @__PURE__ */ __exportAll({ Index: () => Index }); | |
| 727 | - function _callSuper$6(t, o, e) { | |
| 728 | - return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$6() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 729 | - } | |
| 730 | - __name(_callSuper$6, "_callSuper"); | |
| 731 | - function _isNativeReflectConstruct$6() { | |
| 732 | - try { | |
| 733 | - var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 734 | - } catch (t) {} | |
| 735 | - return (_isNativeReflectConstruct$6 = function _isNativeReflectConstruct() { | |
| 736 | - return !!t; | |
| 737 | - })(); | |
| 738 | - } | |
| 739 | - __name(_isNativeReflectConstruct$6, "_isNativeReflectConstruct"); | |
| 740 | - var Index = /*#__PURE__*/ function(_$e$modules$CommandDa) { | |
| 741 | - function Index() { | |
| 742 | - _classCallCheck(this, Index); | |
| 743 | - return _callSuper$6(this, Index, arguments); | |
| 744 | - } | |
| 745 | - _inherits(Index, _$e$modules$CommandDa); | |
| 746 | - return _createClass(Index, null, [{ | |
| 747 | - key: "getEndpointFormat", | |
| 748 | - value: function getEndpointFormat() { | |
| 749 | - return "kit-elements-defaults/{type}"; | |
| 750 | - } | |
| 751 | - }]); | |
| 752 | - }($e.modules.CommandData); | |
| 526 | +/***/ "../modules/kit-elements-defaults/assets/js/editor/confirm-creation-dialog.js": | |
| 527 | +/*!************************************************************************************!*\ | |
| 528 | + !*** ../modules/kit-elements-defaults/assets/js/editor/confirm-creation-dialog.js ***! | |
| 529 | + \************************************************************************************/ | |
| 530 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 753 | 531 | |
| 754 | -//#endregion | |
| 755 | -//#region modules/kit-elements-defaults/assets/js/editor/confirm-creation-dialog.js | |
| 756 | - var introductionKey = "kit_elements_defaults_create_dialog"; | |
| 757 | - var introductionManager = null; | |
| 758 | - /** | |
| 759 | - * A wrapper around Introduction class that allows to create a dialog only once, | |
| 760 | - * + has specific logic for the "Do not show this message again" checkbox, | |
| 761 | - * + the content for "save as default" feature. | |
| 762 | - * | |
| 763 | - * @param {Object} config | |
| 764 | - * @param {Function} config.onConfirm | |
| 765 | - * @return {{show: (function(): *), doNotShowAgain: (boolean)}} | |
| 766 | - */ | |
| 767 | - function getConfirmCreationDialog(_ref) { | |
| 768 | - var onConfirm = _ref.onConfirm; | |
| 769 | - if (!introductionManager) { | |
| 770 | - var _elementor$config$use; | |
| 771 | - introductionManager = createIntroductionManager(); | |
| 772 | - introductionManager.introductionViewed = !!((_elementor$config$use = elementor.config.user.introduction) !== null && _elementor$config$use !== void 0 && _elementor$config$use["kit_elements_defaults_create_dialog"]); | |
| 773 | - } | |
| 774 | - var dialog = introductionManager.getDialog(); | |
| 775 | - dialog.onConfirm = function() { | |
| 776 | - if (dialog.getElements("checkbox-dont-show-again").prop("checked")) introductionManager.setViewed(); | |
| 777 | - onConfirm(); | |
| 778 | - }; | |
| 779 | - return { | |
| 780 | - doNotShowAgain: !!introductionManager.introductionViewed, | |
| 781 | - show: function show() { | |
| 782 | - return introductionManager.show(); | |
| 783 | - } | |
| 784 | - }; | |
| 785 | - } | |
| 786 | - function createIntroductionManager() { | |
| 787 | - var _introduction$getDial; | |
| 788 | - var _introduction$getDial2; | |
| 789 | - var dialogId = "e-kit-elements-defaults-create-dialog"; | |
| 790 | - var introduction = new elementorModules.editor.utils.Introduction({ | |
| 791 | - introductionKey, | |
| 792 | - dialogType: "confirm", | |
| 793 | - dialogOptions: { | |
| 794 | - id: dialogId, | |
| 795 | - headerMessage: (0, _wordpress_i18n.__)("Sure you want to change default settings?", "elementor"), | |
| 796 | - message: (0, _wordpress_i18n.__)("Your changes will automatically be saved for future uses of this element. %1$sNote:%2$s This includes sensitive information like emails, API keys, etc.", "elementor").replace("%1$s", "<strong>").replace("%2$s", "</strong>"), | |
| 797 | - effects: { | |
| 798 | - show: "fadeIn", | |
| 799 | - hide: "fadeOut" | |
| 800 | - }, | |
| 801 | - hide: { onBackgroundClick: true }, | |
| 802 | - strings: { | |
| 803 | - confirm: (0, _wordpress_i18n.__)("Save", "elementor"), | |
| 804 | - cancel: (0, _wordpress_i18n.__)("Cancel", "elementor") | |
| 805 | - }, | |
| 806 | - onShow: function onShow() { | |
| 807 | - var _this$getElements; | |
| 808 | - (_this$getElements = this.getElements("checkbox-dont-show-again")) === null || _this$getElements === void 0 || _this$getElements.prop("checked", true); | |
| 809 | - } | |
| 810 | - } | |
| 811 | - }); | |
| 812 | - var _createCheckboxAndLab = createCheckboxAndLabel(dialogId); | |
| 813 | - var checkbox = _createCheckboxAndLab.checkbox; | |
| 814 | - var label = _createCheckboxAndLab.label; | |
| 815 | - introduction.getDialog().addElement("checkbox-dont-show-again", checkbox); | |
| 816 | - (_introduction$getDial = introduction.getDialog().getElements("message")) === null || _introduction$getDial === void 0 || (_introduction$getDial2 = _introduction$getDial.append) === null || _introduction$getDial2 === void 0 || _introduction$getDial2.call(_introduction$getDial, label); | |
| 817 | - return introduction; | |
| 818 | - } | |
| 819 | - function createCheckboxAndLabel(dialogId) { | |
| 820 | - var checkboxId = "".concat(dialogId, "-dont-show-again"); | |
| 821 | - var checkbox = document.createElement("input"); | |
| 822 | - checkbox.type = "checkbox"; | |
| 823 | - checkbox.name = checkboxId; | |
| 824 | - checkbox.id = checkboxId; | |
| 825 | - checkbox.checked = true; | |
| 826 | - var label = document.createElement("label"); | |
| 827 | - label.htmlFor = checkboxId; | |
| 828 | - label.textContent = (0, _wordpress_i18n.__)("Do not show this message again", "elementor"); | |
| 829 | - label.prepend(checkbox); | |
| 830 | - return { | |
| 831 | - checkbox, | |
| 832 | - label | |
| 833 | - }; | |
| 834 | - } | |
| 532 | +"use strict"; | |
| 533 | +/* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"]; | |
| 835 | 534 | |
| 836 | -//#endregion | |
| 837 | -//#region modules/kit-elements-defaults/assets/js/editor/commands/confirm-creation.js | |
| 838 | - function _callSuper$5(t, o, e) { | |
| 839 | - return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$5() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 840 | - } | |
| 841 | - __name(_callSuper$5, "_callSuper"); | |
| 842 | - function _isNativeReflectConstruct$5() { | |
| 843 | - try { | |
| 844 | - var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 845 | - } catch (t) {} | |
| 846 | - return (_isNativeReflectConstruct$5 = function _isNativeReflectConstruct() { | |
| 847 | - return !!t; | |
| 848 | - })(); | |
| 849 | - } | |
| 850 | - __name(_isNativeReflectConstruct$5, "_isNativeReflectConstruct"); | |
| 851 | - var ConfirmCreation = /*#__PURE__*/ function(_$e$modules$editor$Co) { | |
| 852 | - function ConfirmCreation() { | |
| 853 | - _classCallCheck(this, ConfirmCreation); | |
| 854 | - return _callSuper$5(this, ConfirmCreation, arguments); | |
| 855 | - } | |
| 856 | - _inherits(ConfirmCreation, _$e$modules$editor$Co); | |
| 857 | - return _createClass(ConfirmCreation, [{ | |
| 858 | - key: "validateArgs", | |
| 859 | - value: function validateArgs() { | |
| 860 | - this.requireContainer(); | |
| 861 | - } | |
| 862 | - }, { | |
| 863 | - key: "apply", | |
| 864 | - value: function() { | |
| 865 | - var _apply = _asyncToGenerator(/*#__PURE__*/ import_regenerator.default.mark(function _callee(_ref) { | |
| 866 | - var container; | |
| 867 | - var confirmCreationDialog; | |
| 868 | - return import_regenerator.default.wrap(function(_context) { | |
| 869 | - while (1) switch (_context.prev = _context.next) { | |
| 870 | - case 0: | |
| 871 | - container = _ref.container; | |
| 872 | - confirmCreationDialog = getConfirmCreationDialog({ onConfirm: function onConfirm() { | |
| 873 | - return $e.run("kit-elements-defaults/create", { container }); | |
| 874 | - } }); | |
| 875 | - if (!confirmCreationDialog.doNotShowAgain) { | |
| 876 | - _context.next = 1; | |
| 877 | - break; | |
| 878 | - } | |
| 879 | - $e.run("kit-elements-defaults/create", { container }); | |
| 880 | - return _context.abrupt("return"); | |
| 881 | - case 1: confirmCreationDialog.show(); | |
| 882 | - case 2: | |
| 883 | - case "end": return _context.stop(); | |
| 884 | - } | |
| 885 | - }, _callee); | |
| 886 | - })); | |
| 887 | - function apply(_x) { | |
| 888 | - return _apply.apply(this, arguments); | |
| 889 | - } | |
| 890 | - return apply; | |
| 891 | - }() | |
| 892 | - }]); | |
| 893 | - }($e.modules.editor.CommandContainerBase); | |
| 894 | 535 | |
| 895 | -//#endregion | |
| 896 | -//#region node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js | |
| 897 | - function _arrayWithHoles(r) { | |
| 898 | - if (Array.isArray(r)) return r; | |
| 899 | - } | |
| 536 | +Object.defineProperty(exports, "__esModule", ({ | |
| 537 | + value: true | |
| 538 | +})); | |
| 539 | +exports.getConfirmCreationDialog = getConfirmCreationDialog; | |
| 540 | +exports.introductionManager = exports.introductionKey = void 0; | |
| 541 | +exports.removeConfirmCreationDialog = removeConfirmCreationDialog; | |
| 542 | +var introductionKey = exports.introductionKey = 'kit_elements_defaults_create_dialog'; | |
| 543 | +var introductionManager = exports.introductionManager = null; | |
| 900 | 544 | |
| 901 | -//#endregion | |
| 902 | -//#region node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js | |
| 903 | - function _iterableToArrayLimit(r, l) { | |
| 904 | - var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; | |
| 905 | - if (null != t) { | |
| 906 | - var e; | |
| 907 | - var n; | |
| 908 | - var i; | |
| 909 | - var u; | |
| 910 | - var a = []; | |
| 911 | - var f = !0; | |
| 912 | - var o = !1; | |
| 913 | - try { | |
| 914 | - if (i = (t = t.call(r)).next, 0 === l) { | |
| 915 | - if (Object(t) !== t) return; | |
| 916 | - f = !1; | |
| 917 | - } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); | |
| 918 | - } catch (r) { | |
| 919 | - o = !0, n = r; | |
| 920 | - } finally { | |
| 921 | - try { | |
| 922 | - if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; | |
| 923 | - } finally { | |
| 924 | - if (o) throw n; | |
| 925 | - } | |
| 926 | - } | |
| 927 | - return a; | |
| 928 | - } | |
| 929 | - } | |
| 545 | +/** | |
| 546 | + * A wrapper around Introduction class that allows to create a dialog only once, | |
| 547 | + * + has specific logic for the "Do not show this message again" checkbox, | |
| 548 | + * + the content for "save as default" feature. | |
| 549 | + * | |
| 550 | + * @param {Object} config | |
| 551 | + * @param {Function} config.onConfirm | |
| 552 | + * @return {{show: (function(): *), doNotShowAgain: (boolean)}} | |
| 553 | + */ | |
| 554 | +function getConfirmCreationDialog(_ref) { | |
| 555 | + var onConfirm = _ref.onConfirm; | |
| 556 | + if (!introductionManager) { | |
| 557 | + var _elementor$config$use; | |
| 558 | + exports.introductionManager = introductionManager = createIntroductionManager(); | |
| 559 | + introductionManager.introductionViewed = !!((_elementor$config$use = elementor.config.user.introduction) !== null && _elementor$config$use !== void 0 && _elementor$config$use[introductionKey]); | |
| 560 | + } | |
| 561 | + var dialog = introductionManager.getDialog(); | |
| 562 | + dialog.onConfirm = function () { | |
| 563 | + // `getElements` return JQuery object. | |
| 564 | + if (dialog.getElements('checkbox-dont-show-again').prop('checked')) { | |
| 565 | + introductionManager.setViewed(); | |
| 566 | + } | |
| 567 | + onConfirm(); | |
| 568 | + }; | |
| 569 | + return { | |
| 570 | + doNotShowAgain: !!introductionManager.introductionViewed, | |
| 571 | + show: function show() { | |
| 572 | + return introductionManager.show(); | |
| 573 | + } | |
| 574 | + }; | |
| 575 | +} | |
| 576 | +function removeConfirmCreationDialog() { | |
| 577 | + exports.introductionManager = introductionManager = null; | |
| 578 | +} | |
| 579 | +function createIntroductionManager() { | |
| 580 | + var _introduction$getDial, _introduction$getDial2; | |
| 581 | + var dialogId = 'e-kit-elements-defaults-create-dialog'; | |
| 582 | + var introduction = new elementorModules.editor.utils.Introduction({ | |
| 583 | + introductionKey: introductionKey, | |
| 584 | + dialogType: 'confirm', | |
| 585 | + dialogOptions: { | |
| 586 | + id: dialogId, | |
| 587 | + headerMessage: __('Sure you want to change default settings?', 'elementor'), | |
| 588 | + // Translators: %1$s: Opening strong tag, %2$s: Closing strong tag. | |
| 589 | + message: __('Your changes will automatically be saved for future uses of this element. %1$sNote:%2$s This includes sensitive information like emails, API keys, etc.', 'elementor').replace('%1$s', '<strong>').replace('%2$s', '</strong>'), | |
| 590 | + effects: { | |
| 591 | + show: 'fadeIn', | |
| 592 | + hide: 'fadeOut' | |
| 593 | + }, | |
| 594 | + hide: { | |
| 595 | + onBackgroundClick: true | |
| 596 | + }, | |
| 597 | + strings: { | |
| 598 | + confirm: __('Save', 'elementor'), | |
| 599 | + cancel: __('Cancel', 'elementor') | |
| 600 | + }, | |
| 601 | + onShow: function onShow() { | |
| 602 | + var _this$getElements; | |
| 603 | + (_this$getElements = this.getElements('checkbox-dont-show-again')) === null || _this$getElements === void 0 || _this$getElements.prop('checked', true); | |
| 604 | + } | |
| 605 | + } | |
| 606 | + }); | |
| 607 | + var _createCheckboxAndLab = createCheckboxAndLabel(dialogId), | |
| 608 | + checkbox = _createCheckboxAndLab.checkbox, | |
| 609 | + label = _createCheckboxAndLab.label; | |
| 610 | + introduction.getDialog().addElement('checkbox-dont-show-again', checkbox); | |
| 611 | + (_introduction$getDial = introduction.getDialog().getElements('message')) === null || _introduction$getDial === void 0 || (_introduction$getDial2 = _introduction$getDial.append) === null || _introduction$getDial2 === void 0 || _introduction$getDial2.call(_introduction$getDial, label); // `getElements` return JQuery object. | |
| 930 | 612 | |
| 931 | -//#endregion | |
| 932 | -//#region node_modules/@babel/runtime/helpers/esm/nonIterableRest.js | |
| 933 | - function _nonIterableRest() { | |
| 934 | - throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | |
| 935 | - } | |
| 613 | + return introduction; | |
| 614 | +} | |
| 615 | +function createCheckboxAndLabel(dialogId) { | |
| 616 | + var checkboxId = "".concat(dialogId, "-dont-show-again"); | |
| 617 | + var checkbox = document.createElement('input'); | |
| 618 | + checkbox.type = 'checkbox'; | |
| 619 | + checkbox.name = checkboxId; | |
| 620 | + checkbox.id = checkboxId; | |
| 621 | + checkbox.checked = true; | |
| 622 | + var label = document.createElement('label'); | |
| 623 | + label.htmlFor = checkboxId; | |
| 624 | + label.textContent = __('Do not show this message again', 'elementor'); | |
| 625 | + label.prepend(checkbox); | |
| 626 | + return { | |
| 627 | + checkbox: checkbox, | |
| 628 | + label: label | |
| 629 | + }; | |
| 630 | +} | |
| 936 | 631 | |
| 937 | -//#endregion | |
| 938 | -//#region node_modules/@babel/runtime/helpers/esm/slicedToArray.js | |
| 939 | - function _slicedToArray(r, e) { | |
| 940 | - return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); | |
| 941 | - } | |
| 632 | +/***/ }), | |
| 942 | 633 | |
| 943 | -//#endregion | |
| 944 | -//#region modules/kit-elements-defaults/assets/js/editor/extract-container-settings.js | |
| 945 | - function ownKeys(e, r) { | |
| 946 | - var t = Object.keys(e); | |
| 947 | - if (Object.getOwnPropertySymbols) { | |
| 948 | - var o = Object.getOwnPropertySymbols(e); | |
| 949 | - r && (o = o.filter(function(r) { | |
| 950 | - return Object.getOwnPropertyDescriptor(e, r).enumerable; | |
| 951 | - })), t.push.apply(t, o); | |
| 952 | - } | |
| 953 | - return t; | |
| 954 | - } | |
| 955 | - function _objectSpread(e) { | |
| 956 | - for (var r = 1; r < arguments.length; r++) { | |
| 957 | - var t = null != arguments[r] ? arguments[r] : {}; | |
| 958 | - r % 2 ? ownKeys(Object(t), !0).forEach(function(r) { | |
| 959 | - _defineProperty(e, r, t[r]); | |
| 960 | - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r) { | |
| 961 | - Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); | |
| 962 | - }); | |
| 963 | - } | |
| 964 | - return e; | |
| 965 | - } | |
| 966 | - var SPECIAL_SETTINGS = ["__dynamic__", "__globals__"]; | |
| 967 | - function extractContainerSettings(container) { | |
| 968 | - var settingsModel = container.settings; | |
| 969 | - var controls = settingsModel.controls; | |
| 970 | - var settings = settingsModel.toJSON({ remove: ["default"] }); | |
| 971 | - var localSettings = extractSettings(settings, controls); | |
| 972 | - return _objectSpread(_objectSpread({}, localSettings), extractSpecialSettings(settings, controls, localSettings)); | |
| 973 | - } | |
| 974 | - function extractSettings(settings, controls) { | |
| 975 | - var existingSettings = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; | |
| 976 | - var entries = Object.entries(settings).filter(function(_ref) { | |
| 977 | - var settingName = _slicedToArray(_ref, 1)[0]; | |
| 978 | - return !!controls[settingName] && !Object.prototype.hasOwnProperty.call(existingSettings, settingName); | |
| 979 | - }); | |
| 980 | - return Object.fromEntries(entries); | |
| 981 | - } | |
| 982 | - function extractSpecialSettings(settings, controls, localSettings) { | |
| 983 | - return SPECIAL_SETTINGS.reduce(function(acc, type) { | |
| 984 | - var specialSettings = extractSettings((settings === null || settings === void 0 ? void 0 : settings[type]) || {}, controls, localSettings); | |
| 985 | - if (!isPopulatedObject(specialSettings)) return acc; | |
| 986 | - return _objectSpread(_objectSpread({}, acc), {}, _defineProperty({}, type, specialSettings)); | |
| 987 | - }, {}); | |
| 988 | - } | |
| 634 | +/***/ "../modules/kit-elements-defaults/assets/js/editor/data-commands/index.js": | |
| 635 | +/*!********************************************************************************!*\ | |
| 636 | + !*** ../modules/kit-elements-defaults/assets/js/editor/data-commands/index.js ***! | |
| 637 | + \********************************************************************************/ | |
| 638 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 989 | 639 | |
| 990 | -//#endregion | |
| 991 | -//#region modules/kit-elements-defaults/assets/js/editor/commands/create.js | |
| 992 | - function _callSuper$4(t, o, e) { | |
| 993 | - return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$4() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 994 | - } | |
| 995 | - __name(_callSuper$4, "_callSuper"); | |
| 996 | - function _isNativeReflectConstruct$4() { | |
| 997 | - try { | |
| 998 | - var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 999 | - } catch (t) {} | |
| 1000 | - return (_isNativeReflectConstruct$4 = function _isNativeReflectConstruct() { | |
| 1001 | - return !!t; | |
| 1002 | - })(); | |
| 1003 | - } | |
| 1004 | - __name(_isNativeReflectConstruct$4, "_isNativeReflectConstruct"); | |
| 1005 | - var Create = /*#__PURE__*/ function(_$e$modules$editor$Co) { | |
| 1006 | - function Create() { | |
| 1007 | - _classCallCheck(this, Create); | |
| 1008 | - return _callSuper$4(this, Create, arguments); | |
| 1009 | - } | |
| 1010 | - _inherits(Create, _$e$modules$editor$Co); | |
| 1011 | - return _createClass(Create, [{ | |
| 1012 | - key: "validateArgs", | |
| 1013 | - value: function validateArgs() { | |
| 1014 | - this.requireContainer(); | |
| 1015 | - } | |
| 1016 | - }, { | |
| 1017 | - key: "apply", | |
| 1018 | - value: function() { | |
| 1019 | - var _apply = _asyncToGenerator(/*#__PURE__*/ import_regenerator.default.mark(function _callee(_ref) { | |
| 1020 | - var container; | |
| 1021 | - var type; | |
| 1022 | - var previousDefaults; | |
| 1023 | - var newDefaults; | |
| 1024 | - var _t; | |
| 1025 | - return import_regenerator.default.wrap(function(_context) { | |
| 1026 | - while (1) switch (_context.prev = _context.next) { | |
| 1027 | - case 0: | |
| 1028 | - container = _ref.container; | |
| 1029 | - $e.internal("panel/state-loading"); | |
| 1030 | - type = extractElementType(container.model), previousDefaults = getElementDefaults(type), newDefaults = extractContainerSettings(container); | |
| 1031 | - _context.prev = 1; | |
| 1032 | - _context.next = 2; | |
| 1033 | - return updateElementDefaults(type, newDefaults); | |
| 1034 | - case 2: | |
| 1035 | - elementor.notifications.showToast({ | |
| 1036 | - message: (0, _wordpress_i18n.__)("Default settings changed.", "elementor"), | |
| 1037 | - buttons: [{ | |
| 1038 | - name: "undo", | |
| 1039 | - text: (0, _wordpress_i18n.__)("Undo", "elementor"), | |
| 1040 | - callback: function callback() { | |
| 1041 | - $e.run("kit-elements-defaults/restore", { | |
| 1042 | - type, | |
| 1043 | - settings: previousDefaults | |
| 1044 | - }); | |
| 1045 | - } | |
| 1046 | - }] | |
| 1047 | - }); | |
| 1048 | - _context.next = 4; | |
| 1049 | - break; | |
| 1050 | - case 3: | |
| 1051 | - _context.prev = 3; | |
| 1052 | - _t = _context["catch"](1); | |
| 1053 | - elementor.notifications.showToast({ message: (0, _wordpress_i18n.__)("An error occurred.", "elementor") }); | |
| 1054 | - throw _t; | |
| 1055 | - case 4: | |
| 1056 | - _context.prev = 4; | |
| 1057 | - $e.internal("panel/state-ready"); | |
| 1058 | - return _context.finish(4); | |
| 1059 | - case 5: | |
| 1060 | - case "end": return _context.stop(); | |
| 1061 | - } | |
| 1062 | - }, _callee, null, [[ | |
| 1063 | - 1, | |
| 1064 | - 3, | |
| 1065 | - 4, | |
| 1066 | - 5 | |
| 1067 | - ]]); | |
| 1068 | - })); | |
| 1069 | - function apply(_x) { | |
| 1070 | - return _apply.apply(this, arguments); | |
| 1071 | - } | |
| 1072 | - return apply; | |
| 1073 | - }() | |
| 1074 | - }]); | |
| 1075 | - }($e.modules.editor.CommandContainerBase); | |
| 640 | +"use strict"; | |
| 1076 | 641 | |
| 1077 | -//#endregion | |
| 1078 | -//#region modules/kit-elements-defaults/assets/js/editor/commands/delete.js | |
| 1079 | - function _callSuper$3(t, o, e) { | |
| 1080 | - return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$3() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 1081 | - } | |
| 1082 | - __name(_callSuper$3, "_callSuper"); | |
| 1083 | - function _isNativeReflectConstruct$3() { | |
| 1084 | - try { | |
| 1085 | - var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 1086 | - } catch (t) {} | |
| 1087 | - return (_isNativeReflectConstruct$3 = function _isNativeReflectConstruct() { | |
| 1088 | - return !!t; | |
| 1089 | - })(); | |
| 1090 | - } | |
| 1091 | - __name(_isNativeReflectConstruct$3, "_isNativeReflectConstruct"); | |
| 1092 | - var Delete = /*#__PURE__*/ function(_$e$modules$CommandBa) { | |
| 1093 | - function Delete() { | |
| 1094 | - _classCallCheck(this, Delete); | |
| 1095 | - return _callSuper$3(this, Delete, arguments); | |
| 1096 | - } | |
| 1097 | - _inherits(Delete, _$e$modules$CommandBa); | |
| 1098 | - return _createClass(Delete, [{ | |
| 1099 | - key: "apply", | |
| 1100 | - value: function() { | |
| 1101 | - var _apply = _asyncToGenerator(/*#__PURE__*/ import_regenerator.default.mark(function _callee(_ref) { | |
| 1102 | - var type; | |
| 1103 | - var _t; | |
| 1104 | - return import_regenerator.default.wrap(function(_context) { | |
| 1105 | - while (1) switch (_context.prev = _context.next) { | |
| 1106 | - case 0: | |
| 1107 | - type = _ref.type; | |
| 1108 | - $e.internal("panel/state-loading"); | |
| 1109 | - _context.prev = 1; | |
| 1110 | - _context.next = 2; | |
| 1111 | - return deleteElementDefaults(type); | |
| 1112 | - case 2: | |
| 1113 | - elementor.notifications.showToast({ message: (0, _wordpress_i18n.__)("Default settings has been reset.", "elementor") }); | |
| 1114 | - _context.next = 4; | |
| 1115 | - break; | |
| 1116 | - case 3: | |
| 1117 | - _context.prev = 3; | |
| 1118 | - _t = _context["catch"](1); | |
| 1119 | - elementor.notifications.showToast({ message: (0, _wordpress_i18n.__)("An error occurred.", "elementor") }); | |
| 1120 | - throw _t; | |
| 1121 | - case 4: | |
| 1122 | - _context.prev = 4; | |
| 1123 | - $e.internal("panel/state-ready"); | |
| 1124 | - return _context.finish(4); | |
| 1125 | - case 5: | |
| 1126 | - case "end": return _context.stop(); | |
| 1127 | - } | |
| 1128 | - }, _callee, null, [[ | |
| 1129 | - 1, | |
| 1130 | - 3, | |
| 1131 | - 4, | |
| 1132 | - 5 | |
| 1133 | - ]]); | |
| 1134 | - })); | |
| 1135 | - function apply(_x) { | |
| 1136 | - return _apply.apply(this, arguments); | |
| 1137 | - } | |
| 1138 | - return apply; | |
| 1139 | - }() | |
| 1140 | - }]); | |
| 1141 | - }($e.modules.CommandBase); | |
| 1142 | 642 | |
| 1143 | -//#endregion | |
| 1144 | -//#region modules/kit-elements-defaults/assets/js/editor/commands/restore.js | |
| 1145 | - function _callSuper$2(t, o, e) { | |
| 1146 | - return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$2() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 1147 | - } | |
| 1148 | - __name(_callSuper$2, "_callSuper"); | |
| 1149 | - function _isNativeReflectConstruct$2() { | |
| 1150 | - try { | |
| 1151 | - var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 1152 | - } catch (t) {} | |
| 1153 | - return (_isNativeReflectConstruct$2 = function _isNativeReflectConstruct() { | |
| 1154 | - return !!t; | |
| 1155 | - })(); | |
| 1156 | - } | |
| 1157 | - __name(_isNativeReflectConstruct$2, "_isNativeReflectConstruct"); | |
| 1158 | - var Restore = /*#__PURE__*/ function(_$e$modules$CommandBa) { | |
| 1159 | - function Restore() { | |
| 1160 | - _classCallCheck(this, Restore); | |
| 1161 | - return _callSuper$2(this, Restore, arguments); | |
| 1162 | - } | |
| 1163 | - _inherits(Restore, _$e$modules$CommandBa); | |
| 1164 | - return _createClass(Restore, [{ | |
| 1165 | - key: "apply", | |
| 1166 | - value: function() { | |
| 1167 | - var _apply = _asyncToGenerator(/*#__PURE__*/ import_regenerator.default.mark(function _callee(_ref) { | |
| 1168 | - var type; | |
| 1169 | - var settings; | |
| 1170 | - var _t; | |
| 1171 | - return import_regenerator.default.wrap(function(_context) { | |
| 1172 | - while (1) switch (_context.prev = _context.next) { | |
| 1173 | - case 0: | |
| 1174 | - type = _ref.type, settings = _ref.settings; | |
| 1175 | - $e.internal("panel/state-loading"); | |
| 1176 | - _context.prev = 1; | |
| 1177 | - _context.next = 2; | |
| 1178 | - return updateElementDefaults(type, settings); | |
| 1179 | - case 2: | |
| 1180 | - elementor.notifications.showToast({ message: (0, _wordpress_i18n.__)("Previous settings restored.", "elementor") }); | |
| 1181 | - _context.next = 4; | |
| 1182 | - break; | |
| 1183 | - case 3: | |
| 1184 | - _context.prev = 3; | |
| 1185 | - _t = _context["catch"](1); | |
| 1186 | - elementor.notifications.showToast({ message: (0, _wordpress_i18n.__)("An error occurred.", "elementor") }); | |
| 1187 | - throw _t; | |
| 1188 | - case 4: | |
| 1189 | - _context.prev = 4; | |
| 1190 | - $e.internal("panel/state-ready"); | |
| 1191 | - return _context.finish(4); | |
| 1192 | - case 5: | |
| 1193 | - case "end": return _context.stop(); | |
| 1194 | - } | |
| 1195 | - }, _callee, null, [[ | |
| 1196 | - 1, | |
| 1197 | - 3, | |
| 1198 | - 4, | |
| 1199 | - 5 | |
| 1200 | - ]]); | |
| 1201 | - })); | |
| 1202 | - function apply(_x) { | |
| 1203 | - return _apply.apply(this, arguments); | |
| 1204 | - } | |
| 1205 | - return apply; | |
| 1206 | - }() | |
| 1207 | - }]); | |
| 1208 | - }($e.modules.CommandBase); | |
| 643 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 644 | +Object.defineProperty(exports, "__esModule", ({ | |
| 645 | + value: true | |
| 646 | +})); | |
| 647 | +exports.Index = void 0; | |
| 648 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 649 | +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 650 | +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 651 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 652 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 653 | +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)); } | |
| 654 | +function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 655 | +var Index = exports.Index = /*#__PURE__*/function (_$e$modules$CommandDa) { | |
| 656 | + function Index() { | |
| 657 | + (0, _classCallCheck2.default)(this, Index); | |
| 658 | + return _callSuper(this, Index, arguments); | |
| 659 | + } | |
| 660 | + (0, _inherits2.default)(Index, _$e$modules$CommandDa); | |
| 661 | + return (0, _createClass2.default)(Index, null, [{ | |
| 662 | + key: "getEndpointFormat", | |
| 663 | + value: function getEndpointFormat() { | |
| 664 | + return 'kit-elements-defaults/{type}'; | |
| 665 | + } | |
| 666 | + }]); | |
| 667 | +}($e.modules.CommandData); | |
| 1209 | 668 | |
| 1210 | -//#endregion | |
| 1211 | -//#region modules/kit-elements-defaults/assets/js/editor/commands/index.js | |
| 1212 | - var commands_exports = /* @__PURE__ */ __exportAll({ | |
| 1213 | - ConfirmCreation: () => ConfirmCreation, | |
| 1214 | - Create: () => Create, | |
| 1215 | - Delete: () => Delete, | |
| 1216 | - Restore: () => Restore | |
| 1217 | - }); | |
| 669 | +/***/ }), | |
| 1218 | 670 | |
| 1219 | -//#endregion | |
| 1220 | -//#region modules/kit-elements-defaults/assets/js/editor/component.js | |
| 1221 | - function _callSuper$1(t, o, e) { | |
| 1222 | - return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$1() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 1223 | - } | |
| 1224 | - __name(_callSuper$1, "_callSuper"); | |
| 1225 | - function _isNativeReflectConstruct$1() { | |
| 1226 | - try { | |
| 1227 | - var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 1228 | - } catch (t) {} | |
| 1229 | - return (_isNativeReflectConstruct$1 = function _isNativeReflectConstruct() { | |
| 1230 | - return !!t; | |
| 1231 | - })(); | |
| 1232 | - } | |
| 1233 | - __name(_isNativeReflectConstruct$1, "_isNativeReflectConstruct"); | |
| 1234 | - var Component = /*#__PURE__*/ function(_$e$modules$Component) { | |
| 1235 | - function Component() { | |
| 1236 | - _classCallCheck(this, Component); | |
| 1237 | - return _callSuper$1(this, Component, arguments); | |
| 1238 | - } | |
| 1239 | - _inherits(Component, _$e$modules$Component); | |
| 1240 | - return _createClass(Component, [ | |
| 1241 | - { | |
| 1242 | - key: "getNamespace", | |
| 1243 | - value: function getNamespace() { | |
| 1244 | - return "kit-elements-defaults"; | |
| 1245 | - } | |
| 1246 | - }, | |
| 1247 | - { | |
| 1248 | - key: "defaultHooks", | |
| 1249 | - value: function defaultHooks() { | |
| 1250 | - return this.importHooks(hooks_exports); | |
| 1251 | - } | |
| 1252 | - }, | |
| 1253 | - { | |
| 1254 | - key: "defaultData", | |
| 1255 | - value: function defaultData() { | |
| 1256 | - return this.importCommands(data_commands_exports); | |
| 1257 | - } | |
| 1258 | - }, | |
| 1259 | - { | |
| 1260 | - key: "defaultCommands", | |
| 1261 | - value: function defaultCommands() { | |
| 1262 | - return this.importCommands(commands_exports); | |
| 1263 | - } | |
| 1264 | - } | |
| 1265 | - ]); | |
| 1266 | - }($e.modules.ComponentBase); | |
| 671 | +/***/ "../modules/kit-elements-defaults/assets/js/editor/extract-container-settings.js": | |
| 672 | +/*!***************************************************************************************!*\ | |
| 673 | + !*** ../modules/kit-elements-defaults/assets/js/editor/extract-container-settings.js ***! | |
| 674 | + \***************************************************************************************/ | |
| 675 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1267 | 676 | |
| 1268 | -//#endregion | |
| 1269 | -//#region modules/kit-elements-defaults/assets/js/editor/module.js | |
| 1270 | - function _callSuper(t, o, e) { | |
| 1271 | - return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 1272 | - } | |
| 1273 | - function _isNativeReflectConstruct() { | |
| 1274 | - try { | |
| 1275 | - var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 1276 | - } catch (t) {} | |
| 1277 | - return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { | |
| 1278 | - return !!t; | |
| 1279 | - })(); | |
| 1280 | - } | |
| 1281 | - function _classPrivateMethodInitSpec(e, a) { | |
| 1282 | - _checkPrivateRedeclaration(e, a), a.add(e); | |
| 1283 | - } | |
| 1284 | - function _checkPrivateRedeclaration(e, t) { | |
| 1285 | - if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); | |
| 1286 | - } | |
| 1287 | - function _assertClassBrand(e, t, n) { | |
| 1288 | - if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; | |
| 1289 | - throw new TypeError("Private element is not present on this object"); | |
| 1290 | - } | |
| 1291 | - var _Module_brand = /*#__PURE__*/ new WeakSet(); | |
| 1292 | - var Module = /*#__PURE__*/ function(_elementorModules$edi) { | |
| 1293 | - function Module() { | |
| 1294 | - var _this; | |
| 1295 | - _classCallCheck(this, Module); | |
| 1296 | - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key]; | |
| 1297 | - _this = _callSuper(this, Module, [].concat(args)); | |
| 1298 | - _classPrivateMethodInitSpec(_this, _Module_brand); | |
| 1299 | - return _this; | |
| 1300 | - } | |
| 1301 | - _inherits(Module, _elementorModules$edi); | |
| 1302 | - return _createClass(Module, [{ | |
| 1303 | - key: "onElementorInit", | |
| 1304 | - value: function onElementorInit() { | |
| 1305 | - loadElementsDefaults(); | |
| 1306 | - _assertClassBrand(_Module_brand, this, _addContextMenuItem).call(this); | |
| 1307 | - } | |
| 1308 | - }, { | |
| 1309 | - key: "onElementorInitComponents", | |
| 1310 | - value: function onElementorInitComponents() { | |
| 1311 | - window.$e.components.register(new Component()); | |
| 1312 | - } | |
| 1313 | - }]); | |
| 1314 | - }(elementorModules.editor.utils.Module); | |
| 1315 | - function _addContextMenuItem() { | |
| 1316 | - var _elementor$config; | |
| 1317 | - if (!((_elementor$config = elementor.config) !== null && _elementor$config !== void 0 && (_elementor$config = _elementor$config.user) !== null && _elementor$config !== void 0 && _elementor$config.is_administrator)) return; | |
| 1318 | - [ | |
| 1319 | - "widget", | |
| 1320 | - "container", | |
| 1321 | - "section" | |
| 1322 | - ].forEach(function(elType) { | |
| 1323 | - elementor.hooks.addFilter("elements/".concat(elType, "/contextMenuGroups"), function(groups, view) { | |
| 1324 | - var _view$options; | |
| 1325 | - if ("section" === extractElementType(((_view$options = view.options) === null || _view$options === void 0 ? void 0 : _view$options.model) || {})) return groups; | |
| 1326 | - return groups.map(function(group) { | |
| 1327 | - if (group.name !== "save") return group; | |
| 1328 | - group.actions = [].concat(_toConsumableArray(group.actions), [{ | |
| 1329 | - name: "save-as-default", | |
| 1330 | - title: (0, _wordpress_i18n.__)("Save as default", "elementor"), | |
| 1331 | - isEnabled: function isEnabled() { | |
| 1332 | - return !view.getContainer().isLocked(); | |
| 1333 | - }, | |
| 1334 | - callback: function callback() { | |
| 1335 | - $e.run("kit-elements-defaults/confirm-creation", { container: view.getContainer() }); | |
| 1336 | - } | |
| 1337 | - }]); | |
| 1338 | - return group; | |
| 1339 | - }); | |
| 1340 | - }); | |
| 1341 | - }); | |
| 1342 | - } | |
| 677 | +"use strict"; | |
| 1343 | 678 | |
| 1344 | -//#endregion | |
| 1345 | -//#region modules/kit-elements-defaults/assets/js/editor/index.js | |
| 1346 | - new Module(); | |
| 1347 | 679 | |
| 1348 | -//#endregion | |
| 1349 | -})(wp.i18n); | |
| 680 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 681 | +Object.defineProperty(exports, "__esModule", ({ | |
| 682 | + value: true | |
| 683 | +})); | |
| 684 | +exports["default"] = extractContainerSettings; | |
| 685 | +var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); | |
| 686 | +var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); | |
| 687 | +var _utils = __webpack_require__(/*! ./utils */ "../modules/kit-elements-defaults/assets/js/editor/utils.js"); | |
| 688 | +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } | |
| 689 | +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } | |
| 690 | +var SPECIAL_SETTINGS = ['__dynamic__', '__globals__']; | |
| 691 | +function extractContainerSettings(container) { | |
| 692 | + var settingsModel = container.settings, | |
| 693 | + controls = settingsModel.controls, | |
| 694 | + settings = settingsModel.toJSON({ | |
| 695 | + remove: ['default'] | |
| 696 | + }); | |
| 697 | + var localSettings = extractSettings(settings, controls); | |
| 698 | + return _objectSpread(_objectSpread({}, localSettings), extractSpecialSettings(settings, controls, localSettings)); | |
| 699 | +} | |
| 700 | +function extractSettings(settings, controls) { | |
| 701 | + var existingSettings = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; | |
| 702 | + var entries = Object.entries(settings).filter(function (_ref) { | |
| 703 | + var _ref2 = (0, _slicedToArray2.default)(_ref, 1), | |
| 704 | + settingName = _ref2[0]; | |
| 705 | + return !!controls[settingName] && !Object.prototype.hasOwnProperty.call(existingSettings, settingName); | |
| 706 | + }); | |
| 707 | + return Object.fromEntries(entries); | |
| 708 | +} | |
| 709 | +function extractSpecialSettings(settings, controls, localSettings) { | |
| 710 | + return SPECIAL_SETTINGS.reduce(function (acc, type) { | |
| 711 | + var specialSettings = extractSettings((settings === null || settings === void 0 ? void 0 : settings[type]) || {}, controls, localSettings); | |
| 712 | + if (!(0, _utils.isPopulatedObject)(specialSettings)) { | |
| 713 | + return acc; | |
| 714 | + } | |
| 715 | + return _objectSpread(_objectSpread({}, acc), {}, (0, _defineProperty2.default)({}, type, specialSettings)); | |
| 716 | + }, {}); | |
| 717 | +} | |
| 718 | + | |
| 719 | +/***/ }), | |
| 720 | + | |
| 721 | +/***/ "../modules/kit-elements-defaults/assets/js/editor/hooks/data/fill-defaults-on-drop.js": | |
| 722 | +/*!*********************************************************************************************!*\ | |
| 723 | + !*** ../modules/kit-elements-defaults/assets/js/editor/hooks/data/fill-defaults-on-drop.js ***! | |
| 724 | + \*********************************************************************************************/ | |
| 725 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 726 | + | |
| 727 | +"use strict"; | |
| 728 | + | |
| 729 | + | |
| 730 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 731 | +Object.defineProperty(exports, "__esModule", ({ | |
| 732 | + value: true | |
| 733 | +})); | |
| 734 | +exports["default"] = void 0; | |
| 735 | +var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); | |
| 736 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 737 | +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 738 | +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 739 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 740 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 741 | +var _api = __webpack_require__(/*! ../../api */ "../modules/kit-elements-defaults/assets/js/editor/api.js"); | |
| 742 | +var _utils = __webpack_require__(/*! ../../utils */ "../modules/kit-elements-defaults/assets/js/editor/utils.js"); | |
| 743 | +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } | |
| 744 | +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } | |
| 745 | +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)); } | |
| 746 | +function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 747 | +var FillDefaultsOnDrop = exports["default"] = /*#__PURE__*/function (_$e$modules$hookData$) { | |
| 748 | + function FillDefaultsOnDrop() { | |
| 749 | + (0, _classCallCheck2.default)(this, FillDefaultsOnDrop); | |
| 750 | + return _callSuper(this, FillDefaultsOnDrop, arguments); | |
| 751 | + } | |
| 752 | + (0, _inherits2.default)(FillDefaultsOnDrop, _$e$modules$hookData$); | |
| 753 | + return (0, _createClass2.default)(FillDefaultsOnDrop, [{ | |
| 754 | + key: "getCommand", | |
| 755 | + value: function getCommand() { | |
| 756 | + return 'preview/drop'; | |
| 757 | + } | |
| 758 | + }, { | |
| 759 | + key: "getId", | |
| 760 | + value: function getId() { | |
| 761 | + return 'fill-defaults-on-drop'; | |
| 762 | + } | |
| 763 | + }, { | |
| 764 | + key: "getConditions", | |
| 765 | + value: function getConditions(args) { | |
| 766 | + var _args$model, _args$model2; | |
| 767 | + return ((_args$model = args.model) === null || _args$model === void 0 ? void 0 : _args$model.widgetType) || ((_args$model2 = args.model) === null || _args$model2 === void 0 ? void 0 : _args$model2.elType); | |
| 768 | + } | |
| 769 | + }, { | |
| 770 | + key: "apply", | |
| 771 | + value: function apply(args) { | |
| 772 | + var model = args.model; | |
| 773 | + var elementDefaultSettings = (0, _api.getElementDefaults)((0, _utils.extractElementType)(model)); | |
| 774 | + if (!(0, _utils.isPopulatedObject)(elementDefaultSettings)) { | |
| 775 | + return true; | |
| 776 | + } | |
| 777 | + var settings = _objectSpread(_objectSpread({}, elementDefaultSettings), args.model.settings || {}); | |
| 778 | + ['__dynamic__', '__globals__'].forEach(function (type) { | |
| 779 | + var _args$model$settings; | |
| 780 | + if (!(0, _utils.isPopulatedObject)(elementDefaultSettings[type])) { | |
| 781 | + return; | |
| 782 | + } | |
| 783 | + settings[type] = _objectSpread(_objectSpread({}, elementDefaultSettings[type] || {}), ((_args$model$settings = args.model.settings) === null || _args$model$settings === void 0 ? void 0 : _args$model$settings[type]) || {}); | |
| 784 | + }); | |
| 785 | + args.model = _objectSpread(_objectSpread({}, args.model), {}, { | |
| 786 | + settings: settings | |
| 787 | + }); | |
| 788 | + return true; | |
| 789 | + } | |
| 790 | + }]); | |
| 791 | +}($e.modules.hookData.Dependency); | |
| 792 | + | |
| 793 | +/***/ }), | |
| 794 | + | |
| 795 | +/***/ "../modules/kit-elements-defaults/assets/js/editor/hooks/index.js": | |
| 796 | +/*!************************************************************************!*\ | |
| 797 | + !*** ../modules/kit-elements-defaults/assets/js/editor/hooks/index.js ***! | |
| 798 | + \************************************************************************/ | |
| 799 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 800 | + | |
| 801 | +"use strict"; | |
| 802 | + | |
| 803 | + | |
| 804 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 805 | +Object.defineProperty(exports, "__esModule", ({ | |
| 806 | + value: true | |
| 807 | +})); | |
| 808 | +Object.defineProperty(exports, "FillDefaultsOnDrop", ({ | |
| 809 | + enumerable: true, | |
| 810 | + get: function get() { | |
| 811 | + return _fillDefaultsOnDrop.default; | |
| 812 | + } | |
| 813 | +})); | |
| 814 | +var _fillDefaultsOnDrop = _interopRequireDefault(__webpack_require__(/*! ./data/fill-defaults-on-drop */ "../modules/kit-elements-defaults/assets/js/editor/hooks/data/fill-defaults-on-drop.js")); | |
| 815 | + | |
| 816 | +/***/ }), | |
| 817 | + | |
| 818 | +/***/ "../modules/kit-elements-defaults/assets/js/editor/module.js": | |
| 819 | +/*!*******************************************************************!*\ | |
| 820 | + !*** ../modules/kit-elements-defaults/assets/js/editor/module.js ***! | |
| 821 | + \*******************************************************************/ | |
| 822 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 823 | + | |
| 824 | +"use strict"; | |
| 825 | +/* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"]; | |
| 826 | + | |
| 827 | + | |
| 828 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 829 | +Object.defineProperty(exports, "__esModule", ({ | |
| 830 | + value: true | |
| 831 | +})); | |
| 832 | +exports["default"] = void 0; | |
| 833 | +var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "../node_modules/@babel/runtime/helpers/toConsumableArray.js")); | |
| 834 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 835 | +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 836 | +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 837 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 838 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 839 | +var _component = _interopRequireDefault(__webpack_require__(/*! ./component */ "../modules/kit-elements-defaults/assets/js/editor/component.js")); | |
| 840 | +var _api = __webpack_require__(/*! ./api */ "../modules/kit-elements-defaults/assets/js/editor/api.js"); | |
| 841 | +var _utils = __webpack_require__(/*! ./utils */ "../modules/kit-elements-defaults/assets/js/editor/utils.js"); | |
| 842 | +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)); } | |
| 843 | +function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 844 | +function _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); } | |
| 845 | +function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); } | |
| 846 | +function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } | |
| 847 | +var _Module_brand = /*#__PURE__*/new WeakSet(); | |
| 848 | +var Module = exports["default"] = /*#__PURE__*/function (_elementorModules$edi) { | |
| 849 | + function Module() { | |
| 850 | + var _this; | |
| 851 | + (0, _classCallCheck2.default)(this, Module); | |
| 852 | + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { | |
| 853 | + args[_key] = arguments[_key]; | |
| 854 | + } | |
| 855 | + _this = _callSuper(this, Module, [].concat(args)); | |
| 856 | + _classPrivateMethodInitSpec(_this, _Module_brand); | |
| 857 | + return _this; | |
| 858 | + } | |
| 859 | + (0, _inherits2.default)(Module, _elementorModules$edi); | |
| 860 | + return (0, _createClass2.default)(Module, [{ | |
| 861 | + key: "onElementorInit", | |
| 862 | + value: function onElementorInit() { | |
| 863 | + (0, _api.loadElementsDefaults)(); | |
| 864 | + _assertClassBrand(_Module_brand, this, _addContextMenuItem).call(this); | |
| 865 | + } | |
| 866 | + }, { | |
| 867 | + key: "onElementorInitComponents", | |
| 868 | + value: function onElementorInitComponents() { | |
| 869 | + window.$e.components.register(new _component.default()); | |
| 870 | + } | |
| 871 | + }]); | |
| 872 | +}(elementorModules.editor.utils.Module); | |
| 873 | +function _addContextMenuItem() { | |
| 874 | + var _elementor$config; | |
| 875 | + if (!((_elementor$config = elementor.config) !== null && _elementor$config !== void 0 && (_elementor$config = _elementor$config.user) !== null && _elementor$config !== void 0 && _elementor$config.is_administrator)) { | |
| 876 | + return; | |
| 877 | + } | |
| 878 | + ['widget', 'container', 'section'].forEach(function (elType) { | |
| 879 | + elementor.hooks.addFilter("elements/".concat(elType, "/contextMenuGroups"), function (groups, view) { | |
| 880 | + var _view$options; | |
| 881 | + // Supporting only inner section and not sections, | |
| 882 | + // extractElementType() will return 'inner-section' for inner sections instead of 'section'. | |
| 883 | + if ('section' === (0, _utils.extractElementType)(((_view$options = view.options) === null || _view$options === void 0 ? void 0 : _view$options.model) || {})) { | |
| 884 | + return groups; | |
| 885 | + } | |
| 886 | + return groups.map(function (group) { | |
| 887 | + if (group.name !== 'save') { | |
| 888 | + return group; | |
| 889 | + } | |
| 890 | + group.actions = [].concat((0, _toConsumableArray2.default)(group.actions), [{ | |
| 891 | + name: 'save-as-default', | |
| 892 | + title: __('Save as default', 'elementor'), | |
| 893 | + isEnabled: function isEnabled() { | |
| 894 | + return !view.getContainer().isLocked(); | |
| 895 | + }, | |
| 896 | + callback: function callback() { | |
| 897 | + $e.run('kit-elements-defaults/confirm-creation', { | |
| 898 | + container: view.getContainer() | |
| 899 | + }); | |
| 900 | + } | |
| 901 | + }]); | |
| 902 | + return group; | |
| 903 | + }); | |
| 904 | + }); | |
| 905 | + }); | |
| 906 | +} | |
| 907 | + | |
| 908 | +/***/ }), | |
| 909 | + | |
| 910 | +/***/ "../modules/kit-elements-defaults/assets/js/editor/utils.js": | |
| 911 | +/*!******************************************************************!*\ | |
| 912 | + !*** ../modules/kit-elements-defaults/assets/js/editor/utils.js ***! | |
| 913 | + \******************************************************************/ | |
| 914 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 915 | + | |
| 916 | +"use strict"; | |
| 917 | + | |
| 918 | + | |
| 919 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 920 | +Object.defineProperty(exports, "__esModule", ({ | |
| 921 | + value: true | |
| 922 | +})); | |
| 923 | +exports.extractElementType = extractElementType; | |
| 924 | +exports.isPopulatedObject = isPopulatedObject; | |
| 925 | +var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js")); | |
| 926 | +function isPopulatedObject(obj) { | |
| 927 | + return obj && 'object' === (0, _typeof2.default)(obj) && !Array.isArray(obj) && Object.keys(obj).length > 0; | |
| 928 | +} | |
| 929 | +function extractElementType(model) { | |
| 930 | + model = model.attributes || model; | |
| 931 | + var elementType = model.widgetType || model.elType; | |
| 932 | + if ('section' === elementType && model.isInner) { | |
| 933 | + elementType = 'inner-section'; | |
| 934 | + } | |
| 935 | + return elementType; | |
| 936 | +} | |
| 937 | + | |
| 938 | +/***/ }), | |
| 939 | + | |
| 940 | +/***/ "@wordpress/i18n": | |
| 941 | +/*!**************************!*\ | |
| 942 | + !*** external "wp.i18n" ***! | |
| 943 | + \**************************/ | |
| 944 | +/***/ ((module) => { | |
| 945 | + | |
| 946 | +"use strict"; | |
| 947 | +module.exports = wp.i18n; | |
| 948 | + | |
| 949 | +/***/ }), | |
| 950 | + | |
| 951 | +/***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js": | |
| 952 | +/*!******************************************************************!*\ | |
| 953 | + !*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***! | |
| 954 | + \******************************************************************/ | |
| 955 | +/***/ ((module) => { | |
| 956 | + | |
| 957 | +function _arrayLikeToArray(r, a) { | |
| 958 | + (null == a || a > r.length) && (a = r.length); | |
| 959 | + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; | |
| 960 | + return n; | |
| 961 | +} | |
| 962 | +module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 963 | + | |
| 964 | +/***/ }), | |
| 965 | + | |
| 966 | +/***/ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js": | |
| 967 | +/*!****************************************************************!*\ | |
| 968 | + !*** ../node_modules/@babel/runtime/helpers/arrayWithHoles.js ***! | |
| 969 | + \****************************************************************/ | |
| 970 | +/***/ ((module) => { | |
| 971 | + | |
| 972 | +function _arrayWithHoles(r) { | |
| 973 | + if (Array.isArray(r)) return r; | |
| 974 | +} | |
| 975 | +module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 976 | + | |
| 977 | +/***/ }), | |
| 978 | + | |
| 979 | +/***/ "../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js": | |
| 980 | +/*!*******************************************************************!*\ | |
| 981 | + !*** ../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***! | |
| 982 | + \*******************************************************************/ | |
| 983 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 984 | + | |
| 985 | +var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js"); | |
| 986 | +function _arrayWithoutHoles(r) { | |
| 987 | + if (Array.isArray(r)) return arrayLikeToArray(r); | |
| 988 | +} | |
| 989 | +module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 990 | + | |
| 991 | +/***/ }), | |
| 992 | + | |
| 993 | +/***/ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js": | |
| 994 | +/*!***********************************************************************!*\ | |
| 995 | + !*** ../node_modules/@babel/runtime/helpers/assertThisInitialized.js ***! | |
| 996 | + \***********************************************************************/ | |
| 997 | +/***/ ((module) => { | |
| 998 | + | |
| 999 | +function _assertThisInitialized(e) { | |
| 1000 | + if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
| 1001 | + return e; | |
| 1002 | +} | |
| 1003 | +module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1004 | + | |
| 1005 | +/***/ }), | |
| 1006 | + | |
| 1007 | +/***/ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js": | |
| 1008 | +/*!******************************************************************!*\ | |
| 1009 | + !*** ../node_modules/@babel/runtime/helpers/asyncToGenerator.js ***! | |
| 1010 | + \******************************************************************/ | |
| 1011 | +/***/ ((module) => { | |
| 1012 | + | |
| 1013 | +function asyncGeneratorStep(n, t, e, r, o, a, c) { | |
| 1014 | + try { | |
| 1015 | + var i = n[a](c), | |
| 1016 | + u = i.value; | |
| 1017 | + } catch (n) { | |
| 1018 | + return void e(n); | |
| 1019 | + } | |
| 1020 | + i.done ? t(u) : Promise.resolve(u).then(r, o); | |
| 1021 | +} | |
| 1022 | +function _asyncToGenerator(n) { | |
| 1023 | + return function () { | |
| 1024 | + var t = this, | |
| 1025 | + e = arguments; | |
| 1026 | + return new Promise(function (r, o) { | |
| 1027 | + var a = n.apply(t, e); | |
| 1028 | + function _next(n) { | |
| 1029 | + asyncGeneratorStep(a, r, o, _next, _throw, "next", n); | |
| 1030 | + } | |
| 1031 | + function _throw(n) { | |
| 1032 | + asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); | |
| 1033 | + } | |
| 1034 | + _next(void 0); | |
| 1035 | + }); | |
| 1036 | + }; | |
| 1037 | +} | |
| 1038 | +module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1039 | + | |
| 1040 | +/***/ }), | |
| 1041 | + | |
| 1042 | +/***/ "../node_modules/@babel/runtime/helpers/classCallCheck.js": | |
| 1043 | +/*!****************************************************************!*\ | |
| 1044 | + !*** ../node_modules/@babel/runtime/helpers/classCallCheck.js ***! | |
| 1045 | + \****************************************************************/ | |
| 1046 | +/***/ ((module) => { | |
| 1047 | + | |
| 1048 | +function _classCallCheck(a, n) { | |
| 1049 | + if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); | |
| 1050 | +} | |
| 1051 | +module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1052 | + | |
| 1053 | +/***/ }), | |
| 1054 | + | |
| 1055 | +/***/ "../node_modules/@babel/runtime/helpers/createClass.js": | |
| 1056 | +/*!*************************************************************!*\ | |
| 1057 | + !*** ../node_modules/@babel/runtime/helpers/createClass.js ***! | |
| 1058 | + \*************************************************************/ | |
| 1059 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1060 | + | |
| 1061 | +var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); | |
| 1062 | +function _defineProperties(e, r) { | |
| 1063 | + for (var t = 0; t < r.length; t++) { | |
| 1064 | + var o = r[t]; | |
| 1065 | + o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o); | |
| 1066 | + } | |
| 1067 | +} | |
| 1068 | +function _createClass(e, r, t) { | |
| 1069 | + return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { | |
| 1070 | + writable: !1 | |
| 1071 | + }), e; | |
| 1072 | +} | |
| 1073 | +module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1074 | + | |
| 1075 | +/***/ }), | |
| 1076 | + | |
| 1077 | +/***/ "../node_modules/@babel/runtime/helpers/defineProperty.js": | |
| 1078 | +/*!****************************************************************!*\ | |
| 1079 | + !*** ../node_modules/@babel/runtime/helpers/defineProperty.js ***! | |
| 1080 | + \****************************************************************/ | |
| 1081 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1082 | + | |
| 1083 | +var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); | |
| 1084 | +function _defineProperty(e, r, t) { | |
| 1085 | + return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, { | |
| 1086 | + value: t, | |
| 1087 | + enumerable: !0, | |
| 1088 | + configurable: !0, | |
| 1089 | + writable: !0 | |
| 1090 | + }) : e[r] = t, e; | |
| 1091 | +} | |
| 1092 | +module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1093 | + | |
| 1094 | +/***/ }), | |
| 1095 | + | |
| 1096 | +/***/ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js": | |
| 1097 | +/*!****************************************************************!*\ | |
| 1098 | + !*** ../node_modules/@babel/runtime/helpers/getPrototypeOf.js ***! | |
| 1099 | + \****************************************************************/ | |
| 1100 | +/***/ ((module) => { | |
| 1101 | + | |
| 1102 | +function _getPrototypeOf(t) { | |
| 1103 | + return module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { | |
| 1104 | + return t.__proto__ || Object.getPrototypeOf(t); | |
| 1105 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports, _getPrototypeOf(t); | |
| 1106 | +} | |
| 1107 | +module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1108 | + | |
| 1109 | +/***/ }), | |
| 1110 | + | |
| 1111 | +/***/ "../node_modules/@babel/runtime/helpers/inherits.js": | |
| 1112 | +/*!**********************************************************!*\ | |
| 1113 | + !*** ../node_modules/@babel/runtime/helpers/inherits.js ***! | |
| 1114 | + \**********************************************************/ | |
| 1115 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1116 | + | |
| 1117 | +var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js"); | |
| 1118 | +function _inherits(t, e) { | |
| 1119 | + if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); | |
| 1120 | + t.prototype = Object.create(e && e.prototype, { | |
| 1121 | + constructor: { | |
| 1122 | + value: t, | |
| 1123 | + writable: !0, | |
| 1124 | + configurable: !0 | |
| 1125 | + } | |
| 1126 | + }), Object.defineProperty(t, "prototype", { | |
| 1127 | + writable: !1 | |
| 1128 | + }), e && setPrototypeOf(t, e); | |
| 1129 | +} | |
| 1130 | +module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1131 | + | |
| 1132 | +/***/ }), | |
| 1133 | + | |
| 1134 | +/***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js": | |
| 1135 | +/*!***********************************************************************!*\ | |
| 1136 | + !*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***! | |
| 1137 | + \***********************************************************************/ | |
| 1138 | +/***/ ((module) => { | |
| 1139 | + | |
| 1140 | +function _interopRequireDefault(e) { | |
| 1141 | + return e && e.__esModule ? e : { | |
| 1142 | + "default": e | |
| 1143 | + }; | |
| 1144 | +} | |
| 1145 | +module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1146 | + | |
| 1147 | +/***/ }), | |
| 1148 | + | |
| 1149 | +/***/ "../node_modules/@babel/runtime/helpers/iterableToArray.js": | |
| 1150 | +/*!*****************************************************************!*\ | |
| 1151 | + !*** ../node_modules/@babel/runtime/helpers/iterableToArray.js ***! | |
| 1152 | + \*****************************************************************/ | |
| 1153 | +/***/ ((module) => { | |
| 1154 | + | |
| 1155 | +function _iterableToArray(r) { | |
| 1156 | + if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); | |
| 1157 | +} | |
| 1158 | +module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1159 | + | |
| 1160 | +/***/ }), | |
| 1161 | + | |
| 1162 | +/***/ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js": | |
| 1163 | +/*!**********************************************************************!*\ | |
| 1164 | + !*** ../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***! | |
| 1165 | + \**********************************************************************/ | |
| 1166 | +/***/ ((module) => { | |
| 1167 | + | |
| 1168 | +function _iterableToArrayLimit(r, l) { | |
| 1169 | + var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; | |
| 1170 | + if (null != t) { | |
| 1171 | + var e, | |
| 1172 | + n, | |
| 1173 | + i, | |
| 1174 | + u, | |
| 1175 | + a = [], | |
| 1176 | + f = !0, | |
| 1177 | + o = !1; | |
| 1178 | + try { | |
| 1179 | + if (i = (t = t.call(r)).next, 0 === l) { | |
| 1180 | + if (Object(t) !== t) return; | |
| 1181 | + f = !1; | |
| 1182 | + } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); | |
| 1183 | + } catch (r) { | |
| 1184 | + o = !0, n = r; | |
| 1185 | + } finally { | |
| 1186 | + try { | |
| 1187 | + if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; | |
| 1188 | + } finally { | |
| 1189 | + if (o) throw n; | |
| 1190 | + } | |
| 1191 | + } | |
| 1192 | + return a; | |
| 1193 | + } | |
| 1194 | +} | |
| 1195 | +module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1196 | + | |
| 1197 | +/***/ }), | |
| 1198 | + | |
| 1199 | +/***/ "../node_modules/@babel/runtime/helpers/nonIterableRest.js": | |
| 1200 | +/*!*****************************************************************!*\ | |
| 1201 | + !*** ../node_modules/@babel/runtime/helpers/nonIterableRest.js ***! | |
| 1202 | + \*****************************************************************/ | |
| 1203 | +/***/ ((module) => { | |
| 1204 | + | |
| 1205 | +function _nonIterableRest() { | |
| 1206 | + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | |
| 1207 | +} | |
| 1208 | +module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1209 | + | |
| 1210 | +/***/ }), | |
| 1211 | + | |
| 1212 | +/***/ "../node_modules/@babel/runtime/helpers/nonIterableSpread.js": | |
| 1213 | +/*!*******************************************************************!*\ | |
| 1214 | + !*** ../node_modules/@babel/runtime/helpers/nonIterableSpread.js ***! | |
| 1215 | + \*******************************************************************/ | |
| 1216 | +/***/ ((module) => { | |
| 1217 | + | |
| 1218 | +function _nonIterableSpread() { | |
| 1219 | + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | |
| 1220 | +} | |
| 1221 | +module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1222 | + | |
| 1223 | +/***/ }), | |
| 1224 | + | |
| 1225 | +/***/ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js": | |
| 1226 | +/*!***************************************************************************!*\ | |
| 1227 | + !*** ../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***! | |
| 1228 | + \***************************************************************************/ | |
| 1229 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1230 | + | |
| 1231 | +var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 1232 | +var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js"); | |
| 1233 | +function _possibleConstructorReturn(t, e) { | |
| 1234 | + if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; | |
| 1235 | + if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); | |
| 1236 | + return assertThisInitialized(t); | |
| 1237 | +} | |
| 1238 | +module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1239 | + | |
| 1240 | +/***/ }), | |
| 1241 | + | |
| 1242 | +/***/ "../node_modules/@babel/runtime/helpers/regeneratorRuntime.js": | |
| 1243 | +/*!********************************************************************!*\ | |
| 1244 | + !*** ../node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***! | |
| 1245 | + \********************************************************************/ | |
| 1246 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1247 | + | |
| 1248 | +var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 1249 | +function _regeneratorRuntime() { | |
| 1250 | + "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ | |
| 1251 | + module.exports = _regeneratorRuntime = function _regeneratorRuntime() { | |
| 1252 | + return e; | |
| 1253 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1254 | + var t, | |
| 1255 | + e = {}, | |
| 1256 | + r = Object.prototype, | |
| 1257 | + n = r.hasOwnProperty, | |
| 1258 | + o = Object.defineProperty || function (t, e, r) { | |
| 1259 | + t[e] = r.value; | |
| 1260 | + }, | |
| 1261 | + i = "function" == typeof Symbol ? Symbol : {}, | |
| 1262 | + a = i.iterator || "@@iterator", | |
| 1263 | + c = i.asyncIterator || "@@asyncIterator", | |
| 1264 | + u = i.toStringTag || "@@toStringTag"; | |
| 1265 | + function define(t, e, r) { | |
| 1266 | + return Object.defineProperty(t, e, { | |
| 1267 | + value: r, | |
| 1268 | + enumerable: !0, | |
| 1269 | + configurable: !0, | |
| 1270 | + writable: !0 | |
| 1271 | + }), t[e]; | |
| 1272 | + } | |
| 1273 | + try { | |
| 1274 | + define({}, ""); | |
| 1275 | + } catch (t) { | |
| 1276 | + define = function define(t, e, r) { | |
| 1277 | + return t[e] = r; | |
| 1278 | + }; | |
| 1279 | + } | |
| 1280 | + function wrap(t, e, r, n) { | |
| 1281 | + var i = e && e.prototype instanceof Generator ? e : Generator, | |
| 1282 | + a = Object.create(i.prototype), | |
| 1283 | + c = new Context(n || []); | |
| 1284 | + return o(a, "_invoke", { | |
| 1285 | + value: makeInvokeMethod(t, r, c) | |
| 1286 | + }), a; | |
| 1287 | + } | |
| 1288 | + function tryCatch(t, e, r) { | |
| 1289 | + try { | |
| 1290 | + return { | |
| 1291 | + type: "normal", | |
| 1292 | + arg: t.call(e, r) | |
| 1293 | + }; | |
| 1294 | + } catch (t) { | |
| 1295 | + return { | |
| 1296 | + type: "throw", | |
| 1297 | + arg: t | |
| 1298 | + }; | |
| 1299 | + } | |
| 1300 | + } | |
| 1301 | + e.wrap = wrap; | |
| 1302 | + var h = "suspendedStart", | |
| 1303 | + l = "suspendedYield", | |
| 1304 | + f = "executing", | |
| 1305 | + s = "completed", | |
| 1306 | + y = {}; | |
| 1307 | + function Generator() {} | |
| 1308 | + function GeneratorFunction() {} | |
| 1309 | + function GeneratorFunctionPrototype() {} | |
| 1310 | + var p = {}; | |
| 1311 | + define(p, a, function () { | |
| 1312 | + return this; | |
| 1313 | + }); | |
| 1314 | + var d = Object.getPrototypeOf, | |
| 1315 | + v = d && d(d(values([]))); | |
| 1316 | + v && v !== r && n.call(v, a) && (p = v); | |
| 1317 | + var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); | |
| 1318 | + function defineIteratorMethods(t) { | |
| 1319 | + ["next", "throw", "return"].forEach(function (e) { | |
| 1320 | + define(t, e, function (t) { | |
| 1321 | + return this._invoke(e, t); | |
| 1322 | + }); | |
| 1323 | + }); | |
| 1324 | + } | |
| 1325 | + function AsyncIterator(t, e) { | |
| 1326 | + function invoke(r, o, i, a) { | |
| 1327 | + var c = tryCatch(t[r], t, o); | |
| 1328 | + if ("throw" !== c.type) { | |
| 1329 | + var u = c.arg, | |
| 1330 | + h = u.value; | |
| 1331 | + return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { | |
| 1332 | + invoke("next", t, i, a); | |
| 1333 | + }, function (t) { | |
| 1334 | + invoke("throw", t, i, a); | |
| 1335 | + }) : e.resolve(h).then(function (t) { | |
| 1336 | + u.value = t, i(u); | |
| 1337 | + }, function (t) { | |
| 1338 | + return invoke("throw", t, i, a); | |
| 1339 | + }); | |
| 1340 | + } | |
| 1341 | + a(c.arg); | |
| 1342 | + } | |
| 1343 | + var r; | |
| 1344 | + o(this, "_invoke", { | |
| 1345 | + value: function value(t, n) { | |
| 1346 | + function callInvokeWithMethodAndArg() { | |
| 1347 | + return new e(function (e, r) { | |
| 1348 | + invoke(t, n, e, r); | |
| 1349 | + }); | |
| 1350 | + } | |
| 1351 | + return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); | |
| 1352 | + } | |
| 1353 | + }); | |
| 1354 | + } | |
| 1355 | + function makeInvokeMethod(e, r, n) { | |
| 1356 | + var o = h; | |
| 1357 | + return function (i, a) { | |
| 1358 | + if (o === f) throw Error("Generator is already running"); | |
| 1359 | + if (o === s) { | |
| 1360 | + if ("throw" === i) throw a; | |
| 1361 | + return { | |
| 1362 | + value: t, | |
| 1363 | + done: !0 | |
| 1364 | + }; | |
| 1365 | + } | |
| 1366 | + for (n.method = i, n.arg = a;;) { | |
| 1367 | + var c = n.delegate; | |
| 1368 | + if (c) { | |
| 1369 | + var u = maybeInvokeDelegate(c, n); | |
| 1370 | + if (u) { | |
| 1371 | + if (u === y) continue; | |
| 1372 | + return u; | |
| 1373 | + } | |
| 1374 | + } | |
| 1375 | + if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { | |
| 1376 | + if (o === h) throw o = s, n.arg; | |
| 1377 | + n.dispatchException(n.arg); | |
| 1378 | + } else "return" === n.method && n.abrupt("return", n.arg); | |
| 1379 | + o = f; | |
| 1380 | + var p = tryCatch(e, r, n); | |
| 1381 | + if ("normal" === p.type) { | |
| 1382 | + if (o = n.done ? s : l, p.arg === y) continue; | |
| 1383 | + return { | |
| 1384 | + value: p.arg, | |
| 1385 | + done: n.done | |
| 1386 | + }; | |
| 1387 | + } | |
| 1388 | + "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); | |
| 1389 | + } | |
| 1390 | + }; | |
| 1391 | + } | |
| 1392 | + function maybeInvokeDelegate(e, r) { | |
| 1393 | + var n = r.method, | |
| 1394 | + o = e.iterator[n]; | |
| 1395 | + if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; | |
| 1396 | + var i = tryCatch(o, e.iterator, r.arg); | |
| 1397 | + if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; | |
| 1398 | + var a = i.arg; | |
| 1399 | + return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); | |
| 1400 | + } | |
| 1401 | + function pushTryEntry(t) { | |
| 1402 | + var e = { | |
| 1403 | + tryLoc: t[0] | |
| 1404 | + }; | |
| 1405 | + 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); | |
| 1406 | + } | |
| 1407 | + function resetTryEntry(t) { | |
| 1408 | + var e = t.completion || {}; | |
| 1409 | + e.type = "normal", delete e.arg, t.completion = e; | |
| 1410 | + } | |
| 1411 | + function Context(t) { | |
| 1412 | + this.tryEntries = [{ | |
| 1413 | + tryLoc: "root" | |
| 1414 | + }], t.forEach(pushTryEntry, this), this.reset(!0); | |
| 1415 | + } | |
| 1416 | + function values(e) { | |
| 1417 | + if (e || "" === e) { | |
| 1418 | + var r = e[a]; | |
| 1419 | + if (r) return r.call(e); | |
| 1420 | + if ("function" == typeof e.next) return e; | |
| 1421 | + if (!isNaN(e.length)) { | |
| 1422 | + var o = -1, | |
| 1423 | + i = function next() { | |
| 1424 | + for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; | |
| 1425 | + return next.value = t, next.done = !0, next; | |
| 1426 | + }; | |
| 1427 | + return i.next = i; | |
| 1428 | + } | |
| 1429 | + } | |
| 1430 | + throw new TypeError(_typeof(e) + " is not iterable"); | |
| 1431 | + } | |
| 1432 | + return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { | |
| 1433 | + value: GeneratorFunctionPrototype, | |
| 1434 | + configurable: !0 | |
| 1435 | + }), o(GeneratorFunctionPrototype, "constructor", { | |
| 1436 | + value: GeneratorFunction, | |
| 1437 | + configurable: !0 | |
| 1438 | + }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { | |
| 1439 | + var e = "function" == typeof t && t.constructor; | |
| 1440 | + return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); | |
| 1441 | + }, e.mark = function (t) { | |
| 1442 | + return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; | |
| 1443 | + }, e.awrap = function (t) { | |
| 1444 | + return { | |
| 1445 | + __await: t | |
| 1446 | + }; | |
| 1447 | + }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { | |
| 1448 | + return this; | |
| 1449 | + }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { | |
| 1450 | + void 0 === i && (i = Promise); | |
| 1451 | + var a = new AsyncIterator(wrap(t, r, n, o), i); | |
| 1452 | + return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { | |
| 1453 | + return t.done ? t.value : a.next(); | |
| 1454 | + }); | |
| 1455 | + }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { | |
| 1456 | + return this; | |
| 1457 | + }), define(g, "toString", function () { | |
| 1458 | + return "[object Generator]"; | |
| 1459 | + }), e.keys = function (t) { | |
| 1460 | + var e = Object(t), | |
| 1461 | + r = []; | |
| 1462 | + for (var n in e) r.push(n); | |
| 1463 | + return r.reverse(), function next() { | |
| 1464 | + for (; r.length;) { | |
| 1465 | + var t = r.pop(); | |
| 1466 | + if (t in e) return next.value = t, next.done = !1, next; | |
| 1467 | + } | |
| 1468 | + return next.done = !0, next; | |
| 1469 | + }; | |
| 1470 | + }, e.values = values, Context.prototype = { | |
| 1471 | + constructor: Context, | |
| 1472 | + reset: function reset(e) { | |
| 1473 | + if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); | |
| 1474 | + }, | |
| 1475 | + stop: function stop() { | |
| 1476 | + this.done = !0; | |
| 1477 | + var t = this.tryEntries[0].completion; | |
| 1478 | + if ("throw" === t.type) throw t.arg; | |
| 1479 | + return this.rval; | |
| 1480 | + }, | |
| 1481 | + dispatchException: function dispatchException(e) { | |
| 1482 | + if (this.done) throw e; | |
| 1483 | + var r = this; | |
| 1484 | + function handle(n, o) { | |
| 1485 | + return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; | |
| 1486 | + } | |
| 1487 | + for (var o = this.tryEntries.length - 1; o >= 0; --o) { | |
| 1488 | + var i = this.tryEntries[o], | |
| 1489 | + a = i.completion; | |
| 1490 | + if ("root" === i.tryLoc) return handle("end"); | |
| 1491 | + if (i.tryLoc <= this.prev) { | |
| 1492 | + var c = n.call(i, "catchLoc"), | |
| 1493 | + u = n.call(i, "finallyLoc"); | |
| 1494 | + if (c && u) { | |
| 1495 | + if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); | |
| 1496 | + if (this.prev < i.finallyLoc) return handle(i.finallyLoc); | |
| 1497 | + } else if (c) { | |
| 1498 | + if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); | |
| 1499 | + } else { | |
| 1500 | + if (!u) throw Error("try statement without catch or finally"); | |
| 1501 | + if (this.prev < i.finallyLoc) return handle(i.finallyLoc); | |
| 1502 | + } | |
| 1503 | + } | |
| 1504 | + } | |
| 1505 | + }, | |
| 1506 | + abrupt: function abrupt(t, e) { | |
| 1507 | + for (var r = this.tryEntries.length - 1; r >= 0; --r) { | |
| 1508 | + var o = this.tryEntries[r]; | |
| 1509 | + if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { | |
| 1510 | + var i = o; | |
| 1511 | + break; | |
| 1512 | + } | |
| 1513 | + } | |
| 1514 | + i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); | |
| 1515 | + var a = i ? i.completion : {}; | |
| 1516 | + return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); | |
| 1517 | + }, | |
| 1518 | + complete: function complete(t, e) { | |
| 1519 | + if ("throw" === t.type) throw t.arg; | |
| 1520 | + return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; | |
| 1521 | + }, | |
| 1522 | + finish: function finish(t) { | |
| 1523 | + for (var e = this.tryEntries.length - 1; e >= 0; --e) { | |
| 1524 | + var r = this.tryEntries[e]; | |
| 1525 | + if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; | |
| 1526 | + } | |
| 1527 | + }, | |
| 1528 | + "catch": function _catch(t) { | |
| 1529 | + for (var e = this.tryEntries.length - 1; e >= 0; --e) { | |
| 1530 | + var r = this.tryEntries[e]; | |
| 1531 | + if (r.tryLoc === t) { | |
| 1532 | + var n = r.completion; | |
| 1533 | + if ("throw" === n.type) { | |
| 1534 | + var o = n.arg; | |
| 1535 | + resetTryEntry(r); | |
| 1536 | + } | |
| 1537 | + return o; | |
| 1538 | + } | |
| 1539 | + } | |
| 1540 | + throw Error("illegal catch attempt"); | |
| 1541 | + }, | |
| 1542 | + delegateYield: function delegateYield(e, r, n) { | |
| 1543 | + return this.delegate = { | |
| 1544 | + iterator: values(e), | |
| 1545 | + resultName: r, | |
| 1546 | + nextLoc: n | |
| 1547 | + }, "next" === this.method && (this.arg = t), y; | |
| 1548 | + } | |
| 1549 | + }, e; | |
| 1550 | +} | |
| 1551 | +module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1552 | + | |
| 1553 | +/***/ }), | |
| 1554 | + | |
| 1555 | +/***/ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js": | |
| 1556 | +/*!****************************************************************!*\ | |
| 1557 | + !*** ../node_modules/@babel/runtime/helpers/setPrototypeOf.js ***! | |
| 1558 | + \****************************************************************/ | |
| 1559 | +/***/ ((module) => { | |
| 1560 | + | |
| 1561 | +function _setPrototypeOf(t, e) { | |
| 1562 | + return module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { | |
| 1563 | + return t.__proto__ = e, t; | |
| 1564 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports, _setPrototypeOf(t, e); | |
| 1565 | +} | |
| 1566 | +module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1567 | + | |
| 1568 | +/***/ }), | |
| 1569 | + | |
| 1570 | +/***/ "../node_modules/@babel/runtime/helpers/slicedToArray.js": | |
| 1571 | +/*!***************************************************************!*\ | |
| 1572 | + !*** ../node_modules/@babel/runtime/helpers/slicedToArray.js ***! | |
| 1573 | + \***************************************************************/ | |
| 1574 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1575 | + | |
| 1576 | +var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js"); | |
| 1577 | +var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js"); | |
| 1578 | +var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"); | |
| 1579 | +var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "../node_modules/@babel/runtime/helpers/nonIterableRest.js"); | |
| 1580 | +function _slicedToArray(r, e) { | |
| 1581 | + return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest(); | |
| 1582 | +} | |
| 1583 | +module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1584 | + | |
| 1585 | +/***/ }), | |
| 1586 | + | |
| 1587 | +/***/ "../node_modules/@babel/runtime/helpers/toConsumableArray.js": | |
| 1588 | +/*!*******************************************************************!*\ | |
| 1589 | + !*** ../node_modules/@babel/runtime/helpers/toConsumableArray.js ***! | |
| 1590 | + \*******************************************************************/ | |
| 1591 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1592 | + | |
| 1593 | +var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js"); | |
| 1594 | +var iterableToArray = __webpack_require__(/*! ./iterableToArray.js */ "../node_modules/@babel/runtime/helpers/iterableToArray.js"); | |
| 1595 | +var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"); | |
| 1596 | +var nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread.js */ "../node_modules/@babel/runtime/helpers/nonIterableSpread.js"); | |
| 1597 | +function _toConsumableArray(r) { | |
| 1598 | + return arrayWithoutHoles(r) || iterableToArray(r) || unsupportedIterableToArray(r) || nonIterableSpread(); | |
| 1599 | +} | |
| 1600 | +module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1601 | + | |
| 1602 | +/***/ }), | |
| 1603 | + | |
| 1604 | +/***/ "../node_modules/@babel/runtime/helpers/toPrimitive.js": | |
| 1605 | +/*!*************************************************************!*\ | |
| 1606 | + !*** ../node_modules/@babel/runtime/helpers/toPrimitive.js ***! | |
| 1607 | + \*************************************************************/ | |
| 1608 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1609 | + | |
| 1610 | +var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 1611 | +function toPrimitive(t, r) { | |
| 1612 | + if ("object" != _typeof(t) || !t) return t; | |
| 1613 | + var e = t[Symbol.toPrimitive]; | |
| 1614 | + if (void 0 !== e) { | |
| 1615 | + var i = e.call(t, r || "default"); | |
| 1616 | + if ("object" != _typeof(i)) return i; | |
| 1617 | + throw new TypeError("@@toPrimitive must return a primitive value."); | |
| 1618 | + } | |
| 1619 | + return ("string" === r ? String : Number)(t); | |
| 1620 | +} | |
| 1621 | +module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1622 | + | |
| 1623 | +/***/ }), | |
| 1624 | + | |
| 1625 | +/***/ "../node_modules/@babel/runtime/helpers/toPropertyKey.js": | |
| 1626 | +/*!***************************************************************!*\ | |
| 1627 | + !*** ../node_modules/@babel/runtime/helpers/toPropertyKey.js ***! | |
| 1628 | + \***************************************************************/ | |
| 1629 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1630 | + | |
| 1631 | +var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 1632 | +var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ "../node_modules/@babel/runtime/helpers/toPrimitive.js"); | |
| 1633 | +function toPropertyKey(t) { | |
| 1634 | + var i = toPrimitive(t, "string"); | |
| 1635 | + return "symbol" == _typeof(i) ? i : i + ""; | |
| 1636 | +} | |
| 1637 | +module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1638 | + | |
| 1639 | +/***/ }), | |
| 1640 | + | |
| 1641 | +/***/ "../node_modules/@babel/runtime/helpers/typeof.js": | |
| 1642 | +/*!********************************************************!*\ | |
| 1643 | + !*** ../node_modules/@babel/runtime/helpers/typeof.js ***! | |
| 1644 | + \********************************************************/ | |
| 1645 | +/***/ ((module) => { | |
| 1646 | + | |
| 1647 | +function _typeof(o) { | |
| 1648 | + "@babel/helpers - typeof"; | |
| 1649 | + | |
| 1650 | + return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { | |
| 1651 | + return typeof o; | |
| 1652 | + } : function (o) { | |
| 1653 | + return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; | |
| 1654 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o); | |
| 1655 | +} | |
| 1656 | +module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1657 | + | |
| 1658 | +/***/ }), | |
| 1659 | + | |
| 1660 | +/***/ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js": | |
| 1661 | +/*!****************************************************************************!*\ | |
| 1662 | + !*** ../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***! | |
| 1663 | + \****************************************************************************/ | |
| 1664 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1665 | + | |
| 1666 | +var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js"); | |
| 1667 | +function _unsupportedIterableToArray(r, a) { | |
| 1668 | + if (r) { | |
| 1669 | + if ("string" == typeof r) return arrayLikeToArray(r, a); | |
| 1670 | + var t = {}.toString.call(r).slice(8, -1); | |
| 1671 | + 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; | |
| 1672 | + } | |
| 1673 | +} | |
| 1674 | +module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1675 | + | |
| 1676 | +/***/ }), | |
| 1677 | + | |
| 1678 | +/***/ "../node_modules/@babel/runtime/regenerator/index.js": | |
| 1679 | +/*!***********************************************************!*\ | |
| 1680 | + !*** ../node_modules/@babel/runtime/regenerator/index.js ***! | |
| 1681 | + \***********************************************************/ | |
| 1682 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1683 | + | |
| 1684 | +// TODO(Babel 8): Remove this file. | |
| 1685 | + | |
| 1686 | +var runtime = __webpack_require__(/*! ../helpers/regeneratorRuntime */ "../node_modules/@babel/runtime/helpers/regeneratorRuntime.js")(); | |
| 1687 | +module.exports = runtime; | |
| 1688 | + | |
| 1689 | +// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736= | |
| 1690 | +try { | |
| 1691 | + regeneratorRuntime = runtime; | |
| 1692 | +} catch (accidentalStrictMode) { | |
| 1693 | + if (typeof globalThis === "object") { | |
| 1694 | + globalThis.regeneratorRuntime = runtime; | |
| 1695 | + } else { | |
| 1696 | + Function("r", "regeneratorRuntime = r")(runtime); | |
| 1697 | + } | |
| 1698 | +} | |
| 1699 | + | |
| 1700 | + | |
| 1701 | +/***/ }) | |
| 1702 | + | |
| 1703 | +/******/ }); | |
| 1704 | +/************************************************************************/ | |
| 1705 | +/******/ // The module cache | |
| 1706 | +/******/ var __webpack_module_cache__ = {}; | |
| 1707 | +/******/ | |
| 1708 | +/******/ // The require function | |
| 1709 | +/******/ function __webpack_require__(moduleId) { | |
| 1710 | +/******/ // Check if module is in cache | |
| 1711 | +/******/ var cachedModule = __webpack_module_cache__[moduleId]; | |
| 1712 | +/******/ if (cachedModule !== undefined) { | |
| 1713 | +/******/ return cachedModule.exports; | |
| 1714 | +/******/ } | |
| 1715 | +/******/ // Create a new module (and put it into the cache) | |
| 1716 | +/******/ var module = __webpack_module_cache__[moduleId] = { | |
| 1717 | +/******/ // no module.id needed | |
| 1718 | +/******/ // no module.loaded needed | |
| 1719 | +/******/ exports: {} | |
| 1720 | +/******/ }; | |
| 1721 | +/******/ | |
| 1722 | +/******/ // Execute the module function | |
| 1723 | +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); | |
| 1724 | +/******/ | |
| 1725 | +/******/ // Return the exports of the module | |
| 1726 | +/******/ return module.exports; | |
| 1727 | +/******/ } | |
| 1728 | +/******/ | |
| 1729 | +/************************************************************************/ | |
| 1730 | +var __webpack_exports__ = {}; | |
| 1731 | +// This entry need to be wrapped in an IIFE because it need to be in strict mode. | |
| 1732 | +(() => { | |
| 1733 | +"use strict"; | |
| 1734 | +/*!******************************************************************!*\ | |
| 1735 | + !*** ../modules/kit-elements-defaults/assets/js/editor/index.js ***! | |
| 1736 | + \******************************************************************/ | |
| 1737 | + | |
| 1738 | + | |
| 1739 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1740 | +var _module = _interopRequireDefault(__webpack_require__(/*! ./module.js */ "../modules/kit-elements-defaults/assets/js/editor/module.js")); | |
| 1741 | +new _module.default(); | |
| 1742 | +})(); | |
| 1743 | + | |
| 1744 | +/******/ })() | |
| 1745 | +; | |
| 1350 | 1746 | //# sourceMappingURL=kit-elements-defaults-editor.js.map |