@arenarium/maps 1.2.0 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.cjs.js +1 -1
- package/dist/main.d.ts +35 -19
- package/dist/main.es.js +1736 -1656
- package/dist/main.umd.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +5 -5
package/dist/main.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(ne,Xe){typeof exports=="object"&&typeof module<"u"?Xe(exports):typeof define=="function"&&define.amd?define(["exports"],Xe):(ne=typeof globalThis<"u"?globalThis:ne||self,Xe(ne.ArenariumMaps={}))})(this,(function(ne){"use strict";var Xt=Array.isArray,ir=Array.prototype.indexOf,sr=Array.from,ht=Object.defineProperty,Oe=Object.getOwnPropertyDescriptor,or=Object.prototype,ar=Array.prototype,lr=Object.getPrototypeOf,Wt=Object.isExtensible;function ur(t){for(var e=0;e<t.length;e++)t[e]()}function fr(){var t,e,n=new Promise((r,i)=>{t=r,e=i});return{promise:n,resolve:t,reject:e}}const I=2,pt=4,Gt=8,ge=16,re=32,ce=64,dt=128,N=256,We=512,C=1024,V=2048,ie=4096,_e=8192,we=16384,vt=32768,Kt=65536,Jt=1<<17,cr=1<<18,be=1<<19,hr=1<<20,mt=1<<21,yt=1<<22,he=1<<23,Ge=Symbol("$state"),gt=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"};function pr(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function dr(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function vr(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function mr(t){throw new Error("https://svelte.dev/e/effect_orphan")}function yr(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function gr(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function _r(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function wr(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function br(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const Er=2,M=Symbol();function kr(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function Qt(t){return t===this.v}let $i=!1,j=null;function Ee(t){j=t}function _t(t,e=!1,n){j={p:j,c:null,e:null,s:t,x:null,l:null}}function wt(t){var e=j,n=e.e;if(n!==null){e.e=null;for(var r of n)dn(r)}return t!==void 0&&(e.x=t),j=e.p,t??{}}function $t(){return!0}let ke=[];function Mr(){var t=ke;ke=[],ur(t)}function Ke(t){if(ke.length===0){var e=ke;queueMicrotask(()=>{e===ke&&Mr()})}ke.push(t)}const xr=new WeakMap;function en(t){var e=m;if(e===null)return v.f|=he,t;if((e.f&vt)===0){if((e.f&dt)===0)throw!e.parent&&t instanceof Error&&tn(t),t;e.b.error(t)}else Me(t,e)}function Me(t,e){for(;e!==null;){if((e.f&dt)!==0)try{e.b.error(t);return}catch(n){t=n}e=e.parent}throw t instanceof Error&&tn(t),t}function tn(t){const e=xr.get(t);e&&(ht(t,"message",{value:e.message}),ht(t,"stack",{value:e.stack}))}const bt=new Set;let S=null,Et=new Set,Fe=[],kt=null,Mt=!1;class ${current=new Map;#e=new Map;#t=new Set;#a=0;#r=null;#c=!1;#o=[];#i=[];#n=[];#s=[];#l=[];#h=[];#f=[];skipped_effects=new Set;process(e){Fe=[];for(const i of e)this.#p(i);if(this.#o.length===0&&this.#a===0){this.#d();var n=this.#n,r=this.#s;this.#n=[],this.#s=[],this.#l=[],S=null,nn(n),nn(r),S===null?S=this:bt.delete(this),this.#r?.resolve()}else this.#u(this.#n),this.#u(this.#s),this.#u(this.#l);for(const i of this.#o)Se(i);for(const i of this.#i)Se(i);this.#o=[],this.#i=[]}#p(e){e.f^=C;for(var n=e.first;n!==null;){var r=n.f,i=(r&(re|ce))!==0,s=i&&(r&C)!==0,o=s||(r&_e)!==0||this.skipped_effects.has(n);if(!o&&n.fn!==null){if(i)n.f^=C;else if((r&pt)!==0)this.#s.push(n);else if((r&C)===0)if((r&yt)!==0){var a=n.b?.is_pending()?this.#i:this.#o;a.push(n)}else et(n)&&((n.f&ge)!==0&&this.#l.push(n),Se(n));var l=n.first;if(l!==null){n=l;continue}}var u=n.parent;for(n=n.next;n===null&&u!==null;)n=u.next,u=u.parent}}#u(e){for(const n of e)((n.f&V)!==0?this.#h:this.#f).push(n),B(n,C);e.length=0}capture(e,n){this.#e.has(e)||this.#e.set(e,n),this.current.set(e,e.v)}activate(){S=this}deactivate(){S=null;for(const e of Et)if(Et.delete(e),e(),S!==null)break}neuter(){this.#c=!0}flush(){Fe.length>0?Pr():this.#d(),S===this&&(this.#a===0&&bt.delete(this),this.deactivate())}#d(){if(!this.#c)for(const e of this.#t)e();this.#t.clear()}increment(){this.#a+=1}decrement(){if(this.#a-=1,this.#a===0){for(const e of this.#h)B(e,V),Re(e);for(const e of this.#f)B(e,ie),Re(e);this.#n=[],this.#s=[],this.flush()}else this.deactivate()}add_callback(e){this.#t.add(e)}settled(){return(this.#r??=fr()).promise}static ensure(){if(S===null){const e=S=new $;bt.add(S),$.enqueue(()=>{S===e&&e.flush()})}return S}static enqueue(e){Ke(e)}}function Pr(){var t=xe;Mt=!0;try{var e=0;for(wn(!0);Fe.length>0;){var n=$.ensure();if(e++>1e3){var r,i;Sr()}n.process(Fe),se.clear()}}finally{Mt=!1,wn(t),kt=null}}function Sr(){try{yr()}catch(t){Me(t,kt)}}let pe=null;function nn(t){var e=t.length;if(e!==0){for(var n=0;n<e;){var r=t[n++];if((r.f&(we|_e))===0&&et(r)&&(pe=[],Se(r),r.deps===null&&r.first===null&&r.nodes_start===null&&(r.teardown===null&&r.ac===null?gn(r):r.fn=null),pe?.length>0)){se.clear();for(const i of pe)Se(i);pe=[]}}pe=null}}function Re(t){for(var e=kt=t;e.parent!==null;){e=e.parent;var n=e.f;if(Mt&&e===m&&(n&ge)!==0)return;if((n&(ce|re))!==0){if((n&C)===0)return;e.f^=C}}Fe.push(e)}function Ar(t){let e=0,n=Je(0),r;return()=>{qr()&&(_(n),At(()=>(e===0&&(r=An(()=>t(()=>Ne(n)))),e+=1,()=>{Ke(()=>{e-=1,e===0&&(r?.(),r=void 0,Ne(n))})})))}}var Dr=Kt|be|dt;function Cr(t,e,n){new Tr(t,e,n)}class Tr{parent;#e=!1;#t;#a=null;#r;#c;#o;#i=null;#n=null;#s=null;#l=null;#h=0;#f=0;#p=!1;#u=null;#d=()=>{this.#u&&Qe(this.#u,this.#h)};#g=Ar(()=>(this.#u=Je(this.#h),()=>{this.#u=null}));constructor(e,n,r){this.#t=e,this.#r=n,this.#c=r,this.parent=m.b,this.#e=!!this.#r.pending,this.#o=Xr(()=>{m.b=this;{try{this.#i=de(()=>r(this.#t))}catch(i){this.error(i)}this.#f>0?this.#m():this.#e=!1}},Dr)}#_(){try{this.#i=de(()=>this.#c(this.#t))}catch(e){this.error(e)}this.#e=!1}#w(){const e=this.#r.pending;e&&(this.#n=de(()=>e(this.#t)),$.enqueue(()=>{this.#i=this.#v(()=>($.ensure(),de(()=>this.#c(this.#t)))),this.#f>0?this.#m():($e(this.#n,()=>{this.#n=null}),this.#e=!1)}))}is_pending(){return this.#e||!!this.parent&&this.parent.is_pending()}has_pending_snippet(){return!!this.#r.pending}#v(e){var n=m,r=v,i=j;G(this.#o),T(this.#o),Ee(this.#o.ctx);try{return e()}catch(s){return en(s),null}finally{G(n),T(r),Ee(i)}}#m(){const e=this.#r.pending;this.#i!==null&&(this.#l=document.createDocumentFragment(),Lr(this.#i,this.#l)),this.#n===null&&(this.#n=de(()=>e(this.#t)))}#y(e){if(!this.has_pending_snippet()){this.parent&&this.parent.#y(e);return}this.#f+=e,this.#f===0&&(this.#e=!1,this.#n&&$e(this.#n,()=>{this.#n=null}),this.#l&&(this.#t.before(this.#l),this.#l=null))}update_pending_count(e){this.#y(e),this.#h+=e,Et.add(this.#d)}get_effect_pending(){return this.#g(),_(this.#u)}error(e){var n=this.#r.onerror;let r=this.#r.failed;if(this.#p||!n&&!r)throw e;this.#i&&(W(this.#i),this.#i=null),this.#n&&(W(this.#n),this.#n=null),this.#s&&(W(this.#s),this.#s=null);var i=!1,s=!1;const o=()=>{if(i){kr();return}i=!0,s&&br(),$.ensure(),this.#h=0,this.#s!==null&&$e(this.#s,()=>{this.#s=null}),this.#e=this.has_pending_snippet(),this.#i=this.#v(()=>(this.#p=!1,de(()=>this.#c(this.#t)))),this.#f>0?this.#m():this.#e=!1};var a=v;try{T(null),s=!0,n?.(e,o),s=!1}catch(l){Me(l,this.#o&&this.#o.parent)}finally{T(a)}r&&Ke(()=>{this.#s=this.#v(()=>{this.#p=!0;try{return de(()=>{r(this.#t,()=>e,()=>o)})}catch(l){return Me(l,this.#o.parent),null}finally{this.#p=!1}})})}}function Lr(t,e){for(var n=t.nodes_start,r=t.nodes_end;n!==null;){var i=n===r?null:Pt(n);e.append(n),n=i}}function Ir(t,e,n){const r=Fr;if(e.length===0){n(t.map(r));return}var i=S,s=m,o=Or();Promise.all(e.map(a=>Rr(a))).then(a=>{i?.activate(),o();try{n([...t.map(r),...a])}catch(l){(s.f&we)===0&&Me(l,s)}i?.deactivate(),rn()}).catch(a=>{Me(a,s)})}function Or(){var t=m,e=v,n=j,r=S;return function(){G(t),T(e),Ee(n),r?.activate()}}function rn(){G(null),T(null),Ee(null)}function Fr(t){var e=I|V,n=v!==null&&(v.f&I)!==0?v:null;return m===null||n!==null&&(n.f&N)!==0?e|=N:m.f|=be,{ctx:j,deps:null,effects:null,equals:Qt,f:e,fn:t,reactions:null,rv:0,v:M,wv:0,parent:n??m,ac:null}}function Rr(t,e){let n=m;n===null&&pr();var r=n.b,i=void 0,s=Je(M),o=null,a=!v;return Vr(()=>{try{var l=t();o&&Promise.resolve(l).catch(()=>{})}catch(c){l=Promise.reject(c)}var u=()=>l;i=o?.then(u,u)??Promise.resolve(l),o=i;var f=S,h=r.is_pending();a&&(r.update_pending_count(1),h||f.increment());const p=(c,d=void 0)=>{o=null,h||f.activate(),d?d!==gt&&(s.f|=he,Qe(s,d)):((s.f&he)!==0&&(s.f^=he),Qe(s,c)),a&&(r.update_pending_count(-1),h||f.decrement()),rn()};if(i.then(p,c=>p(null,c||"unknown")),f)return()=>{queueMicrotask(()=>f.neuter())}}),new Promise(l=>{function u(f){function h(){f===i?l(s):u(i)}f.then(h,h)}u(i)})}function sn(t){var e=t.effects;if(e!==null){t.effects=null;for(var n=0;n<e.length;n+=1)W(e[n])}}function Nr(t){for(var e=t.parent;e!==null;){if((e.f&I)===0)return e;e=e.parent}return null}function xt(t){var e,n=m;G(Nr(t));try{sn(t),e=Pn(t)}finally{G(n)}return e}function on(t){var e=xt(t);if(t.equals(e)||(t.v=e,t.wv=Mn()),!Pe){var n=(ae||(t.f&N)!==0)&&t.deps!==null?ie:C;B(t,n)}}const se=new Map;function Je(t,e){var n={f:0,v:t,reactions:null,equals:Qt,rv:0,wv:0};return n}function A(t,e){const n=Je(t);return Jr(n),n}function x(t,e,n=!1){v!==null&&(!H||(v.f&Jt)!==0)&&$t()&&(v.f&(I|ge|yt|Jt))!==0&&!ee?.includes(t)&&wr();let r=n?je(e):e;return Qe(t,r)}function Qe(t,e){if(!t.equals(e)){var n=t.v;Pe?se.set(t,e):se.set(t,n),t.v=e;var r=$.ensure();r.capture(t,n),(t.f&I)!==0&&((t.f&V)!==0&&xt(t),B(t,(t.f&N)===0?C:ie)),t.wv=Mn(),an(t,V),m!==null&&(m.f&C)!==0&&(m.f&(re|ce))===0&&(z===null?Qr([t]):z.push(t))}return e}function Ne(t){x(t,t.v+1)}function an(t,e){var n=t.reactions;if(n!==null)for(var r=n.length,i=0;i<r;i++){var s=n[i],o=s.f,a=(o&V)===0;a&&B(s,e),(o&I)!==0?an(s,ie):a&&((o&ge)!==0&&pe!==null&&pe.push(s),Re(s))}}function je(t){if(typeof t!="object"||t===null||Ge in t)return t;const e=lr(t);if(e!==or&&e!==ar)return t;var n=new Map,r=Xt(t),i=A(0),s=ve,o=a=>{if(ve===s)return a();var l=v,u=ve;T(null),kn(s);var f=a();return T(l),kn(u),f};return r&&n.set("length",A(t.length)),new Proxy(t,{defineProperty(a,l,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&gr();var f=n.get(l);return f===void 0?f=o(()=>{var h=A(u.value);return n.set(l,h),h}):x(f,u.value,!0),!0},deleteProperty(a,l){var u=n.get(l);if(u===void 0){if(l in a){const f=o(()=>A(M));n.set(l,f),Ne(i)}}else x(u,M),Ne(i);return!0},get(a,l,u){if(l===Ge)return t;var f=n.get(l),h=l in a;if(f===void 0&&(!h||Oe(a,l)?.writable)&&(f=o(()=>{var c=je(h?a[l]:M),d=A(c);return d}),n.set(l,f)),f!==void 0){var p=_(f);return p===M?void 0:p}return Reflect.get(a,l,u)},getOwnPropertyDescriptor(a,l){var u=Reflect.getOwnPropertyDescriptor(a,l);if(u&&"value"in u){var f=n.get(l);f&&(u.value=_(f))}else if(u===void 0){var h=n.get(l),p=h?.v;if(h!==void 0&&p!==M)return{enumerable:!0,configurable:!0,value:p,writable:!0}}return u},has(a,l){if(l===Ge)return!0;var u=n.get(l),f=u!==void 0&&u.v!==M||Reflect.has(a,l);if(u!==void 0||m!==null&&(!f||Oe(a,l)?.writable)){u===void 0&&(u=o(()=>{var p=f?je(a[l]):M,c=A(p);return c}),n.set(l,u));var h=_(u);if(h===M)return!1}return f},set(a,l,u,f){var h=n.get(l),p=l in a;if(r&&l==="length")for(var c=u;c<h.v;c+=1){var d=n.get(c+"");d!==void 0?x(d,M):c in a&&(d=o(()=>A(M)),n.set(c+"",d))}if(h===void 0)(!p||Oe(a,l)?.writable)&&(h=o(()=>A(void 0)),x(h,je(u)),n.set(l,h));else{p=h.v!==M;var k=o(()=>je(u));x(h,k)}var R=Reflect.getOwnPropertyDescriptor(a,l);if(R?.set&&R.set.call(f,u),!p){if(r&&typeof l=="string"){var Q=n.get("length"),b=Number(l);Number.isInteger(b)&&b>=Q.v&&x(Q,b+1)}Ne(i)}return!0},ownKeys(a){_(i);var l=Reflect.ownKeys(a).filter(h=>{var p=n.get(h);return p===void 0||p.v!==M});for(var[u,f]of n)f.v!==M&&!(u in a)&&l.push(u);return l},setPrototypeOf(){_r()}})}var ln,un,fn,cn;function jr(){if(ln===void 0){ln=window,un=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,n=Text.prototype;fn=Oe(e,"firstChild").get,cn=Oe(e,"nextSibling").get,Wt(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),Wt(n)&&(n.__t=void 0)}}function zr(t=""){return document.createTextNode(t)}function hn(t){return fn.call(t)}function Pt(t){return cn.call(t)}function St(t,e){return hn(t)}function Br(t,e=1,n=!1){let r=t;for(;e--;)r=Pt(r);return r}function pn(t){var e=v,n=m;T(null),G(null);try{return t()}finally{T(e),G(n)}}function Ur(t){m===null&&v===null&&mr(),v!==null&&(v.f&N)!==0&&m===null&&vr(),Pe&&dr()}function Zr(t,e){var n=e.last;n===null?e.last=e.first=t:(n.next=t,t.prev=n,e.last=t)}function oe(t,e,n,r=!0){var i=m;i!==null&&(i.f&_e)!==0&&(t|=_e);var s={ctx:j,deps:null,nodes_start:null,nodes_end:null,f:t|V,first:null,fn:e,last:null,next:null,parent:i,b:i&&i.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(n)try{Se(s),s.f|=vt}catch(l){throw W(s),l}else e!==null&&Re(s);if(r){var o=s;if(n&&o.deps===null&&o.teardown===null&&o.nodes_start===null&&o.first===o.last&&(o.f&be)===0&&(o=o.first),o!==null&&(o.parent=i,i!==null&&Zr(o,i),v!==null&&(v.f&I)!==0&&(t&ce)===0)){var a=v;(a.effects??=[]).push(o)}}return s}function qr(){return v!==null&&!H}function X(t){Ur();var e=m.f,n=!v&&(e&re)!==0&&(e&vt)===0;if(n){var r=j;(r.e??=[]).push(t)}else return dn(t)}function dn(t){return oe(pt|hr,t,!1)}function Hr(t){$.ensure();const e=oe(ce|be,t,!0);return(n={})=>new Promise(r=>{n.outro?$e(e,()=>{W(e),r(void 0)}):(W(e),r(void 0))})}function Yr(t){return oe(pt,t,!1)}function Vr(t){return oe(yt|be,t,!0)}function At(t,e=0){return oe(Gt|e,t,!0)}function vn(t,e=[],n=[]){Ir(e,n,r=>{oe(Gt,()=>t(...r.map(_)),!0)})}function Xr(t,e=0){var n=oe(ge|e,t,!0);return n}function de(t,e=!0){return oe(re|be,t,!0,e)}function mn(t){var e=t.teardown;if(e!==null){const n=Pe,r=v;bn(!0),T(null);try{e.call(null)}finally{bn(n),T(r)}}}function yn(t,e=!1){var n=t.first;for(t.first=t.last=null;n!==null;){const i=n.ac;i!==null&&pn(()=>{i.abort(gt)});var r=n.next;(n.f&ce)!==0?n.parent=null:W(n,e),n=r}}function Wr(t){for(var e=t.first;e!==null;){var n=e.next;(e.f&re)===0&&W(e),e=n}}function W(t,e=!0){var n=!1;(e||(t.f&cr)!==0)&&t.nodes_start!==null&&t.nodes_end!==null&&(Gr(t.nodes_start,t.nodes_end),n=!0),yn(t,e&&!n),tt(t,0),B(t,we);var r=t.transitions;if(r!==null)for(const s of r)s.stop();mn(t);var i=t.parent;i!==null&&i.first!==null&&gn(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=t.ac=null}function Gr(t,e){for(;t!==null;){var n=t===e?null:Pt(t);t.remove(),t=n}}function gn(t){var e=t.parent,n=t.prev,r=t.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),e!==null&&(e.first===t&&(e.first=r),e.last===t&&(e.last=n))}function $e(t,e){var n=[];_n(t,n,!0),Kr(n,()=>{W(t),e&&e()})}function Kr(t,e){var n=t.length;if(n>0){var r=()=>--n||e();for(var i of t)i.out(r)}else e()}function _n(t,e,n){if((t.f&_e)===0){if(t.f^=_e,t.transitions!==null)for(const o of t.transitions)(o.is_global||n)&&e.push(o);for(var r=t.first;r!==null;){var i=r.next,s=(r.f&Kt)!==0||(r.f&re)!==0;_n(r,e,s?n:!1),r=i}}}let xe=!1;function wn(t){xe=t}let Pe=!1;function bn(t){Pe=t}let v=null,H=!1;function T(t){v=t}let m=null;function G(t){m=t}let ee=null;function Jr(t){v!==null&&(ee===null?ee=[t]:ee.push(t))}let D=null,O=0,z=null;function Qr(t){z=t}let En=1,ze=0,ve=ze;function kn(t){ve=t}let ae=!1;function Mn(){return++En}function et(t){var e=t.f;if((e&V)!==0)return!0;if((e&ie)!==0){var n=t.deps,r=(e&N)!==0;if(n!==null){var i,s,o=(e&We)!==0,a=r&&m!==null&&!ae,l=n.length;if((o||a)&&(m===null||(m.f&we)===0)){var u=t,f=u.parent;for(i=0;i<l;i++)s=n[i],(o||!s?.reactions?.includes(u))&&(s.reactions??=[]).push(u);o&&(u.f^=We),a&&f!==null&&(f.f&N)===0&&(u.f^=N)}for(i=0;i<l;i++)if(s=n[i],et(s)&&on(s),s.wv>t.wv)return!0}(!r||m!==null&&!ae)&&B(t,C)}return!1}function xn(t,e,n=!0){var r=t.reactions;if(r!==null&&!ee?.includes(t))for(var i=0;i<r.length;i++){var s=r[i];(s.f&I)!==0?xn(s,e,!1):e===s&&(n?B(s,V):(s.f&C)!==0&&B(s,ie),Re(s))}}function Pn(t){var e=D,n=O,r=z,i=v,s=ae,o=ee,a=j,l=H,u=ve,f=t.f;D=null,O=0,z=null,ae=(f&N)!==0&&(H||!xe||v===null),v=(f&(re|ce))===0?t:null,ee=null,Ee(t.ctx),H=!1,ve=++ze,t.ac!==null&&(pn(()=>{t.ac.abort(gt)}),t.ac=null);try{t.f|=mt;var h=t.fn,p=h(),c=t.deps;if(D!==null){var d;if(tt(t,O),c!==null&&O>0)for(c.length=O+D.length,d=0;d<D.length;d++)c[O+d]=D[d];else t.deps=c=D;if(!ae||(f&I)!==0&&t.reactions!==null)for(d=O;d<c.length;d++)(c[d].reactions??=[]).push(t)}else c!==null&&O<c.length&&(tt(t,O),c.length=O);if($t()&&z!==null&&!H&&c!==null&&(t.f&(I|ie|V))===0)for(d=0;d<z.length;d++)xn(z[d],t);return i!==null&&i!==t&&(ze++,z!==null&&(r===null?r=z:r.push(...z))),(t.f&he)!==0&&(t.f^=he),p}catch(k){return en(k)}finally{t.f^=mt,D=e,O=n,z=r,v=i,ae=s,ee=o,Ee(a),H=l,ve=u}}function $r(t,e){let n=e.reactions;if(n!==null){var r=ir.call(n,t);if(r!==-1){var i=n.length-1;i===0?n=e.reactions=null:(n[r]=n[i],n.pop())}}n===null&&(e.f&I)!==0&&(D===null||!D.includes(e))&&(B(e,ie),(e.f&(N|We))===0&&(e.f^=We),sn(e),tt(e,0))}function tt(t,e){var n=t.deps;if(n!==null)for(var r=e;r<n.length;r++)$r(t,n[r])}function Se(t){var e=t.f;if((e&we)===0){B(t,C);var n=m,r=xe;m=t,xe=!0;try{(e&ge)!==0?Wr(t):yn(t),mn(t);var i=Pn(t);t.teardown=typeof i=="function"?i:null,t.wv=En;var s}finally{xe=r,m=n}}}function _(t){var e=t.f,n=(e&I)!==0;if(v!==null&&!H){var r=m!==null&&(m.f&we)!==0;if(!r&&!ee?.includes(t)){var i=v.deps;if((v.f&mt)!==0)t.rv<ze&&(t.rv=ze,D===null&&i!==null&&i[O]===t?O++:D===null?D=[t]:(!ae||!D.includes(t))&&D.push(t));else{(v.deps??=[]).push(t);var s=t.reactions;s===null?t.reactions=[v]:s.includes(v)||s.push(v)}}}else if(n&&t.deps===null&&t.effects===null){var o=t,a=o.parent;a!==null&&(a.f&N)===0&&(o.f^=N)}if(Pe){if(se.has(t))return se.get(t);if(n){o=t;var l=o.v;return((o.f&C)===0&&o.reactions!==null||Sn(o))&&(l=xt(o)),se.set(o,l),l}}else n&&(o=t,et(o)&&on(o));if((t.f&he)!==0)throw t.v;return t.v}function Sn(t){if(t.v===M)return!0;if(t.deps===null)return!1;for(const e of t.deps)if(se.has(e)||(e.f&I)!==0&&Sn(e))return!0;return!1}function An(t){var e=H;try{return H=!0,t()}finally{H=e}}const ei=-7169;function B(t,e){t.f=t.f&ei|e}const ti=["touchstart","touchmove"];function ni(t){return ti.includes(t)}const ri=new Set,Dn=new Set;let Cn=null;function nt(t){var e=this,n=e.ownerDocument,r=t.type,i=t.composedPath?.()||[],s=i[0]||t.target;Cn=t;var o=0,a=Cn===t&&t.__root;if(a){var l=i.indexOf(a);if(l!==-1&&(e===document||e===window)){t.__root=e;return}var u=i.indexOf(e);if(u===-1)return;l<=u&&(o=l)}if(s=i[o]||t.target,s!==e){ht(t,"currentTarget",{configurable:!0,get(){return s||n}});var f=v,h=m;T(null),G(null);try{for(var p,c=[];s!==null;){var d=s.assignedSlot||s.parentNode||s.host||null;try{var k=s["__"+r];if(k!=null&&(!s.disabled||t.target===s))if(Xt(k)){var[R,...Q]=k;R.apply(s,[t,...Q])}else k.call(s,t)}catch(b){p?c.push(b):p=b}if(t.cancelBubble||d===e||d===null)break;s=d}if(p){for(let b of c)queueMicrotask(()=>{throw b});throw p}}finally{t.__root=e,delete t.currentTarget,T(f),G(h)}}}function ii(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function si(t,e){var n=m;n.nodes_start===null&&(n.nodes_start=t,n.nodes_end=e)}function Tn(t,e){var n=(e&Er)!==0,r,i=!t.startsWith("<!>");return()=>{r===void 0&&(r=ii(i?t:"<!>"+t),r=hn(r));var s=n||un?document.importNode(r,!0):r.cloneNode(!0);return si(s,s),s}}function Ln(t,e){t!==null&&t.before(e)}function Dt(t,e){return oi(t,e)}const Ae=new Map;function oi(t,{target:e,anchor:n,props:r={},events:i,context:s,intro:o=!0}){jr();var a=new Set,l=h=>{for(var p=0;p<h.length;p++){var c=h[p];if(!a.has(c)){a.add(c);var d=ni(c);e.addEventListener(c,nt,{passive:d});var k=Ae.get(c);k===void 0?(document.addEventListener(c,nt,{passive:d}),Ae.set(c,1)):Ae.set(c,k+1)}}};l(sr(ri)),Dn.add(l);var u=void 0,f=Hr(()=>{var h=n??e.appendChild(zr());return Cr(h,{pending:()=>{}},p=>{if(s){_t({});var c=j;c.c=s}i&&(r.$$events=i),u=t(p,r)||{},s&&wt()}),()=>{for(var p of a){e.removeEventListener(p,nt);var c=Ae.get(p);--c===0?(document.removeEventListener(p,nt),Ae.delete(p)):Ae.set(p,c)}Dn.delete(l),h!==n&&h.parentNode?.removeChild(h)}});return ai.set(u,f),u}let ai=new WeakMap;function In(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=In(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function li(){for(var t,e,n=0,r="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=In(t))&&(r&&(r+=" "),r+=e);return r}function On(t){return typeof t=="object"?li(t):t??""}function ui(t,e,n){var r=t==null?"":""+t;return e&&(r=r?r+" "+e:e),r===""?null:r}function fi(t,e){return t==null?null:String(t)}function Fn(t,e,n,r,i,s){var o=t.__className;if(o!==n||o===void 0){var a=ui(n,r);a==null?t.removeAttribute("class"):t.className=a,t.__className=n}return s}function rt(t,e,n,r){var i=t.__style;if(i!==e){var s=fi(e);s==null?t.removeAttribute("style"):t.style.cssText=s,t.__style=e}return r}const ci=()=>performance.now(),K={tick:t=>requestAnimationFrame(t),now:()=>ci(),tasks:new Set};function Rn(){const t=K.now();K.tasks.forEach(e=>{e.c(t)||(K.tasks.delete(e),e.f())}),K.tasks.size!==0&&K.tick(Rn)}function hi(t){let e;return K.tasks.size===0&&K.tick(Rn),{promise:new Promise(n=>{K.tasks.add(e={c:t,f:n})}),abort(){K.tasks.delete(e)}}}function Nn(t,e){return t===e||t?.[Ge]===e}function De(t={},e,n,r){return Yr(()=>{var i,s;return At(()=>{i=s,s=[],An(()=>{t!==n(...s)&&(e(t,...s),i&&Nn(n(...i),t)&&e(null,...i))})}),()=>{Ke(()=>{s&&Nn(n(...s),t)&&e(null,...s)})}}),t}const pi="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(pi);function di(t){return t}function Ct(t){return-.5*(Math.cos(Math.PI*t)-1)}function vi(t){const e=Math.cos(t*Math.PI*.5);return Math.abs(e)<1e-14?1:1-e}function mi(t){return Math.sin(t*Math.PI/2)}const yi=128,gi=0,_i=1,wi=2;class bi{animationsStarted=!1;animationsCount=0;animationsLimit=yi;layers=new Array;start(){window.requestAnimationFrame(this.tick.bind(this))}tick(){try{this.animationsCount=0;for(let e=0;e<this.layers.length;e++){const n=this.layers[e];if(n==null)continue;const r=n.animations;if(r!=null)for(let i=0;i<r.length;i++){const s=r[i];if(s!=null){for(const o of s.values())if(!o.executed&&(o.executed=!0,o.function(),this.animationsCount++,this.animationsCount==this.animationsLimit))return}}}}catch{}finally{window.requestAnimationFrame(this.tick.bind(this))}}equeue(e,n,r,i){let s=this.layers[e];s==null&&(s=this.layers[e]={animations:new Array});let o=s.animations[n];o==null&&(o=s.animations[n]=new Map);let a={id:r,priority:n,executed:!1,function:i};o.set(r,a),this.animationsStarted==!1&&(this.animationsStarted=!0,this.start())}clear(e,n){for(let r=0;r<this.layers.length;r++){let i=this.layers[r];if(i==null)continue;let s=i.animations[e];if(s==null)return;let o=s.get(n);if(o==null||o.executed==!1)return;s.delete(n)}}speed(){return Math.pow(2,2*this.animationsCount/this.animationsLimit)}stacked(){return this.animationsCount==this.animationsLimit}setLimit(e){this.animationsLimit=e}}const le=new bi;function jn(t){return Object.prototype.toString.call(t)==="[object Date]"}function Tt(t,e){if(t===e||t!==t)return()=>t;const n=typeof t;if(n!==typeof e||Array.isArray(t)!==Array.isArray(e))throw new Error("Cannot interpolate values of different type");if(Array.isArray(t)){const r=e.map((i,s)=>Tt(t[s],i));return i=>r.map(s=>s(i))}if(n==="object"){if(!t||!e)throw new Error("Object cannot be null");if(jn(t)&&jn(e)){const s=t.getTime(),a=e.getTime()-s;return l=>new Date(s+l*a)}const r=Object.keys(e),i={};return r.forEach(s=>{i[s]=Tt(t[s],e[s])}),s=>{const o={};return r.forEach(a=>{o[a]=i[a](s)}),o}}if(n==="number"){const r=e-t;return i=>t+i*r}return()=>e}class Lt{#e;#t;#a;#r=null;constructor(e,n={}){this.#e=A(e),this.#t=A(e),this.#a=n}static of(e,n){const r=new Lt(e(),n);return At(()=>{r.set(e())}),r}set(e,n){x(this.#t,e);let{delay:r=0,duration:i=400,easing:s=di,interpolate:o=Tt}={...this.#a,...n};if(i===0)return this.#r?.abort(),x(this.#e,e),Promise.resolve();const a=K.now()+r;let l,u=!1,f=this.#r;return this.#r=hi(h=>{if(h<a)return!0;if(!u){u=!0;const c=this.#e.v;l=o(c,e),typeof i=="function"&&(i=i(c,e)),f?.abort()}const p=h-a;return p>i?(x(this.#e,e),!1):(x(this.#e,l(s(p/i))),!0)}),this.#r.promise}get current(){return _(this.#e)}get target(){return _(this.#t)}set target(e){this.set(e)}}class it{value;motion;constructor(e,n){this.value=e,this.motion=new Lt(e,n)}set(e,n){this.value=e,this.motion.set(e,n)}update(e){this.motion.set(this.value,e)}snap(){this.motion.set(this.value,{duration:0})}}var Ei=Tn('<div><div class="body svelte-zz3jrb"></div></div>');function ki(t,e){_t(e,!0);let n,r;function i(){return r}let s=A(!1);function o(E){x(s,E,!0)}function a(){return _(s)}let l=A(!0),u=0,f=150;function h(E){E!=_(l)&&(x(l,E,!0),u=performance.now())}function p(){return performance.now()-u<f?d.motion.current==0:d.value==0}let c=0,d=new it(0,{easing:Ct});X(()=>{_(s)==!1&&(d.snap(),le.clear(e.priority,e.id))}),X(()=>{d.set(_(l)?0:c,{duration:75})}),X(()=>{k(d.motion.current)});function k(E){n&&le.equeue(e.layer,e.priority,e.id,()=>{n.style.scale=E.toString(),n.style.filter=`brightness(${.25+.75*E})`,r.style.opacity=E.toString()})}function R(E){E!=c&&(c=E,d.set(E,{duration:75}))}function Q(){return d.value}var b={getBody:i,setDisplayed:o,getDisplayed:a,setCollapsed:h,getCollapsed:p,setScale:R,getScale:Q},ye=Ei(),ue=St(ye);return De(ue,E=>r=E,()=>r),De(ye,E=>n=E,()=>n),vn(()=>{Fn(ye,1,On(["pin",_(s)&&"displayed"]),"svelte-zz3jrb"),rt(ye,`width: ${e.width}px; height: ${e.height}px; border-radius: ${e.radius}px`),rt(ue,`width: ${e.width-4}px; height: ${e.height-4}px; border-radius: ${e.radius-2}px`)}),Ln(t,ye),wt(b)}var Be;(t=>{function e(n,r,i){const s=n/2,o=r/2,a=Math.sqrt(s*s+o*o),l=Math.atan(o/s)*(180/Math.PI),u=i*(Math.PI/180);return i<180?i<90?i<l?{x:0,y:a*Math.sin(u)-o}:{x:a*Math.cos(u)-s,y:0}:i<180-l?{x:a*Math.cos(u)-s,y:0}:{x:-n,y:a*Math.sin(u)-o}:i<270?i<180+l?{x:-n,y:a*Math.sin(u)-o}:{x:a*Math.cos(u)-s,y:-r}:i<360-l?{x:a*Math.cos(u)-s,y:-r}:{x:0,y:a*Math.sin(u)-o}}t.getOffsets=e})(Be||(Be={}));var Mi=Tn('<div><div class="pointer svelte-11extwn"></div> <div class="bubble svelte-11extwn"><div class="body svelte-11extwn"></div></div></div>');function zn(t,e){_t(e,!0);let n,r,i,s;const o=e.width+2*e.margin,a=e.height+2*e.margin,l=()=>s;X(()=>{i.style.width=`${e.margin*4}px`,i.style.height=`${e.margin*4}px`});let u=A(!0);function f(y){x(u,y,!0)}function h(){return _(u)}let p=A(!0),c=0,d=300;function k(y){y!=_(p)&&(x(p,y,!0),c=performance.now())}function R(){return performance.now()-c<d?b.motion.current==0:b.value==0}function Q(){return performance.now()-c<d?b.motion.current==1:b.value==1}let b=new it(0);X(()=>{_(u)==!1&&(b.snap(),le.clear(e.priority,e.id+"_scale"))}),X(()=>{_(p)==!0&&b.value!=0&&(le.stacked()?b.set(0,{duration:0}):b.set(0,{duration:150,easing:vi})),_(p)==!1&&b.value!=1&&b.set(1,{duration:150,easing:mi})}),X(()=>{ye(b.motion.current)});function ye(y){!n||!r||!i||le.equeue(_(p)?0:e.layer,e.priority,e.id+"_scale",()=>{n.style.opacity=`${y}`,r.style.scale=`${y}`,i.style.scale=`${y}`})}let ue=NaN,E=A(!1),fe=new it(-o/2,{easing:Ct}),lt=new it(-a/2,{easing:Ct});X(()=>{_(u)==!1&&(fe.snap(),fe.snap(),le.clear(e.priority,e.id+"_angle"))}),X(()=>{_(p)==!0&&_(E)&&(fe.update({duration:75}),fe.update({duration:75}))}),X(()=>{$n(fe.motion.current,lt.motion.current)});function $n(y,ft){if(!n||!r||!i)return;const te=y+o/2,ct=ft+a/2,Le=a<o?te*a/o:te,Ie=a>o?ct*o/a:ct,Wi=Math.atan2(Ie,Le)/Math.PI*180-45,nr=0,Gi=30,Vt=Math.sqrt(Le*Le+Ie*Ie),Ve=Math.min(o,a)/2,Ki=Ve*Math.SQRT2,Ji=(Vt-Ve)/(Ki-Ve),rr=nr+Ji*(Gi-nr),Qi=Vt<Ve?Vt/Ve:1;le.equeue(e.layer,e.priority,e.id+"_angle",()=>{r.style.transform=`translate(${Math.round(y)}px, ${Math.round(ft)}px)`,i.style.transform=`scale(${Qi}) rotate(${Wi}deg) skew(${rr}deg, ${rr}deg)`})}function Yi(y,ft){if(_(E)==!1||ft==!0){let te=Be.getOffsets(o,a,y);fe.set(Math.round(te.x),{duration:0}),lt.set(Math.round(te.y),{duration:0}),$n(fe.value,lt.value),ue=y,x(E,!0)}else if(y!=ue){let te=Math.abs(y-ue),ct=te<180?te:360-te,Le=Math.log(ct)*75,Ie=Be.getOffsets(o,a,y);fe.set(Math.round(Ie.x),{duration:Le}),lt.set(Math.round(Ie.y),{duration:Le}),ue=y}}function Vi(){return Be.getOffsets(o,a,ue)}var Xi={getBody:l,setDisplayed:f,getDisplayed:h,setCollapsed:k,getCollapsed:R,getExpanded:Q,setAngle:Yi,getOffsets:Vi},ut=Mi(),er=St(ut);De(er,y=>i=y,()=>i);var Yt=Br(er,2),tr=St(Yt);return De(tr,y=>s=y,()=>s),De(Yt,y=>r=y,()=>r),De(ut,y=>n=y,()=>n),vn(()=>{Fn(ut,1,On(["anchor",_(u)&&"displayed"]),"svelte-11extwn"),rt(Yt,`margin: ${e.margin}px;`),rt(tr,`width: ${e.width}px; height: ${e.height}px; border-radius: ${e.radius}px;`)}),Ln(t,ut),wt(Xi)}var Ue;(t=>{async function e(r,i){const s=await fetch(r,i);if(!s.ok)throw new Error(s.statusText);return s.json()}t.get=e;async function n(r,i,s){const o=await fetch(r,{method:"POST",body:JSON.stringify(i),headers:{"Content-Type":"application/json",...s?.headers},...s});if(!o.ok)throw new Error(o.statusText);return o.json()}t.post=n})(Ue||(Ue={}));var Ce;(t=>{function e(a,l,u){return{x:r(l)*u,y:i(a)*u}}t.project=e;function n(a,l,u){return{lat:o(l/u),lng:s(a/u)}}t.unproject=n;function r(a){return(180+a)/360}function i(a){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+a*Math.PI/360)))/360}function s(a){return a*360-180}function o(a){return 360/Math.PI*Math.atan(Math.exp((180-a*360)*Math.PI/180))-90}})(Ce||(Ce={}));class Bn{swLat;swLng;neLat;neLng;constructor(e,n,r,i,s){const o=r*Math.pow(2,n),a=Ce.project(e.sw.lat,e.sw.lng,o),l=Ce.project(e.ne.lat,e.ne.lng,o),u=a.x-i,f=a.y+s,h=l.x+i,p=l.y-s,c=Ce.unproject(u,f,o),d=Ce.unproject(h,p,o);this.swLat=c.lat,this.swLng=c.lng,this.neLat=d.lat,this.neLng=d.lng}contains(e,n){return this.swLat<=e&&e<=this.neLat?this.swLng<this.neLng?this.swLng<=n&&n<=this.neLng:n<=this.neLng||this.swLng<=n:!1}}var It;function Un(t){return{lang:t?.lang??It?.lang,message:t?.message,abortEarly:t?.abortEarly??It?.abortEarly,abortPipeEarly:t?.abortPipeEarly??It?.abortPipeEarly}}var xi;function Pi(t){return xi?.get(t)}var Si;function Ai(t){return Si?.get(t)}var Di;function Ci(t,e){return Di?.get(t)?.get(e)}function Ze(t){const e=typeof t;return e==="string"?`"${t}"`:e==="number"||e==="bigint"||e==="boolean"?`${t}`:e==="object"||e==="function"?(t&&Object.getPrototypeOf(t)?.constructor?.name)??"null":e}function P(t,e,n,r,i){const s=i&&"input"in i?i.input:n.value,o=i?.expected??t.expects??null,a=i?.received??Ze(s),l={kind:t.kind,type:t.type,input:s,expected:o,received:a,message:`Invalid ${e}: ${o?`Expected ${o} but r`:"R"}eceived ${a}`,requirement:t.requirement,path:i?.path,issues:i?.issues,lang:r.lang,abortEarly:r.abortEarly,abortPipeEarly:r.abortPipeEarly},u=t.kind==="schema",f=i?.message??t.message??Ci(t.reference,l.lang)??(u?Ai(l.lang):null)??r.message??Pi(l.lang);f!==void 0&&(l.message=typeof f=="function"?f(l):f),u&&(n.typed=!1),n.issues?n.issues.push(l):n.issues=[l]}function F(t){return{version:1,vendor:"valibot",validate(e){return t["~run"]({value:e},Un())}}}var st=class extends Error{constructor(t){super(t[0].message),this.name="ValiError",this.issues=t}};function U(t){return{kind:"transformation",type:"args",reference:U,async:!1,schema:t,"~run"(e,n){const r=e.value;return e.value=(...i)=>{const s=this.schema["~run"]({value:i},n);if(s.issues)throw new st(s.issues);return r(...s.value)},e}}}function Zn(){return{kind:"transformation",type:"await",reference:Zn,async:!0,async"~run"(t){return t.value=await t.value,t}}}function qn(t,e){return{kind:"validation",type:"check",reference:qn,async:!1,expects:null,requirement:t,message:e,"~run"(n,r){return n.typed&&!this.requirement(n.value)&&P(this,"input",n,r),n}}}function Hn(t,e){return{kind:"validation",type:"length",reference:Hn,async:!1,expects:`${t}`,requirement:t,message:e,"~run"(n,r){return n.typed&&n.value.length!==this.requirement&&P(this,"length",n,r,{received:`${n.value.length}`}),n}}}function Te(t,e){return{kind:"validation",type:"max_value",reference:Te,async:!1,expects:`<=${t instanceof Date?t.toJSON():Ze(t)}`,requirement:t,message:e,"~run"(n,r){return n.typed&&!(n.value<=this.requirement)&&P(this,"value",n,r,{received:n.value instanceof Date?n.value.toJSON():Ze(n.value)}),n}}}function Ot(t,e){return{kind:"validation",type:"min_length",reference:Ot,async:!1,expects:`>=${t}`,requirement:t,message:e,"~run"(n,r){return n.typed&&n.value.length<this.requirement&&P(this,"length",n,r,{received:`${n.value.length}`}),n}}}function J(t,e){return{kind:"validation",type:"min_value",reference:J,async:!1,expects:`>=${t instanceof Date?t.toJSON():Ze(t)}`,requirement:t,message:e,"~run"(n,r){return n.typed&&!(n.value>=this.requirement)&&P(this,"value",n,r,{received:n.value instanceof Date?n.value.toJSON():Ze(n.value)}),n}}}function Y(t){return{kind:"transformation",type:"returns",reference:Y,async:!1,schema:t,"~run"(e,n){const r=e.value;return e.value=(...i)=>{const s=this.schema["~run"]({value:r(...i)},n);if(s.issues)throw new st(s.issues);return s.value},e}}}function Yn(t){return{kind:"transformation",type:"returns",reference:Yn,async:!1,schema:t,"~run"(e,n){const r=e.value;return e.value=async(...i)=>{const s=await this.schema["~run"]({value:await r(...i)},n);if(s.issues)throw new st(s.issues);return s.value},e}}}function Ti(t,e,n){return typeof t.fallback=="function"?t.fallback(e,n):t.fallback}function Vn(t,e,n){return typeof t.default=="function"?t.default(e,n):t.default}function Xn(t,e){return{kind:"schema",type:"array",reference:Xn,expects:"Array",async:!1,item:t,message:e,get"~standard"(){return F(this)},"~run"(n,r){const i=n.value;if(Array.isArray(i)){n.typed=!0,n.value=[];for(let s=0;s<i.length;s++){const o=i[s],a=this.item["~run"]({value:o},r);if(a.issues){const l={type:"array",origin:"value",input:i,key:s,value:o};for(const u of a.issues)u.path?u.path.unshift(l):u.path=[l],n.issues?.push(u);if(n.issues||(n.issues=a.issues),r.abortEarly){n.typed=!1;break}}a.typed||(n.typed=!1),n.value.push(a.value)}}else P(this,"type",n,r);return n}}}function Wn(t){return{kind:"schema",type:"boolean",reference:Wn,expects:"boolean",async:!1,message:t,get"~standard"(){return F(this)},"~run"(e,n){return typeof e.value=="boolean"?e.typed=!0:P(this,"type",e,n),e}}}function Gn(t,e){return{kind:"schema",type:"custom",reference:Gn,expects:"unknown",async:!1,check:t,message:e,get"~standard"(){return F(this)},"~run"(n,r){return this.check(n.value)?n.typed=!0:P(this,"type",n,r),n}}}function Z(t){return{kind:"schema",type:"function",reference:Z,expects:"Function",async:!1,message:t,get"~standard"(){return F(this)},"~run"(e,n){return typeof e.value=="function"?e.typed=!0:P(this,"type",e,n),e}}}function g(t){return{kind:"schema",type:"number",reference:g,expects:"number",async:!1,message:t,get"~standard"(){return F(this)},"~run"(e,n){return typeof e.value=="number"&&!isNaN(e.value)?e.typed=!0:P(this,"type",e,n),e}}}function L(t,e){return{kind:"schema",type:"object",reference:L,expects:"Object",async:!1,entries:t,message:e,get"~standard"(){return F(this)},"~run"(n,r){const i=n.value;if(i&&typeof i=="object"){n.typed=!0,n.value={};for(const s in this.entries){const o=this.entries[s];if(s in i||(o.type==="exact_optional"||o.type==="optional"||o.type==="nullish")&&o.default!==void 0){const a=s in i?i[s]:Vn(o),l=o["~run"]({value:a},r);if(l.issues){const u={type:"object",origin:"value",input:i,key:s,value:a};for(const f of l.issues)f.path?f.path.unshift(u):f.path=[u],n.issues?.push(f);if(n.issues||(n.issues=l.issues),r.abortEarly){n.typed=!1;break}}l.typed||(n.typed=!1),n.value[s]=l.value}else if(o.fallback!==void 0)n.value[s]=Ti(o);else if(o.type!=="exact_optional"&&o.type!=="optional"&&o.type!=="nullish"&&(P(this,"key",n,r,{input:void 0,expected:`"${s}"`,path:[{type:"object",origin:"key",input:i,key:s,value:i[s]}]}),r.abortEarly))break}}else P(this,"type",n,r);return n}}}function Ft(t,e){return{kind:"schema",type:"optional",reference:Ft,expects:`(${t.expects} | undefined)`,async:!1,wrapped:t,default:e,get"~standard"(){return F(this)},"~run"(n,r){return n.value===void 0&&(this.default!==void 0&&(n.value=Vn(this,n,r)),n.value===void 0)?(n.typed=!0,n):this.wrapped["~run"](n,r)}}}function Kn(t){return{kind:"schema",type:"promise",reference:Kn,expects:"Promise",async:!1,message:t,get"~standard"(){return F(this)},"~run"(e,n){return e.value instanceof Promise?e.typed=!0:P(this,"type",e,n),e}}}function qe(t){return{kind:"schema",type:"string",reference:qe,expects:"string",async:!1,message:t,get"~standard"(){return F(this)},"~run"(e,n){return typeof e.value=="string"?e.typed=!0:P(this,"type",e,n),e}}}function q(t,e){return{kind:"schema",type:"tuple",reference:q,expects:"Array",async:!1,items:t,message:e,get"~standard"(){return F(this)},"~run"(n,r){const i=n.value;if(Array.isArray(i)){n.typed=!0,n.value=[];for(let s=0;s<this.items.length;s++){const o=i[s],a=this.items[s]["~run"]({value:o},r);if(a.issues){const l={type:"array",origin:"value",input:i,key:s,value:o};for(const u of a.issues)u.path?u.path.unshift(l):u.path=[l],n.issues?.push(u);if(n.issues||(n.issues=a.issues),r.abortEarly){n.typed=!1;break}}a.typed||(n.typed=!1),n.value.push(a.value)}}else P(this,"type",n,r);return n}}}function He(t){return{kind:"schema",type:"void",reference:He,expects:"void",async:!1,message:t,get"~standard"(){return F(this)},"~run"(e,n){return e.value===void 0?e.typed=!0:P(this,"type",e,n),e}}}function ot(t,e,n){const r=t["~run"]({value:e},Un(n));if(r.issues)throw new st(r.issues);return r.value}function w(...t){return{...t[0],pipe:t,get"~standard"(){return F(this)},"~run"(e,n){for(const r of t)if(r.kind!=="metadata"){if(e.issues&&(r.kind==="schema"||r.kind==="transformation")){e.typed=!1;break}(!e.issues||!n.abortEarly&&!n.abortPipeEarly)&&(e=r["~run"](e,n))}return e}}}function Li(...t){return{...t[0],pipe:t,async:!0,get"~standard"(){return F(this)},async"~run"(e,n){for(const r of t)if(r.kind!=="metadata"){if(e.issues&&(r.kind==="schema"||r.kind==="transformation")){e.typed=!1;break}(!e.issues||!n.abortEarly&&!n.abortPipeEarly)&&(e=await r["~run"](e,n))}return e}}}const Rt=w(g(),J(-90),Te(90)),Nt=w(g(),J(-180),Te(180)),Ii=L({sw:L({lat:Rt,lng:Nt}),ne:L({lat:Rt,lng:Nt})}),jt=Gn(t=>t instanceof HTMLElement,"Must be an HTMLElement"),Oi=L({getParameters:w(Z(),U(q([])),Y(L({mapSize:w(g(),J(1)),zoomMin:w(g(),J(0)),zoomMax:w(g(),J(0)),zoomScale:w(g(),J(1),Te(10))}))),getContainer:w(Z(),U(q([])),Y(jt)),getZoom:w(Z(),U(q([])),Y(g())),getBounds:w(Z(),U(q([])),Y(Ii)),panBy:w(Z(),U(q([g(),g()])),Y(He())),createMarker:w(Z(),U(q([jt,Rt,Nt,g()])),Y(L({inserted:w(Z(),U(q([])),Y(Wn())),insert:w(Z(),U(q([])),Y(He())),remove:w(Z(),U(q([])),Y(He())),update:w(Z(),U(q([g()])),Y(He()))})))}),zt=w(Z(),U(q([qe()])),Yn(Li(Kn(),Zn(),jt))),Fi=Xn(L({id:w(qe(),Ot(1)),rank:w(g(),J(0)),lat:w(g(),J(-90),Te(90)),lng:w(g(),J(-180),Te(180)),tooltip:L({style:w(L({width:g(),height:g(),margin:g(),radius:g()}),qn(t=>Math.min(t.width,t.height)/t.margin>=6,"Tooltip: minimum of width or height must be greater than or equal to 6 * margin")),body:zt}),pin:Ft(L({style:L({width:g(),height:g(),radius:g()}),body:zt})),popup:Ft(L({style:L({width:g(),height:g(),radius:g(),margin:g()}),body:zt}))}));var me;(t=>{t.COUNT=12,t.DEGREES=[0,30,60,90,120,150,180,210,240,270,300,330],t.DEGREES_DEFAULT=270})(me||(me={}));const Ri=w(qe(),Hn(32)),Ni=w(qe(),Ot(1)),Jn="1.1.4",Bt="https://maps.api.arenarium.dev",ji=`${Bt}/auth`,zi=`${Bt}/states`,Bi=`${Bt}/log`;class Ut{apiKey;apiToken;apiDevEnvironment;mapProvider;markerDataArray=new Array;markerDataMap=new Map;markerDataUpdating=!1;markerPinProcessor;markerTooltipProcessor;markerPopupProcessor;constructor(e,n,r,i){ot(Ri,e),ot(Ni,n),ot(Oi,r),this.apiKey=e,this.apiToken=n,this.apiDevEnvironment=window?.location.host.startsWith("localhost")||window?.location.host.startsWith("127.0.0.1"),this.mapProvider=r,this.markerPinProcessor=new at(r),this.markerTooltipProcessor=new Zi(r),this.markerPopupProcessor=new qi(r),this.setConfiguration(i)}static async create(e,n,r){const i={key:e,version:Jn};let o=(await Ue.post(ji,i)).token;if(!o)throw new Error("Failed to get api token");return new Ut(e,o,n,r)}setConfiguration(e){le.setLimit(e?.animation?.queue?.limit??8*navigator.hardwareConcurrency),this.markerPinProcessor.setConfiguration(e)}async updateMarkers(e){ot(Fi,e);try{await this.updateMarkerData(e),this.processMarkerDataCallback()}catch(n){throw console.error(n),this.removeMarkerData(),n instanceof Error&&this.log("error","Failed to update markers",n),n}}removeMarkers(){try{this.removeMarkerData()}catch(e){throw console.error(e),e instanceof Error&&this.log("error","Failed to remove markers",e),e}}showPopup(e){try{for(const n of this.markerDataArray)n.marker.id==e?this.markerPopupProcessor.show(n):this.markerPopupProcessor.hide(n)}catch(n){console.error(n);for(const r of this.markerDataArray)this.markerPopupProcessor.hide(r);throw n instanceof Error&&this.log("error","Failed to show popup",n),n}}hidePopup(e){try{if(e){const n=this.markerDataMap.get(e);if(n==null)return;this.markerPopupProcessor.hide(n)}else for(const n of this.markerDataArray)this.markerPopupProcessor.hide(n)}catch(n){console.error(n);for(const r of this.markerDataArray)this.markerPopupProcessor.hide(r);throw n instanceof Error&&this.log("error","Failed to hide popup",n),n}}async updateMarkerData(e){try{let n=this.markerDataArray.map(i=>i.marker);for(let i=0;i<e.length;i++){const s=e[i];this.markerDataMap.get(s.id)||n.push(s)}const r=await this.getMarkerStates(n);try{this.markerDataUpdating=!0;for(let i=0;i<n.length;i++){const s=n[i],o=r[i],a=this.markerDataMap.get(s.id);if(a)a.update(o);else{const l=new Ui(this.mapProvider,s,o);l.create(),this.markerDataMap.set(s.id,l),this.markerDataArray.push(l)}}this.markerDataArray.sort((i,s)=>i.zoom-s.zoom),this.markerPinProcessor.updateElements(this.markerDataArray.map(i=>i.pin)),this.markerTooltipProcessor.updateElements(this.markerDataArray.map(i=>i.tooltip)),this.markerPopupProcessor.updateElements(this.markerDataArray.map(i=>i.popup).filter(i=>i!=null))}finally{this.markerDataUpdating=!1}}catch(n){throw console.error(n),this.markerDataArray.forEach(r=>r.remove()),this.markerDataArray.length=0,this.markerDataMap.clear(),n instanceof Error&&this.log("error","Failed to update marker data",n),n}finally{this.markerDataUpdating=!1}}removeMarkerData(){try{this.markerDataUpdating=!0,this.markerPinProcessor.removeElements(),this.markerTooltipProcessor.removeElements(),this.markerPopupProcessor.removeElements(),this.markerDataArray.length=0,this.markerDataMap.clear()}catch(e){throw console.error(e),e instanceof Error&&this.log("error","Failed to remove marker data",e),e}finally{this.markerDataUpdating=!1}}async getMarkerStates(e){if(e.length==0)return[];if(e.length==1)return[[0,[[0,me.DEGREES.indexOf(me.DEGREES_DEFAULT)]]]];const n=e.map(s=>({id:s.id,rank:s.rank,lat:s.lat,lng:s.lng,width:s.tooltip.style.width,height:s.tooltip.style.height,margin:s.tooltip.style.margin})),r={key:this.apiKey,token:this.apiToken,parameters:this.mapProvider.getParameters(),input:n},i=await Ue.post(zi,r,{headers:{"Cache-Control":this.apiDevEnvironment?"no-cache":""}});return i.token&&(this.apiToken=i.token),i.states}processMarkerDataCallback(){if(this.mapProvider.getContainer().parentElement!=null&&this.markerDataArray.length!=0)try{this.processMarkerData(),window.setTimeout(this.processMarkerDataCallback.bind(this),25)}catch(e){console.error(e),e instanceof Error&&this.log("error","Failed to process marker data",e)}}processMarkerData(){if(this.markerDataUpdating)return;const e=this.mapProvider.getBounds(),n=this.mapProvider.getZoom();this.markerPopupProcessor.process(),this.markerTooltipProcessor.process(e,n),this.markerPinProcessor.process(e,n)}async log(e,n,r){if(!this.apiDevEnvironment)try{const i={key:this.apiKey,title:n,level:e,content:{version:Jn,...r}};await Ue.post(Bi,i)}catch(i){console.error(i)}}}class Ui{marker;zoom;pin;tooltip;popup;constructor(e,n,r){this.marker=n,this.zoom=r[0],this.pin=new Ye(e,n,r),this.tooltip=new qt(e,n,r),n.popup&&(this.popup=new Ht(e,n))}create(){this.pin.create(),this.tooltip.create(),this.popup?.create()}update(e){this.pin.update(e),this.tooltip.update(e)}remove(){this.pin.remove(),this.tooltip.remove(),this.popup?.remove()}}class Zt{provider;id;lat;lng;shown;element;component;marker;constructor(e,n){this.provider=e,this.id=n.id,this.lat=n.lat,this.lng=n.lng,this.shown=!0}create(){this.createElement(),this.createMarker(),this.updateZIndex()}createElement(){throw new Error("Create element not implemented")}createMarker(){const e=this.element;if(!e)throw new Error("Failed to create provider marker");this.marker=this.provider.createMarker(e,this.lat,this.lng,this.getZindex())}updateZIndex(){if(this.marker==null)throw new Error("Failed to update provider marker z-index");this.marker.update(this.getZindex())}updateMap(e){const n=this.marker,r=this.component;if(n==null||r==null)throw new Error("Failed to update provider marker map");e?n.inserted()==!1&&n.insert():n.inserted()==!0&&n.remove()}getZindex(){throw new Error("Get z-index not implemented")}remove(){this.marker?.remove()}}class Ye extends Zt{static DEFAULT_SIZE=16;width;height;radius;zoom;bodyLoading=!1;bodyLoaded=!1;bodyCallback;constructor(e,n,r){super(e,n),this.width=n.pin?.style.width??Ye.DEFAULT_SIZE,this.height=n.pin?.style.height??Ye.DEFAULT_SIZE,this.radius=n.pin?.style.radius??Ye.DEFAULT_SIZE,this.zoom=r[0],this.bodyCallback=n.pin?.body}createElement(){this.element=document.createElement("div"),this.element.classList.add("pin"),this.component=Dt(ki,{target:this.element,props:{id:this.id+"_pin",layer:wi,priority:this.zoom*this.provider.getParameters().zoomScale,width:this.width,height:this.height,radius:this.radius}})}update(e){this.zoom=e[0],this.updateZIndex()}updateMap(e){super.updateMap(e),this.component?.setDisplayed(e)}updateBody(){if(this.bodyCallback==null||this.bodyLoaded||this.bodyLoading)return;const e=this.component?.getBody();e!=null&&(this.bodyLoading=!0,this.bodyCallback(this.id).then(n=>{n instanceof HTMLElement?e.appendChild(n):console.error("Failed to load pin body")}).catch(n=>console.error(n)).finally(()=>{this.bodyLoaded=!0,this.bodyLoading=!1}))}setCollapsed(e){if(this.component==null)throw new Error("Failed to set pin collapsed");this.component.setCollapsed(e)}setScale(e){if(this.component==null)throw new Error("Failed to set pin scale");this.component.setScale(e)}getScaleFromZoomDistance(e){return this.zoom<e?1:Math.max(0,1-(this.zoom-e)*.125)}getZindex(){const e=this.provider.getParameters();return Math.round((e.zoomMax-this.zoom)*e.zoomScale)}isCollapsed(){return this.component==null?!1:this.component.getCollapsed()}isBodyLoaded(){return this.bodyCallback==null||this.bodyLoaded}}class at{static MAP_PINS_MAX_ZOOM=2;static MAP_PINS_MAX_COUNT=128;provider;pinElements=new Array;pinMaxWidth=0;pinMaxHeight=0;pinFade=!1;pinMaxCount=0;pinMaxZoomDelta=0;constructor(e){this.provider=e}setConfiguration(e){this.pinFade=e?.pin?.fade??!0,this.pinMaxCount=e?.pin?.maxCount??Math.max(at.MAP_PINS_MAX_COUNT,8*navigator.hardwareConcurrency),this.pinMaxZoomDelta=e?.pin?.maxZoom??at.MAP_PINS_MAX_ZOOM}updateElements(e){this.pinElements=e,this.pinMaxWidth=e.reduce((n,r)=>Math.max(n,r.width),0),this.pinMaxHeight=e.reduce((n,r)=>Math.max(n,r.height),0)}removeElements(){this.pinElements.forEach(e=>e.remove()),this.pinElements.length=0}process(e,n){const r=this.provider.getParameters().mapSize,i=new Bn(e,n,r,this.pinMaxWidth*2,this.pinMaxHeight*2);let s=0;for(const o of this.pinElements)i.contains(o.lat,o.lng)?o.shown&&n<o.zoom&&o.zoom<n+this.pinMaxZoomDelta?(s<this.pinMaxCount&&(o.setCollapsed(!1),o.setScale(this.pinFade?o.getScaleFromZoomDistance(n):1),o.updateMap(!0),o.isBodyLoaded()==!1&&o.updateBody()),s++):(o.setCollapsed(!0),o.isCollapsed()&&o.updateMap(!1)):o.updateMap(!1)}}class qt extends Zt{static Z_INDEX_OFFSET=1e6;width;height;margin;radius;zoom;angle;states;bodyLoading=!1;bodyLoaded=!1;bodyCallback;constructor(e,n,r){super(e,n),this.width=n.tooltip.style.width,this.height=n.tooltip.style.height,this.margin=n.tooltip.style.margin,this.radius=n.tooltip.style.radius,this.zoom=r[0],this.angle=me.DEGREES_DEFAULT,this.states=r[1].map(i=>[i[0],me.DEGREES[i[1]]]),this.bodyCallback=n.tooltip.body}createElement(){this.element=document.createElement("div"),this.element.classList.add("tooltip"),this.component=Dt(zn,{target:this.element,props:{id:this.id+"_tooltip",layer:_i,priority:this.zoom*this.provider.getParameters().zoomScale,width:this.width,height:this.height,margin:this.margin,radius:this.radius}})}update(e){this.zoom=e[0],this.states=e[1].map(n=>[n[0],me.DEGREES[n[1]]]),this.updateZIndex()}updateMap(e){super.updateMap(e),this.component?.setDisplayed(e)}updateState(e){if(this.component==null)throw new Error("Failed to update tooltip state");this.angle=this.getAngle(e),this.component.setAngle(this.angle)}updateBody(){if(this.bodyLoaded||this.bodyLoading)return;const e=this.component?.getBody();e!=null&&(this.bodyLoading=!0,this.bodyCallback(this.id).then(n=>{n instanceof HTMLElement?e.appendChild(n):console.error("Failed to load tooltip body")}).catch(n=>console.error(n)).finally(()=>{this.bodyLoaded=!0,this.bodyLoading=!1}))}getAngle(e){const n=this.states.findLast(r=>r[0]<=e);if(!n)throw new Error("Angle not found");return n[1]}getZindex(){const e=this.provider.getParameters();return Math.round((e.zoomMax-this.zoom)*e.zoomScale)+qt.Z_INDEX_OFFSET}setCollapsed(e){if(this.component==null)throw new Error("Failed to set tooltip collapsed");this.component.setCollapsed(e)}isExpanded(){return this.component==null?!1:this.component.getExpanded()}isCollapsed(){return this.component==null?!1:this.component.getCollapsed()}isBodyLoaded(){return this.bodyLoaded}}class Zi{provider;tooltipElements=new Array;tooltipMaxWidth=0;tooltipMaxHeight=0;constructor(e){this.provider=e}updateElements(e){this.tooltipElements=e,this.tooltipMaxWidth=this.tooltipElements.reduce((n,r)=>Math.max(n,r.width),0),this.tooltipMaxHeight=this.tooltipElements.reduce((n,r)=>Math.max(n,r.height),0)}removeElements(){this.tooltipElements.forEach(e=>e.remove()),this.tooltipElements.length=0}process(e,n){const r=this.provider.getParameters().mapSize,i=new Bn(e,n,r,this.tooltipMaxWidth*2,this.tooltipMaxHeight*2);for(const s of this.tooltipElements)i.contains(s.lat,s.lng)?s.shown&&s.zoom<=n?(s.updateState(n),s.setCollapsed(!1),s.updateMap(!0),s.isCollapsed()==!1&&s.isBodyLoaded()==!1&&s.updateBody()):(s.setCollapsed(!0),s.isCollapsed()&&s.updateMap(!1)):s.updateMap(!1)}}class Ht extends Zt{static Z_INDEX_OFFSET=2e6;width;height;margin;radius;bodyLoading=!1;bodyLoaded=!1;bodyCallback;constructor(e,n){if(n.popup==null)throw new Error("Failed to create popup");super(e,n),this.shown=!1,this.width=n.popup.style.width,this.height=n.popup.style.height,this.margin=n.popup.style.margin,this.radius=n.popup.style.radius,this.bodyCallback=n.popup.body}createElement(){this.element=document.createElement("div"),this.element.classList.add("popup"),this.component=Dt(zn,{target:this.element,props:{id:this.id+"_popup",layer:gi,priority:0,width:this.width,height:this.height,margin:this.margin,radius:this.radius}})}updateMap(e){super.updateMap(e),this.component?.setDisplayed(e)}updateBody(){if(this.bodyLoaded||this.bodyLoading)return;const e=this.component?.getBody();e!=null&&(this.bodyLoading=!0,this.bodyCallback(this.id).then(n=>{n instanceof HTMLElement?e.appendChild(n):console.error("Failed to load popup body")}).catch(n=>console.error(n)).finally(()=>{this.bodyLoaded=!0,this.bodyLoading=!1}))}getZindex(){return Ht.Z_INDEX_OFFSET}setCollapsed(e){if(this.component==null)throw new Error("Failed to set popup collapsed");this.component.setCollapsed(e)}setAngle(e){if(this.component==null)throw new Error("Failed to set popup angle");this.component.setAngle(e,!0)}isExpanded(){return this.component==null?!1:this.component.getExpanded()}isCollapsed(){return this.component==null?!1:this.component.getCollapsed()}isBodyLoaded(){return this.bodyLoaded}}class qi{provider;popupElements=new Array;popupPositioned=new Map;constructor(e){this.provider=e}show(e){e.popup&&(e.pin.shown=!1,e.tooltip.shown=!1,this.popupPositioned.set(e.marker.id,!1),e.popup.setAngle(e.tooltip.angle),e.popup.shown=!0)}hide(e){e.popup&&(e.pin.shown=!0,e.tooltip.shown=!0,e.popup.shown=!1)}updateElements(e){this.popupElements=e,this.popupPositioned=new Map(e.map(n=>[n.id,!1]))}removeElements(){this.popupElements.forEach(e=>e.remove()),this.popupElements.length=0,this.popupPositioned.clear()}process(){for(const e of this.popupElements)if(e.shown){if(e.setCollapsed(!1),e.updateMap(!0),e.isExpanded()&&e.isBodyLoaded()==!1&&e.updateBody(),e.isCollapsed()==!1&&this.popupPositioned.get(e.id)==!1){const n=e.component?.getBody();if(n==null)continue;const r=e.component?.getOffsets();if(r==null)continue;const i=n.getBoundingClientRect();if(i.x==0&&i.y==0&&i.width==0&&i.height==0)continue;const s=i.x+i.width/2,o=i.y+i.height/2,a=s+r.x,l=o+r.y,u=a+e.width,f=l+e.height,h=this.provider.getContainer().getBoundingClientRect(),p=a-h.left,c=h.right-u,d=l-h.top,k=h.bottom-f,R=Math.min(e.width,e.height)/4,Q=p<0?p-R:c<0?-c+R:0,b=d<0?d-R:k<0?-k+R:0;this.provider.panBy(Q,b),this.popupPositioned.set(e.id,!0)}}else e.setCollapsed(!0),e.isCollapsed()&&e.updateMap(!1)}}const Qn=()=>'<img src="https://arenarium.dev/favicon.svg" alt="Arenarium Maps" style="height: 1.25em; vertical-align: middle;" />',Hi=()=>`<a href="https://arenarium.dev" target="_blank" style="color: inherit;">${Qn()}<span> @arenarium/maps</span></a>`;ne.MapManager=Ut,ne.getAttributionHtml=Hi,ne.getImageHtml=Qn,Object.defineProperty(ne,Symbol.toStringTag,{value:"Module"})}));
|
|
1
|
+
(function(oe,$e){typeof exports=="object"&&typeof module<"u"?$e(exports):typeof define=="function"&&define.amd?define(["exports"],$e):(oe=typeof globalThis<"u"?globalThis:oe||self,$e(oe.ArenariumMaps={}))})(this,(function(oe){"use strict";var er=Array.isArray,gn=Array.prototype.indexOf,_n=Array.from,mt=Object.defineProperty,Ne=Object.getOwnPropertyDescriptor,wn=Object.prototype,En=Array.prototype,kn=Object.getPrototypeOf,tr=Object.isExtensible;function bn(t){for(var e=0;e<t.length;e++)t[e]()}function Mn(){var t,e,r=new Promise((n,i)=>{t=n,e=i});return{promise:r,resolve:t,reject:e}}const O=2,yt=4,rr=8,we=16,ae=32,de=64,gt=128,j=256,et=512,I=1024,K=2048,le=4096,Ee=8192,ke=16384,_t=32768,nr=65536,ir=1<<17,xn=1<<18,be=1<<19,Pn=1<<20,wt=1<<21,Et=1<<22,ve=1<<23,tt=Symbol("$state"),kt=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"};function Sn(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function An(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Cn(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Tn(t){throw new Error("https://svelte.dev/e/effect_orphan")}function Ln(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function In(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Dn(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function On(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Fn(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const Rn=2,M=Symbol();function Nn(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function sr(t){return t===this.v}let ms=!1,z=null;function Me(t){z=t}function bt(t,e=!1,r){z={p:z,c:null,e:null,s:t,x:null,l:null}}function Mt(t){var e=z,r=e.e;if(r!==null){e.e=null;for(var n of r)Er(n)}return t!==void 0&&(e.x=t),z=e.p,t??{}}function or(){return!0}let xe=[];function jn(){var t=xe;xe=[],bn(t)}function rt(t){if(xe.length===0){var e=xe;queueMicrotask(()=>{e===xe&&jn()})}xe.push(t)}const zn=new WeakMap;function ar(t){var e=m;if(e===null)return v.f|=ve,t;if((e.f&_t)===0){if((e.f>)===0)throw!e.parent&&t instanceof Error&&lr(t),t;e.b.error(t)}else Pe(t,e)}function Pe(t,e){for(;e!==null;){if((e.f>)!==0)try{e.b.error(t);return}catch(r){t=r}e=e.parent}throw t instanceof Error&&lr(t),t}function lr(t){const e=zn.get(t);e&&(mt(t,"message",{value:e.message}),mt(t,"stack",{value:e.stack}))}const xt=new Set;let A=null,Pt=new Set,je=[],St=null,At=!1;class ie{current=new Map;#e=new Map;#t=new Set;#a=0;#n=null;#c=!1;#o=[];#i=[];#r=[];#s=[];#l=[];#p=[];#f=[];skipped_effects=new Set;process(e){je=[];for(const i of e)this.#h(i);if(this.#o.length===0&&this.#a===0){this.#d();var r=this.#r,n=this.#s;this.#r=[],this.#s=[],this.#l=[],A=null,ur(r),ur(n),A===null?A=this:xt.delete(this),this.#n?.resolve()}else this.#u(this.#r),this.#u(this.#s),this.#u(this.#l);for(const i of this.#o)Ce(i);for(const i of this.#i)Ce(i);this.#o=[],this.#i=[]}#h(e){e.f^=I;for(var r=e.first;r!==null;){var n=r.f,i=(n&(ae|de))!==0,s=i&&(n&I)!==0,o=s||(n&Ee)!==0||this.skipped_effects.has(r);if(!o&&r.fn!==null){if(i)r.f^=I;else if((n&yt)!==0)this.#s.push(r);else if((n&I)===0)if((n&Et)!==0){var l=r.b?.is_pending()?this.#i:this.#o;l.push(r)}else ot(r)&&((r.f&we)!==0&&this.#l.push(r),Ce(r));var a=r.first;if(a!==null){r=a;continue}}var u=r.parent;for(r=r.next;r===null&&u!==null;)r=u.next,u=u.parent}}#u(e){for(const r of e)((r.f&K)!==0?this.#p:this.#f).push(r),U(r,I);e.length=0}capture(e,r){this.#e.has(e)||this.#e.set(e,r),this.current.set(e,e.v)}activate(){A=this}deactivate(){A=null;for(const e of Pt)if(Pt.delete(e),e(),A!==null)break}neuter(){this.#c=!0}flush(){je.length>0?Bn():this.#d(),A===this&&(this.#a===0&&xt.delete(this),this.deactivate())}#d(){if(!this.#c)for(const e of this.#t)e();this.#t.clear()}increment(){this.#a+=1}decrement(){if(this.#a-=1,this.#a===0){for(const e of this.#p)U(e,K),ze(e);for(const e of this.#f)U(e,le),ze(e);this.#r=[],this.#s=[],this.flush()}else this.deactivate()}add_callback(e){this.#t.add(e)}settled(){return(this.#n??=Mn()).promise}static ensure(){if(A===null){const e=A=new ie;xt.add(A),ie.enqueue(()=>{A===e&&e.flush()})}return A}static enqueue(e){rt(e)}}function Bn(){var t=Se;At=!0;try{var e=0;for(Sr(!0);je.length>0;){var r=ie.ensure();if(e++>1e3){var n,i;Un()}r.process(je),ue.clear()}}finally{At=!1,Sr(t),St=null}}function Un(){try{Ln()}catch(t){Pe(t,St)}}let me=null;function ur(t){var e=t.length;if(e!==0){for(var r=0;r<e;){var n=t[r++];if((n.f&(ke|Ee))===0&&ot(n)&&(me=[],Ce(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null&&n.ac===null?xr(n):n.fn=null),me?.length>0)){ue.clear();for(const i of me)Ce(i);me=[]}}me=null}}function ze(t){for(var e=St=t;e.parent!==null;){e=e.parent;var r=e.f;if(At&&e===m&&(r&we)!==0)return;if((r&(de|ae))!==0){if((r&I)===0)return;e.f^=I}}je.push(e)}function Zn(t){let e=0,r=nt(0),n;return()=>{ni()&&(g(r),Lt(()=>(e===0&&(n=Fr(()=>t(()=>Be(r)))),e+=1,()=>{rt(()=>{e-=1,e===0&&(n?.(),n=void 0,Be(r))})})))}}var qn=nr|be|gt;function Hn(t,e,r){new Yn(t,e,r)}class Yn{parent;#e=!1;#t;#a=null;#n;#c;#o;#i=null;#r=null;#s=null;#l=null;#p=0;#f=0;#h=!1;#u=null;#d=()=>{this.#u&&it(this.#u,this.#p)};#g=Zn(()=>(this.#u=nt(this.#p),()=>{this.#u=null}));constructor(e,r,n){this.#t=e,this.#n=r,this.#c=n,this.parent=m.b,this.#e=!!this.#n.pending,this.#o=ai(()=>{m.b=this;{try{this.#i=ye(()=>n(this.#t))}catch(i){this.error(i)}this.#f>0?this.#m():this.#e=!1}},qn)}#_(){try{this.#i=ye(()=>this.#c(this.#t))}catch(e){this.error(e)}this.#e=!1}#w(){const e=this.#n.pending;e&&(this.#r=ye(()=>e(this.#t)),ie.enqueue(()=>{this.#i=this.#v(()=>(ie.ensure(),ye(()=>this.#c(this.#t)))),this.#f>0?this.#m():(st(this.#r,()=>{this.#r=null}),this.#e=!1)}))}is_pending(){return this.#e||!!this.parent&&this.parent.is_pending()}has_pending_snippet(){return!!this.#n.pending}#v(e){var r=m,n=v,i=z;$(this.#o),D(this.#o),Me(this.#o.ctx);try{return e()}catch(s){return ar(s),null}finally{$(r),D(n),Me(i)}}#m(){const e=this.#n.pending;this.#i!==null&&(this.#l=document.createDocumentFragment(),Vn(this.#i,this.#l)),this.#r===null&&(this.#r=ye(()=>e(this.#t)))}#y(e){if(!this.has_pending_snippet()){this.parent&&this.parent.#y(e);return}this.#f+=e,this.#f===0&&(this.#e=!1,this.#r&&st(this.#r,()=>{this.#r=null}),this.#l&&(this.#t.before(this.#l),this.#l=null))}update_pending_count(e){this.#y(e),this.#p+=e,Pt.add(this.#d)}get_effect_pending(){return this.#g(),g(this.#u)}error(e){var r=this.#n.onerror;let n=this.#n.failed;if(this.#h||!r&&!n)throw e;this.#i&&(Q(this.#i),this.#i=null),this.#r&&(Q(this.#r),this.#r=null),this.#s&&(Q(this.#s),this.#s=null);var i=!1,s=!1;const o=()=>{if(i){Nn();return}i=!0,s&&Fn(),ie.ensure(),this.#p=0,this.#s!==null&&st(this.#s,()=>{this.#s=null}),this.#e=this.has_pending_snippet(),this.#i=this.#v(()=>(this.#h=!1,ye(()=>this.#c(this.#t)))),this.#f>0?this.#m():this.#e=!1};var l=v;try{D(null),s=!0,r?.(e,o),s=!1}catch(a){Pe(a,this.#o&&this.#o.parent)}finally{D(l)}n&&rt(()=>{this.#s=this.#v(()=>{this.#h=!0;try{return ye(()=>{n(this.#t,()=>e,()=>o)})}catch(a){return Pe(a,this.#o.parent),null}finally{this.#h=!1}})})}}function Vn(t,e){for(var r=t.nodes_start,n=t.nodes_end;r!==null;){var i=r===n?null:Tt(r);e.append(r),r=i}}function Xn(t,e,r){const n=Gn;if(e.length===0){r(t.map(n));return}var i=A,s=m,o=Wn();Promise.all(e.map(l=>Kn(l))).then(l=>{i?.activate(),o();try{r([...t.map(n),...l])}catch(a){(s.f&ke)===0&&Pe(a,s)}i?.deactivate(),fr()}).catch(l=>{Pe(l,s)})}function Wn(){var t=m,e=v,r=z,n=A;return function(){$(t),D(e),Me(r),n?.activate()}}function fr(){$(null),D(null),Me(null)}function Gn(t){var e=O|K,r=v!==null&&(v.f&O)!==0?v:null;return m===null||r!==null&&(r.f&j)!==0?e|=j:m.f|=be,{ctx:z,deps:null,effects:null,equals:sr,f:e,fn:t,reactions:null,rv:0,v:M,wv:0,parent:r??m,ac:null}}function Kn(t,e){let r=m;r===null&&Sn();var n=r.b,i=void 0,s=nt(M),o=null,l=!v;return oi(()=>{try{var a=t();o&&Promise.resolve(a).catch(()=>{})}catch(c){a=Promise.reject(c)}var u=()=>a;i=o?.then(u,u)??Promise.resolve(a),o=i;var f=A,h=n.is_pending();l&&(n.update_pending_count(1),h||f.increment());const p=(c,d=void 0)=>{o=null,h||f.activate(),d?d!==kt&&(s.f|=ve,it(s,d)):((s.f&ve)!==0&&(s.f^=ve),it(s,c)),l&&(n.update_pending_count(-1),h||f.decrement()),fr()};if(i.then(p,c=>p(null,c||"unknown")),f)return()=>{queueMicrotask(()=>f.neuter())}}),new Promise(a=>{function u(f){function h(){f===i?a(s):u(i)}f.then(h,h)}u(i)})}function cr(t){var e=t.effects;if(e!==null){t.effects=null;for(var r=0;r<e.length;r+=1)Q(e[r])}}function Jn(t){for(var e=t.parent;e!==null;){if((e.f&O)===0)return e;e=e.parent}return null}function Ct(t){var e,r=m;$(Jn(t));try{cr(t),e=Dr(t)}finally{$(r)}return e}function pr(t){var e=Ct(t);if(t.equals(e)||(t.v=e,t.wv=Lr()),!Ae){var r=(ce||(t.f&j)!==0)&&t.deps!==null?le:I;U(t,r)}}const ue=new Map;function nt(t,e){var r={f:0,v:t,reactions:null,equals:sr,rv:0,wv:0};return r}function C(t,e){const r=nt(t);return ci(r),r}function x(t,e,r=!1){v!==null&&(!V||(v.f&ir)!==0)&&or()&&(v.f&(O|we|Et|ir))!==0&&!se?.includes(t)&&On();let n=r?Ue(e):e;return it(t,n)}function it(t,e){if(!t.equals(e)){var r=t.v;Ae?ue.set(t,e):ue.set(t,r),t.v=e;var n=ie.ensure();n.capture(t,r),(t.f&O)!==0&&((t.f&K)!==0&&Ct(t),U(t,(t.f&j)===0?I:le)),t.wv=Lr(),hr(t,K),m!==null&&(m.f&I)!==0&&(m.f&(ae|de))===0&&(B===null?pi([t]):B.push(t))}return e}function Be(t){x(t,t.v+1)}function hr(t,e){var r=t.reactions;if(r!==null)for(var n=r.length,i=0;i<n;i++){var s=r[i],o=s.f,l=(o&K)===0;l&&U(s,e),(o&O)!==0?hr(s,le):l&&((o&we)!==0&&me!==null&&me.push(s),ze(s))}}function Ue(t){if(typeof t!="object"||t===null||tt in t)return t;const e=kn(t);if(e!==wn&&e!==En)return t;var r=new Map,n=er(t),i=C(0),s=ge,o=l=>{if(ge===s)return l();var a=v,u=ge;D(null),Tr(s);var f=l();return D(a),Tr(u),f};return n&&r.set("length",C(t.length)),new Proxy(t,{defineProperty(l,a,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&In();var f=r.get(a);return f===void 0?f=o(()=>{var h=C(u.value);return r.set(a,h),h}):x(f,u.value,!0),!0},deleteProperty(l,a){var u=r.get(a);if(u===void 0){if(a in l){const f=o(()=>C(M));r.set(a,f),Be(i)}}else x(u,M),Be(i);return!0},get(l,a,u){if(a===tt)return t;var f=r.get(a),h=a in l;if(f===void 0&&(!h||Ne(l,a)?.writable)&&(f=o(()=>{var c=Ue(h?l[a]:M),d=C(c);return d}),r.set(a,f)),f!==void 0){var p=g(f);return p===M?void 0:p}return Reflect.get(l,a,u)},getOwnPropertyDescriptor(l,a){var u=Reflect.getOwnPropertyDescriptor(l,a);if(u&&"value"in u){var f=r.get(a);f&&(u.value=g(f))}else if(u===void 0){var h=r.get(a),p=h?.v;if(h!==void 0&&p!==M)return{enumerable:!0,configurable:!0,value:p,writable:!0}}return u},has(l,a){if(a===tt)return!0;var u=r.get(a),f=u!==void 0&&u.v!==M||Reflect.has(l,a);if(u!==void 0||m!==null&&(!f||Ne(l,a)?.writable)){u===void 0&&(u=o(()=>{var p=f?Ue(l[a]):M,c=C(p);return c}),r.set(a,u));var h=g(u);if(h===M)return!1}return f},set(l,a,u,f){var h=r.get(a),p=a in l;if(n&&a==="length")for(var c=u;c<h.v;c+=1){var d=r.get(c+"");d!==void 0?x(d,M):c in l&&(d=o(()=>C(M)),r.set(c+"",d))}if(h===void 0)(!p||Ne(l,a)?.writable)&&(h=o(()=>C(void 0)),x(h,Ue(u)),r.set(a,h));else{p=h.v!==M;var E=o(()=>Ue(u));x(h,E)}var N=Reflect.getOwnPropertyDescriptor(l,a);if(N?.set&&N.set.call(f,u),!p){if(n&&typeof a=="string"){var ne=r.get("length"),b=Number(a);Number.isInteger(b)&&b>=ne.v&&x(ne,b+1)}Be(i)}return!0},ownKeys(l){g(i);var a=Reflect.ownKeys(l).filter(h=>{var p=r.get(h);return p===void 0||p.v!==M});for(var[u,f]of r)f.v!==M&&!(u in l)&&a.push(u);return a},setPrototypeOf(){Dn()}})}var dr,vr,mr,yr;function Qn(){if(dr===void 0){dr=window,vr=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,r=Text.prototype;mr=Ne(e,"firstChild").get,yr=Ne(e,"nextSibling").get,tr(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),tr(r)&&(r.__t=void 0)}}function $n(t=""){return document.createTextNode(t)}function gr(t){return mr.call(t)}function Tt(t){return yr.call(t)}function _r(t,e){return gr(t)}function ei(t,e=1,r=!1){let n=t;for(;e--;)n=Tt(n);return n}function wr(t){var e=v,r=m;D(null),$(null);try{return t()}finally{D(e),$(r)}}function ti(t){m===null&&v===null&&Tn(),v!==null&&(v.f&j)!==0&&m===null&&Cn(),Ae&&An()}function ri(t,e){var r=e.last;r===null?e.last=e.first=t:(r.next=t,t.prev=r,e.last=t)}function fe(t,e,r,n=!0){var i=m;i!==null&&(i.f&Ee)!==0&&(t|=Ee);var s={ctx:z,deps:null,nodes_start:null,nodes_end:null,f:t|K,first:null,fn:e,last:null,next:null,parent:i,b:i&&i.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(r)try{Ce(s),s.f|=_t}catch(a){throw Q(s),a}else e!==null&&ze(s);if(n){var o=s;if(r&&o.deps===null&&o.teardown===null&&o.nodes_start===null&&o.first===o.last&&(o.f&be)===0&&(o=o.first),o!==null&&(o.parent=i,i!==null&&ri(o,i),v!==null&&(v.f&O)!==0&&(t&de)===0)){var l=v;(l.effects??=[]).push(o)}}return s}function ni(){return v!==null&&!V}function J(t){ti();var e=m.f,r=!v&&(e&ae)!==0&&(e&_t)===0;if(r){var n=z;(n.e??=[]).push(t)}else return Er(t)}function Er(t){return fe(yt|Pn,t,!1)}function ii(t){ie.ensure();const e=fe(de|be,t,!0);return(r={})=>new Promise(n=>{r.outro?st(e,()=>{Q(e),n(void 0)}):(Q(e),n(void 0))})}function si(t){return fe(yt,t,!1)}function oi(t){return fe(Et|be,t,!0)}function Lt(t,e=0){return fe(rr|e,t,!0)}function kr(t,e=[],r=[]){Xn(e,r,n=>{fe(rr,()=>t(...n.map(g)),!0)})}function ai(t,e=0){var r=fe(we|e,t,!0);return r}function ye(t,e=!0){return fe(ae|be,t,!0,e)}function br(t){var e=t.teardown;if(e!==null){const r=Ae,n=v;Ar(!0),D(null);try{e.call(null)}finally{Ar(r),D(n)}}}function Mr(t,e=!1){var r=t.first;for(t.first=t.last=null;r!==null;){const i=r.ac;i!==null&&wr(()=>{i.abort(kt)});var n=r.next;(r.f&de)!==0?r.parent=null:Q(r,e),r=n}}function li(t){for(var e=t.first;e!==null;){var r=e.next;(e.f&ae)===0&&Q(e),e=r}}function Q(t,e=!0){var r=!1;(e||(t.f&xn)!==0)&&t.nodes_start!==null&&t.nodes_end!==null&&(ui(t.nodes_start,t.nodes_end),r=!0),Mr(t,e&&!r),at(t,0),U(t,ke);var n=t.transitions;if(n!==null)for(const s of n)s.stop();br(t);var i=t.parent;i!==null&&i.first!==null&&xr(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=t.ac=null}function ui(t,e){for(;t!==null;){var r=t===e?null:Tt(t);t.remove(),t=r}}function xr(t){var e=t.parent,r=t.prev,n=t.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),e!==null&&(e.first===t&&(e.first=n),e.last===t&&(e.last=r))}function st(t,e){var r=[];Pr(t,r,!0),fi(r,()=>{Q(t),e&&e()})}function fi(t,e){var r=t.length;if(r>0){var n=()=>--r||e();for(var i of t)i.out(n)}else e()}function Pr(t,e,r){if((t.f&Ee)===0){if(t.f^=Ee,t.transitions!==null)for(const o of t.transitions)(o.is_global||r)&&e.push(o);for(var n=t.first;n!==null;){var i=n.next,s=(n.f&nr)!==0||(n.f&ae)!==0;Pr(n,e,s?r:!1),n=i}}}let Se=!1;function Sr(t){Se=t}let Ae=!1;function Ar(t){Ae=t}let v=null,V=!1;function D(t){v=t}let m=null;function $(t){m=t}let se=null;function ci(t){v!==null&&(se===null?se=[t]:se.push(t))}let T=null,F=0,B=null;function pi(t){B=t}let Cr=1,Ze=0,ge=Ze;function Tr(t){ge=t}let ce=!1;function Lr(){return++Cr}function ot(t){var e=t.f;if((e&K)!==0)return!0;if((e&le)!==0){var r=t.deps,n=(e&j)!==0;if(r!==null){var i,s,o=(e&et)!==0,l=n&&m!==null&&!ce,a=r.length;if((o||l)&&(m===null||(m.f&ke)===0)){var u=t,f=u.parent;for(i=0;i<a;i++)s=r[i],(o||!s?.reactions?.includes(u))&&(s.reactions??=[]).push(u);o&&(u.f^=et),l&&f!==null&&(f.f&j)===0&&(u.f^=j)}for(i=0;i<a;i++)if(s=r[i],ot(s)&&pr(s),s.wv>t.wv)return!0}(!n||m!==null&&!ce)&&U(t,I)}return!1}function Ir(t,e,r=!0){var n=t.reactions;if(n!==null&&!se?.includes(t))for(var i=0;i<n.length;i++){var s=n[i];(s.f&O)!==0?Ir(s,e,!1):e===s&&(r?U(s,K):(s.f&I)!==0&&U(s,le),ze(s))}}function Dr(t){var e=T,r=F,n=B,i=v,s=ce,o=se,l=z,a=V,u=ge,f=t.f;T=null,F=0,B=null,ce=(f&j)!==0&&(V||!Se||v===null),v=(f&(ae|de))===0?t:null,se=null,Me(t.ctx),V=!1,ge=++Ze,t.ac!==null&&(wr(()=>{t.ac.abort(kt)}),t.ac=null);try{t.f|=wt;var h=t.fn,p=h(),c=t.deps;if(T!==null){var d;if(at(t,F),c!==null&&F>0)for(c.length=F+T.length,d=0;d<T.length;d++)c[F+d]=T[d];else t.deps=c=T;if(!ce||(f&O)!==0&&t.reactions!==null)for(d=F;d<c.length;d++)(c[d].reactions??=[]).push(t)}else c!==null&&F<c.length&&(at(t,F),c.length=F);if(or()&&B!==null&&!V&&c!==null&&(t.f&(O|le|K))===0)for(d=0;d<B.length;d++)Ir(B[d],t);return i!==null&&i!==t&&(Ze++,B!==null&&(n===null?n=B:n.push(...B))),(t.f&ve)!==0&&(t.f^=ve),p}catch(E){return ar(E)}finally{t.f^=wt,T=e,F=r,B=n,v=i,ce=s,se=o,Me(l),V=a,ge=u}}function hi(t,e){let r=e.reactions;if(r!==null){var n=gn.call(r,t);if(n!==-1){var i=r.length-1;i===0?r=e.reactions=null:(r[n]=r[i],r.pop())}}r===null&&(e.f&O)!==0&&(T===null||!T.includes(e))&&(U(e,le),(e.f&(j|et))===0&&(e.f^=et),cr(e),at(e,0))}function at(t,e){var r=t.deps;if(r!==null)for(var n=e;n<r.length;n++)hi(t,r[n])}function Ce(t){var e=t.f;if((e&ke)===0){U(t,I);var r=m,n=Se;m=t,Se=!0;try{(e&we)!==0?li(t):Mr(t),br(t);var i=Dr(t);t.teardown=typeof i=="function"?i:null,t.wv=Cr;var s}finally{Se=n,m=r}}}function g(t){var e=t.f,r=(e&O)!==0;if(v!==null&&!V){var n=m!==null&&(m.f&ke)!==0;if(!n&&!se?.includes(t)){var i=v.deps;if((v.f&wt)!==0)t.rv<Ze&&(t.rv=Ze,T===null&&i!==null&&i[F]===t?F++:T===null?T=[t]:(!ce||!T.includes(t))&&T.push(t));else{(v.deps??=[]).push(t);var s=t.reactions;s===null?t.reactions=[v]:s.includes(v)||s.push(v)}}}else if(r&&t.deps===null&&t.effects===null){var o=t,l=o.parent;l!==null&&(l.f&j)===0&&(o.f^=j)}if(Ae){if(ue.has(t))return ue.get(t);if(r){o=t;var a=o.v;return((o.f&I)===0&&o.reactions!==null||Or(o))&&(a=Ct(o)),ue.set(o,a),a}}else r&&(o=t,ot(o)&&pr(o));if((t.f&ve)!==0)throw t.v;return t.v}function Or(t){if(t.v===M)return!0;if(t.deps===null)return!1;for(const e of t.deps)if(ue.has(e)||(e.f&O)!==0&&Or(e))return!0;return!1}function Fr(t){var e=V;try{return V=!0,t()}finally{V=e}}const di=-7169;function U(t,e){t.f=t.f&di|e}const vi=["touchstart","touchmove"];function mi(t){return vi.includes(t)}const yi=new Set,Rr=new Set;let Nr=null;function lt(t){var e=this,r=e.ownerDocument,n=t.type,i=t.composedPath?.()||[],s=i[0]||t.target;Nr=t;var o=0,l=Nr===t&&t.__root;if(l){var a=i.indexOf(l);if(a!==-1&&(e===document||e===window)){t.__root=e;return}var u=i.indexOf(e);if(u===-1)return;a<=u&&(o=a)}if(s=i[o]||t.target,s!==e){mt(t,"currentTarget",{configurable:!0,get(){return s||r}});var f=v,h=m;D(null),$(null);try{for(var p,c=[];s!==null;){var d=s.assignedSlot||s.parentNode||s.host||null;try{var E=s["__"+n];if(E!=null&&(!s.disabled||t.target===s))if(er(E)){var[N,...ne]=E;N.apply(s,[t,...ne])}else E.call(s,t)}catch(b){p?c.push(b):p=b}if(t.cancelBubble||d===e||d===null)break;s=d}if(p){for(let b of c)queueMicrotask(()=>{throw b});throw p}}finally{t.__root=e,delete t.currentTarget,D(f),$(h)}}}function gi(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function _i(t,e){var r=m;r.nodes_start===null&&(r.nodes_start=t,r.nodes_end=e)}function jr(t,e){var r=(e&Rn)!==0,n,i=!t.startsWith("<!>");return()=>{n===void 0&&(n=gi(i?t:"<!>"+t),n=gr(n));var s=r||vr?document.importNode(n,!0):n.cloneNode(!0);return _i(s,s),s}}function zr(t,e){t!==null&&t.before(e)}function It(t,e){return wi(t,e)}const Te=new Map;function wi(t,{target:e,anchor:r,props:n={},events:i,context:s,intro:o=!0}){Qn();var l=new Set,a=h=>{for(var p=0;p<h.length;p++){var c=h[p];if(!l.has(c)){l.add(c);var d=mi(c);e.addEventListener(c,lt,{passive:d});var E=Te.get(c);E===void 0?(document.addEventListener(c,lt,{passive:d}),Te.set(c,1)):Te.set(c,E+1)}}};a(_n(yi)),Rr.add(a);var u=void 0,f=ii(()=>{var h=r??e.appendChild($n());return Hn(h,{pending:()=>{}},p=>{if(s){bt({});var c=z;c.c=s}i&&(n.$$events=i),u=t(p,n)||{},s&&Mt()}),()=>{for(var p of l){e.removeEventListener(p,lt);var c=Te.get(p);--c===0?(document.removeEventListener(p,lt),Te.delete(p)):Te.set(p,c)}Rr.delete(a),h!==r&&h.parentNode?.removeChild(h)}});return Ei.set(u,f),u}let Ei=new WeakMap;function Br(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(r=Br(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function ki(){for(var t,e,r=0,n="",i=arguments.length;r<i;r++)(t=arguments[r])&&(e=Br(t))&&(n&&(n+=" "),n+=e);return n}function Ur(t){return typeof t=="object"?ki(t):t??""}function bi(t,e,r){var n=t==null?"":""+t;return e&&(n=n?n+" "+e:e),n===""?null:n}function Zr(t,e=!1){var r=e?" !important;":";",n="";for(var i in t){var s=t[i];s!=null&&s!==""&&(n+=" "+i+": "+s+r)}return n}function Mi(t,e){if(e){var r="",n,i;return Array.isArray(e)?(n=e[0],i=e[1]):n=e,n&&(r+=Zr(n)),i&&(r+=Zr(i,!0)),r=r.trim(),r===""?null:r}return String(t)}function qr(t,e,r,n,i,s){var o=t.__className;if(o!==r||o===void 0){var l=bi(r,n);l==null?t.removeAttribute("class"):t.className=l,t.__className=r}return s}function Dt(t,e={},r,n){for(var i in r){var s=r[i];e[i]!==s&&(r[i]==null?t.style.removeProperty(i):t.style.setProperty(i,s,n))}}function qe(t,e,r,n){var i=t.__style;if(i!==e){var s=Mi(e,n);s==null?t.removeAttribute("style"):t.style.cssText=s,t.__style=e}else n&&(Array.isArray(n)?(Dt(t,r?.[0],n[0]),Dt(t,r?.[1],n[1],"important")):Dt(t,r,n));return n}const xi=()=>performance.now(),ee={tick:t=>requestAnimationFrame(t),now:()=>xi(),tasks:new Set};function Hr(){const t=ee.now();ee.tasks.forEach(e=>{e.c(t)||(ee.tasks.delete(e),e.f())}),ee.tasks.size!==0&&ee.tick(Hr)}function Pi(t){let e;return ee.tasks.size===0&&ee.tick(Hr),{promise:new Promise(r=>{ee.tasks.add(e={c:t,f:r})}),abort(){ee.tasks.delete(e)}}}function Yr(t,e){return t===e||t?.[tt]===e}function He(t={},e,r,n){return si(()=>{var i,s;return Lt(()=>{i=s,s=[],Fr(()=>{t!==r(...s)&&(e(t,...s),i&&Yr(r(...i),t)&&e(null,...i))})}),()=>{rt(()=>{s&&Yr(r(...s),t)&&e(null,...s)})}}),t}const Si="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(Si);function Ai(t){return t}function Ot(t){return-.5*(Math.cos(Math.PI*t)-1)}function Ci(t){const e=Math.cos(t*Math.PI*.5);return Math.abs(e)<1e-14?1:1-e}function Ti(t){return Math.sin(t*Math.PI/2)}const Li=128,Ii=0,Di=1,Oi=2;class Fi{animationsStarted=!1;animationsCount=0;animationsLimit=Li;layers=new Array;start(){window.requestAnimationFrame(this.tick.bind(this))}tick(){try{this.animationsCount=0;for(let e=0;e<this.layers.length;e++){const r=this.layers[e];if(r==null)continue;const n=r.animations;if(n!=null)for(let i=0;i<n.length;i++){const s=n[i];if(s!=null){for(const o of s.values())if(!o.executed&&(o.executed=!0,o.function(),this.animationsCount++,this.animationsCount==this.animationsLimit))return}}}}catch{}finally{window.requestAnimationFrame(this.tick.bind(this))}}equeue(e,r,n,i){let s=this.layers[e];s==null&&(s=this.layers[e]={animations:new Array});let o=s.animations[r];o==null&&(o=s.animations[r]=new Map);let l={id:n,priority:r,executed:!1,function:i};o.set(n,l),this.animationsStarted==!1&&(this.animationsStarted=!0,this.start())}clear(e,r){for(let n=0;n<this.layers.length;n++){let i=this.layers[n];if(i==null)continue;let s=i.animations[e];if(s==null)return;let o=s.get(r);if(o==null||o.executed==!1)return;s.delete(r)}}speed(){return Math.pow(2,2*this.animationsCount/this.animationsLimit)}stacked(){return this.animationsCount==this.animationsLimit}setLimit(e){this.animationsLimit=e}}const pe=new Fi;function Vr(t){return Object.prototype.toString.call(t)==="[object Date]"}function Ft(t,e){if(t===e||t!==t)return()=>t;const r=typeof t;if(r!==typeof e||Array.isArray(t)!==Array.isArray(e))throw new Error("Cannot interpolate values of different type");if(Array.isArray(t)){const n=e.map((i,s)=>Ft(t[s],i));return i=>n.map(s=>s(i))}if(r==="object"){if(!t||!e)throw new Error("Object cannot be null");if(Vr(t)&&Vr(e)){const s=t.getTime(),l=e.getTime()-s;return a=>new Date(s+a*l)}const n=Object.keys(e),i={};return n.forEach(s=>{i[s]=Ft(t[s],e[s])}),s=>{const o={};return n.forEach(l=>{o[l]=i[l](s)}),o}}if(r==="number"){const n=e-t;return i=>t+i*n}return()=>e}class Rt{#e;#t;#a;#n=null;constructor(e,r={}){this.#e=C(e),this.#t=C(e),this.#a=r}static of(e,r){const n=new Rt(e(),r);return Lt(()=>{n.set(e())}),n}set(e,r){x(this.#t,e);let{delay:n=0,duration:i=400,easing:s=Ai,interpolate:o=Ft}={...this.#a,...r};if(i===0)return this.#n?.abort(),x(this.#e,e),Promise.resolve();const l=ee.now()+n;let a,u=!1,f=this.#n;return this.#n=Pi(h=>{if(h<l)return!0;if(!u){u=!0;const c=this.#e.v;a=o(c,e),typeof i=="function"&&(i=i(c,e)),f?.abort()}const p=h-l;return p>i?(x(this.#e,e),!1):(x(this.#e,a(s(p/i))),!0)}),this.#n.promise}get current(){return g(this.#e)}get target(){return g(this.#t)}set target(e){this.set(e)}}class ut{value;motion;constructor(e,r){this.value=e,this.motion=new Rt(e,r)}set(e,r){this.value=e,this.motion.set(e,r)}update(e){this.motion.set(this.value,e)}snap(){this.motion.set(this.value,{duration:0})}}var Ri=jr("<div></div>");function Ni(t,e){bt(e,!0);let r=e.style.width,n=e.style.height,i=e.style.radius,s=e.colors?.background??"darkgreen",o=e.colors?.border??"white",l=e.colors?.shadow??"0px 2px 2px rgba(0, 0, 0, 0.5)",a;function u(){return a}let f=C(!1);function h(k){x(f,k,!0)}function p(){return g(f)}let c=C(!0),d=0,E=150;function N(k){k!=g(c)&&(x(c,k,!0),d=performance.now())}function ne(){return performance.now()-d<E?W.motion.current==0:W.value==0}let b=0,W=new ut(0,{easing:Ot});J(()=>{g(f)==!1&&(W.snap(),pe.clear(e.priority,e.id))}),J(()=>{W.set(g(c)?0:b,{duration:75})}),J(()=>{ht(W.motion.current)});function ht(k){a&&pe.equeue(e.layer,e.priority,e.id,()=>{a.style.scale=k.toString(),a.style.filter=`brightness(${.25+.75*k})`})}function Xt(k){k!=b&&(b=k,W.set(k,{duration:75}))}function Wt(){return W.value}var Gt={getBody:u,setDisplayed:h,getDisplayed:p,setCollapsed:N,getCollapsed:ne,setScale:Xt,getScale:Wt},S=Ri();let dt;return He(S,k=>a=k,()=>a),kr(k=>{qr(S,1,Ur(["pin",g(f)&&"displayed"]),"svelte-zz3jrb"),dt=qe(S,"",dt,k)},[()=>({width:`${r}px`,height:`${n}px`,"border-radius":`${i}px`,"border-color":o,"background-color":s,"box-shadow":l})]),zr(t,S),Mt(Gt)}class Ye{provider;providerMarker;id;lat;lng;shown;element;component;constructor(e,r){if(new.target===Ye)throw new Error("Cannot instantiate an abstract class directly.");this.provider=e,this.id=r.id,this.lat=r.lat,this.lng=r.lng,this.shown=!0}create(){this.createElement(),this.createMarker(),this.setZIndex()}remove(){this.removeMarker()}createElement(){throw new Error("Create element not implemented")}createMarker(){const e=this.element;if(!e)throw new Error("Failed to create provider marker");this.providerMarker=this.provider.createMarker(e,this.lat,this.lng,this.getZindex())}updateMarker(e){if(this.providerMarker==null)throw new Error("Failed to update provider marker map");e?this.providerMarker.inserted()==!1&&this.providerMarker.insert():this.providerMarker.inserted()==!0&&this.providerMarker.remove()}removeMarker(){this.providerMarker?.remove()}setZIndex(){if(this.providerMarker==null)throw new Error("Failed to update provider marker z-index");this.providerMarker.update(this.getZindex())}getZindex(){throw new Error("Get z-index not implemented")}}var Nt;function Xr(t){return{lang:t?.lang??Nt?.lang,message:t?.message,abortEarly:t?.abortEarly??Nt?.abortEarly,abortPipeEarly:t?.abortPipeEarly??Nt?.abortPipeEarly}}var ji;function zi(t){return ji?.get(t)}var Bi;function Ui(t){return Bi?.get(t)}var Zi;function qi(t,e){return Zi?.get(t)?.get(e)}function Ve(t){const e=typeof t;return e==="string"?`"${t}"`:e==="number"||e==="bigint"||e==="boolean"?`${t}`:e==="object"||e==="function"?(t&&Object.getPrototypeOf(t)?.constructor?.name)??"null":e}function P(t,e,r,n,i){const s=i&&"input"in i?i.input:r.value,o=i?.expected??t.expects??null,l=i?.received??Ve(s),a={kind:t.kind,type:t.type,input:s,expected:o,received:l,message:`Invalid ${e}: ${o?`Expected ${o} but r`:"R"}eceived ${l}`,requirement:t.requirement,path:i?.path,issues:i?.issues,lang:n.lang,abortEarly:n.abortEarly,abortPipeEarly:n.abortPipeEarly},u=t.kind==="schema",f=i?.message??t.message??qi(t.reference,a.lang)??(u?Ui(a.lang):null)??n.message??zi(a.lang);f!==void 0&&(a.message=typeof f=="function"?f(a):f),u&&(r.typed=!1),r.issues?r.issues.push(a):r.issues=[a]}function R(t){return{version:1,vendor:"valibot",validate(e){return t["~run"]({value:e},Xr())}}}var ft=class extends Error{constructor(t){super(t[0].message),this.name="ValiError",this.issues=t}};function Z(t){return{kind:"transformation",type:"args",reference:Z,async:!1,schema:t,"~run"(e,r){const n=e.value;return e.value=(...i)=>{const s=this.schema["~run"]({value:i},r);if(s.issues)throw new ft(s.issues);return n(...s.value)},e}}}function Wr(){return{kind:"transformation",type:"await",reference:Wr,async:!0,async"~run"(t){return t.value=await t.value,t}}}function Gr(t,e){return{kind:"validation",type:"check",reference:Gr,async:!1,expects:null,requirement:t,message:e,"~run"(r,n){return r.typed&&!this.requirement(r.value)&&P(this,"input",r,n),r}}}function Kr(t,e){return{kind:"validation",type:"length",reference:Kr,async:!1,expects:`${t}`,requirement:t,message:e,"~run"(r,n){return r.typed&&r.value.length!==this.requirement&&P(this,"length",r,n,{received:`${r.value.length}`}),r}}}function Le(t,e){return{kind:"validation",type:"max_value",reference:Le,async:!1,expects:`<=${t instanceof Date?t.toJSON():Ve(t)}`,requirement:t,message:e,"~run"(r,n){return r.typed&&!(r.value<=this.requirement)&&P(this,"value",r,n,{received:r.value instanceof Date?r.value.toJSON():Ve(r.value)}),r}}}function jt(t,e){return{kind:"validation",type:"min_length",reference:jt,async:!1,expects:`>=${t}`,requirement:t,message:e,"~run"(r,n){return r.typed&&r.value.length<this.requirement&&P(this,"length",r,n,{received:`${r.value.length}`}),r}}}function te(t,e){return{kind:"validation",type:"min_value",reference:te,async:!1,expects:`>=${t instanceof Date?t.toJSON():Ve(t)}`,requirement:t,message:e,"~run"(r,n){return r.typed&&!(r.value>=this.requirement)&&P(this,"value",r,n,{received:r.value instanceof Date?r.value.toJSON():Ve(r.value)}),r}}}function X(t){return{kind:"transformation",type:"returns",reference:X,async:!1,schema:t,"~run"(e,r){const n=e.value;return e.value=(...i)=>{const s=this.schema["~run"]({value:n(...i)},r);if(s.issues)throw new ft(s.issues);return s.value},e}}}function Jr(t){return{kind:"transformation",type:"returns",reference:Jr,async:!1,schema:t,"~run"(e,r){const n=e.value;return e.value=async(...i)=>{const s=await this.schema["~run"]({value:await n(...i)},r);if(s.issues)throw new ft(s.issues);return s.value},e}}}function Hi(t,e,r){return typeof t.fallback=="function"?t.fallback(e,r):t.fallback}function Qr(t,e,r){return typeof t.default=="function"?t.default(e,r):t.default}function $r(t,e){return{kind:"schema",type:"array",reference:$r,expects:"Array",async:!1,item:t,message:e,get"~standard"(){return R(this)},"~run"(r,n){const i=r.value;if(Array.isArray(i)){r.typed=!0,r.value=[];for(let s=0;s<i.length;s++){const o=i[s],l=this.item["~run"]({value:o},n);if(l.issues){const a={type:"array",origin:"value",input:i,key:s,value:o};for(const u of l.issues)u.path?u.path.unshift(a):u.path=[a],r.issues?.push(u);if(r.issues||(r.issues=l.issues),n.abortEarly){r.typed=!1;break}}l.typed||(r.typed=!1),r.value.push(l.value)}}else P(this,"type",r,n);return r}}}function en(t){return{kind:"schema",type:"boolean",reference:en,expects:"boolean",async:!1,message:t,get"~standard"(){return R(this)},"~run"(e,r){return typeof e.value=="boolean"?e.typed=!0:P(this,"type",e,r),e}}}function tn(t,e){return{kind:"schema",type:"custom",reference:tn,expects:"unknown",async:!1,check:t,message:e,get"~standard"(){return R(this)},"~run"(r,n){return this.check(r.value)?r.typed=!0:P(this,"type",r,n),r}}}function q(t){return{kind:"schema",type:"function",reference:q,expects:"Function",async:!1,message:t,get"~standard"(){return R(this)},"~run"(e,r){return typeof e.value=="function"?e.typed=!0:P(this,"type",e,r),e}}}function w(t){return{kind:"schema",type:"number",reference:w,expects:"number",async:!1,message:t,get"~standard"(){return R(this)},"~run"(e,r){return typeof e.value=="number"&&!isNaN(e.value)?e.typed=!0:P(this,"type",e,r),e}}}function L(t,e){return{kind:"schema",type:"object",reference:L,expects:"Object",async:!1,entries:t,message:e,get"~standard"(){return R(this)},"~run"(r,n){const i=r.value;if(i&&typeof i=="object"){r.typed=!0,r.value={};for(const s in this.entries){const o=this.entries[s];if(s in i||(o.type==="exact_optional"||o.type==="optional"||o.type==="nullish")&&o.default!==void 0){const l=s in i?i[s]:Qr(o),a=o["~run"]({value:l},n);if(a.issues){const u={type:"object",origin:"value",input:i,key:s,value:l};for(const f of a.issues)f.path?f.path.unshift(u):f.path=[u],r.issues?.push(f);if(r.issues||(r.issues=a.issues),n.abortEarly){r.typed=!1;break}}a.typed||(r.typed=!1),r.value[s]=a.value}else if(o.fallback!==void 0)r.value[s]=Hi(o);else if(o.type!=="exact_optional"&&o.type!=="optional"&&o.type!=="nullish"&&(P(this,"key",r,n,{input:void 0,expected:`"${s}"`,path:[{type:"object",origin:"key",input:i,key:s,value:i[s]}]}),n.abortEarly))break}}else P(this,"type",r,n);return r}}}function H(t,e){return{kind:"schema",type:"optional",reference:H,expects:`(${t.expects} | undefined)`,async:!1,wrapped:t,default:e,get"~standard"(){return R(this)},"~run"(r,n){return r.value===void 0&&(this.default!==void 0&&(r.value=Qr(this,r,n)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function rn(t){return{kind:"schema",type:"promise",reference:rn,expects:"Promise",async:!1,message:t,get"~standard"(){return R(this)},"~run"(e,r){return e.value instanceof Promise?e.typed=!0:P(this,"type",e,r),e}}}function re(t){return{kind:"schema",type:"string",reference:re,expects:"string",async:!1,message:t,get"~standard"(){return R(this)},"~run"(e,r){return typeof e.value=="string"?e.typed=!0:P(this,"type",e,r),e}}}function Y(t,e){return{kind:"schema",type:"tuple",reference:Y,expects:"Array",async:!1,items:t,message:e,get"~standard"(){return R(this)},"~run"(r,n){const i=r.value;if(Array.isArray(i)){r.typed=!0,r.value=[];for(let s=0;s<this.items.length;s++){const o=i[s],l=this.items[s]["~run"]({value:o},n);if(l.issues){const a={type:"array",origin:"value",input:i,key:s,value:o};for(const u of l.issues)u.path?u.path.unshift(a):u.path=[a],r.issues?.push(u);if(r.issues||(r.issues=l.issues),n.abortEarly){r.typed=!1;break}}l.typed||(r.typed=!1),r.value.push(l.value)}}else P(this,"type",r,n);return r}}}function Xe(t){return{kind:"schema",type:"void",reference:Xe,expects:"void",async:!1,message:t,get"~standard"(){return R(this)},"~run"(e,r){return e.value===void 0?e.typed=!0:P(this,"type",e,r),e}}}function ct(t,e,r){const n=t["~run"]({value:e},Xr(r));if(n.issues)throw new ft(n.issues);return n.value}function _(...t){return{...t[0],pipe:t,get"~standard"(){return R(this)},"~run"(e,r){for(const n of t)if(n.kind!=="metadata"){if(e.issues&&(n.kind==="schema"||n.kind==="transformation")){e.typed=!1;break}(!e.issues||!r.abortEarly&&!r.abortPipeEarly)&&(e=n["~run"](e,r))}return e}}}function Yi(...t){return{...t[0],pipe:t,async:!0,get"~standard"(){return R(this)},async"~run"(e,r){for(const n of t)if(n.kind!=="metadata"){if(e.issues&&(n.kind==="schema"||n.kind==="transformation")){e.typed=!1;break}(!e.issues||!r.abortEarly&&!r.abortPipeEarly)&&(e=await n["~run"](e,r))}return e}}}const zt=_(w(),te(-90),Le(90)),Bt=_(w(),te(-180),Le(180)),Vi=L({sw:L({lat:zt,lng:Bt}),ne:L({lat:zt,lng:Bt})}),Ut=tn(t=>t instanceof HTMLElement,"Must be an HTMLElement"),Xi=L({getParameters:_(q(),Z(Y([])),X(L({mapSize:_(w(),te(1)),zoomMin:_(w(),te(0)),zoomMax:_(w(),te(0)),zoomScale:_(w(),te(1),Le(10))}))),getContainer:_(q(),Z(Y([])),X(Ut)),getZoom:_(q(),Z(Y([])),X(w())),getBounds:_(q(),Z(Y([])),X(Vi)),panBy:_(q(),Z(Y([w(),w()])),X(Xe())),createMarker:_(q(),Z(Y([Ut,zt,Bt,w()])),X(L({inserted:_(q(),Z(Y([])),X(en())),insert:_(q(),Z(Y([])),X(Xe())),remove:_(q(),Z(Y([])),X(Xe())),update:_(q(),Z(Y([w()])),X(Xe()))})))}),Zt=_(q(),Z(Y([re()])),Jr(Yi(rn(),Wr(),Ut))),Wi=L({background:H(re()),border:H(re()),shadow:H(re())}),Gi=L({width:w(),height:w(),radius:w()}),nn=L({background:H(re()),shadow:H(re())}),sn=_(L({width:w(),height:w(),margin:w(),radius:w()}),Gr(t=>Math.min(t.width,t.height)/t.margin>=6,"Minimum of width or height must be greater than or equal to 6 * margin")),Ki=$r(L({id:_(re(),jt(1)),rank:_(w(),te(0)),lat:_(w(),te(-90),Le(90)),lng:_(w(),te(-180),Le(180)),tooltip:L({body:Zt,style:sn,colors:H(nn)}),pin:H(L({body:Zt,style:H(Gi),colors:H(Wi)})),popup:H(L({body:Zt,style:sn,colors:H(nn)}))}));class We extends Ye{static DEFAULT_SIZE=16;style;colors;zoom;bodyLoading=!1;bodyLoaded=!1;bodyCallback;constructor(e,r,n){super(e,r),this.style=r.pin?.style??{width:We.DEFAULT_SIZE,height:We.DEFAULT_SIZE,radius:We.DEFAULT_SIZE},this.colors=r.pin?.colors,this.zoom=n,this.bodyCallback=r.pin?.body}createElement(){this.element=document.createElement("div"),this.element.classList.add("pin"),this.component=It(Ni,{target:this.element,props:{id:this.id+"_pin",layer:Oi,priority:this.zoom*this.provider.getParameters().zoomScale,style:this.style,colors:this.colors}})}update(e){this.zoom=e[0],this.setZIndex()}updateMarker(e){super.updateMarker(e),this.component?.setDisplayed(e)}updateBody(){if(this.bodyCallback==null||this.bodyLoaded||this.bodyLoading)return;const e=this.component?.getBody();e!=null&&(this.bodyLoading=!0,this.bodyCallback(this.id).then(r=>{r instanceof HTMLElement?e.appendChild(r):console.error("Failed to load pin body")}).catch(r=>console.error(r)).finally(()=>{this.bodyLoaded=!0,this.bodyLoading=!1}))}setCollapsed(e){if(this.component==null)throw new Error("Failed to set pin collapsed");this.component.setCollapsed(e)}setScale(e){if(this.component==null)throw new Error("Failed to set pin scale");this.component.setScale(e)}getScaleFromZoomDistance(e){return this.zoom<e?1:Math.max(0,1-(this.zoom-e)*.125)}getZindex(){const e=this.provider.getParameters();return Math.round((e.zoomMax-this.zoom)*e.zoomScale)}isCollapsed(){return this.component==null?!1:this.component.getCollapsed()}isBodyLoaded(){return this.bodyCallback==null||this.bodyLoaded}}var Ge;(t=>{function e(r,n,i){const s=r/2,o=n/2,l=Math.sqrt(s*s+o*o),a=Math.atan(o/s)*(180/Math.PI),u=i*(Math.PI/180);return i<180?i<90?i<a?{x:0,y:l*Math.sin(u)-o}:{x:l*Math.cos(u)-s,y:0}:i<180-a?{x:l*Math.cos(u)-s,y:0}:{x:-r,y:l*Math.sin(u)-o}:i<270?i<180+a?{x:-r,y:l*Math.sin(u)-o}:{x:l*Math.cos(u)-s,y:-n}:i<360-a?{x:l*Math.cos(u)-s,y:-n}:{x:0,y:l*Math.sin(u)-o}}t.getOffsets=e})(Ge||(Ge={}));var Ji=jr('<div><div class="pointer svelte-11extwn"></div> <div class="bubble svelte-11extwn"><div class="body svelte-11extwn"></div></div></div>');function on(t,e){bt(e,!0);let r=e.style.width,n=e.style.height,i=e.style.margin,s=e.style.radius,o=e.colors?.background??"white",l=e.colors?.shadow??"0px 2px 2px rgba(0, 0, 0, 0.5)",a,u,f,h;const p=r+2*i,c=n+2*i,d=()=>h;J(()=>{f.style.width=`${i*4}px`,f.style.height=`${i*4}px`});let E=C(!0);function N(y){x(E,y,!0)}function ne(){return g(E)}let b=C(!0),W=0,ht=300;function Xt(y){y!=g(b)&&(x(b,y,!0),W=performance.now())}function Wt(){return performance.now()-W<ht?S.motion.current==0:S.value==0}function Gt(){return performance.now()-W<ht?S.motion.current==1:S.value==1}let S=new ut(0);J(()=>{g(E)==!1&&(S.snap(),pe.clear(e.priority,e.id+"_scale"))}),J(()=>{g(b)==!0&&S.value!=0&&(pe.stacked()?S.set(0,{duration:0}):S.set(0,{duration:150,easing:Ci})),g(b)==!1&&S.value!=1&&S.set(1,{duration:150,easing:Ti})}),J(()=>{dt(S.motion.current)});function dt(y){!a||!u||!f||pe.equeue(g(b)?0:e.layer,e.priority,e.id+"_scale",()=>{a.style.opacity=`${y}`,u.style.scale=`${y}`,f.style.scale=`${y}`})}let k=NaN,Kt=C(!1),he=new ut(-p/2,{easing:Ot}),vt=new ut(-c/2,{easing:Ot});J(()=>{g(E)==!1&&(he.snap(),he.snap(),pe.clear(e.priority,e.id+"_angle"))}),J(()=>{g(b)==!0&&g(Kt)&&(he.update({duration:75}),he.update({duration:75}))}),J(()=>{fn(he.motion.current,vt.motion.current)});function fn(y,De){if(!a||!u||!f)return;const G=y+p/2,Oe=De+c/2,Fe=c<p?G*c/p:G,Re=c>p?Oe*p/c:Oe,cs=Math.atan2(Re,Fe)/Math.PI*180-45,mn=0,ps=30,$t=Math.sqrt(Fe*Fe+Re*Re),Qe=Math.min(p,c)/2,hs=Qe*Math.SQRT2,ds=($t-Qe)/(hs-Qe),yn=mn+ds*(ps-mn),vs=$t<Qe?$t/Qe:1;pe.equeue(e.layer,e.priority,e.id+"_angle",()=>{u.style.transform=`translate(${Math.round(y)}px, ${Math.round(De)}px)`,f.style.transform=`scale(${vs}) rotate(${cs}deg) skew(${yn}deg, ${yn}deg)`})}function ls(y,De){if(g(Kt)==!1||De==!0){let G=Ge.getOffsets(p,c,y);he.set(Math.round(G.x),{duration:0}),vt.set(Math.round(G.y),{duration:0}),fn(he.value,vt.value),k=y,x(Kt,!0)}else if(y!=k){let G=Math.abs(y-k),Oe=G<180?G:360-G,Fe=Math.log(Oe)*75,Re=Ge.getOffsets(p,c,y);he.set(Math.round(Re.x),{duration:Fe}),vt.set(Math.round(Re.y),{duration:Fe}),k=y}}function us(){return Ge.getOffsets(p,c,k)}var fs={getBody:d,setDisplayed:N,getDisplayed:ne,setCollapsed:Xt,getCollapsed:Wt,getExpanded:Gt,setAngle:ls,getOffsets:us},Je=Ji();let cn;var Jt=_r(Je);let pn;He(Jt,y=>f=y,()=>f);var Qt=ei(Jt,2);let hn;var dn=_r(Qt);let vn;return He(dn,y=>h=y,()=>h),He(Qt,y=>u=y,()=>u),He(Je,y=>a=y,()=>a),kr((y,De,G,Oe)=>{qr(Je,1,Ur(["anchor",g(E)&&"displayed"]),"svelte-11extwn"),cn=qe(Je,"",cn,y),pn=qe(Jt,"",pn,De),hn=qe(Qt,"",hn,G),vn=qe(dn,"",vn,Oe)},[()=>({filter:`drop-shadow(${l})`}),()=>({"background-color":o}),()=>({margin:`${i}px;`}),()=>({width:`${r}px`,height:`${n}px`,"border-radius":`${s}px;`,"background-color":o})]),zr(t,Je),Mt(fs)}class qt extends Ye{static Z_INDEX_OFFSET=2e6;style;colors;bodyLoading=!1;bodyLoaded=!1;bodyCallback;constructor(e,r){if(r.popup==null)throw new Error("Failed to create popup");super(e,r),this.shown=!1,this.style=r.popup.style,this.colors=r.popup.colors,this.bodyCallback=r.popup.body}createElement(){this.element=document.createElement("div"),this.element.classList.add("popup"),this.component=It(on,{target:this.element,props:{id:this.id+"_popup",layer:Ii,priority:0,style:this.style,colors:this.colors}})}updateMarker(e){super.updateMarker(e),this.component?.setDisplayed(e)}updateBody(){if(this.bodyLoaded||this.bodyLoading)return;const e=this.component?.getBody();e!=null&&(this.bodyLoading=!0,this.bodyCallback(this.id).then(r=>{r instanceof HTMLElement?e.appendChild(r):console.error("Failed to load popup body")}).catch(r=>console.error(r)).finally(()=>{this.bodyLoaded=!0,this.bodyLoading=!1}))}getZindex(){return qt.Z_INDEX_OFFSET}setCollapsed(e){if(this.component==null)throw new Error("Failed to set popup collapsed");this.component.setCollapsed(e)}setAngle(e){if(this.component==null)throw new Error("Failed to set popup angle");this.component.setAngle(e,!0)}isExpanded(){return this.component==null?!1:this.component.getExpanded()}isCollapsed(){return this.component==null?!1:this.component.getCollapsed()}isBodyLoaded(){return this.bodyLoaded}}var _e;(t=>{t.COUNT=12,t.DEGREES=[0,30,60,90,120,150,180,210,240,270,300,330],t.DEGREES_DEFAULT=270})(_e||(_e={}));class Ht extends Ye{static Z_INDEX_OFFSET=1e6;style;colors;zoom;angle;states;bodyLoading=!1;bodyLoaded=!1;bodyCallback;constructor(e,r,n){super(e,r),this.style=r.tooltip.style,this.colors=r.tooltip.colors,this.zoom=n[0],this.angle=_e.DEGREES_DEFAULT,this.states=n[1].map(i=>[i[0],_e.DEGREES[i[1]]]),this.bodyCallback=r.tooltip.body}createElement(){this.element=document.createElement("div"),this.element.classList.add("tooltip"),this.component=It(on,{target:this.element,props:{id:this.id+"_tooltip",layer:Di,priority:this.zoom*this.provider.getParameters().zoomScale,style:this.style,colors:this.colors}})}update(e){this.zoom=e[0],this.states=e[1].map(r=>[r[0],_e.DEGREES[r[1]]]),this.setZIndex()}updateMarker(e){super.updateMarker(e),this.component?.setDisplayed(e)}updateState(e){if(this.component==null)throw new Error("Failed to update tooltip state");this.angle=this.getAngle(e),this.component.setAngle(this.angle)}updateBody(){if(this.bodyLoaded||this.bodyLoading)return;const e=this.component?.getBody();e!=null&&(this.bodyLoading=!0,this.bodyCallback(this.id).then(r=>{r instanceof HTMLElement?e.appendChild(r):console.error("Failed to load tooltip body")}).catch(r=>console.error(r)).finally(()=>{this.bodyLoaded=!0,this.bodyLoading=!1}))}getAngle(e){const r=this.states.findLast(n=>n[0]<=e);if(!r)throw new Error("Angle not found");return r[1]}getZindex(){const e=this.provider.getParameters();return Math.round((e.zoomMax-this.zoom)*e.zoomScale)+Ht.Z_INDEX_OFFSET}setCollapsed(e){if(this.component==null)throw new Error("Failed to set tooltip collapsed");this.component.setCollapsed(e)}isExpanded(){return this.component==null?!1:this.component.getExpanded()}isCollapsed(){return this.component==null?!1:this.component.getCollapsed()}isBodyLoaded(){return this.bodyLoaded}}class Qi{marker;zoom;pin;tooltip;popup;constructor(e,r,n){this.marker=r,this.zoom=n[0],this.pin=new We(e,r,n[0]),this.tooltip=new Ht(e,r,n),this.popup=r.popup?new qt(e,r):void 0}create(){this.pin.create(),this.tooltip.create(),this.popup?.create()}update(e){this.pin.update(e),this.tooltip.update(e)}remove(){this.pin.remove(),this.tooltip.remove(),this.popup?.remove()}}var Ie;(t=>{function e(l,a,u){return{x:n(a)*u,y:i(l)*u}}t.project=e;function r(l,a,u){return{lat:o(a/u),lng:s(l/u)}}t.unproject=r;function n(l){return(180+l)/360}function i(l){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+l*Math.PI/360)))/360}function s(l){return l*360-180}function o(l){return 360/Math.PI*Math.atan(Math.exp((180-l*360)*Math.PI/180))-90}})(Ie||(Ie={}));class an{swLat;swLng;neLat;neLng;constructor(e,r,n,i,s){const o=n*Math.pow(2,r),l=Ie.project(e.sw.lat,e.sw.lng,o),a=Ie.project(e.ne.lat,e.ne.lng,o),u=l.x-i,f=l.y+s,h=a.x+i,p=a.y-s,c=Ie.unproject(u,f,o),d=Ie.unproject(h,p,o);this.swLat=c.lat,this.swLng=c.lng,this.neLat=d.lat,this.neLng=d.lng}contains(e,r){return this.swLat<=e&&e<=this.neLat?this.swLng<this.neLng?this.swLng<=r&&r<=this.neLng:r<=this.neLng||this.swLng<=r:!1}}class pt{static MAP_PINS_MAX_ZOOM=2;static MAP_PINS_MAX_COUNT=128;provider;pinElements=new Array;pinMaxWidth=0;pinMaxHeight=0;pinFade=!1;pinMaxCount=0;pinMaxZoomDelta=0;constructor(e){this.provider=e}setConfiguration(e){this.pinFade=e?.pin?.fade??!0,this.pinMaxCount=e?.pin?.maxCount??Math.max(pt.MAP_PINS_MAX_COUNT,8*navigator.hardwareConcurrency),this.pinMaxZoomDelta=e?.pin?.maxZoom??pt.MAP_PINS_MAX_ZOOM}updateElements(e){this.pinElements=e,this.pinMaxWidth=e.reduce((r,n)=>Math.max(r,n.style.width),0),this.pinMaxHeight=e.reduce((r,n)=>Math.max(r,n.style.height),0)}removeElements(){this.pinElements.forEach(e=>e.removeMarker()),this.pinElements.length=0}process(e,r){const n=this.provider.getParameters().mapSize,i=new an(e,r,n,this.pinMaxWidth*2,this.pinMaxHeight*2);let s=0;for(const o of this.pinElements)i.contains(o.lat,o.lng)?o.shown&&r<o.zoom&&o.zoom<r+this.pinMaxZoomDelta?(s<this.pinMaxCount&&(o.setCollapsed(!1),o.setScale(this.pinFade?o.getScaleFromZoomDistance(r):1),o.updateMarker(!0),o.isBodyLoaded()==!1&&o.updateBody()),s++):(o.setCollapsed(!0),o.isCollapsed()&&o.updateMarker(!1)):o.updateMarker(!1)}}class $i{provider;tooltipElements=new Array;tooltipMaxWidth=0;tooltipMaxHeight=0;constructor(e){this.provider=e}updateElements(e){this.tooltipElements=e,this.tooltipMaxWidth=this.tooltipElements.reduce((r,n)=>Math.max(r,n.style.width),0),this.tooltipMaxHeight=this.tooltipElements.reduce((r,n)=>Math.max(r,n.style.height),0)}removeElements(){this.tooltipElements.forEach(e=>e.removeMarker()),this.tooltipElements.length=0}process(e,r){const n=this.provider.getParameters().mapSize,i=new an(e,r,n,this.tooltipMaxWidth*2,this.tooltipMaxHeight*2);for(const s of this.tooltipElements)i.contains(s.lat,s.lng)?s.shown&&s.zoom<=r?(s.updateState(r),s.setCollapsed(!1),s.updateMarker(!0),s.isCollapsed()==!1&&s.isBodyLoaded()==!1&&s.updateBody()):(s.setCollapsed(!0),s.isCollapsed()&&s.updateMarker(!1)):s.updateMarker(!1)}}class es{provider;popupElements=new Array;popupPositioned=new Map;constructor(e){this.provider=e}show(e){e.popup&&(e.pin.shown=!1,e.tooltip.shown=!1,this.popupPositioned.set(e.marker.id,!1),e.popup.setAngle(e.tooltip.angle),e.popup.shown=!0)}hide(e){e.popup&&(e.pin.shown=!0,e.tooltip.shown=!0,e.popup.shown=!1)}updateElements(e){this.popupElements=e,this.popupPositioned=new Map(e.map(r=>[r.id,!1]))}removeElements(){this.popupElements.forEach(e=>e.removeMarker()),this.popupElements.length=0,this.popupPositioned.clear()}process(){for(const e of this.popupElements)if(e.shown){if(e.setCollapsed(!1),e.updateMarker(!0),e.isExpanded()&&e.isBodyLoaded()==!1&&e.updateBody(),e.isCollapsed()==!1&&this.popupPositioned.get(e.id)==!1){const r=e.component?.getBody();if(r==null)continue;const n=e.component?.getOffsets();if(n==null)continue;const i=r.getBoundingClientRect();if(i.x==0&&i.y==0&&i.width==0&&i.height==0)continue;const s=i.x+i.width/2,o=i.y+i.height/2,l=s+n.x,a=o+n.y,u=l+e.style.width,f=a+e.style.height,h=this.provider.getContainer().getBoundingClientRect(),p=l-h.left,c=h.right-u,d=a-h.top,E=h.bottom-f,N=Math.min(e.style.width,e.style.height)/4,ne=p<0?p-N:c<0?-c+N:0,b=d<0?d-N:E<0?-E+N:0;this.provider.panBy(ne,b),this.popupPositioned.set(e.id,!0)}}else e.setCollapsed(!0),e.isCollapsed()&&e.updateMarker(!1)}}class ts{markerPinProcessor;markerTooltipProcessor;markerPopupProcessor;constructor(e){this.markerPinProcessor=new pt(e),this.markerTooltipProcessor=new $i(e),this.markerPopupProcessor=new es(e)}setConfiguration(e){this.markerPinProcessor.setConfiguration(e)}updateElements(e){this.markerPinProcessor.updateElements(e.map(r=>r.pin)),this.markerTooltipProcessor.updateElements(e.map(r=>r.tooltip)),this.markerPopupProcessor.updateElements(e.map(r=>r.popup).filter(r=>r!=null))}removeElements(){this.markerPinProcessor.removeElements(),this.markerTooltipProcessor.removeElements(),this.markerPopupProcessor.removeElements()}processElements(e,r){this.markerPinProcessor.process(e,r),this.markerTooltipProcessor.process(e,r),this.markerPopupProcessor.process()}showPopup(e){this.markerPopupProcessor.show(e)}hidePopup(e){this.markerPopupProcessor.hide(e)}}var Ke;(t=>{async function e(n,i){const s=await fetch(n,i);if(!s.ok)throw new Error(s.statusText);return s.json()}t.get=e;async function r(n,i,s){const o=await fetch(n,{method:"POST",body:JSON.stringify(i),headers:{"Content-Type":"application/json",...s?.headers},...s});if(!o.ok)throw new Error(o.statusText);return o.json()}t.post=r})(Ke||(Ke={}));const rs=_(re(),Kr(32)),ns=_(re(),jt(1)),ln="1.2.1",Yt="https://maps.api.arenarium.dev",is=`${Yt}/auth`,ss=`${Yt}/states`,os=`${Yt}/log`;class Vt{apiKey;apiToken;apiDevEnvironment;mapProvider;mapMarkerProcessor;mapMarkerElementArray=new Array;mapMarkerElementMap=new Map;mapMarkerElementsUpdating=!1;constructor(e,r,n,i){ct(rs,e),ct(ns,r),ct(Xi,n),this.apiKey=e,this.apiToken=r,this.apiDevEnvironment=window?.location.host.startsWith("localhost")||window?.location.host.startsWith("127.0.0.1"),this.mapProvider=n,this.mapMarkerProcessor=new ts(n),this.setConfiguration(i)}static async create(e,r,n){const i={key:e,version:ln};let o=(await Ke.post(is,i)).token;if(!o)throw new Error("Failed to get api token");return new Vt(e,o,r,n)}setConfiguration(e){pe.setLimit(e?.animation?.queue?.limit??8*navigator.hardwareConcurrency),this.mapMarkerProcessor.setConfiguration(e)}async updateMarkers(e){ct(Ki,e);try{await this.updateMarkerElements(e),this.processMarkerElementsCallback()}catch(r){throw this.removeMarkerElements(),this.log("error","Failed to update markers",r),r}}removeMarkers(){try{this.removeMarkerElements()}catch(e){throw this.log("error","Failed to remove markers",e),e}}showPopup(e){try{for(const r of this.mapMarkerElementArray)r.marker.id==e?this.mapMarkerProcessor.showPopup(r):this.mapMarkerProcessor.hidePopup(r)}catch(r){for(const n of this.mapMarkerElementArray)this.mapMarkerProcessor.hidePopup(n);throw this.log("error","Failed to show popup",r),r}}hidePopup(e){try{if(e){const r=this.mapMarkerElementMap.get(e);if(r==null)return;this.mapMarkerProcessor.hidePopup(r)}else for(const r of this.mapMarkerElementArray)this.mapMarkerProcessor.hidePopup(r)}catch(r){for(const n of this.mapMarkerElementArray)this.mapMarkerProcessor.hidePopup(n);throw this.log("error","Failed to hide popup",r),r}}async updateMarkerElements(e){try{let r=this.mapMarkerElementArray.map(i=>i.marker);for(let i=0;i<e.length;i++){const s=e[i];this.mapMarkerElementMap.get(s.id)||r.push(s)}const n=await this.getMarkerStates(r);try{this.mapMarkerElementsUpdating=!0;for(let i=0;i<r.length;i++){const s=r[i],o=n[i],l=this.mapMarkerElementMap.get(s.id);if(l)l.update(o);else{const a=new Qi(this.mapProvider,s,o);a.create(),this.mapMarkerElementMap.set(s.id,a),this.mapMarkerElementArray.push(a)}}this.mapMarkerElementArray.sort((i,s)=>i.zoom-s.zoom),this.mapMarkerProcessor.updateElements(this.mapMarkerElementArray)}finally{this.mapMarkerElementsUpdating=!1}}catch(r){throw this.mapMarkerProcessor.removeElements(),this.mapMarkerElementArray.length=0,this.mapMarkerElementMap.clear(),r}finally{this.mapMarkerElementsUpdating=!1}}removeMarkerElements(){try{this.mapMarkerElementsUpdating=!0,this.mapMarkerProcessor.removeElements(),this.mapMarkerElementArray.length=0,this.mapMarkerElementMap.clear()}finally{this.mapMarkerElementsUpdating=!1}}async getMarkerStates(e){if(e.length==0)return[];if(e.length==1)return[[0,[[0,_e.DEGREES.indexOf(_e.DEGREES_DEFAULT)]]]];const r=e.map(s=>({id:s.id,rank:s.rank,lat:s.lat,lng:s.lng,width:s.tooltip.style.width,height:s.tooltip.style.height,margin:s.tooltip.style.margin})),n={key:this.apiKey,token:this.apiToken,parameters:this.mapProvider.getParameters(),input:r},i=await Ke.post(ss,n,{headers:{"Cache-Control":this.apiDevEnvironment?"no-cache":""}});return i.token&&(this.apiToken=i.token),i.states}processMarkerElementsCallback(){if(this.mapProvider.getContainer().parentElement!=null&&this.mapMarkerElementArray.length!=0)try{this.processMarkerElements(),window.setTimeout(this.processMarkerElementsCallback.bind(this),25)}catch(e){this.log("error","Failed to process marker elements",e)}}processMarkerElements(){if(this.mapMarkerElementsUpdating)return;const e=this.mapProvider.getBounds(),r=this.mapProvider.getZoom();this.mapMarkerProcessor.processElements(e,r)}async log(e,r,n){switch(e){case"info":console.info(n);break;case"warn":console.warn(n);break;case"error":console.error(n);break}if(n instanceof Error&&!this.apiDevEnvironment)try{const i={key:this.apiKey,title:r,level:e,content:{version:ln,...n}};await Ke.post(os,i)}catch(i){console.error(i)}}}const un=()=>'<img src="https://arenarium.dev/favicon.svg" alt="Arenarium Maps" style="height: 1.25em; vertical-align: middle;" />',as=()=>`<a href="https://arenarium.dev" target="_blank" style="color: inherit;">${un()}<span> @arenarium/maps</span></a>`;oe.MapManager=Vt,oe.getAttributionHtml=as,oe.getImageHtml=un,Object.defineProperty(oe,Symbol.toStringTag,{value:"Module"})}));
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.pin.svelte-zz3jrb{position:absolute;
|
|
1
|
+
.pin.svelte-zz3jrb{position:absolute;border-width:2px;border-style:solid;box-sizing:border-box;transform-origin:0% 0%;transform-style:preserve-3d;transform:translate(-50%,-50%);backface-visibility:hidden;will-change:scale}.pin.svelte-zz3jrb{scale:0;filter:brightness(0)}.pin.svelte-zz3jrb{display:none;content-visibility:hidden}.pin.displayed.svelte-zz3jrb{display:initial;content-visibility:initial}.anchor.svelte-11extwn{display:block;position:absolute;width:0px;height:0px;transition:filter ease-in-out 125ms}.anchor.svelte-11extwn .bubble:where(.svelte-11extwn){position:absolute;left:0;top:0}.anchor.svelte-11extwn .bubble:where(.svelte-11extwn) .body:where(.svelte-11extwn){position:relative;cursor:pointer}.anchor.svelte-11extwn .pointer:where(.svelte-11extwn){position:absolute;left:0;top:0;transform-origin:0% 0%}.anchor.svelte-11extwn:hover{transform-style:preserve-3d;backface-visibility:hidden}.anchor.svelte-11extwn:hover .bubble:where(.svelte-11extwn){transform-style:preserve-3d;backface-visibility:hidden}.anchor.svelte-11extwn{opacity:0;will-change:opacity}.anchor.svelte-11extwn .bubble:where(.svelte-11extwn){scale:0;transform-origin:0% 0%;will-change:transform,scale}.anchor.svelte-11extwn .pointer:where(.svelte-11extwn){scale:0;transform-origin:0% 0%;will-change:transform,scale}.anchor.svelte-11extwn{display:none;content-visibility:hidden}.anchor.displayed.svelte-11extwn{display:initial;content-visibility:initial}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arenarium/maps",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "arenarium.dev",
|
|
6
6
|
"description": "Visualize complex map markers clearly. A JavaScript lib for effective display of map markers, compatible with MapLibre, Mapbox, and Google Maps.",
|
|
@@ -63,10 +63,10 @@
|
|
|
63
63
|
"typescript-eslint": "^8.44.1",
|
|
64
64
|
"vite": "^7.1.7",
|
|
65
65
|
"vite-plugin-dts": "^4.5.4",
|
|
66
|
-
"@arenarium/maps-integration-google": "1.0.
|
|
67
|
-
"@arenarium/maps-integration-
|
|
68
|
-
"@arenarium/maps-
|
|
69
|
-
"@arenarium/maps-
|
|
66
|
+
"@arenarium/maps-integration-google": "1.0.1",
|
|
67
|
+
"@arenarium/maps-integration-mapbox": "1.0.1",
|
|
68
|
+
"@arenarium/maps-shared": "1.0.0",
|
|
69
|
+
"@arenarium/maps-integration-maplibre": "1.0.1"
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
72
|
"valibot": "^1.1.0"
|