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