| @@ -1,253 +1,428 @@ | ||
| 1 | -(function() { | |
| 1 | +/******/ (() => { // webpackBootstrap | |
| 2 | +/******/ var __webpack_modules__ = ({ | |
| 2 | 3 | |
| 3 | -//#region \0rolldown/runtime.js | |
| 4 | - var __defProp = Object.defineProperty; | |
| 5 | - var __name = (target, value) => __defProp(target, "name", { | |
| 6 | - value, | |
| 7 | - configurable: true | |
| 8 | - }); | |
| 4 | +/***/ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js": | |
| 5 | +/*!***********************************************************************!*\ | |
| 6 | + !*** ../node_modules/@babel/runtime/helpers/assertThisInitialized.js ***! | |
| 7 | + \***********************************************************************/ | |
| 8 | +/***/ ((module) => { | |
| 9 | 9 | |
| 10 | -//#endregion | |
| 10 | +function _assertThisInitialized(e) { | |
| 11 | + if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
| 12 | + return e; | |
| 13 | +} | |
| 14 | +module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 11 | 15 | |
| 12 | -//#region node_modules/@babel/runtime/helpers/esm/classCallCheck.js | |
| 13 | - function _classCallCheck(a, n) { | |
| 14 | - if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); | |
| 15 | - } | |
| 16 | +/***/ }), | |
| 16 | 17 | |
| 17 | -//#endregion | |
| 18 | -//#region node_modules/@babel/runtime/helpers/esm/typeof.js | |
| 19 | - function _typeof(o) { | |
| 20 | - "@babel/helpers - typeof"; | |
| 21 | - return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) { | |
| 22 | - return typeof o; | |
| 23 | - } : function(o) { | |
| 24 | - return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; | |
| 25 | - }, _typeof(o); | |
| 26 | - } | |
| 18 | +/***/ "../node_modules/@babel/runtime/helpers/classCallCheck.js": | |
| 19 | +/*!****************************************************************!*\ | |
| 20 | + !*** ../node_modules/@babel/runtime/helpers/classCallCheck.js ***! | |
| 21 | + \****************************************************************/ | |
| 22 | +/***/ ((module) => { | |
| 27 | 23 | |
| 28 | -//#endregion | |
| 29 | -//#region node_modules/@babel/runtime/helpers/esm/toPrimitive.js | |
| 30 | - function toPrimitive(t, r) { | |
| 31 | - if ("object" != _typeof(t) || !t) return t; | |
| 32 | - var e = t[Symbol.toPrimitive]; | |
| 33 | - if (void 0 !== e) { | |
| 34 | - var i = e.call(t, r || "default"); | |
| 35 | - if ("object" != _typeof(i)) return i; | |
| 36 | - throw new TypeError("@@toPrimitive must return a primitive value."); | |
| 37 | - } | |
| 38 | - return ("string" === r ? String : Number)(t); | |
| 39 | - } | |
| 24 | +function _classCallCheck(a, n) { | |
| 25 | + if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); | |
| 26 | +} | |
| 27 | +module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 40 | 28 | |
| 41 | -//#endregion | |
| 42 | -//#region node_modules/@babel/runtime/helpers/esm/toPropertyKey.js | |
| 43 | - function toPropertyKey(t) { | |
| 44 | - var i = toPrimitive(t, "string"); | |
| 45 | - return "symbol" == _typeof(i) ? i : i + ""; | |
| 46 | - } | |
| 29 | +/***/ }), | |
| 47 | 30 | |
| 48 | -//#endregion | |
| 49 | -//#region node_modules/@babel/runtime/helpers/esm/createClass.js | |
| 50 | - function _defineProperties(e, r) { | |
| 51 | - for (var t = 0; t < r.length; t++) { | |
| 52 | - var o = r[t]; | |
| 53 | - o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o); | |
| 54 | - } | |
| 55 | - } | |
| 56 | - function _createClass(e, r, t) { | |
| 57 | - return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; | |
| 58 | - } | |
| 31 | +/***/ "../node_modules/@babel/runtime/helpers/createClass.js": | |
| 32 | +/*!*************************************************************!*\ | |
| 33 | + !*** ../node_modules/@babel/runtime/helpers/createClass.js ***! | |
| 34 | + \*************************************************************/ | |
| 35 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 59 | 36 | |
| 60 | -//#endregion | |
| 61 | -//#region node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js | |
| 62 | - function _assertThisInitialized(e) { | |
| 63 | - if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
| 64 | - return e; | |
| 65 | - } | |
| 37 | +var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); | |
| 38 | +function _defineProperties(e, r) { | |
| 39 | + for (var t = 0; t < r.length; t++) { | |
| 40 | + var o = r[t]; | |
| 41 | + o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o); | |
| 42 | + } | |
| 43 | +} | |
| 44 | +function _createClass(e, r, t) { | |
| 45 | + return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { | |
| 46 | + writable: !1 | |
| 47 | + }), e; | |
| 48 | +} | |
| 49 | +module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 66 | 50 | |
| 67 | -//#endregion | |
| 68 | -//#region node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js | |
| 69 | - function _possibleConstructorReturn(t, e) { | |
| 70 | - if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; | |
| 71 | - if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); | |
| 72 | - return _assertThisInitialized(t); | |
| 73 | - } | |
| 51 | +/***/ }), | |
| 74 | 52 | |
| 75 | -//#endregion | |
| 76 | -//#region node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js | |
| 77 | - function _getPrototypeOf(t) { | |
| 78 | - return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) { | |
| 79 | - return t.__proto__ || Object.getPrototypeOf(t); | |
| 80 | - }, _getPrototypeOf(t); | |
| 81 | - } | |
| 53 | +/***/ "../node_modules/@babel/runtime/helpers/get.js": | |
| 54 | +/*!*****************************************************!*\ | |
| 55 | + !*** ../node_modules/@babel/runtime/helpers/get.js ***! | |
| 56 | + \*****************************************************/ | |
| 57 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 82 | 58 | |
| 83 | -//#endregion | |
| 84 | -//#region node_modules/@babel/runtime/helpers/esm/superPropBase.js | |
| 85 | - function _superPropBase(t, o) { | |
| 86 | - for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t));); | |
| 87 | - return t; | |
| 88 | - } | |
| 59 | +var superPropBase = __webpack_require__(/*! ./superPropBase.js */ "../node_modules/@babel/runtime/helpers/superPropBase.js"); | |
| 60 | +function _get() { | |
| 61 | + return module.exports = _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { | |
| 62 | + var p = superPropBase(e, t); | |
| 63 | + if (p) { | |
| 64 | + var n = Object.getOwnPropertyDescriptor(p, t); | |
| 65 | + return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; | |
| 66 | + } | |
| 67 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports, _get.apply(null, arguments); | |
| 68 | +} | |
| 69 | +module.exports = _get, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 89 | 70 | |
| 90 | -//#endregion | |
| 91 | -//#region node_modules/@babel/runtime/helpers/esm/get.js | |
| 92 | - function _get() { | |
| 93 | - return _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function(e, t, r) { | |
| 94 | - var p = _superPropBase(e, t); | |
| 95 | - if (p) { | |
| 96 | - var n = Object.getOwnPropertyDescriptor(p, t); | |
| 97 | - return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; | |
| 98 | - } | |
| 99 | - }, _get.apply(null, arguments); | |
| 100 | - } | |
| 71 | +/***/ }), | |
| 101 | 72 | |
| 102 | -//#endregion | |
| 103 | -//#region node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js | |
| 104 | - function _setPrototypeOf(t, e) { | |
| 105 | - return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, e) { | |
| 106 | - return t.__proto__ = e, t; | |
| 107 | - }, _setPrototypeOf(t, e); | |
| 108 | - } | |
| 73 | +/***/ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js": | |
| 74 | +/*!****************************************************************!*\ | |
| 75 | + !*** ../node_modules/@babel/runtime/helpers/getPrototypeOf.js ***! | |
| 76 | + \****************************************************************/ | |
| 77 | +/***/ ((module) => { | |
| 109 | 78 | |
| 110 | -//#endregion | |
| 111 | -//#region node_modules/@babel/runtime/helpers/esm/inherits.js | |
| 112 | - function _inherits(t, e) { | |
| 113 | - if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); | |
| 114 | - t.prototype = Object.create(e && e.prototype, { constructor: { | |
| 115 | - value: t, | |
| 116 | - writable: !0, | |
| 117 | - configurable: !0 | |
| 118 | - } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); | |
| 119 | - } | |
| 79 | +function _getPrototypeOf(t) { | |
| 80 | + return module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { | |
| 81 | + return t.__proto__ || Object.getPrototypeOf(t); | |
| 82 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports, _getPrototypeOf(t); | |
| 83 | +} | |
| 84 | +module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 120 | 85 | |
| 121 | -//#endregion | |
| 122 | -//#region modules/admin-bar/assets/js/frontend/module.js | |
| 123 | - function _callSuper(t, o, e) { | |
| 124 | - return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 125 | - } | |
| 126 | - function _isNativeReflectConstruct() { | |
| 127 | - try { | |
| 128 | - var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 129 | - } catch (t) {} | |
| 130 | - return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { | |
| 131 | - return !!t; | |
| 132 | - })(); | |
| 133 | - } | |
| 134 | - function _superPropGet(t, o, e, r) { | |
| 135 | - var p = _get(_getPrototypeOf(1 & r ? t.prototype : t), o, e); | |
| 136 | - return 2 & r && "function" == typeof p ? function(t) { | |
| 137 | - return p.apply(e, t); | |
| 138 | - } : p; | |
| 139 | - } | |
| 140 | - var AdminBar = /*#__PURE__*/ function(_elementorModules$Vie) { | |
| 141 | - function AdminBar() { | |
| 142 | - _classCallCheck(this, AdminBar); | |
| 143 | - return _callSuper(this, AdminBar, arguments); | |
| 144 | - } | |
| 145 | - _inherits(AdminBar, _elementorModules$Vie); | |
| 146 | - return _createClass(AdminBar, [ | |
| 147 | - { | |
| 148 | - key: "getDefaultSettings", | |
| 149 | - value: function getDefaultSettings() { | |
| 150 | - return { | |
| 151 | - prefixes: { adminBarId: "wp-admin-bar-" }, | |
| 152 | - classes: { | |
| 153 | - adminBarItem: "ab-item", | |
| 154 | - adminBarItemTitle: "elementor-edit-link-title", | |
| 155 | - adminBarItemSubTitle: "elementor-edit-link-type", | |
| 156 | - adminBarNonLinkItem: "ab-empty-item", | |
| 157 | - adminBarSubItemsWrapper: "ab-sub-wrapper", | |
| 158 | - adminBarSubItems: "ab-submenu" | |
| 159 | - }, | |
| 160 | - selectors: { | |
| 161 | - adminBar: "#wp-admin-bar-root-default", | |
| 162 | - editMenuItem: "#wp-admin-bar-edit", | |
| 163 | - newMenuItem: "#wp-admin-bar-new-content" | |
| 164 | - } | |
| 165 | - }; | |
| 166 | - } | |
| 167 | - }, | |
| 168 | - { | |
| 169 | - key: "getDefaultElements", | |
| 170 | - value: function getDefaultElements() { | |
| 171 | - var _this$getSettings = this.getSettings("selectors"); | |
| 172 | - var adminBar = _this$getSettings.adminBar; | |
| 173 | - var editMenuItem = _this$getSettings.editMenuItem; | |
| 174 | - var newMenuItem = _this$getSettings.newMenuItem; | |
| 175 | - return { | |
| 176 | - $adminBar: jQuery(adminBar), | |
| 177 | - $editMenuItem: jQuery(editMenuItem), | |
| 178 | - $newMenuItem: jQuery(newMenuItem) | |
| 179 | - }; | |
| 180 | - } | |
| 181 | - }, | |
| 182 | - { | |
| 183 | - key: "onInit", | |
| 184 | - value: function onInit() { | |
| 185 | - _superPropGet(AdminBar, "onInit", this, 3)([]); | |
| 186 | - this.createMenu(elementorAdminBarConfig); | |
| 187 | - } | |
| 188 | - }, | |
| 189 | - { | |
| 190 | - key: "createMenu", | |
| 191 | - value: function createMenu(adminBarConfig) { | |
| 192 | - var $items = this.createMenuItems(Object.values(adminBarConfig)); | |
| 193 | - if (this.elements.$editMenuItem.length) this.elements.$editMenuItem.after($items); | |
| 194 | - else if (this.elements.$newMenuItem.length) this.elements.$newMenuItem.after($items); | |
| 195 | - else this.elements.$adminBar.append($items); | |
| 196 | - } | |
| 197 | - }, | |
| 198 | - { | |
| 199 | - key: "createMenuItems", | |
| 200 | - value: function createMenuItems(items) { | |
| 201 | - var _this = this; | |
| 202 | - return items.map(function(item) { | |
| 203 | - return _this.createMenuItem(item); | |
| 204 | - }); | |
| 205 | - } | |
| 206 | - }, | |
| 207 | - { | |
| 208 | - key: "createMenuItem", | |
| 209 | - value: function createMenuItem(item) { | |
| 210 | - var children = item.children ? Object.values(item.children) : []; | |
| 211 | - var id = "".concat(this.getSettings("prefixes.adminBarId")).concat(item.id); | |
| 212 | - var $title = jQuery("<span>", { | |
| 213 | - class: this.getSettings("classes.adminBarItemTitle"), | |
| 214 | - html: item.title | |
| 215 | - }); | |
| 216 | - var $subTitle = item.sub_title ? jQuery("<span>", { | |
| 217 | - class: this.getSettings("classes.adminBarItemSubTitle"), | |
| 218 | - html: item.sub_title | |
| 219 | - }) : null; | |
| 220 | - var $item = jQuery(item.href ? "<a>" : "<div>", { | |
| 221 | - "aria-haspopup": children.length ? true : null, | |
| 222 | - class: [ | |
| 223 | - this.getSettings("classes.adminBarItem"), | |
| 224 | - item.href ? "" : this.getSettings("classes.adminBarNonLinkItem"), | |
| 225 | - item.class | |
| 226 | - ].join(" "), | |
| 227 | - href: item.href | |
| 228 | - }).append([$title, $subTitle]); | |
| 229 | - return jQuery("<li>", { | |
| 230 | - id, | |
| 231 | - class: children.length ? "menupop" : "" + (item.parent_class || "elementor-general-section") | |
| 232 | - }).append([$item, children.length ? this.createSubMenuItems(id, children) : null]); | |
| 233 | - } | |
| 234 | - }, | |
| 235 | - { | |
| 236 | - key: "createSubMenuItems", | |
| 237 | - value: function createSubMenuItems(parentId, children) { | |
| 238 | - var $list = jQuery("<ul>", { | |
| 239 | - class: this.getSettings("classes.adminBarSubItems"), | |
| 240 | - id: "".concat(parentId, "-default") | |
| 241 | - }).append(this.createMenuItems(children)); | |
| 242 | - return jQuery("<div>", { class: this.getSettings("classes.adminBarSubItemsWrapper") }).append($list); | |
| 243 | - } | |
| 244 | - } | |
| 245 | - ]); | |
| 246 | - }(elementorModules.ViewModule); | |
| 247 | - document.addEventListener("DOMContentLoaded", function() { | |
| 248 | - return new AdminBar(); | |
| 249 | - }); | |
| 86 | +/***/ }), | |
| 250 | 87 | |
| 251 | -//#endregion | |
| 88 | +/***/ "../node_modules/@babel/runtime/helpers/inherits.js": | |
| 89 | +/*!**********************************************************!*\ | |
| 90 | + !*** ../node_modules/@babel/runtime/helpers/inherits.js ***! | |
| 91 | + \**********************************************************/ | |
| 92 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 93 | + | |
| 94 | +var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js"); | |
| 95 | +function _inherits(t, e) { | |
| 96 | + if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); | |
| 97 | + t.prototype = Object.create(e && e.prototype, { | |
| 98 | + constructor: { | |
| 99 | + value: t, | |
| 100 | + writable: !0, | |
| 101 | + configurable: !0 | |
| 102 | + } | |
| 103 | + }), Object.defineProperty(t, "prototype", { | |
| 104 | + writable: !1 | |
| 105 | + }), e && setPrototypeOf(t, e); | |
| 106 | +} | |
| 107 | +module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 108 | + | |
| 109 | +/***/ }), | |
| 110 | + | |
| 111 | +/***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js": | |
| 112 | +/*!***********************************************************************!*\ | |
| 113 | + !*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***! | |
| 114 | + \***********************************************************************/ | |
| 115 | +/***/ ((module) => { | |
| 116 | + | |
| 117 | +function _interopRequireDefault(e) { | |
| 118 | + return e && e.__esModule ? e : { | |
| 119 | + "default": e | |
| 120 | + }; | |
| 121 | +} | |
| 122 | +module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 123 | + | |
| 124 | +/***/ }), | |
| 125 | + | |
| 126 | +/***/ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js": | |
| 127 | +/*!***************************************************************************!*\ | |
| 128 | + !*** ../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***! | |
| 129 | + \***************************************************************************/ | |
| 130 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 131 | + | |
| 132 | +var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 133 | +var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js"); | |
| 134 | +function _possibleConstructorReturn(t, e) { | |
| 135 | + if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; | |
| 136 | + if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); | |
| 137 | + return assertThisInitialized(t); | |
| 138 | +} | |
| 139 | +module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 140 | + | |
| 141 | +/***/ }), | |
| 142 | + | |
| 143 | +/***/ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js": | |
| 144 | +/*!****************************************************************!*\ | |
| 145 | + !*** ../node_modules/@babel/runtime/helpers/setPrototypeOf.js ***! | |
| 146 | + \****************************************************************/ | |
| 147 | +/***/ ((module) => { | |
| 148 | + | |
| 149 | +function _setPrototypeOf(t, e) { | |
| 150 | + return module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { | |
| 151 | + return t.__proto__ = e, t; | |
| 152 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports, _setPrototypeOf(t, e); | |
| 153 | +} | |
| 154 | +module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 155 | + | |
| 156 | +/***/ }), | |
| 157 | + | |
| 158 | +/***/ "../node_modules/@babel/runtime/helpers/superPropBase.js": | |
| 159 | +/*!***************************************************************!*\ | |
| 160 | + !*** ../node_modules/@babel/runtime/helpers/superPropBase.js ***! | |
| 161 | + \***************************************************************/ | |
| 162 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 163 | + | |
| 164 | +var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"); | |
| 165 | +function _superPropBase(t, o) { | |
| 166 | + for (; !{}.hasOwnProperty.call(t, o) && null !== (t = getPrototypeOf(t));); | |
| 167 | + return t; | |
| 168 | +} | |
| 169 | +module.exports = _superPropBase, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 170 | + | |
| 171 | +/***/ }), | |
| 172 | + | |
| 173 | +/***/ "../node_modules/@babel/runtime/helpers/toPrimitive.js": | |
| 174 | +/*!*************************************************************!*\ | |
| 175 | + !*** ../node_modules/@babel/runtime/helpers/toPrimitive.js ***! | |
| 176 | + \*************************************************************/ | |
| 177 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 178 | + | |
| 179 | +var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 180 | +function toPrimitive(t, r) { | |
| 181 | + if ("object" != _typeof(t) || !t) return t; | |
| 182 | + var e = t[Symbol.toPrimitive]; | |
| 183 | + if (void 0 !== e) { | |
| 184 | + var i = e.call(t, r || "default"); | |
| 185 | + if ("object" != _typeof(i)) return i; | |
| 186 | + throw new TypeError("@@toPrimitive must return a primitive value."); | |
| 187 | + } | |
| 188 | + return ("string" === r ? String : Number)(t); | |
| 189 | +} | |
| 190 | +module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 191 | + | |
| 192 | +/***/ }), | |
| 193 | + | |
| 194 | +/***/ "../node_modules/@babel/runtime/helpers/toPropertyKey.js": | |
| 195 | +/*!***************************************************************!*\ | |
| 196 | + !*** ../node_modules/@babel/runtime/helpers/toPropertyKey.js ***! | |
| 197 | + \***************************************************************/ | |
| 198 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 199 | + | |
| 200 | +var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 201 | +var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ "../node_modules/@babel/runtime/helpers/toPrimitive.js"); | |
| 202 | +function toPropertyKey(t) { | |
| 203 | + var i = toPrimitive(t, "string"); | |
| 204 | + return "symbol" == _typeof(i) ? i : i + ""; | |
| 205 | +} | |
| 206 | +module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 207 | + | |
| 208 | +/***/ }), | |
| 209 | + | |
| 210 | +/***/ "../node_modules/@babel/runtime/helpers/typeof.js": | |
| 211 | +/*!********************************************************!*\ | |
| 212 | + !*** ../node_modules/@babel/runtime/helpers/typeof.js ***! | |
| 213 | + \********************************************************/ | |
| 214 | +/***/ ((module) => { | |
| 215 | + | |
| 216 | +function _typeof(o) { | |
| 217 | + "@babel/helpers - typeof"; | |
| 218 | + | |
| 219 | + return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { | |
| 220 | + return typeof o; | |
| 221 | + } : function (o) { | |
| 222 | + return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; | |
| 223 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o); | |
| 224 | +} | |
| 225 | +module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 226 | + | |
| 227 | +/***/ }) | |
| 228 | + | |
| 229 | +/******/ }); | |
| 230 | +/************************************************************************/ | |
| 231 | +/******/ // The module cache | |
| 232 | +/******/ var __webpack_module_cache__ = {}; | |
| 233 | +/******/ | |
| 234 | +/******/ // The require function | |
| 235 | +/******/ function __webpack_require__(moduleId) { | |
| 236 | +/******/ // Check if module is in cache | |
| 237 | +/******/ var cachedModule = __webpack_module_cache__[moduleId]; | |
| 238 | +/******/ if (cachedModule !== undefined) { | |
| 239 | +/******/ return cachedModule.exports; | |
| 240 | +/******/ } | |
| 241 | +/******/ // Create a new module (and put it into the cache) | |
| 242 | +/******/ var module = __webpack_module_cache__[moduleId] = { | |
| 243 | +/******/ // no module.id needed | |
| 244 | +/******/ // no module.loaded needed | |
| 245 | +/******/ exports: {} | |
| 246 | +/******/ }; | |
| 247 | +/******/ | |
| 248 | +/******/ // Execute the module function | |
| 249 | +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); | |
| 250 | +/******/ | |
| 251 | +/******/ // Return the exports of the module | |
| 252 | +/******/ return module.exports; | |
| 253 | +/******/ } | |
| 254 | +/******/ | |
| 255 | +/************************************************************************/ | |
| 256 | +// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. | |
| 257 | +(() => { | |
| 258 | +"use strict"; | |
| 259 | +/*!*********************************************************!*\ | |
| 260 | + !*** ../modules/admin-bar/assets/js/frontend/module.js ***! | |
| 261 | + \*********************************************************/ | |
| 262 | + | |
| 263 | + | |
| 264 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 265 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 266 | +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 267 | +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 268 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 269 | +var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js")); | |
| 270 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 271 | +function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 272 | +function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 273 | +function _superPropGet(t, o, e, r) { var p = (0, _get2.default)((0, _getPrototypeOf2.default)(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; } | |
| 274 | +/* global elementorAdminBarConfig */ | |
| 275 | +var AdminBar = /*#__PURE__*/function (_elementorModules$Vie) { | |
| 276 | + function AdminBar() { | |
| 277 | + (0, _classCallCheck2.default)(this, AdminBar); | |
| 278 | + return _callSuper(this, AdminBar, arguments); | |
| 279 | + } | |
| 280 | + (0, _inherits2.default)(AdminBar, _elementorModules$Vie); | |
| 281 | + return (0, _createClass2.default)(AdminBar, [{ | |
| 282 | + key: "getDefaultSettings", | |
| 283 | + value: | |
| 284 | + /** | |
| 285 | + * @return {{}} settings | |
| 286 | + */ | |
| 287 | + function getDefaultSettings() { | |
| 288 | + return { | |
| 289 | + prefixes: { | |
| 290 | + adminBarId: 'wp-admin-bar-' | |
| 291 | + }, | |
| 292 | + classes: { | |
| 293 | + adminBarItem: 'ab-item', | |
| 294 | + adminBarItemTitle: 'elementor-edit-link-title', | |
| 295 | + adminBarItemSubTitle: 'elementor-edit-link-type', | |
| 296 | + adminBarNonLinkItem: 'ab-empty-item', | |
| 297 | + adminBarSubItemsWrapper: 'ab-sub-wrapper', | |
| 298 | + adminBarSubItems: 'ab-submenu' | |
| 299 | + }, | |
| 300 | + selectors: { | |
| 301 | + adminBar: '#wp-admin-bar-root-default', | |
| 302 | + editMenuItem: '#wp-admin-bar-edit', | |
| 303 | + newMenuItem: '#wp-admin-bar-new-content' | |
| 304 | + } | |
| 305 | + }; | |
| 306 | + } | |
| 307 | + | |
| 308 | + /** | |
| 309 | + * @return {{$adminBar: (jQuery)}} elements | |
| 310 | + */ | |
| 311 | + }, { | |
| 312 | + key: "getDefaultElements", | |
| 313 | + value: function getDefaultElements() { | |
| 314 | + var _this$getSettings = this.getSettings('selectors'), | |
| 315 | + adminBar = _this$getSettings.adminBar, | |
| 316 | + editMenuItem = _this$getSettings.editMenuItem, | |
| 317 | + newMenuItem = _this$getSettings.newMenuItem; | |
| 318 | + return { | |
| 319 | + $adminBar: jQuery(adminBar), | |
| 320 | + $editMenuItem: jQuery(editMenuItem), | |
| 321 | + $newMenuItem: jQuery(newMenuItem) | |
| 322 | + }; | |
| 323 | + } | |
| 324 | + | |
| 325 | + /** | |
| 326 | + * Init | |
| 327 | + */ | |
| 328 | + }, { | |
| 329 | + key: "onInit", | |
| 330 | + value: function onInit() { | |
| 331 | + _superPropGet(AdminBar, "onInit", this, 3)([]); | |
| 332 | + this.createMenu(elementorAdminBarConfig); | |
| 333 | + } | |
| 334 | + | |
| 335 | + /** | |
| 336 | + * Main method that creates the menu base on the config that provided. | |
| 337 | + * | |
| 338 | + * @param {*} adminBarConfig | |
| 339 | + */ | |
| 340 | + }, { | |
| 341 | + key: "createMenu", | |
| 342 | + value: function createMenu(adminBarConfig) { | |
| 343 | + var $items = this.createMenuItems(Object.values(adminBarConfig)); | |
| 344 | + if (this.elements.$editMenuItem.length) { | |
| 345 | + // This is the normal case, when user visit a preview page of single post. | |
| 346 | + this.elements.$editMenuItem.after($items); | |
| 347 | + } else if (this.elements.$newMenuItem.length) { | |
| 348 | + // This is another case, when user visit a preview page that cannot be edited e.g: archive page. | |
| 349 | + this.elements.$newMenuItem.after($items); | |
| 350 | + } else { | |
| 351 | + // Default fallback in case there are no "new" or "edit" button. | |
| 352 | + this.elements.$adminBar.append($items); | |
| 353 | + } | |
| 354 | + } | |
| 355 | + | |
| 356 | + /** | |
| 357 | + * Creates a menu items from array of declaration. | |
| 358 | + * | |
| 359 | + * @param {*} items | |
| 360 | + * @return {jQuery[]} menu items | |
| 361 | + */ | |
| 362 | + }, { | |
| 363 | + key: "createMenuItems", | |
| 364 | + value: function createMenuItems(items) { | |
| 365 | + var _this = this; | |
| 366 | + return items.map(function (item) { | |
| 367 | + return _this.createMenuItem(item); | |
| 368 | + }); | |
| 369 | + } | |
| 370 | + | |
| 371 | + /** | |
| 372 | + * Creates a menu item, both for menu and sub menu. | |
| 373 | + * | |
| 374 | + * @param {*} item | |
| 375 | + * @return {jQuery} menu item | |
| 376 | + */ | |
| 377 | + }, { | |
| 378 | + key: "createMenuItem", | |
| 379 | + value: function createMenuItem(item) { | |
| 380 | + var children = item.children ? Object.values(item.children) : []; | |
| 381 | + var id = "".concat(this.getSettings('prefixes.adminBarId')).concat(item.id); | |
| 382 | + var $title = jQuery('<span>', { | |
| 383 | + class: this.getSettings('classes.adminBarItemTitle'), | |
| 384 | + html: item.title | |
| 385 | + }); | |
| 386 | + var $subTitle = item.sub_title ? jQuery('<span>', { | |
| 387 | + class: this.getSettings('classes.adminBarItemSubTitle'), | |
| 388 | + html: item.sub_title | |
| 389 | + }) : null; | |
| 390 | + var $item = jQuery(item.href ? '<a>' : '<div>', { | |
| 391 | + 'aria-haspopup': children.length ? true : null, | |
| 392 | + class: [this.getSettings('classes.adminBarItem'), item.href ? '' : this.getSettings('classes.adminBarNonLinkItem'), item.class].join(' '), | |
| 393 | + href: item.href | |
| 394 | + }).append([$title, $subTitle]); | |
| 395 | + return jQuery('<li>', { | |
| 396 | + id: id, | |
| 397 | + class: children.length ? 'menupop' : '' + (item.parent_class || 'elementor-general-section') | |
| 398 | + }).append([$item, children.length ? this.createSubMenuItems(id, children) : null]); | |
| 399 | + } | |
| 400 | + | |
| 401 | + /** | |
| 402 | + * Creates sub menu items wrapper. | |
| 403 | + * | |
| 404 | + * @param {string} parentId | |
| 405 | + * @param {Object} children | |
| 406 | + * @return {jQuery} sub-menu items | |
| 407 | + */ | |
| 408 | + }, { | |
| 409 | + key: "createSubMenuItems", | |
| 410 | + value: function createSubMenuItems(parentId, children) { | |
| 411 | + var $list = jQuery('<ul>', { | |
| 412 | + class: this.getSettings('classes.adminBarSubItems'), | |
| 413 | + id: "".concat(parentId, "-default") | |
| 414 | + }).append(this.createMenuItems(children)); | |
| 415 | + return jQuery('<div>', { | |
| 416 | + class: this.getSettings('classes.adminBarSubItemsWrapper') | |
| 417 | + }).append($list); | |
| 418 | + } | |
| 419 | + }]); | |
| 420 | +}(elementorModules.ViewModule); | |
| 421 | +document.addEventListener('DOMContentLoaded', function () { | |
| 422 | + return new AdminBar(); | |
| 423 | +}); | |
| 252 | 424 | })(); |
| 425 | + | |
| 426 | +/******/ })() | |
| 427 | +; | |
| 253 | 428 | //# sourceMappingURL=elementor-admin-bar.js.map |