utxo22-web/_app/pages/program.svelte-ada1d427.js

14 řádky
28 KiB
JavaScript
Surový Normální zobrazení Historie

import{S as vt,i as bt,s as gt,e as k,t as S,k as F,c as w,a as E,h as H,d,m as U,b as m,g as N,J as u,O as De,j as le,K as fe,Y as kt,n as ae,o as Q,p as re,q as z,L as Ee,v as wt,T as Et,a4 as $e,E as he,l as ce,w as ht,x as _t,y as pt,B as mt,a5 as Dt}from"../chunks/index-695b5929.js";import{g as yt}from"../chunks/navigation-0e6511d1.js";import{p as Se}from"../chunks/stores-67278648.js";import{f as se}from"../chunks/utils-1595b72e.js";import{b as He,s as de}from"../chunks/stores-ca1bbb18.js";import{p as Tt}from"../chunks/periods-3c9faf13.js";import{E as Pe}from"../chunks/config-c1fcac96.js";import{L as It,S as Vt}from"../chunks/Link-9c9f68ae.js";import{S as At}from"../chunks/SvelteTooltip-3b97fc95.js";import{c as $t}from"../chunks/index-1cc1bdc7.js";import{l as je}from"../chunks/index-c9b2ee0d.js";import"../chunks/singletons-d1fb5791.js";import"../chunks/index-14ac584d.js";import"../chunks/index-57c7a2a5.js";const{Boolean:_e}=Dt;function Ne(s,e,t){const l=s.slice();return l[20]=e[t],l}function ze(s,e,t){const l=s.slice();return l[23]=e[t],l}function Be(s,e,t){const l=s.slice();return l[26]=e[t],l}function Me(s,e,t){const l=s.slice();return l[29]=e[t][0],l[30]=e[t][1],l}function Oe(s,e,t){const l=s.slice();return l[33]=e[t],l}function Le(s,e,t){const l=s.slice();return l[36]=e[t],l}function Ce(s,e,t){const l=s.slice();return l[26]=e[t],l}function Fe(s,e,t){const l=s.slice();return l[41]=e[t],l}function Ue(s,e,t){const l=s.slice();return l[41]=e[t],l}function Ze(s,e,t){const l=s.slice();return l[20]=e[t],l}function qe(s){let e,t,l,i,o,a,n,r,h,f,T,y,j,K,Z,O,L,G,B=s[7](s[0]),v=[];for(let c=0;c<B.length;c+=1)v[c]=Re(Ze(s,B,c));let g=ct(s[0]),_=[];for(let c=0;c<g.length;c+=1)_[c]=Ye(Ue(s,g,c));return{c(){e=k("div"),t=k("div"),l=k("div"),i=S("Den"),o=F();for(let c=0;c<v.length;c+=1)v[c].c();a=F(),n=k("div"),r=k("div"),h=k("div"),f=S("S\xE1l"),T=F();for(let c=0;c<_.length;c+=1)_[c].c();y=F(),j=k("div"),K=k("label"),Z=k("input"),O=S(" Zobrazit popisy"),this.h()},l(c){e=w(c,"DIV",{class:!0});var I=E(e);t=w(I,"DIV",{class:!0});var p=E(t);l=w(p,"DIV",{class:!0});var J=E(l);i=H(J,"Den"),J.forEach(d),o=U(p);for(let q=0;q<v.length;q+=1)v[q].l(p);p.forEach(d),I.forEach(d),a=U(c),n=w(c,"DIV",{class:!0});var W=E(n);r=w(W,"DIV",{class:!0});var ee=E(r);h=w(ee,"DIV",{class:!0});var V=E(h);f=H(V,"S\xE1l"),V.forEach(d),T=U(ee);for(let q=0;q<_.length;q+=1)_[q].l(ee);ee.forEach(d),W.forEach(d),y=U(c),j=w(c,"DIV",{class:!0});var C=E(j);K=w(C,"LABEL",{});var A=E(K);Z=w(A,"INPUT",{type:!0}),O=H(A," Zobrazit popisy"),A.forEach(d),C.forEach(d),this.h()},h(){m(l,"class","font-semibold uppercase my-auto mx-3"),m(t,"class","flex gap-1 flex-wrap"),m(e,"class","mb-4"),m(h,"class","font-semibold uppercase my-auto mx-3"),m(r,"class","flex gap-1 flex-wrap"),m(n,"class","mb-4"),m(Z,"type","checkbox"),m(j,"class","mb-4")},m(c,I){N(c,e,I),u(e,t),u(t,l),u(l,i),u(t,o);for(let p=0;p<v.length;p+=1)v[p].m(t,null);N(c,a,I),N(c,n,I),u(n,r),u(r,h),u(h,f),u(r,T);for(let p=0;p<_.length;p+=1)_[p].m(r,null);N(c,y,I),N(c,j,I),u(j,K),u(K,Z),Z.checked=s[3].showDescriptions,u(K,O),L||(G=De(Z,"change",s[11]),L=!0)},p(c,I){if(I[0]&137){B=c[7](c[0]);let p;for(p=0;p<B.length;p+=1){const J=Ze(c,B,p);v[p]?v[p].p(J,I):(v[p]=Re(J),v[p].c(),v[p].m(t,null))}for(;p<v.length;p+=1)v[p].d(1);v.length=B.length}if(I[0]&9){g=ct(c[0]);let p;for(p=0;p<g.length;p+=1){const J=Ue(c,g,p);_[p]?_[p].p(J,I):(_[p]=Ye(J),_[p].c(),_[p].m(r,null))}for(;p<_.length;p+=1)_[p].d(1);_.length=g.length}I[0]&8&&(Z.checked=c[3].showDescriptions)},d(c){c&&d(e),fe(v,c),c&&d(a),c&&d(n),fe(_,c),c&&d(y),c&&d(j),L=!1,G()}}}function Re(s){let e,t=s[20].name+"",l,i,o,a;function n(){return s[9](s[20])}return{c(){e=k("button"),l=S(t),this.h()},l(r){e=w(r,"BUTTON",{class:!0});var h=E(e);l=H(h,t),h.forEach(d),this.h()},h(){m(e,"class",i=(s[3].time===s[20].id?"bg-utxo-gradient text-white":"text-blue-web bg-blue-web-light hover:text-[#E16A61] hover:bg-[#E16A61]/20")+" font-semibold py-1 px-2 sm:py-2 sm:px-4 rounded-full")},m(r,h){N(r,e,h),u(e,l),o||(a=De(e,"click",n),o=!0)},p(r,h){s=r,h[0]&1&&t!==(t=s[20].name+"")&&le(l,t),h
V\u0161echny ud\xE1losti jsou v \u010De\u0161tin\u011B nebo sloven\u0161tin\u011B, pokud nen\xED uvedeno
jinak.`),this.h()},l(r){for(let f=0;f<a.length;f+=1)a[f].l(r);e=U(r),t=w(r,"DIV",{class:!0});var h=E(t);l=H(h,`V\u0161echny \u010Dasy jsou lok\xE1ln\xED - st\u0159edoevropsk\xE9 \u010Dasov\xE9 p\xE1smo CET (+02:00).
V\u0161echny ud\xE1losti jsou v \u010De\u0161tin\u011B nebo sloven\u0161tin\u011B, pokud nen\xED uvedeno
jinak.`),h.forEach(d),this.h()},h(){m(t,"class","print:hidden italic max-w-6xl mx-auto px-6 mb-4 print:max-w-full break-before-page flex gap-3")},m(r,h){for(let f=0;f<a.length;f+=1)a[f].m(r,h);N(r,e,h),N(r,t,h),u(t,l),i=!0},p(r,h){if(h[0]&383){o=r[6](r[0],r[3].time);let f;for(f=0;f<o.length;f+=1){const T=Ne(r,o,f);a[f]?(a[f].p(T,h),z(a[f],1)):(a[f]=it(T),a[f].c(),z(a[f],1),a[f].m(e.parentNode,e))}for(ae(),f=o.length;f<a.length;f+=1)n(f);re()}},i(r){if(!i){for(let h=0;h<o.length;h+=1)z(a[h]);i=!0}},o(r){a=a.filter(_e);for(let h=0;h<a.length;h+=1)Q(a[h]);i=!1},d(r){fe(a,r),r&&d(e),r&&d(t)}}}function Pt(s){let e=se(new Date(s[20].date),"iiii d.M.y")+"",t;return{c(){t=S(e)},l(l){t=H(l,e)},m(l,i){N(l,t,i)},p(l,i){i[0]&9&&e!==(e=se(new Date(l[20].date),"iiii d.M.y")+"")&&le(t,e)},d(l){l&&d(t)}}}function jt(s){let e=s[20].name+"",t;return{c(){t=S(e)},l(l){t=H(l,e)},m(l,i){N(l,t,i)},p(l,i){i[0]&9&&e!==(e=l[20].name+"")&&le(t,e)},d(l){l&&d(t)}}}function Nt(s){let e=(s[41].shortname||s[41].name)+"",t;return{c(){t=S(e)},l(l){t=H(l,e)},m(l,i){N(l,t,i)},p(l,i){i[0]&2&&e!==(e=(l[41].shortname||l[41].name)+"")&&le(t,e)},d(l){l&&d(t)}}}function zt(s){let e,t=(s[41].shortname||s[41].name)+"",l,i;return{c(){e=k("a"),l=S(t),this.h()},l(o){e=w(o,"A",{href:!0,target:!0});var a=E(e);l=H(a,t),a.forEach(d),this.h()},h(){m(e,"href",i=s[41].url),m(e,"target","_blank")},m(o,a){N(o,e,a),u(e,l)},p(o,a){a[0]&2&&t!==(t=(o[41].shortname||o[41].name)+"")&&le(l,t),a[0]&2&&i!==(i=o[41].url)&&m(e,"href",i)},d(o){o&&d(e)}}}function Je(s){let e,t,l,i,o,a;function n(f,T){return f[41].url?zt:Nt}let r=n(s),h=r(s);return{c(){e=k("div"),t=k("div"),i=F(),o=k("div"),h.c(),a=F(),this.h()},l(f){e=w(f,"DIV",{class:!0});var T=E(e);t=w(T,"DIV",{class:!0}),E(t).forEach(d),i=U(T),o=w(T,"DIV",{class:!0});var y=E(o);h.l(y),y.forEach(d),a=U(T),T.forEach(d),this.h()},h(){m(t,"class",l="w-3 h-3 "+s[41].color+" my-auto rounded-sm shrink-0"),m(o,"class","text-sm print:text-lg my-auto whitespace-nowrap"),m(e,"class","flex gap-1 w-1/4 text-blue-web")},m(f,T){N(f,e,T),u(e,t),u(e,i),u(e,o),h.m(o,null),u(e,a)},p(f,T){T[0]&2&&l!==(l="w-3 h-3 "+f[41].color+" my-auto rounded-sm shrink-0")&&m(t,"class",l),r===(r=n(f))&&h?h.p(f,T):(h.d(1),h=r(f),h&&(h.c(),h.m(o,null)))},d(f){f&&d(e),h.d()}}}function Ke(s){let e,t,l,i=s[26].capacity.seat+"",o,a,n,r,h=s[26].capacity.stand+"",f,T,y,j,K,Z,O=s[26].name+"",L,G,B,v,g=s[26].livestream&&Xe(s);return{c(){e=k("th"),t=k("div"),g&&g.c(),l=F(),o=S(i),a=F(),n=k("i"),r=S(" + "),f=S(h),T=F(),y=k("i"),j=F(),K=k("div"),Z=k("a"),L=S(O),B=F(),this.h()},l(_){e=w(_,"TH",{class:!0});var c=E(e);t=w(c,"DIV",{class:!0});var I=E(t);g&&g.l(I),l=U(I),o=H(I,i),a=U(I),n=w(I,"I",{class:!0}),E(n).forEach(d),r=H(I," + "),f=H(I,h),T=U(I),y=w(I,"I",{class:!0}),E(y).forEach(d),I.forEach(d),j=U(c),K=w(c,"DIV",{});var p=E(K);Z=w(p,"A",{href:!0});var J=E(Z);L=H(J,O),J.forEach(d),p.forEach(d),B=U(c),c.forEach(d),this.h()},h(){m(n,"class","fa-solid fa-chair"),m(y,"class","fa-solid fa-person"),m(t,"class","text-xs font-normal text-blue-web/60 mb-2.5"),m(Z,"href",G="/program?stage="+s[26].id+"&time="+s[3].time),m(e,"class","text-md py-1.5 px-1 sticky top-0 bg-white align-bottom")},m(_,c){N(_,e,c),u(e,t),g&&g.m(t,null),u(t,l),u(t,o),u(t,a),u(t,n),u(t,r),u(t,f),u(t,T),u(t,y),u(e,j),u(e,K),u(K,Z),u(Z,L),u(e,B),v=!0},p(_,c){_[26].livestream?g?c[0]&13&&z(g,1):(g=Xe(_),g.c(),z(g,1),g.m(t,l)):g&&(ae(),Q(g,1,1,()=>{g=null}),re()),(!v||c[0]&13)&&i!==(i=_[26].capacity.seat+"")&&le(o,i),(!v||c[0]&13)&&h!==(h=_[26].capacity.stand+"")&&le(f,h),(!v||c[0]&13)&&O!==(O=_[26].name+"")&&le(L,O),(!v||c[0]&13&&G!==(G="/program?stage="+_[26].id+"&time="+_[3].time))&&m(Z,"href",G)},i(_){v||(z(g),v=!0)},o(_){Q(g),v=!1},d(_){_&&d(e),g&&g.d()}}}function Xe(s){let e,t;return e=new At({props:{tip:"S\xE1l je n\xE1hr\xE1van\xFD a livestreamovan\xFD.",bottom:"true",$$slots:{default:[Bt]},$$scope:{ctx:s}}}),{c(){ht(e.$$.fragment)},l(l){_t(e.$$.fragment,l)},m(l,i){pt(e,l,i),t=!0},i(l){t||(z(e.$$.fragment,l),t=!0)},o(l){Q(e.$$.fragment,l),t=!1},d(l){mt(e,l)}}}function Bt(s){let e,t;return{c(){e=k("div"),t=k("
`),f=k("a"),T=S("sobota"),y=S(`,
`),j=k("a"),K=S("sobota (party)"),Z=S(`,
`),O=k("a"),L=S("ned\u011Ble"),G=F(),B=k("div"),p&&p.c(),v=F(),g=k("section"),c.c(),this.h()},l(V){kt('[data-svelte="svelte-124umcn"]',document.head).forEach(d),e=U(V),t=w(V,"SECTION",{class:!0});var A=E(t);l=w(A,"H1",{class:!0});var q=E(l);i=H(q,"Program"),q.forEach(d),o=U(A),a=w(A,"DIV",{class:!0});var M=E(a);n=w(M,"A",{href:!0,class:!0});var $=E(n);r=H($,"Seznam v\u0161ech ud\xE1lost\xED"),$.forEach(d),h=H(M,`, PDF:
`),f=w(M,"A",{href:!0,target:!0,class:!0});var X=E(f);T=H(X,"sobota"),X.forEach(d),y=H(M,`,
`),j=w(M,"A",{href:!0,target:!0,class:!0});var R=E(j);K=H(R,"sobota (party)"),R.forEach(d),Z=H(M,`,
`),O=w(M,"A",{href:!0,target:!0,class:!0});var te=E(O);L=H(te,"ned\u011Ble"),te.forEach(d),M.forEach(d),G=U(A),B=w(A,"DIV",{});var Y=E(B);p&&p.l(Y),Y.forEach(d),A.forEach(d),v=U(V),g=w(V,"SECTION",{class:!0});var ue=E(g);c.l(ue),ue.forEach(d),this.h()},h(){document.title="Program | UTXO.22",m(l,"class","uppercase text-2xl font-bold mb-2"),m(n,"href","/seznam-udalosti"),m(n,"class","svelte-8shy9x"),m(f,"href","https://pub.utxo.cz/22/pdf/sobota.pdf"),m(f,"target","_blank"),m(f,"class","svelte-8shy9x"),m(j,"href","https://pub.utxo.cz/22/pdf/sobota-party.pdf"),m(j,"target","_blank"),m(j,"class","svelte-8shy9x"),m(O,"href","https://pub.utxo.cz/22/pdf/nedele.pdf"),m(O,"target","_blank"),m(O,"class","svelte-8shy9x"),m(a,"class","mb-4 utxo-program-head svelte-8shy9x"),m(t,"class","relative mx-auto pt-6 sm:pt-10 pb-6 px-6 max-w-6xl text-blue-web print:hidden"),m(g,"class","relative mx-auto pb-6 sm:pb-10 px-0 text-blue-web")},m(V,C){N(V,e,C),N(V,t,C),u(t,l),u(l,i),u(t,o),u(t,a),u(a,n),u(n,r),u(a,h),u(a,f),u(f,T),u(a,y),u(a,j),u(j,K),u(a,Z),u(a,O),u(O,L),u(t,G),u(t,B),p&&p.m(B,null),N(V,v,C),N(V,g,C),W[_].m(g,null),I=!0},p(V,C){V[0]?p?p.p(V,C):(p=qe(V),p.c(),p.m(B,null)):p&&(p.d(1),p=null);let A=_;_=ee(V),_===A?W[_].p(V,C):(ae(),Q(W[A],1,1,()=>{W[A]=null}),re(),c=W[_],c?c.p(V,C):(c=W[_]=J[_](V),c.c()),z(c,1),c.m(g,null))},i(V){I||(z(c),I=!0)},o(V){Q(c),I=!1},d(V){V&&d(e),V&&d(t),p&&p.d(),V&&d(v),V&&d(g),W[_].d()}}}const ll=!0;function ot(s,e){return e.speakers.map(t=>{const l=s.spec.speakers.find(i=>i.id===t);return l.name+(l.nickname?` (${l.nickname})`:"")}).join(", ")}function nt(s,e){return e.type==="lightning-series"?s.spec.events.filter(t=>t.parent===e.id).map(t=>`<span class="font-semibold"><a href="/udalosti?id=${t.id}">${t.name}</a></span> - ${ot(s,t)||"TBD"}`).join("<br>"):ot(s,e)}function ft(s,e,t){return"border border-blue-web/50"}function Ct(s,e){const t=new Date(s.start),l=new Date(s.end),i=new Date(e.start),o=new Date(e.end);return t.getTime()<o.getTime()&&l.getTime()>i.getTime()}function ge(s,e,t,l){return e.filter(i=>Boolean(l.filter(o=>o.stage===i.id).find(o=>Ct(t.period,o.period))))}function ct(s){return[{id:"all",name:"V\u0161echny s\xE1ly"},...s.spec.stages]}function ut(s){if(!s.description)return{};const e=s.description.split(`
`),t=e.length>1;return{md:e[0],stripped:t}}const dt=s=>`#${s}`;function Ft(s,e,t){let l,i,o,a,n;Ee(s,He,v=>t(0,o=v)),Ee(s,Se,v=>t(15,a=v)),Ee(s,de,v=>t(3,n=v));const r={link:It},h={time:{key:"time"},stage:{key:"stage"},desc:{key:"showDescriptions",type:"boolean"}};let f=[];f.push(Se.subscribe(()=>{de.update(v=>{for(const g of Object.keys(h)){const _=h[g],c=a.url.searchParams.get(g);_.type==="boolean"?c!==void 0&&(v[_.key]=Boolean(c)):(v[_.key]=c||"all",_.key==="time"&&(v[_.key]=c||"2"))}return v})})),wt(async()=>{const v=He.subscribe(_=>{y(_),_.spec.stages});f.push(v);const g=de.subscribe(_=>{const c=[];c.push(["time",_.time==="2"?void 0:_.time]),c.push(["stage",_.stage==="all"?void 0:_.stage]),c.push(["desc",_.showDescriptions===null||_.showDescriptions===!1||_.showDescriptions===void 0?void 0:!0]);let I="?";if(c.length>0){for(const p of c)p[1]===void 0&&a.url.searchParams.get(p[0])!==void 0?a.url.searchParams.delete(p[0]):a.url.searchParams.set(p[0],p[1]);I=`?${a.url.searchParams.toString()}`}return yt(I),!1});f.push(g)}),Et(()=>{for(const v of f)v()});function T(v,g,_,c=null){let I=g.start;const p=g.end,J=[],W={};for(;$t(I,p)===-1;){const ee={};for(const V of _.spec.stages){if(W[V.id]>0){ee[V.id]=null,W[V.id]--;continue}if(c&&c.stage!==V.id&&c.stage!=="all")continue;let C=v.find(A=>new Date(A.period.start).getTime()===new Date(I).getTime()&&A.stage===V.id);if(ee[V.id]=C,C){const A=Math.floor((new Date(C.period.end).getTime()-new Date(C.period.start).getTime())/6e4/30);C.span=A,A>1&&(W[V.id]=A-1)}}J.push({title:se(I,"HH:mm"),stages:ee}),I=new Date(I.getTime()+30*60*1e3)}return J}function y(v,g=!1){let _=v.scheduleTimes.map((c,I)=>{const p=Tt(v,c);switch(p.id=String(I),I){case 0:p.code="sobota";break;case 1:p.code="sobota-party";break;case 2:p.code="nedele";break}return p});return g&&(_=_.filter(c=>c.id===g||g==="all")),_}function j(v){return v.spec["event-types"].map(g=>Object.assign({},g,Pe[g.id])).filter(g=>!g.hidden)}function K(v){return[{id:"all",name:"V\u0161echny dny"},...y(v)]}function Z(v,g){const _=v.spec.events.find(I=>I.id===g);if(!_)return console.log(`Event not found: ${g}`),null;const c=Pe[_.type];return _.color=c.color?`${c.colorLight} hover:${c.colorDark}`:"",console.log(_.color),_}const O=v=>$e(de,n.time=v.id,n),L=v=>$e(de,n.stage=v.id,n);function G(){n.showDescriptions=this.checked,de.set(n)}const B=(v,g)=>g.id===v.track;return s.$$.update=()=>{s.$$.dirty[0]&1&&t(2,l=o?o.spec.schedule:null),s.$$.dirty[0]&1&&t(1,i=o&&o.spec?j(o):[])},[o,i,l,n,r,T,y,K,Z,O,L,G,B]}class sl extends vt{constructor(e){super();bt(this,e,Ft,Lt,gt,{},null,[-1,-1])}}export{sl as default,ll as prerender};