PageSourceSearch

https://hoellammain.de/wp-content/themes/hoell/cache/min-4843d8ccaa3a7d30e75ad31e3758a825.js

js hoellammain.de collected 2026-10-06 19:57:10 UTC 8,873 bytes, 279 lines download raw bytes

1(function(){
2'use strict';
3var overlay=null;
4var isOpen=false;
5var currentId=null;
6function ensureOverlay(){
7if(overlay)return;
8overlay=document.createElement('div');
9overlay.className='hoell-cpt-popup';
10overlay.hidden=true;
11overlay.setAttribute('role','dialog');
12overlay.setAttribute('aria-modal','true');
13overlay.innerHTML=
14'<div class="hoell-cpt-popup__backdrop" data-cpt-popup-backdrop></div>'+
15'<div class="hoell-cpt-popup__container">'+
16'<button class="hoell-cpt-popup__close" type="button" aria-label="Schließen" data-cpt-popup-close>'+
17'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>'+
18'</button>'+
19'<div class="hoell-cpt-popup__content" data-cpt-popup-content></div>'+
20'</div>';
21document.body.appendChild(overlay);
22overlay.querySelector('[data-cpt-popup-close]').addEventListener('click',close);
23overlay.querySelector('[data-cpt-popup-backdrop]').addEventListener('click',function(e){
24if(e.target===e.currentTarget){
25close();
26}
27});
28}
29function open(popupId){
30if(isOpen){
31if(String(currentId)===String(popupId)){
32return;
33}
34swap(popupId);
35return;
36}
37var tpl=document.querySelector('template[data-cpt-popup-tpl="'+popupId+'"]');
38if(!tpl)return;
39ensureOverlay();
40applyTemplate(popupId,tpl);
41overlay.hidden=false;
42isOpen=true;
43currentId=popupId;
44if(tpl.getAttribute('data-lock-page')!=='false'){
45document.body.style.overflow='hidden';
46}
47requestAnimationFrame(function(){
48overlay.classList.add('is-active');
49});
50afterContentReady(popupId);
51}
52function swap(popupId){
53var tpl=document.querySelector('template[data-cpt-popup-tpl="'+popupId+'"]');
54if(!tpl){
55return;
56}
57var content=overlay.querySelector('[data-cpt-popup-content]');
58if(currentId!==null){
59document.querySelectorAll('style[data-cpt-popup-style="'+currentId+'"]').forEach(function(s){s.remove();});
60}
61content.classList.add('is-swapping');
62setTimeout(function(){
63applyTemplate(popupId,tpl);
64currentId=popupId;
65overlay.hidden=false;
66isOpen=true;
67overlay.classList.add('is-active');
68if(content){content.scrollTop=0;}
69requestAnimationFrame(function(){
70content.classList.remove('is-swapping');
71});
72afterContentReady(popupId);
73},180);
74}
75function applyTemplate(popupId,tpl){
76var displayType=tpl.getAttribute('data-display-type')||'overlay';
77var bgType=tpl.getAttribute('data-bg-type')||'color';
78var bgColor=tpl.getAttribute('data-bg-color')||'#1d2327';
79var bgOpacity=parseInt(tpl.getAttribute('data-bg-opacity')||'70',10)/100;
80var bgImage=tpl.getAttribute('data-bg-image')||'';
81var bgVideo=tpl.getAttribute('data-bg-video')||'';
82var sizePreset=tpl.getAttribute('data-size-preset')||'medium';
83var scrollEnabled=tpl.getAttribute('data-scroll')!=='false';
84var lockPage=tpl.getAttribute('data-lock-page')!=='false';
85var blurEnabled=tpl.getAttribute('data-blur')==='true';
86var blurStrength=parseInt(tpl.getAttribute('data-blur-strength')||'8',10);
87var customSizes=tpl.getAttribute('data-custom-sizes')||'';
88var mobileFullscreen=tpl.getAttribute('data-mobile-fullscreen')==='true';
89var mobileBgColor=tpl.getAttribute('data-bg-color-mobile')||'';
90var classes=['hoell-cpt-popup','hoell-cpt-popup--'+displayType];
91if(displayType==='overlay'){
92if(sizePreset!=='custom'){
93classes.push('hoell-cpt-popup--'+sizePreset);
94}
95if(!scrollEnabled){
96classes.push('hoell-cpt-popup--no-scroll');
97}
98if(mobileFullscreen){
99classes.push('hoell-cpt-popup--mobile-fullscreen');
100}
101}
102overlay.className=classes.join(' ');
103if(mobileBgColor&&/^#[0-9a-fA-F]{6}$/.test(mobileBgColor)){
104overlay.style.setProperty('--cpt-popup-mobile-bg',mobileBgColor);
105overlay.classList.add('hoell-cpt-popup--has-mobile-bg');
106}else{
107overlay.style.removeProperty('--cpt-popup-mobile-bg');
108}
109if(displayType==='overlay'&&sizePreset==='custom'&&customSizes){
110try{
111var sizes=JSON.parse(customSizes);
112if(sizes){
113var customStyle=document.createElement('style');
114customStyle.setAttribute('data-cpt-popup-style',popupId);
115customStyle.textContent=
116'.hoell-cpt-popup .hoell-cpt-popup__container {'+
117'width: '+(sizes.desktop_width||50)+'vw;'+
118'max-height: '+(sizes.desktop_height||85)+'vh;'+
119'}'+
120'@media (max-width: 1023px) {'+
121'.hoell-cpt-popup .hoell-cpt-popup__container {'+
122'width: '+(sizes.tablet_width||80)+'vw;'+
123'max-height: '+(sizes.tablet_height||90)+'vh;'+
124'}'+
125'}'+
126'@media (max-width: 768px) {'+
127'.hoell-cpt-popup .hoell-cpt-popup__container {'+
128'width: '+(sizes.mobile_width||100)+'vw;'+
129'max-height: '+(sizes.mobile_height||100)+'vh;'+
130'border-radius: 0;'+
131'}'+
132'}';
133document.head.appendChild(customStyle);
134}
135}catch(e){}
136}
137var backdrop=overlay.querySelector('[data-cpt-popup-backdrop]');
138backdrop.style.cssText='';
139backdrop.innerHTML='';
140if(bgType==='color'&&bgColor){
141if(blurEnabled){
142var r=parseInt(bgColor.slice(1,3),16);
143var g=parseInt(bgColor.slice(3,5),16);
144var b=parseInt(bgColor.slice(5,7),16);
145backdrop.style.backgroundColor='rgba('+r+','+g+','+b+','+bgOpacity+')';
146}else{
147backdrop.style.backgroundColor=bgColor;
148backdrop.style.opacity=bgOpacity;
149}
150}else if(bgType==='image'&&bgImage){
151backdrop.style.backgroundImage='url('+bgImage+')';
152backdrop.style.backgroundSize='cover';
153backdrop.style.backgroundPosition='center';
154backdrop.style.opacity=bgOpacity;
155}else if(bgType==='video'&&bgVideo){
156var video=document.createElement('video');
157video.autoplay=true;
158video.muted=true;
159video.loop=true;
160video.playsInline=true;
161video.className='hoell-cpt-popup__backdrop-video';
162video.style.opacity=bgOpacity;
163var source=document.createElement('source');
164source.src=bgVideo;
165video.appendChild(source);
166backdrop.appendChild(video);
167}else if(bgType==='none'){
168backdrop.style.backgroundColor='transparent';
169}
170if(blurEnabled&&displayType==='overlay'){
171backdrop.classList.add('hoell-cpt-popup__backdrop--blur');
172backdrop.style.setProperty('--popup-blur',blurStrength+'px');
173}
174var content=overlay.querySelector('[data-cpt-popup-content]');
175content.innerHTML='';
176content.appendChild(tpl.content.cloneNode(true));
177var styles=content.querySelectorAll('style');
178styles.forEach(function(style){
179style.setAttribute('data-cpt-popup-style',popupId);
180document.head.appendChild(style);
181});
182}
183function afterContentReady(popupId){
184var content=overlay.querySelector('[data-cpt-popup-content]');
185document.dispatchEvent(new CustomEvent('hoell:pageload',{
186detail:{popupId:popupId,container:content}
187}));
188if(window.hoellInitVideoViewport){
189window.hoellInitVideoViewport();
190}
191initCf7Forms(content);
192}
193function initCf7Forms(container){
194if(!container||!window.wpcf7||typeof window.wpcf7.init!=='function'){
195return;
196}
197var forms=container.querySelectorAll('.wpcf7 > form');
198forms.forEach(function(form){
199if(form.wpcf7){
200return;
201}
202window.wpcf7.init(form);
203var wrap=form.closest('.wpcf7');
204if(wrap){
205wrap.classList.replace('no-js','js');
206}
207});
208}
209function close(){
210if(!isOpen)return;
211overlay.classList.remove('is-active');
212overlay.classList.add('is-leaving');
213var closingId=currentId;
214var CSS_LEAVE_MS=300;
215var contentEl=overlay.querySelector('[data-cpt-popup-content]');
216document.body.style.overflow='';
217isOpen=false;
218currentId=null;
219var leaveMs=CSS_LEAVE_MS;
220var exitPromise=(window.hoellAnimations&&contentEl)
221?window.hoellAnimations.exit(contentEl)
222:Promise.resolve(0);
223var teardown=function(){
224overlay.classList.remove('is-leaving');
225overlay.hidden=true;
226overlay.className='hoell-cpt-popup';
227overlay.style.removeProperty('--cpt-popup-mobile-bg');
228var content=overlay.querySelector('[data-cpt-popup-content]');
229if(content)content.innerHTML='';
230var container=overlay.querySelector('.hoell-cpt-popup__container');
231if(container)container.style.cssText='';
232var backdrop=overlay.querySelector('[data-cpt-popup-backdrop]');
233if(backdrop){
234backdrop.style.cssText='';
235backdrop.innerHTML='';
236backdrop.classList.remove('hoell-cpt-popup__backdrop--blur');
237}
238document.querySelectorAll('style[data-cpt-popup-style="'+closingId+'"]').forEach(function(s){
239s.remove();
240});
241};
242exitPromise.then(function(ms){
243setTimeout(teardown,Math.max(leaveMs,ms||0));
244});
245}
246document.addEventListener("click",function(e){
247var trigger=e.target.closest("[data-cpt-popup]");
248if(!trigger)return;
249e.preventDefault();
250e.stopPropagation();
251var popupId=trigger.getAttribute("data-cpt-popup");
252if(popupId){
253open(popupId);
254}
255},true);
256document.addEventListener('click',function(e){
257if(!isOpen||!overlay)return;
258var link=e.target.closest('a[href]');
259if(!link)return;
260if(!link.closest('[data-cpt-popup-content]'))return;
261if(link.hasAttribute('data-cpt-popup'))return;
262if(link.hasAttribute('data-popup'))return;
263if(link.target==='_blank')return;
264var href=link.getAttribute('href')||'';
265if(!href||href.startsWith('#')||href.startsWith('mailto:')||href.startsWith('tel:'))return;
266close();
267});
268document.addEventListener('keydown',function(e){
269if(e.key==='Escape'&&isOpen){
270close();
271}
272});
273window.hoellCptPopup={
274open:open,
275close:close,
276isOpen:function(){return isOpen;},
277currentId:function(){return currentId;}
278};
279})();

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.