utxo22-web/_app/chunks/Event-9f9a623c.js

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

import{S as Ae,i as ze,s as Be,e as m,k as S,t as F,c as g,a as b,d,m as L,h as M,b as _,g as C,F as u,j as J,E as x,q as $,w as ee,x as te,y as le,o as B,B as ie,n as R,p as W,G as ae,J as Se,H as ce,l as ue}from"./index-f961f29d.js";import{A as Le,S as Te,L as je}from"./Avatar-ae188221.js";import{b as Oe,a as re}from"./stores-2b13be7a.js";function qe(s,e){if(!e)return 0;if(s.duration)return s.duration;const i=e.spec.events.filter(r=>r.parent===s.id);if(i.length>0){let r=i.reduce((t,n)=>t+(n.duration?n.duration:0),0);return r+=5*(i.length-1),r}}function de(s,e){e.update(i=>{const r=i.favoriteEvents;let t=null;return r.includes(s)?t=Object.assign({},i,{favoriteEvents:r.filter(n=>n!==s)}):(r.push(s),t=Object.assign(i,{favoriteEvents:r})),t})}function Ce(s){let e,i,r,t,n,l=s[1].title+"",a,o,f;return{c(){e=m("div"),i=m("div"),t=S(),n=m("div"),a=F(l),this.h()},l(v){e=g(v,"DIV",{class:!0});var c=b(e);i=g(c,"DIV",{class:!0}),b(i).forEach(d),t=L(c),n=g(c,"DIV",{class:!0});var h=b(n);a=M(h,l),h.forEach(d),c.forEach(d),this.h()},h(){_(i,"class",r="w-1 rounded-l-sm "+s[1].style),_(n,"class",o=(s[0]==="big"?"px-2 py-0.5":"px-1.5 py-0.5")+" rounded-r-sm bg-gray-100 uppercase"),_(e,"class",f="flex "+(s[0]==="big"?"h-6 text-sm":"h-5 text-xs"))},m(v,c){C(v,e,c),u(e,i),u(e,t),u(e,n),u(n,a)},p(v,[c]){c&2&&r!==(r="w-1 rounded-l-sm "+v[1].style)&&_(i,"class",r),c&2&&l!==(l=v[1].title+"")&&J(a,l),c&1&&o!==(o=(v[0]==="big"?"px-2 py-0.5":"px-1.5 py-0.5")+" rounded-r-sm bg-gray-100 uppercase")&&_(n,"class",o),c&1&&f!==(f="flex "+(v[0]==="big"?"h-6 text-sm":"h-5 text-xs"))&&_(e,"class",f)},i:x,o:x,d(v){v&&d(e)}}}function Fe(s,e,i){let r,{event:t={}}=e,{size:n=null}=e;const l={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"},lightning:{title:"Lightning talk",style:"bg-pink-400"}};return s.$$set=a=>{"event"in a&&i(2,t=a.event),"size"in a&&i(0,n=a.size)},s.$$.update=()=>{s.$$.dirty&4&&i(1,r=l[t.type])},[n,r,t]}class Me extends Ae{constructor(e){super();ze(this,e,Fe,Ce,Be,{event:2,size:0})}}function he(s,e,i){const r=s.slice();return r[12]=e[i],r}function _e(s,e,i){const r=s.slice();return r[15]=e[i],r}function ve(s,e,i){const r=s.slice();return r[18]=e[i],r}function pe(s,e,i){const r=s.slice();return r[15]=e[i],r}function me(s){let e,i,r=s[5](s[0].speakers),t=[];for(let l=0;l<r.length;l+=1)t[l]=ge(pe(s,r,l));const n=l=>B(t[l],1,1,()=>{t[l]=null});return{c(){e=m("div");for(let l=0;l<t.length;l+=1)t[l].c();this.h()},l(l){e=g(l,"DIV",{class:!0});var a=b(e);for(let o=0;o<t.length;o+=1)t[o].l(a);a.forEach(d),this.h()},h(){_(e,"class","mt-1 mb-2 flex flex-wrap gap-2")},m(l,a){C(l,e,a);for(let o=0;o<t.length;o+=1)t[o].m(e,null);i=!0},p(l,a){if(a&33){r=l[5](l[0].speakers);let o;for(o=0;o<r.length;o+=1){const f=pe(l,r,o);t[o]?(t[o].p(f,a),$(t[o],1)):(t[o]=ge(f),t[o].c(),$(t[o],1),t[o].m(e,null))}for(R(),o=r.length;o<t.length;o+=1)n(o);W()}},i(l){if(!i){for(let a=0;a<r.length;a+=1)$(t[a]);i=!0}},o(l){t=t.filter(Boolean);for(let a=0;a<t.length;a+=1)B(t[a]);i=!1},d(l){l&&d(e),ae(t,l)}}}function ge(s){let e,i,r,t,n,l=s[15].name+"",a,o,f,v;return i=new Le({props:{speaker:s[15],size:"extra-small"}}),{c(){e=m("div"),ee(i.$$.fragment),r=S(),t=m("div"),n=m("a"),a=F(l),f=S(),this.h()},l(c){e=g(c,"DIV",{class:!0});var h=b(e);te(i.$$.fragment,h),r=L(h),t=g(h,"DIV",{class:!0});var k=b(t);n=g(k,"A",{href:!0});var D=b(n);a=M(D,l),D.forEach(d),k.forEach(d),f=L(h),h.forEach(d),this.h()},h(){_(n,"href",o="/lide?id="+s[15].id),_(t,"class","m-auto"),_(e,"class","flex gap-1.5")},m(c,h){C(c,e,h),le(i,e,null),u(e,r),u(e,t),u(t,n),u(n,a),u(e,f),v=!0},p(c,h){const k={};h&1&&(k.speaker=c[15]),i.$set(k),(!v||h&1)&&l!==(l=c[15].name+"")&&J(a,l),(!v||h&1&&o!==(o="/lide?id="+c[15].id))&&_(n,"href",o)},i(c){v||($(i.$$.fragment,c),v=!0)},o(c){B(i.$$.fragment,c),v=!1},d(c){c&&d(e),ie(i)}}}function be(s){let e,i,r;return{c(){e=m("div"),i=F(s[2]),r=F("m"),this.h()},l(t){e=g(t,"DIV",{clas
`),i=e.length>1;return{md:e[0],stripped:i}}function Je(s,e,i){let r,t,n,l,a;ce(s,Oe,w=>i(9,l=w)),ce(s,re,w=>i(3,a=w));let{event:o}=e;const f={link:je};function v(w){if(!!w)return w.map(I=>l.spec.speakers.find(G=>G.id===I))}function c(w){const I=l.spec.tracks.find(G=>G.id===w);return I.shortname||I.name}function h(w){return l.spec.events.filter(I=>I.parent===w.id)}const k=()=>de(r.id,re),D=w=>de(w.id,re);return s.$$set=w=>{"event"in w&&i(8,o=w.event)},s.$$.update=()=>{s.$$.dirty&256&&i(0,r=o),s.$$.dirty&513&&i(2,t=qe(r,l)),s.$$.dirty&1&&i(1,n=He(r))},[r,n,t,a,f,v,c,h,o,l,k,D]}class Ke extends Ae{constructor(e){super();ze(this,e,Je,Ge,Be,{event:8})}}export{Me as E,Ke as a,de as b,qe as c};