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