import{S as Re,i as Fe,s as Ge,e as w,t as L,k as M,c as D,a as T,h as j,d as h,m as P,b,$ as Je,g as $,F as u,a0 as fe,J as Z,j as W,G as Y,U as We,E as se,H as ue,v as Xe,a1 as Ye,a2 as te,a3 as he,W as ae,l as X}from"../chunks/index-acdcee87.js";import{b as _e,s as z}from"../chunks/stores-77ce6fd0.js";import{c as ze,l as de}from"../chunks/index-7f2b6b77.js";import{f as Q}from"../chunks/index-921d3fdd.js";import"../chunks/index-f786a58f.js";function pe(s,l,t){const e=s.slice();return e[16]=l[t],e}function ve(s,l,t){const e=s.slice();return e[19]=l[t],e}function me(s,l,t){const e=s.slice();return e[22]=l[t],e}function ge(s,l,t){const e=s.slice();return e[25]=l[t][0],e[26]=l[t][1],e}function be(s,l,t){const e=s.slice();return e[29]=l[t],e}function ke(s,l,t){const e=s.slice();return e[22]=l[t],e}function Ee(s,l,t){const e=s.slice();return e[34]=l[t],e}function we(s,l,t){const e=s.slice();return e[34]=l[t],e}function De(s,l,t){const e=s.slice();return e[39]=l[t],e[41]=t,e}function Te(s){let l,t,e,a,i,n,_,r=s[1].spec["schedule-candidates"],d=[];for(let o=0;os[6].call(i)),b(a,"class","flex flex-wrap gap-1")},m(o,c){$(o,l,c),u(l,t),$(o,e,c),$(o,a,c),u(a,i);for(let f=0;f{const e=s.spec.speakers.find(a=>a.id===t);return e.name+(e.nickname?` (${e.nickname})`:"")}).join(", ")}function je(s,l){return l.type==="lightning-series"?s.spec.events.filter(t=>t.parent===l.id).map(t=>`${t.name} - ${Le(s,t)||"TBD"}`).join("
"):Le(s,l)}function tl(s,l){const[t,e]=l.split("/"),[a,i]=e.split("-"),n=s.dates[t-1];return{date:n,period:{start:new Date(`${n}T${a}`),end:new Date(`${n}T${i}`)}}}function Be(s){return s.scheduleTimes.map(l=>tl(s,l))}function Ue(s,l,t){return t.includes(l.track||"")?"border border-blue-web/50":"opacity-20"}function qe(s,l){const t=s.spec.events.find(e=>e.id===l);if(!t)return null;switch(t.type){case"panel":t.color="bg-orange-400/20 hover:bg-orange-400/40";break;case"talk":t.color="bg-custom-green/20 hover:bg-custom-green/40";break;case"workshop":t.color="bg-custom-blue/20 hover:bg-custom-blue/40";break;case"campfire":t.color="bg-purple-400/20 hover:bg-purple-400/40";break;case"lightning-series":t.color="bg-yellow-400/20 hover:bg-yellow-400/40";break;default:t.color="bg-white hover:bg-gray-500/10"}return t}const Ke=s=>`#${s}`;function sl(s,l,t){let e,a,i;ue(s,_e,V=>t(1,a=V)),ue(s,z,V=>t(3,i=V));let n=0;Xe(async()=>{_e.subscribe(V=>{const y={};y.stages=V.spec.stages.map(p=>p.id),y.tracks=V.spec.tracks.map(p=>p.id),z.set(y)})});function _(V,y,p,C=null){let m=y.start;const K=y.end,G=[],q={};for(;ze(m,K)===-1;){const N={};for(const I of p.spec.stages){if(q[I.id]>0){N[I.id]=null,q[I.id]--;continue}if(C&&!C.stages.includes(I.id))continue;let H=V.schedule.find(A=>new Date(A.period.start).getTime()===new Date(m).getTime()&&A.stage===I.id);if(N[I.id]=H,H){const A=Math.floor((new Date(H.period.end).getTime()-new Date(H.period.start).getTime())/6e4/30);H.span=A,A>1&&(q[I.id]=A-1)}}G.push({title:Q(m,"HH:mm"),stages:N}),m=new Date(m.getTime()+30*60*1e3)}return G}const r=[[],[]],d=(V,y)=>{const[p,C]=y.split(":");return`${p}:${Math.round(V.metrics[C||p]*1e3)/1e3}`};function o(){n=Ye(this),t(0,n)}const c=()=>te(z,i.stages=a.spec.stages.map(V=>V.id),i);function f(){i.stages=he(r[1],this.__value,this.checked),z.set(i)}const k=V=>te(z,i.stages=[V.id],i),E=()=>te(z,i.tracks=a.spec.tracks.map(V=>V.id),i);function B(){i.tracks=he(r[0],this.__value,this.checked),z.set(i)}const S=V=>te(z,i.tracks=[V.id],i),O=(V,y)=>y.id===V.track;return s.$$.update=()=>{s.$$.dirty[0]&3&&t(2,e=a?a.spec["schedule-candidates"][n]:null)},[n,a,e,i,_,d,o,c,f,r,k,E,B,S,O]}class fl extends Re{constructor(l){super();Fe(this,l,sl,ll,Ge,{},null,[-1,-1])}}export{fl as default,cl as prerender};