1function dceGetElementSettings($element) { 2 var elementSettings = []; 3 var modelCID = $element.data("model-cid"); 4 if (elementorFrontend.isEditMode() && modelCID) { 5 var settings = elementorFrontend.config.elements.data[modelCID]; 6 var type = settings.attributes.widgetType || settings.attributes.elType; 7 var settingsKeys = elementorFrontend.config.elements.keys[type]; 8 if (!settingsKeys) { 9 settingsKeys = elementorFrontend.config.elements.keys[type] = []; 10 jQuery.each(settings.controls, function (name, control) { 11 if (control.frontend_available) { 12 settingsKeys.push(name); 13 } 14 }); 15 } 16 jQuery.each(settings.getActiveControls(), function (controlKey) { 17 if (-1 !== settingsKeys.indexOf(controlKey)) { 18 elementSettings[controlKey] = settings.attributes[controlKey]; 19 } 20 }); 21 } else { 22 elementSettings = $element.data("settings") || {}; 23 } 24 return elementSettings; 25} 26 27function dceIsSwiperLatest() { 28 let experiments = elementorFrontend.config.experimentalFeatures; 29 if (typeof experiments.e_swiper_latest === "undefined") { 30 return true; 31 } 32 return experiments.e_swiper_latest; 33} 34 35function dceObserveElement($target, $function_callback) { 36 if (!elementorFrontend.isEditMode()) { 37 return; 38 } 39 40 const config = { 41 attributes: true, 42 childList: false, 43 characterData: true, 44 }; 45 46 const MutationObserver = 47 window.MutationObserver || 48 window.WebKitMutationObserver || 49 window.MozMutationObserver; 50 const observer = new MutationObserver($function_callback); 51 52 observer.observe($target, config); 53} 54 55window.dynamicooo = {}; 56 57/** 58 * @copyright Elementor 59 * @license GPLv3 60 */ 61dynamicooo.getActiveBreakpointsMinPointAndPostfix = () => { 62 let breakpoints = elementorFrontend.config.responsive.activeBreakpoints; 63 let ret = {}; 64 for (let key in breakpoints) { 65 ret[key] = { 66 // Elementor widescreen value is actually the min breakpoint: 67 min_point: 68 elementorFrontend.breakpoints.getDeviceMinBreakpoint(key), 69 postfix: `_${key}`, 70 }; 71 } 72 ret.desktop = { 73 min_point: 74 elementorFrontend.breakpoints.getDeviceMinBreakpoint("desktop"), 75 postfix: "", 76 }; 77 return ret; 78}; 79 80/** 81 * Create a Swiper settings breakpoints object 82 * 83 * swiperSettings: An object with with Swiper settings keys as keys, and as values 84 * an object contains: 85 * - elementor_key: The Elementor Settings Key from where the value of the 86 * Swiper Key should be fetched. 87 * - default_value 88 * 89 * 90 * Returns the breakpoints object as defined by Swiper, value are 91 * automatically fetched from the Elementor settings. 92 */ 93dynamicooo.makeSwiperBreakpoints = ( 94 swiperSettings, 95 elementorSettings, 96 prefix = "", 97) => { 98 const elementorBreakpoints = 99 dynamicooo.getActiveBreakpointsMinPointAndPostfix(); 100 const breakpoints = {}; 101 const lastBreakpointValues = {}; 102 103 Object.keys(elementorBreakpoints) 104 .reverse() 105 .forEach((breakpointName) => { 106 let min_point = elementorBreakpoints[breakpointName].min_point; 107 108 if (elementorBreakpoints[breakpointName].postfix === "_mobile") { 109 min_point = 0; 110 } 111 112 let breakpointSettings = {}; 113 114 for (let swiperSettingsKey in swiperSettings) { 115 const setting = swiperSettings[swiperSettingsKey]; 116 const defaultValue = setting.default_value; 117 const elementorKeyWithPostfix = 118 prefix + 119 setting.elementor_key + 120 elementorBreakpoints[breakpointName].postfix; 121 let value = elementorSettings[elementorKeyWithPostfix]; 122 123 // When 'spaceBetween' control is set as slider, the value is an object with 'size' and 'unit' keys 124 if ( 125 swiperSettingsKey === "spaceBetween" && 126 typeof value === "object" 127 ) { 128 value = value.size || defaultValue; 129 } 130 131 value = 132 value || 133 dceGetParentValue( 134 lastBreakpointValues[swiperSettingsKey], 135 ) || 136 defaultValue; 137 value = value === "auto" ? value : Number(value); 138 139 if (!lastBreakpointValues[swiperSettingsKey]) { 140 lastBreakpointValues[swiperSettingsKey] = []; 141 } 142 lastBreakpointValues[swiperSettingsKey].push(value); 143 144 // Ensure that `slidesPerGroup` is set to 1 if `slidesPerView` is 1 so that scrolling will not bypass any slides 145 // This forcing is not passed into lastBreakpointValues 146 if ( 147 swiperSettingsKey === "slidesPerGroup" && 148 breakpointSettings["slidesPerView"] === 1 149 ) { 150 value = 1; 151 } 152 153 breakpointSettings[swiperSettingsKey] = value; 154 } 155 156 breakpoints[min_point] = breakpointSettings; 157 }); 158 return breakpoints; 159}; 160 161function dceGetParentValue(lastBreakpointValue) { 162 const lastIndex = lastBreakpointValue 163 ? lastBreakpointValue.findLastIndex((el) => el !== 0) 164 : -1; 165 if (lastIndex !== -1) { 166 return lastBreakpointValue[lastIndex]; 167 } 168 return false;
169} 170 171window.initMap = () => { 172 const event = new Event("dce-google-maps-api-loaded"); 173 window.dispatchEvent(event); 174};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.