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