@arenarium/maps 1.0.171 → 1.0.172

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/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  (function(R,F){typeof exports=="object"&&typeof module<"u"?F(exports):typeof define=="function"&&define.amd?define(["exports"],F):(R=typeof globalThis<"u"?globalThis:R||self,F(R.arenarium={}))})(this,function(R){"use strict";var Lo=Object.defineProperty;var Aa=R=>{throw TypeError(R)};var Do=(R,F,B)=>F in R?Lo(R,F,{enumerable:!0,configurable:!0,writable:!0,value:B}):R[F]=B;var d=(R,F,B)=>Do(R,typeof F!="symbol"?F+"":F,B),fn=(R,F,B)=>F.has(R)||Aa("Cannot "+B);var C=(R,F,B)=>(fn(R,F,"read from private field"),B?B.call(R):F.get(R)),Y=(R,F,B)=>F.has(R)?Aa("Cannot add the same private member more than once"):F instanceof WeakSet?F.add(R):F.set(R,B),J=(R,F,B,$t)=>(fn(R,F,"write to private field"),$t?$t.call(R,B):F.set(R,B),B),Wt=(R,F,B)=>(fn(R,F,"access private method"),B);var jt,yt,vt,je,Zt,Ft,Je,_t,Ze,Se,Ke,ze,Ca,Na,hn,Ma,Me,xt,Bt,Qe;var B=Array.isArray,$t=Array.prototype.indexOf,Ta=Array.from,vr=Object.defineProperty,Mt=Object.getOwnPropertyDescriptor,Ra=Object.prototype,Oa=Array.prototype,Ia=Object.getPrototypeOf,mn=Object.isExtensible;function Pa(r){for(var e=0;e<r.length;e++)r[e]()}function La(){var r,e,t=new Promise((n,a)=>{r=n,e=a});return{promise:t,resolve:r,reject:e}}const ae=2,_r=4,gn=8,qt=16,Ae=32,et=64,yn=128,ie=256,Yt=512,X=1024,pe=2048,Ve=4096,tt=8192,rt=16384,xr=32768,Da=65536,vn=1<<17,ja=1<<18,wr=1<<19,_n=1<<20,br=1<<21,kr=1<<22,Ue=1<<23,Xt=Symbol("$state"),Sr=new class extends Error{constructor(){super(...arguments);d(this,"name","StaleReactionError");d(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function Za(){throw new Error("https://svelte.dev/e/await_outside_boundary")}function Fa(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Ba(r){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Va(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Ua(r){throw new Error("https://svelte.dev/e/effect_orphan")}function Wa(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function $a(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function qa(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Ya(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}const Xa=2,H=Symbol();function xn(r){return r===this.v}let jo=!1,fe=null;function Ht(r){fe=r}function zr(r,e=!1,t){fe={p:fe,c:null,e:null,s:r,x:null,l:null}}function Mr(r){var e=fe,t=e.e;if(t!==null){e.e=null;for(var n of t)Pn(n)}return r!==void 0&&(e.x=r),fe=e.p,r??{}}function wn(){return!0}const Ha=new WeakMap;function Ga(r){var e=j;if(e===null)return I.f|=Ue,r;if((e.f&xr)===0){if((e.f&yn)===0)throw!e.parent&&r instanceof Error&&bn(r),r;e.b.error(r)}else Er(r,e)}function Er(r,e){for(;e!==null;){if((e.f&yn)!==0)try{e.b.error(r);return}catch{}e=e.parent}throw r instanceof Error&&bn(r),r}function bn(r){const e=Ha.get(r);e&&(vr(r,"message",{value:e.message}),vr(r,"stack",{value:e.stack}))}let Gt=[];function Ja(){var r=Gt;Gt=[],Pa(r)}function Ka(r){Gt.length===0&&queueMicrotask(Ja),Gt.push(r)}function Qa(){for(var r=j.b;r!==null&&!r.has_pending_snippet();)r=r.parent;return r===null&&Za(),r}function ei(r){var e=ae|pe,t=I!==null&&(I.f&ae)!==0?I:null;return j===null||t!==null&&(t.f&ie)!==0?e|=ie:j.f|=wr,{ctx:fe,deps:null,effects:null,equals:xn,f:e,fn:r,reactions:null,rv:0,v:H,wv:0,parent:t??j,ac:null}}function ti(r,e){let t=j;t===null&&Fa();var n=t.b,a=void 0,i=En(H),o=null,s=!I;return fi(()=>{try{var l=r()}catch(v){l=Promise.reject(v)}var c=()=>l;a=(o==null?void 0:o.then(c,c))??Promise.resolve(l),o=a;var u=he,p=n.pending;s&&(n.update_pending_count(1),p||u.increment());const h=(v,M=void 0)=>{o=null,p||u.activate(),M?M!==Sr&&(i.f|=Ue,Nr(i,M)):((i.f&Ue)!==0&&(i.f^=Ue),Nr(i,v)),s&&(n.update_pending_count(-1),p||u.decrement()),zn()};if(a.then(h,v=>h(null,v||"unknown")),u)return()=>{queueMicrotask(()=>u.neuter())}}),new Promise(l=>{function c(u){function p(){u===a?l(i):c(a)}u.then(p,p)}c(a)})}function kn(r){var e=r.effects;if(e!==null){r.effects=null;for(var t=0;t<e.length;t+=1)Ye(e[t])}}function ri(r){for(var e=r.parent;e!==null;){if((e.f&ae)===0)return e;e=e.parent}return null}function Ar(r){var e,t=j;it(ri(r));try{kn(r),e=Yn(r)}finally{it(t)}return e}function Sn(r){var e=Ar(r);if(r.equals(e)||(r.v=e,r.wv=$n()),!at)if(Ce!==null)Ce.set(r,r.v);else{var t=(Te||(r.f&ie)!==0)&&r.deps!==null?Ve:X;ee(r,t)}}function ni(r,e,t){const n=ei;if(e.length===0){t(r.map(n));return}var a=he,i=j,o=ai(),s=Qa();Promise.all(e.map(l=>ti(l))).then(l=>{a==null||a.activate(),o();try{t([...r.map(n),...l])}catch(c){(i.f&rt)===0&&Er(c,i)}a==null||a.deactivate(),zn()}).catch(l=>{s.error(l)})}function ai(){var r=j,e=I,t=fe;return function(){it(r),Ne(e),Ht(t)}}function zn(){it(null),Ne(null),Ht(null)}const Jt=new Set;let he=null,Ce=null,Zo=[],Et=[],Kt=null,Cr=!1;const un=class un{constructor(){Y(this,ze);Y(this,jt,new Map);Y(this,yt,new Map);Y(this,vt,new Set);Y(this,je,0);Y(this,Zt,null);Y(this,Ft,!1);Y(this,Je,[]);Y(this,_t,[]);Y(this,Ze,[]);Y(this,Se,[]);Y(this,Ke,[]);d(this,"skipped_effects",new Set)}capture(e,t){C(this,yt).has(e)||C(this,yt).set(e,t),C(this,jt).set(e,e.v)}activate(){he=this}deactivate(){he=null}neuter(){J(this,Ft,!0)}flush(){Et.length>0?this.flush_effects():Wt(this,ze,hn).call(this),he===this&&(C(this,je)===0&&Jt.delete(this),he=null)}flush_effects(){var e=nt;Cr=!0;try{var t=0;for(Vn(!0);Et.length>0;)t++>1e3&&ii(),Wt(this,ze,Ca).call(this,Et),$e.clear()}finally{Cr=!1,Vn(e),Kt=null}}increment(){J(this,je,C(this,je)+1)}decrement(){if(J(this,je,C(this,je)-1),C(this,je)===0){for(const e of C(this,Ze))ee(e,pe),We(e);for(const e of C(this,Se))ee(e,pe),We(e);for(const e of C(this,Ke))ee(e,pe),We(e);J(this,Ze,[]),J(this,Se,[]),this.flush()}}add_callback(e){C(this,vt).add(e)}settled(){return(C(this,Zt)??J(this,Zt,La())).promise}static ensure(){if(he===null){const e=he=new un;Jt.add(he),queueMicrotask(()=>{he===e&&e.flush()})}return he}};jt=new WeakMap,yt=new WeakMap,vt=new WeakMap,je=new WeakMap,Zt=new WeakMap,Ft=new WeakMap,Je=new WeakMap,_t=new WeakMap,Ze=new WeakMap,Se=new WeakMap,Ke=new WeakMap,ze=new WeakSet,Ca=function(e){var i;Et=[];var t=null;if(Jt.size>1){t=new Map,Ce=new Map;for(const[o,s]of C(this,jt))t.set(o,{v:o.v,wv:o.wv}),o.v=s;for(const o of Jt)if(o!==this)for(const[s,l]of C(o,yt))t.has(s)||(t.set(s,{v:s.v,wv:s.wv}),s.v=l)}for(const o of e)Wt(this,ze,Na).call(this,o);if(C(this,Je).length===0&&C(this,je)===0){var n=C(this,Ze),a=C(this,Se);J(this,Ze,[]),J(this,Se,[]),J(this,Ke,[]),Wt(this,ze,hn).call(this),Mn(n),Mn(a),(i=C(this,Zt))==null||i.resolve()}else{for(const o of C(this,Ze))ee(o,X);for(const o of C(this,Se))ee(o,X);for(const o of C(this,Ke))ee(o,X)}if(t){for(const[o,{v:s,wv:l}]of t)o.wv<=l&&(o.v=s);Ce=null}for(const o of C(this,Je))Nt(o);for(const o of C(this,_t))Nt(o);J(this,Je,[]),J(this,_t,[])},Na=function(e){var u;e.f^=X;for(var t=e.first;t!==null;){var n=t.f,a=(n&(Ae|et))!==0,i=a&&(n&X)!==0,o=i||(n&tt)!==0||this.skipped_effects.has(t);if(!o&&t.fn!==null){if(a)t.f^=X;else if((n&_r)!==0)C(this,Se).push(t);else if(tr(t))if((n&kr)!==0){var s=(u=t.b)!=null&&u.pending?C(this,_t):C(this,Je);s.push(t)}else(t.f&qt)!==0&&C(this,Ke).push(t),Nt(t);var l=t.first;if(l!==null){t=l;continue}}var c=t.parent;for(t=t.next;t===null&&c!==null;)t=c.next,c=c.parent}},hn=function(){if(!C(this,Ft))for(const e of C(this,vt))e();C(this,vt).clear()};let Qt=un;function ii(){try{Wa()}catch(r){if(Kt!==null)Er(r,Kt);else throw r}}function Mn(r){var e=r.length;if(e!==0){for(var t=0;t<e;t++){var n=r[t];if((n.f&(rt|tt))===0&&tr(n)){var a=er;if(Nt(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null?Fn(n):n.fn=null),er>a&&(n.f&_n)!==0)break}}for(;t<e;t+=1)We(r[t])}}function We(r){for(var e=Kt=r;e.parent!==null;){e=e.parent;var t=e.f;if(Cr&&e===j&&(t&qt)!==0)return;if((t&(et|Ae))!==0){if((t&X)===0)return;e.f^=X}}Et.push(e)}const $e=new Map;function En(r,e){var t={f:0,v:r,reactions:null,equals:xn,rv:0,wv:0};return t}function te(r,e){const t=En(r);return _i(t),t}function G(r,e,t=!1){I!==null&&(!ge||(I.f&vn)!==0)&&wn()&&(I.f&(ae|qt|kr|vn))!==0&&!(K!=null&&K.includes(r))&&Ya();let n=t?At(e):e;return Nr(r,n)}function Nr(r,e){if(!r.equals(e)){var t=r.v;at?$e.set(r,e):$e.set(r,t),r.v=e,Qt.ensure().capture(r,t),(r.f&ae)!==0&&((r.f&pe)!==0&&Ar(r),ee(r,(r.f&ie)===0?X:Ve)),r.wv=$n(),An(r,pe),j!==null&&(j.f&X)!==0&&(j.f&(Ae|et))===0&&(ue===null?xi([r]):ue.push(r))}return e}function Tr(r){G(r,r.v+1)}function An(r,e){var t=r.reactions;if(t!==null)for(var n=t.length,a=0;a<n;a++){var i=t[a],o=i.f;(o&pe)===0&&(ee(i,e),(o&(X|ie))!==0&&((o&ae)!==0?An(i,Ve):We(i)))}}function At(r){if(typeof r!="object"||r===null||Xt in r)return r;const e=Ia(r);if(e!==Ra&&e!==Oa)return r;var t=new Map,n=B(r),a=te(0),i=Xe,o=s=>{if(Xe===i)return s();var l=I,c=Xe;Ne(null),Wn(i);var u=s();return Ne(l),Wn(c),u};return n&&t.set("length",te(r.length)),new Proxy(r,{defineProperty(s,l,c){(!("value"in c)||c.configurable===!1||c.enumerable===!1||c.writable===!1)&&$a();var u=t.get(l);return u===void 0?u=o(()=>{var p=te(c.value);return t.set(l,p),p}):G(u,c.value,!0),!0},deleteProperty(s,l){var c=t.get(l);if(c===void 0){if(l in s){const h=o(()=>te(H));t.set(l,h),Tr(a)}}else{if(n&&typeof l=="string"){var u=t.get("length"),p=Number(l);Number.isInteger(p)&&p<u.v&&G(u,p)}G(c,H),Tr(a)}return!0},get(s,l,c){var v;if(l===Xt)return r;var u=t.get(l),p=l in s;if(u===void 0&&(!p||(v=Mt(s,l))!=null&&v.writable)&&(u=o(()=>{var M=At(p?s[l]:H),x=te(M);return x}),t.set(l,u)),u!==void 0){var h=V(u);return h===H?void 0:h}return Reflect.get(s,l,c)},getOwnPropertyDescriptor(s,l){var c=Reflect.getOwnPropertyDescriptor(s,l);if(c&&"value"in c){var u=t.get(l);u&&(c.value=V(u))}else if(c===void 0){var p=t.get(l),h=p==null?void 0:p.v;if(p!==void 0&&h!==H)return{enumerable:!0,configurable:!0,value:h,writable:!0}}return c},has(s,l){var h;if(l===Xt)return!0;var c=t.get(l),u=c!==void 0&&c.v!==H||Reflect.has(s,l);if(c!==void 0||j!==null&&(!u||(h=Mt(s,l))!=null&&h.writable)){c===void 0&&(c=o(()=>{var v=u?At(s[l]):H,M=te(v);return M}),t.set(l,c));var p=V(c);if(p===H)return!1}return u},set(s,l,c,u){var y;var p=t.get(l),h=l in s;if(n&&l==="length")for(var v=c;v<p.v;v+=1){var M=t.get(v+"");M!==void 0?G(M,H):v in s&&(M=o(()=>te(H)),t.set(v+"",M))}if(p===void 0)(!h||(y=Mt(s,l))!=null&&y.writable)&&(p=o(()=>te(void 0)),G(p,At(c)),t.set(l,p));else{h=p.v!==H;var x=o(()=>At(c));G(p,x)}var f=Reflect.getOwnPropertyDescriptor(s,l);if(f!=null&&f.set&&f.set.call(u,c),!h){if(n&&typeof l=="string"){var _=t.get("length"),g=Number(l);Number.isInteger(g)&&g>=_.v&&G(_,g+1)}Tr(a)}return!0},ownKeys(s){V(a);var l=Reflect.ownKeys(s).filter(p=>{var h=t.get(p);return h===void 0||h.v!==H});for(var[c,u]of t)u.v!==H&&!(c in s)&&l.push(c);return l},setPrototypeOf(){qa()}})}var Cn,Nn,Tn,Rn;function oi(){if(Cn===void 0){Cn=window,Nn=/Firefox/.test(navigator.userAgent);var r=Element.prototype,e=Node.prototype,t=Text.prototype;Tn=Mt(e,"firstChild").get,Rn=Mt(e,"nextSibling").get,mn(r)&&(r.__click=void 0,r.__className=void 0,r.__attributes=null,r.__style=void 0,r.__e=void 0),mn(t)&&(t.__t=void 0)}}function si(r=""){return document.createTextNode(r)}function On(r){return Tn.call(r)}function In(r){return Rn.call(r)}function Rr(r,e){return On(r)}function li(r,e=1,t=!1){let n=r;for(;e--;)n=In(n);return n}function ci(r){j===null&&I===null&&Ua(),I!==null&&(I.f&ie)!==0&&j===null&&Va(),at&&Ba()}function ui(r,e){var t=e.last;t===null?e.last=e.first=r:(t.next=r,r.prev=t,e.last=r)}function qe(r,e,t,n=!0){var a=j;a!==null&&(a.f&tt)!==0&&(r|=tt);var i={ctx:fe,deps:null,nodes_start:null,nodes_end:null,f:r|pe,first:null,fn:e,last:null,next:null,parent:a,b:a&&a.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(t)try{Nt(i),i.f|=xr}catch(l){throw Ye(i),l}else e!==null&&We(i);var o=t&&i.deps===null&&i.first===null&&i.nodes_start===null&&i.teardown===null&&(i.f&wr)===0;if(!o&&n&&(a!==null&&ui(i,a),I!==null&&(I.f&ae)!==0)){var s=I;(s.effects??(s.effects=[])).push(i)}return i}function be(r){ci();var e=j.f,t=!I&&(e&Ae)!==0&&(e&xr)===0;if(t){var n=fe;(n.e??(n.e=[])).push(r)}else return Pn(r)}function Pn(r){return qe(_r|_n,r,!1)}function di(r){Qt.ensure();const e=qe(et,r,!0);return(t={})=>new Promise(n=>{t.outro?yi(e,()=>{Ye(e),n(void 0)}):(Ye(e),n(void 0))})}function pi(r){return qe(_r,r,!1)}function fi(r){return qe(kr|wr,r,!0)}function Ln(r,e=0){return qe(gn|e,r,!0)}function Dn(r,e=[],t=[]){ni(e,t,n=>{qe(gn,()=>r(...n.map(V)),!0)})}function hi(r,e=!0){return qe(Ae,r,!0,e)}function jn(r){var e=r.teardown;if(e!==null){const t=at,n=I;Un(!0),Ne(null);try{e.call(null)}finally{Un(t),Ne(n)}}}function Zn(r,e=!1){var a;var t=r.first;for(r.first=r.last=null;t!==null;){(a=t.ac)==null||a.abort(Sr);var n=t.next;(t.f&et)!==0?t.parent=null:Ye(t,e),t=n}}function mi(r){for(var e=r.first;e!==null;){var t=e.next;(e.f&Ae)===0&&Ye(e),e=t}}function Ye(r,e=!0){var t=!1;(e||(r.f&ja)!==0)&&r.nodes_start!==null&&r.nodes_end!==null&&(gi(r.nodes_start,r.nodes_end),t=!0),Zn(r,e&&!t),rr(r,0),ee(r,rt);var n=r.transitions;if(n!==null)for(const i of n)i.stop();jn(r);var a=r.parent;a!==null&&a.first!==null&&Fn(r),r.next=r.prev=r.teardown=r.ctx=r.deps=r.fn=r.nodes_start=r.nodes_end=r.ac=null}function gi(r,e){for(;r!==null;){var t=r===e?null:In(r);r.remove(),r=t}}function Fn(r){var e=r.parent,t=r.prev,n=r.next;t!==null&&(t.next=n),n!==null&&(n.prev=t),e!==null&&(e.first===r&&(e.first=n),e.last===r&&(e.last=t))}function yi(r,e){var t=[];Bn(r,t,!0),vi(t,()=>{Ye(r),e&&e()})}function vi(r,e){var t=r.length;if(t>0){var n=()=>--t||e();for(var a of r)a.out(n)}else e()}function Bn(r,e,t){if((r.f&tt)===0){if(r.f^=tt,r.transitions!==null)for(const o of r.transitions)(o.is_global||t)&&e.push(o);for(var n=r.first;n!==null;){var a=n.next,i=(n.f&Da)!==0||(n.f&Ae)!==0;Bn(n,e,i?t:!1),n=a}}}let nt=!1;function Vn(r){nt=r}let at=!1;function Un(r){at=r}let I=null,ge=!1;function Ne(r){I=r}let j=null;function it(r){j=r}let K=null;function _i(r){I!==null&&(K===null?K=[r]:K.push(r))}let Q=null,oe=0,ue=null;function xi(r){ue=r}let er=1,Ct=0,Xe=Ct;function Wn(r){Xe=r}let Te=!1;function $n(){return++er}function tr(r){var p;var e=r.f;if((e&pe)!==0)return!0;if((e&Ve)!==0){var t=r.deps,n=(e&ie)!==0;if(t!==null){var a,i,o=(e&Yt)!==0,s=n&&j!==null&&!Te,l=t.length;if((o||s)&&(j===null||(j.f&rt)===0)){var c=r,u=c.parent;for(a=0;a<l;a++)i=t[a],(o||!((p=i==null?void 0:i.reactions)!=null&&p.includes(c)))&&(i.reactions??(i.reactions=[])).push(c);o&&(c.f^=Yt),s&&u!==null&&(u.f&ie)===0&&(c.f^=ie)}for(a=0;a<l;a++)if(i=t[a],tr(i)&&Sn(i),i.wv>r.wv)return!0}(!n||j!==null&&!Te)&&ee(r,X)}return!1}function qn(r,e,t=!0){var n=r.reactions;if(n!==null&&!(K!=null&&K.includes(r)))for(var a=0;a<n.length;a++){var i=n[a];(i.f&ae)!==0?qn(i,e,!1):e===i&&(t?ee(i,pe):(i.f&X)!==0&&ee(i,Ve),We(i))}}function Yn(r){var M;var e=Q,t=oe,n=ue,a=I,i=Te,o=K,s=fe,l=ge,c=Xe,u=r.f;Q=null,oe=0,ue=null,Te=(u&ie)!==0&&(ge||!nt||I===null),I=(u&(Ae|et))===0?r:null,K=null,Ht(r.ctx),ge=!1,Xe=++Ct,r.ac!==null&&(r.ac.abort(Sr),r.ac=null);try{r.f|=br;var p=(0,r.fn)(),h=r.deps;if(Q!==null){var v;if(rr(r,oe),h!==null&&oe>0)for(h.length=oe+Q.length,v=0;v<Q.length;v++)h[oe+v]=Q[v];else r.deps=h=Q;if(!Te||(u&ae)!==0&&r.reactions!==null)for(v=oe;v<h.length;v++)((M=h[v]).reactions??(M.reactions=[])).push(r)}else h!==null&&oe<h.length&&(rr(r,oe),h.length=oe);if(wn()&&ue!==null&&!ge&&h!==null&&(r.f&(ae|Ve|pe))===0)for(v=0;v<ue.length;v++)qn(ue[v],r);return a!==null&&a!==r&&(Ct++,ue!==null&&(n===null?n=ue:n.push(...ue))),(r.f&Ue)!==0&&(r.f^=Ue),p}catch(x){return Ga(x)}finally{r.f^=br,Q=e,oe=t,ue=n,I=a,Te=i,K=o,Ht(s),ge=l,Xe=c}}function wi(r,e){let t=e.reactions;if(t!==null){var n=$t.call(t,r);if(n!==-1){var a=t.length-1;a===0?t=e.reactions=null:(t[n]=t[a],t.pop())}}t===null&&(e.f&ae)!==0&&(Q===null||!Q.includes(e))&&(ee(e,Ve),(e.f&(ie|Yt))===0&&(e.f^=Yt),kn(e),rr(e,0))}function rr(r,e){var t=r.deps;if(t!==null)for(var n=e;n<t.length;n++)wi(r,t[n])}function Nt(r){var e=r.f;if((e&rt)===0){ee(r,X);var t=j,n=nt;j=r,nt=!0;try{(e&qt)!==0?mi(r):Zn(r),jn(r);var a=Yn(r);r.teardown=typeof a=="function"?a:null,r.wv=er;var i}finally{nt=n,j=t}}}function V(r){var e=r.f,t=(e&ae)!==0;if(I!==null&&!ge){var n=j!==null&&(j.f&rt)!==0;if(!n&&!(K!=null&&K.includes(r))){var a=I.deps;if((I.f&br)!==0)r.rv<Ct&&(r.rv=Ct,Q===null&&a!==null&&a[oe]===r?oe++:Q===null?Q=[r]:(!Te||!Q.includes(r))&&Q.push(r));else{(I.deps??(I.deps=[])).push(r);var i=r.reactions;i===null?r.reactions=[I]:i.includes(I)||i.push(I)}}}else if(t&&r.deps===null&&r.effects===null){var o=r,s=o.parent;s!==null&&(s.f&ie)===0&&(o.f^=ie)}if(at){if($e.has(r))return $e.get(r);if(t){o=r;var l=o.v;return((o.f&X)!==0||Xn(o))&&(l=Ar(o)),$e.set(o,l),l}}else if(t){if(o=r,Ce!=null&&Ce.has(o))return Ce.get(o);tr(o)&&Sn(o)}if((r.f&Ue)!==0)throw r.v;return r.v}function Xn(r){if(r.v===H)return!0;if(r.deps===null)return!1;for(const e of r.deps)if($e.has(e)||(e.f&ae)!==0&&Xn(e))return!0;return!1}function bi(r){var e=ge;try{return ge=!0,r()}finally{ge=e}}const ki=-7169;function ee(r,e){r.f=r.f&ki|e}const Si=["touchstart","touchmove"];function zi(r){return Si.includes(r)}const Mi=new Set,Hn=new Set;function nr(r){var g;var e=this,t=e.ownerDocument,n=r.type,a=((g=r.composedPath)==null?void 0:g.call(r))||[],i=a[0]||r.target,o=0,s=r.__root;if(s){var l=a.indexOf(s);if(l!==-1&&(e===document||e===window)){r.__root=e;return}var c=a.indexOf(e);if(c===-1)return;l<=c&&(o=l)}if(i=a[o]||r.target,i!==e){vr(r,"currentTarget",{configurable:!0,get(){return i||t}});var u=I,p=j;Ne(null),it(null);try{for(var h,v=[];i!==null;){var M=i.assignedSlot||i.parentNode||i.host||null;try{var x=i["__"+n];if(x!=null&&(!i.disabled||r.target===i))if(B(x)){var[f,..._]=x;f.apply(i,[r,..._])}else x.call(i,r)}catch(y){h?v.push(y):h=y}if(r.cancelBubble||M===e||M===null)break;i=M}if(h){for(let y of v)queueMicrotask(()=>{throw y});throw h}}finally{r.__root=e,delete r.currentTarget,Ne(u),it(p)}}}function Ei(r){var e=document.createElement("template");return e.innerHTML=r.replaceAll("<!>","<!---->"),e.content}function Ai(r,e){var t=j;t.nodes_start===null&&(t.nodes_start=r,t.nodes_end=e)}function Gn(r,e){var t=(e&Xa)!==0,n,a=!r.startsWith("<!>");return()=>{n===void 0&&(n=Ei(a?r:"<!>"+r),n=On(n));var i=t||Nn?document.importNode(n,!0):n.cloneNode(!0);return Ai(i,i),i}}function Jn(r,e){r!==null&&r.before(e)}function Or(r,e){return Ci(r,e)}const ot=new Map;function Ci(r,{target:e,anchor:t,props:n={},events:a,context:i,intro:o=!0}){oi();var s=new Set,l=p=>{for(var h=0;h<p.length;h++){var v=p[h];if(!s.has(v)){s.add(v);var M=zi(v);e.addEventListener(v,nr,{passive:M});var x=ot.get(v);x===void 0?(document.addEventListener(v,nr,{passive:M}),ot.set(v,1)):ot.set(v,x+1)}}};l(Ta(Mi)),Hn.add(l);var c=void 0,u=di(()=>{var p=t??e.appendChild(si());return hi(()=>{if(i){zr({});var h=fe;h.c=i}a&&(n.$$events=a),c=r(p,n)||{},i&&Mr()}),()=>{var M;for(var h of s){e.removeEventListener(h,nr);var v=ot.get(h);--v===0?(document.removeEventListener(h,nr),ot.delete(h)):ot.set(h,v)}Hn.delete(l),p!==t&&((M=p.parentNode)==null||M.removeChild(p))}});return Ni.set(c,u),c}let Ni=new WeakMap;const Kn=[...`
2
- \r\f \v\uFEFF`];function Ti(r,e,t){var n=r==null?"":""+r;if(t){for(var a in t)if(t[a])n=n?n+" "+a:a;else if(n.length)for(var i=a.length,o=0;(o=n.indexOf(a,o))>=0;){var s=o+i;(o===0||Kn.includes(n[o-1]))&&(s===n.length||Kn.includes(n[s]))?n=(o===0?"":n.substring(0,o))+n.substring(s+1):o=s}}return n===""?null:n}function Qn(r,e=!1){var t=e?" !important;":";",n="";for(var a in r){var i=r[a];i!=null&&i!==""&&(n+=" "+a+": "+i+t)}return n}function Ir(r){return r[0]!=="-"||r[1]!=="-"?r.toLowerCase():r}function Ri(r,e){if(e){var t="",n,a;if(Array.isArray(e)?(n=e[0],a=e[1]):n=e,r){r=String(r).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var i=!1,o=0,s=!1,l=[];n&&l.push(...Object.keys(n).map(Ir)),a&&l.push(...Object.keys(a).map(Ir));var c=0,u=-1;const x=r.length;for(var p=0;p<x;p++){var h=r[p];if(s?h==="/"&&r[p-1]==="*"&&(s=!1):i?i===h&&(i=!1):h==="/"&&r[p+1]==="*"?s=!0:h==='"'||h==="'"?i=h:h==="("?o++:h===")"&&o--,!s&&i===!1&&o===0){if(h===":"&&u===-1)u=p;else if(h===";"||p===x-1){if(u!==-1){var v=Ir(r.substring(c,u).trim());if(!l.includes(v)){h!==";"&&p++;var M=r.substring(c,p).trim();t+=" "+M+";"}}c=p+1,u=-1}}}}return n&&(t+=Qn(n)),a&&(t+=Qn(a,!0)),t=t.trim(),t===""?null:t}return r==null?null:String(r)}function ea(r,e,t,n,a,i){var o=r.__className;if(o!==t||o===void 0){var s=Ti(t,n,i);s==null?r.removeAttribute("class"):r.className=s,r.__className=t}else if(i&&a!==i)for(var l in i){var c=!!i[l];(a==null||c!==!!a[l])&&r.classList.toggle(l,c)}return i}function Pr(r,e={},t,n){for(var a in t){var i=t[a];e[a]!==i&&(t[a]==null?r.style.removeProperty(a):r.style.setProperty(a,i,n))}}function ar(r,e,t,n){var a=r.__style;if(a!==e){var i=Ri(e,n);i==null?r.removeAttribute("style"):r.style.cssText=i,r.__style=e}else n&&(Array.isArray(n)?(Pr(r,t==null?void 0:t[0],n[0]),Pr(r,t==null?void 0:t[1],n[1],"important")):Pr(r,t,n));return n}const Oi=()=>performance.now(),ye={tick:r=>requestAnimationFrame(r),now:()=>Oi(),tasks:new Set};function ta(){const r=ye.now();ye.tasks.forEach(e=>{e.c(r)||(ye.tasks.delete(e),e.f())}),ye.tasks.size!==0&&ye.tick(ta)}function Ii(r){let e;return ye.tasks.size===0&&ye.tick(ta),{promise:new Promise(t=>{ye.tasks.add(e={c:r,f:t})}),abort(){ye.tasks.delete(e)}}}function ra(r,e){return r===e||(r==null?void 0:r[Xt])===e}function st(r={},e,t,n){return pi(()=>{var a,i;return Ln(()=>{a=i,i=[],bi(()=>{r!==t(...i)&&(e(r,...i),a&&ra(t(...a),r)&&e(null,...a))})}),()=>{Ka(()=>{i&&ra(t(...i),r)&&e(null,...i)})}}),r}const Pi="5";typeof window<"u"&&((Ma=window.__svelte??(window.__svelte={})).v??(Ma.v=new Set)).add(Pi);function Li(r){return r}function Lr(r){return-.5*(Math.cos(Math.PI*r)-1)}function Di(r){const e=Math.cos(r*Math.PI*.5);return Math.abs(e)<1e-14?1:1-e}function ji(r){return Math.sin(r*Math.PI/2)}const Zi=128,Fi=0,Bi=1,Vi=2;class Ui{constructor(){d(this,"animationsStarted",!1);d(this,"animationsCount",0);d(this,"animationsLimit",Zi);d(this,"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 t=this.layers[e];if(t==null)continue;const n=t.animations;if(n!=null)for(let a=0;a<n.length;a++){const i=n[a];if(i!=null){for(const o of i.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,t,n,a){let i=this.layers[e];i==null&&(i=this.layers[e]={animations:new Array});let o=i.animations[t];o==null&&(o=i.animations[t]=new Map);let s={id:n,priority:t,executed:!1,function:a};o.set(n,s),this.animationsStarted==!1&&(this.animationsStarted=!0,this.start())}clear(e,t){for(let n=0;n<this.layers.length;n++){let a=this.layers[n];if(a==null)continue;let i=a.animations[e];if(i==null)return;let o=i.get(t);if(o==null||o.executed==!1)return;i.delete(t)}}speed(){return Math.pow(2,2*this.animationsCount/this.animationsLimit)}stacked(){return this.animationsCount==this.animationsLimit}setLimit(e){this.animationsLimit=e}}const Re=new Ui;function na(r){return Object.prototype.toString.call(r)==="[object Date]"}function Dr(r,e){if(r===e||r!==r)return()=>r;const t=typeof r;if(t!==typeof e||Array.isArray(r)!==Array.isArray(e))throw new Error("Cannot interpolate values of different type");if(Array.isArray(r)){const n=e.map((a,i)=>Dr(r[i],a));return a=>n.map(i=>i(a))}if(t==="object"){if(!r||!e)throw new Error("Object cannot be null");if(na(r)&&na(e)){const i=r.getTime(),s=e.getTime()-i;return l=>new Date(i+l*s)}const n=Object.keys(e),a={};return n.forEach(i=>{a[i]=Dr(r[i],e[i])}),i=>{const o={};return n.forEach(s=>{o[s]=a[s](i)}),o}}if(t==="number"){const n=e-r;return a=>r+a*n}return()=>e}const dn=class dn{constructor(e,t={}){Y(this,Me);Y(this,xt);Y(this,Bt);Y(this,Qe,null);J(this,Me,te(e)),J(this,xt,te(e)),J(this,Bt,t)}static of(e,t){const n=new dn(e(),t);return Ln(()=>{n.set(e())}),n}set(e,t){var p;G(C(this,xt),e);let{delay:n=0,duration:a=400,easing:i=Li,interpolate:o=Dr}={...C(this,Bt),...t};if(a===0)return(p=C(this,Qe))==null||p.abort(),G(C(this,Me),e),Promise.resolve();const s=ye.now()+n;let l,c=!1,u=C(this,Qe);return J(this,Qe,Ii(h=>{if(h<s)return!0;if(!c){c=!0;const M=C(this,Me).v;l=o(M,e),typeof a=="function"&&(a=a(M,e)),u==null||u.abort()}const v=h-s;return v>a?(G(C(this,Me),e),!1):(G(C(this,Me),l(i(v/a))),!0)})),C(this,Qe).promise}get current(){return V(C(this,Me))}get target(){return V(C(this,xt))}set target(e){this.set(e)}};Me=new WeakMap,xt=new WeakMap,Bt=new WeakMap,Qe=new WeakMap;let jr=dn;class ir{constructor(e,t){d(this,"value");d(this,"motion");this.value=e,this.motion=new jr(e,t)}set(e,t){this.value=e,this.motion.set(e,t)}update(e){this.motion.set(this.value,e)}snap(){this.motion.set(this.value,{duration:0})}}var Wi=Gn('<div><div class="body svelte-1nfn9j8"></div></div>');function $i(r,e){zr(e,!0);let t,n;function a(){return n}let i=te(!1);function o(g){G(i,g,!0)}function s(){return V(i)}let l=new ir(0,{easing:Lr});be(()=>{c(l.motion.current)}),be(()=>{V(i)==!1&&(l.snap(),Re.clear(e.priority,e.id))});function c(g){t&&Re.equeue(e.layer,e.priority,e.id,()=>{t.style.scale=g.toString(),t.style.filter=`brightness(${.25+.75*g})`,n.style.opacity=g.toString()})}function u(g){g!=l.value&&l.set(g,{duration:75})}function p(){return l.motion.current==0}function h(){return l.value}var v=Wi();let M,x;var f=Rr(v);let _;return st(f,g=>n=g,()=>n),st(v,g=>t=g,()=>t),Dn((g,y,z)=>{M=ea(v,1,"pin svelte-1nfn9j8",null,M,g),x=ar(v,"",x,y),_=ar(f,"",_,z)},[()=>({displayed:V(i)}),()=>({width:`${e.width}px`,height:`${e.height}px`,"border-radius":`${e.radius}px`}),()=>({width:`${e.width-4}px`,height:`${e.height-4}px`,"border-radius":`${e.radius-2}px`})]),Jn(r,v),Mr({getBody:a,setDisplayed:o,getDisplayed:s,setScale:u,getCollapsed:p,getScale:h})}var lt;(r=>{function e(t,n,a){const i=t/2,o=n/2,s=Math.sqrt(i*i+o*o),l=Math.atan(o/i)*(180/Math.PI),c=a*(Math.PI/180);return a<180?a<90?a<l?{offsetX:0,offsetY:s*Math.sin(c)-o}:{offsetX:s*Math.cos(c)-i,offsetY:0}:a<180-l?{offsetX:s*Math.cos(c)-i,offsetY:0}:{offsetX:-t,offsetY:s*Math.sin(c)-o}:a<270?a<180+l?{offsetX:-t,offsetY:s*Math.sin(c)-o}:{offsetX:s*Math.cos(c)-i,offsetY:-n}:a<360-l?{offsetX:s*Math.cos(c)-i,offsetY:-n}:{offsetX:0,offsetY:s*Math.sin(c)-o}}r.getOffsets=e})(lt||(lt={}));var qi=Gn('<div><div class="pointer svelte-j5igi2"></div> <div class="bubble svelte-j5igi2"><div class="body svelte-j5igi2"></div></div></div>');function aa(r,e){zr(e,!0);let t,n,a,i;const o=e.width+2*e.margin,s=e.height+2*e.margin,l=()=>i;be(()=>{a.style.width=`${e.margin*4}px`,a.style.height=`${e.margin*4}px`});let c=te(!0);function u(L){G(c,L,!0)}function p(){return V(c)}let h=te(!0);function v(L){G(h,L,!0)}function M(){return f.motion.current==0}function x(){return f.motion.current==1}let f=new ir(0);be(()=>{_(f.motion.current)}),be(()=>{V(c)==!1&&(f.snap(),Re.clear(e.priority,e.id+"_scale"))}),be(()=>{V(h)==!0&&f.value!=0&&(Re.stacked()?f.set(0,{duration:0}):f.set(0,{duration:150,easing:Di})),V(h)==!1&&f.value!=1&&f.set(1,{duration:150,easing:ji})});function _(L){!t||!n||!a||Re.equeue(V(h)?0:e.layer,e.priority,e.id+"_scale",()=>{t.style.opacity=`${L}`,n.style.scale=`${L}`,a.style.scale=`${L}`})}let g=NaN,y=te(!1),z=new ir(-o/2,{easing:Lr}),S=new ir(-s/2,{easing:Lr});be(()=>{N(z.motion.current,S.motion.current)}),be(()=>{V(c)==!1&&(z.snap(),z.snap(),Re.clear(e.priority,e.id+"_angle"))}),be(()=>{V(h)==!0&&V(y)&&(z.update({duration:75}),z.update({duration:75}))});function N(L,me){if(!t||!n||!a)return;const kt=L+o/2,Ee=me+s/2,we=s<o?kt*s/o:kt,St=s>o?Ee*o/s:Ee,gr=Math.atan2(St,we)/Math.PI*180-45,Vt=0,yr=30,zt=Math.sqrt(we*we+St*St),Ut=Math.min(o,s)/2,Oo=Ut*Math.SQRT2,Io=(zt-Ut)/(Oo-Ut),Ea=Vt+Io*(yr-Vt),Po=zt<Ut?zt/Ut:1;Re.equeue(e.layer,e.priority,e.id+"_angle",()=>{n.style.transform=`translate(${Math.round(L)}px, ${Math.round(me)}px)`,a.style.transform=`scale(${Po}) rotate(${gr}deg) skew(${Ea}deg, ${Ea}deg)`})}function Z(L){if(V(y)==!1){let me=lt.getOffsets(o,s,L);z.set(Math.round(me.offsetX),{duration:0}),S.set(Math.round(me.offsetY),{duration:0}),N(z.value,S.value),g=L,G(y,!0)}else if(L!=g){let me=Math.abs(L-g),kt=me<180?me:360-me,Ee=Math.log(kt)*75,we=lt.getOffsets(o,s,L);z.set(Math.round(we.offsetX),{duration:Ee}),S.set(Math.round(we.offsetY),{duration:Ee}),g=L}}function le(){return lt.getOffsets(o,s,g)}var ce=qi();let xe;var Fe=Rr(ce);st(Fe,L=>a=L,()=>a);var ne=li(Fe,2),Be=Rr(ne);return st(Be,L=>i=L,()=>i),st(ne,L=>n=L,()=>n),st(ce,L=>t=L,()=>t),Dn(L=>{xe=ea(ce,1,"anchor svelte-j5igi2",null,xe,L),ar(ne,`margin: ${e.margin}px;`),ar(Be,`width: ${e.width}px; height: ${e.height}px; border-radius: ${e.radius}px;`)},[()=>({displayed:V(c)})]),Jn(r,ce),Mr({getBody:l,setDisplayed:u,getDisplayed:p,setCollapsed:v,getCollapsed:M,getExpanded:x,setAngle:Z,getOffsets:le})}var He;(r=>{function e(s,l,c){return{x:n(l)*c,y:a(s)*c}}r.project=e;function t(s,l,c){return{lat:o(l/c),lng:i(s/c)}}r.unproject=t;function n(s){return(180+s)/360}function a(s){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+s*Math.PI/360)))/360}function i(s){return s*360-180}function o(s){return 360/Math.PI*Math.atan(Math.exp((180-s*360)*Math.PI/180))-90}})(He||(He={}));class ia{constructor(e,t,n,a,i){d(this,"swLat");d(this,"swLng");d(this,"neLat");d(this,"neLng");const o=n*Math.pow(2,t),s=He.project(e.sw.lat,e.sw.lng,o),l=He.project(e.ne.lat,e.ne.lng,o),c=s.x-a,u=s.y+i,p=l.x+a,h=l.y-i,v=He.unproject(c,u,o),M=He.unproject(p,h,o);this.swLat=v.lat,this.swLng=v.lng,this.neLat=M.lat,this.neLng=M.lng}contains(e,t){return this.swLat<=e&&e<=this.neLat?this.swLng<this.neLng?this.swLng<=t&&t<=this.neLng:t<=this.neLng||this.swLng<=t:!1}}var q;(r=>{r.COUNT=12,r.DEFAULT=270,r.DEGREES=[0,30,60,90,120,150,180,210,240,270,300,330]})(q||(q={}));var Tt;(r=>{let e;(o=>{o.RADIANS=q.DEGREES.map(c=>c*Math.PI/180),o.RADIANS_COS=o.RADIANS.map(c=>Math.cos(c)),o.RADIANS_SIN=o.RADIANS.map(c=>Math.sin(c));function s(c,u){const p=Math.abs(u/c);return p<1?p<.26795?0:1:p<3.73205?2:3}function l(c,u){const p=s(c,u);return c>0?u>0?(12-p)%12:0+p:u>0?6+p:6-p}o.getAngleIndex=l})(e=r.Angle||(r.Angle={}));class t{constructor(s,l,c,u){d(this,"center");d(this,"width");d(this,"height");d(this,"index");this.center=s,this.width=l,this.height=c,this.index=u}}r.Particle=t;function n(o){let s=!0;for(let l=0;l<o.length;l++){const[c,u]=o[l],p=c.index,h=c.center,v=c.width,M=c.height,x=i(p,-1),f=i(p,1),_=h.x+v*e.RADIANS_COS[x],g=h.y+M*e.RADIANS_SIN[x],y=h.x+v*e.RADIANS_COS[p],z=h.y+M*e.RADIANS_SIN[p],S=h.x+v*e.RADIANS_COS[f],N=h.y+M*e.RADIANS_SIN[f];let Z=0,le=0,ce=0;for(let Fe=0;Fe<u.length;Fe++){const ne=u[Fe],Be=ne.index,L=ne.center,me=ne.width,kt=ne.height,Ee=L.x+me*e.RADIANS_COS[Be],we=L.y+kt*e.RADIANS_SIN[Be],St=_-Ee,pn=g-we;Z+=1/(St*St+pn*pn);const gr=y-Ee,Vt=z-we;le+=1/(gr*gr+Vt*Vt);const yr=S-Ee,zt=N-we;ce+=1/(yr*yr+zt*zt)}let xe=0;Z<le&&Z<ce&&(xe=-1),ce<le&&ce<Z&&(xe=1),c.index=i(p,xe),xe!==0&&(s=!1)}return s}r.updatePointIndexes=n;function a(o){for(let s=0;s<o.length;s++){const[l,c]=o[s],u=l.center;let p=0,h=0;for(let v=0;v<c.length;v++){const x=c[v].center,f=u.x-x.x,_=u.y-x.y;if(f==0&&_==0)continue;const g=Math.sqrt(f*f+_*_),y=1/(g*g);p+=y*f/g,h+=-(y*_)/g}l.index=e.getAngleIndex(p,h)}}r.initializePointIndexes=a;function i(o,s){return s==0?o:((o+s)%q.COUNT+q.COUNT)%q.COUNT}})(Tt||(Tt={}));var Ge;(r=>{function e(n,a){return!(n.x-n.left>a.x+a.right||n.x+n.right<a.x-a.left||n.y-n.top>a.y+a.bottom||n.y+n.bottom<a.y-a.top)}r.areOverlaping=e;function t(n,a){let i=Math.abs(n.x-a.x),s=(n.x<a.x?n.right+a.left:n.left+a.right)/i,l=Math.abs(n.y-a.y),u=(n.y<a.y?n.bottom+a.top:n.top+a.bottom)/l,p=Math.min(s,u);return Math.log2(p)}r.getZoomWhenTouching=t})(Ge||(Ge={}));var U;(r=>{class e{constructor(){d(this,"zoomAfterExpanded");d(this,"zoomAfterAngleIndexes");this.zoomAfterExpanded=NaN,this.zoomAfterAngleIndexes=[]}}r.Tooltip=e;class t{constructor(f,_,g){d(this,"index");d(this,"id");d(this,"rank");d(this,"x");d(this,"y");d(this,"width");d(this,"height");d(this,"expanded");d(this,"angle");d(this,"bounds");d(this,"particle");d(this,"neighbours");const y=He.project(_.lat,_.lng,f.mapSize),z=_.width+2*_.margin,S=_.height+2*_.margin;this.index=g,this.id=_.id,this.rank=_.rank,this.x=y.x,this.y=y.y,this.width=z,this.height=S,this.expanded=!0,this.angle=q.DEFAULT,this.bounds=this.getBounds(1),this.particle=new Tt.Particle({x:y.x,y:y.y},this.getParticleWidth(1),this.getParticleHeight(1),q.DEGREES.indexOf(q.DEFAULT)),this.neighbours=new Array}getBounds(f){let{offsetX:_,offsetY:g}=lt.getOffsets(this.width,this.height,this.angle),y=-_,z=this.width-y,S=-g,N=this.height-S;return{x:this.x,y:this.y,left:y/f,right:z/f,top:S/f,bottom:N/f}}getParticleWidth(f){return this.width/2/f}getParticleHeight(f){return this.height/2/f}updateBounds(f){this.bounds=this.getBounds(f)}updateParticle(f){this.particle.width=this.getParticleWidth(f),this.particle.height=this.getParticleHeight(f)}}r.Node=t;class n{constructor(f){d(this,"min");d(this,"max");d(this,"scale");d(this,"step");this.min=f.zoomMin,this.max=f.zoomMax,this.scale=f.zoomScale,this.step=1/this.scale}addSteps(f,_){return Math.round((f+_*this.step)*this.scale)/this.scale}getIndex(f){if(!(f<this.min))return Math.min(Math.ceil(f*this.scale),this.max*this.scale)}getMax(f){let _=this.min;for(let g=0;g<f.length;g++){const z=f[g].keys();for(const S of z){const N=Number(S)/this.scale;N>_&&(_=N)}}return _}}r.Zoom=n;function a(x,f){let _=new Array(f.length);for(let g=0;g<f.length;g++)_[g]=new t(x,f[g],g);return _}r.createNodes=a;function i(x,f){const _=new Array;for(let y=0;y<f.length;y++)_[y]=new Array;const g=new Array(f.length);for(let y=0;y<f.length;y++){const z=f[y];g[y]={x:z.x,y:z.y,left:z.width,right:z.width,top:z.height,bottom:z.height}}for(let y=0;y<f.length;y++){const z=f[y],S=g[y],N=_[y];for(let Z=y+1;Z<f.length;Z++){const le=f[Z],ce=g[Z],xe=_[Z],Fe=Ge.getZoomWhenTouching(S,ce),ne=x.getIndex(Fe);if(ne==null)continue;const Be=N[ne],L=xe[ne];Be?Be.push(le):N[ne]=[le],L?L.push(z):xe[ne]=[z]}}return _}r.createNeighbourDeltas=i;function o(x){const f=new Set,_=[];for(let g=0;g<x.length;g++){let y=x[g];if(y.expanded==!1||y.neighbours.length==0||f.has(y))continue;f.add(y);const z=[],S=[y];for(;S.length>0;){const N=S.pop();z.push(N);for(const Z of N.neighbours)f.has(Z)||(f.add(Z),S.push(Z))}_.push(z)}return _}r.getNeighbourGraphs=o;function s(x,f,_){for(let g=0;g<x.length;g++){let y=x[g];if(y.expanded==!1){y.neighbours.length=0;continue}const S=f[g][_];if(S!=null)for(let N=0;N<S.length;N++){const Z=S[N];Z.expanded!=!1&&y.neighbours.push(Z)}}}r.updateNeighbours=s;function l(x){x.expanded=!1;const f=x.neighbours;for(let _=0;_<f.length;_++){const g=f[_],y=g.neighbours.indexOf(x);g.neighbours.splice(y,1)}}r.updateCollapsed=l;function c(x,f,_){for(let g=0;g<x.length;g++){const y=x[g];if(y.expanded==!1)continue;const z=f.get(y.id);if(!z)throw new Error("Tooltip not found");z.zoomAfterExpanded=_;const S=q.DEGREES.indexOf(y.angle);z.zoomAfterAngleIndexes.length==0?z.zoomAfterAngleIndexes.push([_,S]):z.zoomAfterAngleIndexes[0][1]!=S?z.zoomAfterAngleIndexes.unshift([_,S]):z.zoomAfterAngleIndexes[0][0]=_}}r.updateTooltips=c;function u(x,f){for(let _=0;_<x.length;_++)x[_].updateBounds(f)}r.updateBounds=u;function p(x){const f=new Set;for(let _=0;_<x.length;_++){const g=x[_],y=g.bounds,z=x[_].neighbours;for(let S=0;S<z.length;S++){const N=z[S],Z=N.bounds;Ge.areOverlaping(Z,y)&&(f.add(g),f.add(N))}}return f}r.getOverlaps=p;function h(x,f){let _=!1;for(let g=0;g<f.length;g++){const y=f[g],z=y.bounds,S=f[g].neighbours;for(let N=0;N<S.length;N++){const Z=S[N],le=Z.bounds;Ge.areOverlaping(le,z)&&(x.has(y)||(x.add(y),_=!0),x.has(Z)||(x.add(Z),_=!0))}}return _}r.updateOverlaps=h;function v(x){let f,_=0;for(let g=0;g<x.length;g++){const y=x[g],z=y.bounds,S=x[g].neighbours;let N=0;for(let Z=0;Z<S.length;Z++){const le=S[Z],ce=le.bounds;Ge.areOverlaping(ce,z)&&(N+=1+(le.rank-y.rank))}N=N*S.length,N>_&&(_=N,f=y)}return f}r.getOverlapsWorstNode=v;function M(x){for(let f=0;f<x.length;f++){const g=x[f].bounds;for(let y=f+1;y<x.length;y++){const S=x[y].bounds;if(Ge.areOverlaping(S,g))return!0}}return!1}r.areOverlaping=M,(x=>{function f(y){const z=y.map(S=>S.particle);Tt.initializePointIndexes(z.map(S=>[S,z]));for(let S=0;S<y.length;S++){const N=y[S];N.angle=q.DEGREES[N.particle.index]}}x.initializeAngles=f;function _(y){const z=Tt.updatePointIndexes(y.map(S=>[S.particle,S.neighbours.map(N=>N.particle)]));for(let S=0;S<y.length;S++){const N=y[S];N.angle=q.DEGREES[N.particle.index]}return z}x.updateAngles=_;function g(y,z){for(let S=0;S<y.length;S++)y[S].updateParticle(z)}x.updateParticles=g})(r.Simulation||(r.Simulation={}))})(U||(U={}));function Yi(r,e){const t=new U.Zoom(r);if(e.length==0)return[];if(e.length==1)return[[t.min,[[t.min,q.DEGREES.indexOf(q.DEFAULT)]]]];const n=new Map(e.map(l=>[l.id,new U.Tooltip])),a=U.createNodes(r,e),i=U.createNeighbourDeltas(t,a),o=t.min,s=t.getMax(i);U.Simulation.initializeAngles(a),U.updateTooltips(a,n,t.addSteps(t.max,1));for(let l=s;l>=o;l=t.addSteps(l,-1)){const c=Math.pow(2,l),u=Math.round(l*t.scale);U.updateNeighbours(a,i,u);const p=U.getNeighbourGraphs(a);for(const h of p){U.updateBounds(h,c),U.Simulation.updateParticles(h,c);const v=U.getOverlaps(h);for(;v.size>1;){const M=Array.from(v);for(;;){const _=U.Simulation.updateAngles(M);if(U.updateBounds(M,c),_==!0||U.areOverlaping(M)==!1)break}if(U.updateOverlaps(v,M))continue;const f=U.getOverlapsWorstNode(M);if(f==null)break;U.updateCollapsed(f),v.delete(f)}}U.updateTooltips(a,n,Number(l.toFixed(1)))}return Array.from(n.values()).map(l=>[l.zoomAfterExpanded,l.zoomAfterAngleIndexes])}var D;(function(r){r.assertEqual=a=>{};function e(a){}r.assertIs=e;function t(a){throw new Error}r.assertNever=t,r.arrayToEnum=a=>{const i={};for(const o of a)i[o]=o;return i},r.getValidEnumValues=a=>{const i=r.objectKeys(a).filter(s=>typeof a[a[s]]!="number"),o={};for(const s of i)o[s]=a[s];return r.objectValues(o)},r.objectValues=a=>r.objectKeys(a).map(function(i){return a[i]}),r.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const i=[];for(const o in a)Object.prototype.hasOwnProperty.call(a,o)&&i.push(o);return i},r.find=(a,i)=>{for(const o of a)if(i(o))return o},r.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&Number.isFinite(a)&&Math.floor(a)===a;function n(a,i=" | "){return a.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}r.joinValues=n,r.jsonStringifyReplacer=(a,i)=>typeof i=="bigint"?i.toString():i})(D||(D={}));var oa;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(oa||(oa={}));const b=D.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Oe=r=>{switch(typeof r){case"undefined":return b.undefined;case"string":return b.string;case"number":return Number.isNaN(r)?b.nan:b.number;case"boolean":return b.boolean;case"function":return b.function;case"bigint":return b.bigint;case"symbol":return b.symbol;case"object":return Array.isArray(r)?b.array:r===null?b.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?b.promise:typeof Map<"u"&&r instanceof Map?b.map:typeof Set<"u"&&r instanceof Set?b.set:typeof Date<"u"&&r instanceof Date?b.date:b.object;default:return b.unknown}},m=D.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class de extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(i){return i.message},n={_errors:[]},a=i=>{for(const o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(a);else if(o.code==="invalid_return_type")a(o.returnTypeError);else if(o.code==="invalid_arguments")a(o.argumentsError);else if(o.path.length===0)n._errors.push(t(o));else{let s=n,l=0;for(;l<o.path.length;){const c=o.path[l];l===o.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(t(o))):s[c]=s[c]||{_errors:[]},s=s[c],l++}}};return a(this),n}static assert(e){if(!(e instanceof de))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,D.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},n=[];for(const a of this.issues)if(a.path.length>0){const i=a.path[0];t[i]=t[i]||[],t[i].push(e(a))}else n.push(e(a));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}de.create=r=>new de(r);const Rt=(r,e)=>{let t;switch(r.code){case m.invalid_type:r.received===b.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case m.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,D.jsonStringifyReplacer)}`;break;case m.unrecognized_keys:t=`Unrecognized key(s) in object: ${D.joinValues(r.keys,", ")}`;break;case m.invalid_union:t="Invalid input";break;case m.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${D.joinValues(r.options)}`;break;case m.invalid_enum_value:t=`Invalid enum value. Expected ${D.joinValues(r.options)}, received '${r.received}'`;break;case m.invalid_arguments:t="Invalid function arguments";break;case m.invalid_return_type:t="Invalid function return type";break;case m.invalid_date:t="Invalid date";break;case m.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(t=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?t=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?t=`Invalid input: must end with "${r.validation.endsWith}"`:D.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case m.too_small:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="bigint"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:t="Invalid input";break;case m.too_big:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?t=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:t="Invalid input";break;case m.custom:t="Invalid input";break;case m.invalid_intersection_types:t="Intersection results could not be merged";break;case m.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;case m.not_finite:t="Number must be finite";break;default:t=e.defaultError,D.assertNever(r)}return{message:t}};let Xi=Rt;function Zr(){return Xi}const Fr=r=>{const{data:e,path:t,errorMaps:n,issueData:a}=r,i=[...t,...a.path||[]],o={...a,path:i};if(a.message!==void 0)return{...a,path:i,message:a.message};let s="";const l=n.filter(c=>!!c).slice().reverse();for(const c of l)s=c(o,{data:e,defaultError:s}).message;return{...a,path:i,message:s}};function w(r,e){const t=Zr(),n=Fr({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t,t===Rt?void 0:Rt].filter(a=>!!a)});r.common.issues.push(n)}class se{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const n=[];for(const a of t){if(a.status==="aborted")return E;a.status==="dirty"&&e.dirty(),n.push(a.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){const n=[];for(const a of t){const i=await a.key,o=await a.value;n.push({key:i,value:o})}return se.mergeObjectSync(e,n)}static mergeObjectSync(e,t){const n={};for(const a of t){const{key:i,value:o}=a;if(i.status==="aborted"||o.status==="aborted")return E;i.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||a.alwaysSet)&&(n[i.value]=o.value)}return{status:e.value,value:n}}}const E=Object.freeze({status:"aborted"}),Ot=r=>({status:"dirty",value:r}),re=r=>({status:"valid",value:r}),sa=r=>r.status==="aborted",la=r=>r.status==="dirty",ct=r=>r.status==="valid",or=r=>typeof Promise<"u"&&r instanceof Promise;var k;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(k||(k={}));class Ie{constructor(e,t,n,a){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=a}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const ca=(r,e)=>{if(ct(e))return{success:!0,data:e.value};if(!r.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new de(r.common.issues);return this._error=t,this._error}}};function T(r){if(!r)return{};const{errorMap:e,invalid_type_error:t,required_error:n,description:a}=r;if(e&&(t||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:a}:{errorMap:(o,s)=>{const{message:l}=r;return o.code==="invalid_enum_value"?{message:l??s.defaultError}:typeof s.data>"u"?{message:l??n??s.defaultError}:o.code!=="invalid_type"?{message:s.defaultError}:{message:l??t??s.defaultError}},description:a}}class P{get description(){return this._def.description}_getType(e){return Oe(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:Oe(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new se,ctx:{common:e.parent.common,data:e.data,parsedType:Oe(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(or(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){const n={common:{issues:[],async:(t==null?void 0:t.async)??!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Oe(e)},a=this._parseSync({data:e,path:n.path,parent:n});return ca(n,a)}"~validate"(e){var n,a;const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Oe(e)};if(!this["~standard"].async)try{const i=this._parseSync({data:e,path:[],parent:t});return ct(i)?{value:i.value}:{issues:t.common.issues}}catch(i){(a=(n=i==null?void 0:i.message)==null?void 0:n.toLowerCase())!=null&&a.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(i=>ct(i)?{value:i.value}:{issues:t.common.issues})}async parseAsync(e,t){const n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){const n={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Oe(e)},a=this._parse({data:e,path:n.path,parent:n}),i=await(or(a)?a:Promise.resolve(a));return ca(n,i)}refine(e,t){const n=a=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(a):t;return this._refinement((a,i)=>{const o=e(a),s=()=>i.addIssue({code:m.custom,...n(a)});return typeof Promise<"u"&&o instanceof Promise?o.then(l=>l?!0:(s(),!1)):o?!0:(s(),!1)})}refinement(e,t){return this._refinement((n,a)=>e(n)?!0:(a.addIssue(typeof t=="function"?t(n,a):t),!1))}_refinement(e){return new ht({schema:this,typeName:A.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}optional(){return De.create(this,this._def)}nullable(){return mt.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ve.create(this)}promise(){return Dt.create(this,this._def)}or(e){return lr.create([this,e],this._def)}and(e){return cr.create(this,e,this._def)}transform(e){return new ht({...T(this._def),schema:this,typeName:A.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new qr({...T(this._def),innerType:this,defaultValue:t,typeName:A.ZodDefault})}brand(){return new vo({typeName:A.ZodBranded,type:this,...T(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new Yr({...T(this._def),innerType:this,catchValue:t,typeName:A.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return Xr.create(this,e)}readonly(){return Hr.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Hi=/^c[^\s-]{8,}$/i,Gi=/^[0-9a-z]+$/,Ji=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Ki=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Qi=/^[a-z0-9_-]{21}$/i,eo=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,to=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,ro=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,no="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Br;const ao=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,io=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,oo=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,so=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,lo=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,co=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,ua="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",uo=new RegExp(`^${ua}$`);function da(r){let e="[0-5]\\d";r.precision?e=`${e}\\.\\d{${r.precision}}`:r.precision==null&&(e=`${e}(\\.\\d+)?`);const t=r.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function po(r){return new RegExp(`^${da(r)}$`)}function fo(r){let e=`${ua}T${da(r)}`;const t=[];return t.push(r.local?"Z?":"Z"),r.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function ho(r,e){return!!((e==="v4"||!e)&&ao.test(r)||(e==="v6"||!e)&&oo.test(r))}function mo(r,e){if(!eo.test(r))return!1;try{const[t]=r.split(".");if(!t)return!1;const n=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),a=JSON.parse(atob(n));return!(typeof a!="object"||a===null||"typ"in a&&(a==null?void 0:a.typ)!=="JWT"||!a.alg||e&&a.alg!==e)}catch{return!1}}function go(r,e){return!!((e==="v4"||!e)&&io.test(r)||(e==="v6"||!e)&&so.test(r))}class Pe extends P{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==b.string){const i=this._getOrReturnCtx(e);return w(i,{code:m.invalid_type,expected:b.string,received:i.parsedType}),E}const n=new se;let a;for(const i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(a=this._getOrReturnCtx(e,a),w(a,{code:m.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="max")e.data.length>i.value&&(a=this._getOrReturnCtx(e,a),w(a,{code:m.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){const o=e.data.length>i.value,s=e.data.length<i.value;(o||s)&&(a=this._getOrReturnCtx(e,a),o?w(a,{code:m.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&w(a,{code:m.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")ro.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"email",code:m.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")Br||(Br=new RegExp(no,"u")),Br.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"emoji",code:m.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")Ki.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"uuid",code:m.invalid_string,message:i.message}),n.dirty());else if(i.kind==="nanoid")Qi.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"nanoid",code:m.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")Hi.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"cuid",code:m.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")Gi.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"cuid2",code:m.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")Ji.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"ulid",code:m.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{a=this._getOrReturnCtx(e,a),w(a,{validation:"url",code:m.invalid_string,message:i.message}),n.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"regex",code:m.invalid_string,message:i.message}),n.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(a=this._getOrReturnCtx(e,a),w(a,{code:m.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(a=this._getOrReturnCtx(e,a),w(a,{code:m.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(a=this._getOrReturnCtx(e,a),w(a,{code:m.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?fo(i).test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{code:m.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="date"?uo.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{code:m.invalid_string,validation:"date",message:i.message}),n.dirty()):i.kind==="time"?po(i).test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{code:m.invalid_string,validation:"time",message:i.message}),n.dirty()):i.kind==="duration"?to.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"duration",code:m.invalid_string,message:i.message}),n.dirty()):i.kind==="ip"?ho(e.data,i.version)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"ip",code:m.invalid_string,message:i.message}),n.dirty()):i.kind==="jwt"?mo(e.data,i.alg)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"jwt",code:m.invalid_string,message:i.message}),n.dirty()):i.kind==="cidr"?go(e.data,i.version)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"cidr",code:m.invalid_string,message:i.message}),n.dirty()):i.kind==="base64"?lo.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"base64",code:m.invalid_string,message:i.message}),n.dirty()):i.kind==="base64url"?co.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"base64url",code:m.invalid_string,message:i.message}),n.dirty()):D.assertNever(i);return{status:n.value,value:e.data}}_regex(e,t,n){return this.refinement(a=>e.test(a),{validation:t,code:m.invalid_string,...k.errToObj(n)})}_addCheck(e){return new Pe({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...k.errToObj(e)})}url(e){return this._addCheck({kind:"url",...k.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...k.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...k.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...k.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...k.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...k.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...k.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...k.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...k.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...k.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...k.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...k.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!1,...k.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...k.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...k.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...k.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...k.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...k.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...k.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...k.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...k.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...k.errToObj(t)})}nonempty(e){return this.min(1,k.errToObj(e))}trim(){return new Pe({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Pe({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Pe({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}Pe.create=r=>new Pe({checks:[],typeName:A.ZodString,coerce:(r==null?void 0:r.coerce)??!1,...T(r)});function yo(r,e){const t=(r.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,a=t>n?t:n,i=Number.parseInt(r.toFixed(a).replace(".","")),o=Number.parseInt(e.toFixed(a).replace(".",""));return i%o/10**a}class ut extends P{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==b.number){const i=this._getOrReturnCtx(e);return w(i,{code:m.invalid_type,expected:b.number,received:i.parsedType}),E}let n;const a=new se;for(const i of this._def.checks)i.kind==="int"?D.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),w(n,{code:m.invalid_type,expected:"integer",received:"float",message:i.message}),a.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(n=this._getOrReturnCtx(e,n),w(n,{code:m.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(n=this._getOrReturnCtx(e,n),w(n,{code:m.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="multipleOf"?yo(e.data,i.value)!==0&&(n=this._getOrReturnCtx(e,n),w(n,{code:m.not_multiple_of,multipleOf:i.value,message:i.message}),a.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),w(n,{code:m.not_finite,message:i.message}),a.dirty()):D.assertNever(i);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,k.toString(t))}gt(e,t){return this.setLimit("min",e,!1,k.toString(t))}lte(e,t){return this.setLimit("max",e,!0,k.toString(t))}lt(e,t){return this.setLimit("max",e,!1,k.toString(t))}setLimit(e,t,n,a){return new ut({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:k.toString(a)}]})}_addCheck(e){return new ut({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:k.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:k.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:k.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:k.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:k.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:k.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:k.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:k.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:k.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&D.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(t===null||n.value>t)&&(t=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}}ut.create=r=>new ut({checks:[],typeName:A.ZodNumber,coerce:(r==null?void 0:r.coerce)||!1,...T(r)});class It extends P{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==b.bigint)return this._getInvalidInput(e);let n;const a=new se;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(n=this._getOrReturnCtx(e,n),w(n,{code:m.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),a.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(n=this._getOrReturnCtx(e,n),w(n,{code:m.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),a.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),w(n,{code:m.not_multiple_of,multipleOf:i.value,message:i.message}),a.dirty()):D.assertNever(i);return{status:a.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return w(t,{code:m.invalid_type,expected:b.bigint,received:t.parsedType}),E}gte(e,t){return this.setLimit("min",e,!0,k.toString(t))}gt(e,t){return this.setLimit("min",e,!1,k.toString(t))}lte(e,t){return this.setLimit("max",e,!0,k.toString(t))}lt(e,t){return this.setLimit("max",e,!1,k.toString(t))}setLimit(e,t,n,a){return new It({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:k.toString(a)}]})}_addCheck(e){return new It({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:k.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:k.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:k.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:k.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:k.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}It.create=r=>new It({checks:[],typeName:A.ZodBigInt,coerce:(r==null?void 0:r.coerce)??!1,...T(r)});class Vr extends P{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==b.boolean){const n=this._getOrReturnCtx(e);return w(n,{code:m.invalid_type,expected:b.boolean,received:n.parsedType}),E}return re(e.data)}}Vr.create=r=>new Vr({typeName:A.ZodBoolean,coerce:(r==null?void 0:r.coerce)||!1,...T(r)});class sr extends P{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==b.date){const i=this._getOrReturnCtx(e);return w(i,{code:m.invalid_type,expected:b.date,received:i.parsedType}),E}if(Number.isNaN(e.data.getTime())){const i=this._getOrReturnCtx(e);return w(i,{code:m.invalid_date}),E}const n=new se;let a;for(const i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(a=this._getOrReturnCtx(e,a),w(a,{code:m.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),n.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(a=this._getOrReturnCtx(e,a),w(a,{code:m.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):D.assertNever(i);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new sr({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:k.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:k.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}}sr.create=r=>new sr({checks:[],coerce:(r==null?void 0:r.coerce)||!1,typeName:A.ZodDate,...T(r)});class pa extends P{_parse(e){if(this._getType(e)!==b.symbol){const n=this._getOrReturnCtx(e);return w(n,{code:m.invalid_type,expected:b.symbol,received:n.parsedType}),E}return re(e.data)}}pa.create=r=>new pa({typeName:A.ZodSymbol,...T(r)});class fa extends P{_parse(e){if(this._getType(e)!==b.undefined){const n=this._getOrReturnCtx(e);return w(n,{code:m.invalid_type,expected:b.undefined,received:n.parsedType}),E}return re(e.data)}}fa.create=r=>new fa({typeName:A.ZodUndefined,...T(r)});class ha extends P{_parse(e){if(this._getType(e)!==b.null){const n=this._getOrReturnCtx(e);return w(n,{code:m.invalid_type,expected:b.null,received:n.parsedType}),E}return re(e.data)}}ha.create=r=>new ha({typeName:A.ZodNull,...T(r)});class Ur extends P{constructor(){super(...arguments),this._any=!0}_parse(e){return re(e.data)}}Ur.create=r=>new Ur({typeName:A.ZodAny,...T(r)});class dt extends P{constructor(){super(...arguments),this._unknown=!0}_parse(e){return re(e.data)}}dt.create=r=>new dt({typeName:A.ZodUnknown,...T(r)});class Le extends P{_parse(e){const t=this._getOrReturnCtx(e);return w(t,{code:m.invalid_type,expected:b.never,received:t.parsedType}),E}}Le.create=r=>new Le({typeName:A.ZodNever,...T(r)});class Wr extends P{_parse(e){if(this._getType(e)!==b.undefined){const n=this._getOrReturnCtx(e);return w(n,{code:m.invalid_type,expected:b.void,received:n.parsedType}),E}return re(e.data)}}Wr.create=r=>new Wr({typeName:A.ZodVoid,...T(r)});class ve extends P{_parse(e){const{ctx:t,status:n}=this._processInputParams(e),a=this._def;if(t.parsedType!==b.array)return w(t,{code:m.invalid_type,expected:b.array,received:t.parsedType}),E;if(a.exactLength!==null){const o=t.data.length>a.exactLength.value,s=t.data.length<a.exactLength.value;(o||s)&&(w(t,{code:o?m.too_big:m.too_small,minimum:s?a.exactLength.value:void 0,maximum:o?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),n.dirty())}if(a.minLength!==null&&t.data.length<a.minLength.value&&(w(t,{code:m.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),n.dirty()),a.maxLength!==null&&t.data.length>a.maxLength.value&&(w(t,{code:m.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((o,s)=>a.type._parseAsync(new Ie(t,o,t.path,s)))).then(o=>se.mergeArray(n,o));const i=[...t.data].map((o,s)=>a.type._parseSync(new Ie(t,o,t.path,s)));return se.mergeArray(n,i)}get element(){return this._def.type}min(e,t){return new ve({...this._def,minLength:{value:e,message:k.toString(t)}})}max(e,t){return new ve({...this._def,maxLength:{value:e,message:k.toString(t)}})}length(e,t){return new ve({...this._def,exactLength:{value:e,message:k.toString(t)}})}nonempty(e){return this.min(1,e)}}ve.create=(r,e)=>new ve({type:r,minLength:null,maxLength:null,exactLength:null,typeName:A.ZodArray,...T(e)});function pt(r){if(r instanceof W){const e={};for(const t in r.shape){const n=r.shape[t];e[t]=De.create(pt(n))}return new W({...r._def,shape:()=>e})}else return r instanceof ve?new ve({...r._def,type:pt(r.element)}):r instanceof De?De.create(pt(r.unwrap())):r instanceof mt?mt.create(pt(r.unwrap())):r instanceof ke?ke.create(r.items.map(e=>pt(e))):r}class W extends P{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=D.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==b.object){const c=this._getOrReturnCtx(e);return w(c,{code:m.invalid_type,expected:b.object,received:c.parsedType}),E}const{status:n,ctx:a}=this._processInputParams(e),{shape:i,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof Le&&this._def.unknownKeys==="strip"))for(const c in a.data)o.includes(c)||s.push(c);const l=[];for(const c of o){const u=i[c],p=a.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Ie(a,p,a.path,c)),alwaysSet:c in a.data})}if(this._def.catchall instanceof Le){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of s)l.push({key:{status:"valid",value:u},value:{status:"valid",value:a.data[u]}});else if(c==="strict")s.length>0&&(w(a,{code:m.unrecognized_keys,keys:s}),n.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of s){const p=a.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Ie(a,p,a.path,u)),alwaysSet:u in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const p=await u.key,h=await u.value;c.push({key:p,value:h,alwaysSet:u.alwaysSet})}return c}).then(c=>se.mergeObjectSync(n,c)):se.mergeObjectSync(n,l)}get shape(){return this._def.shape()}strict(e){return k.errToObj,new W({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,n)=>{var i,o;const a=((o=(i=this._def).errorMap)==null?void 0:o.call(i,t,n).message)??n.defaultError;return t.code==="unrecognized_keys"?{message:k.errToObj(e).message??a}:{message:a}}}:{}})}strip(){return new W({...this._def,unknownKeys:"strip"})}passthrough(){return new W({...this._def,unknownKeys:"passthrough"})}extend(e){return new W({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new W({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:A.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new W({...this._def,catchall:e})}pick(e){const t={};for(const n of D.objectKeys(e))e[n]&&this.shape[n]&&(t[n]=this.shape[n]);return new W({...this._def,shape:()=>t})}omit(e){const t={};for(const n of D.objectKeys(this.shape))e[n]||(t[n]=this.shape[n]);return new W({...this._def,shape:()=>t})}deepPartial(){return pt(this)}partial(e){const t={};for(const n of D.objectKeys(this.shape)){const a=this.shape[n];e&&!e[n]?t[n]=a:t[n]=a.optional()}return new W({...this._def,shape:()=>t})}required(e){const t={};for(const n of D.objectKeys(this.shape))if(e&&!e[n])t[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof De;)i=i._def.innerType;t[n]=i}return new W({...this._def,shape:()=>t})}keyof(){return va(D.objectKeys(this.shape))}}W.create=(r,e)=>new W({shape:()=>r,unknownKeys:"strip",catchall:Le.create(),typeName:A.ZodObject,...T(e)}),W.strictCreate=(r,e)=>new W({shape:()=>r,unknownKeys:"strict",catchall:Le.create(),typeName:A.ZodObject,...T(e)}),W.lazycreate=(r,e)=>new W({shape:r,unknownKeys:"strip",catchall:Le.create(),typeName:A.ZodObject,...T(e)});class lr extends P{_parse(e){const{ctx:t}=this._processInputParams(e),n=this._def.options;function a(i){for(const s of i)if(s.result.status==="valid")return s.result;for(const s of i)if(s.result.status==="dirty")return t.common.issues.push(...s.ctx.common.issues),s.result;const o=i.map(s=>new de(s.ctx.common.issues));return w(t,{code:m.invalid_union,unionErrors:o}),E}if(t.common.async)return Promise.all(n.map(async i=>{const o={...t,common:{...t.common,issues:[]},parent:null};return{result:await i._parseAsync({data:t.data,path:t.path,parent:o}),ctx:o}})).then(a);{let i;const o=[];for(const l of n){const c={...t,common:{...t.common,issues:[]},parent:null},u=l._parseSync({data:t.data,path:t.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:c}),c.common.issues.length&&o.push(c.common.issues)}if(i)return t.common.issues.push(...i.ctx.common.issues),i.result;const s=o.map(l=>new de(l));return w(t,{code:m.invalid_union,unionErrors:s}),E}}get options(){return this._def.options}}lr.create=(r,e)=>new lr({options:r,typeName:A.ZodUnion,...T(e)});function $r(r,e){const t=Oe(r),n=Oe(e);if(r===e)return{valid:!0,data:r};if(t===b.object&&n===b.object){const a=D.objectKeys(e),i=D.objectKeys(r).filter(s=>a.indexOf(s)!==-1),o={...r,...e};for(const s of i){const l=$r(r[s],e[s]);if(!l.valid)return{valid:!1};o[s]=l.data}return{valid:!0,data:o}}else if(t===b.array&&n===b.array){if(r.length!==e.length)return{valid:!1};const a=[];for(let i=0;i<r.length;i++){const o=r[i],s=e[i],l=$r(o,s);if(!l.valid)return{valid:!1};a.push(l.data)}return{valid:!0,data:a}}else return t===b.date&&n===b.date&&+r==+e?{valid:!0,data:r}:{valid:!1}}class cr extends P{_parse(e){const{status:t,ctx:n}=this._processInputParams(e),a=(i,o)=>{if(sa(i)||sa(o))return E;const s=$r(i.value,o.value);return s.valid?((la(i)||la(o))&&t.dirty(),{status:t.value,value:s.data}):(w(n,{code:m.invalid_intersection_types}),E)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([i,o])=>a(i,o)):a(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}cr.create=(r,e,t)=>new cr({left:r,right:e,typeName:A.ZodIntersection,...T(t)});class ke extends P{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==b.array)return w(n,{code:m.invalid_type,expected:b.array,received:n.parsedType}),E;if(n.data.length<this._def.items.length)return w(n,{code:m.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),E;!this._def.rest&&n.data.length>this._def.items.length&&(w(n,{code:m.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const i=[...n.data].map((o,s)=>{const l=this._def.items[s]||this._def.rest;return l?l._parse(new Ie(n,o,n.path,s)):null}).filter(o=>!!o);return n.common.async?Promise.all(i).then(o=>se.mergeArray(t,o)):se.mergeArray(t,i)}get items(){return this._def.items}rest(e){return new ke({...this._def,rest:e})}}ke.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ke({items:r,typeName:A.ZodTuple,rest:null,...T(e)})};class ma extends P{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==b.map)return w(n,{code:m.invalid_type,expected:b.map,received:n.parsedType}),E;const a=this._def.keyType,i=this._def.valueType,o=[...n.data.entries()].map(([s,l],c)=>({key:a._parse(new Ie(n,s,n.path,[c,"key"])),value:i._parse(new Ie(n,l,n.path,[c,"value"]))}));if(n.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const l of o){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return E;(c.status==="dirty"||u.status==="dirty")&&t.dirty(),s.set(c.value,u.value)}return{status:t.value,value:s}})}else{const s=new Map;for(const l of o){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return E;(c.status==="dirty"||u.status==="dirty")&&t.dirty(),s.set(c.value,u.value)}return{status:t.value,value:s}}}}ma.create=(r,e,t)=>new ma({valueType:e,keyType:r,typeName:A.ZodMap,...T(t)});class Pt extends P{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==b.set)return w(n,{code:m.invalid_type,expected:b.set,received:n.parsedType}),E;const a=this._def;a.minSize!==null&&n.data.size<a.minSize.value&&(w(n,{code:m.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),t.dirty()),a.maxSize!==null&&n.data.size>a.maxSize.value&&(w(n,{code:m.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),t.dirty());const i=this._def.valueType;function o(l){const c=new Set;for(const u of l){if(u.status==="aborted")return E;u.status==="dirty"&&t.dirty(),c.add(u.value)}return{status:t.value,value:c}}const s=[...n.data.values()].map((l,c)=>i._parse(new Ie(n,l,n.path,c)));return n.common.async?Promise.all(s).then(l=>o(l)):o(s)}min(e,t){return new Pt({...this._def,minSize:{value:e,message:k.toString(t)}})}max(e,t){return new Pt({...this._def,maxSize:{value:e,message:k.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}Pt.create=(r,e)=>new Pt({valueType:r,minSize:null,maxSize:null,typeName:A.ZodSet,...T(e)});class Lt extends P{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==b.function)return w(t,{code:m.invalid_type,expected:b.function,received:t.parsedType}),E;function n(s,l){return Fr({data:s,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Zr(),Rt].filter(c=>!!c),issueData:{code:m.invalid_arguments,argumentsError:l}})}function a(s,l){return Fr({data:s,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Zr(),Rt].filter(c=>!!c),issueData:{code:m.invalid_return_type,returnTypeError:l}})}const i={errorMap:t.common.contextualErrorMap},o=t.data;if(this._def.returns instanceof Dt){const s=this;return re(async function(...l){const c=new de([]),u=await s._def.args.parseAsync(l,i).catch(v=>{throw c.addIssue(n(l,v)),c}),p=await Reflect.apply(o,this,u);return await s._def.returns._def.type.parseAsync(p,i).catch(v=>{throw c.addIssue(a(p,v)),c})})}else{const s=this;return re(function(...l){const c=s._def.args.safeParse(l,i);if(!c.success)throw new de([n(l,c.error)]);const u=Reflect.apply(o,this,c.data),p=s._def.returns.safeParse(u,i);if(!p.success)throw new de([a(u,p.error)]);return p.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Lt({...this._def,args:ke.create(e).rest(dt.create())})}returns(e){return new Lt({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new Lt({args:e||ke.create([]).rest(dt.create()),returns:t||dt.create(),typeName:A.ZodFunction,...T(n)})}}class ga extends P{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}ga.create=(r,e)=>new ga({getter:r,typeName:A.ZodLazy,...T(e)});class ya extends P{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return w(t,{received:t.data,code:m.invalid_literal,expected:this._def.value}),E}return{status:"valid",value:e.data}}get value(){return this._def.value}}ya.create=(r,e)=>new ya({value:r,typeName:A.ZodLiteral,...T(e)});function va(r,e){return new ft({values:r,typeName:A.ZodEnum,...T(e)})}class ft extends P{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),n=this._def.values;return w(t,{expected:D.joinValues(n),received:t.parsedType,code:m.invalid_type}),E}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),n=this._def.values;return w(t,{received:t.data,code:m.invalid_enum_value,options:n}),E}return re(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return ft.create(e,{...this._def,...t})}exclude(e,t=this._def){return ft.create(this.options.filter(n=>!e.includes(n)),{...this._def,...t})}}ft.create=va;class _a extends P{_parse(e){const t=D.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==b.string&&n.parsedType!==b.number){const a=D.objectValues(t);return w(n,{expected:D.joinValues(a),received:n.parsedType,code:m.invalid_type}),E}if(this._cache||(this._cache=new Set(D.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const a=D.objectValues(t);return w(n,{received:n.data,code:m.invalid_enum_value,options:a}),E}return re(e.data)}get enum(){return this._def.values}}_a.create=(r,e)=>new _a({values:r,typeName:A.ZodNativeEnum,...T(e)});class Dt extends P{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==b.promise&&t.common.async===!1)return w(t,{code:m.invalid_type,expected:b.promise,received:t.parsedType}),E;const n=t.parsedType===b.promise?t.data:Promise.resolve(t.data);return re(n.then(a=>this._def.type.parseAsync(a,{path:t.path,errorMap:t.common.contextualErrorMap})))}}Dt.create=(r,e)=>new Dt({type:r,typeName:A.ZodPromise,...T(e)});class ht extends P{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===A.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:n}=this._processInputParams(e),a=this._def.effect||null,i={addIssue:o=>{w(n,o),o.fatal?t.abort():t.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),a.type==="preprocess"){const o=a.transform(n.data,i);if(n.common.async)return Promise.resolve(o).then(async s=>{if(t.value==="aborted")return E;const l=await this._def.schema._parseAsync({data:s,path:n.path,parent:n});return l.status==="aborted"?E:l.status==="dirty"||t.value==="dirty"?Ot(l.value):l});{if(t.value==="aborted")return E;const s=this._def.schema._parseSync({data:o,path:n.path,parent:n});return s.status==="aborted"?E:s.status==="dirty"||t.value==="dirty"?Ot(s.value):s}}if(a.type==="refinement"){const o=s=>{const l=a.refinement(s,i);if(n.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(n.common.async===!1){const s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?E:(s.status==="dirty"&&t.dirty(),o(s.value),{status:t.value,value:s.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>s.status==="aborted"?E:(s.status==="dirty"&&t.dirty(),o(s.value).then(()=>({status:t.value,value:s.value}))))}if(a.type==="transform")if(n.common.async===!1){const o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!ct(o))return E;const s=a.transform(o.value,i);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:s}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>ct(o)?Promise.resolve(a.transform(o.value,i)).then(s=>({status:t.value,value:s})):E);D.assertNever(a)}}ht.create=(r,e,t)=>new ht({schema:r,typeName:A.ZodEffects,effect:e,...T(t)}),ht.createWithPreprocess=(r,e,t)=>new ht({schema:e,effect:{type:"preprocess",transform:r},typeName:A.ZodEffects,...T(t)});class De extends P{_parse(e){return this._getType(e)===b.undefined?re(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}De.create=(r,e)=>new De({innerType:r,typeName:A.ZodOptional,...T(e)});class mt extends P{_parse(e){return this._getType(e)===b.null?re(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}mt.create=(r,e)=>new mt({innerType:r,typeName:A.ZodNullable,...T(e)});class qr extends P{_parse(e){const{ctx:t}=this._processInputParams(e);let n=t.data;return t.parsedType===b.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}qr.create=(r,e)=>new qr({innerType:r,typeName:A.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...T(e)});class Yr extends P{_parse(e){const{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},a=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return or(a)?a.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new de(n.common.issues)},input:n.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new de(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}Yr.create=(r,e)=>new Yr({innerType:r,typeName:A.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...T(e)});class xa extends P{_parse(e){if(this._getType(e)!==b.nan){const n=this._getOrReturnCtx(e);return w(n,{code:m.invalid_type,expected:b.nan,received:n.parsedType}),E}return{status:"valid",value:e.data}}}xa.create=r=>new xa({typeName:A.ZodNaN,...T(r)});class vo extends P{_parse(e){const{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}class Xr extends P{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?E:i.status==="dirty"?(t.dirty(),Ot(i.value)):this._def.out._parseAsync({data:i.value,path:n.path,parent:n})})();{const a=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?E:a.status==="dirty"?(t.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:n.path,parent:n})}}static create(e,t){return new Xr({in:e,out:t,typeName:A.ZodPipeline})}}class Hr extends P{_parse(e){const t=this._def.innerType._parse(e),n=a=>(ct(a)&&(a.value=Object.freeze(a.value)),a);return or(t)?t.then(a=>n(a)):n(t)}unwrap(){return this._def.innerType}}Hr.create=(r,e)=>new Hr({innerType:r,typeName:A.ZodReadonly,...T(e)});var A;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly"})(A||(A={}));const gt=Pe.create,O=ut.create,wa=Vr.create,ba=Ur.create;dt.create,Le.create;const ur=Wr.create,Gr=ve.create,$=W.create;lr.create,cr.create;const ka=ke.create,_e=Lt.create;ft.create;const _o=Dt.create;De.create,mt.create,$({pin:$({fade:wa().optional(),maxCount:O().optional(),maxZoom:O().optional()}).optional(),animation:$({queue:$({limit:O().optional()}).optional()}).optional(),states:$({url:gt(),key:gt()}).optional()});const Jr=O().min(-90).max(90),Kr=O().min(-180).max(180),xo=$({sw:$({lat:Jr,lng:Kr}),ne:$({lat:Jr,lng:Kr})}),Qr=ba().refine(r=>r instanceof HTMLElement,"Must be an HTMLElement"),Sa=$({mapSize:O(),zoomMin:O(),zoomMax:O(),zoomScale:O()}),wo=$({instance:ba(),inserted:_e().returns(wa()),insert:_e().returns(ur()),remove:_e().returns(ur()),update:_e().args(O()).returns(ur())}),bo=$({parameters:Sa,getContainer:_e().args().returns(Qr),getZoom:_e().args().returns(O()),getBounds:_e().args().returns(xo),panBy:_e().args(O(),O()).returns(ur()),createMarker:_e().args(Qr,Jr,Kr,O()).returns(wo)}),en=_e().args(gt()).returns(_o(Qr)),ko=$({id:gt().min(1),rank:O(),lat:O().min(-90).max(90),lng:O().min(-180).max(180),tooltip:$({style:$({width:O(),height:O(),margin:O(),radius:O()}).refine(r=>Math.min(r.width,r.height)/r.margin>=5,"Tooltip width and height must be at least 5 times the margin"),body:en}),pin:$({style:$({width:O(),height:O(),radius:O()}),body:en}).optional(),popup:$({style:$({width:O(),height:O(),radius:O(),margin:O()}),body:en}).optional()}),So=Gr(ko);ka([O(),Gr(ka([O(),O()]))]);const zo=$({id:gt(),rank:O(),lat:O(),lng:O(),width:O(),height:O(),margin:O()});$({key:gt(),parameters:Sa,input:Gr(zo)});class Mo{constructor(e,t){d(this,"provider");d(this,"statesApiUrl");d(this,"statesApiKey");d(this,"markerDataArray",new Array);d(this,"markerDataMap",new Map);d(this,"markerDataUpdating",!1);d(this,"markerPinProcessor");d(this,"markerTooltipProcessor");d(this,"markerPopupProcessor");bo.parse(e),this.provider=e,this.markerPinProcessor=new nn(e),this.markerTooltipProcessor=new Eo(e),this.markerPopupProcessor=new Ao(e),this.configuration=t}set configuration(e){var t,n,a,i;this.statesApiUrl=(t=e==null?void 0:e.states)==null?void 0:t.url,this.statesApiKey=(n=e==null?void 0:e.states)==null?void 0:n.key,this.markerPinProcessor.setConfiguration(e),Re.setLimit(((i=(a=e==null?void 0:e.animation)==null?void 0:a.queue)==null?void 0:i.limit)??8*navigator.hardwareConcurrency)}async updateMarkers(e){await So.parseAsync(e);try{let t;if(e.length>1){const n=e.map(a=>({id:a.id,rank:a.rank,lat:a.lat,lng:a.lng,width:a.tooltip.style.width,height:a.tooltip.style.height,margin:a.tooltip.style.margin}));if(this.statesApiUrl!=null&&this.statesApiKey!=null){const a={key:this.statesApiKey,parameters:this.provider.parameters,input:n},i=await fetch(this.statesApiUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(!i.ok||!i.body)throw new Error("Failed to get marker states: "+i.statusText);t=await i.json()}else t=Yi(this.provider.parameters,n)}else t=[[0,[[0,q.DEGREES.indexOf(q.DEFAULT)]]]],this.updateMarkerData(e,t);this.updateMarkerData(e,t),this.processMarkerDataCallback()}catch(t){throw console.error(t),this.removeMarkerData(),t}}removeMarkers(){try{this.removeMarkerData()}catch(e){throw console.error(e),e}}showPopup(e){try{for(const t of this.markerDataArray)t.marker.id==e?this.markerPopupProcessor.show(t):this.markerPopupProcessor.hide(t)}catch(t){console.error(t);for(const n of this.markerDataArray)this.markerPopupProcessor.hide(n);throw t}}hidePopup(e){try{if(e){const t=this.markerDataMap.get(e);if(t==null)return;this.markerPopupProcessor.hide(t)}else for(const t of this.markerDataArray)this.markerPopupProcessor.hide(t)}catch(t){console.error(t);for(const n of this.markerDataArray)this.markerPopupProcessor.hide(n);throw t}}updateMarkerData(e,t){try{this.markerDataUpdating=!0;const n=new Map(e.map((i,o)=>[i.id,new za(this.provider,i,t[o])])),a=Array.from(this.markerDataArray);for(const i of a)n.has(i.marker.id)==!1&&(i.remove(),this.markerDataMap.delete(i.marker.id),this.markerDataArray.splice(this.markerDataArray.indexOf(i),1));for(let i=0;i<e.length;i++){const o=e[i],s=t[i],l=this.markerDataMap.get(o.id);if(l)l.update(s);else{const c=new za(this.provider,o,s);c.create(),this.markerDataMap.set(o.id,c),this.markerDataArray.push(c)}}this.markerDataArray.sort((i,o)=>i.zoom-o.zoom),this.markerPinProcessor.updateElements(this.markerDataArray.map(i=>i.pin)),this.markerTooltipProcessor.updateElements(this.markerDataArray.map(i=>i.tooltip))}catch(n){throw console.error(n),this.markerDataArray.forEach(a=>a.remove()),this.markerDataArray.length=0,this.markerDataMap.clear(),n}finally{this.markerDataUpdating=!1}}removeMarkerData(){try{this.markerDataUpdating=!0,this.markerPinProcessor.removeElements(),this.markerTooltipProcessor.removeElements(),this.markerPopupProcessor.clear(),this.markerDataArray.length=0,this.markerDataMap.clear()}catch(e){throw console.error(e),e}finally{this.markerDataUpdating=!1}}processMarkerDataCallback(){if(this.markerDataArray.length!=0)try{this.processMarkerData(),window.setTimeout(this.processMarkerDataCallback.bind(this),25)}catch(e){console.error(e)}}processMarkerData(){if(this.markerDataUpdating)return;const e=this.provider.getBounds(),t=this.provider.getZoom();this.markerPopupProcessor.process(),this.markerTooltipProcessor.process(e,t),this.markerPinProcessor.process(e,t)}}class za{constructor(e,t,n){d(this,"marker");d(this,"zoom");d(this,"pin");d(this,"tooltip");this.marker=t,this.zoom=n[0],this.pin=new rn(e,t,n),this.tooltip=new an(e,t,n)}create(){this.pin.create(),this.tooltip.create()}update(e){this.pin.update(e),this.tooltip.update(e)}remove(){this.pin.remove(),this.tooltip.remove()}}class tn{constructor(e,t){d(this,"provider");d(this,"id");d(this,"lat");d(this,"lng");d(this,"shown");d(this,"element");d(this,"component");d(this,"marker");this.provider=e,this.id=t.id,this.lat=t.lat,this.lng=t.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 t=this.marker,n=this.component;if(t==null||n==null)throw new Error("Failed to update provider marker map");e?t.inserted()==!1&&t.insert():t.inserted()==!0&&t.remove()}getZindex(){throw new Error("Get z-index not implemented")}remove(){var e,t;(e=this.marker)==null||e.remove(),(t=this.element)==null||t.remove()}}const wt=class wt extends tn{constructor(t,n,a){var i,o,s,l;super(t,n);d(this,"width");d(this,"height");d(this,"radius");d(this,"zoom");d(this,"bodyLoading",!1);d(this,"bodyLoaded",!1);d(this,"bodyCallback");this.width=((i=n.pin)==null?void 0:i.style.width)??wt.DEFAULT_SIZE,this.height=((o=n.pin)==null?void 0:o.style.height)??wt.DEFAULT_SIZE,this.radius=((s=n.pin)==null?void 0:s.style.radius)??wt.DEFAULT_SIZE,this.zoom=a[0],this.bodyCallback=(l=n.pin)==null?void 0:l.body}createElement(){this.element=document.createElement("div"),this.element.classList.add("pin"),this.component=Or($i,{target:this.element,props:{id:this.id+"_pin",layer:Vi,priority:this.zoom*this.provider.parameters.zoomScale,width:this.width,height:this.height,radius:this.radius}})}update(t){this.zoom=t[0],this.updateZIndex()}updateMap(t){var n;super.updateMap(t),(n=this.component)==null||n.setDisplayed(t)}updateState(t){if(this.component==null)throw new Error("Failed to update pin state");this.component.setScale(this.getScale(t))}updateBody(){var n;if(this.bodyCallback==null||this.bodyLoaded||this.bodyLoading)return;const t=(n=this.component)==null?void 0:n.getBody();t!=null&&(this.bodyLoading=!0,this.bodyCallback(this.id).then(a=>t.appendChild(a)).catch(a=>console.error(a)).finally(()=>{this.bodyLoaded=!0,this.bodyLoading=!1}))}setCollapsed(t){if(this.component==null)throw new Error("Failed to set pin collapsed");this.component.setScale(t?0:1)}getScale(t){return this.zoom<t?1:Math.max(0,1-(this.zoom-t)*.125)}getZindex(){return Math.round((this.provider.parameters.zoomMax-this.zoom)*this.provider.parameters.zoomScale)}isCollapsed(){return this.component==null?!1:this.component.getCollapsed()}isBodyLoaded(){return this.bodyCallback==null||this.bodyLoaded}};d(wt,"DEFAULT_SIZE",16);let rn=wt;const bt=class bt{constructor(e){d(this,"provider");d(this,"pinElements",new Array);d(this,"pinMaxWidth",0);d(this,"pinMaxHeight",0);d(this,"pinFade",!1);d(this,"pinMaxCount",0);d(this,"pinMaxZoomDelta",0);this.provider=e}setConfiguration(e){var t,n,a;this.pinFade=((t=e==null?void 0:e.pin)==null?void 0:t.fade)??!0,this.pinMaxCount=((n=e==null?void 0:e.pin)==null?void 0:n.maxCount)??Math.max(bt.MAP_PINS_MAX_COUNT,8*navigator.hardwareConcurrency),this.pinMaxZoomDelta=((a=e==null?void 0:e.pin)==null?void 0:a.maxZoom)??bt.MAP_PINS_MAX_ZOOM}updateElements(e){this.pinElements=e,this.pinMaxWidth=e.reduce((t,n)=>Math.max(t,n.width),0),this.pinMaxHeight=e.reduce((t,n)=>Math.max(t,n.height),0)}removeElements(){this.pinElements.forEach(e=>e.remove()),this.pinElements.length=0}process(e,t){const n=this.provider.parameters.mapSize,a=new ia(e,t,n,this.pinMaxWidth*2,this.pinMaxHeight*2);let i=0;for(const o of this.pinElements)a.contains(o.lat,o.lng)?o.shown&&t<=o.zoom&&o.zoom<=t+this.pinMaxZoomDelta?(i<this.pinMaxCount&&(this.pinFade==!0?o.updateState(t):o.setCollapsed(!1),o.updateMap(!0),o.isBodyLoaded()==!1&&o.updateBody()),i++):(o.setCollapsed(!0),o.isCollapsed()&&o.updateMap(!1)):o.updateMap(!1)}};d(bt,"MAP_PINS_MAX_ZOOM",2),d(bt,"MAP_PINS_MAX_COUNT",128);let nn=bt;const dr=class dr extends tn{constructor(t,n,a){super(t,n);d(this,"width");d(this,"height");d(this,"margin");d(this,"radius");d(this,"zoom");d(this,"angle");d(this,"states");d(this,"bodyLoading",!1);d(this,"bodyLoaded",!1);d(this,"bodyCallback");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=a[0],this.angle=q.DEFAULT,this.states=a[1].map(i=>[i[0],q.DEGREES[i[1]]]),this.bodyCallback=n.tooltip.body}createElement(){this.element=document.createElement("div"),this.element.classList.add("tooltip"),this.component=Or(aa,{target:this.element,props:{id:this.id+"_tooltip",layer:Bi,priority:this.zoom*this.provider.parameters.zoomScale,width:this.width,height:this.height,margin:this.margin,radius:this.radius}})}update(t){this.zoom=t[0],this.states=t[1].map(n=>[n[0],q.DEGREES[n[1]]]),this.updateZIndex()}updateMap(t){var n;super.updateMap(t),(n=this.component)==null||n.setDisplayed(t)}updateState(t){if(this.component==null)throw new Error("Failed to update tooltip state");this.angle=this.getAngle(t),this.component.setAngle(this.angle)}updateBody(){var n;if(this.bodyLoaded||this.bodyLoading)return;const t=(n=this.component)==null?void 0:n.getBody();t!=null&&(this.bodyLoading=!0,this.bodyCallback(this.id).then(a=>t.appendChild(a)).catch(a=>console.error(a)).finally(()=>{this.bodyLoaded=!0,this.bodyLoading=!1}))}getAngle(t){const n=this.states.findLast(a=>a[0]<=t);if(!n)throw new Error("Angle not found");return n[1]}getZindex(){return Math.round((this.provider.parameters.zoomMax-this.zoom)*this.provider.parameters.zoomScale)+dr.Z_INDEX_OFFSET}setCollapsed(t){if(this.component==null)throw new Error("Failed to set tooltip collapsed");this.component.setCollapsed(t)}isExpanded(){return this.component==null?!1:this.component.getExpanded()}isCollapsed(){return this.component==null?!1:this.component.getCollapsed()}isBodyLoaded(){return this.bodyLoaded}};d(dr,"Z_INDEX_OFFSET",1e6);let an=dr;class Eo{constructor(e){d(this,"provider");d(this,"tooltipElements",new Array);d(this,"tooltipMaxWidth",0);d(this,"tooltipMaxHeight",0);this.provider=e}updateElements(e){this.tooltipElements=e,this.tooltipMaxWidth=this.tooltipElements.reduce((t,n)=>Math.max(t,n.width),0),this.tooltipMaxHeight=this.tooltipElements.reduce((t,n)=>Math.max(t,n.height),0)}removeElements(){this.tooltipElements.forEach(e=>e.remove()),this.tooltipElements.length=0}process(e,t){const n=this.provider.parameters.mapSize,a=new ia(e,t,n,this.tooltipMaxWidth*2,this.tooltipMaxHeight*2);for(const i of this.tooltipElements)a.contains(i.lat,i.lng)?i.shown&&i.zoom<=t?(i.updateState(t),i.setCollapsed(!1),i.updateMap(!0),i.isCollapsed()==!1&&i.isBodyLoaded()==!1&&i.updateBody()):(i.setCollapsed(!0),i.isCollapsed()&&i.updateMap(!1)):i.updateMap(!1)}}const pr=class pr extends tn{constructor(t,n){if(n.popup==null)throw new Error("Failed to create popup");super(t,n);d(this,"width");d(this,"height");d(this,"margin");d(this,"radius");d(this,"bodyLoading",!1);d(this,"bodyLoaded",!1);d(this,"bodyCallback");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=Or(aa,{target:this.element,props:{id:this.id+"_popup",layer:Fi,priority:0,width:this.width,height:this.height,margin:this.margin,radius:this.radius}})}updateMap(t){var n;super.updateMap(t),(n=this.component)==null||n.setDisplayed(t)}updateBody(){var n;if(this.bodyLoaded||this.bodyLoading)return;const t=(n=this.component)==null?void 0:n.getBody();t!=null&&(this.bodyLoading=!0,this.bodyCallback(this.id).then(a=>t.appendChild(a)).catch(a=>console.error(a)).finally(()=>{this.bodyLoaded=!0,this.bodyLoading=!1}))}getZindex(){return pr.Z_INDEX_OFFSET}setCollapsed(t){if(this.component==null)throw new Error("Failed to set popup collapsed");this.component.setCollapsed(t)}setAngle(t){if(this.component==null)throw new Error("Failed to set popup angle");this.component.setAngle(t)}isExpanded(){return this.component==null?!1:this.component.getExpanded()}isCollapsed(){return this.component==null?!1:this.component.getCollapsed()}isBodyLoaded(){return this.bodyLoaded}};d(pr,"Z_INDEX_OFFSET",2e6);let on=pr;class Ao{constructor(e){d(this,"provider");d(this,"popupElements",new Map);d(this,"popupPositioned",new Map);this.provider=e}show(e){e.pin.shown=!1,e.tooltip.shown=!1;const t=new on(this.provider,e.marker);this.popupElements.set(e.marker.id,t),this.popupPositioned.set(e.marker.id,!1),t.create(),t.setAngle(e.tooltip.angle),t.shown=!0}hide(e){e.pin.shown=!0,e.tooltip.shown=!0;const t=this.popupElements.get(e.marker.id);t!=null&&(t.shown=!1)}clear(){this.popupElements.values().forEach(e=>e.remove()),this.popupElements.clear(),this.popupPositioned.clear()}process(){var e,t;for(const n of this.popupElements.values())if(n.shown){if(n.setCollapsed(!1),n.updateMap(!0),n.isExpanded()&&n.isBodyLoaded()==!1&&n.updateBody(),n.isCollapsed()==!1&&this.popupPositioned.get(n.id)==!1){const a=(e=n.component)==null?void 0:e.getBody();if(a==null)continue;const i=(t=n.component)==null?void 0:t.getOffsets();if(i==null)continue;const o=a.getBoundingClientRect();if(o.x==0&&o.y==0&&o.width==0&&o.height==0)continue;const s=o.x+o.width/2,l=o.y+o.height/2,c=s+i.offsetX,u=l+i.offsetY,p=c+n.width,h=u+n.height,v=this.provider.getContainer().getBoundingClientRect(),M=c-v.left,x=v.right-p,f=u-v.top,_=v.bottom-h,g=Math.min(n.width,n.height)/4,y=M<0?M-g:x<0?-x+g:0,z=f<0?f-g:_<0?-_+g:0;this.provider.panBy(y,z),this.popupPositioned.set(n.id,!0)}}else n.setCollapsed(!0),n.isCollapsed()&&(n.updateMap(!1),n.remove(),this.popupElements.delete(n.id),this.popupPositioned.delete(n.id))}}const fr=class fr{constructor(e,t,n){d(this,"parameters",fr.Parameters);d(this,"MapClass");d(this,"MapMarkerClass");d(this,"map");this.MapClass=e,this.MapMarkerClass=t,this.map=new this.MapClass({...n,style:n.style??"https://tiles.openfreemap.org/styles/liberty",pitchWithRotate:!1,attributionControl:n.attributionControl??{compact:!1,customAttribution:"@arenarium/maps"}}),this.map.dragRotate.disable(),this.map.keyboard.disable(),this.map.touchZoomRotate.disableRotation(),this.map.touchPitch.disable()}getMap(){return this.map}getContainer(){return this.map.getContainer()}getZoom(){return this.map.getZoom()}getBounds(){const e=this.map.getBounds(),t=e.getSouthWest(),n=e.getNorthEast();return{sw:t,ne:n}}panBy(e,t){this.map.panBy([e,t])}createMarker(e,t,n){const a=new this.MapMarkerClass({element:e});return a.setLngLat([n,t]),{instance:a,inserted:()=>a._map!=null,insert:()=>a.addTo(this.map),remove:()=>a.remove(),update:i=>a.getElement().style.zIndex=i.toString()}}};d(fr,"Parameters",{mapSize:512,zoomMin:0,zoomMax:24,zoomScale:10});let sn=fr;const Co={version:8,sources:{openmaptiles:{type:"vector",url:"https://tiles.openfreemap.org/planet"}},glyphs:"https://tiles.openfreemap.org/fonts/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"rgba(120, 120, 120, 1)"}},{id:"park",type:"fill",source:"openmaptiles","source-layer":"park",filter:["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],paint:{"fill-color":"rgba(128, 128, 128, 1)"}},{id:"water",type:"fill",source:"openmaptiles","source-layer":"water",filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["!=",["get","brunnel"],"tunnel"]],paint:{"fill-antialias":!0,"fill-color":"rgba(56, 56, 56, 1)"}},{id:"landcover_ice_shelf",type:"fill",source:"openmaptiles","source-layer":"landcover",maxzoom:8,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","subclass"],"ice_shelf"]],paint:{"fill-color":"rgba(128, 128, 128, 1)","fill-opacity":.7}},{id:"landcover_glacier",type:"fill",source:"openmaptiles","source-layer":"landcover",maxzoom:8,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","subclass"],"glacier"]],paint:{"fill-color":"rgba(153, 153, 153, 1)","fill-opacity":["interpolate",["linear"],["zoom"],0,1,8,.5]}},{id:"landuse_residential",type:"fill",source:"openmaptiles","source-layer":"landuse",maxzoom:16,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","class"],"residential"]],paint:{"fill-color":"rgba(104, 104, 104, 1)","fill-opacity":["interpolate",["exponential",.6],["zoom"],8,.8,9,.6]}},{id:"landcover_wood",type:"fill",source:"openmaptiles","source-layer":"landcover",minzoom:10,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","class"],"wood"]],paint:{"fill-color":"rgba(128, 128, 128, 1)","fill-opacity":["interpolate",["linear"],["zoom"],8,0,12,1]}},{id:"waterway",type:"line",source:"openmaptiles","source-layer":"waterway",filter:["==",["geometry-type"],"LineString"],paint:{"line-color":"rgba(56, 56, 56, 1)"}},{id:"building",type:"fill",source:"openmaptiles","source-layer":"building",minzoom:12,paint:{"fill-antialias":!0,"fill-color":"rgba(136, 136, 136, 1)","fill-outline-color":"rgba(102, 102, 102, 1)"}},{id:"tunnel_motorway_casing",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","brunnel"],"tunnel"],["==",["get","class"],"motorway"]]],layout:{"line-cap":"butt","line-join":"miter"},paint:{"line-color":"rgba(68, 68, 68, 1)","line-opacity":1,"line-width":["interpolate",["exponential",1.4],["zoom"],5.8,0,6,3,20,40]}},{id:"tunnel_motorway_inner",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","brunnel"],"tunnel"],["==",["get","class"],"motorway"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(85, 85, 85, 1)","line-width":["interpolate",["exponential",1.4],["zoom"],4,2,6,1.3,20,30]}},{id:"aeroway-taxiway",type:"line",source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["match",["get","class"],["taxiway"],!0,!1],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(85, 85, 85, 1)","line-opacity":1,"line-width":["interpolate",["exponential",1.55],["zoom"],13,1.8,20,20]}},{id:"aeroway-runway-casing",type:"line",source:"openmaptiles","source-layer":"aeroway",minzoom:11,filter:["match",["get","class"],["runway"],!0,!1],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(85, 85, 85, 1)","line-opacity":1,"line-width":["interpolate",["exponential",1.5],["zoom"],11,6,17,55]}},{id:"aeroway-area",type:"fill",source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["match",["get","class"],["runway","taxiway"],!0,!1]],paint:{"fill-color":"rgba(128, 128, 128, 1)","fill-opacity":["interpolate",["linear"],["zoom"],13,0,14,1]}},{id:"aeroway-runway",type:"line",source:"openmaptiles","source-layer":"aeroway",minzoom:11,filter:["all",["match",["get","class"],["runway"],!0,!1],["==",["geometry-type"],"LineString"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(68, 68, 68, 1)","line-opacity":1,"line-width":["interpolate",["exponential",1.5],["zoom"],11,4,17,50]}},{id:"road_area_pier",type:"fill",source:"openmaptiles","source-layer":"transportation",filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","class"],"pier"]],paint:{"fill-antialias":!0,"fill-color":"rgba(50, 50, 50, 1)"}},{id:"road_pier",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["pier"],!0,!1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(52, 52, 52, 1)","line-width":["interpolate",["exponential",1.2],["zoom"],15,1,17,4]}},{id:"highway_path",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","class"],"path"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(88, 88, 88, 1)","line-opacity":.9,"line-width":["interpolate",["exponential",1.2],["zoom"],13,1,20,10]}},{id:"highway_minor",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:8,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["minor","service","track"],!0,!1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-opacity":.9,"line-width":["interpolate",["exponential",1.55],["zoom"],13,1.8,20,20],"line-color":"rgba(102, 102, 102, 1)"}},{id:"highway_major_casing",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:11,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["primary","secondary","tertiary","trunk"],!0,!1]],layout:{"line-cap":"butt","line-join":"miter"},paint:{"line-dasharray":[12,0],"line-width":["interpolate",["exponential",1.3],["zoom"],10,3,20,23],"line-color":"rgba(85, 85, 85, 1)"}},{id:"highway_major_inner",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:11,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["primary","secondary","tertiary","trunk"],!0,!1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(102, 102, 102, 1)","line-width":["interpolate",["exponential",1.3],["zoom"],10,2,20,20]}},{id:"highway_major_subtle",type:"line",source:"openmaptiles","source-layer":"transportation",maxzoom:11,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["primary","secondary","tertiary","trunk"],!0,!1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-width":2,"line-color":"rgba(85, 85, 85, 1)"}},{id:"highway_motorway_casing",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["match",["get","brunnel"],["bridge","tunnel"],!1,!0],["==",["get","class"],"motorway"]]],layout:{"line-cap":"butt","line-join":"miter"},paint:{"line-color":"rgba(68, 68, 68, 1)","line-dasharray":[2,0],"line-opacity":1,"line-width":["interpolate",["exponential",1.4],["zoom"],5.8,0,6,3,20,40]}},{id:"highway_motorway_inner",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["match",["get","brunnel"],["bridge","tunnel"],!1,!0],["==",["get","class"],"motorway"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":["interpolate",["linear"],["zoom"],5.8,"rgba(102, 102, 102, 1)",6,"rgba(85, 85, 85, 1)"],"line-width":["interpolate",["exponential",1.4],["zoom"],4,2,6,1.3,20,30]}},{id:"highway_motorway_subtle",type:"line",source:"openmaptiles","source-layer":"transportation",maxzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["==",["get","class"],"motorway"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(102, 102, 102, 1)","line-width":["interpolate",["exponential",1.4],["zoom"],4,2,6,1.3]}},{id:"railway_transit",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:16,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","class"],"transit"],["match",["get","brunnel"],["tunnel"],!1,!0]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(85, 85, 85, 1)","line-width":3}},{id:"railway_transit_dashline",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:16,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","class"],"transit"],["match",["get","brunnel"],["tunnel"],!1,!0]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(68, 68, 68, 1)","line-dasharray":[3,3],"line-width":2}},{id:"railway_service",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:16,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","class"],"rail"],["has","service"]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(102, 102, 102, 1)","line-width":3}},{id:"railway_service_dashline",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:16,filter:["all",["==",["geometry-type"],"LineString"],["==",["get","class"],"rail"],["has","service"]],layout:{"line-join":"round"},paint:{"line-color":"rgba(85, 85, 85, 1)","line-dasharray":[3,3],"line-width":2}},{id:"railway",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["==",["geometry-type"],"LineString"],["all",["!",["has","service"]],["==",["get","class"],"rail"]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(85, 85, 85, 1)","line-width":["interpolate",["exponential",1.3],["zoom"],16,3,20,7]}},{id:"railway_dashline",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["==",["geometry-type"],"LineString"],["all",["!",["has","service"]],["==",["get","class"],"rail"]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(68, 68, 68, 1)","line-dasharray":[3,3],"line-width":["interpolate",["exponential",1.3],["zoom"],16,2,20,6]}},{id:"highway_motorway_bridge_casing",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","brunnel"],"bridge"],["==",["get","class"],"motorway"]]],layout:{"line-cap":"butt","line-join":"miter"},paint:{"line-color":"rgba(68, 68, 68, 1)","line-dasharray":[2,0],"line-opacity":1,"line-width":["interpolate",["exponential",1.4],["zoom"],5.8,0,6,5,20,45]}},{id:"highway_motorway_bridge_inner",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","brunnel"],"bridge"],["==",["get","class"],"motorway"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":["interpolate",["linear"],["zoom"],5.8,"rgba(102, 102, 102, 1)",6,"rgba(85, 85, 85, 1)"],"line-width":["interpolate",["exponential",1.4],["zoom"],4,2,6,1.3,20,30]}},{id:"boundary_3",type:"line",source:"openmaptiles","source-layer":"boundary",minzoom:8,filter:["all",[">=",["get","admin_level"],3],["<=",["get","admin_level"],6],["!=",["get","maritime"],1],["!=",["get","disputed"],1],["!",["has","claimed_by"]]],paint:{"line-color":"rgba(68, 68, 68, 1)","line-dasharray":[1,1],"line-width":["interpolate",["linear"],["zoom"],7,1,11,2]}},{id:"boundary_2",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["==",["get","admin_level"],2],["!=",["get","maritime"],1],["!=",["get","disputed"],1],["!",["has","claimed_by"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(51, 51, 51, 1)","line-opacity":["interpolate",["linear"],["zoom"],0,.4,4,1],"line-width":["interpolate",["linear"],["zoom"],3,1,5,1.2,12,3]}},{id:"boundary_disputed",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["!=",["get","maritime"],1],["==",["get","disputed"],1]],paint:{"line-color":"rgba(51, 51, 51, 1)","line-dasharray":[1,2],"line-width":["interpolate",["linear"],["zoom"],3,1,5,1.2,12,3]}},{id:"waterway_line_label",type:"symbol",source:"openmaptiles","source-layer":"waterway",minzoom:10,filter:["==",["geometry-type"],"LineString"],layout:{"symbol-placement":"line","symbol-spacing":350,"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-letter-spacing":.2,"text-max-width":5,"text-size":14},paint:{"text-color":"rgba(34, 34, 34, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"water_name_point_label",type:"symbol",source:"openmaptiles","source-layer":"water_name",minzoom:0,filter:["==",["geometry-type"],"Point"],layout:{visibility:"none"}},{id:"water_name_line_label",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["==",["geometry-type"],"LineString"],layout:{visibility:"none"}},{id:"highway-name-path",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:15.5,filter:["==",["get","class"],"path"],layout:{"symbol-placement":"line","text-field":["get","name:latin"],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"map","text-size":["interpolate",["linear"],["zoom"],13,12,14,13]},paint:{"text-color":"rgba(158, 158, 158, 1)","text-halo-color":"rgba(244, 244, 244, 1)","text-halo-width":.5}},{id:"highway-name-minor",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:15,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["minor","service","track"],!0,!1]],layout:{"symbol-placement":"line","text-field":["get","name:latin"],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"map","text-size":["interpolate",["linear"],["zoom"],13,12,14,13]},paint:{"text-color":"rgba(17, 17, 17, 1)","text-halo-width":1,"text-halo-color":"rgba(255, 255, 255, 1)"}},{id:"highway-name-major",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:12.2,filter:["match",["get","class"],["primary","secondary","tertiary","trunk"],!0,!1],layout:{"symbol-placement":"line","text-field":["get","name:latin"],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"map","text-size":["interpolate",["linear"],["zoom"],13,12,14,13]},paint:{"text-color":"rgba(34, 34, 34, 1)","text-halo-width":1,"text-halo-color":"rgba(255, 255, 255, 1)"}},{id:"highway-shield-non-us",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:11,filter:["all",["<=",["get","ref_length"],6],["==",["geometry-type"],"LineString"],["match",["get","network"],["us-highway","us-interstate","us-state"],!1,!0]],layout:{"icon-rotation-alignment":"viewport","icon-size":1,"symbol-placement":["step",["zoom"],"point",11,"line"],"symbol-spacing":200,"text-field":["to-string",["get","ref"]],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"viewport","text-size":10},paint:{"text-halo-color":"rgba(255, 255, 255, 1)","text-color":"rgba(255, 255, 255, 1)"}},{id:"highway-shield-us-interstate",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:11,filter:["all",["<=",["get","ref_length"],6],["==",["geometry-type"],"LineString"],["match",["get","network"],["us-interstate"],!0,!1]],layout:{"icon-rotation-alignment":"viewport","icon-size":1,"symbol-placement":["step",["zoom"],"point",7,"line",8,"line"],"symbol-spacing":200,"text-field":["to-string",["get","ref"]],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"viewport","text-size":10}},{id:"road_shield_us",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:12,filter:["all",["<=",["get","ref_length"],6],["==",["geometry-type"],"LineString"],["match",["get","network"],["us-highway","us-state"],!0,!1]],layout:{"icon-rotation-alignment":"viewport","icon-size":1,"symbol-placement":["step",["zoom"],"point",11,"line"],"symbol-spacing":200,"text-field":["to-string",["get","ref"]],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"viewport","text-size":10}},{id:"airport",type:"symbol",source:"openmaptiles","source-layer":"aerodrome_label",minzoom:11,filter:["all",["has","iata"]],layout:{"icon-size":1,"text-anchor":"top","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-max-width":9,"text-offset":[0,.6],"text-optional":!0,"text-padding":2,"text-size":12},paint:{"text-color":"rgba(51, 51, 51, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_other",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:8,filter:["match",["get","class"],["city","continent","country","state","town","village"],!1,!0],layout:{"text-field":["get","name:latin"],"text-font":["Noto Sans Regular"],"text-letter-spacing":.1,"text-max-width":9,"text-size":["interpolate",["linear"],["zoom"],8,9,12,10],"text-transform":"uppercase"},paint:{"text-color":"rgba(17, 17, 17, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_village",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:9,filter:["==",["get","class"],"village"],layout:{"icon-allow-overlap":!0,"icon-optional":!1,"icon-size":.2,"text-anchor":"bottom","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-max-width":8,"text-size":["interpolate",["exponential",1.2],["zoom"],7,10,11,12]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_town",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:6,filter:["==",["get","class"],"town"],layout:{"icon-allow-overlap":!0,"icon-optional":!1,"icon-size":.2,"text-anchor":"bottom","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-max-width":8,"text-size":["interpolate",["exponential",1.2],["zoom"],7,12,11,14]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_state",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:5,maxzoom:8,filter:["==",["get","class"],"state"],layout:{"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-letter-spacing":.2,"text-max-width":9,"text-size":["interpolate",["linear"],["zoom"],5,10,8,14],"text-transform":"uppercase"},paint:{"text-color":"rgba(17, 17, 17, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_city",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:3,filter:["all",["==",["get","class"],"city"],["!=",["get","capital"],2]],layout:{"icon-allow-overlap":!0,"icon-optional":!1,"icon-size":.4,"text-anchor":"bottom","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-max-width":8,"text-offset":[0,-.1],"text-size":["interpolate",["exponential",1.2],["zoom"],4,11,7,13,11,18]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_city_capital",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:3,filter:["all",["==",["get","class"],"city"],["==",["get","capital"],2]],layout:{"icon-allow-overlap":!0,"icon-optional":!1,"icon-size":.5,"text-anchor":"bottom","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Bold"],"text-max-width":8,"text-offset":[0,-.2],"text-size":["interpolate",["exponential",1.2],["zoom"],4,12,7,14,11,20]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_country_3",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:2,maxzoom:9,filter:["all",["==",["get","class"],"country"],[">=",["get","rank"],3]],layout:{"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Bold"],"text-max-width":6.25,"text-size":["interpolate",["linear"],["zoom"],3,9,7,17]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_country_2",type:"symbol",source:"openmaptiles","source-layer":"place",maxzoom:9,filter:["all",["==",["get","class"],"country"],["==",["get","rank"],2]],layout:{"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Bold"],"text-max-width":6.25,"text-size":["interpolate",["linear"],["zoom"],2,9,5,17]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_country_1",type:"symbol",source:"openmaptiles","source-layer":"place",maxzoom:9,filter:["all",["==",["get","class"],"country"],["==",["get","rank"],1]],layout:{"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Bold"],"text-max-width":6.25,"text-size":["interpolate",["linear"],["zoom"],1,9,4,17]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}}]},No={version:8,sources:{openmaptiles:{type:"vector",url:"https://tiles.openfreemap.org/planet"}},glyphs:"https://tiles.openfreemap.org/fonts/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"rgba(220, 220, 220, 1)"}},{id:"park",type:"fill",source:"openmaptiles","source-layer":"park",filter:["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],paint:{"fill-color":"rgba(228, 228, 228, 1)"}},{id:"water",type:"fill",source:"openmaptiles","source-layer":"water",filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["!=",["get","brunnel"],"tunnel"]],paint:{"fill-antialias":!0,"fill-color":"rgba(156, 156, 156, 1)"}},{id:"landcover_ice_shelf",type:"fill",source:"openmaptiles","source-layer":"landcover",maxzoom:8,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","subclass"],"ice_shelf"]],paint:{"fill-color":"rgba(228, 228, 228, 1)","fill-opacity":.7}},{id:"landcover_glacier",type:"fill",source:"openmaptiles","source-layer":"landcover",maxzoom:8,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","subclass"],"glacier"]],paint:{"fill-color":"rgba(253, 253, 253, 1)","fill-opacity":["interpolate",["linear"],["zoom"],0,1,8,.5]}},{id:"landuse_residential",type:"fill",source:"openmaptiles","source-layer":"landuse",maxzoom:16,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","class"],"residential"]],paint:{"fill-color":"rgba(204, 204, 204, 1)","fill-opacity":["interpolate",["exponential",.6],["zoom"],8,.8,9,.6]}},{id:"landcover_wood",type:"fill",source:"openmaptiles","source-layer":"landcover",minzoom:10,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","class"],"wood"]],paint:{"fill-color":"rgba(228, 228, 228, 1)","fill-opacity":["interpolate",["linear"],["zoom"],8,0,12,1]}},{id:"waterway",type:"line",source:"openmaptiles","source-layer":"waterway",filter:["==",["geometry-type"],"LineString"],paint:{"line-color":"rgba(156, 156, 156, 1)"}},{id:"building",type:"fill",source:"openmaptiles","source-layer":"building",minzoom:12,paint:{"fill-antialias":!0,"fill-color":"rgba(236, 236, 236, 1)","fill-outline-color":"rgba(202, 202, 202, 1)"}},{id:"tunnel_motorway_casing",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","brunnel"],"tunnel"],["==",["get","class"],"motorway"]]],layout:{"line-cap":"butt","line-join":"miter"},paint:{"line-color":"rgb(168, 168, 168)","line-opacity":1,"line-width":["interpolate",["exponential",1.4],["zoom"],5.8,0,6,3,20,40]}},{id:"tunnel_motorway_inner",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","brunnel"],"tunnel"],["==",["get","class"],"motorway"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgb(185, 185, 185)","line-width":["interpolate",["exponential",1.4],["zoom"],4,2,6,1.3,20,30]}},{id:"aeroway-taxiway",type:"line",source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["match",["get","class"],["taxiway"],!0,!1],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(185, 185, 185, 1)","line-opacity":1,"line-width":["interpolate",["exponential",1.55],["zoom"],13,1.8,20,20]}},{id:"aeroway-runway-casing",type:"line",source:"openmaptiles","source-layer":"aeroway",minzoom:11,filter:["match",["get","class"],["runway"],!0,!1],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(185, 185, 185, 1)","line-opacity":1,"line-width":["interpolate",["exponential",1.5],["zoom"],11,6,17,55]}},{id:"aeroway-area",type:"fill",source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["match",["get","class"],["runway","taxiway"],!0,!1]],paint:{"fill-color":"rgba(228, 228, 228, 1)","fill-opacity":["interpolate",["linear"],["zoom"],13,0,14,1]}},{id:"aeroway-runway",type:"line",source:"openmaptiles","source-layer":"aeroway",minzoom:11,filter:["all",["match",["get","class"],["runway"],!0,!1],["==",["geometry-type"],"LineString"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(168, 168, 168, 1)","line-opacity":1,"line-width":["interpolate",["exponential",1.5],["zoom"],11,4,17,50]}},{id:"road_area_pier",type:"fill",source:"openmaptiles","source-layer":"transportation",filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","class"],"pier"]],paint:{"fill-antialias":!0,"fill-color":"rgba(150, 150, 150, 1)"}},{id:"road_pier",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["pier"],!0,!1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(152, 152, 152, 1)","line-width":["interpolate",["exponential",1.2],["zoom"],15,1,17,4]}},{id:"highway_path",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","class"],"path"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgb(188, 188, 188)","line-opacity":.9,"line-width":["interpolate",["exponential",1.2],["zoom"],13,1,20,10]}},{id:"highway_minor",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:8,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["minor","service","track"],!0,!1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(202, 202, 202, 1)","line-opacity":.9,"line-width":["interpolate",["exponential",1.55],["zoom"],13,1.8,20,20]}},{id:"highway_major_casing",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:11,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["primary","secondary","tertiary","trunk"],!0,!1]],layout:{"line-cap":"butt","line-join":"miter"},paint:{"line-color":"rgb(185, 185, 185)","line-dasharray":[12,0],"line-width":["interpolate",["exponential",1.3],["zoom"],10,3,20,23]}},{id:"highway_major_inner",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:11,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["primary","secondary","tertiary","trunk"],!0,!1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(202, 202, 202, 1)","line-width":["interpolate",["exponential",1.3],["zoom"],10,2,20,20]}},{id:"highway_major_subtle",type:"line",source:"openmaptiles","source-layer":"transportation",maxzoom:11,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["primary","secondary","tertiary","trunk"],!0,!1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(185, 185, 185, 1)","line-width":2}},{id:"highway_motorway_casing",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["match",["get","brunnel"],["bridge","tunnel"],!1,!0],["==",["get","class"],"motorway"]]],layout:{"line-cap":"butt","line-join":"miter"},paint:{"line-color":"rgb(168, 168, 168)","line-dasharray":[2,0],"line-opacity":1,"line-width":["interpolate",["exponential",1.4],["zoom"],5.8,0,6,3,20,40]}},{id:"highway_motorway_inner",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["match",["get","brunnel"],["bridge","tunnel"],!1,!0],["==",["get","class"],"motorway"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":["interpolate",["linear"],["zoom"],5.8,"rgba(202, 202, 202, 1)",6,"rgba(185, 185, 185, 1)"],"line-width":["interpolate",["exponential",1.4],["zoom"],4,2,6,1.3,20,30]}},{id:"highway_motorway_subtle",type:"line",source:"openmaptiles","source-layer":"transportation",maxzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["==",["get","class"],"motorway"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(202, 202, 202, 1)","line-width":["interpolate",["exponential",1.4],["zoom"],4,2,6,1.3]}},{id:"railway_transit",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:16,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","class"],"transit"],["match",["get","brunnel"],["tunnel"],!1,!0]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(185, 185, 185, 1)","line-width":3}},{id:"railway_transit_dashline",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:16,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","class"],"transit"],["match",["get","brunnel"],["tunnel"],!1,!0]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(168, 168, 168, 1)","line-dasharray":[3,3],"line-width":2}},{id:"railway_service",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:16,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","class"],"rail"],["has","service"]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(202, 202, 202, 1)","line-width":3}},{id:"railway_service_dashline",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:16,filter:["all",["==",["geometry-type"],"LineString"],["==",["get","class"],"rail"],["has","service"]],layout:{"line-join":"round"},paint:{"line-color":"rgba(185, 185, 185, 1)","line-dasharray":[3,3],"line-width":2}},{id:"railway",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["==",["geometry-type"],"LineString"],["all",["!",["has","service"]],["==",["get","class"],"rail"]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(185, 185, 185, 1)","line-width":["interpolate",["exponential",1.3],["zoom"],16,3,20,7]}},{id:"railway_dashline",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["==",["geometry-type"],"LineString"],["all",["!",["has","service"]],["==",["get","class"],"rail"]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(168, 168, 168, 1)","line-dasharray":[3,3],"line-width":["interpolate",["exponential",1.3],["zoom"],16,2,20,6]}},{id:"highway_motorway_bridge_casing",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","brunnel"],"bridge"],["==",["get","class"],"motorway"]]],layout:{"line-cap":"butt","line-join":"miter"},paint:{"line-color":"rgb(168, 168, 168)","line-dasharray":[2,0],"line-opacity":1,"line-width":["interpolate",["exponential",1.4],["zoom"],5.8,0,6,5,20,45]}},{id:"highway_motorway_bridge_inner",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","brunnel"],"bridge"],["==",["get","class"],"motorway"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":["interpolate",["linear"],["zoom"],5.8,"rgba(202, 202, 202, 1)",6,"rgba(185, 185, 185, 1)"],"line-width":["interpolate",["exponential",1.4],["zoom"],4,2,6,1.3,20,30]}},{id:"boundary_3",type:"line",source:"openmaptiles","source-layer":"boundary",minzoom:8,filter:["all",[">=",["get","admin_level"],3],["<=",["get","admin_level"],6],["!=",["get","maritime"],1],["!=",["get","disputed"],1],["!",["has","claimed_by"]]],paint:{"line-color":"rgba(168, 168, 168, 1)","line-dasharray":[1,1],"line-width":["interpolate",["linear"],["zoom"],7,1,11,2]}},{id:"boundary_2",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["==",["get","admin_level"],2],["!=",["get","maritime"],1],["!=",["get","disputed"],1],["!",["has","claimed_by"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(151, 151, 151, 1)","line-opacity":["interpolate",["linear"],["zoom"],0,.4,4,1],"line-width":["interpolate",["linear"],["zoom"],3,1,5,1.2,12,3]}},{id:"boundary_disputed",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["!=",["get","maritime"],1],["==",["get","disputed"],1]],paint:{"line-color":"rgba(151, 151, 151, 1)","line-dasharray":[1,2],"line-width":["interpolate",["linear"],["zoom"],3,1,5,1.2,12,3]}},{id:"waterway_line_label",type:"symbol",source:"openmaptiles","source-layer":"waterway",minzoom:10,filter:["==",["geometry-type"],"LineString"],layout:{"symbol-placement":"line","symbol-spacing":350,"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-letter-spacing":.2,"text-max-width":5,"text-size":14},paint:{"text-color":"rgba(34, 34, 34, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1.5}},{id:"water_name_point_label",type:"symbol",source:"openmaptiles","source-layer":"water_name",minzoom:0,filter:["==",["geometry-type"],"Point"],layout:{visibility:"none"}},{id:"water_name_line_label",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["==",["geometry-type"],"LineString"],layout:{visibility:"none"}},{id:"highway-name-path",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:15.5,filter:["==",["get","class"],"path"],layout:{"symbol-placement":"line","text-field":["get","name:latin"],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"map","text-size":["interpolate",["linear"],["zoom"],13,12,14,13]},paint:{"text-color":"rgba(158, 158, 158, 1)","text-halo-color":"rgba(244, 244, 244, 1)","text-halo-width":.5}},{id:"highway-name-minor",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:15,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["minor","service","track"],!0,!1]],layout:{"symbol-placement":"line","text-field":["get","name:latin"],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"map","text-size":["interpolate",["linear"],["zoom"],13,12,14,13]},paint:{"text-color":"rgba(17, 17, 17, 1)","text-halo-width":1,"text-halo-color":"rgba(255, 255, 255, 1)"}},{id:"highway-name-major",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:12.2,filter:["match",["get","class"],["primary","secondary","tertiary","trunk"],!0,!1],layout:{"symbol-placement":"line","text-field":["get","name:latin"],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"map","text-size":["interpolate",["linear"],["zoom"],13,12,14,13]},paint:{"text-color":"rgba(34, 34, 34, 1)","text-halo-width":1,"text-halo-color":"rgba(255, 255, 255, 1)"}},{id:"highway-shield-non-us",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:11,filter:["all",["<=",["get","ref_length"],6],["==",["geometry-type"],"LineString"],["match",["get","network"],["us-highway","us-interstate","us-state"],!1,!0]],layout:{"icon-rotation-alignment":"viewport","icon-size":1,"symbol-placement":["step",["zoom"],"point",11,"line"],"symbol-spacing":200,"text-field":["to-string",["get","ref"]],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"viewport","text-size":10},paint:{"text-halo-color":"rgba(0, 0, 0, 1)","text-color":"rgba(0, 0, 0, 1)"}},{id:"highway-shield-us-interstate",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:11,filter:["all",["<=",["get","ref_length"],6],["==",["geometry-type"],"LineString"],["match",["get","network"],["us-interstate"],!0,!1]],layout:{"icon-rotation-alignment":"viewport","icon-size":1,"symbol-placement":["step",["zoom"],"point",7,"line",8,"line"],"symbol-spacing":200,"text-field":["to-string",["get","ref"]],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"viewport","text-size":10}},{id:"road_shield_us",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:12,filter:["all",["<=",["get","ref_length"],6],["==",["geometry-type"],"LineString"],["match",["get","network"],["us-highway","us-state"],!0,!1]],layout:{"icon-rotation-alignment":"viewport","icon-size":1,"symbol-placement":["step",["zoom"],"point",11,"line"],"symbol-spacing":200,"text-field":["to-string",["get","ref"]],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"viewport","text-size":10}},{id:"airport",type:"symbol",source:"openmaptiles","source-layer":"aerodrome_label",minzoom:11,filter:["all",["has","iata"]],layout:{"icon-size":1,"text-anchor":"top","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-max-width":9,"text-offset":[0,.6],"text-optional":!0,"text-padding":2,"text-size":12},paint:{"text-color":"rgba(51, 51, 51, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_other",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:8,filter:["match",["get","class"],["city","continent","country","state","town","village"],!1,!0],layout:{"text-field":["get","name:latin"],"text-font":["Noto Sans Regular"],"text-letter-spacing":.1,"text-max-width":9,"text-size":["interpolate",["linear"],["zoom"],8,9,12,10],"text-transform":"uppercase"},paint:{"text-color":"rgba(17, 17, 17, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_village",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:9,filter:["==",["get","class"],"village"],layout:{"icon-allow-overlap":!0,"icon-optional":!1,"icon-size":.2,"text-anchor":"bottom","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-max-width":8,"text-size":["interpolate",["exponential",1.2],["zoom"],7,10,11,12]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_town",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:6,filter:["==",["get","class"],"town"],layout:{"icon-allow-overlap":!0,"icon-optional":!1,"icon-size":.2,"text-anchor":"bottom","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-max-width":8,"text-size":["interpolate",["exponential",1.2],["zoom"],7,12,11,14]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_state",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:5,maxzoom:8,filter:["==",["get","class"],"state"],layout:{"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-letter-spacing":.2,"text-max-width":9,"text-size":["interpolate",["linear"],["zoom"],5,10,8,14],"text-transform":"uppercase"},paint:{"text-color":"rgba(17, 17, 17, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_city",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:3,filter:["all",["==",["get","class"],"city"],["!=",["get","capital"],2]],layout:{"icon-allow-overlap":!0,"icon-optional":!1,"icon-size":.4,"text-anchor":"bottom","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-max-width":8,"text-offset":[0,-.1],"text-size":["interpolate",["exponential",1.2],["zoom"],4,11,7,13,11,18]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_city_capital",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:3,filter:["all",["==",["get","class"],"city"],["==",["get","capital"],2]],layout:{"icon-allow-overlap":!0,"icon-optional":!1,"icon-size":.5,"text-anchor":"bottom","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Bold"],"text-max-width":8,"text-offset":[0,-.2],"text-size":["interpolate",["exponential",1.2],["zoom"],4,12,7,14,11,20]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_country_3",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:2,maxzoom:9,filter:["all",["==",["get","class"],"country"],[">=",["get","rank"],3]],layout:{"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Bold"],"text-max-width":6.25,"text-size":["interpolate",["linear"],["zoom"],3,9,7,17]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_country_2",type:"symbol",source:"openmaptiles","source-layer":"place",maxzoom:9,filter:["all",["==",["get","class"],"country"],["==",["get","rank"],2]],layout:{"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Bold"],"text-max-width":6.25,"text-size":["interpolate",["linear"],["zoom"],2,9,5,17]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_country_1",type:"symbol",source:"openmaptiles","source-layer":"place",maxzoom:9,filter:["all",["==",["get","class"],"country"],["==",["get","rank"],1]],layout:{"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Bold"],"text-max-width":6.25,"text-size":["interpolate",["linear"],["zoom"],1,9,4,17]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}}]},hr=class hr{constructor(e,t,n){d(this,"parameters",hr.Parameters);d(this,"MapClass");d(this,"MapMarkerClass");d(this,"map");this.MapClass=e,this.MapMarkerClass=t,this.map=new this.MapClass({...n,projection:"mercator",pitchWithRotate:!1,customAttribution:n.customAttribution??"@arenarium/maps"}),this.map.dragRotate.disable(),this.map.keyboard.disable(),this.map.touchZoomRotate.disableRotation(),this.map.touchPitch.disable()}getMap(){return this.map}getContainer(){return this.map.getContainer()}getZoom(){return this.map.getZoom()}getBounds(){const e=this.map.getBounds();if(!e)return{sw:{lat:0,lng:0},ne:{lat:0,lng:0}};const t=e.getSouthWest(),n=e.getNorthEast();return{sw:t,ne:n}}panBy(e,t){this.map.panBy([e,t])}createMarker(e,t,n){const a=new this.MapMarkerClass({element:e});return a.setLngLat([n,t]),{instance:a,inserted:()=>a._map!=null,insert:()=>a.addTo(this.map),remove:()=>a.remove(),update:i=>a.getElement().style.zIndex=i.toString()}}};d(hr,"Parameters",{mapSize:512,zoomMin:0,zoomMax:24,zoomScale:10});let ln=hr;const mr=class mr{constructor(e,t,n,a){d(this,"parameters",mr.Parameters);d(this,"MapClass");d(this,"MapMarkerClass");d(this,"map");this.MapClass=e,this.MapMarkerClass=t,this.map=new this.MapClass(n,{...a})}getMap(){return this.map}getContainer(){return this.map.getDiv()}getZoom(){return this.map.getZoom()??NaN}getBounds(){const e=this.map.getBounds();if(e==null)return{sw:{lat:NaN,lng:NaN},ne:{lat:NaN,lng:NaN}};const t=e.getSouthWest(),n=e.getNorthEast();return{sw:{lat:t.lat(),lng:t.lng()},ne:{lat:n.lat(),lng:n.lng()}}}panBy(e,t){this.map.panBy(e,t)}createMarker(e,t,n,a){const i=new this.MapMarkerClass({position:{lat:t,lng:n},content:e,zIndex:a});return{instance:i,inserted:()=>i.map!=null&&i.map==this.map,insert:()=>i.map=this.map,remove:()=>i.map=void 0,update:o=>i.zIndex=o}}};d(mr,"Parameters",{mapSize:256,zoomMin:0,zoomMax:22,zoomScale:10});let cn=mr;const To=[{elementType:"labels.icon",stylers:[{visibility:"off"}]},{stylers:[{saturation:-100},{lightness:-10}]},{featureType:"landscape",stylers:[{lightness:30}]},{featureType:"road",elementType:"geometry",stylers:[{saturation:-100}]}],Ro=[{elementType:"labels.icon",stylers:[{visibility:"off"}]},{stylers:[{saturation:-100}]},{elementType:"geometry",stylers:[{lightness:-45}]},{elementType:"labels.text.fill",stylers:[{lightness:-100}]},{elementType:"labels.text.stroke",stylers:[{lightness:-15}]},{featureType:"water",elementType:"geometry",stylers:[{lightness:-50}]}];R.GoogleMapDarkStyle=Ro,R.GoogleMapLightStyle=To,R.GoogleMapsProvider=cn,R.MapManager=Mo,R.MapboxProvider=ln,R.MaplibreDarkStyle=Co,R.MaplibreLightStyle=No,R.MaplibreProvider=sn,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})});
2
+ \r\f \v\uFEFF`];function Ti(r,e,t){var n=r==null?"":""+r;if(t){for(var a in t)if(t[a])n=n?n+" "+a:a;else if(n.length)for(var i=a.length,o=0;(o=n.indexOf(a,o))>=0;){var s=o+i;(o===0||Kn.includes(n[o-1]))&&(s===n.length||Kn.includes(n[s]))?n=(o===0?"":n.substring(0,o))+n.substring(s+1):o=s}}return n===""?null:n}function Qn(r,e=!1){var t=e?" !important;":";",n="";for(var a in r){var i=r[a];i!=null&&i!==""&&(n+=" "+a+": "+i+t)}return n}function Ir(r){return r[0]!=="-"||r[1]!=="-"?r.toLowerCase():r}function Ri(r,e){if(e){var t="",n,a;if(Array.isArray(e)?(n=e[0],a=e[1]):n=e,r){r=String(r).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var i=!1,o=0,s=!1,l=[];n&&l.push(...Object.keys(n).map(Ir)),a&&l.push(...Object.keys(a).map(Ir));var c=0,u=-1;const x=r.length;for(var p=0;p<x;p++){var h=r[p];if(s?h==="/"&&r[p-1]==="*"&&(s=!1):i?i===h&&(i=!1):h==="/"&&r[p+1]==="*"?s=!0:h==='"'||h==="'"?i=h:h==="("?o++:h===")"&&o--,!s&&i===!1&&o===0){if(h===":"&&u===-1)u=p;else if(h===";"||p===x-1){if(u!==-1){var v=Ir(r.substring(c,u).trim());if(!l.includes(v)){h!==";"&&p++;var M=r.substring(c,p).trim();t+=" "+M+";"}}c=p+1,u=-1}}}}return n&&(t+=Qn(n)),a&&(t+=Qn(a,!0)),t=t.trim(),t===""?null:t}return r==null?null:String(r)}function ea(r,e,t,n,a,i){var o=r.__className;if(o!==t||o===void 0){var s=Ti(t,n,i);s==null?r.removeAttribute("class"):r.className=s,r.__className=t}else if(i&&a!==i)for(var l in i){var c=!!i[l];(a==null||c!==!!a[l])&&r.classList.toggle(l,c)}return i}function Pr(r,e={},t,n){for(var a in t){var i=t[a];e[a]!==i&&(t[a]==null?r.style.removeProperty(a):r.style.setProperty(a,i,n))}}function ar(r,e,t,n){var a=r.__style;if(a!==e){var i=Ri(e,n);i==null?r.removeAttribute("style"):r.style.cssText=i,r.__style=e}else n&&(Array.isArray(n)?(Pr(r,t==null?void 0:t[0],n[0]),Pr(r,t==null?void 0:t[1],n[1],"important")):Pr(r,t,n));return n}const Oi=()=>performance.now(),ye={tick:r=>requestAnimationFrame(r),now:()=>Oi(),tasks:new Set};function ta(){const r=ye.now();ye.tasks.forEach(e=>{e.c(r)||(ye.tasks.delete(e),e.f())}),ye.tasks.size!==0&&ye.tick(ta)}function Ii(r){let e;return ye.tasks.size===0&&ye.tick(ta),{promise:new Promise(t=>{ye.tasks.add(e={c:r,f:t})}),abort(){ye.tasks.delete(e)}}}function ra(r,e){return r===e||(r==null?void 0:r[Xt])===e}function st(r={},e,t,n){return pi(()=>{var a,i;return Ln(()=>{a=i,i=[],bi(()=>{r!==t(...i)&&(e(r,...i),a&&ra(t(...a),r)&&e(null,...a))})}),()=>{Ka(()=>{i&&ra(t(...i),r)&&e(null,...i)})}}),r}const Pi="5";typeof window<"u"&&((Ma=window.__svelte??(window.__svelte={})).v??(Ma.v=new Set)).add(Pi);function Li(r){return r}function Lr(r){return-.5*(Math.cos(Math.PI*r)-1)}function Di(r){const e=Math.cos(r*Math.PI*.5);return Math.abs(e)<1e-14?1:1-e}function ji(r){return Math.sin(r*Math.PI/2)}const Zi=128,Fi=0,Bi=1,Vi=2;class Ui{constructor(){d(this,"animationsStarted",!1);d(this,"animationsCount",0);d(this,"animationsLimit",Zi);d(this,"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 t=this.layers[e];if(t==null)continue;const n=t.animations;if(n!=null)for(let a=0;a<n.length;a++){const i=n[a];if(i!=null){for(const o of i.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,t,n,a){let i=this.layers[e];i==null&&(i=this.layers[e]={animations:new Array});let o=i.animations[t];o==null&&(o=i.animations[t]=new Map);let s={id:n,priority:t,executed:!1,function:a};o.set(n,s),this.animationsStarted==!1&&(this.animationsStarted=!0,this.start())}clear(e,t){for(let n=0;n<this.layers.length;n++){let a=this.layers[n];if(a==null)continue;let i=a.animations[e];if(i==null)return;let o=i.get(t);if(o==null||o.executed==!1)return;i.delete(t)}}speed(){return Math.pow(2,2*this.animationsCount/this.animationsLimit)}stacked(){return this.animationsCount==this.animationsLimit}setLimit(e){this.animationsLimit=e}}const Re=new Ui;function na(r){return Object.prototype.toString.call(r)==="[object Date]"}function Dr(r,e){if(r===e||r!==r)return()=>r;const t=typeof r;if(t!==typeof e||Array.isArray(r)!==Array.isArray(e))throw new Error("Cannot interpolate values of different type");if(Array.isArray(r)){const n=e.map((a,i)=>Dr(r[i],a));return a=>n.map(i=>i(a))}if(t==="object"){if(!r||!e)throw new Error("Object cannot be null");if(na(r)&&na(e)){const i=r.getTime(),s=e.getTime()-i;return l=>new Date(i+l*s)}const n=Object.keys(e),a={};return n.forEach(i=>{a[i]=Dr(r[i],e[i])}),i=>{const o={};return n.forEach(s=>{o[s]=a[s](i)}),o}}if(t==="number"){const n=e-r;return a=>r+a*n}return()=>e}const dn=class dn{constructor(e,t={}){Y(this,Me);Y(this,xt);Y(this,Bt);Y(this,Qe,null);J(this,Me,te(e)),J(this,xt,te(e)),J(this,Bt,t)}static of(e,t){const n=new dn(e(),t);return Ln(()=>{n.set(e())}),n}set(e,t){var p;G(C(this,xt),e);let{delay:n=0,duration:a=400,easing:i=Li,interpolate:o=Dr}={...C(this,Bt),...t};if(a===0)return(p=C(this,Qe))==null||p.abort(),G(C(this,Me),e),Promise.resolve();const s=ye.now()+n;let l,c=!1,u=C(this,Qe);return J(this,Qe,Ii(h=>{if(h<s)return!0;if(!c){c=!0;const M=C(this,Me).v;l=o(M,e),typeof a=="function"&&(a=a(M,e)),u==null||u.abort()}const v=h-s;return v>a?(G(C(this,Me),e),!1):(G(C(this,Me),l(i(v/a))),!0)})),C(this,Qe).promise}get current(){return V(C(this,Me))}get target(){return V(C(this,xt))}set target(e){this.set(e)}};Me=new WeakMap,xt=new WeakMap,Bt=new WeakMap,Qe=new WeakMap;let jr=dn;class ir{constructor(e,t){d(this,"value");d(this,"motion");this.value=e,this.motion=new jr(e,t)}set(e,t){this.value=e,this.motion.set(e,t)}update(e){this.motion.set(this.value,e)}snap(){this.motion.set(this.value,{duration:0})}}var Wi=Gn('<div><div class="body svelte-1nfn9j8"></div></div>');function $i(r,e){zr(e,!0);let t,n;function a(){return n}let i=te(!1);function o(g){G(i,g,!0)}function s(){return V(i)}let l=new ir(0,{easing:Lr});be(()=>{c(l.motion.current)}),be(()=>{V(i)==!1&&(l.snap(),Re.clear(e.priority,e.id))});function c(g){t&&Re.equeue(e.layer,e.priority,e.id,()=>{t.style.scale=g.toString(),t.style.filter=`brightness(${.25+.75*g})`,n.style.opacity=g.toString()})}function u(g){g!=l.value&&l.set(g,{duration:75})}function p(){return l.motion.current==0}function h(){return l.value}var v=Wi();let M,x;var f=Rr(v);let _;return st(f,g=>n=g,()=>n),st(v,g=>t=g,()=>t),Dn((g,y,z)=>{M=ea(v,1,"pin svelte-1nfn9j8",null,M,g),x=ar(v,"",x,y),_=ar(f,"",_,z)},[()=>({displayed:V(i)}),()=>({width:`${e.width}px`,height:`${e.height}px`,"border-radius":`${e.radius}px`}),()=>({width:`${e.width-4}px`,height:`${e.height-4}px`,"border-radius":`${e.radius-2}px`})]),Jn(r,v),Mr({getBody:a,setDisplayed:o,getDisplayed:s,setScale:u,getCollapsed:p,getScale:h})}var lt;(r=>{function e(t,n,a){const i=t/2,o=n/2,s=Math.sqrt(i*i+o*o),l=Math.atan(o/i)*(180/Math.PI),c=a*(Math.PI/180);return a<180?a<90?a<l?{offsetX:0,offsetY:s*Math.sin(c)-o}:{offsetX:s*Math.cos(c)-i,offsetY:0}:a<180-l?{offsetX:s*Math.cos(c)-i,offsetY:0}:{offsetX:-t,offsetY:s*Math.sin(c)-o}:a<270?a<180+l?{offsetX:-t,offsetY:s*Math.sin(c)-o}:{offsetX:s*Math.cos(c)-i,offsetY:-n}:a<360-l?{offsetX:s*Math.cos(c)-i,offsetY:-n}:{offsetX:0,offsetY:s*Math.sin(c)-o}}r.getOffsets=e})(lt||(lt={}));var qi=Gn('<div><div class="pointer svelte-j5igi2"></div> <div class="bubble svelte-j5igi2"><div class="body svelte-j5igi2"></div></div></div>');function aa(r,e){zr(e,!0);let t,n,a,i;const o=e.width+2*e.margin,s=e.height+2*e.margin,l=()=>i;be(()=>{a.style.width=`${e.margin*4}px`,a.style.height=`${e.margin*4}px`});let c=te(!0);function u(L){G(c,L,!0)}function p(){return V(c)}let h=te(!0);function v(L){G(h,L,!0)}function M(){return f.motion.current==0}function x(){return f.motion.current==1}let f=new ir(0);be(()=>{_(f.motion.current)}),be(()=>{V(c)==!1&&(f.snap(),Re.clear(e.priority,e.id+"_scale"))}),be(()=>{V(h)==!0&&f.value!=0&&(Re.stacked()?f.set(0,{duration:0}):f.set(0,{duration:150,easing:Di})),V(h)==!1&&f.value!=1&&f.set(1,{duration:150,easing:ji})});function _(L){!t||!n||!a||Re.equeue(V(h)?0:e.layer,e.priority,e.id+"_scale",()=>{t.style.opacity=`${L}`,n.style.scale=`${L}`,a.style.scale=`${L}`})}let g=NaN,y=te(!1),z=new ir(-o/2,{easing:Lr}),S=new ir(-s/2,{easing:Lr});be(()=>{N(z.motion.current,S.motion.current)}),be(()=>{V(c)==!1&&(z.snap(),z.snap(),Re.clear(e.priority,e.id+"_angle"))}),be(()=>{V(h)==!0&&V(y)&&(z.update({duration:75}),z.update({duration:75}))});function N(L,me){if(!t||!n||!a)return;const kt=L+o/2,Ee=me+s/2,we=s<o?kt*s/o:kt,St=s>o?Ee*o/s:Ee,gr=Math.atan2(St,we)/Math.PI*180-45,Vt=0,yr=30,zt=Math.sqrt(we*we+St*St),Ut=Math.min(o,s)/2,Oo=Ut*Math.SQRT2,Io=(zt-Ut)/(Oo-Ut),Ea=Vt+Io*(yr-Vt),Po=zt<Ut?zt/Ut:1;Re.equeue(e.layer,e.priority,e.id+"_angle",()=>{n.style.transform=`translate(${Math.round(L)}px, ${Math.round(me)}px)`,a.style.transform=`scale(${Po}) rotate(${gr}deg) skew(${Ea}deg, ${Ea}deg)`})}function Z(L){if(V(y)==!1){let me=lt.getOffsets(o,s,L);z.set(Math.round(me.offsetX),{duration:0}),S.set(Math.round(me.offsetY),{duration:0}),N(z.value,S.value),g=L,G(y,!0)}else if(L!=g){let me=Math.abs(L-g),kt=me<180?me:360-me,Ee=Math.log(kt)*75,we=lt.getOffsets(o,s,L);z.set(Math.round(we.offsetX),{duration:Ee}),S.set(Math.round(we.offsetY),{duration:Ee}),g=L}}function le(){return lt.getOffsets(o,s,g)}var ce=qi();let xe;var Fe=Rr(ce);st(Fe,L=>a=L,()=>a);var ne=li(Fe,2),Be=Rr(ne);return st(Be,L=>i=L,()=>i),st(ne,L=>n=L,()=>n),st(ce,L=>t=L,()=>t),Dn(L=>{xe=ea(ce,1,"anchor svelte-j5igi2",null,xe,L),ar(ne,`margin: ${e.margin}px;`),ar(Be,`width: ${e.width}px; height: ${e.height}px; border-radius: ${e.radius}px;`)},[()=>({displayed:V(c)})]),Jn(r,ce),Mr({getBody:l,setDisplayed:u,getDisplayed:p,setCollapsed:v,getCollapsed:M,getExpanded:x,setAngle:Z,getOffsets:le})}var He;(r=>{function e(s,l,c){return{x:n(l)*c,y:a(s)*c}}r.project=e;function t(s,l,c){return{lat:o(l/c),lng:i(s/c)}}r.unproject=t;function n(s){return(180+s)/360}function a(s){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+s*Math.PI/360)))/360}function i(s){return s*360-180}function o(s){return 360/Math.PI*Math.atan(Math.exp((180-s*360)*Math.PI/180))-90}})(He||(He={}));class ia{constructor(e,t,n,a,i){d(this,"swLat");d(this,"swLng");d(this,"neLat");d(this,"neLng");const o=n*Math.pow(2,t),s=He.project(e.sw.lat,e.sw.lng,o),l=He.project(e.ne.lat,e.ne.lng,o),c=s.x-a,u=s.y+i,p=l.x+a,h=l.y-i,v=He.unproject(c,u,o),M=He.unproject(p,h,o);this.swLat=v.lat,this.swLng=v.lng,this.neLat=M.lat,this.neLng=M.lng}contains(e,t){return this.swLat<=e&&e<=this.neLat?this.swLng<this.neLng?this.swLng<=t&&t<=this.neLng:t<=this.neLng||this.swLng<=t:!1}}var q;(r=>{r.COUNT=12,r.DEFAULT=270,r.DEGREES=[0,30,60,90,120,150,180,210,240,270,300,330]})(q||(q={}));var Tt;(r=>{let e;(o=>{o.RADIANS=q.DEGREES.map(c=>c*Math.PI/180),o.RADIANS_COS=o.RADIANS.map(c=>Math.cos(c)),o.RADIANS_SIN=o.RADIANS.map(c=>Math.sin(c));function s(c,u){const p=Math.abs(u/c);return p<1?p<.26795?0:1:p<3.73205?2:3}function l(c,u){const p=s(c,u);return c>0?u>0?(12-p)%12:0+p:u>0?6+p:6-p}o.getAngleIndex=l})(e=r.Angle||(r.Angle={}));class t{constructor(s,l,c,u){d(this,"center");d(this,"width");d(this,"height");d(this,"index");this.center=s,this.width=l,this.height=c,this.index=u}}r.Particle=t;function n(o){let s=!0;for(let l=0;l<o.length;l++){const[c,u]=o[l],p=c.index,h=c.center,v=c.width,M=c.height,x=i(p,-1),f=i(p,1),_=h.x+v*e.RADIANS_COS[x],g=h.y+M*e.RADIANS_SIN[x],y=h.x+v*e.RADIANS_COS[p],z=h.y+M*e.RADIANS_SIN[p],S=h.x+v*e.RADIANS_COS[f],N=h.y+M*e.RADIANS_SIN[f];let Z=0,le=0,ce=0;for(let Fe=0;Fe<u.length;Fe++){const ne=u[Fe],Be=ne.index,L=ne.center,me=ne.width,kt=ne.height,Ee=L.x+me*e.RADIANS_COS[Be],we=L.y+kt*e.RADIANS_SIN[Be],St=_-Ee,pn=g-we;Z+=1/(St*St+pn*pn);const gr=y-Ee,Vt=z-we;le+=1/(gr*gr+Vt*Vt);const yr=S-Ee,zt=N-we;ce+=1/(yr*yr+zt*zt)}let xe=0;Z<le&&Z<ce&&(xe=-1),ce<le&&ce<Z&&(xe=1),c.index=i(p,xe),xe!==0&&(s=!1)}return s}r.updatePointIndexes=n;function a(o){for(let s=0;s<o.length;s++){const[l,c]=o[s],u=l.center;let p=0,h=0;for(let v=0;v<c.length;v++){const x=c[v].center,f=u.x-x.x,_=u.y-x.y;if(f==0&&_==0)continue;const g=Math.sqrt(f*f+_*_),y=1/(g*g);p+=y*f/g,h+=-(y*_)/g}l.index=e.getAngleIndex(p,h)}}r.initializePointIndexes=a;function i(o,s){return s==0?o:((o+s)%q.COUNT+q.COUNT)%q.COUNT}})(Tt||(Tt={}));var Ge;(r=>{function e(n,a){return!(n.x-n.left>a.x+a.right||n.x+n.right<a.x-a.left||n.y-n.top>a.y+a.bottom||n.y+n.bottom<a.y-a.top)}r.areOverlaping=e;function t(n,a){let i=Math.abs(n.x-a.x),s=(n.x<a.x?n.right+a.left:n.left+a.right)/i,l=Math.abs(n.y-a.y),u=(n.y<a.y?n.bottom+a.top:n.top+a.bottom)/l,p=Math.min(s,u);return Math.log2(p)}r.getZoomWhenTouching=t})(Ge||(Ge={}));var U;(r=>{class e{constructor(){d(this,"zoomAfterExpanded");d(this,"zoomAfterAngleIndexes");this.zoomAfterExpanded=NaN,this.zoomAfterAngleIndexes=[]}}r.Tooltip=e;class t{constructor(f,_,g){d(this,"index");d(this,"id");d(this,"rank");d(this,"x");d(this,"y");d(this,"width");d(this,"height");d(this,"expanded");d(this,"angle");d(this,"bounds");d(this,"particle");d(this,"neighbours");const y=He.project(_.lat,_.lng,f.mapSize),z=_.width+2*_.margin,S=_.height+2*_.margin;this.index=g,this.id=_.id,this.rank=_.rank,this.x=y.x,this.y=y.y,this.width=z,this.height=S,this.expanded=!0,this.angle=q.DEFAULT,this.bounds=this.getBounds(1),this.particle=new Tt.Particle({x:y.x,y:y.y},this.getParticleWidth(1),this.getParticleHeight(1),q.DEGREES.indexOf(q.DEFAULT)),this.neighbours=new Array}getBounds(f){let{offsetX:_,offsetY:g}=lt.getOffsets(this.width,this.height,this.angle),y=-_,z=this.width-y,S=-g,N=this.height-S;return{x:this.x,y:this.y,left:y/f,right:z/f,top:S/f,bottom:N/f}}getParticleWidth(f){return this.width/2/f}getParticleHeight(f){return this.height/2/f}updateBounds(f){this.bounds=this.getBounds(f)}updateParticle(f){this.particle.width=this.getParticleWidth(f),this.particle.height=this.getParticleHeight(f)}}r.Node=t;class n{constructor(f){d(this,"min");d(this,"max");d(this,"scale");d(this,"step");this.min=f.zoomMin,this.max=f.zoomMax,this.scale=f.zoomScale,this.step=1/this.scale}addSteps(f,_){return Math.round((f+_*this.step)*this.scale)/this.scale}getIndex(f){if(!(f<this.min))return Math.min(Math.ceil(f*this.scale),this.max*this.scale)}getMax(f){let _=this.min;for(let g=0;g<f.length;g++){const z=f[g].keys();for(const S of z){const N=Number(S)/this.scale;N>_&&(_=N)}}return _}}r.Zoom=n;function a(x,f){let _=new Array(f.length);for(let g=0;g<f.length;g++)_[g]=new t(x,f[g],g);return _}r.createNodes=a;function i(x,f){const _=new Array;for(let y=0;y<f.length;y++)_[y]=new Array;const g=new Array(f.length);for(let y=0;y<f.length;y++){const z=f[y];g[y]={x:z.x,y:z.y,left:z.width,right:z.width,top:z.height,bottom:z.height}}for(let y=0;y<f.length;y++){const z=f[y],S=g[y],N=_[y];for(let Z=y+1;Z<f.length;Z++){const le=f[Z],ce=g[Z],xe=_[Z],Fe=Ge.getZoomWhenTouching(S,ce),ne=x.getIndex(Fe);if(ne==null)continue;const Be=N[ne],L=xe[ne];Be?Be.push(le):N[ne]=[le],L?L.push(z):xe[ne]=[z]}}return _}r.createNeighbourDeltas=i;function o(x){const f=new Set,_=[];for(let g=0;g<x.length;g++){let y=x[g];if(y.expanded==!1||y.neighbours.length==0||f.has(y))continue;f.add(y);const z=[],S=[y];for(;S.length>0;){const N=S.pop();z.push(N);for(const Z of N.neighbours)f.has(Z)||(f.add(Z),S.push(Z))}_.push(z)}return _}r.getNeighbourGraphs=o;function s(x,f,_){for(let g=0;g<x.length;g++){let y=x[g];if(y.expanded==!1){y.neighbours.length=0;continue}const S=f[g][_];if(S!=null)for(let N=0;N<S.length;N++){const Z=S[N];Z.expanded!=!1&&y.neighbours.push(Z)}}}r.updateNeighbours=s;function l(x){x.expanded=!1;const f=x.neighbours;for(let _=0;_<f.length;_++){const g=f[_],y=g.neighbours.indexOf(x);g.neighbours.splice(y,1)}}r.updateCollapsed=l;function c(x,f,_){for(let g=0;g<x.length;g++){const y=x[g];if(y.expanded==!1)continue;const z=f.get(y.id);if(!z)throw new Error("Tooltip not found");z.zoomAfterExpanded=_;const S=q.DEGREES.indexOf(y.angle);z.zoomAfterAngleIndexes.length==0?z.zoomAfterAngleIndexes.push([_,S]):z.zoomAfterAngleIndexes[0][1]!=S?z.zoomAfterAngleIndexes.unshift([_,S]):z.zoomAfterAngleIndexes[0][0]=_}}r.updateTooltips=c;function u(x,f){for(let _=0;_<x.length;_++)x[_].updateBounds(f)}r.updateBounds=u;function p(x){const f=new Set;for(let _=0;_<x.length;_++){const g=x[_],y=g.bounds,z=x[_].neighbours;for(let S=0;S<z.length;S++){const N=z[S],Z=N.bounds;Ge.areOverlaping(Z,y)&&(f.add(g),f.add(N))}}return f}r.getOverlaps=p;function h(x,f){let _=!1;for(let g=0;g<f.length;g++){const y=f[g],z=y.bounds,S=f[g].neighbours;for(let N=0;N<S.length;N++){const Z=S[N],le=Z.bounds;Ge.areOverlaping(le,z)&&(x.has(y)||(x.add(y),_=!0),x.has(Z)||(x.add(Z),_=!0))}}return _}r.updateOverlaps=h;function v(x){let f,_=0;for(let g=0;g<x.length;g++){const y=x[g],z=y.bounds,S=x[g].neighbours;let N=0;for(let Z=0;Z<S.length;Z++){const le=S[Z],ce=le.bounds;Ge.areOverlaping(ce,z)&&(N+=1+(le.rank-y.rank))}N=N*S.length,N>_&&(_=N,f=y)}return f}r.getOverlapsWorstNode=v;function M(x){for(let f=0;f<x.length;f++){const g=x[f].bounds;for(let y=f+1;y<x.length;y++){const S=x[y].bounds;if(Ge.areOverlaping(S,g))return!0}}return!1}r.areOverlaping=M,(x=>{function f(y){const z=y.map(S=>S.particle);Tt.initializePointIndexes(z.map(S=>[S,z]));for(let S=0;S<y.length;S++){const N=y[S];N.angle=q.DEGREES[N.particle.index]}}x.initializeAngles=f;function _(y){const z=Tt.updatePointIndexes(y.map(S=>[S.particle,S.neighbours.map(N=>N.particle)]));for(let S=0;S<y.length;S++){const N=y[S];N.angle=q.DEGREES[N.particle.index]}return z}x.updateAngles=_;function g(y,z){for(let S=0;S<y.length;S++)y[S].updateParticle(z)}x.updateParticles=g})(r.Simulation||(r.Simulation={}))})(U||(U={}));function Yi(r,e){const t=new U.Zoom(r);if(e.length==0)return[];if(e.length==1)return[[t.min,[[t.min,q.DEGREES.indexOf(q.DEFAULT)]]]];const n=new Map(e.map(l=>[l.id,new U.Tooltip])),a=U.createNodes(r,e),i=U.createNeighbourDeltas(t,a),o=t.min,s=t.getMax(i);U.Simulation.initializeAngles(a),U.updateTooltips(a,n,t.addSteps(t.max,1));for(let l=s;l>=o;l=t.addSteps(l,-1)){const c=Math.pow(2,l),u=Math.round(l*t.scale);U.updateNeighbours(a,i,u);const p=U.getNeighbourGraphs(a);for(const h of p){U.updateBounds(h,c),U.Simulation.updateParticles(h,c);const v=U.getOverlaps(h);for(;v.size>1;){const M=Array.from(v);for(;;){const _=U.Simulation.updateAngles(M);if(U.updateBounds(M,c),_==!0||U.areOverlaping(M)==!1)break}if(U.updateOverlaps(v,M))continue;const f=U.getOverlapsWorstNode(M);if(f==null)break;U.updateCollapsed(f),v.delete(f)}}U.updateTooltips(a,n,Number(l.toFixed(1)))}return Array.from(n.values()).map(l=>[l.zoomAfterExpanded,l.zoomAfterAngleIndexes])}var D;(function(r){r.assertEqual=a=>{};function e(a){}r.assertIs=e;function t(a){throw new Error}r.assertNever=t,r.arrayToEnum=a=>{const i={};for(const o of a)i[o]=o;return i},r.getValidEnumValues=a=>{const i=r.objectKeys(a).filter(s=>typeof a[a[s]]!="number"),o={};for(const s of i)o[s]=a[s];return r.objectValues(o)},r.objectValues=a=>r.objectKeys(a).map(function(i){return a[i]}),r.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const i=[];for(const o in a)Object.prototype.hasOwnProperty.call(a,o)&&i.push(o);return i},r.find=(a,i)=>{for(const o of a)if(i(o))return o},r.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&Number.isFinite(a)&&Math.floor(a)===a;function n(a,i=" | "){return a.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}r.joinValues=n,r.jsonStringifyReplacer=(a,i)=>typeof i=="bigint"?i.toString():i})(D||(D={}));var oa;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(oa||(oa={}));const b=D.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Oe=r=>{switch(typeof r){case"undefined":return b.undefined;case"string":return b.string;case"number":return Number.isNaN(r)?b.nan:b.number;case"boolean":return b.boolean;case"function":return b.function;case"bigint":return b.bigint;case"symbol":return b.symbol;case"object":return Array.isArray(r)?b.array:r===null?b.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?b.promise:typeof Map<"u"&&r instanceof Map?b.map:typeof Set<"u"&&r instanceof Set?b.set:typeof Date<"u"&&r instanceof Date?b.date:b.object;default:return b.unknown}},m=D.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class de extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(i){return i.message},n={_errors:[]},a=i=>{for(const o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(a);else if(o.code==="invalid_return_type")a(o.returnTypeError);else if(o.code==="invalid_arguments")a(o.argumentsError);else if(o.path.length===0)n._errors.push(t(o));else{let s=n,l=0;for(;l<o.path.length;){const c=o.path[l];l===o.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(t(o))):s[c]=s[c]||{_errors:[]},s=s[c],l++}}};return a(this),n}static assert(e){if(!(e instanceof de))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,D.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},n=[];for(const a of this.issues)if(a.path.length>0){const i=a.path[0];t[i]=t[i]||[],t[i].push(e(a))}else n.push(e(a));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}de.create=r=>new de(r);const Rt=(r,e)=>{let t;switch(r.code){case m.invalid_type:r.received===b.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case m.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,D.jsonStringifyReplacer)}`;break;case m.unrecognized_keys:t=`Unrecognized key(s) in object: ${D.joinValues(r.keys,", ")}`;break;case m.invalid_union:t="Invalid input";break;case m.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${D.joinValues(r.options)}`;break;case m.invalid_enum_value:t=`Invalid enum value. Expected ${D.joinValues(r.options)}, received '${r.received}'`;break;case m.invalid_arguments:t="Invalid function arguments";break;case m.invalid_return_type:t="Invalid function return type";break;case m.invalid_date:t="Invalid date";break;case m.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(t=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?t=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?t=`Invalid input: must end with "${r.validation.endsWith}"`:D.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case m.too_small:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="bigint"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:t="Invalid input";break;case m.too_big:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?t=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:t="Invalid input";break;case m.custom:t="Invalid input";break;case m.invalid_intersection_types:t="Intersection results could not be merged";break;case m.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;case m.not_finite:t="Number must be finite";break;default:t=e.defaultError,D.assertNever(r)}return{message:t}};let Xi=Rt;function Zr(){return Xi}const Fr=r=>{const{data:e,path:t,errorMaps:n,issueData:a}=r,i=[...t,...a.path||[]],o={...a,path:i};if(a.message!==void 0)return{...a,path:i,message:a.message};let s="";const l=n.filter(c=>!!c).slice().reverse();for(const c of l)s=c(o,{data:e,defaultError:s}).message;return{...a,path:i,message:s}};function w(r,e){const t=Zr(),n=Fr({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t,t===Rt?void 0:Rt].filter(a=>!!a)});r.common.issues.push(n)}class se{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const n=[];for(const a of t){if(a.status==="aborted")return E;a.status==="dirty"&&e.dirty(),n.push(a.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){const n=[];for(const a of t){const i=await a.key,o=await a.value;n.push({key:i,value:o})}return se.mergeObjectSync(e,n)}static mergeObjectSync(e,t){const n={};for(const a of t){const{key:i,value:o}=a;if(i.status==="aborted"||o.status==="aborted")return E;i.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||a.alwaysSet)&&(n[i.value]=o.value)}return{status:e.value,value:n}}}const E=Object.freeze({status:"aborted"}),Ot=r=>({status:"dirty",value:r}),re=r=>({status:"valid",value:r}),sa=r=>r.status==="aborted",la=r=>r.status==="dirty",ct=r=>r.status==="valid",or=r=>typeof Promise<"u"&&r instanceof Promise;var k;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(k||(k={}));class Ie{constructor(e,t,n,a){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=a}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const ca=(r,e)=>{if(ct(e))return{success:!0,data:e.value};if(!r.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new de(r.common.issues);return this._error=t,this._error}}};function T(r){if(!r)return{};const{errorMap:e,invalid_type_error:t,required_error:n,description:a}=r;if(e&&(t||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:a}:{errorMap:(o,s)=>{const{message:l}=r;return o.code==="invalid_enum_value"?{message:l??s.defaultError}:typeof s.data>"u"?{message:l??n??s.defaultError}:o.code!=="invalid_type"?{message:s.defaultError}:{message:l??t??s.defaultError}},description:a}}class P{get description(){return this._def.description}_getType(e){return Oe(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:Oe(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new se,ctx:{common:e.parent.common,data:e.data,parsedType:Oe(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(or(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){const n={common:{issues:[],async:(t==null?void 0:t.async)??!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Oe(e)},a=this._parseSync({data:e,path:n.path,parent:n});return ca(n,a)}"~validate"(e){var n,a;const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Oe(e)};if(!this["~standard"].async)try{const i=this._parseSync({data:e,path:[],parent:t});return ct(i)?{value:i.value}:{issues:t.common.issues}}catch(i){(a=(n=i==null?void 0:i.message)==null?void 0:n.toLowerCase())!=null&&a.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(i=>ct(i)?{value:i.value}:{issues:t.common.issues})}async parseAsync(e,t){const n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){const n={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Oe(e)},a=this._parse({data:e,path:n.path,parent:n}),i=await(or(a)?a:Promise.resolve(a));return ca(n,i)}refine(e,t){const n=a=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(a):t;return this._refinement((a,i)=>{const o=e(a),s=()=>i.addIssue({code:m.custom,...n(a)});return typeof Promise<"u"&&o instanceof Promise?o.then(l=>l?!0:(s(),!1)):o?!0:(s(),!1)})}refinement(e,t){return this._refinement((n,a)=>e(n)?!0:(a.addIssue(typeof t=="function"?t(n,a):t),!1))}_refinement(e){return new ht({schema:this,typeName:A.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}optional(){return De.create(this,this._def)}nullable(){return mt.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ve.create(this)}promise(){return Dt.create(this,this._def)}or(e){return lr.create([this,e],this._def)}and(e){return cr.create(this,e,this._def)}transform(e){return new ht({...T(this._def),schema:this,typeName:A.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new qr({...T(this._def),innerType:this,defaultValue:t,typeName:A.ZodDefault})}brand(){return new vo({typeName:A.ZodBranded,type:this,...T(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new Yr({...T(this._def),innerType:this,catchValue:t,typeName:A.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return Xr.create(this,e)}readonly(){return Hr.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Hi=/^c[^\s-]{8,}$/i,Gi=/^[0-9a-z]+$/,Ji=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Ki=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Qi=/^[a-z0-9_-]{21}$/i,eo=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,to=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,ro=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,no="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Br;const ao=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,io=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,oo=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,so=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,lo=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,co=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,ua="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",uo=new RegExp(`^${ua}$`);function da(r){let e="[0-5]\\d";r.precision?e=`${e}\\.\\d{${r.precision}}`:r.precision==null&&(e=`${e}(\\.\\d+)?`);const t=r.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function po(r){return new RegExp(`^${da(r)}$`)}function fo(r){let e=`${ua}T${da(r)}`;const t=[];return t.push(r.local?"Z?":"Z"),r.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function ho(r,e){return!!((e==="v4"||!e)&&ao.test(r)||(e==="v6"||!e)&&oo.test(r))}function mo(r,e){if(!eo.test(r))return!1;try{const[t]=r.split(".");if(!t)return!1;const n=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),a=JSON.parse(atob(n));return!(typeof a!="object"||a===null||"typ"in a&&(a==null?void 0:a.typ)!=="JWT"||!a.alg||e&&a.alg!==e)}catch{return!1}}function go(r,e){return!!((e==="v4"||!e)&&io.test(r)||(e==="v6"||!e)&&so.test(r))}class Pe extends P{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==b.string){const i=this._getOrReturnCtx(e);return w(i,{code:m.invalid_type,expected:b.string,received:i.parsedType}),E}const n=new se;let a;for(const i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(a=this._getOrReturnCtx(e,a),w(a,{code:m.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="max")e.data.length>i.value&&(a=this._getOrReturnCtx(e,a),w(a,{code:m.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){const o=e.data.length>i.value,s=e.data.length<i.value;(o||s)&&(a=this._getOrReturnCtx(e,a),o?w(a,{code:m.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&w(a,{code:m.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")ro.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"email",code:m.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")Br||(Br=new RegExp(no,"u")),Br.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"emoji",code:m.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")Ki.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"uuid",code:m.invalid_string,message:i.message}),n.dirty());else if(i.kind==="nanoid")Qi.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"nanoid",code:m.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")Hi.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"cuid",code:m.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")Gi.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"cuid2",code:m.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")Ji.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"ulid",code:m.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{a=this._getOrReturnCtx(e,a),w(a,{validation:"url",code:m.invalid_string,message:i.message}),n.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"regex",code:m.invalid_string,message:i.message}),n.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(a=this._getOrReturnCtx(e,a),w(a,{code:m.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(a=this._getOrReturnCtx(e,a),w(a,{code:m.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(a=this._getOrReturnCtx(e,a),w(a,{code:m.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?fo(i).test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{code:m.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="date"?uo.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{code:m.invalid_string,validation:"date",message:i.message}),n.dirty()):i.kind==="time"?po(i).test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{code:m.invalid_string,validation:"time",message:i.message}),n.dirty()):i.kind==="duration"?to.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"duration",code:m.invalid_string,message:i.message}),n.dirty()):i.kind==="ip"?ho(e.data,i.version)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"ip",code:m.invalid_string,message:i.message}),n.dirty()):i.kind==="jwt"?mo(e.data,i.alg)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"jwt",code:m.invalid_string,message:i.message}),n.dirty()):i.kind==="cidr"?go(e.data,i.version)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"cidr",code:m.invalid_string,message:i.message}),n.dirty()):i.kind==="base64"?lo.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"base64",code:m.invalid_string,message:i.message}),n.dirty()):i.kind==="base64url"?co.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"base64url",code:m.invalid_string,message:i.message}),n.dirty()):D.assertNever(i);return{status:n.value,value:e.data}}_regex(e,t,n){return this.refinement(a=>e.test(a),{validation:t,code:m.invalid_string,...k.errToObj(n)})}_addCheck(e){return new Pe({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...k.errToObj(e)})}url(e){return this._addCheck({kind:"url",...k.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...k.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...k.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...k.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...k.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...k.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...k.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...k.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...k.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...k.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...k.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...k.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!1,...k.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...k.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...k.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...k.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...k.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...k.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...k.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...k.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...k.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...k.errToObj(t)})}nonempty(e){return this.min(1,k.errToObj(e))}trim(){return new Pe({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Pe({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Pe({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}Pe.create=r=>new Pe({checks:[],typeName:A.ZodString,coerce:(r==null?void 0:r.coerce)??!1,...T(r)});function yo(r,e){const t=(r.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,a=t>n?t:n,i=Number.parseInt(r.toFixed(a).replace(".","")),o=Number.parseInt(e.toFixed(a).replace(".",""));return i%o/10**a}class ut extends P{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==b.number){const i=this._getOrReturnCtx(e);return w(i,{code:m.invalid_type,expected:b.number,received:i.parsedType}),E}let n;const a=new se;for(const i of this._def.checks)i.kind==="int"?D.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),w(n,{code:m.invalid_type,expected:"integer",received:"float",message:i.message}),a.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(n=this._getOrReturnCtx(e,n),w(n,{code:m.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(n=this._getOrReturnCtx(e,n),w(n,{code:m.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="multipleOf"?yo(e.data,i.value)!==0&&(n=this._getOrReturnCtx(e,n),w(n,{code:m.not_multiple_of,multipleOf:i.value,message:i.message}),a.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),w(n,{code:m.not_finite,message:i.message}),a.dirty()):D.assertNever(i);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,k.toString(t))}gt(e,t){return this.setLimit("min",e,!1,k.toString(t))}lte(e,t){return this.setLimit("max",e,!0,k.toString(t))}lt(e,t){return this.setLimit("max",e,!1,k.toString(t))}setLimit(e,t,n,a){return new ut({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:k.toString(a)}]})}_addCheck(e){return new ut({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:k.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:k.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:k.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:k.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:k.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:k.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:k.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:k.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:k.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&D.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(t===null||n.value>t)&&(t=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}}ut.create=r=>new ut({checks:[],typeName:A.ZodNumber,coerce:(r==null?void 0:r.coerce)||!1,...T(r)});class It extends P{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==b.bigint)return this._getInvalidInput(e);let n;const a=new se;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(n=this._getOrReturnCtx(e,n),w(n,{code:m.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),a.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(n=this._getOrReturnCtx(e,n),w(n,{code:m.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),a.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),w(n,{code:m.not_multiple_of,multipleOf:i.value,message:i.message}),a.dirty()):D.assertNever(i);return{status:a.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return w(t,{code:m.invalid_type,expected:b.bigint,received:t.parsedType}),E}gte(e,t){return this.setLimit("min",e,!0,k.toString(t))}gt(e,t){return this.setLimit("min",e,!1,k.toString(t))}lte(e,t){return this.setLimit("max",e,!0,k.toString(t))}lt(e,t){return this.setLimit("max",e,!1,k.toString(t))}setLimit(e,t,n,a){return new It({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:k.toString(a)}]})}_addCheck(e){return new It({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:k.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:k.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:k.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:k.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:k.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}It.create=r=>new It({checks:[],typeName:A.ZodBigInt,coerce:(r==null?void 0:r.coerce)??!1,...T(r)});class Vr extends P{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==b.boolean){const n=this._getOrReturnCtx(e);return w(n,{code:m.invalid_type,expected:b.boolean,received:n.parsedType}),E}return re(e.data)}}Vr.create=r=>new Vr({typeName:A.ZodBoolean,coerce:(r==null?void 0:r.coerce)||!1,...T(r)});class sr extends P{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==b.date){const i=this._getOrReturnCtx(e);return w(i,{code:m.invalid_type,expected:b.date,received:i.parsedType}),E}if(Number.isNaN(e.data.getTime())){const i=this._getOrReturnCtx(e);return w(i,{code:m.invalid_date}),E}const n=new se;let a;for(const i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(a=this._getOrReturnCtx(e,a),w(a,{code:m.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),n.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(a=this._getOrReturnCtx(e,a),w(a,{code:m.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):D.assertNever(i);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new sr({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:k.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:k.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}}sr.create=r=>new sr({checks:[],coerce:(r==null?void 0:r.coerce)||!1,typeName:A.ZodDate,...T(r)});class pa extends P{_parse(e){if(this._getType(e)!==b.symbol){const n=this._getOrReturnCtx(e);return w(n,{code:m.invalid_type,expected:b.symbol,received:n.parsedType}),E}return re(e.data)}}pa.create=r=>new pa({typeName:A.ZodSymbol,...T(r)});class fa extends P{_parse(e){if(this._getType(e)!==b.undefined){const n=this._getOrReturnCtx(e);return w(n,{code:m.invalid_type,expected:b.undefined,received:n.parsedType}),E}return re(e.data)}}fa.create=r=>new fa({typeName:A.ZodUndefined,...T(r)});class ha extends P{_parse(e){if(this._getType(e)!==b.null){const n=this._getOrReturnCtx(e);return w(n,{code:m.invalid_type,expected:b.null,received:n.parsedType}),E}return re(e.data)}}ha.create=r=>new ha({typeName:A.ZodNull,...T(r)});class Ur extends P{constructor(){super(...arguments),this._any=!0}_parse(e){return re(e.data)}}Ur.create=r=>new Ur({typeName:A.ZodAny,...T(r)});class dt extends P{constructor(){super(...arguments),this._unknown=!0}_parse(e){return re(e.data)}}dt.create=r=>new dt({typeName:A.ZodUnknown,...T(r)});class Le extends P{_parse(e){const t=this._getOrReturnCtx(e);return w(t,{code:m.invalid_type,expected:b.never,received:t.parsedType}),E}}Le.create=r=>new Le({typeName:A.ZodNever,...T(r)});class Wr extends P{_parse(e){if(this._getType(e)!==b.undefined){const n=this._getOrReturnCtx(e);return w(n,{code:m.invalid_type,expected:b.void,received:n.parsedType}),E}return re(e.data)}}Wr.create=r=>new Wr({typeName:A.ZodVoid,...T(r)});class ve extends P{_parse(e){const{ctx:t,status:n}=this._processInputParams(e),a=this._def;if(t.parsedType!==b.array)return w(t,{code:m.invalid_type,expected:b.array,received:t.parsedType}),E;if(a.exactLength!==null){const o=t.data.length>a.exactLength.value,s=t.data.length<a.exactLength.value;(o||s)&&(w(t,{code:o?m.too_big:m.too_small,minimum:s?a.exactLength.value:void 0,maximum:o?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),n.dirty())}if(a.minLength!==null&&t.data.length<a.minLength.value&&(w(t,{code:m.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),n.dirty()),a.maxLength!==null&&t.data.length>a.maxLength.value&&(w(t,{code:m.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((o,s)=>a.type._parseAsync(new Ie(t,o,t.path,s)))).then(o=>se.mergeArray(n,o));const i=[...t.data].map((o,s)=>a.type._parseSync(new Ie(t,o,t.path,s)));return se.mergeArray(n,i)}get element(){return this._def.type}min(e,t){return new ve({...this._def,minLength:{value:e,message:k.toString(t)}})}max(e,t){return new ve({...this._def,maxLength:{value:e,message:k.toString(t)}})}length(e,t){return new ve({...this._def,exactLength:{value:e,message:k.toString(t)}})}nonempty(e){return this.min(1,e)}}ve.create=(r,e)=>new ve({type:r,minLength:null,maxLength:null,exactLength:null,typeName:A.ZodArray,...T(e)});function pt(r){if(r instanceof W){const e={};for(const t in r.shape){const n=r.shape[t];e[t]=De.create(pt(n))}return new W({...r._def,shape:()=>e})}else return r instanceof ve?new ve({...r._def,type:pt(r.element)}):r instanceof De?De.create(pt(r.unwrap())):r instanceof mt?mt.create(pt(r.unwrap())):r instanceof ke?ke.create(r.items.map(e=>pt(e))):r}class W extends P{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=D.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==b.object){const c=this._getOrReturnCtx(e);return w(c,{code:m.invalid_type,expected:b.object,received:c.parsedType}),E}const{status:n,ctx:a}=this._processInputParams(e),{shape:i,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof Le&&this._def.unknownKeys==="strip"))for(const c in a.data)o.includes(c)||s.push(c);const l=[];for(const c of o){const u=i[c],p=a.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Ie(a,p,a.path,c)),alwaysSet:c in a.data})}if(this._def.catchall instanceof Le){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of s)l.push({key:{status:"valid",value:u},value:{status:"valid",value:a.data[u]}});else if(c==="strict")s.length>0&&(w(a,{code:m.unrecognized_keys,keys:s}),n.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of s){const p=a.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Ie(a,p,a.path,u)),alwaysSet:u in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const p=await u.key,h=await u.value;c.push({key:p,value:h,alwaysSet:u.alwaysSet})}return c}).then(c=>se.mergeObjectSync(n,c)):se.mergeObjectSync(n,l)}get shape(){return this._def.shape()}strict(e){return k.errToObj,new W({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,n)=>{var i,o;const a=((o=(i=this._def).errorMap)==null?void 0:o.call(i,t,n).message)??n.defaultError;return t.code==="unrecognized_keys"?{message:k.errToObj(e).message??a}:{message:a}}}:{}})}strip(){return new W({...this._def,unknownKeys:"strip"})}passthrough(){return new W({...this._def,unknownKeys:"passthrough"})}extend(e){return new W({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new W({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:A.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new W({...this._def,catchall:e})}pick(e){const t={};for(const n of D.objectKeys(e))e[n]&&this.shape[n]&&(t[n]=this.shape[n]);return new W({...this._def,shape:()=>t})}omit(e){const t={};for(const n of D.objectKeys(this.shape))e[n]||(t[n]=this.shape[n]);return new W({...this._def,shape:()=>t})}deepPartial(){return pt(this)}partial(e){const t={};for(const n of D.objectKeys(this.shape)){const a=this.shape[n];e&&!e[n]?t[n]=a:t[n]=a.optional()}return new W({...this._def,shape:()=>t})}required(e){const t={};for(const n of D.objectKeys(this.shape))if(e&&!e[n])t[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof De;)i=i._def.innerType;t[n]=i}return new W({...this._def,shape:()=>t})}keyof(){return va(D.objectKeys(this.shape))}}W.create=(r,e)=>new W({shape:()=>r,unknownKeys:"strip",catchall:Le.create(),typeName:A.ZodObject,...T(e)}),W.strictCreate=(r,e)=>new W({shape:()=>r,unknownKeys:"strict",catchall:Le.create(),typeName:A.ZodObject,...T(e)}),W.lazycreate=(r,e)=>new W({shape:r,unknownKeys:"strip",catchall:Le.create(),typeName:A.ZodObject,...T(e)});class lr extends P{_parse(e){const{ctx:t}=this._processInputParams(e),n=this._def.options;function a(i){for(const s of i)if(s.result.status==="valid")return s.result;for(const s of i)if(s.result.status==="dirty")return t.common.issues.push(...s.ctx.common.issues),s.result;const o=i.map(s=>new de(s.ctx.common.issues));return w(t,{code:m.invalid_union,unionErrors:o}),E}if(t.common.async)return Promise.all(n.map(async i=>{const o={...t,common:{...t.common,issues:[]},parent:null};return{result:await i._parseAsync({data:t.data,path:t.path,parent:o}),ctx:o}})).then(a);{let i;const o=[];for(const l of n){const c={...t,common:{...t.common,issues:[]},parent:null},u=l._parseSync({data:t.data,path:t.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:c}),c.common.issues.length&&o.push(c.common.issues)}if(i)return t.common.issues.push(...i.ctx.common.issues),i.result;const s=o.map(l=>new de(l));return w(t,{code:m.invalid_union,unionErrors:s}),E}}get options(){return this._def.options}}lr.create=(r,e)=>new lr({options:r,typeName:A.ZodUnion,...T(e)});function $r(r,e){const t=Oe(r),n=Oe(e);if(r===e)return{valid:!0,data:r};if(t===b.object&&n===b.object){const a=D.objectKeys(e),i=D.objectKeys(r).filter(s=>a.indexOf(s)!==-1),o={...r,...e};for(const s of i){const l=$r(r[s],e[s]);if(!l.valid)return{valid:!1};o[s]=l.data}return{valid:!0,data:o}}else if(t===b.array&&n===b.array){if(r.length!==e.length)return{valid:!1};const a=[];for(let i=0;i<r.length;i++){const o=r[i],s=e[i],l=$r(o,s);if(!l.valid)return{valid:!1};a.push(l.data)}return{valid:!0,data:a}}else return t===b.date&&n===b.date&&+r==+e?{valid:!0,data:r}:{valid:!1}}class cr extends P{_parse(e){const{status:t,ctx:n}=this._processInputParams(e),a=(i,o)=>{if(sa(i)||sa(o))return E;const s=$r(i.value,o.value);return s.valid?((la(i)||la(o))&&t.dirty(),{status:t.value,value:s.data}):(w(n,{code:m.invalid_intersection_types}),E)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([i,o])=>a(i,o)):a(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}cr.create=(r,e,t)=>new cr({left:r,right:e,typeName:A.ZodIntersection,...T(t)});class ke extends P{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==b.array)return w(n,{code:m.invalid_type,expected:b.array,received:n.parsedType}),E;if(n.data.length<this._def.items.length)return w(n,{code:m.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),E;!this._def.rest&&n.data.length>this._def.items.length&&(w(n,{code:m.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const i=[...n.data].map((o,s)=>{const l=this._def.items[s]||this._def.rest;return l?l._parse(new Ie(n,o,n.path,s)):null}).filter(o=>!!o);return n.common.async?Promise.all(i).then(o=>se.mergeArray(t,o)):se.mergeArray(t,i)}get items(){return this._def.items}rest(e){return new ke({...this._def,rest:e})}}ke.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ke({items:r,typeName:A.ZodTuple,rest:null,...T(e)})};class ma extends P{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==b.map)return w(n,{code:m.invalid_type,expected:b.map,received:n.parsedType}),E;const a=this._def.keyType,i=this._def.valueType,o=[...n.data.entries()].map(([s,l],c)=>({key:a._parse(new Ie(n,s,n.path,[c,"key"])),value:i._parse(new Ie(n,l,n.path,[c,"value"]))}));if(n.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const l of o){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return E;(c.status==="dirty"||u.status==="dirty")&&t.dirty(),s.set(c.value,u.value)}return{status:t.value,value:s}})}else{const s=new Map;for(const l of o){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return E;(c.status==="dirty"||u.status==="dirty")&&t.dirty(),s.set(c.value,u.value)}return{status:t.value,value:s}}}}ma.create=(r,e,t)=>new ma({valueType:e,keyType:r,typeName:A.ZodMap,...T(t)});class Pt extends P{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==b.set)return w(n,{code:m.invalid_type,expected:b.set,received:n.parsedType}),E;const a=this._def;a.minSize!==null&&n.data.size<a.minSize.value&&(w(n,{code:m.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),t.dirty()),a.maxSize!==null&&n.data.size>a.maxSize.value&&(w(n,{code:m.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),t.dirty());const i=this._def.valueType;function o(l){const c=new Set;for(const u of l){if(u.status==="aborted")return E;u.status==="dirty"&&t.dirty(),c.add(u.value)}return{status:t.value,value:c}}const s=[...n.data.values()].map((l,c)=>i._parse(new Ie(n,l,n.path,c)));return n.common.async?Promise.all(s).then(l=>o(l)):o(s)}min(e,t){return new Pt({...this._def,minSize:{value:e,message:k.toString(t)}})}max(e,t){return new Pt({...this._def,maxSize:{value:e,message:k.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}Pt.create=(r,e)=>new Pt({valueType:r,minSize:null,maxSize:null,typeName:A.ZodSet,...T(e)});class Lt extends P{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==b.function)return w(t,{code:m.invalid_type,expected:b.function,received:t.parsedType}),E;function n(s,l){return Fr({data:s,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Zr(),Rt].filter(c=>!!c),issueData:{code:m.invalid_arguments,argumentsError:l}})}function a(s,l){return Fr({data:s,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Zr(),Rt].filter(c=>!!c),issueData:{code:m.invalid_return_type,returnTypeError:l}})}const i={errorMap:t.common.contextualErrorMap},o=t.data;if(this._def.returns instanceof Dt){const s=this;return re(async function(...l){const c=new de([]),u=await s._def.args.parseAsync(l,i).catch(v=>{throw c.addIssue(n(l,v)),c}),p=await Reflect.apply(o,this,u);return await s._def.returns._def.type.parseAsync(p,i).catch(v=>{throw c.addIssue(a(p,v)),c})})}else{const s=this;return re(function(...l){const c=s._def.args.safeParse(l,i);if(!c.success)throw new de([n(l,c.error)]);const u=Reflect.apply(o,this,c.data),p=s._def.returns.safeParse(u,i);if(!p.success)throw new de([a(u,p.error)]);return p.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Lt({...this._def,args:ke.create(e).rest(dt.create())})}returns(e){return new Lt({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new Lt({args:e||ke.create([]).rest(dt.create()),returns:t||dt.create(),typeName:A.ZodFunction,...T(n)})}}class ga extends P{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}ga.create=(r,e)=>new ga({getter:r,typeName:A.ZodLazy,...T(e)});class ya extends P{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return w(t,{received:t.data,code:m.invalid_literal,expected:this._def.value}),E}return{status:"valid",value:e.data}}get value(){return this._def.value}}ya.create=(r,e)=>new ya({value:r,typeName:A.ZodLiteral,...T(e)});function va(r,e){return new ft({values:r,typeName:A.ZodEnum,...T(e)})}class ft extends P{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),n=this._def.values;return w(t,{expected:D.joinValues(n),received:t.parsedType,code:m.invalid_type}),E}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),n=this._def.values;return w(t,{received:t.data,code:m.invalid_enum_value,options:n}),E}return re(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return ft.create(e,{...this._def,...t})}exclude(e,t=this._def){return ft.create(this.options.filter(n=>!e.includes(n)),{...this._def,...t})}}ft.create=va;class _a extends P{_parse(e){const t=D.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==b.string&&n.parsedType!==b.number){const a=D.objectValues(t);return w(n,{expected:D.joinValues(a),received:n.parsedType,code:m.invalid_type}),E}if(this._cache||(this._cache=new Set(D.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const a=D.objectValues(t);return w(n,{received:n.data,code:m.invalid_enum_value,options:a}),E}return re(e.data)}get enum(){return this._def.values}}_a.create=(r,e)=>new _a({values:r,typeName:A.ZodNativeEnum,...T(e)});class Dt extends P{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==b.promise&&t.common.async===!1)return w(t,{code:m.invalid_type,expected:b.promise,received:t.parsedType}),E;const n=t.parsedType===b.promise?t.data:Promise.resolve(t.data);return re(n.then(a=>this._def.type.parseAsync(a,{path:t.path,errorMap:t.common.contextualErrorMap})))}}Dt.create=(r,e)=>new Dt({type:r,typeName:A.ZodPromise,...T(e)});class ht extends P{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===A.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:n}=this._processInputParams(e),a=this._def.effect||null,i={addIssue:o=>{w(n,o),o.fatal?t.abort():t.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),a.type==="preprocess"){const o=a.transform(n.data,i);if(n.common.async)return Promise.resolve(o).then(async s=>{if(t.value==="aborted")return E;const l=await this._def.schema._parseAsync({data:s,path:n.path,parent:n});return l.status==="aborted"?E:l.status==="dirty"||t.value==="dirty"?Ot(l.value):l});{if(t.value==="aborted")return E;const s=this._def.schema._parseSync({data:o,path:n.path,parent:n});return s.status==="aborted"?E:s.status==="dirty"||t.value==="dirty"?Ot(s.value):s}}if(a.type==="refinement"){const o=s=>{const l=a.refinement(s,i);if(n.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(n.common.async===!1){const s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?E:(s.status==="dirty"&&t.dirty(),o(s.value),{status:t.value,value:s.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>s.status==="aborted"?E:(s.status==="dirty"&&t.dirty(),o(s.value).then(()=>({status:t.value,value:s.value}))))}if(a.type==="transform")if(n.common.async===!1){const o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!ct(o))return E;const s=a.transform(o.value,i);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:s}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>ct(o)?Promise.resolve(a.transform(o.value,i)).then(s=>({status:t.value,value:s})):E);D.assertNever(a)}}ht.create=(r,e,t)=>new ht({schema:r,typeName:A.ZodEffects,effect:e,...T(t)}),ht.createWithPreprocess=(r,e,t)=>new ht({schema:e,effect:{type:"preprocess",transform:r},typeName:A.ZodEffects,...T(t)});class De extends P{_parse(e){return this._getType(e)===b.undefined?re(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}De.create=(r,e)=>new De({innerType:r,typeName:A.ZodOptional,...T(e)});class mt extends P{_parse(e){return this._getType(e)===b.null?re(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}mt.create=(r,e)=>new mt({innerType:r,typeName:A.ZodNullable,...T(e)});class qr extends P{_parse(e){const{ctx:t}=this._processInputParams(e);let n=t.data;return t.parsedType===b.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}qr.create=(r,e)=>new qr({innerType:r,typeName:A.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...T(e)});class Yr extends P{_parse(e){const{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},a=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return or(a)?a.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new de(n.common.issues)},input:n.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new de(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}Yr.create=(r,e)=>new Yr({innerType:r,typeName:A.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...T(e)});class xa extends P{_parse(e){if(this._getType(e)!==b.nan){const n=this._getOrReturnCtx(e);return w(n,{code:m.invalid_type,expected:b.nan,received:n.parsedType}),E}return{status:"valid",value:e.data}}}xa.create=r=>new xa({typeName:A.ZodNaN,...T(r)});class vo extends P{_parse(e){const{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}class Xr extends P{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?E:i.status==="dirty"?(t.dirty(),Ot(i.value)):this._def.out._parseAsync({data:i.value,path:n.path,parent:n})})();{const a=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?E:a.status==="dirty"?(t.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:n.path,parent:n})}}static create(e,t){return new Xr({in:e,out:t,typeName:A.ZodPipeline})}}class Hr extends P{_parse(e){const t=this._def.innerType._parse(e),n=a=>(ct(a)&&(a.value=Object.freeze(a.value)),a);return or(t)?t.then(a=>n(a)):n(t)}unwrap(){return this._def.innerType}}Hr.create=(r,e)=>new Hr({innerType:r,typeName:A.ZodReadonly,...T(e)});var A;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly"})(A||(A={}));const gt=Pe.create,O=ut.create,wa=Vr.create,ba=Ur.create;dt.create,Le.create;const ur=Wr.create,Gr=ve.create,$=W.create;lr.create,cr.create;const ka=ke.create,_e=Lt.create;ft.create;const _o=Dt.create;De.create,mt.create,$({pin:$({fade:wa().optional(),maxCount:O().optional(),maxZoom:O().optional()}).optional(),animation:$({queue:$({limit:O().optional()}).optional()}).optional(),states:$({url:gt(),key:gt()}).optional()});const Jr=O().min(-90).max(90),Kr=O().min(-180).max(180),xo=$({sw:$({lat:Jr,lng:Kr}),ne:$({lat:Jr,lng:Kr})}),Qr=ba().refine(r=>r instanceof HTMLElement,"Must be an HTMLElement"),Sa=$({mapSize:O(),zoomMin:O(),zoomMax:O(),zoomScale:O()}),wo=$({instance:ba(),inserted:_e().returns(wa()),insert:_e().returns(ur()),remove:_e().returns(ur()),update:_e().args(O()).returns(ur())}),bo=$({parameters:Sa,getContainer:_e().args().returns(Qr),getZoom:_e().args().returns(O()),getBounds:_e().args().returns(xo),panBy:_e().args(O(),O()).returns(ur()),createMarker:_e().args(Qr,Jr,Kr,O()).returns(wo)}),en=_e().args(gt()).returns(_o(Qr)),ko=$({id:gt().min(1),rank:O(),lat:O().min(-90).max(90),lng:O().min(-180).max(180),tooltip:$({style:$({width:O(),height:O(),margin:O(),radius:O()}).refine(r=>Math.min(r.width,r.height)/r.margin>=5,"Tooltip width and height must be at least 5 times the margin"),body:en}),pin:$({style:$({width:O(),height:O(),radius:O()}),body:en}).optional(),popup:$({style:$({width:O(),height:O(),radius:O(),margin:O()}),body:en}).optional()}),So=Gr(ko);ka([O(),Gr(ka([O(),O()]))]);const zo=$({id:gt(),rank:O(),lat:O(),lng:O(),width:O(),height:O(),margin:O()});$({key:gt(),parameters:Sa,input:Gr(zo)});class Mo{constructor(e,t){d(this,"provider");d(this,"statesApiUrl");d(this,"statesApiKey");d(this,"markerDataArray",new Array);d(this,"markerDataMap",new Map);d(this,"markerDataUpdating",!1);d(this,"markerPinProcessor");d(this,"markerTooltipProcessor");d(this,"markerPopupProcessor");bo.parse(e),this.provider=e,this.markerPinProcessor=new nn(e),this.markerTooltipProcessor=new Eo(e),this.markerPopupProcessor=new Ao(e),this.configuration=t}set configuration(e){var t,n,a,i;this.statesApiUrl=(t=e==null?void 0:e.states)==null?void 0:t.url,this.statesApiKey=(n=e==null?void 0:e.states)==null?void 0:n.key,this.markerPinProcessor.setConfiguration(e),Re.setLimit(((i=(a=e==null?void 0:e.animation)==null?void 0:a.queue)==null?void 0:i.limit)??8*navigator.hardwareConcurrency)}async updateMarkers(e){await So.parseAsync(e);try{let t;if(e.length>1){const n=e.map(a=>({id:a.id,rank:a.rank,lat:a.lat,lng:a.lng,width:a.tooltip.style.width,height:a.tooltip.style.height,margin:a.tooltip.style.margin}));if(this.statesApiUrl!=null&&this.statesApiKey!=null){const a={key:this.statesApiKey,parameters:this.provider.parameters,input:n},i=await fetch(this.statesApiUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(!i.ok||!i.body)throw new Error("Failed to get marker states: "+i.statusText);t=await i.json()}else t=Yi(this.provider.parameters,n)}else t=[[0,[[0,q.DEGREES.indexOf(q.DEFAULT)]]]];this.updateMarkerData(e,t),this.processMarkerDataCallback()}catch(t){throw console.error(t),this.removeMarkerData(),t}}removeMarkers(){try{this.removeMarkerData()}catch(e){throw console.error(e),e}}showPopup(e){try{for(const t of this.markerDataArray)t.marker.id==e?this.markerPopupProcessor.show(t):this.markerPopupProcessor.hide(t)}catch(t){console.error(t);for(const n of this.markerDataArray)this.markerPopupProcessor.hide(n);throw t}}hidePopup(e){try{if(e){const t=this.markerDataMap.get(e);if(t==null)return;this.markerPopupProcessor.hide(t)}else for(const t of this.markerDataArray)this.markerPopupProcessor.hide(t)}catch(t){console.error(t);for(const n of this.markerDataArray)this.markerPopupProcessor.hide(n);throw t}}updateMarkerData(e,t){try{this.markerDataUpdating=!0;const n=new Map(e.map((i,o)=>[i.id,new za(this.provider,i,t[o])])),a=Array.from(this.markerDataArray);for(const i of a)n.has(i.marker.id)==!1&&(i.remove(),this.markerDataMap.delete(i.marker.id),this.markerDataArray.splice(this.markerDataArray.indexOf(i),1));for(let i=0;i<e.length;i++){const o=e[i],s=t[i],l=this.markerDataMap.get(o.id);if(l)l.update(s);else{const c=new za(this.provider,o,s);c.create(),this.markerDataMap.set(o.id,c),this.markerDataArray.push(c)}}this.markerDataArray.sort((i,o)=>i.zoom-o.zoom),this.markerPinProcessor.updateElements(this.markerDataArray.map(i=>i.pin)),this.markerTooltipProcessor.updateElements(this.markerDataArray.map(i=>i.tooltip))}catch(n){throw console.error(n),this.markerDataArray.forEach(a=>a.remove()),this.markerDataArray.length=0,this.markerDataMap.clear(),n}finally{this.markerDataUpdating=!1}}removeMarkerData(){try{this.markerDataUpdating=!0,this.markerPinProcessor.removeElements(),this.markerTooltipProcessor.removeElements(),this.markerPopupProcessor.clear(),this.markerDataArray.length=0,this.markerDataMap.clear()}catch(e){throw console.error(e),e}finally{this.markerDataUpdating=!1}}processMarkerDataCallback(){if(this.markerDataArray.length!=0)try{this.processMarkerData(),window.setTimeout(this.processMarkerDataCallback.bind(this),25)}catch(e){console.error(e)}}processMarkerData(){if(this.markerDataUpdating)return;const e=this.provider.getBounds(),t=this.provider.getZoom();this.markerPopupProcessor.process(),this.markerTooltipProcessor.process(e,t),this.markerPinProcessor.process(e,t)}}class za{constructor(e,t,n){d(this,"marker");d(this,"zoom");d(this,"pin");d(this,"tooltip");this.marker=t,this.zoom=n[0],this.pin=new rn(e,t,n),this.tooltip=new an(e,t,n)}create(){this.pin.create(),this.tooltip.create()}update(e){this.pin.update(e),this.tooltip.update(e)}remove(){this.pin.remove(),this.tooltip.remove()}}class tn{constructor(e,t){d(this,"provider");d(this,"id");d(this,"lat");d(this,"lng");d(this,"shown");d(this,"element");d(this,"component");d(this,"marker");this.provider=e,this.id=t.id,this.lat=t.lat,this.lng=t.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 t=this.marker,n=this.component;if(t==null||n==null)throw new Error("Failed to update provider marker map");e?t.inserted()==!1&&t.insert():t.inserted()==!0&&t.remove()}getZindex(){throw new Error("Get z-index not implemented")}remove(){var e,t;(e=this.marker)==null||e.remove(),(t=this.element)==null||t.remove()}}const wt=class wt extends tn{constructor(t,n,a){var i,o,s,l;super(t,n);d(this,"width");d(this,"height");d(this,"radius");d(this,"zoom");d(this,"bodyLoading",!1);d(this,"bodyLoaded",!1);d(this,"bodyCallback");this.width=((i=n.pin)==null?void 0:i.style.width)??wt.DEFAULT_SIZE,this.height=((o=n.pin)==null?void 0:o.style.height)??wt.DEFAULT_SIZE,this.radius=((s=n.pin)==null?void 0:s.style.radius)??wt.DEFAULT_SIZE,this.zoom=a[0],this.bodyCallback=(l=n.pin)==null?void 0:l.body}createElement(){this.element=document.createElement("div"),this.element.classList.add("pin"),this.component=Or($i,{target:this.element,props:{id:this.id+"_pin",layer:Vi,priority:this.zoom*this.provider.parameters.zoomScale,width:this.width,height:this.height,radius:this.radius}})}update(t){this.zoom=t[0],this.updateZIndex()}updateMap(t){var n;super.updateMap(t),(n=this.component)==null||n.setDisplayed(t)}updateState(t){if(this.component==null)throw new Error("Failed to update pin state");this.component.setScale(this.getScale(t))}updateBody(){var n;if(this.bodyCallback==null||this.bodyLoaded||this.bodyLoading)return;const t=(n=this.component)==null?void 0:n.getBody();t!=null&&(this.bodyLoading=!0,this.bodyCallback(this.id).then(a=>t.appendChild(a)).catch(a=>console.error(a)).finally(()=>{this.bodyLoaded=!0,this.bodyLoading=!1}))}setCollapsed(t){if(this.component==null)throw new Error("Failed to set pin collapsed");this.component.setScale(t?0:1)}getScale(t){return this.zoom<t?1:Math.max(0,1-(this.zoom-t)*.125)}getZindex(){return Math.round((this.provider.parameters.zoomMax-this.zoom)*this.provider.parameters.zoomScale)}isCollapsed(){return this.component==null?!1:this.component.getCollapsed()}isBodyLoaded(){return this.bodyCallback==null||this.bodyLoaded}};d(wt,"DEFAULT_SIZE",16);let rn=wt;const bt=class bt{constructor(e){d(this,"provider");d(this,"pinElements",new Array);d(this,"pinMaxWidth",0);d(this,"pinMaxHeight",0);d(this,"pinFade",!1);d(this,"pinMaxCount",0);d(this,"pinMaxZoomDelta",0);this.provider=e}setConfiguration(e){var t,n,a;this.pinFade=((t=e==null?void 0:e.pin)==null?void 0:t.fade)??!0,this.pinMaxCount=((n=e==null?void 0:e.pin)==null?void 0:n.maxCount)??Math.max(bt.MAP_PINS_MAX_COUNT,8*navigator.hardwareConcurrency),this.pinMaxZoomDelta=((a=e==null?void 0:e.pin)==null?void 0:a.maxZoom)??bt.MAP_PINS_MAX_ZOOM}updateElements(e){this.pinElements=e,this.pinMaxWidth=e.reduce((t,n)=>Math.max(t,n.width),0),this.pinMaxHeight=e.reduce((t,n)=>Math.max(t,n.height),0)}removeElements(){this.pinElements.forEach(e=>e.remove()),this.pinElements.length=0}process(e,t){const n=this.provider.parameters.mapSize,a=new ia(e,t,n,this.pinMaxWidth*2,this.pinMaxHeight*2);let i=0;for(const o of this.pinElements)a.contains(o.lat,o.lng)?o.shown&&t<=o.zoom&&o.zoom<=t+this.pinMaxZoomDelta?(i<this.pinMaxCount&&(this.pinFade==!0?o.updateState(t):o.setCollapsed(!1),o.updateMap(!0),o.isBodyLoaded()==!1&&o.updateBody()),i++):(o.setCollapsed(!0),o.isCollapsed()&&o.updateMap(!1)):o.updateMap(!1)}};d(bt,"MAP_PINS_MAX_ZOOM",2),d(bt,"MAP_PINS_MAX_COUNT",128);let nn=bt;const dr=class dr extends tn{constructor(t,n,a){super(t,n);d(this,"width");d(this,"height");d(this,"margin");d(this,"radius");d(this,"zoom");d(this,"angle");d(this,"states");d(this,"bodyLoading",!1);d(this,"bodyLoaded",!1);d(this,"bodyCallback");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=a[0],this.angle=q.DEFAULT,this.states=a[1].map(i=>[i[0],q.DEGREES[i[1]]]),this.bodyCallback=n.tooltip.body}createElement(){this.element=document.createElement("div"),this.element.classList.add("tooltip"),this.component=Or(aa,{target:this.element,props:{id:this.id+"_tooltip",layer:Bi,priority:this.zoom*this.provider.parameters.zoomScale,width:this.width,height:this.height,margin:this.margin,radius:this.radius}})}update(t){this.zoom=t[0],this.states=t[1].map(n=>[n[0],q.DEGREES[n[1]]]),this.updateZIndex()}updateMap(t){var n;super.updateMap(t),(n=this.component)==null||n.setDisplayed(t)}updateState(t){if(this.component==null)throw new Error("Failed to update tooltip state");this.angle=this.getAngle(t),this.component.setAngle(this.angle)}updateBody(){var n;if(this.bodyLoaded||this.bodyLoading)return;const t=(n=this.component)==null?void 0:n.getBody();t!=null&&(this.bodyLoading=!0,this.bodyCallback(this.id).then(a=>t.appendChild(a)).catch(a=>console.error(a)).finally(()=>{this.bodyLoaded=!0,this.bodyLoading=!1}))}getAngle(t){const n=this.states.findLast(a=>a[0]<=t);if(!n)throw new Error("Angle not found");return n[1]}getZindex(){return Math.round((this.provider.parameters.zoomMax-this.zoom)*this.provider.parameters.zoomScale)+dr.Z_INDEX_OFFSET}setCollapsed(t){if(this.component==null)throw new Error("Failed to set tooltip collapsed");this.component.setCollapsed(t)}isExpanded(){return this.component==null?!1:this.component.getExpanded()}isCollapsed(){return this.component==null?!1:this.component.getCollapsed()}isBodyLoaded(){return this.bodyLoaded}};d(dr,"Z_INDEX_OFFSET",1e6);let an=dr;class Eo{constructor(e){d(this,"provider");d(this,"tooltipElements",new Array);d(this,"tooltipMaxWidth",0);d(this,"tooltipMaxHeight",0);this.provider=e}updateElements(e){this.tooltipElements=e,this.tooltipMaxWidth=this.tooltipElements.reduce((t,n)=>Math.max(t,n.width),0),this.tooltipMaxHeight=this.tooltipElements.reduce((t,n)=>Math.max(t,n.height),0)}removeElements(){this.tooltipElements.forEach(e=>e.remove()),this.tooltipElements.length=0}process(e,t){const n=this.provider.parameters.mapSize,a=new ia(e,t,n,this.tooltipMaxWidth*2,this.tooltipMaxHeight*2);for(const i of this.tooltipElements)a.contains(i.lat,i.lng)?i.shown&&i.zoom<=t?(i.updateState(t),i.setCollapsed(!1),i.updateMap(!0),i.isCollapsed()==!1&&i.isBodyLoaded()==!1&&i.updateBody()):(i.setCollapsed(!0),i.isCollapsed()&&i.updateMap(!1)):i.updateMap(!1)}}const pr=class pr extends tn{constructor(t,n){if(n.popup==null)throw new Error("Failed to create popup");super(t,n);d(this,"width");d(this,"height");d(this,"margin");d(this,"radius");d(this,"bodyLoading",!1);d(this,"bodyLoaded",!1);d(this,"bodyCallback");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=Or(aa,{target:this.element,props:{id:this.id+"_popup",layer:Fi,priority:0,width:this.width,height:this.height,margin:this.margin,radius:this.radius}})}updateMap(t){var n;super.updateMap(t),(n=this.component)==null||n.setDisplayed(t)}updateBody(){var n;if(this.bodyLoaded||this.bodyLoading)return;const t=(n=this.component)==null?void 0:n.getBody();t!=null&&(this.bodyLoading=!0,this.bodyCallback(this.id).then(a=>t.appendChild(a)).catch(a=>console.error(a)).finally(()=>{this.bodyLoaded=!0,this.bodyLoading=!1}))}getZindex(){return pr.Z_INDEX_OFFSET}setCollapsed(t){if(this.component==null)throw new Error("Failed to set popup collapsed");this.component.setCollapsed(t)}setAngle(t){if(this.component==null)throw new Error("Failed to set popup angle");this.component.setAngle(t)}isExpanded(){return this.component==null?!1:this.component.getExpanded()}isCollapsed(){return this.component==null?!1:this.component.getCollapsed()}isBodyLoaded(){return this.bodyLoaded}};d(pr,"Z_INDEX_OFFSET",2e6);let on=pr;class Ao{constructor(e){d(this,"provider");d(this,"popupElements",new Map);d(this,"popupPositioned",new Map);this.provider=e}show(e){e.pin.shown=!1,e.tooltip.shown=!1;const t=new on(this.provider,e.marker);this.popupElements.set(e.marker.id,t),this.popupPositioned.set(e.marker.id,!1),t.create(),t.setAngle(e.tooltip.angle),t.shown=!0}hide(e){e.pin.shown=!0,e.tooltip.shown=!0;const t=this.popupElements.get(e.marker.id);t!=null&&(t.shown=!1)}clear(){this.popupElements.values().forEach(e=>e.remove()),this.popupElements.clear(),this.popupPositioned.clear()}process(){var e,t;for(const n of this.popupElements.values())if(n.shown){if(n.setCollapsed(!1),n.updateMap(!0),n.isExpanded()&&n.isBodyLoaded()==!1&&n.updateBody(),n.isCollapsed()==!1&&this.popupPositioned.get(n.id)==!1){const a=(e=n.component)==null?void 0:e.getBody();if(a==null)continue;const i=(t=n.component)==null?void 0:t.getOffsets();if(i==null)continue;const o=a.getBoundingClientRect();if(o.x==0&&o.y==0&&o.width==0&&o.height==0)continue;const s=o.x+o.width/2,l=o.y+o.height/2,c=s+i.offsetX,u=l+i.offsetY,p=c+n.width,h=u+n.height,v=this.provider.getContainer().getBoundingClientRect(),M=c-v.left,x=v.right-p,f=u-v.top,_=v.bottom-h,g=Math.min(n.width,n.height)/4,y=M<0?M-g:x<0?-x+g:0,z=f<0?f-g:_<0?-_+g:0;this.provider.panBy(y,z),this.popupPositioned.set(n.id,!0)}}else n.setCollapsed(!0),n.isCollapsed()&&(n.updateMap(!1),n.remove(),this.popupElements.delete(n.id),this.popupPositioned.delete(n.id))}}const fr=class fr{constructor(e,t,n){d(this,"parameters",fr.Parameters);d(this,"MapClass");d(this,"MapMarkerClass");d(this,"map");this.MapClass=e,this.MapMarkerClass=t,this.map=new this.MapClass({...n,style:n.style??"https://tiles.openfreemap.org/styles/liberty",pitchWithRotate:!1,attributionControl:n.attributionControl??{compact:!1,customAttribution:"@arenarium/maps"}}),this.map.dragRotate.disable(),this.map.keyboard.disable(),this.map.touchZoomRotate.disableRotation(),this.map.touchPitch.disable()}getMap(){return this.map}getContainer(){return this.map.getContainer()}getZoom(){return this.map.getZoom()}getBounds(){const e=this.map.getBounds(),t=e.getSouthWest(),n=e.getNorthEast();return{sw:t,ne:n}}panBy(e,t){this.map.panBy([e,t])}createMarker(e,t,n){const a=new this.MapMarkerClass({element:e});return a.setLngLat([n,t]),{instance:a,inserted:()=>a._map!=null,insert:()=>a.addTo(this.map),remove:()=>a.remove(),update:i=>a.getElement().style.zIndex=i.toString()}}};d(fr,"Parameters",{mapSize:512,zoomMin:0,zoomMax:24,zoomScale:10});let sn=fr;const Co={version:8,sources:{openmaptiles:{type:"vector",url:"https://tiles.openfreemap.org/planet"}},glyphs:"https://tiles.openfreemap.org/fonts/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"rgba(120, 120, 120, 1)"}},{id:"park",type:"fill",source:"openmaptiles","source-layer":"park",filter:["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],paint:{"fill-color":"rgba(128, 128, 128, 1)"}},{id:"water",type:"fill",source:"openmaptiles","source-layer":"water",filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["!=",["get","brunnel"],"tunnel"]],paint:{"fill-antialias":!0,"fill-color":"rgba(56, 56, 56, 1)"}},{id:"landcover_ice_shelf",type:"fill",source:"openmaptiles","source-layer":"landcover",maxzoom:8,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","subclass"],"ice_shelf"]],paint:{"fill-color":"rgba(128, 128, 128, 1)","fill-opacity":.7}},{id:"landcover_glacier",type:"fill",source:"openmaptiles","source-layer":"landcover",maxzoom:8,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","subclass"],"glacier"]],paint:{"fill-color":"rgba(153, 153, 153, 1)","fill-opacity":["interpolate",["linear"],["zoom"],0,1,8,.5]}},{id:"landuse_residential",type:"fill",source:"openmaptiles","source-layer":"landuse",maxzoom:16,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","class"],"residential"]],paint:{"fill-color":"rgba(104, 104, 104, 1)","fill-opacity":["interpolate",["exponential",.6],["zoom"],8,.8,9,.6]}},{id:"landcover_wood",type:"fill",source:"openmaptiles","source-layer":"landcover",minzoom:10,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","class"],"wood"]],paint:{"fill-color":"rgba(128, 128, 128, 1)","fill-opacity":["interpolate",["linear"],["zoom"],8,0,12,1]}},{id:"waterway",type:"line",source:"openmaptiles","source-layer":"waterway",filter:["==",["geometry-type"],"LineString"],paint:{"line-color":"rgba(56, 56, 56, 1)"}},{id:"building",type:"fill",source:"openmaptiles","source-layer":"building",minzoom:12,paint:{"fill-antialias":!0,"fill-color":"rgba(136, 136, 136, 1)","fill-outline-color":"rgba(102, 102, 102, 1)"}},{id:"tunnel_motorway_casing",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","brunnel"],"tunnel"],["==",["get","class"],"motorway"]]],layout:{"line-cap":"butt","line-join":"miter"},paint:{"line-color":"rgba(68, 68, 68, 1)","line-opacity":1,"line-width":["interpolate",["exponential",1.4],["zoom"],5.8,0,6,3,20,40]}},{id:"tunnel_motorway_inner",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","brunnel"],"tunnel"],["==",["get","class"],"motorway"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(85, 85, 85, 1)","line-width":["interpolate",["exponential",1.4],["zoom"],4,2,6,1.3,20,30]}},{id:"aeroway-taxiway",type:"line",source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["match",["get","class"],["taxiway"],!0,!1],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(85, 85, 85, 1)","line-opacity":1,"line-width":["interpolate",["exponential",1.55],["zoom"],13,1.8,20,20]}},{id:"aeroway-runway-casing",type:"line",source:"openmaptiles","source-layer":"aeroway",minzoom:11,filter:["match",["get","class"],["runway"],!0,!1],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(85, 85, 85, 1)","line-opacity":1,"line-width":["interpolate",["exponential",1.5],["zoom"],11,6,17,55]}},{id:"aeroway-area",type:"fill",source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["match",["get","class"],["runway","taxiway"],!0,!1]],paint:{"fill-color":"rgba(128, 128, 128, 1)","fill-opacity":["interpolate",["linear"],["zoom"],13,0,14,1]}},{id:"aeroway-runway",type:"line",source:"openmaptiles","source-layer":"aeroway",minzoom:11,filter:["all",["match",["get","class"],["runway"],!0,!1],["==",["geometry-type"],"LineString"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(68, 68, 68, 1)","line-opacity":1,"line-width":["interpolate",["exponential",1.5],["zoom"],11,4,17,50]}},{id:"road_area_pier",type:"fill",source:"openmaptiles","source-layer":"transportation",filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","class"],"pier"]],paint:{"fill-antialias":!0,"fill-color":"rgba(50, 50, 50, 1)"}},{id:"road_pier",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["pier"],!0,!1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(52, 52, 52, 1)","line-width":["interpolate",["exponential",1.2],["zoom"],15,1,17,4]}},{id:"highway_path",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","class"],"path"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(88, 88, 88, 1)","line-opacity":.9,"line-width":["interpolate",["exponential",1.2],["zoom"],13,1,20,10]}},{id:"highway_minor",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:8,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["minor","service","track"],!0,!1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-opacity":.9,"line-width":["interpolate",["exponential",1.55],["zoom"],13,1.8,20,20],"line-color":"rgba(102, 102, 102, 1)"}},{id:"highway_major_casing",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:11,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["primary","secondary","tertiary","trunk"],!0,!1]],layout:{"line-cap":"butt","line-join":"miter"},paint:{"line-dasharray":[12,0],"line-width":["interpolate",["exponential",1.3],["zoom"],10,3,20,23],"line-color":"rgba(85, 85, 85, 1)"}},{id:"highway_major_inner",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:11,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["primary","secondary","tertiary","trunk"],!0,!1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(102, 102, 102, 1)","line-width":["interpolate",["exponential",1.3],["zoom"],10,2,20,20]}},{id:"highway_major_subtle",type:"line",source:"openmaptiles","source-layer":"transportation",maxzoom:11,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["primary","secondary","tertiary","trunk"],!0,!1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-width":2,"line-color":"rgba(85, 85, 85, 1)"}},{id:"highway_motorway_casing",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["match",["get","brunnel"],["bridge","tunnel"],!1,!0],["==",["get","class"],"motorway"]]],layout:{"line-cap":"butt","line-join":"miter"},paint:{"line-color":"rgba(68, 68, 68, 1)","line-dasharray":[2,0],"line-opacity":1,"line-width":["interpolate",["exponential",1.4],["zoom"],5.8,0,6,3,20,40]}},{id:"highway_motorway_inner",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["match",["get","brunnel"],["bridge","tunnel"],!1,!0],["==",["get","class"],"motorway"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":["interpolate",["linear"],["zoom"],5.8,"rgba(102, 102, 102, 1)",6,"rgba(85, 85, 85, 1)"],"line-width":["interpolate",["exponential",1.4],["zoom"],4,2,6,1.3,20,30]}},{id:"highway_motorway_subtle",type:"line",source:"openmaptiles","source-layer":"transportation",maxzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["==",["get","class"],"motorway"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(102, 102, 102, 1)","line-width":["interpolate",["exponential",1.4],["zoom"],4,2,6,1.3]}},{id:"railway_transit",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:16,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","class"],"transit"],["match",["get","brunnel"],["tunnel"],!1,!0]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(85, 85, 85, 1)","line-width":3}},{id:"railway_transit_dashline",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:16,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","class"],"transit"],["match",["get","brunnel"],["tunnel"],!1,!0]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(68, 68, 68, 1)","line-dasharray":[3,3],"line-width":2}},{id:"railway_service",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:16,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","class"],"rail"],["has","service"]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(102, 102, 102, 1)","line-width":3}},{id:"railway_service_dashline",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:16,filter:["all",["==",["geometry-type"],"LineString"],["==",["get","class"],"rail"],["has","service"]],layout:{"line-join":"round"},paint:{"line-color":"rgba(85, 85, 85, 1)","line-dasharray":[3,3],"line-width":2}},{id:"railway",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["==",["geometry-type"],"LineString"],["all",["!",["has","service"]],["==",["get","class"],"rail"]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(85, 85, 85, 1)","line-width":["interpolate",["exponential",1.3],["zoom"],16,3,20,7]}},{id:"railway_dashline",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["==",["geometry-type"],"LineString"],["all",["!",["has","service"]],["==",["get","class"],"rail"]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(68, 68, 68, 1)","line-dasharray":[3,3],"line-width":["interpolate",["exponential",1.3],["zoom"],16,2,20,6]}},{id:"highway_motorway_bridge_casing",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","brunnel"],"bridge"],["==",["get","class"],"motorway"]]],layout:{"line-cap":"butt","line-join":"miter"},paint:{"line-color":"rgba(68, 68, 68, 1)","line-dasharray":[2,0],"line-opacity":1,"line-width":["interpolate",["exponential",1.4],["zoom"],5.8,0,6,5,20,45]}},{id:"highway_motorway_bridge_inner",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","brunnel"],"bridge"],["==",["get","class"],"motorway"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":["interpolate",["linear"],["zoom"],5.8,"rgba(102, 102, 102, 1)",6,"rgba(85, 85, 85, 1)"],"line-width":["interpolate",["exponential",1.4],["zoom"],4,2,6,1.3,20,30]}},{id:"boundary_3",type:"line",source:"openmaptiles","source-layer":"boundary",minzoom:8,filter:["all",[">=",["get","admin_level"],3],["<=",["get","admin_level"],6],["!=",["get","maritime"],1],["!=",["get","disputed"],1],["!",["has","claimed_by"]]],paint:{"line-color":"rgba(68, 68, 68, 1)","line-dasharray":[1,1],"line-width":["interpolate",["linear"],["zoom"],7,1,11,2]}},{id:"boundary_2",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["==",["get","admin_level"],2],["!=",["get","maritime"],1],["!=",["get","disputed"],1],["!",["has","claimed_by"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(51, 51, 51, 1)","line-opacity":["interpolate",["linear"],["zoom"],0,.4,4,1],"line-width":["interpolate",["linear"],["zoom"],3,1,5,1.2,12,3]}},{id:"boundary_disputed",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["!=",["get","maritime"],1],["==",["get","disputed"],1]],paint:{"line-color":"rgba(51, 51, 51, 1)","line-dasharray":[1,2],"line-width":["interpolate",["linear"],["zoom"],3,1,5,1.2,12,3]}},{id:"waterway_line_label",type:"symbol",source:"openmaptiles","source-layer":"waterway",minzoom:10,filter:["==",["geometry-type"],"LineString"],layout:{"symbol-placement":"line","symbol-spacing":350,"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-letter-spacing":.2,"text-max-width":5,"text-size":14},paint:{"text-color":"rgba(34, 34, 34, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"water_name_point_label",type:"symbol",source:"openmaptiles","source-layer":"water_name",minzoom:0,filter:["==",["geometry-type"],"Point"],layout:{visibility:"none"}},{id:"water_name_line_label",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["==",["geometry-type"],"LineString"],layout:{visibility:"none"}},{id:"highway-name-path",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:15.5,filter:["==",["get","class"],"path"],layout:{"symbol-placement":"line","text-field":["get","name:latin"],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"map","text-size":["interpolate",["linear"],["zoom"],13,12,14,13]},paint:{"text-color":"rgba(158, 158, 158, 1)","text-halo-color":"rgba(244, 244, 244, 1)","text-halo-width":.5}},{id:"highway-name-minor",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:15,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["minor","service","track"],!0,!1]],layout:{"symbol-placement":"line","text-field":["get","name:latin"],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"map","text-size":["interpolate",["linear"],["zoom"],13,12,14,13]},paint:{"text-color":"rgba(17, 17, 17, 1)","text-halo-width":1,"text-halo-color":"rgba(255, 255, 255, 1)"}},{id:"highway-name-major",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:12.2,filter:["match",["get","class"],["primary","secondary","tertiary","trunk"],!0,!1],layout:{"symbol-placement":"line","text-field":["get","name:latin"],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"map","text-size":["interpolate",["linear"],["zoom"],13,12,14,13]},paint:{"text-color":"rgba(34, 34, 34, 1)","text-halo-width":1,"text-halo-color":"rgba(255, 255, 255, 1)"}},{id:"highway-shield-non-us",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:11,filter:["all",["<=",["get","ref_length"],6],["==",["geometry-type"],"LineString"],["match",["get","network"],["us-highway","us-interstate","us-state"],!1,!0]],layout:{"icon-rotation-alignment":"viewport","icon-size":1,"symbol-placement":["step",["zoom"],"point",11,"line"],"symbol-spacing":200,"text-field":["to-string",["get","ref"]],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"viewport","text-size":10},paint:{"text-halo-color":"rgba(255, 255, 255, 1)","text-color":"rgba(255, 255, 255, 1)"}},{id:"highway-shield-us-interstate",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:11,filter:["all",["<=",["get","ref_length"],6],["==",["geometry-type"],"LineString"],["match",["get","network"],["us-interstate"],!0,!1]],layout:{"icon-rotation-alignment":"viewport","icon-size":1,"symbol-placement":["step",["zoom"],"point",7,"line",8,"line"],"symbol-spacing":200,"text-field":["to-string",["get","ref"]],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"viewport","text-size":10}},{id:"road_shield_us",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:12,filter:["all",["<=",["get","ref_length"],6],["==",["geometry-type"],"LineString"],["match",["get","network"],["us-highway","us-state"],!0,!1]],layout:{"icon-rotation-alignment":"viewport","icon-size":1,"symbol-placement":["step",["zoom"],"point",11,"line"],"symbol-spacing":200,"text-field":["to-string",["get","ref"]],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"viewport","text-size":10}},{id:"airport",type:"symbol",source:"openmaptiles","source-layer":"aerodrome_label",minzoom:11,filter:["all",["has","iata"]],layout:{"icon-size":1,"text-anchor":"top","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-max-width":9,"text-offset":[0,.6],"text-optional":!0,"text-padding":2,"text-size":12},paint:{"text-color":"rgba(51, 51, 51, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_other",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:8,filter:["match",["get","class"],["city","continent","country","state","town","village"],!1,!0],layout:{"text-field":["get","name:latin"],"text-font":["Noto Sans Regular"],"text-letter-spacing":.1,"text-max-width":9,"text-size":["interpolate",["linear"],["zoom"],8,9,12,10],"text-transform":"uppercase"},paint:{"text-color":"rgba(17, 17, 17, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_village",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:9,filter:["==",["get","class"],"village"],layout:{"icon-allow-overlap":!0,"icon-optional":!1,"icon-size":.2,"text-anchor":"bottom","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-max-width":8,"text-size":["interpolate",["exponential",1.2],["zoom"],7,10,11,12]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_town",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:6,filter:["==",["get","class"],"town"],layout:{"icon-allow-overlap":!0,"icon-optional":!1,"icon-size":.2,"text-anchor":"bottom","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-max-width":8,"text-size":["interpolate",["exponential",1.2],["zoom"],7,12,11,14]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_state",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:5,maxzoom:8,filter:["==",["get","class"],"state"],layout:{"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-letter-spacing":.2,"text-max-width":9,"text-size":["interpolate",["linear"],["zoom"],5,10,8,14],"text-transform":"uppercase"},paint:{"text-color":"rgba(17, 17, 17, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_city",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:3,filter:["all",["==",["get","class"],"city"],["!=",["get","capital"],2]],layout:{"icon-allow-overlap":!0,"icon-optional":!1,"icon-size":.4,"text-anchor":"bottom","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-max-width":8,"text-offset":[0,-.1],"text-size":["interpolate",["exponential",1.2],["zoom"],4,11,7,13,11,18]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_city_capital",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:3,filter:["all",["==",["get","class"],"city"],["==",["get","capital"],2]],layout:{"icon-allow-overlap":!0,"icon-optional":!1,"icon-size":.5,"text-anchor":"bottom","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Bold"],"text-max-width":8,"text-offset":[0,-.2],"text-size":["interpolate",["exponential",1.2],["zoom"],4,12,7,14,11,20]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_country_3",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:2,maxzoom:9,filter:["all",["==",["get","class"],"country"],[">=",["get","rank"],3]],layout:{"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Bold"],"text-max-width":6.25,"text-size":["interpolate",["linear"],["zoom"],3,9,7,17]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_country_2",type:"symbol",source:"openmaptiles","source-layer":"place",maxzoom:9,filter:["all",["==",["get","class"],"country"],["==",["get","rank"],2]],layout:{"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Bold"],"text-max-width":6.25,"text-size":["interpolate",["linear"],["zoom"],2,9,5,17]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_country_1",type:"symbol",source:"openmaptiles","source-layer":"place",maxzoom:9,filter:["all",["==",["get","class"],"country"],["==",["get","rank"],1]],layout:{"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Bold"],"text-max-width":6.25,"text-size":["interpolate",["linear"],["zoom"],1,9,4,17]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}}]},No={version:8,sources:{openmaptiles:{type:"vector",url:"https://tiles.openfreemap.org/planet"}},glyphs:"https://tiles.openfreemap.org/fonts/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"rgba(220, 220, 220, 1)"}},{id:"park",type:"fill",source:"openmaptiles","source-layer":"park",filter:["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],paint:{"fill-color":"rgba(228, 228, 228, 1)"}},{id:"water",type:"fill",source:"openmaptiles","source-layer":"water",filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["!=",["get","brunnel"],"tunnel"]],paint:{"fill-antialias":!0,"fill-color":"rgba(156, 156, 156, 1)"}},{id:"landcover_ice_shelf",type:"fill",source:"openmaptiles","source-layer":"landcover",maxzoom:8,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","subclass"],"ice_shelf"]],paint:{"fill-color":"rgba(228, 228, 228, 1)","fill-opacity":.7}},{id:"landcover_glacier",type:"fill",source:"openmaptiles","source-layer":"landcover",maxzoom:8,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","subclass"],"glacier"]],paint:{"fill-color":"rgba(253, 253, 253, 1)","fill-opacity":["interpolate",["linear"],["zoom"],0,1,8,.5]}},{id:"landuse_residential",type:"fill",source:"openmaptiles","source-layer":"landuse",maxzoom:16,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","class"],"residential"]],paint:{"fill-color":"rgba(204, 204, 204, 1)","fill-opacity":["interpolate",["exponential",.6],["zoom"],8,.8,9,.6]}},{id:"landcover_wood",type:"fill",source:"openmaptiles","source-layer":"landcover",minzoom:10,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","class"],"wood"]],paint:{"fill-color":"rgba(228, 228, 228, 1)","fill-opacity":["interpolate",["linear"],["zoom"],8,0,12,1]}},{id:"waterway",type:"line",source:"openmaptiles","source-layer":"waterway",filter:["==",["geometry-type"],"LineString"],paint:{"line-color":"rgba(156, 156, 156, 1)"}},{id:"building",type:"fill",source:"openmaptiles","source-layer":"building",minzoom:12,paint:{"fill-antialias":!0,"fill-color":"rgba(236, 236, 236, 1)","fill-outline-color":"rgba(202, 202, 202, 1)"}},{id:"tunnel_motorway_casing",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","brunnel"],"tunnel"],["==",["get","class"],"motorway"]]],layout:{"line-cap":"butt","line-join":"miter"},paint:{"line-color":"rgb(168, 168, 168)","line-opacity":1,"line-width":["interpolate",["exponential",1.4],["zoom"],5.8,0,6,3,20,40]}},{id:"tunnel_motorway_inner",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","brunnel"],"tunnel"],["==",["get","class"],"motorway"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgb(185, 185, 185)","line-width":["interpolate",["exponential",1.4],["zoom"],4,2,6,1.3,20,30]}},{id:"aeroway-taxiway",type:"line",source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["match",["get","class"],["taxiway"],!0,!1],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(185, 185, 185, 1)","line-opacity":1,"line-width":["interpolate",["exponential",1.55],["zoom"],13,1.8,20,20]}},{id:"aeroway-runway-casing",type:"line",source:"openmaptiles","source-layer":"aeroway",minzoom:11,filter:["match",["get","class"],["runway"],!0,!1],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(185, 185, 185, 1)","line-opacity":1,"line-width":["interpolate",["exponential",1.5],["zoom"],11,6,17,55]}},{id:"aeroway-area",type:"fill",source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["match",["get","class"],["runway","taxiway"],!0,!1]],paint:{"fill-color":"rgba(228, 228, 228, 1)","fill-opacity":["interpolate",["linear"],["zoom"],13,0,14,1]}},{id:"aeroway-runway",type:"line",source:"openmaptiles","source-layer":"aeroway",minzoom:11,filter:["all",["match",["get","class"],["runway"],!0,!1],["==",["geometry-type"],"LineString"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(168, 168, 168, 1)","line-opacity":1,"line-width":["interpolate",["exponential",1.5],["zoom"],11,4,17,50]}},{id:"road_area_pier",type:"fill",source:"openmaptiles","source-layer":"transportation",filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","class"],"pier"]],paint:{"fill-antialias":!0,"fill-color":"rgba(150, 150, 150, 1)"}},{id:"road_pier",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["pier"],!0,!1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(152, 152, 152, 1)","line-width":["interpolate",["exponential",1.2],["zoom"],15,1,17,4]}},{id:"highway_path",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","class"],"path"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgb(188, 188, 188)","line-opacity":.9,"line-width":["interpolate",["exponential",1.2],["zoom"],13,1,20,10]}},{id:"highway_minor",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:8,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["minor","service","track"],!0,!1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(202, 202, 202, 1)","line-opacity":.9,"line-width":["interpolate",["exponential",1.55],["zoom"],13,1.8,20,20]}},{id:"highway_major_casing",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:11,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["primary","secondary","tertiary","trunk"],!0,!1]],layout:{"line-cap":"butt","line-join":"miter"},paint:{"line-color":"rgb(185, 185, 185)","line-dasharray":[12,0],"line-width":["interpolate",["exponential",1.3],["zoom"],10,3,20,23]}},{id:"highway_major_inner",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:11,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["primary","secondary","tertiary","trunk"],!0,!1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(202, 202, 202, 1)","line-width":["interpolate",["exponential",1.3],["zoom"],10,2,20,20]}},{id:"highway_major_subtle",type:"line",source:"openmaptiles","source-layer":"transportation",maxzoom:11,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["primary","secondary","tertiary","trunk"],!0,!1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(185, 185, 185, 1)","line-width":2}},{id:"highway_motorway_casing",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["match",["get","brunnel"],["bridge","tunnel"],!1,!0],["==",["get","class"],"motorway"]]],layout:{"line-cap":"butt","line-join":"miter"},paint:{"line-color":"rgb(168, 168, 168)","line-dasharray":[2,0],"line-opacity":1,"line-width":["interpolate",["exponential",1.4],["zoom"],5.8,0,6,3,20,40]}},{id:"highway_motorway_inner",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["match",["get","brunnel"],["bridge","tunnel"],!1,!0],["==",["get","class"],"motorway"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":["interpolate",["linear"],["zoom"],5.8,"rgba(202, 202, 202, 1)",6,"rgba(185, 185, 185, 1)"],"line-width":["interpolate",["exponential",1.4],["zoom"],4,2,6,1.3,20,30]}},{id:"highway_motorway_subtle",type:"line",source:"openmaptiles","source-layer":"transportation",maxzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["==",["get","class"],"motorway"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(202, 202, 202, 1)","line-width":["interpolate",["exponential",1.4],["zoom"],4,2,6,1.3]}},{id:"railway_transit",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:16,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","class"],"transit"],["match",["get","brunnel"],["tunnel"],!1,!0]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(185, 185, 185, 1)","line-width":3}},{id:"railway_transit_dashline",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:16,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","class"],"transit"],["match",["get","brunnel"],["tunnel"],!1,!0]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(168, 168, 168, 1)","line-dasharray":[3,3],"line-width":2}},{id:"railway_service",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:16,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","class"],"rail"],["has","service"]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(202, 202, 202, 1)","line-width":3}},{id:"railway_service_dashline",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:16,filter:["all",["==",["geometry-type"],"LineString"],["==",["get","class"],"rail"],["has","service"]],layout:{"line-join":"round"},paint:{"line-color":"rgba(185, 185, 185, 1)","line-dasharray":[3,3],"line-width":2}},{id:"railway",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["==",["geometry-type"],"LineString"],["all",["!",["has","service"]],["==",["get","class"],"rail"]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(185, 185, 185, 1)","line-width":["interpolate",["exponential",1.3],["zoom"],16,3,20,7]}},{id:"railway_dashline",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["==",["geometry-type"],"LineString"],["all",["!",["has","service"]],["==",["get","class"],"rail"]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(168, 168, 168, 1)","line-dasharray":[3,3],"line-width":["interpolate",["exponential",1.3],["zoom"],16,2,20,6]}},{id:"highway_motorway_bridge_casing",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","brunnel"],"bridge"],["==",["get","class"],"motorway"]]],layout:{"line-cap":"butt","line-join":"miter"},paint:{"line-color":"rgb(168, 168, 168)","line-dasharray":[2,0],"line-opacity":1,"line-width":["interpolate",["exponential",1.4],["zoom"],5.8,0,6,5,20,45]}},{id:"highway_motorway_bridge_inner",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","brunnel"],"bridge"],["==",["get","class"],"motorway"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":["interpolate",["linear"],["zoom"],5.8,"rgba(202, 202, 202, 1)",6,"rgba(185, 185, 185, 1)"],"line-width":["interpolate",["exponential",1.4],["zoom"],4,2,6,1.3,20,30]}},{id:"boundary_3",type:"line",source:"openmaptiles","source-layer":"boundary",minzoom:8,filter:["all",[">=",["get","admin_level"],3],["<=",["get","admin_level"],6],["!=",["get","maritime"],1],["!=",["get","disputed"],1],["!",["has","claimed_by"]]],paint:{"line-color":"rgba(168, 168, 168, 1)","line-dasharray":[1,1],"line-width":["interpolate",["linear"],["zoom"],7,1,11,2]}},{id:"boundary_2",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["==",["get","admin_level"],2],["!=",["get","maritime"],1],["!=",["get","disputed"],1],["!",["has","claimed_by"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(151, 151, 151, 1)","line-opacity":["interpolate",["linear"],["zoom"],0,.4,4,1],"line-width":["interpolate",["linear"],["zoom"],3,1,5,1.2,12,3]}},{id:"boundary_disputed",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["!=",["get","maritime"],1],["==",["get","disputed"],1]],paint:{"line-color":"rgba(151, 151, 151, 1)","line-dasharray":[1,2],"line-width":["interpolate",["linear"],["zoom"],3,1,5,1.2,12,3]}},{id:"waterway_line_label",type:"symbol",source:"openmaptiles","source-layer":"waterway",minzoom:10,filter:["==",["geometry-type"],"LineString"],layout:{"symbol-placement":"line","symbol-spacing":350,"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-letter-spacing":.2,"text-max-width":5,"text-size":14},paint:{"text-color":"rgba(34, 34, 34, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1.5}},{id:"water_name_point_label",type:"symbol",source:"openmaptiles","source-layer":"water_name",minzoom:0,filter:["==",["geometry-type"],"Point"],layout:{visibility:"none"}},{id:"water_name_line_label",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["==",["geometry-type"],"LineString"],layout:{visibility:"none"}},{id:"highway-name-path",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:15.5,filter:["==",["get","class"],"path"],layout:{"symbol-placement":"line","text-field":["get","name:latin"],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"map","text-size":["interpolate",["linear"],["zoom"],13,12,14,13]},paint:{"text-color":"rgba(158, 158, 158, 1)","text-halo-color":"rgba(244, 244, 244, 1)","text-halo-width":.5}},{id:"highway-name-minor",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:15,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["minor","service","track"],!0,!1]],layout:{"symbol-placement":"line","text-field":["get","name:latin"],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"map","text-size":["interpolate",["linear"],["zoom"],13,12,14,13]},paint:{"text-color":"rgba(17, 17, 17, 1)","text-halo-width":1,"text-halo-color":"rgba(255, 255, 255, 1)"}},{id:"highway-name-major",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:12.2,filter:["match",["get","class"],["primary","secondary","tertiary","trunk"],!0,!1],layout:{"symbol-placement":"line","text-field":["get","name:latin"],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"map","text-size":["interpolate",["linear"],["zoom"],13,12,14,13]},paint:{"text-color":"rgba(34, 34, 34, 1)","text-halo-width":1,"text-halo-color":"rgba(255, 255, 255, 1)"}},{id:"highway-shield-non-us",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:11,filter:["all",["<=",["get","ref_length"],6],["==",["geometry-type"],"LineString"],["match",["get","network"],["us-highway","us-interstate","us-state"],!1,!0]],layout:{"icon-rotation-alignment":"viewport","icon-size":1,"symbol-placement":["step",["zoom"],"point",11,"line"],"symbol-spacing":200,"text-field":["to-string",["get","ref"]],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"viewport","text-size":10},paint:{"text-halo-color":"rgba(0, 0, 0, 1)","text-color":"rgba(0, 0, 0, 1)"}},{id:"highway-shield-us-interstate",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:11,filter:["all",["<=",["get","ref_length"],6],["==",["geometry-type"],"LineString"],["match",["get","network"],["us-interstate"],!0,!1]],layout:{"icon-rotation-alignment":"viewport","icon-size":1,"symbol-placement":["step",["zoom"],"point",7,"line",8,"line"],"symbol-spacing":200,"text-field":["to-string",["get","ref"]],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"viewport","text-size":10}},{id:"road_shield_us",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:12,filter:["all",["<=",["get","ref_length"],6],["==",["geometry-type"],"LineString"],["match",["get","network"],["us-highway","us-state"],!0,!1]],layout:{"icon-rotation-alignment":"viewport","icon-size":1,"symbol-placement":["step",["zoom"],"point",11,"line"],"symbol-spacing":200,"text-field":["to-string",["get","ref"]],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"viewport","text-size":10}},{id:"airport",type:"symbol",source:"openmaptiles","source-layer":"aerodrome_label",minzoom:11,filter:["all",["has","iata"]],layout:{"icon-size":1,"text-anchor":"top","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-max-width":9,"text-offset":[0,.6],"text-optional":!0,"text-padding":2,"text-size":12},paint:{"text-color":"rgba(51, 51, 51, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_other",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:8,filter:["match",["get","class"],["city","continent","country","state","town","village"],!1,!0],layout:{"text-field":["get","name:latin"],"text-font":["Noto Sans Regular"],"text-letter-spacing":.1,"text-max-width":9,"text-size":["interpolate",["linear"],["zoom"],8,9,12,10],"text-transform":"uppercase"},paint:{"text-color":"rgba(17, 17, 17, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_village",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:9,filter:["==",["get","class"],"village"],layout:{"icon-allow-overlap":!0,"icon-optional":!1,"icon-size":.2,"text-anchor":"bottom","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-max-width":8,"text-size":["interpolate",["exponential",1.2],["zoom"],7,10,11,12]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_town",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:6,filter:["==",["get","class"],"town"],layout:{"icon-allow-overlap":!0,"icon-optional":!1,"icon-size":.2,"text-anchor":"bottom","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-max-width":8,"text-size":["interpolate",["exponential",1.2],["zoom"],7,12,11,14]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_state",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:5,maxzoom:8,filter:["==",["get","class"],"state"],layout:{"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-letter-spacing":.2,"text-max-width":9,"text-size":["interpolate",["linear"],["zoom"],5,10,8,14],"text-transform":"uppercase"},paint:{"text-color":"rgba(17, 17, 17, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_city",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:3,filter:["all",["==",["get","class"],"city"],["!=",["get","capital"],2]],layout:{"icon-allow-overlap":!0,"icon-optional":!1,"icon-size":.4,"text-anchor":"bottom","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-max-width":8,"text-offset":[0,-.1],"text-size":["interpolate",["exponential",1.2],["zoom"],4,11,7,13,11,18]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_city_capital",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:3,filter:["all",["==",["get","class"],"city"],["==",["get","capital"],2]],layout:{"icon-allow-overlap":!0,"icon-optional":!1,"icon-size":.5,"text-anchor":"bottom","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Bold"],"text-max-width":8,"text-offset":[0,-.2],"text-size":["interpolate",["exponential",1.2],["zoom"],4,12,7,14,11,20]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_country_3",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:2,maxzoom:9,filter:["all",["==",["get","class"],"country"],[">=",["get","rank"],3]],layout:{"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Bold"],"text-max-width":6.25,"text-size":["interpolate",["linear"],["zoom"],3,9,7,17]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_country_2",type:"symbol",source:"openmaptiles","source-layer":"place",maxzoom:9,filter:["all",["==",["get","class"],"country"],["==",["get","rank"],2]],layout:{"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Bold"],"text-max-width":6.25,"text-size":["interpolate",["linear"],["zoom"],2,9,5,17]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_country_1",type:"symbol",source:"openmaptiles","source-layer":"place",maxzoom:9,filter:["all",["==",["get","class"],"country"],["==",["get","rank"],1]],layout:{"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Bold"],"text-max-width":6.25,"text-size":["interpolate",["linear"],["zoom"],1,9,4,17]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}}]},hr=class hr{constructor(e,t,n){d(this,"parameters",hr.Parameters);d(this,"MapClass");d(this,"MapMarkerClass");d(this,"map");this.MapClass=e,this.MapMarkerClass=t,this.map=new this.MapClass({...n,projection:"mercator",pitchWithRotate:!1,customAttribution:n.customAttribution??"@arenarium/maps"}),this.map.dragRotate.disable(),this.map.keyboard.disable(),this.map.touchZoomRotate.disableRotation(),this.map.touchPitch.disable()}getMap(){return this.map}getContainer(){return this.map.getContainer()}getZoom(){return this.map.getZoom()}getBounds(){const e=this.map.getBounds();if(!e)return{sw:{lat:0,lng:0},ne:{lat:0,lng:0}};const t=e.getSouthWest(),n=e.getNorthEast();return{sw:t,ne:n}}panBy(e,t){this.map.panBy([e,t])}createMarker(e,t,n){const a=new this.MapMarkerClass({element:e});return a.setLngLat([n,t]),{instance:a,inserted:()=>a._map!=null,insert:()=>a.addTo(this.map),remove:()=>a.remove(),update:i=>a.getElement().style.zIndex=i.toString()}}};d(hr,"Parameters",{mapSize:512,zoomMin:0,zoomMax:24,zoomScale:10});let ln=hr;const mr=class mr{constructor(e,t,n,a){d(this,"parameters",mr.Parameters);d(this,"MapClass");d(this,"MapMarkerClass");d(this,"map");this.MapClass=e,this.MapMarkerClass=t,this.map=new this.MapClass(n,{...a})}getMap(){return this.map}getContainer(){return this.map.getDiv()}getZoom(){return this.map.getZoom()??NaN}getBounds(){const e=this.map.getBounds();if(e==null)return{sw:{lat:NaN,lng:NaN},ne:{lat:NaN,lng:NaN}};const t=e.getSouthWest(),n=e.getNorthEast();return{sw:{lat:t.lat(),lng:t.lng()},ne:{lat:n.lat(),lng:n.lng()}}}panBy(e,t){this.map.panBy(e,t)}createMarker(e,t,n,a){const i=new this.MapMarkerClass({position:{lat:t,lng:n},content:e,zIndex:a});return{instance:i,inserted:()=>i.map!=null&&i.map==this.map,insert:()=>i.map=this.map,remove:()=>i.map=void 0,update:o=>i.zIndex=o}}};d(mr,"Parameters",{mapSize:256,zoomMin:0,zoomMax:22,zoomScale:10});let cn=mr;const To=[{elementType:"labels.icon",stylers:[{visibility:"off"}]},{stylers:[{saturation:-100},{lightness:-10}]},{featureType:"landscape",stylers:[{lightness:30}]},{featureType:"road",elementType:"geometry",stylers:[{saturation:-100}]}],Ro=[{elementType:"labels.icon",stylers:[{visibility:"off"}]},{stylers:[{saturation:-100}]},{elementType:"geometry",stylers:[{lightness:-45}]},{elementType:"labels.text.fill",stylers:[{lightness:-100}]},{elementType:"labels.text.stroke",stylers:[{lightness:-15}]},{featureType:"water",elementType:"geometry",stylers:[{lightness:-50}]}];R.GoogleMapDarkStyle=Ro,R.GoogleMapLightStyle=To,R.GoogleMapsProvider=cn,R.MapManager=Mo,R.MapboxProvider=ln,R.MaplibreDarkStyle=Co,R.MaplibreLightStyle=No,R.MaplibreProvider=sn,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})});