utxo22-web/_app/chunks/Event-2e829855.js

2 řádky
13 KiB
JavaScript
Surový Normální zobrazení Historie

import{S as Ve,i as we,s as ye,e as b,k as j,t as S,c as k,a as E,d as _,m as O,h as G,b as p,g as F,F as h,j as J,E as Y,q as y,w as ee,x as le,y as te,o as q,B as ae,n as Q,p as U,G as Z,J as Ae,H as oe,l as fe}from"./index-f961f29d.js";import{A as $e}from"./Avatar-ae188221.js";import{b as ze,a as x}from"./stores-2b13be7a.js";function Be(i,e){if(!e)return 0;if(i.duration)return i.duration;const a=e.spec.events.filter(s=>s.parent===i.id);if(a.length>0){let s=a.reduce((l,n)=>l+(n.duration?n.duration:0),0);return s+=5*(a.length-1),s}}function ce(i,e){e.update(a=>{const s=a.favoriteEvents;let l=null;return s.includes(i)?l=Object.assign({},a,{favoriteEvents:s.filter(n=>n!==i)}):(s.push(i),l=Object.assign(a,{favoriteEvents:s})),l})}function Te(i){let e,a,s,l,n,t=i[1].title+"",r,o,f;return{c(){e=b("div"),a=b("div"),l=j(),n=b("div"),r=S(t),this.h()},l(v){e=k(v,"DIV",{class:!0});var c=E(e);a=k(c,"DIV",{class:!0}),E(a).forEach(_),l=O(c),n=k(c,"DIV",{class:!0});var d=E(n);r=G(d,t),d.forEach(_),c.forEach(_),this.h()},h(){p(a,"class",s="w-1 rounded-l-sm "+i[1].style),p(n,"class",o=(i[0]==="big"?"px-2 py-0.5":"px-1.5 py-0.5")+" rounded-r-sm bg-gray-100 uppercase"),p(e,"class",f="flex "+(i[0]==="big"?"h-6 text-sm":"h-5 text-xs"))},m(v,c){F(v,e,c),h(e,a),h(e,l),h(e,n),h(n,r)},p(v,[c]){c&2&&s!==(s="w-1 rounded-l-sm "+v[1].style)&&p(a,"class",s),c&2&&t!==(t=v[1].title+"")&&J(r,t),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")&&p(n,"class",o),c&1&&f!==(f="flex "+(v[0]==="big"?"h-6 text-sm":"h-5 text-xs"))&&p(e,"class",f)},i:Y,o:Y,d(v){v&&_(e)}}}function je(i,e,a){let s,{event:l={}}=e,{size:n=null}=e;const t={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 i.$$set=r=>{"event"in r&&a(2,l=r.event),"size"in r&&a(0,n=r.size)},i.$$.update=()=>{i.$$.dirty&4&&a(1,s=t[l.type])},[n,s,l]}class Oe extends Ve{constructor(e){super();we(this,e,je,Te,ye,{event:2,size:0})}}function ue(i,e,a){const s=i.slice();return s[10]=e[a],s}function de(i,e,a){const s=i.slice();return s[13]=e[a],s}function he(i,e,a){const s=i.slice();return s[16]=e[a],s}function _e(i,e,a){const s=i.slice();return s[13]=e[a],s}function ve(i){let e,a,s=i[3](i[0].speakers),l=[];for(let t=0;t<s.length;t+=1)l[t]=pe(_e(i,s,t));const n=t=>q(l[t],1,1,()=>{l[t]=null});return{c(){e=b("div");for(let t=0;t<l.length;t+=1)l[t].c();this.h()},l(t){e=k(t,"DIV",{class:!0});var r=E(e);for(let o=0;o<l.length;o+=1)l[o].l(r);r.forEach(_),this.h()},h(){p(e,"class","mt-1 mb-2 flex flex-wrap gap-2")},m(t,r){F(t,e,r);for(let o=0;o<l.length;o+=1)l[o].m(e,null);a=!0},p(t,r){if(r&9){s=t[3](t[0].speakers);let o;for(o=0;o<s.length;o+=1){const f=_e(t,s,o);l[o]?(l[o].p(f,r),y(l[o],1)):(l[o]=pe(f),l[o].c(),y(l[o],1),l[o].m(e,null))}for(Q(),o=s.length;o<l.length;o+=1)n(o);U()}},i(t){if(!a){for(let r=0;r<s.length;r+=1)y(l[r]);a=!0}},o(t){l=l.filter(Boolean);for(let r=0;r<l.length;r+=1)q(l[r]);a=!1},d(t){t&&_(e),Z(l,t)}}}function pe(i){let e,a,s,l,n,t=i[13].name+"",r,o,f,v;return a=new $e({props:{speaker:i[13],size:"extra-small"}}),{c(){e=b("div"),ee(a.$$.fragment),s=j(),l=b("div"),n=b("a"),r=S(t),f=j(),this.h()},l(c){e=k(c,"DIV",{class:!0});var d=E(e);le(a.$$.fragment,d),s=O(d),l=k(d,"DIV",{class:!0});var u=E(l);n=k(u,"A",{href:!0});var g=E(n);r=G(g,t),g.forEach(_),u.forEach(_),f=O(d),d.forEach(_),this.h()},h(){p(n,"href",o="/lide?id="+i[13].id),p(l,"class","m-auto"),p(e,"class","flex gap-1.5")},m(c,d){F(c,e,d),te(a,e,null),h(e,s),h(e,l),h(l,n),h(n,r),h(e,f),v=!0},p(c,d){const u={};d&1&&(u.speaker=c[13]),a.$set(u),(!v||d&1)&&t!==(t=c[13].name+"")&&J(r,t),(!v||d&1&&o!==(o="/lide?id="+c[13].id))&&p(n,"href",o)},i(c){v||(y(a.$$.fragment,c),v=!0)},o(c){q(a.$$.fragment,c),v=!1},d(c){c&&_(e),ae(a)}}}function me(i){let e,a,s;return{c(){e=b("div"),a=S(i[1]),s=S("m"),this.h()},l(l){e=k(l,"DIV",{class:!0});var n=E(