1import{a as e}from"./DH_oPWig.js";import{D as t,Dt as n,E as r,O as i,Ot as a,P as o,T as s,Z as c,at as l,mn as u,mt as ee,pt as d,qt as f,w as p,wt as m,x as h,zt as g}from"./BaBhFZm2.js";import{c as _,l as v,t as y}from"./Cm8_Znr6.js";import{f as b,p as x}from"./PTSJo-lX.js";import{t as S}from"./Ivu523O_.js";import{n as C}from"./CU89Zi3L.js";import{t as w}from"./oQPVSlJP.js";import{Q as T,nt as E,st as D}from"./DGJ9b2SS.js";import{gt as O}from"./CvPvsyIu.js";import{t as k}from"./FtnkXRcD.js";import{t as A}from"./CQpw5WZQ.js";import{t as j}from"./BDNMzG2s2.js";var M=class{fetch;resource=`/api/v2/Splash`;hiddenResource=`/api/v2/Hidden/Splash`;clickResource=`/api/v2/Splash/click`;constructor({fetch:e}){this.fetch=e}async get(e){let t=e.hidden?this.hiddenResource:this.resource,n={};return e.splashId?n.splashId=e.splashId:t+=`/${e.sportId}`,e.hidden&&(t+=`?t=${Date.now()}`),this.fetch(t,{params:n,onResponse:({response:e})=>{e.status===204&&(e._data=null)}}).then(e=>e&&e?.data?O(e.data):null).catch(e=>(D.error(`[SplashRepo] Splash Page Request Failed`,e),null))}async click(e){this.fetch(`${this.clickResource}/${e}`,{onResponse:({response:e})=>{e.status===204&&(e._data=null)}}).catch(e=>{D.error(`[SplashRepo] Splash Page Click Request Failed`,e)})}},N=C(`splashPage`,{state:()=>({splashPages:{},isLoading:!1,error:null}),actions:{async fetchSplashPageContent({payload:e,fetch:t}){let n=E(e);this.isLoading=!0;let r=await new M({fetch:t}).get(e);this.splashPages[n]=r,this.isLoading=!1},async trackClick({payload:e,fetch:t}){e.splashId&&await new M({fetch:t}).click(e.splashId)}},getters:{getSplashPageContent:e=>t=>{let n=E(t);return e.splashPages[n]||null},getLoadingFlag:e=>e.isLoading,getError:e=>e.error}}),P={key:0,class:`s-splash-screen-picture`},F={class:`s-splash-screen-picture--image hover:cursor-pointer`},I={__name:`SSplashScreenPicture`,props:{data:{type:Object,required:!0}},emits:[`clicked`],setup(e,{emit:n}){let r=e,a=n,c=()=>{a(`clicked`)},u=p(()=>r?.data?.picture?.images?.map(e=>({image:e.url,breakpoint:e?.breakpoint??0,alt:e?.alt})));return(e,n)=>{let r=S;return f(u)&&f(u)?.length&&f(u).length>0?(l(),i(`div`,P,[s(`div`,F,[o(r,{tabindex:`1`,preload:``,class:`w-full object-cover`,alt:f(u)[0].alt,images:f(u),onKeyup:_(c,[`enter`]),onClick:c},null,8,[`alt`,`images`])])])):t(``,!0)}}},L={class:`relative top-0 bottom-0 aspect-video`,tabindex:`1`},R=j({__name:`SSplashScreenVideo`,props:{data:{type:Object,required:!0}},emits:[`clicked`],setup(e,{emit:t}){let n=e,r=t,o=p(()=>({youtube:n.data.video.youTube,title:`Video`,component:`youtube`})),c=()=>{r(`clicked`)};return(e,t)=>{let n=d(`showcase-player`);return l(),i(`div`,{class:`s-splash-screen-video hover:cursor-pointer`,onClick:v(c,[`prevent`])},[a(s(`div`,L,null,512),[[n,{showcase:f(o),options:{autoplay:!0}}]])])}}},[[`__scopeId`,`data-v-c6f25337`]]),z=[`innerHTML`],B=j({__name:`SSplashScreen`,props:{splashId:{type:Number,required:!1},hidden:{type:Boolean,required:!0}},setup(v){let S=v,C=g(!1),E=x(),D=b(),O=N(),j=k(),M=w(),P=g(null),{$customFetch:F}=e(),L={picture:I,video:R},B=p(()=>H.value&&H.value.id?H.value.id:0),V=p(()=>H.value&&H.value.video?L.video:L.picture),H=p(()=>O.getSplashPageContent(q.value)),U=p(()=>{let e=`#000`;return H.value&&H.value.backgroundColor&&(e=H.value.backgroundColor),{backgroundColor:e}}),W=p(()=>{let e=`#fff`;return H.value&&H.value.foregroundColor&&(e=H.value.foregroundColor),{backgroundColor:e}}),G=p(()=>{let e=`#fff`;return H.value&&H.value.foregroundColor&&(e=H.value.foregroundColor),{color:e}}),K=p(()=>M.getCurrentSport?.id??0),q=p(()=>({sportId:K.value,splashId:S.splashId,hidden:S.hidden})),J=p(()=>`splash_${B.value}`),Y=async()=>{await O.fetchSplashPageContent({payload:q.value,fetch:F})},te=()=>{O.trackClick({payload:{splashId:B.value},fetch:F})},ne=()=>{te(),window.location.href=H.value?.link?.length?H.value.link:`/`},re=()=>{if(Z(J.value,31536e5),C.value=!1,D.name===`splash`)return E.push({path:`/`})},X=()=>{if(Z(J.value,14400),C.value=!1,D.name===`splash`)return E.push({path:`/`})},ie=()=>{let e=document.body.querySelector(`a`);e&&e.focus(),X()},Z=(e,t)=>{document.cookie=`${e}=true; path=/; max-age=${t}; SameSite=Lax`},Q=()=>{let e=A(J.value);if(H.value){if(D.path.includes(`/splash`)){C.value=!0;return}if(e.value){C.value=!1;return}let t=new Date(H.value.startDate),n=H.value.endDate?new Date(H.value.endDate):null,r=new Date;r>=t&&(!n||r<=n)?C.value=!0:C.value=!1}else C.value=!1},$=()=>{D.path.includes(`/splash`)&&j.setMetaTokens([{token:`@title`,value:H.value?.title}]),C.value&&(Z(J.value,300),setTimeout(()=>{P.value&&P.value.focus()},1500))};return m(()=>D.path,async()=>{T(D.path)||D.path.includes(`/splash/`)?(await Y(),D.path.includes(`/splash/`)&&!H.value&&await E.push({path:`/`}),Q(),$()):C.value=!1}),c(async()=>{T(D.path)||D.path.includes(`/splash/`)?(await Y(),D.path.includes(`/splash/`)&&!H.value&&await E.push({path:`/`}),Q(),$()):C.value=!1}),(e,c)=>{let p=d(`focusTrap`);return l(),r(h,{to:`#teleports`},[o(y,{name:`fade`},{default:n(()=>[f(C)?(l(),i(`div`,{key:0,class:`s-splash-screen s-splash-screen__backdrop fixed inset-0 z-[10000] flex h-full w-full flex-col items-center justify-center overflow-auto`,style:u(f(U)),onKeyup:_(ie,[`esc`])},[a((l(),i(`div`,{ref_key:`splashScreenRef`,ref:P,class:`s-splash-screen__wrapper max-h-screen w-11/12 max-w-5xl p-4 md:w-10/12 lg:w-7/12`,tabindex:`-1`},[s(`div`,{class:`s-splash-screen__content select-none`,style:u(f(W))},[f(H)?(l(),r(ee(f(V)),{key:0,data:f(H),onClicked:ne},null,40,[`data`])):t(``,!0)],4),f(H)?.html?(l(),i(`div`,{key:0,class:`s-splash-screen__html-container flex justify-center px-4 pt-2`,innerHTML:f(H).html},null,8,z)):t(``,!0),s(`div`,{class:`s-splash-screen__footer flex select-none items-center justify-center gap-4 px-2 pt-4 text-white underline`,style:u(f(G))},[s(`button`,{type:`button`,class:`s-text-title-small xs:s-text-title hover:cursor-pointer`,"aria-label":`Continue to Home`,tabindex:`2`,onClick:X},` Continue to Home `),s(`button`,{type:`button`,class:`s-text-title-small xs:s-text-title hover:cursor-pointer`,"aria-label":`Skip Permanently`,tabindex:`3`,onClick:re},` Skip Permanently `)],4)])),[[p]])],36)):t(``,!0)]),_:1})])}}},[[`__scopeId`,`data-v-71fa337c`]]);export{N as n,B as t};
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.