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

preloaded-modules.js in Elementor Website Builder – more than just a page builder 3.5.4, at assets/js/preloaded-modules.js

2,434 lines 78.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /*! elementor - v3.5.4 - 23-01-2022 */
2 (self["webpackChunkelementor"] = self["webpackChunkelementor"] || []).push([["preloaded-modules"],{
3
4 /***/ "../node_modules/@babel/runtime/helpers/defineProperty.js":
5 /*!****************************************************************!*\
6 !*** ../node_modules/@babel/runtime/helpers/defineProperty.js ***!
7 \****************************************************************/
8 /***/ ((module) => {
9
10 function _defineProperty(obj, key, value) {
11 if (key in obj) {
12 Object.defineProperty(obj, key, {
13 value: value,
14 enumerable: true,
15 configurable: true,
16 writable: true
17 });
18 } else {
19 obj[key] = value;
20 }
21
22 return obj;
23 }
24
25 module.exports = _defineProperty;
26 module.exports["default"] = module.exports, module.exports.__esModule = true;
27
28 /***/ }),
29
30 /***/ "../assets/dev/js/frontend/handlers/accordion.js":
31 /*!*******************************************************!*\
32 !*** ../assets/dev/js/frontend/handlers/accordion.js ***!
33 \*******************************************************/
34 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
35
36 "use strict";
37
38
39 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
40
41 Object.defineProperty(exports, "__esModule", ({
42 value: true
43 }));
44 exports["default"] = void 0;
45
46 var _baseTabs = _interopRequireDefault(__webpack_require__(/*! ./base-tabs */ "../assets/dev/js/frontend/handlers/base-tabs.js"));
47
48 class Accordion extends _baseTabs.default {
49 getDefaultSettings() {
50 const defaultSettings = super.getDefaultSettings();
51 return { ...defaultSettings,
52 showTabFn: 'slideDown',
53 hideTabFn: 'slideUp'
54 };
55 }
56
57 }
58
59 exports["default"] = Accordion;
60
61 /***/ }),
62
63 /***/ "../assets/dev/js/frontend/handlers/alert.js":
64 /*!***************************************************!*\
65 !*** ../assets/dev/js/frontend/handlers/alert.js ***!
66 \***************************************************/
67 /***/ ((__unused_webpack_module, exports) => {
68
69 "use strict";
70
71
72 Object.defineProperty(exports, "__esModule", ({
73 value: true
74 }));
75 exports["default"] = void 0;
76
77 class Alert extends elementorModules.frontend.handlers.Base {
78 getDefaultSettings() {
79 return {
80 selectors: {
81 dismissButton: '.elementor-alert-dismiss'
82 }
83 };
84 }
85
86 getDefaultElements() {
87 const selectors = this.getSettings('selectors');
88 return {
89 $dismissButton: this.$element.find(selectors.dismissButton)
90 };
91 }
92
93 bindEvents() {
94 this.elements.$dismissButton.on('click', this.onDismissButtonClick.bind(this));
95 }
96
97 onDismissButtonClick() {
98 this.$element.fadeOut();
99 }
100
101 }
102
103 exports["default"] = Alert;
104
105 /***/ }),
106
107 /***/ "../assets/dev/js/frontend/handlers/base-tabs.js":
108 /*!*******************************************************!*\
109 !*** ../assets/dev/js/frontend/handlers/base-tabs.js ***!
110 \*******************************************************/
111 /***/ ((__unused_webpack_module, exports) => {
112
113 "use strict";
114
115
116 Object.defineProperty(exports, "__esModule", ({
117 value: true
118 }));
119 exports["default"] = void 0;
120
121 class baseTabs extends elementorModules.frontend.handlers.Base {
122 getDefaultSettings() {
123 return {
124 selectors: {
125 tablist: '[role="tablist"]',
126 tabTitle: '.elementor-tab-title',
127 tabContent: '.elementor-tab-content'
128 },
129 classes: {
130 active: 'elementor-active'
131 },
132 showTabFn: 'show',
133 hideTabFn: 'hide',
134 toggleSelf: true,
135 hidePrevious: true,
136 autoExpand: true,
137 keyDirection: {
138 ArrowLeft: elementorFrontendConfig.is_rtl ? 1 : -1,
139 ArrowUp: -1,
140 ArrowRight: elementorFrontendConfig.is_rtl ? -1 : 1,
141 ArrowDown: 1
142 }
143 };
144 }
145
146 getDefaultElements() {
147 const selectors = this.getSettings('selectors');
148 return {
149 $tabTitles: this.findElement(selectors.tabTitle),
150 $tabContents: this.findElement(selectors.tabContent)
151 };
152 }
153
154 activateDefaultTab() {
155 const settings = this.getSettings();
156
157 if (!settings.autoExpand || 'editor' === settings.autoExpand && !this.isEdit) {
158 return;
159 }
160
161 const defaultActiveTab = this.getEditSettings('activeItemIndex') || 1,
162 originalToggleMethods = {
163 showTabFn: settings.showTabFn,
164 hideTabFn: settings.hideTabFn
165 }; // Toggle tabs without animation to avoid jumping
166
167 this.setSettings({
168 showTabFn: 'show',
169 hideTabFn: 'hide'
170 });
171 this.changeActiveTab(defaultActiveTab); // Return back original toggle effects
172
173 this.setSettings(originalToggleMethods);
174 }
175
176 handleKeyboardNavigation(event) {
177 const tab = event.currentTarget,
178 $tabList = jQuery(tab.closest(this.getSettings('selectors').tablist)),
179 $tabs = $tabList.find(this.getSettings('selectors').tabTitle),
180 isVertical = 'vertical' === $tabList.attr('aria-orientation');
181
182 switch (event.key) {
183 case 'ArrowLeft':
184 case 'ArrowRight':
185 if (isVertical) {
186 return;
187 }
188
189 break;
190
191 case 'ArrowUp':
192 case 'ArrowDown':
193 if (!isVertical) {
194 return;
195 }
196
197 event.preventDefault();
198 break;
199
200 case 'Home':
201 event.preventDefault();
202 $tabs.first().focus();
203 return;
204
205 case 'End':
206 event.preventDefault();
207 $tabs.last().focus();
208 return;
209
210 default:
211 return;
212 }
213
214 const tabIndex = tab.getAttribute('data-tab') - 1,
215 direction = this.getSettings('keyDirection')[event.key],
216 nextTab = $tabs[tabIndex + direction];
217
218 if (nextTab) {
219 nextTab.focus();
220 } else if (-1 === tabIndex + direction) {
221 $tabs.last().focus();
222 } else {
223 $tabs.first().focus();
224 }
225 }
226
227 deactivateActiveTab(tabIndex) {
228 const settings = this.getSettings(),
229 activeClass = settings.classes.active,
230 activeFilter = tabIndex ? '[data-tab="' + tabIndex + '"]' : '.' + activeClass,
231 $activeTitle = this.elements.$tabTitles.filter(activeFilter),
232 $activeContent = this.elements.$tabContents.filter(activeFilter);
233 $activeTitle.add($activeContent).removeClass(activeClass);
234 $activeTitle.attr({
235 tabindex: '-1',
236 'aria-selected': 'false',
237 'aria-expanded': 'false'
238 });
239 $activeContent[settings.hideTabFn]();
240 $activeContent.attr('hidden', 'hidden');
241 }
242
243 activateTab(tabIndex) {
244 const settings = this.getSettings(),
245 activeClass = settings.classes.active,
246 $requestedTitle = this.elements.$tabTitles.filter('[data-tab="' + tabIndex + '"]'),
247 $requestedContent = this.elements.$tabContents.filter('[data-tab="' + tabIndex + '"]'),
248 animationDuration = 'show' === settings.showTabFn ? 0 : 400;
249 $requestedTitle.add($requestedContent).addClass(activeClass);
250 $requestedTitle.attr({
251 tabindex: '0',
252 'aria-selected': 'true',
253 'aria-expanded': 'true'
254 });
255 $requestedContent[settings.showTabFn](animationDuration, () => elementorFrontend.elements.$window.trigger('resize'));
256 $requestedContent.removeAttr('hidden');
257 }
258
259 isActiveTab(tabIndex) {
260 return this.elements.$tabTitles.filter('[data-tab="' + tabIndex + '"]').hasClass(this.getSettings('classes.active'));
261 }
262
263 bindEvents() {
264 this.elements.$tabTitles.on({
265 keydown: event => {
266 // Support for old markup that includes an `<a>` tag in the tab
267 if (jQuery(event.target).is('a') && `Enter` === event.key) {
268 event.preventDefault();
269 } // We listen to keydowon event for these keys in order to prevent undesired page scrolling
270
271
272 if (['End', 'Home', 'ArrowUp', 'ArrowDown'].includes(event.key)) {
273 this.handleKeyboardNavigation(event);
274 }
275 },
276 keyup: event => {
277 switch (event.key) {
278 case 'ArrowLeft':
279 case 'ArrowRight':
280 this.handleKeyboardNavigation(event);
281 break;
282
283 case 'Enter':
284 case 'Space':
285 event.preventDefault();
286 this.changeActiveTab(event.currentTarget.getAttribute('data-tab'));
287 break;
288 }
289 },
290 click: event => {
291 event.preventDefault();
292 this.changeActiveTab(event.currentTarget.getAttribute('data-tab'));
293 }
294 });
295 }
296
297 onInit(...args) {
298 super.onInit(...args);
299 this.activateDefaultTab();
300 }
301
302 onEditSettingsChange(propertyName) {
303 if ('activeItemIndex' === propertyName) {
304 this.activateDefaultTab();
305 }
306 }
307
308 changeActiveTab(tabIndex) {
309 const isActiveTab = this.isActiveTab(tabIndex),
310 settings = this.getSettings();
311
312 if ((settings.toggleSelf || !isActiveTab) && settings.hidePrevious) {
313 this.deactivateActiveTab();
314 }
315
316 if (!settings.hidePrevious && isActiveTab) {
317 this.deactivateActiveTab(tabIndex);
318 }
319
320 if (!isActiveTab) {
321 this.activateTab(tabIndex);
322 }
323 }
324
325 }
326
327 exports["default"] = baseTabs;
328
329 /***/ }),
330
331 /***/ "../assets/dev/js/frontend/handlers/counter.js":
332 /*!*****************************************************!*\
333 !*** ../assets/dev/js/frontend/handlers/counter.js ***!
334 \*****************************************************/
335 /***/ ((__unused_webpack_module, exports) => {
336
337 "use strict";
338
339
340 Object.defineProperty(exports, "__esModule", ({
341 value: true
342 }));
343 exports["default"] = void 0;
344
345 class Counter extends elementorModules.frontend.handlers.Base {
346 getDefaultSettings() {
347 return {
348 selectors: {
349 counterNumber: '.elementor-counter-number'
350 }
351 };
352 }
353
354 getDefaultElements() {
355 const selectors = this.getSettings('selectors');
356 return {
357 $counterNumber: this.$element.find(selectors.counterNumber)
358 };
359 }
360
361 onInit() {
362 super.onInit();
363 this.intersectionObserver = elementorModules.utils.Scroll.scrollObserver({
364 callback: event => {
365 if (event.isInViewport) {
366 this.intersectionObserver.unobserve(this.elements.$counterNumber[0]);
367 const data = this.elements.$counterNumber.data(),
368 decimalDigits = data.toValue.toString().match(/\.(.*)/);
369
370 if (decimalDigits) {
371 data.rounding = decimalDigits[1].length;
372 }
373
374 this.elements.$counterNumber.numerator(data);
375 }
376 }
377 });
378 this.intersectionObserver.observe(this.elements.$counterNumber[0]);
379 }
380
381 }
382
383 exports["default"] = Counter;
384
385 /***/ }),
386
387 /***/ "../assets/dev/js/frontend/handlers/image-carousel.js":
388 /*!************************************************************!*\
389 !*** ../assets/dev/js/frontend/handlers/image-carousel.js ***!
390 \************************************************************/
391 /***/ ((__unused_webpack_module, exports) => {
392
393 "use strict";
394
395
396 Object.defineProperty(exports, "__esModule", ({
397 value: true
398 }));
399 exports["default"] = void 0;
400
401 class ImageCarousel extends elementorModules.frontend.handlers.SwiperBase {
402 getDefaultSettings() {
403 return {
404 selectors: {
405 carousel: '.elementor-image-carousel-wrapper',
406 slideContent: '.swiper-slide'
407 }
408 };
409 }
410
411 getDefaultElements() {
412 const selectors = this.getSettings('selectors');
413 const elements = {
414 $swiperContainer: this.$element.find(selectors.carousel)
415 };
416 elements.$slides = elements.$swiperContainer.find(selectors.slideContent);
417 return elements;
418 }
419
420 getSwiperSettings() {
421 const elementSettings = this.getElementSettings(),
422 slidesToShow = +elementSettings.slides_to_show || 3,
423 isSingleSlide = 1 === slidesToShow,
424 elementorBreakpoints = elementorFrontend.config.responsive.activeBreakpoints,
425 defaultSlidesToShowMap = {
426 mobile: 1,
427 tablet: isSingleSlide ? 1 : 2
428 };
429 const swiperOptions = {
430 slidesPerView: slidesToShow,
431 loop: 'yes' === elementSettings.infinite,
432 speed: elementSettings.speed,
433 handleElementorBreakpoints: true
434 };
435 swiperOptions.breakpoints = {};
436 let lastBreakpointSlidesToShowValue = slidesToShow;
437 Object.keys(elementorBreakpoints).reverse().forEach(breakpointName => {
438 // Tablet has a specific default `slides_to_show`.
439 const defaultSlidesToShow = defaultSlidesToShowMap[breakpointName] ? defaultSlidesToShowMap[breakpointName] : lastBreakpointSlidesToShowValue;
440 swiperOptions.breakpoints[elementorBreakpoints[breakpointName].value] = {
441 slidesPerView: +elementSettings['slides_to_show_' + breakpointName] || defaultSlidesToShow,
442 slidesPerGroup: +elementSettings['slides_to_scroll_' + breakpointName] || 1
443 };
444 lastBreakpointSlidesToShowValue = +elementSettings['slides_to_show_' + breakpointName] || defaultSlidesToShow;
445 });
446
447 if ('yes' === elementSettings.autoplay) {
448 swiperOptions.autoplay = {
449 delay: elementSettings.autoplay_speed,
450 disableOnInteraction: 'yes' === elementSettings.pause_on_interaction
451 };
452 }
453
454 if (isSingleSlide) {
455 swiperOptions.effect = elementSettings.effect;
456
457 if ('fade' === elementSettings.effect) {
458 swiperOptions.fadeEffect = {
459 crossFade: true
460 };
461 }
462 } else {
463 swiperOptions.slidesPerGroup = +elementSettings.slides_to_scroll || 1;
464 }
465
466 if (elementSettings.image_spacing_custom) {
467 swiperOptions.spaceBetween = elementSettings.image_spacing_custom.size;
468 }
469
470 const showArrows = 'arrows' === elementSettings.navigation || 'both' === elementSettings.navigation,
471 showDots = 'dots' === elementSettings.navigation || 'both' === elementSettings.navigation;
472
473 if (showArrows) {
474 swiperOptions.navigation = {
475 prevEl: '.elementor-swiper-button-prev',
476 nextEl: '.elementor-swiper-button-next'
477 };
478 }
479
480 if (showDots) {
481 swiperOptions.pagination = {
482 el: '.swiper-pagination',
483 type: 'bullets',
484 clickable: true
485 };
486 }
487
488 return swiperOptions;
489 }
490
491 async onInit(...args) {
492 super.onInit(...args);
493 const elementSettings = this.getElementSettings();
494
495 if (!this.elements.$swiperContainer.length || 2 > this.elements.$slides.length) {
496 return;
497 }
498
499 const Swiper = elementorFrontend.utils.swiper;
500 this.swiper = await new Swiper(this.elements.$swiperContainer, this.getSwiperSettings()); // Expose the swiper instance in the frontend
501
502 this.elements.$swiperContainer.data('swiper', this.swiper);
503
504 if ('yes' === elementSettings.pause_on_hover) {
505 this.togglePauseOnHover(true);
506 }
507 }
508
509 updateSwiperOption(propertyName) {
510 const elementSettings = this.getElementSettings(),
511 newSettingValue = elementSettings[propertyName],
512 params = this.swiper.params; // Handle special cases where the value to update is not the value that the Swiper library accepts.
513
514 switch (propertyName) {
515 case 'image_spacing_custom':
516 params.spaceBetween = newSettingValue.size || 0;
517 break;
518
519 case 'autoplay_speed':
520 params.autoplay.delay = newSettingValue;
521 break;
522
523 case 'speed':
524 params.speed = newSettingValue;
525 break;
526 }
527
528 this.swiper.update();
529 }
530
531 getChangeableProperties() {
532 return {
533 pause_on_hover: 'pauseOnHover',
534 autoplay_speed: 'delay',
535 speed: 'speed',
536 image_spacing_custom: 'spaceBetween'
537 };
538 }
539
540 onElementChange(propertyName) {
541 const changeableProperties = this.getChangeableProperties();
542
543 if (changeableProperties[propertyName]) {
544 // 'pause_on_hover' is implemented by the handler with event listeners, not the Swiper library.
545 if ('pause_on_hover' === propertyName) {
546 const newSettingValue = this.getElementSettings('pause_on_hover');
547 this.togglePauseOnHover('yes' === newSettingValue);
548 } else {
549 this.updateSwiperOption(propertyName);
550 }
551 }
552 }
553
554 onEditSettingsChange(propertyName) {
555 if ('activeItemIndex' === propertyName) {
556 this.swiper.slideToLoop(this.getEditSettings('activeItemIndex') - 1);
557 }
558 }
559
560 }
561
562 exports["default"] = ImageCarousel;
563
564 /***/ }),
565
566 /***/ "../assets/dev/js/frontend/handlers/progress.js":
567 /*!******************************************************!*\
568 !*** ../assets/dev/js/frontend/handlers/progress.js ***!
569 \******************************************************/
570 /***/ ((__unused_webpack_module, exports) => {
571
572 "use strict";
573
574
575 Object.defineProperty(exports, "__esModule", ({
576 value: true
577 }));
578 exports["default"] = void 0;
579
580 class Progress extends elementorModules.frontend.handlers.Base {
581 getDefaultSettings() {
582 return {
583 selectors: {
584 progressNumber: '.elementor-progress-bar'
585 }
586 };
587 }
588
589 getDefaultElements() {
590 const selectors = this.getSettings('selectors');
591 return {
592 $progressNumber: this.$element.find(selectors.progressNumber)
593 };
594 }
595
596 onInit() {
597 super.onInit();
598 elementorFrontend.waypoint(this.elements.$progressNumber, () => {
599 const $progressbar = this.elements.$progressNumber;
600 $progressbar.css('width', $progressbar.data('max') + '%');
601 });
602 }
603
604 }
605
606 exports["default"] = Progress;
607
608 /***/ }),
609
610 /***/ "../assets/dev/js/frontend/handlers/tabs.js":
611 /*!**************************************************!*\
612 !*** ../assets/dev/js/frontend/handlers/tabs.js ***!
613 \**************************************************/
614 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
615
616 "use strict";
617
618
619 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
620
621 Object.defineProperty(exports, "__esModule", ({
622 value: true
623 }));
624 exports["default"] = void 0;
625
626 var _baseTabs = _interopRequireDefault(__webpack_require__(/*! ./base-tabs */ "../assets/dev/js/frontend/handlers/base-tabs.js"));
627
628 class Tabs extends _baseTabs.default {
629 getDefaultSettings() {
630 const defaultSettings = super.getDefaultSettings();
631 return { ...defaultSettings,
632 toggleSelf: false
633 };
634 }
635
636 }
637
638 exports["default"] = Tabs;
639
640 /***/ }),
641
642 /***/ "../assets/dev/js/frontend/handlers/text-editor.js":
643 /*!*********************************************************!*\
644 !*** ../assets/dev/js/frontend/handlers/text-editor.js ***!
645 \*********************************************************/
646 /***/ ((__unused_webpack_module, exports) => {
647
648 "use strict";
649
650
651 Object.defineProperty(exports, "__esModule", ({
652 value: true
653 }));
654 exports["default"] = void 0;
655
656 class TextEditor extends elementorModules.frontend.handlers.Base {
657 getDefaultSettings() {
658 return {
659 selectors: {
660 paragraph: 'p:first'
661 },
662 classes: {
663 dropCap: 'elementor-drop-cap',
664 dropCapLetter: 'elementor-drop-cap-letter'
665 }
666 };
667 }
668
669 getDefaultElements() {
670 const selectors = this.getSettings('selectors'),
671 classes = this.getSettings('classes'),
672 $dropCap = jQuery('<span>', {
673 class: classes.dropCap
674 }),
675 $dropCapLetter = jQuery('<span>', {
676 class: classes.dropCapLetter
677 });
678 $dropCap.append($dropCapLetter);
679 return {
680 $paragraph: this.$element.find(selectors.paragraph),
681 $dropCap: $dropCap,
682 $dropCapLetter: $dropCapLetter
683 };
684 }
685
686 wrapDropCap() {
687 const isDropCapEnabled = this.getElementSettings('drop_cap');
688
689 if (!isDropCapEnabled) {
690 // If there is an old drop cap inside the paragraph
691 if (this.dropCapLetter) {
692 this.elements.$dropCap.remove();
693 this.elements.$paragraph.prepend(this.dropCapLetter);
694 this.dropCapLetter = '';
695 }
696
697 return;
698 }
699
700 const $paragraph = this.elements.$paragraph;
701
702 if (!$paragraph.length) {
703 return;
704 }
705
706 const paragraphContent = $paragraph.html().replace(/&nbsp;/g, ' '),
707 firstLetterMatch = paragraphContent.match(/^ *([^ ] ?)/);
708
709 if (!firstLetterMatch) {
710 return;
711 }
712
713 const firstLetter = firstLetterMatch[1],
714 trimmedFirstLetter = firstLetter.trim(); // Don't apply drop cap when the content starting with an HTML tag
715
716 if ('<' === trimmedFirstLetter) {
717 return;
718 }
719
720 this.dropCapLetter = firstLetter;
721 this.elements.$dropCapLetter.text(trimmedFirstLetter);
722 const restoredParagraphContent = paragraphContent.slice(firstLetter.length).replace(/^ */, match => {
723 return new Array(match.length + 1).join('&nbsp;');
724 });
725 $paragraph.html(restoredParagraphContent).prepend(this.elements.$dropCap);
726 }
727
728 onInit(...args) {
729 super.onInit(...args);
730 this.wrapDropCap();
731 }
732
733 onElementChange(propertyName) {
734 if ('drop_cap' === propertyName) {
735 this.wrapDropCap();
736 }
737 }
738
739 }
740
741 exports["default"] = TextEditor;
742
743 /***/ }),
744
745 /***/ "../assets/dev/js/frontend/handlers/toggle.js":
746 /*!****************************************************!*\
747 !*** ../assets/dev/js/frontend/handlers/toggle.js ***!
748 \****************************************************/
749 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
750
751 "use strict";
752
753
754 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
755
756 Object.defineProperty(exports, "__esModule", ({
757 value: true
758 }));
759 exports["default"] = void 0;
760
761 var _baseTabs = _interopRequireDefault(__webpack_require__(/*! ./base-tabs */ "../assets/dev/js/frontend/handlers/base-tabs.js"));
762
763 class Toggle extends _baseTabs.default {
764 getDefaultSettings() {
765 const defaultSettings = super.getDefaultSettings();
766 return { ...defaultSettings,
767 showTabFn: 'slideDown',
768 hideTabFn: 'slideUp',
769 hidePrevious: false,
770 autoExpand: 'editor'
771 };
772 }
773
774 }
775
776 exports["default"] = Toggle;
777
778 /***/ }),
779
780 /***/ "../assets/dev/js/frontend/handlers/video.js":
781 /*!***************************************************!*\
782 !*** ../assets/dev/js/frontend/handlers/video.js ***!
783 \***************************************************/
784 /***/ ((__unused_webpack_module, exports) => {
785
786 "use strict";
787
788
789 Object.defineProperty(exports, "__esModule", ({
790 value: true
791 }));
792 exports["default"] = void 0;
793
794 class Video extends elementorModules.frontend.handlers.Base {
795 getDefaultSettings() {
796 return {
797 selectors: {
798 imageOverlay: '.elementor-custom-embed-image-overlay',
799 video: '.elementor-video',
800 videoIframe: '.elementor-video-iframe'
801 }
802 };
803 }
804
805 getDefaultElements() {
806 const selectors = this.getSettings('selectors');
807 return {
808 $imageOverlay: this.$element.find(selectors.imageOverlay),
809 $video: this.$element.find(selectors.video),
810 $videoIframe: this.$element.find(selectors.videoIframe)
811 };
812 }
813
814 handleVideo() {
815 if (this.getElementSettings('lightbox')) {
816 return;
817 }
818
819 if ('youtube' === this.getElementSettings('video_type')) {
820 this.apiProvider.onApiReady(apiObject => {
821 this.elements.$imageOverlay.remove();
822 this.prepareYTVideo(apiObject, true);
823 });
824 } else {
825 this.elements.$imageOverlay.remove();
826 this.playVideo();
827 }
828 }
829
830 playVideo() {
831 if (this.elements.$video.length) {
832 // this.youtubePlayer exists only for YouTube videos, and its play function is different.
833 if (this.youtubePlayer) {
834 this.youtubePlayer.playVideo();
835 } else {
836 this.elements.$video[0].play();
837 }
838
839 return;
840 }
841
842 const $videoIframe = this.elements.$videoIframe,
843 lazyLoad = $videoIframe.data('lazy-load');
844
845 if (lazyLoad) {
846 $videoIframe.attr('src', lazyLoad);
847 }
848
849 $videoIframe[0].src = this.apiProvider.getAutoplayURL($videoIframe[0].src);
850 }
851
852 async animateVideo() {
853 const lightbox = await elementorFrontend.utils.lightbox;
854 lightbox.setEntranceAnimation(this.getCurrentDeviceSetting('lightbox_content_animation'));
855 }
856
857 async handleAspectRatio() {
858 const lightbox = await elementorFrontend.utils.lightbox;
859 lightbox.setVideoAspectRatio(this.getElementSettings('aspect_ratio'));
860 }
861
862 async hideLightbox() {
863 const lightbox = await elementorFrontend.utils.lightbox;
864 lightbox.getModal().hide();
865 }
866
867 prepareYTVideo(YT, onOverlayClick) {
868 const elementSettings = this.getElementSettings(),
869 playerOptions = {
870 videoId: this.videoID,
871 events: {
872 onReady: () => {
873 if (elementSettings.mute) {
874 this.youtubePlayer.mute();
875 }
876
877 if (elementSettings.autoplay || onOverlayClick) {
878 this.youtubePlayer.playVideo();
879 }
880 },
881 onStateChange: event => {
882 if (event.data === YT.PlayerState.ENDED && elementSettings.loop) {
883 this.youtubePlayer.seekTo(elementSettings.start || 0);
884 }
885 }
886 },
887 playerVars: {
888 controls: elementSettings.controls ? 1 : 0,
889 rel: elementSettings.rel ? 1 : 0,
890 playsinline: elementSettings.play_on_mobile ? 1 : 0,
891 modestbranding: elementSettings.modestbranding ? 1 : 0,
892 autoplay: elementSettings.autoplay ? 1 : 0,
893 start: elementSettings.start,
894 end: elementSettings.end
895 }
896 }; // To handle CORS issues, when the default host is changed, the origin parameter has to be set.
897
898 if (elementSettings.yt_privacy) {
899 playerOptions.host = 'https://www.youtube-nocookie.com';
900 playerOptions.origin = window.location.hostname;
901 }
902
903 this.youtubePlayer = new YT.Player(this.elements.$video[0], playerOptions);
904 }
905
906 bindEvents() {
907 this.elements.$imageOverlay.on('click', this.handleVideo.bind(this));
908 }
909
910 onInit() {
911 super.onInit();
912 const elementSettings = this.getElementSettings();
913
914 if (elementorFrontend.utils[elementSettings.video_type]) {
915 this.apiProvider = elementorFrontend.utils[elementSettings.video_type];
916 } else {
917 this.apiProvider = elementorFrontend.utils.baseVideoLoader;
918 }
919
920 if ('youtube' !== elementSettings.video_type) {
921 // Currently the only API integration in the Video widget is for the YT API
922 return;
923 }
924
925 this.videoID = this.apiProvider.getVideoIDFromURL(elementSettings.youtube_url); // If there is an image overlay, the YouTube video prep method will be triggered on click
926
927 if (!this.videoID) {
928 return;
929 } // If the user is using an image overlay, loading the API happens on overlay click instead of on init.
930
931
932 if (elementSettings.show_image_overlay && elementSettings.image_overlay.url) {
933 return;
934 }
935
936 if (elementSettings.lazy_load) {
937 this.intersectionObserver = elementorModules.utils.Scroll.scrollObserver({
938 callback: event => {
939 if (event.isInViewport) {
940 this.intersectionObserver.unobserve(this.elements.$video.parent()[0]);
941 this.apiProvider.onApiReady(apiObject => this.prepareYTVideo(apiObject));
942 }
943 }
944 }); // We observe the parent, since the video container has a height of 0.
945
946 this.intersectionObserver.observe(this.elements.$video.parent()[0]);
947 return;
948 } // When Optimized asset loading is set to off, the video type is set to 'Youtube', and 'Privacy Mode' is set
949 // to 'On', there might be a conflict with other videos that are loaded WITHOUT privacy mode, such as a
950 // video bBackground in a section. In these cases, to avoid the conflict, a timeout is added to postpone the
951 // initialization of the Youtube API object.
952
953
954 if (!elementorFrontend.config.experimentalFeatures['e_optimized_assets_loading']) {
955 setTimeout(() => {
956 this.apiProvider.onApiReady(apiObject => this.prepareYTVideo(apiObject));
957 }, 0);
958 } else {
959 this.apiProvider.onApiReady(apiObject => this.prepareYTVideo(apiObject));
960 }
961 }
962
963 onElementChange(propertyName) {
964 if (0 === propertyName.indexOf('lightbox_content_animation')) {
965 this.animateVideo();
966 return;
967 }
968
969 const isLightBoxEnabled = this.getElementSettings('lightbox');
970
971 if ('lightbox' === propertyName && !isLightBoxEnabled) {
972 this.hideLightbox();
973 return;
974 }
975
976 if ('aspect_ratio' === propertyName && isLightBoxEnabled) {
977 this.handleAspectRatio();
978 }
979 }
980
981 }
982
983 exports["default"] = Video;
984
985 /***/ }),
986
987 /***/ "../assets/dev/js/frontend/preloaded-modules.js":
988 /*!******************************************************!*\
989 !*** ../assets/dev/js/frontend/preloaded-modules.js ***!
990 \******************************************************/
991 /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
992
993 "use strict";
994
995
996 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
997
998 var _accordion = _interopRequireDefault(__webpack_require__(/*! ./handlers/accordion */ "../assets/dev/js/frontend/handlers/accordion.js"));
999
1000 var _alert = _interopRequireDefault(__webpack_require__(/*! ./handlers/alert */ "../assets/dev/js/frontend/handlers/alert.js"));
1001
1002 var _counter = _interopRequireDefault(__webpack_require__(/*! ./handlers/counter */ "../assets/dev/js/frontend/handlers/counter.js"));
1003
1004 var _progress = _interopRequireDefault(__webpack_require__(/*! ./handlers/progress */ "../assets/dev/js/frontend/handlers/progress.js"));
1005
1006 var _tabs = _interopRequireDefault(__webpack_require__(/*! ./handlers/tabs */ "../assets/dev/js/frontend/handlers/tabs.js"));
1007
1008 var _toggle = _interopRequireDefault(__webpack_require__(/*! ./handlers/toggle */ "../assets/dev/js/frontend/handlers/toggle.js"));
1009
1010 var _video = _interopRequireDefault(__webpack_require__(/*! ./handlers/video */ "../assets/dev/js/frontend/handlers/video.js"));
1011
1012 var _imageCarousel = _interopRequireDefault(__webpack_require__(/*! ./handlers/image-carousel */ "../assets/dev/js/frontend/handlers/image-carousel.js"));
1013
1014 var _textEditor = _interopRequireDefault(__webpack_require__(/*! ./handlers/text-editor */ "../assets/dev/js/frontend/handlers/text-editor.js"));
1015
1016 var _lightbox = _interopRequireDefault(__webpack_require__(/*! elementor-frontend/utils/lightbox/lightbox */ "../assets/dev/js/frontend/utils/lightbox/lightbox.js"));
1017
1018 elementorFrontend.elements.$window.on('elementor/frontend/init', () => {
1019 elementorFrontend.elementsHandler.elementsHandlers = {
1020 'accordion.default': _accordion.default,
1021 'alert.default': _alert.default,
1022 'counter.default': _counter.default,
1023 'progress.default': _progress.default,
1024 'tabs.default': _tabs.default,
1025 'toggle.default': _toggle.default,
1026 'video.default': _video.default,
1027 'image-carousel.default': _imageCarousel.default,
1028 'text-editor.default': _textEditor.default
1029 };
1030 elementorFrontend.on('components:init', () => {
1031 // We first need to delete the property because by default it's a getter function that cannot be overwritten.
1032 delete elementorFrontend.utils.lightbox;
1033 elementorFrontend.utils.lightbox = new _lightbox.default();
1034 });
1035 });
1036
1037 /***/ }),
1038
1039 /***/ "../assets/dev/js/frontend/utils/icons/e-icons.js":
1040 /*!********************************************************!*\
1041 !*** ../assets/dev/js/frontend/utils/icons/e-icons.js ***!
1042 \********************************************************/
1043 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1044
1045 "use strict";
1046
1047
1048 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
1049
1050 Object.defineProperty(exports, "__esModule", ({
1051 value: true
1052 }));
1053 exports.zoomOutBold = exports.zoomInBold = exports.twitter = exports.shareArrow = exports.pinterest = exports.loading = exports.frameMinimize = exports.frameExpand = exports.facebook = exports.downloadBold = exports.close = exports.chevronRight = exports.chevronLeft = void 0;
1054
1055 var _manager = _interopRequireDefault(__webpack_require__(/*! ./manager */ "../assets/dev/js/frontend/utils/icons/manager.js"));
1056
1057 // This file is automatically generated, please don't change anything in this file.
1058 const iconsManager = new _manager.default('eicon');
1059 const chevronLeft = {
1060 get element() {
1061 const svgData = {
1062 path: 'M646 125C629 125 613 133 604 142L308 442C296 454 292 471 292 487 292 504 296 521 308 533L604 854C617 867 629 875 646 875 663 875 679 871 692 858 704 846 713 829 713 812 713 796 708 779 692 767L438 487 692 225C700 217 708 204 708 187 708 171 704 154 692 142 675 129 663 125 646 125Z',
1063 width: 1000,
1064 height: 1000
1065 };
1066 return iconsManager.createSvgElement('chevron-left', svgData);
1067 }
1068
1069 };
1070 exports.chevronLeft = chevronLeft;
1071 const chevronRight = {
1072 get element() {
1073 const svgData = {
1074 path: 'M696 533C708 521 713 504 713 487 713 471 708 454 696 446L400 146C388 133 375 125 354 125 338 125 325 129 313 142 300 154 292 171 292 187 292 204 296 221 308 233L563 492 304 771C292 783 288 800 288 817 288 833 296 850 308 863 321 871 338 875 354 875 371 875 388 867 400 854L696 533Z',
1075 width: 1000,
1076 height: 1000
1077 };
1078 return iconsManager.createSvgElement('chevron-right', svgData);
1079 }
1080
1081 };
1082 exports.chevronRight = chevronRight;
1083 const close = {
1084 get element() {
1085 const svgData = {
1086 path: 'M742 167L500 408 258 167C246 154 233 150 217 150 196 150 179 158 167 167 154 179 150 196 150 212 150 229 154 242 171 254L408 500 167 742C138 771 138 800 167 829 196 858 225 858 254 829L496 587 738 829C750 842 767 846 783 846 800 846 817 842 829 829 842 817 846 804 846 783 846 767 842 750 829 737L588 500 833 258C863 229 863 200 833 171 804 137 775 137 742 167Z',
1087 width: 1000,
1088 height: 1000
1089 };
1090 return iconsManager.createSvgElement('close', svgData);
1091 }
1092
1093 };
1094 exports.close = close;
1095 const downloadBold = {
1096 get element() {
1097 const svgData = {
1098 path: 'M572 42H428C405 42 385 61 385 85V385H228C197 385 180 424 203 447L475 719C489 732 511 732 524 719L797 447C819 424 803 385 771 385H614V85C615 61 595 42 572 42ZM958 915V715C958 691 939 672 915 672H653L565 760C529 796 471 796 435 760L347 672H85C61 672 42 691 42 715V915C42 939 61 958 85 958H915C939 958 958 939 958 915ZM736 873C736 853 720 837 700 837 681 837 665 853 665 873 665 892 681 908 700 908 720 908 736 892 736 873ZM815 837C835 837 851 853 851 873 851 892 835 908 815 908 795 908 779 892 779 873 779 853 795 837 815 837Z',
1099 width: 1000,
1100 height: 1000
1101 };
1102 return iconsManager.createSvgElement('download-bold', svgData);
1103 }
1104
1105 };
1106 exports.downloadBold = downloadBold;
1107 const facebook = {
1108 get element() {
1109 const svgData = {
1110 path: 'M858 42H142C88 42 42 87 42 142V863C42 913 88 958 142 958H421V646H292V500H421V387C421 258 496 192 613 192 667 192 725 200 725 200V325H663C600 325 579 362 579 404V500H721L700 646H583V958H863C917 958 963 913 963 858V142C958 87 913 42 858 42L858 42Z',
1111 width: 1000,
1112 height: 1000
1113 };
1114 return iconsManager.createSvgElement('facebook', svgData);
1115 }
1116
1117 };
1118 exports.facebook = facebook;
1119 const frameExpand = {
1120 get element() {
1121 const svgData = {
1122 path: 'M863 583C890 583 914 605 916 632L917 637V863L916 868C914 893 893 914 868 916L863 917H638L632 916C607 914 586 893 584 868L583 863 584 857C586 832 607 811 632 809L638 808H808V637L809 632C811 605 835 583 863 583ZM138 583C165 583 189 605 191 632L192 637V808H363C390 808 414 830 416 857L417 863C417 890 395 914 368 916L363 917H138C110 917 86 895 84 868L83 863V637C83 607 108 583 138 583ZM863 83C890 83 914 105 916 132L917 137V362C917 392 893 417 863 417 835 417 811 395 809 368L808 362V192H638C610 192 586 170 584 143L583 137C583 110 605 86 632 84L638 83H863ZM363 83L368 84C393 86 414 107 416 132L417 137 416 143C414 168 393 189 368 191L363 192H192V362L191 368C189 395 165 417 138 417S86 395 84 368L83 362V137L84 132C86 107 107 86 132 84L138 83H363Z',
1123 width: 1000,
1124 height: 1000
1125 };
1126 return iconsManager.createSvgElement('frame-expand', svgData);
1127 }
1128
1129 };
1130 exports.frameExpand = frameExpand;
1131 const frameMinimize = {
1132 get element() {
1133 const svgData = {
1134 path: 'M363 583C392 583 413 604 417 633L417 637V863C417 892 392 917 363 917 333 917 313 896 308 867L308 863V692H138C108 692 88 671 83 642L83 637C83 608 104 587 133 583L138 583H363ZM638 583C608 583 588 604 583 633L583 637V863C583 892 608 917 638 917 667 917 688 896 692 867L692 863V692H863C892 692 913 671 917 642L917 637C917 608 896 587 867 583L863 583H638ZM363 417C392 417 413 396 417 367L417 362V137C417 108 392 83 363 83 333 83 313 104 308 133L308 137V308H138C108 308 88 329 83 358L83 362C83 392 104 412 133 417L138 417H363ZM638 417C608 417 588 396 583 367L583 362V137C583 108 608 83 638 83 667 83 688 104 692 133L692 137V308H863C892 308 913 329 917 358L917 362C917 392 896 412 867 417L863 417H638Z',
1135 width: 1000,
1136 height: 1000
1137 };
1138 return iconsManager.createSvgElement('frame-minimize', svgData);
1139 }
1140
1141 };
1142 exports.frameMinimize = frameMinimize;
1143 const loading = {
1144 get element() {
1145 const svgData = {
1146 path: 'M500 975V858C696 858 858 696 858 500S696 142 500 142 142 304 142 500H25C25 237 238 25 500 25S975 237 975 500 763 975 500 975Z',
1147 width: 1000,
1148 height: 1000
1149 };
1150 return iconsManager.createSvgElement('loading', svgData);
1151 }
1152
1153 };
1154 exports.loading = loading;
1155 const pinterest = {
1156 get element() {
1157 const svgData = {
1158 path: 'M950 496C950 746 746 950 496 950 450 950 404 942 363 929 379 900 408 850 421 808 425 787 450 700 450 700 467 729 508 754 554 754 692 754 792 629 792 471 792 321 671 208 513 208 317 208 213 342 213 483 213 550 250 633 304 658 313 662 317 662 321 654 321 650 329 617 333 604 333 600 333 596 329 592 313 567 296 525 296 487 288 387 367 292 496 292 608 292 688 367 688 475 688 600 625 683 546 683 500 683 467 646 479 600 492 546 517 487 517 450 517 417 500 387 458 387 413 387 375 433 375 496 375 537 388 562 388 562S342 754 333 787C325 825 329 883 333 917 163 854 42 687 42 496 42 246 246 42 496 42S950 246 950 496Z',
1159 width: 1000,
1160 height: 1000
1161 };
1162 return iconsManager.createSvgElement('pinterest', svgData);
1163 }
1164
1165 };
1166 exports.pinterest = pinterest;
1167 const shareArrow = {
1168 get element() {
1169 const svgData = {
1170 path: 'M946 383L667 133C642 112 604 129 604 162V292C238 296 71 637 42 812 238 587 363 521 604 517V658C604 692 642 708 667 687L946 442C963 425 963 400 946 383Z',
1171 width: 1000,
1172 height: 1000
1173 };
1174 return iconsManager.createSvgElement('share-arrow', svgData);
1175 }
1176
1177 };
1178 exports.shareArrow = shareArrow;
1179 const twitter = {
1180 get element() {
1181 const svgData = {
1182 path: 'M863 312C863 321 863 329 863 337 863 587 675 871 329 871 221 871 125 842 42 787 58 787 71 792 88 792 175 792 254 762 321 712 238 712 171 658 146 583 158 583 171 587 183 587 200 587 217 583 233 579 146 562 83 487 83 396V387C108 400 138 408 167 412 117 379 83 321 83 254 83 221 92 187 108 158 200 271 342 346 496 354 492 342 492 325 492 312 492 208 575 125 679 125 733 125 783 146 817 183 858 175 900 158 938 137 925 179 896 217 854 242 892 237 929 229 963 212 933 250 900 283 863 312Z',
1183 width: 1000,
1184 height: 1000
1185 };
1186 return iconsManager.createSvgElement('twitter', svgData);
1187 }
1188
1189 };
1190 exports.twitter = twitter;
1191 const zoomInBold = {
1192 get element() {
1193 const svgData = {
1194 path: 'M388 383V312C388 283 413 258 442 258 471 258 496 283 496 312V383H567C596 383 621 408 621 437S596 492 567 492H496V562C496 592 471 617 442 617 413 617 388 592 388 562V492H317C288 492 263 467 263 437S288 383 317 383H388ZM654 733C592 779 517 804 438 804 233 804 71 642 71 437S233 71 438 71 804 233 804 437C804 521 779 596 733 654L896 817C917 837 917 871 896 892 875 913 842 913 821 892L654 733ZM438 696C579 696 696 579 696 437S579 179 438 179 179 296 179 437 296 696 438 696Z',
1195 width: 1000,
1196 height: 1000
1197 };
1198 return iconsManager.createSvgElement('zoom-in-bold', svgData);
1199 }
1200
1201 };
1202 exports.zoomInBold = zoomInBold;
1203 const zoomOutBold = {
1204 get element() {
1205 const svgData = {
1206 path: 'M750 683L946 879C963 896 963 929 946 946 929 963 896 967 879 946L683 750C617 804 533 833 438 833 221 833 42 654 42 437S221 42 438 42 833 221 833 437C833 529 800 612 750 683ZM296 392H575C600 392 621 412 621 442 621 467 600 487 575 487H296C271 487 250 467 250 442 250 412 271 392 296 392ZM438 737C604 737 738 604 738 437S604 137 438 137 138 271 138 437 271 737 438 737Z',
1207 width: 1000,
1208 height: 1000
1209 };
1210 return iconsManager.createSvgElement('zoom-out-bold', svgData);
1211 }
1212
1213 };
1214 exports.zoomOutBold = zoomOutBold;
1215
1216 /***/ }),
1217
1218 /***/ "../assets/dev/js/frontend/utils/icons/manager.js":
1219 /*!********************************************************!*\
1220 !*** ../assets/dev/js/frontend/utils/icons/manager.js ***!
1221 \********************************************************/
1222 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1223
1224 "use strict";
1225
1226
1227 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
1228
1229 Object.defineProperty(exports, "__esModule", ({
1230 value: true
1231 }));
1232 exports["default"] = void 0;
1233
1234 var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
1235
1236 class IconsManager {
1237 constructor(elementsPrefix) {
1238 this.prefix = `${elementsPrefix}-`;
1239 this.createSvgSymbolsContainer();
1240 }
1241
1242 createSvgElement(name, {
1243 path,
1244 width,
1245 height
1246 }) {
1247 const iconName = this.prefix + name,
1248 iconSelector = '#' + this.prefix + name; // Create symbol if not exist yet.
1249
1250 if (!IconsManager.iconsUsageList.includes(iconName)) {
1251 if (!IconsManager.symbolsContainer.querySelector(iconSelector)) {
1252 const symbol = this.createSymbolElement({
1253 id: iconName,
1254 path,
1255 width,
1256 height
1257 });
1258 IconsManager.symbolsContainer.appendChild(symbol);
1259 }
1260
1261 IconsManager.iconsUsageList.push(iconName);
1262 }
1263
1264 return this.createSvgIconElement({
1265 iconName,
1266 iconSelector
1267 });
1268 }
1269
1270 createSvgNode(tag, {
1271 props = {},
1272 attrs = {}
1273 }) {
1274 const node = document.createElementNS('http://www.w3.org/2000/svg', tag);
1275 Object.keys(props).map(key => node[key] = props[key]);
1276 Object.keys(attrs).map(key => node.setAttributeNS(null, key, attrs[key]));
1277 return node;
1278 }
1279
1280 createSvgIconElement({
1281 iconName,
1282 iconSelector
1283 }) {
1284 return this.createSvgNode('svg', {
1285 props: {
1286 innerHTML: '<use xlink:href="' + iconSelector + '" />'
1287 },
1288 attrs: {
1289 class: 'e-font-icon-svg e-' + iconName
1290 }
1291 });
1292 }
1293
1294 createSvgSymbolsContainer() {
1295 if (!IconsManager.symbolsContainer) {
1296 const symbolsContainerId = 'e-font-icon-svg-symbols';
1297 IconsManager.symbolsContainer = document.getElementById(symbolsContainerId);
1298
1299 if (!IconsManager.symbolsContainer) {
1300 IconsManager.symbolsContainer = this.createSvgNode('svg', {
1301 attrs: {
1302 style: 'display: none;',
1303 class: symbolsContainerId
1304 }
1305 });
1306 document.body.appendChild(IconsManager.symbolsContainer);
1307 }
1308 }
1309 }
1310
1311 createSymbolElement({
1312 id,
1313 path,
1314 width,
1315 height
1316 }) {
1317 return this.createSvgNode('symbol', {
1318 props: {
1319 innerHTML: '<path d="' + path + '"></path>',
1320 id
1321 },
1322 attrs: {
1323 viewBox: '0 0 ' + width + ' ' + height
1324 }
1325 });
1326 }
1327
1328 }
1329
1330 exports["default"] = IconsManager;
1331 (0, _defineProperty2.default)(IconsManager, "symbolsContainer", void 0);
1332 (0, _defineProperty2.default)(IconsManager, "iconsUsageList", []);
1333
1334 /***/ }),
1335
1336 /***/ "../assets/dev/js/frontend/utils/lightbox/lightbox.js":
1337 /*!************************************************************!*\
1338 !*** ../assets/dev/js/frontend/utils/lightbox/lightbox.js ***!
1339 \************************************************************/
1340 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1341
1342 "use strict";
1343
1344
1345 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
1346
1347 var _screenfull = _interopRequireDefault(__webpack_require__(/*! ./screenfull */ "../assets/dev/js/frontend/utils/lightbox/screenfull.js"));
1348
1349 var _eIcons = __webpack_require__(/*! @elementor/e-icons */ "../assets/dev/js/frontend/utils/icons/e-icons.js");
1350
1351 module.exports = elementorModules.ViewModule.extend({
1352 oldAspectRatio: null,
1353 oldAnimation: null,
1354 swiper: null,
1355 player: null,
1356 isFontIconSvgExperiment: elementorFrontend.config.experimentalFeatures.e_font_icon_svg,
1357 getDefaultSettings: function () {
1358 return {
1359 classes: {
1360 aspectRatio: 'elementor-aspect-ratio-%s',
1361 item: 'elementor-lightbox-item',
1362 image: 'elementor-lightbox-image',
1363 videoContainer: 'elementor-video-container',
1364 videoWrapper: 'elementor-fit-aspect-ratio',
1365 playButton: 'elementor-custom-embed-play',
1366 playButtonIcon: 'fa',
1367 playing: 'elementor-playing',
1368 hidden: 'elementor-hidden',
1369 invisible: 'elementor-invisible',
1370 preventClose: 'elementor-lightbox-prevent-close',
1371 slideshow: {
1372 container: 'swiper-container',
1373 slidesWrapper: 'swiper-wrapper',
1374 prevButton: 'elementor-swiper-button elementor-swiper-button-prev',
1375 nextButton: 'elementor-swiper-button elementor-swiper-button-next',
1376 prevButtonIcon: 'eicon-chevron-left',
1377 nextButtonIcon: 'eicon-chevron-right',
1378 slide: 'swiper-slide',
1379 header: 'elementor-slideshow__header',
1380 footer: 'elementor-slideshow__footer',
1381 title: 'elementor-slideshow__title',
1382 description: 'elementor-slideshow__description',
1383 counter: 'elementor-slideshow__counter',
1384 iconExpand: 'eicon-frame-expand',
1385 iconShrink: 'eicon-frame-minimize',
1386 iconZoomIn: 'eicon-zoom-in-bold',
1387 iconZoomOut: 'eicon-zoom-out-bold',
1388 iconShare: 'eicon-share-arrow',
1389 shareMenu: 'elementor-slideshow__share-menu',
1390 shareLinks: 'elementor-slideshow__share-links',
1391 hideUiVisibility: 'elementor-slideshow--ui-hidden',
1392 shareMode: 'elementor-slideshow--share-mode',
1393 fullscreenMode: 'elementor-slideshow--fullscreen-mode',
1394 zoomMode: 'elementor-slideshow--zoom-mode'
1395 }
1396 },
1397 selectors: {
1398 image: '.elementor-lightbox-image',
1399 links: 'a, [data-elementor-lightbox]',
1400 slideshow: {
1401 activeSlide: '.swiper-slide-active',
1402 prevSlide: '.swiper-slide-prev',
1403 nextSlide: '.swiper-slide-next'
1404 }
1405 },
1406 modalOptions: {
1407 id: 'elementor-lightbox',
1408 entranceAnimation: 'zoomIn',
1409 videoAspectRatio: 169,
1410 position: {
1411 enable: false
1412 }
1413 }
1414 };
1415 },
1416 getModal: function () {
1417 if (!module.exports.modal) {
1418 this.initModal();
1419 }
1420
1421 return module.exports.modal;
1422 },
1423 initModal: function () {
1424 const closeIcon = {}; // If the experiment is active the closeIcon should be an entire SVG element otherwise it should pass the eicon class name.
1425
1426 if (this.isFontIconSvgExperiment) {
1427 closeIcon.iconElement = _eIcons.close.element;
1428 } else {
1429 closeIcon.iconClass = 'eicon-close';
1430 }
1431
1432 const modal = module.exports.modal = elementorFrontend.getDialogsManager().createWidget('lightbox', {
1433 className: 'elementor-lightbox',
1434 closeButton: true,
1435 closeButtonOptions: { ...closeIcon,
1436 attributes: {
1437 tabindex: 0,
1438 role: 'button',
1439 'aria-label': elementorFrontend.config.i18n.close + ' (Esc)'
1440 }
1441 },
1442 selectors: {
1443 preventClose: '.' + this.getSettings('classes.preventClose')
1444 },
1445 hide: {
1446 onClick: true
1447 }
1448 });
1449 modal.on('hide', function () {
1450 modal.setMessage('');
1451 });
1452 },
1453 showModal: function (options) {
1454 if (options.url && !options.url.startsWith('http')) {
1455 return;
1456 }
1457
1458 this.elements.$closeButton = this.getModal().getElements('closeButton');
1459 this.$buttons = this.elements.$closeButton;
1460 this.focusedButton = null;
1461 const self = this,
1462 defaultOptions = self.getDefaultSettings().modalOptions;
1463 self.id = options.id;
1464 self.setSettings('modalOptions', jQuery.extend(defaultOptions, options.modalOptions));
1465 const modal = self.getModal();
1466 modal.setID(self.getSettings('modalOptions.id'));
1467
1468 modal.onShow = function () {
1469 DialogsManager.getWidgetType('lightbox').prototype.onShow.apply(modal, arguments);
1470 self.setEntranceAnimation();
1471 };
1472
1473 modal.onHide = function () {
1474 DialogsManager.getWidgetType('lightbox').prototype.onHide.apply(modal, arguments);
1475 modal.getElements('message').removeClass('animated');
1476
1477 if (_screenfull.default.isFullscreen) {
1478 self.deactivateFullscreen();
1479 }
1480
1481 self.unbindHotKeys();
1482 };
1483
1484 switch (options.type) {
1485 case 'video':
1486 self.setVideoContent(options);
1487 break;
1488
1489 case 'image':
1490 const slides = [{
1491 image: options.url,
1492 index: 0,
1493 title: options.title,
1494 description: options.description
1495 }];
1496 options.slideshow = {
1497 slides,
1498 swiper: {
1499 loop: false,
1500 pagination: false
1501 }
1502 };
1503
1504 case 'slideshow':
1505 self.setSlideshowContent(options.slideshow);
1506 break;
1507
1508 default:
1509 self.setHTMLContent(options.html);
1510 }
1511
1512 modal.show();
1513 },
1514 createLightbox: function (element) {
1515 let lightboxData = {};
1516
1517 if (element.dataset.elementorLightbox) {
1518 lightboxData = JSON.parse(element.dataset.elementorLightbox);
1519 }
1520
1521 if (lightboxData.type && 'slideshow' !== lightboxData.type) {
1522 this.showModal(lightboxData);
1523 return;
1524 }
1525
1526 if (!element.dataset.elementorLightboxSlideshow) {
1527 const slideshowID = 'single-img';
1528 this.showModal({
1529 type: 'image',
1530 id: slideshowID,
1531 url: element.href,
1532 title: element.dataset.elementorLightboxTitle,
1533 description: element.dataset.elementorLightboxDescription,
1534 modalOptions: {
1535 id: 'elementor-lightbox-slideshow-' + slideshowID
1536 }
1537 });
1538 return;
1539 }
1540
1541 const initialSlideURL = element.dataset.elementorLightboxVideo || element.href;
1542 this.openSlideshow(element.dataset.elementorLightboxSlideshow, initialSlideURL);
1543 },
1544 setHTMLContent: function (html) {
1545 if (window.elementorCommon) {
1546 elementorCommon.helpers.hardDeprecated('elementorFrontend.utils.lightbox.setHTMLContent', '3.1.4');
1547 }
1548
1549 this.getModal().setMessage(html);
1550 },
1551 setVideoContent: function (options) {
1552 const $ = jQuery,
1553 classes = this.getSettings('classes'),
1554 $videoContainer = $('<div>', {
1555 class: `${classes.videoContainer} ${classes.preventClose}`
1556 }),
1557 $videoWrapper = $('<div>', {
1558 class: classes.videoWrapper
1559 }),
1560 modal = this.getModal();
1561 let $videoElement;
1562
1563 if ('hosted' === options.videoType) {
1564 const videoParams = $.extend({
1565 src: options.url,
1566 autoplay: ''
1567 }, options.videoParams);
1568 $videoElement = $('<video>', videoParams);
1569 } else {
1570 let apiProvider = elementorFrontend.utils.baseVideoLoader;
1571
1572 if (-1 !== options.url.indexOf('vimeo.com')) {
1573 apiProvider = elementorFrontend.utils.vimeo;
1574 } else if (options.url.match(/^(?:https?:\/\/)?(?:www\.)?(?:m\.)?(?:youtu\.be\/|youtube\.com)/)) {
1575 apiProvider = elementorFrontend.utils.youtube;
1576 }
1577
1578 $videoElement = $('<iframe>', {
1579 src: apiProvider.getAutoplayURL(options.url),
1580 allowfullscreen: 1
1581 });
1582 }
1583
1584 $videoContainer.append($videoWrapper);
1585 $videoWrapper.append($videoElement);
1586 modal.setMessage($videoContainer);
1587 this.setVideoAspectRatio();
1588 const onHideMethod = modal.onHide;
1589
1590 modal.onHide = function () {
1591 onHideMethod();
1592 this.$buttons = jQuery();
1593 this.focusedButton = null;
1594 modal.getElements('message').removeClass('elementor-fit-aspect-ratio');
1595 };
1596 },
1597 getShareLinks: function () {
1598 const {
1599 i18n
1600 } = elementorFrontend.config,
1601 socialNetworks = {
1602 facebook: {
1603 label: i18n.shareOnFacebook,
1604 iconElement: _eIcons.facebook
1605 },
1606 twitter: {
1607 label: i18n.shareOnTwitter,
1608 iconElement: _eIcons.twitter
1609 },
1610 pinterest: {
1611 label: i18n.pinIt,
1612 iconElement: _eIcons.pinterest
1613 }
1614 },
1615 $ = jQuery,
1616 classes = this.getSettings('classes'),
1617 selectors = this.getSettings('selectors'),
1618 $linkList = $('<div>', {
1619 class: classes.slideshow.shareLinks
1620 }),
1621 $activeSlide = this.getSlide('active'),
1622 $image = $activeSlide.find(selectors.image),
1623 videoUrl = $activeSlide.data('elementor-slideshow-video');
1624 let itemUrl;
1625
1626 if (videoUrl) {
1627 itemUrl = videoUrl;
1628 } else {
1629 itemUrl = $image.attr('src');
1630 }
1631
1632 $.each(socialNetworks, (key, data) => {
1633 const networkLabel = data.label,
1634 $link = $('<a>', {
1635 href: this.createShareLink(key, itemUrl),
1636 target: '_blank'
1637 }).text(networkLabel),
1638 $socialNetworkIconElement = this.isFontIconSvgExperiment ? $(data.iconElement.element) : $('<i>', {
1639 class: 'eicon-' + key
1640 });
1641 $link.prepend($socialNetworkIconElement);
1642 $linkList.append($link);
1643 });
1644
1645 if (!videoUrl) {
1646 const $downloadIcon = this.isFontIconSvgExperiment ? $(_eIcons.downloadBold.element) : $('<i>', {
1647 class: 'eicon-download-bold'
1648 });
1649 $downloadIcon.attr('aria-label', i18n.download);
1650 $linkList.append($('<a>', {
1651 href: itemUrl,
1652 download: ''
1653 }).text(i18n.downloadImage).prepend($downloadIcon));
1654 }
1655
1656 return $linkList;
1657 },
1658 createShareLink: function (networkName, itemUrl) {
1659 const options = {};
1660
1661 if ('pinterest' === networkName) {
1662 options.image = encodeURIComponent(itemUrl);
1663 } else {
1664 const hash = elementorFrontend.utils.urlActions.createActionHash('lightbox', {
1665 id: this.id,
1666 url: itemUrl
1667 });
1668 options.url = encodeURIComponent(location.href.replace(/#.*/, '')) + hash;
1669 }
1670
1671 return ShareLink.getNetworkLink(networkName, options);
1672 },
1673 getSlideshowHeader: function () {
1674 const {
1675 i18n
1676 } = elementorFrontend.config,
1677 $ = jQuery,
1678 showCounter = 'yes' === elementorFrontend.getKitSettings('lightbox_enable_counter'),
1679 showFullscreen = 'yes' === elementorFrontend.getKitSettings('lightbox_enable_fullscreen'),
1680 showZoom = 'yes' === elementorFrontend.getKitSettings('lightbox_enable_zoom'),
1681 showShare = 'yes' === elementorFrontend.getKitSettings('lightbox_enable_share'),
1682 classes = this.getSettings('classes'),
1683 slideshowClasses = classes.slideshow,
1684 elements = this.elements;
1685
1686 if (!(showCounter || showFullscreen || showZoom || showShare)) {
1687 return;
1688 }
1689
1690 elements.$header = $('<header>', {
1691 class: slideshowClasses.header + ' ' + classes.preventClose
1692 });
1693
1694 if (showShare) {
1695 const iconElement = this.isFontIconSvgExperiment ? _eIcons.shareArrow.element : '<i>';
1696 elements.$iconShare = $(iconElement, {
1697 class: slideshowClasses.iconShare,
1698 role: 'button',
1699 'aria-label': i18n.share,
1700 'aria-expanded': false
1701 }).append($('<span>'));
1702 const $shareLinks = $('<div>');
1703 $shareLinks.on('click', e => {
1704 e.stopPropagation();
1705 });
1706 elements.$shareMenu = $('<div>', {
1707 class: slideshowClasses.shareMenu
1708 }).append($shareLinks);
1709 elements.$iconShare.add(elements.$shareMenu).on('click', this.toggleShareMenu);
1710 elements.$header.append(elements.$iconShare, elements.$shareMenu);
1711 this.$buttons = this.$buttons.add(elements.$iconShare);
1712 }
1713
1714 if (showZoom) {
1715 const iconElement = this.isFontIconSvgExperiment ? _eIcons.zoomInBold.element : '<i>',
1716 showZoomElements = [],
1717 showZoomAttrs = {
1718 role: 'switch',
1719 'aria-checked': false,
1720 'aria-label': i18n.zoom
1721 },
1722 zoomAttrs = { ...showZoomAttrs
1723 };
1724
1725 if (!this.isFontIconSvgExperiment) {
1726 zoomAttrs.class = slideshowClasses.iconZoomIn;
1727 }
1728
1729 elements.$iconZoom = $(iconElement).attr(zoomAttrs).on('click', this.toggleZoomMode);
1730 showZoomElements.push(elements.$iconZoom);
1731
1732 if (this.isFontIconSvgExperiment) {
1733 elements.$iconZoomOut = $(_eIcons.zoomOutBold.element).attr(showZoomAttrs).addClass(classes.hidden).on('click', this.toggleZoomMode);
1734 showZoomElements.push(elements.$iconZoomOut);
1735 }
1736
1737 elements.$header.append(showZoomElements);
1738 this.$buttons = this.$buttons.add(showZoomElements);
1739 }
1740
1741 if (showFullscreen) {
1742 const iconElement = this.isFontIconSvgExperiment ? _eIcons.frameExpand.element : '<i>',
1743 fullScreenElements = [],
1744 fullScreenAttrs = {
1745 role: 'switch',
1746 'aria-checked': false,
1747 'aria-label': i18n.fullscreen
1748 },
1749 expandAttrs = { ...fullScreenAttrs
1750 }; // Only if the experiment is not active, we use the class-name in order to render the icon.
1751
1752 if (!this.isFontIconSvgExperiment) {
1753 expandAttrs.class = slideshowClasses.iconExpand;
1754 }
1755
1756 elements.$iconExpand = $(iconElement).append($('<span>'), $('<span>')).attr(expandAttrs).on('click', this.toggleFullscreen);
1757 fullScreenElements.push(elements.$iconExpand);
1758
1759 if (this.isFontIconSvgExperiment) {
1760 elements.$iconMinimize = $(_eIcons.frameMinimize.element).attr(fullScreenAttrs).addClass(classes.hidden).on('click', this.toggleFullscreen);
1761 fullScreenElements.push(elements.$iconMinimize);
1762 }
1763
1764 elements.$header.append(fullScreenElements);
1765 this.$buttons = this.$buttons.add(fullScreenElements);
1766 }
1767
1768 if (showCounter) {
1769 elements.$counter = $('<span>', {
1770 class: slideshowClasses.counter
1771 });
1772 elements.$header.append(elements.$counter);
1773 }
1774
1775 return elements.$header;
1776 },
1777 toggleFullscreen: function () {
1778 if (_screenfull.default.isFullscreen) {
1779 this.deactivateFullscreen();
1780 } else if (_screenfull.default.isEnabled) {
1781 this.activateFullscreen();
1782 }
1783 },
1784 toggleZoomMode: function () {
1785 if (1 !== this.swiper.zoom.scale) {
1786 this.deactivateZoom();
1787 } else {
1788 this.activateZoom();
1789 }
1790 },
1791 toggleShareMenu: function () {
1792 if (this.shareMode) {
1793 this.deactivateShareMode();
1794 } else {
1795 this.elements.$shareMenu.html(this.getShareLinks());
1796 this.activateShareMode();
1797 }
1798 },
1799 activateShareMode: function () {
1800 const classes = this.getSettings('classes');
1801 this.elements.$container.addClass(classes.slideshow.shareMode);
1802 this.elements.$iconShare.attr('aria-expanded', true); // Prevent swiper interactions while in share mode
1803
1804 this.swiper.detachEvents(); // Temporarily replace tabbable buttons with share-menu items
1805
1806 this.$originalButtons = this.$buttons;
1807 this.$buttons = this.elements.$iconShare.add(this.elements.$shareMenu.find('a'));
1808 this.shareMode = true;
1809 },
1810 deactivateShareMode: function () {
1811 const classes = this.getSettings('classes');
1812 this.elements.$container.removeClass(classes.slideshow.shareMode);
1813 this.elements.$iconShare.attr('aria-expanded', false);
1814 this.swiper.attachEvents();
1815 this.$buttons = this.$originalButtons;
1816 this.shareMode = false;
1817 },
1818 activateFullscreen: function () {
1819 const classes = this.getSettings('classes');
1820
1821 _screenfull.default.request(this.elements.$container.parents('.dialog-widget')[0]);
1822
1823 if (this.isFontIconSvgExperiment) {
1824 this.elements.$iconExpand.addClass(classes.hidden).attr('aria-checked', 'false');
1825 this.elements.$iconMinimize.removeClass(classes.hidden).attr('aria-checked', 'true');
1826 } else {
1827 this.elements.$iconExpand.removeClass(classes.slideshow.iconExpand).addClass(classes.slideshow.iconShrink).attr('aria-checked', 'true');
1828 }
1829
1830 this.elements.$container.addClass(classes.slideshow.fullscreenMode);
1831 },
1832 deactivateFullscreen: function () {
1833 const classes = this.getSettings('classes');
1834
1835 _screenfull.default.exit();
1836
1837 if (this.isFontIconSvgExperiment) {
1838 this.elements.$iconExpand.removeClass(classes.hidden).attr('aria-checked', 'true');
1839 this.elements.$iconMinimize.addClass(classes.hidden).attr('aria-checked', 'false');
1840 } else {
1841 this.elements.$iconExpand.removeClass(classes.slideshow.iconShrink).addClass(classes.slideshow.iconExpand).attr('aria-checked', 'false');
1842 }
1843
1844 this.elements.$container.removeClass(classes.slideshow.fullscreenMode);
1845 },
1846 activateZoom: function () {
1847 const swiper = this.swiper,
1848 elements = this.elements,
1849 classes = this.getSettings('classes');
1850 swiper.zoom.in();
1851 swiper.allowSlideNext = false;
1852 swiper.allowSlidePrev = false;
1853 swiper.allowTouchMove = false;
1854 elements.$container.addClass(classes.slideshow.zoomMode);
1855
1856 if (this.isFontIconSvgExperiment) {
1857 elements.$iconZoom.addClass(classes.hidden).attr('aria-checked', 'false');
1858 elements.$iconZoomOut.removeClass(classes.hidden).attr('aria-checked', 'true');
1859 } else {
1860 elements.$iconZoom.removeClass(classes.slideshow.iconZoomIn).addClass(classes.slideshow.iconZoomOut);
1861 }
1862 },
1863 deactivateZoom: function () {
1864 const swiper = this.swiper,
1865 elements = this.elements,
1866 classes = this.getSettings('classes');
1867 swiper.zoom.out();
1868 swiper.allowSlideNext = true;
1869 swiper.allowSlidePrev = true;
1870 swiper.allowTouchMove = true;
1871 elements.$container.removeClass(classes.slideshow.zoomMode);
1872
1873 if (this.isFontIconSvgExperiment) {
1874 elements.$iconZoom.removeClass(classes.hidden).attr('aria-checked', 'true');
1875 elements.$iconZoomOut.addClass(classes.hidden).attr('aria-checked', 'false');
1876 } else {
1877 elements.$iconZoom.removeClass(classes.slideshow.iconZoomOut).addClass(classes.slideshow.iconZoomIn);
1878 }
1879 },
1880 getSlideshowFooter: function () {
1881 const $ = jQuery,
1882 classes = this.getSettings('classes'),
1883 $footer = $('<footer>', {
1884 class: classes.slideshow.footer + ' ' + classes.preventClose
1885 }),
1886 $title = $('<div>', {
1887 class: classes.slideshow.title
1888 }),
1889 $description = $('<div>', {
1890 class: classes.slideshow.description
1891 });
1892 $footer.append($title, $description);
1893 return $footer;
1894 },
1895 setSlideshowContent: function (options) {
1896 const {
1897 i18n
1898 } = elementorFrontend.config,
1899 $ = jQuery,
1900 isSingleSlide = 1 === options.slides.length,
1901 hasTitle = '' !== elementorFrontend.getKitSettings('lightbox_title_src'),
1902 hasDescription = '' !== elementorFrontend.getKitSettings('lightbox_description_src'),
1903 showFooter = hasTitle || hasDescription,
1904 classes = this.getSettings('classes'),
1905 slideshowClasses = classes.slideshow,
1906 $container = $('<div>', {
1907 class: slideshowClasses.container
1908 }),
1909 $slidesWrapper = $('<div>', {
1910 class: slideshowClasses.slidesWrapper
1911 });
1912 let $prevButton, $nextButton;
1913 options.slides.forEach(slide => {
1914 let slideClass = slideshowClasses.slide + ' ' + classes.item;
1915
1916 if (slide.video) {
1917 slideClass += ' ' + classes.video;
1918 }
1919
1920 const $slide = $('<div>', {
1921 class: slideClass
1922 });
1923
1924 if (slide.video) {
1925 $slide.attr('data-elementor-slideshow-video', slide.video);
1926 const playVideoLoadingElement = this.isFontIconSvgExperiment ? _eIcons.loading.element : '<i>',
1927 $playIcon = $('<div>', {
1928 class: classes.playButton
1929 }).html($(playVideoLoadingElement).attr('aria-label', i18n.playVideo).addClass(classes.playButtonIcon));
1930 $slide.append($playIcon);
1931 } else {
1932 const $zoomContainer = $('<div>', {
1933 class: 'swiper-zoom-container'
1934 }),
1935 $slidePlaceholder = $('<div class="swiper-lazy-preloader"></div>'),
1936 imageAttributes = {
1937 'data-src': slide.image,
1938 class: classes.image + ' ' + classes.preventClose + ' swiper-lazy'
1939 };
1940
1941 if (slide.title) {
1942 imageAttributes['data-title'] = slide.title;
1943 imageAttributes.alt = slide.title;
1944 }
1945
1946 if (slide.description) {
1947 imageAttributes['data-description'] = slide.description;
1948 imageAttributes.alt += ' - ' + slide.description;
1949 }
1950
1951 const $slideImage = $('<img>', imageAttributes);
1952 $zoomContainer.append([$slideImage, $slidePlaceholder]);
1953 $slide.append($zoomContainer);
1954 }
1955
1956 $slidesWrapper.append($slide);
1957 });
1958 this.elements.$container = $container;
1959 this.elements.$header = this.getSlideshowHeader();
1960 $container.prepend(this.elements.$header).append($slidesWrapper);
1961
1962 if (!isSingleSlide) {
1963 const $prevButtonIcon = this.isFontIconSvgExperiment ? $(_eIcons.chevronLeft.element) : $('<i>', {
1964 class: slideshowClasses.prevButtonIcon
1965 }),
1966 $nextButtonIcon = this.isFontIconSvgExperiment ? $(_eIcons.chevronRight.element) : $('<i>', {
1967 class: slideshowClasses.nextButtonIcon
1968 });
1969 $prevButton = $('<div>', {
1970 class: slideshowClasses.prevButton + ' ' + classes.preventClose,
1971 'aria-label': i18n.previous
1972 }).html($prevButtonIcon);
1973 $nextButton = $('<div>', {
1974 class: slideshowClasses.nextButton + ' ' + classes.preventClose,
1975 'aria-label': i18n.next
1976 }).html($nextButtonIcon);
1977 $container.append($nextButton, $prevButton);
1978 this.$buttons = this.$buttons.add($nextButton).add($prevButton);
1979 }
1980
1981 if (showFooter) {
1982 this.elements.$footer = this.getSlideshowFooter();
1983 $container.append(this.elements.$footer);
1984 }
1985
1986 this.setSettings('hideUiTimeout', '');
1987 $container.on('click mousemove keypress', this.showLightboxUi);
1988 const modal = this.getModal();
1989 modal.setMessage($container);
1990 const onShowMethod = modal.onShow;
1991
1992 modal.onShow = async () => {
1993 onShowMethod();
1994 const swiperOptions = {
1995 pagination: {
1996 el: '.' + slideshowClasses.counter,
1997 type: 'fraction'
1998 },
1999 on: {
2000 slideChangeTransitionEnd: this.onSlideChange
2001 },
2002 lazy: {
2003 loadPrevNext: true
2004 },
2005 zoom: true,
2006 spaceBetween: 100,
2007 grabCursor: true,
2008 runCallbacksOnInit: false,
2009 loop: true,
2010 keyboard: true,
2011 handleElementorBreakpoints: true
2012 };
2013
2014 if (!isSingleSlide) {
2015 swiperOptions.navigation = {
2016 prevEl: $prevButton,
2017 nextEl: $nextButton
2018 };
2019 }
2020
2021 if (options.swiper) {
2022 $.extend(swiperOptions, options.swiper);
2023 }
2024
2025 const Swiper = elementorFrontend.utils.swiper;
2026 this.swiper = await new Swiper($container, swiperOptions); // Expose the swiper instance in the frontend
2027
2028 $container.data('swiper', this.swiper);
2029 this.setVideoAspectRatio();
2030 this.playSlideVideo();
2031
2032 if (showFooter) {
2033 this.updateFooterText();
2034 }
2035
2036 this.bindHotKeys();
2037 this.makeButtonsAccessible();
2038 };
2039 },
2040 makeButtonsAccessible: function () {
2041 this.$buttons.attr('tabindex', 0).on('keypress', event => {
2042 const ENTER_KEY = 13,
2043 SPACE_KEY = 32;
2044
2045 if (ENTER_KEY === event.which || SPACE_KEY === event.which) {
2046 jQuery(event.currentTarget).trigger('click');
2047 }
2048 });
2049 },
2050 showLightboxUi: function () {
2051 const slideshowClasses = this.getSettings('classes').slideshow;
2052 this.elements.$container.removeClass(slideshowClasses.hideUiVisibility);
2053 clearTimeout(this.getSettings('hideUiTimeout'));
2054 this.setSettings('hideUiTimeout', setTimeout(() => {
2055 if (!this.shareMode) {
2056 this.elements.$container.addClass(slideshowClasses.hideUiVisibility);
2057 }
2058 }, 3500));
2059 },
2060 bindHotKeys: function () {
2061 this.getModal().getElements('window').on('keydown', this.activeKeyDown);
2062 },
2063 unbindHotKeys: function () {
2064 this.getModal().getElements('window').off('keydown', this.activeKeyDown);
2065 },
2066 activeKeyDown: function (event) {
2067 this.showLightboxUi();
2068 const TAB_KEY = 9;
2069
2070 if (event.which === TAB_KEY) {
2071 const $buttons = this.$buttons;
2072 let focusedButton,
2073 isFirst = false,
2074 isLast = false;
2075 $buttons.each(index => {
2076 const item = $buttons[index];
2077
2078 if (jQuery(item).is(':focus')) {
2079 focusedButton = item;
2080 isFirst = 0 === index;
2081 isLast = $buttons.length - 1 === index;
2082 return false;
2083 }
2084 });
2085
2086 if (event.shiftKey) {
2087 if (isFirst) {
2088 event.preventDefault();
2089 $buttons.last().trigger('focus');
2090 }
2091 } else if (isLast || !focusedButton) {
2092 event.preventDefault();
2093 $buttons.first().trigger('focus');
2094 }
2095 }
2096 },
2097 setVideoAspectRatio: function (aspectRatio) {
2098 aspectRatio = aspectRatio || this.getSettings('modalOptions.videoAspectRatio');
2099 const $widgetContent = this.getModal().getElements('widgetContent'),
2100 oldAspectRatio = this.oldAspectRatio,
2101 aspectRatioClass = this.getSettings('classes.aspectRatio');
2102 this.oldAspectRatio = aspectRatio;
2103
2104 if (oldAspectRatio) {
2105 $widgetContent.removeClass(aspectRatioClass.replace('%s', oldAspectRatio));
2106 }
2107
2108 if (aspectRatio) {
2109 $widgetContent.addClass(aspectRatioClass.replace('%s', aspectRatio));
2110 }
2111 },
2112 getSlide: function (slideState) {
2113 return jQuery(this.swiper.slides).filter(this.getSettings('selectors.slideshow.' + slideState + 'Slide'));
2114 },
2115 updateFooterText: function () {
2116 if (!this.elements.$footer) {
2117 return;
2118 }
2119
2120 const classes = this.getSettings('classes'),
2121 $activeSlide = this.getSlide('active'),
2122 $image = $activeSlide.find('.elementor-lightbox-image'),
2123 titleText = $image.data('title'),
2124 descriptionText = $image.data('description'),
2125 $title = this.elements.$footer.find('.' + classes.slideshow.title),
2126 $description = this.elements.$footer.find('.' + classes.slideshow.description);
2127 $title.text(titleText || '');
2128 $description.text(descriptionText || '');
2129 },
2130 playSlideVideo: function () {
2131 const $activeSlide = this.getSlide('active'),
2132 videoURL = $activeSlide.data('elementor-slideshow-video');
2133
2134 if (!videoURL) {
2135 return;
2136 }
2137
2138 const classes = this.getSettings('classes'),
2139 $videoContainer = jQuery('<div>', {
2140 class: classes.videoContainer + ' ' + classes.invisible
2141 }),
2142 $videoWrapper = jQuery('<div>', {
2143 class: classes.videoWrapper
2144 }),
2145 $playIcon = $activeSlide.children('.' + classes.playButton);
2146 let videoType, apiProvider;
2147 $videoContainer.append($videoWrapper);
2148 $activeSlide.append($videoContainer);
2149
2150 if (-1 !== videoURL.indexOf('vimeo.com')) {
2151 videoType = 'vimeo';
2152 apiProvider = elementorFrontend.utils.vimeo;
2153 } else if (videoURL.match(/^(?:https?:\/\/)?(?:www\.)?(?:m\.)?(?:youtu\.be\/|youtube\.com)/)) {
2154 videoType = 'youtube';
2155 apiProvider = elementorFrontend.utils.youtube;
2156 }
2157
2158 const videoID = apiProvider.getVideoIDFromURL(videoURL);
2159 apiProvider.onApiReady(apiObject => {
2160 if ('youtube' === videoType) {
2161 this.prepareYTVideo(apiObject, videoID, $videoContainer, $videoWrapper, $playIcon);
2162 } else if ('vimeo' === videoType) {
2163 this.prepareVimeoVideo(apiObject, videoURL, $videoContainer, $videoWrapper, $playIcon);
2164 }
2165 });
2166 $playIcon.addClass(classes.playing).removeClass(classes.hidden);
2167 },
2168 prepareYTVideo: function (YT, videoID, $videoContainer, $videoWrapper, $playIcon) {
2169 const classes = this.getSettings('classes'),
2170 $videoPlaceholderElement = jQuery('<div>');
2171 let startStateCode = YT.PlayerState.PLAYING;
2172 $videoWrapper.append($videoPlaceholderElement); // Since version 67, Chrome doesn't fire the `PLAYING` state at start time
2173
2174 if (window.chrome) {
2175 startStateCode = YT.PlayerState.UNSTARTED;
2176 }
2177
2178 $videoContainer.addClass('elementor-loading' + ' ' + classes.invisible);
2179 this.player = new YT.Player($videoPlaceholderElement[0], {
2180 videoId: videoID,
2181 events: {
2182 onReady: () => {
2183 $playIcon.addClass(classes.hidden);
2184 $videoContainer.removeClass(classes.invisible);
2185 this.player.playVideo();
2186 },
2187 onStateChange: event => {
2188 if (event.data === startStateCode) {
2189 $videoContainer.removeClass('elementor-loading' + ' ' + classes.invisible);
2190 }
2191 }
2192 },
2193 playerVars: {
2194 controls: 0,
2195 rel: 0
2196 }
2197 });
2198 },
2199 prepareVimeoVideo: function (Vimeo, videoURL, $videoContainer, $videoWrapper, $playIcon) {
2200 const classes = this.getSettings('classes'),
2201 vimeoOptions = {
2202 url: videoURL,
2203 autoplay: true,
2204 transparent: false,
2205 playsinline: false
2206 };
2207 this.player = new Vimeo.Player($videoWrapper, vimeoOptions);
2208 this.player.ready().then(() => {
2209 $playIcon.addClass(classes.hidden);
2210 $videoContainer.removeClass(classes.invisible);
2211 });
2212 },
2213 setEntranceAnimation: function (animation) {
2214 animation = animation || elementorFrontend.getCurrentDeviceSetting(this.getSettings('modalOptions'), 'entranceAnimation');
2215 const $widgetMessage = this.getModal().getElements('message');
2216
2217 if (this.oldAnimation) {
2218 $widgetMessage.removeClass(this.oldAnimation);
2219 }
2220
2221 this.oldAnimation = animation;
2222
2223 if (animation) {
2224 $widgetMessage.addClass('animated ' + animation);
2225 }
2226 },
2227 openSlideshow: function (slideshowID, initialSlideURL) {
2228 const $allSlideshowLinks = jQuery(this.getSettings('selectors.links')).filter((index, element) => {
2229 const $element = jQuery(element);
2230 return slideshowID === element.dataset.elementorLightboxSlideshow && !$element.parent('.swiper-slide-duplicate').length && !$element.parents('.slick-cloned').length;
2231 });
2232 const slides = [];
2233 let initialSlideIndex = 0;
2234 $allSlideshowLinks.each(function () {
2235 const slideVideo = this.dataset.elementorLightboxVideo;
2236 let slideIndex = this.dataset.elementorLightboxIndex;
2237
2238 if (undefined === slideIndex) {
2239 slideIndex = $allSlideshowLinks.index(this);
2240 }
2241
2242 if (initialSlideURL === this.href || slideVideo && initialSlideURL === slideVideo) {
2243 initialSlideIndex = slideIndex;
2244 }
2245
2246 const slideData = {
2247 image: this.href,
2248 index: slideIndex,
2249 title: this.dataset.elementorLightboxTitle,
2250 description: this.dataset.elementorLightboxDescription
2251 };
2252
2253 if (slideVideo) {
2254 slideData.video = slideVideo;
2255 }
2256
2257 slides.push(slideData);
2258 });
2259 slides.sort((a, b) => a.index - b.index);
2260 this.showModal({
2261 type: 'slideshow',
2262 id: slideshowID,
2263 modalOptions: {
2264 id: 'elementor-lightbox-slideshow-' + slideshowID
2265 },
2266 slideshow: {
2267 slides: slides,
2268 swiper: {
2269 initialSlide: +initialSlideIndex
2270 }
2271 }
2272 });
2273 },
2274 onSlideChange: function () {
2275 this.getSlide('prev').add(this.getSlide('next')).add(this.getSlide('active')).find('.' + this.getSettings('classes.videoWrapper')).remove();
2276 this.playSlideVideo();
2277 this.updateFooterText();
2278 }
2279 });
2280
2281 /***/ }),
2282
2283 /***/ "../assets/dev/js/frontend/utils/lightbox/screenfull.js":
2284 /*!**************************************************************!*\
2285 !*** ../assets/dev/js/frontend/utils/lightbox/screenfull.js ***!
2286 \**************************************************************/
2287 /***/ ((module) => {
2288
2289 "use strict";
2290
2291
2292 (function () {
2293 'use strict';
2294
2295 var document = typeof window !== 'undefined' && typeof window.document !== 'undefined' ? window.document : {};
2296 var isCommonjs = true && module.exports;
2297
2298 var fn = function () {
2299 var val;
2300 var fnMap = [['requestFullscreen', 'exitFullscreen', 'fullscreenElement', 'fullscreenEnabled', 'fullscreenchange', 'fullscreenerror'], // New WebKit
2301 ['webkitRequestFullscreen', 'webkitExitFullscreen', 'webkitFullscreenElement', 'webkitFullscreenEnabled', 'webkitfullscreenchange', 'webkitfullscreenerror'], // Old WebKit
2302 ['webkitRequestFullScreen', 'webkitCancelFullScreen', 'webkitCurrentFullScreenElement', 'webkitCancelFullScreen', 'webkitfullscreenchange', 'webkitfullscreenerror'], ['mozRequestFullScreen', 'mozCancelFullScreen', 'mozFullScreenElement', 'mozFullScreenEnabled', 'mozfullscreenchange', 'mozfullscreenerror'], ['msRequestFullscreen', 'msExitFullscreen', 'msFullscreenElement', 'msFullscreenEnabled', 'MSFullscreenChange', 'MSFullscreenError']];
2303 var i = 0;
2304 var l = fnMap.length;
2305 var ret = {};
2306
2307 for (; i < l; i++) {
2308 val = fnMap[i];
2309
2310 if (val && val[1] in document) {
2311 var valLength = val.length;
2312
2313 for (i = 0; i < valLength; i++) {
2314 ret[fnMap[0][i]] = val[i];
2315 }
2316
2317 return ret;
2318 }
2319 }
2320
2321 return false;
2322 }();
2323
2324 var eventNameMap = {
2325 change: fn.fullscreenchange,
2326 error: fn.fullscreenerror
2327 };
2328 var screenfull = {
2329 request: function (element) {
2330 return new Promise(function (resolve, reject) {
2331 var onFullScreenEntered = function () {
2332 this.off('change', onFullScreenEntered);
2333 resolve();
2334 }.bind(this);
2335
2336 this.on('change', onFullScreenEntered);
2337 element = element || document.documentElement;
2338 Promise.resolve(element[fn.requestFullscreen]()).catch(reject);
2339 }.bind(this));
2340 },
2341 exit: function () {
2342 return new Promise(function (resolve, reject) {
2343 if (!this.isFullscreen) {
2344 resolve();
2345 return;
2346 }
2347
2348 var onFullScreenExit = function () {
2349 this.off('change', onFullScreenExit);
2350 resolve();
2351 }.bind(this);
2352
2353 this.on('change', onFullScreenExit);
2354 Promise.resolve(document[fn.exitFullscreen]()).catch(reject);
2355 }.bind(this));
2356 },
2357 toggle: function (element) {
2358 return this.isFullscreen ? this.exit() : this.request(element);
2359 },
2360 onchange: function (callback) {
2361 this.on('change', callback);
2362 },
2363 onerror: function (callback) {
2364 this.on('error', callback);
2365 },
2366 on: function (event, callback) {
2367 var eventName = eventNameMap[event];
2368
2369 if (eventName) {
2370 document.addEventListener(eventName, callback, false);
2371 }
2372 },
2373 off: function (event, callback) {
2374 var eventName = eventNameMap[event];
2375
2376 if (eventName) {
2377 document.removeEventListener(eventName, callback, false);
2378 }
2379 },
2380 raw: fn
2381 };
2382
2383 if (!fn) {
2384 if (isCommonjs) {
2385 module.exports = {
2386 isEnabled: false
2387 };
2388 } else {
2389 window.screenfull = {
2390 isEnabled: false
2391 };
2392 }
2393
2394 return;
2395 }
2396
2397 Object.defineProperties(screenfull, {
2398 isFullscreen: {
2399 get: function () {
2400 return Boolean(document[fn.fullscreenElement]);
2401 }
2402 },
2403 element: {
2404 enumerable: true,
2405 get: function () {
2406 return document[fn.fullscreenElement];
2407 }
2408 },
2409 isEnabled: {
2410 enumerable: true,
2411 get: function () {
2412 // Coerce to boolean in case of old WebKit
2413 return Boolean(document[fn.fullscreenEnabled]);
2414 }
2415 }
2416 });
2417
2418 if (isCommonjs) {
2419 module.exports = screenfull;
2420 } else {
2421 window.screenfull = screenfull;
2422 }
2423 })();
2424
2425 /***/ })
2426
2427 },
2428 /******/ __webpack_require__ => { // webpackRuntimeModules
2429 /******/ var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
2430 /******/ __webpack_require__.O(0, ["frontend","frontend-modules"], () => (__webpack_exec__("../assets/dev/js/frontend/preloaded-modules.js")));
2431 /******/ var __webpack_exports__ = __webpack_require__.O();
2432 /******/ }
2433 ]);
2434 //# sourceMappingURL=preloaded-modules.js.map