educaweb2/assets/js/gancio-events.es.js

25 lines
46 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

var si=Object.defineProperty;var Fr=e=>{throw TypeError(e)};var li=(e,t,r)=>t in e?si(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var H=(e,t,r)=>li(e,typeof t!="symbol"?t+"":t,r),nr=(e,t,r)=>t.has(e)||Fr("Cannot "+r);var b=(e,t,r)=>(nr(e,t,"read from private field"),r?r.call(e):t.get(e)),q=(e,t,r)=>t.has(e)?Fr("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),K=(e,t,r,n)=>(nr(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Ue=(e,t,r)=>(nr(e,t,"access private method"),r);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&n(l)}).observe(document,{childList:!0,subtree:!0});function r(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(s){if(s.ep)return;s.ep=!0;const i=r(s);fetch(s.href,i)}})();const ai="5";var tn;typeof window<"u"&&((tn=window.__svelte??(window.__svelte={})).v??(tn.v=new Set)).add(ai);let gt=!1,oi=!1;function fi(){gt=!0}fi();const Wt=1,Zt=2,rn=4,ui=8,ci=16,di=1,vi=2,hi=4,_i=8,pi=16,gi=1,mi=2,nn="[",gr="[!",mr="]",st={},j=Symbol(),wi="http://www.w3.org/1999/xhtml",sn=!1;var wr=Array.isArray,bi=Array.prototype.indexOf,br=Array.from,Ut=Object.keys,vt=Object.defineProperty,Be=Object.getOwnPropertyDescriptor,ln=Object.getOwnPropertyDescriptors,$i=Object.prototype,yi=Array.prototype,$r=Object.getPrototypeOf,qr=Object.isExtensible;function Ei(e){return e()}function Ht(e){for(var t=0;t<e.length;t++)e[t]()}function xi(){var e,t,r=new Promise((n,s)=>{e=n,t=s});return{promise:r,resolve:e,reject:t}}const te=2,yr=4,Er=8,mt=16,Ae=32,Fe=64,an=128,oe=256,Yt=512,U=1024,fe=2048,Ne=4096,ve=8192,Je=16384,xr=32768,Tr=65536,Ur=1<<17,Ti=1<<18,Sr=1<<19,on=1<<20,ar=1<<21,Ar=1<<22,Ve=1<<23,lt=Symbol("$state"),fn=Symbol("legacy props"),Si=Symbol(""),Nr=new class extends Error{constructor(){super(...arguments);H(this,"name","StaleReactionError");H(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}},un=3,Et=8;function Ai(){throw new Error("https://svelte.dev/e/await_outside_boundary")}function Ni(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Oi(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function ki(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Ri(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Ci(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Ii(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Pi(){throw new Error("https://svelte.dev/e/hydration_failed")}function Mi(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Di(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Li(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function ji(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Jt(e){console.warn("https://svelte.dev/e/hydration_mismatch")}let R=!1;function Se(e){R=e}let C;function he(e){if(e===null)throw Jt(),st;return C=e}function Xt(){return he(qe(C))}function L(e){if(R){if(qe(C)!==null)throw Jt(),st;C=e}}function or(){for(var e=0,t=C;;){if(t.nodeType===Et){var r=t.data;if(r===mr){if(e===0)return t;e-=1}else(r===nn||r===gr)&&(e+=1)}var n=qe(t);t.remove(),t=n}}function cn(e){if(!e||e.nodeType!==Et)throw Jt(),st;return e.data}function dn(e){return e===this.v}function Fi(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function vn(e){return!Fi(e,this.v)}let I=null;function zt(e){I=e}function Or(e,t=!1,r){I={p:I,c:null,e:null,s:e,x:null,l:gt&&!t?{s:null,u:null,$:[]}:null}}function kr(e){var t=I,r=t.e;if(r!==null){t.e=null;for(var n of r)Rn(n)}return e!==void 0&&(t.x=e),I=t.p,e??{}}function Ct(){return!gt||I!==null&&I.l===null}const qi=new WeakMap;function Ui(e){var t=x;if(t===null)return T.f|=Ve,e;if((t.f&xr)===0){if((t.f&an)===0)throw!t.parent&&e instanceof Error&&hn(e),e;t.b.error(e)}else Rr(e,t)}function Rr(e,t){for(;t!==null;){if((t.f&an)!==0)try{t.b.error(e);return}catch(r){e=r}t=t.parent}throw e instanceof Error&&hn(e),e}function hn(e){const t=qi.get(e);t&&(vt(e,"message",{value:t.message}),vt(e,"stack",{value:t.stack}))}let xt=[],fr=[];function _n(){var e=xt;xt=[],Ht(e)}function Hi(){var e=fr;fr=[],Ht(e)}function Yi(e){xt.length===0&&queueMicrotask(_n),xt.push(e)}function zi(){xt.length>0&&_n(),fr.length>0&&Hi()}function Bi(){for(var e=x.b;e!==null&&!e.has_pending_snippet();)e=e.parent;return e===null&&Ai(),e}function Qt(e){var t=te|fe,r=T!==null&&(T.f&te)!==0?T:null;return x===null||r!==null&&(r.f&oe)!==0?t|=oe:x.f|=Sr,{ctx:I,deps:null,effects:null,equals:dn,f:t,fn:e,reactions:null,rv:0,v:j,wv:0,parent:r??x,ac:null}}function Vi(e,t){let r=x;r===null&&Oi();var n=r.b,s=void 0,i=Tt(j),l=null,a=!T;return rs(()=>{try{var o=e()}catch(v){o=Promise.reject(v)}var f=()=>o;s=(l==null?void 0:l.then(f,f))??Promise.resolve(o),l=s;var c=P,h=n.pending;a&&(n.update_pending_count(1),h||c.increment());const d=(v,u=void 0)=>{l=null,h||c.activate(),u?u!==Nr&&(i.f|=Ve,St(i,u)):((i.f&Ve)!==0&&(i.f^=Ve),St(i,v)),a&&(n.update_pending_count(-1),h||c.decrement()),mn()};if(s.then(d,v=>d(null,v||"unknown")),c)return()=>{queueMicrotask(()=>c.neuter())}}),new Promise(o=>{function f(c){function h(){c===s?o(i):f(s)}c.then(h,h)}f(s)})}function Cr(e){const t=Qt(e);return t.equals=vn,t}function pn(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)be(t[r])}}function Gi(e){for(var t=e.parent;t!==null;){if((t.f&te)===0)return t;t=t.parent}return null}function Ir(e){var t,r=x;je(Gi(e));try{pn(e),t=Yn(e)}finally{je(r)}return t}function gn(e){var t=Ir(e);if(e.equals(t)||(e.v=t,e.wv=Un()),!Xe)if(Pe!==null)Pe.set(e,e.v);else{var r=(Me||(e.f&oe)!==0)&&e.deps!==null?Ne:U;Z(e,r)}}function Ki(e,t,r){const n=Ct()?Qt:Cr;if(t.length===0){r(e.map(n));return}var s=P,i=x,l=Wi(),a=Bi();Promise.all(t.map(o=>Vi(o))).then(o=>{s==null||s.activate(),l();try{r([...e.map(n),...o])}catch(f){(i.f&Je)===0&&Rr(f,i)}s==null||s.deactivate(),mn()}).catch(o=>{a.error(o)})}function Wi(){var e=x,t=T,r=I;return function(){je(e),$e(t),zt(r)}}function mn(){je(null),$e(null),zt(null)}const yt=new Set;let P=null,Pe=null,Hr=new Set,Bt=[];function wn(){const e=Bt.shift();Bt.length>0&&queueMicrotask(wn),e()}let We=[],er=null,ur=!1,jt=!1;var ft,ut,Ce,Nt,Ot,Ye,ct,ze,Ie,dt,kt,Rt,_e,bn,Ft,cr;const Kt=class Kt{constructor(){q(this,_e);H(this,"current",new Map);q(this,ft,new Map);q(this,ut,new Set);q(this,Ce,0);q(this,Nt,null);q(this,Ot,!1);q(this,Ye,[]);q(this,ct,[]);q(this,ze,[]);q(this,Ie,[]);q(this,dt,[]);q(this,kt,[]);q(this,Rt,[]);H(this,"skipped_effects",new Set)}process(t){var i;We=[];var r=null;if(yt.size>1){r=new Map,Pe=new Map;for(const[l,a]of this.current)r.set(l,{v:l.v,wv:l.wv}),l.v=a;for(const l of yt)if(l!==this)for(const[a,o]of b(l,ft))r.has(a)||(r.set(a,{v:a.v,wv:a.wv}),a.v=o)}for(const l of t)Ue(this,_e,bn).call(this,l);if(b(this,Ye).length===0&&b(this,Ce)===0){Ue(this,_e,cr).call(this);var n=b(this,ze),s=b(this,Ie);K(this,ze,[]),K(this,Ie,[]),K(this,dt,[]),P=null,Yr(n),Yr(s),P===null?P=this:yt.delete(this),(i=b(this,Nt))==null||i.resolve()}else Ue(this,_e,Ft).call(this,b(this,ze)),Ue(this,_e,Ft).call(this,b(this,Ie)),Ue(this,_e,Ft).call(this,b(this,dt));if(r){for(const[l,{v:a,wv:o}]of r)l.wv<=o&&(l.v=a);Pe=null}for(const l of b(this,Ye))Ke(l);for(const l of b(this,ct))Ke(l);K(this,Ye,[]),K(this,ct,[])}capture(t,r){b(this,ft).has(t)||b(this,ft).set(t,r),this.current.set(t,t.v)}activate(){P=this}deactivate(){P=null;for(const t of Hr)if(Hr.delete(t),t(),P!==null)break}neuter(){K(this,Ot,!0)}flush(){We.length>0?$n():Ue(this,_e,cr).call(this),P===this&&(b(this,Ce)===0&&yt.delete(this),this.deactivate())}increment(){K(this,Ce,b(this,Ce)+1)}decrement(){if(K(this,Ce,b(this,Ce)-1),b(this,Ce)===0){for(const t of b(this,kt))Z(t,fe),_t(t);for(const t of b(this,Rt))Z(t,Ne),_t(t);K(this,ze,[]),K(this,Ie,[]),this.flush()}else this.deactivate()}add_callback(t){b(this,ut).add(t)}settled(){return(b(this,Nt)??K(this,Nt,xi())).promise}static ensure(){if(P===null){const t=P=new Kt;yt.add(P),jt||Kt.enqueue(()=>{P===t&&t.flush()})}return P}static enqueue(t){Bt.length===0&&queueMicrotask(wn),Bt.unshift(t)}};ft=new WeakMap,ut=new WeakMap,Ce=new WeakMap,Nt=new WeakMap,Ot=new WeakMap,Ye=new WeakMap,ct=new WeakMap,ze=new WeakMap,Ie=new WeakMap,dt=new WeakMap,kt=new WeakMap,Rt=new WeakMap,_e=new WeakSet,bn=function(t){var c;t.f^=U;for(var r=t.first;r!==null;){var n=r.f,s=(n&(Ae|Fe))!==0,i=s&&(n&U)!==0,l=i||(n&ve)!==0||this.skipped_effects.has(r);if(!l&&r.fn!==null){if(s)r.f^=U;else if((n&yr)!==0)b(this,Ie).push(r);else if((n&U)===0)if((n&Ar)!==0){var a=(c=r.b)!=null&&c.pending?b(this,ct):b(this,Ye);a.push(r)}else It(r)&&((r.f&mt)!==0&&b(this,dt).push(r),Ke(r));var o=r.first;if(o!==null){r=o;continue}}var f=r.parent;for(r=r.next;r===null&&f!==null;)r=f.next,f=f.parent}},Ft=function(t){for(const r of t)((r.f&fe)!==0?b(this,kt):b(this,Rt)).push(r),Z(r,U);t.length=0},cr=function(){if(!b(this,Ot))for(const t of b(this,ut))t();b(this,ut).clear()};let ht=Kt;function Y(e){var t=jt;jt=!0;try{for(var r;;){if(zi(),We.length===0&&(P==null||P.flush(),We.length===0))return er=null,r;$n()}}finally{jt=t}}function $n(){var e=at;ur=!0;try{var t=0;for(Br(!0);We.length>0;){var r=ht.ensure();if(t++>1e3){var n,s;Zi()}r.process(We),De.clear()}}finally{ur=!1,Br(e),er=null}}function Zi(){try{Ii()}catch(e){Rr(e,er)}}let He=null;function Yr(e){var t=e.length;if(t!==0){for(var r=0;r<t;){var n=e[r++];if((n.f&(Je|ve))===0&&It(n)&&(He=[],Ke(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null&&n.ac===null?Ln(n):n.fn=null),He.length>0)){De.clear();for(const s of He)Ke(s);He=[]}}He=null}}function _t(e){for(var t=er=e;t.parent!==null;){t=t.parent;var r=t.f;if(ur&&t===x&&(r&mt)!==0)return;if((r&(Fe|Ae))!==0){if((r&U)===0)return;t.f^=U}}We.push(t)}const De=new Map;function Tt(e,t){var r={f:0,v:e,reactions:null,equals:dn,rv:0,wv:0};return r}function Re(e,t){const r=Tt(e);return ss(r),r}function tr(e,t=!1,r=!0){var s;const n=Tt(e);return t||(n.equals=vn),gt&&r&&I!==null&&I.l!==null&&((s=I.l).s??(s.s=[])).push(n),n}function ee(e,t,r=!1){T!==null&&(!we||(T.f&Ur)!==0)&&Ct()&&(T.f&(te|mt|Ar|Ur))!==0&&!(V!=null&&V.includes(e))&&ji();let n=r?it(t):t;return St(e,n)}function St(e,t){if(!e.equals(t)){var r=e.v;Xe?De.set(e,t):De.set(e,r),e.v=t;var n=ht.ensure();n.capture(e,r),(e.f&te)!==0&&((e.f&fe)!==0&&Ir(e),Z(e,(e.f&oe)===0?U:Ne)),e.wv=Un(),yn(e,fe),Ct()&&x!==null&&(x.f&U)!==0&&(x.f&(Ae|Fe))===0&&(se===null?ls([e]):se.push(e))}return t}function ir(e){ee(e,e.v+1)}function yn(e,t){var r=e.reactions;if(r!==null)for(var n=Ct(),s=r.length,i=0;i<s;i++){var l=r[i],a=l.f;if(!(!n&&l===x)){var o=(a&fe)===0;o&&Z(l,t),(a&te)!==0?yn(l,Ne):o&&((a&mt)!==0&&He!==null&&He.push(l),_t(l))}}}function it(e){if(typeof e!="object"||e===null||lt in e)return e;const t=$r(e);if(t!==$i&&t!==yi)return e;var r=new Map,n=wr(e),s=Re(0),i=Ge,l=a=>{if(Ge===i)return a();var o=T,f=Ge;$e(null),Gr(i);var c=a();return $e(o),Gr(f),c};return n&&r.set("length",Re(e.length)),new Proxy(e,{defineProperty(a,o,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&Di();var c=r.get(o);return c===void 0?c=l(()=>{var h=Re(f.value);return r.set(o,h),h}):ee(c,f.value,!0),!0},deleteProperty(a,o){var f=r.get(o);if(f===void 0){if(o in a){const c=l(()=>Re(j));r.set(o,c),ir(s)}}else ee(f,j),ir(s);return!0},get(a,o,f){var v;if(o===lt)return e;var c=r.get(o),h=o in a;if(c===void 0&&(!h||(v=Be(a,o))!=null&&v.writable)&&(c=l(()=>{var u=it(h?a[o]:j),g=Re(u);return g}),r.set(o,c)),c!==void 0){var d=p(c);return d===j?void 0:d}return Reflect.get(a,o,f)},getOwnPropertyDescriptor(a,o){var f=Reflect.getOwnPropertyDescriptor(a,o);if(f&&"value"in f){var c=r.get(o);c&&(f.value=p(c))}else if(f===void 0){var h=r.get(o),d=h==null?void 0:h.v;if(h!==void 0&&d!==j)return{enumerable:!0,configurable:!0,value:d,writable:!0}}return f},has(a,o){var d;if(o===lt)return!0;var f=r.get(o),c=f!==void 0&&f.v!==j||Reflect.has(a,o);if(f!==void 0||x!==null&&(!c||(d=Be(a,o))!=null&&d.writable)){f===void 0&&(f=l(()=>{var v=c?it(a[o]):j,u=Re(v);return u}),r.set(o,f));var h=p(f);if(h===j)return!1}return c},set(a,o,f,c){var N;var h=r.get(o),d=o in a;if(n&&o==="length")for(var v=f;v<h.v;v+=1){var u=r.get(v+"");u!==void 0?ee(u,j):v in a&&(u=l(()=>Re(j)),r.set(v+"",u))}if(h===void 0)(!d||(N=Be(a,o))!=null&&N.writable)&&(h=l(()=>Re(void 0)),ee(h,it(f)),r.set(o,h));else{d=h.v!==j;var g=l(()=>it(f));ee(h,g)}var m=Reflect.getOwnPropertyDescriptor(a,o);if(m!=null&&m.set&&m.set.call(c,f),!d){if(n&&typeof o=="string"){var y=r.get("length"),S=Number(o);Number.isInteger(S)&&S>=y.v&&ee(y,S+1)}ir(s)}return!0},ownKeys(a){p(s);var o=Reflect.ownKeys(a).filter(h=>{var d=r.get(h);return d===void 0||d.v!==j});for(var[f,c]of r)c.v!==j&&!(f in a)&&o.push(f);return o},setPrototypeOf(){Li()}})}var zr,En,xn,Tn;function dr(){if(zr===void 0){zr=window,En=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;xn=Be(t,"firstChild").get,Tn=Be(t,"nextSibling").get,qr(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),qr(r)&&(r.__t=void 0)}}function Le(e=""){return document.createTextNode(e)}function Ze(e){return xn.call(e)}function qe(e){return Tn.call(e)}function F(e,t){if(!R)return Ze(e);var r=Ze(C);if(r===null)r=C.appendChild(Le());else if(t&&r.nodeType!==un){var n=Le();return r==null||r.before(n),he(n),n}return he(r),r}function Sn(e,t){if(!R){var r=Ze(e);return r instanceof Comment&&r.data===""?qe(r):r}return C}function de(e,t=1,r=!1){let n=R?C:e;for(var s;t--;)s=n,n=qe(n);if(!R)return n;if(r&&(n==null?void 0:n.nodeType)!==un){var i=Le();return n===null?s==null||s.after(i):n.before(i),he(i),i}return he(n),n}function An(e){e.textContent=""}function Nn(){return!1}function On(e){var t=T,r=x;$e(null),je(null);try{return e()}finally{$e(t),je(r)}}function kn(e){x===null&&T===null&&Ci(),T!==null&&(T.f&oe)!==0&&x===null&&Ri(),Xe&&ki()}function Ji(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function ye(e,t,r,n=!0){var s=x;s!==null&&(s.f&ve)!==0&&(e|=ve);var i={ctx:I,deps:null,nodes_start:null,nodes_end:null,f:e|fe,first:null,fn:t,last:null,next:null,parent:s,b:s&&s.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(r)try{Ke(i),i.f|=xr}catch(o){throw be(i),o}else t!==null&&_t(i);var l=r&&i.deps===null&&i.first===null&&i.nodes_start===null&&i.teardown===null&&(i.f&Sr)===0;if(!l&&n&&(s!==null&&Ji(i,s),T!==null&&(T.f&te)!==0&&(e&Fe)===0)){var a=T;(a.effects??(a.effects=[])).push(i)}return i}function vr(e){kn();var t=x.f,r=!T&&(t&Ae)!==0&&(t&xr)===0;if(r){var n=I;(n.e??(n.e=[])).push(e)}else return Rn(e)}function Rn(e){return ye(yr|on,e,!1)}function Xi(e){return kn(),ye(Er|on,e,!0)}function Qi(e){ht.ensure();const t=ye(Fe,e,!0);return()=>{be(t)}}function es(e){ht.ensure();const t=ye(Fe,e,!0);return(r={})=>new Promise(n=>{r.outro?Mr(t,()=>{be(t),n(void 0)}):(be(t),n(void 0))})}function ts(e){return ye(yr,e,!1)}function Cn(e,t){var r=I,n={effect:null,ran:!1,deps:e};r.l.$.push(n),n.effect=Pr(()=>{e(),!n.ran&&(n.ran=!0,k(t))})}function In(){var e=I;Pr(()=>{for(var t of e.l.$){t.deps();var r=t.effect;(r.f&U)!==0&&Z(r,Ne),It(r)&&Ke(r),t.ran=!1}})}function rs(e){return ye(Ar|Sr,e,!0)}function Pr(e,t=0){return ye(Er|t,e,!0)}function ge(e,t=[],r=[]){Ki(t,r,n=>{ye(Er,()=>e(...n.map(p)),!0)})}function Pn(e,t=0){var r=ye(mt|t,e,!0);return r}function pt(e,t=!0){return ye(Ae,e,!0,t)}function Mn(e){var t=e.teardown;if(t!==null){const r=Xe,n=T;Vr(!0),$e(null);try{t.call(null)}finally{Vr(r),$e(n)}}}function Dn(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){const s=r.ac;s!==null&&On(()=>{s.abort(Nr)});var n=r.next;(r.f&Fe)!==0?r.parent=null:be(r,t),r=n}}function ns(e){for(var t=e.first;t!==null;){var r=t.next;(t.f&Ae)===0&&be(t),t=r}}function be(e,t=!0){var r=!1;(t||(e.f&Ti)!==0)&&e.nodes_start!==null&&e.nodes_end!==null&&(is(e.nodes_start,e.nodes_end),r=!0),Dn(e,t&&!r),Vt(e,0),Z(e,Je);var n=e.transitions;if(n!==null)for(const i of n)i.stop();Mn(e);var s=e.parent;s!==null&&s.first!==null&&Ln(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=e.ac=null}function is(e,t){for(;e!==null;){var r=e===t?null:qe(e);e.remove(),e=r}}function Ln(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 Mr(e,t){var r=[];Dr(e,r,!0),jn(r,()=>{be(e),t&&t()})}function jn(e,t){var r=e.length;if(r>0){var n=()=>--r||t();for(var s of e)s.out(n)}else t()}function Dr(e,t,r){if((e.f&ve)===0){if(e.f^=ve,e.transitions!==null)for(const l of e.transitions)(l.is_global||r)&&t.push(l);for(var n=e.first;n!==null;){var s=n.next,i=(n.f&Tr)!==0||(n.f&Ae)!==0;Dr(n,t,i?r:!1),n=s}}}function Lr(e){Fn(e,!0)}function Fn(e,t){if((e.f&ve)!==0){e.f^=ve,(e.f&U)===0&&(Z(e,fe),_t(e));for(var r=e.first;r!==null;){var n=r.next,s=(r.f&Tr)!==0||(r.f&Ae)!==0;Fn(r,s?t:!1),r=n}if(e.transitions!==null)for(const i of e.transitions)(i.is_global||t)&&i.in()}}let at=!1;function Br(e){at=e}let Xe=!1;function Vr(e){Xe=e}let T=null,we=!1;function $e(e){T=e}let x=null;function je(e){x=e}let V=null;function ss(e){T!==null&&(V===null?V=[e]:V.push(e))}let B=null,Q=0,se=null;function ls(e){se=e}let qn=1,At=0,Ge=At;function Gr(e){Ge=e}let Me=!1;function Un(){return++qn}function It(e){var h;var t=e.f;if((t&fe)!==0)return!0;if((t&Ne)!==0){var r=e.deps,n=(t&oe)!==0;if(r!==null){var s,i,l=(t&Yt)!==0,a=n&&x!==null&&!Me,o=r.length;if((l||a)&&(x===null||(x.f&Je)===0)){var f=e,c=f.parent;for(s=0;s<o;s++)i=r[s],(l||!((h=i==null?void 0:i.reactions)!=null&&h.includes(f)))&&(i.reactions??(i.reactions=[])).push(f);l&&(f.f^=Yt),a&&c!==null&&(c.f&oe)===0&&(f.f^=oe)}for(s=0;s<o;s++)if(i=r[s],It(i)&&gn(i),i.wv>e.wv)return!0}(!n||x!==null&&!Me)&&Z(e,U)}return!1}function Hn(e,t,r=!0){var n=e.reactions;if(n!==null&&!(V!=null&&V.includes(e)))for(var s=0;s<n.length;s++){var i=n[s];(i.f&te)!==0?Hn(i,t,!1):t===i&&(r?Z(i,fe):(i.f&U)!==0&&Z(i,Ne),_t(i))}}function Yn(e){var g;var t=B,r=Q,n=se,s=T,i=Me,l=V,a=I,o=we,f=Ge,c=e.f;B=null,Q=0,se=null,Me=(c&oe)!==0&&(we||!at||T===null),T=(c&(Ae|Fe))===0?e:null,V=null,zt(e.ctx),we=!1,Ge=++At,e.ac!==null&&(On(()=>{e.ac.abort(Nr)}),e.ac=null);try{e.f|=ar;var h=e.fn,d=h(),v=e.deps;if(B!==null){var u;if(Vt(e,Q),v!==null&&Q>0)for(v.length=Q+B.length,u=0;u<B.length;u++)v[Q+u]=B[u];else e.deps=v=B;if(!Me||(c&te)!==0&&e.reactions!==null)for(u=Q;u<v.length;u++)((g=v[u]).reactions??(g.reactions=[])).push(e)}else v!==null&&Q<v.length&&(Vt(e,Q),v.length=Q);if(Ct()&&se!==null&&!we&&v!==null&&(e.f&(te|Ne|fe))===0)for(u=0;u<se.length;u++)Hn(se[u],e);return s!==null&&s!==e&&(At++,se!==null&&(n===null?n=se:n.push(...se))),(e.f&Ve)!==0&&(e.f^=Ve),d}catch(m){return Ui(m)}finally{e.f^=ar,B=t,Q=r,se=n,T=s,Me=i,V=l,zt(a),we=o,Ge=f}}function as(e,t){let r=t.reactions;if(r!==null){var n=bi.call(r,e);if(n!==-1){var s=r.length-1;s===0?r=t.reactions=null:(r[n]=r[s],r.pop())}}r===null&&(t.f&te)!==0&&(B===null||!B.includes(t))&&(Z(t,Ne),(t.f&(oe|Yt))===0&&(t.f^=Yt),pn(t),Vt(t,0))}function Vt(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)as(e,r[n])}function Ke(e){var t=e.f;if((t&Je)===0){Z(e,U);var r=x,n=at;x=e,at=!0;try{(t&mt)!==0?ns(e):Dn(e),Mn(e);var s=Yn(e);e.teardown=typeof s=="function"?s:null,e.wv=qn;var i;sn&&oi&&(e.f&fe)!==0&&e.deps}finally{at=n,x=r}}}function p(e){var t=e.f,r=(t&te)!==0;if(T!==null&&!we){var n=x!==null&&(x.f&Je)!==0;if(!n&&!(V!=null&&V.includes(e))){var s=T.deps;if((T.f&ar)!==0)e.rv<At&&(e.rv=At,B===null&&s!==null&&s[Q]===e?Q++:B===null?B=[e]:(!Me||!B.includes(e))&&B.push(e));else{(T.deps??(T.deps=[])).push(e);var i=e.reactions;i===null?e.reactions=[T]:i.includes(T)||i.push(T)}}}else if(r&&e.deps===null&&e.effects===null){var l=e,a=l.parent;a!==null&&(a.f&oe)===0&&(l.f^=oe)}if(Xe){if(De.has(e))return De.get(e);if(r){l=e;var o=l.v;return((l.f&U)===0&&l.reactions!==null||zn(l))&&(o=Ir(l)),De.set(l,o),o}}else if(r){if(l=e,Pe!=null&&Pe.has(l))return Pe.get(l);It(l)&&gn(l)}if((e.f&Ve)!==0)throw e.v;return e.v}function zn(e){if(e.v===j)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(De.has(t)||(t.f&te)!==0&&zn(t))return!0;return!1}function k(e){var t=we;try{return we=!0,e()}finally{we=t}}const os=-7169;function Z(e,t){e.f=e.f&os|t}function D(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(lt in e)hr(e);else if(!Array.isArray(e))for(let t in e){const r=e[t];typeof r=="object"&&r&&lt in r&&hr(r)}}}function hr(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let n in e)try{hr(e[n],t)}catch{}const r=$r(e);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const n=ln(r);for(let s in n){const i=n[s].get;if(i)try{i.call(e)}catch{}}}}}const fs=new Set,Kr=new Set;let Wr=null;function Dt(e){var S;var t=this,r=t.ownerDocument,n=e.type,s=((S=e.composedPath)==null?void 0:S.call(e))||[],i=s[0]||e.target;Wr=e;var l=0,a=Wr===e&&e.__root;if(a){var o=s.indexOf(a);if(o!==-1&&(t===document||t===window)){e.__root=t;return}var f=s.indexOf(t);if(f===-1)return;o<=f&&(l=o)}if(i=s[l]||e.target,i!==t){vt(e,"currentTarget",{configurable:!0,get(){return i||r}});var c=T,h=x;$e(null),je(null);try{for(var d,v=[];i!==null;){var u=i.assignedSlot||i.parentNode||i.host||null;try{var g=i["__"+n];if(g!=null&&(!i.disabled||e.target===i))if(wr(g)){var[m,...y]=g;m.apply(i,[e,...y])}else g.call(i,e)}catch(N){d?v.push(N):d=N}if(e.cancelBubble||u===t||u===null)break;i=u}if(d){for(let N of v)queueMicrotask(()=>{throw N});throw d}}finally{e.__root=t,delete e.currentTarget,$e(c),je(h)}}}function us(e){var t=document.createElement("template");return t.innerHTML=e.replaceAll("<!>","<!---->"),t.content}function ot(e,t){var r=x;r.nodes_start===null&&(r.nodes_start=e,r.nodes_end=t)}function re(e,t){var r=(t&gi)!==0,n=(t&mi)!==0,s,i=!e.startsWith("<!>");return()=>{if(R)return ot(C,null),C;s===void 0&&(s=us(i?e:"<!>"+e),r||(s=Ze(s)));var l=n||En?document.importNode(s,!0):s.cloneNode(!0);if(r){var a=Ze(l),o=l.lastChild;ot(a,o)}else ot(l,l);return l}}function cs(){if(R)return ot(C,null),C;var e=document.createDocumentFragment(),t=document.createComment(""),r=Le();return e.append(t,r),ot(t,r),e}function z(e,t){if(R){x.nodes_end=C,Xt();return}e!==null&&e.before(t)}const ds=["touchstart","touchmove"];function vs(e){return ds.includes(e)}function xe(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 Bn(e,t){return Vn(e,t)}function hs(e,t){dr(),t.intro=t.intro??!1;const r=t.target,n=R,s=C;try{for(var i=Ze(r);i&&(i.nodeType!==Et||i.data!==nn);)i=qe(i);if(!i)throw st;Se(!0),he(i),Xt();const l=Vn(e,{...t,anchor:i});if(C===null||C.nodeType!==Et||C.data!==mr)throw Jt(),st;return Se(!1),l}catch(l){if(l instanceof Error&&l.message.split(`
`).some(a=>a.startsWith("https://svelte.dev/e/")))throw l;return l!==st&&console.warn("Failed to hydrate: ",l),t.recover===!1&&Pi(),dr(),An(r),Se(!1),Bn(e,t)}finally{Se(n),he(s)}}const nt=new Map;function Vn(e,{target:t,anchor:r,props:n={},events:s,context:i,intro:l=!0}){dr();var a=new Set,o=h=>{for(var d=0;d<h.length;d++){var v=h[d];if(!a.has(v)){a.add(v);var u=vs(v);t.addEventListener(v,Dt,{passive:u});var g=nt.get(v);g===void 0?(document.addEventListener(v,Dt,{passive:u}),nt.set(v,1)):nt.set(v,g+1)}}};o(br(fs)),Kr.add(o);var f=void 0,c=es(()=>{var h=r??t.appendChild(Le());return pt(()=>{if(i){Or({});var d=I;d.c=i}s&&(n.$$events=s),R&&ot(h,null),f=e(h,n)||{},R&&(x.nodes_end=C),i&&kr()}),()=>{var u;for(var d of a){t.removeEventListener(d,Dt);var v=nt.get(d);--v===0?(document.removeEventListener(d,Dt),nt.delete(d)):nt.set(d,v)}Kr.delete(o),h!==r&&((u=h.parentNode)==null||u.removeChild(h))}});return _r.set(f,c),f}let _r=new WeakMap;function _s(e,t){const r=_r.get(e);return r?(_r.delete(e),r(t)):Promise.resolve()}function Gn(e){I===null&&Ni(),gt&&I.l!==null?ps(I).m.push(e):vr(()=>{const t=k(e);if(typeof t=="function")return t})}function ps(e){var t=e.l;return t.u??(t.u={a:[],b:[],m:[]})}function Ee(e,t,r=!1){R&&Xt();var n=e,s=null,i=null,l=j,a=r?Tr:0,o=!1;const f=(v,u=!0)=>{o=!0,d(u,v)};var c=null;function h(){c!==null&&(c.lastChild.remove(),n.before(c),c=null);var v=l?s:i,u=l?i:s;v&&Lr(v),u&&Mr(u,()=>{l?i=null:s=null})}const d=(v,u)=>{if(l===(l=v))return;let g=!1;if(R){const O=cn(n)===gr;!!l===O&&(n=or(),he(n),Se(!1),g=!0)}var m=Nn(),y=n;if(m&&(c=document.createDocumentFragment(),c.append(y=Le())),l?s??(s=u&&pt(()=>u(y))):i??(i=u&&pt(()=>u(y))),m){var S=P,N=l?s:i,A=l?i:s;N&&S.skipped_effects.delete(N),A&&S.skipped_effects.add(A),S.add_callback(h)}else h();g&&Se(!0)};Pn(()=>{o=!1,t(f),o||d(null,null)},a),R&&(n=C)}function Zr(e,t){return t}function gs(e,t,r){for(var n=e.items,s=[],i=t.length,l=0;l<i;l++)Dr(t[l].e,s,!0);var a=i>0&&s.length===0&&r!==null;if(a){var o=r.parentNode;An(o),o.append(r),n.clear(),me(e,t[0].prev,t[i-1].next)}jn(s,()=>{for(var f=0;f<i;f++){var c=t[f];a||(n.delete(c.k),me(e,c.prev,c.next)),be(c.e,!a)}})}function Jr(e,t,r,n,s,i=null){var l=e,a={flags:t,items:new Map,first:null},o=(t&rn)!==0;if(o){var f=e;l=R?he(Ze(f)):f.appendChild(Le())}R&&Xt();var c=null,h=!1,d=new Map,v=Cr(()=>{var y=r();return wr(y)?y:y==null?[]:br(y)}),u,g;function m(){ms(g,u,a,d,l,s,t,n,r),i!==null&&(u.length===0?c?Lr(c):c=pt(()=>i(l)):c!==null&&Mr(c,()=>{c=null}))}Pn(()=>{g??(g=x),u=p(v);var y=u.length;if(h&&y===0)return;h=y===0;let S=!1;if(R){var N=cn(l)===gr;N!==(y===0)&&(l=or(),he(l),Se(!1),S=!0)}if(R){for(var A=null,O,w=0;w<y;w++){if(C.nodeType===Et&&C.data===mr){l=C,S=!0,Se(!1);break}var _=u[w],$=n(_,w);O=pr(C,a,A,null,_,$,w,s,t,r),a.items.set($,O),A=O}y>0&&he(or())}if(R)y===0&&i&&(c=pt(()=>i(l)));else if(Nn()){var J=new Set,M=P;for(w=0;w<y;w+=1){_=u[w],$=n(_,w);var ue=a.items.get($)??d.get($);ue?(t&(Wt|Zt))!==0&&Kn(ue,_,w,t):(O=pr(null,a,null,null,_,$,w,s,t,r,!0),d.set($,O)),J.add($)}for(const[ne,ie]of a.items)J.has(ne)||M.skipped_effects.add(ie.e);M.add_callback(m)}else m();S&&Se(!0),p(v)}),R&&(l=C)}function ms(e,t,r,n,s,i,l,a,o){var et,Pt,tt,Mt;var f=(l&ui)!==0,c=(l&(Wt|Zt))!==0,h=t.length,d=r.items,v=r.first,u=v,g,m=null,y,S=[],N=[],A,O,w,_;if(f)for(_=0;_<h;_+=1)A=t[_],O=a(A,_),w=d.get(O),w!==void 0&&((et=w.a)==null||et.measure(),(y??(y=new Set)).add(w));for(_=0;_<h;_+=1){if(A=t[_],O=a(A,_),w=d.get(O),w===void 0){var $=n.get(O);if($!==void 0){n.delete(O),d.set(O,$);var J=m?m.next:u;me(r,m,$),me(r,$,J),sr($,J,s),m=$}else{var M=u?u.e.nodes_start:s;m=pr(M,r,m,m===null?r.first:m.next,A,O,_,i,l,o)}d.set(O,m),S=[],N=[],u=m.next;continue}if(c&&Kn(w,A,_,l),(w.e.f&ve)!==0&&(Lr(w.e),f&&((Pt=w.a)==null||Pt.unfix(),(y??(y=new Set)).delete(w))),w!==u){if(g!==void 0&&g.has(w)){if(S.length<N.length){var ue=N[0],ne;m=ue.prev;var ie=S[0],E=S[S.length-1];for(ne=0;ne<S.length;ne+=1)sr(S[ne],ue,s);for(ne=0;ne<N.length;ne+=1)g.delete(N[ne]);me(r,ie.prev,E.next),me(r,m,ie),me(r,E,ue),u=ue,m=E,_-=1,S=[],N=[]}else g.delete(w),sr(w,u,s),me(r,w.prev,w.next),me(r,w,m===null?r.first:m.next),me(r,m,w),m=w;continue}for(S=[],N=[];u!==null&&u.k!==O;)(u.e.f&ve)===0&&(g??(g=new Set)).add(u),N.push(u),u=u.next;if(u===null)continue;w=u}S.push(w),m=w,u=w.next}if(u!==null||g!==void 0){for(var G=g===void 0?[]:br(g);u!==null;)(u.e.f&ve)===0&&G.push(u),u=u.next;var pe=G.length;if(pe>0){var wt=(l&rn)!==0&&h===0?s:null;if(f){for(_=0;_<pe;_+=1)(tt=G[_].a)==null||tt.measure();for(_=0;_<pe;_+=1)(Mt=G[_].a)==null||Mt.fix()}gs(r,G,wt)}}f&&Yi(()=>{var rt;if(y!==void 0)for(w of y)(rt=w.a)==null||rt.apply()}),e.first=r.first&&r.first.e,e.last=m&&m.e;for(var Qe of n.values())be(Qe.e);n.clear()}function Kn(e,t,r,n){(n&Wt)!==0&&St(e.v,t),(n&Zt)!==0?St(e.i,r):e.i=r}function pr(e,t,r,n,s,i,l,a,o,f,c){var h=(o&Wt)!==0,d=(o&ci)===0,v=h?d?tr(s,!1,!1):Tt(s):s,u=(o&Zt)===0?l:Tt(l),g={i:u,v,k:i,a:null,e:null,prev:r,next:n};try{if(e===null){var m=document.createDocumentFragment();m.append(e=Le())}return g.e=pt(()=>a(e,v,u,f),R),g.e.prev=r&&r.e,g.e.next=n&&n.e,r===null?c||(t.first=g):(r.next=g,r.e.next=g.e),n!==null&&(n.prev=g,n.e.prev=g.e),g}finally{}}function sr(e,t,r){for(var n=e.next?e.next.e.nodes_start:r,s=t?t.e.nodes_start:r,i=e.e.nodes_start;i!==null&&i!==n;){var l=qe(i);s.before(i),i=l}}function me(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 Wn(e,t){ts(()=>{var r=e.getRootNode(),n=r.host?r:r.head??r.ownerDocument.head;if(!n.querySelector("#"+t.hash)){const s=document.createElement("style");s.id=t.hash,s.textContent=t.code,n.appendChild(s)}})}const Xr=[...`
\r\f \v\uFEFF`];function ws(e,t,r){var n=""+e;if(r){for(var s in r)if(r[s])n=n?n+" "+s:s;else if(n.length)for(var i=s.length,l=0;(l=n.indexOf(s,l))>=0;){var a=l+i;(l===0||Xr.includes(n[l-1]))&&(a===n.length||Xr.includes(n[a]))?n=(l===0?"":n.substring(0,l))+n.substring(a+1):l=a}}return n===""?null:n}function bs(e,t){return e==null?null:String(e)}function $s(e,t,r,n,s,i){var l=e.__className;if(R||l!==r||l===void 0){var a=ws(r,n,i);(!R||a!==e.getAttribute("class"))&&(a==null?e.removeAttribute("class"):e.className=a),e.__className=r}else if(i&&s!==i)for(var o in i){var f=!!i[o];(s==null||f!==!!s[o])&&e.classList.toggle(o,f)}return i}function Zn(e,t,r,n){var s=e.__style;if(R||s!==t){var i=bs(t);(!R||i!==e.getAttribute("style"))&&(i==null?e.removeAttribute("style"):e.style.cssText=i),e.__style=t}return n}const ys=Symbol("is custom element"),Es=Symbol("is html");function le(e,t,r,n){var s=xs(e);R&&(s[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName==="LINK")||s[t]!==(s[t]=r)&&(t==="loading"&&(e[Si]=r),r==null?e.removeAttribute(t):typeof r!="string"&&Ts(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function xs(e){return e.__attributes??(e.__attributes={[ys]:e.nodeName.includes("-"),[Es]:e.namespaceURI===wi})}var Qr=new Map;function Ts(e){var t=Qr.get(e.nodeName);if(t)return t;Qr.set(e.nodeName,t=[]);for(var r,n=e,s=Element.prototype;s!==n;){r=ln(n);for(var i in r)r[i].set&&t.push(i);n=$r(n)}return t}function Jn(e=!1){const t=I,r=t.l.u;if(!r)return;let n=()=>D(t.s);if(e){let s=0,i={};const l=Qt(()=>{let a=!1;const o=t.s;for(const f in o)o[f]!==i[f]&&(i[f]=o[f],a=!0);return a&&s++,s});n=()=>p(l)}r.b.length&&Xi(()=>{en(t,n),Ht(r.b)}),vr(()=>{const s=k(()=>r.m.map(Ei));return()=>{for(const i of s)typeof i=="function"&&i()}}),r.a.length&&vr(()=>{en(t,n),Ht(r.a)})}function en(e,t){if(e.l.s)for(const r of e.l.s)p(r);t()}let Lt=!1;function Ss(e){var t=Lt;try{return Lt=!1,[e(),Lt]}finally{Lt=t}}function W(e,t,r,n){var N;var s=!gt||(r&vi)!==0,i=(r&_i)!==0,l=(r&pi)!==0,a=n,o=!0,f=()=>(o&&(o=!1,a=l?k(n):n),a),c;if(i){var h=lt in e||fn in e;c=((N=Be(e,t))==null?void 0:N.set)??(h&&t in e?A=>e[t]=A:void 0)}var d,v=!1;i?[d,v]=Ss(()=>e[t]):d=e[t],d===void 0&&n!==void 0&&(d=f(),c&&(s&&Mi(),c(d)));var u;if(s?u=()=>{var A=e[t];return A===void 0?f():(o=!0,A)}:u=()=>{var A=e[t];return A!==void 0&&(a=void 0),A===void 0?a:A},s&&(r&hi)===0)return u;if(c){var g=e.$$legacy;return(function(A,O){return arguments.length>0?((!s||!O||g||v)&&c(O?u():A),A):u()})}var m=!1,y=((r&di)!==0?Qt:Cr)(()=>(m=!1,u()));i&&p(y);var S=x;return(function(A,O){if(arguments.length>0){const w=O?p(y):s&&i?it(A):A;return ee(y,w),m=!0,a!==void 0&&(a=w),A}return Xe&&m||(S.f&Je)!==0?y.v:p(y)})}function As(e){return new Ns(e)}var Te,ae;class Ns{constructor(t){q(this,Te);q(this,ae);var i;var r=new Map,n=(l,a)=>{var o=tr(a,!1,!1);return r.set(l,o),o};const s=new Proxy({...t.props||{},$$events:{}},{get(l,a){return p(r.get(a)??n(a,Reflect.get(l,a)))},has(l,a){return a===fn?!0:(p(r.get(a)??n(a,Reflect.get(l,a))),Reflect.has(l,a))},set(l,a,o){return ee(r.get(a)??n(a,o),o),Reflect.set(l,a,o)}});K(this,ae,(t.hydrate?hs:Bn)(t.component,{target:t.target,anchor:t.anchor,props:s,context:t.context,intro:t.intro??!1,recover:t.recover})),(!((i=t==null?void 0:t.props)!=null&&i.$$host)||t.sync===!1)&&Y(),K(this,Te,s.$$events);for(const l of Object.keys(b(this,ae)))l==="$set"||l==="$destroy"||l==="$on"||vt(this,l,{get(){return b(this,ae)[l]},set(a){b(this,ae)[l]=a},enumerable:!0});b(this,ae).$set=l=>{Object.assign(s,l)},b(this,ae).$destroy=()=>{_s(b(this,ae))}}$set(t){b(this,ae).$set(t)}$on(t,r){b(this,Te)[t]=b(this,Te)[t]||[];const n=(...s)=>r.call(this,...s);return b(this,Te)[t].push(n),()=>{b(this,Te)[t]=b(this,Te)[t].filter(s=>s!==n)}}$destroy(){b(this,ae).$destroy()}}Te=new WeakMap,ae=new WeakMap;let Xn;typeof HTMLElement=="function"&&(Xn=class extends HTMLElement{constructor(t,r,n){super();H(this,"$$ctor");H(this,"$$s");H(this,"$$c");H(this,"$$cn",!1);H(this,"$$d",{});H(this,"$$r",!1);H(this,"$$p_d",{});H(this,"$$l",{});H(this,"$$l_u",new Map);H(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 s=this.$$c.$on(t,r);this.$$l_u.set(r,s)}super.addEventListener(t,r,n)}removeEventListener(t,r,n){if(super.removeEventListener(t,r,n),this.$$c){const s=this.$$l_u.get(r);s&&(s(),this.$$l_u.delete(r))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let r=function(i){return l=>{const a=document.createElement("slot");i!=="default"&&(a.name=i),z(l,a)}};var t=r;if(await Promise.resolve(),!this.$$cn||this.$$c)return;const n={},s=Os(this);for(const i of this.$$s)i in s&&(i==="default"&&!this.$$d.children?(this.$$d.children=r(i),n.default=!0):n[i]=r(i));for(const i of this.attributes){const l=this.$$g_p(i.name);l in this.$$d||(this.$$d[l]=qt(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=As({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:n,$$host:this}}),this.$$me=Qi(()=>{Pr(()=>{var i;this.$$r=!0;for(const l of Ut(this.$$c)){if(!((i=this.$$p_d[l])!=null&&i.reflect))continue;this.$$d[l]=this.$$c[l];const a=qt(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 s;this.$$r||(t=this.$$g_p(t),this.$$d[t]=qt(t,n,this.$$p_d,"toProp"),(s=this.$$c)==null||s.$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 Ut(this.$$p_d).find(r=>this.$$p_d[r].attribute===t||!this.$$p_d[r].attribute&&r.toLowerCase()===t)||t}});function qt(e,t,r,n){var i;const s=(i=r[e])==null?void 0:i.type;if(t=s==="Boolean"&&typeof t!="boolean"?t!=null:t,!n||!r[e])return t;if(n==="toAttribute")switch(s){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(s){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function Os(e){const t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}function Qn(e,t,r,n,s,i){let l=class extends Xn{constructor(){super(e,r,s),this.$$p_d=t}static get observedAttributes(){return Ut(t).map(a=>(t[a].attribute||a).toLowerCase())}};return Ut(t).forEach(a=>{vt(l.prototype,a,{get(){return this.$$c&&a in this.$$c?this.$$c[a]:this.$$d[a]},set(o){var h;o=qt(a,o,t),this.$$d[a]=o;var f=this.$$c;if(f){var c=(h=Be(f,a))==null?void 0:h.get;c?f[a]=o:f.$set({[a]:o})}}})}),n.forEach(a=>{vt(l.prototype,a,{get(){var o;return(o=this.$$c)==null?void 0:o[a]}})}),e.element=l,l}function lr(e,t="long",r=!1,n=!1){const s=t==="long"?{weekday:"long",month:"long",day:"numeric",...n&&{year:"numeric"},hour:"2-digit",minute:"2-digit",...r&&{timeZoneName:"short"}}:{hour:"2-digit",minute:"2-digit"};return new Date(e*1e3).toLocaleString(void 0,s)}function Gt(e,t=!1){const r=e.ap_id||e.place.name==="online";return e.multidate?lr(e.start_datetime,"long",r,t)+" - "+lr(e.end_datetime,"long",r,t):lr(e.start_datetime,"long",r,t)}var ks=re('<link rel="stylesheet"/>'),Rs=re('<a target="_blank" id="header" class="svelte-1ap5437"><div class="content svelte-1ap5437"><div class="title svelte-1ap5437"> </div> <img id="logo" alt="logo" class="svelte-1ap5437"/></div></a>'),Cs=re('<img loading="lazy" class="svelte-1ap5437"/>'),Is=re('<img style="aspect-ratio=1.7778;" loading="lazy" class="svelte-1ap5437"/>'),Ps=re('<div class="img svelte-1ap5437"><!></div>'),Ms=re('<span class="subtitle svelte-1ap5437"> </span>'),Ds=re('<span class="tag svelte-1ap5437"> </span>'),Ls=re('<div class="tags svelte-1ap5437"></div>'),js=re('<a class="event svelte-1ap5437" target="_blank"><!> <div class="content svelte-1ap5437"><div class="subtitle svelte-1ap5437"> </div> <div class="title svelte-1ap5437"> </div> <span class="place svelte-1ap5437"> <!></span> <!></div></a>'),Fs=re('<div id="gancioEvents"><!> <!></div>'),qs=re("<!> <!>",1);const Us={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 Hs(e,t){Or(t,!1),Wn(e,Us);let r=W(t,"baseurl",12,""),n=W(t,"title",12,""),s=W(t,"maxlength",12,!1),i=W(t,"past",12,!1),l=W(t,"collection",12,""),a=W(t,"tags",12,""),o=W(t,"places",12,""),f=W(t,"theme",12,"light"),c=W(t,"show_recurrent",12,!1),h=W(t,"sidebar",12,"true"),d=W(t,"external_style",12,""),v=W(t,"addYear",28,()=>i()&&!0),u=!1,g=tr([]);function m(_){if(!u)return;const $=[];s()&&!i()&&$.push(`max=${s()}`);let J="/api/events";if(l()?J=`/feed/json/collection/${l()}`:(a()&&$.push(`tags=${a()}`),o()&&$.push(`places=${o()}`)),$.push(`show_recurrent=${c()?"true":"false"}`),i()){let M=Math.floor(new Date().getTime()/1e3),ue=i()==="true"?1:i();$.push(`start=${ue}`),$.push(`end=${M}`)}fetch(`${r()}${J}?${$.join("&")}`).then(M=>M.json()).then(M=>{ee(g,M.events||M),i()&&(ee(g,p(g).reverse()),s()&&ee(g,p(g).slice(0,s())))}).catch(M=>{console.error("Error loading Gancio API -> ",M)})}function y(_){if(_.media&&_.media[0].focalpoint){const $=_.media[0].focalpoint;return`${($[0]+1)*50}% ${($[1]+1)*50}%`}return"center center"}Gn(()=>{u=!0,m()}),Cn(()=>(D(s()),D(n()),D(o()),D(a()),D(f()),D(c()),D(h()),D(r()),D(l()),D(i()),D(v())),()=>{m(s()&&n()&&o()&&a()&&f()&&c()&&h()&&r()&&l()&&i()&&v())}),In(),Jn();var S=qs(),N=Sn(S);{var A=_=>{var $=ks();ge(()=>le($,"href",d())),z(_,$)};Ee(N,_=>{d()&&_(A)})}var O=de(N,2);{var w=_=>{var $=Fs();let J;var M=F($);{var ue=ie=>{var E=Rs(),G=F(E),pe=F(G),wt=F(pe,!0);L(pe);var Qe=de(pe,2);L(G),L(E),ge(()=>{le(E,"href",r()),xe(wt,n()),le(Qe,"src",`${r()??""}/logo.png`)}),z(ie,E)};Ee(M,ie=>{n()&&h()==="true"&&ie(ue)})}var ne=de(M,2);Jr(ne,1,()=>p(g),Zr,(ie,E)=>{var G=js(),pe=F(G);{var wt=X=>{var ce=Ps(),bt=F(ce);{var rr=Oe=>{var ke=Cs();ge(ii=>{Zn(ke,`object-position: ${ii??""}; aspect-ratio=1.7778;`),le(ke,"alt",(p(E),k(()=>p(E).media[0].name))),le(ke,"src",(D(r()),p(E),k(()=>r()+"/media/thumb/"+p(E).media[0].url)))},[()=>(p(E),k(()=>y(p(E))))]),z(Oe,ke)},$t=Oe=>{var ke=Is();ge(()=>{le(ke,"alt",(p(E),k(()=>p(E).title))),le(ke,"src",r()+"/fallbackimage.png")}),z(Oe,ke)};Ee(bt,Oe=>{p(E),k(()=>p(E).media.length)?Oe(rr):Oe($t,!1)})}L(ce),z(X,ce)};Ee(pe,X=>{h()!=="true"&&X(wt)})}var Qe=de(pe,2),et=F(Qe),Pt=F(et,!0);L(et);var tt=de(et,2),Mt=F(tt,!0);L(tt);var rt=de(tt,2),jr=F(rt),ei=de(jr);{var ti=X=>{var ce=Ms(),bt=F(ce,!0);L(ce),ge(()=>xe(bt,(p(E),k(()=>p(E).place.address)))),z(X,ce)};Ee(ei,X=>{p(E),k(()=>p(E).place.name!=="online")&&X(ti)})}L(rt);var ri=de(rt,2);{var ni=X=>{var ce=Ls();Jr(ce,5,()=>(p(E),k(()=>p(E).tags)),Zr,(bt,rr)=>{var $t=Ds(),Oe=F($t);L($t),ge(()=>xe(Oe,`#${p(rr)??""}`)),z(bt,$t)}),L(ce),z(X,ce)};Ee(ri,X=>{p(E),k(()=>p(E).tags.length)&&X(ni)})}L(Qe),L(G),ge(X=>{le(G,"href",`${r()??""}/event/${p(E),k(()=>p(E).slug||p(E).id)??""}`),le(G,"title",(p(E),k(()=>p(E).title))),xe(Pt,X),xe(Mt,(p(E),k(()=>p(E).title))),xe(jr,`@${p(E),k(()=>p(E).place.name)??""} `)},[()=>(D(Gt),p(E),D(v()),k(()=>Gt(p(E),v())))]),z(ie,G)}),L($),ge(ie=>J=$s($,1,"svelte-1ap5437",null,J,ie),[()=>({dark:f()==="dark",light:f()==="light",sidebar:h()==="true",nosidebar:h()!=="true"})]),z(_,$)};Ee(O,_=>{p(g),k(()=>p(g).length)&&_(w)})}return z(e,S),kr({get baseurl(){return r()},set baseurl(_){r(_),Y()},get title(){return n()},set title(_){n(_),Y()},get maxlength(){return s()},set maxlength(_){s(_),Y()},get past(){return i()},set past(_){i(_),Y()},get collection(){return l()},set collection(_){l(_),Y()},get tags(){return a()},set tags(_){a(_),Y()},get places(){return o()},set places(_){o(_),Y()},get theme(){return f()},set theme(_){f(_),Y()},get show_recurrent(){return c()},set show_recurrent(_){c(_),Y()},get sidebar(){return h()},set sidebar(_){h(_),Y()},get external_style(){return d()},set external_style(_){d(_),Y()},get addYear(){return v()},set addYear(_){v(_),Y()}})}customElements.define("gancio-events",Qn(Hs,{baseurl:{},title:{},maxlength:{},past:{},collection:{},tags:{},places:{},theme:{},show_recurrent:{},sidebar:{},external_style:{},addYear:{}},[],[],!0));var Ys=re('<img class="svelte-rjo5bi"/>'),zs=re('<a class="card svelte-rjo5bi" target="_blank"><!> <div class="container svelte-rjo5bi"><strong> </strong> <div> </div> <div class="place svelte-rjo5bi"> </div></div></a>');const Bs={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 Vs(e,t){Or(t,!1),Wn(e,Bs);let r=W(t,"baseurl",12,"https://demo.gancio.org"),n=W(t,"id",12),s=!1,i=tr();function l(d,v){s&&fetch(`${v}/api/event/detail/${d}`).then(u=>u.json()).then(u=>ee(i,u))}Gn(()=>{s=!0,l(n(),r())});function a(d){return`${r()}/media/thumb/${d.media[0].url}`}function o(d){if(d.media[0].focalpoint){const v=d.media[0].focalpoint;return`${(v[0]+1)*50}% ${(v[1]+1)*50}%`}return"center center"}Cn(()=>(D(n()),D(r())),()=>{l(n(),r())}),In(),Jn();var f=cs(),c=Sn(f);{var h=d=>{var v=zs(),u=F(v);{var g=_=>{var $=Ys();ge((J,M)=>{le($,"src",J),le($,"alt",(p(i),k(()=>p(i).media[0].name))),Zn($,`object-position: ${M??""}; aspect-ratio=1.7778;`)},[()=>(p(i),k(()=>a(p(i)))),()=>(p(i),k(()=>o(p(i))))]),z(_,$)};Ee(u,_=>{p(i),k(()=>{var $;return($=p(i).media)==null?void 0:$.length})&&_(g)})}var m=de(u,2),y=F(m),S=F(y,!0);L(y);var N=de(y,2),A=F(N,!0);L(N);var O=de(N,2),w=F(O);L(O),L(m),L(v),ge(_=>{le(v,"href",`${r()??""}/event/${p(i),k(()=>p(i).slug||p(i).id)??""}`),xe(S,(p(i),k(()=>p(i).title))),xe(A,_),xe(w,`@${p(i),k(()=>p(i).place.name)??""}`)},[()=>(D(Gt),p(i),k(()=>Gt(p(i))))]),z(d,v)};Ee(c,d=>{p(i)&&d(h)})}return z(e,f),kr({get baseurl(){return r()},set baseurl(d){r(d),Y()},get id(){return n()},set id(d){n(d),Y()}})}customElements.define("gancio-event",Qn(Vs,{baseurl:{},id:{}},[],[],!0));