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

2 řádky
11 KiB
JavaScript

import{S as De,i as Ie,s as Ve,e as k,k as P,t as A,c as E,a as $,d as p,m as S,h as T,b as g,g as z,F as d,E as L,w as le,x as ae,y as se,K as ye,j as G,q as I,o as j,B as re,p as q,G as W,Q as je,H as fe,n as C,l as ue}from"../chunks/index-24e5a832.js";import{u as te,b as Pe}from"../chunks/stores-13cf7036.js";import{A as we}from"../chunks/Avatar-5dc531dc.js";import"../chunks/index-3c937d7d.js";function Se(o){let e,r,n,a,i=o[0].title+"",s;return{c(){e=k("div"),r=k("div"),n=P(),a=k("div"),s=A(i),this.h()},l(t){e=E(t,"DIV",{class:!0});var l=$(e);r=E(l,"DIV",{class:!0}),$(r).forEach(p),n=S(l),a=E(l,"DIV",{class:!0});var f=$(a);s=T(f,i),f.forEach(p),l.forEach(p),this.h()},h(){g(r,"class","w-1 rounded-l-sm "+o[0].style),g(a,"class","px-1.5 py-0.5 rounded-r-sm bg-gray-100 uppercase"),g(e,"class","text-xs flex h-5")},m(t,l){z(t,e,l),d(e,r),d(e,n),d(e,a),d(a,s)},p:L,i:L,o:L,d(t){t&&p(e)}}}function Be(o,e,r){let{event:n={}}=e;const i={panel:{title:"Panelov\xE1 debata",style:"bg-custom-red text-white"},talk:{title:"P\u0159edn\xE1\u0161ka",style:"bg-custom-green text-white"},workshop:{title:"Workshop",style:"bg-custom-blue text-white"},other:{title:"Ostatn\xED",style:"bg-custom-yellow"}}[n.type];return o.$$set=s=>{"event"in s&&r(1,n=s.event)},[i,n]}class Oe extends De{constructor(e){super();Ie(this,e,Be,Se,Ve,{event:1})}}function de(o,e,r){const n=o.slice();return n[7]=e[r],n}function he(o,e,r){const n=o.slice();return n[10]=e[r],n}function ve(o,e,r){const n=o.slice();return n[13]=e[r],n}function _e(o,e,r){const n=o.slice();return n[13]=e[r],n}function pe(o){let e,r,n=o[2](o[7].speakers),a=[];for(let s=0;s<n.length;s+=1)a[s]=me(_e(o,n,s));const i=s=>j(a[s],1,1,()=>{a[s]=null});return{c(){e=k("div");for(let s=0;s<a.length;s+=1)a[s].c();this.h()},l(s){e=E(s,"DIV",{class:!0});var t=$(e);for(let l=0;l<a.length;l+=1)a[l].l(t);t.forEach(p),this.h()},h(){g(e,"class","mt-1 mb-2 flex flex-wrap gap-2")},m(s,t){z(s,e,t);for(let l=0;l<a.length;l+=1)a[l].m(e,null);r=!0},p(s,t){if(t&6){n=s[2](s[7].speakers);let l;for(l=0;l<n.length;l+=1){const f=_e(s,n,l);a[l]?(a[l].p(f,t),I(a[l],1)):(a[l]=me(f),a[l].c(),I(a[l],1),a[l].m(e,null))}for(C(),l=n.length;l<a.length;l+=1)i(l);q()}},i(s){if(!r){for(let t=0;t<n.length;t+=1)I(a[t]);r=!0}},o(s){a=a.filter(Boolean);for(let t=0;t<a.length;t+=1)j(a[t]);r=!1},d(s){s&&p(e),W(a,s)}}}function me(o){let e,r,n,a,i,s=o[13].name+"",t,l,f,h;return r=new we({props:{speaker:o[13],size:"extra-small"}}),{c(){e=k("div"),le(r.$$.fragment),n=P(),a=k("div"),i=k("a"),t=A(s),f=P(),this.h()},l(v){e=E(v,"DIV",{class:!0});var c=$(e);ae(r.$$.fragment,c),n=S(c),a=E(c,"DIV",{class:!0});var V=$(a);i=E(V,"A",{href:!0});var u=$(i);t=T(u,s),u.forEach(p),V.forEach(p),f=S(c),c.forEach(p),this.h()},h(){g(i,"href",l="/prednasejici/"+o[13].id),g(a,"class","m-auto"),g(e,"class","flex gap-1.5")},m(v,c){z(v,e,c),se(r,e,null),d(e,n),d(e,a),d(a,i),d(i,t),d(e,f),h=!0},p(v,c){const V={};c&2&&(V.speaker=v[13]),r.$set(V),(!h||c&2)&&s!==(s=v[13].name+"")&&G(t,s),(!h||c&2&&l!==(l="/prednasejici/"+v[13].id))&&g(i,"href",l)},i(v){h||(I(r.$$.fragment,v),h=!0)},o(v){j(r.$$.fragment,v),h=!1},d(v){v&&p(e),re(r)}}}function ge(o){let e,r,n,a=o[4](o[7]),i=[];for(let t=0;t<a.length;t+=1)i[t]=ke(he(o,a,t));const s=t=>j(i[t],1,1,()=>{i[t]=null});return{c(){e=k("div"),r=k("div");for(let t=0;t<i.length;t+=1)i[t].c();this.h()},l(t){e=E(t,"DIV",{class:!0});var l=$(e);r=E(l,"DIV",{class:!0,cellpadding:!0});var f=$(r);for(let h=0;h<i.length;h+=1)i[h].l(f);f.forEach(p),l.forEach(p),this.h()},h(){g(r,"class","flex flex-wrap gap-2"),g(r,"cellpadding","5"),g(e,"class","mt-4 w-auto")},m(t,l){z(t,e,l),d(e,r);for(let f=0;f<i.length;f+=1)i[f].m(r,null);n=!0},p(t,l){if(l&22){a=t[4](t[7]);let f;for(f=0;f<a.length;f+=1){const h=he(t,a,f);i[f]?(i[f].p(h,l),I(i[f],1)):(i[f]=ke(h),i[f].c(),I(i[f],1),i[f].m(r,null))}for(C(),f=a.length;f<i.length;f+=1)s(f);q()}},i(t){if(!n){for(let l=0;l<a.length;l+=1)I(i[l]);n=!0}},o(t){i=i.filter(Boolean);for(let l=0;l<i.length;l+=1)j(i[l]);n=!1},d(t){t&&p(e),W(i,t)}}}function Ae(o){let e,r,n=o[2](o[10].speakers),a=[];for(let s=0;s<n.length;s+=1)a[s]=be(ve(o,n,s));const i=s=>j(a[s],1,1,()=>{a[s]=null});return{c(){for(let s=0;s<a.length;s+=1)a[s].c();e=ue()},l(s){for(let t=0;t<a.length;t+=1)a[t].l(s);e=ue()},m(s,t){for(let l=0;l<a.length;l+=1)a[l].m(s,t);z(s,e,t),r=!0},p(s,t){if(t&22){n=s[2](s[10].speakers);let l;for(l=0;l<n.length;l+=1){const f=ve(s,n,l);a[l]?(a[l].p(f,t),I(a[l],1)):(a[l]=be(f),a[l].c(),I(a[l],1),a[l].m(e.parentNode,e))}for(C(),l=n.length;l<a.length;l+=1)i(l);q()}},i(s){if(!r){for(let t=0;t<n.length;t+=1)I(a[t]);r=!0}},o(s){a=a.filter(Boolean);for(let t=0;t<a.length;t+=1)j(a[t]);r=!1},d(s){W(a,s),s&&p(e)}}}function Te(o){let e,r;return{c(){e=k("div"),r=A("TBA")},l(n){e=E(n,"DIV",{});var a=$(e);r=T(a,"TBA"),a.forEach(p)},m(n,a){z(n,e,a),d(e,r)},p:L,i:L,o:L,d(n){n&&p(e)}}}function be(o){let e,r,n,a=o[13].name+"",i,s;return r=new we({props:{speaker:o[13],size:"micro"}}),{c(){e=k("div"),le(r.$$.fragment),n=k("div"),i=A(a),this.h()},l(t){e=E(t,"DIV",{class:!0});var l=$(e);ae(r.$$.fragment,l),n=E(l,"DIV",{});var f=$(n);i=T(f,a),f.forEach(p),l.forEach(p),this.h()},h(){g(e,"class","flex gap-1")},m(t,l){z(t,e,l),se(r,e,null),d(e,n),d(n,i),s=!0},p(t,l){const f={};l&2&&(f.speaker=t[13]),r.$set(f),(!s||l&2)&&a!==(a=t[13].name+"")&&G(i,a)},i(t){s||(I(r.$$.fragment,t),s=!0)},o(t){j(r.$$.fragment,t),s=!1},d(t){t&&p(e),re(r)}}}function ke(o){let e,r,n=o[10].name+"",a,i,s,t,l,f,h;const v=[Te,Ae],c=[];function V(u,m){return u[10].speakers.length===0?0:1}return t=V(o),l=c[t]=v[t](o),{c(){e=k("div"),r=k("div"),a=A(n),i=P(),s=k("div"),l.c(),f=P(),this.h()},l(u){e=E(u,"DIV",{class:!0});var m=$(e);r=E(m,"DIV",{class:!0});var _=$(r);a=T(_,n),_.forEach(p),i=S(m),s=E(m,"DIV",{class:!0});var B=$(s);l.l(B),B.forEach(p),f=S(m),m.forEach(p),this.h()},h(){g(r,"class","font-bold"),g(s,"class","mt-1"),g(e,"class","mb-2 border rounded py-1.5 px-2.5 bg-gray-100 text-sm")},m(u,m){z(u,e,m),d(e,r),d(r,a),d(e,i),d(e,s),c[t].m(s,null),d(e,f),h=!0},p(u,m){(!h||m&2)&&n!==(n=u[10].name+"")&&G(a,n);let _=t;t=V(u),t===_?c[t].p(u,m):(C(),j(c[_],1,1,()=>{c[_]=null}),q(),l=c[t],l?l.p(u,m):(l=c[t]=v[t](u),l.c()),I(l,1),l.m(s,null))},i(u){h||(I(l),h=!0)},o(u){j(l),h=!1},d(u){u&&p(e),c[t].d()}}}function Ee(o){let e,r,n,a,i,s,t,l=o[7].name+"",f,h,v,c,V,u,m,_,B=o[3](o[7].track)+"",N,F,O,K=o[7].duration+"",Q,X,Y,Z=o[4](o[7]).length>0,R,U,J,x,ne,w=o[7].speakers&&o[7].speakers.length>0&&pe(o);u=new Oe({props:{event:o[7]}});let y=Z&&ge(o);return{c(){e=k("div"),r=k("div"),n=k("i"),s=P(),t=k("div"),f=A(l),h=P(),w&&w.c(),v=P(),c=k("div"),V=k("div"),le(u.$$.fragment),m=P(),_=k("div"),N=A(B),F=P(),O=k("div"),Q=A(K),X=A("m"),Y=P(),y&&y.c(),R=P(),this.h()},l(b){e=E(b,"DIV",{class:!0});var D=$(e);r=E(D,"DIV",{class:!0});var M=$(r);n=E(M,"I",{class:!0,"utxo-event-id":!0}),$(n).forEach(p),M.forEach(p),s=S(D),t=E(D,"DIV",{class:!0});var oe=$(t);f=T(oe,l),oe.forEach(p),h=S(D),w&&w.l(D),v=S(D),c=E(D,"DIV",{class:!0});var H=$(c);V=E(H,"DIV",{});var ie=$(V);ae(u.$$.fragment,ie),ie.forEach(p),m=S(H),_=E(H,"DIV",{class:!0});var ce=$(_);N=T(ce,B),ce.forEach(p),F=S(H),O=E(H,"DIV",{class:!0});var ee=$(O);Q=T(ee,K),X=T(ee,"m"),ee.forEach(p),H.forEach(p),Y=S(D),y&&y.l(D),R=S(D),D.forEach(p),this.h()},h(){g(n,"class",a="fa-star "+(o[0].favoriteEvents.includes(o[7].id)?"fa-solid":"fa-regular")+" cursor-pointer"),g(n,"utxo-event-id",i=o[7].id),g(r,"class","float-right"),g(t,"class","text-lg font-semibold"),g(_,"class","text-sm my-auto"),g(O,"class","text-xs my-auto"),g(c,"class","mt-2 text-sm flex flex-wrap gap-2"),g(e,"class",U="transition-all mb-4 border px-3 py-2 rounded-md shadow "+(o[0].favoriteEvents.includes(o[7].id)?"bg-yellow-100":""))},m(b,D){z(b,e,D),d(e,r),d(r,n),d(e,s),d(e,t),d(t,f),d(e,h),w&&w.m(e,null),d(e,v),d(e,c),d(c,V),se(u,V,null),d(c,m),d(c,_),d(_,N),d(c,F),d(c,O),d(O,Q),d(O,X),d(e,Y),y&&y.m(e,null),d(e,R),J=!0,x||(ne=ye(n,"click",o[5]),x=!0)},p(b,D){(!J||D&3&&a!==(a="fa-star "+(b[0].favoriteEvents.includes(b[7].id)?"fa-solid":"fa-regular")+" cursor-pointer"))&&g(n,"class",a),(!J||D&2&&i!==(i=b[7].id))&&g(n,"utxo-event-id",i),(!J||D&2)&&l!==(l=b[7].name+"")&&G(f,l),b[7].speakers&&b[7].speakers.length>0?w?(w.p(b,D),D&2&&I(w,1)):(w=pe(b),w.c(),I(w,1),w.m(e,v)):w&&(C(),j(w,1,1,()=>{w=null}),q());const M={};D&2&&(M.event=b[7]),u.$set(M),(!J||D&2)&&B!==(B=b[3](b[7].track)+"")&&G(N,B),(!J||D&2)&&K!==(K=b[7].duration+"")&&G(Q,K),D&2&&(Z=b[4](b[7]).length>0),Z?y?(y.p(b,D),D&2&&I(y,1)):(y=ge(b),y.c(),I(y,1),y.m(e,R)):y&&(C(),j(y,1,1,()=>{y=null}),q()),(!J||D&3&&U!==(U="transition-all mb-4 border px-3 py-2 rounded-md shadow "+(b[0].favoriteEvents.includes(b[7].id)?"bg-yellow-100":"")))&&g(e,"class",U)},i(b){J||(I(w),I(u.$$.fragment,b),I(y),J=!0)},o(b){j(w),j(u.$$.fragment,b),j(y),J=!1},d(b){b&&p(e),w&&w.d(),re(u),y&&y.d(),x=!1,ne()}}}function ze(o){let e,r,n,a,i,s,t,l,f,h,v=o[1].spec.events.filter($e),c=[];for(let u=0;u<v.length;u+=1)c[u]=Ee(de(o,v,u));const V=u=>j(c[u],1,1,()=>{c[u]=null});return{c(){e=P(),r=k("section"),n=k("h1"),a=A("Program"),i=P(),s=k("div"),t=A("Program st\xE1le p\u0159ipravujeme. Jeho kone\u010Dn\xE1 podoba bude zve\u0159ejn\u011Bna par t\xFDdn\u016F p\u0159ed konferenc\xED."),l=P(),f=k("div");for(let u=0;u<c.length;u+=1)c[u].c();this.h()},l(u){je('[data-svelte="svelte-124umcn"]',document.head).forEach(p),e=S(u),r=E(u,"SECTION",{class:!0});var _=$(r);n=E(_,"H1",{class:!0});var B=$(n);a=T(B,"Program"),B.forEach(p),i=S(_),s=E(_,"DIV",{class:!0});var N=$(s);t=T(N,"Program st\xE1le p\u0159ipravujeme. Jeho kone\u010Dn\xE1 podoba bude zve\u0159ejn\u011Bna par t\xFDdn\u016F p\u0159ed konferenc\xED."),N.forEach(p),l=S(_),f=E(_,"DIV",{class:!0});var F=$(f);for(let O=0;O<c.length;O+=1)c[O].l(F);F.forEach(p),_.forEach(p),this.h()},h(){document.title="Program | UTXO.22",g(n,"class","uppercase text-2xl font-bold"),g(s,"class","mt-2 text-sm"),g(f,"class","mt-6"),g(r,"class","relative mx-auto py-10 px-6 max-w-6xl mb-10 text-blue-web")},m(u,m){z(u,e,m),z(u,r,m),d(r,n),d(n,a),d(r,i),d(r,s),d(s,t),d(r,l),d(r,f);for(let _=0;_<c.length;_+=1)c[_].m(f,null);h=!0},p(u,[m]){if(m&63){v=u[1].spec.events.filter($e);let _;for(_=0;_<v.length;_+=1){const B=de(u,v,_);c[_]?(c[_].p(B,m),I(c[_],1)):(c[_]=Ee(B),c[_].c(),I(c[_],1),c[_].m(f,null))}for(C(),_=v.length;_<c.length;_+=1)V(_);q()}},i(u){if(!h){for(let m=0;m<v.length;m+=1)I(c[m]);h=!0}},o(u){c=c.filter(Boolean);for(let m=0;m<c.length;m+=1)j(c[m]);h=!1},d(u){u&&p(e),u&&p(r),W(c,u)}}}const He=!0,$e=o=>!o.parent;function Je(o,e,r){let n,a;fe(o,te,h=>r(0,n=h)),fe(o,Pe,h=>r(1,a=h));const i=localStorage.getItem("userData");i&&te.set(JSON.parse(i));function s(h){if(!!h)return h.map(v=>a.spec.speakers.find(c=>c.id===v))}function t(h){const v=a.spec.tracks.find(c=>c.id===h);return v.shortname||v.name}function l(h){return a.spec.events.filter(v=>v.parent===h.id)}function f(h){const v=h.target.getAttribute("utxo-event-id");te.update(c=>{const V=c.favoriteEvents;let u=null;return V.includes(v)?u=Object.assign(n,{favoriteEvents:V.filter(m=>m!==v)}):(V.push(v),u=Object.assign(n,{favoriteEvents:V})),localStorage.setItem("userData",JSON.stringify(u)),u})}return[n,a,s,t,l,f]}class Le extends De{constructor(e){super();Ie(this,e,Je,ze,Ve,{})}}export{Le as default,He as prerender};