import{S as et,i as tt,s as lt,e as I,t as B,k as z,c as V,a as y,h as $,d,m as U,b as T,a1 as st,g as M,J as u,a2 as pe,N as ce,j as F,K as te,Y as it,n as le,o as X,p as se,q,L as ue,v as ot,T as at,a3 as nt,a4 as me,E as oe,l as x,w as rt,x as ct,y as ft,B as ut,a5 as dt}from"../chunks/index-9987666b.js";import{g as ht}from"../chunks/navigation-0e6511d1.js";import{p as be}from"../chunks/stores-94e0f320.js";import{b as ve,s as ie}from"../chunks/stores-af76d038.js";import{p as _t}from"../chunks/periods-3c9faf13.js";import{L as pt,S as mt}from"../chunks/Link-57e97f60.js";import{c as bt,l as ne}from"../chunks/index-ab555ab5.js";import{f as ee}from"../chunks/index-14ac584d.js";import"../chunks/singletons-d1fb5791.js";import"../chunks/index-4049ca3c.js";import"../chunks/utils-1595b72e.js";const{Boolean:ae}=dt;function ge(s,e,t){const l=s.slice();return l[20]=e[t],l}function ke(s,e,t){const l=s.slice();return l[23]=e[t],l}function we(s,e,t){const l=s.slice();return l[26]=e[t],l}function Ee(s,e,t){const l=s.slice();return l[29]=e[t][0],l[30]=e[t][1],l}function De(s,e,t){const l=s.slice();return l[33]=e[t],l}function Te(s,e,t){const l=s.slice();return l[36]=e[t],l}function Ie(s,e,t){const l=s.slice();return l[26]=e[t],l}function Ve(s,e,t){const l=s.slice();return l[41]=e[t],l}function ye(s,e,t){const l=s.slice();return l[20]=e[t],l}function Se(s,e,t){const l=s.slice();return l[46]=e[t],l[48]=t,l}function He(s){let e,t,l,a,f,i,n,o=s[1].spec["schedule-candidates"],r=[];for(let _=0;_s[9].call(f)),T(a,"class","flex flex-wrap gap-1")},m(_,v){M(_,e,v),u(e,t),M(_,l,v),M(_,a,v),u(a,f);for(let p=0;pX(a[i],1,1,()=>{a[i]=null});return{c(){for(let i=0;i{i[_]=null}),se()),~e?(t=i[e],t?t.p(o,r):(t=i[e]=f[e](o),t.c()),q(t,1),t.m(l.parentNode,l)):t=null)},i(o){a||(q(t),a=!0)},o(o){X(t),a=!1},d(o){~e&&i[e].d(o),o&&d(l)}}}function Et(s){let e,t,l=[[s[23].stages[s[26].id],Qe(s[1],s[23].stages[s[26].id].event)]],a=[];for(let i=0;i<1;i+=1)a[i]=Ze(Ee(s,l,i));const f=i=>X(a[i],1,1,()=>{a[i]=null});return{c(){for(let i=0;i<1;i+=1)a[i].c();e=x()},l(i){for(let n=0;n<1;n+=1)a[n].l(i);e=x()},m(i,n){for(let o=0;o<1;o+=1)a[o].m(i,n);M(i,e,n),t=!0},p(i,n){if(n[0]&126){l=[[i[23].stages[i[26].id],Qe(i[1],i[23].stages[i[26].id].event)]];let o;for(o=0;o<1;o+=1){const r=Ee(i,l,o);a[o]?(a[o].p(r,n),q(a[o],1)):(a[o]=Ze(r),a[o].c(),q(a[o],1),a[o].m(e.parentNode,e))}for(le(),o=1;o<1;o+=1)f(o);se()}},i(i){if(!t){for(let n=0;n<1;n+=1)q(a[n]);t=!0}},o(i){a=a.filter(ae);for(let n=0;n<1;n+=1)X(a[n]);t=!1},d(i){te(a,i),i&&d(e)}}}function Dt(s){let e;return{c(){e=I("td")},l(t){e=V(t,"TD",{}),y(e).forEach(d)},m(t,l){M(t,e,l)},p:oe,i:oe,o:oe,d(t){t&&d(e)}}}function Ce(s){let e,t;function l(...i){return s[13](s[30],...i)}let a=[s[1].spec.tracks.find(l)],f=[];for(let i=0;i<1;i+=1)f[i]=Le(Te(s,a,i));return{c(){e=B("[");for(let i=0;i<1;i+=1)f[i].c();t=B("]")},l(i){e=$(i,"[");for(let n=0;n<1;n+=1)f[n].l(i);t=$(i,"]")},m(i,n){M(i,e,n);for(let o=0;o<1;o+=1)f[o].m(i,n);M(i,t,n)},p(i,n){if(s=i,n[0]&110){a=[s[1].spec.tracks.find(l)];let o;for(o=0;o<1;o+=1){const r=Te(s,a,o);f[o]?f[o].p(r,n):(f[o]=Le(r),f[o].c(),f[o].m(t.parentNode,t))}for(;o<1;o+=1)f[o].d(1)}},d(i){i&&d(e),te(f,i),i&&d(t)}}}function Le(s){let e=(s[36].shortname||s[36].name)+"",t;return{c(){t=B(e)},l(l){t=$(l,e)},m(l,a){M(l,t,a)},p(l,a){a[0]&14&&e!==(e=(l[36].shortname||l[36].name)+"")&&F(t,e)},d(l){l&&d(t)}}}function je(s){let e,t,l=[Ge(s[30])],a=[];for(let i=0;i<1;i+=1)a[i]=Ue(De(s,l,i));const f=i=>X(a[i],1,1,()=>{a[i]=null});return{c(){for(let i=0;i<1;i+=1)a[i].c();e=x()},l(i){for(let n=0;n<1;n+=1)a[n].l(i);e=x()},m(i,n){for(let o=0;o<1;o+=1)a[o].m(i,n);M(i,e,n),t=!0},p(i,n){if(n[0]&126){l=[Ge(i[30])];let o;for(o=0;o<1;o+=1){const r=De(i,l,o);a[o]?(a[o].p(r,n),q(a[o],1)):(a[o]=Ue(r),a[o].c(),q(a[o],1),a[o].m(e.parentNode,e))}for(le(),o=1;o<1;o+=1)f(o);se()}},i(i){if(!t){for(let n=0;n<1;n+=1)q(a[n]);t=!0}},o(i){a=a.filter(ae);for(let n=0;n<1;n+=1)X(a[n]);t=!1},d(i){te(a,i),i&&d(e)}}}function ze(s){let e,t,l,a,f,i;return{c(){e=I("div"),t=B("("),l=I("a"),a=B("Zobrazit cel\xFD popis"),i=B(")"),this.h()},l(n){e=V(n,"DIV",{class:!0});var o=y(e);t=$(o,"("),l=V(o,"A",{href:!0});var r=y(l);a=$(r,"Zobrazit cel\xFD popis"),r.forEach(d),i=$(o,")"),o.forEach(d),this.h()},h(){T(l,"href",f="/udalosti?id="+s[30].id),T(e,"class","text-xs text-blue-web/60")},m(n,o){M(n,e,o),u(e,t),u(e,l),u(l,a),u(e,i)},p(n,o){o[0]&14&&f!==(f="/udalosti?id="+n[30].id)&&T(l,"href",f)},d(n){n&&d(e)}}}function Ue(s){let e,t,l,a,f;t=new mt({props:{source:s[33].md,renderers:s[4]}});let i=s[33].stripped&&ze(s);return{c(){e=I("div"),rt(t.$$.fragment),l=z(),i&&i.c(),a=z(),this.h()},l(n){e=V(n,"DIV",{class:!0});var o=y(e);ct(t.$$.fragment,o),l=U(o),i&&i.l(o),a=U(o),o.forEach(d),this.h()},h(){T(e,"class","mt-2 overflow-hidden text-sm text-blue-web/90")},m(n,o){M(n,e,o),ft(t,e,null),u(e,l),i&&i.m(e,null),u(e,a),f=!0},p(n,o){const r={};o[0]&14&&(r.source=n[33].md),t.$set(r),n[33].stripped?i?i.p(n,o):(i=ze(n),i.c(),i.m(e,a)):i&&(i.d(1),i=null)},i(n){f||(q(t.$$.fragment,n),f=!0)},o(n){X(t.$$.fragment,n),f=!1},d(n){n&&d(e),ut(t),i&&i.d()}}}function Ze(s){let e,t,l,a=ee(new Date(s[29].period.start),"HH:mm")+"",f,i,n=ee(new Date(s[29].period.end),"HH:mm")+"",o,r,_,v,p=s[29].id+"",b,E,C,j,O,N=s[30].name+"",S,k,P,g,c=Ke(s[1],s[30])+"",w,h,H=s[30].tags.map(We).join(", ")+"",G,m,A,D,Z,R,K=s[30].track&&Ce(s),Y=s[30].description&&s[3].showDescriptions&&je(s);return{c(){e=I("td"),t=I("div"),l=I("div"),f=B(a),i=B("-"),o=B(n),r=z(),_=I("span"),v=B("@"),b=B(p),E=z(),K&&K.c(),C=z(),j=I("div"),O=I("a"),S=B(N),P=z(),g=I("div"),w=z(),h=I("div"),G=B(H),m=z(),Y&&Y.c(),A=z(),this.h()},l(L){e=V(L,"TD",{class:!0,valign:!0,rowspan:!0});var J=y(e);t=V(J,"DIV",{class:!0});var W=y(t);l=V(W,"DIV",{class:!0});var Q=y(l);f=$(Q,a),i=$(Q,"-"),o=$(Q,n),r=U(Q),_=V(Q,"SPAN",{class:!0});var fe=y(_);v=$(fe,"@"),b=$(fe,p),fe.forEach(d),E=U(Q),K&&K.l(Q),Q.forEach(d),C=U(W),j=V(W,"DIV",{class:!0});var de=y(j);O=V(de,"A",{href:!0,class:!0});var he=y(O);S=$(he,N),he.forEach(d),de.forEach(d),P=U(W),g=V(W,"DIV",{class:!0});var xe=y(g);xe.forEach(d),w=U(W),h=V(W,"DIV",{class:!0});var _e=y(h);G=$(_e,H),_e.forEach(d),m=U(W),Y&&Y.l(W),W.forEach(d),A=U(J),J.forEach(d),this.h()},h(){T(_,"class","text-blue-web/80"),T(l,"class","text-xs"),T(O,"href",k="/udalosti?id="+s[30].id),T(O,"class","hover:underline"),T(j,"class","font-semibold mt-1"),T(g,"class","text-xs mt-1"),T(h,"class","text-xs mt-2 text-blue-web/50"),T(t,"class","px-2 py-1 mb-1 mt-1"),T(e,"class",D="text-sm h-full transition-all "+s[30].color+" "+Xe(s[1],s[30],s[3].tracks)),T(e,"valign","top"),T(e,"rowspan",Z=s[23].stages[s[26].id].span)},m(L,J){M(L,e,J),u(e,t),u(t,l),u(l,f),u(l,i),u(l,o),u(l,r),u(l,_),u(_,v),u(_,b),u(l,E),K&&K.m(l,null),u(t,C),u(t,j),u(j,O),u(O,S),u(t,P),u(t,g),g.innerHTML=c,u(t,w),u(t,h),u(h,G),u(t,m),Y&&Y.m(t,null),u(e,A),R=!0},p(L,J){(!R||J[0]&14)&&a!==(a=ee(new Date(L[29].period.start),"HH:mm")+"")&&F(f,a),(!R||J[0]&14)&&n!==(n=ee(new Date(L[29].period.end),"HH:mm")+"")&&F(o,n),(!R||J[0]&14)&&p!==(p=L[29].id+"")&&F(b,p),L[30].track?K?K.p(L,J):(K=Ce(L),K.c(),K.m(l,null)):K&&(K.d(1),K=null),(!R||J[0]&14)&&N!==(N=L[30].name+"")&&F(S,N),(!R||J[0]&14&&k!==(k="/udalosti?id="+L[30].id))&&T(O,"href",k),(!R||J[0]&14)&&c!==(c=Ke(L[1],L[30])+"")&&(g.innerHTML=c),(!R||J[0]&14)&&H!==(H=L[30].tags.map(We).join(", ")+"")&&F(G,H),L[30].description&&L[3].showDescriptions?Y?(Y.p(L,J),J[0]&14&&q(Y,1)):(Y=je(L),Y.c(),q(Y,1),Y.m(t,null)):Y&&(le(),X(Y,1,1,()=>{Y=null}),se()),(!R||J[0]&14&&D!==(D="text-sm h-full transition-all "+L[30].color+" "+Xe(L[1],L[30],L[3].tracks)))&&T(e,"class",D),(!R||J[0]&14&&Z!==(Z=L[23].stages[L[26].id].span))&&T(e,"rowspan",Z)},i(L){R||(q(Y),R=!0)},o(L){X(Y),R=!1},d(L){L&&d(e),K&&K.d(),Y&&Y.d()}}}function qe(s){let e,t,l=s[3]&&(s[3].stage===s[26].id||s[3].stage==="all")&&Oe(s);return{c(){l&&l.c(),e=x()},l(a){l&&l.l(a),e=x()},m(a,f){l&&l.m(a,f),M(a,e,f),t=!0},p(a,f){a[3]&&(a[3].stage===a[26].id||a[3].stage==="all")?l?(l.p(a,f),f[0]&14&&q(l,1)):(l=Oe(a),l.c(),q(l,1),l.m(e.parentNode,e)):l&&(le(),X(l,1,1,()=>{l=null}),se())},i(a){t||(q(l),t=!0)},o(a){X(l),t=!1},d(a){l&&l.d(a),a&&d(e)}}}function Re(s){let e,t,l=s[23].title+"",a,f,i,n,o=re(s[1],s[1].spec.stages,s[20],s[2]),r=[];for(let v=0;vX(r[v],1,1,()=>{r[v]=null});return{c(){e=I("tr"),t=I("th"),a=B(l),f=z();for(let v=0;vX(H[m],1,1,()=>{H[m]=null});return{c(){e=I("div"),t=I("h2"),g.c(),l=z(),a=I("div"),f=I("div"),i=I("table"),n=I("thead"),o=I("tr"),r=I("th"),v=B(_),p=I("br"),E=B(b),C=z();for(let m=0;m{P[h]=null}),se(),j=P[C],j?j.p(c,w):(j=P[C]=k[C](c),j.c()),q(j,1),j.m(E,null))},i(c){O||(q(j),O=!0)},o(c){X(j),O=!1},d(c){c&&d(e),c&&d(t),N&&N.d(),S&&S.d(),c&&d(b),c&&d(E),P[C].d()}}}const Lt=!0;function Je(s,e){return e.speakers.map(t=>{const l=s.spec.speakers.find(a=>a.id===t);return l.name+(l.nickname?` (${l.nickname})`:"")}).join(", ")}function Ke(s,e){return e.type==="lightning-series"?s.spec.events.filter(t=>t.parent===e.id).map(t=>`${t.name} - ${Je(s,t)||"TBD"}`).join("
"):Je(s,e)}function Xe(s,e,t){return"border border-blue-web/50"}function It(s,e){const t=new Date(s.start),l=new Date(s.end),a=new Date(e.start),f=new Date(e.end);return t.getTime()a.getTime()}function re(s,e,t,l){return e.filter(a=>Boolean(l.schedule.filter(f=>f.stage===a.id).find(f=>It(t.period,f.period))))}function Fe(s){return[{id:"all",name:"V\u0161echny s\xE1ly"},...s.spec.stages]}function Ge(s){if(!s.description)return{};const e=s.description.split(` `),t=e.length>1;return{md:e[0],stripped:t}}function Qe(s,e){const t=s.spec.events.find(l=>l.id===e);if(!t)return console.log(`Event not found: ${e}`),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 We=s=>`#${s}`;function Vt(s,e,t){let l,a,f,i;ue(s,be,k=>t(16,a=k)),ue(s,ve,k=>t(1,f=k)),ue(s,ie,k=>t(3,i=k));const n={link:pt};let o=0;const r={time:{key:"time"},stage:{key:"stage"},desc:{key:"showDescriptions",type:"boolean"}};let _=[];_.push(be.subscribe(()=>{ie.update(k=>{for(const P of Object.keys(r)){const g=r[P],c=a.url.searchParams.get(P);g.type==="boolean"?c!==void 0&&(k[g.key]=Boolean(c)):k[g.key]=c||"all"}return k})})),ot(async()=>{const k=ve.subscribe(g=>{p(g),g.spec.stages});_.push(k);const P=ie.subscribe(g=>{const c=[];c.push(["time",g.time==="all"?void 0:g.time]),c.push(["stage",g.stage==="all"?void 0:g.stage]),c.push(["desc",g.showDescriptions===null||g.showDescriptions===!1||g.showDescriptions===void 0?void 0:!0]);let w="?";if(c.length>0){for(const h of c)h[1]===void 0&&a.url.searchParams.get(h[0])!==void 0?a.url.searchParams.delete(h[0]):a.url.searchParams.set(h[0],h[1]);w=`?${a.url.searchParams.toString()}`}return ht(w),!1});_.push(P)}),at(()=>{for(const k of _)k()});function v(k,P,g,c=null){let w=P.start;const h=P.end,H=[],G={};for(;bt(w,h)===-1;){const m={};for(const A of g.spec.stages){if(G[A.id]>0){m[A.id]=null,G[A.id]--;continue}if(c&&c.stage!==A.id&&c.stage!=="all")continue;let D=k.schedule.find(Z=>new Date(Z.period.start).getTime()===new Date(w).getTime()&&Z.stage===A.id);if(m[A.id]=D,D){const Z=Math.floor((new Date(D.period.end).getTime()-new Date(D.period.start).getTime())/6e4/30);D.span=Z,Z>1&&(G[A.id]=Z-1)}}H.push({title:ee(w,"HH:mm"),stages:m}),w=new Date(w.getTime()+30*60*1e3)}return H}function p(k,P=!1){let g=k.scheduleTimes.map((c,w)=>{const h=_t(k,c);return h.id=String(w),h});return P&&(g=g.filter(c=>c.id===P||P==="all")),g}function b(k){return[{id:"all",name:"V\u0161echny dny"},...p(k)]}const E=(k,P)=>{const[g,c]=P.split(":");return`${g}:${Math.round(k.metrics[c||g]*1e3)/1e3}`};function C(){o=nt(this),t(0,o)}const j=k=>me(ie,i.time=k.id,i),O=k=>me(ie,i.stage=k.id,i);function N(){i.showDescriptions=this.checked,ie.set(i)}const S=(k,P)=>P.id===k.track;return s.$$.update=()=>{s.$$.dirty[0]&3&&t(2,l=f?f.spec["schedule-candidates"][o]:null)},[o,f,l,i,n,v,p,b,E,C,j,O,N,S]}class jt extends et{constructor(e){super();tt(this,e,Vt,Tt,lt,{},null,[-1,-1])}}export{jt as default,Lt as prerender};