1import{_ as st}from"./BHVNvj70.js";import{_ as nt,a as at,b as it,c as rt,d as lt}from"./Cgaf_ep_.js";import{u as W,h as ct,j as K,o as ut,N as pt,p as dt,_ as mt,k as _t,m as ft,b as gt,g as ht}from"./B5q9wg_P.js";import{_ as wt}from"./CIhTKO4w.js";import{a as St}from"./CHVwxmW2.js";import{y as R,b as N,d as X,D as G,Q as D,a7 as v,z as e,a0 as y,W as u,Z as n,Y as k,M as d,X as M,w as V,al as vt,F as I,T as Q,af as Z,an as Y,R as yt,V as F,f as kt}from"./D8GgcCdU.js";import{_ as xt}from"./DnyOcqUd.js";import{a as q,u as bt}from"./BKHRx1WD.js";import{_ as $t}from"./mOw8BzSQ.js";import"./DC3Ikfpn.js";import"./D8LLJgRS.js";import"./BsTqKCD5.js";import"./uCOpAcrw.js";import"./B-OOX_qf.js";import"./BOprMc0p.js";import"./eqS3LETO.js";const Dt={class:"text-center text-grayLight"},Ct={class:"font-bold text-h4 mb-4"},It={class:"mb-4 font-semibold"},Nt={class:"flex flex-col items-center"},Tt=R({__name:"app",setup(E){const{t:c}=W(),{appPromo:a}=ct(),C={ANDROID:c("android_app"),IOS:c("ios_app")},m=N(!0),x=(s,f,i)=>{const p={value:f,expiry:new Date().getTime()+i*1e3};localStorage.setItem(s,JSON.stringify(p))},g=()=>{m.value=!1,x("appPromotionSeen",!0,60*60*24)},r=N("WEB"),h=X(()=>r.value==="ANDROID"||r.value==="IOS"),_=s=>{s!=="WEB"&&(x("appPromotionSeen",!0,60*60*24*1e4),m.value=!1,ut(C[s]))};return G(()=>{a&&(r.value=St())}),(s,f)=>{const i=K,l=wt;return e(h)&&e(m)?(u(),D(l,{key:0,show:e(m),"onUpdate:show":g},{default:y(()=>[n("div",Dt,[n("h2",Ct,k(s.$t("app_name")),1),n("p",It,k(s.$t("app_promo_text")),1),n("div",Nt,[d(i,{class:"w-full",onClick:f[0]||(f[0]=p=>_(e(r)))},{default:y(()=>[M(k(s.$t("download_app")),1)]),_:1})])])]),_:1},8,["show"])):v("",!0)}}}),Pt={key:0,class:"fixed z-50 inset-0 flex items-center justify-center px-4",role:"dialog","aria-modal":"true"},Ut={class:"relative z-10 rounded-2xl max-w-lg w-full bg-white dark:bg-dark-lightMain p-8 md:p-10 shadow-2xl"},Et={class:"text-center pt-4"},At={class:"text-h3 leading-tight font-black text-darkMain dark:text-grayLight mb-4 uppercase"},Lt={class:"text-hint text-darkMain dark:text-grayLight font-medium leading-relaxed mb-10 max-w-[380px] mx-auto"},Mt={class:"flex flex-col-reverse md:flex-row items-center md:justify-between gap-4 w-full"},J="fanZoneGuest",Rt=48*60*60*1e3,j=30*24*60*60*1e3,Gt=3,Ot="fanZoneUser_",Bt=21,zt=7,H=3,Vt=R({__name:"FanZonePopup",props:{type:{}},setup(E){const c=E,a=N(!1),m=pt()({name:c.type==="guest"?"register":"my-profile"}),x=()=>new Date().toISOString().split("T")[0],g=(t,o)=>Math.floor((new Date(o).getTime()-new Date(t).getTime())/864e5),r=()=>{try{const t=localStorage.getItem(J);if(t)return JSON.parse(t)}catch{}return{articleCount:0,closes:[],lastCloseTime:null,bannedUntil:null}},h=t=>{localStorage.setItem(J,JSON.stringify(t))},_=()=>{const t=r(),o=Date.now();return t.bannedUntil&&o<t.bannedUntil?!0:(t.bannedUntil&&o>=t.bannedUntil&&(t.bannedUntil=null,t.closes=[],h(t)),!!(t.lastCloseTime&&o-t.lastCloseTime<Rt))},s=()=>{a.value||_()||r().articleCount>=Gt&&(a.value=!0)},f=()=>{if(a.value)return;const t=r();t.articleCount++,h(t),s()},i=()=>{a.value=!1;const t=r(),o=Date.now();t.closes.push(o),t.lastCloseTime=o,t.articleCount=0,t.closes=t.closes.filter(b=>o-b<j),t.closes.length>=3&&(t.bannedUntil=o+j),h(t)},l=()=>{a.value=!1;const t=r();t.articleCount=0,h(t)},p=q(),w=bt(),T=`${Ot}${p.id}`,P=()=>{try{const t=localStorage.getItem(T);if(t)return JSON.parse(t)}catch{}return{campaignStartDate:null,lastShownDate:null,ctaClicked:!1,campaignEnded:!1}},S=t=>{localStorage.setItem(T,JSON.stringify(t))},U=()=>{if(w.hasVerifiedMBet||w.verificationStatus==="pending"||p.lc_member_id)return;const t=P(),o=x();if(t.ctaClicked||t.campaignEnded)return;t.campaignStartDate||(t.campaignStartDate=o,S(t));const b=g(t.campaignStartDate,o);if(b>=Bt){t.campaignEnded=!0,S(t);return}if(t.lastShownDate===o)return;let $=!1;b<zt?$=!0:$=(t.lastShownDate?g(t.lastShownDate,o):H)>=H,$&&(t.lastShownDate=o,S(t),a.value=!0)},A=()=>{a.value=!1},tt=()=>{const t=P();t.ctaClicked=!0,S(t),sessionStorage.setItem("openVerifyModal","1"),a.value=!1},L=()=>{c.type==="guest"?i():A()},et=()=>{c.type==="guest"?l():tt()},O=dt(),{t:ot}=W(),B=t=>new RegExp(`\\/${ot("news")}\\/[^/]+\\/\\d+`).test(t);return G(()=>{if(c.type==="guest")B(O.fullPath)&&f();else if(w.initialized)U();else{const t=V(()=>w.initialized,o=>{o&&(t(),U())})}}),c.type==="guest"&&V(()=>O.fullPath,t=>{a.value||B(t)&&f()}),(t,o)=>{const b=mt,$=K,z=xt;return u(),D(vt,{to:"body"},[d(Q,{name:"fanzone-popup"},{default:y(()=>[e(a)?(u(),I("div",Pt,[n("div",{class:"fixed inset-0 bg-black/75",onClick:L}),n("div",Ut,[n("button",{class:"absolute top-4 right-4 text-darkMain dark:text-white transition-colors","aria-label":"Close",onClick:L},[d(b,{name:"ion:close",size:"22px"})]),n("div",Et,[n("h2",At,k(t.$t(`fanZonePopup.${t.type}Title`)),1),n("p",Lt,k(t.$t(`fanZonePopup.${t.type}Description`)),1),n("div",Mt,[d($,{type:"secondary",size:"big",class:"w-full md:w-auto",onClick:L},{default:y(()=>[M(k(t.$t("fanZonePopup.skip")),1)]),_:1}),d(z,{to:e(m),class:"w-full md:w-auto",onClick:et},{default:y(()=>[d($,{type:"tertiary",size:"big",class:"w-full"},{default:y(()=>[M(k(t.$t(`fanZonePopup.${t.type}Cta`)),1)]),_:1})]),_:1},8,["to"])])])])])):v("",!0)]),_:1})])}}}),Zt=_t(Vt,[["__scopeId","data-v-2ef24a78"]]),Yt={class:"logo-preloader-holder"}
1,Ft={class:"x-holder"},Jt={key:0,src:$t},jt={key:0,src:nt},Ht={key:1,src:at},Wt={class:"pt-[65px] lg:pt-[129px]"},de=R({__name:"default",setup(E){const c=ft(),a=c.public.isGermanijak,C=c.public.isSr,m=gt(),x=ht(),g=q(),{setUser:r}=g,h=X(()=>x.showNavigationDrawer),_=N(!1),s=N(!1),f=i=>{const l=localStorage.getItem(i);if(!l)return null;const p=JSON.parse(l);return new Date().getTime()>p.expiry?(localStorage.removeItem(i),null):p.value};return G(async()=>{const i=await $fetch("/api/me");await r(i.member);const l=f("appPromotionSeen");s.value=!l,_.value=!0}),(i,l)=>{const p=st,w=it,T=lt,P=Tt,S=Zt,U=rt;return u(),I("div",null,[Z(n("div",Yt,[n("div",{class:"logo-preloader",style:yt({"background-image":`url('${e(m).loaderLogoPath}')`})},[n("div",Ft,[e(a)?v("",!0):(u(),I("img",Jt))]),e(a)?(u(),I("img",Ht)):(u(),I("img",jt))],4)],512),[[Y,!e(_)]]),Z(n("div",null,[d(p,{color:e(m).loadingColor},null,8,["color"]),d(w),d(Q,null,{default:y(()=>[e(h)?(u(),D(T,{key:0})):v("",!0)]),_:1}),e(s)?(u(),D(P,{key:0,show:e(s),"onUpdate:show":l[0]||(l[0]=A=>kt(s)?s.value=A:null)},null,8,["show"])):v("",!0),e(C)&&e(_)&&!e(g).loggedIn?(u(),D(S,{key:1,type:"guest"})):v("",!0),e(C)&&e(_)&&e(g).loggedIn?(u(),D(S,{key:2,type:"user"})):v("",!0),n("div",Wt,[F(i.$slots,"default")]),F(i.$slots,"footer",{},()=>
1[d(U)])],512),[[Y,e(_)]])])}}});export{de as default};
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.