import{S as Qe,i as We,s as xe,e as T,t as B,k as Z,c as I,a as H,h as M,d,m as q,b as m,g as O,J as c,N as me,j as Q,K as le,Y as et,n as se,o as K,p as ae,q as Y,L as pe,v as tt,T as lt,a4 as be,E as ce,l as ee,w as st,x as at,y as rt,B as ot,a5 as it}from"../chunks/index-9987666b.js";import{g as nt}from"../chunks/navigation-0e6511d1.js";import{p as ve}from"../chunks/stores-94e0f320.js";import{b as ge,s as ne}from"../chunks/stores-af76d038.js";import{p as ct}from"../chunks/periods-d433e7f7.js";import{L as ft,S as ut}from"../chunks/Link-57e97f60.js";import{c as dt}from"../chunks/index-1cc1bdc7.js";import{f as x}from"../chunks/index-14ac584d.js";import{l as he}from"../chunks/index-c9b2ee0d.js";import"../chunks/singletons-d1fb5791.js";import"../chunks/index-4049ca3c.js";const{Boolean:de}=it;function ke(a,t,e){const l=a.slice();return l[17]=t[e],l}function we(a,t,e){const l=a.slice();return l[20]=t[e],l}function Ee(a,t,e){const l=a.slice();return l[23]=t[e],l}function De(a,t,e){const l=a.slice();return l[26]=t[e][0],l[27]=t[e][1],l}function ye(a,t,e){const l=a.slice();return l[30]=t[e],l}function Te(a,t,e){const l=a.slice();return l[33]=t[e],l}function Ie(a,t,e){const l=a.slice();return l[23]=t[e],l}function Ve(a,t,e){const l=a.slice();return l[38]=t[e],l}function He(a,t,e){const l=a.slice();return l[17]=t[e],l}function Ae(a){let t,e,l,o,f,s,i,r,n,V,v,A,b,P,R,j,g,S,w=a[6](a[0]),E=[];for(let _=0;_K(o[s],1,1,()=>{o[s]=null});return{c(){for(let s=0;s{s[V]=null}),ae()),~t?(e=s[t],e?e.p(r,n):(e=s[t]=f[t](r),e.c()),Y(e,1),e.m(l.parentNode,l)):e=null)},i(r){o||(Y(e),o=!0)},o(r){K(e),o=!1},d(r){~t&&s[t].d(r),r&&d(l)}}}function bt(a){let t,e,l=[[a[20].stages[a[23].id],Ke(a[0],a[20].stages[a[23].id].event)]],o=[];for(let s=0;s<1;s+=1)o[s]=Ce(De(a,l,s));const f=s=>K(o[s],1,1,()=>{o[s]=null});return{c(){for(let s=0;s<1;s+=1)o[s].c();t=ee()},l(s){for(let i=0;i<1;i+=1)o[i].l(s);t=ee()},m(s,i){for(let r=0;r<1;r+=1)o[r].m(s,i);O(s,t,i),e=!0},p(s,i){if(i[0]&63){l=[[s[20].stages[s[23].id],Ke(s[0],s[20].stages[s[23].id].event)]];let r;for(r=0;r<1;r+=1){const n=De(s,l,r);o[r]?(o[r].p(n,i),Y(o[r],1)):(o[r]=Ce(n),o[r].c(),Y(o[r],1),o[r].m(t.parentNode,t))}for(se(),r=1;r<1;r+=1)f(r);ae()}},i(s){if(!e){for(let i=0;i<1;i+=1)Y(o[i]);e=!0}},o(s){o=o.filter(de);for(let i=0;i<1;i+=1)K(o[i]);e=!1},d(s){le(o,s),s&&d(t)}}}function vt(a){let t;return{c(){t=T("td")},l(e){t=I(e,"TD",{}),H(t).forEach(d)},m(e,l){O(e,t,l)},p:ce,i:ce,o:ce,d(e){e&&d(t)}}}function $e(a){let t,e;function l(...s){return a[10](a[27],...s)}let o=[a[0].spec.tracks.find(l)],f=[];for(let s=0;s<1;s+=1)f[s]=ze(Te(a,o,s));return{c(){t=B("[");for(let s=0;s<1;s+=1)f[s].c();e=B("]")},l(s){t=M(s,"[");for(let i=0;i<1;i+=1)f[i].l(s);e=M(s,"]")},m(s,i){O(s,t,i);for(let r=0;r<1;r+=1)f[r].m(s,i);O(s,e,i)},p(s,i){if(a=s,i[0]&55){o=[a[0].spec.tracks.find(l)];let r;for(r=0;r<1;r+=1){const n=Te(a,o,r);f[r]?f[r].p(n,i):(f[r]=ze(n),f[r].c(),f[r].m(e.parentNode,e))}for(;r<1;r+=1)f[r].d(1)}},d(s){s&&d(t),le(f,s),s&&d(e)}}}function ze(a){let t=(a[33].shortname||a[33].name)+"",e;return{c(){e=B(t)},l(l){e=M(l,t)},m(l,o){O(l,e,o)},p(l,o){o[0]&7&&t!==(t=(l[33].shortname||l[33].name)+"")&&Q(e,t)},d(l){l&&d(e)}}}function Le(a){let t,e,l=[Je(a[27])],o=[];for(let s=0;s<1;s+=1)o[s]=je(ye(a,l,s));const f=s=>K(o[s],1,1,()=>{o[s]=null});return{c(){for(let s=0;s<1;s+=1)o[s].c();t=ee()},l(s){for(let i=0;i<1;i+=1)o[i].l(s);t=ee()},m(s,i){for(let r=0;r<1;r+=1)o[r].m(s,i);O(s,t,i),e=!0},p(s,i){if(i[0]&63){l=[Je(s[27])];let r;for(r=0;r<1;r+=1){const n=ye(s,l,r);o[r]?(o[r].p(n,i),Y(o[r],1)):(o[r]=je(n),o[r].c(),Y(o[r],1),o[r].m(t.parentNode,t))}for(se(),r=1;r<1;r+=1)f(r);ae()}},i(s){if(!e){for(let i=0;i<1;i+=1)Y(o[i]);e=!0}},o(s){o=o.filter(de);for(let i=0;i<1;i+=1)K(o[i]);e=!1},d(s){le(o,s),s&&d(t)}}}function Oe(a){let t,e,l,o,f,s;return{c(){t=T("div"),e=B("("),l=T("a"),o=B("Zobrazit cel\xFD popis"),s=B(")"),this.h()},l(i){t=I(i,"DIV",{class:!0});var r=H(t);e=M(r,"("),l=I(r,"A",{href:!0,class:!0});var n=H(l);o=M(n,"Zobrazit cel\xFD popis"),n.forEach(d),s=M(r,")"),r.forEach(d),this.h()},h(){m(l,"href",f="/udalosti?id="+a[27].id),m(l,"class","svelte-8shy9x"),m(t,"class","text-xs text-blue-web/60")},m(i,r){O(i,t,r),c(t,e),c(t,l),c(l,o),c(t,s)},p(i,r){r[0]&7&&f!==(f="/udalosti?id="+i[27].id)&&m(l,"href",f)},d(i){i&&d(t)}}}function je(a){let t,e,l,o,f;e=new ut({props:{source:a[30].md,renderers:a[3]}});let s=a[30].stripped&&Oe(a);return{c(){t=T("div"),st(e.$$.fragment),l=Z(),s&&s.c(),o=Z(),this.h()},l(i){t=I(i,"DIV",{class:!0});var r=H(t);at(e.$$.fragment,r),l=q(r),s&&s.l(r),o=q(r),r.forEach(d),this.h()},h(){m(t,"class","mt-2 overflow-hidden text-sm text-blue-web/90")},m(i,r){O(i,t,r),rt(e,t,null),c(t,l),s&&s.m(t,null),c(t,o),f=!0},p(i,r){const n={};r[0]&7&&(n.source=i[30].md),e.$set(n),i[30].stripped?s?s.p(i,r):(s=Oe(i),s.c(),s.m(t,o)):s&&(s.d(1),s=null)},i(i){f||(Y(e.$$.fragment,i),f=!0)},o(i){K(e.$$.fragment,i),f=!1},d(i){i&&d(t),ot(e),s&&s.d()}}}function Ce(a){let t,e,l,o=x(new Date(a[26].period.start),"HH:mm")+"",f,s,i=x(new Date(a[26].period.end),"HH:mm")+"",r,n,V,v,A=a[26].id+"",b,P,R,j,g,S=a[27].name+"",w,E,z,k,_=Fe(a[0],a[27])+"",$,p,C=a[27].tags.map(Xe).join(", ")+"",L,J,D,F,N,G,u=a[27].track&&$e(a),y=a[27].description&&a[2].showDescriptions&&Le(a);return{c(){t=T("td"),e=T("div"),l=T("div"),f=B(o),s=B("-"),r=B(i),n=Z(),V=T("span"),v=B("@"),b=B(A),P=Z(),u&&u.c(),R=Z(),j=T("div"),g=T("a"),w=B(S),z=Z(),k=T("div"),$=Z(),p=T("div"),L=B(C),J=Z(),y&&y.c(),D=Z(),this.h()},l(h){t=I(h,"TD",{class:!0,valign:!0,rowspan:!0});var U=H(t);e=I(U,"DIV",{class:!0});var X=H(e);l=I(X,"DIV",{class:!0});var W=H(l);f=M(W,o),s=M(W,"-"),r=M(W,i),n=q(W),V=I(W,"SPAN",{class:!0});var te=H(V);v=M(te,"@"),b=M(te,A),te.forEach(d),P=q(W),u&&u.l(W),W.forEach(d),R=q(X),j=I(X,"DIV",{class:!0});var fe=H(j);g=I(fe,"A",{href:!0,class:!0});var re=H(g);w=M(re,S),re.forEach(d),fe.forEach(d),z=q(X),k=I(X,"DIV",{class:!0});var ie=H(k);ie.forEach(d),$=q(X),p=I(X,"DIV",{class:!0});var ue=H(p);L=M(ue,C),ue.forEach(d),J=q(X),y&&y.l(X),X.forEach(d),D=q(U),U.forEach(d),this.h()},h(){m(V,"class","text-blue-web/80"),m(l,"class","text-xs"),m(g,"href",E="/udalosti?id="+a[27].id),m(g,"class","hover:underline svelte-8shy9x"),m(j,"class","font-bold mt-1"),m(k,"class","text-xs mt-1"),m(p,"class","text-xs mt-2 text-blue-web/50"),m(e,"class","px-2 py-1 mb-1 mt-1"),m(t,"class",F="text-sm h-full transition-all "+a[27].color+" "+Ge(a[0],a[27],a[2].tracks)+" svelte-8shy9x"),m(t,"valign","top"),m(t,"rowspan",N=a[20].stages[a[23].id].span)},m(h,U){O(h,t,U),c(t,e),c(e,l),c(l,f),c(l,s),c(l,r),c(l,n),c(l,V),c(V,v),c(V,b),c(l,P),u&&u.m(l,null),c(e,R),c(e,j),c(j,g),c(g,w),c(e,z),c(e,k),k.innerHTML=_,c(e,$),c(e,p),c(p,L),c(e,J),y&&y.m(e,null),c(t,D),G=!0},p(h,U){(!G||U[0]&7)&&o!==(o=x(new Date(h[26].period.start),"HH:mm")+"")&&Q(f,o),(!G||U[0]&7)&&i!==(i=x(new Date(h[26].period.end),"HH:mm")+"")&&Q(r,i),(!G||U[0]&7)&&A!==(A=h[26].id+"")&&Q(b,A),h[27].track?u?u.p(h,U):(u=$e(h),u.c(),u.m(l,null)):u&&(u.d(1),u=null),(!G||U[0]&7)&&S!==(S=h[27].name+"")&&Q(w,S),(!G||U[0]&7&&E!==(E="/udalosti?id="+h[27].id))&&m(g,"href",E),(!G||U[0]&7)&&_!==(_=Fe(h[0],h[27])+"")&&(k.innerHTML=_),(!G||U[0]&7)&&C!==(C=h[27].tags.map(Xe).join(", ")+"")&&Q(L,C),h[27].description&&h[2].showDescriptions?y?(y.p(h,U),U[0]&7&&Y(y,1)):(y=Le(h),y.c(),Y(y,1),y.m(e,null)):y&&(se(),K(y,1,1,()=>{y=null}),ae()),(!G||U[0]&7&&F!==(F="text-sm h-full transition-all "+h[27].color+" "+Ge(h[0],h[27],h[2].tracks)+" svelte-8shy9x"))&&m(t,"class",F),(!G||U[0]&7&&N!==(N=h[20].stages[h[23].id].span))&&m(t,"rowspan",N)},i(h){G||(Y(y),G=!0)},o(h){K(y),G=!1},d(h){h&&d(t),u&&u.d(),y&&y.d()}}}function Ue(a){let t,e,l=a[2]&&(a[2].stage===a[23].id||a[2].stage==="all")&&Me(a);return{c(){l&&l.c(),t=ee()},l(o){l&&l.l(o),t=ee()},m(o,f){l&&l.m(o,f),O(o,t,f),e=!0},p(o,f){o[2]&&(o[2].stage===o[23].id||o[2].stage==="all")?l?(l.p(o,f),f[0]&7&&Y(l,1)):(l=Me(o),l.c(),Y(l,1),l.m(t.parentNode,t)):l&&(se(),K(l,1,1,()=>{l=null}),ae())},i(o){e||(Y(l),e=!0)},o(o){K(l),e=!1},d(o){l&&l.d(o),o&&d(t)}}}function Ze(a){let t,e,l=a[20].title+"",o,f,s,i,r=_e(a[0],a[0].spec.stages,a[17],a[1]),n=[];for(let v=0;vK(n[v],1,1,()=>{n[v]=null});return{c(){t=T("tr"),e=T("th"),o=B(l),f=Z();for(let v=0;vK(N[u],1,1,()=>{N[u]=null});return{c(){t=T("div"),e=T("div"),l=B("Generov\xE1no: "),f=B(o),s=Z(),i=T("h2"),L.c(),r=Z(),n=T("div"),V=T("div"),v=T("table"),A=T("thead"),b=T("tr"),P=T("th"),j=B(R),g=T("br"),w=B(S),E=Z();for(let u=0;u{L[N]=null}),ae(),_=L[k],_?_.p(D,F):(_=L[k]=C[k](D),_.c()),Y(_,1),_.m(z,null))},i(D){$||(Y(_),$=!0)},o(D){K(_),$=!1},d(D){D&&d(t),D&&d(e),p&&p.d(),D&&d(E),D&&d(z),L[k].d()}}}const Bt=!0;function Re(a,t){return t.speakers.map(e=>{const l=a.spec.speakers.find(o=>o.id===e);return l.name+(l.nickname?` (${l.nickname})`:"")}).join(", ")}function Fe(a,t){return t.type==="lightning-series"?a.spec.events.filter(e=>e.parent===t.id).map(e=>`${e.name} - ${Re(a,e)||"TBD"}`).join("
"):Re(a,t)}function Ge(a,t,e){return"border border-blue-web/50"}function kt(a,t){const e=new Date(a.start),l=new Date(a.end),o=new Date(t.start),f=new Date(t.end);return e.getTime()o.getTime()}function _e(a,t,e,l){return t.filter(o=>Boolean(l.filter(f=>f.stage===o.id).find(f=>kt(e.period,f.period))))}function Ye(a){return[{id:"all",name:"V\u0161echny s\xE1ly"},...a.spec.stages]}function Je(a){if(!a.description)return{};const t=a.description.split(` `),e=t.length>1;return{md:t[0],stripped:e}}function Ke(a,t){const e=a.spec.events.find(l=>l.id===t);if(!e)return console.log(`Event not found: ${t}`),null;switch(e.type){case"panel":e.color="bg-orange-400/20 hover:bg-orange-400/40";break;case"talk":e.color="bg-custom-green/20 hover:bg-custom-green/40";break;case"workshop":e.color="bg-custom-blue/20 hover:bg-custom-blue/40";break;case"campfire":e.color="bg-purple-400/20 hover:bg-purple-400/40";break;case"lightning-series":e.color="bg-yellow-400/20 hover:bg-yellow-400/40";break;default:e.color="bg-rose-400/20 hover:bg-rose-400/40"}return e}const Xe=a=>`#${a}`;function wt(a,t,e){let l,o,f,s;pe(a,ve,g=>e(13,o=g)),pe(a,ge,g=>e(0,f=g)),pe(a,ne,g=>e(2,s=g));const i={link:ft},r={time:{key:"time"},stage:{key:"stage"},desc:{key:"showDescriptions",type:"boolean"}};let n=[];n.push(ve.subscribe(()=>{ne.update(g=>{for(const S of Object.keys(r)){const w=r[S],E=o.url.searchParams.get(S);w.type==="boolean"?E!==void 0&&(g[w.key]=Boolean(E)):g[w.key]=E||"all"}return g})})),tt(async()=>{const g=ge.subscribe(w=>{v(w),w.spec.stages});n.push(g);const S=ne.subscribe(w=>{const E=[];E.push(["time",w.time==="all"?void 0:w.time]),E.push(["stage",w.stage==="all"?void 0:w.stage]),E.push(["desc",w.showDescriptions===null||w.showDescriptions===!1||w.showDescriptions===void 0?void 0:!0]);let z="?";if(E.length>0){for(const k of E)k[1]===void 0&&o.url.searchParams.get(k[0])!==void 0?o.url.searchParams.delete(k[0]):o.url.searchParams.set(k[0],k[1]);z=`?${o.url.searchParams.toString()}`}return nt(z),!1});n.push(S)}),lt(()=>{for(const g of n)g()});function V(g,S,w,E=null){let z=S.start;const k=S.end,_=[],$={};for(;dt(z,k)===-1;){const p={};for(const C of w.spec.stages){if($[C.id]>0){p[C.id]=null,$[C.id]--;continue}if(E&&E.stage!==C.id&&E.stage!=="all")continue;let L=g.find(J=>new Date(J.period.start).getTime()===new Date(z).getTime()&&J.stage===C.id);if(p[C.id]=L,L){const J=Math.floor((new Date(L.period.end).getTime()-new Date(L.period.start).getTime())/6e4/30);L.span=J,J>1&&($[C.id]=J-1)}}_.push({title:x(z,"HH:mm"),stages:p}),z=new Date(z.getTime()+30*60*1e3)}return _}function v(g,S=!1){let w=g.scheduleTimes.map((E,z)=>{const k=ct(g,E);return k.id=String(z),k});return S&&(w=w.filter(E=>E.id===S||S==="all")),w}function A(g){return[{id:"all",name:"V\u0161echny dny"},...v(g)]}const b=g=>be(ne,s.time=g.id,s),P=g=>be(ne,s.stage=g.id,s);function R(){s.showDescriptions=this.checked,ne.set(s)}const j=(g,S)=>S.id===g.track;return a.$$.update=()=>{a.$$.dirty[0]&1&&e(1,l=f?f.spec.schedule:null)},[f,l,s,i,V,v,A,b,P,R,j]}class Mt extends Qe{constructor(t){super();We(this,t,wt,gt,xe,{},null,[-1,-1])}}export{Mt as default,Bt as prerender};