| @@ -1,6 +1,6 @@ | ||
| 1 | -"use strict"; | |
| 2 | -(self["webpackChunkelementorFrontend"] = self["webpackChunkelementorFrontend"] || []).push([["frontend"],{ | |
| 1 | +/*! elementor - v3.7.3 - 29-08-2022 */ | |
| 2 | +(self["webpackChunkelementor"] = self["webpackChunkelementor"] || []).push([["frontend"],{ | |
| 3 | 3 | |
| 4 | 4 | /***/ "../assets/dev/js/frontend/documents-manager.js": |
| 5 | 5 | /*!******************************************************!*\ |
| 6 | 6 | !*** ../assets/dev/js/frontend/documents-manager.js ***! |
| @@ -6,23 +6,28 @@ | ||
| 6 | 6 | !*** ../assets/dev/js/frontend/documents-manager.js ***! |
| 7 | 7 | \******************************************************/ |
| 8 | 8 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 9 | 9 | |
| 10 | +"use strict"; | |
| 10 | 11 | |
| 11 | 12 | |
| 12 | 13 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 14 | + | |
| 13 | 15 | Object.defineProperty(exports, "__esModule", ({ |
| 14 | 16 | value: true |
| 15 | 17 | })); |
| 16 | 18 | exports["default"] = void 0; |
| 19 | + | |
| 17 | 20 | var _document = _interopRequireDefault(__webpack_require__(/*! ./document */ "../assets/dev/js/frontend/document.js")); |
| 21 | + | |
| 18 | 22 | class _default extends elementorModules.ViewModule { |
| 19 | - constructor(...args) { | |
| 20 | - super(...args); | |
| 23 | + constructor() { | |
| 24 | + super(...arguments); | |
| 21 | 25 | this.documents = {}; |
| 22 | 26 | this.initDocumentClasses(); |
| 23 | 27 | this.attachDocumentsClasses(); |
| 24 | 28 | } |
| 29 | + | |
| 25 | 30 | getDefaultSettings() { |
| 26 | 31 | return { |
| 27 | 32 | selectors: { |
| 28 | 33 | document: '.elementor' |
| @@ -28,8 +33,9 @@ | ||
| 28 | 33 | document: '.elementor' |
| 29 | 34 | } |
| 30 | 35 | }; |
| 31 | 36 | } |
| 37 | + | |
| 32 | 38 | getDefaultElements() { |
| 33 | 39 | const selectors = this.getSettings('selectors'); |
| 34 | 40 | return { |
| 35 | 41 | $documents: jQuery(selectors.document) |
| @@ -34,8 +40,9 @@ | ||
| 34 | 40 | return { |
| 35 | 41 | $documents: jQuery(selectors.document) |
| 36 | 42 | }; |
| 37 | 43 | } |
| 44 | + | |
| 38 | 45 | initDocumentClasses() { |
| 39 | 46 | this.documentClasses = { |
| 40 | 47 | base: _document.default |
| 41 | 48 | }; |
| @@ -40,25 +47,30 @@ | ||
| 40 | 47 | base: _document.default |
| 41 | 48 | }; |
| 42 | 49 | elementorFrontend.hooks.doAction('elementor/frontend/documents-manager/init-classes', this); |
| 43 | 50 | } |
| 51 | + | |
| 44 | 52 | addDocumentClass(documentType, documentClass) { |
| 45 | 53 | this.documentClasses[documentType] = documentClass; |
| 46 | 54 | } |
| 55 | + | |
| 47 | 56 | attachDocumentsClasses() { |
| 48 | 57 | this.elements.$documents.each((index, document) => this.attachDocumentClass(jQuery(document))); |
| 49 | 58 | } |
| 59 | + | |
| 50 | 60 | attachDocumentClass($document) { |
| 51 | 61 | const documentData = $document.data(), |
| 52 | - documentID = documentData.elementorId, | |
| 53 | - documentType = documentData.elementorType, | |
| 54 | - DocumentClass = this.documentClasses[documentType] || this.documentClasses.base; | |
| 62 | + documentID = documentData.elementorId, | |
| 63 | + documentType = documentData.elementorType, | |
| 64 | + DocumentClass = this.documentClasses[documentType] || this.documentClasses.base; | |
| 55 | 65 | this.documents[documentID] = new DocumentClass({ |
| 56 | 66 | $element: $document, |
| 57 | 67 | id: documentID |
| 58 | 68 | }); |
| 59 | 69 | } |
| 70 | + | |
| 60 | 71 | } |
| 72 | + | |
| 61 | 73 | exports["default"] = _default; |
| 62 | 74 | |
| 63 | 75 | /***/ }), |
| 64 | 76 | |
| @@ -67,20 +79,31 @@ | ||
| 67 | 79 | !*** ../assets/dev/js/frontend/elements-handlers-manager.js ***! |
| 68 | 80 | \**************************************************************/ |
| 69 | 81 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 70 | 82 | |
| 83 | +"use strict"; | |
| 71 | 84 | |
| 72 | 85 | |
| 73 | 86 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 74 | -__webpack_require__(/*! core-js/modules/esnext.iterator.constructor.js */ "../node_modules/core-js/modules/esnext.iterator.constructor.js"); | |
| 75 | -__webpack_require__(/*! core-js/modules/esnext.iterator.for-each.js */ "../node_modules/core-js/modules/esnext.iterator.for-each.js"); | |
| 87 | + | |
| 76 | 88 | var _global = _interopRequireDefault(__webpack_require__(/*! ./handlers/global */ "../assets/dev/js/frontend/handlers/global.js")); |
| 89 | + | |
| 90 | +var _background = _interopRequireDefault(__webpack_require__(/*! ./handlers/background */ "../assets/dev/js/frontend/handlers/background.js")); | |
| 91 | + | |
| 77 | 92 | var _container = _interopRequireDefault(__webpack_require__(/*! ./handlers/container/container */ "../assets/dev/js/frontend/handlers/container/container.js")); |
| 78 | -var _section = _interopRequireDefault(__webpack_require__(/*! ./handlers/section/section */ "../assets/dev/js/frontend/handlers/section/section.js")); | |
| 93 | + | |
| 79 | 94 | var _column = _interopRequireDefault(__webpack_require__(/*! ./handlers/column */ "../assets/dev/js/frontend/handlers/column.js")); |
| 80 | -/* global elementorFrontendConfig */ | |
| 81 | 95 | |
| 96 | +var _handlesPosition = _interopRequireDefault(__webpack_require__(/*! ./handlers/section/handles-position */ "../assets/dev/js/frontend/handlers/section/handles-position.js")); | |
| 97 | + | |
| 98 | +var _stretchedSection = _interopRequireDefault(__webpack_require__(/*! ./handlers/section/stretched-section */ "../assets/dev/js/frontend/handlers/section/stretched-section.js")); | |
| 99 | + | |
| 100 | +var _shapes = _interopRequireDefault(__webpack_require__(/*! ./handlers/section/shapes */ "../assets/dev/js/frontend/handlers/section/shapes.js")); | |
| 101 | + | |
| 102 | +// Section handlers. | |
| 82 | 103 | module.exports = function ($) { |
| 104 | + var _this = this; | |
| 105 | + | |
| 83 | 106 | const handlersInstances = {}; |
| 84 | 107 | this.elementsHandlers = { |
| 85 | 108 | 'accordion.default': () => __webpack_require__.e(/*! import() | accordion */ "accordion").then(__webpack_require__.bind(__webpack_require__, /*! ./handlers/accordion */ "../assets/dev/js/frontend/handlers/accordion.js")), |
| 86 | 109 | 'alert.default': () => __webpack_require__.e(/*! import() | alert */ "alert").then(__webpack_require__.bind(__webpack_require__, /*! ./handlers/alert */ "../assets/dev/js/frontend/handlers/alert.js")), |
| @@ -90,25 +113,23 @@ | ||
| 90 | 113 | 'toggle.default': () => __webpack_require__.e(/*! import() | toggle */ "toggle").then(__webpack_require__.bind(__webpack_require__, /*! ./handlers/toggle */ "../assets/dev/js/frontend/handlers/toggle.js")), |
| 91 | 114 | 'video.default': () => __webpack_require__.e(/*! import() | video */ "video").then(__webpack_require__.bind(__webpack_require__, /*! ./handlers/video */ "../assets/dev/js/frontend/handlers/video.js")), |
| 92 | 115 | 'image-carousel.default': () => __webpack_require__.e(/*! import() | image-carousel */ "image-carousel").then(__webpack_require__.bind(__webpack_require__, /*! ./handlers/image-carousel */ "../assets/dev/js/frontend/handlers/image-carousel.js")), |
| 93 | 116 | 'text-editor.default': () => __webpack_require__.e(/*! import() | text-editor */ "text-editor").then(__webpack_require__.bind(__webpack_require__, /*! ./handlers/text-editor */ "../assets/dev/js/frontend/handlers/text-editor.js")), |
| 94 | - 'wp-widget-media_audio.default': () => __webpack_require__.e(/*! import() | wp-audio */ "wp-audio").then(__webpack_require__.bind(__webpack_require__, /*! ./handlers/wp-audio */ "../assets/dev/js/frontend/handlers/wp-audio.js")), | |
| 95 | - container: _container.default, | |
| 96 | - section: _section.default, | |
| 97 | - column: _column.default | |
| 117 | + 'wp-widget-media_audio.default': () => __webpack_require__.e(/*! import() | wp-audio */ "wp-audio").then(__webpack_require__.bind(__webpack_require__, /*! ./handlers/wp-audio */ "../assets/dev/js/frontend/handlers/wp-audio.js")) | |
| 98 | 118 | }; |
| 99 | - if (elementorFrontendConfig.experimentalFeatures['nested-elements']) { | |
| 100 | - this.elementsHandlers['nested-tabs.default'] = () => __webpack_require__.e(/*! import() | nested-tabs */ "nested-tabs").then(__webpack_require__.bind(__webpack_require__, /*! elementor/modules/nested-tabs/assets/js/frontend/handlers/nested-tabs */ "../modules/nested-tabs/assets/js/frontend/handlers/nested-tabs.js")); | |
| 101 | - } | |
| 102 | - if (elementorFrontendConfig.experimentalFeatures['nested-elements']) { | |
| 103 | - this.elementsHandlers['nested-accordion.default'] = () => __webpack_require__.e(/*! import() | nested-accordion */ "nested-accordion").then(__webpack_require__.bind(__webpack_require__, /*! elementor/modules/nested-accordion/assets/js/frontend/handlers/nested-accordion */ "../modules/nested-accordion/assets/js/frontend/handlers/nested-accordion.js")); | |
| 104 | - } | |
| 105 | - if (elementorFrontendConfig.experimentalFeatures.container) { | |
| 106 | - this.elementsHandlers['contact-buttons.default'] = () => __webpack_require__.e(/*! import() | contact-buttons */ "contact-buttons").then(__webpack_require__.bind(__webpack_require__, /*! elementor/modules/floating-buttons/assets/js/floating-buttons/frontend/handlers/contact-buttons */ "../modules/floating-buttons/assets/js/floating-buttons/frontend/handlers/contact-buttons.js")); | |
| 107 | - this.elementsHandlers['floating-bars-var-1.default'] = () => __webpack_require__.e(/*! import() | floating-bars */ "floating-bars").then(__webpack_require__.bind(__webpack_require__, /*! elementor/modules/floating-buttons/assets/js/floating-bars/frontend/handlers/floating-bars */ "../modules/floating-buttons/assets/js/floating-bars/frontend/handlers/floating-bars.js")); | |
| 108 | - } | |
| 119 | + | |
| 109 | 120 | const addGlobalHandlers = () => elementorFrontend.hooks.addAction('frontend/element_ready/global', _global.default); |
| 121 | + | |
| 110 | 122 | const addElementsHandlers = () => { |
| 123 | + this.elementsHandlers.section = [_stretchedSection.default, // Must run before background handlers to init the slideshow only after the stretch. | |
| 124 | + ..._background.default, _handlesPosition.default, _shapes.default]; | |
| 125 | + this.elementsHandlers.container = [..._background.default]; // Add editor-only handlers. | |
| 126 | + | |
| 127 | + if (elementorFrontend.isEditMode()) { | |
| 128 | + this.elementsHandlers.container.push(..._container.default); | |
| 129 | + } | |
| 130 | + | |
| 131 | + this.elementsHandlers.column = _column.default; | |
| 111 | 132 | $.each(this.elementsHandlers, (elementName, Handlers) => { |
| 112 | 133 | const elementData = elementName.split('.'); |
| 113 | 134 | elementName = elementData[0]; |
| 114 | 135 | const skin = elementData[1] || null; |
| @@ -114,112 +135,127 @@ | ||
| 114 | 135 | const skin = elementData[1] || null; |
| 115 | 136 | this.attachHandler(elementName, Handlers, skin); |
| 116 | 137 | }); |
| 117 | 138 | }; |
| 139 | + | |
| 118 | 140 | const isClassHandler = Handler => Handler.prototype?.getUniqueHandlerID; |
| 119 | - const addHandlerWithHook = (elementBaseName, Handler, skin = 'default') => { | |
| 141 | + | |
| 142 | + const addHandlerWithHook = function (elementName, Handler) { | |
| 143 | + let skin = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'default'; | |
| 120 | 144 | skin = skin ? '.' + skin : ''; |
| 121 | - const elementName = elementBaseName + skin; | |
| 122 | - elementorFrontend.hooks.addAction(`frontend/element_ready/${elementName}`, $element => { | |
| 145 | + elementorFrontend.hooks.addAction(`frontend/element_ready/${elementName}${skin}`, $element => { | |
| 123 | 146 | if (isClassHandler(Handler)) { |
| 124 | - this.addHandler(Handler, { | |
| 125 | - $element, | |
| 126 | - elementName | |
| 147 | + _this.addHandler(Handler, { | |
| 148 | + $element | |
| 127 | 149 | }, true); |
| 128 | 150 | } else { |
| 129 | 151 | const handlerValue = Handler(); |
| 152 | + | |
| 130 | 153 | if (!handlerValue) { |
| 131 | 154 | return; |
| 132 | 155 | } |
| 156 | + | |
| 133 | 157 | if (handlerValue instanceof Promise) { |
| 134 | - handlerValue.then(({ | |
| 135 | - default: dynamicHandler | |
| 136 | - }) => { | |
| 137 | - this.addHandler(dynamicHandler, { | |
| 138 | - $element, | |
| 139 | - elementName | |
| 158 | + handlerValue.then(_ref => { | |
| 159 | + let { | |
| 160 | + default: dynamicHandler | |
| 161 | + } = _ref; | |
| 162 | + | |
| 163 | + _this.addHandler(dynamicHandler, { | |
| 164 | + $element | |
| 140 | 165 | }, true); |
| 141 | 166 | }); |
| 142 | 167 | } else { |
| 143 | - this.addHandler(handlerValue, { | |
| 144 | - $element, | |
| 145 | - elementName | |
| 168 | + _this.addHandler(handlerValue, { | |
| 169 | + $element | |
| 146 | 170 | }, true); |
| 147 | 171 | } |
| 148 | 172 | } |
| 149 | 173 | }); |
| 150 | 174 | }; |
| 175 | + | |
| 151 | 176 | this.addHandler = function (HandlerClass, options) { |
| 152 | 177 | const elementID = options.$element.data('model-cid'); |
| 153 | - let handlerID; | |
| 178 | + let handlerID; // If element is in edit mode | |
| 154 | 179 | |
| 155 | - // If element is in edit mode | |
| 156 | 180 | if (elementID) { |
| 157 | 181 | handlerID = HandlerClass.prototype.getConstructorID(); |
| 182 | + | |
| 158 | 183 | if (!handlersInstances[elementID]) { |
| 159 | 184 | handlersInstances[elementID] = {}; |
| 160 | 185 | } |
| 186 | + | |
| 161 | 187 | const oldHandler = handlersInstances[elementID][handlerID]; |
| 188 | + | |
| 162 | 189 | if (oldHandler) { |
| 163 | 190 | oldHandler.onDestroy(); |
| 164 | 191 | } |
| 165 | 192 | } |
| 193 | + | |
| 166 | 194 | const newHandler = new HandlerClass(options); |
| 167 | - elementorFrontend.hooks.doAction(`frontend/element_handler_ready/${options.elementName}`, options.$element, $); | |
| 195 | + | |
| 168 | 196 | if (elementID) { |
| 169 | 197 | handlersInstances[elementID][handlerID] = newHandler; |
| 170 | 198 | } |
| 171 | 199 | }; |
| 200 | + | |
| 172 | 201 | this.attachHandler = (elementName, Handlers, skin) => { |
| 173 | 202 | if (!Array.isArray(Handlers)) { |
| 174 | 203 | Handlers = [Handlers]; |
| 175 | 204 | } |
| 205 | + | |
| 176 | 206 | Handlers.forEach(Handler => addHandlerWithHook(elementName, Handler, skin)); |
| 177 | 207 | }; |
| 208 | + | |
| 178 | 209 | this.getHandler = function (handlerName) { |
| 179 | 210 | const elementHandler = this.elementsHandlers[handlerName]; |
| 211 | + | |
| 180 | 212 | if (isClassHandler(elementHandler)) { |
| 181 | 213 | return elementHandler; |
| 182 | 214 | } |
| 215 | + | |
| 183 | 216 | return new Promise(res => { |
| 184 | - elementHandler().then(({ | |
| 185 | - default: dynamicHandler | |
| 186 | - }) => { | |
| 217 | + elementHandler().then(_ref2 => { | |
| 218 | + let { | |
| 219 | + default: dynamicHandler | |
| 220 | + } = _ref2; | |
| 187 | 221 | res(dynamicHandler); |
| 188 | 222 | }); |
| 189 | 223 | }); |
| 190 | 224 | }; |
| 191 | 225 | |
| 192 | - /** | |
| 193 | - * @param {string} handlerName | |
| 194 | - * @deprecated since 3.1.0, use `elementorFrontend.elementsHandler.getHandler` instead. | |
| 195 | - */ | |
| 196 | 226 | this.getHandlers = function (handlerName) { |
| 197 | 227 | elementorDevTools.deprecation.deprecated('getHandlers', '3.1.0', 'elementorFrontend.elementsHandler.getHandler'); |
| 228 | + | |
| 198 | 229 | if (handlerName) { |
| 199 | 230 | return this.getHandler(handlerName); |
| 200 | 231 | } |
| 232 | + | |
| 201 | 233 | return this.elementsHandlers; |
| 202 | 234 | }; |
| 235 | + | |
| 203 | 236 | this.runReadyTrigger = function (scope) { |
| 204 | - const isDelayChildHandlers = !!scope.closest('[data-delay-child-handlers="true"]') && 0 !== scope.closest('[data-delay-child-handlers="true"]').length; | |
| 205 | - if (elementorFrontend.config.is_static || isDelayChildHandlers) { | |
| 237 | + if (elementorFrontend.config.is_static) { | |
| 206 | 238 | return; |
| 207 | - } | |
| 239 | + } // Initializing the `$scope` as frontend jQuery instance | |
| 208 | 240 | |
| 209 | - // Initializing the `$scope` as frontend jQuery instance | |
| 241 | + | |
| 210 | 242 | const $scope = jQuery(scope), |
| 211 | - elementType = $scope.attr('data-element_type'); | |
| 243 | + elementType = $scope.attr('data-element_type'); | |
| 244 | + | |
| 212 | 245 | if (!elementType) { |
| 213 | 246 | return; |
| 214 | 247 | } |
| 248 | + | |
| 215 | 249 | elementorFrontend.hooks.doAction('frontend/element_ready/global', $scope, $); |
| 216 | 250 | elementorFrontend.hooks.doAction(`frontend/element_ready/${elementType}`, $scope, $); |
| 251 | + | |
| 217 | 252 | if ('widget' === elementType) { |
| 218 | 253 | const widgetType = $scope.attr('data-widget_type'); |
| 219 | 254 | elementorFrontend.hooks.doAction(`frontend/element_ready/${widgetType}`, $scope, $); |
| 220 | 255 | } |
| 221 | 256 | }; |
| 257 | + | |
| 222 | 258 | this.init = () => { |
| 223 | 259 | addGlobalHandlers(); |
| 224 | 260 | addElementsHandlers(); |
| 225 | 261 | }; |
| @@ -232,66 +268,79 @@ | ||
| 232 | 268 | !*** ../assets/dev/js/frontend/frontend.js ***! |
| 233 | 269 | \*********************************************/ |
| 234 | 270 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 235 | 271 | |
| 272 | +"use strict"; | |
| 236 | 273 | |
| 237 | 274 | |
| 238 | 275 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 276 | + | |
| 239 | 277 | Object.defineProperty(exports, "__esModule", ({ |
| 240 | 278 | value: true |
| 241 | 279 | })); |
| 242 | 280 | exports["default"] = void 0; |
| 243 | -__webpack_require__(/*! core-js/modules/esnext.iterator.constructor.js */ "../node_modules/core-js/modules/esnext.iterator.constructor.js"); | |
| 244 | -__webpack_require__(/*! core-js/modules/esnext.iterator.find.js */ "../node_modules/core-js/modules/esnext.iterator.find.js"); | |
| 245 | -__webpack_require__(/*! core-js/modules/esnext.iterator.for-each.js */ "../node_modules/core-js/modules/esnext.iterator.for-each.js"); | |
| 281 | + | |
| 246 | 282 | __webpack_require__(/*! ../public-path */ "../assets/dev/js/public-path.js"); |
| 283 | + | |
| 247 | 284 | var _documentsManager = _interopRequireDefault(__webpack_require__(/*! ./documents-manager */ "../assets/dev/js/frontend/documents-manager.js")); |
| 285 | + | |
| 248 | 286 | var _storage = _interopRequireDefault(__webpack_require__(/*! elementor-common/utils/storage */ "../core/common/assets/js/utils/storage.js")); |
| 287 | + | |
| 249 | 288 | var _environment = _interopRequireDefault(__webpack_require__(/*! elementor-common/utils/environment */ "../core/common/assets/js/utils/environment.js")); |
| 289 | + | |
| 250 | 290 | var _youtubeLoader = _interopRequireDefault(__webpack_require__(/*! ./utils/video-api/youtube-loader */ "../assets/dev/js/frontend/utils/video-api/youtube-loader.js")); |
| 291 | + | |
| 251 | 292 | var _vimeoLoader = _interopRequireDefault(__webpack_require__(/*! ./utils/video-api/vimeo-loader */ "../assets/dev/js/frontend/utils/video-api/vimeo-loader.js")); |
| 293 | + | |
| 252 | 294 | var _baseLoader = _interopRequireDefault(__webpack_require__(/*! ./utils/video-api/base-loader */ "../assets/dev/js/frontend/utils/video-api/base-loader.js")); |
| 295 | + | |
| 253 | 296 | var _urlActions = _interopRequireDefault(__webpack_require__(/*! ./utils/url-actions */ "../assets/dev/js/frontend/utils/url-actions.js")); |
| 297 | + | |
| 254 | 298 | var _swiper = _interopRequireDefault(__webpack_require__(/*! ./utils/swiper */ "../assets/dev/js/frontend/utils/swiper.js")); |
| 299 | + | |
| 255 | 300 | var _lightboxManager = _interopRequireDefault(__webpack_require__(/*! ./utils/lightbox/lightbox-manager */ "../assets/dev/js/frontend/utils/lightbox/lightbox-manager.js")); |
| 301 | + | |
| 256 | 302 | var _assetsLoader = _interopRequireDefault(__webpack_require__(/*! ./utils/assets-loader */ "../assets/dev/js/frontend/utils/assets-loader.js")); |
| 303 | + | |
| 257 | 304 | var _breakpoints = _interopRequireDefault(__webpack_require__(/*! elementor-utils/breakpoints */ "../assets/dev/js/utils/breakpoints.js")); |
| 305 | + | |
| 258 | 306 | var _events = _interopRequireDefault(__webpack_require__(/*! elementor-utils/events */ "../assets/dev/js/utils/events.js")); |
| 307 | + | |
| 259 | 308 | var _frontend = _interopRequireDefault(__webpack_require__(/*! elementor/modules/shapes/assets/js/frontend/frontend */ "../modules/shapes/assets/js/frontend/frontend.js")); |
| 260 | -var _controls = _interopRequireDefault(__webpack_require__(/*! ./utils/controls */ "../assets/dev/js/frontend/utils/controls.js")); | |
| 261 | -var _anchorScrollMargin = _interopRequireDefault(__webpack_require__(/*! ./utils/anchor-scroll-margin */ "../assets/dev/js/frontend/utils/anchor-scroll-margin.js")); | |
| 309 | + | |
| 262 | 310 | var _utils = __webpack_require__(/*! elementor-frontend/utils/utils */ "../assets/dev/js/frontend/utils/utils.js"); |
| 311 | + | |
| 263 | 312 | /* global elementorFrontendConfig */ |
| 313 | +const EventManager = __webpack_require__(/*! elementor-utils/hooks */ "../assets/dev/js/utils/hooks.js"), | |
| 314 | + ElementsHandler = __webpack_require__(/*! elementor-frontend/elements-handlers-manager */ "../assets/dev/js/frontend/elements-handlers-manager.js"), | |
| 315 | + AnchorsModule = __webpack_require__(/*! elementor-frontend/utils/anchors */ "../assets/dev/js/frontend/utils/anchors.js"); | |
| 264 | 316 | |
| 265 | -const EventManager = __webpack_require__(/*! elementor-utils/hooks */ "../assets/dev/js/utils/hooks.js"), | |
| 266 | - ElementsHandler = __webpack_require__(/*! elementor-frontend/elements-handlers-manager */ "../assets/dev/js/frontend/elements-handlers-manager.js"); | |
| 267 | 317 | class Frontend extends elementorModules.ViewModule { |
| 268 | - constructor(...args) { | |
| 269 | - super(...args); | |
| 318 | + constructor() { | |
| 319 | + super(...arguments); | |
| 270 | 320 | this.config = elementorFrontendConfig; |
| 271 | 321 | this.config.legacyMode = { |
| 272 | - /** | |
| 273 | - * @deprecated since 3.1.0 | |
| 274 | - */ | |
| 275 | 322 | get elementWrappers() { |
| 276 | 323 | if (elementorFrontend.isEditMode()) { |
| 277 | - window.top.elementorDevTools.deprecation.deprecated('elementorFrontend.config.legacyMode.elementWrappers', '3.1.0'); | |
| 324 | + window.top.elementorDevTools.deprecation.deprecated('elementorFrontend.config.legacyMode.elementWrappers', '3.1.0', 'elementorFrontend.config.experimentalFeatures.e_dom_optimization'); | |
| 278 | 325 | } |
| 279 | - return false; | |
| 326 | + | |
| 327 | + return !elementorFrontend.config.experimentalFeatures.e_dom_optimization; | |
| 280 | 328 | } |
| 329 | + | |
| 281 | 330 | }; |
| 282 | 331 | this.populateActiveBreakpointsConfig(); |
| 283 | - } | |
| 332 | + } // TODO: BC since 2.5.0 | |
| 284 | 333 | |
| 285 | - /** | |
| 286 | - * @deprecated since 2.5.0, use `elementorModules.frontend.handlers.Base` instead. | |
| 287 | - */ | |
| 334 | + | |
| 288 | 335 | get Module() { |
| 289 | 336 | if (this.isEditMode()) { |
| 290 | 337 | parent.elementorDevTools.deprecation.deprecated('elementorFrontend.Module', '2.5.0', 'elementorModules.frontend.handlers.Base'); |
| 291 | 338 | } |
| 339 | + | |
| 292 | 340 | return elementorModules.frontend.handlers.Base; |
| 293 | 341 | } |
| 342 | + | |
| 294 | 343 | getDefaultSettings() { |
| 295 | 344 | return { |
| 296 | 345 | selectors: { |
| 297 | 346 | elementor: '.elementor', |
| @@ -298,8 +347,9 @@ | ||
| 298 | 347 | adminBar: '#wpadminbar' |
| 299 | 348 | } |
| 300 | 349 | }; |
| 301 | 350 | } |
| 351 | + | |
| 302 | 352 | getDefaultElements() { |
| 303 | 353 | const defaultElements = { |
| 304 | 354 | window, |
| 305 | 355 | $window: jQuery(window), |
| @@ -313,75 +363,81 @@ | ||
| 313 | 363 | }; |
| 314 | 364 | defaultElements.$body.append(defaultElements.$deviceMode); |
| 315 | 365 | return defaultElements; |
| 316 | 366 | } |
| 367 | + | |
| 317 | 368 | bindEvents() { |
| 318 | 369 | this.elements.$window.on('resize', () => this.setDeviceModeData()); |
| 319 | 370 | } |
| 320 | - | |
| 321 | 371 | /** |
| 322 | 372 | * @param {string} elementName |
| 323 | - * @deprecated since 2.4.0, use `this.elements` instead. | |
| 373 | + * @deprecated 2.4.0 Use just `this.elements` instead | |
| 324 | 374 | */ |
| 375 | + | |
| 376 | + | |
| 325 | 377 | getElements(elementName) { |
| 326 | 378 | return this.getItems(this.elements, elementName); |
| 327 | 379 | } |
| 328 | - | |
| 329 | 380 | /** |
| 330 | 381 | * @param {string} settingName |
| 331 | - * @deprecated since 2.4.0, this method was never in use. | |
| 382 | + * @deprecated 2.4.0 This method was never in use | |
| 332 | 383 | */ |
| 384 | + | |
| 385 | + | |
| 333 | 386 | getPageSettings(settingName) { |
| 334 | 387 | const settingsObject = this.isEditMode() ? elementor.settings.page.model.attributes : this.config.settings.page; |
| 335 | 388 | return this.getItems(settingsObject, settingName); |
| 336 | 389 | } |
| 337 | 390 | |
| 338 | - /** | |
| 339 | - * @param {string} settingName | |
| 340 | - * @deprecated since 3.0.0, use `getKitSettings()` instead and remove the `elementor_` prefix. | |
| 341 | - */ | |
| 342 | 391 | getGeneralSettings(settingName) { |
| 343 | 392 | if (this.isEditMode()) { |
| 344 | - parent.elementorDevTools.deprecation.deprecated('getGeneralSettings()', '3.0.0', 'getKitSettings() and remove the `elementor_` prefix'); | |
| 393 | + parent.elementorDevTools.deprecation.deprecated('getGeneralSettings', '3.0.0', 'getKitSettings and remove the `elementor_` prefix'); | |
| 345 | 394 | } |
| 395 | + | |
| 346 | 396 | return this.getKitSettings(`elementor_${settingName}`); |
| 347 | 397 | } |
| 398 | + | |
| 348 | 399 | getKitSettings(settingName) { |
| 349 | 400 | // TODO: use Data API. |
| 350 | 401 | return this.getItems(this.config.kit, settingName); |
| 351 | 402 | } |
| 403 | + | |
| 352 | 404 | getCurrentDeviceMode() { |
| 353 | 405 | return getComputedStyle(this.elements.$deviceMode[0], ':after').content.replace(/"/g, ''); |
| 354 | 406 | } |
| 407 | + | |
| 355 | 408 | getDeviceSetting(deviceMode, settings, settingKey) { |
| 356 | 409 | // Add specific handling for widescreen since it is larger than desktop. |
| 357 | 410 | if ('widescreen' === deviceMode) { |
| 358 | 411 | return this.getWidescreenSetting(settings, settingKey); |
| 359 | 412 | } |
| 413 | + | |
| 360 | 414 | const devices = elementorFrontend.breakpoints.getActiveBreakpointsList({ |
| 361 | 415 | largeToSmall: true, |
| 362 | 416 | withDesktop: true |
| 363 | 417 | }); |
| 364 | 418 | let deviceIndex = devices.indexOf(deviceMode); |
| 419 | + | |
| 365 | 420 | while (deviceIndex > 0) { |
| 366 | 421 | const currentDevice = devices[deviceIndex], |
| 367 | - fullSettingKey = settingKey + '_' + currentDevice, | |
| 368 | - deviceValue = settings[fullSettingKey]; | |
| 422 | + fullSettingKey = settingKey + '_' + currentDevice, | |
| 423 | + deviceValue = settings[fullSettingKey]; // Accept 0 as value. | |
| 369 | 424 | |
| 370 | - // Accept 0 as value. | |
| 371 | 425 | if (deviceValue || 0 === deviceValue) { |
| 372 | 426 | return deviceValue; |
| 373 | 427 | } |
| 428 | + | |
| 374 | 429 | deviceIndex--; |
| 375 | 430 | } |
| 431 | + | |
| 376 | 432 | return settings[settingKey]; |
| 377 | 433 | } |
| 434 | + | |
| 378 | 435 | getWidescreenSetting(settings, settingKey) { |
| 379 | 436 | const deviceMode = 'widescreen', |
| 380 | - widescreenSettingKey = settingKey + '_' + deviceMode; | |
| 381 | - let settingToReturn; | |
| 437 | + widescreenSettingKey = settingKey + '_' + deviceMode; | |
| 438 | + let settingToReturn; // If the device mode is 'widescreen', and the setting exists - return it. | |
| 382 | 439 | |
| 383 | - // If the device mode is 'widescreen', and the setting exists - return it. | |
| 384 | 440 | if (settings[widescreenSettingKey]) { |
| 385 | 441 | settingToReturn = settings[widescreenSettingKey]; |
| 386 | 442 | } else { |
| 387 | 443 | // Otherwise, return the desktop setting |
| @@ -386,52 +442,61 @@ | ||
| 386 | 442 | } else { |
| 387 | 443 | // Otherwise, return the desktop setting |
| 388 | 444 | settingToReturn = settings[settingKey]; |
| 389 | 445 | } |
| 446 | + | |
| 390 | 447 | return settingToReturn; |
| 391 | 448 | } |
| 449 | + | |
| 392 | 450 | getCurrentDeviceSetting(settings, settingKey) { |
| 393 | 451 | return this.getDeviceSetting(elementorFrontend.getCurrentDeviceMode(), settings, settingKey); |
| 394 | 452 | } |
| 453 | + | |
| 395 | 454 | isEditMode() { |
| 396 | 455 | return this.config.environmentMode.edit; |
| 397 | 456 | } |
| 457 | + | |
| 398 | 458 | isWPPreviewMode() { |
| 399 | 459 | return this.config.environmentMode.wpPreview; |
| 400 | 460 | } |
| 461 | + | |
| 401 | 462 | initDialogsManager() { |
| 402 | 463 | let dialogsManager; |
| 464 | + | |
| 403 | 465 | this.getDialogsManager = () => { |
| 404 | 466 | if (!dialogsManager) { |
| 405 | 467 | dialogsManager = new DialogsManager.Instance(); |
| 406 | 468 | } |
| 469 | + | |
| 407 | 470 | return dialogsManager; |
| 408 | 471 | }; |
| 409 | 472 | } |
| 473 | + | |
| 410 | 474 | initOnReadyComponents() { |
| 411 | 475 | this.utils = { |
| 412 | 476 | youtube: new _youtubeLoader.default(), |
| 413 | 477 | vimeo: new _vimeoLoader.default(), |
| 414 | 478 | baseVideoLoader: new _baseLoader.default(), |
| 479 | + anchors: new AnchorsModule(), | |
| 480 | + | |
| 415 | 481 | get lightbox() { |
| 416 | 482 | return _lightboxManager.default.getLightbox(); |
| 417 | 483 | }, |
| 484 | + | |
| 418 | 485 | urlActions: new _urlActions.default(), |
| 419 | 486 | swiper: _swiper.default, |
| 420 | 487 | environment: _environment.default, |
| 421 | 488 | assetsLoader: new _assetsLoader.default(), |
| 422 | 489 | escapeHTML: _utils.escapeHTML, |
| 423 | - events: _events.default, | |
| 424 | - controls: new _controls.default(), | |
| 425 | - anchor_scroll_margin: new _anchorScrollMargin.default() | |
| 426 | - }; | |
| 490 | + events: _events.default | |
| 491 | + }; // TODO: BC since 2.4.0 | |
| 427 | 492 | |
| 428 | - // TODO: BC since 2.4.0 | |
| 429 | 493 | this.modules = { |
| 430 | 494 | StretchElement: elementorModules.frontend.tools.StretchElement, |
| 431 | 495 | Masonry: elementorModules.utils.Masonry |
| 432 | 496 | }; |
| 433 | 497 | this.elementsHandler.init(); |
| 498 | + | |
| 434 | 499 | if (this.isEditMode()) { |
| 435 | 500 | elementor.once('document:loaded', () => this.onDocumentLoaded()); |
| 436 | 501 | } else { |
| 437 | 502 | this.onDocumentLoaded(); |
| @@ -436,11 +501,13 @@ | ||
| 436 | 501 | } else { |
| 437 | 502 | this.onDocumentLoaded(); |
| 438 | 503 | } |
| 439 | 504 | } |
| 505 | + | |
| 440 | 506 | initOnReadyElements() { |
| 441 | 507 | this.elements.$wpAdminBar = this.elements.$document.find(this.getSettings('selectors.adminBar')); |
| 442 | 508 | } |
| 509 | + | |
| 443 | 510 | addUserAgentClasses() { |
| 444 | 511 | for (const [key, value] of Object.entries(_environment.default)) { |
| 445 | 512 | if (value) { |
| 446 | 513 | this.elements.$body.addClass('e--ua-' + key); |
| @@ -446,20 +513,25 @@ | ||
| 446 | 513 | this.elements.$body.addClass('e--ua-' + key); |
| 447 | 514 | } |
| 448 | 515 | } |
| 449 | 516 | } |
| 517 | + | |
| 450 | 518 | setDeviceModeData() { |
| 451 | 519 | this.elements.$body.attr('data-elementor-device-mode', this.getCurrentDeviceMode()); |
| 452 | 520 | } |
| 521 | + | |
| 453 | 522 | addListenerOnce(listenerID, event, callback, to) { |
| 454 | 523 | if (!to) { |
| 455 | 524 | to = this.elements.$window; |
| 456 | 525 | } |
| 526 | + | |
| 457 | 527 | if (!this.isEditMode()) { |
| 458 | 528 | to.on(event, callback); |
| 459 | 529 | return; |
| 460 | 530 | } |
| 531 | + | |
| 461 | 532 | this.removeListeners(listenerID, event, to); |
| 533 | + | |
| 462 | 534 | if (to instanceof jQuery) { |
| 463 | 535 | const eventNS = event + '.' + listenerID; |
| 464 | 536 | to.on(eventNS, callback); |
| 465 | 537 | } else { |
| @@ -465,12 +537,14 @@ | ||
| 465 | 537 | } else { |
| 466 | 538 | to.on(event, callback, listenerID); |
| 467 | 539 | } |
| 468 | 540 | } |
| 541 | + | |
| 469 | 542 | removeListeners(listenerID, event, callback, from) { |
| 470 | 543 | if (!from) { |
| 471 | 544 | from = this.elements.$window; |
| 472 | 545 | } |
| 546 | + | |
| 473 | 547 | if (from instanceof jQuery) { |
| 474 | 548 | const eventNS = event + '.' + listenerID; |
| 475 | 549 | from.off(eventNS, callback); |
| 476 | 550 | } else { |
| @@ -475,58 +549,87 @@ | ||
| 475 | 549 | from.off(eventNS, callback); |
| 476 | 550 | } else { |
| 477 | 551 | from.off(event, callback, listenerID); |
| 478 | 552 | } |
| 479 | - } | |
| 553 | + } // Based on underscore function | |
| 480 | 554 | |
| 481 | - // Based on underscore function | |
| 555 | + | |
| 482 | 556 | debounce(func, wait) { |
| 483 | 557 | let timeout; |
| 484 | 558 | return function () { |
| 485 | 559 | const context = this, |
| 486 | - args = arguments; | |
| 560 | + args = arguments; | |
| 561 | + | |
| 487 | 562 | const later = () => { |
| 488 | 563 | timeout = null; |
| 489 | 564 | func.apply(context, args); |
| 490 | 565 | }; |
| 566 | + | |
| 491 | 567 | const callNow = !timeout; |
| 492 | 568 | clearTimeout(timeout); |
| 493 | 569 | timeout = setTimeout(later, wait); |
| 570 | + | |
| 494 | 571 | if (callNow) { |
| 495 | 572 | func.apply(context, args); |
| 496 | 573 | } |
| 497 | 574 | }; |
| 498 | 575 | } |
| 576 | + | |
| 577 | + waypoint($element, callback, options) { | |
| 578 | + const defaultOptions = { | |
| 579 | + offset: '100%', | |
| 580 | + triggerOnce: true | |
| 581 | + }; | |
| 582 | + options = jQuery.extend(defaultOptions, options); | |
| 583 | + | |
| 584 | + const correctCallback = function () { | |
| 585 | + const element = this.element || this, | |
| 586 | + result = callback.apply(element, arguments); // If is Waypoint new API and is frontend | |
| 587 | + | |
| 588 | + if (options.triggerOnce && this.destroy) { | |
| 589 | + this.destroy(); | |
| 590 | + } | |
| 591 | + | |
| 592 | + return result; | |
| 593 | + }; | |
| 594 | + | |
| 595 | + return $element.elementorWaypoint(correctCallback, options); | |
| 596 | + } | |
| 597 | + | |
| 499 | 598 | muteMigrationTraces() { |
| 500 | 599 | jQuery.migrateMute = true; |
| 501 | 600 | jQuery.migrateTrace = false; |
| 502 | 601 | } |
| 503 | - | |
| 504 | 602 | /** |
| 505 | 603 | * Initialize the modules' widgets handlers. |
| 506 | 604 | */ |
| 605 | + | |
| 606 | + | |
| 507 | 607 | initModules() { |
| 508 | 608 | const handlers = { |
| 509 | 609 | shapes: _frontend.default |
| 510 | - }; | |
| 610 | + }; // TODO: BC - Deprecated since 3.5.0 | |
| 511 | 611 | |
| 512 | - // TODO: BC - Deprecated since 3.5.0 | |
| 513 | - elementorFrontend.trigger('elementor/modules/init:before'); | |
| 612 | + elementorFrontend.trigger('elementor/modules/init:before'); // TODO: Use this instead. | |
| 514 | 613 | |
| 515 | - // TODO: Use this instead. | |
| 516 | 614 | elementorFrontend.trigger('elementor/modules/init/before'); |
| 517 | - Object.entries(handlers).forEach(([moduleName, ModuleClass]) => { | |
| 615 | + Object.entries(handlers).forEach(_ref => { | |
| 616 | + let [moduleName, ModuleClass] = _ref; | |
| 518 | 617 | this.modulesHandlers[moduleName] = new ModuleClass(); |
| 519 | 618 | }); |
| 520 | 619 | } |
| 620 | + | |
| 521 | 621 | populateActiveBreakpointsConfig() { |
| 522 | 622 | this.config.responsive.activeBreakpoints = {}; |
| 523 | - Object.entries(this.config.responsive.breakpoints).forEach(([breakpointKey, breakpointData]) => { | |
| 623 | + Object.entries(this.config.responsive.breakpoints).forEach(_ref2 => { | |
| 624 | + let [breakpointKey, breakpointData] = _ref2; | |
| 625 | + | |
| 524 | 626 | if (breakpointData.is_enabled) { |
| 525 | 627 | this.config.responsive.activeBreakpoints[breakpointKey] = breakpointData; |
| 526 | 628 | } |
| 527 | 629 | }); |
| 528 | 630 | } |
| 631 | + | |
| 529 | 632 | init() { |
| 530 | 633 | this.hooks = new EventManager(); |
| 531 | 634 | this.breakpoints = new _breakpoints.default(this.config.responsive); |
| 532 | 635 | this.storage = new _storage.default(); |
| @@ -534,26 +637,32 @@ | ||
| 534 | 637 | this.modulesHandlers = {}; |
| 535 | 638 | this.addUserAgentClasses(); |
| 536 | 639 | this.setDeviceModeData(); |
| 537 | 640 | this.initDialogsManager(); |
| 641 | + | |
| 538 | 642 | if (this.isEditMode()) { |
| 539 | 643 | this.muteMigrationTraces(); |
| 540 | - } | |
| 644 | + } // Keep this line before `initOnReadyComponents` call | |
| 541 | 645 | |
| 542 | - // Keep this line before `initOnReadyComponents` call | |
| 646 | + | |
| 543 | 647 | _events.default.dispatch(this.elements.$window, 'elementor/frontend/init'); |
| 648 | + | |
| 544 | 649 | this.initModules(); |
| 545 | 650 | this.initOnReadyElements(); |
| 546 | 651 | this.initOnReadyComponents(); |
| 547 | 652 | } |
| 653 | + | |
| 548 | 654 | onDocumentLoaded() { |
| 549 | 655 | this.documentsManager = new _documentsManager.default(); |
| 550 | 656 | this.trigger('components:init'); |
| 551 | 657 | new _lightboxManager.default(); |
| 552 | 658 | } |
| 659 | + | |
| 553 | 660 | } |
| 661 | + | |
| 554 | 662 | exports["default"] = Frontend; |
| 555 | 663 | window.elementorFrontend = new Frontend(); |
| 664 | + | |
| 556 | 665 | if (!elementorFrontend.isEditMode()) { |
| 557 | 666 | jQuery(() => elementorFrontend.init()); |
| 558 | 667 | } |
| 559 | 668 | |
| @@ -558,62 +667,568 @@ | ||
| 558 | 667 | } |
| 559 | 668 | |
| 560 | 669 | /***/ }), |
| 561 | 670 | |
| 562 | -/***/ "../assets/dev/js/frontend/handlers/column.js": | |
| 563 | -/*!****************************************************!*\ | |
| 564 | - !*** ../assets/dev/js/frontend/handlers/column.js ***! | |
| 565 | - \****************************************************/ | |
| 671 | +/***/ "../assets/dev/js/frontend/handlers/background-slideshow.js": | |
| 672 | +/*!******************************************************************!*\ | |
| 673 | + !*** ../assets/dev/js/frontend/handlers/background-slideshow.js ***! | |
| 674 | + \******************************************************************/ | |
| 675 | +/***/ ((__unused_webpack_module, exports) => { | |
| 676 | + | |
| 677 | +"use strict"; | |
| 678 | + | |
| 679 | + | |
| 680 | +Object.defineProperty(exports, "__esModule", ({ | |
| 681 | + value: true | |
| 682 | +})); | |
| 683 | +exports["default"] = void 0; | |
| 684 | + | |
| 685 | +class BackgroundSlideshow extends elementorModules.frontend.handlers.SwiperBase { | |
| 686 | + getDefaultSettings() { | |
| 687 | + return { | |
| 688 | + classes: { | |
| 689 | + swiperContainer: 'elementor-background-slideshow swiper-container', | |
| 690 | + swiperWrapper: 'swiper-wrapper', | |
| 691 | + swiperSlide: 'elementor-background-slideshow__slide swiper-slide', | |
| 692 | + swiperPreloader: 'swiper-lazy-preloader', | |
| 693 | + slideBackground: 'elementor-background-slideshow__slide__image', | |
| 694 | + kenBurns: 'elementor-ken-burns', | |
| 695 | + kenBurnsActive: 'elementor-ken-burns--active', | |
| 696 | + kenBurnsIn: 'elementor-ken-burns--in', | |
| 697 | + kenBurnsOut: 'elementor-ken-burns--out' | |
| 698 | + } | |
| 699 | + }; | |
| 700 | + } | |
| 701 | + | |
| 702 | + getSwiperOptions() { | |
| 703 | + const elementSettings = this.getElementSettings(), | |
| 704 | + swiperOptions = { | |
| 705 | + grabCursor: false, | |
| 706 | + slidesPerView: 1, | |
| 707 | + slidesPerGroup: 1, | |
| 708 | + loop: 'yes' === elementSettings.background_slideshow_loop, | |
| 709 | + speed: elementSettings.background_slideshow_transition_duration, | |
| 710 | + autoplay: { | |
| 711 | + delay: elementSettings.background_slideshow_slide_duration, | |
| 712 | + stopOnLastSlide: !elementSettings.background_slideshow_loop | |
| 713 | + }, | |
| 714 | + handleElementorBreakpoints: true, | |
| 715 | + on: { | |
| 716 | + slideChange: () => { | |
| 717 | + if (elementSettings.background_slideshow_ken_burns) { | |
| 718 | + this.handleKenBurns(); | |
| 719 | + } | |
| 720 | + } | |
| 721 | + } | |
| 722 | + }; | |
| 723 | + | |
| 724 | + if ('yes' === elementSettings.background_slideshow_loop) { | |
| 725 | + swiperOptions.loopedSlides = this.getSlidesCount(); | |
| 726 | + } | |
| 727 | + | |
| 728 | + switch (elementSettings.background_slideshow_slide_transition) { | |
| 729 | + case 'fade': | |
| 730 | + swiperOptions.effect = 'fade'; | |
| 731 | + swiperOptions.fadeEffect = { | |
| 732 | + crossFade: true | |
| 733 | + }; | |
| 734 | + break; | |
| 735 | + | |
| 736 | + case 'slide_down': | |
| 737 | + swiperOptions.autoplay.reverseDirection = true; | |
| 738 | + swiperOptions.direction = 'vertical'; | |
| 739 | + break; | |
| 740 | + | |
| 741 | + case 'slide_up': | |
| 742 | + swiperOptions.direction = 'vertical'; | |
| 743 | + break; | |
| 744 | + } | |
| 745 | + | |
| 746 | + if ('yes' === elementSettings.background_slideshow_lazyload) { | |
| 747 | + swiperOptions.lazy = { | |
| 748 | + loadPrevNext: true, | |
| 749 | + loadPrevNextAmount: 1 | |
| 750 | + }; | |
| 751 | + } | |
| 752 | + | |
| 753 | + return swiperOptions; | |
| 754 | + } | |
| 755 | + | |
| 756 | + buildSwiperElements() { | |
| 757 | + const classes = this.getSettings('classes'), | |
| 758 | + elementSettings = this.getElementSettings(), | |
| 759 | + direction = 'slide_left' === elementSettings.background_slideshow_slide_transition ? 'ltr' : 'rtl', | |
| 760 | + $container = jQuery('<div>', { | |
| 761 | + class: classes.swiperContainer, | |
| 762 | + dir: direction | |
| 763 | + }), | |
| 764 | + $wrapper = jQuery('<div>', { | |
| 765 | + class: classes.swiperWrapper | |
| 766 | + }), | |
| 767 | + kenBurnsActive = elementSettings.background_slideshow_ken_burns, | |
| 768 | + lazyload = 'yes' === elementSettings.background_slideshow_lazyload; | |
| 769 | + let slideInnerClass = classes.slideBackground; | |
| 770 | + | |
| 771 | + if (kenBurnsActive) { | |
| 772 | + slideInnerClass += ' ' + classes.kenBurns; | |
| 773 | + const kenBurnsDirection = 'in' === elementSettings.background_slideshow_ken_burns_zoom_direction ? 'kenBurnsIn' : 'kenBurnsOut'; | |
| 774 | + slideInnerClass += ' ' + classes[kenBurnsDirection]; | |
| 775 | + } | |
| 776 | + | |
| 777 | + if (lazyload) { | |
| 778 | + slideInnerClass += ' swiper-lazy'; | |
| 779 | + } | |
| 780 | + | |
| 781 | + this.elements.$slides = jQuery(); | |
| 782 | + elementSettings.background_slideshow_gallery.forEach(slide => { | |
| 783 | + const $slide = jQuery('<div>', { | |
| 784 | + class: classes.swiperSlide | |
| 785 | + }); | |
| 786 | + let $slidebg; | |
| 787 | + | |
| 788 | + if (lazyload) { | |
| 789 | + const $slideloader = jQuery('<div>', { | |
| 790 | + class: classes.swiperPreloader | |
| 791 | + }); | |
| 792 | + $slidebg = jQuery('<div>', { | |
| 793 | + class: slideInnerClass, | |
| 794 | + 'data-background': slide.url | |
| 795 | + }); | |
| 796 | + $slidebg.append($slideloader); | |
| 797 | + } else { | |
| 798 | + $slidebg = jQuery('<div>', { | |
| 799 | + class: slideInnerClass, | |
| 800 | + style: 'background-image: url("' + slide.url + '");' | |
| 801 | + }); | |
| 802 | + } | |
| 803 | + | |
| 804 | + $slide.append($slidebg); | |
| 805 | + $wrapper.append($slide); | |
| 806 | + this.elements.$slides = this.elements.$slides.add($slide); | |
| 807 | + }); | |
| 808 | + $container.append($wrapper); | |
| 809 | + this.$element.prepend($container); | |
| 810 | + this.elements.$backgroundSlideShowContainer = $container; | |
| 811 | + } | |
| 812 | + | |
| 813 | + async initSlider() { | |
| 814 | + if (1 >= this.getSlidesCount()) { | |
| 815 | + return; | |
| 816 | + } | |
| 817 | + | |
| 818 | + const elementSettings = this.getElementSettings(); | |
| 819 | + const Swiper = elementorFrontend.utils.swiper; | |
| 820 | + this.swiper = await new Swiper(this.elements.$backgroundSlideShowContainer, this.getSwiperOptions()); // Expose the swiper instance in the frontend | |
| 821 | + | |
| 822 | + this.elements.$backgroundSlideShowContainer.data('swiper', this.swiper); | |
| 823 | + | |
| 824 | + if (elementSettings.background_slideshow_ken_burns) { | |
| 825 | + this.handleKenBurns(); | |
| 826 | + } | |
| 827 | + } | |
| 828 | + | |
| 829 | + activate() { | |
| 830 | + this.buildSwiperElements(); | |
| 831 | + this.initSlider(); | |
| 832 | + } | |
| 833 | + | |
| 834 | + deactivate() { | |
| 835 | + if (this.swiper) { | |
| 836 | + this.swiper.destroy(); | |
| 837 | + this.elements.$backgroundSlideShowContainer.remove(); | |
| 838 | + } | |
| 839 | + } | |
| 840 | + | |
| 841 | + run() { | |
| 842 | + if ('slideshow' === this.getElementSettings('background_background')) { | |
| 843 | + this.activate(); | |
| 844 | + } else { | |
| 845 | + this.deactivate(); | |
| 846 | + } | |
| 847 | + } | |
| 848 | + | |
| 849 | + onInit() { | |
| 850 | + super.onInit(); | |
| 851 | + | |
| 852 | + if (this.getElementSettings('background_slideshow_gallery')) { | |
| 853 | + this.run(); | |
| 854 | + } | |
| 855 | + } | |
| 856 | + | |
| 857 | + onDestroy() { | |
| 858 | + super.onDestroy(); | |
| 859 | + this.deactivate(); | |
| 860 | + } | |
| 861 | + | |
| 862 | + onElementChange(propertyName) { | |
| 863 | + if ('background_background' === propertyName) { | |
| 864 | + this.run(); | |
| 865 | + } | |
| 866 | + } | |
| 867 | + | |
| 868 | +} | |
| 869 | + | |
| 870 | +exports["default"] = BackgroundSlideshow; | |
| 871 | + | |
| 872 | +/***/ }), | |
| 873 | + | |
| 874 | +/***/ "../assets/dev/js/frontend/handlers/background-video.js": | |
| 875 | +/*!**************************************************************!*\ | |
| 876 | + !*** ../assets/dev/js/frontend/handlers/background-video.js ***! | |
| 877 | + \**************************************************************/ | |
| 878 | +/***/ ((__unused_webpack_module, exports) => { | |
| 879 | + | |
| 880 | +"use strict"; | |
| 881 | + | |
| 882 | + | |
| 883 | +Object.defineProperty(exports, "__esModule", ({ | |
| 884 | + value: true | |
| 885 | +})); | |
| 886 | +exports["default"] = void 0; | |
| 887 | + | |
| 888 | +class BackgroundVideo extends elementorModules.frontend.handlers.Base { | |
| 889 | + getDefaultSettings() { | |
| 890 | + return { | |
| 891 | + selectors: { | |
| 892 | + backgroundVideoContainer: '.elementor-background-video-container', | |
| 893 | + backgroundVideoEmbed: '.elementor-background-video-embed', | |
| 894 | + backgroundVideoHosted: '.elementor-background-video-hosted' | |
| 895 | + } | |
| 896 | + }; | |
| 897 | + } | |
| 898 | + | |
| 899 | + getDefaultElements() { | |
| 900 | + const selectors = this.getSettings('selectors'), | |
| 901 | + elements = { | |
| 902 | + $backgroundVideoContainer: this.$element.find(selectors.backgroundVideoContainer) | |
| 903 | + }; | |
| 904 | + elements.$backgroundVideoEmbed = elements.$backgroundVideoContainer.children(selectors.backgroundVideoEmbed); | |
| 905 | + elements.$backgroundVideoHosted = elements.$backgroundVideoContainer.children(selectors.backgroundVideoHosted); | |
| 906 | + return elements; | |
| 907 | + } | |
| 908 | + | |
| 909 | + calcVideosSize($video) { | |
| 910 | + let aspectRatioSetting = '16:9'; | |
| 911 | + | |
| 912 | + if ('vimeo' === this.videoType) { | |
| 913 | + aspectRatioSetting = $video[0].width + ':' + $video[0].height; | |
| 914 | + } | |
| 915 | + | |
| 916 | + const containerWidth = this.elements.$backgroundVideoContainer.outerWidth(), | |
| 917 | + containerHeight = this.elements.$backgroundVideoContainer.outerHeight(), | |
| 918 | + aspectRatioArray = aspectRatioSetting.split(':'), | |
| 919 | + aspectRatio = aspectRatioArray[0] / aspectRatioArray[1], | |
| 920 | + ratioWidth = containerWidth / aspectRatio, | |
| 921 | + ratioHeight = containerHeight * aspectRatio, | |
| 922 | + isWidthFixed = containerWidth / containerHeight > aspectRatio; | |
| 923 | + return { | |
| 924 | + width: isWidthFixed ? containerWidth : ratioHeight, | |
| 925 | + height: isWidthFixed ? ratioWidth : containerHeight | |
| 926 | + }; | |
| 927 | + } | |
| 928 | + | |
| 929 | + changeVideoSize() { | |
| 930 | + if (!('hosted' === this.videoType) && !this.player) { | |
| 931 | + return; | |
| 932 | + } | |
| 933 | + | |
| 934 | + let $video; | |
| 935 | + | |
| 936 | + if ('youtube' === this.videoType) { | |
| 937 | + $video = jQuery(this.player.getIframe()); | |
| 938 | + } else if ('vimeo' === this.videoType) { | |
| 939 | + $video = jQuery(this.player.element); | |
| 940 | + } else if ('hosted' === this.videoType) { | |
| 941 | + $video = this.elements.$backgroundVideoHosted; | |
| 942 | + } | |
| 943 | + | |
| 944 | + if (!$video) { | |
| 945 | + return; | |
| 946 | + } | |
| 947 | + | |
| 948 | + const size = this.calcVideosSize($video); | |
| 949 | + $video.width(size.width).height(size.height); | |
| 950 | + } | |
| 951 | + | |
| 952 | + startVideoLoop(firstTime) { | |
| 953 | + // If the section has been removed | |
| 954 | + if (!this.player.getIframe().contentWindow) { | |
| 955 | + return; | |
| 956 | + } | |
| 957 | + | |
| 958 | + const elementSettings = this.getElementSettings(), | |
| 959 | + startPoint = elementSettings.background_video_start || 0, | |
| 960 | + endPoint = elementSettings.background_video_end; | |
| 961 | + | |
| 962 | + if (elementSettings.background_play_once && !firstTime) { | |
| 963 | + this.player.stopVideo(); | |
| 964 | + return; | |
| 965 | + } | |
| 966 | + | |
| 967 | + this.player.seekTo(startPoint); | |
| 968 | + | |
| 969 | + if (endPoint) { | |
| 970 | + const durationToEnd = endPoint - startPoint + 1; | |
| 971 | + setTimeout(() => { | |
| 972 | + this.startVideoLoop(false); | |
| 973 | + }, durationToEnd * 1000); | |
| 974 | + } | |
| 975 | + } | |
| 976 | + | |
| 977 | + prepareVimeoVideo(Vimeo, videoLink) { | |
| 978 | + const elementSettings = this.getElementSettings(), | |
| 979 | + videoSize = this.elements.$backgroundVideoContainer.outerWidth(), | |
| 980 | + vimeoOptions = { | |
| 981 | + url: videoLink, | |
| 982 | + width: videoSize.width, | |
| 983 | + autoplay: true, | |
| 984 | + loop: !elementSettings.background_play_once, | |
| 985 | + transparent: false, | |
| 986 | + background: true, | |
| 987 | + muted: true | |
| 988 | + }; | |
| 989 | + this.player = new Vimeo.Player(this.elements.$backgroundVideoContainer, vimeoOptions); // Handle user-defined start/end times | |
| 990 | + | |
| 991 | + this.handleVimeoStartEndTimes(elementSettings); | |
| 992 | + this.player.ready().then(() => { | |
| 993 | + jQuery(this.player.element).addClass('elementor-background-video-embed'); | |
| 994 | + this.changeVideoSize(); | |
| 995 | + }); | |
| 996 | + } | |
| 997 | + | |
| 998 | + handleVimeoStartEndTimes(elementSettings) { | |
| 999 | + // If a start time is defined, set the start time | |
| 1000 | + if (elementSettings.background_video_start) { | |
| 1001 | + this.player.on('play', data => { | |
| 1002 | + if (0 === data.seconds) { | |
| 1003 | + this.player.setCurrentTime(elementSettings.background_video_start); | |
| 1004 | + } | |
| 1005 | + }); | |
| 1006 | + } | |
| 1007 | + | |
| 1008 | + this.player.on('timeupdate', data => { | |
| 1009 | + // If an end time is defined, handle ending the video | |
| 1010 | + if (elementSettings.background_video_end && elementSettings.background_video_end < data.seconds) { | |
| 1011 | + if (elementSettings.background_play_once) { | |
| 1012 | + // Stop at user-defined end time if not loop | |
| 1013 | + this.player.pause(); | |
| 1014 | + } else { | |
| 1015 | + // Go to start time if loop | |
| 1016 | + this.player.setCurrentTime(elementSettings.background_video_start); | |
| 1017 | + } | |
| 1018 | + } // If start time is defined but an end time is not, go to user-defined start time at video end. | |
| 1019 | + // Vimeo JS API has an 'ended' event, but it never fires when infinite loop is defined, so we | |
| 1020 | + // get the video duration (returns a promise) then use duration-0.5s as end time | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + this.player.getDuration().then(duration => { | |
| 1024 | + if (elementSettings.background_video_start && !elementSettings.background_video_end && data.seconds > duration - 0.5) { | |
| 1025 | + this.player.setCurrentTime(elementSettings.background_video_start); | |
| 1026 | + } | |
| 1027 | + }); | |
| 1028 | + }); | |
| 1029 | + } | |
| 1030 | + | |
| 1031 | + prepareYTVideo(YT, videoID) { | |
| 1032 | + const $backgroundVideoContainer = this.elements.$backgroundVideoContainer, | |
| 1033 | + elementSettings = this.getElementSettings(); | |
| 1034 | + let startStateCode = YT.PlayerState.PLAYING; // Since version 67, Chrome doesn't fire the `PLAYING` state at start time | |
| 1035 | + | |
| 1036 | + if (window.chrome) { | |
| 1037 | + startStateCode = YT.PlayerState.UNSTARTED; | |
| 1038 | + } | |
| 1039 | + | |
| 1040 | + const playerOptions = { | |
| 1041 | + videoId: videoID, | |
| 1042 | + events: { | |
| 1043 | + onReady: () => { | |
| 1044 | + this.player.mute(); | |
| 1045 | + this.changeVideoSize(); | |
| 1046 | + this.startVideoLoop(true); | |
| 1047 | + this.player.playVideo(); | |
| 1048 | + }, | |
| 1049 | + onStateChange: event => { | |
| 1050 | + switch (event.data) { | |
| 1051 | + case startStateCode: | |
| 1052 | + $backgroundVideoContainer.removeClass('elementor-invisible elementor-loading'); | |
| 1053 | + break; | |
| 1054 | + | |
| 1055 | + case YT.PlayerState.ENDED: | |
| 1056 | + this.player.seekTo(elementSettings.background_video_start || 0); | |
| 1057 | + | |
| 1058 | + if (elementSettings.background_play_once) { | |
| 1059 | + this.player.destroy(); | |
| 1060 | + } | |
| 1061 | + | |
| 1062 | + } | |
| 1063 | + } | |
| 1064 | + }, | |
| 1065 | + playerVars: { | |
| 1066 | + controls: 0, | |
| 1067 | + rel: 0, | |
| 1068 | + playsinline: 1 | |
| 1069 | + } | |
| 1070 | + }; // To handle CORS issues, when the default host is changed, the origin parameter has to be set. | |
| 1071 | + | |
| 1072 | + if (elementSettings.background_privacy_mode) { | |
| 1073 | + playerOptions.host = 'https://www.youtube-nocookie.com'; | |
| 1074 | + playerOptions.origin = window.location.hostname; | |
| 1075 | + } | |
| 1076 | + | |
| 1077 | + $backgroundVideoContainer.addClass('elementor-loading elementor-invisible'); | |
| 1078 | + this.player = new YT.Player(this.elements.$backgroundVideoEmbed[0], playerOptions); | |
| 1079 | + } | |
| 1080 | + | |
| 1081 | + activate() { | |
| 1082 | + let videoLink = this.getElementSettings('background_video_link'), | |
| 1083 | + videoID; | |
| 1084 | + const playOnce = this.getElementSettings('background_play_once'); | |
| 1085 | + | |
| 1086 | + if (-1 !== videoLink.indexOf('vimeo.com')) { | |
| 1087 | + this.videoType = 'vimeo'; | |
| 1088 | + this.apiProvider = elementorFrontend.utils.vimeo; | |
| 1089 | + } else if (videoLink.match(/^(?:https?:\/\/)?(?:www\.)?(?:m\.)?(?:youtu\.be\/|youtube\.com)/)) { | |
| 1090 | + this.videoType = 'youtube'; | |
| 1091 | + this.apiProvider = elementorFrontend.utils.youtube; | |
| 1092 | + } | |
| 1093 | + | |
| 1094 | + if (this.apiProvider) { | |
| 1095 | + videoID = this.apiProvider.getVideoIDFromURL(videoLink); | |
| 1096 | + this.apiProvider.onApiReady(apiObject => { | |
| 1097 | + if ('youtube' === this.videoType) { | |
| 1098 | + this.prepareYTVideo(apiObject, videoID); | |
| 1099 | + } | |
| 1100 | + | |
| 1101 | + if ('vimeo' === this.videoType) { | |
| 1102 | + this.prepareVimeoVideo(apiObject, videoLink); | |
| 1103 | + } | |
| 1104 | + }); | |
| 1105 | + } else { | |
| 1106 | + this.videoType = 'hosted'; | |
| 1107 | + const startTime = this.getElementSettings('background_video_start'), | |
| 1108 | + endTime = this.getElementSettings('background_video_end'); | |
| 1109 | + | |
| 1110 | + if (startTime || endTime) { | |
| 1111 | + videoLink += '#t=' + (startTime || 0) + (endTime ? ',' + endTime : ''); | |
| 1112 | + } | |
| 1113 | + | |
| 1114 | + this.elements.$backgroundVideoHosted.attr('src', videoLink).one('canplay', this.changeVideoSize.bind(this)); | |
| 1115 | + | |
| 1116 | + if (playOnce) { | |
| 1117 | + this.elements.$backgroundVideoHosted.on('ended', () => { | |
| 1118 | + this.elements.$backgroundVideoHosted.hide(); | |
| 1119 | + }); | |
| 1120 | + } | |
| 1121 | + } | |
| 1122 | + | |
| 1123 | + elementorFrontend.elements.$window.on('resize', this.changeVideoSize); | |
| 1124 | + } | |
| 1125 | + | |
| 1126 | + deactivate() { | |
| 1127 | + if ('youtube' === this.videoType && this.player.getIframe() || 'vimeo' === this.videoType) { | |
| 1128 | + this.player.destroy(); | |
| 1129 | + } else { | |
| 1130 | + this.elements.$backgroundVideoHosted.removeAttr('src').off('ended'); | |
| 1131 | + } | |
| 1132 | + | |
| 1133 | + elementorFrontend.elements.$window.off('resize', this.changeVideoSize); | |
| 1134 | + } | |
| 1135 | + | |
| 1136 | + run() { | |
| 1137 | + const elementSettings = this.getElementSettings(); | |
| 1138 | + | |
| 1139 | + if (!elementSettings.background_play_on_mobile && 'mobile' === elementorFrontend.getCurrentDeviceMode()) { | |
| 1140 | + return; | |
| 1141 | + } | |
| 1142 | + | |
| 1143 | + if ('video' === elementSettings.background_background && elementSettings.background_video_link) { | |
| 1144 | + this.activate(); | |
| 1145 | + } else { | |
| 1146 | + this.deactivate(); | |
| 1147 | + } | |
| 1148 | + } | |
| 1149 | + | |
| 1150 | + onInit() { | |
| 1151 | + super.onInit(...arguments); | |
| 1152 | + this.changeVideoSize = this.changeVideoSize.bind(this); | |
| 1153 | + this.run(); | |
| 1154 | + } | |
| 1155 | + | |
| 1156 | + onElementChange(propertyName) { | |
| 1157 | + if ('background_background' === propertyName) { | |
| 1158 | + this.run(); | |
| 1159 | + } | |
| 1160 | + } | |
| 1161 | + | |
| 1162 | +} | |
| 1163 | + | |
| 1164 | +exports["default"] = BackgroundVideo; | |
| 1165 | + | |
| 1166 | +/***/ }), | |
| 1167 | + | |
| 1168 | +/***/ "../assets/dev/js/frontend/handlers/background.js": | |
| 1169 | +/*!********************************************************!*\ | |
| 1170 | + !*** ../assets/dev/js/frontend/handlers/background.js ***! | |
| 1171 | + \********************************************************/ | |
| 566 | 1172 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 567 | 1173 | |
| 1174 | +"use strict"; | |
| 568 | 1175 | |
| 569 | 1176 | |
| 1177 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1178 | + | |
| 570 | 1179 | Object.defineProperty(exports, "__esModule", ({ |
| 571 | 1180 | value: true |
| 572 | 1181 | })); |
| 573 | 1182 | exports["default"] = void 0; |
| 574 | -var _default = exports["default"] = [() => __webpack_require__.e(/*! import() | shared-frontend-handlers */ "shared-frontend-handlers").then(__webpack_require__.bind(__webpack_require__, /*! ./background-slideshow */ "../assets/dev/js/frontend/handlers/background-slideshow.js"))]; | |
| 575 | 1183 | |
| 1184 | +var _backgroundSlideshow = _interopRequireDefault(__webpack_require__(/*! ./background-slideshow */ "../assets/dev/js/frontend/handlers/background-slideshow.js")); | |
| 1185 | + | |
| 1186 | +var _backgroundVideo = _interopRequireDefault(__webpack_require__(/*! ./background-video */ "../assets/dev/js/frontend/handlers/background-video.js")); | |
| 1187 | + | |
| 1188 | +var _default = [_backgroundSlideshow.default, _backgroundVideo.default]; | |
| 1189 | +exports["default"] = _default; | |
| 1190 | + | |
| 576 | 1191 | /***/ }), |
| 577 | 1192 | |
| 578 | -/***/ "../assets/dev/js/frontend/handlers/container/container.js": | |
| 579 | -/*!*****************************************************************!*\ | |
| 580 | - !*** ../assets/dev/js/frontend/handlers/container/container.js ***! | |
| 581 | - \*****************************************************************/ | |
| 1193 | +/***/ "../assets/dev/js/frontend/handlers/column.js": | |
| 1194 | +/*!****************************************************!*\ | |
| 1195 | + !*** ../assets/dev/js/frontend/handlers/column.js ***! | |
| 1196 | + \****************************************************/ | |
| 582 | 1197 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 583 | 1198 | |
| 1199 | +"use strict"; | |
| 584 | 1200 | |
| 585 | 1201 | |
| 1202 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1203 | + | |
| 586 | 1204 | Object.defineProperty(exports, "__esModule", ({ |
| 587 | 1205 | value: true |
| 588 | 1206 | })); |
| 589 | 1207 | exports["default"] = void 0; |
| 590 | -var _createEditorHandler = __webpack_require__(/*! ../create-editor-handler */ "../assets/dev/js/frontend/handlers/create-editor-handler.js"); | |
| 591 | -var _default = exports["default"] = [() => __webpack_require__.e(/*! import() | shared-frontend-handlers */ "shared-frontend-handlers").then(__webpack_require__.bind(__webpack_require__, /*! ../background-slideshow */ "../assets/dev/js/frontend/handlers/background-slideshow.js")), () => __webpack_require__.e(/*! import() | shared-frontend-handlers */ "shared-frontend-handlers").then(__webpack_require__.bind(__webpack_require__, /*! ../background-video */ "../assets/dev/js/frontend/handlers/background-video.js")), (0, _createEditorHandler.createEditorHandler)(() => __webpack_require__.e(/*! import() | shared-editor-handlers */ "shared-editor-handlers").then(__webpack_require__.bind(__webpack_require__, /*! ../handles-position */ "../assets/dev/js/frontend/handlers/handles-position.js"))), (0, _createEditorHandler.createEditorHandler)(() => __webpack_require__.e(/*! import() | container-editor-handlers */ "container-editor-handlers").then(__webpack_require__.bind(__webpack_require__, /*! ./shapes */ "../assets/dev/js/frontend/handlers/container/shapes.js"))), (0, _createEditorHandler.createEditorHandler)(() => __webpack_require__.e(/*! import() | container-editor-handlers */ "container-editor-handlers").then(__webpack_require__.bind(__webpack_require__, /*! ./grid-container */ "../assets/dev/js/frontend/handlers/container/grid-container.js")))]; | |
| 592 | 1208 | |
| 1209 | +var _backgroundSlideshow = _interopRequireDefault(__webpack_require__(/*! ./background-slideshow */ "../assets/dev/js/frontend/handlers/background-slideshow.js")); | |
| 1210 | + | |
| 1211 | +var _default = [_backgroundSlideshow.default]; | |
| 1212 | +exports["default"] = _default; | |
| 1213 | + | |
| 593 | 1214 | /***/ }), |
| 594 | 1215 | |
| 595 | -/***/ "../assets/dev/js/frontend/handlers/create-editor-handler.js": | |
| 596 | -/*!*******************************************************************!*\ | |
| 597 | - !*** ../assets/dev/js/frontend/handlers/create-editor-handler.js ***! | |
| 598 | - \*******************************************************************/ | |
| 599 | -/***/ ((__unused_webpack_module, exports) => { | |
| 1216 | +/***/ "../assets/dev/js/frontend/handlers/container/container.js": | |
| 1217 | +/*!*****************************************************************!*\ | |
| 1218 | + !*** ../assets/dev/js/frontend/handlers/container/container.js ***! | |
| 1219 | + \*****************************************************************/ | |
| 1220 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 600 | 1221 | |
| 1222 | +"use strict"; | |
| 601 | 1223 | |
| 602 | 1224 | |
| 603 | 1225 | Object.defineProperty(exports, "__esModule", ({ |
| 604 | 1226 | value: true |
| 605 | 1227 | })); |
| 606 | -exports.createEditorHandler = createEditorHandler; | |
| 607 | -function createEditorHandler(importer) { | |
| 608 | - return () => { | |
| 609 | - return new Promise(resolve => { | |
| 610 | - if (elementorFrontend.isEditMode()) { | |
| 611 | - importer().then(resolve); | |
| 612 | - } | |
| 613 | - }); | |
| 614 | - }; | |
| 615 | -} | |
| 1228 | +exports["default"] = void 0; | |
| 1229 | +var _default = [() => __webpack_require__.e(/*! import() | container */ "container").then(__webpack_require__.bind(__webpack_require__, /*! ./handles-position */ "../assets/dev/js/frontend/handlers/container/handles-position.js")), () => __webpack_require__.e(/*! import() | container */ "container").then(__webpack_require__.bind(__webpack_require__, /*! ./shapes */ "../assets/dev/js/frontend/handlers/container/shapes.js"))]; | |
| 1230 | +exports["default"] = _default; | |
| 616 | 1231 | |
| 617 | 1232 | /***/ }), |
| 618 | 1233 | |
| 619 | 1234 | /***/ "../assets/dev/js/frontend/handlers/global.js": |
| @@ -621,8 +1236,9 @@ | ||
| 621 | 1236 | !*** ../assets/dev/js/frontend/handlers/global.js ***! |
| 622 | 1237 | \****************************************************/ |
| 623 | 1238 | /***/ ((__unused_webpack_module, exports) => { |
| 624 | 1239 | |
| 1240 | +"use strict"; | |
| 625 | 1241 | |
| 626 | 1242 | |
| 627 | 1243 | Object.defineProperty(exports, "__esModule", ({ |
| 628 | 1244 | value: true |
| @@ -627,35 +1243,44 @@ | ||
| 627 | 1243 | Object.defineProperty(exports, "__esModule", ({ |
| 628 | 1244 | value: true |
| 629 | 1245 | })); |
| 630 | 1246 | exports["default"] = void 0; |
| 1247 | + | |
| 631 | 1248 | class GlobalHandler extends elementorModules.frontend.handlers.Base { |
| 632 | 1249 | getWidgetType() { |
| 633 | 1250 | return 'global'; |
| 634 | 1251 | } |
| 1252 | + | |
| 635 | 1253 | animate() { |
| 636 | 1254 | const $element = this.$element, |
| 637 | - animation = this.getAnimation(); | |
| 1255 | + animation = this.getAnimation(); | |
| 1256 | + | |
| 638 | 1257 | if ('none' === animation) { |
| 639 | 1258 | $element.removeClass('elementor-invisible'); |
| 640 | 1259 | return; |
| 641 | 1260 | } |
| 1261 | + | |
| 642 | 1262 | const elementSettings = this.getElementSettings(), |
| 643 | - animationDelay = elementSettings._animation_delay || elementSettings.animation_delay || 0; | |
| 1263 | + animationDelay = elementSettings._animation_delay || elementSettings.animation_delay || 0; | |
| 644 | 1264 | $element.removeClass(animation); |
| 1265 | + | |
| 645 | 1266 | if (this.currentAnimation) { |
| 646 | 1267 | $element.removeClass(this.currentAnimation); |
| 647 | 1268 | } |
| 1269 | + | |
| 648 | 1270 | this.currentAnimation = animation; |
| 649 | 1271 | setTimeout(() => { |
| 650 | 1272 | $element.removeClass('elementor-invisible').addClass('animated ' + animation); |
| 651 | 1273 | }, animationDelay); |
| 652 | 1274 | } |
| 1275 | + | |
| 653 | 1276 | getAnimation() { |
| 654 | 1277 | return this.getCurrentDeviceSetting('animation') || this.getCurrentDeviceSetting('_animation'); |
| 655 | 1278 | } |
| 656 | - onInit(...args) { | |
| 657 | - super.onInit(...args); | |
| 1279 | + | |
| 1280 | + onInit() { | |
| 1281 | + super.onInit(...arguments); | |
| 1282 | + | |
| 658 | 1283 | if (this.getAnimation()) { |
| 659 | 1284 | const observer = elementorModules.utils.Scroll.scrollObserver({ |
| 660 | 1285 | callback: event => { |
| 661 | 1286 | if (event.isInViewport) { |
| @@ -666,29 +1291,34 @@ | ||
| 666 | 1291 | }); |
| 667 | 1292 | observer.observe(this.$element[0]); |
| 668 | 1293 | } |
| 669 | 1294 | } |
| 1295 | + | |
| 670 | 1296 | onElementChange(propertyName) { |
| 671 | 1297 | if (/^_?animation/.test(propertyName)) { |
| 672 | 1298 | this.animate(); |
| 673 | 1299 | } |
| 674 | 1300 | } |
| 1301 | + | |
| 675 | 1302 | } |
| 1303 | + | |
| 676 | 1304 | var _default = $scope => { |
| 677 | 1305 | elementorFrontend.elementsHandler.addHandler(GlobalHandler, { |
| 678 | 1306 | $element: $scope |
| 679 | 1307 | }); |
| 680 | 1308 | }; |
| 1309 | + | |
| 681 | 1310 | exports["default"] = _default; |
| 682 | 1311 | |
| 683 | 1312 | /***/ }), |
| 684 | 1313 | |
| 685 | -/***/ "../assets/dev/js/frontend/handlers/section/section.js": | |
| 686 | -/*!*************************************************************!*\ | |
| 687 | - !*** ../assets/dev/js/frontend/handlers/section/section.js ***! | |
| 688 | - \*************************************************************/ | |
| 689 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1314 | +/***/ "../assets/dev/js/frontend/handlers/section/handles-position.js": | |
| 1315 | +/*!**********************************************************************!*\ | |
| 1316 | + !*** ../assets/dev/js/frontend/handlers/section/handles-position.js ***! | |
| 1317 | + \**********************************************************************/ | |
| 1318 | +/***/ ((__unused_webpack_module, exports) => { | |
| 690 | 1319 | |
| 1320 | +"use strict"; | |
| 691 | 1321 | |
| 692 | 1322 | |
| 693 | 1323 | Object.defineProperty(exports, "__esModule", ({ |
| 694 | 1324 | value: true |
| @@ -693,21 +1323,89 @@ | ||
| 693 | 1323 | Object.defineProperty(exports, "__esModule", ({ |
| 694 | 1324 | value: true |
| 695 | 1325 | })); |
| 696 | 1326 | exports["default"] = void 0; |
| 697 | -var _createEditorHandler = __webpack_require__(/*! ../create-editor-handler */ "../assets/dev/js/frontend/handlers/create-editor-handler.js"); | |
| 698 | -var _default = exports["default"] = [() => __webpack_require__.e(/*! import() | section-frontend-handlers */ "section-frontend-handlers").then(__webpack_require__.bind(__webpack_require__, /*! ./stretched-section */ "../assets/dev/js/frontend/handlers/section/stretched-section.js")), | |
| 699 | -// Must run before BackgroundSlideshow to init the slideshow only after the stretch. | |
| 700 | -() => __webpack_require__.e(/*! import() | shared-frontend-handlers */ "shared-frontend-handlers").then(__webpack_require__.bind(__webpack_require__, /*! ../background-slideshow */ "../assets/dev/js/frontend/handlers/background-slideshow.js")), () => __webpack_require__.e(/*! import() | shared-frontend-handlers */ "shared-frontend-handlers").then(__webpack_require__.bind(__webpack_require__, /*! ../background-video */ "../assets/dev/js/frontend/handlers/background-video.js")), (0, _createEditorHandler.createEditorHandler)(() => __webpack_require__.e(/*! import() | shared-editor-handlers */ "shared-editor-handlers").then(__webpack_require__.bind(__webpack_require__, /*! ../handles-position */ "../assets/dev/js/frontend/handlers/handles-position.js"))), (0, _createEditorHandler.createEditorHandler)(() => __webpack_require__.e(/*! import() | section-editor-handlers */ "section-editor-handlers").then(__webpack_require__.bind(__webpack_require__, /*! ./shapes */ "../assets/dev/js/frontend/handlers/section/shapes.js")))]; | |
| 701 | 1327 | |
| 1328 | +class HandlesPosition extends elementorModules.frontend.handlers.Base { | |
| 1329 | + isActive() { | |
| 1330 | + return elementorFrontend.isEditMode(); | |
| 1331 | + } | |
| 1332 | + | |
| 1333 | + isFirstSection() { | |
| 1334 | + return this.$element[0] === document.querySelector('.elementor-edit-mode .elementor-top-section'); | |
| 1335 | + } | |
| 1336 | + | |
| 1337 | + isOverflowHidden() { | |
| 1338 | + return 'hidden' === this.$element.css('overflow'); | |
| 1339 | + } | |
| 1340 | + | |
| 1341 | + getOffset() { | |
| 1342 | + if ('body' === elementor.config.document.container) { | |
| 1343 | + return this.$element.offset().top; | |
| 1344 | + } | |
| 1345 | + | |
| 1346 | + const $container = jQuery(elementor.config.document.container); | |
| 1347 | + return this.$element.offset().top - $container.offset().top; | |
| 1348 | + } | |
| 1349 | + | |
| 1350 | + setHandlesPosition() { | |
| 1351 | + const document = elementor.documents.getCurrent(); | |
| 1352 | + | |
| 1353 | + if (!document || !document.container.isEditable()) { | |
| 1354 | + return; | |
| 1355 | + } | |
| 1356 | + | |
| 1357 | + const insideHandleClass = 'elementor-section--handles-inside'; | |
| 1358 | + | |
| 1359 | + if (elementor.settings.page.model.attributes.scroll_snap) { | |
| 1360 | + this.$element.addClass(insideHandleClass); | |
| 1361 | + return; | |
| 1362 | + } | |
| 1363 | + | |
| 1364 | + const isOverflowHidden = this.isOverflowHidden(); | |
| 1365 | + | |
| 1366 | + if (!isOverflowHidden && !this.isFirstSection()) { | |
| 1367 | + return; | |
| 1368 | + } | |
| 1369 | + | |
| 1370 | + const offset = isOverflowHidden ? 0 : this.getOffset(); | |
| 1371 | + | |
| 1372 | + if (offset < 25) { | |
| 1373 | + this.$element.addClass(insideHandleClass); | |
| 1374 | + const $handlesElement = this.$element.find('> .elementor-element-overlay > .elementor-editor-section-settings'); | |
| 1375 | + | |
| 1376 | + if (offset < -5) { | |
| 1377 | + $handlesElement.css('top', -offset); | |
| 1378 | + } else { | |
| 1379 | + $handlesElement.css('top', ''); | |
| 1380 | + } | |
| 1381 | + } else { | |
| 1382 | + this.$element.removeClass(insideHandleClass); | |
| 1383 | + } | |
| 1384 | + } | |
| 1385 | + | |
| 1386 | + onInit() { | |
| 1387 | + if (!this.isActive()) { | |
| 1388 | + return; | |
| 1389 | + } | |
| 1390 | + | |
| 1391 | + this.setHandlesPosition(); | |
| 1392 | + this.$element.on('mouseenter', this.setHandlesPosition.bind(this)); | |
| 1393 | + } | |
| 1394 | + | |
| 1395 | +} | |
| 1396 | + | |
| 1397 | +exports["default"] = HandlesPosition; | |
| 1398 | + | |
| 702 | 1399 | /***/ }), |
| 703 | 1400 | |
| 704 | -/***/ "../assets/dev/js/frontend/utils/anchor-scroll-margin.js": | |
| 705 | -/*!***************************************************************!*\ | |
| 706 | - !*** ../assets/dev/js/frontend/utils/anchor-scroll-margin.js ***! | |
| 707 | - \***************************************************************/ | |
| 708 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1401 | +/***/ "../assets/dev/js/frontend/handlers/section/shapes.js": | |
| 1402 | +/*!************************************************************!*\ | |
| 1403 | + !*** ../assets/dev/js/frontend/handlers/section/shapes.js ***! | |
| 1404 | + \************************************************************/ | |
| 1405 | +/***/ ((__unused_webpack_module, exports) => { | |
| 709 | 1406 | |
| 1407 | +"use strict"; | |
| 710 | 1408 | |
| 711 | 1409 | |
| 712 | 1410 | Object.defineProperty(exports, "__esModule", ({ |
| 713 | 1411 | value: true |
| @@ -712,138 +1410,298 @@ | ||
| 712 | 1410 | Object.defineProperty(exports, "__esModule", ({ |
| 713 | 1411 | value: true |
| 714 | 1412 | })); |
| 715 | 1413 | exports["default"] = void 0; |
| 716 | -__webpack_require__(/*! core-js/modules/es.array.push.js */ "../node_modules/core-js/modules/es.array.push.js"); | |
| 717 | -__webpack_require__(/*! core-js/modules/esnext.iterator.constructor.js */ "../node_modules/core-js/modules/esnext.iterator.constructor.js"); | |
| 718 | -__webpack_require__(/*! core-js/modules/esnext.iterator.filter.js */ "../node_modules/core-js/modules/esnext.iterator.filter.js"); | |
| 719 | -__webpack_require__(/*! core-js/modules/esnext.iterator.for-each.js */ "../node_modules/core-js/modules/esnext.iterator.for-each.js"); | |
| 720 | -class _default extends elementorModules.ViewModule { | |
| 1414 | + | |
| 1415 | +class Shapes extends elementorModules.frontend.handlers.Base { | |
| 721 | 1416 | getDefaultSettings() { |
| 722 | 1417 | return { |
| 723 | 1418 | selectors: { |
| 724 | - links: '.elementor-element a[href*="#"]', | |
| 725 | - stickyElements: '.elementor-element.elementor-sticky' | |
| 726 | - } | |
| 1419 | + container: '> .elementor-shape-%s' | |
| 1420 | + }, | |
| 1421 | + svgURL: elementorFrontend.config.urls.assets + 'shapes/' | |
| 727 | 1422 | }; |
| 728 | 1423 | } |
| 729 | - onInit() { | |
| 730 | - this.observeStickyElements(() => { | |
| 731 | - this.initializeStickyAndAnchorTracking(); | |
| 732 | - }); | |
| 1424 | + | |
| 1425 | + getDefaultElements() { | |
| 1426 | + const elements = {}, | |
| 1427 | + selectors = this.getSettings('selectors'); | |
| 1428 | + elements.$topContainer = this.$element.find(selectors.container.replace('%s', 'top')); | |
| 1429 | + elements.$bottomContainer = this.$element.find(selectors.container.replace('%s', 'bottom')); | |
| 1430 | + return elements; | |
| 733 | 1431 | } |
| 734 | - observeStickyElements(callback) { | |
| 735 | - const observer = new MutationObserver(mutationsList => { | |
| 736 | - for (const mutation of mutationsList) { | |
| 737 | - if ('childList' === mutation.type || 'attributes' === mutation.type && mutation.target.classList.contains('elementor-sticky')) { | |
| 738 | - callback(); | |
| 739 | - } | |
| 1432 | + | |
| 1433 | + isActive() { | |
| 1434 | + return elementorFrontend.isEditMode(); | |
| 1435 | + } | |
| 1436 | + | |
| 1437 | + getSvgURL(shapeType, fileName) { | |
| 1438 | + let svgURL = this.getSettings('svgURL') + fileName + '.svg'; | |
| 1439 | + | |
| 1440 | + if (elementor.config.additional_shapes && shapeType in elementor.config.additional_shapes) { | |
| 1441 | + svgURL = elementor.config.additional_shapes[shapeType]; | |
| 1442 | + | |
| 1443 | + if (-1 < fileName.indexOf('-negative')) { | |
| 1444 | + svgURL = svgURL.replace('.svg', '-negative.svg'); | |
| 740 | 1445 | } |
| 741 | - }); | |
| 742 | - observer.observe(document.body, { | |
| 743 | - childList: true, | |
| 744 | - subtree: true, | |
| 745 | - attributes: true, | |
| 746 | - attributeFilter: ['class', 'style'] | |
| 747 | - }); | |
| 1446 | + } | |
| 1447 | + | |
| 1448 | + return svgURL; | |
| 748 | 1449 | } |
| 749 | - initializeStickyAndAnchorTracking() { | |
| 750 | - const anchorLinks = this.getAllAnchorLinks(); | |
| 751 | - const stickyElements = this.getAllStickyElements(); | |
| 752 | - const trackedElements = []; | |
| 753 | - if (!stickyElements.length > 0 && !anchorLinks.length > 0) { | |
| 1450 | + | |
| 1451 | + buildSVG(side) { | |
| 1452 | + const baseSettingKey = 'shape_divider_' + side, | |
| 1453 | + shapeType = this.getElementSettings(baseSettingKey), | |
| 1454 | + $svgContainer = this.elements['$' + side + 'Container']; | |
| 1455 | + $svgContainer.attr('data-shape', shapeType); | |
| 1456 | + | |
| 1457 | + if (!shapeType) { | |
| 1458 | + $svgContainer.empty(); // Shape-divider set to 'none' | |
| 1459 | + | |
| 754 | 1460 | return; |
| 755 | 1461 | } |
| 756 | - this.trackStickyElements(stickyElements, trackedElements); | |
| 757 | - this.trackAnchorLinks(anchorLinks, trackedElements); | |
| 758 | - this.organizeStickyAndAnchors(trackedElements); | |
| 1462 | + | |
| 1463 | + let fileName = shapeType; | |
| 1464 | + | |
| 1465 | + if (this.getElementSettings(baseSettingKey + '_negative')) { | |
| 1466 | + fileName += '-negative'; | |
| 1467 | + } | |
| 1468 | + | |
| 1469 | + const svgURL = this.getSvgURL(shapeType, fileName); | |
| 1470 | + jQuery.get(svgURL, data => { | |
| 1471 | + $svgContainer.empty().append(data.childNodes[0]); | |
| 1472 | + }); | |
| 1473 | + this.setNegative(side); | |
| 759 | 1474 | } |
| 760 | - trackAnchorLinks(anchorLinks, trackedElements) { | |
| 761 | - anchorLinks.forEach(element => { | |
| 762 | - const target = this.getAnchorTarget(element); | |
| 763 | - const scrollPosition = this.getScrollPosition(target); | |
| 764 | - trackedElements.push({ | |
| 765 | - element: target, | |
| 766 | - type: 'anchor', | |
| 767 | - scrollPosition | |
| 768 | - }); | |
| 769 | - }); | |
| 1475 | + | |
| 1476 | + setNegative(side) { | |
| 1477 | + this.elements['$' + side + 'Container'].attr('data-negative', !!this.getElementSettings('shape_divider_' + side + '_negative')); | |
| 770 | 1478 | } |
| 771 | - trackStickyElements(stickyElements, trackedElements) { | |
| 772 | - stickyElements.forEach(element => { | |
| 773 | - const settings = this.getElementSettings(element); | |
| 774 | - if (!settings || !settings.sticky_anchor_link_offset) { | |
| 775 | - return; | |
| 1479 | + | |
| 1480 | + onInit() { | |
| 1481 | + if (!this.isActive(this.getSettings())) { | |
| 1482 | + return; | |
| 1483 | + } | |
| 1484 | + | |
| 1485 | + super.onInit(...arguments); | |
| 1486 | + ['top', 'bottom'].forEach(side => { | |
| 1487 | + if (this.getElementSettings('shape_divider_' + side)) { | |
| 1488 | + this.buildSVG(side); | |
| 776 | 1489 | } |
| 777 | - const { | |
| 778 | - sticky_anchor_link_offset: scrollMarginTop | |
| 779 | - } = settings; | |
| 780 | - if (0 === scrollMarginTop) { | |
| 781 | - return; | |
| 782 | - } | |
| 783 | - const scrollPosition = this.getScrollPosition(element); | |
| 784 | - trackedElements.push({ | |
| 785 | - scrollMarginTop, | |
| 786 | - type: 'sticky', | |
| 787 | - scrollPosition | |
| 788 | - }); | |
| 789 | 1490 | }); |
| 790 | 1491 | } |
| 791 | - organizeStickyAndAnchors(elements) { | |
| 792 | - const stickyList = this.filterAndSortElementsByType(elements, 'sticky'); | |
| 793 | - const anchorList = this.filterAndSortElementsByType(elements, 'anchor'); | |
| 794 | - stickyList.forEach((sticky, index) => { | |
| 795 | - this.defineCurrentStickyRange(sticky, index, stickyList, anchorList); | |
| 796 | - }); | |
| 1492 | + | |
| 1493 | + onElementChange(propertyName) { | |
| 1494 | + const shapeChange = propertyName.match(/^shape_divider_(top|bottom)$/); | |
| 1495 | + | |
| 1496 | + if (shapeChange) { | |
| 1497 | + this.buildSVG(shapeChange[1]); | |
| 1498 | + return; | |
| 1499 | + } | |
| 1500 | + | |
| 1501 | + const negativeChange = propertyName.match(/^shape_divider_(top|bottom)_negative$/); | |
| 1502 | + | |
| 1503 | + if (negativeChange) { | |
| 1504 | + this.buildSVG(negativeChange[1]); | |
| 1505 | + this.setNegative(negativeChange[1]); | |
| 1506 | + } | |
| 797 | 1507 | } |
| 798 | - defineCurrentStickyRange(sticky, index, stickyList, anchorList) { | |
| 799 | - const nextStickyScrollPosition = index + 1 < stickyList.length ? stickyList[index + 1].scrollPosition : Infinity; | |
| 800 | - sticky.anchor = anchorList.filter(anchor => { | |
| 801 | - const withinRange = anchor.scrollPosition > sticky.scrollPosition && anchor.scrollPosition < nextStickyScrollPosition; | |
| 802 | - if (withinRange) { | |
| 803 | - anchor.element.style.scrollMarginTop = `${sticky.scrollMarginTop}px`; | |
| 804 | - } | |
| 805 | - return withinRange; | |
| 806 | - }); | |
| 1508 | + | |
| 1509 | +} | |
| 1510 | + | |
| 1511 | +exports["default"] = Shapes; | |
| 1512 | + | |
| 1513 | +/***/ }), | |
| 1514 | + | |
| 1515 | +/***/ "../assets/dev/js/frontend/handlers/section/stretched-section.js": | |
| 1516 | +/*!***********************************************************************!*\ | |
| 1517 | + !*** ../assets/dev/js/frontend/handlers/section/stretched-section.js ***! | |
| 1518 | + \***********************************************************************/ | |
| 1519 | +/***/ ((__unused_webpack_module, exports) => { | |
| 1520 | + | |
| 1521 | +"use strict"; | |
| 1522 | + | |
| 1523 | + | |
| 1524 | +Object.defineProperty(exports, "__esModule", ({ | |
| 1525 | + value: true | |
| 1526 | +})); | |
| 1527 | +exports["default"] = void 0; | |
| 1528 | + | |
| 1529 | +class StretchedSection extends elementorModules.frontend.handlers.Base { | |
| 1530 | + bindEvents() { | |
| 1531 | + const handlerID = this.getUniqueHandlerID(); | |
| 1532 | + elementorFrontend.addListenerOnce(handlerID, 'resize', this.stretch); | |
| 1533 | + elementorFrontend.addListenerOnce(handlerID, 'sticky:stick', this.stretch, this.$element); | |
| 1534 | + elementorFrontend.addListenerOnce(handlerID, 'sticky:unstick', this.stretch, this.$element); | |
| 1535 | + | |
| 1536 | + if (elementorFrontend.isEditMode()) { | |
| 1537 | + this.onKitChangeStretchContainerChange = this.onKitChangeStretchContainerChange.bind(this); | |
| 1538 | + elementor.channels.editor.on('kit:change:stretchContainer', this.onKitChangeStretchContainerChange); | |
| 1539 | + } | |
| 807 | 1540 | } |
| 808 | - getScrollPosition(element) { | |
| 809 | - let offsetTop = 0; | |
| 810 | - while (element) { | |
| 811 | - offsetTop += element.offsetTop; | |
| 812 | - element = element.offsetParent; | |
| 1541 | + | |
| 1542 | + unbindEvents() { | |
| 1543 | + elementorFrontend.removeListeners(this.getUniqueHandlerID(), 'resize', this.stretch); | |
| 1544 | + | |
| 1545 | + if (elementorFrontend.isEditMode()) { | |
| 1546 | + elementor.channels.editor.off('kit:change:stretchContainer', this.onKitChangeStretchContainerChange); | |
| 813 | 1547 | } |
| 814 | - return offsetTop; | |
| 815 | 1548 | } |
| 816 | - getAllStickyElements() { | |
| 817 | - const allStickyElements = document.querySelectorAll(this.getSettings('selectors.stickyElements')); | |
| 818 | - return Array.from(allStickyElements).filter((anchor, index, self) => index === self.findIndex(t => t.getAttribute('data-id') === anchor.getAttribute('data-id'))); | |
| 1549 | + | |
| 1550 | + isActive(settings) { | |
| 1551 | + return elementorFrontend.isEditMode() || settings.$element.hasClass('elementor-section-stretched'); | |
| 819 | 1552 | } |
| 820 | - getAllAnchorLinks() { | |
| 821 | - const allAnchors = document.querySelectorAll(this.getSettings('selectors.links')); | |
| 822 | - return Array.from(allAnchors).filter((anchor, index, self) => index === self.findIndex(t => t.getAttribute('href') === anchor.getAttribute('href'))); | |
| 1553 | + | |
| 1554 | + initStretch() { | |
| 1555 | + this.stretch = this.stretch.bind(this); | |
| 1556 | + this.stretchElement = new elementorModules.frontend.tools.StretchElement({ | |
| 1557 | + element: this.$element, | |
| 1558 | + selectors: { | |
| 1559 | + container: this.getStretchContainer() | |
| 1560 | + } | |
| 1561 | + }); | |
| 823 | 1562 | } |
| 824 | - filterAndSortElementsByType(elements, type) { | |
| 825 | - return elements.filter(item => type === item.type).sort((a, b) => a.scrollPosition - b.scrollPosition); | |
| 1563 | + | |
| 1564 | + getStretchContainer() { | |
| 1565 | + return elementorFrontend.getKitSettings('stretched_section_container') || window; | |
| 826 | 1566 | } |
| 827 | - isValidSelector(hash) { | |
| 828 | - const validSelectorPattern = /^#[A-Za-z_][\w-]*$/; | |
| 829 | - return validSelectorPattern.test(hash); | |
| 1567 | + | |
| 1568 | + stretch() { | |
| 1569 | + if (!this.getElementSettings('stretch_section')) { | |
| 1570 | + return; | |
| 1571 | + } | |
| 1572 | + | |
| 1573 | + this.stretchElement.stretch(); | |
| 830 | 1574 | } |
| 831 | - getAnchorTarget(element) { | |
| 832 | - const hash = element?.hash; | |
| 833 | - if (!this.isValidSelector(hash)) { | |
| 834 | - return null; | |
| 1575 | + | |
| 1576 | + onInit() { | |
| 1577 | + if (!this.isActive(this.getSettings())) { | |
| 1578 | + return; | |
| 835 | 1579 | } |
| 836 | - return document.querySelector(hash); | |
| 1580 | + | |
| 1581 | + this.initStretch(); | |
| 1582 | + super.onInit(...arguments); | |
| 1583 | + this.stretch(); | |
| 837 | 1584 | } |
| 838 | - getElementSettings(element) { | |
| 839 | - return JSON.parse(element.getAttribute('data-settings')); | |
| 1585 | + | |
| 1586 | + onElementChange(propertyName) { | |
| 1587 | + if ('stretch_section' === propertyName) { | |
| 1588 | + if (this.getElementSettings('stretch_section')) { | |
| 1589 | + this.stretch(); | |
| 1590 | + } else { | |
| 1591 | + this.stretchElement.reset(); | |
| 1592 | + } | |
| 1593 | + } | |
| 840 | 1594 | } |
| 1595 | + | |
| 1596 | + onKitChangeStretchContainerChange() { | |
| 1597 | + this.stretchElement.setSettings('selectors.container', this.getStretchContainer()); | |
| 1598 | + this.stretch(); | |
| 1599 | + } | |
| 1600 | + | |
| 841 | 1601 | } |
| 842 | -exports["default"] = _default; | |
| 843 | 1602 | |
| 1603 | +exports["default"] = StretchedSection; | |
| 1604 | + | |
| 844 | 1605 | /***/ }), |
| 845 | 1606 | |
| 1607 | +/***/ "../assets/dev/js/frontend/utils/anchors.js": | |
| 1608 | +/*!**************************************************!*\ | |
| 1609 | + !*** ../assets/dev/js/frontend/utils/anchors.js ***! | |
| 1610 | + \**************************************************/ | |
| 1611 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1612 | + | |
| 1613 | +"use strict"; | |
| 1614 | + | |
| 1615 | + | |
| 1616 | +var _utils = __webpack_require__(/*! ./utils */ "../assets/dev/js/frontend/utils/utils.js"); | |
| 1617 | + | |
| 1618 | +module.exports = elementorModules.ViewModule.extend({ | |
| 1619 | + getDefaultSettings() { | |
| 1620 | + return { | |
| 1621 | + scrollDuration: 500, | |
| 1622 | + selectors: { | |
| 1623 | + links: 'a[href*="#"]', | |
| 1624 | + targets: '.elementor-element, .elementor-menu-anchor', | |
| 1625 | + scrollable: (0, _utils.isScrollSnapActive)() ? 'body' : 'html, body' | |
| 1626 | + } | |
| 1627 | + }; | |
| 1628 | + }, | |
| 1629 | + | |
| 1630 | + getDefaultElements() { | |
| 1631 | + var $ = jQuery, | |
| 1632 | + selectors = this.getSettings('selectors'); | |
| 1633 | + return { | |
| 1634 | + $scrollable: $(selectors.scrollable) | |
| 1635 | + }; | |
| 1636 | + }, | |
| 1637 | + | |
| 1638 | + bindEvents() { | |
| 1639 | + elementorFrontend.elements.$document.on('click', this.getSettings('selectors.links'), this.handleAnchorLinks); | |
| 1640 | + }, | |
| 1641 | + | |
| 1642 | + handleAnchorLinks(event) { | |
| 1643 | + var clickedLink = event.currentTarget, | |
| 1644 | + isSamePathname = location.pathname === clickedLink.pathname, | |
| 1645 | + isSameHostname = location.hostname === clickedLink.hostname, | |
| 1646 | + $anchor; | |
| 1647 | + | |
| 1648 | + if (!isSameHostname || !isSamePathname || clickedLink.hash.length < 2) { | |
| 1649 | + return; | |
| 1650 | + } | |
| 1651 | + | |
| 1652 | + try { | |
| 1653 | + $anchor = jQuery(clickedLink.hash).filter(this.getSettings('selectors.targets')); | |
| 1654 | + } catch (e) { | |
| 1655 | + return; | |
| 1656 | + } | |
| 1657 | + | |
| 1658 | + if (!$anchor.length) { | |
| 1659 | + return; | |
| 1660 | + } | |
| 1661 | + | |
| 1662 | + var scrollTop = $anchor.offset().top, | |
| 1663 | + $wpAdminBar = elementorFrontend.elements.$wpAdminBar, | |
| 1664 | + $activeStickies = jQuery('.elementor-section.elementor-sticky--active:visible'), | |
| 1665 | + maxStickyHeight = 0; | |
| 1666 | + | |
| 1667 | + if ($wpAdminBar.length > 0) { | |
| 1668 | + scrollTop -= $wpAdminBar.height(); | |
| 1669 | + } // Offset height of tallest sticky | |
| 1670 | + | |
| 1671 | + | |
| 1672 | + if ($activeStickies.length > 0) { | |
| 1673 | + maxStickyHeight = Math.max.apply(null, $activeStickies.map(function () { | |
| 1674 | + return jQuery(this).outerHeight(); | |
| 1675 | + }).get()); | |
| 1676 | + scrollTop -= maxStickyHeight; | |
| 1677 | + } | |
| 1678 | + | |
| 1679 | + event.preventDefault(); | |
| 1680 | + scrollTop = elementorFrontend.hooks.applyFilters('frontend/handlers/menu_anchor/scroll_top_distance', scrollTop); // On scroll animation start: remove scroll-snap. | |
| 1681 | + | |
| 1682 | + if ((0, _utils.isScrollSnapActive)()) { | |
| 1683 | + elementorFrontend.elements.$body.css('scroll-snap-type', 'none'); | |
| 1684 | + } | |
| 1685 | + | |
| 1686 | + this.elements.$scrollable.animate({ | |
| 1687 | + scrollTop | |
| 1688 | + }, this.getSettings('scrollDuration'), 'linear', () => { | |
| 1689 | + // On scroll animation complete: add scroll-snap back. | |
| 1690 | + if ((0, _utils.isScrollSnapActive)()) { | |
| 1691 | + elementorFrontend.elements.$body.css('scroll-snap-type', ''); | |
| 1692 | + } | |
| 1693 | + }); | |
| 1694 | + }, | |
| 1695 | + | |
| 1696 | + onInit() { | |
| 1697 | + elementorModules.ViewModule.prototype.onInit.apply(this, arguments); | |
| 1698 | + } | |
| 1699 | + | |
| 1700 | +}); | |
| 1701 | + | |
| 1702 | +/***/ }), | |
| 1703 | + | |
| 846 | 1704 | /***/ "../assets/dev/js/frontend/utils/assets-loader.js": |
| 847 | 1705 | /*!********************************************************!*\ |
| 848 | 1706 | !*** ../assets/dev/js/frontend/utils/assets-loader.js ***! |
| 849 | 1707 | \********************************************************/ |
| @@ -848,8 +1706,9 @@ | ||
| 848 | 1706 | !*** ../assets/dev/js/frontend/utils/assets-loader.js ***! |
| 849 | 1707 | \********************************************************/ |
| 850 | 1708 | /***/ ((__unused_webpack_module, exports) => { |
| 851 | 1709 | |
| 1710 | +"use strict"; | |
| 852 | 1711 | |
| 853 | 1712 | |
| 854 | 1713 | Object.defineProperty(exports, "__esModule", ({ |
| 855 | 1714 | value: true |
| @@ -854,8 +1713,9 @@ | ||
| 854 | 1713 | Object.defineProperty(exports, "__esModule", ({ |
| 855 | 1714 | value: true |
| 856 | 1715 | })); |
| 857 | 1716 | exports["default"] = void 0; |
| 1717 | + | |
| 858 | 1718 | class AssetsLoader { |
| 859 | 1719 | getScriptElement(src) { |
| 860 | 1720 | const scriptElement = document.createElement('script'); |
| 861 | 1721 | scriptElement.src = src; |
| @@ -860,8 +1720,9 @@ | ||
| 860 | 1720 | const scriptElement = document.createElement('script'); |
| 861 | 1721 | scriptElement.src = src; |
| 862 | 1722 | return scriptElement; |
| 863 | 1723 | } |
| 1724 | + | |
| 864 | 1725 | getStyleElement(src) { |
| 865 | 1726 | const styleElement = document.createElement('link'); |
| 866 | 1727 | styleElement.rel = 'stylesheet'; |
| 867 | 1728 | styleElement.href = src; |
| @@ -866,161 +1727,47 @@ | ||
| 866 | 1727 | styleElement.rel = 'stylesheet'; |
| 867 | 1728 | styleElement.href = src; |
| 868 | 1729 | return styleElement; |
| 869 | 1730 | } |
| 1731 | + | |
| 870 | 1732 | load(type, key) { |
| 871 | 1733 | const assetData = AssetsLoader.assets[type][key]; |
| 1734 | + | |
| 872 | 1735 | if (!assetData.loader) { |
| 873 | - assetData.loader = this.isAssetLoaded(assetData, type) ? Promise.resolve(true) : this.loadAsset(assetData, type); | |
| 1736 | + assetData.loader = new Promise(resolve => { | |
| 1737 | + const element = 'style' === type ? this.getStyleElement(assetData.src) : this.getScriptElement(assetData.src); | |
| 1738 | + | |
| 1739 | + element.onload = () => resolve(true); | |
| 1740 | + | |
| 1741 | + const parent = 'head' === assetData.parent ? assetData.parent : 'body'; | |
| 1742 | + document[parent].appendChild(element); | |
| 1743 | + }); | |
| 874 | 1744 | } |
| 1745 | + | |
| 875 | 1746 | return assetData.loader; |
| 876 | 1747 | } |
| 877 | - isAssetLoaded(assetData, assetType) { | |
| 878 | - const filePath = 'script' === assetType ? `script[src="${assetData.src}"]` : `link[href="${assetData.src}"]`; | |
| 879 | - return !!document.querySelectorAll(filePath)?.length; | |
| 880 | - } | |
| 881 | - loadAsset(assetData, assetType) { | |
| 882 | - return new Promise(resolve => { | |
| 883 | - const element = 'style' === assetType ? this.getStyleElement(assetData.src) : this.getScriptElement(assetData.src); | |
| 884 | - element.onload = () => resolve(true); | |
| 885 | - this.appendAsset(assetData, element); | |
| 886 | - }); | |
| 887 | - } | |
| 888 | - appendAsset(assetData, element) { | |
| 889 | - const beforeElement = document.querySelector(assetData.before); | |
| 890 | - if (!!beforeElement) { | |
| 891 | - beforeElement.insertAdjacentElement('beforebegin', element); | |
| 892 | - return; | |
| 893 | - } | |
| 894 | - const parent = 'head' === assetData.parent ? assetData.parent : 'body'; | |
| 895 | - document[parent].appendChild(element); | |
| 896 | - } | |
| 1748 | + | |
| 897 | 1749 | } |
| 1750 | + | |
| 898 | 1751 | exports["default"] = AssetsLoader; |
| 899 | -const assetsUrl = elementorFrontendConfig.urls.assets; | |
| 900 | 1752 | const fileSuffix = elementorFrontendConfig.environmentMode.isScriptDebug ? '' : '.min'; |
| 901 | -const pluginVersion = elementorFrontendConfig.version; | |
| 902 | 1753 | AssetsLoader.assets = { |
| 903 | 1754 | script: { |
| 904 | 1755 | dialog: { |
| 905 | - src: `${assetsUrl}lib/dialog/dialog${fileSuffix}.js?ver=4.9.3` | |
| 1756 | + src: `${elementorFrontendConfig.urls.assets}lib/dialog/dialog${fileSuffix}.js?ver=4.9.0` | |
| 906 | 1757 | }, |
| 907 | 1758 | 'share-link': { |
| 908 | - src: `${assetsUrl}lib/share-link/share-link${fileSuffix}.js?ver=${pluginVersion}` | |
| 1759 | + src: `${elementorFrontendConfig.urls.assets}lib/share-link/share-link${fileSuffix}.js?ver=${elementorFrontendConfig.version}` | |
| 909 | 1760 | }, |
| 910 | - // TODO: Remove 'swiper' in v3.29.0 [ED-16272]. | |
| 911 | 1761 | swiper: { |
| 912 | - src: `${assetsUrl}lib/swiper/v8/swiper${fileSuffix}.js?ver=8.4.5` | |
| 1762 | + src: `${elementorFrontendConfig.urls.assets}lib/swiper/swiper${fileSuffix}.js?ver=5.3.6` | |
| 913 | 1763 | } |
| 914 | 1764 | }, |
| 915 | - style: { | |
| 916 | - swiper: { | |
| 917 | - src: `${assetsUrl}lib/swiper/v8/css/swiper${fileSuffix}.css?ver=8.4.5`, | |
| 918 | - parent: 'head' | |
| 919 | - }, | |
| 920 | - 'e-lightbox': { | |
| 921 | - src: elementorFrontendConfig?.responsive?.hasCustomBreakpoints ? `${elementorFrontendConfig.urls.uploadUrl}/elementor/css/custom-lightbox.min.css?ver=${pluginVersion}` : `${assetsUrl}css/conditionals/lightbox${fileSuffix}.css?ver=${pluginVersion}` | |
| 922 | - }, | |
| 923 | - dialog: { | |
| 924 | - src: `${assetsUrl}css/conditionals/dialog${fileSuffix}.css?ver=${pluginVersion}`, | |
| 925 | - parent: 'head', | |
| 926 | - before: '#elementor-frontend-css' | |
| 927 | - } | |
| 928 | - } | |
| 1765 | + style: {} | |
| 929 | 1766 | }; |
| 930 | 1767 | |
| 931 | 1768 | /***/ }), |
| 932 | 1769 | |
| 933 | -/***/ "../assets/dev/js/frontend/utils/controls.js": | |
| 934 | -/*!***************************************************!*\ | |
| 935 | - !*** ../assets/dev/js/frontend/utils/controls.js ***! | |
| 936 | - \***************************************************/ | |
| 937 | -/***/ ((__unused_webpack_module, exports) => { | |
| 938 | - | |
| 939 | - | |
| 940 | - | |
| 941 | -Object.defineProperty(exports, "__esModule", ({ | |
| 942 | - value: true | |
| 943 | -})); | |
| 944 | -exports["default"] = void 0; | |
| 945 | -class Controls { | |
| 946 | - /** | |
| 947 | - * Get Control Value | |
| 948 | - * | |
| 949 | - * Retrieves a control value. | |
| 950 | - * This function has been copied from `elementor/assets/dev/js/editor/utils/conditions.js`. | |
| 951 | - * | |
| 952 | - * @since 3.11.0 | |
| 953 | - * | |
| 954 | - * @param {{}} controlSettings A settings object (e.g. element settings - keys and values) | |
| 955 | - * @param {string} controlKey The control key name | |
| 956 | - * @param {string} controlSubKey A specific property of the control object. | |
| 957 | - * @return {*} Control Value | |
| 958 | - */ | |
| 959 | - getControlValue(controlSettings, controlKey, controlSubKey) { | |
| 960 | - let value; | |
| 961 | - if ('object' === typeof controlSettings[controlKey] && controlSubKey) { | |
| 962 | - value = controlSettings[controlKey][controlSubKey]; | |
| 963 | - } else { | |
| 964 | - value = controlSettings[controlKey]; | |
| 965 | - } | |
| 966 | - return value; | |
| 967 | - } | |
| 968 | - | |
| 969 | - /** | |
| 970 | - * Get the value of a responsive control. | |
| 971 | - * | |
| 972 | - * Retrieves the value of a responsive control for the current device or for this first parent device which has a control value. | |
| 973 | - * | |
| 974 | - * @since 3.11.0 | |
| 975 | - * | |
| 976 | - * @param {{}} controlSettings A settings object (e.g. element settings - keys and values) | |
| 977 | - * @param {string} controlKey The control key name | |
| 978 | - * @param {string} controlSubKey A specific property of the control object. | |
| 979 | - * @param {string} device If we want to get a value for a specific device mode. | |
| 980 | - * @return {*} Control Value | |
| 981 | - */ | |
| 982 | - getResponsiveControlValue(controlSettings, controlKey, controlSubKey = '', device = null) { | |
| 983 | - const currentDeviceMode = device || elementorFrontend.getCurrentDeviceMode(), | |
| 984 | - controlValueDesktop = this.getControlValue(controlSettings, controlKey, controlSubKey); | |
| 985 | - | |
| 986 | - // Set the control value for the current device mode. | |
| 987 | - // First check the widescreen device mode. | |
| 988 | - if ('widescreen' === currentDeviceMode) { | |
| 989 | - const controlValueWidescreen = this.getControlValue(controlSettings, `${controlKey}_widescreen`, controlSubKey); | |
| 990 | - return !!controlValueWidescreen || 0 === controlValueWidescreen ? controlValueWidescreen : controlValueDesktop; | |
| 991 | - } | |
| 992 | - | |
| 993 | - // Loop through all responsive and desktop device modes. | |
| 994 | - const activeBreakpoints = elementorFrontend.breakpoints.getActiveBreakpointsList({ | |
| 995 | - withDesktop: true | |
| 996 | - }); | |
| 997 | - let parentDeviceMode = currentDeviceMode, | |
| 998 | - deviceIndex = activeBreakpoints.indexOf(currentDeviceMode), | |
| 999 | - controlValue = ''; | |
| 1000 | - while (deviceIndex <= activeBreakpoints.length) { | |
| 1001 | - if ('desktop' === parentDeviceMode) { | |
| 1002 | - controlValue = controlValueDesktop; | |
| 1003 | - break; | |
| 1004 | - } | |
| 1005 | - const responsiveControlKey = `${controlKey}_${parentDeviceMode}`, | |
| 1006 | - responsiveControlValue = this.getControlValue(controlSettings, responsiveControlKey, controlSubKey); | |
| 1007 | - if (!!responsiveControlValue || 0 === responsiveControlValue) { | |
| 1008 | - controlValue = responsiveControlValue; | |
| 1009 | - break; | |
| 1010 | - } | |
| 1011 | - | |
| 1012 | - // If no control value has been set for the current device mode, then check the parent device mode. | |
| 1013 | - deviceIndex++; | |
| 1014 | - parentDeviceMode = activeBreakpoints[deviceIndex]; | |
| 1015 | - } | |
| 1016 | - return controlValue; | |
| 1017 | - } | |
| 1018 | -} | |
| 1019 | -exports["default"] = Controls; | |
| 1020 | - | |
| 1021 | -/***/ }), | |
| 1022 | - | |
| 1023 | 1770 | /***/ "../assets/dev/js/frontend/utils/lightbox/lightbox-manager.js": |
| 1024 | 1771 | /*!********************************************************************!*\ |
| 1025 | 1772 | !*** ../assets/dev/js/frontend/utils/lightbox/lightbox-manager.js ***! |
| 1026 | 1773 | \********************************************************************/ |
| @@ -1025,8 +1772,9 @@ | ||
| 1025 | 1772 | !*** ../assets/dev/js/frontend/utils/lightbox/lightbox-manager.js ***! |
| 1026 | 1773 | \********************************************************************/ |
| 1027 | 1774 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 1028 | 1775 | |
| 1776 | +"use strict"; | |
| 1029 | 1777 | |
| 1030 | 1778 | |
| 1031 | 1779 | Object.defineProperty(exports, "__esModule", ({ |
| 1032 | 1780 | value: true |
| @@ -1031,96 +1779,106 @@ | ||
| 1031 | 1779 | Object.defineProperty(exports, "__esModule", ({ |
| 1032 | 1780 | value: true |
| 1033 | 1781 | })); |
| 1034 | 1782 | exports["default"] = void 0; |
| 1035 | -__webpack_require__(/*! core-js/modules/esnext.iterator.constructor.js */ "../node_modules/core-js/modules/esnext.iterator.constructor.js"); | |
| 1036 | -__webpack_require__(/*! core-js/modules/esnext.iterator.find.js */ "../node_modules/core-js/modules/esnext.iterator.find.js"); | |
| 1783 | + | |
| 1037 | 1784 | class LightboxManager extends elementorModules.ViewModule { |
| 1038 | 1785 | static getLightbox() { |
| 1039 | 1786 | const lightboxPromise = new Promise(resolveLightbox => { |
| 1040 | - Promise.all(/*! import() | lightbox */[__webpack_require__.e("vendors-node_modules_dompurify_dist_purify_cjs_js"), __webpack_require__.e("lightbox")]).then(__webpack_require__.t.bind(__webpack_require__, /*! elementor-frontend/utils/lightbox/lightbox */ "../assets/dev/js/frontend/utils/lightbox/lightbox.js", 23)).then(({ | |
| 1787 | + __webpack_require__.e(/*! import() | lightbox */ "lightbox").then(__webpack_require__.t.bind(__webpack_require__, /*! elementor-frontend/utils/lightbox/lightbox */ "../assets/dev/js/frontend/utils/lightbox/lightbox.js", 23)).then(_ref => { | |
| 1788 | + let { | |
| 1041 | 1789 | default: LightboxModule |
| 1042 | - }) => resolveLightbox(new LightboxModule())); | |
| 1043 | - }), | |
| 1044 | - dialogScriptPromise = elementorFrontend.utils.assetsLoader.load('script', 'dialog'), | |
| 1045 | - dialogStylePromise = elementorFrontend.utils.assetsLoader.load('style', 'dialog'), | |
| 1046 | - shareLinkPromise = elementorFrontend.utils.assetsLoader.load('script', 'share-link'), | |
| 1047 | - swiperStylePromise = elementorFrontend.utils.assetsLoader.load('style', 'swiper'), | |
| 1048 | - lightboxStylePromise = elementorFrontend.utils.assetsLoader.load('style', 'e-lightbox'); | |
| 1049 | - return Promise.all([lightboxPromise, dialogScriptPromise, dialogStylePromise, shareLinkPromise, swiperStylePromise, lightboxStylePromise]).then(() => lightboxPromise); | |
| 1790 | + } = _ref; | |
| 1791 | + return resolveLightbox(new LightboxModule()); | |
| 1792 | + }); | |
| 1793 | + }), | |
| 1794 | + dialogPromise = elementorFrontend.utils.assetsLoader.load('script', 'dialog'), | |
| 1795 | + shareLinkPromise = elementorFrontend.utils.assetsLoader.load('script', 'share-link'); | |
| 1796 | + return Promise.all([lightboxPromise, dialogPromise, shareLinkPromise]).then(() => lightboxPromise); | |
| 1050 | 1797 | } |
| 1798 | + | |
| 1051 | 1799 | getDefaultSettings() { |
| 1052 | 1800 | return { |
| 1053 | 1801 | selectors: { |
| 1054 | - links: 'a, [data-elementor-lightbox]', | |
| 1055 | - slideshow: '[data-elementor-lightbox-slideshow]' | |
| 1802 | + links: 'a, [data-elementor-lightbox]' | |
| 1056 | 1803 | } |
| 1057 | 1804 | }; |
| 1058 | 1805 | } |
| 1806 | + | |
| 1059 | 1807 | getDefaultElements() { |
| 1060 | 1808 | return { |
| 1061 | - $links: jQuery(this.getSettings('selectors.links')), | |
| 1062 | - $slideshow: jQuery(this.getSettings('selectors.slideshow')) | |
| 1809 | + $links: jQuery(this.getSettings('selectors.links')) | |
| 1063 | 1810 | }; |
| 1064 | 1811 | } |
| 1812 | + | |
| 1065 | 1813 | isLightboxLink(element) { |
| 1066 | 1814 | // Check for lowercase `a` to make sure it works also for links inside SVGs. |
| 1067 | - if ('a' === element.tagName.toLowerCase() && (element.hasAttribute('download') || !/^[^?]+\.(png|jpe?g|gif|svg|webp|avif)(\?.*)?$/i.test(element.href)) && !element.dataset.elementorLightboxVideo) { | |
| 1815 | + if ('a' === element.tagName.toLowerCase() && (element.hasAttribute('download') || !/^[^?]+\.(png|jpe?g|gif|svg|webp)(\?.*)?$/i.test(element.href)) && !element.dataset.elementorLightboxVideo) { | |
| 1068 | 1816 | return false; |
| 1069 | 1817 | } |
| 1818 | + | |
| 1070 | 1819 | const generalOpenInLightbox = elementorFrontend.getKitSettings('global_image_lightbox'), |
| 1071 | - currentLinkOpenInLightbox = element.dataset.elementorOpenLightbox; | |
| 1820 | + currentLinkOpenInLightbox = element.dataset.elementorOpenLightbox; | |
| 1072 | 1821 | return 'yes' === currentLinkOpenInLightbox || generalOpenInLightbox && 'no' !== currentLinkOpenInLightbox; |
| 1073 | 1822 | } |
| 1074 | - isLightboxSlideshow() { | |
| 1075 | - return 0 !== this.elements.$slideshow.length; | |
| 1076 | - } | |
| 1823 | + | |
| 1077 | 1824 | async onLinkClick(event) { |
| 1078 | 1825 | const element = event.currentTarget, |
| 1079 | - $target = jQuery(event.target), | |
| 1080 | - editMode = elementorFrontend.isEditMode(), | |
| 1081 | - isColorPickingMode = editMode && elementor.$previewContents.find('body').hasClass('elementor-editor__ui-state__color-picker'), | |
| 1082 | - isClickInsideElementor = !!$target.closest('.elementor-edit-area').length; | |
| 1826 | + $target = jQuery(event.target), | |
| 1827 | + editMode = elementorFrontend.isEditMode(), | |
| 1828 | + isColorPickingMode = editMode && elementor.$previewContents.find('body').hasClass('elementor-editor__ui-state__color-picker'), | |
| 1829 | + isClickInsideElementor = !!$target.closest('.elementor-edit-area').length; | |
| 1830 | + | |
| 1083 | 1831 | if (!this.isLightboxLink(element)) { |
| 1084 | 1832 | if (editMode && isClickInsideElementor) { |
| 1085 | 1833 | event.preventDefault(); |
| 1086 | 1834 | } |
| 1835 | + | |
| 1087 | 1836 | return; |
| 1088 | 1837 | } |
| 1838 | + | |
| 1089 | 1839 | event.preventDefault(); |
| 1840 | + | |
| 1090 | 1841 | if (editMode && !elementor.getPreferences('lightbox_in_editor')) { |
| 1091 | 1842 | return; |
| 1092 | - } | |
| 1843 | + } // Disable lightbox on color picking mode. | |
| 1093 | 1844 | |
| 1094 | - // Disable lightbox on color picking mode. | |
| 1845 | + | |
| 1095 | 1846 | if (isColorPickingMode) { |
| 1096 | 1847 | return; |
| 1097 | 1848 | } |
| 1098 | - const lightbox = await LightboxManager.getLightbox(); | |
| 1849 | + | |
| 1850 | + const lightbox = this.isOptimizedAssetsLoading() ? await LightboxManager.getLightbox() : elementorFrontend.utils.lightbox; | |
| 1099 | 1851 | lightbox.createLightbox(element); |
| 1100 | 1852 | } |
| 1853 | + | |
| 1854 | + isOptimizedAssetsLoading() { | |
| 1855 | + return elementorFrontend.config.experimentalFeatures.e_optimized_assets_loading; | |
| 1856 | + } | |
| 1857 | + | |
| 1101 | 1858 | bindEvents() { |
| 1102 | 1859 | elementorFrontend.elements.$document.on('click', this.getSettings('selectors.links'), event => this.onLinkClick(event)); |
| 1103 | 1860 | } |
| 1104 | - onInit(...args) { | |
| 1105 | - super.onInit(...args); | |
| 1106 | - if (elementorFrontend.isEditMode()) { | |
| 1861 | + | |
| 1862 | + onInit() { | |
| 1863 | + super.onInit(...arguments); | |
| 1864 | + | |
| 1865 | + if (!this.isOptimizedAssetsLoading() || elementorFrontend.isEditMode()) { | |
| 1107 | 1866 | return; |
| 1108 | - } | |
| 1109 | - this.maybeActivateLightboxOnLink(); | |
| 1110 | - } | |
| 1111 | - maybeActivateLightboxOnLink() { | |
| 1112 | - // Detecting lightbox links on init will reduce the time of waiting to the lightbox to be display on slow connections. | |
| 1867 | + } // Detecting lightbox links on init will reduce the time of waiting to the lightbox to be display on slow connections. | |
| 1868 | + | |
| 1869 | + | |
| 1113 | 1870 | this.elements.$links.each((index, element) => { |
| 1114 | 1871 | if (this.isLightboxLink(element)) { |
| 1115 | - LightboxManager.getLightbox(); | |
| 1872 | + LightboxManager.getLightbox(); // Breaking the iteration when the library loading has already been triggered. | |
| 1116 | 1873 | |
| 1117 | - // Breaking the iteration when the library loading has already been triggered. | |
| 1118 | 1874 | return false; |
| 1119 | 1875 | } |
| 1120 | 1876 | }); |
| 1121 | 1877 | } |
| 1878 | + | |
| 1122 | 1879 | } |
| 1880 | + | |
| 1123 | 1881 | exports["default"] = LightboxManager; |
| 1124 | 1882 | |
| 1125 | 1883 | /***/ }), |
| 1126 | 1884 | |
| @@ -1127,10 +1885,11 @@ | ||
| 1127 | 1885 | /***/ "../assets/dev/js/frontend/utils/swiper.js": |
| 1128 | 1886 | /*!*************************************************!*\ |
| 1129 | 1887 | !*** ../assets/dev/js/frontend/utils/swiper.js ***! |
| 1130 | 1888 | \*************************************************/ |
| 1131 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1889 | +/***/ ((__unused_webpack_module, exports) => { | |
| 1132 | 1890 | |
| 1891 | +"use strict"; | |
| 1133 | 1892 | |
| 1134 | 1893 | |
| 1135 | 1894 | Object.defineProperty(exports, "__esModule", ({ |
| 1136 | 1895 | value: true |
| @@ -1135,57 +1894,50 @@ | ||
| 1135 | 1894 | Object.defineProperty(exports, "__esModule", ({ |
| 1136 | 1895 | value: true |
| 1137 | 1896 | })); |
| 1138 | 1897 | exports["default"] = void 0; |
| 1139 | -__webpack_require__(/*! core-js/modules/esnext.iterator.constructor.js */ "../node_modules/core-js/modules/esnext.iterator.constructor.js"); | |
| 1140 | -__webpack_require__(/*! core-js/modules/esnext.iterator.for-each.js */ "../node_modules/core-js/modules/esnext.iterator.for-each.js"); | |
| 1141 | -class SwiperHandler { | |
| 1898 | + | |
| 1899 | +class Swiper { | |
| 1142 | 1900 | constructor(container, config) { |
| 1143 | 1901 | this.config = config; |
| 1902 | + | |
| 1144 | 1903 | if (this.config.breakpoints) { |
| 1145 | 1904 | // The config is passed as a param to allow adjustConfig to be called outside of this wrapper |
| 1146 | 1905 | this.config = this.adjustConfig(config); |
| 1147 | - } | |
| 1148 | - if (container instanceof jQuery) { | |
| 1149 | - container = container[0]; | |
| 1150 | - } | |
| 1906 | + } // The Swiper will overlap the column width when applying custom margin values on the column. | |
| 1151 | 1907 | |
| 1152 | - // The Swiper will overlap the column width when applying custom margin values on the column. | |
| 1153 | - container.closest('.elementor-widget-wrap')?.classList.add('e-swiper-container'); | |
| 1154 | - container.closest('.elementor-widget')?.classList.add('e-widget-swiper'); | |
| 1908 | + | |
| 1909 | + jQuery(container).closest('.elementor-widget-wrap').addClass('e-swiper-container'); | |
| 1910 | + jQuery(container).closest('.elementor-widget').addClass('e-widget-swiper'); | |
| 1155 | 1911 | return new Promise(resolve => { |
| 1156 | - // TODO: Remove in v3.29.0 [ED-16272]. | |
| 1157 | - if ('undefined' === typeof Swiper) { | |
| 1158 | - elementorFrontend.utils.assetsLoader.load('script', 'swiper').then(() => resolve(this.createSwiperInstance(container, this.config))); | |
| 1159 | - return; | |
| 1912 | + if (!elementorFrontend.config.experimentalFeatures.e_optimized_assets_loading) { | |
| 1913 | + return resolve(this.createSwiperInstance(container, this.config)); | |
| 1160 | 1914 | } |
| 1161 | - if ('function' === typeof Swiper && 'undefined' === typeof window.Swiper) { | |
| 1162 | - window.Swiper = Swiper; | |
| 1163 | - } | |
| 1164 | - resolve(this.createSwiperInstance(container, this.config)); | |
| 1915 | + | |
| 1916 | + elementorFrontend.utils.assetsLoader.load('script', 'swiper').then(() => resolve(this.createSwiperInstance(container, this.config))); | |
| 1165 | 1917 | }); |
| 1166 | 1918 | } |
| 1919 | + | |
| 1167 | 1920 | createSwiperInstance(container, config) { |
| 1168 | 1921 | const SwiperSource = window.Swiper; |
| 1169 | 1922 | SwiperSource.prototype.adjustConfig = this.adjustConfig; |
| 1170 | - config = this.applyMotionPreferences(config); | |
| 1171 | 1923 | return new SwiperSource(container, config); |
| 1172 | - } | |
| 1924 | + } // Backwards compatibility for Elementor Pro <2.9.0 (old Swiper version - <5.0.0) | |
| 1925 | + // In Swiper 5.0.0 and up, breakpoints changed from acting as max-width to acting as min-width | |
| 1173 | 1926 | |
| 1174 | - // Backwards compatibility for Elementor Pro <2.9.0 (old Swiper version - <5.0.0) | |
| 1175 | - // In Swiper 5.0.0 and up, breakpoints changed from acting as max-width to acting as min-width | |
| 1927 | + | |
| 1176 | 1928 | adjustConfig(config) { |
| 1177 | 1929 | // Only reverse the breakpoints if the handle param has been defined |
| 1178 | 1930 | if (!config.handleElementorBreakpoints) { |
| 1179 | 1931 | return config; |
| 1180 | 1932 | } |
| 1933 | + | |
| 1181 | 1934 | const elementorBreakpoints = elementorFrontend.config.responsive.activeBreakpoints, |
| 1182 | - elementorBreakpointValues = elementorFrontend.breakpoints.getBreakpointValues(); | |
| 1935 | + elementorBreakpointValues = elementorFrontend.breakpoints.getBreakpointValues(); | |
| 1183 | 1936 | Object.keys(config.breakpoints).forEach(configBPKey => { |
| 1184 | 1937 | const configBPKeyInt = parseInt(configBPKey); |
| 1185 | - let breakpointToUpdate; | |
| 1938 | + let breakpointToUpdate; // The `configBPKeyInt + 1` is a BC Fix for Elementor Pro Carousels from 2.8.0-2.8.3 used with Elementor >= 2.9.0 | |
| 1186 | 1939 | |
| 1187 | - // The `configBPKeyInt + 1` is a BC Fix for Elementor Pro Carousels from 2.8.0-2.8.3 used with Elementor >= 2.9.0 | |
| 1188 | 1940 | if (configBPKeyInt === elementorBreakpoints.mobile.value || configBPKeyInt + 1 === elementorBreakpoints.mobile.value) { |
| 1189 | 1941 | // This handles the mobile breakpoint. Elementor's default sm breakpoint is never actually used, |
| 1190 | 1942 | // so the mobile breakpoint (md) needs to be handled separately and set to the 0 breakpoint (xs) |
| 1191 | 1943 | breakpointToUpdate = 0; |
| @@ -1197,17 +1949,16 @@ | ||
| 1197 | 1949 | // Find the index of the current config breakpoint in the Elementor Breakpoints array |
| 1198 | 1950 | const currentBPIndexInElementorBPs = elementorBreakpointValues.findIndex(elementorBP => { |
| 1199 | 1951 | // BC Fix for Elementor Pro Carousels from 2.8.0-2.8.3 used with Elementor >= 2.9.0 |
| 1200 | 1952 | return configBPKeyInt === elementorBP || configBPKeyInt + 1 === elementorBP; |
| 1201 | - }); | |
| 1953 | + }); // For all other Swiper config breakpoints, move them one breakpoint down on the breakpoint list, | |
| 1954 | + // according to the array of Elementor's global breakpoints | |
| 1202 | 1955 | |
| 1203 | - // For all other Swiper config breakpoints, move them one breakpoint down on the breakpoint list, | |
| 1204 | - // according to the array of Elementor's global breakpoints | |
| 1205 | 1956 | breakpointToUpdate = elementorBreakpointValues[currentBPIndexInElementorBPs - 1]; |
| 1206 | 1957 | } |
| 1207 | - config.breakpoints[breakpointToUpdate] = config.breakpoints[configBPKey]; | |
| 1208 | 1958 | |
| 1209 | - // Then reset the settings in the original breakpoint key to the default values | |
| 1959 | + config.breakpoints[breakpointToUpdate] = config.breakpoints[configBPKey]; // Then reset the settings in the original breakpoint key to the default values | |
| 1960 | + | |
| 1210 | 1961 | config.breakpoints[configBPKey] = { |
| 1211 | 1962 | slidesPerView: config.slidesPerView, |
| 1212 | 1963 | slidesPerGroup: config.slidesPerGroup ? config.slidesPerGroup : 1 |
| 1213 | 1964 | }; |
| @@ -1213,21 +1964,13 @@ | ||
| 1213 | 1964 | }; |
| 1214 | 1965 | }); |
| 1215 | 1966 | return config; |
| 1216 | 1967 | } |
| 1217 | - applyMotionPreferences(config) { | |
| 1218 | - const prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches; | |
| 1219 | - if (!prefersReducedMotion) { | |
| 1220 | - return config; | |
| 1221 | - } | |
| 1222 | - return Object.assign({}, config, { | |
| 1223 | - speed: 0, | |
| 1224 | - autoplay: false | |
| 1225 | - }); | |
| 1226 | - } | |
| 1968 | + | |
| 1227 | 1969 | } |
| 1228 | -exports["default"] = SwiperHandler; | |
| 1229 | 1970 | |
| 1971 | +exports["default"] = Swiper; | |
| 1972 | + | |
| 1230 | 1973 | /***/ }), |
| 1231 | 1974 | |
| 1232 | 1975 | /***/ "../assets/dev/js/frontend/utils/url-actions.js": |
| 1233 | 1976 | /*!******************************************************!*\ |
| @@ -1234,8 +1977,9 @@ | ||
| 1234 | 1977 | !*** ../assets/dev/js/frontend/utils/url-actions.js ***! |
| 1235 | 1978 | \******************************************************/ |
| 1236 | 1979 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 1237 | 1980 | |
| 1981 | +"use strict"; | |
| 1238 | 1982 | |
| 1239 | 1983 | |
| 1240 | 1984 | Object.defineProperty(exports, "__esModule", ({ |
| 1241 | 1985 | value: true |
| @@ -1240,9 +1984,11 @@ | ||
| 1240 | 1984 | Object.defineProperty(exports, "__esModule", ({ |
| 1241 | 1985 | value: true |
| 1242 | 1986 | })); |
| 1243 | 1987 | exports["default"] = void 0; |
| 1988 | + | |
| 1244 | 1989 | __webpack_require__(/*! core-js/modules/web.dom-exception.stack.js */ "../node_modules/core-js/modules/web.dom-exception.stack.js"); |
| 1990 | + | |
| 1245 | 1991 | class _default extends elementorModules.ViewModule { |
| 1246 | 1992 | getDefaultSettings() { |
| 1247 | 1993 | return { |
| 1248 | 1994 | selectors: { |
| @@ -1249,15 +1995,18 @@ | ||
| 1249 | 1995 | links: 'a[href^="%23elementor-action"], a[href^="#elementor-action"]' |
| 1250 | 1996 | } |
| 1251 | 1997 | }; |
| 1252 | 1998 | } |
| 1999 | + | |
| 1253 | 2000 | bindEvents() { |
| 1254 | 2001 | elementorFrontend.elements.$document.on('click', this.getSettings('selectors.links'), this.runLinkAction.bind(this)); |
| 1255 | 2002 | } |
| 2003 | + | |
| 1256 | 2004 | initActions() { |
| 1257 | 2005 | this.actions = { |
| 1258 | 2006 | lightbox: async settings => { |
| 1259 | 2007 | const lightbox = await elementorFrontend.utils.lightbox; |
| 2008 | + | |
| 1260 | 2009 | if (settings.slideshow) { |
| 1261 | 2010 | // Handle slideshow display |
| 1262 | 2011 | lightbox.openSlideshow(settings.slideshow, settings.url); |
| 1263 | 2012 | } else { |
| @@ -1264,60 +2013,78 @@ | ||
| 1264 | 2013 | // If the settings has an ID - the lightbox target content is an image - the ID is an attachment ID. |
| 1265 | 2014 | if (settings.id) { |
| 1266 | 2015 | settings.type = 'image'; |
| 1267 | 2016 | } |
| 2017 | + | |
| 1268 | 2018 | lightbox.showModal(settings); |
| 1269 | 2019 | } |
| 1270 | 2020 | } |
| 1271 | 2021 | }; |
| 1272 | 2022 | } |
| 2023 | + | |
| 1273 | 2024 | addAction(name, callback) { |
| 1274 | 2025 | this.actions[name] = callback; |
| 1275 | 2026 | } |
| 1276 | - runAction(url, ...restArgs) { | |
| 1277 | - url = decodeURI(url); | |
| 2027 | + | |
| 2028 | + runAction(url) { | |
| 1278 | 2029 | url = decodeURIComponent(url); |
| 1279 | 2030 | const actionMatch = url.match(/action=(.+?)&/); |
| 2031 | + | |
| 1280 | 2032 | if (!actionMatch) { |
| 1281 | 2033 | return; |
| 1282 | 2034 | } |
| 2035 | + | |
| 1283 | 2036 | const action = this.actions[actionMatch[1]]; |
| 2037 | + | |
| 1284 | 2038 | if (!action) { |
| 1285 | 2039 | return; |
| 1286 | 2040 | } |
| 2041 | + | |
| 1287 | 2042 | let settings = {}; |
| 1288 | 2043 | const settingsMatch = url.match(/settings=(.+)/); |
| 2044 | + | |
| 1289 | 2045 | if (settingsMatch) { |
| 1290 | 2046 | settings = JSON.parse(atob(settingsMatch[1])); |
| 1291 | 2047 | } |
| 1292 | - settings.previousEvent = event; | |
| 2048 | + | |
| 2049 | + for (var _len = arguments.length, restArgs = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { | |
| 2050 | + restArgs[_key - 1] = arguments[_key]; | |
| 2051 | + } | |
| 2052 | + | |
| 1293 | 2053 | action(settings, ...restArgs); |
| 1294 | 2054 | } |
| 2055 | + | |
| 1295 | 2056 | runLinkAction(event) { |
| 1296 | 2057 | event.preventDefault(); |
| 1297 | 2058 | this.runAction(jQuery(event.currentTarget).attr('href'), event); |
| 1298 | 2059 | } |
| 2060 | + | |
| 1299 | 2061 | runHashAction() { |
| 1300 | 2062 | if (!location.hash) { |
| 1301 | 2063 | return; |
| 1302 | - } | |
| 2064 | + } // Only if an element with this action hash exists on the page do we allow running the action. | |
| 1303 | 2065 | |
| 1304 | - // Only if an element with this action hash exists on the page do we allow running the action. | |
| 1305 | - const elementWithHash = document.querySelector(`[data-e-action-hash="${location.hash}"], a[href*="${location.hash}"]`); | |
| 2066 | + | |
| 2067 | + const elementWithHash = document.querySelector(`[e-action-hash="${location.hash}"], a[href*="${location.hash}"]`); | |
| 2068 | + | |
| 1306 | 2069 | if (elementWithHash) { |
| 1307 | - this.runAction(elementWithHash.getAttribute('data-e-action-hash')); | |
| 2070 | + this.runAction(elementWithHash.getAttribute('e-action-hash')); | |
| 1308 | 2071 | } |
| 1309 | 2072 | } |
| 2073 | + | |
| 1310 | 2074 | createActionHash(action, settings) { |
| 1311 | 2075 | // We need to encode the hash tag (#) here, in order to support share links for a variety of providers |
| 1312 | 2076 | return encodeURIComponent(`#elementor-action:action=${action}&settings=${btoa(JSON.stringify(settings))}`); |
| 1313 | 2077 | } |
| 2078 | + | |
| 1314 | 2079 | onInit() { |
| 1315 | 2080 | super.onInit(); |
| 1316 | 2081 | this.initActions(); |
| 1317 | 2082 | elementorFrontend.on('components:init', this.runHashAction.bind(this)); |
| 1318 | 2083 | } |
| 2084 | + | |
| 1319 | 2085 | } |
| 2086 | + | |
| 1320 | 2087 | exports["default"] = _default; |
| 1321 | 2088 | |
| 1322 | 2089 | /***/ }), |
| 1323 | 2090 | |
| @@ -1326,8 +2093,9 @@ | ||
| 1326 | 2093 | !*** ../assets/dev/js/frontend/utils/utils.js ***! |
| 1327 | 2094 | \************************************************/ |
| 1328 | 2095 | /***/ ((__unused_webpack_module, exports) => { |
| 1329 | 2096 | |
| 2097 | +"use strict"; | |
| 1330 | 2098 | |
| 1331 | 2099 | |
| 1332 | 2100 | Object.defineProperty(exports, "__esModule", ({ |
| 1333 | 2101 | value: true |
| @@ -1332,8 +2100,9 @@ | ||
| 1332 | 2100 | Object.defineProperty(exports, "__esModule", ({ |
| 1333 | 2101 | value: true |
| 1334 | 2102 | })); |
| 1335 | 2103 | exports.isScrollSnapActive = exports.escapeHTML = void 0; |
| 2104 | + | |
| 1336 | 2105 | // Escape HTML special chars to prevent XSS. |
| 1337 | 2106 | const escapeHTML = str => { |
| 1338 | 2107 | const specialChars = { |
| 1339 | 2108 | '&': '&', |
| @@ -1342,16 +2111,18 @@ | ||
| 1342 | 2111 | "'": ''', |
| 1343 | 2112 | '"': '"' |
| 1344 | 2113 | }; |
| 1345 | 2114 | return str.replace(/[&<>'"]/g, tag => specialChars[tag] || tag); |
| 1346 | -}; | |
| 2115 | +}; // Check if Scroll-Snap is active. | |
| 1347 | 2116 | |
| 1348 | -// Check if Scroll-Snap is active. | |
| 2117 | + | |
| 1349 | 2118 | exports.escapeHTML = escapeHTML; |
| 2119 | + | |
| 1350 | 2120 | const isScrollSnapActive = () => { |
| 1351 | 2121 | const scrollSnapStatus = elementorFrontend.isEditMode() ? elementor.settings.page.model.attributes?.scroll_snap : elementorFrontend.config.settings.page?.scroll_snap; |
| 1352 | 2122 | return 'yes' === scrollSnapStatus ? true : false; |
| 1353 | 2123 | }; |
| 2124 | + | |
| 1354 | 2125 | exports.isScrollSnapActive = isScrollSnapActive; |
| 1355 | 2126 | |
| 1356 | 2127 | /***/ }), |
| 1357 | 2128 | |
| @@ -1360,8 +2131,9 @@ | ||
| 1360 | 2131 | !*** ../assets/dev/js/frontend/utils/video-api/base-loader.js ***! |
| 1361 | 2132 | \****************************************************************/ |
| 1362 | 2133 | /***/ ((__unused_webpack_module, exports) => { |
| 1363 | 2134 | |
| 2135 | +"use strict"; | |
| 1364 | 2136 | |
| 1365 | 2137 | |
| 1366 | 2138 | Object.defineProperty(exports, "__esModule", ({ |
| 1367 | 2139 | value: true |
| @@ -1366,8 +2138,9 @@ | ||
| 1366 | 2138 | Object.defineProperty(exports, "__esModule", ({ |
| 1367 | 2139 | value: true |
| 1368 | 2140 | })); |
| 1369 | 2141 | exports["default"] = void 0; |
| 2142 | + | |
| 1370 | 2143 | class BaseLoader extends elementorModules.ViewModule { |
| 1371 | 2144 | getDefaultSettings() { |
| 1372 | 2145 | return { |
| 1373 | 2146 | isInserted: false, |
| @@ -1375,13 +2148,15 @@ | ||
| 1375 | 2148 | firstScript: 'script:first' |
| 1376 | 2149 | } |
| 1377 | 2150 | }; |
| 1378 | 2151 | } |
| 2152 | + | |
| 1379 | 2153 | getDefaultElements() { |
| 1380 | 2154 | return { |
| 1381 | 2155 | $firstScript: jQuery(this.getSettings('selectors.firstScript')) |
| 1382 | 2156 | }; |
| 1383 | 2157 | } |
| 2158 | + | |
| 1384 | 2159 | insertAPI() { |
| 1385 | 2160 | this.elements.$firstScript.before(jQuery('<script>', { |
| 1386 | 2161 | src: this.getApiURL() |
| 1387 | 2162 | })); |
| @@ -1386,16 +2161,19 @@ | ||
| 1386 | 2161 | src: this.getApiURL() |
| 1387 | 2162 | })); |
| 1388 | 2163 | this.setSettings('isInserted', true); |
| 1389 | 2164 | } |
| 2165 | + | |
| 1390 | 2166 | getVideoIDFromURL(url) { |
| 1391 | 2167 | const videoIDParts = url.match(this.getURLRegex()); |
| 1392 | 2168 | return videoIDParts && videoIDParts[1]; |
| 1393 | 2169 | } |
| 2170 | + | |
| 1394 | 2171 | onApiReady(callback) { |
| 1395 | 2172 | if (!this.getSettings('isInserted')) { |
| 1396 | 2173 | this.insertAPI(); |
| 1397 | 2174 | } |
| 2175 | + | |
| 1398 | 2176 | if (this.isApiLoaded()) { |
| 1399 | 2177 | callback(this.getApiObject()); |
| 1400 | 2178 | } else { |
| 1401 | 2179 | // If not ready check again by timeout.. |
| @@ -1403,12 +2181,15 @@ | ||
| 1403 | 2181 | this.onApiReady(callback); |
| 1404 | 2182 | }, 350); |
| 1405 | 2183 | } |
| 1406 | 2184 | } |
| 2185 | + | |
| 1407 | 2186 | getAutoplayURL(videoURL) { |
| 1408 | 2187 | return videoURL.replace('&autoplay=0', '') + '&autoplay=1'; |
| 1409 | 2188 | } |
| 2189 | + | |
| 1410 | 2190 | } |
| 2191 | + | |
| 1411 | 2192 | exports["default"] = BaseLoader; |
| 1412 | 2193 | |
| 1413 | 2194 | /***/ }), |
| 1414 | 2195 | |
| @@ -1417,35 +2198,46 @@ | ||
| 1417 | 2198 | !*** ../assets/dev/js/frontend/utils/video-api/vimeo-loader.js ***! |
| 1418 | 2199 | \*****************************************************************/ |
| 1419 | 2200 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 1420 | 2201 | |
| 2202 | +"use strict"; | |
| 1421 | 2203 | |
| 1422 | 2204 | |
| 1423 | 2205 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 2206 | + | |
| 1424 | 2207 | Object.defineProperty(exports, "__esModule", ({ |
| 1425 | 2208 | value: true |
| 1426 | 2209 | })); |
| 1427 | 2210 | exports["default"] = void 0; |
| 2211 | + | |
| 1428 | 2212 | var _baseLoader = _interopRequireDefault(__webpack_require__(/*! ./base-loader */ "../assets/dev/js/frontend/utils/video-api/base-loader.js")); |
| 2213 | + | |
| 1429 | 2214 | class VimeoLoader extends _baseLoader.default { |
| 1430 | 2215 | getApiURL() { |
| 1431 | 2216 | return 'https://player.vimeo.com/api/player.js'; |
| 1432 | 2217 | } |
| 2218 | + | |
| 1433 | 2219 | getURLRegex() { |
| 1434 | 2220 | return /^(?:https?:\/\/)?(?:www|player\.)?(?:vimeo\.com\/)?(?:video\/|external\/)?(\d+)([^.?&#"'>]?)/; |
| 1435 | 2221 | } |
| 2222 | + | |
| 1436 | 2223 | isApiLoaded() { |
| 1437 | 2224 | return window.Vimeo; |
| 1438 | 2225 | } |
| 2226 | + | |
| 1439 | 2227 | getApiObject() { |
| 1440 | 2228 | return Vimeo; |
| 1441 | 2229 | } |
| 2230 | + | |
| 1442 | 2231 | getAutoplayURL(videoURL) { |
| 1443 | - // Vimeo requires the '#t=' param to be last in the URL. | |
| 2232 | + videoURL = super.getAutoplayURL(videoURL); // Vimeo requires the '#t=' param to be last in the URL. | |
| 2233 | + | |
| 1444 | 2234 | const timeMatch = videoURL.match(/#t=[^&]*/); |
| 1445 | 2235 | return videoURL.replace(timeMatch[0], '') + timeMatch; |
| 1446 | 2236 | } |
| 2237 | + | |
| 1447 | 2238 | } |
| 2239 | + | |
| 1448 | 2240 | exports["default"] = VimeoLoader; |
| 1449 | 2241 | |
| 1450 | 2242 | /***/ }), |
| 1451 | 2243 | |
| @@ -1454,30 +2246,39 @@ | ||
| 1454 | 2246 | !*** ../assets/dev/js/frontend/utils/video-api/youtube-loader.js ***! |
| 1455 | 2247 | \*******************************************************************/ |
| 1456 | 2248 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 1457 | 2249 | |
| 2250 | +"use strict"; | |
| 1458 | 2251 | |
| 1459 | 2252 | |
| 1460 | 2253 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 2254 | + | |
| 1461 | 2255 | Object.defineProperty(exports, "__esModule", ({ |
| 1462 | 2256 | value: true |
| 1463 | 2257 | })); |
| 1464 | 2258 | exports["default"] = void 0; |
| 2259 | + | |
| 1465 | 2260 | var _baseLoader = _interopRequireDefault(__webpack_require__(/*! ./base-loader */ "../assets/dev/js/frontend/utils/video-api/base-loader.js")); |
| 2261 | + | |
| 1466 | 2262 | class YoutubeLoader extends _baseLoader.default { |
| 1467 | 2263 | getApiURL() { |
| 1468 | 2264 | return 'https://www.youtube.com/iframe_api'; |
| 1469 | 2265 | } |
| 2266 | + | |
| 1470 | 2267 | getURLRegex() { |
| 1471 | - return /^(?:https?:\/\/)?(?:www\.)?(?:m\.)?(?:youtu\.be\/|youtube\.com\/(?:(?:watch)?\?(?:.*&)?vi?=|(?:embed|v|vi|user|shorts)\/))([^?&"'>]+)/; | |
| 2268 | + return /^(?:https?:\/\/)?(?:www\.)?(?:m\.)?(?:youtu\.be\/|youtube\.com\/(?:(?:watch)?\?(?:.*&)?vi?=|(?:embed|v|vi|user)\/))([^?&"'>]+)/; | |
| 1472 | 2269 | } |
| 2270 | + | |
| 1473 | 2271 | isApiLoaded() { |
| 1474 | 2272 | return window.YT && YT.loaded; |
| 1475 | 2273 | } |
| 2274 | + | |
| 1476 | 2275 | getApiObject() { |
| 1477 | 2276 | return YT; |
| 1478 | 2277 | } |
| 2278 | + | |
| 1479 | 2279 | } |
| 2280 | + | |
| 1480 | 2281 | exports["default"] = YoutubeLoader; |
| 1481 | 2282 | |
| 1482 | 2283 | /***/ }), |
| 1483 | 2284 | |
| @@ -1486,8 +2287,9 @@ | ||
| 1486 | 2287 | !*** ../assets/dev/js/public-path.js ***! |
| 1487 | 2288 | \***************************************/ |
| 1488 | 2289 | /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { |
| 1489 | 2290 | |
| 2291 | +"use strict"; | |
| 1490 | 2292 | |
| 1491 | 2293 | |
| 1492 | 2294 | /* eslint-disable camelcase */ |
| 1493 | 2295 | __webpack_require__.p = elementorFrontendConfig.urls.assets + 'js/'; |
| @@ -1497,10 +2299,11 @@ | ||
| 1497 | 2299 | /***/ "../assets/dev/js/utils/breakpoints.js": |
| 1498 | 2300 | /*!*********************************************!*\ |
| 1499 | 2301 | !*** ../assets/dev/js/utils/breakpoints.js ***! |
| 1500 | 2302 | \*********************************************/ |
| 1501 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 2303 | +/***/ ((__unused_webpack_module, exports) => { | |
| 1502 | 2304 | |
| 2305 | +"use strict"; | |
| 1503 | 2306 | |
| 1504 | 2307 | |
| 1505 | 2308 | Object.defineProperty(exports, "__esModule", ({ |
| 1506 | 2309 | value: true |
| @@ -1505,12 +2308,9 @@ | ||
| 1505 | 2308 | Object.defineProperty(exports, "__esModule", ({ |
| 1506 | 2309 | value: true |
| 1507 | 2310 | })); |
| 1508 | 2311 | exports["default"] = void 0; |
| 1509 | -__webpack_require__(/*! core-js/modules/es.array.push.js */ "../node_modules/core-js/modules/es.array.push.js"); | |
| 1510 | -__webpack_require__(/*! core-js/modules/esnext.iterator.constructor.js */ "../node_modules/core-js/modules/esnext.iterator.constructor.js"); | |
| 1511 | -__webpack_require__(/*! core-js/modules/esnext.iterator.for-each.js */ "../node_modules/core-js/modules/esnext.iterator.for-each.js"); | |
| 1512 | -__webpack_require__(/*! core-js/modules/esnext.iterator.map.js */ "../node_modules/core-js/modules/esnext.iterator.map.js"); | |
| 2312 | + | |
| 1513 | 2313 | /** |
| 1514 | 2314 | * Breakpoints |
| 1515 | 2315 | * |
| 1516 | 2316 | * This utility class contains helper functions relating to Elementor's breakpoints system. |
| @@ -1518,14 +2318,12 @@ | ||
| 1518 | 2318 | * @since 3.4.0 |
| 1519 | 2319 | */ |
| 1520 | 2320 | class Breakpoints extends elementorModules.Module { |
| 1521 | 2321 | constructor(responsiveConfig) { |
| 1522 | - super(); | |
| 2322 | + super(); // The passed config is either `elementor.config.responsive` or `elementorFrontend.config.responsive` | |
| 1523 | 2323 | |
| 1524 | - // The passed config is either `elementor.config.responsive` or `elementorFrontend.config.responsive` | |
| 1525 | 2324 | this.responsiveConfig = responsiveConfig; |
| 1526 | 2325 | } |
| 1527 | - | |
| 1528 | 2326 | /** |
| 1529 | 2327 | * Get Active Breakpoints List |
| 1530 | 2328 | * |
| 1531 | 2329 | * Returns a flat array containing the active breakpoints/devices. By default, it returns the li |
| @@ -1534,30 +2332,34 @@ | ||
| 1534 | 2332 | * @since 3.4.0 |
| 1535 | 2333 | * |
| 1536 | 2334 | * @param {Object} args |
| 1537 | 2335 | */ |
| 1538 | - getActiveBreakpointsList(args = {}) { | |
| 2336 | + | |
| 2337 | + | |
| 2338 | + getActiveBreakpointsList() { | |
| 2339 | + let args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 1539 | 2340 | const defaultArgs = { |
| 1540 | 2341 | largeToSmall: false, |
| 1541 | 2342 | withDesktop: false |
| 1542 | 2343 | }; |
| 1543 | - args = { | |
| 1544 | - ...defaultArgs, | |
| 2344 | + args = { ...defaultArgs, | |
| 1545 | 2345 | ...args |
| 1546 | 2346 | }; |
| 1547 | 2347 | const breakpointKeys = Object.keys(this.responsiveConfig.activeBreakpoints); |
| 2348 | + | |
| 1548 | 2349 | if (args.withDesktop) { |
| 1549 | 2350 | // If there is an active 'widescreen' breakpoint, insert the artificial 'desktop' device below it. |
| 1550 | 2351 | const widescreenIndex = breakpointKeys.indexOf('widescreen'), |
| 1551 | - indexToInsertDesktopDevice = -1 === widescreenIndex ? breakpointKeys.length : breakpointKeys.length - 1; | |
| 2352 | + indexToInsertDesktopDevice = -1 === widescreenIndex ? breakpointKeys.length : breakpointKeys.length - 1; | |
| 1552 | 2353 | breakpointKeys.splice(indexToInsertDesktopDevice, 0, 'desktop'); |
| 1553 | 2354 | } |
| 2355 | + | |
| 1554 | 2356 | if (args.largeToSmall) { |
| 1555 | 2357 | breakpointKeys.reverse(); |
| 1556 | 2358 | } |
| 2359 | + | |
| 1557 | 2360 | return breakpointKeys; |
| 1558 | 2361 | } |
| 1559 | - | |
| 1560 | 2362 | /** |
| 1561 | 2363 | * Get Active Breakpoint Values |
| 1562 | 2364 | * |
| 1563 | 2365 | * Returns a flat array containing the list of active breakpoint values, from smallest to largest. |
| @@ -1563,19 +2365,20 @@ | ||
| 1563 | 2365 | * Returns a flat array containing the list of active breakpoint values, from smallest to largest. |
| 1564 | 2366 | * |
| 1565 | 2367 | * @since 3.4.0 |
| 1566 | 2368 | */ |
| 2369 | + | |
| 2370 | + | |
| 1567 | 2371 | getBreakpointValues() { |
| 1568 | 2372 | const { |
| 1569 | - activeBreakpoints | |
| 1570 | - } = this.responsiveConfig, | |
| 1571 | - breakpointValues = []; | |
| 2373 | + activeBreakpoints | |
| 2374 | + } = this.responsiveConfig, | |
| 2375 | + breakpointValues = []; | |
| 1572 | 2376 | Object.values(activeBreakpoints).forEach(breakpointConfig => { |
| 1573 | 2377 | breakpointValues.push(breakpointConfig.value); |
| 1574 | 2378 | }); |
| 1575 | 2379 | return breakpointValues; |
| 1576 | 2380 | } |
| 1577 | - | |
| 1578 | 2381 | /** |
| 1579 | 2382 | * Get Desktop Previous Device Key |
| 1580 | 2383 | * |
| 1581 | 2384 | * Returns the key of the device directly under desktop (can be 'tablet', 'tablet_extra', 'laptop'). |
| @@ -1583,15 +2386,18 @@ | ||
| 1583 | 2386 | * @since 3.4.0 |
| 1584 | 2387 | * |
| 1585 | 2388 | * @return {string} device key |
| 1586 | 2389 | */ |
| 2390 | + | |
| 2391 | + | |
| 1587 | 2392 | getDesktopPreviousDeviceKey() { |
| 1588 | 2393 | let desktopPreviousDevice = ''; |
| 1589 | 2394 | const { |
| 1590 | - activeBreakpoints | |
| 1591 | - } = this.responsiveConfig, | |
| 1592 | - breakpointKeys = Object.keys(activeBreakpoints), | |
| 1593 | - numOfDevices = breakpointKeys.length; | |
| 2395 | + activeBreakpoints | |
| 2396 | + } = this.responsiveConfig, | |
| 2397 | + breakpointKeys = Object.keys(activeBreakpoints), | |
| 2398 | + numOfDevices = breakpointKeys.length; | |
| 2399 | + | |
| 1594 | 2400 | if ('min' === activeBreakpoints[breakpointKeys[numOfDevices - 1]].direction) { |
| 1595 | 2401 | // If the widescreen breakpoint is active, the device that's previous to desktop is the last one before |
| 1596 | 2402 | // widescreen. |
| 1597 | 2403 | desktopPreviousDevice = breakpointKeys[numOfDevices - 2]; |
| @@ -1598,11 +2404,11 @@ | ||
| 1598 | 2404 | } else { |
| 1599 | 2405 | // If the widescreen breakpoint isn't active, we just take the last device returned by the config. |
| 1600 | 2406 | desktopPreviousDevice = breakpointKeys[numOfDevices - 1]; |
| 1601 | 2407 | } |
| 2408 | + | |
| 1602 | 2409 | return desktopPreviousDevice; |
| 1603 | 2410 | } |
| 1604 | - | |
| 1605 | 2411 | /** |
| 1606 | 2412 | * Get Device Minimum Breakpoint |
| 1607 | 2413 | * |
| 1608 | 2414 | * Returns the minimum point in the device's display range. For each device, the minimum point of its display range |
| @@ -1612,16 +2418,17 @@ | ||
| 1612 | 2418 | * @since 3.4.0 |
| 1613 | 2419 | * |
| 1614 | 2420 | * @return {number|*} minimum breakpoint |
| 1615 | 2421 | */ |
| 2422 | + | |
| 2423 | + | |
| 1616 | 2424 | getDesktopMinPoint() { |
| 1617 | 2425 | const { |
| 1618 | - activeBreakpoints | |
| 1619 | - } = this.responsiveConfig, | |
| 1620 | - desktopPreviousDevice = this.getDesktopPreviousDeviceKey(); | |
| 2426 | + activeBreakpoints | |
| 2427 | + } = this.responsiveConfig, | |
| 2428 | + desktopPreviousDevice = this.getDesktopPreviousDeviceKey(); | |
| 1621 | 2429 | return activeBreakpoints[desktopPreviousDevice].value + 1; |
| 1622 | 2430 | } |
| 1623 | - | |
| 1624 | 2431 | /** |
| 1625 | 2432 | * Get Device Minimum Breakpoint |
| 1626 | 2433 | * |
| 1627 | 2434 | * Returns the minimum point in the device's display range. For each device, the minimum point of its display range |
| @@ -1632,17 +2439,21 @@ | ||
| 1632 | 2439 | * |
| 1633 | 2440 | * @param {string} device |
| 1634 | 2441 | * @return {number|*} minimum breakpoint |
| 1635 | 2442 | */ |
| 2443 | + | |
| 2444 | + | |
| 1636 | 2445 | getDeviceMinBreakpoint(device) { |
| 1637 | 2446 | if ('desktop' === device) { |
| 1638 | 2447 | return this.getDesktopMinPoint(); |
| 1639 | 2448 | } |
| 2449 | + | |
| 1640 | 2450 | const { |
| 1641 | - activeBreakpoints | |
| 1642 | - } = this.responsiveConfig, | |
| 1643 | - breakpointNames = Object.keys(activeBreakpoints); | |
| 2451 | + activeBreakpoints | |
| 2452 | + } = this.responsiveConfig, | |
| 2453 | + breakpointNames = Object.keys(activeBreakpoints); | |
| 1644 | 2454 | let minBreakpoint; |
| 2455 | + | |
| 1645 | 2456 | if (breakpointNames[0] === device) { |
| 1646 | 2457 | // For the lowest breakpoint, the min point is always 320. |
| 1647 | 2458 | minBreakpoint = 320; |
| 1648 | 2459 | } else if ('widescreen' === device) { |
| @@ -1656,14 +2467,14 @@ | ||
| 1656 | 2467 | minBreakpoint = this.responsiveConfig.breakpoints.widescreen; |
| 1657 | 2468 | } |
| 1658 | 2469 | } else { |
| 1659 | 2470 | const deviceNameIndex = breakpointNames.indexOf(device), |
| 1660 | - previousIndex = deviceNameIndex - 1; | |
| 2471 | + previousIndex = deviceNameIndex - 1; | |
| 1661 | 2472 | minBreakpoint = activeBreakpoints[breakpointNames[previousIndex]].value + 1; |
| 1662 | 2473 | } |
| 2474 | + | |
| 1663 | 2475 | return minBreakpoint; |
| 1664 | 2476 | } |
| 1665 | - | |
| 1666 | 2477 | /** |
| 1667 | 2478 | * Get Active Match Regex |
| 1668 | 2479 | * |
| 1669 | 2480 | * Returns a regular expression containing all active breakpoints prefixed with an underscore. |
| @@ -1669,12 +2480,16 @@ | ||
| 1669 | 2480 | * Returns a regular expression containing all active breakpoints prefixed with an underscore. |
| 1670 | 2481 | * |
| 1671 | 2482 | * @return {RegExp} Active Match Regex |
| 1672 | 2483 | */ |
| 2484 | + | |
| 2485 | + | |
| 1673 | 2486 | getActiveMatchRegex() { |
| 1674 | 2487 | return new RegExp(this.getActiveBreakpointsList().map(device => '_' + device).join('|') + '$'); |
| 1675 | 2488 | } |
| 2489 | + | |
| 1676 | 2490 | } |
| 2491 | + | |
| 1677 | 2492 | exports["default"] = Breakpoints; |
| 1678 | 2493 | |
| 1679 | 2494 | /***/ }), |
| 1680 | 2495 | |
| @@ -1683,8 +2498,9 @@ | ||
| 1683 | 2498 | !*** ../assets/dev/js/utils/events.js ***! |
| 1684 | 2499 | \****************************************/ |
| 1685 | 2500 | /***/ ((__unused_webpack_module, exports) => { |
| 1686 | 2501 | |
| 2502 | +"use strict"; | |
| 1687 | 2503 | |
| 1688 | 2504 | |
| 1689 | 2505 | Object.defineProperty(exports, "__esModule", ({ |
| 1690 | 2506 | value: true |
| @@ -1689,8 +2505,9 @@ | ||
| 1689 | 2505 | Object.defineProperty(exports, "__esModule", ({ |
| 1690 | 2506 | value: true |
| 1691 | 2507 | })); |
| 1692 | 2508 | exports["default"] = exports.Events = void 0; |
| 2509 | + | |
| 1693 | 2510 | class Events { |
| 1694 | 2511 | /** |
| 1695 | 2512 | * Dispatch an Elementor event. |
| 1696 | 2513 | * |
| @@ -1703,28 +2520,32 @@ | ||
| 1703 | 2520 | * @param {string|null} bcEvent - BC event to dispatch, default to `null`. |
| 1704 | 2521 | * |
| 1705 | 2522 | * @return {void} |
| 1706 | 2523 | */ |
| 1707 | - static dispatch(context, event, data = null, bcEvent = null) { | |
| 2524 | + static dispatch(context, event) { | |
| 2525 | + let data = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; | |
| 2526 | + let bcEvent = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null; | |
| 1708 | 2527 | // Make sure to use the native context if it's a jQuery instance. |
| 1709 | - context = context instanceof jQuery ? context[0] : context; | |
| 2528 | + context = context instanceof jQuery ? context[0] : context; // Dispatch the BC event only if exists. | |
| 1710 | 2529 | |
| 1711 | - // Dispatch the BC event only if exists. | |
| 1712 | 2530 | if (bcEvent) { |
| 1713 | 2531 | context.dispatchEvent(new CustomEvent(bcEvent, { |
| 1714 | 2532 | detail: data |
| 1715 | 2533 | })); |
| 1716 | - } | |
| 2534 | + } // jQuery's `.on()` listens also to native custom events, so there is no need | |
| 2535 | + // to dispatch also a jQuery event. | |
| 1717 | 2536 | |
| 1718 | - // jQuery's `.on()` listens also to native custom events, so there is no need | |
| 1719 | - // to dispatch also a jQuery event. | |
| 2537 | + | |
| 1720 | 2538 | context.dispatchEvent(new CustomEvent(event, { |
| 1721 | 2539 | detail: data |
| 1722 | 2540 | })); |
| 1723 | 2541 | } |
| 2542 | + | |
| 1724 | 2543 | } |
| 2544 | + | |
| 1725 | 2545 | exports.Events = Events; |
| 1726 | -var _default = exports["default"] = Events; | |
| 2546 | +var _default = Events; | |
| 2547 | +exports["default"] = _default; | |
| 1727 | 2548 | |
| 1728 | 2549 | /***/ }), |
| 1729 | 2550 | |
| 1730 | 2551 | /***/ "../assets/dev/js/utils/hooks.js": |
| @@ -1730,30 +2551,29 @@ | ||
| 1730 | 2551 | /***/ "../assets/dev/js/utils/hooks.js": |
| 1731 | 2552 | /*!***************************************!*\ |
| 1732 | 2553 | !*** ../assets/dev/js/utils/hooks.js ***! |
| 1733 | 2554 | \***************************************/ |
| 1734 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2555 | +/***/ ((module) => { | |
| 1735 | 2556 | |
| 2557 | +"use strict"; | |
| 1736 | 2558 | |
| 1737 | - | |
| 1738 | 2559 | /** |
| 1739 | 2560 | * Handles managing all events for whatever you plug it into. Priorities for hooks are based on lowest to highest in |
| 1740 | 2561 | * that, lowest priority hooks are fired first. |
| 1741 | 2562 | */ |
| 1742 | -__webpack_require__(/*! core-js/modules/es.array.push.js */ "../node_modules/core-js/modules/es.array.push.js"); | |
| 2563 | + | |
| 1743 | 2564 | var EventManager = function () { |
| 1744 | 2565 | var slice = Array.prototype.slice, |
| 1745 | - MethodsAvailable; | |
| 1746 | - | |
| 2566 | + MethodsAvailable; | |
| 1747 | 2567 | /** |
| 1748 | 2568 | * Contains the hooks that get registered with this EventManager. The array for storage utilizes a "flat" |
| 1749 | 2569 | * object literal such that looking up the hook utilizes the native object literal hash. |
| 1750 | 2570 | */ |
| 2571 | + | |
| 1751 | 2572 | var STORAGE = { |
| 1752 | 2573 | actions: {}, |
| 1753 | 2574 | filters: {} |
| 1754 | 2575 | }; |
| 1755 | - | |
| 1756 | 2576 | /** |
| 1757 | 2577 | * Removes the specified hook by resetting the value of it. |
| 1758 | 2578 | * |
| 1759 | 2579 | * @param {string} type Type of hook, either 'actions' or 'filters' |
| @@ -1761,17 +2581,21 @@ | ||
| 1761 | 2581 | * @param {Function} callback |
| 1762 | 2582 | * @param {*} context |
| 1763 | 2583 | * @private |
| 1764 | 2584 | */ |
| 2585 | + | |
| 1765 | 2586 | function _removeHook(type, hook, callback, context) { |
| 1766 | 2587 | var handlers, handler, i; |
| 2588 | + | |
| 1767 | 2589 | if (!STORAGE[type][hook]) { |
| 1768 | 2590 | return; |
| 1769 | 2591 | } |
| 2592 | + | |
| 1770 | 2593 | if (!callback) { |
| 1771 | 2594 | STORAGE[type][hook] = []; |
| 1772 | 2595 | } else { |
| 1773 | 2596 | handlers = STORAGE[type][hook]; |
| 2597 | + | |
| 1774 | 2598 | if (!context) { |
| 1775 | 2599 | for (i = handlers.length; i--;) { |
| 1776 | 2600 | if (handlers[i].callback === callback) { |
| 1777 | 2601 | handlers.splice(i, 1); |
| @@ -1779,8 +2603,9 @@ | ||
| 1779 | 2603 | } |
| 1780 | 2604 | } else { |
| 1781 | 2605 | for (i = handlers.length; i--;) { |
| 1782 | 2606 | handler = handlers[i]; |
| 2607 | + | |
| 1783 | 2608 | if (handler.callback === callback && handler.context === context) { |
| 1784 | 2609 | handlers.splice(i, 1); |
| 1785 | 2610 | } |
| 1786 | 2611 | } |
| @@ -1786,9 +2611,8 @@ | ||
| 1786 | 2611 | } |
| 1787 | 2612 | } |
| 1788 | 2613 | } |
| 1789 | 2614 | } |
| 1790 | - | |
| 1791 | 2615 | /** |
| 1792 | 2616 | * Use an insert sort for keeping our hooks organized based on priority. This function is ridiculously faster |
| 1793 | 2617 | * than bubble sort, etc: http://jsperf.com/javascript-sort |
| 1794 | 2618 | * |
| @@ -1794,22 +2618,27 @@ | ||
| 1794 | 2618 | * |
| 1795 | 2619 | * @param {Array<*>} hooks The custom array containing all of the appropriate hooks to perform an insert sort on. |
| 1796 | 2620 | * @private |
| 1797 | 2621 | */ |
| 2622 | + | |
| 2623 | + | |
| 1798 | 2624 | function _hookInsertSort(hooks) { |
| 1799 | 2625 | var tmpHook, j, prevHook; |
| 2626 | + | |
| 1800 | 2627 | for (var i = 1, len = hooks.length; i < len; i++) { |
| 1801 | 2628 | tmpHook = hooks[i]; |
| 1802 | 2629 | j = i; |
| 2630 | + | |
| 1803 | 2631 | while ((prevHook = hooks[j - 1]) && prevHook.priority > tmpHook.priority) { |
| 1804 | 2632 | hooks[j] = hooks[j - 1]; |
| 1805 | 2633 | --j; |
| 1806 | 2634 | } |
| 2635 | + | |
| 1807 | 2636 | hooks[j] = tmpHook; |
| 1808 | 2637 | } |
| 2638 | + | |
| 1809 | 2639 | return hooks; |
| 1810 | 2640 | } |
| 1811 | - | |
| 1812 | 2641 | /** |
| 1813 | 2642 | * Adds the hook to the appropriate storage container |
| 1814 | 2643 | * |
| 1815 | 2644 | * @param {string} type 'actions' or 'filters' |
| @@ -1818,17 +2647,19 @@ | ||
| 1818 | 2647 | * @param {number} priority The priority of this hook. Must be an integer. |
| 1819 | 2648 | * @param {*} [context] A value to be used for this |
| 1820 | 2649 | * @private |
| 1821 | 2650 | */ |
| 2651 | + | |
| 2652 | + | |
| 1822 | 2653 | function _addHook(type, hook, callback, priority, context) { |
| 1823 | 2654 | var hookObject = { |
| 1824 | 2655 | callback, |
| 1825 | 2656 | priority, |
| 1826 | 2657 | context |
| 1827 | - }; | |
| 2658 | + }; // Utilize 'prop itself' : http://jsperf.com/hasownproperty-vs-in-vs-undefined/19 | |
| 1828 | 2659 | |
| 1829 | - // Utilize 'prop itself' : http://jsperf.com/hasownproperty-vs-in-vs-undefined/19 | |
| 1830 | 2660 | var hooks = STORAGE[type][hook]; |
| 2661 | + | |
| 1831 | 2662 | if (hooks) { |
| 1832 | 2663 | // TEMP FIX BUG |
| 1833 | 2664 | var hasSameCallback = false; |
| 1834 | 2665 | jQuery.each(hooks, function () { |
| @@ -1836,21 +2667,22 @@ | ||
| 1836 | 2667 | hasSameCallback = true; |
| 1837 | 2668 | return false; |
| 1838 | 2669 | } |
| 1839 | 2670 | }); |
| 2671 | + | |
| 1840 | 2672 | if (hasSameCallback) { |
| 1841 | 2673 | return; |
| 1842 | - } | |
| 1843 | - // END TEMP FIX BUG | |
| 2674 | + } // END TEMP FIX BUG | |
| 1844 | 2675 | |
| 2676 | + | |
| 1845 | 2677 | hooks.push(hookObject); |
| 1846 | 2678 | hooks = _hookInsertSort(hooks); |
| 1847 | 2679 | } else { |
| 1848 | 2680 | hooks = [hookObject]; |
| 1849 | 2681 | } |
| 2682 | + | |
| 1850 | 2683 | STORAGE[type][hook] = hooks; |
| 1851 | 2684 | } |
| 1852 | - | |
| 1853 | 2685 | /** |
| 1854 | 2686 | * Runs the specified hook. If it is an action, the value is not modified but if it is a filter, it is. |
| 1855 | 2687 | * |
| 1856 | 2688 | * @param {string} type 'actions' or 'filters' |
| @@ -1857,16 +2689,21 @@ | ||
| 1857 | 2689 | * @param {*} hook The hook ( namespace.identifier ) to be ran. |
| 1858 | 2690 | * @param {Array<*>} args Arguments to pass to the action/filter. If it's a filter, args is actually a single parameter. |
| 1859 | 2691 | * @private |
| 1860 | 2692 | */ |
| 2693 | + | |
| 2694 | + | |
| 1861 | 2695 | function _runHook(type, hook, args) { |
| 1862 | 2696 | var handlers = STORAGE[type][hook], |
| 1863 | - i, | |
| 1864 | - len; | |
| 2697 | + i, | |
| 2698 | + len; | |
| 2699 | + | |
| 1865 | 2700 | if (!handlers) { |
| 1866 | 2701 | return 'filters' === type ? args[0] : false; |
| 1867 | 2702 | } |
| 2703 | + | |
| 1868 | 2704 | len = handlers.length; |
| 2705 | + | |
| 1869 | 2706 | if ('filters' === type) { |
| 1870 | 2707 | for (i = 0; i < len; i++) { |
| 1871 | 2708 | args[0] = handlers[i].callback.apply(handlers[i].context, args); |
| 1872 | 2709 | } |
| @@ -1874,11 +2711,11 @@ | ||
| 1874 | 2711 | for (i = 0; i < len; i++) { |
| 1875 | 2712 | handlers[i].callback.apply(handlers[i].context, args); |
| 1876 | 2713 | } |
| 1877 | 2714 | } |
| 2715 | + | |
| 1878 | 2716 | return 'filters' === type ? args[0] : true; |
| 1879 | 2717 | } |
| 1880 | - | |
| 1881 | 2718 | /** |
| 1882 | 2719 | * Adds an action to the event manager. |
| 1883 | 2720 | * |
| 1884 | 2721 | * @param {string} action Must contain namespace.identifier |
| @@ -1885,30 +2722,37 @@ | ||
| 1885 | 2722 | * @param {Function} callback Must be a valid callback function before this action is added |
| 1886 | 2723 | * @param {number} [priority=10] Used to control when the function is executed in relation to other callbacks bound to the same hook |
| 1887 | 2724 | * @param {*} [context] Supply a value to be used for this |
| 1888 | 2725 | */ |
| 2726 | + | |
| 2727 | + | |
| 1889 | 2728 | function addAction(action, callback, priority, context) { |
| 1890 | 2729 | if ('string' === typeof action && 'function' === typeof callback) { |
| 1891 | 2730 | priority = parseInt(priority || 10, 10); |
| 2731 | + | |
| 1892 | 2732 | _addHook('actions', action, callback, priority, context); |
| 1893 | 2733 | } |
| 2734 | + | |
| 1894 | 2735 | return MethodsAvailable; |
| 1895 | 2736 | } |
| 1896 | - | |
| 1897 | 2737 | /** |
| 1898 | 2738 | * Performs an action if it exists. You can pass as many arguments as you want to this function; the only rule is |
| 1899 | 2739 | * that the first argument must always be the action. |
| 1900 | 2740 | */ |
| 1901 | - function doAction(/* Action, arg1, arg2, ... */ | |
| 1902 | - ) { | |
| 2741 | + | |
| 2742 | + | |
| 2743 | + function | |
| 2744 | + /* Action, arg1, arg2, ... */ | |
| 2745 | + doAction() { | |
| 1903 | 2746 | var args = slice.call(arguments); |
| 1904 | 2747 | var action = args.shift(); |
| 2748 | + | |
| 1905 | 2749 | if ('string' === typeof action) { |
| 1906 | 2750 | _runHook('actions', action, args); |
| 1907 | 2751 | } |
| 2752 | + | |
| 1908 | 2753 | return MethodsAvailable; |
| 1909 | 2754 | } |
| 1910 | - | |
| 1911 | 2755 | /** |
| 1912 | 2756 | * Removes the specified action if it contains a namespace.identifier & exists. |
| 1913 | 2757 | * |
| 1914 | 2758 | * @param {string} action The action to remove |
| @@ -1913,15 +2757,17 @@ | ||
| 1913 | 2757 | * |
| 1914 | 2758 | * @param {string} action The action to remove |
| 1915 | 2759 | * @param {Function} [callback] Callback function to remove |
| 1916 | 2760 | */ |
| 2761 | + | |
| 2762 | + | |
| 1917 | 2763 | function removeAction(action, callback) { |
| 1918 | 2764 | if ('string' === typeof action) { |
| 1919 | 2765 | _removeHook('actions', action, callback); |
| 1920 | 2766 | } |
| 2767 | + | |
| 1921 | 2768 | return MethodsAvailable; |
| 1922 | 2769 | } |
| 1923 | - | |
| 1924 | 2770 | /** |
| 1925 | 2771 | * Adds a filter to the event manager. |
| 1926 | 2772 | * |
| 1927 | 2773 | * @param {string} filter Must contain namespace.identifier |
| @@ -1928,30 +2774,37 @@ | ||
| 1928 | 2774 | * @param {Function} callback Must be a valid callback function before this action is added |
| 1929 | 2775 | * @param {number} [priority=10] Used to control when the function is executed in relation to other callbacks bound to the same hook |
| 1930 | 2776 | * @param {*} [context] Supply a value to be used for this |
| 1931 | 2777 | */ |
| 2778 | + | |
| 2779 | + | |
| 1932 | 2780 | function addFilter(filter, callback, priority, context) { |
| 1933 | 2781 | if ('string' === typeof filter && 'function' === typeof callback) { |
| 1934 | 2782 | priority = parseInt(priority || 10, 10); |
| 2783 | + | |
| 1935 | 2784 | _addHook('filters', filter, callback, priority, context); |
| 1936 | 2785 | } |
| 2786 | + | |
| 1937 | 2787 | return MethodsAvailable; |
| 1938 | 2788 | } |
| 1939 | - | |
| 1940 | 2789 | /** |
| 1941 | 2790 | * Performs a filter if it exists. You should only ever pass 1 argument to be filtered. The only rule is that |
| 1942 | 2791 | * the first argument must always be the filter. |
| 1943 | 2792 | */ |
| 1944 | - function applyFilters(/* Filter, filtered arg, arg2, ... */ | |
| 1945 | - ) { | |
| 2793 | + | |
| 2794 | + | |
| 2795 | + function | |
| 2796 | + /* Filter, filtered arg, arg2, ... */ | |
| 2797 | + applyFilters() { | |
| 1946 | 2798 | var args = slice.call(arguments); |
| 1947 | 2799 | var filter = args.shift(); |
| 2800 | + | |
| 1948 | 2801 | if ('string' === typeof filter) { |
| 1949 | 2802 | return _runHook('filters', filter, args); |
| 1950 | 2803 | } |
| 2804 | + | |
| 1951 | 2805 | return MethodsAvailable; |
| 1952 | 2806 | } |
| 1953 | - | |
| 1954 | 2807 | /** |
| 1955 | 2808 | * Removes the specified filter if it contains a namespace.identifier & exists. |
| 1956 | 2809 | * |
| 1957 | 2810 | * @param {string} filter The action to remove |
| @@ -1956,18 +2809,22 @@ | ||
| 1956 | 2809 | * |
| 1957 | 2810 | * @param {string} filter The action to remove |
| 1958 | 2811 | * @param {Function} [callback] Callback function to remove |
| 1959 | 2812 | */ |
| 2813 | + | |
| 2814 | + | |
| 1960 | 2815 | function removeFilter(filter, callback) { |
| 1961 | 2816 | if ('string' === typeof filter) { |
| 1962 | 2817 | _removeHook('filters', filter, callback); |
| 1963 | 2818 | } |
| 2819 | + | |
| 1964 | 2820 | return MethodsAvailable; |
| 1965 | 2821 | } |
| 1966 | - | |
| 1967 | 2822 | /** |
| 1968 | 2823 | * Maintain a reference to the object scope so our public methods never get confusing. |
| 1969 | 2824 | */ |
| 2825 | + | |
| 2826 | + | |
| 1970 | 2827 | MethodsAvailable = { |
| 1971 | 2828 | removeFilter, |
| 1972 | 2829 | applyFilters, |
| 1973 | 2830 | addFilter, |
| @@ -1973,13 +2830,13 @@ | ||
| 1973 | 2830 | addFilter, |
| 1974 | 2831 | removeAction, |
| 1975 | 2832 | doAction, |
| 1976 | 2833 | addAction |
| 1977 | - }; | |
| 2834 | + }; // Return all of the publicly available methods | |
| 1978 | 2835 | |
| 1979 | - // Return all of the publicly available methods | |
| 1980 | 2836 | return MethodsAvailable; |
| 1981 | 2837 | }; |
| 2838 | + | |
| 1982 | 2839 | module.exports = EventManager; |
| 1983 | 2840 | |
| 1984 | 2841 | /***/ }), |
| 1985 | 2842 | |
| @@ -1988,8 +2845,9 @@ | ||
| 1988 | 2845 | !*** ../core/common/assets/js/utils/environment.js ***! |
| 1989 | 2846 | \*****************************************************/ |
| 1990 | 2847 | /***/ ((__unused_webpack_module, exports) => { |
| 1991 | 2848 | |
| 2849 | +"use strict"; | |
| 1992 | 2850 | |
| 1993 | 2851 | |
| 1994 | 2852 | Object.defineProperty(exports, "__esModule", ({ |
| 1995 | 2853 | value: true |
| @@ -1994,47 +2852,49 @@ | ||
| 1994 | 2852 | Object.defineProperty(exports, "__esModule", ({ |
| 1995 | 2853 | value: true |
| 1996 | 2854 | })); |
| 1997 | 2855 | exports["default"] = void 0; |
| 2856 | + | |
| 1998 | 2857 | const matchUserAgent = UserAgentStr => { |
| 1999 | - return userAgent.indexOf(UserAgentStr) >= 0; | |
| 2000 | - }, | |
| 2001 | - userAgent = navigator.userAgent, | |
| 2002 | - // Solution influenced by https://stackoverflow.com/questions/9847580/how-to-detect-safari-chrome-ie-firefox-and-opera-browser | |
| 2858 | + return userAgent.indexOf(UserAgentStr) >= 0; | |
| 2859 | +}, | |
| 2860 | + userAgent = navigator.userAgent, | |
| 2861 | + // Solution influenced by https://stackoverflow.com/questions/9847580/how-to-detect-safari-chrome-ie-firefox-and-opera-browser | |
| 2862 | +// Opera 8.0+ | |
| 2863 | +isOpera = !!window.opr && !!opr.addons || !!window.opera || matchUserAgent(' OPR/'), | |
| 2864 | + // Firefox 1.0+ | |
| 2865 | +isFirefox = matchUserAgent('Firefox'), | |
| 2866 | + // Safari 3.0+ "[object HTMLElementConstructor]" | |
| 2867 | +isSafari = /^((?!chrome|android).)*safari/i.test(userAgent) || /constructor/i.test(window.HTMLElement) || (p => { | |
| 2868 | + return '[object SafariRemoteNotification]' === p.toString(); | |
| 2869 | +})(!window.safari || typeof safari !== 'undefined' && safari.pushNotification), | |
| 2870 | + // Internet Explorer 6-11 | |
| 2871 | +isIE = /Trident|MSIE/.test(userAgent) && ( | |
| 2872 | +/* @cc_on!@*/ | |
| 2873 | + false || !!document.documentMode), | |
| 2874 | + // Edge 20+ | |
| 2875 | +isEdge = !isIE && !!window.StyleMedia || matchUserAgent('Edg'), | |
| 2876 | + // Google Chrome (Not accurate) | |
| 2877 | +isChrome = !!window.chrome && matchUserAgent('Chrome') && !(isEdge || isOpera), | |
| 2878 | + // Blink engine | |
| 2879 | +isBlink = matchUserAgent('Chrome') && !!window.CSS, | |
| 2880 | + // Apple Webkit engine | |
| 2881 | +isAppleWebkit = matchUserAgent('AppleWebKit') && !isBlink, | |
| 2882 | + environment = { | |
| 2883 | + appleWebkit: isAppleWebkit, | |
| 2884 | + blink: isBlink, | |
| 2885 | + chrome: isChrome, | |
| 2886 | + edge: isEdge, | |
| 2887 | + firefox: isFirefox, | |
| 2888 | + ie: isIE, | |
| 2889 | + mac: matchUserAgent('Macintosh'), | |
| 2890 | + opera: isOpera, | |
| 2891 | + safari: isSafari, | |
| 2892 | + webkit: matchUserAgent('AppleWebKit') | |
| 2893 | +}; | |
| 2003 | 2894 | |
| 2004 | - // Opera 8.0+ | |
| 2005 | - isOpera = !!window.opr && !!opr.addons || !!window.opera || matchUserAgent(' OPR/'), | |
| 2006 | - // Firefox 1.0+ | |
| 2007 | - isFirefox = matchUserAgent('Firefox'), | |
| 2008 | - // Safari 3.0+ "[object HTMLElementConstructor]" | |
| 2009 | - isSafari = /^((?!chrome|android).)*safari/i.test(userAgent) || /constructor/i.test(window.HTMLElement) || (p => { | |
| 2010 | - return '[object SafariRemoteNotification]' === p.toString(); | |
| 2011 | - })(!window.safari || typeof safari !== 'undefined' && safari.pushNotification), | |
| 2012 | - // Internet Explorer 6-11 | |
| 2013 | - isIE = /Trident|MSIE/.test(userAgent) && (/* @cc_on!@*/ false || !!document.documentMode), | |
| 2014 | - // Edge 20+ | |
| 2015 | - isEdge = !isIE && !!window.StyleMedia || matchUserAgent('Edg'), | |
| 2016 | - // Google Chrome (Not accurate) | |
| 2017 | - isChrome = !!window.chrome && matchUserAgent('Chrome') && !(isEdge || isOpera), | |
| 2018 | - // Blink engine | |
| 2019 | - isBlink = matchUserAgent('Chrome') && !!window.CSS, | |
| 2020 | - // Apple Webkit engine | |
| 2021 | - isAppleWebkit = matchUserAgent('AppleWebKit') && !isBlink, | |
| 2022 | - isTouchDevice = 'ontouchstart' in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0, | |
| 2023 | - environment = { | |
| 2024 | - isTouchDevice, | |
| 2025 | - appleWebkit: isAppleWebkit, | |
| 2026 | - blink: isBlink, | |
| 2027 | - chrome: isChrome, | |
| 2028 | - edge: isEdge, | |
| 2029 | - firefox: isFirefox, | |
| 2030 | - ie: isIE, | |
| 2031 | - mac: matchUserAgent('Macintosh'), | |
| 2032 | - opera: isOpera, | |
| 2033 | - safari: isSafari, | |
| 2034 | - webkit: matchUserAgent('AppleWebKit') | |
| 2035 | - }; | |
| 2036 | -var _default = exports["default"] = environment; | |
| 2895 | +var _default = environment; | |
| 2896 | +exports["default"] = _default; | |
| 2037 | 2897 | |
| 2038 | 2898 | /***/ }), |
| 2039 | 2899 | |
| 2040 | 2900 | /***/ "../core/common/assets/js/utils/storage.js": |
| @@ -2040,10 +2900,11 @@ | ||
| 2040 | 2900 | /***/ "../core/common/assets/js/utils/storage.js": |
| 2041 | 2901 | /*!*************************************************!*\ |
| 2042 | 2902 | !*** ../core/common/assets/js/utils/storage.js ***! |
| 2043 | 2903 | \*************************************************/ |
| 2044 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 2904 | +/***/ ((__unused_webpack_module, exports) => { | |
| 2045 | 2905 | |
| 2906 | +"use strict"; | |
| 2046 | 2907 | |
| 2047 | 2908 | |
| 2048 | 2909 | Object.defineProperty(exports, "__esModule", ({ |
| 2049 | 2910 | value: true |
| @@ -2048,30 +2909,35 @@ | ||
| 2048 | 2909 | Object.defineProperty(exports, "__esModule", ({ |
| 2049 | 2910 | value: true |
| 2050 | 2911 | })); |
| 2051 | 2912 | exports["default"] = void 0; |
| 2052 | -__webpack_require__(/*! core-js/modules/esnext.iterator.constructor.js */ "../node_modules/core-js/modules/esnext.iterator.constructor.js"); | |
| 2053 | -__webpack_require__(/*! core-js/modules/esnext.iterator.for-each.js */ "../node_modules/core-js/modules/esnext.iterator.for-each.js"); | |
| 2913 | + | |
| 2054 | 2914 | class _default extends elementorModules.Module { |
| 2055 | 2915 | get(key, options) { |
| 2056 | 2916 | options = options || {}; |
| 2057 | 2917 | let storage; |
| 2918 | + | |
| 2058 | 2919 | try { |
| 2059 | 2920 | storage = options.session ? sessionStorage : localStorage; |
| 2060 | 2921 | } catch (e) { |
| 2061 | 2922 | return key ? undefined : {}; |
| 2062 | 2923 | } |
| 2924 | + | |
| 2063 | 2925 | let elementorStorage = storage.getItem('elementor'); |
| 2926 | + | |
| 2064 | 2927 | if (elementorStorage) { |
| 2065 | 2928 | elementorStorage = JSON.parse(elementorStorage); |
| 2066 | 2929 | } else { |
| 2067 | 2930 | elementorStorage = {}; |
| 2068 | 2931 | } |
| 2932 | + | |
| 2069 | 2933 | if (!elementorStorage.__expiration) { |
| 2070 | 2934 | elementorStorage.__expiration = {}; |
| 2071 | 2935 | } |
| 2936 | + | |
| 2072 | 2937 | const expiration = elementorStorage.__expiration; |
| 2073 | 2938 | let expirationToCheck = []; |
| 2939 | + | |
| 2074 | 2940 | if (key) { |
| 2075 | 2941 | if (expiration[key]) { |
| 2076 | 2942 | expirationToCheck = [key]; |
| 2077 | 2943 | } |
| @@ -2077,8 +2943,9 @@ | ||
| 2077 | 2943 | } |
| 2078 | 2944 | } else { |
| 2079 | 2945 | expirationToCheck = Object.keys(expiration); |
| 2080 | 2946 | } |
| 2947 | + | |
| 2081 | 2948 | let entryExpired = false; |
| 2082 | 2949 | expirationToCheck.forEach(expirationKey => { |
| 2083 | 2950 | if (new Date(expiration[expirationKey]) < new Date()) { |
| 2084 | 2951 | delete elementorStorage[expirationKey]; |
| @@ -2085,37 +2952,48 @@ | ||
| 2085 | 2952 | delete expiration[expirationKey]; |
| 2086 | 2953 | entryExpired = true; |
| 2087 | 2954 | } |
| 2088 | 2955 | }); |
| 2956 | + | |
| 2089 | 2957 | if (entryExpired) { |
| 2090 | 2958 | this.save(elementorStorage, options.session); |
| 2091 | 2959 | } |
| 2960 | + | |
| 2092 | 2961 | if (key) { |
| 2093 | 2962 | return elementorStorage[key]; |
| 2094 | 2963 | } |
| 2964 | + | |
| 2095 | 2965 | return elementorStorage; |
| 2096 | 2966 | } |
| 2967 | + | |
| 2097 | 2968 | set(key, value, options) { |
| 2098 | 2969 | options = options || {}; |
| 2099 | 2970 | const elementorStorage = this.get(null, options); |
| 2100 | 2971 | elementorStorage[key] = value; |
| 2972 | + | |
| 2101 | 2973 | if (options.lifetimeInSeconds) { |
| 2102 | 2974 | const date = new Date(); |
| 2103 | 2975 | date.setTime(date.getTime() + options.lifetimeInSeconds * 1000); |
| 2104 | 2976 | elementorStorage.__expiration[key] = date.getTime(); |
| 2105 | 2977 | } |
| 2978 | + | |
| 2106 | 2979 | this.save(elementorStorage, options.session); |
| 2107 | 2980 | } |
| 2981 | + | |
| 2108 | 2982 | save(object, session) { |
| 2109 | 2983 | let storage; |
| 2984 | + | |
| 2110 | 2985 | try { |
| 2111 | 2986 | storage = session ? sessionStorage : localStorage; |
| 2112 | 2987 | } catch (e) { |
| 2113 | 2988 | return; |
| 2114 | 2989 | } |
| 2990 | + | |
| 2115 | 2991 | storage.setItem('elementor', JSON.stringify(object)); |
| 2116 | 2992 | } |
| 2993 | + | |
| 2117 | 2994 | } |
| 2995 | + | |
| 2118 | 2996 | exports["default"] = _default; |
| 2119 | 2997 | |
| 2120 | 2998 | /***/ }), |
| 2121 | 2999 | |
| @@ -2124,8 +3002,9 @@ | ||
| 2124 | 3002 | !*** ../modules/shapes/assets/js/frontend/frontend.js ***! |
| 2125 | 3003 | \********************************************************/ |
| 2126 | 3004 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 2127 | 3005 | |
| 3006 | +"use strict"; | |
| 2128 | 3007 | |
| 2129 | 3008 | |
| 2130 | 3009 | Object.defineProperty(exports, "__esModule", ({ |
| 2131 | 3010 | value: true |
| @@ -2130,33 +3009,34 @@ | ||
| 2130 | 3009 | Object.defineProperty(exports, "__esModule", ({ |
| 2131 | 3010 | value: true |
| 2132 | 3011 | })); |
| 2133 | 3012 | exports["default"] = void 0; |
| 3013 | + | |
| 2134 | 3014 | class _default extends elementorModules.Module { |
| 2135 | 3015 | constructor() { |
| 2136 | 3016 | super(); |
| 2137 | - elementorFrontend.elementsHandler.attachHandler('text-path', () => Promise.all(/*! import() | text-path */[__webpack_require__.e("vendors-node_modules_dompurify_dist_purify_cjs_js"), __webpack_require__.e("text-path")]).then(__webpack_require__.bind(__webpack_require__, /*! ./handlers/text-path */ "../modules/shapes/assets/js/frontend/handlers/text-path.js"))); | |
| 3017 | + elementorFrontend.elementsHandler.attachHandler('text-path', () => __webpack_require__.e(/*! import() | text-path */ "text-path").then(__webpack_require__.bind(__webpack_require__, /*! ./handlers/text-path */ "../modules/shapes/assets/js/frontend/handlers/text-path.js"))); | |
| 2138 | 3018 | } |
| 3019 | + | |
| 2139 | 3020 | } |
| 3021 | + | |
| 2140 | 3022 | exports["default"] = _default; |
| 2141 | 3023 | |
| 2142 | 3024 | /***/ }), |
| 2143 | 3025 | |
| 2144 | -/***/ "../node_modules/core-js/internals/a-possible-prototype.js": | |
| 2145 | -/*!*****************************************************************!*\ | |
| 2146 | - !*** ../node_modules/core-js/internals/a-possible-prototype.js ***! | |
| 2147 | - \*****************************************************************/ | |
| 3026 | +/***/ "../node_modules/core-js/internals/an-instance.js": | |
| 3027 | +/*!********************************************************!*\ | |
| 3028 | + !*** ../node_modules/core-js/internals/an-instance.js ***! | |
| 3029 | + \********************************************************/ | |
| 2148 | 3030 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 2149 | 3031 | |
| 3032 | +var isPrototypeOf = __webpack_require__(/*! ../internals/object-is-prototype-of */ "../node_modules/core-js/internals/object-is-prototype-of.js"); | |
| 2150 | 3033 | |
| 2151 | -var isPossiblePrototype = __webpack_require__(/*! ../internals/is-possible-prototype */ "../node_modules/core-js/internals/is-possible-prototype.js"); | |
| 2152 | - | |
| 2153 | -var $String = String; | |
| 2154 | 3034 | var $TypeError = TypeError; |
| 2155 | 3035 | |
| 2156 | -module.exports = function (argument) { | |
| 2157 | - if (isPossiblePrototype(argument)) return argument; | |
| 2158 | - throw new $TypeError("Can't set " + $String(argument) + ' as a prototype'); | |
| 3036 | +module.exports = function (it, Prototype) { | |
| 3037 | + if (isPrototypeOf(Prototype, it)) return it; | |
| 3038 | + throw $TypeError('Incorrect invocation'); | |
| 2159 | 3039 | }; |
| 2160 | 3040 | |
| 2161 | 3041 | |
| 2162 | 3042 | /***/ }), |
| @@ -2166,9 +3046,8 @@ | ||
| 2166 | 3046 | !*** ../node_modules/core-js/internals/dom-exception-constants.js ***! |
| 2167 | 3047 | \********************************************************************/ |
| 2168 | 3048 | /***/ ((module) => { |
| 2169 | 3049 | |
| 2170 | - | |
| 2171 | 3050 | module.exports = { |
| 2172 | 3051 | IndexSizeError: { s: 'INDEX_SIZE_ERR', c: 1, m: 1 }, |
| 2173 | 3052 | DOMStringSizeError: { s: 'DOMSTRING_SIZE_ERR', c: 2, m: 0 }, |
| 2174 | 3053 | HierarchyRequestError: { s: 'HIERARCHY_REQUEST_ERR', c: 3, m: 1 }, |
| @@ -2198,173 +3077,8 @@ | ||
| 2198 | 3077 | |
| 2199 | 3078 | |
| 2200 | 3079 | /***/ }), |
| 2201 | 3080 | |
| 2202 | -/***/ "../node_modules/core-js/internals/error-stack-clear.js": | |
| 2203 | -/*!**************************************************************!*\ | |
| 2204 | - !*** ../node_modules/core-js/internals/error-stack-clear.js ***! | |
| 2205 | - \**************************************************************/ | |
| 2206 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2207 | - | |
| 2208 | - | |
| 2209 | -var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ "../node_modules/core-js/internals/function-uncurry-this.js"); | |
| 2210 | - | |
| 2211 | -var $Error = Error; | |
| 2212 | -var replace = uncurryThis(''.replace); | |
| 2213 | - | |
| 2214 | -var TEST = (function (arg) { return String(new $Error(arg).stack); })('zxcasd'); | |
| 2215 | -// eslint-disable-next-line redos/no-vulnerable, sonarjs/slow-regex -- safe | |
| 2216 | -var V8_OR_CHAKRA_STACK_ENTRY = /\n\s*at [^:]*:[^\n]*/; | |
| 2217 | -var IS_V8_OR_CHAKRA_STACK = V8_OR_CHAKRA_STACK_ENTRY.test(TEST); | |
| 2218 | - | |
| 2219 | -module.exports = function (stack, dropEntries) { | |
| 2220 | - if (IS_V8_OR_CHAKRA_STACK && typeof stack == 'string' && !$Error.prepareStackTrace) { | |
| 2221 | - while (dropEntries--) stack = replace(stack, V8_OR_CHAKRA_STACK_ENTRY, ''); | |
| 2222 | - } return stack; | |
| 2223 | -}; | |
| 2224 | - | |
| 2225 | - | |
| 2226 | -/***/ }), | |
| 2227 | - | |
| 2228 | -/***/ "../node_modules/core-js/internals/function-uncurry-this-accessor.js": | |
| 2229 | -/*!***************************************************************************!*\ | |
| 2230 | - !*** ../node_modules/core-js/internals/function-uncurry-this-accessor.js ***! | |
| 2231 | - \***************************************************************************/ | |
| 2232 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2233 | - | |
| 2234 | - | |
| 2235 | -var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ "../node_modules/core-js/internals/function-uncurry-this.js"); | |
| 2236 | -var aCallable = __webpack_require__(/*! ../internals/a-callable */ "../node_modules/core-js/internals/a-callable.js"); | |
| 2237 | - | |
| 2238 | -module.exports = function (object, key, method) { | |
| 2239 | - try { | |
| 2240 | - // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe | |
| 2241 | - return uncurryThis(aCallable(Object.getOwnPropertyDescriptor(object, key)[method])); | |
| 2242 | - } catch (error) { /* empty */ } | |
| 2243 | -}; | |
| 2244 | - | |
| 2245 | - | |
| 2246 | -/***/ }), | |
| 2247 | - | |
| 2248 | -/***/ "../node_modules/core-js/internals/inherit-if-required.js": | |
| 2249 | -/*!****************************************************************!*\ | |
| 2250 | - !*** ../node_modules/core-js/internals/inherit-if-required.js ***! | |
| 2251 | - \****************************************************************/ | |
| 2252 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2253 | - | |
| 2254 | - | |
| 2255 | -var isCallable = __webpack_require__(/*! ../internals/is-callable */ "../node_modules/core-js/internals/is-callable.js"); | |
| 2256 | -var isObject = __webpack_require__(/*! ../internals/is-object */ "../node_modules/core-js/internals/is-object.js"); | |
| 2257 | -var setPrototypeOf = __webpack_require__(/*! ../internals/object-set-prototype-of */ "../node_modules/core-js/internals/object-set-prototype-of.js"); | |
| 2258 | - | |
| 2259 | -// makes subclassing work correct for wrapped built-ins | |
| 2260 | -module.exports = function ($this, dummy, Wrapper) { | |
| 2261 | - var NewTarget, NewTargetPrototype; | |
| 2262 | - if ( | |
| 2263 | - // it can work only with native `setPrototypeOf` | |
| 2264 | - setPrototypeOf && | |
| 2265 | - // we haven't completely correct pre-ES6 way for getting `new.target`, so use this | |
| 2266 | - isCallable(NewTarget = dummy.constructor) && | |
| 2267 | - NewTarget !== Wrapper && | |
| 2268 | - isObject(NewTargetPrototype = NewTarget.prototype) && | |
| 2269 | - NewTargetPrototype !== Wrapper.prototype | |
| 2270 | - ) setPrototypeOf($this, NewTargetPrototype); | |
| 2271 | - return $this; | |
| 2272 | -}; | |
| 2273 | - | |
| 2274 | - | |
| 2275 | -/***/ }), | |
| 2276 | - | |
| 2277 | -/***/ "../node_modules/core-js/internals/is-possible-prototype.js": | |
| 2278 | -/*!******************************************************************!*\ | |
| 2279 | - !*** ../node_modules/core-js/internals/is-possible-prototype.js ***! | |
| 2280 | - \******************************************************************/ | |
| 2281 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2282 | - | |
| 2283 | - | |
| 2284 | -var isObject = __webpack_require__(/*! ../internals/is-object */ "../node_modules/core-js/internals/is-object.js"); | |
| 2285 | - | |
| 2286 | -module.exports = function (argument) { | |
| 2287 | - return isObject(argument) || argument === null; | |
| 2288 | -}; | |
| 2289 | - | |
| 2290 | - | |
| 2291 | -/***/ }), | |
| 2292 | - | |
| 2293 | -/***/ "../node_modules/core-js/internals/normalize-string-argument.js": | |
| 2294 | -/*!**********************************************************************!*\ | |
| 2295 | - !*** ../node_modules/core-js/internals/normalize-string-argument.js ***! | |
| 2296 | - \**********************************************************************/ | |
| 2297 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2298 | - | |
| 2299 | - | |
| 2300 | -var toString = __webpack_require__(/*! ../internals/to-string */ "../node_modules/core-js/internals/to-string.js"); | |
| 2301 | - | |
| 2302 | -module.exports = function (argument, $default) { | |
| 2303 | - return argument === undefined ? arguments.length < 2 ? '' : $default : toString(argument); | |
| 2304 | -}; | |
| 2305 | - | |
| 2306 | - | |
| 2307 | -/***/ }), | |
| 2308 | - | |
| 2309 | -/***/ "../node_modules/core-js/internals/object-set-prototype-of.js": | |
| 2310 | -/*!********************************************************************!*\ | |
| 2311 | - !*** ../node_modules/core-js/internals/object-set-prototype-of.js ***! | |
| 2312 | - \********************************************************************/ | |
| 2313 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2314 | - | |
| 2315 | - | |
| 2316 | -/* eslint-disable no-proto -- safe */ | |
| 2317 | -var uncurryThisAccessor = __webpack_require__(/*! ../internals/function-uncurry-this-accessor */ "../node_modules/core-js/internals/function-uncurry-this-accessor.js"); | |
| 2318 | -var isObject = __webpack_require__(/*! ../internals/is-object */ "../node_modules/core-js/internals/is-object.js"); | |
| 2319 | -var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "../node_modules/core-js/internals/require-object-coercible.js"); | |
| 2320 | -var aPossiblePrototype = __webpack_require__(/*! ../internals/a-possible-prototype */ "../node_modules/core-js/internals/a-possible-prototype.js"); | |
| 2321 | - | |
| 2322 | -// `Object.setPrototypeOf` method | |
| 2323 | -// https://tc39.es/ecma262/#sec-object.setprototypeof | |
| 2324 | -// Works with __proto__ only. Old v8 can't work with null proto objects. | |
| 2325 | -// eslint-disable-next-line es/no-object-setprototypeof -- safe | |
| 2326 | -module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () { | |
| 2327 | - var CORRECT_SETTER = false; | |
| 2328 | - var test = {}; | |
| 2329 | - var setter; | |
| 2330 | - try { | |
| 2331 | - setter = uncurryThisAccessor(Object.prototype, '__proto__', 'set'); | |
| 2332 | - setter(test, []); | |
| 2333 | - CORRECT_SETTER = test instanceof Array; | |
| 2334 | - } catch (error) { /* empty */ } | |
| 2335 | - return function setPrototypeOf(O, proto) { | |
| 2336 | - requireObjectCoercible(O); | |
| 2337 | - aPossiblePrototype(proto); | |
| 2338 | - if (!isObject(O)) return O; | |
| 2339 | - if (CORRECT_SETTER) setter(O, proto); | |
| 2340 | - else O.__proto__ = proto; | |
| 2341 | - return O; | |
| 2342 | - }; | |
| 2343 | -}() : undefined); | |
| 2344 | - | |
| 2345 | - | |
| 2346 | -/***/ }), | |
| 2347 | - | |
| 2348 | -/***/ "../node_modules/core-js/internals/to-string.js": | |
| 2349 | -/*!******************************************************!*\ | |
| 2350 | - !*** ../node_modules/core-js/internals/to-string.js ***! | |
| 2351 | - \******************************************************/ | |
| 2352 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2353 | - | |
| 2354 | - | |
| 2355 | -var classof = __webpack_require__(/*! ../internals/classof */ "../node_modules/core-js/internals/classof.js"); | |
| 2356 | - | |
| 2357 | -var $String = String; | |
| 2358 | - | |
| 2359 | -module.exports = function (argument) { | |
| 2360 | - if (classof(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string'); | |
| 2361 | - return $String(argument); | |
| 2362 | -}; | |
| 2363 | - | |
| 2364 | - | |
| 2365 | -/***/ }), | |
| 2366 | - | |
| 2367 | 3081 | /***/ "../node_modules/core-js/modules/web.dom-exception.stack.js": |
| 2368 | 3082 | /*!******************************************************************!*\ |
| 2369 | 3083 | !*** ../node_modules/core-js/modules/web.dom-exception.stack.js ***! |
| 2370 | 3084 | \******************************************************************/ |
| @@ -2369,11 +3083,12 @@ | ||
| 2369 | 3083 | !*** ../node_modules/core-js/modules/web.dom-exception.stack.js ***! |
| 2370 | 3084 | \******************************************************************/ |
| 2371 | 3085 | /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { |
| 2372 | 3086 | |
| 3087 | +"use strict"; | |
| 2373 | 3088 | |
| 2374 | 3089 | var $ = __webpack_require__(/*! ../internals/export */ "../node_modules/core-js/internals/export.js"); |
| 2375 | -var globalThis = __webpack_require__(/*! ../internals/global-this */ "../node_modules/core-js/internals/global-this.js"); | |
| 3090 | +var global = __webpack_require__(/*! ../internals/global */ "../node_modules/core-js/internals/global.js"); | |
| 2376 | 3091 | var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "../node_modules/core-js/internals/get-built-in.js"); |
| 2377 | 3092 | var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "../node_modules/core-js/internals/create-property-descriptor.js"); |
| 2378 | 3093 | var defineProperty = (__webpack_require__(/*! ../internals/object-define-property */ "../node_modules/core-js/internals/object-define-property.js").f); |
| 2379 | 3094 | var hasOwn = __webpack_require__(/*! ../internals/has-own-property */ "../node_modules/core-js/internals/has-own-property.js"); |
| @@ -2380,9 +3095,9 @@ | ||
| 2380 | 3095 | var anInstance = __webpack_require__(/*! ../internals/an-instance */ "../node_modules/core-js/internals/an-instance.js"); |
| 2381 | 3096 | var inheritIfRequired = __webpack_require__(/*! ../internals/inherit-if-required */ "../node_modules/core-js/internals/inherit-if-required.js"); |
| 2382 | 3097 | var normalizeStringArgument = __webpack_require__(/*! ../internals/normalize-string-argument */ "../node_modules/core-js/internals/normalize-string-argument.js"); |
| 2383 | 3098 | var DOMExceptionConstants = __webpack_require__(/*! ../internals/dom-exception-constants */ "../node_modules/core-js/internals/dom-exception-constants.js"); |
| 2384 | -var clearErrorStack = __webpack_require__(/*! ../internals/error-stack-clear */ "../node_modules/core-js/internals/error-stack-clear.js"); | |
| 3099 | +var clearErrorStack = __webpack_require__(/*! ../internals/clear-error-stack */ "../node_modules/core-js/internals/clear-error-stack.js"); | |
| 2385 | 3100 | var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "../node_modules/core-js/internals/descriptors.js"); |
| 2386 | 3101 | var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "../node_modules/core-js/internals/is-pure.js"); |
| 2387 | 3102 | |
| 2388 | 3103 | var DOM_EXCEPTION = 'DOMException'; |
| @@ -2394,9 +3109,9 @@ | ||
| 2394 | 3109 | var argumentsLength = arguments.length; |
| 2395 | 3110 | var message = normalizeStringArgument(argumentsLength < 1 ? undefined : arguments[0]); |
| 2396 | 3111 | var name = normalizeStringArgument(argumentsLength < 2 ? undefined : arguments[1], 'Error'); |
| 2397 | 3112 | var that = new NativeDOMException(message, name); |
| 2398 | - var error = new Error(message); | |
| 3113 | + var error = Error(message); | |
| 2399 | 3114 | error.name = DOM_EXCEPTION; |
| 2400 | 3115 | defineProperty(that, 'stack', createPropertyDescriptor(1, clearErrorStack(error.stack, 1))); |
| 2401 | 3116 | inheritIfRequired(that, this, $DOMException); |
| 2402 | 3117 | return that; |
| @@ -2403,13 +3118,13 @@ | ||
| 2403 | 3118 | }; |
| 2404 | 3119 | |
| 2405 | 3120 | var DOMExceptionPrototype = $DOMException.prototype = NativeDOMException.prototype; |
| 2406 | 3121 | |
| 2407 | -var ERROR_HAS_STACK = 'stack' in new Error(DOM_EXCEPTION); | |
| 3122 | +var ERROR_HAS_STACK = 'stack' in Error(DOM_EXCEPTION); | |
| 2408 | 3123 | var DOM_EXCEPTION_HAS_STACK = 'stack' in new NativeDOMException(1, 2); |
| 2409 | 3124 | |
| 2410 | -// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe | |
| 2411 | -var descriptor = NativeDOMException && DESCRIPTORS && Object.getOwnPropertyDescriptor(globalThis, DOM_EXCEPTION); | |
| 3125 | +// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe | |
| 3126 | +var descriptor = NativeDOMException && DESCRIPTORS && Object.getOwnPropertyDescriptor(global, DOM_EXCEPTION); | |
| 2412 | 3127 | |
| 2413 | 3128 | // Bun ~ 0.1.1 DOMException have incorrect descriptor and we can't redefine it |
| 2414 | 3129 | // https://github.com/Jarred-Sumner/bun/issues/399 |
| 2415 | 3130 | var BUGGY_DESCRIPTOR = !!descriptor && !(descriptor.writable && descriptor.configurable); |