PageSourceSearch

https://www.poda.cz/business/_astro/ModalConsent.astro_astro_type_script_index_0_lang.CCQchF4l.js

js poda.cz collected 2026-10-04 13:26:07 UTC 2,923 bytes, 1 lines download raw bytes

1import{u as l}from"./Accordion.astro_astro_type_script_index_0_lang.BB7q6gJN.js";class c{constructor({state:e,element:t}){this.state=e,this.element=t,this.show(),this.bindEventListeners()}bindEventListeners(){this.element.querySelector(".modal-consent__expand-trigger-button")?.addEventListener("click",()=>{this.element.classList.add("modal-consent--expanded"),l()}),this.element.querySelectorAll(".modal-consent__accept-all-button, .modal-consent__save-button").forEach(o=>{o.addEventListener("click",this.handleSaveClick.bind(this))}),this.element.querySelectorAll(".toggle").forEach(o=>{o.addEventListener("change",this.handleToggleChange.bind(this))}),this.element.addEventListener("keydown",o=>{o.key==="Escape"&&o.preventDefault()})}handleSaveClick(e){e.preventDefault(),e.stopPropagation(),e.target.classList.contains("modal-consent__accept-all-button")&&(this.state={functional:!0,analytics:!0,personalization:!0,marketing:!0}),this.close(),i(this.state)}handleToggleChange(e){const t=e.target;t.id&&this.setToggle(t.id,t.checked)}close(){this.element.close()}setToggle(e,t){const a=document.getElementById(e);a&&(a.checked=t,a.setAttribute("aria-checked",String(t)),this.state[e]=t)}show(){document.getElementById("modal-consent-heading")?.focus(),Object.entries(this.state).forEach(([t,a])=>{const o=document.getElementById(t);o&&(o.checked=a,o.setAttribute("aria-checked",String(a)))}),this.element.showModal()}}function r(){const n=document.cookie.split("; ").find(e=>e.startsWith("consent="));if(!n)return null;try{const e=JSON.parse(decodeURIComponent(n.split("=")[1]));return e.level.length?{functional:e.level.includes("necessary"),analytics:e.level.includes("analytics"),personalization:e.level.includes("targeting"),marketing:e.level.includes("ads")}:null}catch{return null}}function d(n){const e=[];n.functional&&e.push("necessary"),n.analytics&&e.push("analytics"),n.personalization&&e.push("targeting"),n.marketing&&e.push("ads");const t=JSON.stringify({data:null,level:e,revision:0,rfc_cookie:!1}),a=e.length===4?60*60*24*365:60*60*24;document.cookie=[`consent=${t}`,`Max-Age=${a.toString()}`,"Path=/","SameSite=Lax",location.protocol==="https:"?"Secure":""].filter(Boolean).join("; ")}function i(n){window.dataLayer=window.dataLayer??[],d(n);const e={};n.analytics&&(e.analytics_storage="granted"),n.personalization&&(e.ad_personalization="granted"),n.marketing&&(e.ad_user_data="granted",e.ad_storage="granted");const t=setInterval(()=>{typeof window.gtag=="function"&&(window.gtag("consent","update",e),clearInterval(t),window.dataLayer.push({event:"consent_update",category:"consent",label:"updated"}))},50)}function s(){const n=r();if(n){i(n);return}const e=document.querySelector(".modal-consent");e&&(window.modalConsent=new c({state:{functional:!0,analytics:!0,personalization:!1,marketing:!1},element:e}))}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",s):s();

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.