1import{n as e,t}from"../Cko4QHwX/chunks/chunk.js";import{t as s}from"../CoucXh9X/chunks/event-driver.js";import{t as i}from"../CDFYHPvw/chunks/click-outside.js";import{t as n}from"../Bq3srVt-/chunks/phaser.js";import{t as r}from"../CyKB-XFQ/chunks/global-store.js";import{n as o,r as a,t as l}from"../DZ2_38_T/chunks/style-helper.js";import{t as c}from"../CC3ViF_F/chunks/data-layer.js";import{t as d}from"../DWmAJUFz/chunks/debug.js";import{t as h}from"../C5SfoI3_/chunks/data-layer-flusher.js";import{t as u}from"../C1lE9ujo/chunks/event-id-generator.js";import{i as m,n as p,r as g,t as f}from"../C96tlvtw/chunks/password-input.js";import{t as v}from"../DwcWeALY/chunks/user-box.js";import{i as w,n as y,r as b,t as S}from"../_A2rq0o3/chunks/decodable.js";import{t as L}from"../DK10nuoZ/chunks/notification-bar.js";import{n as k}from"../BRCiqJYr/chunks/query.js";import{t as E}from"../kncy5Ng4/chunks/keyboard.js";import{t as j}from"../ChwA8AmZ/chunks/lazyload.js";import{t as M}from"../CUjoLsGS/chunks/platform.js";import{t as _}from"../DQAJHKoR/chunks/modal.js";import{t as C}from"../CqAV2JzN/chunks/drag-scroll.js";import{t as x}from"../BPe1pWkf/chunks/fade-area.js";import{t as q}from"../B_JJs7Dk/chunks/htmx.esm.js";import{t as I}from"../4sgPJHRi/chunks/tag-bridge.js";import{t as T}from"../C6eL128d/chunks/login-anchor.js";import{t as D}from"../B3lvogq-/chunks/preload-helper.js";import{t as A}from"../B8rTeiJt/chunks/cookie.js";import{t as O}from"../Dh8TUk_i/chunks/lazy-ad-handler.js";import{t as P}from"../Zebr8AlW/chunks/seznam-traffic.js";import{t as B}from"../DgnK-u_X/chunks/create-script.js";var H=new class{forms=document.querySelectorAll("form");constructor(){this.attachListeners(this.forms)}attachListeners(e){e.forEach(e=>{"true"!==e.dataset.formMeasurementAttached&&(e.addEventListener("submit",e=>this.measure(e)),e.dataset.formMeasurementAttached="true",d.log(`Form Measurement | Attached listener to form: ${this.formId(e)}`))})}updateForms(){const e=document.querySelectorAll("form");this.forms=e,this.attachListeners(this.forms),d.log(`Form Measurement | Forms updated. Total forms: ${this.forms.length}`)}measure(e){const t=e.target,s=!e.defaultPrevented,i={event:"form_send",event_data:{event_id:u.generate(),id:this.formId(t),name:this.formName(),app_name:this.formAppName(),text:this.submitterText(e),type:this.formType(t),sub_type:this.formSubtype(t),category:this.formCategory(t),area:this.formArea(t),site:this.site,method:this.method},_clear:!0};s?(c.push(i),d.log("Form Measurement | Pushed ",i)):(h.push(i),d.log("Form Measurement | Flushed",i))}get site(){return location.origin}get method(){return"form"}formId(e){if(e.id)return e.id;return Array.from(e.classList).find(e=>e.startsWith("js-"))||"anonymous_form"}formName(){return"no_form_name"}formAppName(){return"no_form_app_name"}submitterText(e){const t=e.submitter;return t?"BUTTON"===t.tagName?t.textContent?.trim()??"":"INPUT"===t.tagName?t.value.trim():"anonymous_submit":"anonymous_submit"}formType(e){return e.dataset.formType??"no_form_type"}formSubtype(e){return e.dataset.formSubtype??"no_form_subtype"}formCategory(e){return e.dataset.formCategory??"no_form_category"}formArea(e){return e.dataset.formArea??"no_form_area"}},z=(e,t)=>{e.forEach(e=>{if("true"===e.dataset.viewMeasurementAttached)return;const s=new IntersectionObserver(i=>{i.forEach(i=>{i.isIntersecting&&(t(i.target,{followsRedirect:!1}),s.unobserve(e))})});s.observe(e),e.dataset.viewMeasurementAttached="true",d.log(`View Measurement | Attached observer to element: ${e.id||e.className}`)})},R=new class extends m{constructor(){super("interaction_view",z,"[data-view-measurement]")}},$=class e{isDesktop=!0;elements;static SESSION_KEY="originalReferrer";static CLICK_COUNT_KEY="backServerClickCount";static MAX_CLICKS=2;static WHITE_LIST=[".denik.cz","denik-local","-aqua-denik.test-online.vlp.cz"];constructor(){this.isDesktop=a(`(min-width: ${o})`),this.elements={desktop:document.querySelector(".js-header-back-button"),mobile:document.querySelector(".js-header-back-button-mobile"),region:document.querySelector(".js-header-back-button-region"),regionName:document.querySelector(".js-
1header-back-button-region-name"),regionMain:document.querySelector(".js-header-back-button-region-main")},this.handleShowBackServerParam()||(this.handleDistrictClickTracking(),this.handleBackServer())}handleShowBackServerParam(){const e=new URL(location.href);return"false"===e.searchParams.get("showBackServer")&&(e.searchParams.delete("showBackServer"),history.replaceState(null,"",e.toString()),this.clearSessionData(),!0)}getSessionReferrer(){return sessionStorage.getItem(e.SESSION_KEY)}clearSessionData(){sessionStorage.removeItem(e.SESSION_KEY),sessionStorage.removeItem(e.CLICK_COUNT_KEY)}normalizeUrl(e){try{const{origin:t,pathname:s}=new URL(e);return t+s.replace(/\/$/,"")}catch{return e}}isSameSiteUrl(){return!!document.referrer&&this.normalizeUrl(location.href)===this.normalizeUrl(document.referrer)}isNavigationSkip(){const e=(window.performance.getEntriesByType("navigation")||[])[0]?.type;return"reload"===e||"back_forward"===e||"#login-modal"===location.hash||this.isSameSiteUrl()}handleDistrictClickTracking(){if(!this.getSessionReferrer())return void sessionStorage.removeItem(e.CLICK_COUNT_KEY);if(this.isNavigationSkip())return;const t=parseInt(sessionStorage.getItem(e.CLICK_COUNT_KEY)??"0",10)+1;t>e.MAX_CLICKS?this.clearSessionData():sessionStorage.setItem(e.CLICK_COUNT_KEY,t.toString())}normalizeDistrictSlug(e){return"fm"===e?"frydeckomistecky":e}extractDistrict(e){try{const{hostname:t,pathname:s}=new URL(e);return k().devsite||(s.startsWith("/--")?s.split("/")[1]?.substring(2)||"denik":t.split(".")[0]||"denik")}catch{return"denik"}}setReferrer(t){sessionStorage.setItem(e.SESSION_KEY,t)}handleBackServer(){const{desktop:t,mobile:i}=this.elements;if(!t||!i)return;const n=this.getSessionReferrer(),r=n??document.referrer;if(!r)return;const o=this.isNavigationSkip();if(!n&&o)return;const a=this.extractDistrict(r);if(a!==this.extractDistrict(location.href)){if(!n&&document.referrer.length>0&&null===sessionStorage.getItem(e.CLICK_COUNT_KEY)&&(this.setReferrer(r),sessionStorage.setItem(e.CLICK_COUNT_KEY,"1")),(document.referrer&&"/"!==n||(this.clearSessionData(),!n))&&a&&this.isWhiteListedReferrer(r)){this.setupBackButtonUI(r,!!n),this.updateRegionInfo(a),s.dispatch({name:"backButton",value:!0});const e=()=>this.setReferrer(r);t.addEventListener("click",e),i.addEventListener("click",e)}}else n&&!o?this.setReferrer("/"):this.clearSessionData()}isWhiteListedReferrer(t){return e.WHITE_LIST.some(e=>t.includes(e))&&!t.includes("predplatne.denik.cz")}setupBackButtonUI(e,t){const{desktop:s,mobile:i}=this.elements;if(!s||!i)return;(t?i:s).classList.remove("hidden"),s.classList.remove("lg:hidden");const n=new URL(e);n.searchParams.set("showBackServer","false"),s.href=n.toString(),i.href=n.toString(),!this.isDesktop&&t||s.classList.add("active")}updateRegionInfo(e){const{regionMain:t,region:s,regionName:i}=this.elements;"www"!==e?(s?.classList.remove("hidden"),i&&("pr"===e?(i.textContent="PR",i.classList.add("-mt-1","mb-1","text-xs")):i.textContent=this.normalizeDistrictSlug(e)),s&&"deniksvami"===e&&(s.innerHTML=`<i class="logo !leading-none text-xl">${e}</i>`)):t?.classList.remove("hidden")}},U=class{closedByUser=!1;constructor(){const e=document?.querySelector(".js-megaboard-toggle");e&&(e.addEventListener("click",()=>{this.toggle(!0)}),E.onPress("Escape","megaboard",()=>{this.close(!0)},!0))}open(e){if(this.closedByUser&&!e)return;e&&(this.closedByUser=!1);const t=document.querySelector(".js-megaboard"),s=t?.querySelector(".js-megaboard-label");t?.classList.remove("translate-x-[30rem]"),t?.classList.remove("translate-x-[32rem]"),s&&(s.innerText="ZavÅÃt reklamu (esc)")}close(e){e&&(this.closedByUser=!0);const t=document.querySelector(".js-megaboard"),s=t?.querySelector(".js-megaboard-label");t?.classList.remove("translate-x-[32rem]"),t?.classList.add("translate-x-[30rem]"),s&&(s.innerText="OtevÅÃt reklamu (esc)")}hide(){const e=document.querySelector(".js-megaboard"),t=e?.querySelector(".js-megaboard-label");e?.classList.remove("translate-x-[30rem]"),e?.classList.add("translate-x-[32rem]"),t&&(t.innerText="OtevÅÃt reklamu (esc)")}toggle(e){const t=document.querySelector(".js-megaboard");t?.classList.contains("translate-x-[30rem]")||t?.classList.contains("translate-x-[32rem]")?this.open(e):this.close(e)}handleStickyChange(e){e?this.closedByUser?this.close(!1):this.open(!1):this.hide()}},N=class{element=null;mainMenu=null;menuDragScroll=null;container=null;submenu=null;scrollSection=null;isDesktop=!0;prevScroll=0;isSticked=!1;position=0;prevPosition=0;topOffset=0;scrollSectionBoundary=0;popupScrollFadePx=12;popupScrollMutationObserver=null;megaboard;isSubscriber=!1;config={megaboard:{enabled:!1}};constructor(e){this.isDesktop=a(`(min-width: ${o})`),e&&(this.config=e),this.element=document.querySelector(".js-
1header"),this.element&&(this.mainMenu=this.element.querySelector(".js-header-main-menu"),this.mainMenu&&(this.menuDragScroll=this.mainMenu?.querySelector(".js-drag-scroll"),this.container=this.element.querySelector(".js-header-container"),this.container&&(this.submenu=this.element.querySelector(".js-header-submenu"),this.scrollSection=this.element.querySelector(".js-header-scroll-section"),this.setup())))}setup(){new L,this.config.megaboard.enabled&&(this.megaboard=new U),this.initKeyboard(),this.initUserBox(),this.initScroll(),this.initResize(),new $,this.setTopOffset(),this.setPopupOffset(),this.initPopupScrollFades()}initKeyboard(){s.receive("toggle",e=>{e.active||this.handleLockHtmlScroll("remove")})}initUserBox(){v?.store.subscribe(e=>{const t=e.getState();"authenticated"===t.mode&&this.handleUserMenu(t.data)})}initScroll(){window.addEventListener("scroll",()=>{this.updateStickyState(),this.updateScrollSection(),this.setDialogOffset(),this.setPopupOffset(),this.refreshPopupScrollFades(),this.isSticked&&this.handleLockHtmlScroll("add"),this.megaboard?.handleStickyChange(this.isSticked)})}initResize(){window.addEventListener("resize",()=>{this.isDesktop=a(`(min-width: ${o})`),this.setTopOffset(),this.isDesktop?(this.element.classList.remove("active"),this.handleLockHtmlScroll("remove")):this.setDialogOffset(),this.refreshPopupScrollFades()})}updateStickyState(){const e=this.isDesktop?this.mainMenu:this.container;this.isSticked=e.getBoundingClientRect().y<=2,this.element.classList.toggle("sticked",this.isSticked),this.menuDragScroll?.classList.toggle("-ml-2.5",!this.isSticked)}setPopupOffset(){const{top:e,height:t}=this.mainMenu?.getBoundingClientRect()??{top:0,height:0};this.setProperty(this.mainMenu,"popup",e+t)}updateScrollSection(){if(!this.scrollSection)return;const e=this.scrollSection.getBoundingClientRect(),t=this.element.nextElementSibling?.getBoundingClientRect(),s=e.height,i=Math.max(window.scrollY+this.topOffset,0),n=i>this.prevScroll?"down":"up";this.prevScroll=i,this.position=Math.min(Math.max(this.position+(i-this.prevPosition),0),s),this.setScrollSectionOffset(e,n,t),this.prevPosition=i}handleUserMenu(e){this.isSubscriber=e.paywall.active;const{name:t,surname:s,avatar:i,username:n}=e.userData,r=document.querySelectorAll(".js-header-user-avatar"),o=document.querySelectorAll(".js-header-user-avatar-img"),a=document.querySelectorAll(".js-header-user-avatar-premium-ring"),l=document.querySelectorAll(".js-header-subscription-button");if(i)o.forEach(e=>{e.src=i});else{const e=t??"",i=s??"",a=e&&i?e.charAt(0)+i.charAt(0):n.substring(0,2);r.forEach(e=>{e.innerHTML=a.toUpperCase()}),o.forEach(e=>{e.classList.add("group-[.active]/user-menu:outline-grey-2","group-[.active]/user-menu:outline")})}r.forEach(e=>{this.isSubscriber&&e.classList.add("outline","outline-2","outline-grey-1","lg:outline-surface","-outline-offset-1","lg:group-[.active]/user-menu:outline-grey-3")}),a.forEach(t=>{e.paywall.active&&t.classList.remove("hidden")}),this.isSubscriber&&l.forEach(e=>{e.classList.add("!hidden"),e.classList.remove("lg:!inline-block"),e.parentElement?.classList.contains("js-header-user-menu")&&(e.parentElement?.classList.remove("justify-between"),e.parentElement?.classList.add("justify-end"))})}setProperty(e,t,s){e?.style.setProperty("--"+t+"-offset",s+"px")}setTopOffset(){this.topOffset=parseFloat(window.getComputedStyle(this.element).top)}setScrollSectionOffset(e,t,s){if(!this.scrollSection||!this.isSticked)return;const i=e.height,n=window.scrollY;if("up"===t)return this.scrollSectionBoundary=0,this.setProperty(this.scrollSection,"header-scroll-section",0),void this.scrollSection.classList.add("sticked");this.scrollSectionBoundary||(this.scrollSectionBoundary=n);const r=n-this.scrollSectionBoundary;if(s&&s.top<=i)return this.setProperty(this.scrollSection,"header-scroll-section",Math.round(-i)),void this.scrollSection.classList.add("sticked");this.setProperty(this.scrollSection,"header-scroll-section",Math.round(Math.max(-r,-i))),this.scrollSection.classList.remove("sticked")}setDialogOffset(){if(!this.isDesktop){const{bottom:e}=this.container.getBoundingClientRect();this.setProperty(this.element,"dialog",Math.round(e))}}isInDialog(e,t){return t.clientX>=e.left&&t.clientX<=e.right&&t.clientY>
1=e.top&&t.clientY<=e.bottom}bindPopupScrollFades(){this.element&&this.element.querySelectorAll(".js-header-popup-scroll").forEach(e=>{if("true"===e.dataset.headerPopupScrollBound)return;e.dataset.headerPopupScrollBound="true";const t=()=>this.updatePopupScrollFade(e);e.addEventListener("scroll",t,{passive:!0}),"undefined"!=typeof ResizeObserver&&new ResizeObserver(t).observe(e),t()})}refreshPopupScrollFades(){this.element?.querySelectorAll(".js-header-popup-scroll").forEach(e=>{"true"===e.dataset.headerPopupScrollBound&&this.updatePopupScrollFade(e)})}updatePopupScrollFade(e){const t=this.popupScrollFadePx,{scrollTop:s,scrollHeight:i,clientHeight:n}=e;if(!(i>n+2)||n<2*t)return e.style.removeProperty("mask-image"),void e.style.removeProperty("-webkit-mask-image");let r;r=s<=2?`linear-gradient(to bottom, #000 0%, #000 calc(100% - ${t}px), transparent 100%)`:s+n>=i-2?`linear-gradient(to bottom, transparent 0%, #000 ${t}px, #000 100%)`:`linear-gradient(to bottom, transparent 0%, #000 ${t}px, #000 calc(100% - ${t}px), transparent 100%)`,e.style.setProperty("mask-image",r),e.style.setProperty("-webkit-mask-image",r)}initPopupScrollFades(){this.element&&(this.bindPopupScrollFades(),this.popupScrollMutationObserver=new MutationObserver(()=>{this.bindPopupScrollFades(),this.refreshPopupScrollFades()}),this.popupScrollMutationObserver.observe(this.element,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class","open"]}))}handleLockHtmlScroll(e="add"){const t=["active"].some(e=>this.element.classList.contains(e));t&&"add"===e&&document.documentElement.classList.add("overflow-hidden"),t||"remove"!==e||document.documentElement.classList.remove("overflow-hidden")}},F=class{constructor(e){window.pp_gemius_identifier||(window.pp_gemius_identifier=e,window.pp_gemius_use_cmp=!0,window.pp_gemius_cmp_timeout=1e4,window.gemius_pending=e=>{window[e]=window[e]||(()=>{window[`${e}_pdata`]=window[`${e}_pdata`]||[],window[`${e}_pdata`].push(arguments)})},window.gemius_pending("gemius_hit"),window.gemius_pending("gemius_event"),window.gemius_pending("pp_gemius_hit"),window.gemius_pending("pp_gemius_event"),p(()=>{((e,t)=>
1{try{const s=e.createElement(t),i=e.getElementsByTagName(t)[0],{gemius:{apiUrl:n}}=r.get("integrations");s.setAttribute("async","async"),s.src=n,i&&i.parentNode&&i.parentNode.insertBefore(s,i)}catch(s){console.error(s)}})(document,"script")}))}},Y=class{constructor(e){e&&(this.handleClick(e),window.addEventListener("scroll",()=>{window.scrollY>200?e.classList.remove("translate-y-48"):e.classList.add("translate-y-48")}))}handleClick(e){e.addEventListener("click",e=>{e.preventDefault(),window.scrollTo({top:0,behavior:"smooth"})})}},K=class{loginModalCategory="login_popup";questionModalCategory="after_login_popup";constructor(){const{isLogged:e}=r.get("auth"),t=document.querySelector(".js-consent-login-modal"),s=t?.getAttribute("data-identifier"),i=document.querySelector(".js-consent-question-modal"),n=i?.getAttribute("data-identifier");if(t&&s&&i&&n){const r=new _(t,{enableClose:!0}),o=new _(i,{enableClose:!0});if(e)return;const a=document.querySelectorAll(".js-consent-login"),l=document.querySelectorAll(".js-consent-question");a.forEach(e=>{e.addEventListener("click",()=>{this.sendGAevent("login",this.loginModalCategory,"regwall"===e.getAttribute("data-type")?"regwall":"the_third_party")})}),l.forEach(e=>{e.addEventListener("click",()=>{this.sendGAevent("question",this.questionModalCategory,e.getAttribute("data-text")??e.innerHTML)})}),window.addEventListener("modal",({detail:e})=>{let t;"close"===e.event&&e.identifier===s&&(o.showModal(),l.forEach(e=>{e.addEventListener("click",()=>{o.closeModal()})})),"close"===e.event&&(e.identifier===s&&(t=this.loginModalCategory),e.identifier===n&&(t=this.questionModalCategory),t&&("close-button"===e.type&&this.sendGAevent("close",t,"close_x",!0),"backdrop"===e.type&&this.sendGAevent("close",t,"close_tap",!0)))}),window.didomiEventListeners=window.didomiEventListeners||[],window.didomiEventListeners.push({event:"consent.changed",listener:function(){r.showModal()}}),document.querySelectorAll(".js-consent-login-trigger").forEach(e=>{e.addEventListener("click",()=>{r.showModal()})})}}sendGAevent(e,t,s,i=!1){(i?h:c).push({event:"ga_event",event_data:{action:e,category:t,label:s},_clear:!0})}},V=class{sideId="1140831083485215806";constructor(){const e=window.cX||{};e.callQueue=e.callQueue||[],e.callQueue.push(["setSiteId",this.sideId]),e.callQueue.push(["sendPageViewEvent"]);const t=document.createElement("script");t.async=!0,t.src=window.location.protocol+"//cdn.cxense.com/cx.js",document.head.appendChild(t)}},W=class{style={fill:"",stroke:"",regionStroke:""};toInteract=[];toHide=[];constructor(e="district",t="fill-grey-3",i="stroke-grey-2",n="stroke-surface"){const r="region"===e;this.style.fill=t,this.style.stroke=i,this.style.regionStroke=n;const o=document.querySelectorAll(".js-map path, .js-map polygon"),a=Array.from(o).filter(e=>e.id.includes("kraj")),l=Array.from(o).filter(e=>!e.id.includes("kraj"));r?(this.toHide=l,this.toInteract=a):(this.toHide=a,this.toInteract=l),this.toHide.forEach(e=>{r?e.classList.add("hidden"):(e.classList.add("pointer-events-none"),e.classList.add("fill-transparent"),e.classList.add(this.style.regionStroke))}),this.toInteract.forEach(e=>{e.classList.add(this.style.stroke),e.classList.add(this.style.fill),e.classList.add("cursor-pointer"),e.addEventListener("mouseenter",()=>{this.hover(e),r||this.hoverNeighbors(e),s.dispatch({name:"map",value:{event:"mouseenter",area:this.getAreaInfo(e)}})}),e.addEventListener("mouseleave",()=>{this.reset(),s.dispatch({name:"map",value:{event:"mouseleave",area:this.getAreaInfo(e)}})}),e.addEventListener("mousedown",()=>{this.active(e)}),e.addEventListener("mouseup",()=>{this.reset()}),e.addEventListener("click",()=>{s.dispatch({name:"map",value:{event:"click",area:this.getAreaInfo(e)}})})})}hoverNeighbors(e){e&&this.getAreaInfo(e)?.related.map(e=>this.hover(document.querySelector(`.js-map #${e}`)))}hover(e){e&&(e.classList.remove(this.style.fill),e.classList.add("fill-surface/50"))}active(e){e&&(e.classList.remove("fill-surface/50"),e.classList.add("fill-surface/80"))}reset(){this.toInteract.forEach(e=>{e.classList.add(this.style.fill),e.classList.remove("fill-surface/50"),e.classList.remove("fill-surface/80")})}getAreaInfo(e){const{districtList:t}=r.get("geo");return t?.filter(t=>t.id===e.id).shift()}},Q=class{element;currentList;recentlyVisited;search;inputElement;inputWrapElement;dropdownElement;dropdownToggleElement;clearElement;activeItem;isMobile;regionSelectElement;headerElement;headerContainer;trigger;wrap;closeButton;mobileModal;isOpen=!1;constructor(e=!0){const{districtList:t}=r.get("geo");this.isMobile=!a(`(min-width: ${o})`),this.element=document.querySelector(this.isMobile?".js-mobile-region":".js-desktop-region"),this.currentList=t??[],this.recentlyVisited=[],this.search="",this.inputElement=null,this.inputWrapElement=null,this.dropdownElement=null,this.dropdownToggleElement=null,this.clearElement=null,this.activeItem=null,this.regionSelectElement=null,this.headerElement=null,this.headerContainer=null,this.trigger=null,this.wrap=null,this.closeButton=null,this.mobileModal=null,this.element&&(this.regionSelectElement=this.element.querySelector(".js-region-select"),this.headerElement=document.querySelector(".js-
1header"),this.headerContainer=document.querySelector(".js-header-container"),this.trigger=document.querySelector(this.isMobile?".js-region-select-trigger-mobile":".js-region-select-trigger-desktop"),this.wrap=document.querySelector(this.isMobile?".js-mobile-region":".js-desktop-region"),this.closeButton=document.querySelector(".js-region-select-close"),this.isMobile&&this.wrap&&(this.mobileModal=new _(this.wrap,{enableClose:!0,backdropCallback:()=>{this.hide()}})),this.handleCloseOnCache(),this.renderClearButton(),this.handleDropdown(),this.handleRecent(),this.handleTabs(),this.initTriggers(),this.initKeyboard(),this.initCloseButtonLabel(),this.initResize(),this.isMobile||this.handleMap(),e&&this.show())}initTriggers(){this.trigger?.addEventListener("click",()=>{this.isOpen?this.hide():this.show()}),this.closeButton?.addEventListener("click",()=>{this.hide()}),this.wrap&&!this.isMobile&&i(this.wrap,e=>{this.trigger?.contains(e.target)||this.isOpen&&this.hide()})}initResize(){window.addEventListener("resize",()=>{this.isMobile=!a(`(min-width: ${o})`)})}initKeyboard(){E.onPress("Escape","region-select",()=>{this.hide()})}initCloseButtonLabel(){this.closeButton&&(this.isMobile||(this.closeButton.innerHTML=M.isSafari()?"(⥠+ esc)":"(esc)",this.closeButton.innerHTML+='<i class="icon">close</i>'))}show(){this.isOpen=!0,this.headerElement?.classList.add("region-select"),this.headerElement?.classList.remove("active"),this.isMobile?(this.updateDialogOffset(),this.mobileModal?.showModal()):this.wrap?.classList.remove("hidden"),a("(max-height: 40em)")&&!this.isMobile?this.handleRetardDisplay():a("(max-height: 60em)")&&!this.isMobile?this.scrollMapIntoView():document.documentElement.classList.add("overflow-hidden"),E.setActiveCallback("Escape","region-select")}handleRetardDisplay(){if(!this.element)return;const e=this.element.querySelector(".js-map"),t=this.element.querySelector(".js-region-select-map-wrap"),s=this.element.querySelector(".js-region-select-list");e?.classList.add("hidden"),t?.classList.add("!hidden"),s?.classList.remove("lg:hidden")}scrollMapIntoView(){if(!this.element)return;const e=this.element.querySelector(".js-map"),t=this.element.querySelector(".js-region-select-scroll-container");e&&t&&(t.scrollIntoView({behavior:"instant",block:"end"}),e.scrollIntoView({behavior:"instant",block:"end"}))}hide(){this.isOpen=!1,this.headerElement?.classList.remove("region-select"),document.documentElement.classList.remove("overflow-hidden"),this.isMobile?this.mobileModal?.closeModal():this.wrap?.classList.add("hidden")}updateDialogOffset(){if(!this.headerContainer)return;const{bottom:e}=this.headerContainer.getBoundingClientRect();this.headerElement?.style.setProperty("--dialog-offset",`${Math.round(e)}px`)}renderClearButton(){this.element&&this.element.querySelector(".js-region-select-input")?.insertAdjacentHTML("beforeend",'<i class="js-region-select-clear icon absolute text-surface right-10 top-3 cursor-pointer hidden">close_fill</i>')}handleDropdown(){this.element&&(this.inputElement=this.element.querySelector(".js-region-select-input input"),this.inputWrapElement=this.element.querySelector(".js-region-select-input-wrap"),this.dropdownElement=this.element.querySelector(".js-region-select-dropdown"),this.dropdownToggleElement=this.element.querySelector(".js-region-select-dropdown-toggle"),this.clearElement=this.element.querySelector(".js-region-select-clear"),this.isMobile||document.addEventListener("keypress",this.keyPressHandler.bind(this)),i(this.inputWrapElement,()=>{this.resetDropdown()}),this.setupDropdownToggle(),this.setupClearButton(),this.setupInput())}keyPressHandler(e){"Enter"===e.key&&(null!==this.activeItem?this.visit(this.activeItem):1===this.currentList.length&&this.visit(this.currentList[0]))}setupInput(){this.inputElement?.addEventListener("input",e=>{if(this.resetDropdown(),this.search=e.target.value,0===this.search.length)return this.hideDropdown(),void this.clearElement?.classList.add("hidden");this.clearElement?.classList.remove("hidden"),this.currentList=this.getDropdownItems(this.search),this.currentList.map(e=>this.renderDropdown(e)),this.currentList.length>0?this.showDropdown():this.hideDropdown(),this.search.length>0&&0===this.currentList.length?this.dropdownToggleElement?.classList.add("hidden"):this.dropdownToggleElement?.classList.remove("hidden"),this.activeItem=null}),this.inputElement?.addEventListener("keydown",this.handleArrows.bind(this))}handleArrows(e){if("ArrowDown"===e.key&&(e.preventDefault(),this.currentList.length>0))if(null==this.activeItem)this.activeItem=this.currentList[0];else{const e=this.currentList.indexOf(this.activeItem)+1;this.activeItem=this.currentList.length>e?this.currentList[e]:this.currentList[0]}if("ArrowUp"===e.key&&(e.preventDefault(),this.currentList.length>0))if(null==this.activeItem)this.activeItem=this.currentList[this.currentList.length-1];else{const e=this.currentList.indexOf(this.activeItem)-1;this.activeItem=e<0?this.currentList[this.currentList.length-1]:this.currentList[e]}this.renderActiveItem()}renderActiveItem(){const e=this.dropdownElement?.querySelector(`[data-id='${this.activeItem?.id}']`);this.dropdownElement?.querySelectorAll(".js-region-select-dropdown-link")?.forEach(t=>{t.classList.toggle("bg-primary-2",t===e),t.classList.toggle("text-surface",t===e)}),e?.scrollIntoView(!1)}
1setupDropdownToggle(){this.dropdownToggleElement?.addEventListener("click",()=>{this.dropdownElement?.classList.contains("hidden")?(this.currentList=this.getDropdownItems(this.search),this.currentList.map(e=>this.renderDropdown(e)),this.showDropdown()):this.resetDropdown()})}showDropdown(){this.dropdownElement?.classList.remove("hidden"),this.dropdownToggleElement?.classList.add("rotate-180"),this.inputElement?.classList.add("!rounded-b-none"),this.inputWrapElement?.classList.add("before:z-30","before:absolute","before:h-px","before:bg-grey-2","before:top-10","before:left-3","before:right-3")}hideDropdown(){this.dropdownElement?.classList.add("hidden"),this.dropdownToggleElement?.classList.remove("rotate-180"),this.inputElement?.classList.remove("!rounded-b-none"),this.inputWrapElement?.classList.remove("before:z-30","before:absolute","before:h-px","before:bg-grey-2","before:top-10","before:left-3","before:right-3")}resetDropdown(){this.dropdownElement&&(this.dropdownElement.innerHTML=""),this.hideDropdown(),this.currentList=[]}setupClearButton(){this.clearElement?.addEventListener("click",()=>{this.inputElement&&(this.inputElement.value=""),this.search="",this.clearElement?.classList.add("hidden"),this.dropdownToggleElement?.classList.remove("hidden"),this.resetDropdown()})}getDropdownItems(e){const{districtList:t}=r.get("geo");return t?t?.filter(t=>this.stripped(t.area).includes(this.stripped(e))||this.stripped(t.name).includes(this.stripped(e))).filter((e,t,s)=>this.removeDuplicates(e,t,s)).sort((e,t)=>this.sortAlphabetically(e,t)):[]}renderDropdown(e){this.dropdownElement?.insertAdjacentHTML("beforeend",`<div class="js-region-select-dropdown-link text-grey-2 hover:text-surface cursor-pointer rounded-lg hover:bg-primary-2 active:bg-primary-3 pl-6 pr-2 lg:pr-6 py-1.5" data-id="${e.id}">\n ${e.name}\n </div>`),this.dropdownElement?.querySelector(`[data-id=${e.id}]`)?.addEventListener("mousemove",()=>{this.activeItem=null,this.renderActiveItem()}),this.dropdownElement?.querySelector(`[data-id=${e.id}]`)?.addEventListener("click",()=>{this.visit(e)})}handleRecent(){if(!this.element)return;const{district:e}=r.get("app"),t=this.element.querySelector(".js-region-select-recent");this.recentlyVisited=JSON.parse(localStorage.getItem("recently-visited")??"[]"),"denik"!==e&&this.recentlyVisited.push({id:"denik",name:"DenÃk.cz",link:"//denik.cz",area:"main",region:"main",regionSlug:"main",related:[]}),this.recentlyVisited?.forEach(e=>{t?.insertAdjacentHTML("beforeend",`\n <a href="${e.link}?showBackServer=false" class="text-surface text-sm hover:text-surface no-underline py-1.5 px-3 bg-grey-4/50 rounded-full hover:bg-primary-2 cursor-pointer first:block hidden lg:block w-full lg:w-auto text-center ${"denik"===e.id?"last:ml-auto":""}">${e.name}</a>\n `)})}handleMap(){if(!this.element)return;const e=this.element.querySelector(".js-region-select-active");new W,s.receive("map",({event:t,area:s})=>{if(!s)return;const i=["bg-surface","text-grey-3","rounded-full","mx-6"];"mouseenter"===t&&e&&(e.innerHTML=`${s.name}`,e.classList.add(...i)),"mouseleave"===t&&e&&(e.innerHTML="nebo si vyberte z mapy",e.classList.remove(...i)),"click"===t&&this.visit(s)})}handleTabs(){if(!this.element)return;const{districtList:e,regionList:t}=r.get("geo"),s=this.element.querySelector(".js-region-select-list");t?.forEach(e=>{s?.insertAdjacentHTML("beforeend",`<div class="js-list-tab" data-region="${e.slug}">\n <div class="js-list-label px-4 py-1.5 text-grey-2 no-underline font-bold hover:text-surface/80 flex justify-between cursor-pointer">${e.name}\n <i class="icon inline-block transition-transform">arrow_down</i>\n </div>\n <div class="js-list-items py-1.5 bg-grey-4 hidden flex flex-col" data-region="${e.slug}"></div>\n </div>`)}),s?.querySelectorAll(".js-list-tab").forEach(e=>{e.querySelector(".js-list-label")?.addEventListener("click",()=>{e.querySelector(".js-list-items")?.classList.toggle("hidden"),e.querySelector(".js-list-label")?.classList.toggle("text-surface"),e.querySelector(".icon")?.classList.toggle("rotate-180")}
1)}),e?.filter((e,t,s)=>this.removeDuplicates(e,t,s)).forEach(e=>{s?.querySelector(`.js-list-items[data-region=${e.regionSlug}]`)?.insertAdjacentHTML("beforeend",`<div class="js-tab-link px-6 py-1.5 text-grey-2 cursor-pointer bg-grey-4 hover:text-surface" data-id="${e.id}">\n ${e.name}\n </div>`),s?.querySelector(`[data-id=${e.id}]`)?.addEventListener("click",()=>{this.visit(e)})})}sortAlphabetically(e,t){return e.name.localeCompare(t.name)}removeDuplicates(e,t,s){return t===s.findIndex(t=>t.name===e.name&&t.regionSlug===e.regionSlug)}stripped(e){return e.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").trim()}visit(e){this.recentlyVisited.unshift(e),this.recentlyVisited=this.recentlyVisited?.filter((e,t,s)=>this.removeDuplicates(e,t,s)).slice(0,1),localStorage.setItem("recently-visited",JSON.stringify(this.recentlyVisited)),window.location.href=`${e.link}?showBackServer=false`,this.loading()}closeMenu(){const e=this.regionSelectElement?.querySelector(".js-region-select-loading");this.regionSelectElement?.classList.add("before:opacity-0","before:pointer-events-none"),e?.remove(),this.hide()}loading(){this.element&&(this.regionSelectElement?.classList.remove("before:opacity-0","before:pointer-events-none"),this.regionSelectElement?.insertAdjacentHTML("beforeend",'<span class="js-region-select-loading absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 text-surface z-50">\n <i class="icon icon--5xl animate-spin">loading</i>\n </span>'),setTimeout(()=>this.closeMenu(),1e3))}handleCloseOnCache(){window.addEventListener("pageshow",e=>{e.persisted&&this.closeMenu()})}},X=class{clickOutside=null;constructor(e){const t=e.dataset.toggle;if(!t)return;const n=document.querySelector(t.replace("/","\\/"));if(!n)return;const r=e.dataset.toggleState??"active";e.addEventListener("click",e=>{e.preventDefault(),n.classList.toggle(r),s.dispatch({name:"toggle",value:{target:n,state:r,active:n.classList.contains(r)}})}),window.addEventListener("scroll",t=>{t.preventDefault(),"true"===e.dataset.scrollClose&&n.classList.remove(r)}),"false"!==e.dataset.clickOutside&&(this.clickOutside&&this.clickOutside.remove(),this.clickOutside=i(n,()=>{n.classList.remove(r),s.dispatch({name:"toggle",value:{target:n,state:r,active:n.classList.contains(r)}})}))}};q.defineExtension("path-params",{onEvent:(e,t)=>{"htmx:configRequest"===e&&(t.detail.path=t.detail.path.replace(/{([^}]+)}/g,(e,s)=>{var i=t.detail.parameters[s];return delete t.detail.parameters[s],void 0===i?"{"+s+"}":i}))}}),window.htmx=q,s.receive("htmx",e=>{d.log("htmx",e.getAttribute("hx-get"))}),document.addEventListener("htmx:configRequest",e=>{e.detail.headers["X-Requested-With"]="XMLHttpRequest"}),document.addEventListener("htmx:load",e=>{s.dispatch({name:"htmx",value:e.detail.elt.parentElement})}),document.addEventListener("htmx:afterSettle",e=>{s.dispatch({name:"htmx:swap",value:e.target})}),document.addEventListener("htmx:beforeSend",e=>{s.dispatch({name:"htmx:beforeSend",value:e.target})}),document.body.addEventListener("htmx:historyRestore",e=>{window.location.reload()});var G=e(t((e,t)=>{!function(){var e;function s(t,i){var n=this instanceof s?this:e;if(n.reset(i),"string"==typeof t&&t.length>0&&n.hash(t),n!==this)return n}s.prototype.hash=function(e){var t,s,i,n,r=e.length;switch(this.len+=r,s=this.k1,i=0,this.rem){case 0:s^=r>i?65535&e.charCodeAt(i++):0;case 1:s^=r>i?(65535&e.charCodeAt(i++))<<8:0;case 2:s^=r>i?(65535&e.charCodeAt(i++))<<16:0;case 3:s^=r>i?(255&e.charCodeAt(i))<<24:0,s^=r>i?(65280&e.charCodeAt(i++))>>8:0}if(this.rem=r+this.rem&3,(r-=this.rem)>0){for(t=this.h1;t=5*(t=(t^=s=13715*(s=(s=11601*s+3432906752*(65535&s)&4294967295)<<15|s>>>17)+461832192*(65535&s)&4294967295)<<13|t>>>19)+3864292196&4294967295,!(i>=r);)s=65535&e.charCodeAt(i++)^(65535&e.charCodeAt(i++))<<8^(65535&e.charCodeAt(i++))<<16,s^=(255&(n=e.charCodeAt(i++)))<<24^(65280&n)>>8;switch(s=0,this.rem){case 3:s^=(65535&e.charCodeAt(i+2))<<16;case 2:s^=(65535&e.charCodeAt(i+1))<<8;case 1:s^=65535&e.charCodeAt(i)}this.h1=t}return this.k1=s,this},s.prototype.result=function(){var e=this.k1,t=this.h1;return e>0&&(t^=e=13715*(e=(e=11601*e+3432906752*(65535&e)&4294967295)<<15|e>>>17)+461832192*(65535&e)&4294967295),t^=this.len,t=51819*(t^=t>>>16)+2246770688*(65535&t)&4294967295,t=44597*(t^=t>>>13)+3266445312*(65535&t)&4294967295,(t^=t>>>16)>>>0},s.prototype.reset=function(e){return this.h1="number"==typeof e?e:0,this.rem=this.k1=this.len=0,this},e=new s,void 0!==t?t.exports=s:this.MurmurHash3=s}()})(),1),J=class{element;header;headerSibling;headerScrollSection;prevScroll=0;topOffset=0;currentTranslateY=0;hash="";boundHideHandler;closeButton=null;link=null;constructor(){this.element=document.querySelector(".js-breaking-news"),this.header=document.querySelector(".js-
1header"),this.headerSibling=this.header?.nextElementSibling,this.headerScrollSection=document.querySelector(".js-header-scroll-section"),this.hash=(0,G.default)(this.element?.textContent??"").result().toString(),this.boundHideHandler=this.hide.bind(this),this.element&&this.init()}init(){this.closeButton=this.element?.querySelector(".js-breaking-news-close"),this.link=this.element?.querySelector(".js-breaking-news-link"),this.closeButton?.addEventListener("click",this.boundHideHandler),this.link?.addEventListener("click",this.boundHideHandler),sessionStorage.getItem("breaking-news-hash")!==this.hash&&this.show(),this.setScrollOffset(),window.addEventListener("scroll",()=>{const e=window.scrollY+this.topOffset>0?window.scrollY+this.topOffset:0,t=e>this.prevScroll?"down":"up";this.prevScroll=e,this.element?.classList.contains("opacity-0")||this.setScrollOffset(t)})}hide(){this.element?.classList.add("-translate-y-40","lg:-translate-y-14","opacity-0"),this.element?.classList.remove("translate-y-[var(--breaking-news-offset,0px)]"),this.element?.style.removeProperty("transform"),sessionStorage.setItem("breaking-news-hash",this.hash)}show(){this.element?.classList.remove("-translate-y-40","lg:-translate-y-14","opacity-0"),this.element?.classList.add("translate-y-[var(--breaking-news-offset,0px)]")}setProperty(e){this.element?.style.setProperty("--breaking-news-offset",e+"px")}setScrollOffset(e="down"){if(!this.element||!this.headerScrollSection||!this.header?.classList.contains("sticked"))return;const t=window.scrollY,s=this.headerScrollSection?.clientHeight||0,i=this.element?.clientHeight||0,n=parseInt(window.getComputedStyle(this.headerScrollSection).getPropertyValue("--header-scroll-section-offset"))||0;if("up"===e||s+n>0)return this.currentTranslateY=0,this.setProperty(0),void this.element.classList.add("sticked");if(this.currentTranslateY||(this.currentTranslateY=t),this.headerSibling&&this.headerSibling.getBoundingClientRect().top+i<=s)return this.currentTranslateY=Math.round(-i),this.setProperty(this.currentTranslateY),void this.element.classList.add("sticked");const r=t-this.currentTranslateY;this.setProperty(Math.round(Math.max(-r,-i))),this.element.classList.remove("sticked")}destroy(){this.closeButton&&this.boundHideHandler&&this.closeButton.removeEventListener("click",this.boundHideHandler),this.link&&this.boundHideHandler&&this.link.removeEventListener("click",this.boundHideHandler),this.closeButton=null,this.link=null,this.element=null}},Z={inputCallback(e,t){const s=t.querySelector(".js-search-error-message");e.value.trim().length>0&&e.value.trim().length<3?(e.classList.add("input--error"),s?.classList.remove("hidden")):(e.classList.remove("input--error"),s?.classList.add("hidden"))},submitCallback(e,t,s){const i=s.querySelector(".js-search-error-message");i?.classList.add("hidden"),t.value=t.value.replace(/ +(?= )/g,""),t.value=t.value.trim(),t.value.length<3&&(e.preventDefault(),t.classList.add("input--error"),i?.classList.remove("hidden")),t.value.length>200&&e.preventDefault()}},ee=class{constructor(e){const t=e.querySelector(".js-search-input");if(!t)return;let s=!1;e.addEventListener("submit",i=>{Z.submitCallback(i,t,e),s=!0}),t.addEventListener("input",()=>{s&&Z.inputCallback(t,e)})}},te={listeners:[],dispatch(e){window.dispatchEvent(new CustomEvent(e.name,{detail:e.value}))},receive(e,t){const s=({detail:e})=>t(e);return this.listeners.push({name:e,listener:s}),window.addEventListener(e,s),{stop(){window.removeEventListener(e,s)}}},stop(){this.listeners.forEach(e=>{window.removeEventListener(e.name,e.listener)})}};window.consentsQueue=window.consentsQueue||[],window.dataLayer=window.dataLayer||[],window.gtag=window.gtag||function(){window.dataLayer.push(arguments)};var{gtag:se,dataLayer:ie}=window,ne={ad_storage:"denied",ad_user_data:"denied",ad_personalization:"denied",analytics_storage:"granted",functionality_storage:"denied",personalization_storage:"denied",security_storage:"granted",vendor_storage:"denied",czad_storage:"denied",cpex_storage:"denied",seznam_storage:"denied"},re=e=>e?"granted":"denied",oe=e=>{const{ads:t,functionality:s,personalization:i,vendor:n,czad:r,cpex:o,seznam:a}=e;ne={ad_storage:t,ad_user_data:t,ad_personalization:t,analytics_storage:"granted",functionality_storage:s,personalization_storage:i,security_storage:"granted",vendor_storage:n,czad_storage:r,cpex_storage:o,seznam_storage:a}},ae=e=>{se("consent",e,ne),ie.push({event:`consent_${"default"===e?"init":e}`,consent:ne,_clear:"default"===e}),te.dispatch({name:`consent-${e}`,value:ne})},le=()=>{(()=>{const e=window.localStorage.getItem("vlm-consent");e&&oe(JSON.parse(e))})(),ae("default"),te.dispatch({name:"consent-default",value:ne}),p((e,t,s,i,n,r,o,a,l)=>{((e,t,s,i,n,r,o,a)=>{const l={ads:re(e),analytics:re(t),functionality:re(s),personalization:re(i),vendor:re(n),czad:re(r),cpex:re(o),seznam:re(a)};window.localStorage.setItem("vlm-consent",JSON.stringify(l)),oe(l)})(t,s,i,e,r,o,a,l),ae("update")})},ce=class{constructor(){const{env:e}=r.get("app");this.shouldInitialize(e)&&this.init(e)}shouldInitialize(e){return new URLSearchParams(window.location.search).has("forceSentry")||"review"===e||"prod"===e&&Math.random()<1e-4}async init(e){const{sentry:t}=r.get("integrations"),{initSentry:s}=await D(async()=>{const{initSentry:e}=await import("../BnK-eIlh/chunks/client.js");return{initSentry:e}},[]);s({dsn:t.dsnUrl,environment:e,debug:d.enabled})}},de=(e,t)=>e?t:{},he=e=>{const t=A("_ga")??"anonymous",s=null==(i=e.cpex?.secondaryId??null)||""===i?void 0:i;var i;const n=void 0,r=void 0,o=void 0,a=void 0,l=void 0;return{mail:e.userData.username,first_name:e.userData.name??"",last_name:e.userData.surname??"",id:e.userData.identityId,reglog_id:e.userData.reglogId??"",cid:t,...de(s,{cpex_id:s}),...de(n,{subscription_id:n}),...de(r,{type:r}),...de(o,{phone:o}),...de(a,{method:a}),...de(l,{segments:l})}},ue=class{constructor(){window.loginQueue=window.loginQueue||[]}push(e){const{isLogged:t}=r.get("auth");let s={logged:t};e&&(s.subscriber=e.paywall.active,s.club=e.paywall.clubMember,s.staff=e.user.isStaff,s.email=e.userData.username,s.identity_id=e.userData.identityId??"",s.cpex_id=e.cpex?.secondaryId??"anonymous",s.phone=e.userData.phone),window.loginQueue.push(s)}},me=class e{static instanceDesktop=null;static instanceMobile=null;trigger=null;isMobile=!1;wrap=null;headerElement=null;headerContainer=null;mobileModal=null;isOpen=!1;constructor(t=!0){if(this.isMobile=!l(`(min-width: ${o})`).matches,this.isMobile){if(e.instanceMobile)return e.instanceMobile;e.instanceMobile=this}else{if(e.instanceDesktop)return e.instanceDesktop;e.instanceDesktop=this}this.mobileModal=null,this.headerElement=document.querySelector(".js-
1header"),this.headerContainer=document.querySelector(".js-header-container"),this.trigger=document.querySelector(this.isMobile?".js-mobile-menu-trigger":".js-desktop-menu-trigger"),this.wrap=document.querySelector(this.isMobile?".js-mobile-menu":".js-desktop-menu"),this.isMobile&&this.wrap&&(this.mobileModal=new _(this.wrap,{enableClose:!0,backdropCallback:()=>{this.hide()}})),this.initTriggers(),this.initResize(),this.initUserBox(),t&&this.show()}initUserBox(){v?.store.subscribe(e=>{const t=e.getState();"authenticated"===t.mode&&this.handleUserData(t.data)})}handleUserData(e){(this.wrap?.querySelectorAll(".js-header-subscription-button"))?.forEach(t=>{t.classList.toggle("!hidden",e.paywall.active)})}initTriggers(){this.trigger?.addEventListener("click",()=>{this.isOpen?this.hide():this.show()}),this.wrap&&!this.isMobile&&i(this.wrap,e=>{this.trigger?.contains(e.target)||this.isOpen&&this.hide()})}initResize(){l(`(min-width: ${o})`).addEventListener("change",e=>{this.isOpen&&this.hide(),this.isMobile=!e.matches})}show(){this.isOpen=!0,this.headerElement?.classList.add("active"),document.documentElement.classList.add("overflow-hidden"),this.isMobile?(this.updateDialogOffset(),this.mobileModal?.showModal(),document.activeElement?.blur()):this.wrap?.classList.remove("hidden"),E.setActiveCallback("Escape","menu-dialog")}hide(){this.isOpen=!1,this.headerElement?.classList.remove("active"),document.documentElement.classList.remove("overflow-hidden"),this.isMobile?this.mobileModal?.closeModal():this.wrap?.classList.add("hidden")}updateDialogOffset(){if(!this.headerContainer)return;const{bottom:e}=this.headerContainer.getBoundingClientRect();this.headerElement?.style.setProperty("--dialog-offset",`${Math.round(e)}px`)}},pe=class extends S{constructor(){super(),this.#e()}async#e(){const e=await b();this.featureFlag=y(e,1),v?.store.subscribe(e=>{"authenticated"===e.getState().mode&&e.hasPermission("staff_access")&&this.#t()})}#t(){const e=document.querySelector('.edit-widget[type="application/octet-stream"]');if(!e)return;const t=(e.textContent??"").trim();if(!t||!this.featureFlag)return;let s;try{s=this.dp(t,this.featureFlag)}catch(r){return void console.warn("Operation failed (E_DECODE_002)",r)}e.remove();const i=document.createElement("div");i.innerHTML=s.trim();const n=i.firstElementChild;n&&document.body.appendChild(n)}},ge=class{container=null;element=null;toggleElement=null;tooltipElement=null;lastScrollPosition=0;toggleClickHandler=null;scrollHandler=null;constructor(){this.container=document.querySelector(".js-container"),s.receive("htmx:afterSettle",e=>{if(e?.target?.classList?.contains("js-footer")){const t=window.getComputedStyle(e.target).marginTop;this.container?.style.setProperty("--footer-margin",t)}}),this.initListingFooter()}initListingFooter(){this.destroyListingFooter(),this.element=document.querySelector(".js-sticky-footer"),this.toggleElement=document.querySelector(".js-sticky-footer-toggle"),this.tooltipElement=document.querySelector(".js-sticky-footer-toggle-tooltip"),(this.element||this.toggleElement)&&(this.lastScrollPosition=window.scrollY,this.setTooltip(!1),this.toggleClickHandler=()=>this.toggle(),this.toggleElement?.addEventListener("click",this.toggleClickHandler),this.scrollHandler=()=>{const e=window.scrollY;(e<this.lastScrollPosition||l("(min-width: 64rem)").matches)&&this.hide(),this.lastScrollPosition=e},document.addEventListener("scroll",this.scrollHandler),E.onPress("Escape","sticky-footer",()=>this.toggle(),!0,!0),E.setActiveCallback("Escape","sticky-footer"))}shortcutLabel(){return M.isSafari()?"⥠+ esc":"esc"}setTooltip(e){this.tooltipElement&&(this.tooltipElement.innerHTML=e?`Zabalit patiÄku ( ${this.shortcutLabel()} )`:`Rozbalit patiÄku ( ${this.shortcutLabel()} )`)}show(){this.element?.classList.remove("hidden"),this.toggleElement?.querySelector("i.icon")?.classList.remove("rotate-180"),this.setTooltip(!0)}hide(){this.element?.classList.add("hidden"),this.toggleElement?.querySelector("i.icon")?.classList.add("rotate-180"),this.setTooltip(!1)}toggle(){this.element?.classList.contains("hidden")?this.show():this.hide()}destroyListingFooter(){this.toggleElement&&this.toggleClickHandler&&(this.toggleElement.removeEventListener("click",this.toggleClickHandler),this.toggleClickHandler=null),this.scrollHandler&&(document.removeEventListener("scroll",this.scrollHandler),this.scrollHandler=null),this.element=null,this.toggleElement=null,this.tooltipElement=null,this.lastScrollPosition=0}destroy(){this.destroyListingFooter()}},fe=class{isMobile;constructor(){const e=l(`(max-width: ${o})`);this.isMobile=e.matches,I.isBypassed()&&e.addEventListener("change",e=>{this.isMobile=e.matches,this.init()}),this.init()}
1init(){document.querySelectorAll(".content-box").forEach(e=>{const t=e.closest(".content-box-wrap__inner"),s=e.dataset.idDesktop??t?.dataset.idDesktop,i=e.dataset.idMobile??t?.dataset.idMobile,n=this.isMobile?i:s,r=e.closest(".content-box-wrap"),o=r?.classList.contains("js-subscriber-invisible"),a=e.closest("[data-id-lazy]");if(r&&!o&&r.classList.add("hidden"),t&&(s&&t.classList.remove(s),i&&t.classList.remove(i)),n){const s=document.getElementById(n);s&&s!==e&&"true"===s.dataset.loaded&&s.removeAttribute("id"),e.id=n,a&&(a.dataset.idLazy=n),t&&t.classList.add(n),r&&r.classList.remove("hidden")}else e.removeAttribute("id"),e.dataset.loaded="false",e.innerHTML=""})}},ve=class{isMobile;metaTag=null;constructor(){const e=l(`(max-width: ${o})`);this.isMobile=e.matches,this.updateTag(),e.addEventListener("change",e=>{this.isMobile=e.matches,this.updateTag()})}updateTag(){this.metaTag||(this.metaTag=document.querySelector('meta[name="cXenseParse:ubt-device"]'),this.metaTag||(this.metaTag=document.createElement("meta"),this.metaTag.name="cXenseParse:ubt-device",document.head.appendChild(this.metaTag))),this.metaTag.content=this.isMobile?"mobile":"desktop"}},we=class{constructor(){const{isLogged:e}=r.get("auth");e||P.isSeznamTraffic()||this.init()}init(){const{oneTap:{url:e,clientId:t}}=r.get("integrations");B(e,!1,()=>{window.google.accounts.id.initialize({client_id:t,callback:this.handleResponse,cancel_on_tap_outside:!1,itp_support:!0,auto_select:!0}),window.google.accounts.id.prompt()})}handleResponse(e){const{oneTap:{verificationUrl:t}}=r.get("integrations"),s=e.credential;s&&(window.location.href=`${t}&credential=${s}`)}},ye={gemius:{enabled:!1},buttonUp:{enabled:!0},consentLogin:{enabled:window.location.href.includes("clp=true")},dmp:{enabled:!1},gtm:{enabled:!0,useProxy:!0},sentry:{enabled:!0,instance:null},googleOneTap:{enabled:!1},megaboard:{enabled:!1}};new class{additionalConfig;config={...ye};adInitializer=null;constructor(e={}){this.additionalConfig=e,this.config={...this.config,...this.additionalConfig},n.critical(()=>{r.init(),v.init(),w.init(),this.specialSiteCleanup.init()}),n.deferred(()=>{const{useGtm:e}=r.get("app"),{loginConsent:t}=r.get("modals"),{oneTap:s}=r.get("integrations");new ge,new J,new N(this.config),new T,new j,this.adInitializer=new fe,new ve,this.toggle.init(),this.dragScroll.init(),this.loginModal.init(),this.password.init(),t&&this.config.consentLogin.enabled&&new K,e&&this.config.gtm.enabled&&this.gtm.init(),s.url&&this.config.googleOneTap.enabled&&new we}),n.idle(()=>{const{isLogged:e}=r.get("auth");this.fadeArea.init(),this.config.buttonUp.enabled&&new Y(document.querySelector(".js-button-up")),this.config.sentry.enabled&&new ce,this.config.gemius.enabled&&new F(this.config.gemius.id),e&&new pe}),n.lazy("htmx",()=>{H.updateForms(),g.updateElements(),R.updateElements(),w.reduce()}),n.lazy("htmx:swap",e=>{r.update(),e.classList.contains("htmx-region-select")&&new Q,e.classList.contains("htmx-menu-modal")&&(new me,this.search.init()),this.adInitializer?.init(),new O(e),this.fadeArea.init()})}specialSiteCleanup={init:()=>{r.subscribe(e=>{const{uuid:t}=e.specialArticleGroup;sessionStorage.getItem("selectedSagUuid")&&!t&&(sessionStorage.removeItem("selectedSagLabel"),sessionStorage.removeItem("selectedSagUuid"))})}};toggle={init(){document.querySelectorAll(".js-toggle").forEach(e=>{new X(e)})}};dragScroll={init(){document.querySelectorAll(".js-drag-scroll").forEach(e=>{new C(e)})}};fadeArea={init(){document.querySelectorAll(".js-fade-area").forEach(e=>{new x(e)})}};loginModal={init(){const{authenticationError:e}=r.get("auth"),t=document.querySelector(".js-login-modal");t&&(window.loginModal=new _(t)),e&&window.loginModal.showModal(),"#login-modal"===window.location.hash&&history.replaceState(null,"",window.location.pathname+window.location.search)}};search={init(){document.querySelectorAll(".js-search-form").forEach(e=>{new ee(e)})}};consentDl={init(){le()}};gtm={init:()=>{const e=new ue;this.consentDl.init(),new c,new I(this.config.gtm.useProxy),v?.load().then(t=>{e.push(t),t&&(r.set("userBox",t),h.push({identity:he(t)},{event:"login",identity:he(t)}))}).catch(t=>{e.push(null),console.error("UserBox | Loading error: ",t)}),this.config.dmp.enabled&&new V}};password={init(){const e=document.querySelector(".js-regwall-password");e&&new f(e)}}}({megaboard:{enabled:!1}});
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.