(function(T){typeof define=="function"&&define.amd?define(T):T()})(function(){"use strict";var Fi=Object.defineProperty;var on=T=>{throw TypeError(T)};var qi=(T,E,L)=>E in T?Fi(T,E,{enumerable:!0,configurable:!0,writable:!0,value:L}):T[E]=L;var ie=(T,E,L)=>qi(T,typeof E!="symbol"?E+"":E,L),un=(T,E,L)=>E.has(T)||on("Cannot "+L);var B=(T,E,L)=>(un(T,E,"read from private field"),L?L.call(T):E.get(T)),rr=(T,E,L)=>E.has(T)?on("Cannot add the same private member more than once"):E instanceof WeakSet?E.add(T):E.set(T,L),nr=(T,E,L,et)=>(un(T,E,"write to private field"),et?et.call(T,L):E.set(T,L),L);var $e,Z;const T="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(T);let E=!1,L=!1;function et(){E=!0}et();const At=1,St=2,ir=4,fn=8,cn=16,vn=1,dn=2,_n=8,hn=1,pn=2,lr="[",Nt="[!",Ct="]",Ge={},F=Symbol(),Ot=!1,Q=2,ar=4,tt=8,Rt=16,le=32,ke=64,rt=128,ae=256,nt=512,P=1024,ve=2048,Ae=4096,de=8192,it=16384,gn=32768,It=65536,mn=1<<17,bn=1<<19,sr=1<<20,Ie=Symbol("$state"),or=Symbol("legacy props"),Dt=Symbol("");var Lt=Array.isArray,$n=Array.prototype.indexOf,jt=Array.from,lt=Object.keys,at=Object.defineProperty,Se=Object.getOwnPropertyDescriptor,ur=Object.getOwnPropertyDescriptors,wn=Object.prototype,yn=Array.prototype,Pt=Object.getPrototypeOf;function xn(e){return e()}function Mt(e){for(var t=0;te.wv)return!0}(!n||$!==null&&!Ce)&&oe(e,P)}return!1}function zn(e,t){for(var r=t;r!==null;){if(r.f&rt)try{r.fn(e);return}catch{r.f^=rt}r=r.parent}throw ut=!1,e}function Bn(e){return(e.f&it)===0&&(e.parent===null||(e.parent.f&rt)===0)}function vt(e,t,r,n){if(ut){if(r===null&&(ut=!1),Bn(t))throw e;return}r!==null&&(ut=!0);{zn(e,t);return}}function yr(e,t,r=0){var n=e.reactions;if(n!==null)for(var i=0;i0)for(v.length=Y+q.length,s=0;s1e3){je=0;try{Nn()}catch(e){if(Je!==null)vt(e,Je,null);else throw e}}je++}function Tr(e){var t=e.length;if(t!==0){Er();var r=Le;Le=!0;try{for(var n=0;n1001)return;const e=Ne;Ne=[],Tr(e),We||(je=0,Je=null)}function ht(e){ft===gr&&(We||(We=!0,queueMicrotask(Vn))),Je=e;for(var t=e;t.parent!==null;){t=t.parent;var r=t.f;if(r&(ke|le)){if(!(r&P))return;t.f^=P}}Ne.push(t)}function kr(e,t){var r=e.first,n=[];e:for(;r!==null;){var i=r.f,l=(i&le)!==0,a=l&&(i&P)!==0,o=r.next;if(!a&&!(i&de))if(i&tt){if(l)r.f^=P;else{var f=k;try{k=r,Me(r)&&_t(r)}catch(s){vt(s,r,null,r.ctx)}finally{k=f}}var u=r.first;if(u!==null){r=u;continue}}else i&ar&&n.push(r);if(o===null){let s=r.parent;for(;s!==null;){if(e===s)break e;var c=s.next;if(c!==null){r=c;continue e}s=s.parent}}r=o}for(var v=0;v0||i.length>0)&&H(),je=0,Je=null,n}finally{ft=t,Ne=r}}function p(e){var t=e.f,r=(t&Q)!==0;if(k!==null&&!_e){se!==null&&se.includes(e)&&Dn();var n=k.deps;e.rv=O.v&&U(O,R+1)}Ar(a)}return!0},ownKeys(f){p(a);var u=Reflect.ownKeys(f).filter(s=>{var d=i.get(s);return d===void 0||d.v!==F});for(var[c,v]of i)v.v!==F&&!(c in f)&&u.push(c);return u},setPrototypeOf(){In()}})}function Ar(e,t=1){U(e,e.v+t)}var Sr,Nr,Cr;function Vt(){if(Sr===void 0){Sr=window;var e=Element.prototype,t=Node.prototype;Nr=Se(t,"firstChild").get,Cr=Se(t,"nextSibling").get,e.__click=void 0,e.__className="",e.__attributes=null,e.__styles=null,e.__e=void 0,Text.prototype.__t=void 0}}function qe(e=""){return document.createTextNode(e)}function Oe(e){return Nr.call(e)}function ye(e){return Cr.call(e)}function j(e,t){if(!I)return Oe(e);var r=Oe(N);if(r===null)r=N.appendChild(qe());else if(t&&r.nodeType!==3){var n=qe();return r==null||r.before(n),ee(n),n}return ee(r),r}function Or(e,t){if(!I){var r=Oe(e);return r instanceof Comment&&r.data===""?ye(r):r}return N}function te(e,t=1,r=!1){let n=I?N:e;for(var i;t--;)i=n,n=ye(n);if(!I)return n;var l=n==null?void 0:n.nodeType;if(r&&l!==3){var a=qe();return n===null?i==null||i.after(a):n.before(a),ee(a),a}return ee(n),n}function Rr(e){e.textContent=""}function Ir(e){$===null&&k===null&&Sn(),k!==null&&k.f&ae&&$===null&&An(),zt&&kn()}function Kn(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function He(e,t,r,n=!0){var i=(e&ke)!==0,l=$,a={ctx:C,deps:null,nodes_start:null,nodes_end:null,f:e|ve,first:null,fn:t,last:null,next:null,parent:i?null:l,prev:null,teardown:null,transitions:null,wv:0};if(r){var o=Le;try{mr(!0),_t(a),a.f|=gn}catch(c){throw ge(a),c}finally{mr(o)}}else t!==null&&ht(a);var f=r&&a.deps===null&&a.first===null&&a.nodes_start===null&&a.teardown===null&&(a.f&(sr|rt))===0;if(!f&&!i&&n&&(l!==null&&Kn(a,l),k!==null&&k.f&Q)){var u=k;(u.effects??(u.effects=[])).push(a)}return a}function Gt(e){Ir();var t=$!==null&&($.f&le)!==0&&C!==null&&!C.m;if(t){var r=C;(r.e??(r.e=[])).push({fn:e,effect:$,reaction:k})}else{var n=Dr(e);return n}}function Wn(e){return Ir(),mt(e)}function Jn(e){const t=He(ke,e,!0);return()=>{ge(t)}}function Zn(e){const t=He(ke,e,!0);return(r={})=>new Promise(n=>{r.outro?bt(t,()=>{ge(t),n(void 0)}):(ge(t),n(void 0))})}function Dr(e){return He(ar,e,!1)}function Lr(e,t){var r=C,n={effect:null,ran:!1};r.l.r1.push(n),n.effect=mt(()=>{e(),!n.ran&&(n.ran=!0,U(r.l.r2,!0),pt(t))})}function jr(){var e=C;mt(()=>{if(p(e.l.r2)){for(var t of e.l.r1){var r=t.effect;r.f&P&&oe(r,Ae),Me(r)&&_t(r),t.ran=!1}e.l.r2.v=!1}})}function mt(e){return He(tt,e,!0)}function ue(e,t=[],r=Ke){const n=t.map(r);return Kt(()=>e(...n.map(p)))}function Kt(e,t=0){return He(tt|Rt|t,e,!0)}function Ze(e,t=!0){return He(tt|le,e,!0,t)}function Pr(e){var t=e.teardown;if(t!==null){const r=zt,n=k;br(!0),Pe(null);try{t.call(null)}finally{br(r),Pe(n)}}}function Mr(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){var n=r.next;ge(r,t),r=n}}function Xn(e){for(var t=e.first;t!==null;){var r=t.next;t.f&le||ge(t),t=r}}function ge(e,t=!0){var r=!1;if((t||e.f&bn)&&e.nodes_start!==null){for(var n=e.nodes_start,i=e.nodes_end;n!==null;){var l=n===i?null:ye(n);n.remove(),n=l}r=!0}Mr(e,t&&!r),dt(e,0),oe(e,it);var a=e.transitions;if(a!==null)for(const f of a)f.stop();Pr(e);var o=e.parent;o!==null&&o.first!==null&&Fr(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=null}function Fr(e){var t=e.parent,r=e.prev,n=e.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),t!==null&&(t.first===e&&(t.first=n),t.last===e&&(t.last=r))}function bt(e,t){var r=[];Wt(e,r,!0),qr(r,()=>{ge(e),t&&t()})}function qr(e,t){var r=e.length;if(r>0){var n=()=>--r||t();for(var i of e)i.out(n)}else t()}function Wt(e,t,r){if(!(e.f&de)){if(e.f^=de,e.transitions!==null)for(const a of e.transitions)(a.is_global||r)&&t.push(a);for(var n=e.first;n!==null;){var i=n.next,l=(n.f&It)!==0||(n.f&le)!==0;Wt(n,t,l?r:!1),n=i}}}function $t(e){Hr(e,!0)}function Hr(e,t){if(e.f&de){e.f^=de,e.f&P||(e.f^=P),Me(e)&&(oe(e,ve),ht(e));for(var r=e.first;r!==null;){var n=r.next,i=(r.f&It)!==0||(r.f&le)!==0;Hr(r,i?t:!1),r=n}if(e.transitions!==null)for(const l of e.transitions)(l.is_global||t)&&l.in()}}function Qn(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}let C=null;function zr(e){C=e}function Jt(e,t=!1,r){C={p:C,c:null,e:null,m:!1,s:e,x:null,l:null},E&&!t&&(C.l={s:null,u:null,r1:[],r2:K(!1)})}function Zt(e){const t=C;if(t!==null){e!==void 0&&(t.x=e);const a=t.e;if(a!==null){var r=$,n=k;t.e=null;try{for(var i=0;i{throw w});throw s}}finally{e.__root=t,delete e.currentTarget,Pe(c),we(v)}}}function ni(e){var t=document.createElement("template");return t.innerHTML=e,t.content}function ze(e,t){var r=$;r.nodes_start===null&&(r.nodes_start=e,r.nodes_end=t)}function V(e,t){var r=(t&hn)!==0,n=(t&pn)!==0,i,l=!e.startsWith("");return()=>{if(I)return ze(N,null),N;i===void 0&&(i=ni(l?e:""+e),r||(i=Oe(i)));var a=n?document.importNode(i,!0):i.cloneNode(!0);if(r){var o=Oe(a),f=a.lastChild;ze(o,f)}else ze(a,a);return a}}function ii(){if(I)return ze(N,null),N;var e=document.createDocumentFragment(),t=document.createComment(""),r=qe();return e.append(t,r),ze(t,r),e}function M(e,t){if(I){$.nodes_end=N,gt();return}e!==null&&e.before(t)}function me(e,t){var r=t==null?"":typeof t=="object"?t+"":t;r!==(e.__t??(e.__t=e.nodeValue))&&(e.__t=r,e.nodeValue=r+"")}function Ur(e,t){return Yr(e,t)}function li(e,t){Vt(),t.intro=t.intro??!1;const r=t.target,n=I,i=N;try{for(var l=Oe(r);l&&(l.nodeType!==8||l.data!==lr);)l=ye(l);if(!l)throw Ge;pe(!0),ee(l),gt();const a=Yr(e,{...t,anchor:l});if(N===null||N.nodeType!==8||N.data!==Ct)throw Ut(),Ge;return pe(!1),a}catch(a){if(a===Ge)return t.recover===!1&&Cn(),Vt(),Rr(r),pe(!1),Ur(e,t);throw a}finally{pe(n),ee(i)}}const Be=new Map;function Yr(e,{target:t,anchor:r,props:n={},events:i,context:l,intro:a=!0}){Vt();var o=new Set,f=v=>{for(var s=0;s{var v=r??t.appendChild(qe());return Ze(()=>{if(l){Jt({});var s=C;s.c=l}i&&(n.$$events=i),I&&ze(v,null),u=e(v,n)||{},I&&($.nodes_end=N),l&&Zt()}),()=>{var _;for(var s of o){t.removeEventListener(s,yt);var d=Be.get(s);--d===0?(document.removeEventListener(s,yt),Be.delete(s)):Be.set(s,d)}Br.delete(f),v!==r&&((_=v.parentNode)==null||_.removeChild(v))}});return Xt.set(u,c),u}let Xt=new WeakMap;function ai(e,t){const r=Xt.get(e);return r?(Xt.delete(e),r(t)):Promise.resolve()}function be(e,t,r=!1){I&>();var n=e,i=null,l=null,a=F,o=r?It:0,f=!1;const u=(v,s=!0)=>{f=!0,c(s,v)},c=(v,s)=>{if(a===(a=v))return;let d=!1;if(I){const _=n.data===Nt;!!a===_&&(n=Yt(),ee(n),pe(!1),d=!0)}a?(i?$t(i):s&&(i=Ze(()=>s(n))),l&&bt(l,()=>{l=null})):(l?$t(l):s&&(l=Ze(()=>s(n))),i&&bt(i,()=>{i=null})),d&&pe(!0)};Kt(()=>{f=!1,t(u),f||c(null,null)},o),I&&(n=N)}function Vr(e,t){return t}function si(e,t,r,n){for(var i=[],l=t.length,a=0;a0&&i.length===0&&r!==null;if(o){var f=r.parentNode;Rr(f),f.append(r),n.clear(),xe(e,t[0].prev,t[l-1].next)}qr(i,()=>{for(var u=0;u{var d=r();return Lt(d)?d:d==null?[]:jt(d)});Kt(()=>{var d=p(s),_=d.length;if(v&&_===0)return;v=_===0;let b=!1;if(I){var x=a.data===Nt;x!==(_===0)&&(a=Yt(),ee(a),pe(!1),b=!0)}if(I){for(var O=null,R,w=0;w<_;w++){if(N.nodeType===8&&N.data===Ct){a=N,b=!0,pe(!1);break}var g=d[w],h=n(g,w);R=Kr(N,o,O,null,g,h,w,i,t,r),o.items.set(h,R),O=R}_>0&&ee(Yt())}I||oi(d,o,a,i,t,n,r),l!==null&&(_===0?c?$t(c):c=Ze(()=>l(a)):c!==null&&bt(c,()=>{c=null})),b&&pe(!0),p(s)}),I&&(a=N)}function oi(e,t,r,n,i,l,a){var Ue,Re,Ye,kt;var o=(i&fn)!==0,f=(i&(At|St))!==0,u=e.length,c=t.items,v=t.first,s=v,d,_=null,b,x=[],O=[],R,w,g,h;if(o)for(h=0;h0){var Ee=i&ir&&u===0?r:null;if(o){for(h=0;h{var Ve;if(b!==void 0)for(g of b)(Ve=g.a)==null||Ve.apply()}),$.first=t.first&&t.first.e,$.last=_&&_.e}function ui(e,t,r,n){n&At&&Ht(e.v,t),n&St?Ht(e.i,r):e.i=r}function Kr(e,t,r,n,i,l,a,o,f,u){var c=(f&At)!==0,v=(f&cn)===0,s=c?v?ot(i):K(i):i,d=f&St?K(a):a,_={i:d,v:s,k:l,a:null,e:null,prev:r,next:n};try{return _.e=Ze(()=>o(e,s,d,u),I),_.e.prev=r&&r.e,_.e.next=n&&n.e,r===null?t.first=_:(r.next=_,r.e.next=_.e),n!==null&&(n.prev=_,n.e.prev=_.e),_}finally{}}function Wr(e,t,r){for(var n=e.next?e.next.e.nodes_start:r,i=t?t.e.nodes_start:r,l=e.e.nodes_start;l!==n;){var a=ye(l);i.before(l),l=a}}function xe(e,t,r){t===null?e.first=r:(t.next=r,t.e.next=r&&r.e),r!==null&&(r.prev=t,r.e.prev=t&&t.e)}function Jr(e,t){cr(()=>{var r=e.getRootNode(),n=r.host?r:r.head??r.ownerDocument.head;if(!n.querySelector("#"+t.hash)){const i=document.createElement("style");i.id=t.hash,i.textContent=t.code,n.appendChild(i)}})}function z(e,t,r,n){var i=e.__attributes??(e.__attributes={});I&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName==="LINK")||i[t]!==(i[t]=r)&&(t==="style"&&"__styles"in e&&(e.__styles={}),t==="loading"&&(e[Dt]=r),r==null?e.removeAttribute(t):typeof r!="string"&&fi(e).includes(t)?e[t]=r:e.setAttribute(t,r))}var Zr=new Map;function fi(e){var t=Zr.get(e.nodeName);if(t)return t;Zr.set(e.nodeName,t=[]);for(var r,n=e,i=Element.prototype;i!==n;){r=ur(n);for(var l in r)r[l].set&&t.push(l);n=Pt(n)}return t}function Xr(e){if(!I&&e.loading==="lazy"){var t=e.src;e[Dt]=null,e.loading="eager",e.removeAttribute("src"),requestAnimationFrame(()=>{e[Dt]!=="eager"&&(e.loading="lazy"),e.src=t})}}function xt(e,t,r){if(r){if(e.classList.contains(t))return;e.classList.add(t)}else{if(!e.classList.contains(t))return;e.classList.remove(t)}}function Qr(e=!1){const t=C,r=t.l.u;if(!r)return;let n=()=>W(t.s);if(e){let i=0,l={};const a=Ke(()=>{let o=!1;const f=t.s;for(const u in f)f[u]!==l[u]&&(l[u]=f[u],o=!0);return o&&i++,i});n=()=>p(a)}r.b.length&&Wn(()=>{en(t,n),Mt(r.b)}),Gt(()=>{const i=pt(()=>r.m.map(xn));return()=>{for(const l of i)typeof l=="function"&&l()}}),r.a.length&&Gt(()=>{en(t,n),Mt(r.a)})}function en(e,t){if(e.l.s)for(const r of e.l.s)p(r);t()}function tn(e){C===null&&Qn(),E&&C.l!==null?ci(C).m.push(e):Gt(()=>{const t=pt(e);if(typeof t=="function")return t})}function ci(e){var t=e.l;return t.u??(t.u={a:[],b:[],m:[]})}let Et=!1;function vi(e){var t=Et;try{return Et=!1,[e(),Et]}finally{Et=t}}function rn(e){for(var t=$,r=$;t!==null&&!(t.f&(le|ke));)t=t.parent;try{return we(t),e()}finally{we(r)}}function J(e,t,r,n){var A;var i=(r&vn)!==0,l=!E||(r&dn)!==0,a=(r&_n)!==0,o=!1,f;[f,o]=vi(()=>e[t]);var u=Ie in e||or in e,c=(((A=Se(e,t))==null?void 0:A.set)??(u&&t in e&&(m=>e[t]=m)))||void 0,v=n,s=!0,d=!1,_=()=>(d=!0,s&&(s=!1,v=n),v);f===void 0&&n!==void 0&&(c&&l&&On(),f=_(),c&&c(f));var b;if(l)b=()=>{var m=e[t];return m===void 0?_():(s=!0,d=!1,m)};else{var x=rn(()=>(i?Ke:De)(()=>e[t]));x.f|=mn,b=()=>{var m=p(x);return m!==void 0&&(v=void 0),m===void 0?v:m}}if(c){var O=e.$$legacy;return function(m,y){return arguments.length>0?((!l||!y||O||o)&&c(y?b():m),m):b()}}var R=!1,w=!1,g=ot(f),h=rn(()=>Ke(()=>{var m=b(),y=p(g);return R?(R=!1,w=!0,y):(w=!1,g.v=m)}));return h.equals=qt,function(m,y){if(arguments.length>0){const fe=y?p(h):l&&a?Fe(m):m;return h.equals(fe)||(R=!0,U(g,fe),d&&v!==void 0&&(v=fe),pt(()=>p(h))),m}return p(h)}}function di(e){return new _i(e)}class _i{constructor(t){rr(this,$e);rr(this,Z);var l;var r=new Map,n=(a,o)=>{var f=ot(o);return r.set(a,f),f};const i=new Proxy({...t.props||{},$$events:{}},{get(a,o){return p(r.get(o)??n(o,Reflect.get(a,o)))},has(a,o){return o===or?!0:(p(r.get(o)??n(o,Reflect.get(a,o))),Reflect.has(a,o))},set(a,o,f){return U(r.get(o)??n(o,f),f),Reflect.set(a,o,f)}});nr(this,Z,(t.hydrate?li:Ur)(t.component,{target:t.target,anchor:t.anchor,props:i,context:t.context,intro:t.intro??!1,recover:t.recover})),(!((l=t==null?void 0:t.props)!=null&&l.$$host)||t.sync===!1)&&H(),nr(this,$e,i.$$events);for(const a of Object.keys(B(this,Z)))a==="$set"||a==="$destroy"||a==="$on"||at(this,a,{get(){return B(this,Z)[a]},set(o){B(this,Z)[a]=o},enumerable:!0});B(this,Z).$set=a=>{Object.assign(i,a)},B(this,Z).$destroy=()=>{ai(B(this,Z))}}$set(t){B(this,Z).$set(t)}$on(t,r){B(this,$e)[t]=B(this,$e)[t]||[];const n=(...i)=>r.call(this,...i);return B(this,$e)[t].push(n),()=>{B(this,$e)[t]=B(this,$e)[t].filter(i=>i!==n)}}$destroy(){B(this,Z).$destroy()}}$e=new WeakMap,Z=new WeakMap;let nn;typeof HTMLElement=="function"&&(nn=class extends HTMLElement{constructor(t,r,n){super();ie(this,"$$ctor");ie(this,"$$s");ie(this,"$$c");ie(this,"$$cn",!1);ie(this,"$$d",{});ie(this,"$$r",!1);ie(this,"$$p_d",{});ie(this,"$$l",{});ie(this,"$$l_u",new Map);ie(this,"$$me");this.$$ctor=t,this.$$s=r,n&&this.attachShadow({mode:"open"})}addEventListener(t,r,n){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(r),this.$$c){const i=this.$$c.$on(t,r);this.$$l_u.set(r,i)}super.addEventListener(t,r,n)}removeEventListener(t,r,n){if(super.removeEventListener(t,r,n),this.$$c){const i=this.$$l_u.get(r);i&&(i(),this.$$l_u.delete(r))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(i){return l=>{const a=document.createElement("slot");i!=="default"&&(a.name=i),M(l,a)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const r={},n=hi(this);for(const i of this.$$s)i in n&&(i==="default"&&!this.$$d.children?(this.$$d.children=t(i),r.default=!0):r[i]=t(i));for(const i of this.attributes){const l=this.$$g_p(i.name);l in this.$$d||(this.$$d[l]=Tt(l,i.value,this.$$p_d,"toProp"))}for(const i in this.$$p_d)!(i in this.$$d)&&this[i]!==void 0&&(this.$$d[i]=this[i],delete this[i]);this.$$c=di({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=Jn(()=>{mt(()=>{var i;this.$$r=!0;for(const l of lt(this.$$c)){if(!((i=this.$$p_d[l])!=null&&i.reflect))continue;this.$$d[l]=this.$$c[l];const a=Tt(l,this.$$d[l],this.$$p_d,"toAttribute");a==null?this.removeAttribute(this.$$p_d[l].attribute||l):this.setAttribute(this.$$p_d[l].attribute||l,a)}this.$$r=!1})});for(const i in this.$$l)for(const l of this.$$l[i]){const a=this.$$c.$on(i,l);this.$$l_u.set(l,a)}this.$$l={}}}attributeChangedCallback(t,r,n){var i;this.$$r||(t=this.$$g_p(t),this.$$d[t]=Tt(t,n,this.$$p_d,"toProp"),(i=this.$$c)==null||i.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(t){return lt(this.$$p_d).find(r=>this.$$p_d[r].attribute===t||!this.$$p_d[r].attribute&&r.toLowerCase()===t)||t}});function Tt(e,t,r,n){var l;const i=(l=r[e])==null?void 0:l.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!n||!r[e])return t;if(n==="toAttribute")switch(i){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function hi(e){const t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}function ln(e,t,r,n,i,l){let a=class extends nn{constructor(){super(e,r,i),this.$$p_d=t}static get observedAttributes(){return lt(t).map(o=>(t[o].attribute||o).toLowerCase())}};return lt(t).forEach(o=>{at(a.prototype,o,{get(){return this.$$c&&o in this.$$c?this.$$c[o]:this.$$d[o]},set(f){var v;f=Tt(o,f,t),this.$$d[o]=f;var u=this.$$c;if(u){var c=(v=Se(u,o))==null?void 0:v.get;c?u[o]=f:u.$set({[o]:f})}}})}),n.forEach(o=>{at(a.prototype,o,{get(){var f;return(f=this.$$c)==null?void 0:f[o]}})}),e.element=a,a}function Qt(e,t="long",r=!1){const n=t==="long"?{weekday:"long",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit",...r&&{timeZoneName:"short"}}:{hour:"2-digit",minute:"2-digit"};return new Date(e*1e3).toLocaleString(void 0,n)}function an(e){const t=e.ap_id||e.place.name==="online";return e.multidate?Qt(e.start_datetime,"long",t)+" - "+Qt(e.end_datetime,"long",t):Qt(e.start_datetime,"long",t)}var pi=V(''),gi=V('
'),mi=V(''),bi=V(''),$i=V('
'),wi=V(' '),yi=V(' '),xi=V('
'),Ei=V('
'),Ti=V('
'),ki=V(" ",1);const Ai={hash:"svelte-1ap5437",code:`#gancioEvents.svelte-1ap5437 {font-family:ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';overflow-x:hidden;width:100%;box-sizing:content-box;margin:0 auto;font-size:1rem;text-align:left;}.nosidebar.svelte-1ap5437 {max-width:1200px;}#header.svelte-1ap5437 {padding:1.2rem 1rem;background-color:var(--bg-odd-color);}.sidebar.svelte-1ap5437 {max-width:500px;box-shadow:rgba(60, 64, 67, 0.4) 0px 1px 2px 0px, rgba(60, 64, 67, 0.25) 0px 1px 3px 1px;border-radius:5px;font-size:1rem;}.event.svelte-1ap5437 .img:where(.svelte-1ap5437) {width:100%;max-width:450px;max-height:250px;aspect-ratio:1.7778;flex:1 0 auto; /* height: 100%; */} @media screen and (max-width: 800px) {.event.svelte-1ap5437 {flex-wrap:wrap;}.event.svelte-1ap5437 .img:where(.svelte-1ap5437) {max-width:100%;} }.event.svelte-1ap5437 img:where(.svelte-1ap5437) {object-fit:cover;border-radius:15px;width:100%;height:100%;box-shadow:rgba(50, 50, 93, 0.25) 0px 6px 12px -2px, rgba(0, 0, 0, 0.3) 0px 3px 7px -3px;}.nosidebar.svelte-1ap5437 .event:where(.svelte-1ap5437) {margin-bottom:2rem;}.nosidebar.svelte-1ap5437 .content:where(.svelte-1ap5437) {margin-left:1rem;margin-top:5px;text-align:left;}.tags.svelte-1ap5437 {margin-top:2px;}#logo.svelte-1ap5437 {position:absolute;top:10px;right:10px;height:40px;}a.svelte-1ap5437 {text-decoration:none;color:var(--text-color);display:flex;padding:8px 20px;margin:0;line-height:1.275rem;font-weight:400;font-size:0.875rem;position:relative;transition:background-color 0.3s cubic-bezier(0.25, 0.8, 0.5, 1), padding 0.3s;box-sizing:content-box;}a.svelte-1ap5437:hover .title:where(.svelte-1ap5437), a.svelte-1ap5437:focus .title:where(.svelte-1ap5437), a.svelte-1ap5437:active .title:where(.svelte-1ap5437) {text-decoration:underline;}.dark.svelte-1ap5437 {--bg-odd-color: #161616;--bg-even-color: #222;--bg-hover-color: #333;--text-color: white;--title-color: white;--line-color: rgba(120, 120, 120, 0.2);}.light.svelte-1ap5437 {--bg-odd-color: #f5f5f5;--bg-even-color: #fafafa;--bg-hover-color: #eee;--text-color: #222;--title-color: black;--line-color: rgba(220, 220, 220, 0.9);}.sidebar.svelte-1ap5437 a:where(.svelte-1ap5437) {background-color:var(--bg-even-color);border-bottom:1px solid var(--line-color);}.sidebar.svelte-1ap5437 a:where(.svelte-1ap5437):hover, .sidebar.svelte-1ap5437 a:where(.svelte-1ap5437):focus, .sidebar.svelte-1ap5437 a:where(.svelte-1ap5437):active {background-color:var(--bg-hover-color);padding-left:15px;padding-right:25px;}.place.svelte-1ap5437 {font-weight:400;font-size:1.2rem;line-height:1.4rem;color:orangered;}.title.svelte-1ap5437 {color:var(--title-color);font-weight:bold;font-size:1.3rem;line-height:1.1em;}.nosidebar.svelte-1ap5437 .title:where(.svelte-1ap5437) {font-size:1.9em;line-height:1.1em;}.subtitle.svelte-1ap5437 {font-size:1rem;line-height:1.1em;color:var(--title-color);opacity:0.9;}.tag.svelte-1ap5437 {margin-right:10px;display:inline-block;}`};function Si(e,t){Jt(t,!1),Jr(e,Ai);let r=J(t,"baseurl",12,""),n=J(t,"title",12,""),i=J(t,"maxlength",12,!1),l=J(t,"collection",12,""),a=J(t,"tags",12,""),o=J(t,"places",12,""),f=J(t,"theme",12,"light"),u=J(t,"show_recurrent",12,!1),c=J(t,"sidebar",12,"true"),v=J(t,"external_style",12,""),s=!1,d=dr([]);function _(h){if(!s)return;const A=[];i()&&A.push(`max=${i()}`);let m="/api/events";l()?m=`/feed/json/collection/${l()}`:(a()&&A.push(`tags=${a()}`),o()&&A.push(`places=${o()}`)),A.push(`show_recurrent=${u()?"true":"false"}`),fetch(`${r()}${m}?${A.join("&")}`).then(y=>y.json()).then(y=>{U(d,y.events||y)}).catch(y=>{console.error("Error loading Gancio API -> ",y)})}function b(h){if(h.media&&h.media[0].focalpoint){const A=h.media[0].focalpoint;return`${(A[0]+1)*50}% ${(A[1]+1)*50}%`}return"center center"}tn(()=>{s=!0,_()}),Lr(()=>(W(i()),W(n()),W(o()),W(a()),W(f()),W(u()),W(c()),W(r()),W(l())),()=>{_(i()&&n()&&o()&&a()&&f()&&u()&&c()&&r()&&l())}),jr(),Qr();var x=ki(),O=Or(x);{var R=h=>{var A=pi();ue(()=>z(A,"href",v())),M(h,A)};be(O,h=>{v()&&h(R)})}var w=te(O,2);{var g=h=>{var A=Ti(),m=j(A);{var y=re=>{var S=gi(),X=j(S),Ee=j(X),Ue=j(Ee,!0);D(Ee);var Re=te(Ee,2);D(X),D(S),ue(()=>{z(S,"href",r()),me(Ue,n()),z(Re,"src",`${r()??""}/logo.png`)}),M(re,S)};be(m,re=>{n()&&c()==="true"&&re(y)})}var fe=te(m,2);Gr(fe,1,()=>p(d),Vr,(re,S)=>{var X=Ei(),Ee=j(X);{var Ue=G=>{var ne=$i(),Xe=j(ne);{var tr=Te=>{var ce=mi();ue(Mi=>{z(ce,"style",`object-position: ${Mi??""}; aspect-ratio=1.7778;`),z(ce,"alt",p(S).media[0].name),z(ce,"src",r()+"/media/thumb/"+p(S).media[0].url)},[()=>b(p(S))],De),Xr(ce),M(Te,ce)},Qe=Te=>{var ce=bi();ue(()=>{z(ce,"alt",p(S).title),z(ce,"src",r()+"/fallbackimage.png")}),Xr(ce),M(Te,ce)};be(Xe,Te=>{p(S).media.length?Te(tr):Te(Qe,!1)})}D(ne),M(G,ne)};be(Ee,G=>{c()!=="true"&&G(Ue)})}var Re=te(Ee,2),Ye=j(Re),kt=j(Ye,!0);D(Ye);var Ve=te(Ye,2),Ii=j(Ve,!0);D(Ve);var er=te(Ve,2),sn=j(er),Di=te(sn);{var Li=G=>{var ne=wi(),Xe=j(ne,!0);D(ne),ue(()=>me(Xe,p(S).place.address)),M(G,ne)};be(Di,G=>{p(S).place.name!=="online"&&G(Li)})}D(er);var ji=te(er,2);{var Pi=G=>{var ne=xi();Gr(ne,5,()=>p(S).tags,Vr,(Xe,tr)=>{var Qe=yi(),Te=j(Qe);D(Qe),ue(()=>me(Te,`#${p(tr)??""}`)),M(Xe,Qe)}),D(ne),M(G,ne)};be(ji,G=>{p(S).tags.length&&G(Pi)})}D(Re),D(X),ue(G=>{z(X,"href",`${r()??""}/event/${(p(S).slug||p(S).id)??""}`),z(X,"title",p(S).title),me(kt,G),me(Ii,p(S).title),me(sn,`@${p(S).place.name??""} `)},[()=>an(p(S))],De),M(re,X)}),D(A),ue(()=>{xt(A,"dark",f()==="dark"),xt(A,"light",f()==="light"),xt(A,"sidebar",c()==="true"),xt(A,"nosidebar",c()!=="true")}),M(h,A)};be(w,h=>{p(d).length&&h(g)})}return M(e,x),Zt({get baseurl(){return r()},set baseurl(h){r(h),H()},get title(){return n()},set title(h){n(h),H()},get maxlength(){return i()},set maxlength(h){i(h),H()},get collection(){return l()},set collection(h){l(h),H()},get tags(){return a()},set tags(h){a(h),H()},get places(){return o()},set places(h){o(h),H()},get theme(){return f()},set theme(h){f(h),H()},get show_recurrent(){return u()},set show_recurrent(h){u(h),H()},get sidebar(){return c()},set sidebar(h){c(h),H()},get external_style(){return v()},set external_style(h){v(h),H()}})}customElements.define("gancio-events",ln(Si,{baseurl:{},title:{},maxlength:{},collection:{},tags:{},places:{},theme:{},show_recurrent:{},sidebar:{},external_style:{}},[],[],!0));var Ni=V(''),Ci=V('
');const Oi={hash:"svelte-rjo5bi",code:`.card.svelte-rjo5bi {display:block;font-family:'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;box-shadow:0 4px 8px 0 rgba(0, 0, 0, 0.2);transition:0.3s;border-radius:5px; /* 5px rounded corners */max-width:500px;text-decoration:none;color:white;background-color:#1e1e1e;overflow:hidden;} /* Add rounded corners to the top left and the top right corner of the image */img.svelte-rjo5bi {border-radius:5px 5px 0 0;max-height:250px;min-height:160px;width:100%;object-fit:cover;object-position:top;}.card.svelte-rjo5bi:hover .container:where(.svelte-rjo5bi) {padding-left:20px;} /* On mouse-over, add a deeper shadow */.card.svelte-rjo5bi:hover {box-shadow:0 8px 16px 0 rgba(0, 0, 0, 0.2);} /* Add some padding inside the card container */.container.svelte-rjo5bi {transition:padding-left 0.2s;padding:16px;}.place.svelte-rjo5bi {font-weight:600;color:#ff6e40;}`};function Ri(e,t){Jt(t,!1),Jr(e,Oi);let r=J(t,"baseurl",12,"https://demo.gancio.org"),n=J(t,"id",12),i=!1,l=dr();function a(s,d){i&&fetch(`${d}/api/event/detail/${s}`).then(_=>_.json()).then(_=>U(l,_))}tn(()=>{i=!0,a(n(),r())});function o(s){return`${r()}/media/thumb/${s.media[0].url}`}function f(s){if(s.media[0].focalpoint){const d=s.media[0].focalpoint;return`${(d[0]+1)*50}% ${(d[1]+1)*50}%`}return"center center"}Lr(()=>(W(n()),W(r())),()=>{a(n(),r())}),jr(),Qr();var u=ii(),c=Or(u);{var v=s=>{var d=Ci(),_=j(d);{var b=m=>{var y=Ni();ue((fe,re)=>{z(y,"src",fe),z(y,"alt",p(l).media[0].name),z(y,"style",`object-position: ${re??""}; aspect-ratio=1.7778;`)},[()=>o(p(l)),()=>f(p(l))],De),M(m,y)};be(_,m=>{p(l).media.length&&m(b)})}var x=te(_,2),O=j(x),R=j(O,!0);D(O);var w=te(O,2),g=j(w,!0);D(w);var h=te(w,2),A=j(h);D(h),D(x),D(d),ue(m=>{z(d,"href",`${r()??""}/event/${(p(l).slug||p(l).id)??""}`),me(R,p(l).title),me(g,m),me(A,`@${p(l).place.name??""}`)},[()=>an(p(l))],De),M(s,d)};be(c,s=>{p(l)&&s(v)})}return M(e,u),Zt({get baseurl(){return r()},set baseurl(s){r(s),H()},get id(){return n()},set id(s){n(s),H()}})}customElements.define("gancio-event",ln(Ri,{baseurl:{},id:{}},[],[],!0))});