PluginProbe
Elementor Website Builder – more than just a page builder / 3.5.6
Elementor Website Builder – more than just a page builder v3.5.6
4.3.0-beta3 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 All 452 releases
elementor / assets / js / frontend.js

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

2,922 lines 87.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /*! elementor - v3.5.6 - 28-02-2022 */
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 jQuery(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.slideshow) {
1920 // Handle slideshow display
1921 lightbox.openSlideshow(settings.slideshow, settings.url);
1922 } else {
1923 // If the settings has an ID - the lightbox target content is an image - the ID is an attachment ID.
1924 if (settings.id) {
1925 settings.type = 'image';
1926 }
1927
1928 lightbox.showModal(settings);
1929 }
1930 }
1931 };
1932 }
1933
1934 addAction(name, callback) {
1935 this.actions[name] = callback;
1936 }
1937
1938 runAction(url, ...restArgs) {
1939 url = decodeURIComponent(url);
1940 const actionMatch = url.match(/action=(.+?)&/),
1941 settingsMatch = url.match(/settings=(.+)/);
1942
1943 if (!actionMatch) {
1944 return;
1945 }
1946
1947 const action = this.actions[actionMatch[1]];
1948
1949 if (!action) {
1950 return;
1951 }
1952
1953 let settings = {};
1954
1955 if (settingsMatch) {
1956 settings = JSON.parse(atob(settingsMatch[1]));
1957 }
1958
1959 action(settings, ...restArgs);
1960 }
1961
1962 runLinkAction(event) {
1963 event.preventDefault();
1964 this.runAction(jQuery(event.currentTarget).attr('href'), event);
1965 }
1966
1967 runHashAction() {
1968 if (!location.hash) {
1969 return;
1970 } // Only if an element with this action hash exists on the page do we allow running the action.
1971
1972
1973 const elementWithHash = document.querySelector(`[e-action-hash="${location.hash}"], a[href*="${location.hash}"]`);
1974
1975 if (elementWithHash) {
1976 this.runAction(elementWithHash.getAttribute('e-action-hash'));
1977 }
1978 }
1979
1980 createActionHash(action, settings) {
1981 // We need to encode the hash tag (#) here, in order to support share links for a variety of providers
1982 return encodeURIComponent(`#elementor-action:action=${action}&settings=${btoa(JSON.stringify(settings))}`);
1983 }
1984
1985 onInit() {
1986 super.onInit();
1987 this.initActions();
1988 elementorFrontend.on('components:init', this.runHashAction.bind(this));
1989 }
1990
1991 }
1992
1993 exports["default"] = _default;
1994
1995 /***/ }),
1996
1997 /***/ "../assets/dev/js/frontend/utils/utils.js":
1998 /*!************************************************!*\
1999 !*** ../assets/dev/js/frontend/utils/utils.js ***!
2000 \************************************************/
2001 /***/ ((__unused_webpack_module, exports) => {
2002
2003
2004
2005 Object.defineProperty(exports, "__esModule", ({
2006 value: true
2007 }));
2008 exports.isScrollSnapActive = exports.escapeHTML = void 0;
2009
2010 // Escape HTML special chars to prevent XSS.
2011 const escapeHTML = str => {
2012 const specialChars = {
2013 '&': '&amp;',
2014 '<': '&lt;',
2015 '>': '&gt;',
2016 "'": '&#39;',
2017 '"': '&quot;'
2018 };
2019 return str.replace(/[&<>'"]/g, tag => specialChars[tag] || tag);
2020 }; // Check if Scroll-Snap is active.
2021
2022
2023 exports.escapeHTML = escapeHTML;
2024
2025 const isScrollSnapActive = () => {
2026 var _elementor$settings$p, _elementorFrontend$co;
2027
2028 const scrollSnapStatus = elementorFrontend.isEditMode() ? (_elementor$settings$p = elementor.settings.page.model.attributes) === null || _elementor$settings$p === void 0 ? void 0 : _elementor$settings$p['scroll_snap'] : (_elementorFrontend$co = elementorFrontend.config.settings.page) === null || _elementorFrontend$co === void 0 ? void 0 : _elementorFrontend$co['scroll_snap'];
2029 return 'yes' === scrollSnapStatus ? true : false;
2030 };
2031
2032 exports.isScrollSnapActive = isScrollSnapActive;
2033
2034 /***/ }),
2035
2036 /***/ "../assets/dev/js/frontend/utils/video-api/base-loader.js":
2037 /*!****************************************************************!*\
2038 !*** ../assets/dev/js/frontend/utils/video-api/base-loader.js ***!
2039 \****************************************************************/
2040 /***/ ((__unused_webpack_module, exports) => {
2041
2042
2043
2044 Object.defineProperty(exports, "__esModule", ({
2045 value: true
2046 }));
2047 exports["default"] = void 0;
2048
2049 class BaseLoader extends elementorModules.ViewModule {
2050 getDefaultSettings() {
2051 return {
2052 isInserted: false,
2053 selectors: {
2054 firstScript: 'script:first'
2055 }
2056 };
2057 }
2058
2059 getDefaultElements() {
2060 return {
2061 $firstScript: jQuery(this.getSettings('selectors.firstScript'))
2062 };
2063 }
2064
2065 insertAPI() {
2066 this.elements.$firstScript.before(jQuery('<script>', {
2067 src: this.getApiURL()
2068 }));
2069 this.setSettings('isInserted', true);
2070 }
2071
2072 getVideoIDFromURL(url) {
2073 const videoIDParts = url.match(this.getURLRegex());
2074 return videoIDParts && videoIDParts[1];
2075 }
2076
2077 onApiReady(callback) {
2078 if (!this.getSettings('isInserted')) {
2079 this.insertAPI();
2080 }
2081
2082 if (this.isApiLoaded()) {
2083 callback(this.getApiObject());
2084 } else {
2085 // If not ready check again by timeout..
2086 setTimeout(() => {
2087 this.onApiReady(callback);
2088 }, 350);
2089 }
2090 }
2091
2092 getAutoplayURL(videoURL) {
2093 return videoURL.replace('&autoplay=0', '') + '&autoplay=1';
2094 }
2095
2096 }
2097
2098 exports["default"] = BaseLoader;
2099
2100 /***/ }),
2101
2102 /***/ "../assets/dev/js/frontend/utils/video-api/vimeo-loader.js":
2103 /*!*****************************************************************!*\
2104 !*** ../assets/dev/js/frontend/utils/video-api/vimeo-loader.js ***!
2105 \*****************************************************************/
2106 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
2107
2108
2109
2110 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
2111
2112 Object.defineProperty(exports, "__esModule", ({
2113 value: true
2114 }));
2115 exports["default"] = void 0;
2116
2117 var _baseLoader = _interopRequireDefault(__webpack_require__(/*! ./base-loader */ "../assets/dev/js/frontend/utils/video-api/base-loader.js"));
2118
2119 class VimeoLoader extends _baseLoader.default {
2120 getApiURL() {
2121 return 'https://player.vimeo.com/api/player.js';
2122 }
2123
2124 getURLRegex() {
2125 return /^(?:https?:\/\/)?(?:www|player\.)?(?:vimeo\.com\/)?(?:video\/|external\/)?(\d+)([^.?&#"'>]?)/;
2126 }
2127
2128 isApiLoaded() {
2129 return window.Vimeo;
2130 }
2131
2132 getApiObject() {
2133 return Vimeo;
2134 }
2135
2136 getAutoplayURL(videoURL) {
2137 videoURL = super.getAutoplayURL(videoURL); // Vimeo requires the '#t=' param to be last in the URL.
2138
2139 const timeMatch = videoURL.match(/#t=[^&]*/);
2140 return videoURL.replace(timeMatch[0], '') + timeMatch;
2141 }
2142
2143 }
2144
2145 exports["default"] = VimeoLoader;
2146
2147 /***/ }),
2148
2149 /***/ "../assets/dev/js/frontend/utils/video-api/youtube-loader.js":
2150 /*!*******************************************************************!*\
2151 !*** ../assets/dev/js/frontend/utils/video-api/youtube-loader.js ***!
2152 \*******************************************************************/
2153 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
2154
2155
2156
2157 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
2158
2159 Object.defineProperty(exports, "__esModule", ({
2160 value: true
2161 }));
2162 exports["default"] = void 0;
2163
2164 var _baseLoader = _interopRequireDefault(__webpack_require__(/*! ./base-loader */ "../assets/dev/js/frontend/utils/video-api/base-loader.js"));
2165
2166 class YoutubeLoader extends _baseLoader.default {
2167 getApiURL() {
2168 return 'https://www.youtube.com/iframe_api';
2169 }
2170
2171 getURLRegex() {
2172 return /^(?:https?:\/\/)?(?:www\.)?(?:m\.)?(?:youtu\.be\/|youtube\.com\/(?:(?:watch)?\?(?:.*&)?vi?=|(?:embed|v|vi|user)\/))([^?&"'>]+)/;
2173 }
2174
2175 isApiLoaded() {
2176 return window.YT && YT.loaded;
2177 }
2178
2179 getApiObject() {
2180 return YT;
2181 }
2182
2183 }
2184
2185 exports["default"] = YoutubeLoader;
2186
2187 /***/ }),
2188
2189 /***/ "../assets/dev/js/public-path.js":
2190 /*!***************************************!*\
2191 !*** ../assets/dev/js/public-path.js ***!
2192 \***************************************/
2193 /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
2194
2195
2196
2197 /* eslint-disable camelcase */
2198 __webpack_require__.p = elementorFrontendConfig.urls.assets + 'js/';
2199
2200 /***/ }),
2201
2202 /***/ "../assets/dev/js/utils/breakpoints.js":
2203 /*!*********************************************!*\
2204 !*** ../assets/dev/js/utils/breakpoints.js ***!
2205 \*********************************************/
2206 /***/ ((__unused_webpack_module, exports) => {
2207
2208
2209
2210 Object.defineProperty(exports, "__esModule", ({
2211 value: true
2212 }));
2213 exports["default"] = void 0;
2214
2215 /**
2216 * Breakpoints
2217 *
2218 * This utility class contains helper functions relating to Elementor's breakpoints system.
2219 *
2220 * @since 3.4.0
2221 */
2222 class Breakpoints extends elementorModules.Module {
2223 constructor(responsiveConfig) {
2224 super(); // The passed config is either `elementor.config.responsive` or `elementorFrontend.config.responsive`
2225
2226 this.responsiveConfig = responsiveConfig;
2227 }
2228 /**
2229 * Get Active Breakpoints List
2230 *
2231 * Returns a flat array containing the active breakpoints/devices. By default, it returns the li
2232 * the list ordered from smallest to largest breakpoint. If `true` is passed as a parameter, it reverses the order.
2233 *
2234 * @since 3.4.0
2235 *
2236 * @param {Object} args
2237 */
2238
2239
2240 getActiveBreakpointsList(args = {}) {
2241 const defaultArgs = {
2242 largeToSmall: false,
2243 withDesktop: false
2244 };
2245 args = { ...defaultArgs,
2246 ...args
2247 };
2248 const breakpointKeys = Object.keys(this.responsiveConfig.activeBreakpoints);
2249
2250 if (args.withDesktop) {
2251 // If there is an active 'widescreen' breakpoint, insert the artificial 'desktop' device below it.
2252 const widescreenIndex = breakpointKeys.indexOf('widescreen'),
2253 indexToInsertDesktopDevice = -1 === widescreenIndex ? breakpointKeys.length : breakpointKeys.length - 1;
2254 breakpointKeys.splice(indexToInsertDesktopDevice, 0, 'desktop');
2255 }
2256
2257 if (args.largeToSmall) {
2258 breakpointKeys.reverse();
2259 }
2260
2261 return breakpointKeys;
2262 }
2263 /**
2264 * Get Active Breakpoint Values
2265 *
2266 * Returns a flat array containing the list of active breakpoint values, from smallest to largest.
2267 *
2268 * @since 3.4.0
2269 */
2270
2271
2272 getBreakpointValues() {
2273 const {
2274 activeBreakpoints
2275 } = this.responsiveConfig,
2276 breakpointValues = [];
2277 Object.values(activeBreakpoints).forEach(breakpointConfig => {
2278 breakpointValues.push(breakpointConfig.value);
2279 });
2280 return breakpointValues;
2281 }
2282 /**
2283 * Get Desktop Previous Device Key
2284 *
2285 * Returns the key of the device directly under desktop (can be 'tablet', 'tablet_extra', 'laptop').
2286 *
2287 * @since 3.4.0
2288 *
2289 * @returns {string}
2290 */
2291
2292
2293 getDesktopPreviousDeviceKey() {
2294 let desktopPreviousDevice = '';
2295 const {
2296 activeBreakpoints
2297 } = this.responsiveConfig,
2298 breakpointKeys = Object.keys(activeBreakpoints),
2299 numOfDevices = breakpointKeys.length;
2300
2301 if ('min' === activeBreakpoints[breakpointKeys[numOfDevices - 1]].direction) {
2302 // If the widescreen breakpoint is active, the device that's previous to desktop is the last one before
2303 // widescreen.
2304 desktopPreviousDevice = breakpointKeys[numOfDevices - 2];
2305 } else {
2306 // If the widescreen breakpoint isn't active, we just take the last device returned by the config.
2307 desktopPreviousDevice = breakpointKeys[numOfDevices - 1];
2308 }
2309
2310 return desktopPreviousDevice;
2311 }
2312 /**
2313 * Get Device Minimum Breakpoint
2314 *
2315 * Returns the minimum point in the device's display range. For each device, the minimum point of its display range
2316 * is the max point of the device below it + 1px. For example, if the active devices are mobile, tablet,
2317 * and desktop, and the mobile breakpoint is 767px, the minimum display point for tablet devices is 768px.
2318 *
2319 * @since 3.4.0
2320 *
2321 * @returns {number|*}
2322 */
2323
2324
2325 getDesktopMinPoint() {
2326 const {
2327 activeBreakpoints
2328 } = this.responsiveConfig,
2329 desktopPreviousDevice = this.getDesktopPreviousDeviceKey();
2330 return activeBreakpoints[desktopPreviousDevice].value + 1;
2331 }
2332 /**
2333 * Get Device Minimum Breakpoint
2334 *
2335 * Returns the minimum point in the device's display range. For each device, the minimum point of its display range
2336 * is the max point of the device below it + 1px. For example, if the active devices are mobile, tablet,
2337 * and desktop, and the mobile breakpoint is 767px, the minimum display point for tablet devices is 768px.
2338 *
2339 * @since 3.4.0
2340 *
2341 * @param device
2342 * @returns {number|*}
2343 */
2344
2345
2346 getDeviceMinBreakpoint(device) {
2347 if ('desktop' === device) {
2348 return this.getDesktopMinPoint();
2349 }
2350
2351 const {
2352 activeBreakpoints
2353 } = this.responsiveConfig,
2354 breakpointNames = Object.keys(activeBreakpoints);
2355 let minBreakpoint;
2356
2357 if (breakpointNames[0] === device) {
2358 // For the lowest breakpoint, the min point is always 320.
2359 minBreakpoint = 320;
2360 } else if ('widescreen' === device) {
2361 // Widescreen only has a minimum point. In this case, the breakpoint
2362 // value in the Breakpoints config is itself the device min point.
2363 if (activeBreakpoints[device]) {
2364 minBreakpoint = activeBreakpoints[device].value;
2365 } else {
2366 // If the widescreen breakpoint does not exist in the active breakpoints config (for example, in the
2367 // case this method runs as the breakpoint is being added), get the value from the full config.
2368 minBreakpoint = this.responsiveConfig.breakpoints.widescreen;
2369 }
2370 } else {
2371 const deviceNameIndex = breakpointNames.indexOf(device),
2372 previousIndex = deviceNameIndex - 1;
2373 minBreakpoint = activeBreakpoints[breakpointNames[previousIndex]].value + 1;
2374 }
2375
2376 return minBreakpoint;
2377 }
2378 /**
2379 * Get Active Match Regex
2380 *
2381 * Returns a regular expression containing all active breakpoints prefixed with an underscore.
2382 *
2383 * @returns {RegExp}
2384 */
2385
2386
2387 getActiveMatchRegex() {
2388 return new RegExp(this.getActiveBreakpointsList().map(device => '_' + device).join('|') + '$');
2389 }
2390
2391 }
2392
2393 exports["default"] = Breakpoints;
2394
2395 /***/ }),
2396
2397 /***/ "../assets/dev/js/utils/events.js":
2398 /*!****************************************!*\
2399 !*** ../assets/dev/js/utils/events.js ***!
2400 \****************************************/
2401 /***/ ((__unused_webpack_module, exports) => {
2402
2403
2404
2405 Object.defineProperty(exports, "__esModule", ({
2406 value: true
2407 }));
2408 exports["default"] = exports.Events = void 0;
2409
2410 class Events {
2411 /**
2412 * Dispatch an Elementor event.
2413 *
2414 * Will dispatch both native event & jQuery event (as BC).
2415 * By default, `bcEvent` is `null`.
2416 *
2417 * @param {Object} context - The context that will dispatch the event.
2418 * @param {string} event - Event to dispatch.
2419 * @param {*} data - Data to pass to the event, default to `null`.
2420 * @param {string|null} bcEvent - BC event to dispatch, default to `null`.
2421 *
2422 * @return {void}
2423 */
2424 static dispatch(context, event, data = null, bcEvent = null) {
2425 // Make sure to use the native context if it's a jQuery instance.
2426 context = context instanceof jQuery ? context[0] : context; // Dispatch the BC event only if exists.
2427
2428 if (bcEvent) {
2429 context.dispatchEvent(new CustomEvent(bcEvent, {
2430 detail: data
2431 }));
2432 } // jQuery's `.on()` listens also to native custom events, so there is no need
2433 // to dispatch also a jQuery event.
2434
2435
2436 context.dispatchEvent(new CustomEvent(event, {
2437 detail: data
2438 }));
2439 }
2440
2441 }
2442
2443 exports.Events = Events;
2444 var _default = Events;
2445 exports["default"] = _default;
2446
2447 /***/ }),
2448
2449 /***/ "../assets/dev/js/utils/hooks.js":
2450 /*!***************************************!*\
2451 !*** ../assets/dev/js/utils/hooks.js ***!
2452 \***************************************/
2453 /***/ ((module) => {
2454
2455
2456 /**
2457 * Handles managing all events for whatever you plug it into. Priorities for hooks are based on lowest to highest in
2458 * that, lowest priority hooks are fired first.
2459 */
2460
2461 var EventManager = function () {
2462 var slice = Array.prototype.slice,
2463 MethodsAvailable;
2464 /**
2465 * Contains the hooks that get registered with this EventManager. The array for storage utilizes a "flat"
2466 * object literal such that looking up the hook utilizes the native object literal hash.
2467 */
2468
2469 var STORAGE = {
2470 actions: {},
2471 filters: {}
2472 };
2473 /**
2474 * Removes the specified hook by resetting the value of it.
2475 *
2476 * @param type Type of hook, either 'actions' or 'filters'
2477 * @param hook The hook (namespace.identifier) to remove
2478 *
2479 * @private
2480 */
2481
2482 function _removeHook(type, hook, callback, context) {
2483 var handlers, handler, i;
2484
2485 if (!STORAGE[type][hook]) {
2486 return;
2487 }
2488
2489 if (!callback) {
2490 STORAGE[type][hook] = [];
2491 } else {
2492 handlers = STORAGE[type][hook];
2493
2494 if (!context) {
2495 for (i = handlers.length; i--;) {
2496 if (handlers[i].callback === callback) {
2497 handlers.splice(i, 1);
2498 }
2499 }
2500 } else {
2501 for (i = handlers.length; i--;) {
2502 handler = handlers[i];
2503
2504 if (handler.callback === callback && handler.context === context) {
2505 handlers.splice(i, 1);
2506 }
2507 }
2508 }
2509 }
2510 }
2511 /**
2512 * Use an insert sort for keeping our hooks organized based on priority. This function is ridiculously faster
2513 * than bubble sort, etc: http://jsperf.com/javascript-sort
2514 *
2515 * @param hooks The custom array containing all of the appropriate hooks to perform an insert sort on.
2516 * @private
2517 */
2518
2519
2520 function _hookInsertSort(hooks) {
2521 var tmpHook, j, prevHook;
2522
2523 for (var i = 1, len = hooks.length; i < len; i++) {
2524 tmpHook = hooks[i];
2525 j = i;
2526
2527 while ((prevHook = hooks[j - 1]) && prevHook.priority > tmpHook.priority) {
2528 hooks[j] = hooks[j - 1];
2529 --j;
2530 }
2531
2532 hooks[j] = tmpHook;
2533 }
2534
2535 return hooks;
2536 }
2537 /**
2538 * Adds the hook to the appropriate storage container
2539 *
2540 * @param type 'actions' or 'filters'
2541 * @param hook The hook (namespace.identifier) to add to our event manager
2542 * @param callback The function that will be called when the hook is executed.
2543 * @param priority The priority of this hook. Must be an integer.
2544 * @param [context] A value to be used for this
2545 * @private
2546 */
2547
2548
2549 function _addHook(type, hook, callback, priority, context) {
2550 var hookObject = {
2551 callback: callback,
2552 priority: priority,
2553 context: context
2554 }; // Utilize 'prop itself' : http://jsperf.com/hasownproperty-vs-in-vs-undefined/19
2555
2556 var hooks = STORAGE[type][hook];
2557
2558 if (hooks) {
2559 // TEMP FIX BUG
2560 var hasSameCallback = false;
2561 jQuery.each(hooks, function () {
2562 if (this.callback === callback) {
2563 hasSameCallback = true;
2564 return false;
2565 }
2566 });
2567
2568 if (hasSameCallback) {
2569 return;
2570 } // END TEMP FIX BUG
2571
2572
2573 hooks.push(hookObject);
2574 hooks = _hookInsertSort(hooks);
2575 } else {
2576 hooks = [hookObject];
2577 }
2578
2579 STORAGE[type][hook] = hooks;
2580 }
2581 /**
2582 * Runs the specified hook. If it is an action, the value is not modified but if it is a filter, it is.
2583 *
2584 * @param type 'actions' or 'filters'
2585 * @param hook The hook ( namespace.identifier ) to be ran.
2586 * @param args Arguments to pass to the action/filter. If it's a filter, args is actually a single parameter.
2587 * @private
2588 */
2589
2590
2591 function _runHook(type, hook, args) {
2592 var handlers = STORAGE[type][hook],
2593 i,
2594 len;
2595
2596 if (!handlers) {
2597 return 'filters' === type ? args[0] : false;
2598 }
2599
2600 len = handlers.length;
2601
2602 if ('filters' === type) {
2603 for (i = 0; i < len; i++) {
2604 args[0] = handlers[i].callback.apply(handlers[i].context, args);
2605 }
2606 } else {
2607 for (i = 0; i < len; i++) {
2608 handlers[i].callback.apply(handlers[i].context, args);
2609 }
2610 }
2611
2612 return 'filters' === type ? args[0] : true;
2613 }
2614 /**
2615 * Adds an action to the event manager.
2616 *
2617 * @param action Must contain namespace.identifier
2618 * @param callback Must be a valid callback function before this action is added
2619 * @param [priority=10] Used to control when the function is executed in relation to other callbacks bound to the same hook
2620 * @param [context] Supply a value to be used for this
2621 */
2622
2623
2624 function addAction(action, callback, priority, context) {
2625 if ('string' === typeof action && 'function' === typeof callback) {
2626 priority = parseInt(priority || 10, 10);
2627
2628 _addHook('actions', action, callback, priority, context);
2629 }
2630
2631 return MethodsAvailable;
2632 }
2633 /**
2634 * Performs an action if it exists. You can pass as many arguments as you want to this function; the only rule is
2635 * that the first argument must always be the action.
2636 */
2637
2638
2639 function doAction() {
2640 var args = slice.call(arguments);
2641 var action = args.shift();
2642
2643 if ('string' === typeof action) {
2644 _runHook('actions', action, args);
2645 }
2646
2647 return MethodsAvailable;
2648 }
2649 /**
2650 * Removes the specified action if it contains a namespace.identifier & exists.
2651 *
2652 * @param action The action to remove
2653 * @param [callback] Callback function to remove
2654 */
2655
2656
2657 function removeAction(action, callback) {
2658 if ('string' === typeof action) {
2659 _removeHook('actions', action, callback);
2660 }
2661
2662 return MethodsAvailable;
2663 }
2664 /**
2665 * Adds a filter to the event manager.
2666 *
2667 * @param filter Must contain namespace.identifier
2668 * @param callback Must be a valid callback function before this action is added
2669 * @param [priority=10] Used to control when the function is executed in relation to other callbacks bound to the same hook
2670 * @param [context] Supply a value to be used for this
2671 */
2672
2673
2674 function addFilter(filter, callback, priority, context) {
2675 if ('string' === typeof filter && 'function' === typeof callback) {
2676 priority = parseInt(priority || 10, 10);
2677
2678 _addHook('filters', filter, callback, priority, context);
2679 }
2680
2681 return MethodsAvailable;
2682 }
2683 /**
2684 * Performs a filter if it exists. You should only ever pass 1 argument to be filtered. The only rule is that
2685 * the first argument must always be the filter.
2686 */
2687
2688
2689 function applyFilters() {
2690 var args = slice.call(arguments);
2691 var filter = args.shift();
2692
2693 if ('string' === typeof filter) {
2694 return _runHook('filters', filter, args);
2695 }
2696
2697 return MethodsAvailable;
2698 }
2699 /**
2700 * Removes the specified filter if it contains a namespace.identifier & exists.
2701 *
2702 * @param filter The action to remove
2703 * @param [callback] Callback function to remove
2704 */
2705
2706
2707 function removeFilter(filter, callback) {
2708 if ('string' === typeof filter) {
2709 _removeHook('filters', filter, callback);
2710 }
2711
2712 return MethodsAvailable;
2713 }
2714 /**
2715 * Maintain a reference to the object scope so our public methods never get confusing.
2716 */
2717
2718
2719 MethodsAvailable = {
2720 removeFilter: removeFilter,
2721 applyFilters: applyFilters,
2722 addFilter: addFilter,
2723 removeAction: removeAction,
2724 doAction: doAction,
2725 addAction: addAction
2726 }; // return all of the publicly available methods
2727
2728 return MethodsAvailable;
2729 };
2730
2731 module.exports = EventManager;
2732
2733 /***/ }),
2734
2735 /***/ "../core/common/assets/js/utils/environment.js":
2736 /*!*****************************************************!*\
2737 !*** ../core/common/assets/js/utils/environment.js ***!
2738 \*****************************************************/
2739 /***/ ((__unused_webpack_module, exports) => {
2740
2741
2742
2743 Object.defineProperty(exports, "__esModule", ({
2744 value: true
2745 }));
2746 exports["default"] = void 0;
2747
2748 const matchUserAgent = UserAgentStr => {
2749 return userAgent.indexOf(UserAgentStr) >= 0;
2750 },
2751 userAgent = navigator.userAgent,
2752 // Solution influenced by https://stackoverflow.com/questions/9847580/how-to-detect-safari-chrome-ie-firefox-and-opera-browser
2753 // Opera 8.0+
2754 isOpera = !!window.opr && !!opr.addons || !!window.opera || matchUserAgent(' OPR/'),
2755 // Firefox 1.0+
2756 isFirefox = matchUserAgent('Firefox'),
2757 // Safari 3.0+ "[object HTMLElementConstructor]"
2758 isSafari = /^((?!chrome|android).)*safari/i.test(userAgent) || /constructor/i.test(window.HTMLElement) || (p => {
2759 return '[object SafariRemoteNotification]' === p.toString();
2760 })(!window.safari || typeof safari !== 'undefined' && safari.pushNotification),
2761 // Internet Explorer 6-11
2762 isIE = /Trident|MSIE/.test(userAgent) && (
2763 /*@cc_on!@*/
2764 false || !!document.documentMode),
2765 // Edge 20+
2766 isEdge = !isIE && !!window.StyleMedia || matchUserAgent('Edg'),
2767 // Google Chrome (Not accurate)
2768 isChrome = !!window.chrome && matchUserAgent('Chrome') && !(isEdge || isOpera),
2769 // Blink engine
2770 isBlink = matchUserAgent('Chrome') && !!window.CSS,
2771 // Apple Webkit engine
2772 isAppleWebkit = matchUserAgent('AppleWebKit') && !isBlink,
2773 environment = {
2774 appleWebkit: isAppleWebkit,
2775 blink: isBlink,
2776 chrome: isChrome,
2777 edge: isEdge,
2778 firefox: isFirefox,
2779 ie: isIE,
2780 mac: matchUserAgent('Macintosh'),
2781 opera: isOpera,
2782 safari: isSafari,
2783 webkit: matchUserAgent('AppleWebKit')
2784 };
2785
2786 var _default = environment;
2787 exports["default"] = _default;
2788
2789 /***/ }),
2790
2791 /***/ "../core/common/assets/js/utils/storage.js":
2792 /*!*************************************************!*\
2793 !*** ../core/common/assets/js/utils/storage.js ***!
2794 \*************************************************/
2795 /***/ ((__unused_webpack_module, exports) => {
2796
2797
2798
2799 Object.defineProperty(exports, "__esModule", ({
2800 value: true
2801 }));
2802 exports["default"] = void 0;
2803
2804 class _default extends elementorModules.Module {
2805 get(key, options) {
2806 options = options || {};
2807 let storage;
2808
2809 try {
2810 storage = options.session ? sessionStorage : localStorage;
2811 } catch (e) {
2812 return key ? undefined : {};
2813 }
2814
2815 let elementorStorage = storage.getItem('elementor');
2816
2817 if (elementorStorage) {
2818 elementorStorage = JSON.parse(elementorStorage);
2819 } else {
2820 elementorStorage = {};
2821 }
2822
2823 if (!elementorStorage.__expiration) {
2824 elementorStorage.__expiration = {};
2825 }
2826
2827 const expiration = elementorStorage.__expiration;
2828 let expirationToCheck = [];
2829
2830 if (key) {
2831 if (expiration[key]) {
2832 expirationToCheck = [key];
2833 }
2834 } else {
2835 expirationToCheck = Object.keys(expiration);
2836 }
2837
2838 let entryExpired = false;
2839 expirationToCheck.forEach(expirationKey => {
2840 if (new Date(expiration[expirationKey]) < new Date()) {
2841 delete elementorStorage[expirationKey];
2842 delete expiration[expirationKey];
2843 entryExpired = true;
2844 }
2845 });
2846
2847 if (entryExpired) {
2848 this.save(elementorStorage, options.session);
2849 }
2850
2851 if (key) {
2852 return elementorStorage[key];
2853 }
2854
2855 return elementorStorage;
2856 }
2857
2858 set(key, value, options) {
2859 options = options || {};
2860 const elementorStorage = this.get(null, options);
2861 elementorStorage[key] = value;
2862
2863 if (options.lifetimeInSeconds) {
2864 const date = new Date();
2865 date.setTime(date.getTime() + options.lifetimeInSeconds * 1000);
2866 elementorStorage.__expiration[key] = date.getTime();
2867 }
2868
2869 this.save(elementorStorage, options.session);
2870 }
2871
2872 save(object, session) {
2873 let storage;
2874
2875 try {
2876 storage = session ? sessionStorage : localStorage;
2877 } catch (e) {
2878 return;
2879 }
2880
2881 storage.setItem('elementor', JSON.stringify(object));
2882 }
2883
2884 }
2885
2886 exports["default"] = _default;
2887
2888 /***/ }),
2889
2890 /***/ "../modules/shapes/assets/js/frontend/frontend.js":
2891 /*!********************************************************!*\
2892 !*** ../modules/shapes/assets/js/frontend/frontend.js ***!
2893 \********************************************************/
2894 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
2895
2896
2897
2898 Object.defineProperty(exports, "__esModule", ({
2899 value: true
2900 }));
2901 exports["default"] = void 0;
2902
2903 class _default extends elementorModules.Module {
2904 constructor() {
2905 super();
2906 elementorFrontend.elementsHandler.attachHandler('text-path', () => __webpack_require__.e(/*! import() | text-path */ "text-path").then(__webpack_require__.bind(__webpack_require__, /*! ./handlers/text-path */ "../modules/shapes/assets/js/frontend/handlers/text-path.js")));
2907 }
2908
2909 }
2910
2911 exports["default"] = _default;
2912
2913 /***/ })
2914
2915 },
2916 /******/ __webpack_require__ => { // webpackRuntimeModules
2917 /******/ var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
2918 /******/ __webpack_require__.O(0, ["frontend-modules"], () => (__webpack_exec__("../assets/dev/js/frontend/frontend.js")));
2919 /******/ var __webpack_exports__ = __webpack_require__.O();
2920 /******/ }
2921 ]);
2922 //# sourceMappingURL=frontend.js.map