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