PluginProbe
Elementor Website Builder – more than just a page builder / 3.5.2
Elementor Website Builder – more than just a page builder v3.5.2
4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 4.0.7 All 451 releases
elementor / assets / js / frontend.js

frontend.js in Elementor Website Builder – more than just a page builder 3.5.2, at assets/js/frontend.js

2,913 lines 87.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /*! elementor - v3.5.2 - 22-12-2021 */
2 "use strict";
3 (self["webpackChunkelementor"] = self["webpackChunkelementor"] || []).push([["frontend"],{
4
5 /***/ "../assets/dev/js/frontend/documents-manager.js":
6 /*!******************************************************!*\
7 !*** ../assets/dev/js/frontend/documents-manager.js ***!
8 \******************************************************/
9 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
10
11
12
13 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
14
15 Object.defineProperty(exports, "__esModule", ({
16 value: true
17 }));
18 exports["default"] = void 0;
19
20 var _document = _interopRequireDefault(__webpack_require__(/*! ./document */ "../assets/dev/js/frontend/document.js"));
21
22 class _default extends elementorModules.ViewModule {
23 constructor(...args) {
24 super(...args);
25 this.documents = {};
26 this.initDocumentClasses();
27 this.attachDocumentsClasses();
28 }
29
30 getDefaultSettings() {
31 return {
32 selectors: {
33 document: '.elementor'
34 }
35 };
36 }
37
38 getDefaultElements() {
39 const selectors = this.getSettings('selectors');
40 return {
41 $documents: jQuery(selectors.document)
42 };
43 }
44
45 initDocumentClasses() {
46 this.documentClasses = {
47 base: _document.default
48 };
49 elementorFrontend.hooks.doAction('elementor/frontend/documents-manager/init-classes', this);
50 }
51
52 addDocumentClass(documentType, documentClass) {
53 this.documentClasses[documentType] = documentClass;
54 }
55
56 attachDocumentsClasses() {
57 this.elements.$documents.each((index, document) => this.attachDocumentClass(jQuery(document)));
58 }
59
60 attachDocumentClass($document) {
61 const documentData = $document.data(),
62 documentID = documentData.elementorId,
63 documentType = documentData.elementorType,
64 DocumentClass = this.documentClasses[documentType] || this.documentClasses.base;
65 this.documents[documentID] = new DocumentClass({
66 $element: $document,
67 id: documentID
68 });
69 }
70
71 }
72
73 exports["default"] = _default;
74
75 /***/ }),
76
77 /***/ "../assets/dev/js/frontend/elements-handlers-manager.js":
78 /*!**************************************************************!*\
79 !*** ../assets/dev/js/frontend/elements-handlers-manager.js ***!
80 \**************************************************************/
81 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
82
83
84
85 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
86
87 var _global = _interopRequireDefault(__webpack_require__(/*! ./handlers/global */ "../assets/dev/js/frontend/handlers/global.js"));
88
89 var _section = _interopRequireDefault(__webpack_require__(/*! ./handlers/section/section */ "../assets/dev/js/frontend/handlers/section/section.js"));
90
91 var _column = _interopRequireDefault(__webpack_require__(/*! ./handlers/column */ "../assets/dev/js/frontend/handlers/column.js"));
92
93 module.exports = function ($) {
94 const handlersInstances = {};
95 this.elementsHandlers = {
96 'accordion.default': () => __webpack_require__.e(/*! import() | accordion */ "accordion").then(__webpack_require__.bind(__webpack_require__, /*! ./handlers/accordion */ "../assets/dev/js/frontend/handlers/accordion.js")),
97 'alert.default': () => __webpack_require__.e(/*! import() | alert */ "alert").then(__webpack_require__.bind(__webpack_require__, /*! ./handlers/alert */ "../assets/dev/js/frontend/handlers/alert.js")),
98 'counter.default': () => __webpack_require__.e(/*! import() | counter */ "counter").then(__webpack_require__.bind(__webpack_require__, /*! ./handlers/counter */ "../assets/dev/js/frontend/handlers/counter.js")),
99 'progress.default': () => __webpack_require__.e(/*! import() | progress */ "progress").then(__webpack_require__.bind(__webpack_require__, /*! ./handlers/progress */ "../assets/dev/js/frontend/handlers/progress.js")),
100 'tabs.default': () => __webpack_require__.e(/*! import() | tabs */ "tabs").then(__webpack_require__.bind(__webpack_require__, /*! ./handlers/tabs */ "../assets/dev/js/frontend/handlers/tabs.js")),
101 'toggle.default': () => __webpack_require__.e(/*! import() | toggle */ "toggle").then(__webpack_require__.bind(__webpack_require__, /*! ./handlers/toggle */ "../assets/dev/js/frontend/handlers/toggle.js")),
102 'video.default': () => __webpack_require__.e(/*! import() | video */ "video").then(__webpack_require__.bind(__webpack_require__, /*! ./handlers/video */ "../assets/dev/js/frontend/handlers/video.js")),
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")),
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")),
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"))
106 };
107
108 const addGlobalHandlers = () => elementorFrontend.hooks.addAction('frontend/element_ready/global', _global.default);
109
110 const addElementsHandlers = () => {
111 this.elementsHandlers.section = _section.default;
112 this.elementsHandlers.column = _column.default;
113 $.each(this.elementsHandlers, (elementName, Handlers) => {
114 const elementData = elementName.split('.');
115 elementName = elementData[0];
116 const skin = elementData[1] || null;
117 this.attachHandler(elementName, Handlers, skin);
118 });
119 };
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') => {
128 skin = skin ? '.' + skin : '';
129 elementorFrontend.hooks.addAction(`frontend/element_ready/${elementName}${skin}`, $element => {
130 if (isClassHandler(Handler)) {
131 this.addHandler(Handler, {
132 $element
133 }, true);
134 } else {
135 const handlerValue = Handler();
136
137 if (handlerValue instanceof Promise) {
138 handlerValue.then(({
139 default: dynamicHandler
140 }) => {
141 this.addHandler(dynamicHandler, {
142 $element
143 }, true);
144 });
145 } else {
146 this.addHandler(handlerValue, {
147 $element
148 }, true);
149 }
150 }
151 });
152 };
153
154 this.addHandler = function (HandlerClass, options) {
155 const elementID = options.$element.data('model-cid');
156 let handlerID; // If element is in edit mode
157
158 if (elementID) {
159 handlerID = HandlerClass.prototype.getConstructorID();
160
161 if (!handlersInstances[elementID]) {
162 handlersInstances[elementID] = {};
163 }
164
165 const oldHandler = handlersInstances[elementID][handlerID];
166
167 if (oldHandler) {
168 oldHandler.onDestroy();
169 }
170 }
171
172 const newHandler = new HandlerClass(options);
173
174 if (elementID) {
175 handlersInstances[elementID][handlerID] = newHandler;
176 }
177 };
178
179 this.attachHandler = (elementName, Handlers, skin) => {
180 if (!Array.isArray(Handlers)) {
181 Handlers = [Handlers];
182 }
183
184 Handlers.forEach(Handler => addHandlerWithHook(elementName, Handler, skin));
185 };
186
187 this.getHandler = function (handlerName) {
188 if (!handlerName) {
189 return;
190 }
191
192 const elementHandler = this.elementsHandlers[handlerName];
193
194 if (isClassHandler(elementHandler)) {
195 return elementHandler;
196 }
197
198 return new Promise(res => {
199 elementHandler().then(({
200 default: dynamicHandler
201 }) => {
202 res(dynamicHandler);
203 });
204 });
205 };
206
207 this.getHandlers = function (handlerName) {
208 elementorCommon.helpers.softDeprecated('getHandlers', '3.1.0', 'elementorFrontend.elementsHandler.getHandler');
209
210 if (handlerName) {
211 return this.getHandler(handlerName);
212 }
213
214 return this.elementsHandlers;
215 };
216
217 this.runReadyTrigger = function (scope) {
218 if (elementorFrontend.config.is_static) {
219 return;
220 } // Initializing the `$scope` as frontend jQuery instance
221
222
223 const $scope = jQuery(scope),
224 elementType = $scope.attr('data-element_type');
225
226 if (!elementType) {
227 return;
228 }
229
230 elementorFrontend.hooks.doAction('frontend/element_ready/global', $scope, $);
231 elementorFrontend.hooks.doAction(`frontend/element_ready/${elementType}`, $scope, $);
232
233 if ('widget' === elementType) {
234 const widgetType = $scope.attr('data-widget_type');
235 elementorFrontend.hooks.doAction(`frontend/element_ready/${widgetType}`, $scope, $);
236 }
237 };
238
239 this.init = () => {
240 addGlobalHandlers();
241 addElementsHandlers();
242 };
243 };
244
245 /***/ }),
246
247 /***/ "../assets/dev/js/frontend/frontend.js":
248 /*!*********************************************!*\
249 !*** ../assets/dev/js/frontend/frontend.js ***!
250 \*********************************************/
251 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
252
253
254
255 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
256
257 Object.defineProperty(exports, "__esModule", ({
258 value: true
259 }));
260 exports["default"] = void 0;
261
262 __webpack_require__(/*! ../public-path */ "../assets/dev/js/public-path.js");
263
264 var _documentsManager = _interopRequireDefault(__webpack_require__(/*! ./documents-manager */ "../assets/dev/js/frontend/documents-manager.js"));
265
266 var _storage = _interopRequireDefault(__webpack_require__(/*! elementor-common/utils/storage */ "../core/common/assets/js/utils/storage.js"));
267
268 var _environment = _interopRequireDefault(__webpack_require__(/*! elementor-common/utils/environment */ "../core/common/assets/js/utils/environment.js"));
269
270 var _youtubeLoader = _interopRequireDefault(__webpack_require__(/*! ./utils/video-api/youtube-loader */ "../assets/dev/js/frontend/utils/video-api/youtube-loader.js"));
271
272 var _vimeoLoader = _interopRequireDefault(__webpack_require__(/*! ./utils/video-api/vimeo-loader */ "../assets/dev/js/frontend/utils/video-api/vimeo-loader.js"));
273
274 var _baseLoader = _interopRequireDefault(__webpack_require__(/*! ./utils/video-api/base-loader */ "../assets/dev/js/frontend/utils/video-api/base-loader.js"));
275
276 var _urlActions = _interopRequireDefault(__webpack_require__(/*! ./utils/url-actions */ "../assets/dev/js/frontend/utils/url-actions.js"));
277
278 var _swiper = _interopRequireDefault(__webpack_require__(/*! ./utils/swiper */ "../assets/dev/js/frontend/utils/swiper.js"));
279
280 var _lightboxManager = _interopRequireDefault(__webpack_require__(/*! ./utils/lightbox/lightbox-manager */ "../assets/dev/js/frontend/utils/lightbox/lightbox-manager.js"));
281
282 var _assetsLoader = _interopRequireDefault(__webpack_require__(/*! ./utils/assets-loader */ "../assets/dev/js/frontend/utils/assets-loader.js"));
283
284 var _breakpoints = _interopRequireDefault(__webpack_require__(/*! elementor-utils/breakpoints */ "../assets/dev/js/utils/breakpoints.js"));
285
286 var _events = _interopRequireDefault(__webpack_require__(/*! elementor-utils/events */ "../assets/dev/js/utils/events.js"));
287
288 var _frontend = _interopRequireDefault(__webpack_require__(/*! elementor/modules/shapes/assets/js/frontend/frontend */ "../modules/shapes/assets/js/frontend/frontend.js"));
289
290 var _utils = __webpack_require__(/*! elementor-frontend/utils/utils */ "../assets/dev/js/frontend/utils/utils.js");
291
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");
296
297 class Frontend extends elementorModules.ViewModule {
298 constructor(...args) {
299 super(...args);
300 this.config = elementorFrontendConfig;
301 this.config.legacyMode = {
302 get elementWrappers() {
303 if (elementorFrontend.isEditMode()) {
304 elementorCommon.helpers.hardDeprecated('elementorFrontend.config.legacyMode.elementWrappers', '3.1.0', 'elementorFrontend.config.experimentalFeatures.e_dom_optimization');
305 }
306
307 return !elementorFrontend.config.experimentalFeatures.e_dom_optimization;
308 }
309
310 };
311 this.populateActiveBreakpointsConfig();
312 } // TODO: BC since 2.5.0
313
314
315 get Module() {
316 if (this.isEditMode()) {
317 parent.elementorCommon.helpers.hardDeprecated('elementorFrontend.Module', '2.5.0', 'elementorModules.frontend.handlers.Base');
318 }
319
320 return elementorModules.frontend.handlers.Base;
321 }
322
323 getDefaultSettings() {
324 return {
325 selectors: {
326 elementor: '.elementor',
327 adminBar: '#wpadminbar'
328 }
329 };
330 }
331
332 getDefaultElements() {
333 const defaultElements = {
334 window: window,
335 $window: jQuery(window),
336 $document: jQuery(document),
337 $head: jQuery(document.head),
338 $body: jQuery(document.body),
339 $deviceMode: jQuery('<span>', {
340 id: 'elementor-device-mode',
341 class: 'elementor-screen-only'
342 })
343 };
344 defaultElements.$body.append(defaultElements.$deviceMode);
345 return defaultElements;
346 }
347
348 bindEvents() {
349 this.elements.$window.on('resize', () => this.setDeviceModeData());
350 }
351 /**
352 * @deprecated 2.4.0 Use just `this.elements` instead
353 */
354
355
356 getElements(elementName) {
357 return this.getItems(this.elements, elementName);
358 }
359 /**
360 * @deprecated 2.4.0 This method was never in use
361 */
362
363
364 getPageSettings(settingName) {
365 const settingsObject = this.isEditMode() ? elementor.settings.page.model.attributes : this.config.settings.page;
366 return this.getItems(settingsObject, settingName);
367 }
368
369 getGeneralSettings(settingName) {
370 if (this.isEditMode()) {
371 parent.elementorCommon.helpers.softDeprecated('getGeneralSettings', '3.0.0', 'getKitSettings and remove the `elementor_` prefix');
372 }
373
374 return this.getKitSettings(`elementor_${settingName}`);
375 }
376
377 getKitSettings(settingName) {
378 // TODO: use Data API.
379 return this.getItems(this.config.kit, settingName);
380 }
381
382 getCurrentDeviceMode() {
383 return getComputedStyle(this.elements.$deviceMode[0], ':after').content.replace(/"/g, '');
384 }
385
386 getDeviceSetting(deviceMode, settings, settingKey) {
387 // Add specific handling for widescreen since it is larger than desktop.
388 if ('widescreen' === deviceMode) {
389 return this.getWidescreenSetting(settings, settingKey);
390 }
391
392 const devices = elementorFrontend.breakpoints.getActiveBreakpointsList({
393 largeToSmall: true,
394 withDesktop: true
395 });
396 let deviceIndex = devices.indexOf(deviceMode);
397
398 while (deviceIndex > 0) {
399 const currentDevice = devices[deviceIndex],
400 fullSettingKey = settingKey + '_' + currentDevice,
401 deviceValue = settings[fullSettingKey]; // Accept 0 as value.
402
403 if (deviceValue || 0 === deviceValue) {
404 return deviceValue;
405 }
406
407 deviceIndex--;
408 }
409
410 return settings[settingKey];
411 }
412
413 getWidescreenSetting(settings, settingKey) {
414 const deviceMode = 'widescreen',
415 widescreenSettingKey = settingKey + '_' + deviceMode;
416 let settingToReturn; // If the device mode is 'widescreen', and the setting exists - return it.
417
418 if (settings[widescreenSettingKey]) {
419 settingToReturn = settings[widescreenSettingKey];
420 } else {
421 // Otherwise, return the desktop setting
422 settingToReturn = settings[settingKey];
423 }
424
425 return settingToReturn;
426 }
427
428 getCurrentDeviceSetting(settings, settingKey) {
429 return this.getDeviceSetting(elementorFrontend.getCurrentDeviceMode(), settings, settingKey);
430 }
431
432 isEditMode() {
433 return this.config.environmentMode.edit;
434 }
435
436 isWPPreviewMode() {
437 return this.config.environmentMode.wpPreview;
438 }
439
440 initDialogsManager() {
441 let dialogsManager;
442
443 this.getDialogsManager = () => {
444 if (!dialogsManager) {
445 dialogsManager = new DialogsManager.Instance();
446 }
447
448 return dialogsManager;
449 };
450 }
451
452 initOnReadyComponents() {
453 this.utils = {
454 youtube: new _youtubeLoader.default(),
455 vimeo: new _vimeoLoader.default(),
456 baseVideoLoader: new _baseLoader.default(),
457 anchors: new AnchorsModule(),
458
459 get lightbox() {
460 return _lightboxManager.default.getLightbox();
461 },
462
463 urlActions: new _urlActions.default(),
464 swiper: _swiper.default,
465 environment: _environment.default,
466 assetsLoader: new _assetsLoader.default(),
467 escapeHTML: _utils.escapeHTML
468 }; // TODO: BC since 2.4.0
469
470 this.modules = {
471 StretchElement: elementorModules.frontend.tools.StretchElement,
472 Masonry: elementorModules.utils.Masonry
473 };
474 this.elementsHandler.init();
475
476 if (this.isEditMode()) {
477 elementor.once('document:loaded', () => this.onDocumentLoaded());
478 } else {
479 this.onDocumentLoaded();
480 }
481 }
482
483 initOnReadyElements() {
484 this.elements.$wpAdminBar = this.elements.$document.find(this.getSettings('selectors.adminBar'));
485 }
486
487 addUserAgentClasses() {
488 for (const [key, value] of Object.entries(_environment.default)) {
489 if (value) {
490 this.elements.$body.addClass('e--ua-' + key);
491 }
492 }
493 }
494
495 setDeviceModeData() {
496 this.elements.$body.attr('data-elementor-device-mode', this.getCurrentDeviceMode());
497 }
498
499 addListenerOnce(listenerID, event, callback, to) {
500 if (!to) {
501 to = this.elements.$window;
502 }
503
504 if (!this.isEditMode()) {
505 to.on(event, callback);
506 return;
507 }
508
509 this.removeListeners(listenerID, event, to);
510
511 if (to instanceof jQuery) {
512 const eventNS = event + '.' + listenerID;
513 to.on(eventNS, callback);
514 } else {
515 to.on(event, callback, listenerID);
516 }
517 }
518
519 removeListeners(listenerID, event, callback, from) {
520 if (!from) {
521 from = this.elements.$window;
522 }
523
524 if (from instanceof jQuery) {
525 const eventNS = event + '.' + listenerID;
526 from.off(eventNS, callback);
527 } else {
528 from.off(event, callback, listenerID);
529 }
530 } // Based on underscore function
531
532
533 debounce(func, wait) {
534 let timeout;
535 return function () {
536 const context = this,
537 args = arguments;
538
539 const later = () => {
540 timeout = null;
541 func.apply(context, args);
542 };
543
544 const callNow = !timeout;
545 clearTimeout(timeout);
546 timeout = setTimeout(later, wait);
547
548 if (callNow) {
549 func.apply(context, args);
550 }
551 };
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
575 muteMigrationTraces() {
576 jQuery.migrateMute = true;
577 jQuery.migrateTrace = false;
578 }
579 /**
580 * Initialize the modules' widgets handlers.
581 */
582
583
584 initModules() {
585 const handlers = {
586 shapes: _frontend.default
587 }; // TODO: BC - Deprecated since 3.5.0
588
589 elementorFrontend.trigger('elementor/modules/init:before'); // TODO: Use this instead.
590
591 elementorFrontend.trigger('elementor/modules/init/before');
592 Object.entries(handlers).forEach(([moduleName, ModuleClass]) => {
593 this.modulesHandlers[moduleName] = new ModuleClass();
594 });
595 }
596
597 populateActiveBreakpointsConfig() {
598 this.config.responsive.activeBreakpoints = {};
599 Object.entries(this.config.responsive.breakpoints).forEach(([breakpointKey, breakpointData]) => {
600 if (breakpointData.is_enabled) {
601 this.config.responsive.activeBreakpoints[breakpointKey] = breakpointData;
602 }
603 });
604 }
605
606 init() {
607 this.hooks = new EventManager();
608 this.breakpoints = new _breakpoints.default(this.config.responsive);
609 this.storage = new _storage.default();
610 this.elementsHandler = new ElementsHandler(jQuery);
611 this.modulesHandlers = {};
612 this.addUserAgentClasses();
613 this.setDeviceModeData();
614 this.initDialogsManager();
615
616 if (this.isEditMode()) {
617 this.muteMigrationTraces();
618 } // Keep this line before `initOnReadyComponents` call
619
620
621 _events.default.dispatch(this.elements.$window, 'elementor/frontend/init');
622
623 this.initModules();
624 this.initOnReadyElements();
625 this.initOnReadyComponents();
626 }
627
628 onDocumentLoaded() {
629 this.documentsManager = new _documentsManager.default();
630 this.trigger('components:init');
631 new _lightboxManager.default();
632 }
633
634 }
635
636 exports["default"] = Frontend;
637 window.elementorFrontend = new Frontend();
638
639 if (!elementorFrontend.isEditMode()) {
640 jQuery(() => elementorFrontend.init());
641 }
642
643 /***/ }),
644
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) => {
650
651
652
653 Object.defineProperty(exports, "__esModule", ({
654 value: true
655 }));
656 exports["default"] = void 0;
657
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 }
673
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 };
695
696 if ('yes' === elementSettings.background_slideshow_loop) {
697 swiperOptions.loopedSlides = this.getSlidesCount();
698 }
699
700 switch (elementSettings.background_slideshow_slide_transition) {
701 case 'fade':
702 swiperOptions.effect = 'fade';
703 swiperOptions.fadeEffect = {
704 crossFade: true
705 };
706 break;
707
708 case 'slide_down':
709 swiperOptions.autoplay.reverseDirection = true;
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
816 /***/ }),
817
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__) => {
823
824
825
826 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
827
828 Object.defineProperty(exports, "__esModule", ({
829 value: true
830 }));
831 exports["default"] = void 0;
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
838 /***/ }),
839
840 /***/ "../assets/dev/js/frontend/handlers/global.js":
841 /*!****************************************************!*\
842 !*** ../assets/dev/js/frontend/handlers/global.js ***!
843 \****************************************************/
844 /***/ ((__unused_webpack_module, exports) => {
845
846
847
848 Object.defineProperty(exports, "__esModule", ({
849 value: true
850 }));
851 exports["default"] = void 0;
852
853 class GlobalHandler extends elementorModules.frontend.handlers.Base {
854 getWidgetType() {
855 return 'global';
856 }
857
858 animate() {
859 const $element = this.$element,
860 animation = this.getAnimation();
861
862 if ('none' === animation) {
863 $element.removeClass('elementor-invisible');
864 return;
865 }
866
867 const elementSettings = this.getElementSettings(),
868 animationDelay = elementSettings._animation_delay || elementSettings.animation_delay || 0;
869 $element.removeClass(animation);
870
871 if (this.currentAnimation) {
872 $element.removeClass(this.currentAnimation);
873 }
874
875 this.currentAnimation = animation;
876 setTimeout(() => {
877 $element.removeClass('elementor-invisible').addClass('animated ' + animation);
878 }, animationDelay);
879 }
880
881 getAnimation() {
882 return this.getCurrentDeviceSetting('animation') || this.getCurrentDeviceSetting('_animation');
883 }
884
885 onInit(...args) {
886 super.onInit(...args);
887
888 if (this.getAnimation()) {
889 const observer = elementorModules.utils.Scroll.scrollObserver({
890 callback: event => {
891 if (event.isInViewport) {
892 this.animate();
893 observer.unobserve(this.$element[0]);
894 }
895 }
896 });
897 observer.observe(this.$element[0]);
898 }
899 }
900
901 onElementChange(propertyName) {
902 if (/^_?animation/.test(propertyName)) {
903 this.animate();
904 }
905 }
906
907 }
908
909 var _default = $scope => {
910 elementorFrontend.elementsHandler.addHandler(GlobalHandler, {
911 $element: $scope
912 });
913 };
914
915 exports["default"] = _default;
916
917 /***/ }),
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
1298 /***/ "../assets/dev/js/frontend/handlers/section/section.js":
1299 /*!*************************************************************!*\
1300 !*** ../assets/dev/js/frontend/handlers/section/section.js ***!
1301 \*************************************************************/
1302 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1303
1304
1305
1306 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
1307
1308 Object.defineProperty(exports, "__esModule", ({
1309 value: true
1310 }));
1311 exports["default"] = void 0;
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
1327 /***/ }),
1328
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) => {
1334
1335
1336
1337 Object.defineProperty(exports, "__esModule", ({
1338 value: true
1339 }));
1340 exports["default"] = void 0;
1341
1342 class Shapes extends elementorModules.frontend.handlers.Base {
1343 getDefaultSettings() {
1344 return {
1345 selectors: {
1346 container: '> .elementor-shape-%s'
1347 },
1348 svgURL: elementorFrontend.config.urls.assets + 'shapes/'
1349 };
1350 }
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;
1358 }
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');
1372 }
1373 }
1374
1375 return svgURL;
1376 }
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
1387 return;
1388 }
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);
1401 }
1402
1403 setNegative(side) {
1404 this.elements['$' + side + 'Container'].attr('data-negative', !!this.getElementSettings('shape_divider_' + side + '_negative'));
1405 }
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);
1416 }
1417 });
1418 }
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 }
1434 }
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 }
1466 }
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);
1473 }
1474 }
1475
1476 isActive(settings) {
1477 return elementorFrontend.isEditMode() || settings.$element.hasClass('elementor-section-stretched');
1478 }
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 });
1488 }
1489
1490 getStretchContainer() {
1491 return elementorFrontend.getKitSettings('stretched_section_container') || window;
1492 }
1493
1494 stretch() {
1495 if (!this.getElementSettings('stretch_section')) {
1496 return;
1497 }
1498
1499 this.stretchElement.stretch();
1500 }
1501
1502 onInit(...args) {
1503 if (!this.isActive(this.getSettings())) {
1504 return;
1505 }
1506
1507 this.initStretch();
1508 super.onInit(...args);
1509 this.stretch();
1510 }
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 }
1520 }
1521
1522 onKitChangeStretchContainerChange() {
1523 this.stretchElement.setSettings('selectors.container', this.getStretchContainer());
1524 this.stretch();
1525 }
1526
1527 }
1528
1529 exports["default"] = StretchedSection;
1530
1531 /***/ }),
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
1624 /***/ "../assets/dev/js/frontend/utils/assets-loader.js":
1625 /*!********************************************************!*\
1626 !*** ../assets/dev/js/frontend/utils/assets-loader.js ***!
1627 \********************************************************/
1628 /***/ ((__unused_webpack_module, exports) => {
1629
1630
1631
1632 Object.defineProperty(exports, "__esModule", ({
1633 value: true
1634 }));
1635 exports["default"] = void 0;
1636
1637 class AssetsLoader {
1638 getScriptElement(src) {
1639 const scriptElement = document.createElement('script');
1640 scriptElement.src = src;
1641 return scriptElement;
1642 }
1643
1644 getStyleElement(src) {
1645 const styleElement = document.createElement('link');
1646 styleElement.rel = 'stylesheet';
1647 styleElement.href = src;
1648 return styleElement;
1649 }
1650
1651 load(type, key) {
1652 const assetData = AssetsLoader.assets[type][key];
1653
1654 if (!assetData.loader) {
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 });
1663 }
1664
1665 return assetData.loader;
1666 }
1667
1668 }
1669
1670 exports["default"] = AssetsLoader;
1671 const fileSuffix = elementorFrontendConfig.environmentMode.isScriptDebug ? '' : '.min';
1672 AssetsLoader.assets = {
1673 script: {
1674 dialog: {
1675 src: `${elementorFrontendConfig.urls.assets}lib/dialog/dialog${fileSuffix}.js?ver=4.9.0`
1676 },
1677 'share-link': {
1678 src: `${elementorFrontendConfig.urls.assets}lib/share-link/share-link${fileSuffix}.js?ver=${elementorFrontendConfig.version}`
1679 },
1680 swiper: {
1681 src: `${elementorFrontendConfig.urls.assets}lib/swiper/swiper${fileSuffix}.js?ver=5.3.6`
1682 }
1683 },
1684 style: {}
1685 };
1686
1687 /***/ }),
1688
1689 /***/ "../assets/dev/js/frontend/utils/lightbox/lightbox-manager.js":
1690 /*!********************************************************************!*\
1691 !*** ../assets/dev/js/frontend/utils/lightbox/lightbox-manager.js ***!
1692 \********************************************************************/
1693 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1694
1695
1696
1697 Object.defineProperty(exports, "__esModule", ({
1698 value: true
1699 }));
1700 exports["default"] = void 0;
1701
1702 class LightboxManager extends elementorModules.ViewModule {
1703 static getLightbox() {
1704 const lightboxPromise = new Promise(resolveLightbox => {
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);
1712 }
1713
1714 getDefaultSettings() {
1715 return {
1716 selectors: {
1717 links: 'a, [data-elementor-lightbox]'
1718 }
1719 };
1720 }
1721
1722 getDefaultElements() {
1723 return {
1724 $links: jQuery(this.getSettings('selectors.links'))
1725 };
1726 }
1727
1728 isLightboxLink(element) {
1729 // Check for lowercase `a` to make sure it works also for links inside SVGs.
1730 if ('a' === element.tagName.toLowerCase() && (element.hasAttribute('download') || !/^[^?]+\.(png|jpe?g|gif|svg|webp)(\?.*)?$/i.test(element.href)) && !element.dataset.elementorLightboxVideo) {
1731 return false;
1732 }
1733
1734 const generalOpenInLightbox = elementorFrontend.getKitSettings('global_image_lightbox'),
1735 currentLinkOpenInLightbox = element.dataset.elementorOpenLightbox;
1736 return 'yes' === currentLinkOpenInLightbox || generalOpenInLightbox && 'no' !== currentLinkOpenInLightbox;
1737 }
1738
1739 async onLinkClick(event) {
1740 const element = event.currentTarget,
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
1746 if (!this.isLightboxLink(element)) {
1747 if (editMode && isClickInsideElementor) {
1748 event.preventDefault();
1749 }
1750
1751 return;
1752 }
1753
1754 event.preventDefault();
1755
1756 if (editMode && !elementor.getPreferences('lightbox_in_editor')) {
1757 return;
1758 } // Disable lightbox on color picking mode.
1759
1760
1761 if (isColorPickingMode) {
1762 return;
1763 }
1764
1765 const lightbox = this.isOptimizedAssetsLoading() ? await LightboxManager.getLightbox() : elementorFrontend.utils.lightbox;
1766 lightbox.createLightbox(element);
1767 }
1768
1769 isOptimizedAssetsLoading() {
1770 return elementorFrontend.config.experimentalFeatures.e_optimized_assets_loading;
1771 }
1772
1773 bindEvents() {
1774 elementorFrontend.elements.$document.on('click', this.getSettings('selectors.links'), event => this.onLinkClick(event));
1775 }
1776
1777 onInit(...args) {
1778 super.onInit(...args);
1779
1780 if (!this.isOptimizedAssetsLoading() || elementorFrontend.isEditMode()) {
1781 return;
1782 } // Detecting lightbox links on init will reduce the time of waiting to the lightbox to be display on slow connections.
1783
1784
1785 this.elements.$links.each((index, element) => {
1786 if (this.isLightboxLink(element)) {
1787 LightboxManager.getLightbox(); // Breaking the iteration when the library loading has already been triggered.
1788
1789 return false;
1790 }
1791 });
1792 }
1793
1794 }
1795
1796 exports["default"] = LightboxManager;
1797
1798 /***/ }),
1799
1800 /***/ "../assets/dev/js/frontend/utils/swiper.js":
1801 /*!*************************************************!*\
1802 !*** ../assets/dev/js/frontend/utils/swiper.js ***!
1803 \*************************************************/
1804 /***/ ((__unused_webpack_module, exports) => {
1805
1806
1807
1808 Object.defineProperty(exports, "__esModule", ({
1809 value: true
1810 }));
1811 exports["default"] = void 0;
1812
1813 class Swiper {
1814 constructor(container, config) {
1815 this.config = config;
1816
1817 if (this.config.breakpoints) {
1818 // The config is passed as a param to allow adjustConfig to be called outside of this wrapper
1819 this.config = this.adjustConfig(config);
1820 } // The Swiper will overlap the column width when applying custom margin values on the column.
1821
1822
1823 container.closest('.elementor-widget-wrap').addClass('e-swiper-container');
1824 return new Promise(resolve => {
1825 if (!elementorFrontend.config.experimentalFeatures.e_optimized_assets_loading) {
1826 return resolve(this.createSwiperInstance(container, this.config));
1827 }
1828
1829 elementorFrontend.utils.assetsLoader.load('script', 'swiper').then(() => resolve(this.createSwiperInstance(container, this.config)));
1830 });
1831 }
1832
1833 createSwiperInstance(container, config) {
1834 const SwiperSource = window.Swiper;
1835 SwiperSource.prototype.adjustConfig = this.adjustConfig;
1836 return new SwiperSource(container, config);
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
1839
1840
1841 adjustConfig(config) {
1842 // Only reverse the breakpoints if the handle param has been defined
1843 if (!config.handleElementorBreakpoints) {
1844 return config;
1845 }
1846
1847 const elementorBreakpoints = elementorFrontend.config.responsive.activeBreakpoints,
1848 elementorBreakpointValues = elementorFrontend.breakpoints.getBreakpointValues();
1849 Object.keys(config.breakpoints).forEach(configBPKey => {
1850 const configBPKeyInt = parseInt(configBPKey);
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
1852
1853 if (configBPKeyInt === elementorBreakpoints.mobile.value || configBPKeyInt + 1 === elementorBreakpoints.mobile.value) {
1854 // This handles the mobile breakpoint. Elementor's default sm breakpoint is never actually used,
1855 // so the mobile breakpoint (md) needs to be handled separately and set to the 0 breakpoint (xs)
1856 breakpointToUpdate = 0;
1857 } else if (elementorBreakpoints.widescreen && (configBPKeyInt === elementorBreakpoints.widescreen.value || configBPKeyInt + 1 === elementorBreakpoints.widescreen.value)) {
1858 // Widescreen is a min-width breakpoint. Since in Swiper >5.0 the breakpoint system is min-width based,
1859 // the value we pass to the Swiper instance in this case is the breakpoint from the user, unchanged.
1860 breakpointToUpdate = configBPKeyInt;
1861 } else {
1862 // Find the index of the current config breakpoint in the Elementor Breakpoints array
1863 const currentBPIndexInElementorBPs = elementorBreakpointValues.findIndex(elementorBP => {
1864 // BC Fix for Elementor Pro Carousels from 2.8.0-2.8.3 used with Elementor >= 2.9.0
1865 return configBPKeyInt === elementorBP || configBPKeyInt + 1 === elementorBP;
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
1868
1869 breakpointToUpdate = elementorBreakpointValues[currentBPIndexInElementorBPs - 1];
1870 }
1871
1872 config.breakpoints[breakpointToUpdate] = config.breakpoints[configBPKey]; // Then reset the settings in the original breakpoint key to the default values
1873
1874 config.breakpoints[configBPKey] = {
1875 slidesPerView: config.slidesPerView,
1876 slidesPerGroup: config.slidesPerGroup ? config.slidesPerGroup : 1
1877 };
1878 });
1879 return config;
1880 }
1881
1882 }
1883
1884 exports["default"] = Swiper;
1885
1886 /***/ }),
1887
1888 /***/ "../assets/dev/js/frontend/utils/url-actions.js":
1889 /*!******************************************************!*\
1890 !*** ../assets/dev/js/frontend/utils/url-actions.js ***!
1891 \******************************************************/
1892 /***/ ((__unused_webpack_module, exports) => {
1893
1894
1895
1896 Object.defineProperty(exports, "__esModule", ({
1897 value: true
1898 }));
1899 exports["default"] = void 0;
1900
1901 class _default extends elementorModules.ViewModule {
1902 getDefaultSettings() {
1903 return {
1904 selectors: {
1905 links: 'a[href^="%23elementor-action"], a[href^="#elementor-action"]'
1906 }
1907 };
1908 }
1909
1910 bindEvents() {
1911 elementorFrontend.elements.$document.on('click', this.getSettings('selectors.links'), this.runLinkAction.bind(this));
1912 }
1913
1914 initActions() {
1915 this.actions = {
1916 lightbox: async settings => {
1917 const lightbox = await elementorFrontend.utils.lightbox;
1918
1919 if (settings.id) {
1920 lightbox.openSlideshow(settings.id, settings.url);
1921 } else {
1922 if (settings.html) {
1923 delete settings.html;
1924 }
1925
1926 lightbox.showModal(settings);
1927 }
1928 }
1929 };
1930 }
1931
1932 addAction(name, callback) {
1933 this.actions[name] = callback;
1934 }
1935
1936 runAction(url, ...restArgs) {
1937 url = decodeURIComponent(url);
1938 const actionMatch = url.match(/action=(.+?)&/),
1939 settingsMatch = url.match(/settings=(.+)/);
1940
1941 if (!actionMatch) {
1942 return;
1943 }
1944
1945 const action = this.actions[actionMatch[1]];
1946
1947 if (!action) {
1948 return;
1949 }
1950
1951 let settings = {};
1952
1953 if (settingsMatch) {
1954 settings = JSON.parse(atob(settingsMatch[1]));
1955 }
1956
1957 action(settings, ...restArgs);
1958 }
1959
1960 runLinkAction(event) {
1961 event.preventDefault();
1962 this.runAction(jQuery(event.currentTarget).attr('href'), event);
1963 }
1964
1965 runHashAction() {
1966 if (location.hash) {
1967 this.runAction(location.hash);
1968 }
1969 }
1970
1971 createActionHash(action, settings) {
1972 // We need to encode the hash tag (#) here, in order to support share links for a variety of providers
1973 return encodeURIComponent(`#elementor-action:action=${action}&settings=${btoa(JSON.stringify(settings))}`);
1974 }
1975
1976 onInit() {
1977 super.onInit();
1978 this.initActions();
1979 elementorFrontend.on('components:init', this.runHashAction.bind(this));
1980 }
1981
1982 }
1983
1984 exports["default"] = _default;
1985
1986 /***/ }),
1987
1988 /***/ "../assets/dev/js/frontend/utils/utils.js":
1989 /*!************************************************!*\
1990 !*** ../assets/dev/js/frontend/utils/utils.js ***!
1991 \************************************************/
1992 /***/ ((__unused_webpack_module, exports) => {
1993
1994
1995
1996 Object.defineProperty(exports, "__esModule", ({
1997 value: true
1998 }));
1999 exports.isScrollSnapActive = exports.escapeHTML = void 0;
2000
2001 // Escape HTML special chars to prevent XSS.
2002 const escapeHTML = str => {
2003 const specialChars = {
2004 '&': '&amp;',
2005 '<': '&lt;',
2006 '>': '&gt;',
2007 "'": '&#39;',
2008 '"': '&quot;'
2009 };
2010 return str.replace(/[&<>'"]/g, tag => specialChars[tag] || tag);
2011 }; // Check if Scroll-Snap is active.
2012
2013
2014 exports.escapeHTML = escapeHTML;
2015
2016 const isScrollSnapActive = () => {
2017 var _elementor$settings$p, _elementorFrontend$co;
2018
2019 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'];
2020 return 'yes' === scrollSnapStatus ? true : false;
2021 };
2022
2023 exports.isScrollSnapActive = isScrollSnapActive;
2024
2025 /***/ }),
2026
2027 /***/ "../assets/dev/js/frontend/utils/video-api/base-loader.js":
2028 /*!****************************************************************!*\
2029 !*** ../assets/dev/js/frontend/utils/video-api/base-loader.js ***!
2030 \****************************************************************/
2031 /***/ ((__unused_webpack_module, exports) => {
2032
2033
2034
2035 Object.defineProperty(exports, "__esModule", ({
2036 value: true
2037 }));
2038 exports["default"] = void 0;
2039
2040 class BaseLoader extends elementorModules.ViewModule {
2041 getDefaultSettings() {
2042 return {
2043 isInserted: false,
2044 selectors: {
2045 firstScript: 'script:first'
2046 }
2047 };
2048 }
2049
2050 getDefaultElements() {
2051 return {
2052 $firstScript: jQuery(this.getSettings('selectors.firstScript'))
2053 };
2054 }
2055
2056 insertAPI() {
2057 this.elements.$firstScript.before(jQuery('<script>', {
2058 src: this.getApiURL()
2059 }));
2060 this.setSettings('isInserted', true);
2061 }
2062
2063 getVideoIDFromURL(url) {
2064 const videoIDParts = url.match(this.getURLRegex());
2065 return videoIDParts && videoIDParts[1];
2066 }
2067
2068 onApiReady(callback) {
2069 if (!this.getSettings('isInserted')) {
2070 this.insertAPI();
2071 }
2072
2073 if (this.isApiLoaded()) {
2074 callback(this.getApiObject());
2075 } else {
2076 // If not ready check again by timeout..
2077 setTimeout(() => {
2078 this.onApiReady(callback);
2079 }, 350);
2080 }
2081 }
2082
2083 getAutoplayURL(videoURL) {
2084 return videoURL.replace('&autoplay=0', '') + '&autoplay=1';
2085 }
2086
2087 }
2088
2089 exports["default"] = BaseLoader;
2090
2091 /***/ }),
2092
2093 /***/ "../assets/dev/js/frontend/utils/video-api/vimeo-loader.js":
2094 /*!*****************************************************************!*\
2095 !*** ../assets/dev/js/frontend/utils/video-api/vimeo-loader.js ***!
2096 \*****************************************************************/
2097 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
2098
2099
2100
2101 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
2102
2103 Object.defineProperty(exports, "__esModule", ({
2104 value: true
2105 }));
2106 exports["default"] = void 0;
2107
2108 var _baseLoader = _interopRequireDefault(__webpack_require__(/*! ./base-loader */ "../assets/dev/js/frontend/utils/video-api/base-loader.js"));
2109
2110 class VimeoLoader extends _baseLoader.default {
2111 getApiURL() {
2112 return 'https://player.vimeo.com/api/player.js';
2113 }
2114
2115 getURLRegex() {
2116 return /^(?:https?:\/\/)?(?:www|player\.)?(?:vimeo\.com\/)?(?:video\/|external\/)?(\d+)([^.?&#"'>]?)/;
2117 }
2118
2119 isApiLoaded() {
2120 return window.Vimeo;
2121 }
2122
2123 getApiObject() {
2124 return Vimeo;
2125 }
2126
2127 getAutoplayURL(videoURL) {
2128 videoURL = super.getAutoplayURL(videoURL); // Vimeo requires the '#t=' param to be last in the URL.
2129
2130 const timeMatch = videoURL.match(/#t=[^&]*/);
2131 return videoURL.replace(timeMatch[0], '') + timeMatch;
2132 }
2133
2134 }
2135
2136 exports["default"] = VimeoLoader;
2137
2138 /***/ }),
2139
2140 /***/ "../assets/dev/js/frontend/utils/video-api/youtube-loader.js":
2141 /*!*******************************************************************!*\
2142 !*** ../assets/dev/js/frontend/utils/video-api/youtube-loader.js ***!
2143 \*******************************************************************/
2144 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
2145
2146
2147
2148 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
2149
2150 Object.defineProperty(exports, "__esModule", ({
2151 value: true
2152 }));
2153 exports["default"] = void 0;
2154
2155 var _baseLoader = _interopRequireDefault(__webpack_require__(/*! ./base-loader */ "../assets/dev/js/frontend/utils/video-api/base-loader.js"));
2156
2157 class YoutubeLoader extends _baseLoader.default {
2158 getApiURL() {
2159 return 'https://www.youtube.com/iframe_api';
2160 }
2161
2162 getURLRegex() {
2163 return /^(?:https?:\/\/)?(?:www\.)?(?:m\.)?(?:youtu\.be\/|youtube\.com\/(?:(?:watch)?\?(?:.*&)?vi?=|(?:embed|v|vi|user)\/))([^?&"'>]+)/;
2164 }
2165
2166 isApiLoaded() {
2167 return window.YT && YT.loaded;
2168 }
2169
2170 getApiObject() {
2171 return YT;
2172 }
2173
2174 }
2175
2176 exports["default"] = YoutubeLoader;
2177
2178 /***/ }),
2179
2180 /***/ "../assets/dev/js/public-path.js":
2181 /*!***************************************!*\
2182 !*** ../assets/dev/js/public-path.js ***!
2183 \***************************************/
2184 /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
2185
2186
2187
2188 /* eslint-disable camelcase */
2189 __webpack_require__.p = elementorFrontendConfig.urls.assets + 'js/';
2190
2191 /***/ }),
2192
2193 /***/ "../assets/dev/js/utils/breakpoints.js":
2194 /*!*********************************************!*\
2195 !*** ../assets/dev/js/utils/breakpoints.js ***!
2196 \*********************************************/
2197 /***/ ((__unused_webpack_module, exports) => {
2198
2199
2200
2201 Object.defineProperty(exports, "__esModule", ({
2202 value: true
2203 }));
2204 exports["default"] = void 0;
2205
2206 /**
2207 * Breakpoints
2208 *
2209 * This utility class contains helper functions relating to Elementor's breakpoints system.
2210 *
2211 * @since 3.4.0
2212 */
2213 class Breakpoints extends elementorModules.Module {
2214 constructor(responsiveConfig) {
2215 super(); // The passed config is either `elementor.config.responsive` or `elementorFrontend.config.responsive`
2216
2217 this.responsiveConfig = responsiveConfig;
2218 }
2219 /**
2220 * Get Active Breakpoints List
2221 *
2222 * Returns a flat array containing the active breakpoints/devices. By default, it returns the li
2223 * the list ordered from smallest to largest breakpoint. If `true` is passed as a parameter, it reverses the order.
2224 *
2225 * @since 3.4.0
2226 *
2227 * @param {Object} args
2228 */
2229
2230
2231 getActiveBreakpointsList(args = {}) {
2232 const defaultArgs = {
2233 largeToSmall: false,
2234 withDesktop: false
2235 };
2236 args = { ...defaultArgs,
2237 ...args
2238 };
2239 const breakpointKeys = Object.keys(this.responsiveConfig.activeBreakpoints);
2240
2241 if (args.withDesktop) {
2242 // If there is an active 'widescreen' breakpoint, insert the artificial 'desktop' device below it.
2243 const widescreenIndex = breakpointKeys.indexOf('widescreen'),
2244 indexToInsertDesktopDevice = -1 === widescreenIndex ? breakpointKeys.length : breakpointKeys.length - 1;
2245 breakpointKeys.splice(indexToInsertDesktopDevice, 0, 'desktop');
2246 }
2247
2248 if (args.largeToSmall) {
2249 breakpointKeys.reverse();
2250 }
2251
2252 return breakpointKeys;
2253 }
2254 /**
2255 * Get Active Breakpoint Values
2256 *
2257 * Returns a flat array containing the list of active breakpoint values, from smallest to largest.
2258 *
2259 * @since 3.4.0
2260 */
2261
2262
2263 getBreakpointValues() {
2264 const {
2265 activeBreakpoints
2266 } = this.responsiveConfig,
2267 breakpointValues = [];
2268 Object.values(activeBreakpoints).forEach(breakpointConfig => {
2269 breakpointValues.push(breakpointConfig.value);
2270 });
2271 return breakpointValues;
2272 }
2273 /**
2274 * Get Desktop Previous Device Key
2275 *
2276 * Returns the key of the device directly under desktop (can be 'tablet', 'tablet_extra', 'laptop').
2277 *
2278 * @since 3.4.0
2279 *
2280 * @returns {string}
2281 */
2282
2283
2284 getDesktopPreviousDeviceKey() {
2285 let desktopPreviousDevice = '';
2286 const {
2287 activeBreakpoints
2288 } = this.responsiveConfig,
2289 breakpointKeys = Object.keys(activeBreakpoints),
2290 numOfDevices = breakpointKeys.length;
2291
2292 if ('min' === activeBreakpoints[breakpointKeys[numOfDevices - 1]].direction) {
2293 // If the widescreen breakpoint is active, the device that's previous to desktop is the last one before
2294 // widescreen.
2295 desktopPreviousDevice = breakpointKeys[numOfDevices - 2];
2296 } else {
2297 // If the widescreen breakpoint isn't active, we just take the last device returned by the config.
2298 desktopPreviousDevice = breakpointKeys[numOfDevices - 1];
2299 }
2300
2301 return desktopPreviousDevice;
2302 }
2303 /**
2304 * Get Device Minimum Breakpoint
2305 *
2306 * Returns the minimum point in the device's display range. For each device, the minimum point of its display range
2307 * is the max point of the device below it + 1px. For example, if the active devices are mobile, tablet,
2308 * and desktop, and the mobile breakpoint is 767px, the minimum display point for tablet devices is 768px.
2309 *
2310 * @since 3.4.0
2311 *
2312 * @returns {number|*}
2313 */
2314
2315
2316 getDesktopMinPoint() {
2317 const {
2318 activeBreakpoints
2319 } = this.responsiveConfig,
2320 desktopPreviousDevice = this.getDesktopPreviousDeviceKey();
2321 return activeBreakpoints[desktopPreviousDevice].value + 1;
2322 }
2323 /**
2324 * Get Device Minimum Breakpoint
2325 *
2326 * Returns the minimum point in the device's display range. For each device, the minimum point of its display range
2327 * is the max point of the device below it + 1px. For example, if the active devices are mobile, tablet,
2328 * and desktop, and the mobile breakpoint is 767px, the minimum display point for tablet devices is 768px.
2329 *
2330 * @since 3.4.0
2331 *
2332 * @param device
2333 * @returns {number|*}
2334 */
2335
2336
2337 getDeviceMinBreakpoint(device) {
2338 if ('desktop' === device) {
2339 return this.getDesktopMinPoint();
2340 }
2341
2342 const {
2343 activeBreakpoints
2344 } = this.responsiveConfig,
2345 breakpointNames = Object.keys(activeBreakpoints);
2346 let minBreakpoint;
2347
2348 if (breakpointNames[0] === device) {
2349 // For the lowest breakpoint, the min point is always 320.
2350 minBreakpoint = 320;
2351 } else if ('widescreen' === device) {
2352 // Widescreen only has a minimum point. In this case, the breakpoint
2353 // value in the Breakpoints config is itself the device min point.
2354 if (activeBreakpoints[device]) {
2355 minBreakpoint = activeBreakpoints[device].value;
2356 } else {
2357 // If the widescreen breakpoint does not exist in the active breakpoints config (for example, in the
2358 // case this method runs as the breakpoint is being added), get the value from the full config.
2359 minBreakpoint = this.responsiveConfig.breakpoints.widescreen;
2360 }
2361 } else {
2362 const deviceNameIndex = breakpointNames.indexOf(device),
2363 previousIndex = deviceNameIndex - 1;
2364 minBreakpoint = activeBreakpoints[breakpointNames[previousIndex]].value + 1;
2365 }
2366
2367 return minBreakpoint;
2368 }
2369 /**
2370 * Get Active Match Regex
2371 *
2372 * Returns a regular expression containing all active breakpoints prefixed with an underscore.
2373 *
2374 * @returns {RegExp}
2375 */
2376
2377
2378 getActiveMatchRegex() {
2379 return new RegExp(this.getActiveBreakpointsList().map(device => '_' + device).join('|') + '$');
2380 }
2381
2382 }
2383
2384 exports["default"] = Breakpoints;
2385
2386 /***/ }),
2387
2388 /***/ "../assets/dev/js/utils/events.js":
2389 /*!****************************************!*\
2390 !*** ../assets/dev/js/utils/events.js ***!
2391 \****************************************/
2392 /***/ ((__unused_webpack_module, exports) => {
2393
2394
2395
2396 Object.defineProperty(exports, "__esModule", ({
2397 value: true
2398 }));
2399 exports["default"] = exports.Events = void 0;
2400
2401 class Events {
2402 /**
2403 * Dispatch an Elementor event.
2404 *
2405 * Will dispatch both native event & jQuery event (as BC).
2406 * By default, `bcEvent` is `null`.
2407 *
2408 * @param {Object} context - The context that will dispatch the event.
2409 * @param {string} event - Event to dispatch.
2410 * @param {*} data - Data to pass to the event, default to `null`.
2411 * @param {string|null} bcEvent - BC event to dispatch, default to `null`.
2412 *
2413 * @return {void}
2414 */
2415 static dispatch(context, event, data = null, bcEvent = null) {
2416 // Make sure to use the native context if it's a jQuery instance.
2417 context = context instanceof jQuery ? context[0] : context; // Dispatch the BC event only if exists.
2418
2419 if (bcEvent) {
2420 context.dispatchEvent(new CustomEvent(bcEvent, {
2421 detail: data
2422 }));
2423 } // jQuery's `.on()` listens also to native custom events, so there is no need
2424 // to dispatch also a jQuery event.
2425
2426
2427 context.dispatchEvent(new CustomEvent(event, {
2428 detail: data
2429 }));
2430 }
2431
2432 }
2433
2434 exports.Events = Events;
2435 var _default = Events;
2436 exports["default"] = _default;
2437
2438 /***/ }),
2439
2440 /***/ "../assets/dev/js/utils/hooks.js":
2441 /*!***************************************!*\
2442 !*** ../assets/dev/js/utils/hooks.js ***!
2443 \***************************************/
2444 /***/ ((module) => {
2445
2446
2447 /**
2448 * Handles managing all events for whatever you plug it into. Priorities for hooks are based on lowest to highest in
2449 * that, lowest priority hooks are fired first.
2450 */
2451
2452 var EventManager = function () {
2453 var slice = Array.prototype.slice,
2454 MethodsAvailable;
2455 /**
2456 * Contains the hooks that get registered with this EventManager. The array for storage utilizes a "flat"
2457 * object literal such that looking up the hook utilizes the native object literal hash.
2458 */
2459
2460 var STORAGE = {
2461 actions: {},
2462 filters: {}
2463 };
2464 /**
2465 * Removes the specified hook by resetting the value of it.
2466 *
2467 * @param type Type of hook, either 'actions' or 'filters'
2468 * @param hook The hook (namespace.identifier) to remove
2469 *
2470 * @private
2471 */
2472
2473 function _removeHook(type, hook, callback, context) {
2474 var handlers, handler, i;
2475
2476 if (!STORAGE[type][hook]) {
2477 return;
2478 }
2479
2480 if (!callback) {
2481 STORAGE[type][hook] = [];
2482 } else {
2483 handlers = STORAGE[type][hook];
2484
2485 if (!context) {
2486 for (i = handlers.length; i--;) {
2487 if (handlers[i].callback === callback) {
2488 handlers.splice(i, 1);
2489 }
2490 }
2491 } else {
2492 for (i = handlers.length; i--;) {
2493 handler = handlers[i];
2494
2495 if (handler.callback === callback && handler.context === context) {
2496 handlers.splice(i, 1);
2497 }
2498 }
2499 }
2500 }
2501 }
2502 /**
2503 * Use an insert sort for keeping our hooks organized based on priority. This function is ridiculously faster
2504 * than bubble sort, etc: http://jsperf.com/javascript-sort
2505 *
2506 * @param hooks The custom array containing all of the appropriate hooks to perform an insert sort on.
2507 * @private
2508 */
2509
2510
2511 function _hookInsertSort(hooks) {
2512 var tmpHook, j, prevHook;
2513
2514 for (var i = 1, len = hooks.length; i < len; i++) {
2515 tmpHook = hooks[i];
2516 j = i;
2517
2518 while ((prevHook = hooks[j - 1]) && prevHook.priority > tmpHook.priority) {
2519 hooks[j] = hooks[j - 1];
2520 --j;
2521 }
2522
2523 hooks[j] = tmpHook;
2524 }
2525
2526 return hooks;
2527 }
2528 /**
2529 * Adds the hook to the appropriate storage container
2530 *
2531 * @param type 'actions' or 'filters'
2532 * @param hook The hook (namespace.identifier) to add to our event manager
2533 * @param callback The function that will be called when the hook is executed.
2534 * @param priority The priority of this hook. Must be an integer.
2535 * @param [context] A value to be used for this
2536 * @private
2537 */
2538
2539
2540 function _addHook(type, hook, callback, priority, context) {
2541 var hookObject = {
2542 callback: callback,
2543 priority: priority,
2544 context: context
2545 }; // Utilize 'prop itself' : http://jsperf.com/hasownproperty-vs-in-vs-undefined/19
2546
2547 var hooks = STORAGE[type][hook];
2548
2549 if (hooks) {
2550 // TEMP FIX BUG
2551 var hasSameCallback = false;
2552 jQuery.each(hooks, function () {
2553 if (this.callback === callback) {
2554 hasSameCallback = true;
2555 return false;
2556 }
2557 });
2558
2559 if (hasSameCallback) {
2560 return;
2561 } // END TEMP FIX BUG
2562
2563
2564 hooks.push(hookObject);
2565 hooks = _hookInsertSort(hooks);
2566 } else {
2567 hooks = [hookObject];
2568 }
2569
2570 STORAGE[type][hook] = hooks;
2571 }
2572 /**
2573 * Runs the specified hook. If it is an action, the value is not modified but if it is a filter, it is.
2574 *
2575 * @param type 'actions' or 'filters'
2576 * @param hook The hook ( namespace.identifier ) to be ran.
2577 * @param args Arguments to pass to the action/filter. If it's a filter, args is actually a single parameter.
2578 * @private
2579 */
2580
2581
2582 function _runHook(type, hook, args) {
2583 var handlers = STORAGE[type][hook],
2584 i,
2585 len;
2586
2587 if (!handlers) {
2588 return 'filters' === type ? args[0] : false;
2589 }
2590
2591 len = handlers.length;
2592
2593 if ('filters' === type) {
2594 for (i = 0; i < len; i++) {
2595 args[0] = handlers[i].callback.apply(handlers[i].context, args);
2596 }
2597 } else {
2598 for (i = 0; i < len; i++) {
2599 handlers[i].callback.apply(handlers[i].context, args);
2600 }
2601 }
2602
2603 return 'filters' === type ? args[0] : true;
2604 }
2605 /**
2606 * Adds an action to the event manager.
2607 *
2608 * @param action Must contain namespace.identifier
2609 * @param callback Must be a valid callback function before this action is added
2610 * @param [priority=10] Used to control when the function is executed in relation to other callbacks bound to the same hook
2611 * @param [context] Supply a value to be used for this
2612 */
2613
2614
2615 function addAction(action, callback, priority, context) {
2616 if ('string' === typeof action && 'function' === typeof callback) {
2617 priority = parseInt(priority || 10, 10);
2618
2619 _addHook('actions', action, callback, priority, context);
2620 }
2621
2622 return MethodsAvailable;
2623 }
2624 /**
2625 * Performs an action if it exists. You can pass as many arguments as you want to this function; the only rule is
2626 * that the first argument must always be the action.
2627 */
2628
2629
2630 function doAction() {
2631 var args = slice.call(arguments);
2632 var action = args.shift();
2633
2634 if ('string' === typeof action) {
2635 _runHook('actions', action, args);
2636 }
2637
2638 return MethodsAvailable;
2639 }
2640 /**
2641 * Removes the specified action if it contains a namespace.identifier & exists.
2642 *
2643 * @param action The action to remove
2644 * @param [callback] Callback function to remove
2645 */
2646
2647
2648 function removeAction(action, callback) {
2649 if ('string' === typeof action) {
2650 _removeHook('actions', action, callback);
2651 }
2652
2653 return MethodsAvailable;
2654 }
2655 /**
2656 * Adds a filter to the event manager.
2657 *
2658 * @param filter Must contain namespace.identifier
2659 * @param callback Must be a valid callback function before this action is added
2660 * @param [priority=10] Used to control when the function is executed in relation to other callbacks bound to the same hook
2661 * @param [context] Supply a value to be used for this
2662 */
2663
2664
2665 function addFilter(filter, callback, priority, context) {
2666 if ('string' === typeof filter && 'function' === typeof callback) {
2667 priority = parseInt(priority || 10, 10);
2668
2669 _addHook('filters', filter, callback, priority, context);
2670 }
2671
2672 return MethodsAvailable;
2673 }
2674 /**
2675 * Performs a filter if it exists. You should only ever pass 1 argument to be filtered. The only rule is that
2676 * the first argument must always be the filter.
2677 */
2678
2679
2680 function applyFilters() {
2681 var args = slice.call(arguments);
2682 var filter = args.shift();
2683
2684 if ('string' === typeof filter) {
2685 return _runHook('filters', filter, args);
2686 }
2687
2688 return MethodsAvailable;
2689 }
2690 /**
2691 * Removes the specified filter if it contains a namespace.identifier & exists.
2692 *
2693 * @param filter The action to remove
2694 * @param [callback] Callback function to remove
2695 */
2696
2697
2698 function removeFilter(filter, callback) {
2699 if ('string' === typeof filter) {
2700 _removeHook('filters', filter, callback);
2701 }
2702
2703 return MethodsAvailable;
2704 }
2705 /**
2706 * Maintain a reference to the object scope so our public methods never get confusing.
2707 */
2708
2709
2710 MethodsAvailable = {
2711 removeFilter: removeFilter,
2712 applyFilters: applyFilters,
2713 addFilter: addFilter,
2714 removeAction: removeAction,
2715 doAction: doAction,
2716 addAction: addAction
2717 }; // return all of the publicly available methods
2718
2719 return MethodsAvailable;
2720 };
2721
2722 module.exports = EventManager;
2723
2724 /***/ }),
2725
2726 /***/ "../core/common/assets/js/utils/environment.js":
2727 /*!*****************************************************!*\
2728 !*** ../core/common/assets/js/utils/environment.js ***!
2729 \*****************************************************/
2730 /***/ ((__unused_webpack_module, exports) => {
2731
2732
2733
2734 Object.defineProperty(exports, "__esModule", ({
2735 value: true
2736 }));
2737 exports["default"] = void 0;
2738
2739 const matchUserAgent = UserAgentStr => {
2740 return userAgent.indexOf(UserAgentStr) >= 0;
2741 },
2742 userAgent = navigator.userAgent,
2743 // Solution influenced by https://stackoverflow.com/questions/9847580/how-to-detect-safari-chrome-ie-firefox-and-opera-browser
2744 // Opera 8.0+
2745 isOpera = !!window.opr && !!opr.addons || !!window.opera || matchUserAgent(' OPR/'),
2746 // Firefox 1.0+
2747 isFirefox = matchUserAgent('Firefox'),
2748 // Safari 3.0+ "[object HTMLElementConstructor]"
2749 isSafari = /^((?!chrome|android).)*safari/i.test(userAgent) || /constructor/i.test(window.HTMLElement) || (p => {
2750 return '[object SafariRemoteNotification]' === p.toString();
2751 })(!window.safari || typeof safari !== 'undefined' && safari.pushNotification),
2752 // Internet Explorer 6-11
2753 isIE = /Trident|MSIE/.test(userAgent) && (
2754 /*@cc_on!@*/
2755 false || !!document.documentMode),
2756 // Edge 20+
2757 isEdge = !isIE && !!window.StyleMedia || matchUserAgent('Edg'),
2758 // Google Chrome (Not accurate)
2759 isChrome = !!window.chrome && matchUserAgent('Chrome') && !(isEdge || isOpera),
2760 // Blink engine
2761 isBlink = matchUserAgent('Chrome') && !!window.CSS,
2762 // Apple Webkit engine
2763 isAppleWebkit = matchUserAgent('AppleWebKit') && !isBlink,
2764 environment = {
2765 appleWebkit: isAppleWebkit,
2766 blink: isBlink,
2767 chrome: isChrome,
2768 edge: isEdge,
2769 firefox: isFirefox,
2770 ie: isIE,
2771 mac: matchUserAgent('Macintosh'),
2772 opera: isOpera,
2773 safari: isSafari,
2774 webkit: matchUserAgent('AppleWebKit')
2775 };
2776
2777 var _default = environment;
2778 exports["default"] = _default;
2779
2780 /***/ }),
2781
2782 /***/ "../core/common/assets/js/utils/storage.js":
2783 /*!*************************************************!*\
2784 !*** ../core/common/assets/js/utils/storage.js ***!
2785 \*************************************************/
2786 /***/ ((__unused_webpack_module, exports) => {
2787
2788
2789
2790 Object.defineProperty(exports, "__esModule", ({
2791 value: true
2792 }));
2793 exports["default"] = void 0;
2794
2795 class _default extends elementorModules.Module {
2796 get(key, options) {
2797 options = options || {};
2798 let storage;
2799
2800 try {
2801 storage = options.session ? sessionStorage : localStorage;
2802 } catch (e) {
2803 return key ? undefined : {};
2804 }
2805
2806 let elementorStorage = storage.getItem('elementor');
2807
2808 if (elementorStorage) {
2809 elementorStorage = JSON.parse(elementorStorage);
2810 } else {
2811 elementorStorage = {};
2812 }
2813
2814 if (!elementorStorage.__expiration) {
2815 elementorStorage.__expiration = {};
2816 }
2817
2818 const expiration = elementorStorage.__expiration;
2819 let expirationToCheck = [];
2820
2821 if (key) {
2822 if (expiration[key]) {
2823 expirationToCheck = [key];
2824 }
2825 } else {
2826 expirationToCheck = Object.keys(expiration);
2827 }
2828
2829 let entryExpired = false;
2830 expirationToCheck.forEach(expirationKey => {
2831 if (new Date(expiration[expirationKey]) < new Date()) {
2832 delete elementorStorage[expirationKey];
2833 delete expiration[expirationKey];
2834 entryExpired = true;
2835 }
2836 });
2837
2838 if (entryExpired) {
2839 this.save(elementorStorage, options.session);
2840 }
2841
2842 if (key) {
2843 return elementorStorage[key];
2844 }
2845
2846 return elementorStorage;
2847 }
2848
2849 set(key, value, options) {
2850 options = options || {};
2851 const elementorStorage = this.get(null, options);
2852 elementorStorage[key] = value;
2853
2854 if (options.lifetimeInSeconds) {
2855 const date = new Date();
2856 date.setTime(date.getTime() + options.lifetimeInSeconds * 1000);
2857 elementorStorage.__expiration[key] = date.getTime();
2858 }
2859
2860 this.save(elementorStorage, options.session);
2861 }
2862
2863 save(object, session) {
2864 let storage;
2865
2866 try {
2867 storage = session ? sessionStorage : localStorage;
2868 } catch (e) {
2869 return;
2870 }
2871
2872 storage.setItem('elementor', JSON.stringify(object));
2873 }
2874
2875 }
2876
2877 exports["default"] = _default;
2878
2879 /***/ }),
2880
2881 /***/ "../modules/shapes/assets/js/frontend/frontend.js":
2882 /*!********************************************************!*\
2883 !*** ../modules/shapes/assets/js/frontend/frontend.js ***!
2884 \********************************************************/
2885 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
2886
2887
2888
2889 Object.defineProperty(exports, "__esModule", ({
2890 value: true
2891 }));
2892 exports["default"] = void 0;
2893
2894 class _default extends elementorModules.Module {
2895 constructor() {
2896 super();
2897 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")));
2898 }
2899
2900 }
2901
2902 exports["default"] = _default;
2903
2904 /***/ })
2905
2906 },
2907 /******/ __webpack_require__ => { // webpackRuntimeModules
2908 /******/ var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
2909 /******/ __webpack_require__.O(0, ["frontend-modules"], () => (__webpack_exec__("../assets/dev/js/frontend/frontend.js")));
2910 /******/ var __webpack_exports__ = __webpack_require__.O();
2911 /******/ }
2912 ]);
2913 //# sourceMappingURL=frontend.js.map