utxo22-web/_app/chunks/Event-68cb9bda.js

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

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