1import{d as E,i as N,E as v,c as b,G as D,H as m,B as S,N as c,O as g,a as T,k as l,e as h,g as f,f as k,b as V,s as x,F as A,v as w,m as F,o as u,M as H}from"./index-ba5b9d8e.js";import{S as P,A as q}from"./AlertComponent-4d5fe7c7.js";import{C as z}from"./CountdownComponent-0e3d3f52.js";import{u as G}from"./Semaphore-73b3f409.js";import{a as L}from"./index-63c77ee6.js";import"./TrackingComponent-183a8a36.js";import"./index-3159d340.js";import"./CollapseComponent-d92c782c.js";import"./LocationComponent-92eab819.js";import"./TextComponent-6c52f353.js";const W=E({__name:"BaseStagePage",props:{competition:{},stage:{},tracking:{}},setup(a){var p=a;const o=w([]),n=w([]),e=N(),i=G(),{isStageLoading:d}=v(i),B=v(e),y=b(()=>p.stage?.id===null||p.stage.tabs?.length==0);D(B.stage,()=>{c(e.getCompetitionCode(),e.stage).then(t=>{o.value=t}),g(e.getCompetitionCode(),e.currentStage).then(t=>{n.value=t})}),m.messageEmitter.on("teams",t=>{try{o.value=L(o.value,t).newDocument,S("teams")}catch(r){console.log(r),c(e.getCompetitionCode(),e.stage).then(s=>{o.value=s})}}),m.messageEmitter.on("timeLine",t=>{try{n.value=L(n.value,t).newDocument,S("timeLine")}catch(r){console.log(r),g(e.getCompetitionCode(),e.currentStage).then(s=>{n.value=s})}}),m.messageEmitter.on("connectionLost",()=>{C()});function C(){i.acquireStageLoadingSemaphore(2),c(e.getCompetitionCode(),e.stage).then(t=>{o.value=t,i.releaseStageLoadingSemaphore(1)}),g(e.getCompetitionCode(),e.currentStage).then(t=>{n.value=t,i.releaseStageLoadingSemaphore(1)})}return C(),(t,r)=>{const s=F("router-view");return u(),T(A,null,[l(P,{competition:a.competition,"current-stage":a.stage,timeline:n.value,teams:o.value,tracking:a.tracking},null,8,["competition","current-stage","timeline","teams","tracking"]),l(q,{message:a.stage.alert},null,8,["message"]),h(d)?(u(),f(H,{key:0,show:!0})):k("",!0),V("div",{class:x({"d-none":h(d)})},[l(s,{stage:a.stage,teams:o.value,timeline:n.value,tracking:a.tracking},null,8,["stage","teams","timeline","tracking"]),y.value?(u(),f(z,{key:0,to:a.stage.start},null,8,["to"])):k("",!0)],2)],64)}}});export{W 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.