import{S as Re,i as Ye,s as Ge,e as D,t as A,k as C,c as T,a as I,h as M,d as h,m as P,b as k,a1 as Je,g as j,J as r,a2 as fe,O as le,j as G,K as Q,Y as Xe,E as ne,L as ue,v as ze,a3 as Fe,a4 as ie,a6 as de,G as oe,l as F}from"../chunks/index-695b5929.js";import{b as he,s as W}from"../chunks/stores-edbe0466.js";import{c as Qe}from"../chunks/index-1cc1bdc7.js";import{f as Z}from"../chunks/index-14ac584d.js";import{l as _e}from"../chunks/index-c9b2ee0d.js";import"../chunks/index-57c7a2a5.js";function pe(s,l,t){const e=s.slice();return e[17]=l[t],e}function ve(s,l,t){const e=s.slice();return e[20]=l[t],e}function me(s,l,t){const e=s.slice();return e[23]=l[t],e}function be(s,l,t){const e=s.slice();return e[26]=l[t][0],e[27]=l[t][1],e}function ge(s,l,t){const e=s.slice();return e[30]=l[t],e}function ke(s,l,t){const e=s.slice();return e[23]=l[t],e}function Ee(s,l,t){const e=s.slice();return e[35]=l[t],e}function we(s,l,t){const e=s.slice();return e[35]=l[t],e}function De(s,l,t){const e=s.slice();return e[40]=l[t],e[42]=t,e}function Te(s){let l,t,e,a,n,i,_,o=s[1].spec["schedule-candidates"],f=[];for(let c=0;cs[7].call(n)),k(a,"class","flex flex-wrap gap-1")},m(c,u){j(c,l,u),r(l,t),j(c,e,u),j(c,a,u),r(a,n);for(let d=0;d{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,n]=e.split("-"),i=s.dates[t-1];return{date:i,period:{start:new Date(`${i}T${a}`),end:new Date(`${i}T${n}`)}}}function Be(s){return s.scheduleTimes.map(l=>tl(s,l))}function Ke(s,l,t){return t.includes(l.track||"")?"border border-blue-web/50":"opacity-20"}function Ue(s,l){const t=s.spec.events.find(e=>e.id===l);if(!t)return console.log(`Event not found: ${l}`),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-rose-400/20 hover:bg-rose-400/40"}return t}const qe=s=>`#${s}`;function sl(s,l,t){let e,a,n;ue(s,he,g=>t(1,a=g)),ue(s,W,g=>t(3,n=g));let i=0;ze(async()=>{he.subscribe(g=>{const v={};v.stages=g.spec.stages.map(O=>O.id),v.tracks=g.spec.tracks.map(O=>O.id),W.set(v)})});function _(g,v,O,b=null){let K=v.start;const J=v.end,U=[],$={};for(;Qe(K,J)===-1;){const R={};for(const S of O.spec.stages){if($[S.id]>0){R[S.id]=null,$[S.id]--;continue}if(b&&!b.stages.includes(S.id))continue;let q=g.schedule.find(L=>new Date(L.period.start).getTime()===new Date(K).getTime()&&L.stage===S.id);if(R[S.id]=q,q){const L=Math.floor((new Date(q.period.end).getTime()-new Date(q.period.start).getTime())/6e4/30);q.span=L,L>1&&($[S.id]=L-1)}}U.push({title:Z(K,"HH:mm"),stages:R}),K=new Date(K.getTime()+30*60*1e3)}return U}function o(g,v,O,b){return v.filter(K=>{const J=Z(new Date(O),"yyyy-MM-dd");return Boolean(b.schedule.filter(U=>U.stage===K.id).find(U=>U.date===J))})}const f=[[],[]],c=(g,v)=>{const[O,b]=v.split(":");return`${O}:${Math.round(g.metrics[b||O]*1e3)/1e3}`};function u(){i=Fe(this),t(0,i)}const d=()=>ie(W,n.stages=a.spec.stages.map(g=>g.id),n);function E(){n.stages=de(f[1],this.__value,this.checked),W.set(n)}const w=g=>ie(W,n.stages=[g.id],n),B=()=>ie(W,n.tracks=a.spec.tracks.map(g=>g.id),n);function H(){n.tracks=de(f[0],this.__value,this.checked),W.set(n)}const V=g=>ie(W,n.tracks=[g.id],n),N=(g,v)=>v.id===g.track;return s.$$.update=()=>{s.$$.dirty[0]&3&&t(2,e=a?a.spec["schedule-candidates"][i]:null)},[i,a,e,n,_,o,c,u,d,E,f,w,B,H,V,N]}class ul extends Re{constructor(l){super();Ye(this,l,sl,ll,Ge,{},null,[-1,-1])}}export{ul as default,fl as prerender};