import{S as Re,i as Fe,s as Ge,e as E,t as M,k as B,c as w,a as D,h as P,d as u,m as U,b as k,$ as Je,g as C,F as h,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 c=0;cs[6].call(i)),k(a,"class","flex flex-wrap gap-1")},m(c,f){C(c,l,f),h(l,t),C(c,e,f),C(c,a,f),h(a,i);for(let o=0;o{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,I=>t(1,a=I)),ue(s,z,I=>t(3,i=I));let n=0;Xe(async()=>{_e.subscribe(I=>{const N={};N.stages=I.spec.stages.map(p=>p.id),N.tracks=I.spec.tracks.map(p=>p.id),z.set(N)})});function _(I,N,p,A=null){let g=N.start;const K=N.end,G=[],q={};for(;ze(g,K)===-1;){const H={};for(const T of p.spec.stages){if(q[T.id]>0){H[T.id]=null,q[T.id]--;continue}if(A&&!A.stages.includes(T.id))continue;let V=I.schedule.find(S=>new Date(S.period.start).getTime()===new Date(g).getTime()&&S.stage===T.id);if(H[T.id]=V,V){const S=Math.floor((new Date(V.period.end).getTime()-new Date(V.period.start).getTime())/6e4/30);V.span=S,S>1&&(q[T.id]=S-1)}}G.push({title:Q(g,"HH:mm"),stages:H}),g=new Date(g.getTime()+30*60*1e3)}return G}const r=[[],[]],d=(I,N)=>{const[p,A]=N.split(":");return`${p}:${Math.round(I.metrics[A||p]*1e3)/1e3}`};function c(){n=Ye(this),t(0,n)}const f=()=>te(z,i.stages=a.spec.stages.map(I=>I.id),i);function o(){i.stages=he(r[1],this.__value,this.checked),z.set(i)}const m=I=>te(z,i.stages=[I.id],i),O=()=>te(z,i.tracks=a.spec.tracks.map(I=>I.id),i);function L(){i.tracks=he(r[0],this.__value,this.checked),z.set(i)}const $=I=>te(z,i.tracks=[I.id],i),y=(I,N)=>N.id===I.track;return s.$$.update=()=>{s.$$.dirty[0]&3&&t(2,e=a?a.spec["schedule-candidates"][n]:null)},[n,a,e,i,_,d,c,f,o,r,m,O,L,$,y]}class fl extends Re{constructor(l){super();Fe(this,l,sl,ll,Ge,{},null,[-1,-1])}}export{fl as default,cl as prerender};