', {
class: classes.swiperPreloader
});
$slidebg = jQuery('
', {
class: slideInnerClass,
'data-background': slide.url
});
$slidebg.append($slideloader);
} else {
$slidebg = jQuery('
', {
class: slideInnerClass,
style: 'background-image: url("' + slide.url + '");'
});
}
$slide.append($slidebg);
$wrapper.append($slide);
this.elements.$slides = this.elements.$slides.add($slide);
});
$container.append($wrapper);
this.$element.prepend($container);
this.elements.$backgroundSlideShowContainer = $container;
}
async initSlider() {
if (1 >= this.getSlidesCount()) {
return;
}
const elementSettings = this.getElementSettings();
const Swiper = elementorFrontend.utils.swiper;
this.swiper = await new Swiper(this.elements.$backgroundSlideShowContainer, this.getSwiperOptions());
// Expose the swiper instance in the frontend
this.elements.$backgroundSlideShowContainer.data('swiper', this.swiper);
if (elementSettings.background_slideshow_ken_burns) {
this.handleKenBurns();
}
}
activate() {
this.buildSwiperElements();
this.initSlider();
}
deactivate() {
if (this.swiper) {
this.swiper.destroy();
this.elements.$backgroundSlideShowContainer.remove();
}
}
run() {
if ('slideshow' === this.getElementSettings('background_background')) {
this.activate();
} else {
this.deactivate();
}
}
onInit() {
super.onInit();
if (this.getElementSettings('background_slideshow_gallery')) {
this.run();
}
}
onDestroy() {
super.onDestroy();
this.deactivate();
}
onElementChange(propertyName) {
if ('background_background' === propertyName) {
this.run();
}
}
}
exports["default"] = BackgroundSlideshow;
/***/ }),
/***/ "../assets/dev/js/frontend/handlers/background-video.js":
/*!**************************************************************!*\
!*** ../assets/dev/js/frontend/handlers/background-video.js ***!
\**************************************************************/
/***/ ((__unused_webpack_module, exports) => {
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports["default"] = void 0;
class BackgroundVideo extends elementorModules.frontend.handlers.Base {
getDefaultSettings() {
return {
selectors: {
backgroundVideoContainer: '.elementor-background-video-container',
backgroundVideoEmbed: '.elementor-background-video-embed',
backgroundVideoHosted: '.elementor-background-video-hosted'
}
};
}
getDefaultElements() {
const selectors = this.getSettings('selectors'),
elements = {
$backgroundVideoContainer: this.$element.find(selectors.backgroundVideoContainer)
};
elements.$backgroundVideoEmbed = elements.$backgroundVideoContainer.children(selectors.backgroundVideoEmbed);
elements.$backgroundVideoHosted = elements.$backgroundVideoContainer.children(selectors.backgroundVideoHosted);
return elements;
}
calcVideosSize($video) {
let aspectRatioSetting = '16:9';
if ('vimeo' === this.videoType) {
aspectRatioSetting = $video[0].width + ':' + $video[0].height;
}
const containerWidth = this.elements.$backgroundVideoContainer.outerWidth(),
containerHeight = this.elements.$backgroundVideoContainer.outerHeight(),
aspectRatioArray = aspectRatioSetting.split(':'),
aspectRatio = aspectRatioArray[0] / aspectRatioArray[1],
ratioWidth = containerWidth / aspectRatio,
ratioHeight = containerHeight * aspectRatio,
isWidthFixed = containerWidth / containerHeight > aspectRatio;
return {
width: isWidthFixed ? containerWidth : ratioHeight,
height: isWidthFixed ? ratioWidth : containerHeight
};
}
changeVideoSize() {
if (!('hosted' === this.videoType) && !this.player) {
return;
}
let $video;
if ('youtube' === this.videoType) {
$video = jQuery(this.player.getIframe());
} else if ('vimeo' === this.videoType) {
$video = jQuery(this.player.element);
} else if ('hosted' === this.videoType) {
$video = this.elements.$backgroundVideoHosted;
}
if (!$video) {
return;
}
const size = this.calcVideosSize($video);
$video.width(size.width).height(size.height);
}
startVideoLoop(firstTime) {
// If the section has been removed
if (!this.player.getIframe().contentWindow) {
return;
}
const elementSettings = this.getElementSettings(),
startPoint = elementSettings.background_video_start || 0,
endPoint = elementSettings.background_video_end;
if (elementSettings.background_play_once && !firstTime) {
this.player.stopVideo();
return;
}
this.player.seekTo(startPoint);
if (endPoint) {
const durationToEnd = endPoint - startPoint + 1;
setTimeout(() => {
this.startVideoLoop(false);
}, durationToEnd * 1000);
}
}
prepareVimeoVideo(Vimeo, videoLink) {
const elementSettings = this.getElementSettings(),
videoSize = this.elements.$backgroundVideoContainer.outerWidth(),
vimeoOptions = {
url: videoLink,
width: videoSize.width,
autoplay: true,
loop: !elementSettings.background_play_once,
transparent: true,
background: true,
muted: true
};
if (elementSettings.background_privacy_mode) {
vimeoOptions.dnt = true;
}
this.player = new Vimeo.Player(this.elements.$backgroundVideoContainer, vimeoOptions);
// Handle user-defined start/end times
this.handleVimeoStartEndTimes(elementSettings);
this.player.ready().then(() => {
jQuery(this.player.element).addClass('elementor-background-video-embed');
this.changeVideoSize();
});
}
handleVimeoStartEndTimes(elementSettings) {
// If a start time is defined, set the start time
if (elementSettings.background_video_start) {
this.player.on('play', data => {
if (0 === data.seconds) {
this.player.setCurrentTime(elementSettings.background_video_start);
}
});
}
this.player.on('timeupdate', data => {
// If an end time is defined, handle ending the video
if (elementSettings.background_video_end && elementSettings.background_video_end < data.seconds) {
if (elementSettings.background_play_once) {
// Stop at user-defined end time if not loop
this.player.pause();
} else {
// Go to start time if loop
this.player.setCurrentTime(elementSettings.background_video_start);
}
}
// If start time is defined but an end time is not, go to user-defined start time at video end.
// Vimeo JS API has an 'ended' event, but it never fires when infinite loop is defined, so we
// get the video duration (returns a promise) then use duration-0.5s as end time
this.player.getDuration().then(duration => {
if (elementSettings.background_video_start && !elementSettings.background_video_end && data.seconds > duration - 0.5) {
this.player.setCurrentTime(elementSettings.background_video_start);
}
});
});
}
prepareYTVideo(YT, videoID) {
const $backgroundVideoContainer = this.elements.$backgroundVideoContainer,
elementSettings = this.getElementSettings();
let startStateCode = YT.PlayerState.PLAYING;
// Since version 67, Chrome doesn't fire the `PLAYING` state at start time
if (window.chrome) {
startStateCode = YT.PlayerState.UNSTARTED;
}
const playerOptions = {
videoId: videoID,
events: {
onReady: () => {
this.player.mute();
this.changeVideoSize();
this.startVideoLoop(true);
this.player.playVideo();
},
onStateChange: event => {
switch (event.data) {
case startStateCode:
$backgroundVideoContainer.removeClass('elementor-invisible elementor-loading');
break;
case YT.PlayerState.ENDED:
if ('function' === typeof this.player.seekTo) {
this.player.seekTo(elementSettings.background_video_start || 0);
}
if (elementSettings.background_play_once) {
this.player.destroy();
}
}
}
},
playerVars: {
controls: 0,
rel: 0,
playsinline: 1
}
};
// To handle CORS issues, when the default host is changed, the origin parameter has to be set.
if (elementSettings.background_privacy_mode) {
playerOptions.host = 'https://www.youtube-nocookie.com';
playerOptions.origin = window.location.hostname;
}
$backgroundVideoContainer.addClass('elementor-loading elementor-invisible');
this.player = new YT.Player(this.elements.$backgroundVideoEmbed[0], playerOptions);
}
activate() {
let videoLink = this.getElementSettings('background_video_link'),
videoID;
const playOnce = this.getElementSettings('background_play_once');
if (-1 !== videoLink.indexOf('vimeo.com')) {
this.videoType = 'vimeo';
this.apiProvider = elementorFrontend.utils.vimeo;
} else if (videoLink.match(/^(?:https?:\/\/)?(?:www\.)?(?:m\.)?(?:youtu\.be\/|youtube\.com)/)) {
this.videoType = 'youtube';
this.apiProvider = elementorFrontend.utils.youtube;
}
if (this.apiProvider) {
videoID = this.apiProvider.getVideoIDFromURL(videoLink);
this.apiProvider.onApiReady(apiObject => {
if ('youtube' === this.videoType) {
this.prepareYTVideo(apiObject, videoID);
}
if ('vimeo' === this.videoType) {
this.prepareVimeoVideo(apiObject, videoLink);
}
});
} else {
this.videoType = 'hosted';
const startTime = this.getElementSettings('background_video_start'),
endTime = this.getElementSettings('background_video_end');
if (startTime || endTime) {
videoLink += '#t=' + (startTime || 0) + (endTime ? ',' + endTime : '');
}
this.elements.$backgroundVideoHosted.attr('src', videoLink).one('canplay', this.changeVideoSize.bind(this));
if (playOnce) {
this.elements.$backgroundVideoHosted.on('ended', () => {
this.elements.$backgroundVideoHosted.hide();
});
}
}
elementorFrontend.elements.$window.on('resize elementor/bg-video/recalc', this.changeVideoSize);
}
deactivate() {
if ('youtube' === this.videoType && this.player.getIframe() || 'vimeo' === this.videoType) {
this.player.destroy();
} else {
this.elements.$backgroundVideoHosted.removeAttr('src').off('ended');
}
elementorFrontend.elements.$window.off('resize', this.changeVideoSize);
}
run() {
const elementSettings = this.getElementSettings();
if (!elementSettings.background_play_on_mobile && 'mobile' === elementorFrontend.getCurrentDeviceMode()) {
return;
}
if ('video' === elementSettings.background_background && elementSettings.background_video_link) {
this.activate();
} else {
this.deactivate();
}
}
onInit() {
super.onInit(...arguments);
this.changeVideoSize = this.changeVideoSize.bind(this);
this.run();
}
onElementChange(propertyName) {
if ('background_background' === propertyName) {
this.run();
}
}
}
exports["default"] = BackgroundVideo;
/***/ }),
/***/ "../assets/dev/js/frontend/handlers/background.js":
/*!********************************************************!*\
!*** ../assets/dev/js/frontend/handlers/background.js ***!
\********************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports["default"] = void 0;
var _backgroundSlideshow = _interopRequireDefault(__webpack_require__(/*! ./background-slideshow */ "../assets/dev/js/frontend/handlers/background-slideshow.js"));
var _backgroundVideo = _interopRequireDefault(__webpack_require__(/*! ./background-video */ "../assets/dev/js/frontend/handlers/background-video.js"));
var _default = [_backgroundSlideshow.default, _backgroundVideo.default];
exports["default"] = _default;
/***/ }),
/***/ "../assets/dev/js/frontend/handlers/column.js":
/*!****************************************************!*\
!*** ../assets/dev/js/frontend/handlers/column.js ***!
\****************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports["default"] = void 0;
var _backgroundSlideshow = _interopRequireDefault(__webpack_require__(/*! ./background-slideshow */ "../assets/dev/js/frontend/handlers/background-slideshow.js"));
var _default = [_backgroundSlideshow.default];
exports["default"] = _default;
/***/ }),
/***/ "../assets/dev/js/frontend/handlers/container/container.js":
/*!*****************************************************************!*\
!*** ../assets/dev/js/frontend/handlers/container/container.js ***!
\*****************************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports["default"] = void 0;
var _default = [() => __webpack_require__.e(/*! import() | container */ "container").then(__webpack_require__.bind(__webpack_require__, /*! ./handles-position */ "../assets/dev/js/frontend/handlers/container/handles-position.js")), () => __webpack_require__.e(/*! import() | container */ "container").then(__webpack_require__.bind(__webpack_require__, /*! ./shapes */ "../assets/dev/js/frontend/handlers/container/shapes.js")), () => __webpack_require__.e(/*! import() | container */ "container").then(__webpack_require__.bind(__webpack_require__, /*! ./grid-container */ "../assets/dev/js/frontend/handlers/container/grid-container.js"))];
exports["default"] = _default;
/***/ }),
/***/ "../assets/dev/js/frontend/handlers/global.js":
/*!****************************************************!*\
!*** ../assets/dev/js/frontend/handlers/global.js ***!
\****************************************************/
/***/ ((__unused_webpack_module, exports) => {
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports["default"] = void 0;
class GlobalHandler extends elementorModules.frontend.handlers.Base {
getWidgetType() {
return 'global';
}
animate() {
const $element = this.$element,
animation = this.getAnimation();
if ('none' === animation) {
$element.removeClass('elementor-invisible');
return;
}
const elementSettings = this.getElementSettings(),
animationDelay = elementSettings._animation_delay || elementSettings.animation_delay || 0;
$element.removeClass(animation);
if (this.currentAnimation) {
$element.removeClass(this.currentAnimation);
}
this.currentAnimation = animation;
setTimeout(() => {
$element.removeClass('elementor-invisible').addClass('animated ' + animation);
}, animationDelay);
}
getAnimation() {
return this.getCurrentDeviceSetting('animation') || this.getCurrentDeviceSetting('_animation');
}
onInit() {
super.onInit(...arguments);
if (this.getAnimation()) {
const observer = elementorModules.utils.Scroll.scrollObserver({
callback: event => {
if (event.isInViewport) {
this.animate();
observer.unobserve(this.$element[0]);
}
}
});
observer.observe(this.$element[0]);
}
}
onElementChange(propertyName) {
if (/^_?animation/.test(propertyName)) {
this.animate();
}
}
}
var _default = $scope => {
elementorFrontend.elementsHandler.addHandler(GlobalHandler, {
$element: $scope
});
};
exports["default"] = _default;
/***/ }),
/***/ "../assets/dev/js/frontend/handlers/section/handles-position.js":
/*!**********************************************************************!*\
!*** ../assets/dev/js/frontend/handlers/section/handles-position.js ***!
\**********************************************************************/
/***/ ((__unused_webpack_module, exports) => {
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports["default"] = void 0;
class HandlesPosition extends elementorModules.frontend.handlers.Base {
isActive() {
return elementorFrontend.isEditMode();
}
isFirstSection() {
return this.$element[0] === document.querySelector('.elementor-edit-mode .elementor-top-section');
}
isOverflowHidden() {
return 'hidden' === this.$element.css('overflow');
}
getOffset() {
if ('body' === elementor.config.document.container) {
return this.$element.offset().top;
}
const $container = jQuery(elementor.config.document.container);
return this.$element.offset().top - $container.offset().top;
}
setHandlesPosition() {
const document = elementor.documents.getCurrent();
if (!document || !document.container.isEditable()) {
return;
}
const insideHandleClass = 'elementor-section--handles-inside';
if (elementor.settings.page.model.attributes.scroll_snap) {
this.$element.addClass(insideHandleClass);
return;
}
const isOverflowHidden = this.isOverflowHidden();
if (!isOverflowHidden && !this.isFirstSection()) {
return;
}
const offset = isOverflowHidden ? 0 : this.getOffset();
if (offset < 25) {
this.$element.addClass(insideHandleClass);
const $handlesElement = this.$element.find('> .elementor-element-overlay > .elementor-editor-section-settings');
if (offset < -5) {
$handlesElement.css('top', -offset);
} else {
$handlesElement.css('top', '');
}
} else {
this.$element.removeClass(insideHandleClass);
}
}
onInit() {
if (!this.isActive()) {
return;
}
this.setHandlesPosition();
this.$element.on('mouseenter', this.setHandlesPosition.bind(this));
}
}
exports["default"] = HandlesPosition;
/***/ }),
/***/ "../assets/dev/js/frontend/handlers/section/shapes.js":
/*!************************************************************!*\
!*** ../assets/dev/js/frontend/handlers/section/shapes.js ***!
\************************************************************/
/***/ ((__unused_webpack_module, exports) => {
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports["default"] = void 0;
class Shapes extends elementorModules.frontend.handlers.Base {
getDefaultSettings() {
return {
selectors: {
container: '> .elementor-shape-%s'
},
svgURL: elementorFrontend.config.urls.assets + 'shapes/'
};
}
getDefaultElements() {
const elements = {},
selectors = this.getSettings('selectors');
elements.$topContainer = this.$element.find(selectors.container.replace('%s', 'top'));
elements.$bottomContainer = this.$element.find(selectors.container.replace('%s', 'bottom'));
return elements;
}
isActive() {
return elementorFrontend.isEditMode();
}
getSvgURL(shapeType, fileName) {
let svgURL = this.getSettings('svgURL') + fileName + '.svg';
if (elementor.config.additional_shapes && shapeType in elementor.config.additional_shapes) {
svgURL = elementor.config.additional_shapes[shapeType];
if (-1 < fileName.indexOf('-negative')) {
svgURL = svgURL.replace('.svg', '-negative.svg');
}
}
return svgURL;
}
buildSVG(side) {
const baseSettingKey = 'shape_divider_' + side,
shapeType = this.getElementSettings(baseSettingKey),
$svgContainer = this.elements['$' + side + 'Container'];
$svgContainer.attr('data-shape', shapeType);
if (!shapeType) {
$svgContainer.empty(); // Shape-divider set to 'none'
return;
}
let fileName = shapeType;
if (this.getElementSettings(baseSettingKey + '_negative')) {
fileName += '-negative';
}
const svgURL = this.getSvgURL(shapeType, fileName);
jQuery.get(svgURL, data => {
$svgContainer.empty().append(data.childNodes[0]);
});
this.setNegative(side);
}
setNegative(side) {
this.elements['$' + side + 'Container'].attr('data-negative', !!this.getElementSettings('shape_divider_' + side + '_negative'));
}
onInit() {
if (!this.isActive(this.getSettings())) {
return;
}
super.onInit(...arguments);
['top', 'bottom'].forEach(side => {
if (this.getElementSettings('shape_divider_' + side)) {
this.buildSVG(side);
}
});
}
onElementChange(propertyName) {
const shapeChange = propertyName.match(/^shape_divider_(top|bottom)$/);
if (shapeChange) {
this.buildSVG(shapeChange[1]);
return;
}
const negativeChange = propertyName.match(/^shape_divider_(top|bottom)_negative$/);
if (negativeChange) {
this.buildSVG(negativeChange[1]);
this.setNegative(negativeChange[1]);
}
}
}
exports["default"] = Shapes;
/***/ }),
/***/ "../assets/dev/js/frontend/handlers/section/stretched-section.js":
/*!***********************************************************************!*\
!*** ../assets/dev/js/frontend/handlers/section/stretched-section.js ***!
\***********************************************************************/
/***/ ((__unused_webpack_module, exports) => {
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports["default"] = void 0;
class StretchedSection extends elementorModules.frontend.handlers.StretchedElement {
getStretchedClass() {
return 'elementor-section-stretched';
}
getStretchSettingName() {
return 'stretch_section';
}
getStretchActiveValue() {
return 'section-stretched';
}
}
exports["default"] = StretchedSection;
/***/ }),
/***/ "../assets/dev/js/frontend/utils/anchor-scroll-margin.js":
/*!***************************************************************!*\
!*** ../assets/dev/js/frontend/utils/anchor-scroll-margin.js ***!
\***************************************************************/
/***/ ((__unused_webpack_module, exports) => {
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports["default"] = void 0;
class _default extends elementorModules.ViewModule {
getDefaultSettings() {
return {
selectors: {
links: '.elementor-element a[href*="#"]',
stickyElements: '.elementor-element.elementor-sticky'
}
};
}
onInit() {
this.observeStickyElements(() => {
this.initializeStickyAndAnchorTracking();
});
}
observeStickyElements(callback) {
const observer = new MutationObserver(mutationsList => {
for (const mutation of mutationsList) {
if ('childList' === mutation.type || 'attributes' === mutation.type && mutation.target.classList.contains('elementor-sticky')) {
callback();
}
}
});
observer.observe(document.body, {
childList: true,
subtree: true,
attributes: true,
attributeFilter: ['class', 'style']
});
}
initializeStickyAndAnchorTracking() {
const anchorLinks = this.getAllAnchorLinks();
const stickyElements = this.getAllStickyElements();
const trackedElements = [];
if (!stickyElements.length > 0 && !anchorLinks.length > 0) {
return;
}
this.trackStickyElements(stickyElements, trackedElements);
this.trackAnchorLinks(anchorLinks, trackedElements);
this.organizeStickyAndAnchors(trackedElements);
}
trackAnchorLinks(anchorLinks, trackedElements) {
anchorLinks.forEach(element => {
const target = this.getAnchorTarget(element);
const scrollPosition = this.getScrollPosition(target);
trackedElements.push({
element: target,
type: 'anchor',
scrollPosition
});
});
}
trackStickyElements(stickyElements, trackedElements) {
stickyElements.forEach(element => {
const settings = this.getElementSettings(element);
if (!settings || !settings.sticky_anchor_link_offset) {
return;
}
const {
sticky_anchor_link_offset: scrollMarginTop
} = settings;
if (0 === scrollMarginTop) {
return;
}
const scrollPosition = this.getScrollPosition(element);
trackedElements.push({
scrollMarginTop,
type: 'sticky',
scrollPosition
});
});
}
organizeStickyAndAnchors(elements) {
const stickyList = this.filterAndSortElementsByType(elements, 'sticky');
const anchorList = this.filterAndSortElementsByType(elements, 'anchor');
stickyList.forEach((sticky, index) => {
this.defineCurrentStickyRange(sticky, index, stickyList, anchorList);
});
}
defineCurrentStickyRange(sticky, index, stickyList, anchorList) {
const nextStickyScrollPosition = index + 1 < stickyList.length ? stickyList[index + 1].scrollPosition : Infinity;
sticky.anchor = anchorList.filter(anchor => {
const withinRange = anchor.scrollPosition > sticky.scrollPosition && anchor.scrollPosition < nextStickyScrollPosition;
if (withinRange) {
anchor.element.style.scrollMarginTop = `${sticky.scrollMarginTop}px`;
}
return withinRange;
});
}
getScrollPosition(element) {
let offsetTop = 0;
while (element) {
offsetTop += element.offsetTop;
element = element.offsetParent;
}
return offsetTop;
}
getAllStickyElements() {
const allStickyElements = document.querySelectorAll(this.getSettings('selectors.stickyElements'));
return Array.from(allStickyElements).filter((anchor, index, self) => index === self.findIndex(t => t.getAttribute('data-id') === anchor.getAttribute('data-id')));
}
getAllAnchorLinks() {
const allAnchors = document.querySelectorAll(this.getSettings('selectors.links'));
return Array.from(allAnchors).filter((anchor, index, self) => index === self.findIndex(t => t.getAttribute('href') === anchor.getAttribute('href')));
}
filterAndSortElementsByType(elements, type) {
return elements.filter(item => type === item.type).sort((a, b) => a.scrollPosition - b.scrollPosition);
}
isValidSelector(hash) {
const validSelectorPattern = /^#[A-Za-z_][\w-]*$/;
return validSelectorPattern.test(hash);
}
isExcludedHash(hash) {
const emptyHash = '' === hash;
const urlActionHash = hash.startsWith('#elementor-action');
return emptyHash || urlActionHash;
}
getAnchorTarget(element) {
const hash = element?.hash;
if (this.isExcludedHash(hash)) {
return null;
} else if (!this.isValidSelector(hash)) {
// eslint-disable-next-line no-console
console.warn(`Invalid selector: '${hash}'`);
return null;
}
return document.querySelector(hash);
}
getElementSettings(element) {
return JSON.parse(element.getAttribute('data-settings'));
}
}
exports["default"] = _default;
/***/ }),
/***/ "../assets/dev/js/frontend/utils/anchors.js":
/*!**************************************************!*\
!*** ../assets/dev/js/frontend/utils/anchors.js ***!
\**************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var _utils = __webpack_require__(/*! ./utils */ "../assets/dev/js/frontend/utils/utils.js");
module.exports = elementorModules.ViewModule.extend({
getDefaultSettings() {
return {
scrollDuration: 500,
selectors: {
links: 'a[href*="#"]',
targets: '.elementor-element, .elementor-menu-anchor',
scrollable: (0, _utils.isScrollSnapActive)() ? 'body' : 'html, body'
}
};
},
getDefaultElements() {
var $ = jQuery,
selectors = this.getSettings('selectors');
return {
$scrollable: $(selectors.scrollable)
};
},
bindEvents() {
elementorFrontend.elements.$document.on('click', this.getSettings('selectors.links'), this.handleAnchorLinks);
},
handleAnchorLinks(event) {
var clickedLink = event.currentTarget,
isSamePathname = location.pathname === clickedLink.pathname,
isSameHostname = location.hostname === clickedLink.hostname,
$anchor;
if (!isSameHostname || !isSamePathname || clickedLink.hash.length < 2) {
return;
}
try {
$anchor = jQuery(clickedLink.hash).filter(this.getSettings('selectors.targets'));
} catch (e) {
return;
}
if (!$anchor.length) {
return;
}
var scrollTop = $anchor.offset().top,
$wpAdminBar = elementorFrontend.elements.$wpAdminBar,
$activeStickies = jQuery('.elementor-section.elementor-sticky--active:visible'),
maxStickyHeight = 0;
if ($wpAdminBar.length > 0) {
scrollTop -= $wpAdminBar.height();
}
// Offset height of tallest sticky
if ($activeStickies.length > 0) {
maxStickyHeight = Math.max.apply(null, $activeStickies.map(function () {
return jQuery(this).outerHeight();
}).get());
scrollTop -= maxStickyHeight;
}
event.preventDefault();
scrollTop = elementorFrontend.hooks.applyFilters('frontend/handlers/menu_anchor/scroll_top_distance', scrollTop);
// On scroll animation start: remove scroll-snap.
if ((0, _utils.isScrollSnapActive)()) {
elementorFrontend.elements.$body.css('scroll-snap-type', 'none');
}
this.elements.$scrollable.animate({
scrollTop
}, this.getSettings('scrollDuration'), 'linear', () => {
// On scroll animation complete: add scroll-snap back.
if ((0, _utils.isScrollSnapActive)()) {
elementorFrontend.elements.$body.css('scroll-snap-type', '');
}
});
},
onInit() {
elementorModules.ViewModule.prototype.onInit.apply(this, arguments);
}
});
/***/ }),
/***/ "../assets/dev/js/frontend/utils/assets-loader.js":
/*!********************************************************!*\
!*** ../assets/dev/js/frontend/utils/assets-loader.js ***!
\********************************************************/
/***/ ((__unused_webpack_module, exports) => {
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports["default"] = void 0;
class AssetsLoader {
getScriptElement(src) {
const scriptElement = document.createElement('script');
scriptElement.src = src;
return scriptElement;
}
getStyleElement(src) {
const styleElement = document.createElement('link');
styleElement.rel = 'stylesheet';
styleElement.href = src;
return styleElement;
}
load(type, key) {
const assetData = AssetsLoader.assets[type][key];
if (!assetData.loader) {
assetData.loader = this.isAssetLoaded(assetData, type) ? Promise.resolve(true) : this.loadAsset(assetData, type);
}
return assetData.loader;
}
isAssetLoaded(assetData, assetType) {
const tag = 'script' === assetType ? 'script' : 'link',
filePath = `${tag}[src="${assetData.src}"]`,
assetElements = document.querySelectorAll(filePath);
return !!assetElements?.length;
}
loadAsset(assetData, assetType) {
return new Promise(resolve => {
const element = 'style' === assetType ? this.getStyleElement(assetData.src) : this.getScriptElement(assetData.src);
element.onload = () => resolve(true);
this.appendAsset(assetData, element);
});
}
appendAsset(assetData, element) {
const beforeElement = document.querySelector(assetData.before);
if (!!beforeElement) {
beforeElement.insertAdjacentElement('beforebegin', element);
return;
}
const parent = 'head' === assetData.parent ? assetData.parent : 'body';
document[parent].appendChild(element);
}
}
exports["default"] = AssetsLoader;
const assetsUrl = elementorFrontendConfig.urls.assets;
const fileSuffix = elementorFrontendConfig.environmentMode.isScriptDebug ? '' : '.min';
const pluginVersion = elementorFrontendConfig.version;
const swiperJsSource = elementorFrontendConfig.experimentalFeatures.e_swiper_latest ? `${assetsUrl}lib/swiper/v8/swiper${fileSuffix}.js?ver=8.4.5` : `${assetsUrl}lib/swiper/swiper${fileSuffix}.js?ver=5.3.6`;
const swiperCssSource = elementorFrontendConfig.experimentalFeatures.e_swiper_latest ? `${assetsUrl}lib/swiper/v8/css/swiper${fileSuffix}.css?ver=8.4.5` : `${assetsUrl}lib/swiper/css/swiper${fileSuffix}.css?ver=5.3.6`;
AssetsLoader.assets = {
script: {
dialog: {
src: `${assetsUrl}lib/dialog/dialog${fileSuffix}.js?ver=4.9.3`
},
'share-link': {
src: `${assetsUrl}lib/share-link/share-link${fileSuffix}.js?ver=${pluginVersion}`
},
swiper: {
src: swiperJsSource
}
},
style: {
swiper: {
src: swiperCssSource,
parent: 'head'
},
'e-lightbox': {
src: elementorFrontendConfig?.responsive?.hasCustomBreakpoints ? `${elementorFrontendConfig.urls.uploadUrl}/elementor/css/custom-lightbox.min.css?ver=${pluginVersion}` : `${assetsUrl}css/conditionals/lightbox${fileSuffix}.css?ver=${pluginVersion}`
},
dialog: {
src: `${assetsUrl}css/conditionals/dialog${fileSuffix}.css?ver=${pluginVersion}`,
parent: 'head',
before: '#elementor-frontend-css'
}
}
};
/***/ }),
/***/ "../assets/dev/js/frontend/utils/controls.js":
/*!***************************************************!*\
!*** ../assets/dev/js/frontend/utils/controls.js ***!
\***************************************************/
/***/ ((__unused_webpack_module, exports) => {
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports["default"] = void 0;
class Controls {
/**
* Get Control Value
*
* Retrieves a control value.
* This function has been copied from `elementor/assets/dev/js/editor/utils/conditions.js`.
*
* @since 3.11.0
*
* @param {{}} controlSettings A settings object (e.g. element settings - keys and values)
* @param {string} controlKey The control key name
* @param {string} controlSubKey A specific property of the control object.
* @return {*} Control Value
*/
getControlValue(controlSettings, controlKey, controlSubKey) {
let value;
if ('object' === typeof controlSettings[controlKey] && controlSubKey) {
value = controlSettings[controlKey][controlSubKey];
} else {
value = controlSettings[controlKey];
}
return value;
}
/**
* Get the value of a responsive control.
*
* Retrieves the value of a responsive control for the current device or for this first parent device which has a control value.
*
* @since 3.11.0
*
* @param {{}} controlSettings A settings object (e.g. element settings - keys and values)
* @param {string} controlKey The control key name
* @param {string} controlSubKey A specific property of the control object.
* @param {string} device If we want to get a value for a specific device mode.
* @return {*} Control Value
*/
getResponsiveControlValue(controlSettings, controlKey) {
let controlSubKey = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
let device = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
const currentDeviceMode = device || elementorFrontend.getCurrentDeviceMode(),
controlValueDesktop = this.getControlValue(controlSettings, controlKey, controlSubKey);
// Set the control value for the current device mode.
// First check the widescreen device mode.
if ('widescreen' === currentDeviceMode) {
const controlValueWidescreen = this.getControlValue(controlSettings, `${controlKey}_widescreen`, controlSubKey);
return !!controlValueWidescreen || 0 === controlValueWidescreen ? controlValueWidescreen : controlValueDesktop;
}
// Loop through all responsive and desktop device modes.
const activeBreakpoints = elementorFrontend.breakpoints.getActiveBreakpointsList({
withDesktop: true
});
let parentDeviceMode = currentDeviceMode,
deviceIndex = activeBreakpoints.indexOf(currentDeviceMode),
controlValue = '';
while (deviceIndex <= activeBreakpoints.length) {
if ('desktop' === parentDeviceMode) {
controlValue = controlValueDesktop;
break;
}
const responsiveControlKey = `${controlKey}_${parentDeviceMode}`,
responsiveControlValue = this.getControlValue(controlSettings, responsiveControlKey, controlSubKey);
if (!!responsiveControlValue || 0 === responsiveControlValue) {
controlValue = responsiveControlValue;
break;
}
// If no control value has been set for the current device mode, then check the parent device mode.
deviceIndex++;
parentDeviceMode = activeBreakpoints[deviceIndex];
}
return controlValue;
}
}
exports["default"] = Controls;
/***/ }),
/***/ "../assets/dev/js/frontend/utils/lightbox/lightbox-manager.js":
/*!********************************************************************!*\
!*** ../assets/dev/js/frontend/utils/lightbox/lightbox-manager.js ***!
\********************************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports["default"] = void 0;
class LightboxManager extends elementorModules.ViewModule {
static getLightbox() {
const lightboxPromise = new Promise(resolveLightbox => {
__webpack_require__.e(/*! import() | lightbox */ "lightbox").then(__webpack_require__.t.bind(__webpack_require__, /*! elementor-frontend/utils/lightbox/lightbox */ "../assets/dev/js/frontend/utils/lightbox/lightbox.js", 23)).then(_ref => {
let {
default: LightboxModule
} = _ref;
return resolveLightbox(new LightboxModule());
});
}),
dialogScriptPromise = elementorFrontend.utils.assetsLoader.load('script', 'dialog'),
dialogStylePromise = elementorFrontend.utils.assetsLoader.load('style', 'dialog'),
shareLinkPromise = elementorFrontend.utils.assetsLoader.load('script', 'share-link'),
swiperStylePromise = elementorFrontend.utils.assetsLoader.load('style', 'swiper'),
lightboxStylePromise = elementorFrontend.utils.assetsLoader.load('style', 'e-lightbox');
return Promise.all([lightboxPromise, dialogScriptPromise, dialogStylePromise, shareLinkPromise, swiperStylePromise, lightboxStylePromise]).then(() => lightboxPromise);
}
getDefaultSettings() {
return {
selectors: {
links: 'a, [data-elementor-lightbox]',
slideshow: '[data-elementor-lightbox-slideshow]'
}
};
}
getDefaultElements() {
return {
$links: jQuery(this.getSettings('selectors.links')),
$slideshow: jQuery(this.getSettings('selectors.slideshow'))
};
}
isLightboxLink(element) {
// Check for lowercase `a` to make sure it works also for links inside SVGs.
if ('a' === element.tagName.toLowerCase() && (element.hasAttribute('download') || !/^[^?]+\.(png|jpe?g|gif|svg|webp)(\?.*)?$/i.test(element.href)) && !element.dataset.elementorLightboxVideo) {
return false;
}
const generalOpenInLightbox = elementorFrontend.getKitSettings('global_image_lightbox'),
currentLinkOpenInLightbox = element.dataset.elementorOpenLightbox;
return 'yes' === currentLinkOpenInLightbox || generalOpenInLightbox && 'no' !== currentLinkOpenInLightbox;
}
isLightboxSlideshow() {
return 0 !== this.elements.$slideshow.length;
}
async onLinkClick(event) {
const element = event.currentTarget,
$target = jQuery(event.target),
editMode = elementorFrontend.isEditMode(),
isColorPickingMode = editMode && elementor.$previewContents.find('body').hasClass('elementor-editor__ui-state__color-picker'),
isClickInsideElementor = !!$target.closest('.elementor-edit-area').length;
if (!this.isLightboxLink(element)) {
if (editMode && isClickInsideElementor) {
event.preventDefault();
}
return;
}
event.preventDefault();
if (editMode && !elementor.getPreferences('lightbox_in_editor')) {
return;
}
// Disable lightbox on color picking mode.
if (isColorPickingMode) {
return;
}
const lightbox = await LightboxManager.getLightbox();
lightbox.createLightbox(element);
}
bindEvents() {
elementorFrontend.elements.$document.on('click', this.getSettings('selectors.links'), event => this.onLinkClick(event));
}
onInit() {
super.onInit(...arguments);
if (elementorFrontend.isEditMode()) {
return;
}
this.maybeActivateLightboxOnLink();
}
maybeActivateLightboxOnLink() {
// Detecting lightbox links on init will reduce the time of waiting to the lightbox to be display on slow connections.
this.elements.$links.each((index, element) => {
if (this.isLightboxLink(element)) {
LightboxManager.getLightbox();
// Breaking the iteration when the library loading has already been triggered.
return false;
}
});
}
}
exports["default"] = LightboxManager;
/***/ }),
/***/ "../assets/dev/js/frontend/utils/swiper.js":
/*!*************************************************!*\
!*** ../assets/dev/js/frontend/utils/swiper.js ***!
\*************************************************/
/***/ ((__unused_webpack_module, exports) => {
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports["default"] = void 0;
class Swiper {
constructor(container, config) {
this.config = config;
if (this.config.breakpoints) {
// The config is passed as a param to allow adjustConfig to be called outside of this wrapper
this.config = this.adjustConfig(config);
}
if (container instanceof jQuery) {
container = container[0];
}
// The Swiper will overlap the column width when applying custom margin values on the column.
container.closest('.elementor-widget-wrap')?.classList.add('e-swiper-container');
container.closest('.elementor-widget')?.classList.add('e-widget-swiper');
return new Promise(resolve => {
elementorFrontend.utils.assetsLoader.load('script', 'swiper').then(() => resolve(this.createSwiperInstance(container, this.config)));
});
}
createSwiperInstance(container, config) {
const SwiperSource = window.Swiper;
SwiperSource.prototype.adjustConfig = this.adjustConfig;
return new SwiperSource(container, config);
}
// Backwards compatibility for Elementor Pro <2.9.0 (old Swiper version - <5.0.0)
// In Swiper 5.0.0 and up, breakpoints changed from acting as max-width to acting as min-width
adjustConfig(config) {
// Only reverse the breakpoints if the handle param has been defined
if (!config.handleElementorBreakpoints) {
return config;
}
const elementorBreakpoints = elementorFrontend.config.responsive.activeBreakpoints,
elementorBreakpointValues = elementorFrontend.breakpoints.getBreakpointValues();
Object.keys(config.breakpoints).forEach(configBPKey => {
const configBPKeyInt = parseInt(configBPKey);
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
if (configBPKeyInt === elementorBreakpoints.mobile.value || configBPKeyInt + 1 === elementorBreakpoints.mobile.value) {
// This handles the mobile breakpoint. Elementor's default sm breakpoint is never actually used,
// so the mobile breakpoint (md) needs to be handled separately and set to the 0 breakpoint (xs)
breakpointToUpdate = 0;
} else if (elementorBreakpoints.widescreen && (configBPKeyInt === elementorBreakpoints.widescreen.value || configBPKeyInt + 1 === elementorBreakpoints.widescreen.value)) {
// Widescreen is a min-width breakpoint. Since in Swiper >5.0 the breakpoint system is min-width based,
// the value we pass to the Swiper instance in this case is the breakpoint from the user, unchanged.
breakpointToUpdate = configBPKeyInt;
} else {
// Find the index of the current config breakpoint in the Elementor Breakpoints array
const currentBPIndexInElementorBPs = elementorBreakpointValues.findIndex(elementorBP => {
// BC Fix for Elementor Pro Carousels from 2.8.0-2.8.3 used with Elementor >= 2.9.0
return configBPKeyInt === elementorBP || configBPKeyInt + 1 === elementorBP;
});
// For all other Swiper config breakpoints, move them one breakpoint down on the breakpoint list,
// according to the array of Elementor's global breakpoints
breakpointToUpdate = elementorBreakpointValues[currentBPIndexInElementorBPs - 1];
}
config.breakpoints[breakpointToUpdate] = config.breakpoints[configBPKey];
// Then reset the settings in the original breakpoint key to the default values
config.breakpoints[configBPKey] = {
slidesPerView: config.slidesPerView,
slidesPerGroup: config.slidesPerGroup ? config.slidesPerGroup : 1
};
});
return config;
}
}
exports["default"] = Swiper;
/***/ }),
/***/ "../assets/dev/js/frontend/utils/url-actions.js":
/*!******************************************************!*\
!*** ../assets/dev/js/frontend/utils/url-actions.js ***!
\******************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports["default"] = void 0;
__webpack_require__(/*! core-js/modules/web.dom-exception.stack.js */ "../node_modules/core-js/modules/web.dom-exception.stack.js");
class _default extends elementorModules.ViewModule {
getDefaultSettings() {
return {
selectors: {
links: 'a[href^="%23elementor-action"], a[href^="#elementor-action"]'
}
};
}
bindEvents() {
elementorFrontend.elements.$document.on('click', this.getSettings('selectors.links'), this.runLinkAction.bind(this));
}
initActions() {
this.actions = {
lightbox: async settings => {
const lightbox = await elementorFrontend.utils.lightbox;
if (settings.slideshow) {
// Handle slideshow display
lightbox.openSlideshow(settings.slideshow, settings.url);
} else {
// If the settings has an ID - the lightbox target content is an image - the ID is an attachment ID.
if (settings.id) {
settings.type = 'image';
}
lightbox.showModal(settings);
}
}
};
}
addAction(name, callback) {
this.actions[name] = callback;
}
runAction(url) {
url = decodeURIComponent(url);
const actionMatch = url.match(/action=(.+?)&/);
if (!actionMatch) {
return;
}
const action = this.actions[actionMatch[1]];
if (!action) {
return;
}
let settings = {};
const settingsMatch = url.match(/settings=(.+)/);
if (settingsMatch) {
settings = JSON.parse(atob(settingsMatch[1]));
}
settings.previousEvent = event;
for (var _len = arguments.length, restArgs = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
restArgs[_key - 1] = arguments[_key];
}
action(settings, ...restArgs);
}
runLinkAction(event) {
event.preventDefault();
this.runAction(jQuery(event.currentTarget).attr('href'), event);
}
runHashAction() {
if (!location.hash) {
return;
}
// Only if an element with this action hash exists on the page do we allow running the action.
const elementWithHash = document.querySelector(`[data-e-action-hash="${location.hash}"], a[href*="${location.hash}"]`);
if (elementWithHash) {
this.runAction(elementWithHash.getAttribute('data-e-action-hash'));
}
}
createActionHash(action, settings) {
// We need to encode the hash tag (#) here, in order to support share links for a variety of providers
return encodeURIComponent(`#elementor-action:action=${action}&settings=${btoa(JSON.stringify(settings))}`);
}
onInit() {
super.onInit();
this.initActions();
elementorFrontend.on('components:init', this.runHashAction.bind(this));
}
}
exports["default"] = _default;
/***/ }),
/***/ "../assets/dev/js/frontend/utils/utils.js":
/*!************************************************!*\
!*** ../assets/dev/js/frontend/utils/utils.js ***!
\************************************************/
/***/ ((__unused_webpack_module, exports) => {
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.isScrollSnapActive = exports.escapeHTML = void 0;
// Escape HTML special chars to prevent XSS.
const escapeHTML = str => {
const specialChars = {
'&': '&',
'<': '<',
'>': '>',
"'": ''',
'"': '"'
};
return str.replace(/[&<>'"]/g, tag => specialChars[tag] || tag);
};
// Check if Scroll-Snap is active.
exports.escapeHTML = escapeHTML;
const isScrollSnapActive = () => {
const scrollSnapStatus = elementorFrontend.isEditMode() ? elementor.settings.page.model.attributes?.scroll_snap : elementorFrontend.config.settings.page?.scroll_snap;
return 'yes' === scrollSnapStatus ? true : false;
};
exports.isScrollSnapActive = isScrollSnapActive;
/***/ }),
/***/ "../assets/dev/js/frontend/utils/video-api/base-loader.js":
/*!****************************************************************!*\
!*** ../assets/dev/js/frontend/utils/video-api/base-loader.js ***!
\****************************************************************/
/***/ ((__unused_webpack_module, exports) => {
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports["default"] = void 0;
class BaseLoader extends elementorModules.ViewModule {
getDefaultSettings() {
return {
isInserted: false,
selectors: {
firstScript: 'script:first'
}
};
}
getDefaultElements() {
return {
$firstScript: jQuery(this.getSettings('selectors.firstScript'))
};
}
insertAPI() {
this.elements.$firstScript.before(jQuery('