← All changes
|
assets/js/import-export-customization-admin.js
+545
-1444
4.3.0-beta2
→
3.32.3
View file →
| @@ -1,1482 +1,583 @@ | ||
| 1 | -(function(_wordpress_i18n, _wordpress_api_fetch) { | |
| 1 | +/*! elementor - v3.32.0 - 29-09-2025 */ | |
| 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 __copyProps = (to, from, except, desc) => { | |
| 16 | - if (from && typeof from === "object" || typeof from === "function") { | |
| 17 | - for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) { | |
| 18 | - key = keys[i]; | |
| 19 | - if (!__hasOwnProp.call(to, key) && key !== except) { | |
| 20 | - __defProp(to, key, { | |
| 21 | - get: ((k) => from[k]).bind(null, key), | |
| 22 | - enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable | |
| 23 | - }); | |
| 24 | - } | |
| 25 | - } | |
| 26 | - } | |
| 27 | - return to; | |
| 28 | - }; | |
| 29 | - var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { | |
| 30 | - value: mod, | |
| 31 | - enumerable: true | |
| 32 | - }) : target, mod)); | |
| 5 | +/***/ "../app/assets/js/event-track/apps-event-tracking.js": | |
| 6 | +/*!***********************************************************!*\ | |
| 7 | + !*** ../app/assets/js/event-track/apps-event-tracking.js ***! | |
| 8 | + \***********************************************************/ | |
| 9 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 33 | 10 | |
| 34 | -//#endregion | |
| 35 | -_wordpress_api_fetch = __toESM(_wordpress_api_fetch); | |
| 11 | +"use strict"; | |
| 36 | 12 | |
| 37 | -//#region node_modules/@babel/runtime/helpers/esm/classCallCheck.js | |
| 38 | - function _classCallCheck(a, n) { | |
| 39 | - if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); | |
| 40 | - } | |
| 41 | 13 | |
| 42 | -//#endregion | |
| 43 | -//#region node_modules/@babel/runtime/helpers/esm/typeof.js | |
| 44 | - function _typeof(o) { | |
| 45 | - "@babel/helpers - typeof"; | |
| 46 | - return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) { | |
| 47 | - return typeof o; | |
| 48 | - } : function(o) { | |
| 49 | - return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; | |
| 50 | - }, _typeof(o); | |
| 51 | - } | |
| 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.appsEventTrackingDispatch = exports.AppsEventTracking = void 0; | |
| 19 | +var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); | |
| 20 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 21 | +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 22 | +var _eventsConfig = _interopRequireDefault(__webpack_require__(/*! ../../../../core/common/modules/events-manager/assets/js/events-config */ "../core/common/modules/events-manager/assets/js/events-config.js")); | |
| 23 | +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; } | |
| 24 | +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; } | |
| 25 | +function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; } | |
| 26 | +function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } | |
| 27 | +function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } | |
| 28 | +var EVENTS_MAP = { | |
| 29 | + PAGE_VIEWS_WEBSITE_TEMPLATES: 'page_views_website_templates', | |
| 30 | + KITS_CLOUD_UPGRADE_CLICKED: 'kits_cloud_upgrade_clicked', | |
| 31 | + EXPORT_KIT_CUSTOMIZATION: 'export_kit_customization', | |
| 32 | + IMPORT_KIT_CUSTOMIZATION: 'import_kit_customization', | |
| 33 | + KIT_IMPORT_STATUS: 'kit_import_status', | |
| 34 | + KIT_CLOUD_LIBRARY_APPLY: 'kit_cloud_library_apply', | |
| 35 | + KIT_CLOUD_LIBRARY_DELETE: 'kit_cloud_library_delete', | |
| 36 | + IMPORT_EXPORT_ADMIN_ACTION: 'ie_admin_action', | |
| 37 | + KIT_IMPORT_UPLOAD_FILE: 'kit_import_upload_file' | |
| 38 | +}; | |
| 39 | +var appsEventTrackingDispatch = exports.appsEventTrackingDispatch = function appsEventTrackingDispatch(command, eventParams) { | |
| 40 | + // Add existing eventParams key value pair to the data/details object. | |
| 41 | + var objectCreator = function objectCreator(array, obj) { | |
| 42 | + var _iterator = _createForOfIteratorHelper(array), | |
| 43 | + _step; | |
| 44 | + try { | |
| 45 | + for (_iterator.s(); !(_step = _iterator.n()).done;) { | |
| 46 | + var key = _step.value; | |
| 47 | + if (eventParams.hasOwnProperty(key) && eventParams[key] !== null) { | |
| 48 | + obj[key] = eventParams[key]; | |
| 49 | + } | |
| 50 | + } | |
| 51 | + } catch (err) { | |
| 52 | + _iterator.e(err); | |
| 53 | + } finally { | |
| 54 | + _iterator.f(); | |
| 55 | + } | |
| 56 | + return obj; | |
| 57 | + }; | |
| 58 | + var dataKeys = []; | |
| 59 | + var detailsKeys = ['layout', 'site_part', 'error', 'document_name', 'document_type', 'view_type_clicked', 'tag', 'sort_direction', 'sort_type', 'action', 'grid_location', 'kit_name', 'page_source', 'element_position', 'element', 'event_type', 'modal_type', 'method', 'status', 'step', 'item', 'category', 'element_location', 'search_term', 'section', 'site_area']; | |
| 60 | + var data = {}; | |
| 61 | + var details = {}; | |
| 62 | + var init = function init() { | |
| 63 | + objectCreator(detailsKeys, details); | |
| 64 | + objectCreator(dataKeys, data); | |
| 65 | + var commandSplit = command.split('/'); | |
| 66 | + data.placement = commandSplit[0]; | |
| 67 | + data.event = commandSplit[1]; | |
| 52 | 68 | |
| 53 | -//#endregion | |
| 54 | -//#region node_modules/@babel/runtime/helpers/esm/toPrimitive.js | |
| 55 | - function toPrimitive(t, r) { | |
| 56 | - if ("object" != _typeof(t) || !t) return t; | |
| 57 | - var e = t[Symbol.toPrimitive]; | |
| 58 | - if (void 0 !== e) { | |
| 59 | - var i = e.call(t, r || "default"); | |
| 60 | - if ("object" != _typeof(i)) return i; | |
| 61 | - throw new TypeError("@@toPrimitive must return a primitive value."); | |
| 62 | - } | |
| 63 | - return ("string" === r ? String : Number)(t); | |
| 64 | - } | |
| 69 | + // If 'details' is not empty, add the details object to the data object. | |
| 70 | + if (Object.keys(details).length) { | |
| 71 | + data.details = details; | |
| 72 | + } | |
| 73 | + }; | |
| 74 | + init(); | |
| 75 | + $e.run(command, data); | |
| 76 | +}; | |
| 77 | +var AppsEventTracking = exports.AppsEventTracking = /*#__PURE__*/function () { | |
| 78 | + function AppsEventTracking() { | |
| 79 | + (0, _classCallCheck2.default)(this, AppsEventTracking); | |
| 80 | + } | |
| 81 | + return (0, _createClass2.default)(AppsEventTracking, null, [{ | |
| 82 | + key: "dispatchEvent", | |
| 83 | + value: function dispatchEvent(eventName, payload) { | |
| 84 | + return elementorCommon.eventsManager.dispatchEvent(eventName, payload); | |
| 85 | + } | |
| 86 | + }, { | |
| 87 | + key: "sendPageViewsWebsiteTemplates", | |
| 88 | + value: function sendPageViewsWebsiteTemplates(page) { | |
| 89 | + return this.dispatchEvent(EVENTS_MAP.PAGE_VIEWS_WEBSITE_TEMPLATES, { | |
| 90 | + trigger: _eventsConfig.default.triggers.pageLoaded, | |
| 91 | + page_loaded: page, | |
| 92 | + secondary_location: page | |
| 93 | + }); | |
| 94 | + } | |
| 95 | + }, { | |
| 96 | + key: "sendKitsCloudUpgradeClicked", | |
| 97 | + value: function sendKitsCloudUpgradeClicked(upgradeLocation) { | |
| 98 | + return this.dispatchEvent(EVENTS_MAP.KITS_CLOUD_UPGRADE_CLICKED, { | |
| 99 | + trigger: _eventsConfig.default.triggers.click, | |
| 100 | + secondary_location: upgradeLocation, | |
| 101 | + upgrade_location: upgradeLocation | |
| 102 | + }); | |
| 103 | + } | |
| 104 | + }, { | |
| 105 | + key: "sendExportKitCustomization", | |
| 106 | + value: function sendExportKitCustomization(payload) { | |
| 107 | + return this.dispatchEvent(EVENTS_MAP.EXPORT_KIT_CUSTOMIZATION, _objectSpread({ | |
| 108 | + trigger: _eventsConfig.default.triggers.click | |
| 109 | + }, payload)); | |
| 110 | + } | |
| 111 | + }, { | |
| 112 | + key: "sendImportKitCustomization", | |
| 113 | + value: function sendImportKitCustomization(payload) { | |
| 114 | + return this.dispatchEvent(EVENTS_MAP.IMPORT_KIT_CUSTOMIZATION, _objectSpread({ | |
| 115 | + trigger: _eventsConfig.default.triggers.click | |
| 116 | + }, payload)); | |
| 117 | + } | |
| 118 | + }, { | |
| 119 | + key: "sendKitImportStatus", | |
| 120 | + value: function sendKitImportStatus() { | |
| 121 | + var error = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; | |
| 122 | + return this.dispatchEvent(EVENTS_MAP.KIT_IMPORT_STATUS, _objectSpread({ | |
| 123 | + kit_import_status: !error | |
| 124 | + }, error && { | |
| 125 | + kit_import_error: error.message | |
| 126 | + })); | |
| 127 | + } | |
| 128 | + }, { | |
| 129 | + key: "sendKitCloudLibraryApply", | |
| 130 | + value: function sendKitCloudLibraryApply(kitId, kitApplyUrl) { | |
| 131 | + return this.dispatchEvent(EVENTS_MAP.KIT_CLOUD_LIBRARY_APPLY, _objectSpread({ | |
| 132 | + trigger: _eventsConfig.default.triggers.click, | |
| 133 | + kit_cloud_id: kitId | |
| 134 | + }, kitApplyUrl && { | |
| 135 | + kit_apply_url: kitApplyUrl | |
| 136 | + })); | |
| 137 | + } | |
| 138 | + }, { | |
| 139 | + key: "sendKitCloudLibraryDelete", | |
| 140 | + value: function sendKitCloudLibraryDelete() { | |
| 141 | + return this.dispatchEvent(EVENTS_MAP.KIT_CLOUD_LIBRARY_DELETE, { | |
| 142 | + trigger: _eventsConfig.default.triggers.click | |
| 143 | + }); | |
| 144 | + } | |
| 145 | + }, { | |
| 146 | + key: "sendImportExportAdminAction", | |
| 147 | + value: function sendImportExportAdminAction(actionType) { | |
| 148 | + return this.dispatchEvent(EVENTS_MAP.IMPORT_EXPORT_ADMIN_ACTION, { | |
| 149 | + trigger: _eventsConfig.default.triggers.click, | |
| 150 | + action_type: actionType | |
| 151 | + }); | |
| 152 | + } | |
| 153 | + }, { | |
| 154 | + key: "sendKitImportUploadFile", | |
| 155 | + value: function sendKitImportUploadFile(status) { | |
| 156 | + return this.dispatchEvent(EVENTS_MAP.KIT_IMPORT_UPLOAD_FILE, { | |
| 157 | + kit_import_upload_file_status: status | |
| 158 | + }); | |
| 159 | + } | |
| 160 | + }]); | |
| 161 | +}(); | |
| 65 | 162 | |
| 66 | -//#endregion | |
| 67 | -//#region node_modules/@babel/runtime/helpers/esm/toPropertyKey.js | |
| 68 | - function toPropertyKey(t) { | |
| 69 | - var i = toPrimitive(t, "string"); | |
| 70 | - return "symbol" == _typeof(i) ? i : i + ""; | |
| 71 | - } | |
| 163 | +/***/ }), | |
| 72 | 164 | |
| 73 | -//#endregion | |
| 74 | -//#region node_modules/@babel/runtime/helpers/esm/createClass.js | |
| 75 | - function _defineProperties(e, r) { | |
| 76 | - for (var t = 0; t < r.length; t++) { | |
| 77 | - var o = r[t]; | |
| 78 | - o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o); | |
| 79 | - } | |
| 80 | - } | |
| 81 | - function _createClass(e, r, t) { | |
| 82 | - return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; | |
| 83 | - } | |
| 165 | +/***/ "../core/common/modules/events-manager/assets/js/events-config.js": | |
| 166 | +/*!************************************************************************!*\ | |
| 167 | + !*** ../core/common/modules/events-manager/assets/js/events-config.js ***! | |
| 168 | + \************************************************************************/ | |
| 169 | +/***/ ((__unused_webpack_module, exports) => { | |
| 84 | 170 | |
| 85 | -//#endregion | |
| 86 | -//#region node_modules/@babel/runtime/helpers/esm/defineProperty.js | |
| 87 | - function _defineProperty(e, r, t) { | |
| 88 | - return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, { | |
| 89 | - value: t, | |
| 90 | - enumerable: !0, | |
| 91 | - configurable: !0, | |
| 92 | - writable: !0 | |
| 93 | - }) : e[r] = t, e; | |
| 94 | - } | |
| 171 | +"use strict"; | |
| 95 | 172 | |
| 96 | -//#endregion | |
| 97 | -//#region core/common/modules/events-manager/assets/js/events-config.js | |
| 98 | - var eventsConfig = { | |
| 99 | - appTypes: { | |
| 100 | - editor: "editor", | |
| 101 | - wpAdmin: "wpadmin", | |
| 102 | - wpDash: "wpdash" | |
| 103 | - }, | |
| 104 | - windowNames: { sidebarMenu: "sidebar_menu" }, | |
| 105 | - targetTypes: { | |
| 106 | - dropdownItem: "dropdown_item", | |
| 107 | - button: "button", | |
| 108 | - tab: "tab", | |
| 109 | - toggle: "toggle", | |
| 110 | - searchInput: "search_input", | |
| 111 | - searchResult: "search_result", | |
| 112 | - buttons: "buttons", | |
| 113 | - searchWidget: "search_widget", | |
| 114 | - wpDashAdminMenuItem: "wpdash_admin_menu_item", | |
| 115 | - wpDashEditorMenu: "wpdash_editor_menu", | |
| 116 | - wpDashSubMenuItem: "wpdash_sub_menu_item", | |
| 117 | - link: "link" | |
| 118 | - }, | |
| 119 | - interactionResults: { | |
| 120 | - actionSelected: "action_selected", | |
| 121 | - navigate: "navigate", | |
| 122 | - create: "create", | |
| 123 | - sessionEnd: "session_end", | |
| 124 | - tabChanged: "tab_changed", | |
| 125 | - assetInserted: "asset_inserted", | |
| 126 | - assetFavorite: "asset_favorite", | |
| 127 | - aiGenerate: "ai_generate", | |
| 128 | - resultsUpdated: "results_updated", | |
| 129 | - noResults: "no_results", | |
| 130 | - selected: "selected", | |
| 131 | - promotionViewed: "promotion_viewed", | |
| 132 | - upgradeNow: "upgrade_now", | |
| 133 | - elementorSideMenuOpened: "elementor_side_menu_opened", | |
| 134 | - editorSubMenuOpened: "wpdash_editor_sub_menu_opened", | |
| 135 | - themeBuilderPromotionWindow: "theme_builder_promotion_window", | |
| 136 | - pageOpened: "page_opened", | |
| 137 | - expanded: "expanded", | |
| 138 | - collapsed: "collapsed" | |
| 139 | - }, | |
| 140 | - targetNames: { | |
| 141 | - publishDropdown: { | |
| 142 | - saveDraft: "save_draft", | |
| 143 | - saveAsTemplate: "save_as_template", | |
| 144 | - viewPage: "view_page", | |
| 145 | - copyAndShare: "copy_and_share" | |
| 146 | - }, | |
| 147 | - pageList: { addNewPage: "add_new_page" } | |
| 148 | - }, | |
| 149 | - triggers: { | |
| 150 | - click: "Click", | |
| 151 | - rightClick: "Right Click", | |
| 152 | - doubleClick: "Double Click", | |
| 153 | - accordionClick: "Accordion Click", | |
| 154 | - toggleClick: "Toggle Click", | |
| 155 | - dropdownClick: "Click Dropdown", | |
| 156 | - editorLoaded: "Editor Loaded", | |
| 157 | - visible: "Visible", | |
| 158 | - pageLoaded: "Page Loaded", | |
| 159 | - typing: "Typing", | |
| 160 | - tabSelect: "Tab Select", | |
| 161 | - insert: "Insert", | |
| 162 | - hover: "Hover" | |
| 163 | - }, | |
| 164 | - locations: { | |
| 165 | - widgetPanel: "Widget Panel", | |
| 166 | - topBar: "Top Bar", | |
| 167 | - sidebar: "Sidebar", | |
| 168 | - elementorEditor: "Elementor Editor", | |
| 169 | - templatesLibrary: { library: "Templates Library" }, | |
| 170 | - app: { | |
| 171 | - import: "Import Kit", | |
| 172 | - export: "Export Kit", | |
| 173 | - kitLibrary: "Kit Library", | |
| 174 | - cloudKitLibrary: "Cloud Kit Library" | |
| 175 | - }, | |
| 176 | - variables: "Variables Panel", | |
| 177 | - variablesManager: "Variables Manager", | |
| 178 | - admin: "WP admin", | |
| 179 | - wpDashAdmin: "wpdash_admin", | |
| 180 | - structurePanel: "Structure Panel", | |
| 181 | - canvas: "Canvas", | |
| 182 | - leftPanel: "Left Panel", | |
| 183 | - elementorLibrary: "Elementor Library", | |
| 184 | - components: { instanceEditingPanel: "Instance Editing Panel" } | |
| 185 | - }, | |
| 186 | - secondaryLocations: { | |
| 187 | - layout: "Layout Section", | |
| 188 | - basic: "Basic Section", | |
| 189 | - "pro-elements": "Pro Section", | |
| 190 | - general: "General Section", | |
| 191 | - "theme-elements": "Site Section", | |
| 192 | - "theme-elements-single": "Single Section", | |
| 193 | - "woocommerce-elements": "WooCommerce Section", | |
| 194 | - wordpress: "WordPress Section", | |
| 195 | - categories: "Widgets Tab", | |
| 196 | - global: "Globals Tab", | |
| 197 | - "whats-new": "What's New", | |
| 198 | - "document-settings": "Document Settings icon", | |
| 199 | - "preview-page": "Preview Page", | |
| 200 | - "publish-button": "Publish Button", | |
| 201 | - "widget-panel": "Widget Panel Icon", | |
| 202 | - finder: "Finder", | |
| 203 | - help: "Help", | |
| 204 | - elementorLogoDropdown: "top_bar_elementor_logo_dropdown", | |
| 205 | - elementorLogo: "Elementor Logo", | |
| 206 | - eLogoMenu: "E-logo Menu", | |
| 207 | - notes: "Notes", | |
| 208 | - siteSettings: "Site Settings", | |
| 209 | - structure: "Structure", | |
| 210 | - documentNameDropdown: "Document Name dropdown", | |
| 211 | - responsiveControls: "Responsive controls", | |
| 212 | - launchpad: "launchpad", | |
| 213 | - checklistHeader: "Checklist Header", | |
| 214 | - checklistSteps: "Checklist Steps", | |
| 215 | - userPreferences: "User Preferences", | |
| 216 | - contextMenu: "Context Menu", | |
| 217 | - templateLibrary: { | |
| 218 | - saveModal: "Save to Modal", | |
| 219 | - moveModal: "Move to Modal", | |
| 220 | - bulkMoveModal: "Bulk Move to Modal", | |
| 221 | - copyModal: "Copy to Modal", | |
| 222 | - bulkCopyModal: "Bulk Copy to Modal", | |
| 223 | - saveModalSelectFolder: "Save to Modal - select folder", | |
| 224 | - saveModalSelectConnect: "Save to Modal - connect", | |
| 225 | - saveModalSelectUpgrade: "Save to Modal - upgrade", | |
| 226 | - importModal: "Import Modal", | |
| 227 | - newFolderModal: "New Folder Modal", | |
| 228 | - deleteDialog: "Delete Dialog", | |
| 229 | - deleteFolderDialog: "Delete Folder Dialog", | |
| 230 | - renameDialog: "Rename Dialog", | |
| 231 | - createFolderDialog: "Create Folder Dialog", | |
| 232 | - applySettingsDialog: "Apply Settings Dialog", | |
| 233 | - cloudTab: "Cloud Tab", | |
| 234 | - siteTab: "Site Tab", | |
| 235 | - cloudTabFolder: "Cloud Tab - Folder", | |
| 236 | - cloudTabConnect: "Cloud Tab - Connect", | |
| 237 | - cloudTabUpgrade: "Cloud Tab - Upgrade", | |
| 238 | - morePopup: "Context Menu", | |
| 239 | - quotaBar: "Quota Bar" | |
| 240 | - }, | |
| 241 | - kitLibrary: { | |
| 242 | - cloudKitLibrary: "kits_cloud_library", | |
| 243 | - cloudKitLibraryConnect: "kits_cloud_library_connect", | |
| 244 | - cloudKitLibraryUpgrade: "kits_cloud_library_upgrade", | |
| 245 | - kitExportCustomization: "kit_export_customization", | |
| 246 | - kitExport: "kit_export", | |
| 247 | - kitExportCustomizationEdit: "kit_export_customization_edit", | |
| 248 | - kitExportSummary: "kit_export_summary", | |
| 249 | - kitImportUploadBox: "kit_import_upload_box", | |
| 250 | - kitImportCustomization: "kit_import_customization", | |
| 251 | - kitImportSummary: "kit_import_summary" | |
| 252 | - }, | |
| 253 | - variablesPopover: "Variables Popover", | |
| 254 | - admin: { | |
| 255 | - pluginToolsTab: "plugin_tools_tab", | |
| 256 | - pluginWebsiteTemplatesTab: "plugin_website_templates_tab" | |
| 257 | - }, | |
| 258 | - componentsTab: "Components Tab", | |
| 259 | - canvasElement: "Canvas Element", | |
| 260 | - publishDropdown: "Publish Dropdown", | |
| 261 | - pageListDropdown: "Page List Dropdown", | |
| 262 | - emptyBox: "Empty Box", | |
| 263 | - searchBar: "Search Bar", | |
| 264 | - finderResults: "Finder Results", | |
| 265 | - libraryTabs: "Library Tabs", | |
| 266 | - assetCard: "Asset Card", | |
| 267 | - wpDashElementorCoreMenu: "elementor_editor_core_menu", | |
| 268 | - wpDashElementorCoreSubMenu: "elementor_editor_core_sub_menu", | |
| 269 | - wpDashThemeBuilder: "wpdash_core_sub_menu_theme_builder" | |
| 270 | - }, | |
| 271 | - elements: { | |
| 272 | - accordionSection: "Accordion section", | |
| 273 | - buttonIcon: "Button Icon", | |
| 274 | - mainCta: "Main CTA", | |
| 275 | - button: "Button", | |
| 276 | - link: "Link", | |
| 277 | - dropdown: "Dropdown", | |
| 278 | - toggle: "Toggle", | |
| 279 | - launchpadChecklist: "Checklist popup" | |
| 280 | - }, | |
| 281 | - names: { | |
| 282 | - v1: { | |
| 283 | - layout: "v1_widgets_tab_layout_section", | |
| 284 | - basic: "v1_widgets_tab_basic_section", | |
| 285 | - "pro-elements": "v1_widgets_tab_pro_section", | |
| 286 | - general: "v1_widgets_tab_general_section", | |
| 287 | - "theme-elements": "v1_widgets_tab_site_section", | |
| 288 | - "theme-elements-single": "v1_widgets_tab_single_section", | |
| 289 | - "woocommerce-elements": "v1_widgets_tab_woocommerce_section", | |
| 290 | - wordpress: "v1_widgets_tab_wordpress_section", | |
| 291 | - categories: "v1_widgets_tab", | |
| 292 | - global: "v1_globals_tab" | |
| 293 | - }, | |
| 294 | - topBar: { | |
| 295 | - whatsNew: "top_bar_whats_new", | |
| 296 | - documentSettings: "top_bar_document_settings_icon", | |
| 297 | - previewPage: "top_bar_preview_page", | |
| 298 | - publishButton: "top_bar_publish_button", | |
| 299 | - widgetPanel: "top_bar_widget_panel_icon", | |
| 300 | - finder: "top_bar_finder", | |
| 301 | - help: "top_bar_help", | |
| 302 | - history: "top_bar_elementor_logo_dropdown_history", | |
| 303 | - userPreferences: "top_bar_elementor_logo_dropdown_user_preferences", | |
| 304 | - keyboardShortcuts: "top_bar_elementor_logo_dropdown_keyboard_shortcuts", | |
| 305 | - exitToWordpress: "top_bar_elementor_logo_dropdown_exit_to_wordpress", | |
| 306 | - themeBuilder: "top_bar_elementor_logo_dropdown_theme_builder", | |
| 307 | - notes: "top_bar_notes", | |
| 308 | - siteSettings: "top_bar_site_setting", | |
| 309 | - structure: "top_bar_structure", | |
| 310 | - documentNameDropdown: "top_bar_document_name_dropdown", | |
| 311 | - responsiveControls: "top_bar_responsive_controls", | |
| 312 | - launchpadOn: "top_bar_checklist_icon_show", | |
| 313 | - launchpadOff: "top_bar_checklist_icon_hide", | |
| 314 | - elementorLogoDropdown: "open_e_menu", | |
| 315 | - connectAccount: "connect_account", | |
| 316 | - accountConnected: "account_connected" | |
| 317 | - }, | |
| 318 | - elementorEditor: { | |
| 319 | - editorLoaded: "editor_loaded", | |
| 320 | - checklist: { | |
| 321 | - checklistHeaderClose: "checklist_header_close_icon", | |
| 322 | - checklistFirstPopup: "checklist popup triggered" | |
| 323 | - }, | |
| 324 | - userPreferences: { | |
| 325 | - checklistShow: "checklist_userpreferences_toggle_show", | |
| 326 | - checklistHide: "checklist_userpreferences_toggle_hide" | |
| 327 | - } | |
| 328 | - }, | |
| 329 | - variables: { | |
| 330 | - open: "open_variables_popover", | |
| 331 | - add: "add_new_variable", | |
| 332 | - connect: "connect_variable", | |
| 333 | - save: "save_new_variable", | |
| 334 | - update: "update_variable", | |
| 335 | - openManager: "open_variables_manager", | |
| 336 | - saveChanges: "save_variables_changes", | |
| 337 | - delete: "delete_variable", | |
| 338 | - variableSyncToV3: "variable_sync_to_v3" | |
| 339 | - }, | |
| 340 | - design_system: { | |
| 341 | - importOpened: "design_system_import_opened", | |
| 342 | - fileSelected: "design_system_file_selected", | |
| 343 | - validationFailed: "design_system_validation_failed", | |
| 344 | - conflictChoice: "design_system_conflict_choice", | |
| 345 | - confirmed: "design_system_import_confirmed", | |
| 346 | - imported: "design_system_imported", | |
| 347 | - importFailed: "design_system_import_failed", | |
| 348 | - export: "design_system_export", | |
| 349 | - opened: "design_system_opened" | |
| 350 | - }, | |
| 351 | - components: { | |
| 352 | - createClicked: "component_create_clicked", | |
| 353 | - createCancelled: "component_creation_cancelled", | |
| 354 | - created: "component_created", | |
| 355 | - instanceAdded: "component_instance_added", | |
| 356 | - edited: "component_edited", | |
| 357 | - propertiesPanelOpened: "component_properties_panel_opened", | |
| 358 | - propertiesGroupCreated: "component_properties_group_created", | |
| 359 | - propertyExposed: "component_property_exposed", | |
| 360 | - propertyRemoved: "component_property_removed", | |
| 361 | - detached: "component_detached" | |
| 362 | - }, | |
| 363 | - global_classes: { | |
| 364 | - classApplied: "class_applied", | |
| 365 | - classRemoved: "class_removed", | |
| 366 | - classManagerFilterCleared: "class_manager_filter_cleared", | |
| 367 | - classDeleted: "class_deleted", | |
| 368 | - classPublishConflict: "class_publish_conflict", | |
| 369 | - classRenamed: "class_renamed", | |
| 370 | - classCreated: "class_created", | |
| 371 | - classManagerSearched: "class_manager_searched", | |
| 372 | - classManagerFiltersOpened: "class_manager_filters_opened", | |
| 373 | - classManagerOpened: "class_manager_opened", | |
| 374 | - classManagerReorder: "class_manager_reorder", | |
| 375 | - classManagerFilterUsed: "class_manager_filter_used", | |
| 376 | - classUsageLocate: "class_usage_locate", | |
| 377 | - classUsageHovered: "class_usage_hovered", | |
| 378 | - classStyled: "class_styled", | |
| 379 | - classStateClicked: "class_state_clicked", | |
| 380 | - classUsageClicked: "class_usage_clicked", | |
| 381 | - classDuplicate: "class_duplicate", | |
| 382 | - classSyncToV3PopupShown: "class_sync_to_v3_popup_shown", | |
| 383 | - classSyncToV3: "class_sync_to_v3", | |
| 384 | - classSyncToV3PopupClick: "class_sync_to_v3_popup_click" | |
| 385 | - }, | |
| 386 | - editorOne: { | |
| 387 | - topBarPublishDropdown: "top_bar_publish_dropdown", | |
| 388 | - topBarPageList: "top_bar_page_list", | |
| 389 | - siteSettingsSession: "site_settings_session", | |
| 390 | - eLibraryNav: "e_library_nav", | |
| 391 | - eLibraryInsert: "e_library_insert", | |
| 392 | - eLibraryFavorite: "e_library_favorite", | |
| 393 | - eLibraryGenerateAi: "e_library_generate_ai", | |
| 394 | - finderSearchInput: "finder_search_input", | |
| 395 | - finderResultSelect: "finder_result_select", | |
| 396 | - canvasEmptyBoxAction: "canvas_empty_box_action", | |
| 397 | - widgetPanelSearch: "widget_panel_search", | |
| 398 | - wpDashElementorMenuClick: "wpdash_elementor_menu_click", | |
| 399 | - wpDashEditorSubMenuHover: "wpdash_editor_sub_menu_hover", | |
| 400 | - wpDashThemeBuilderClick: "wpdash_theme_builder_click", | |
| 401 | - sidebarMenuItemClicked: "sidebar_menu_item_clicked", | |
| 402 | - sidebarMenuGroupToggled: "sidebar_menu_group_toggled" | |
| 403 | - }, | |
| 404 | - interactions: { created: "interactions_created" }, | |
| 405 | - promotions: { | |
| 406 | - viewPromotion: "view_promotion", | |
| 407 | - upgradePromotionClick: "upgrade_promotion_click" | |
| 408 | - } | |
| 409 | - } | |
| 410 | - }; | |
| 411 | 173 | |
| 412 | -//#endregion | |
| 413 | -//#region app/assets/js/event-track/apps-event-tracking.js | |
| 414 | - function ownKeys(e, r) { | |
| 415 | - var t = Object.keys(e); | |
| 416 | - if (Object.getOwnPropertySymbols) { | |
| 417 | - var o = Object.getOwnPropertySymbols(e); | |
| 418 | - r && (o = o.filter(function(r) { | |
| 419 | - return Object.getOwnPropertyDescriptor(e, r).enumerable; | |
| 420 | - })), t.push.apply(t, o); | |
| 421 | - } | |
| 422 | - return t; | |
| 423 | - } | |
| 424 | - function _objectSpread(e) { | |
| 425 | - for (var r = 1; r < arguments.length; r++) { | |
| 426 | - var t = null != arguments[r] ? arguments[r] : {}; | |
| 427 | - r % 2 ? ownKeys(Object(t), !0).forEach(function(r) { | |
| 428 | - _defineProperty(e, r, t[r]); | |
| 429 | - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r) { | |
| 430 | - Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); | |
| 431 | - }); | |
| 432 | - } | |
| 433 | - return e; | |
| 434 | - } | |
| 435 | - var EVENTS_MAP = { | |
| 436 | - PAGE_VIEWS_WEBSITE_TEMPLATES: "page_views_website_templates", | |
| 437 | - KITS_CLOUD_UPGRADE_CLICKED: "kits_cloud_upgrade_clicked", | |
| 438 | - EXPORT_KIT_CUSTOMIZATION: "export_kit_customization", | |
| 439 | - IMPORT_KIT_CUSTOMIZATION: "import_kit_customization", | |
| 440 | - KIT_IMPORT_STATUS: "kit_import_status", | |
| 441 | - KIT_CLOUD_LIBRARY_APPLY: "kit_cloud_library_apply", | |
| 442 | - KIT_CLOUD_LIBRARY_DELETE: "kit_cloud_library_delete", | |
| 443 | - IMPORT_EXPORT_ADMIN_ACTION: "ie_admin_action", | |
| 444 | - KIT_IMPORT_UPLOAD_FILE: "kit_import_upload_file" | |
| 445 | - }; | |
| 446 | - var AppsEventTracking = /*#__PURE__*/ function() { | |
| 447 | - function AppsEventTracking() { | |
| 448 | - _classCallCheck(this, AppsEventTracking); | |
| 449 | - } | |
| 450 | - return _createClass(AppsEventTracking, null, [ | |
| 451 | - { | |
| 452 | - key: "dispatchEvent", | |
| 453 | - value: function dispatchEvent(eventName, payload) { | |
| 454 | - var _window$elementorComm; | |
| 455 | - var _window$elementorComm2; | |
| 456 | - return (_window$elementorComm = window.elementorCommon) === null || _window$elementorComm === void 0 || (_window$elementorComm = _window$elementorComm.eventsManager) === null || _window$elementorComm === void 0 || (_window$elementorComm2 = _window$elementorComm.dispatchEvent) === null || _window$elementorComm2 === void 0 ? void 0 : _window$elementorComm2.call(_window$elementorComm, eventName, payload); | |
| 457 | - } | |
| 458 | - }, | |
| 459 | - { | |
| 460 | - key: "sendPageViewsWebsiteTemplates", | |
| 461 | - value: function sendPageViewsWebsiteTemplates(page) { | |
| 462 | - return this.dispatchEvent(EVENTS_MAP.PAGE_VIEWS_WEBSITE_TEMPLATES, { | |
| 463 | - trigger: eventsConfig.triggers.pageLoaded, | |
| 464 | - page_loaded: page, | |
| 465 | - secondary_location: page | |
| 466 | - }); | |
| 467 | - } | |
| 468 | - }, | |
| 469 | - { | |
| 470 | - key: "sendKitsCloudUpgradeClicked", | |
| 471 | - value: function sendKitsCloudUpgradeClicked(upgradeLocation) { | |
| 472 | - return this.dispatchEvent(EVENTS_MAP.KITS_CLOUD_UPGRADE_CLICKED, { | |
| 473 | - trigger: eventsConfig.triggers.click, | |
| 474 | - secondary_location: upgradeLocation, | |
| 475 | - upgrade_location: upgradeLocation | |
| 476 | - }); | |
| 477 | - } | |
| 478 | - }, | |
| 479 | - { | |
| 480 | - key: "sendExportKitCustomization", | |
| 481 | - value: function sendExportKitCustomization(payload) { | |
| 482 | - return this.dispatchEvent(EVENTS_MAP.EXPORT_KIT_CUSTOMIZATION, _objectSpread({ trigger: eventsConfig.triggers.click }, payload)); | |
| 483 | - } | |
| 484 | - }, | |
| 485 | - { | |
| 486 | - key: "sendImportKitCustomization", | |
| 487 | - value: function sendImportKitCustomization(payload) { | |
| 488 | - return this.dispatchEvent(EVENTS_MAP.IMPORT_KIT_CUSTOMIZATION, _objectSpread({ trigger: eventsConfig.triggers.click }, payload)); | |
| 489 | - } | |
| 490 | - }, | |
| 491 | - { | |
| 492 | - key: "sendKitImportStatus", | |
| 493 | - value: function sendKitImportStatus() { | |
| 494 | - var error = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null; | |
| 495 | - var isError = !!error; | |
| 496 | - return this.dispatchEvent(EVENTS_MAP.KIT_IMPORT_STATUS, _objectSpread({ kit_import_status: !isError }, isError && { kit_import_error: error.message })); | |
| 497 | - } | |
| 498 | - }, | |
| 499 | - { | |
| 500 | - key: "sendKitCloudLibraryApply", | |
| 501 | - value: function sendKitCloudLibraryApply(kitId, kitApplyUrl) { | |
| 502 | - return this.dispatchEvent(EVENTS_MAP.KIT_CLOUD_LIBRARY_APPLY, _objectSpread({ | |
| 503 | - trigger: eventsConfig.triggers.click, | |
| 504 | - kit_cloud_id: kitId | |
| 505 | - }, kitApplyUrl && { kit_apply_url: kitApplyUrl })); | |
| 506 | - } | |
| 507 | - }, | |
| 508 | - { | |
| 509 | - key: "sendKitCloudLibraryDelete", | |
| 510 | - value: function sendKitCloudLibraryDelete() { | |
| 511 | - return this.dispatchEvent(EVENTS_MAP.KIT_CLOUD_LIBRARY_DELETE, { trigger: eventsConfig.triggers.click }); | |
| 512 | - } | |
| 513 | - }, | |
| 514 | - { | |
| 515 | - key: "sendImportExportAdminAction", | |
| 516 | - value: function sendImportExportAdminAction(actionType) { | |
| 517 | - return this.dispatchEvent(EVENTS_MAP.IMPORT_EXPORT_ADMIN_ACTION, { | |
| 518 | - trigger: eventsConfig.triggers.click, | |
| 519 | - action_type: actionType | |
| 520 | - }); | |
| 521 | - } | |
| 522 | - }, | |
| 523 | - { | |
| 524 | - key: "sendKitImportUploadFile", | |
| 525 | - value: function sendKitImportUploadFile(status) { | |
| 526 | - return this.dispatchEvent(EVENTS_MAP.KIT_IMPORT_UPLOAD_FILE, { kit_import_upload_file_status: status }); | |
| 527 | - } | |
| 528 | - } | |
| 529 | - ]); | |
| 530 | - }(); | |
| 174 | +Object.defineProperty(exports, "__esModule", ({ | |
| 175 | + value: true | |
| 176 | +})); | |
| 177 | +exports["default"] = void 0; | |
| 178 | +var eventsConfig = { | |
| 179 | + triggers: { | |
| 180 | + click: 'Click', | |
| 181 | + accordionClick: 'Accordion Click', | |
| 182 | + toggleClick: 'Toggle Click', | |
| 183 | + dropdownClick: 'Click Dropdown', | |
| 184 | + editorLoaded: 'Editor Loaded', | |
| 185 | + visible: 'Visible', | |
| 186 | + pageLoaded: 'Page Loaded' | |
| 187 | + }, | |
| 188 | + locations: { | |
| 189 | + widgetPanel: 'Widget Panel', | |
| 190 | + topBar: 'Top Bar', | |
| 191 | + elementorEditor: 'Elementor Editor', | |
| 192 | + templatesLibrary: { | |
| 193 | + library: 'Templates Library' | |
| 194 | + }, | |
| 195 | + app: { | |
| 196 | + import: 'Import Kit', | |
| 197 | + export: 'Export Kit', | |
| 198 | + kitLibrary: 'Kit Library', | |
| 199 | + cloudKitLibrary: 'Cloud Kit Library' | |
| 200 | + }, | |
| 201 | + variables: 'Variables Panel', | |
| 202 | + admin: 'WP admin' | |
| 203 | + }, | |
| 204 | + secondaryLocations: { | |
| 205 | + layout: 'Layout Section', | |
| 206 | + basic: 'Basic Section', | |
| 207 | + 'pro-elements': 'Pro Section', | |
| 208 | + general: 'General Section', | |
| 209 | + 'theme-elements': 'Site Section', | |
| 210 | + 'theme-elements-single': 'Single Section', | |
| 211 | + 'woocommerce-elements': 'WooCommerce Section', | |
| 212 | + wordpress: 'WordPress Section', | |
| 213 | + categories: 'Widgets Tab', | |
| 214 | + global: 'Globals Tab', | |
| 215 | + 'whats-new': 'What\'s New', | |
| 216 | + 'document-settings': 'Document Settings icon', | |
| 217 | + 'preview-page': 'Preview Page', | |
| 218 | + 'publish-button': 'Publish Button', | |
| 219 | + 'widget-panel': 'Widget Panel Icon', | |
| 220 | + finder: 'Finder', | |
| 221 | + help: 'Help', | |
| 222 | + elementorLogoDropdown: 'top_bar_elementor_logo_dropdown', | |
| 223 | + elementorLogo: 'Elementor Logo', | |
| 224 | + eLogoMenu: 'E-logo Menu', | |
| 225 | + notes: 'Notes', | |
| 226 | + siteSettings: 'Site Settings', | |
| 227 | + structure: 'Structure', | |
| 228 | + documentNameDropdown: 'Document Name dropdown', | |
| 229 | + responsiveControls: 'Responsive controls', | |
| 230 | + launchpad: 'launchpad', | |
| 231 | + checklistHeader: 'Checklist Header', | |
| 232 | + checklistSteps: 'Checklist Steps', | |
| 233 | + userPreferences: 'User Preferences', | |
| 234 | + contextMenu: 'Context Menu', | |
| 235 | + templateLibrary: { | |
| 236 | + saveModal: 'Save to Modal', | |
| 237 | + moveModal: 'Move to Modal', | |
| 238 | + bulkMoveModal: 'Bulk Move to Modal', | |
| 239 | + copyModal: 'Copy to Modal', | |
| 240 | + bulkCopyModal: 'Bulk Copy to Modal', | |
| 241 | + saveModalSelectFolder: 'Save to Modal - select folder', | |
| 242 | + saveModalSelectConnect: 'Save to Modal - connect', | |
| 243 | + saveModalSelectUpgrade: 'Save to Modal - upgrade', | |
| 244 | + importModal: 'Import Modal', | |
| 245 | + newFolderModal: 'New Folder Modal', | |
| 246 | + deleteDialog: 'Delete Dialog', | |
| 247 | + deleteFolderDialog: 'Delete Folder Dialog', | |
| 248 | + renameDialog: 'Rename Dialog', | |
| 249 | + createFolderDialog: 'Create Folder Dialog', | |
| 250 | + applySettingsDialog: 'Apply Settings Dialog', | |
| 251 | + cloudTab: 'Cloud Tab', | |
| 252 | + siteTab: 'Site Tab', | |
| 253 | + cloudTabFolder: 'Cloud Tab - Folder', | |
| 254 | + cloudTabConnect: 'Cloud Tab - Connect', | |
| 255 | + cloudTabUpgrade: 'Cloud Tab - Upgrade', | |
| 256 | + morePopup: 'Context Menu', | |
| 257 | + quotaBar: 'Quota Bar' | |
| 258 | + }, | |
| 259 | + kitLibrary: { | |
| 260 | + cloudKitLibrary: 'kits_cloud_library', | |
| 261 | + cloudKitLibraryConnect: 'kits_cloud_library_connect', | |
| 262 | + cloudKitLibraryUpgrade: 'kits_cloud_library_upgrade', | |
| 263 | + kitExportCustomization: 'kit_export_customization', | |
| 264 | + kitExport: 'kit_export', | |
| 265 | + kitExportCustomizationEdit: 'kit_export_customization_edit', | |
| 266 | + kitExportSummary: 'kit_export_summary', | |
| 267 | + kitImportUploadBox: 'kit_import_upload_box', | |
| 268 | + kitImportCustomization: 'kit_import_customization', | |
| 269 | + kitImportSummary: 'kit_import_summary' | |
| 270 | + }, | |
| 271 | + variablesPopover: 'Variables Popover', | |
| 272 | + admin: { | |
| 273 | + pluginToolsTab: 'plugin_tools_tab', | |
| 274 | + pluginWebsiteTemplatesTab: 'plugin_website_templates_tab' | |
| 275 | + } | |
| 276 | + }, | |
| 277 | + elements: { | |
| 278 | + accordionSection: 'Accordion section', | |
| 279 | + buttonIcon: 'Button Icon', | |
| 280 | + mainCta: 'Main CTA', | |
| 281 | + button: 'Button', | |
| 282 | + link: 'Link', | |
| 283 | + dropdown: 'Dropdown', | |
| 284 | + toggle: 'Toggle', | |
| 285 | + launchpadChecklist: 'Checklist popup' | |
| 286 | + }, | |
| 287 | + names: { | |
| 288 | + v1: { | |
| 289 | + layout: 'v1_widgets_tab_layout_section', | |
| 290 | + basic: 'v1_widgets_tab_basic_section', | |
| 291 | + 'pro-elements': 'v1_widgets_tab_pro_section', | |
| 292 | + general: 'v1_widgets_tab_general_section', | |
| 293 | + 'theme-elements': 'v1_widgets_tab_site_section', | |
| 294 | + 'theme-elements-single': 'v1_widgets_tab_single_section', | |
| 295 | + 'woocommerce-elements': 'v1_widgets_tab_woocommerce_section', | |
| 296 | + wordpress: 'v1_widgets_tab_wordpress_section', | |
| 297 | + categories: 'v1_widgets_tab', | |
| 298 | + global: 'v1_globals_tab' | |
| 299 | + }, | |
| 300 | + topBar: { | |
| 301 | + whatsNew: 'top_bar_whats_new', | |
| 302 | + documentSettings: 'top_bar_document_settings_icon', | |
| 303 | + previewPage: 'top_bar_preview_page', | |
| 304 | + publishButton: 'top_bar_publish_button', | |
| 305 | + widgetPanel: 'top_bar_widget_panel_icon', | |
| 306 | + finder: 'top_bar_finder', | |
| 307 | + help: 'top_bar_help', | |
| 308 | + history: 'top_bar_elementor_logo_dropdown_history', | |
| 309 | + userPreferences: 'top_bar_elementor_logo_dropdown_user_preferences', | |
| 310 | + keyboardShortcuts: 'top_bar_elementor_logo_dropdown_keyboard_shortcuts', | |
| 311 | + exitToWordpress: 'top_bar_elementor_logo_dropdown_exit_to_wordpress', | |
| 312 | + themeBuilder: 'top_bar_elementor_logo_dropdown_theme_builder', | |
| 313 | + notes: 'top_bar_notes', | |
| 314 | + siteSettings: 'top_bar_site_setting', | |
| 315 | + structure: 'top_bar_structure', | |
| 316 | + documentNameDropdown: 'top_bar_document_name_dropdown', | |
| 317 | + responsiveControls: 'top_bar_responsive_controls', | |
| 318 | + launchpadOn: 'top_bar_checklist_icon_show', | |
| 319 | + launchpadOff: 'top_bar_checklist_icon_hide', | |
| 320 | + elementorLogoDropdown: 'open_e_menu', | |
| 321 | + connectAccount: 'connect_account', | |
| 322 | + accountConnected: 'account_connected' | |
| 323 | + }, | |
| 324 | + // ChecklistSteps event names are generated dynamically, based on stepId and action type taken: title, action, done, undone, upgrade | |
| 325 | + elementorEditor: { | |
| 326 | + checklist: { | |
| 327 | + checklistHeaderClose: 'checklist_header_close_icon', | |
| 328 | + checklistFirstPopup: 'checklist popup triggered' | |
| 329 | + }, | |
| 330 | + userPreferences: { | |
| 331 | + checklistShow: 'checklist_userpreferences_toggle_show', | |
| 332 | + checklistHide: 'checklist_userpreferences_toggle_hide' | |
| 333 | + } | |
| 334 | + }, | |
| 335 | + variables: { | |
| 336 | + open: 'open_variables_popover', | |
| 337 | + add: 'add_new_variable', | |
| 338 | + connect: 'connect_variable', | |
| 339 | + save: 'save_new_variable' | |
| 340 | + } | |
| 341 | + } | |
| 342 | +}; | |
| 343 | +var _default = exports["default"] = eventsConfig; | |
| 531 | 344 | |
| 532 | -//#endregion | |
| 533 | -//#region node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js | |
| 534 | - function asyncGeneratorStep(n, t, e, r, o, a, c) { | |
| 535 | - try { | |
| 536 | - var i = n[a](c); | |
| 537 | - var u = i.value; | |
| 538 | - } catch (n) { | |
| 539 | - e(n); | |
| 540 | - return; | |
| 541 | - } | |
| 542 | - i.done ? t(u) : Promise.resolve(u).then(r, o); | |
| 543 | - } | |
| 544 | - function _asyncToGenerator(n) { | |
| 545 | - return function() { | |
| 546 | - var t = this; | |
| 547 | - var e = arguments; | |
| 548 | - return new Promise(function(r, o) { | |
| 549 | - var a = n.apply(t, e); | |
| 550 | - function _next(n) { | |
| 551 | - asyncGeneratorStep(a, r, o, _next, _throw, "next", n); | |
| 552 | - } | |
| 553 | - function _throw(n) { | |
| 554 | - asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); | |
| 555 | - } | |
| 556 | - _next(void 0); | |
| 557 | - }); | |
| 558 | - }; | |
| 559 | - } | |
| 345 | +/***/ }), | |
| 560 | 346 | |
| 561 | -//#endregion | |
| 562 | -//#region node_modules/@babel/runtime/helpers/OverloadYield.js | |
| 563 | - var require_OverloadYield = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 564 | - function _OverloadYield(e, d) { | |
| 565 | - this.v = e, this.k = d; | |
| 566 | - } | |
| 567 | - module.exports = _OverloadYield, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 568 | - })); | |
| 347 | +/***/ "../node_modules/@babel/runtime/helpers/classCallCheck.js": | |
| 348 | +/*!****************************************************************!*\ | |
| 349 | + !*** ../node_modules/@babel/runtime/helpers/classCallCheck.js ***! | |
| 350 | + \****************************************************************/ | |
| 351 | +/***/ ((module) => { | |
| 569 | 352 | |
| 570 | -//#endregion | |
| 571 | -//#region node_modules/@babel/runtime/helpers/regeneratorDefine.js | |
| 572 | - var require_regeneratorDefine = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 573 | - function _regeneratorDefine(e, r, n, t) { | |
| 574 | - var i = Object.defineProperty; | |
| 575 | - try { | |
| 576 | - i({}, "", {}); | |
| 577 | - } catch (e) { | |
| 578 | - i = 0; | |
| 579 | - } | |
| 580 | - module.exports = _regeneratorDefine = function regeneratorDefine(e, r, n, t) { | |
| 581 | - function o(r, n) { | |
| 582 | - _regeneratorDefine(e, r, function(e) { | |
| 583 | - return this._invoke(r, n, e); | |
| 584 | - }); | |
| 585 | - } | |
| 586 | - r ? i ? i(e, r, { | |
| 587 | - value: n, | |
| 588 | - enumerable: !t, | |
| 589 | - configurable: !t, | |
| 590 | - writable: !t | |
| 591 | - }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); | |
| 592 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _regeneratorDefine(e, r, n, t); | |
| 593 | - } | |
| 594 | - module.exports = _regeneratorDefine, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 595 | - })); | |
| 353 | +function _classCallCheck(a, n) { | |
| 354 | + if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); | |
| 355 | +} | |
| 356 | +module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 596 | 357 | |
| 597 | -//#endregion | |
| 598 | -//#region node_modules/@babel/runtime/helpers/regenerator.js | |
| 599 | - var require_regenerator$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 600 | - var regeneratorDefine = require_regeneratorDefine(); | |
| 601 | - function _regenerator() { | |
| 602 | - /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ | |
| 603 | - var e; | |
| 604 | - var t; | |
| 605 | - var r = "function" == typeof Symbol ? Symbol : {}; | |
| 606 | - var n = r.iterator || "@@iterator"; | |
| 607 | - var o = r.toStringTag || "@@toStringTag"; | |
| 608 | - function i(r, n, o, i) { | |
| 609 | - var c = n && n.prototype instanceof Generator ? n : Generator; | |
| 610 | - var u = Object.create(c.prototype); | |
| 611 | - return regeneratorDefine(u, "_invoke", function(r, n, o) { | |
| 612 | - var i; | |
| 613 | - var c; | |
| 614 | - var u; | |
| 615 | - var f = 0; | |
| 616 | - var p = o || []; | |
| 617 | - var y = !1; | |
| 618 | - var G = { | |
| 619 | - p: 0, | |
| 620 | - n: 0, | |
| 621 | - v: e, | |
| 622 | - a: d, | |
| 623 | - f: d.bind(e, 4), | |
| 624 | - d: function d(t, r) { | |
| 625 | - return i = t, c = 0, u = e, G.n = r, a; | |
| 626 | - } | |
| 627 | - }; | |
| 628 | - function d(r, n) { | |
| 629 | - for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { | |
| 630 | - var o; | |
| 631 | - var i = p[t]; | |
| 632 | - var d = G.p; | |
| 633 | - var l = i[2]; | |
| 634 | - 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)); | |
| 635 | - } | |
| 636 | - if (o || r > 1) return a; | |
| 637 | - throw y = !0, n; | |
| 638 | - } | |
| 639 | - return function(o, p, l) { | |
| 640 | - if (f > 1) throw TypeError("Generator is already running"); | |
| 641 | - for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { | |
| 642 | - i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); | |
| 643 | - try { | |
| 644 | - if (f = 2, i) { | |
| 645 | - if (c || (o = "next"), t = i[o]) { | |
| 646 | - if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); | |
| 647 | - if (!t.done) return t; | |
| 648 | - u = t.value, c < 2 && (c = 0); | |
| 649 | - } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); | |
| 650 | - i = e; | |
| 651 | - } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; | |
| 652 | - } catch (t) { | |
| 653 | - i = e, c = 1, u = t; | |
| 654 | - } finally { | |
| 655 | - f = 1; | |
| 656 | - } | |
| 657 | - } | |
| 658 | - return { | |
| 659 | - value: t, | |
| 660 | - done: y | |
| 661 | - }; | |
| 662 | - }; | |
| 663 | - }(r, o, i), !0), u; | |
| 664 | - } | |
| 665 | - var a = {}; | |
| 666 | - function Generator() {} | |
| 667 | - function GeneratorFunction() {} | |
| 668 | - function GeneratorFunctionPrototype() {} | |
| 669 | - t = Object.getPrototypeOf; | |
| 670 | - var c = [][n] ? t(t([][n]())) : (regeneratorDefine(t = {}, n, function() { | |
| 671 | - return this; | |
| 672 | - }), t); | |
| 673 | - var u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); | |
| 674 | - function f(e) { | |
| 675 | - return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; | |
| 676 | - } | |
| 677 | - 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() { | |
| 678 | - return this; | |
| 679 | - }), regeneratorDefine(u, "toString", function() { | |
| 680 | - return "[object Generator]"; | |
| 681 | - }), (module.exports = _regenerator = function _regenerator() { | |
| 682 | - return { | |
| 683 | - w: i, | |
| 684 | - m: f | |
| 685 | - }; | |
| 686 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); | |
| 687 | - } | |
| 688 | - module.exports = _regenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 689 | - })); | |
| 358 | +/***/ }), | |
| 690 | 359 | |
| 691 | -//#endregion | |
| 692 | -//#region node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js | |
| 693 | - var require_regeneratorAsyncIterator = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 694 | - var OverloadYield = require_OverloadYield(); | |
| 695 | - var regeneratorDefine = require_regeneratorDefine(); | |
| 696 | - function AsyncIterator(t, e) { | |
| 697 | - function n(r, o, i, f) { | |
| 698 | - try { | |
| 699 | - var c = t[r](o); | |
| 700 | - var u = c.value; | |
| 701 | - return u instanceof OverloadYield ? e.resolve(u.v).then(function(t) { | |
| 702 | - n("next", t, i, f); | |
| 703 | - }, function(t) { | |
| 704 | - n("throw", t, i, f); | |
| 705 | - }) : e.resolve(u).then(function(t) { | |
| 706 | - c.value = t, i(c); | |
| 707 | - }, function(t) { | |
| 708 | - return n("throw", t, i, f); | |
| 709 | - }); | |
| 710 | - } catch (t) { | |
| 711 | - f(t); | |
| 712 | - } | |
| 713 | - } | |
| 714 | - var r; | |
| 715 | - this.next || (regeneratorDefine(AsyncIterator.prototype), regeneratorDefine(AsyncIterator.prototype, "function" == typeof Symbol && Symbol.asyncIterator || "@asyncIterator", function() { | |
| 716 | - return this; | |
| 717 | - })), regeneratorDefine(this, "_invoke", function(t, o, i) { | |
| 718 | - function f() { | |
| 719 | - return new e(function(e, r) { | |
| 720 | - n(t, i, e, r); | |
| 721 | - }); | |
| 722 | - } | |
| 723 | - return r = r ? r.then(f, f) : f(); | |
| 724 | - }, !0); | |
| 725 | - } | |
| 726 | - module.exports = AsyncIterator, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 727 | - })); | |
| 360 | +/***/ "../node_modules/@babel/runtime/helpers/createClass.js": | |
| 361 | +/*!*************************************************************!*\ | |
| 362 | + !*** ../node_modules/@babel/runtime/helpers/createClass.js ***! | |
| 363 | + \*************************************************************/ | |
| 364 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 728 | 365 | |
| 729 | -//#endregion | |
| 730 | -//#region node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js | |
| 731 | - var require_regeneratorAsyncGen = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 732 | - var regenerator = require_regenerator$1(); | |
| 733 | - var regeneratorAsyncIterator = require_regeneratorAsyncIterator(); | |
| 734 | - function _regeneratorAsyncGen(r, e, t, o, n) { | |
| 735 | - return new regeneratorAsyncIterator(regenerator().w(r, e, t, o), n || Promise); | |
| 736 | - } | |
| 737 | - module.exports = _regeneratorAsyncGen, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 738 | - })); | |
| 366 | +var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); | |
| 367 | +function _defineProperties(e, r) { | |
| 368 | + for (var t = 0; t < r.length; t++) { | |
| 369 | + var o = r[t]; | |
| 370 | + o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o); | |
| 371 | + } | |
| 372 | +} | |
| 373 | +function _createClass(e, r, t) { | |
| 374 | + return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { | |
| 375 | + writable: !1 | |
| 376 | + }), e; | |
| 377 | +} | |
| 378 | +module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 739 | 379 | |
| 740 | -//#endregion | |
| 741 | -//#region node_modules/@babel/runtime/helpers/regeneratorAsync.js | |
| 742 | - var require_regeneratorAsync = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 743 | - var regeneratorAsyncGen = require_regeneratorAsyncGen(); | |
| 744 | - function _regeneratorAsync(n, e, r, t, o) { | |
| 745 | - var a = regeneratorAsyncGen(n, e, r, t, o); | |
| 746 | - return a.next().then(function(n) { | |
| 747 | - return n.done ? n.value : a.next(); | |
| 748 | - }); | |
| 749 | - } | |
| 750 | - module.exports = _regeneratorAsync, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 751 | - })); | |
| 380 | +/***/ }), | |
| 752 | 381 | |
| 753 | -//#endregion | |
| 754 | -//#region node_modules/@babel/runtime/helpers/regeneratorKeys.js | |
| 755 | - var require_regeneratorKeys = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 756 | - function _regeneratorKeys(e) { | |
| 757 | - var n = Object(e); | |
| 758 | - var r = []; | |
| 759 | - for (var t in n) r.unshift(t); | |
| 760 | - return function e() { | |
| 761 | - for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = !1, e; | |
| 762 | - return e.done = !0, e; | |
| 763 | - }; | |
| 764 | - } | |
| 765 | - module.exports = _regeneratorKeys, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 766 | - })); | |
| 382 | +/***/ "../node_modules/@babel/runtime/helpers/defineProperty.js": | |
| 383 | +/*!****************************************************************!*\ | |
| 384 | + !*** ../node_modules/@babel/runtime/helpers/defineProperty.js ***! | |
| 385 | + \****************************************************************/ | |
| 386 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 767 | 387 | |
| 768 | -//#endregion | |
| 769 | -//#region node_modules/@babel/runtime/helpers/typeof.js | |
| 770 | - var require_typeof = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 771 | - function _typeof(o) { | |
| 772 | - "@babel/helpers - typeof"; | |
| 773 | - return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) { | |
| 774 | - return typeof o; | |
| 775 | - } : function(o) { | |
| 776 | - return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; | |
| 777 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o); | |
| 778 | - } | |
| 779 | - module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 780 | - })); | |
| 388 | +var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); | |
| 389 | +function _defineProperty(e, r, t) { | |
| 390 | + return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, { | |
| 391 | + value: t, | |
| 392 | + enumerable: !0, | |
| 393 | + configurable: !0, | |
| 394 | + writable: !0 | |
| 395 | + }) : e[r] = t, e; | |
| 396 | +} | |
| 397 | +module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 781 | 398 | |
| 782 | -//#endregion | |
| 783 | -//#region node_modules/@babel/runtime/helpers/regeneratorValues.js | |
| 784 | - var require_regeneratorValues = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 785 | - var _typeof = require_typeof()["default"]; | |
| 786 | - function _regeneratorValues(e) { | |
| 787 | - if (null != e) { | |
| 788 | - var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"]; | |
| 789 | - var r = 0; | |
| 790 | - if (t) return t.call(e); | |
| 791 | - if ("function" == typeof e.next) return e; | |
| 792 | - if (!isNaN(e.length)) return { next: function next() { | |
| 793 | - return e && r >= e.length && (e = void 0), { | |
| 794 | - value: e && e[r++], | |
| 795 | - done: !e | |
| 796 | - }; | |
| 797 | - } }; | |
| 798 | - } | |
| 799 | - throw new TypeError(_typeof(e) + " is not iterable"); | |
| 800 | - } | |
| 801 | - module.exports = _regeneratorValues, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 802 | - })); | |
| 399 | +/***/ }), | |
| 803 | 400 | |
| 804 | -//#endregion | |
| 805 | -//#region node_modules/@babel/runtime/helpers/regeneratorRuntime.js | |
| 806 | - var require_regeneratorRuntime = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 807 | - var OverloadYield = require_OverloadYield(); | |
| 808 | - var regenerator = require_regenerator$1(); | |
| 809 | - var regeneratorAsync = require_regeneratorAsync(); | |
| 810 | - var regeneratorAsyncGen = require_regeneratorAsyncGen(); | |
| 811 | - var regeneratorAsyncIterator = require_regeneratorAsyncIterator(); | |
| 812 | - var regeneratorKeys = require_regeneratorKeys(); | |
| 813 | - var regeneratorValues = require_regeneratorValues(); | |
| 814 | - function _regeneratorRuntime() { | |
| 815 | - "use strict"; | |
| 816 | - var r = regenerator(); | |
| 817 | - var e = r.m(_regeneratorRuntime); | |
| 818 | - var t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor; | |
| 819 | - function n(r) { | |
| 820 | - var e = "function" == typeof r && r.constructor; | |
| 821 | - return !!e && (e === t || "GeneratorFunction" === (e.displayName || e.name)); | |
| 822 | - } | |
| 823 | - var o = { | |
| 824 | - "throw": 1, | |
| 825 | - "return": 2, | |
| 826 | - "break": 3, | |
| 827 | - "continue": 3 | |
| 828 | - }; | |
| 829 | - function a(r) { | |
| 830 | - var e; | |
| 831 | - var t; | |
| 832 | - return function(n) { | |
| 833 | - e || (e = { | |
| 834 | - stop: function stop() { | |
| 835 | - return t(n.a, 2); | |
| 836 | - }, | |
| 837 | - "catch": function _catch() { | |
| 838 | - return n.v; | |
| 839 | - }, | |
| 840 | - abrupt: function abrupt(r, e) { | |
| 841 | - return t(n.a, o[r], e); | |
| 842 | - }, | |
| 843 | - delegateYield: function delegateYield(r, o, a) { | |
| 844 | - return e.resultName = o, t(n.d, regeneratorValues(r), a); | |
| 845 | - }, | |
| 846 | - finish: function finish(r) { | |
| 847 | - return t(n.f, r); | |
| 848 | - } | |
| 849 | - }, t = function t(r, _t, o) { | |
| 850 | - n.p = e.prev, n.n = e.next; | |
| 851 | - try { | |
| 852 | - return r(_t, o); | |
| 853 | - } finally { | |
| 854 | - e.next = n.n; | |
| 855 | - } | |
| 856 | - }), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n; | |
| 857 | - try { | |
| 858 | - return r.call(this, e); | |
| 859 | - } finally { | |
| 860 | - n.p = e.prev, n.n = e.next; | |
| 861 | - } | |
| 862 | - }; | |
| 863 | - } | |
| 864 | - return (module.exports = _regeneratorRuntime = function _regeneratorRuntime() { | |
| 865 | - return { | |
| 866 | - wrap: function wrap(e, t, n, o) { | |
| 867 | - return r.w(a(e), t, n, o && o.reverse()); | |
| 868 | - }, | |
| 869 | - isGeneratorFunction: n, | |
| 870 | - mark: r.m, | |
| 871 | - awrap: function awrap(r, e) { | |
| 872 | - return new OverloadYield(r, e); | |
| 873 | - }, | |
| 874 | - AsyncIterator: regeneratorAsyncIterator, | |
| 875 | - async: function async(r, e, t, o, u) { | |
| 876 | - return (n(e) ? regeneratorAsyncGen : regeneratorAsync)(a(r), e, t, o, u); | |
| 877 | - }, | |
| 878 | - keys: regeneratorKeys, | |
| 879 | - values: regeneratorValues | |
| 880 | - }; | |
| 881 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); | |
| 882 | - } | |
| 883 | - module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 884 | - })); | |
| 401 | +/***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js": | |
| 402 | +/*!***********************************************************************!*\ | |
| 403 | + !*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***! | |
| 404 | + \***********************************************************************/ | |
| 405 | +/***/ ((module) => { | |
| 885 | 406 | |
| 886 | -//#endregion | |
| 887 | -//#region node_modules/@babel/runtime/regenerator/index.js | |
| 888 | - var require_regenerator = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 889 | - var runtime = require_regeneratorRuntime()(); | |
| 890 | - module.exports = runtime; | |
| 891 | - try { | |
| 892 | - regeneratorRuntime = runtime; | |
| 893 | - } catch (accidentalStrictMode) { | |
| 894 | - if (typeof globalThis === "object") globalThis.regeneratorRuntime = runtime; | |
| 895 | - else Function("r", "regeneratorRuntime = r")(runtime); | |
| 896 | - } | |
| 897 | - })); | |
| 407 | +function _interopRequireDefault(e) { | |
| 408 | + return e && e.__esModule ? e : { | |
| 409 | + "default": e | |
| 410 | + }; | |
| 411 | +} | |
| 412 | +module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 898 | 413 | |
| 899 | -//#endregion | |
| 900 | -//#region node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js | |
| 901 | -var import_regenerator = /* @__PURE__ */ __toESM(require_regenerator()); | |
| 902 | - function _assertThisInitialized(e) { | |
| 903 | - if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
| 904 | - return e; | |
| 905 | - } | |
| 414 | +/***/ }), | |
| 906 | 415 | |
| 907 | -//#endregion | |
| 908 | -//#region node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js | |
| 909 | - function _possibleConstructorReturn(t, e) { | |
| 910 | - if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; | |
| 911 | - if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); | |
| 912 | - return _assertThisInitialized(t); | |
| 913 | - } | |
| 416 | +/***/ "../node_modules/@babel/runtime/helpers/toPrimitive.js": | |
| 417 | +/*!*************************************************************!*\ | |
| 418 | + !*** ../node_modules/@babel/runtime/helpers/toPrimitive.js ***! | |
| 419 | + \*************************************************************/ | |
| 420 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 914 | 421 | |
| 915 | -//#endregion | |
| 916 | -//#region node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js | |
| 917 | - function _getPrototypeOf(t) { | |
| 918 | - return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) { | |
| 919 | - return t.__proto__ || Object.getPrototypeOf(t); | |
| 920 | - }, _getPrototypeOf(t); | |
| 921 | - } | |
| 422 | +var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 423 | +function toPrimitive(t, r) { | |
| 424 | + if ("object" != _typeof(t) || !t) return t; | |
| 425 | + var e = t[Symbol.toPrimitive]; | |
| 426 | + if (void 0 !== e) { | |
| 427 | + var i = e.call(t, r || "default"); | |
| 428 | + if ("object" != _typeof(i)) return i; | |
| 429 | + throw new TypeError("@@toPrimitive must return a primitive value."); | |
| 430 | + } | |
| 431 | + return ("string" === r ? String : Number)(t); | |
| 432 | +} | |
| 433 | +module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 922 | 434 | |
| 923 | -//#endregion | |
| 924 | -//#region node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js | |
| 925 | - function _setPrototypeOf(t, e) { | |
| 926 | - return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, e) { | |
| 927 | - return t.__proto__ = e, t; | |
| 928 | - }, _setPrototypeOf(t, e); | |
| 929 | - } | |
| 435 | +/***/ }), | |
| 930 | 436 | |
| 931 | -//#endregion | |
| 932 | -//#region node_modules/@babel/runtime/helpers/esm/inherits.js | |
| 933 | - function _inherits(t, e) { | |
| 934 | - if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); | |
| 935 | - t.prototype = Object.create(e && e.prototype, { constructor: { | |
| 936 | - value: t, | |
| 937 | - writable: !0, | |
| 938 | - configurable: !0 | |
| 939 | - } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); | |
| 940 | - } | |
| 437 | +/***/ "../node_modules/@babel/runtime/helpers/toPropertyKey.js": | |
| 438 | +/*!***************************************************************!*\ | |
| 439 | + !*** ../node_modules/@babel/runtime/helpers/toPropertyKey.js ***! | |
| 440 | + \***************************************************************/ | |
| 441 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 941 | 442 | |
| 942 | -//#endregion | |
| 943 | -//#region node_modules/@babel/runtime/helpers/esm/isNativeFunction.js | |
| 944 | - function _isNativeFunction(t) { | |
| 945 | - try { | |
| 946 | - return -1 !== Function.toString.call(t).indexOf("[native code]"); | |
| 947 | - } catch (n) { | |
| 948 | - return "function" == typeof t; | |
| 949 | - } | |
| 950 | - } | |
| 443 | +var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 444 | +var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ "../node_modules/@babel/runtime/helpers/toPrimitive.js"); | |
| 445 | +function toPropertyKey(t) { | |
| 446 | + var i = toPrimitive(t, "string"); | |
| 447 | + return "symbol" == _typeof(i) ? i : i + ""; | |
| 448 | +} | |
| 449 | +module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 951 | 450 | |
| 952 | -//#endregion | |
| 953 | -//#region node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js | |
| 954 | - function _isNativeReflectConstruct$1() { | |
| 955 | - try { | |
| 956 | - var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 957 | - } catch (t) {} | |
| 958 | - return (_isNativeReflectConstruct$1 = function _isNativeReflectConstruct() { | |
| 959 | - return !!t; | |
| 960 | - })(); | |
| 961 | - } | |
| 962 | - __name(_isNativeReflectConstruct$1, "_isNativeReflectConstruct"); | |
| 451 | +/***/ }), | |
| 963 | 452 | |
| 964 | -//#endregion | |
| 965 | -//#region node_modules/@babel/runtime/helpers/esm/construct.js | |
| 966 | - function _construct(t, e, r) { | |
| 967 | - if (_isNativeReflectConstruct$1()) return Reflect.construct.apply(null, arguments); | |
| 968 | - var o = [null]; | |
| 969 | - o.push.apply(o, e); | |
| 970 | - var p = new (t.bind.apply(t, o))(); | |
| 971 | - return r && _setPrototypeOf(p, r.prototype), p; | |
| 972 | - } | |
| 453 | +/***/ "../node_modules/@babel/runtime/helpers/typeof.js": | |
| 454 | +/*!********************************************************!*\ | |
| 455 | + !*** ../node_modules/@babel/runtime/helpers/typeof.js ***! | |
| 456 | + \********************************************************/ | |
| 457 | +/***/ ((module) => { | |
| 973 | 458 | |
| 974 | -//#endregion | |
| 975 | -//#region node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js | |
| 976 | - function _wrapNativeSuper(t) { | |
| 977 | - var r = "function" == typeof Map ? /* @__PURE__ */ new Map() : void 0; | |
| 978 | - return _wrapNativeSuper = function _wrapNativeSuper(t) { | |
| 979 | - if (null === t || !_isNativeFunction(t)) return t; | |
| 980 | - if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function"); | |
| 981 | - if (void 0 !== r) { | |
| 982 | - if (r.has(t)) return r.get(t); | |
| 983 | - r.set(t, Wrapper); | |
| 984 | - } | |
| 985 | - function Wrapper() { | |
| 986 | - return _construct(t, arguments, _getPrototypeOf(this).constructor); | |
| 987 | - } | |
| 988 | - return Wrapper.prototype = Object.create(t.prototype, { constructor: { | |
| 989 | - value: Wrapper, | |
| 990 | - enumerable: !1, | |
| 991 | - writable: !0, | |
| 992 | - configurable: !0 | |
| 993 | - } }), _setPrototypeOf(Wrapper, t); | |
| 994 | - }, _wrapNativeSuper(t); | |
| 995 | - } | |
| 459 | +function _typeof(o) { | |
| 460 | + "@babel/helpers - typeof"; | |
| 996 | 461 | |
| 997 | -//#endregion | |
| 998 | -//#region app/modules/import-export-customization/assets/js/shared/error/import-export-error.js | |
| 999 | - function _callSuper(t, o, e) { | |
| 1000 | - return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 1001 | - } | |
| 1002 | - function _isNativeReflectConstruct() { | |
| 1003 | - try { | |
| 1004 | - var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 1005 | - } catch (t) {} | |
| 1006 | - return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { | |
| 1007 | - return !!t; | |
| 1008 | - })(); | |
| 1009 | - } | |
| 1010 | - var ImportExportError = /*#__PURE__*/ function(_Error) { | |
| 1011 | - function ImportExportError(errorMessage, errorCode) { | |
| 1012 | - var _this; | |
| 1013 | - _classCallCheck(this, ImportExportError); | |
| 1014 | - _this = _callSuper(this, ImportExportError, ["string" === typeof errorMessage ? errorMessage : ""]); | |
| 1015 | - _this.code = errorCode || "general"; | |
| 1016 | - _this.details = errorMessage; | |
| 1017 | - return _this; | |
| 1018 | - } | |
| 1019 | - _inherits(ImportExportError, _Error); | |
| 1020 | - return _createClass(ImportExportError); | |
| 1021 | - }(/*#__PURE__*/ _wrapNativeSuper(Error)); | |
| 462 | + return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { | |
| 463 | + return typeof o; | |
| 464 | + } : function (o) { | |
| 465 | + return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; | |
| 466 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o); | |
| 467 | +} | |
| 468 | +module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1022 | 469 | |
| 1023 | -//#endregion | |
| 1024 | -//#region app/modules/import-export-customization/assets/js/shared/utils/api-fetch-config.js | |
| 1025 | - var isApiConfigured = false; | |
| 1026 | - function configureApiFetch() { | |
| 1027 | - var _window$elementorAppC; | |
| 1028 | - if (isApiConfigured) return; | |
| 1029 | - var config = (_window$elementorAppC = window.elementorAppConfig) === null || _window$elementorAppC === void 0 ? void 0 : _window$elementorAppC["import-export-customization"]; | |
| 1030 | - if (!config) throw new ImportExportError("Configuration not found. Please refresh the page.", "config_missing"); | |
| 1031 | - if (config.restNonce) _wordpress_api_fetch.default.use(_wordpress_api_fetch.default.createNonceMiddleware(config.restNonce)); | |
| 1032 | - if (config.restUrl) _wordpress_api_fetch.default.use(_wordpress_api_fetch.default.createRootURLMiddleware(config.restUrl)); | |
| 1033 | - isApiConfigured = true; | |
| 1034 | - } | |
| 470 | +/***/ }) | |
| 1035 | 471 | |
| 1036 | -//#endregion | |
| 1037 | -//#region app/modules/import-export-customization/assets/js/shared/utils/api-request.js | |
| 1038 | - var HTTP_STATUS = { REQUEST_TIMEOUT: 408 }; | |
| 1039 | - var HTTP_METHODS = { CREATABLE: "POST" }; | |
| 1040 | - function apiRequest(_x) { | |
| 1041 | - return _apiRequest.apply(this, arguments); | |
| 1042 | - } | |
| 1043 | - function _apiRequest() { | |
| 1044 | - _apiRequest = _asyncToGenerator(/*#__PURE__*/ import_regenerator.default.mark(function _callee(_ref) { | |
| 1045 | - var _ref$data; | |
| 1046 | - var data; | |
| 1047 | - var path; | |
| 1048 | - var _ref$method; | |
| 1049 | - var method; | |
| 1050 | - var requestOptions; | |
| 1051 | - var _t; | |
| 1052 | - return import_regenerator.default.wrap(function(_context) { | |
| 1053 | - while (1) switch (_context.prev = _context.next) { | |
| 1054 | - case 0: | |
| 1055 | - _ref$data = _ref.data, data = _ref$data === void 0 ? null : _ref$data, path = _ref.path, _ref$method = _ref.method, method = _ref$method === void 0 ? HTTP_METHODS.CREATABLE : _ref$method; | |
| 1056 | - configureApiFetch(); | |
| 1057 | - _context.prev = 1; | |
| 1058 | - requestOptions = { | |
| 1059 | - path: "/elementor/v1/import-export-customization/".concat(path), | |
| 1060 | - method | |
| 1061 | - }; | |
| 1062 | - if (data && HTTP_METHODS.CREATABLE === method) requestOptions.data = data; | |
| 1063 | - _context.next = 2; | |
| 1064 | - return (0, _wordpress_api_fetch.default)(requestOptions); | |
| 1065 | - case 2: return _context.abrupt("return", _context.sent); | |
| 1066 | - case 3: | |
| 1067 | - _context.prev = 3; | |
| 1068 | - _t = _context["catch"](1); | |
| 1069 | - handleApiFetchError(_t); | |
| 1070 | - case 4: | |
| 1071 | - case "end": return _context.stop(); | |
| 1072 | - } | |
| 1073 | - }, _callee, null, [[1, 3]]); | |
| 1074 | - })); | |
| 1075 | - return _apiRequest.apply(this, arguments); | |
| 1076 | - } | |
| 1077 | - function handleApiFetchError(error) { | |
| 1078 | - var errorMessage = (error === null || error === void 0 ? void 0 : error.message) || "An unknown error occurred"; | |
| 1079 | - var errorCode = "general"; | |
| 1080 | - if (error !== null && error !== void 0 && error.code) errorCode = error.code; | |
| 1081 | - else if (error !== null && error !== void 0 && error.status) errorCode = HTTP_STATUS.REQUEST_TIMEOUT === error.status ? "timeout" : error.status; | |
| 1082 | - throw new ImportExportError(errorMessage, errorCode); | |
| 1083 | - } | |
| 472 | +/******/ }); | |
| 473 | +/************************************************************************/ | |
| 474 | +/******/ // The module cache | |
| 475 | +/******/ var __webpack_module_cache__ = {}; | |
| 476 | +/******/ | |
| 477 | +/******/ // The require function | |
| 478 | +/******/ function __webpack_require__(moduleId) { | |
| 479 | +/******/ // Check if module is in cache | |
| 480 | +/******/ var cachedModule = __webpack_module_cache__[moduleId]; | |
| 481 | +/******/ if (cachedModule !== undefined) { | |
| 482 | +/******/ return cachedModule.exports; | |
| 483 | +/******/ } | |
| 484 | +/******/ // Create a new module (and put it into the cache) | |
| 485 | +/******/ var module = __webpack_module_cache__[moduleId] = { | |
| 486 | +/******/ // no module.id needed | |
| 487 | +/******/ // no module.loaded needed | |
| 488 | +/******/ exports: {} | |
| 489 | +/******/ }; | |
| 490 | +/******/ | |
| 491 | +/******/ // Execute the module function | |
| 492 | +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); | |
| 493 | +/******/ | |
| 494 | +/******/ // Return the exports of the module | |
| 495 | +/******/ return module.exports; | |
| 496 | +/******/ } | |
| 497 | +/******/ | |
| 498 | +/************************************************************************/ | |
| 499 | +var __webpack_exports__ = {}; | |
| 500 | +// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. | |
| 501 | +(() => { | |
| 502 | +"use strict"; | |
| 503 | +/*!*********************************************************************!*\ | |
| 504 | + !*** ../app/modules/import-export-customization/assets/js/admin.js ***! | |
| 505 | + \*********************************************************************/ | |
| 1084 | 506 | |
| 1085 | -//#endregion | |
| 1086 | -//#region app/modules/import-export-customization/assets/js/shared/revert-kit-handler.js | |
| 1087 | - var RevertKitHandler = /*#__PURE__*/ function() { | |
| 1088 | - function RevertKitHandler() { | |
| 1089 | - var _ref = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; | |
| 1090 | - var revertButton = _ref.revertButton; | |
| 1091 | - var onError = _ref.onError; | |
| 1092 | - _classCallCheck(this, RevertKitHandler); | |
| 1093 | - this.revertButton = revertButton; | |
| 1094 | - this.onError = onError || this.defaultErrorHandler.bind(this); | |
| 1095 | - } | |
| 1096 | - return _createClass(RevertKitHandler, [ | |
| 1097 | - { | |
| 1098 | - key: "revertKit", | |
| 1099 | - value: function() { | |
| 1100 | - var _revertKit = _asyncToGenerator(/*#__PURE__*/ import_regenerator.default.mark(function _callee() { | |
| 1101 | - var activeKitName; | |
| 1102 | - var confirmed; | |
| 1103 | - var referrerKitId; | |
| 1104 | - var returnTo; | |
| 1105 | - var noAutomaticRedirect; | |
| 1106 | - var _yield$this$callRever; | |
| 1107 | - var data; | |
| 1108 | - var _t; | |
| 1109 | - return import_regenerator.default.wrap(function(_context) { | |
| 1110 | - while (1) switch (_context.prev = _context.next) { | |
| 1111 | - case 0: | |
| 1112 | - activeKitName = this.getActiveKitName(); | |
| 1113 | - _context.next = 1; | |
| 1114 | - return this.showConfirmationDialog(activeKitName); | |
| 1115 | - case 1: | |
| 1116 | - confirmed = _context.sent; | |
| 1117 | - if (confirmed) { | |
| 1118 | - _context.next = 2; | |
| 1119 | - break; | |
| 1120 | - } | |
| 1121 | - return _context.abrupt("return"); | |
| 1122 | - case 2: | |
| 1123 | - _context.prev = 2; | |
| 1124 | - referrerKitId = this.getReferrerKitId(); | |
| 1125 | - returnTo = this.getReturnTo(); | |
| 1126 | - noAutomaticRedirect = this.getNoAutomaticRedirect(); | |
| 1127 | - this.saveToCache(referrerKitId, activeKitName, returnTo, noAutomaticRedirect); | |
| 1128 | - _context.next = 3; | |
| 1129 | - return this.callRevertAPI(); | |
| 1130 | - case 3: | |
| 1131 | - _yield$this$callRever = _context.sent; | |
| 1132 | - data = _yield$this$callRever.data; | |
| 1133 | - this.handleRevertResponse(data); | |
| 1134 | - _context.next = 5; | |
| 1135 | - break; | |
| 1136 | - case 4: | |
| 1137 | - _context.prev = 4; | |
| 1138 | - _t = _context["catch"](2); | |
| 1139 | - this.onError(_t); | |
| 1140 | - case 5: | |
| 1141 | - case "end": return _context.stop(); | |
| 1142 | - } | |
| 1143 | - }, _callee, this, [[2, 4]]); | |
| 1144 | - })); | |
| 1145 | - function revertKit() { | |
| 1146 | - return _revertKit.apply(this, arguments); | |
| 1147 | - } | |
| 1148 | - return revertKit; | |
| 1149 | - }() | |
| 1150 | - }, | |
| 1151 | - { | |
| 1152 | - key: "callRevertAPI", | |
| 1153 | - value: function() { | |
| 1154 | - var _callRevertAPI = _asyncToGenerator(/*#__PURE__*/ import_regenerator.default.mark(function _callee2() { | |
| 1155 | - var result; | |
| 1156 | - return import_regenerator.default.wrap(function(_context2) { | |
| 1157 | - while (1) switch (_context2.prev = _context2.next) { | |
| 1158 | - case 0: | |
| 1159 | - _context2.next = 1; | |
| 1160 | - return apiRequest({ path: RevertKitHandler.API_PATH }); | |
| 1161 | - case 1: | |
| 1162 | - result = _context2.sent; | |
| 1163 | - return _context2.abrupt("return", result); | |
| 1164 | - case 2: | |
| 1165 | - case "end": return _context2.stop(); | |
| 1166 | - } | |
| 1167 | - }, _callee2); | |
| 1168 | - })); | |
| 1169 | - function callRevertAPI() { | |
| 1170 | - return _callRevertAPI.apply(this, arguments); | |
| 1171 | - } | |
| 1172 | - return callRevertAPI; | |
| 1173 | - }() | |
| 1174 | - }, | |
| 1175 | - { | |
| 1176 | - key: "handleRevertResponse", | |
| 1177 | - value: function handleRevertResponse(data) { | |
| 1178 | - if (!data.revert_completed) { | |
| 1179 | - this.handleRevertNoSessions(data); | |
| 1180 | - return; | |
| 1181 | - } | |
| 1182 | - this.showRevertCompletedDialog(data); | |
| 1183 | - } | |
| 1184 | - }, | |
| 1185 | - { | |
| 1186 | - key: "showRevertCompletedDialog", | |
| 1187 | - value: function showRevertCompletedDialog() { | |
| 1188 | - var referrerKitId = this.getReferrerKitId(); | |
| 1189 | - if (referrerKitId) { | |
| 1190 | - this.showReferrerKitDialog(referrerKitId); | |
| 1191 | - return; | |
| 1192 | - } | |
| 1193 | - this.showRevertSuccessDialog(); | |
| 1194 | - } | |
| 1195 | - }, | |
| 1196 | - { | |
| 1197 | - key: "handleRevertNoSessions", | |
| 1198 | - value: function handleRevertNoSessions(responseData) { | |
| 1199 | - elementorCommon.dialogsManager.createWidget("alert", { message: responseData.message || (0, _wordpress_i18n.__)("No import sessions available to revert.", "elementor") }).show(); | |
| 1200 | - } | |
| 1201 | - }, | |
| 1202 | - { | |
| 1203 | - key: "showConfirmationDialog", | |
| 1204 | - value: function() { | |
| 1205 | - var _showConfirmationDialog = _asyncToGenerator(/*#__PURE__*/ import_regenerator.default.mark(function _callee3(activeKitName) { | |
| 1206 | - return import_regenerator.default.wrap(function(_context3) { | |
| 1207 | - while (1) switch (_context3.prev = _context3.next) { | |
| 1208 | - case 0: return _context3.abrupt("return", new Promise(function(resolve) { | |
| 1209 | - elementorCommon.dialogsManager.createWidget("confirm", { | |
| 1210 | - headerMessage: (0, _wordpress_i18n.__)("Are you sure?", "elementor"), | |
| 1211 | - message: (0, _wordpress_i18n.__)("Removing %s will permanently delete changes made to the Website Template's content and site settings", "elementor").replace("%s", activeKitName), | |
| 1212 | - strings: { | |
| 1213 | - confirm: (0, _wordpress_i18n.__)("Delete", "elementor"), | |
| 1214 | - cancel: (0, _wordpress_i18n.__)("Cancel", "elementor") | |
| 1215 | - }, | |
| 1216 | - onConfirm: function onConfirm() { | |
| 1217 | - return resolve(true); | |
| 1218 | - }, | |
| 1219 | - onCancel: function onCancel() { | |
| 1220 | - return resolve(false); | |
| 1221 | - } | |
| 1222 | - }).show(); | |
| 1223 | - })); | |
| 1224 | - case 1: | |
| 1225 | - case "end": return _context3.stop(); | |
| 1226 | - } | |
| 1227 | - }, _callee3); | |
| 1228 | - })); | |
| 1229 | - function showConfirmationDialog(_x) { | |
| 1230 | - return _showConfirmationDialog.apply(this, arguments); | |
| 1231 | - } | |
| 1232 | - return showConfirmationDialog; | |
| 1233 | - }() | |
| 1234 | - }, | |
| 1235 | - { | |
| 1236 | - key: "createSuccessHeaderMessage", | |
| 1237 | - value: function createSuccessHeaderMessage() { | |
| 1238 | - var activeKitName = this.getDataFromCache().activeKitName; | |
| 1239 | - return (0, _wordpress_i18n.__)("%s was successfully deleted", "elementor").replace("%s", activeKitName); | |
| 1240 | - } | |
| 1241 | - }, | |
| 1242 | - { | |
| 1243 | - key: "showRevertSuccessDialog", | |
| 1244 | - value: function showRevertSuccessDialog() { | |
| 1245 | - elementorCommon.dialogsManager.createWidget("confirm", { | |
| 1246 | - id: RevertKitHandler.DIALOG_ID, | |
| 1247 | - headerMessage: this.createSuccessHeaderMessage(), | |
| 1248 | - message: (0, _wordpress_i18n.__)("Try a different Website Template or build your site from scratch.", "elementor"), | |
| 1249 | - strings: { | |
| 1250 | - confirm: (0, _wordpress_i18n.__)("OK", "elementor"), | |
| 1251 | - cancel: (0, _wordpress_i18n.__)("Library", "elementor") | |
| 1252 | - }, | |
| 1253 | - onConfirm: function onConfirm() { | |
| 1254 | - location.reload(); | |
| 1255 | - }, | |
| 1256 | - onCancel: function onCancel() { | |
| 1257 | - location.href = elementorImportExport.appUrl; | |
| 1258 | - } | |
| 1259 | - }).show(); | |
| 1260 | - this.clearCache(); | |
| 1261 | - } | |
| 1262 | - }, | |
| 1263 | - { | |
| 1264 | - key: "showReferrerKitDialog", | |
| 1265 | - value: function showReferrerKitDialog(referrerKitId) { | |
| 1266 | - var _this = this; | |
| 1267 | - var _this$getDataFromCach2 = this.getDataFromCache(); | |
| 1268 | - var returnTo = _this$getDataFromCach2.returnTo; | |
| 1269 | - var noAutomaticRedirect = _this$getDataFromCach2.noAutomaticRedirect; | |
| 1270 | - elementorCommon.dialogsManager.createWidget("confirm", { | |
| 1271 | - id: RevertKitHandler.DIALOG_ID, | |
| 1272 | - headerMessage: this.createSuccessHeaderMessage(), | |
| 1273 | - message: (0, _wordpress_i18n.__)("You're ready to apply a new Kit!", "elementor"), | |
| 1274 | - strings: { | |
| 1275 | - confirm: (0, _wordpress_i18n.__)("Continue to new Kit", "elementor"), | |
| 1276 | - cancel: (0, _wordpress_i18n.__)("Close", "elementor") | |
| 1277 | - }, | |
| 1278 | - onConfirm: function onConfirm() { | |
| 1279 | - location.href = _this.buildPreviewUrl(referrerKitId, returnTo, noAutomaticRedirect); | |
| 1280 | - }, | |
| 1281 | - onCancel: function onCancel() { | |
| 1282 | - location.reload(); | |
| 1283 | - } | |
| 1284 | - }).show(); | |
| 1285 | - this.clearCache(); | |
| 1286 | - } | |
| 1287 | - }, | |
| 1288 | - { | |
| 1289 | - key: "buildPreviewUrl", | |
| 1290 | - value: function buildPreviewUrl(referrerKitId, returnTo, noAutomaticRedirect) { | |
| 1291 | - var baseUrl = elementorImportExport.appUrl + "/preview/" + referrerKitId; | |
| 1292 | - var url = new URL(baseUrl); | |
| 1293 | - if (returnTo) url.searchParams.append(RevertKitHandler.URL_PARAM_RETURN_TO, returnTo); | |
| 1294 | - if (noAutomaticRedirect) url.searchParams.append(RevertKitHandler.URL_PARAM_NO_AUTOMATIC_REDIRECT, noAutomaticRedirect); | |
| 1295 | - return url.toString(); | |
| 1296 | - } | |
| 1297 | - }, | |
| 1298 | - { | |
| 1299 | - key: "maybeShowReferrerKitDialog", | |
| 1300 | - value: function maybeShowReferrerKitDialog() { | |
| 1301 | - var referrerKitId = this.getDataFromCache().referrerKitId; | |
| 1302 | - if (void 0 === referrerKitId) return; | |
| 1303 | - if (0 === referrerKitId.length) { | |
| 1304 | - this.showRevertSuccessDialog(); | |
| 1305 | - return; | |
| 1306 | - } | |
| 1307 | - this.showReferrerKitDialog(referrerKitId); | |
| 1308 | - } | |
| 1309 | - }, | |
| 1310 | - { | |
| 1311 | - key: "getActiveKitName", | |
| 1312 | - value: function getActiveKitName() { | |
| 1313 | - var lastKit = elementorImportExport.lastImportedSession; | |
| 1314 | - if (lastKit.kit_title) return lastKit.kit_title; | |
| 1315 | - if (lastKit.kit_name) return this.convertNameToTitle(lastKit.kit_name); | |
| 1316 | - return (0, _wordpress_i18n.__)("Your Kit", "elementor"); | |
| 1317 | - } | |
| 1318 | - }, | |
| 1319 | - { | |
| 1320 | - key: "convertNameToTitle", | |
| 1321 | - value: function convertNameToTitle(name) { | |
| 1322 | - var words = name.split(RevertKitHandler.NAME_SEPARATOR_PATTERN).filter(function(word) { | |
| 1323 | - return word.length > 0; | |
| 1324 | - }); | |
| 1325 | - if (0 === words.length) return (0, _wordpress_i18n.__)("Your Kit", "elementor"); | |
| 1326 | - return words.map(function(word) { | |
| 1327 | - return word[0].toUpperCase() + word.substring(1); | |
| 1328 | - }).join(" "); | |
| 1329 | - } | |
| 1330 | - }, | |
| 1331 | - { | |
| 1332 | - key: "getReferrerKitId", | |
| 1333 | - value: function getReferrerKitId() { | |
| 1334 | - var pageReferrerKit = new URLSearchParams(window.location.search).get(RevertKitHandler.URL_PARAM_REFERRER_KIT); | |
| 1335 | - if (pageReferrerKit) return pageReferrerKit; | |
| 1336 | - if (!this.revertButton) return ""; | |
| 1337 | - return new URL(this.revertButton.href).searchParams.get(RevertKitHandler.URL_PARAM_REFERRER_KIT) || ""; | |
| 1338 | - } | |
| 1339 | - }, | |
| 1340 | - { | |
| 1341 | - key: "getReturnTo", | |
| 1342 | - value: function getReturnTo() { | |
| 1343 | - return new URLSearchParams(window.location.search).get(RevertKitHandler.URL_PARAM_RETURN_TO) || ""; | |
| 1344 | - } | |
| 1345 | - }, | |
| 1346 | - { | |
| 1347 | - key: "getNoAutomaticRedirect", | |
| 1348 | - value: function getNoAutomaticRedirect() { | |
| 1349 | - return new URLSearchParams(window.location.search).get(RevertKitHandler.URL_PARAM_NO_AUTOMATIC_REDIRECT) || ""; | |
| 1350 | - } | |
| 1351 | - }, | |
| 1352 | - { | |
| 1353 | - key: "saveToCache", | |
| 1354 | - value: function saveToCache(referrerKitId, activeKitName, returnTo, noAutomaticRedirect) { | |
| 1355 | - sessionStorage.setItem(RevertKitHandler.KIT_DATA_KEY, JSON.stringify({ | |
| 1356 | - referrerKitId: referrerKitId || "", | |
| 1357 | - activeKitName: activeKitName || "", | |
| 1358 | - returnTo: returnTo || "", | |
| 1359 | - noAutomaticRedirect: noAutomaticRedirect || "" | |
| 1360 | - })); | |
| 1361 | - } | |
| 1362 | - }, | |
| 1363 | - { | |
| 1364 | - key: "getDataFromCache", | |
| 1365 | - value: function getDataFromCache() { | |
| 1366 | - try { | |
| 1367 | - return JSON.parse(sessionStorage.getItem(RevertKitHandler.KIT_DATA_KEY)) || {}; | |
| 1368 | - } catch (e) { | |
| 1369 | - return {}; | |
| 1370 | - } | |
| 1371 | - } | |
| 1372 | - }, | |
| 1373 | - { | |
| 1374 | - key: "clearCache", | |
| 1375 | - value: function clearCache() { | |
| 1376 | - sessionStorage.removeItem(RevertKitHandler.KIT_DATA_KEY); | |
| 1377 | - } | |
| 1378 | - }, | |
| 1379 | - { | |
| 1380 | - key: "defaultErrorHandler", | |
| 1381 | - value: function defaultErrorHandler() { | |
| 1382 | - elementorCommon.dialogsManager.createWidget("alert", { message: (0, _wordpress_i18n.__)("An error occurred while reverting the kit. Please try again.", "elementor") }).show(); | |
| 1383 | - } | |
| 1384 | - } | |
| 1385 | - ]); | |
| 1386 | - }(); | |
| 1387 | - _defineProperty(RevertKitHandler, "API_PATH", "revert"); | |
| 1388 | - _defineProperty(RevertKitHandler, "DIALOG_ID", "e-revert-kit-deleted-dialog"); | |
| 1389 | - _defineProperty(RevertKitHandler, "URL_PARAM_REFERRER_KIT", "referrer_kit"); | |
| 1390 | - _defineProperty(RevertKitHandler, "URL_PARAM_RETURN_TO", "return_to"); | |
| 1391 | - _defineProperty(RevertKitHandler, "URL_PARAM_NO_AUTOMATIC_REDIRECT", "no_automatic_redirect"); | |
| 1392 | - _defineProperty(RevertKitHandler, "KIT_DATA_KEY", "elementor-kit-data"); | |
| 1393 | - _defineProperty(RevertKitHandler, "NAME_SEPARATOR_PATTERN", /[-_]+/); | |
| 1394 | 507 | |
| 1395 | -//#endregion | |
| 1396 | -//#region app/modules/import-export-customization/assets/js/admin.js | |
| 1397 | - var Admin = /*#__PURE__*/ function() { | |
| 1398 | - function Admin() { | |
| 1399 | - var _this = this; | |
| 1400 | - _classCallCheck(this, Admin); | |
| 1401 | - if ("elementor-tools" === new URLSearchParams(window.location.search).get("page")) { | |
| 1402 | - this.sendPageToolsViewedEvent(); | |
| 1403 | - elementorAdmin.elements.$settingsTabs.on("focus", function() { | |
| 1404 | - var location = window.location.hash.slice(1); | |
| 1405 | - _this.maybeSendImportExportLocationEvent(location); | |
| 1406 | - }); | |
| 1407 | - this.maybeSendImportExportLocationEvent(window.location.hash.slice(1)); | |
| 1408 | - } | |
| 1409 | - this.revertButton = document.getElementById("elementor-import-export__revert_kit"); | |
| 1410 | - this.importFroLibraryButton = document.getElementById("elementor-import-export__import_from_library"); | |
| 1411 | - this.importButton = document.getElementById("elementor-import-export__import"); | |
| 1412 | - this.exportButton = document.getElementById("elementor-import-export__export"); | |
| 1413 | - this.initializeRevertHandler(); | |
| 1414 | - this.bindEventListeners(); | |
| 1415 | - } | |
| 1416 | - return _createClass(Admin, [ | |
| 1417 | - { | |
| 1418 | - key: "initializeRevertHandler", | |
| 1419 | - value: function initializeRevertHandler() { | |
| 1420 | - if (this.revertButton) { | |
| 1421 | - this.revertHandler = new RevertKitHandler({ revertButton: this.revertButton }); | |
| 1422 | - this.revertHandler.maybeShowReferrerKitDialog(); | |
| 1423 | - } | |
| 1424 | - } | |
| 1425 | - }, | |
| 1426 | - { | |
| 1427 | - key: "bindEventListeners", | |
| 1428 | - value: function bindEventListeners() { | |
| 1429 | - if (this.revertButton) this.revertButton.addEventListener("click", this.onRevertButtonClick.bind(this)); | |
| 1430 | - if (this.importFroLibraryButton) this.importFroLibraryButton.addEventListener("click", this.onImportFromLibraryButtonClick.bind(this)); | |
| 1431 | - if (this.importButton) this.importButton.addEventListener("click", this.onImportButtonClick.bind(this)); | |
| 1432 | - if (this.exportButton) this.exportButton.addEventListener("click", this.onExportButtonClick.bind(this)); | |
| 1433 | - } | |
| 1434 | - }, | |
| 1435 | - { | |
| 1436 | - key: "sendPageToolsViewedEvent", | |
| 1437 | - value: function sendPageToolsViewedEvent() { | |
| 1438 | - AppsEventTracking.sendPageViewsWebsiteTemplates(elementorCommon.eventsManager.config.secondaryLocations.admin.pluginToolsTab); | |
| 1439 | - } | |
| 1440 | - }, | |
| 1441 | - { | |
| 1442 | - key: "maybeSendImportExportLocationEvent", | |
| 1443 | - value: function maybeSendImportExportLocationEvent(location) { | |
| 1444 | - if ("tab-import-export-kit" === location) AppsEventTracking.sendPageViewsWebsiteTemplates(elementorCommon.eventsManager.config.secondaryLocations.admin.pluginWebsiteTemplatesTab); | |
| 1445 | - } | |
| 1446 | - }, | |
| 1447 | - { | |
| 1448 | - key: "onRevertButtonClick", | |
| 1449 | - value: function onRevertButtonClick(event) { | |
| 1450 | - var _this$revertHandler; | |
| 1451 | - event.preventDefault(); | |
| 1452 | - AppsEventTracking.sendImportExportAdminAction("Revert"); | |
| 1453 | - (_this$revertHandler = this.revertHandler) === null || _this$revertHandler === void 0 || _this$revertHandler.revertKit(); | |
| 1454 | - } | |
| 1455 | - }, | |
| 1456 | - { | |
| 1457 | - key: "onExportButtonClick", | |
| 1458 | - value: function onExportButtonClick() { | |
| 1459 | - AppsEventTracking.sendImportExportAdminAction("Export"); | |
| 1460 | - } | |
| 1461 | - }, | |
| 1462 | - { | |
| 1463 | - key: "onImportButtonClick", | |
| 1464 | - value: function onImportButtonClick() { | |
| 1465 | - AppsEventTracking.sendImportExportAdminAction("Import"); | |
| 1466 | - } | |
| 1467 | - }, | |
| 1468 | - { | |
| 1469 | - key: "onImportFromLibraryButtonClick", | |
| 1470 | - value: function onImportFromLibraryButtonClick() { | |
| 1471 | - AppsEventTracking.sendImportExportAdminAction("Import from Library"); | |
| 1472 | - } | |
| 1473 | - } | |
| 1474 | - ]); | |
| 1475 | - }(); | |
| 1476 | - window.addEventListener("load", function() { | |
| 1477 | - new Admin(); | |
| 1478 | - }); | |
| 508 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 509 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 510 | +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 511 | +var _appsEventTracking = __webpack_require__(/*! ../../../../assets/js/event-track/apps-event-tracking */ "../app/assets/js/event-track/apps-event-tracking.js"); | |
| 512 | +var Admin = /*#__PURE__*/function () { | |
| 513 | + function Admin() { | |
| 514 | + var _this = this; | |
| 515 | + (0, _classCallCheck2.default)(this, Admin); | |
| 516 | + var urlParams = new URLSearchParams(window.location.search); | |
| 517 | + if ('elementor-tools' === urlParams.get('page')) { | |
| 518 | + this.sendPageToolsViewedEvent(); | |
| 519 | + elementorAdmin.elements.$settingsTabs.on('focus', function () { | |
| 520 | + var location = window.location.hash.slice(1); | |
| 521 | + _this.maybeSendImportExportLocationEvent(location); | |
| 522 | + }); | |
| 523 | + this.maybeSendImportExportLocationEvent(window.location.hash.slice(1)); | |
| 524 | + } | |
| 525 | + this.revertButton = document.getElementById('elementor-import-export__revert_kit'); | |
| 526 | + this.importFroLibraryButton = document.getElementById('elementor-import-export__import_from_library'); | |
| 527 | + this.importButton = document.getElementById('elementor-import-export__import'); | |
| 528 | + this.exportButton = document.getElementById('elementor-import-export__export'); | |
| 529 | + if (this.revertButton) { | |
| 530 | + this.revertButton.addEventListener('click', this.onRevertButtonClick.bind(this)); | |
| 531 | + } | |
| 532 | + if (this.importFroLibraryButton) { | |
| 533 | + this.importFroLibraryButton.addEventListener('click', this.onImportFromLibraryButtonClick.bind(this)); | |
| 534 | + } | |
| 535 | + if (this.importButton) { | |
| 536 | + this.importButton.addEventListener('click', this.onImportButtonClick.bind(this)); | |
| 537 | + } | |
| 538 | + if (this.exportButton) { | |
| 539 | + this.exportButton.addEventListener('click', this.onExportButtonClick.bind(this)); | |
| 540 | + } | |
| 541 | + } | |
| 542 | + return (0, _createClass2.default)(Admin, [{ | |
| 543 | + key: "sendPageToolsViewedEvent", | |
| 544 | + value: function sendPageToolsViewedEvent() { | |
| 545 | + _appsEventTracking.AppsEventTracking.sendPageViewsWebsiteTemplates(elementorCommon.eventsManager.config.secondaryLocations.admin.pluginToolsTab); | |
| 546 | + } | |
| 547 | + }, { | |
| 548 | + key: "maybeSendImportExportLocationEvent", | |
| 549 | + value: function maybeSendImportExportLocationEvent(location) { | |
| 550 | + if ('tab-import-export-kit' === location) { | |
| 551 | + _appsEventTracking.AppsEventTracking.sendPageViewsWebsiteTemplates(elementorCommon.eventsManager.config.secondaryLocations.admin.pluginWebsiteTemplatesTab); | |
| 552 | + } | |
| 553 | + } | |
| 554 | + }, { | |
| 555 | + key: "onRevertButtonClick", | |
| 556 | + value: function onRevertButtonClick() { | |
| 557 | + _appsEventTracking.AppsEventTracking.sendImportExportAdminAction('Revert'); | |
| 558 | + } | |
| 559 | + }, { | |
| 560 | + key: "onExportButtonClick", | |
| 561 | + value: function onExportButtonClick() { | |
| 562 | + _appsEventTracking.AppsEventTracking.sendImportExportAdminAction('Export'); | |
| 563 | + } | |
| 564 | + }, { | |
| 565 | + key: "onImportButtonClick", | |
| 566 | + value: function onImportButtonClick() { | |
| 567 | + _appsEventTracking.AppsEventTracking.sendImportExportAdminAction('Import'); | |
| 568 | + } | |
| 569 | + }, { | |
| 570 | + key: "onImportFromLibraryButtonClick", | |
| 571 | + value: function onImportFromLibraryButtonClick() { | |
| 572 | + _appsEventTracking.AppsEventTracking.sendImportExportAdminAction('Import from Library'); | |
| 573 | + } | |
| 574 | + }]); | |
| 575 | +}(); | |
| 576 | +window.addEventListener('load', function () { | |
| 577 | + new Admin(); | |
| 578 | +}); | |
| 579 | +})(); | |
| 1479 | 580 | |
| 1480 | -//#endregion | |
| 1481 | -})(wp.i18n, wp.apiFetch); | |
| 581 | +/******/ })() | |
| 582 | +; | |
| 1482 | 583 | //# sourceMappingURL=import-export-customization-admin.js.map |