@arenarium/maps 1.0.199 → 1.0.202
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/README.md +10 -28
- package/dist/index.d.ts +0 -8
- package/dist/index.js +2 -2
- package/dist/main.cjs.js +2 -2
- package/dist/main.d.ts +0 -8
- package/dist/main.es.js +510 -512
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(S,N){typeof exports=="object"&&typeof module<"u"?N(exports):typeof define=="function"&&define.amd?define(["exports"],N):(S=typeof globalThis<"u"?globalThis:S||self,N(S.arenarium={}))})(this,function(S){"use strict";var Ps=Object.defineProperty;var gn=S=>{throw TypeError(S)};var Os=(S,N,O)=>N in S?Ps(S,N,{enumerable:!0,configurable:!0,writable:!0,value:O}):S[N]=O;var p=(S,N,O)=>Os(S,typeof N!="symbol"?N+"":N,O),Gr=(S,N,O)=>N.has(S)||gn("Cannot "+O);var w=(S,N,O)=>(Gr(S,N,"read from private field"),O?O.call(S):N.get(S)),F=(S,N,O)=>N.has(S)?gn("Cannot add the same private member more than once"):N instanceof WeakSet?N.add(S):N.set(S,O),V=(S,N,O,Nt)=>(Gr(S,N,"write to private field"),Nt?Nt.call(S,O):N.set(S,O),O),De=(S,N,O)=>(Gr(S,N,"access private method"),O);var rt,at,Ee,St,zt,je,nt,Ie,Ce,it,Mt,Et,oe,vn,er,Xr,cn,he,st,Ct,Ze;var O=Array.isArray,Nt=Array.prototype.indexOf,_n=Array.from,tr=Object.defineProperty,ct=Object.getOwnPropertyDescriptor,xn=Object.prototype,wn=Array.prototype,bn=Object.getPrototypeOf,Jr=Object.isExtensible;function kn(r){for(var e=0;e<r.length;e++)r[e]()}function Sn(){var r,e,t=new Promise((a,n)=>{r=a,e=n});return{promise:t,resolve:r,reject:e}}const X=2,rr=4,Kr=8,Lt=16,ye=32,Te=64,Qr=128,Q=256,Rt=512,H=1024,le=2048,ge=4096,Fe=8192,Be=16384,ar=32768,zn=65536,ea=1<<17,Mn=1<<18,nr=1<<19,ta=1<<20,ir=1<<21,sr=1<<22,Ae=1<<23,Pt=Symbol("$state"),or=new class extends Error{constructor(){super(...arguments);p(this,"name","StaleReactionError");p(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function En(){throw new Error("https://svelte.dev/e/await_outside_boundary")}function Cn(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Tn(r){throw new Error("https://svelte.dev/e/effect_in_teardown")}function An(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Nn(r){throw new Error("https://svelte.dev/e/effect_orphan")}function Ln(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Rn(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Pn(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function On(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}const jn=2,B=Symbol();function ra(r){return r===this.v}let js=!1,ie=null;function Ot(r){ie=r}function lr(r,e=!1,t){ie={p:ie,c:null,e:null,s:r,x:null,l:null}}function ur(r){var e=ie,t=e.e;if(t!==null){e.e=null;for(var a of t)_a(a)}return r!==void 0&&(e.x=r),ie=e.p,r??{}}function aa(){return!0}const In=new WeakMap;function Zn(r){var e=T;if(e===null)return z.f|=Ae,r;if((e.f&ar)===0){if((e.f&Qr)===0)throw!e.parent&&r instanceof Error&&na(r),r;e.b.error(r)}else cr(r,e)}function cr(r,e){for(;e!==null;){if((e.f&Qr)!==0)try{e.b.error(r);return}catch(t){r=t}e=e.parent}throw r instanceof Error&&na(r),r}function na(r){const e=In.get(r);e&&(tr(r,"message",{value:e.message}),tr(r,"stack",{value:e.stack}))}let jt=[];function Dn(){var r=jt;jt=[],kn(r)}function Fn(r){jt.length===0&&queueMicrotask(Dn),jt.push(r)}function Bn(){for(var r=T.b;r!==null&&!r.has_pending_snippet();)r=r.parent;return r===null&&En(),r}function Vn(r){var e=X|le,t=z!==null&&(z.f&X)!==0?z:null;return T===null||t!==null&&(t.f&Q)!==0?e|=Q:T.f|=nr,{ctx:ie,deps:null,effects:null,equals:ra,f:e,fn:r,reactions:null,rv:0,v:B,wv:0,parent:t??T,ac:null}}function Un(r,e){let t=T;t===null&&Cn();var a=t.b,n=void 0,i=da(B),s=null,o=!z;return ri(()=>{try{var l=r()}catch(y){l=Promise.reject(y)}var u=()=>l;n=(s==null?void 0:s.then(u,u))??Promise.resolve(l),s=n;var c=D,f=a.pending;o&&(a.update_pending_count(1),f||c.increment());const h=(y,b=void 0)=>{s=null,f||c.activate(),b?b!==or&&(i.f|=Ae,hr(i,b)):((i.f&Ae)!==0&&(i.f^=Ae),hr(i,y)),o&&(a.update_pending_count(-1),f||c.decrement()),oa()};if(n.then(h,y=>h(null,y||"unknown")),c)return()=>{queueMicrotask(()=>c.neuter())}}),new Promise(l=>{function u(c){function f(){c===n?l(i):u(n)}c.then(f,f)}u(n)})}function ia(r){var e=r.effects;if(e!==null){r.effects=null;for(var t=0;t<e.length;t+=1)Re(e[t])}}function qn(r){for(var e=r.parent;e!==null;){if((e.f&X)===0)return e;e=e.parent}return null}function dr(r){var e,t=T;$e(qn(r));try{ia(r),e=La(r)}finally{$e(t)}return e}function sa(r){var e=dr(r);if(r.equals(e)||(r.v=e,r.wv=Aa()),!qe)if(ve!==null)ve.set(r,r.v);else{var t=(xe||(r.f&Q)!==0)&&r.deps!==null?ge:H;te(r,t)}}function $n(r,e,t){const a=Vn;if(e.length===0){t(r.map(a));return}var n=D,i=T,s=Wn(),o=Bn();Promise.all(e.map(l=>Un(l))).then(l=>{n==null||n.activate(),s();try{t([...r.map(a),...l])}catch(u){(i.f&Be)===0&&cr(u,i)}n==null||n.deactivate(),oa()}).catch(l=>{o.error(l)})}function Wn(){var r=T,e=z,t=ie;return function(){$e(r),_e(e),Ot(t)}}function oa(){$e(null),_e(null),Ot(null)}const dt=new Set;let D=null,ve=null,la=new Set,It=[];function ua(){const r=It.shift();It.length>0&&queueMicrotask(ua),r()}let pt=[],pr=null,fr=!1;const Yt=class Yt{constructor(){F(this,oe);p(this,"current",new Map);F(this,rt,new Map);F(this,at,new Set);F(this,Ee,0);F(this,St,null);F(this,zt,!1);F(this,je,[]);F(this,nt,[]);F(this,Ie,[]);F(this,Ce,[]);F(this,it,[]);F(this,Mt,[]);F(this,Et,[]);p(this,"skipped_effects",new Set)}process(e){var i;pt=[];var t=null;if(dt.size>1){t=new Map,ve=new Map;for(const[s,o]of this.current)t.set(s,{v:s.v,wv:s.wv}),s.v=o;for(const s of dt)if(s!==this)for(const[o,l]of w(s,rt))t.has(o)||(t.set(o,{v:o.v,wv:o.wv}),o.v=l)}for(const s of e)De(this,oe,vn).call(this,s);if(w(this,je).length===0&&w(this,Ee)===0){De(this,oe,Xr).call(this);var a=w(this,Ie),n=w(this,Ce);V(this,Ie,[]),V(this,Ce,[]),V(this,it,[]),D=null,ca(a),ca(n),D===null?D=this:dt.delete(this),(i=w(this,St))==null||i.resolve()}else De(this,oe,er).call(this,w(this,Ie)),De(this,oe,er).call(this,w(this,Ce)),De(this,oe,er).call(this,w(this,it));if(t){for(const[s,{v:o,wv:l}]of t)s.wv<=l&&(s.v=o);ve=null}for(const s of w(this,je))yt(s);for(const s of w(this,nt))yt(s);V(this,je,[]),V(this,nt,[])}capture(e,t){w(this,rt).has(e)||w(this,rt).set(e,t),this.current.set(e,e.v)}activate(){D=this}deactivate(){D=null;for(const e of la)if(la.delete(e),e(),D!==null)break}neuter(){V(this,zt,!0)}flush(){pt.length>0?Hn():De(this,oe,Xr).call(this),D===this&&(w(this,Ee)===0&&dt.delete(this),this.deactivate())}increment(){V(this,Ee,w(this,Ee)+1)}decrement(){if(V(this,Ee,w(this,Ee)-1),w(this,Ee)===0){for(const e of w(this,Mt))te(e,le),Ve(e);for(const e of w(this,Et))te(e,ge),Ve(e);V(this,Ie,[]),V(this,Ce,[]),this.flush()}else this.deactivate()}add_callback(e){w(this,at).add(e)}settled(){return(w(this,St)??V(this,St,Sn())).promise}static ensure(){if(D===null){const e=D=new Yt;dt.add(D),Yt.enqueue(()=>{D===e&&e.flush()})}return D}static enqueue(e){It.length===0&&queueMicrotask(ua),It.unshift(e)}};rt=new WeakMap,at=new WeakMap,Ee=new WeakMap,St=new WeakMap,zt=new WeakMap,je=new WeakMap,nt=new WeakMap,Ie=new WeakMap,Ce=new WeakMap,it=new WeakMap,Mt=new WeakMap,Et=new WeakMap,oe=new WeakSet,vn=function(e){var c;e.f^=H;for(var t=e.first;t!==null;){var a=t.f,n=(a&(ye|Te))!==0,i=n&&(a&H)!==0,s=i||(a&Fe)!==0||this.skipped_effects.has(t);if(!s&&t.fn!==null){if(n)t.f^=H;else if((a&H)===0)if((a&rr)!==0)w(this,Ce).push(t);else if((a&sr)!==0){var o=(c=t.b)!=null&&c.pending?w(this,nt):w(this,je);o.push(t)}else Zt(t)&&((t.f&Lt)!==0&&w(this,it).push(t),yt(t));var l=t.first;if(l!==null){t=l;continue}}var u=t.parent;for(t=t.next;t===null&&u!==null;)t=u.next,u=u.parent}},er=function(e){for(const t of e)((t.f&le)!==0?w(this,Mt):w(this,Et)).push(t),te(t,H);e.length=0},Xr=function(){if(!w(this,zt))for(const e of w(this,at))e();w(this,at).clear()};let ft=Yt;function Hn(){var r=Ue;fr=!0;try{var e=0;for(Ma(!0);pt.length>0;){var t=ft.ensure();if(e++>1e3){var a,n;Yn()}t.process(pt),Ne.clear()}}finally{fr=!1,Ma(r),pr=null}}function Yn(){try{Ln()}catch(r){cr(r,pr)}}function ca(r){var e=r.length;if(e!==0){for(var t=0;t<e;){var a=r[t++];if((a.f&(Be|Fe))===0&&Zt(a)){var n=D?D.current.size:0;if(yt(a),a.deps===null&&a.first===null&&a.nodes_start===null&&(a.teardown===null&&a.ac===null?Sa(a):a.fn=null),D!==null&&D.current.size>n&&(a.f&ta)!==0)break}}for(;t<e;)Ve(r[t++])}}function Ve(r){for(var e=pr=r;e.parent!==null;){e=e.parent;var t=e.f;if(fr&&e===T&&(t&Lt)!==0)return;if((t&(Te|ye))!==0){if((t&H)===0)return;e.f^=H}}pt.push(e)}const Ne=new Map;function da(r,e){var t={f:0,v:r,reactions:null,equals:ra,rv:0,wv:0};return t}function Y(r,e){const t=da(r);return li(t),t}function U(r,e,t=!1){z!==null&&(!ue||(z.f&ea)!==0)&&aa()&&(z.f&(X|Lt|sr|ea))!==0&&!(q!=null&&q.includes(r))&&On();let a=t?ht(e):e;return hr(r,a)}function hr(r,e){if(!r.equals(e)){var t=r.v;qe?Ne.set(r,e):Ne.set(r,t),r.v=e;var a=ft.ensure();a.capture(r,t),(r.f&X)!==0&&((r.f&le)!==0&&dr(r),te(r,(r.f&Q)===0?H:ge)),r.wv=Aa(),pa(r,le),T!==null&&(T.f&H)!==0&&(T.f&(ye|Te))===0&&(ee===null?ui([r]):ee.push(r))}return e}function mr(r){U(r,r.v+1)}function pa(r,e){var t=r.reactions;if(t!==null)for(var a=t.length,n=0;n<a;n++){var i=t[n],s=i.f,o=(s&le)===0;o&&te(i,e),(s&X)!==0?pa(i,ge):o&&Ve(i)}}function ht(r){if(typeof r!="object"||r===null||Pt in r)return r;const e=bn(r);if(e!==xn&&e!==wn)return r;var t=new Map,a=O(r),n=Y(0),i=Pe,s=o=>{if(Pe===i)return o();var l=z,u=Pe;_e(null),Ta(i);var c=o();return _e(l),Ta(u),c};return a&&t.set("length",Y(r.length)),new Proxy(r,{defineProperty(o,l,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&Rn();var c=t.get(l);return c===void 0?c=s(()=>{var f=Y(u.value);return t.set(l,f),f}):U(c,u.value,!0),!0},deleteProperty(o,l){var u=t.get(l);if(u===void 0){if(l in o){const c=s(()=>Y(B));t.set(l,c),mr(n)}}else U(u,B),mr(n);return!0},get(o,l,u){var y;if(l===Pt)return r;var c=t.get(l),f=l in o;if(c===void 0&&(!f||(y=ct(o,l))!=null&&y.writable)&&(c=s(()=>{var b=ht(f?o[l]:B),R=Y(b);return R}),t.set(l,c)),c!==void 0){var h=j(c);return h===B?void 0:h}return Reflect.get(o,l,u)},getOwnPropertyDescriptor(o,l){var u=Reflect.getOwnPropertyDescriptor(o,l);if(u&&"value"in u){var c=t.get(l);c&&(u.value=j(c))}else if(u===void 0){var f=t.get(l),h=f==null?void 0:f.v;if(f!==void 0&&h!==B)return{enumerable:!0,configurable:!0,value:h,writable:!0}}return u},has(o,l){var h;if(l===Pt)return!0;var u=t.get(l),c=u!==void 0&&u.v!==B||Reflect.has(o,l);if(u!==void 0||T!==null&&(!c||(h=ct(o,l))!=null&&h.writable)){u===void 0&&(u=s(()=>{var y=c?ht(o[l]):B,b=Y(y);return b}),t.set(l,u));var f=j(u);if(f===B)return!1}return c},set(o,l,u,c){var W;var f=t.get(l),h=l in o;if(a&&l==="length")for(var y=u;y<f.v;y+=1){var b=t.get(y+"");b!==void 0?U(b,B):y in o&&(b=s(()=>Y(B)),t.set(y+"",b))}if(f===void 0)(!h||(W=ct(o,l))!=null&&W.writable)&&(f=s(()=>Y(void 0)),U(f,ht(u)),t.set(l,f));else{h=f.v!==B;var R=s(()=>ht(u));U(f,R)}var P=Reflect.getOwnPropertyDescriptor(o,l);if(P!=null&&P.set&&P.set.call(c,u),!h){if(a&&typeof l=="string"){var ae=t.get("length"),C=Number(l);Number.isInteger(C)&&C>=ae.v&&U(ae,C+1)}mr(n)}return!0},ownKeys(o){j(n);var l=Reflect.ownKeys(o).filter(f=>{var h=t.get(f);return h===void 0||h.v!==B});for(var[u,c]of t)c.v!==B&&!(u in o)&&l.push(u);return l},setPrototypeOf(){Pn()}})}var fa,ha,ma,ya;function Gn(){if(fa===void 0){fa=window,ha=/Firefox/.test(navigator.userAgent);var r=Element.prototype,e=Node.prototype,t=Text.prototype;ma=ct(e,"firstChild").get,ya=ct(e,"nextSibling").get,Jr(r)&&(r.__click=void 0,r.__className=void 0,r.__attributes=null,r.__style=void 0,r.__e=void 0),Jr(t)&&(t.__t=void 0)}}function Xn(r=""){return document.createTextNode(r)}function ga(r){return ma.call(r)}function va(r){return ya.call(r)}function yr(r,e){return ga(r)}function Jn(r,e=1,t=!1){let a=r;for(;e--;)a=va(a);return a}function Kn(r){T===null&&z===null&&Nn(),z!==null&&(z.f&Q)!==0&&T===null&&An(),qe&&Tn()}function Qn(r,e){var t=e.last;t===null?e.last=e.first=r:(t.next=r,r.prev=t,e.last=r)}function Le(r,e,t,a=!0){var n=T;n!==null&&(n.f&Fe)!==0&&(r|=Fe);var i={ctx:ie,deps:null,nodes_start:null,nodes_end:null,f:r|le,first:null,fn:e,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(t)try{yt(i),i.f|=ar}catch(l){throw Re(i),l}else e!==null&&Ve(i);var s=t&&i.deps===null&&i.first===null&&i.nodes_start===null&&i.teardown===null&&(i.f&nr)===0;if(!s&&a&&(n!==null&&Qn(i,n),z!==null&&(z.f&X)!==0&&(r&Te)===0)){var o=z;(o.effects??(o.effects=[])).push(i)}return i}function pe(r){Kn();var e=T.f,t=!z&&(e&ye)!==0&&(e&ar)===0;if(t){var a=ie;(a.e??(a.e=[])).push(r)}else return _a(r)}function _a(r){return Le(rr|ta,r,!1)}function ei(r){ft.ensure();const e=Le(Te,r,!0);return(t={})=>new Promise(a=>{t.outro?si(e,()=>{Re(e),a(void 0)}):(Re(e),a(void 0))})}function ti(r){return Le(rr,r,!1)}function ri(r){return Le(sr|nr,r,!0)}function xa(r,e=0){return Le(Kr|e,r,!0)}function wa(r,e=[],t=[]){$n(e,t,a=>{Le(Kr,()=>r(...a.map(j)),!0)})}function ai(r,e=!0){return Le(ye,r,!0,e)}function ba(r){var e=r.teardown;if(e!==null){const t=qe,a=z;Ea(!0),_e(null);try{e.call(null)}finally{Ea(t),_e(a)}}}function ka(r,e=!1){var n;var t=r.first;for(r.first=r.last=null;t!==null;){(n=t.ac)==null||n.abort(or);var a=t.next;(t.f&Te)!==0?t.parent=null:Re(t,e),t=a}}function ni(r){for(var e=r.first;e!==null;){var t=e.next;(e.f&ye)===0&&Re(e),e=t}}function Re(r,e=!0){var t=!1;(e||(r.f&Mn)!==0)&&r.nodes_start!==null&&r.nodes_end!==null&&(ii(r.nodes_start,r.nodes_end),t=!0),ka(r,e&&!t),Dt(r,0),te(r,Be);var a=r.transitions;if(a!==null)for(const i of a)i.stop();ba(r);var n=r.parent;n!==null&&n.first!==null&&Sa(r),r.next=r.prev=r.teardown=r.ctx=r.deps=r.fn=r.nodes_start=r.nodes_end=r.ac=null}function ii(r,e){for(;r!==null;){var t=r===e?null:va(r);r.remove(),r=t}}function Sa(r){var e=r.parent,t=r.prev,a=r.next;t!==null&&(t.next=a),a!==null&&(a.prev=t),e!==null&&(e.first===r&&(e.first=a),e.last===r&&(e.last=t))}function si(r,e){var t=[];za(r,t,!0),oi(t,()=>{Re(r),e&&e()})}function oi(r,e){var t=r.length;if(t>0){var a=()=>--t||e();for(var n of r)n.out(a)}else e()}function za(r,e,t){if((r.f&Fe)===0){if(r.f^=Fe,r.transitions!==null)for(const s of r.transitions)(s.is_global||t)&&e.push(s);for(var a=r.first;a!==null;){var n=a.next,i=(a.f&zn)!==0||(a.f&ye)!==0;za(a,e,i?t:!1),a=n}}}let Ue=!1;function Ma(r){Ue=r}let qe=!1;function Ea(r){qe=r}let z=null,ue=!1;function _e(r){z=r}let T=null;function $e(r){T=r}let q=null;function li(r){z!==null&&(q===null?q=[r]:q.push(r))}let $=null,J=0,ee=null;function ui(r){ee=r}let Ca=1,mt=0,Pe=mt;function Ta(r){Pe=r}let xe=!1;function Aa(){return++Ca}function Zt(r){var f;var e=r.f;if((e&le)!==0)return!0;if((e&ge)!==0){var t=r.deps,a=(e&Q)!==0;if(t!==null){var n,i,s=(e&Rt)!==0,o=a&&T!==null&&!xe,l=t.length;if((s||o)&&(T===null||(T.f&Be)===0)){var u=r,c=u.parent;for(n=0;n<l;n++)i=t[n],(s||!((f=i==null?void 0:i.reactions)!=null&&f.includes(u)))&&(i.reactions??(i.reactions=[])).push(u);s&&(u.f^=Rt),o&&c!==null&&(c.f&Q)===0&&(u.f^=Q)}for(n=0;n<l;n++)if(i=t[n],Zt(i)&&sa(i),i.wv>r.wv)return!0}(!a||T!==null&&!xe)&&te(r,H)}return!1}function Na(r,e,t=!0){var a=r.reactions;if(a!==null&&!(q!=null&&q.includes(r)))for(var n=0;n<a.length;n++){var i=a[n];(i.f&X)!==0?Na(i,e,!1):e===i&&(t?te(i,le):(i.f&H)!==0&&te(i,ge),Ve(i))}}function La(r){var b;var e=$,t=J,a=ee,n=z,i=xe,s=q,o=ie,l=ue,u=Pe,c=r.f;$=null,J=0,ee=null,xe=(c&Q)!==0&&(ue||!Ue||z===null),z=(c&(ye|Te))===0?r:null,q=null,Ot(r.ctx),ue=!1,Pe=++mt,r.ac!==null&&(r.ac.abort(or),r.ac=null);try{r.f|=ir;var f=(0,r.fn)(),h=r.deps;if($!==null){var y;if(Dt(r,J),h!==null&&J>0)for(h.length=J+$.length,y=0;y<$.length;y++)h[J+y]=$[y];else r.deps=h=$;if(!xe||(c&X)!==0&&r.reactions!==null)for(y=J;y<h.length;y++)((b=h[y]).reactions??(b.reactions=[])).push(r)}else h!==null&&J<h.length&&(Dt(r,J),h.length=J);if(aa()&&ee!==null&&!ue&&h!==null&&(r.f&(X|ge|le))===0)for(y=0;y<ee.length;y++)Na(ee[y],r);return n!==null&&n!==r&&(mt++,ee!==null&&(a===null?a=ee:a.push(...ee))),(r.f&Ae)!==0&&(r.f^=Ae),f}catch(R){return Zn(R)}finally{r.f^=ir,$=e,J=t,ee=a,z=n,xe=i,q=s,Ot(o),ue=l,Pe=u}}function ci(r,e){let t=e.reactions;if(t!==null){var a=Nt.call(t,r);if(a!==-1){var n=t.length-1;n===0?t=e.reactions=null:(t[a]=t[n],t.pop())}}t===null&&(e.f&X)!==0&&($===null||!$.includes(e))&&(te(e,ge),(e.f&(Q|Rt))===0&&(e.f^=Rt),ia(e),Dt(e,0))}function Dt(r,e){var t=r.deps;if(t!==null)for(var a=e;a<t.length;a++)ci(r,t[a])}function yt(r){var e=r.f;if((e&Be)===0){te(r,H);var t=T,a=Ue;T=r,Ue=!0;try{(e&Lt)!==0?ni(r):ka(r),ba(r);var n=La(r);r.teardown=typeof n=="function"?n:null,r.wv=Ca;var i}finally{Ue=a,T=t}}}function j(r){var e=r.f,t=(e&X)!==0;if(z!==null&&!ue){var a=T!==null&&(T.f&Be)!==0;if(!a&&!(q!=null&&q.includes(r))){var n=z.deps;if((z.f&ir)!==0)r.rv<mt&&(r.rv=mt,$===null&&n!==null&&n[J]===r?J++:$===null?$=[r]:(!xe||!$.includes(r))&&$.push(r));else{(z.deps??(z.deps=[])).push(r);var i=r.reactions;i===null?r.reactions=[z]:i.includes(z)||i.push(z)}}}else if(t&&r.deps===null&&r.effects===null){var s=r,o=s.parent;o!==null&&(o.f&Q)===0&&(s.f^=Q)}if(qe){if(Ne.has(r))return Ne.get(r);if(t){s=r;var l=s.v;return((s.f&H)===0&&s.reactions!==null||Ra(s))&&(l=dr(s)),Ne.set(s,l),l}}else if(t){if(s=r,ve!=null&&ve.has(s))return ve.get(s);Zt(s)&&sa(s)}if((r.f&Ae)!==0)throw r.v;return r.v}function Ra(r){if(r.v===B)return!0;if(r.deps===null)return!1;for(const e of r.deps)if(Ne.has(e)||(e.f&X)!==0&&Ra(e))return!0;return!1}function di(r){var e=ue;try{return ue=!0,r()}finally{ue=e}}const pi=-7169;function te(r,e){r.f=r.f&pi|e}const fi=["touchstart","touchmove"];function hi(r){return fi.includes(r)}const mi=new Set,Pa=new Set;function Ft(r){var C;var e=this,t=e.ownerDocument,a=r.type,n=((C=r.composedPath)==null?void 0:C.call(r))||[],i=n[0]||r.target,s=0,o=r.__root;if(o){var l=n.indexOf(o);if(l!==-1&&(e===document||e===window)){r.__root=e;return}var u=n.indexOf(e);if(u===-1)return;l<=u&&(s=l)}if(i=n[s]||r.target,i!==e){tr(r,"currentTarget",{configurable:!0,get(){return i||t}});var c=z,f=T;_e(null),$e(null);try{for(var h,y=[];i!==null;){var b=i.assignedSlot||i.parentNode||i.host||null;try{var R=i["__"+a];if(R!=null&&(!i.disabled||r.target===i))if(O(R)){var[P,...ae]=R;P.apply(i,[r,...ae])}else R.call(i,r)}catch(W){h?y.push(W):h=W}if(r.cancelBubble||b===e||b===null)break;i=b}if(h){for(let W of y)queueMicrotask(()=>{throw W});throw h}}finally{r.__root=e,delete r.currentTarget,_e(c),$e(f)}}}function yi(r){var e=document.createElement("template");return e.innerHTML=r.replaceAll("<!>","<!---->"),e.content}function gi(r,e){var t=T;t.nodes_start===null&&(t.nodes_start=r,t.nodes_end=e)}function Oa(r,e){var t=(e&jn)!==0,a,n=!r.startsWith("<!>");return()=>{a===void 0&&(a=yi(n?r:"<!>"+r),a=ga(a));var i=t||ha?document.importNode(a,!0):a.cloneNode(!0);return gi(i,i),i}}function ja(r,e){r!==null&&r.before(e)}function gr(r,e){return vi(r,e)}const We=new Map;function vi(r,{target:e,anchor:t,props:a={},events:n,context:i,intro:s=!0}){Gn();var o=new Set,l=f=>{for(var h=0;h<f.length;h++){var y=f[h];if(!o.has(y)){o.add(y);var b=hi(y);e.addEventListener(y,Ft,{passive:b});var R=We.get(y);R===void 0?(document.addEventListener(y,Ft,{passive:b}),We.set(y,1)):We.set(y,R+1)}}};l(_n(mi)),Pa.add(l);var u=void 0,c=ei(()=>{var f=t??e.appendChild(Xn());return ai(()=>{if(i){lr({});var h=ie;h.c=i}n&&(a.$$events=n),u=r(f,a)||{},i&&ur()}),()=>{var b;for(var h of o){e.removeEventListener(h,Ft);var y=We.get(h);--y===0?(document.removeEventListener(h,Ft),We.delete(h)):We.set(h,y)}Pa.delete(l),f!==t&&((b=f.parentNode)==null||b.removeChild(f))}});return _i.set(u,c),u}let _i=new WeakMap;const Ia=[...`
|
|
2
|
-
\r\f \v\uFEFF`];function xi(r,e,t){var a=r==null?"":""+r;if(t){for(var n in t)if(t[n])a=a?a+" "+n:n;else if(a.length)for(var i=n.length,s=0;(s=a.indexOf(n,s))>=0;){var o=s+i;(s===0||Ia.includes(a[s-1]))&&(o===a.length||Ia.includes(a[o]))?a=(s===0?"":a.substring(0,s))+a.substring(o+1):s=o}}return a===""?null:a}function Za(r,e=!1){var t=e?" !important;":";",a="";for(var n in r){var i=r[n];i!=null&&i!==""&&(a+=" "+n+": "+i+t)}return a}function vr(r){return r[0]!=="-"||r[1]!=="-"?r.toLowerCase():r}function wi(r,e){if(e){var t="",a,n;if(Array.isArray(e)?(a=e[0],n=e[1]):a=e,r){r=String(r).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var i=!1,s=0,o=!1,l=[];a&&l.push(...Object.keys(a).map(vr)),n&&l.push(...Object.keys(n).map(vr));var u=0,c=-1;const R=r.length;for(var f=0;f<R;f++){var h=r[f];if(o?h==="/"&&r[f-1]==="*"&&(o=!1):i?i===h&&(i=!1):h==="/"&&r[f+1]==="*"?o=!0:h==='"'||h==="'"?i=h:h==="("?s++:h===")"&&s--,!o&&i===!1&&s===0){if(h===":"&&c===-1)c=f;else if(h===";"||f===R-1){if(c!==-1){var y=vr(r.substring(u,c).trim());if(!l.includes(y)){h!==";"&&f++;var b=r.substring(u,f).trim();t+=" "+b+";"}}u=f+1,c=-1}}}}return a&&(t+=Za(a)),n&&(t+=Za(n,!0)),t=t.trim(),t===""?null:t}return r==null?null:String(r)}function Da(r,e,t,a,n,i){var s=r.__className;if(s!==t||s===void 0){var o=xi(t,a,i);o==null?r.removeAttribute("class"):r.className=o,r.__className=t}else if(i&&n!==i)for(var l in i){var u=!!i[l];(n==null||u!==!!n[l])&&r.classList.toggle(l,u)}return i}function _r(r,e={},t,a){for(var n in t){var i=t[n];e[n]!==i&&(t[n]==null?r.style.removeProperty(n):r.style.setProperty(n,i,a))}}function Bt(r,e,t,a){var n=r.__style;if(n!==e){var i=wi(e,a);i==null?r.removeAttribute("style"):r.style.cssText=i,r.__style=e}else a&&(Array.isArray(a)?(_r(r,t==null?void 0:t[0],a[0]),_r(r,t==null?void 0:t[1],a[1],"important")):_r(r,t,a));return a}const bi=()=>performance.now(),ce={tick:r=>requestAnimationFrame(r),now:()=>bi(),tasks:new Set};function Fa(){const r=ce.now();ce.tasks.forEach(e=>{e.c(r)||(ce.tasks.delete(e),e.f())}),ce.tasks.size!==0&&ce.tick(Fa)}function ki(r){let e;return ce.tasks.size===0&&ce.tick(Fa),{promise:new Promise(t=>{ce.tasks.add(e={c:r,f:t})}),abort(){ce.tasks.delete(e)}}}function Ba(r,e){return r===e||(r==null?void 0:r[Pt])===e}function He(r={},e,t,a){return ti(()=>{var n,i;return xa(()=>{n=i,i=[],di(()=>{r!==t(...i)&&(e(r,...i),n&&Ba(t(...n),r)&&e(null,...n))})}),()=>{Fn(()=>{i&&Ba(t(...i),r)&&e(null,...i)})}}),r}const Si="5";typeof window<"u"&&((cn=window.__svelte??(window.__svelte={})).v??(cn.v=new Set)).add(Si);function zi(r){return r}function xr(r){return-.5*(Math.cos(Math.PI*r)-1)}function Mi(r){const e=Math.cos(r*Math.PI*.5);return Math.abs(e)<1e-14?1:1-e}function Ei(r){return Math.sin(r*Math.PI/2)}const Ci=128,Ti=0,Ai=1,Ni=2;class Li{constructor(){p(this,"animationsStarted",!1);p(this,"animationsCount",0);p(this,"animationsLimit",Ci);p(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 a=t.animations;if(a!=null)for(let n=0;n<a.length;n++){const i=a[n];if(i!=null){for(const s of i.values())if(!s.executed&&(s.executed=!0,s.function(),this.animationsCount++,this.animationsCount==this.animationsLimit))return}}}}catch{}finally{window.requestAnimationFrame(this.tick.bind(this))}}equeue(e,t,a,n){let i=this.layers[e];i==null&&(i=this.layers[e]={animations:new Array});let s=i.animations[t];s==null&&(s=i.animations[t]=new Map);let o={id:a,priority:t,executed:!1,function:n};s.set(a,o),this.animationsStarted==!1&&(this.animationsStarted=!0,this.start())}clear(e,t){for(let a=0;a<this.layers.length;a++){let n=this.layers[a];if(n==null)continue;let i=n.animations[e];if(i==null)return;let s=i.get(t);if(s==null||s.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 we=new Li;function Va(r){return Object.prototype.toString.call(r)==="[object Date]"}function wr(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 a=e.map((n,i)=>wr(r[i],n));return n=>a.map(i=>i(n))}if(t==="object"){if(!r||!e)throw new Error("Object cannot be null");if(Va(r)&&Va(e)){const i=r.getTime(),o=e.getTime()-i;return l=>new Date(i+l*o)}const a=Object.keys(e),n={};return a.forEach(i=>{n[i]=wr(r[i],e[i])}),i=>{const s={};return a.forEach(o=>{s[o]=n[o](i)}),s}}if(t==="number"){const a=e-r;return n=>r+n*a}return()=>e}const $r=class $r{constructor(e,t={}){F(this,he);F(this,st);F(this,Ct);F(this,Ze,null);V(this,he,Y(e)),V(this,st,Y(e)),V(this,Ct,t)}static of(e,t){const a=new $r(e(),t);return xa(()=>{a.set(e())}),a}set(e,t){var f;U(w(this,st),e);let{delay:a=0,duration:n=400,easing:i=zi,interpolate:s=wr}={...w(this,Ct),...t};if(n===0)return(f=w(this,Ze))==null||f.abort(),U(w(this,he),e),Promise.resolve();const o=ce.now()+a;let l,u=!1,c=w(this,Ze);return V(this,Ze,ki(h=>{if(h<o)return!0;if(!u){u=!0;const b=w(this,he).v;l=s(b,e),typeof n=="function"&&(n=n(b,e)),c==null||c.abort()}const y=h-o;return y>n?(U(w(this,he),e),!1):(U(w(this,he),l(i(y/n))),!0)})),w(this,Ze).promise}get current(){return j(w(this,he))}get target(){return j(w(this,st))}set target(e){this.set(e)}};he=new WeakMap,st=new WeakMap,Ct=new WeakMap,Ze=new WeakMap;let br=$r;class Vt{constructor(e,t){p(this,"value");p(this,"motion");this.value=e,this.motion=new br(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 Ri=Oa('<div><div class="body svelte-1nfn9j8"></div></div>');function Pi(r,e){lr(e,!0);let t,a;function n(){return a}let i=Y(!1);function s(C){U(i,C,!0)}function o(){return j(i)}let l=new Vt(0,{easing:xr});pe(()=>{u(l.motion.current)}),pe(()=>{j(i)==!1&&(l.snap(),we.clear(e.priority,e.id))});function u(C){t&&we.equeue(e.layer,e.priority,e.id,()=>{t.style.scale=C.toString(),t.style.filter=`brightness(${.25+.75*C})`,a.style.opacity=C.toString()})}function c(C){C!=l.value&&l.set(C,{duration:75})}function f(){return l.motion.current==0}function h(){return l.value}var y=Ri();let b,R;var P=yr(y);let ae;return He(P,C=>a=C,()=>a),He(y,C=>t=C,()=>t),wa((C,W,ne)=>{b=Da(y,1,"pin svelte-1nfn9j8",null,b,C),R=Bt(y,"",R,W),ae=Bt(P,"",ae,ne)},[()=>({displayed:j(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`})]),ja(r,y),ur({getBody:n,setDisplayed:s,getDisplayed:o,setScale:c,getCollapsed:f,getScale:h})}var gt;(r=>{function e(t,a,n){const i=t/2,s=a/2,o=Math.sqrt(i*i+s*s),l=Math.atan(s/i)*(180/Math.PI),u=n*(Math.PI/180);return n<180?n<90?n<l?{x:0,y:o*Math.sin(u)-s}:{x:o*Math.cos(u)-i,y:0}:n<180-l?{x:o*Math.cos(u)-i,y:0}:{x:-t,y:o*Math.sin(u)-s}:n<270?n<180+l?{x:-t,y:o*Math.sin(u)-s}:{x:o*Math.cos(u)-i,y:-a}:n<360-l?{x:o*Math.cos(u)-i,y:-a}:{x:0,y:o*Math.sin(u)-s}}r.getOffsets=e})(gt||(gt={}));var Oi=Oa('<div><div class="pointer svelte-j5igi2"></div> <div class="bubble svelte-j5igi2"><div class="body svelte-j5igi2"></div></div></div>');function Ua(r,e){lr(e,!0);let t,a,n,i;const s=e.width+2*e.margin,o=e.height+2*e.margin,l=()=>i;pe(()=>{n.style.width=`${e.margin*4}px`,n.style.height=`${e.margin*4}px`});let u=Y(!0);function c(L){U(u,L,!0)}function f(){return j(u)}let h=Y(!0);function y(L){U(h,L,!0)}function b(){return P.motion.current==0}function R(){return P.motion.current==1}let P=new Vt(0);pe(()=>{ae(P.motion.current)}),pe(()=>{j(u)==!1&&(P.snap(),we.clear(e.priority,e.id+"_scale"))}),pe(()=>{j(h)==!0&&P.value!=0&&(we.stacked()?P.set(0,{duration:0}):P.set(0,{duration:150,easing:Mi})),j(h)==!1&&P.value!=1&&P.set(1,{duration:150,easing:Ei})});function ae(L){!t||!a||!n||we.equeue(j(h)?0:e.layer,e.priority,e.id+"_scale",()=>{t.style.opacity=`${L}`,a.style.scale=`${L}`,n.style.scale=`${L}`})}let C=NaN,W=Y(!1),ne=new Vt(-s/2,{easing:xr}),Jt=new Vt(-o/2,{easing:xr});pe(()=>{dn(ne.motion.current,Jt.motion.current)}),pe(()=>{j(u)==!1&&(ne.snap(),ne.snap(),we.clear(e.priority,e.id+"_angle"))}),pe(()=>{j(h)==!0&&j(W)&&(ne.update({duration:75}),ne.update({duration:75}))});function dn(L,me){if(!t||!a||!n)return;const Qt=L+s/2,Tt=me+o/2,ut=o<s?Qt*o/s:Qt,Hr=o>s?Tt*s/o:Tt,Ts=Math.atan2(Hr,ut)/Math.PI*180-45,mn=0,As=30,Yr=Math.sqrt(ut*ut+Hr*Hr),At=Math.min(s,o)/2,Ns=At*Math.SQRT2,Ls=(Yr-At)/(Ns-At),yn=mn+Ls*(As-mn),Rs=Yr<At?Yr/At:1;we.equeue(e.layer,e.priority,e.id+"_angle",()=>{a.style.transform=`translate(${Math.round(L)}px, ${Math.round(me)}px)`,n.style.transform=`scale(${Rs}) rotate(${Ts}deg) skew(${yn}deg, ${yn}deg)`})}function Es(L){if(j(W)==!1){let me=gt.getOffsets(s,o,L);ne.set(Math.round(me.x),{duration:0}),Jt.set(Math.round(me.y),{duration:0}),dn(ne.value,Jt.value),C=L,U(W,!0)}else if(L!=C){let me=Math.abs(L-C),Qt=me<180?me:360-me,Tt=Math.log(Qt)*75,ut=gt.getOffsets(s,o,L);ne.set(Math.round(ut.x),{duration:Tt}),Jt.set(Math.round(ut.y),{duration:Tt}),C=L}}function Cs(){return gt.getOffsets(s,o,C)}var Kt=Oi();let pn;var fn=yr(Kt);He(fn,L=>n=L,()=>n);var Wr=Jn(fn,2),hn=yr(Wr);return He(hn,L=>i=L,()=>i),He(Wr,L=>a=L,()=>a),He(Kt,L=>t=L,()=>t),wa(L=>{pn=Da(Kt,1,"anchor svelte-j5igi2",null,pn,L),Bt(Wr,`margin: ${e.margin}px;`),Bt(hn,`width: ${e.width}px; height: ${e.height}px; border-radius: ${e.radius}px;`)},[()=>({displayed:j(u)})]),ja(r,Kt),ur({getBody:l,setDisplayed:c,getDisplayed:f,setCollapsed:y,getCollapsed:b,getExpanded:R,setAngle:Es,getOffsets:Cs})}var Ye;(r=>{function e(o,l,u){return{x:a(l)*u,y:n(o)*u}}r.project=e;function t(o,l,u){return{lat:s(l/u),lng:i(o/u)}}r.unproject=t;function a(o){return(180+o)/360}function n(o){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+o*Math.PI/360)))/360}function i(o){return o*360-180}function s(o){return 360/Math.PI*Math.atan(Math.exp((180-o*360)*Math.PI/180))-90}})(Ye||(Ye={}));class qa{constructor(e,t,a,n,i){p(this,"swLat");p(this,"swLng");p(this,"neLat");p(this,"neLng");const s=a*Math.pow(2,t),o=Ye.project(e.sw.lat,e.sw.lng,s),l=Ye.project(e.ne.lat,e.ne.lng,s),u=o.x-n,c=o.y+i,f=l.x+n,h=l.y-i,y=Ye.unproject(u,c,s),b=Ye.unproject(f,h,s);this.swLat=y.lat,this.swLng=y.lng,this.neLat=b.lat,this.neLng=b.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 E;(function(r){r.assertEqual=n=>{};function e(n){}r.assertIs=e;function t(n){throw new Error}r.assertNever=t,r.arrayToEnum=n=>{const i={};for(const s of n)i[s]=s;return i},r.getValidEnumValues=n=>{const i=r.objectKeys(n).filter(o=>typeof n[n[o]]!="number"),s={};for(const o of i)s[o]=n[o];return r.objectValues(s)},r.objectValues=n=>r.objectKeys(n).map(function(i){return n[i]}),r.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{const i=[];for(const s in n)Object.prototype.hasOwnProperty.call(n,s)&&i.push(s);return i},r.find=(n,i)=>{for(const s of n)if(i(s))return s},r.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function a(n,i=" | "){return n.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}r.joinValues=a,r.jsonStringifyReplacer=(n,i)=>typeof i=="bigint"?i.toString():i})(E||(E={}));var $a;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})($a||($a={}));const g=E.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),be=r=>{switch(typeof r){case"undefined":return g.undefined;case"string":return g.string;case"number":return Number.isNaN(r)?g.nan:g.number;case"boolean":return g.boolean;case"function":return g.function;case"bigint":return g.bigint;case"symbol":return g.symbol;case"object":return Array.isArray(r)?g.array:r===null?g.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?g.promise:typeof Map<"u"&&r instanceof Map?g.map:typeof Set<"u"&&r instanceof Set?g.set:typeof Date<"u"&&r instanceof Date?g.date:g.object;default:return g.unknown}},d=E.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 re extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=a=>{this.issues=[...this.issues,a]},this.addIssues=(a=[])=>{this.issues=[...this.issues,...a]};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},a={_errors:[]},n=i=>{for(const s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(n);else if(s.code==="invalid_return_type")n(s.returnTypeError);else if(s.code==="invalid_arguments")n(s.argumentsError);else if(s.path.length===0)a._errors.push(t(s));else{let o=a,l=0;for(;l<s.path.length;){const u=s.path[l];l===s.path.length-1?(o[u]=o[u]||{_errors:[]},o[u]._errors.push(t(s))):o[u]=o[u]||{_errors:[]},o=o[u],l++}}};return n(this),a}static assert(e){if(!(e instanceof re))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,E.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},a=[];for(const n of this.issues)if(n.path.length>0){const i=n.path[0];t[i]=t[i]||[],t[i].push(e(n))}else a.push(e(n));return{formErrors:a,fieldErrors:t}}get formErrors(){return this.flatten()}}re.create=r=>new re(r);const vt=(r,e)=>{let t;switch(r.code){case d.invalid_type:r.received===g.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case d.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,E.jsonStringifyReplacer)}`;break;case d.unrecognized_keys:t=`Unrecognized key(s) in object: ${E.joinValues(r.keys,", ")}`;break;case d.invalid_union:t="Invalid input";break;case d.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${E.joinValues(r.options)}`;break;case d.invalid_enum_value:t=`Invalid enum value. Expected ${E.joinValues(r.options)}, received '${r.received}'`;break;case d.invalid_arguments:t="Invalid function arguments";break;case d.invalid_return_type:t="Invalid function return type";break;case d.invalid_date:t="Invalid date";break;case d.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}"`:E.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case d.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 d.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 d.custom:t="Invalid input";break;case d.invalid_intersection_types:t="Intersection results could not be merged";break;case d.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;case d.not_finite:t="Number must be finite";break;default:t=e.defaultError,E.assertNever(r)}return{message:t}};let ji=vt;function kr(){return ji}const Sr=r=>{const{data:e,path:t,errorMaps:a,issueData:n}=r,i=[...t,...n.path||[]],s={...n,path:i};if(n.message!==void 0)return{...n,path:i,message:n.message};let o="";const l=a.filter(u=>!!u).slice().reverse();for(const u of l)o=u(s,{data:e,defaultError:o}).message;return{...n,path:i,message:o}};function m(r,e){const t=kr(),a=Sr({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t,t===vt?void 0:vt].filter(n=>!!n)});r.common.issues.push(a)}class K{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const a=[];for(const n of t){if(n.status==="aborted")return _;n.status==="dirty"&&e.dirty(),a.push(n.value)}return{status:e.value,value:a}}static async mergeObjectAsync(e,t){const a=[];for(const n of t){const i=await n.key,s=await n.value;a.push({key:i,value:s})}return K.mergeObjectSync(e,a)}static mergeObjectSync(e,t){const a={};for(const n of t){const{key:i,value:s}=n;if(i.status==="aborted"||s.status==="aborted")return _;i.status==="dirty"&&e.dirty(),s.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||n.alwaysSet)&&(a[i.value]=s.value)}return{status:e.value,value:a}}}const _=Object.freeze({status:"aborted"}),_t=r=>({status:"dirty",value:r}),G=r=>({status:"valid",value:r}),Wa=r=>r.status==="aborted",Ha=r=>r.status==="dirty",Ge=r=>r.status==="valid",Ut=r=>typeof Promise<"u"&&r instanceof Promise;var v;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(v||(v={}));class ke{constructor(e,t,a,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=a,this._key=n}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 Ya=(r,e)=>{if(Ge(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 re(r.common.issues);return this._error=t,this._error}}};function k(r){if(!r)return{};const{errorMap:e,invalid_type_error:t,required_error:a,description:n}=r;if(e&&(t||a))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(s,o)=>{const{message:l}=r;return s.code==="invalid_enum_value"?{message:l??o.defaultError}:typeof o.data>"u"?{message:l??a??o.defaultError}:s.code!=="invalid_type"?{message:o.defaultError}:{message:l??t??o.defaultError}},description:n}}class M{get description(){return this._def.description}_getType(e){return be(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:be(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new K,ctx:{common:e.parent.common,data:e.data,parsedType:be(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(Ut(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 a=this.safeParse(e,t);if(a.success)return a.data;throw a.error}safeParse(e,t){const a={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:be(e)},n=this._parseSync({data:e,path:a.path,parent:a});return Ya(a,n)}"~validate"(e){var a,n;const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:be(e)};if(!this["~standard"].async)try{const i=this._parseSync({data:e,path:[],parent:t});return Ge(i)?{value:i.value}:{issues:t.common.issues}}catch(i){(n=(a=i==null?void 0:i.message)==null?void 0:a.toLowerCase())!=null&&n.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(i=>Ge(i)?{value:i.value}:{issues:t.common.issues})}async parseAsync(e,t){const a=await this.safeParseAsync(e,t);if(a.success)return a.data;throw a.error}async safeParseAsync(e,t){const a={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:be(e)},n=this._parse({data:e,path:a.path,parent:a}),i=await(Ut(n)?n:Promise.resolve(n));return Ya(a,i)}refine(e,t){const a=n=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(n):t;return this._refinement((n,i)=>{const s=e(n),o=()=>i.addIssue({code:d.custom,...a(n)});return typeof Promise<"u"&&s instanceof Promise?s.then(l=>l?!0:(o(),!1)):s?!0:(o(),!1)})}refinement(e,t){return this._refinement((a,n)=>e(a)?!0:(n.addIssue(typeof t=="function"?t(a,n):t),!1))}_refinement(e){return new et({schema:this,typeName:x.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 Me.create(this,this._def)}nullable(){return tt.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return de.create(this)}promise(){return kt.create(this,this._def)}or(e){return $t.create([this,e],this._def)}and(e){return Wt.create(this,e,this._def)}transform(e){return new et({...k(this._def),schema:this,typeName:x.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new Ar({...k(this._def),innerType:this,defaultValue:t,typeName:x.ZodDefault})}brand(){return new is({typeName:x.ZodBranded,type:this,...k(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new Nr({...k(this._def),innerType:this,catchValue:t,typeName:x.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return Lr.create(this,e)}readonly(){return Rr.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Ii=/^c[^\s-]{8,}$/i,Zi=/^[0-9a-z]+$/,Di=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Fi=/^[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,Bi=/^[a-z0-9_-]{21}$/i,Vi=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Ui=/^[-+]?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)?)??$/,qi=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,$i="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let zr;const Wi=/^(?:(?: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])$/,Hi=/^(?:(?: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])$/,Yi=/^(([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]))$/,Gi=/^(([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])$/,Xi=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Ji=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Ga="((\\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])))",Ki=new RegExp(`^${Ga}$`);function Xa(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 Qi(r){return new RegExp(`^${Xa(r)}$`)}function es(r){let e=`${Ga}T${Xa(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 ts(r,e){return!!((e==="v4"||!e)&&Wi.test(r)||(e==="v6"||!e)&&Yi.test(r))}function rs(r,e){if(!Vi.test(r))return!1;try{const[t]=r.split(".");if(!t)return!1;const a=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),n=JSON.parse(atob(a));return!(typeof n!="object"||n===null||"typ"in n&&(n==null?void 0:n.typ)!=="JWT"||!n.alg||e&&n.alg!==e)}catch{return!1}}function as(r,e){return!!((e==="v4"||!e)&&Hi.test(r)||(e==="v6"||!e)&&Gi.test(r))}class Se extends M{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==g.string){const i=this._getOrReturnCtx(e);return m(i,{code:d.invalid_type,expected:g.string,received:i.parsedType}),_}const a=new K;let n;for(const i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(n=this._getOrReturnCtx(e,n),m(n,{code:d.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),a.dirty());else if(i.kind==="max")e.data.length>i.value&&(n=this._getOrReturnCtx(e,n),m(n,{code:d.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),a.dirty());else if(i.kind==="length"){const s=e.data.length>i.value,o=e.data.length<i.value;(s||o)&&(n=this._getOrReturnCtx(e,n),s?m(n,{code:d.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):o&&m(n,{code:d.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),a.dirty())}else if(i.kind==="email")qi.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"email",code:d.invalid_string,message:i.message}),a.dirty());else if(i.kind==="emoji")zr||(zr=new RegExp($i,"u")),zr.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"emoji",code:d.invalid_string,message:i.message}),a.dirty());else if(i.kind==="uuid")Fi.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"uuid",code:d.invalid_string,message:i.message}),a.dirty());else if(i.kind==="nanoid")Bi.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"nanoid",code:d.invalid_string,message:i.message}),a.dirty());else if(i.kind==="cuid")Ii.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"cuid",code:d.invalid_string,message:i.message}),a.dirty());else if(i.kind==="cuid2")Zi.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"cuid2",code:d.invalid_string,message:i.message}),a.dirty());else if(i.kind==="ulid")Di.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"ulid",code:d.invalid_string,message:i.message}),a.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),m(n,{validation:"url",code:d.invalid_string,message:i.message}),a.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"regex",code:d.invalid_string,message:i.message}),a.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(n=this._getOrReturnCtx(e,n),m(n,{code:d.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),a.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)||(n=this._getOrReturnCtx(e,n),m(n,{code:d.invalid_string,validation:{startsWith:i.value},message:i.message}),a.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(n=this._getOrReturnCtx(e,n),m(n,{code:d.invalid_string,validation:{endsWith:i.value},message:i.message}),a.dirty()):i.kind==="datetime"?es(i).test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{code:d.invalid_string,validation:"datetime",message:i.message}),a.dirty()):i.kind==="date"?Ki.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{code:d.invalid_string,validation:"date",message:i.message}),a.dirty()):i.kind==="time"?Qi(i).test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{code:d.invalid_string,validation:"time",message:i.message}),a.dirty()):i.kind==="duration"?Ui.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"duration",code:d.invalid_string,message:i.message}),a.dirty()):i.kind==="ip"?ts(e.data,i.version)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"ip",code:d.invalid_string,message:i.message}),a.dirty()):i.kind==="jwt"?rs(e.data,i.alg)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"jwt",code:d.invalid_string,message:i.message}),a.dirty()):i.kind==="cidr"?as(e.data,i.version)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"cidr",code:d.invalid_string,message:i.message}),a.dirty()):i.kind==="base64"?Xi.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"base64",code:d.invalid_string,message:i.message}),a.dirty()):i.kind==="base64url"?Ji.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"base64url",code:d.invalid_string,message:i.message}),a.dirty()):E.assertNever(i);return{status:a.value,value:e.data}}_regex(e,t,a){return this.refinement(n=>e.test(n),{validation:t,code:d.invalid_string,...v.errToObj(a)})}_addCheck(e){return new Se({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...v.errToObj(e)})}url(e){return this._addCheck({kind:"url",...v.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...v.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...v.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...v.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...v.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...v.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...v.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...v.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...v.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...v.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...v.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...v.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,...v.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,...v.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...v.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...v.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...v.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...v.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...v.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...v.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...v.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...v.errToObj(t)})}nonempty(e){return this.min(1,v.errToObj(e))}trim(){return new Se({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Se({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Se({...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}}Se.create=r=>new Se({checks:[],typeName:x.ZodString,coerce:(r==null?void 0:r.coerce)??!1,...k(r)});function ns(r,e){const t=(r.toString().split(".")[1]||"").length,a=(e.toString().split(".")[1]||"").length,n=t>a?t:a,i=Number.parseInt(r.toFixed(n).replace(".","")),s=Number.parseInt(e.toFixed(n).replace(".",""));return i%s/10**n}class Xe extends M{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)!==g.number){const i=this._getOrReturnCtx(e);return m(i,{code:d.invalid_type,expected:g.number,received:i.parsedType}),_}let a;const n=new K;for(const i of this._def.checks)i.kind==="int"?E.isInteger(e.data)||(a=this._getOrReturnCtx(e,a),m(a,{code:d.invalid_type,expected:"integer",received:"float",message:i.message}),n.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(a=this._getOrReturnCtx(e,a),m(a,{code:d.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(a=this._getOrReturnCtx(e,a),m(a,{code:d.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind==="multipleOf"?ns(e.data,i.value)!==0&&(a=this._getOrReturnCtx(e,a),m(a,{code:d.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(a=this._getOrReturnCtx(e,a),m(a,{code:d.not_finite,message:i.message}),n.dirty()):E.assertNever(i);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,v.toString(t))}gt(e,t){return this.setLimit("min",e,!1,v.toString(t))}lte(e,t){return this.setLimit("max",e,!0,v.toString(t))}lt(e,t){return this.setLimit("max",e,!1,v.toString(t))}setLimit(e,t,a,n){return new Xe({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:v.toString(n)}]})}_addCheck(e){return new Xe({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:v.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:v.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:v.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:v.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:v.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:v.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:v.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:v.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:v.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"&&E.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const a of this._def.checks){if(a.kind==="finite"||a.kind==="int"||a.kind==="multipleOf")return!0;a.kind==="min"?(t===null||a.value>t)&&(t=a.value):a.kind==="max"&&(e===null||a.value<e)&&(e=a.value)}return Number.isFinite(t)&&Number.isFinite(e)}}Xe.create=r=>new Xe({checks:[],typeName:x.ZodNumber,coerce:(r==null?void 0:r.coerce)||!1,...k(r)});class xt extends M{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)!==g.bigint)return this._getInvalidInput(e);let a;const n=new K;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(a=this._getOrReturnCtx(e,a),m(a,{code:d.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(a=this._getOrReturnCtx(e,a),m(a,{code:d.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(a=this._getOrReturnCtx(e,a),m(a,{code:d.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):E.assertNever(i);return{status:n.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return m(t,{code:d.invalid_type,expected:g.bigint,received:t.parsedType}),_}gte(e,t){return this.setLimit("min",e,!0,v.toString(t))}gt(e,t){return this.setLimit("min",e,!1,v.toString(t))}lte(e,t){return this.setLimit("max",e,!0,v.toString(t))}lt(e,t){return this.setLimit("max",e,!1,v.toString(t))}setLimit(e,t,a,n){return new xt({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:v.toString(n)}]})}_addCheck(e){return new xt({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:v.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:v.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:v.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:v.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:v.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}}xt.create=r=>new xt({checks:[],typeName:x.ZodBigInt,coerce:(r==null?void 0:r.coerce)??!1,...k(r)});class Mr extends M{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==g.boolean){const a=this._getOrReturnCtx(e);return m(a,{code:d.invalid_type,expected:g.boolean,received:a.parsedType}),_}return G(e.data)}}Mr.create=r=>new Mr({typeName:x.ZodBoolean,coerce:(r==null?void 0:r.coerce)||!1,...k(r)});class qt extends M{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==g.date){const i=this._getOrReturnCtx(e);return m(i,{code:d.invalid_type,expected:g.date,received:i.parsedType}),_}if(Number.isNaN(e.data.getTime())){const i=this._getOrReturnCtx(e);return m(i,{code:d.invalid_date}),_}const a=new K;let n;for(const i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(n=this._getOrReturnCtx(e,n),m(n,{code:d.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),a.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(n=this._getOrReturnCtx(e,n),m(n,{code:d.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),a.dirty()):E.assertNever(i);return{status:a.value,value:new Date(e.data.getTime())}}_addCheck(e){return new qt({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:v.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:v.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}}qt.create=r=>new qt({checks:[],coerce:(r==null?void 0:r.coerce)||!1,typeName:x.ZodDate,...k(r)});class Ja extends M{_parse(e){if(this._getType(e)!==g.symbol){const a=this._getOrReturnCtx(e);return m(a,{code:d.invalid_type,expected:g.symbol,received:a.parsedType}),_}return G(e.data)}}Ja.create=r=>new Ja({typeName:x.ZodSymbol,...k(r)});class Ka extends M{_parse(e){if(this._getType(e)!==g.undefined){const a=this._getOrReturnCtx(e);return m(a,{code:d.invalid_type,expected:g.undefined,received:a.parsedType}),_}return G(e.data)}}Ka.create=r=>new Ka({typeName:x.ZodUndefined,...k(r)});class Qa extends M{_parse(e){if(this._getType(e)!==g.null){const a=this._getOrReturnCtx(e);return m(a,{code:d.invalid_type,expected:g.null,received:a.parsedType}),_}return G(e.data)}}Qa.create=r=>new Qa({typeName:x.ZodNull,...k(r)});class Er extends M{constructor(){super(...arguments),this._any=!0}_parse(e){return G(e.data)}}Er.create=r=>new Er({typeName:x.ZodAny,...k(r)});class Je extends M{constructor(){super(...arguments),this._unknown=!0}_parse(e){return G(e.data)}}Je.create=r=>new Je({typeName:x.ZodUnknown,...k(r)});class ze extends M{_parse(e){const t=this._getOrReturnCtx(e);return m(t,{code:d.invalid_type,expected:g.never,received:t.parsedType}),_}}ze.create=r=>new ze({typeName:x.ZodNever,...k(r)});class Cr extends M{_parse(e){if(this._getType(e)!==g.undefined){const a=this._getOrReturnCtx(e);return m(a,{code:d.invalid_type,expected:g.void,received:a.parsedType}),_}return G(e.data)}}Cr.create=r=>new Cr({typeName:x.ZodVoid,...k(r)});class de extends M{_parse(e){const{ctx:t,status:a}=this._processInputParams(e),n=this._def;if(t.parsedType!==g.array)return m(t,{code:d.invalid_type,expected:g.array,received:t.parsedType}),_;if(n.exactLength!==null){const s=t.data.length>n.exactLength.value,o=t.data.length<n.exactLength.value;(s||o)&&(m(t,{code:s?d.too_big:d.too_small,minimum:o?n.exactLength.value:void 0,maximum:s?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),a.dirty())}if(n.minLength!==null&&t.data.length<n.minLength.value&&(m(t,{code:d.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),a.dirty()),n.maxLength!==null&&t.data.length>n.maxLength.value&&(m(t,{code:d.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),a.dirty()),t.common.async)return Promise.all([...t.data].map((s,o)=>n.type._parseAsync(new ke(t,s,t.path,o)))).then(s=>K.mergeArray(a,s));const i=[...t.data].map((s,o)=>n.type._parseSync(new ke(t,s,t.path,o)));return K.mergeArray(a,i)}get element(){return this._def.type}min(e,t){return new de({...this._def,minLength:{value:e,message:v.toString(t)}})}max(e,t){return new de({...this._def,maxLength:{value:e,message:v.toString(t)}})}length(e,t){return new de({...this._def,exactLength:{value:e,message:v.toString(t)}})}nonempty(e){return this.min(1,e)}}de.create=(r,e)=>new de({type:r,minLength:null,maxLength:null,exactLength:null,typeName:x.ZodArray,...k(e)});function Ke(r){if(r instanceof I){const e={};for(const t in r.shape){const a=r.shape[t];e[t]=Me.create(Ke(a))}return new I({...r._def,shape:()=>e})}else return r instanceof de?new de({...r._def,type:Ke(r.element)}):r instanceof Me?Me.create(Ke(r.unwrap())):r instanceof tt?tt.create(Ke(r.unwrap())):r instanceof fe?fe.create(r.items.map(e=>Ke(e))):r}class I extends M{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=E.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==g.object){const u=this._getOrReturnCtx(e);return m(u,{code:d.invalid_type,expected:g.object,received:u.parsedType}),_}const{status:a,ctx:n}=this._processInputParams(e),{shape:i,keys:s}=this._getCached(),o=[];if(!(this._def.catchall instanceof ze&&this._def.unknownKeys==="strip"))for(const u in n.data)s.includes(u)||o.push(u);const l=[];for(const u of s){const c=i[u],f=n.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new ke(n,f,n.path,u)),alwaysSet:u in n.data})}if(this._def.catchall instanceof ze){const u=this._def.unknownKeys;if(u==="passthrough")for(const c of o)l.push({key:{status:"valid",value:c},value:{status:"valid",value:n.data[c]}});else if(u==="strict")o.length>0&&(m(n,{code:d.unrecognized_keys,keys:o}),a.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const c of o){const f=n.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new ke(n,f,n.path,c)),alwaysSet:c in n.data})}}return n.common.async?Promise.resolve().then(async()=>{const u=[];for(const c of l){const f=await c.key,h=await c.value;u.push({key:f,value:h,alwaysSet:c.alwaysSet})}return u}).then(u=>K.mergeObjectSync(a,u)):K.mergeObjectSync(a,l)}get shape(){return this._def.shape()}strict(e){return v.errToObj,new I({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,a)=>{var i,s;const n=((s=(i=this._def).errorMap)==null?void 0:s.call(i,t,a).message)??a.defaultError;return t.code==="unrecognized_keys"?{message:v.errToObj(e).message??n}:{message:n}}}:{}})}strip(){return new I({...this._def,unknownKeys:"strip"})}passthrough(){return new I({...this._def,unknownKeys:"passthrough"})}extend(e){return new I({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new I({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:x.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new I({...this._def,catchall:e})}pick(e){const t={};for(const a of E.objectKeys(e))e[a]&&this.shape[a]&&(t[a]=this.shape[a]);return new I({...this._def,shape:()=>t})}omit(e){const t={};for(const a of E.objectKeys(this.shape))e[a]||(t[a]=this.shape[a]);return new I({...this._def,shape:()=>t})}deepPartial(){return Ke(this)}partial(e){const t={};for(const a of E.objectKeys(this.shape)){const n=this.shape[a];e&&!e[a]?t[a]=n:t[a]=n.optional()}return new I({...this._def,shape:()=>t})}required(e){const t={};for(const a of E.objectKeys(this.shape))if(e&&!e[a])t[a]=this.shape[a];else{let i=this.shape[a];for(;i instanceof Me;)i=i._def.innerType;t[a]=i}return new I({...this._def,shape:()=>t})}keyof(){return an(E.objectKeys(this.shape))}}I.create=(r,e)=>new I({shape:()=>r,unknownKeys:"strip",catchall:ze.create(),typeName:x.ZodObject,...k(e)}),I.strictCreate=(r,e)=>new I({shape:()=>r,unknownKeys:"strict",catchall:ze.create(),typeName:x.ZodObject,...k(e)}),I.lazycreate=(r,e)=>new I({shape:r,unknownKeys:"strip",catchall:ze.create(),typeName:x.ZodObject,...k(e)});class $t extends M{_parse(e){const{ctx:t}=this._processInputParams(e),a=this._def.options;function n(i){for(const o of i)if(o.result.status==="valid")return o.result;for(const o of i)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;const s=i.map(o=>new re(o.ctx.common.issues));return m(t,{code:d.invalid_union,unionErrors:s}),_}if(t.common.async)return Promise.all(a.map(async i=>{const s={...t,common:{...t.common,issues:[]},parent:null};return{result:await i._parseAsync({data:t.data,path:t.path,parent:s}),ctx:s}})).then(n);{let i;const s=[];for(const l of a){const u={...t,common:{...t.common,issues:[]},parent:null},c=l._parseSync({data:t.data,path:t.path,parent:u});if(c.status==="valid")return c;c.status==="dirty"&&!i&&(i={result:c,ctx:u}),u.common.issues.length&&s.push(u.common.issues)}if(i)return t.common.issues.push(...i.ctx.common.issues),i.result;const o=s.map(l=>new re(l));return m(t,{code:d.invalid_union,unionErrors:o}),_}}get options(){return this._def.options}}$t.create=(r,e)=>new $t({options:r,typeName:x.ZodUnion,...k(e)});function Tr(r,e){const t=be(r),a=be(e);if(r===e)return{valid:!0,data:r};if(t===g.object&&a===g.object){const n=E.objectKeys(e),i=E.objectKeys(r).filter(o=>n.indexOf(o)!==-1),s={...r,...e};for(const o of i){const l=Tr(r[o],e[o]);if(!l.valid)return{valid:!1};s[o]=l.data}return{valid:!0,data:s}}else if(t===g.array&&a===g.array){if(r.length!==e.length)return{valid:!1};const n=[];for(let i=0;i<r.length;i++){const s=r[i],o=e[i],l=Tr(s,o);if(!l.valid)return{valid:!1};n.push(l.data)}return{valid:!0,data:n}}else return t===g.date&&a===g.date&&+r==+e?{valid:!0,data:r}:{valid:!1}}class Wt extends M{_parse(e){const{status:t,ctx:a}=this._processInputParams(e),n=(i,s)=>{if(Wa(i)||Wa(s))return _;const o=Tr(i.value,s.value);return o.valid?((Ha(i)||Ha(s))&&t.dirty(),{status:t.value,value:o.data}):(m(a,{code:d.invalid_intersection_types}),_)};return a.common.async?Promise.all([this._def.left._parseAsync({data:a.data,path:a.path,parent:a}),this._def.right._parseAsync({data:a.data,path:a.path,parent:a})]).then(([i,s])=>n(i,s)):n(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}}Wt.create=(r,e,t)=>new Wt({left:r,right:e,typeName:x.ZodIntersection,...k(t)});class fe extends M{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==g.array)return m(a,{code:d.invalid_type,expected:g.array,received:a.parsedType}),_;if(a.data.length<this._def.items.length)return m(a,{code:d.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),_;!this._def.rest&&a.data.length>this._def.items.length&&(m(a,{code:d.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const i=[...a.data].map((s,o)=>{const l=this._def.items[o]||this._def.rest;return l?l._parse(new ke(a,s,a.path,o)):null}).filter(s=>!!s);return a.common.async?Promise.all(i).then(s=>K.mergeArray(t,s)):K.mergeArray(t,i)}get items(){return this._def.items}rest(e){return new fe({...this._def,rest:e})}}fe.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new fe({items:r,typeName:x.ZodTuple,rest:null,...k(e)})};class en extends M{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==g.map)return m(a,{code:d.invalid_type,expected:g.map,received:a.parsedType}),_;const n=this._def.keyType,i=this._def.valueType,s=[...a.data.entries()].map(([o,l],u)=>({key:n._parse(new ke(a,o,a.path,[u,"key"])),value:i._parse(new ke(a,l,a.path,[u,"value"]))}));if(a.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const l of s){const u=await l.key,c=await l.value;if(u.status==="aborted"||c.status==="aborted")return _;(u.status==="dirty"||c.status==="dirty")&&t.dirty(),o.set(u.value,c.value)}return{status:t.value,value:o}})}else{const o=new Map;for(const l of s){const u=l.key,c=l.value;if(u.status==="aborted"||c.status==="aborted")return _;(u.status==="dirty"||c.status==="dirty")&&t.dirty(),o.set(u.value,c.value)}return{status:t.value,value:o}}}}en.create=(r,e,t)=>new en({valueType:e,keyType:r,typeName:x.ZodMap,...k(t)});class wt extends M{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==g.set)return m(a,{code:d.invalid_type,expected:g.set,received:a.parsedType}),_;const n=this._def;n.minSize!==null&&a.data.size<n.minSize.value&&(m(a,{code:d.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),n.maxSize!==null&&a.data.size>n.maxSize.value&&(m(a,{code:d.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());const i=this._def.valueType;function s(l){const u=new Set;for(const c of l){if(c.status==="aborted")return _;c.status==="dirty"&&t.dirty(),u.add(c.value)}return{status:t.value,value:u}}const o=[...a.data.values()].map((l,u)=>i._parse(new ke(a,l,a.path,u)));return a.common.async?Promise.all(o).then(l=>s(l)):s(o)}min(e,t){return new wt({...this._def,minSize:{value:e,message:v.toString(t)}})}max(e,t){return new wt({...this._def,maxSize:{value:e,message:v.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}wt.create=(r,e)=>new wt({valueType:r,minSize:null,maxSize:null,typeName:x.ZodSet,...k(e)});class bt extends M{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==g.function)return m(t,{code:d.invalid_type,expected:g.function,received:t.parsedType}),_;function a(o,l){return Sr({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,kr(),vt].filter(u=>!!u),issueData:{code:d.invalid_arguments,argumentsError:l}})}function n(o,l){return Sr({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,kr(),vt].filter(u=>!!u),issueData:{code:d.invalid_return_type,returnTypeError:l}})}const i={errorMap:t.common.contextualErrorMap},s=t.data;if(this._def.returns instanceof kt){const o=this;return G(async function(...l){const u=new re([]),c=await o._def.args.parseAsync(l,i).catch(y=>{throw u.addIssue(a(l,y)),u}),f=await Reflect.apply(s,this,c);return await o._def.returns._def.type.parseAsync(f,i).catch(y=>{throw u.addIssue(n(f,y)),u})})}else{const o=this;return G(function(...l){const u=o._def.args.safeParse(l,i);if(!u.success)throw new re([a(l,u.error)]);const c=Reflect.apply(s,this,u.data),f=o._def.returns.safeParse(c,i);if(!f.success)throw new re([n(c,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new bt({...this._def,args:fe.create(e).rest(Je.create())})}returns(e){return new bt({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,a){return new bt({args:e||fe.create([]).rest(Je.create()),returns:t||Je.create(),typeName:x.ZodFunction,...k(a)})}}class tn extends M{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})}}tn.create=(r,e)=>new tn({getter:r,typeName:x.ZodLazy,...k(e)});class rn extends M{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return m(t,{received:t.data,code:d.invalid_literal,expected:this._def.value}),_}return{status:"valid",value:e.data}}get value(){return this._def.value}}rn.create=(r,e)=>new rn({value:r,typeName:x.ZodLiteral,...k(e)});function an(r,e){return new Qe({values:r,typeName:x.ZodEnum,...k(e)})}class Qe extends M{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),a=this._def.values;return m(t,{expected:E.joinValues(a),received:t.parsedType,code:d.invalid_type}),_}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),a=this._def.values;return m(t,{received:t.data,code:d.invalid_enum_value,options:a}),_}return G(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 Qe.create(e,{...this._def,...t})}exclude(e,t=this._def){return Qe.create(this.options.filter(a=>!e.includes(a)),{...this._def,...t})}}Qe.create=an;class nn extends M{_parse(e){const t=E.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(e);if(a.parsedType!==g.string&&a.parsedType!==g.number){const n=E.objectValues(t);return m(a,{expected:E.joinValues(n),received:a.parsedType,code:d.invalid_type}),_}if(this._cache||(this._cache=new Set(E.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const n=E.objectValues(t);return m(a,{received:a.data,code:d.invalid_enum_value,options:n}),_}return G(e.data)}get enum(){return this._def.values}}nn.create=(r,e)=>new nn({values:r,typeName:x.ZodNativeEnum,...k(e)});class kt extends M{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==g.promise&&t.common.async===!1)return m(t,{code:d.invalid_type,expected:g.promise,received:t.parsedType}),_;const a=t.parsedType===g.promise?t.data:Promise.resolve(t.data);return G(a.then(n=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}}kt.create=(r,e)=>new kt({type:r,typeName:x.ZodPromise,...k(e)});class et extends M{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===x.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:a}=this._processInputParams(e),n=this._def.effect||null,i={addIssue:s=>{m(a,s),s.fatal?t.abort():t.dirty()},get path(){return a.path}};if(i.addIssue=i.addIssue.bind(i),n.type==="preprocess"){const s=n.transform(a.data,i);if(a.common.async)return Promise.resolve(s).then(async o=>{if(t.value==="aborted")return _;const l=await this._def.schema._parseAsync({data:o,path:a.path,parent:a});return l.status==="aborted"?_:l.status==="dirty"||t.value==="dirty"?_t(l.value):l});{if(t.value==="aborted")return _;const o=this._def.schema._parseSync({data:s,path:a.path,parent:a});return o.status==="aborted"?_:o.status==="dirty"||t.value==="dirty"?_t(o.value):o}}if(n.type==="refinement"){const s=o=>{const l=n.refinement(o,i);if(a.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(a.common.async===!1){const o=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return o.status==="aborted"?_:(o.status==="dirty"&&t.dirty(),s(o.value),{status:t.value,value:o.value})}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(o=>o.status==="aborted"?_:(o.status==="dirty"&&t.dirty(),s(o.value).then(()=>({status:t.value,value:o.value}))))}if(n.type==="transform")if(a.common.async===!1){const s=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!Ge(s))return _;const o=n.transform(s.value,i);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(s=>Ge(s)?Promise.resolve(n.transform(s.value,i)).then(o=>({status:t.value,value:o})):_);E.assertNever(n)}}et.create=(r,e,t)=>new et({schema:r,typeName:x.ZodEffects,effect:e,...k(t)}),et.createWithPreprocess=(r,e,t)=>new et({schema:e,effect:{type:"preprocess",transform:r},typeName:x.ZodEffects,...k(t)});class Me extends M{_parse(e){return this._getType(e)===g.undefined?G(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Me.create=(r,e)=>new Me({innerType:r,typeName:x.ZodOptional,...k(e)});class tt extends M{_parse(e){return this._getType(e)===g.null?G(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}tt.create=(r,e)=>new tt({innerType:r,typeName:x.ZodNullable,...k(e)});class Ar extends M{_parse(e){const{ctx:t}=this._processInputParams(e);let a=t.data;return t.parsedType===g.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}Ar.create=(r,e)=>new Ar({innerType:r,typeName:x.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...k(e)});class Nr extends M{_parse(e){const{ctx:t}=this._processInputParams(e),a={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:a.data,path:a.path,parent:{...a}});return Ut(n)?n.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new re(a.common.issues)},input:a.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new re(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}}Nr.create=(r,e)=>new Nr({innerType:r,typeName:x.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...k(e)});class sn extends M{_parse(e){if(this._getType(e)!==g.nan){const a=this._getOrReturnCtx(e);return m(a,{code:d.invalid_type,expected:g.nan,received:a.parsedType}),_}return{status:"valid",value:e.data}}}sn.create=r=>new sn({typeName:x.ZodNaN,...k(r)});class is extends M{_parse(e){const{ctx:t}=this._processInputParams(e),a=t.data;return this._def.type._parse({data:a,path:t.path,parent:t})}unwrap(){return this._def.type}}class Lr extends M{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return i.status==="aborted"?_:i.status==="dirty"?(t.dirty(),_t(i.value)):this._def.out._parseAsync({data:i.value,path:a.path,parent:a})})();{const n=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return n.status==="aborted"?_:n.status==="dirty"?(t.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:a.path,parent:a})}}static create(e,t){return new Lr({in:e,out:t,typeName:x.ZodPipeline})}}class Rr extends M{_parse(e){const t=this._def.innerType._parse(e),a=n=>(Ge(n)&&(n.value=Object.freeze(n.value)),n);return Ut(t)?t.then(n=>a(n)):a(t)}unwrap(){return this._def.innerType}}Rr.create=(r,e)=>new Rr({innerType:r,typeName:x.ZodReadonly,...k(e)});var x;(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"})(x||(x={}));const Pr=Se.create,A=Xe.create,Or=Mr.create,on=Er.create;Je.create,ze.create;const Ht=Cr.create,ss=de.create,Z=I.create;$t.create,Wt.create,fe.create;const se=bt.create;Qe.create;const os=kt.create;Me.create,tt.create,Z({pin:Z({fade:Or().optional(),maxCount:A().optional(),maxZoom:A().optional()}).optional(),animation:Z({queue:Z({limit:A().optional()}).optional()}).optional(),api:Z({states:Z({url:Pr(),singleRequest:Or().optional()}).optional()}).optional()});const jr=A().min(-90).max(90),Ir=A().min(-180).max(180),ls=Z({sw:Z({lat:jr,lng:Ir}),ne:Z({lat:jr,lng:Ir})}),Zr=on().refine(r=>r instanceof HTMLElement,"Must be an HTMLElement"),us=Z({mapSize:A().min(1),zoomMin:A().min(0),zoomMax:A().min(0),zoomScale:A().min(1).max(10)}),cs=Z({instance:on(),inserted:se().returns(Or()),insert:se().returns(Ht()),remove:se().returns(Ht()),update:se().args(A()).returns(Ht())}),ds=Z({getParameters:se().args().returns(us),getContainer:se().args().returns(Zr),getZoom:se().args().returns(A()),getBounds:se().args().returns(ls),panBy:se().args(A(),A()).returns(Ht()),createMarker:se().args(Zr,jr,Ir,A()).returns(cs)}),Dr=se().args(Pr()).returns(os(Zr)),ps=Z({id:Pr().min(1),rank:A(),lat:A().min(-90).max(90),lng:A().min(-180).max(180),tooltip:Z({style:Z({width:A(),height:A(),margin:A(),radius:A()}).refine(r=>Math.min(r.width,r.height)/r.margin>=5,"Tooltip width and height must be at least 5 times the margin"),body:Dr}),pin:Z({style:Z({width:A(),height:A(),radius:A()}),body:Dr}).optional(),popup:Z({style:Z({width:A(),height:A(),radius:A(),margin:A()}),body:Dr}).optional()}),fs=ss(ps);var Oe;(r=>{r.COUNT=12,r.DEGREES=[0,30,60,90,120,150,180,210,240,270,300,330],r.DEGREES_DEFAULT=270})(Oe||(Oe={}));const ln="1.0.200",un="https://maps.api.arenarium.dev",hs=`${un}/log`,ms=`${un}/tooltip/states`;class ys{constructor(e,t,a){p(this,"apiKey");p(this,"apiStatesUrl");p(this,"apiStatesSingleRequest",!1);p(this,"mapProvider");p(this,"markerDataArray",new Array);p(this,"markerDataMap",new Map);p(this,"markerDataUpdating",!1);p(this,"markerPinProcessor");p(this,"markerTooltipProcessor");p(this,"markerPopupProcessor");ds.parse(t),this.apiKey=e,this.mapProvider=t,this.markerPinProcessor=new Vr(t),this.markerTooltipProcessor=new vs(t),this.markerPopupProcessor=new _s(t),this.configuration=a,this.log("info","Loaded")}set configuration(e){var t,a,n,i,s,o;this.markerPinProcessor.setConfiguration(e),this.apiStatesUrl=((a=(t=e==null?void 0:e.api)==null?void 0:t.states)==null?void 0:a.url)??void 0,this.apiStatesSingleRequest=((i=(n=e==null?void 0:e.api)==null?void 0:n.states)==null?void 0:i.singleRequest)??!1,we.setLimit(((o=(s=e==null?void 0:e.animation)==null?void 0:s.queue)==null?void 0:o.limit)??8*navigator.hardwareConcurrency)}async updateMarkers(e){fs.parse(e);try{await this.updateMarkerData(e),this.processMarkerDataCallback()}catch(t){throw console.error(t),this.removeMarkerData(),t instanceof Error&&this.log("error","Failed to update markers",t),t}}removeMarkers(){try{this.removeMarkerData()}catch(e){throw console.error(e),e instanceof Error&&this.log("error","Failed to remove markers",e),e}}showPopup(e){try{for(const t of this.markerDataArray)t.marker.id==e?this.markerPopupProcessor.show(t):this.markerPopupProcessor.hide(t)}catch(t){console.error(t);for(const a of this.markerDataArray)this.markerPopupProcessor.hide(a);throw t instanceof Error&&this.log("error","Failed to show popup",t),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 a of this.markerDataArray)this.markerPopupProcessor.hide(a);throw t instanceof Error&&this.log("error","Failed to hide popup",t),t}}async updateMarkerData(e){try{let t=this.markerDataArray.map(n=>n.marker);for(let n=0;n<e.length;n++){const i=e[n];this.markerDataMap.get(i.id)||t.push(i)}let a;if(e.length>1){const n=this.mapProvider.getParameters(),i=t.map(u=>({id:u.id,rank:u.rank,lat:u.lat,lng:u.lng,width:u.tooltip.style.width,height:u.tooltip.style.height,margin:u.tooltip.style.margin})),s={key:this.apiKey,parameters:n,input:i},o=this.apiStatesUrl??ms,l=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!l.ok||!l.body)throw new Error("Failed to get marker states: "+l.statusText);a=await l.json()}else a=[[0,[[0,Oe.DEGREES.indexOf(Oe.DEGREES_DEFAULT)]]]];try{this.markerDataUpdating=!0;for(let n=0;n<t.length;n++){const i=t[n],s=a[n],o=this.markerDataMap.get(i.id);if(o)o.update(s);else{const l=new gs(this.mapProvider,i,s);l.create(),this.markerDataMap.set(i.id,l),this.markerDataArray.push(l)}}this.markerDataArray.sort((n,i)=>n.zoom-i.zoom),this.markerPinProcessor.updateElements(this.markerDataArray.map(n=>n.pin)),this.markerTooltipProcessor.updateElements(this.markerDataArray.map(n=>n.tooltip))}finally{this.markerDataUpdating=!1}}catch(t){throw console.error(t),this.markerDataArray.forEach(a=>a.remove()),this.markerDataArray.length=0,this.markerDataMap.clear(),t instanceof Error&&this.log("error","Failed to update marker data",t),t}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 instanceof Error&&this.log("error","Failed to remove marker data",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),e instanceof Error&&this.log("error","Failed to process marker data",e)}}processMarkerData(){if(this.markerDataUpdating)return;const e=this.mapProvider.getBounds(),t=this.mapProvider.getZoom();this.markerPopupProcessor.process(),this.markerTooltipProcessor.process(e,t),this.markerPinProcessor.process(e,t)}async log(e,t,a){if(!(window!=null&&window.location.host.startsWith("localhost")||window!=null&&window.location.host.startsWith("127.0.0.1")))try{const n={title:`[CLIENT:${ln}] ${t}`,level:e,content:{version:ln,...a}};await fetch(hs,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})}catch(n){console.error(n)}}}class gs{constructor(e,t,a){p(this,"marker");p(this,"zoom");p(this,"pin");p(this,"tooltip");this.marker=t,this.zoom=a[0],this.pin=new Br(e,t,a),this.tooltip=new Ur(e,t,a)}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 Fr{constructor(e,t){p(this,"provider");p(this,"id");p(this,"lat");p(this,"lng");p(this,"shown");p(this,"element");p(this,"component");p(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,a=this.component;if(t==null||a==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 ot=class ot extends Fr{constructor(t,a,n){var i,s,o,l;super(t,a);p(this,"width");p(this,"height");p(this,"radius");p(this,"zoom");p(this,"bodyLoading",!1);p(this,"bodyLoaded",!1);p(this,"bodyCallback");this.width=((i=a.pin)==null?void 0:i.style.width)??ot.DEFAULT_SIZE,this.height=((s=a.pin)==null?void 0:s.style.height)??ot.DEFAULT_SIZE,this.radius=((o=a.pin)==null?void 0:o.style.radius)??ot.DEFAULT_SIZE,this.zoom=n[0],this.bodyCallback=(l=a.pin)==null?void 0:l.body}createElement(){this.element=document.createElement("div"),this.element.classList.add("pin"),this.component=gr(Pi,{target:this.element,props:{id:this.id+"_pin",layer:Ni,priority:this.zoom*this.provider.getParameters().zoomScale,width:this.width,height:this.height,radius:this.radius}})}update(t){this.zoom=t[0],this.updateZIndex()}updateMap(t){var a;super.updateMap(t),(a=this.component)==null||a.setDisplayed(t)}updateState(t){if(this.component==null)throw new Error("Failed to update pin state");this.component.setScale(this.getScale(t))}updateBody(){var a;if(this.bodyCallback==null||this.bodyLoaded||this.bodyLoading)return;const t=(a=this.component)==null?void 0:a.getBody();t!=null&&(this.bodyLoading=!0,this.bodyCallback(this.id).then(n=>{n instanceof HTMLElement?t.appendChild(n):console.error("Failed to load pin body")}).catch(n=>console.error(n)).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(){const t=this.provider.getParameters();return Math.round((t.zoomMax-this.zoom)*t.zoomScale)}isCollapsed(){return this.component==null?!1:this.component.getCollapsed()}isBodyLoaded(){return this.bodyCallback==null||this.bodyLoaded}};p(ot,"DEFAULT_SIZE",16);let Br=ot;const lt=class lt{constructor(e){p(this,"provider");p(this,"pinElements",new Array);p(this,"pinMaxWidth",0);p(this,"pinMaxHeight",0);p(this,"pinFade",!1);p(this,"pinMaxCount",0);p(this,"pinMaxZoomDelta",0);this.provider=e}setConfiguration(e){var t,a,n;this.pinFade=((t=e==null?void 0:e.pin)==null?void 0:t.fade)??!0,this.pinMaxCount=((a=e==null?void 0:e.pin)==null?void 0:a.maxCount)??Math.max(lt.MAP_PINS_MAX_COUNT,8*navigator.hardwareConcurrency),this.pinMaxZoomDelta=((n=e==null?void 0:e.pin)==null?void 0:n.maxZoom)??lt.MAP_PINS_MAX_ZOOM}updateElements(e){this.pinElements=e,this.pinMaxWidth=e.reduce((t,a)=>Math.max(t,a.width),0),this.pinMaxHeight=e.reduce((t,a)=>Math.max(t,a.height),0)}removeElements(){this.pinElements.forEach(e=>e.remove()),this.pinElements.length=0}process(e,t){const a=this.provider.getParameters().mapSize,n=new qa(e,t,a,this.pinMaxWidth*2,this.pinMaxHeight*2);let i=0;for(const s of this.pinElements)n.contains(s.lat,s.lng)?s.shown&&t<s.zoom&&s.zoom<t+this.pinMaxZoomDelta?(i<this.pinMaxCount&&(this.pinFade==!0?s.updateState(t):s.setCollapsed(!1),s.updateMap(!0),s.isBodyLoaded()==!1&&s.updateBody()),i++):(s.setCollapsed(!0),s.isCollapsed()&&s.updateMap(!1)):s.updateMap(!1)}};p(lt,"MAP_PINS_MAX_ZOOM",2),p(lt,"MAP_PINS_MAX_COUNT",128);let Vr=lt;const Gt=class Gt extends Fr{constructor(t,a,n){super(t,a);p(this,"width");p(this,"height");p(this,"margin");p(this,"radius");p(this,"zoom");p(this,"angle");p(this,"states");p(this,"bodyLoading",!1);p(this,"bodyLoaded",!1);p(this,"bodyCallback");this.width=a.tooltip.style.width,this.height=a.tooltip.style.height,this.margin=a.tooltip.style.margin,this.radius=a.tooltip.style.radius,this.zoom=n[0],this.angle=Oe.DEGREES_DEFAULT,this.states=n[1].map(i=>[i[0],Oe.DEGREES[i[1]]]),this.bodyCallback=a.tooltip.body}createElement(){this.element=document.createElement("div"),this.element.classList.add("tooltip"),this.component=gr(Ua,{target:this.element,props:{id:this.id+"_tooltip",layer:Ai,priority:this.zoom*this.provider.getParameters().zoomScale,width:this.width,height:this.height,margin:this.margin,radius:this.radius}})}update(t){this.zoom=t[0],this.states=t[1].map(a=>[a[0],Oe.DEGREES[a[1]]]),this.updateZIndex()}updateMap(t){var a;super.updateMap(t),(a=this.component)==null||a.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 a;if(this.bodyLoaded||this.bodyLoading)return;const t=(a=this.component)==null?void 0:a.getBody();t!=null&&(this.bodyLoading=!0,this.bodyCallback(this.id).then(n=>{n instanceof HTMLElement?t.appendChild(n):console.error("Failed to load tooltip body")}).catch(n=>console.error(n)).finally(()=>{this.bodyLoaded=!0,this.bodyLoading=!1}))}getAngle(t){const a=this.states.findLast(n=>n[0]<=t);if(!a)throw new Error("Angle not found");return a[1]}getZindex(){const t=this.provider.getParameters();return Math.round((t.zoomMax-this.zoom)*t.zoomScale)+Gt.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}};p(Gt,"Z_INDEX_OFFSET",1e6);let Ur=Gt;class vs{constructor(e){p(this,"provider");p(this,"tooltipElements",new Array);p(this,"tooltipMaxWidth",0);p(this,"tooltipMaxHeight",0);this.provider=e}updateElements(e){this.tooltipElements=e,this.tooltipMaxWidth=this.tooltipElements.reduce((t,a)=>Math.max(t,a.width),0),this.tooltipMaxHeight=this.tooltipElements.reduce((t,a)=>Math.max(t,a.height),0)}removeElements(){this.tooltipElements.forEach(e=>e.remove()),this.tooltipElements.length=0}process(e,t){const a=this.provider.getParameters().mapSize,n=new qa(e,t,a,this.tooltipMaxWidth*2,this.tooltipMaxHeight*2);for(const i of this.tooltipElements)n.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 Xt=class Xt extends Fr{constructor(t,a){if(a.popup==null)throw new Error("Failed to create popup");super(t,a);p(this,"width");p(this,"height");p(this,"margin");p(this,"radius");p(this,"bodyLoading",!1);p(this,"bodyLoaded",!1);p(this,"bodyCallback");this.shown=!1,this.width=a.popup.style.width,this.height=a.popup.style.height,this.margin=a.popup.style.margin,this.radius=a.popup.style.radius,this.bodyCallback=a.popup.body}createElement(){this.element=document.createElement("div"),this.element.classList.add("popup"),this.component=gr(Ua,{target:this.element,props:{id:this.id+"_popup",layer:Ti,priority:0,width:this.width,height:this.height,margin:this.margin,radius:this.radius}})}updateMap(t){var a;super.updateMap(t),(a=this.component)==null||a.setDisplayed(t)}updateBody(){var a;if(this.bodyLoaded||this.bodyLoading)return;const t=(a=this.component)==null?void 0:a.getBody();t!=null&&(this.bodyLoading=!0,this.bodyCallback(this.id).then(n=>{n instanceof HTMLElement?t.appendChild(n):console.error("Failed to load popup body")}).catch(n=>console.error(n)).finally(()=>{this.bodyLoaded=!0,this.bodyLoading=!1}))}getZindex(){return Xt.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}};p(Xt,"Z_INDEX_OFFSET",2e6);let qr=Xt;class _s{constructor(e){p(this,"provider");p(this,"popupElements",new Map);p(this,"popupPositioned",new Map);this.provider=e}show(e){e.pin.shown=!1,e.tooltip.shown=!1;const t=new qr(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 a of this.popupElements.values())if(a.shown){if(a.setCollapsed(!1),a.updateMap(!0),a.isExpanded()&&a.isBodyLoaded()==!1&&a.updateBody(),a.isCollapsed()==!1&&this.popupPositioned.get(a.id)==!1){const n=(e=a.component)==null?void 0:e.getBody();if(n==null)continue;const i=(t=a.component)==null?void 0:t.getOffsets();if(i==null)continue;const s=n.getBoundingClientRect();if(s.x==0&&s.y==0&&s.width==0&&s.height==0)continue;const o=s.x+s.width/2,l=s.y+s.height/2,u=o+i.x,c=l+i.y,f=u+a.width,h=c+a.height,y=this.provider.getContainer().getBoundingClientRect(),b=u-y.left,R=y.right-f,P=c-y.top,ae=y.bottom-h,C=Math.min(a.width,a.height)/4,W=b<0?b-C:R<0?-R+C:0,ne=P<0?P-C:ae<0?-ae+C:0;this.provider.panBy(W,ne),this.popupPositioned.set(a.id,!0)}}else a.setCollapsed(!0),a.isCollapsed()&&(a.updateMap(!1),a.remove(),this.popupElements.delete(a.id),this.popupPositioned.delete(a.id))}}class xs{constructor(e,t,a){p(this,"MapClass");p(this,"MapMarkerClass");p(this,"map");this.MapClass=e,this.MapMarkerClass=t,this.map=new this.MapClass({...a,minZoom:Math.max(a.minZoom??0,0),maxZoom:Math.min(a.maxZoom??22,24),style:a.style??"https://tiles.openfreemap.org/styles/liberty",pitchWithRotate:!1,attributionControl:a.attributionControl??{compact:!1,customAttribution:"@arenarium/maps"}}),this.map.dragRotate.disable(),this.map.keyboard.disable(),this.map.touchZoomRotate.disableRotation(),this.map.touchPitch.disable()}getParameters(){return{mapSize:512,zoomMin:this.map.getMinZoom()??0,zoomMax:this.map.getMaxZoom()??22,zoomScale:10}}getMap(){return this.map}getContainer(){return this.map.getContainer()}getZoom(){return this.map.getZoom()}getBounds(){const e=this.map.getBounds(),t=e.getSouthWest(),a=e.getNorthEast();return{sw:t,ne:a}}panBy(e,t){this.map.panBy([e,t])}createMarker(e,t,a){const n=new this.MapMarkerClass({element:e});return n.setLngLat([a,t]),{instance:n,inserted:()=>n._map!=null,insert:()=>n.addTo(this.map),remove:()=>n.remove(),update:i=>n.getElement().style.zIndex=i.toString()}}}const ws={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}}]},bs={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}}]};class ks{constructor(e,t,a){p(this,"MapClass");p(this,"MapMarkerClass");p(this,"map");this.MapClass=e,this.MapMarkerClass=t,this.map=new this.MapClass({...a,minZoom:Math.max(a.minZoom??0,0),maxZoom:Math.min(a.maxZoom??22,24),projection:"mercator",pitchWithRotate:!1,customAttribution:a.customAttribution??"@arenarium/maps"}),this.map.dragRotate.disable(),this.map.keyboard.disable(),this.map.touchZoomRotate.disableRotation(),this.map.touchPitch.disable()}getParameters(){return{mapSize:512,zoomMin:this.map.getMinZoom()??0,zoomMax:this.map.getMaxZoom()??22,zoomScale:10}}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(),a=e.getNorthEast();return{sw:t,ne:a}}panBy(e,t){this.map.panBy([e,t])}createMarker(e,t,a){const n=new this.MapMarkerClass({element:e});return n.setLngLat([a,t]),{instance:n,inserted:()=>n._map!=null,insert:()=>n.addTo(this.map),remove:()=>n.remove(),update:i=>n.getElement().style.zIndex=i.toString()}}}class Ss{constructor(e,t,a,n){p(this,"MapClass");p(this,"MapMarkerClass");p(this,"map");p(this,"options");this.MapClass=e,this.MapMarkerClass=t,this.options=n,this.map=new this.MapClass(a,{...n})}getParameters(){return{mapSize:256,zoomMin:this.options.minZoom??0,zoomMax:this.options.maxZoom??24,zoomScale:10}}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(),a=e.getNorthEast();return{sw:{lat:t.lat(),lng:t.lng()},ne:{lat:a.lat(),lng:a.lng()}}}panBy(e,t){this.map.panBy(e,t)}createMarker(e,t,a,n){const i=new this.MapMarkerClass({position:{lat:t,lng:a},content:e,zIndex:n});return{instance:i,inserted:()=>i.map!=null&&i.map==this.map,insert:()=>i.map=this.map,remove:()=>i.map=void 0,update:s=>i.zIndex=s}}}const zs=[{elementType:"labels.icon",stylers:[{visibility:"off"}]},{stylers:[{saturation:-100},{lightness:-10}]},{featureType:"landscape",stylers:[{lightness:30}]},{featureType:"road",elementType:"geometry",stylers:[{saturation:-100}]}],Ms=[{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}]}];S.GoogleMapDarkStyle=Ms,S.GoogleMapLightStyle=zs,S.GoogleMapsProvider=Ss,S.MapManager=ys,S.MapboxProvider=ks,S.MaplibreDarkStyle=ws,S.MaplibreLightStyle=bs,S.MaplibreProvider=xs,Object.defineProperty(S,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(S,N){typeof exports=="object"&&typeof module<"u"?N(exports):typeof define=="function"&&define.amd?define(["exports"],N):(S=typeof globalThis<"u"?globalThis:S||self,N(S.arenarium={}))})(this,function(S){"use strict";var Rs=Object.defineProperty;var gn=S=>{throw TypeError(S)};var Os=(S,N,O)=>N in S?Rs(S,N,{enumerable:!0,configurable:!0,writable:!0,value:O}):S[N]=O;var p=(S,N,O)=>Os(S,typeof N!="symbol"?N+"":N,O),Yr=(S,N,O)=>N.has(S)||gn("Cannot "+O);var w=(S,N,O)=>(Yr(S,N,"read from private field"),O?O.call(S):N.get(S)),F=(S,N,O)=>N.has(S)?gn("Cannot add the same private member more than once"):N instanceof WeakSet?N.add(S):N.set(S,O),V=(S,N,O,Nt)=>(Yr(S,N,"write to private field"),Nt?Nt.call(S,O):N.set(S,O),O),De=(S,N,O)=>(Yr(S,N,"access private method"),O);var rt,at,Ee,St,zt,je,nt,Ie,Ce,it,Mt,Et,oe,vn,er,Gr,cn,he,st,Ct,Ze;var O=Array.isArray,Nt=Array.prototype.indexOf,_n=Array.from,tr=Object.defineProperty,ct=Object.getOwnPropertyDescriptor,xn=Object.prototype,wn=Array.prototype,bn=Object.getPrototypeOf,Xr=Object.isExtensible;function kn(r){for(var e=0;e<r.length;e++)r[e]()}function Sn(){var r,e,t=new Promise((a,n)=>{r=a,e=n});return{promise:t,resolve:r,reject:e}}const X=2,rr=4,Jr=8,Lt=16,ye=32,Te=64,Kr=128,Q=256,Pt=512,H=1024,le=2048,ge=4096,Fe=8192,Be=16384,ar=32768,zn=65536,Qr=1<<17,Mn=1<<18,nr=1<<19,ea=1<<20,ir=1<<21,sr=1<<22,Ae=1<<23,Rt=Symbol("$state"),or=new class extends Error{constructor(){super(...arguments);p(this,"name","StaleReactionError");p(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function En(){throw new Error("https://svelte.dev/e/await_outside_boundary")}function Cn(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Tn(r){throw new Error("https://svelte.dev/e/effect_in_teardown")}function An(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Nn(r){throw new Error("https://svelte.dev/e/effect_orphan")}function Ln(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Pn(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Rn(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function On(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}const jn=2,B=Symbol();function ta(r){return r===this.v}let js=!1,ie=null;function Ot(r){ie=r}function lr(r,e=!1,t){ie={p:ie,c:null,e:null,s:r,x:null,l:null}}function ur(r){var e=ie,t=e.e;if(t!==null){e.e=null;for(var a of t)va(a)}return r!==void 0&&(e.x=r),ie=e.p,r??{}}function ra(){return!0}const In=new WeakMap;function Zn(r){var e=T;if(e===null)return z.f|=Ae,r;if((e.f&ar)===0){if((e.f&Kr)===0)throw!e.parent&&r instanceof Error&&aa(r),r;e.b.error(r)}else cr(r,e)}function cr(r,e){for(;e!==null;){if((e.f&Kr)!==0)try{e.b.error(r);return}catch(t){r=t}e=e.parent}throw r instanceof Error&&aa(r),r}function aa(r){const e=In.get(r);e&&(tr(r,"message",{value:e.message}),tr(r,"stack",{value:e.stack}))}let jt=[];function Dn(){var r=jt;jt=[],kn(r)}function Fn(r){jt.length===0&&queueMicrotask(Dn),jt.push(r)}function Bn(){for(var r=T.b;r!==null&&!r.has_pending_snippet();)r=r.parent;return r===null&&En(),r}function Vn(r){var e=X|le,t=z!==null&&(z.f&X)!==0?z:null;return T===null||t!==null&&(t.f&Q)!==0?e|=Q:T.f|=nr,{ctx:ie,deps:null,effects:null,equals:ta,f:e,fn:r,reactions:null,rv:0,v:B,wv:0,parent:t??T,ac:null}}function Un(r,e){let t=T;t===null&&Cn();var a=t.b,n=void 0,i=ca(B),s=null,o=!z;return ri(()=>{try{var l=r()}catch(y){l=Promise.reject(y)}var u=()=>l;n=(s==null?void 0:s.then(u,u))??Promise.resolve(l),s=n;var c=D,f=a.pending;o&&(a.update_pending_count(1),f||c.increment());const h=(y,b=void 0)=>{s=null,f||c.activate(),b?b!==or&&(i.f|=Ae,hr(i,b)):((i.f&Ae)!==0&&(i.f^=Ae),hr(i,y)),o&&(a.update_pending_count(-1),f||c.decrement()),sa()};if(n.then(h,y=>h(null,y||"unknown")),c)return()=>{queueMicrotask(()=>c.neuter())}}),new Promise(l=>{function u(c){function f(){c===n?l(i):u(n)}c.then(f,f)}u(n)})}function na(r){var e=r.effects;if(e!==null){r.effects=null;for(var t=0;t<e.length;t+=1)Pe(e[t])}}function $n(r){for(var e=r.parent;e!==null;){if((e.f&X)===0)return e;e=e.parent}return null}function dr(r){var e,t=T;qe($n(r));try{na(r),e=Na(r)}finally{qe(t)}return e}function ia(r){var e=dr(r);if(r.equals(e)||(r.v=e,r.wv=Ta()),!$e)if(ve!==null)ve.set(r,r.v);else{var t=(xe||(r.f&Q)!==0)&&r.deps!==null?ge:H;te(r,t)}}function qn(r,e,t){const a=Vn;if(e.length===0){t(r.map(a));return}var n=D,i=T,s=Wn(),o=Bn();Promise.all(e.map(l=>Un(l))).then(l=>{n==null||n.activate(),s();try{t([...r.map(a),...l])}catch(u){(i.f&Be)===0&&cr(u,i)}n==null||n.deactivate(),sa()}).catch(l=>{o.error(l)})}function Wn(){var r=T,e=z,t=ie;return function(){qe(r),_e(e),Ot(t)}}function sa(){qe(null),_e(null),Ot(null)}const dt=new Set;let D=null,ve=null,oa=new Set,It=[];function la(){const r=It.shift();It.length>0&&queueMicrotask(la),r()}let pt=[],pr=null,fr=!1;const Yt=class Yt{constructor(){F(this,oe);p(this,"current",new Map);F(this,rt,new Map);F(this,at,new Set);F(this,Ee,0);F(this,St,null);F(this,zt,!1);F(this,je,[]);F(this,nt,[]);F(this,Ie,[]);F(this,Ce,[]);F(this,it,[]);F(this,Mt,[]);F(this,Et,[]);p(this,"skipped_effects",new Set)}process(e){var i;pt=[];var t=null;if(dt.size>1){t=new Map,ve=new Map;for(const[s,o]of this.current)t.set(s,{v:s.v,wv:s.wv}),s.v=o;for(const s of dt)if(s!==this)for(const[o,l]of w(s,rt))t.has(o)||(t.set(o,{v:o.v,wv:o.wv}),o.v=l)}for(const s of e)De(this,oe,vn).call(this,s);if(w(this,je).length===0&&w(this,Ee)===0){De(this,oe,Gr).call(this);var a=w(this,Ie),n=w(this,Ce);V(this,Ie,[]),V(this,Ce,[]),V(this,it,[]),D=null,ua(a),ua(n),D===null?D=this:dt.delete(this),(i=w(this,St))==null||i.resolve()}else De(this,oe,er).call(this,w(this,Ie)),De(this,oe,er).call(this,w(this,Ce)),De(this,oe,er).call(this,w(this,it));if(t){for(const[s,{v:o,wv:l}]of t)s.wv<=l&&(s.v=o);ve=null}for(const s of w(this,je))yt(s);for(const s of w(this,nt))yt(s);V(this,je,[]),V(this,nt,[])}capture(e,t){w(this,rt).has(e)||w(this,rt).set(e,t),this.current.set(e,e.v)}activate(){D=this}deactivate(){D=null;for(const e of oa)if(oa.delete(e),e(),D!==null)break}neuter(){V(this,zt,!0)}flush(){pt.length>0?Hn():De(this,oe,Gr).call(this),D===this&&(w(this,Ee)===0&&dt.delete(this),this.deactivate())}increment(){V(this,Ee,w(this,Ee)+1)}decrement(){if(V(this,Ee,w(this,Ee)-1),w(this,Ee)===0){for(const e of w(this,Mt))te(e,le),Ve(e);for(const e of w(this,Et))te(e,ge),Ve(e);V(this,Ie,[]),V(this,Ce,[]),this.flush()}else this.deactivate()}add_callback(e){w(this,at).add(e)}settled(){return(w(this,St)??V(this,St,Sn())).promise}static ensure(){if(D===null){const e=D=new Yt;dt.add(D),Yt.enqueue(()=>{D===e&&e.flush()})}return D}static enqueue(e){It.length===0&&queueMicrotask(la),It.unshift(e)}};rt=new WeakMap,at=new WeakMap,Ee=new WeakMap,St=new WeakMap,zt=new WeakMap,je=new WeakMap,nt=new WeakMap,Ie=new WeakMap,Ce=new WeakMap,it=new WeakMap,Mt=new WeakMap,Et=new WeakMap,oe=new WeakSet,vn=function(e){var c;e.f^=H;for(var t=e.first;t!==null;){var a=t.f,n=(a&(ye|Te))!==0,i=n&&(a&H)!==0,s=i||(a&Fe)!==0||this.skipped_effects.has(t);if(!s&&t.fn!==null){if(n)t.f^=H;else if((a&H)===0)if((a&rr)!==0)w(this,Ce).push(t);else if((a&sr)!==0){var o=(c=t.b)!=null&&c.pending?w(this,nt):w(this,je);o.push(t)}else Zt(t)&&((t.f&Lt)!==0&&w(this,it).push(t),yt(t));var l=t.first;if(l!==null){t=l;continue}}var u=t.parent;for(t=t.next;t===null&&u!==null;)t=u.next,u=u.parent}},er=function(e){for(const t of e)((t.f&le)!==0?w(this,Mt):w(this,Et)).push(t),te(t,H);e.length=0},Gr=function(){if(!w(this,zt))for(const e of w(this,at))e();w(this,at).clear()};let ft=Yt;function Hn(){var r=Ue;fr=!0;try{var e=0;for(za(!0);pt.length>0;){var t=ft.ensure();if(e++>1e3){var a,n;Yn()}t.process(pt),Ne.clear()}}finally{fr=!1,za(r),pr=null}}function Yn(){try{Ln()}catch(r){cr(r,pr)}}function ua(r){var e=r.length;if(e!==0){for(var t=0;t<e;){var a=r[t++];if((a.f&(Be|Fe))===0&&Zt(a)){var n=D?D.current.size:0;if(yt(a),a.deps===null&&a.first===null&&a.nodes_start===null&&(a.teardown===null&&a.ac===null?ka(a):a.fn=null),D!==null&&D.current.size>n&&(a.f&ea)!==0)break}}for(;t<e;)Ve(r[t++])}}function Ve(r){for(var e=pr=r;e.parent!==null;){e=e.parent;var t=e.f;if(fr&&e===T&&(t&Lt)!==0)return;if((t&(Te|ye))!==0){if((t&H)===0)return;e.f^=H}}pt.push(e)}const Ne=new Map;function ca(r,e){var t={f:0,v:r,reactions:null,equals:ta,rv:0,wv:0};return t}function Y(r,e){const t=ca(r);return li(t),t}function U(r,e,t=!1){z!==null&&(!ue||(z.f&Qr)!==0)&&ra()&&(z.f&(X|Lt|sr|Qr))!==0&&!($!=null&&$.includes(r))&&On();let a=t?ht(e):e;return hr(r,a)}function hr(r,e){if(!r.equals(e)){var t=r.v;$e?Ne.set(r,e):Ne.set(r,t),r.v=e;var a=ft.ensure();a.capture(r,t),(r.f&X)!==0&&((r.f&le)!==0&&dr(r),te(r,(r.f&Q)===0?H:ge)),r.wv=Ta(),da(r,le),T!==null&&(T.f&H)!==0&&(T.f&(ye|Te))===0&&(ee===null?ui([r]):ee.push(r))}return e}function mr(r){U(r,r.v+1)}function da(r,e){var t=r.reactions;if(t!==null)for(var a=t.length,n=0;n<a;n++){var i=t[n],s=i.f,o=(s&le)===0;o&&te(i,e),(s&X)!==0?da(i,ge):o&&Ve(i)}}function ht(r){if(typeof r!="object"||r===null||Rt in r)return r;const e=bn(r);if(e!==xn&&e!==wn)return r;var t=new Map,a=O(r),n=Y(0),i=Re,s=o=>{if(Re===i)return o();var l=z,u=Re;_e(null),Ca(i);var c=o();return _e(l),Ca(u),c};return a&&t.set("length",Y(r.length)),new Proxy(r,{defineProperty(o,l,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&Pn();var c=t.get(l);return c===void 0?c=s(()=>{var f=Y(u.value);return t.set(l,f),f}):U(c,u.value,!0),!0},deleteProperty(o,l){var u=t.get(l);if(u===void 0){if(l in o){const c=s(()=>Y(B));t.set(l,c),mr(n)}}else U(u,B),mr(n);return!0},get(o,l,u){var y;if(l===Rt)return r;var c=t.get(l),f=l in o;if(c===void 0&&(!f||(y=ct(o,l))!=null&&y.writable)&&(c=s(()=>{var b=ht(f?o[l]:B),P=Y(b);return P}),t.set(l,c)),c!==void 0){var h=j(c);return h===B?void 0:h}return Reflect.get(o,l,u)},getOwnPropertyDescriptor(o,l){var u=Reflect.getOwnPropertyDescriptor(o,l);if(u&&"value"in u){var c=t.get(l);c&&(u.value=j(c))}else if(u===void 0){var f=t.get(l),h=f==null?void 0:f.v;if(f!==void 0&&h!==B)return{enumerable:!0,configurable:!0,value:h,writable:!0}}return u},has(o,l){var h;if(l===Rt)return!0;var u=t.get(l),c=u!==void 0&&u.v!==B||Reflect.has(o,l);if(u!==void 0||T!==null&&(!c||(h=ct(o,l))!=null&&h.writable)){u===void 0&&(u=s(()=>{var y=c?ht(o[l]):B,b=Y(y);return b}),t.set(l,u));var f=j(u);if(f===B)return!1}return c},set(o,l,u,c){var W;var f=t.get(l),h=l in o;if(a&&l==="length")for(var y=u;y<f.v;y+=1){var b=t.get(y+"");b!==void 0?U(b,B):y in o&&(b=s(()=>Y(B)),t.set(y+"",b))}if(f===void 0)(!h||(W=ct(o,l))!=null&&W.writable)&&(f=s(()=>Y(void 0)),U(f,ht(u)),t.set(l,f));else{h=f.v!==B;var P=s(()=>ht(u));U(f,P)}var R=Reflect.getOwnPropertyDescriptor(o,l);if(R!=null&&R.set&&R.set.call(c,u),!h){if(a&&typeof l=="string"){var ae=t.get("length"),C=Number(l);Number.isInteger(C)&&C>=ae.v&&U(ae,C+1)}mr(n)}return!0},ownKeys(o){j(n);var l=Reflect.ownKeys(o).filter(f=>{var h=t.get(f);return h===void 0||h.v!==B});for(var[u,c]of t)c.v!==B&&!(u in o)&&l.push(u);return l},setPrototypeOf(){Rn()}})}var pa,fa,ha,ma;function Gn(){if(pa===void 0){pa=window,fa=/Firefox/.test(navigator.userAgent);var r=Element.prototype,e=Node.prototype,t=Text.prototype;ha=ct(e,"firstChild").get,ma=ct(e,"nextSibling").get,Xr(r)&&(r.__click=void 0,r.__className=void 0,r.__attributes=null,r.__style=void 0,r.__e=void 0),Xr(t)&&(t.__t=void 0)}}function Xn(r=""){return document.createTextNode(r)}function ya(r){return ha.call(r)}function ga(r){return ma.call(r)}function yr(r,e){return ya(r)}function Jn(r,e=1,t=!1){let a=r;for(;e--;)a=ga(a);return a}function Kn(r){T===null&&z===null&&Nn(),z!==null&&(z.f&Q)!==0&&T===null&&An(),$e&&Tn()}function Qn(r,e){var t=e.last;t===null?e.last=e.first=r:(t.next=r,r.prev=t,e.last=r)}function Le(r,e,t,a=!0){var n=T;n!==null&&(n.f&Fe)!==0&&(r|=Fe);var i={ctx:ie,deps:null,nodes_start:null,nodes_end:null,f:r|le,first:null,fn:e,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(t)try{yt(i),i.f|=ar}catch(l){throw Pe(i),l}else e!==null&&Ve(i);var s=t&&i.deps===null&&i.first===null&&i.nodes_start===null&&i.teardown===null&&(i.f&nr)===0;if(!s&&a&&(n!==null&&Qn(i,n),z!==null&&(z.f&X)!==0&&(r&Te)===0)){var o=z;(o.effects??(o.effects=[])).push(i)}return i}function pe(r){Kn();var e=T.f,t=!z&&(e&ye)!==0&&(e&ar)===0;if(t){var a=ie;(a.e??(a.e=[])).push(r)}else return va(r)}function va(r){return Le(rr|ea,r,!1)}function ei(r){ft.ensure();const e=Le(Te,r,!0);return(t={})=>new Promise(a=>{t.outro?si(e,()=>{Pe(e),a(void 0)}):(Pe(e),a(void 0))})}function ti(r){return Le(rr,r,!1)}function ri(r){return Le(sr|nr,r,!0)}function _a(r,e=0){return Le(Jr|e,r,!0)}function xa(r,e=[],t=[]){qn(e,t,a=>{Le(Jr,()=>r(...a.map(j)),!0)})}function ai(r,e=!0){return Le(ye,r,!0,e)}function wa(r){var e=r.teardown;if(e!==null){const t=$e,a=z;Ma(!0),_e(null);try{e.call(null)}finally{Ma(t),_e(a)}}}function ba(r,e=!1){var n;var t=r.first;for(r.first=r.last=null;t!==null;){(n=t.ac)==null||n.abort(or);var a=t.next;(t.f&Te)!==0?t.parent=null:Pe(t,e),t=a}}function ni(r){for(var e=r.first;e!==null;){var t=e.next;(e.f&ye)===0&&Pe(e),e=t}}function Pe(r,e=!0){var t=!1;(e||(r.f&Mn)!==0)&&r.nodes_start!==null&&r.nodes_end!==null&&(ii(r.nodes_start,r.nodes_end),t=!0),ba(r,e&&!t),Dt(r,0),te(r,Be);var a=r.transitions;if(a!==null)for(const i of a)i.stop();wa(r);var n=r.parent;n!==null&&n.first!==null&&ka(r),r.next=r.prev=r.teardown=r.ctx=r.deps=r.fn=r.nodes_start=r.nodes_end=r.ac=null}function ii(r,e){for(;r!==null;){var t=r===e?null:ga(r);r.remove(),r=t}}function ka(r){var e=r.parent,t=r.prev,a=r.next;t!==null&&(t.next=a),a!==null&&(a.prev=t),e!==null&&(e.first===r&&(e.first=a),e.last===r&&(e.last=t))}function si(r,e){var t=[];Sa(r,t,!0),oi(t,()=>{Pe(r),e&&e()})}function oi(r,e){var t=r.length;if(t>0){var a=()=>--t||e();for(var n of r)n.out(a)}else e()}function Sa(r,e,t){if((r.f&Fe)===0){if(r.f^=Fe,r.transitions!==null)for(const s of r.transitions)(s.is_global||t)&&e.push(s);for(var a=r.first;a!==null;){var n=a.next,i=(a.f&zn)!==0||(a.f&ye)!==0;Sa(a,e,i?t:!1),a=n}}}let Ue=!1;function za(r){Ue=r}let $e=!1;function Ma(r){$e=r}let z=null,ue=!1;function _e(r){z=r}let T=null;function qe(r){T=r}let $=null;function li(r){z!==null&&($===null?$=[r]:$.push(r))}let q=null,J=0,ee=null;function ui(r){ee=r}let Ea=1,mt=0,Re=mt;function Ca(r){Re=r}let xe=!1;function Ta(){return++Ea}function Zt(r){var f;var e=r.f;if((e&le)!==0)return!0;if((e&ge)!==0){var t=r.deps,a=(e&Q)!==0;if(t!==null){var n,i,s=(e&Pt)!==0,o=a&&T!==null&&!xe,l=t.length;if((s||o)&&(T===null||(T.f&Be)===0)){var u=r,c=u.parent;for(n=0;n<l;n++)i=t[n],(s||!((f=i==null?void 0:i.reactions)!=null&&f.includes(u)))&&(i.reactions??(i.reactions=[])).push(u);s&&(u.f^=Pt),o&&c!==null&&(c.f&Q)===0&&(u.f^=Q)}for(n=0;n<l;n++)if(i=t[n],Zt(i)&&ia(i),i.wv>r.wv)return!0}(!a||T!==null&&!xe)&&te(r,H)}return!1}function Aa(r,e,t=!0){var a=r.reactions;if(a!==null&&!($!=null&&$.includes(r)))for(var n=0;n<a.length;n++){var i=a[n];(i.f&X)!==0?Aa(i,e,!1):e===i&&(t?te(i,le):(i.f&H)!==0&&te(i,ge),Ve(i))}}function Na(r){var b;var e=q,t=J,a=ee,n=z,i=xe,s=$,o=ie,l=ue,u=Re,c=r.f;q=null,J=0,ee=null,xe=(c&Q)!==0&&(ue||!Ue||z===null),z=(c&(ye|Te))===0?r:null,$=null,Ot(r.ctx),ue=!1,Re=++mt,r.ac!==null&&(r.ac.abort(or),r.ac=null);try{r.f|=ir;var f=(0,r.fn)(),h=r.deps;if(q!==null){var y;if(Dt(r,J),h!==null&&J>0)for(h.length=J+q.length,y=0;y<q.length;y++)h[J+y]=q[y];else r.deps=h=q;if(!xe||(c&X)!==0&&r.reactions!==null)for(y=J;y<h.length;y++)((b=h[y]).reactions??(b.reactions=[])).push(r)}else h!==null&&J<h.length&&(Dt(r,J),h.length=J);if(ra()&&ee!==null&&!ue&&h!==null&&(r.f&(X|ge|le))===0)for(y=0;y<ee.length;y++)Aa(ee[y],r);return n!==null&&n!==r&&(mt++,ee!==null&&(a===null?a=ee:a.push(...ee))),(r.f&Ae)!==0&&(r.f^=Ae),f}catch(P){return Zn(P)}finally{r.f^=ir,q=e,J=t,ee=a,z=n,xe=i,$=s,Ot(o),ue=l,Re=u}}function ci(r,e){let t=e.reactions;if(t!==null){var a=Nt.call(t,r);if(a!==-1){var n=t.length-1;n===0?t=e.reactions=null:(t[a]=t[n],t.pop())}}t===null&&(e.f&X)!==0&&(q===null||!q.includes(e))&&(te(e,ge),(e.f&(Q|Pt))===0&&(e.f^=Pt),na(e),Dt(e,0))}function Dt(r,e){var t=r.deps;if(t!==null)for(var a=e;a<t.length;a++)ci(r,t[a])}function yt(r){var e=r.f;if((e&Be)===0){te(r,H);var t=T,a=Ue;T=r,Ue=!0;try{(e&Lt)!==0?ni(r):ba(r),wa(r);var n=Na(r);r.teardown=typeof n=="function"?n:null,r.wv=Ea;var i}finally{Ue=a,T=t}}}function j(r){var e=r.f,t=(e&X)!==0;if(z!==null&&!ue){var a=T!==null&&(T.f&Be)!==0;if(!a&&!($!=null&&$.includes(r))){var n=z.deps;if((z.f&ir)!==0)r.rv<mt&&(r.rv=mt,q===null&&n!==null&&n[J]===r?J++:q===null?q=[r]:(!xe||!q.includes(r))&&q.push(r));else{(z.deps??(z.deps=[])).push(r);var i=r.reactions;i===null?r.reactions=[z]:i.includes(z)||i.push(z)}}}else if(t&&r.deps===null&&r.effects===null){var s=r,o=s.parent;o!==null&&(o.f&Q)===0&&(s.f^=Q)}if($e){if(Ne.has(r))return Ne.get(r);if(t){s=r;var l=s.v;return((s.f&H)===0&&s.reactions!==null||La(s))&&(l=dr(s)),Ne.set(s,l),l}}else if(t){if(s=r,ve!=null&&ve.has(s))return ve.get(s);Zt(s)&&ia(s)}if((r.f&Ae)!==0)throw r.v;return r.v}function La(r){if(r.v===B)return!0;if(r.deps===null)return!1;for(const e of r.deps)if(Ne.has(e)||(e.f&X)!==0&&La(e))return!0;return!1}function di(r){var e=ue;try{return ue=!0,r()}finally{ue=e}}const pi=-7169;function te(r,e){r.f=r.f&pi|e}const fi=["touchstart","touchmove"];function hi(r){return fi.includes(r)}const mi=new Set,Pa=new Set;function Ft(r){var C;var e=this,t=e.ownerDocument,a=r.type,n=((C=r.composedPath)==null?void 0:C.call(r))||[],i=n[0]||r.target,s=0,o=r.__root;if(o){var l=n.indexOf(o);if(l!==-1&&(e===document||e===window)){r.__root=e;return}var u=n.indexOf(e);if(u===-1)return;l<=u&&(s=l)}if(i=n[s]||r.target,i!==e){tr(r,"currentTarget",{configurable:!0,get(){return i||t}});var c=z,f=T;_e(null),qe(null);try{for(var h,y=[];i!==null;){var b=i.assignedSlot||i.parentNode||i.host||null;try{var P=i["__"+a];if(P!=null&&(!i.disabled||r.target===i))if(O(P)){var[R,...ae]=P;R.apply(i,[r,...ae])}else P.call(i,r)}catch(W){h?y.push(W):h=W}if(r.cancelBubble||b===e||b===null)break;i=b}if(h){for(let W of y)queueMicrotask(()=>{throw W});throw h}}finally{r.__root=e,delete r.currentTarget,_e(c),qe(f)}}}function yi(r){var e=document.createElement("template");return e.innerHTML=r.replaceAll("<!>","<!---->"),e.content}function gi(r,e){var t=T;t.nodes_start===null&&(t.nodes_start=r,t.nodes_end=e)}function Ra(r,e){var t=(e&jn)!==0,a,n=!r.startsWith("<!>");return()=>{a===void 0&&(a=yi(n?r:"<!>"+r),a=ya(a));var i=t||fa?document.importNode(a,!0):a.cloneNode(!0);return gi(i,i),i}}function Oa(r,e){r!==null&&r.before(e)}function gr(r,e){return vi(r,e)}const We=new Map;function vi(r,{target:e,anchor:t,props:a={},events:n,context:i,intro:s=!0}){Gn();var o=new Set,l=f=>{for(var h=0;h<f.length;h++){var y=f[h];if(!o.has(y)){o.add(y);var b=hi(y);e.addEventListener(y,Ft,{passive:b});var P=We.get(y);P===void 0?(document.addEventListener(y,Ft,{passive:b}),We.set(y,1)):We.set(y,P+1)}}};l(_n(mi)),Pa.add(l);var u=void 0,c=ei(()=>{var f=t??e.appendChild(Xn());return ai(()=>{if(i){lr({});var h=ie;h.c=i}n&&(a.$$events=n),u=r(f,a)||{},i&&ur()}),()=>{var b;for(var h of o){e.removeEventListener(h,Ft);var y=We.get(h);--y===0?(document.removeEventListener(h,Ft),We.delete(h)):We.set(h,y)}Pa.delete(l),f!==t&&((b=f.parentNode)==null||b.removeChild(f))}});return _i.set(u,c),u}let _i=new WeakMap;const ja=[...`
|
|
2
|
+
\r\f \v\uFEFF`];function xi(r,e,t){var a=r==null?"":""+r;if(t){for(var n in t)if(t[n])a=a?a+" "+n:n;else if(a.length)for(var i=n.length,s=0;(s=a.indexOf(n,s))>=0;){var o=s+i;(s===0||ja.includes(a[s-1]))&&(o===a.length||ja.includes(a[o]))?a=(s===0?"":a.substring(0,s))+a.substring(o+1):s=o}}return a===""?null:a}function Ia(r,e=!1){var t=e?" !important;":";",a="";for(var n in r){var i=r[n];i!=null&&i!==""&&(a+=" "+n+": "+i+t)}return a}function vr(r){return r[0]!=="-"||r[1]!=="-"?r.toLowerCase():r}function wi(r,e){if(e){var t="",a,n;if(Array.isArray(e)?(a=e[0],n=e[1]):a=e,r){r=String(r).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var i=!1,s=0,o=!1,l=[];a&&l.push(...Object.keys(a).map(vr)),n&&l.push(...Object.keys(n).map(vr));var u=0,c=-1;const P=r.length;for(var f=0;f<P;f++){var h=r[f];if(o?h==="/"&&r[f-1]==="*"&&(o=!1):i?i===h&&(i=!1):h==="/"&&r[f+1]==="*"?o=!0:h==='"'||h==="'"?i=h:h==="("?s++:h===")"&&s--,!o&&i===!1&&s===0){if(h===":"&&c===-1)c=f;else if(h===";"||f===P-1){if(c!==-1){var y=vr(r.substring(u,c).trim());if(!l.includes(y)){h!==";"&&f++;var b=r.substring(u,f).trim();t+=" "+b+";"}}u=f+1,c=-1}}}}return a&&(t+=Ia(a)),n&&(t+=Ia(n,!0)),t=t.trim(),t===""?null:t}return r==null?null:String(r)}function Za(r,e,t,a,n,i){var s=r.__className;if(s!==t||s===void 0){var o=xi(t,a,i);o==null?r.removeAttribute("class"):r.className=o,r.__className=t}else if(i&&n!==i)for(var l in i){var u=!!i[l];(n==null||u!==!!n[l])&&r.classList.toggle(l,u)}return i}function _r(r,e={},t,a){for(var n in t){var i=t[n];e[n]!==i&&(t[n]==null?r.style.removeProperty(n):r.style.setProperty(n,i,a))}}function Bt(r,e,t,a){var n=r.__style;if(n!==e){var i=wi(e,a);i==null?r.removeAttribute("style"):r.style.cssText=i,r.__style=e}else a&&(Array.isArray(a)?(_r(r,t==null?void 0:t[0],a[0]),_r(r,t==null?void 0:t[1],a[1],"important")):_r(r,t,a));return a}const bi=()=>performance.now(),ce={tick:r=>requestAnimationFrame(r),now:()=>bi(),tasks:new Set};function Da(){const r=ce.now();ce.tasks.forEach(e=>{e.c(r)||(ce.tasks.delete(e),e.f())}),ce.tasks.size!==0&&ce.tick(Da)}function ki(r){let e;return ce.tasks.size===0&&ce.tick(Da),{promise:new Promise(t=>{ce.tasks.add(e={c:r,f:t})}),abort(){ce.tasks.delete(e)}}}function Fa(r,e){return r===e||(r==null?void 0:r[Rt])===e}function He(r={},e,t,a){return ti(()=>{var n,i;return _a(()=>{n=i,i=[],di(()=>{r!==t(...i)&&(e(r,...i),n&&Fa(t(...n),r)&&e(null,...n))})}),()=>{Fn(()=>{i&&Fa(t(...i),r)&&e(null,...i)})}}),r}const Si="5";typeof window<"u"&&((cn=window.__svelte??(window.__svelte={})).v??(cn.v=new Set)).add(Si);function zi(r){return r}function xr(r){return-.5*(Math.cos(Math.PI*r)-1)}function Mi(r){const e=Math.cos(r*Math.PI*.5);return Math.abs(e)<1e-14?1:1-e}function Ei(r){return Math.sin(r*Math.PI/2)}const Ci=128,Ti=0,Ai=1,Ni=2;class Li{constructor(){p(this,"animationsStarted",!1);p(this,"animationsCount",0);p(this,"animationsLimit",Ci);p(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 a=t.animations;if(a!=null)for(let n=0;n<a.length;n++){const i=a[n];if(i!=null){for(const s of i.values())if(!s.executed&&(s.executed=!0,s.function(),this.animationsCount++,this.animationsCount==this.animationsLimit))return}}}}catch{}finally{window.requestAnimationFrame(this.tick.bind(this))}}equeue(e,t,a,n){let i=this.layers[e];i==null&&(i=this.layers[e]={animations:new Array});let s=i.animations[t];s==null&&(s=i.animations[t]=new Map);let o={id:a,priority:t,executed:!1,function:n};s.set(a,o),this.animationsStarted==!1&&(this.animationsStarted=!0,this.start())}clear(e,t){for(let a=0;a<this.layers.length;a++){let n=this.layers[a];if(n==null)continue;let i=n.animations[e];if(i==null)return;let s=i.get(t);if(s==null||s.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 we=new Li;function Ba(r){return Object.prototype.toString.call(r)==="[object Date]"}function wr(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 a=e.map((n,i)=>wr(r[i],n));return n=>a.map(i=>i(n))}if(t==="object"){if(!r||!e)throw new Error("Object cannot be null");if(Ba(r)&&Ba(e)){const i=r.getTime(),o=e.getTime()-i;return l=>new Date(i+l*o)}const a=Object.keys(e),n={};return a.forEach(i=>{n[i]=wr(r[i],e[i])}),i=>{const s={};return a.forEach(o=>{s[o]=n[o](i)}),s}}if(t==="number"){const a=e-r;return n=>r+n*a}return()=>e}const $r=class $r{constructor(e,t={}){F(this,he);F(this,st);F(this,Ct);F(this,Ze,null);V(this,he,Y(e)),V(this,st,Y(e)),V(this,Ct,t)}static of(e,t){const a=new $r(e(),t);return _a(()=>{a.set(e())}),a}set(e,t){var f;U(w(this,st),e);let{delay:a=0,duration:n=400,easing:i=zi,interpolate:s=wr}={...w(this,Ct),...t};if(n===0)return(f=w(this,Ze))==null||f.abort(),U(w(this,he),e),Promise.resolve();const o=ce.now()+a;let l,u=!1,c=w(this,Ze);return V(this,Ze,ki(h=>{if(h<o)return!0;if(!u){u=!0;const b=w(this,he).v;l=s(b,e),typeof n=="function"&&(n=n(b,e)),c==null||c.abort()}const y=h-o;return y>n?(U(w(this,he),e),!1):(U(w(this,he),l(i(y/n))),!0)})),w(this,Ze).promise}get current(){return j(w(this,he))}get target(){return j(w(this,st))}set target(e){this.set(e)}};he=new WeakMap,st=new WeakMap,Ct=new WeakMap,Ze=new WeakMap;let br=$r;class Vt{constructor(e,t){p(this,"value");p(this,"motion");this.value=e,this.motion=new br(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 Pi=Ra('<div><div class="body svelte-1nfn9j8"></div></div>');function Ri(r,e){lr(e,!0);let t,a;function n(){return a}let i=Y(!1);function s(C){U(i,C,!0)}function o(){return j(i)}let l=new Vt(0,{easing:xr});pe(()=>{u(l.motion.current)}),pe(()=>{j(i)==!1&&(l.snap(),we.clear(e.priority,e.id))});function u(C){t&&we.equeue(e.layer,e.priority,e.id,()=>{t.style.scale=C.toString(),t.style.filter=`brightness(${.25+.75*C})`,a.style.opacity=C.toString()})}function c(C){C!=l.value&&l.set(C,{duration:75})}function f(){return l.motion.current==0}function h(){return l.value}var y=Pi();let b,P;var R=yr(y);let ae;return He(R,C=>a=C,()=>a),He(y,C=>t=C,()=>t),xa((C,W,ne)=>{b=Za(y,1,"pin svelte-1nfn9j8",null,b,C),P=Bt(y,"",P,W),ae=Bt(R,"",ae,ne)},[()=>({displayed:j(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`})]),Oa(r,y),ur({getBody:n,setDisplayed:s,getDisplayed:o,setScale:c,getCollapsed:f,getScale:h})}var gt;(r=>{function e(t,a,n){const i=t/2,s=a/2,o=Math.sqrt(i*i+s*s),l=Math.atan(s/i)*(180/Math.PI),u=n*(Math.PI/180);return n<180?n<90?n<l?{x:0,y:o*Math.sin(u)-s}:{x:o*Math.cos(u)-i,y:0}:n<180-l?{x:o*Math.cos(u)-i,y:0}:{x:-t,y:o*Math.sin(u)-s}:n<270?n<180+l?{x:-t,y:o*Math.sin(u)-s}:{x:o*Math.cos(u)-i,y:-a}:n<360-l?{x:o*Math.cos(u)-i,y:-a}:{x:0,y:o*Math.sin(u)-s}}r.getOffsets=e})(gt||(gt={}));var Oi=Ra('<div><div class="pointer svelte-j5igi2"></div> <div class="bubble svelte-j5igi2"><div class="body svelte-j5igi2"></div></div></div>');function Va(r,e){lr(e,!0);let t,a,n,i;const s=e.width+2*e.margin,o=e.height+2*e.margin,l=()=>i;pe(()=>{n.style.width=`${e.margin*4}px`,n.style.height=`${e.margin*4}px`});let u=Y(!0);function c(L){U(u,L,!0)}function f(){return j(u)}let h=Y(!0);function y(L){U(h,L,!0)}function b(){return R.motion.current==0}function P(){return R.motion.current==1}let R=new Vt(0);pe(()=>{ae(R.motion.current)}),pe(()=>{j(u)==!1&&(R.snap(),we.clear(e.priority,e.id+"_scale"))}),pe(()=>{j(h)==!0&&R.value!=0&&(we.stacked()?R.set(0,{duration:0}):R.set(0,{duration:150,easing:Mi})),j(h)==!1&&R.value!=1&&R.set(1,{duration:150,easing:Ei})});function ae(L){!t||!a||!n||we.equeue(j(h)?0:e.layer,e.priority,e.id+"_scale",()=>{t.style.opacity=`${L}`,a.style.scale=`${L}`,n.style.scale=`${L}`})}let C=NaN,W=Y(!1),ne=new Vt(-s/2,{easing:xr}),Jt=new Vt(-o/2,{easing:xr});pe(()=>{dn(ne.motion.current,Jt.motion.current)}),pe(()=>{j(u)==!1&&(ne.snap(),ne.snap(),we.clear(e.priority,e.id+"_angle"))}),pe(()=>{j(h)==!0&&j(W)&&(ne.update({duration:75}),ne.update({duration:75}))});function dn(L,me){if(!t||!a||!n)return;const Qt=L+s/2,Tt=me+o/2,ut=o<s?Qt*o/s:Qt,Wr=o>s?Tt*s/o:Tt,Ts=Math.atan2(Wr,ut)/Math.PI*180-45,mn=0,As=30,Hr=Math.sqrt(ut*ut+Wr*Wr),At=Math.min(s,o)/2,Ns=At*Math.SQRT2,Ls=(Hr-At)/(Ns-At),yn=mn+Ls*(As-mn),Ps=Hr<At?Hr/At:1;we.equeue(e.layer,e.priority,e.id+"_angle",()=>{a.style.transform=`translate(${Math.round(L)}px, ${Math.round(me)}px)`,n.style.transform=`scale(${Ps}) rotate(${Ts}deg) skew(${yn}deg, ${yn}deg)`})}function Es(L){if(j(W)==!1){let me=gt.getOffsets(s,o,L);ne.set(Math.round(me.x),{duration:0}),Jt.set(Math.round(me.y),{duration:0}),dn(ne.value,Jt.value),C=L,U(W,!0)}else if(L!=C){let me=Math.abs(L-C),Qt=me<180?me:360-me,Tt=Math.log(Qt)*75,ut=gt.getOffsets(s,o,L);ne.set(Math.round(ut.x),{duration:Tt}),Jt.set(Math.round(ut.y),{duration:Tt}),C=L}}function Cs(){return gt.getOffsets(s,o,C)}var Kt=Oi();let pn;var fn=yr(Kt);He(fn,L=>n=L,()=>n);var qr=Jn(fn,2),hn=yr(qr);return He(hn,L=>i=L,()=>i),He(qr,L=>a=L,()=>a),He(Kt,L=>t=L,()=>t),xa(L=>{pn=Za(Kt,1,"anchor svelte-j5igi2",null,pn,L),Bt(qr,`margin: ${e.margin}px;`),Bt(hn,`width: ${e.width}px; height: ${e.height}px; border-radius: ${e.radius}px;`)},[()=>({displayed:j(u)})]),Oa(r,Kt),ur({getBody:l,setDisplayed:c,getDisplayed:f,setCollapsed:y,getCollapsed:b,getExpanded:P,setAngle:Es,getOffsets:Cs})}var Ye;(r=>{function e(o,l,u){return{x:a(l)*u,y:n(o)*u}}r.project=e;function t(o,l,u){return{lat:s(l/u),lng:i(o/u)}}r.unproject=t;function a(o){return(180+o)/360}function n(o){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+o*Math.PI/360)))/360}function i(o){return o*360-180}function s(o){return 360/Math.PI*Math.atan(Math.exp((180-o*360)*Math.PI/180))-90}})(Ye||(Ye={}));class Ua{constructor(e,t,a,n,i){p(this,"swLat");p(this,"swLng");p(this,"neLat");p(this,"neLng");const s=a*Math.pow(2,t),o=Ye.project(e.sw.lat,e.sw.lng,s),l=Ye.project(e.ne.lat,e.ne.lng,s),u=o.x-n,c=o.y+i,f=l.x+n,h=l.y-i,y=Ye.unproject(u,c,s),b=Ye.unproject(f,h,s);this.swLat=y.lat,this.swLng=y.lng,this.neLat=b.lat,this.neLng=b.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 E;(function(r){r.assertEqual=n=>{};function e(n){}r.assertIs=e;function t(n){throw new Error}r.assertNever=t,r.arrayToEnum=n=>{const i={};for(const s of n)i[s]=s;return i},r.getValidEnumValues=n=>{const i=r.objectKeys(n).filter(o=>typeof n[n[o]]!="number"),s={};for(const o of i)s[o]=n[o];return r.objectValues(s)},r.objectValues=n=>r.objectKeys(n).map(function(i){return n[i]}),r.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{const i=[];for(const s in n)Object.prototype.hasOwnProperty.call(n,s)&&i.push(s);return i},r.find=(n,i)=>{for(const s of n)if(i(s))return s},r.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function a(n,i=" | "){return n.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}r.joinValues=a,r.jsonStringifyReplacer=(n,i)=>typeof i=="bigint"?i.toString():i})(E||(E={}));var $a;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})($a||($a={}));const g=E.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),be=r=>{switch(typeof r){case"undefined":return g.undefined;case"string":return g.string;case"number":return Number.isNaN(r)?g.nan:g.number;case"boolean":return g.boolean;case"function":return g.function;case"bigint":return g.bigint;case"symbol":return g.symbol;case"object":return Array.isArray(r)?g.array:r===null?g.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?g.promise:typeof Map<"u"&&r instanceof Map?g.map:typeof Set<"u"&&r instanceof Set?g.set:typeof Date<"u"&&r instanceof Date?g.date:g.object;default:return g.unknown}},d=E.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 re extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=a=>{this.issues=[...this.issues,a]},this.addIssues=(a=[])=>{this.issues=[...this.issues,...a]};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},a={_errors:[]},n=i=>{for(const s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(n);else if(s.code==="invalid_return_type")n(s.returnTypeError);else if(s.code==="invalid_arguments")n(s.argumentsError);else if(s.path.length===0)a._errors.push(t(s));else{let o=a,l=0;for(;l<s.path.length;){const u=s.path[l];l===s.path.length-1?(o[u]=o[u]||{_errors:[]},o[u]._errors.push(t(s))):o[u]=o[u]||{_errors:[]},o=o[u],l++}}};return n(this),a}static assert(e){if(!(e instanceof re))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,E.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},a=[];for(const n of this.issues)if(n.path.length>0){const i=n.path[0];t[i]=t[i]||[],t[i].push(e(n))}else a.push(e(n));return{formErrors:a,fieldErrors:t}}get formErrors(){return this.flatten()}}re.create=r=>new re(r);const vt=(r,e)=>{let t;switch(r.code){case d.invalid_type:r.received===g.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case d.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,E.jsonStringifyReplacer)}`;break;case d.unrecognized_keys:t=`Unrecognized key(s) in object: ${E.joinValues(r.keys,", ")}`;break;case d.invalid_union:t="Invalid input";break;case d.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${E.joinValues(r.options)}`;break;case d.invalid_enum_value:t=`Invalid enum value. Expected ${E.joinValues(r.options)}, received '${r.received}'`;break;case d.invalid_arguments:t="Invalid function arguments";break;case d.invalid_return_type:t="Invalid function return type";break;case d.invalid_date:t="Invalid date";break;case d.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}"`:E.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case d.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 d.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 d.custom:t="Invalid input";break;case d.invalid_intersection_types:t="Intersection results could not be merged";break;case d.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;case d.not_finite:t="Number must be finite";break;default:t=e.defaultError,E.assertNever(r)}return{message:t}};let ji=vt;function kr(){return ji}const Sr=r=>{const{data:e,path:t,errorMaps:a,issueData:n}=r,i=[...t,...n.path||[]],s={...n,path:i};if(n.message!==void 0)return{...n,path:i,message:n.message};let o="";const l=a.filter(u=>!!u).slice().reverse();for(const u of l)o=u(s,{data:e,defaultError:o}).message;return{...n,path:i,message:o}};function m(r,e){const t=kr(),a=Sr({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t,t===vt?void 0:vt].filter(n=>!!n)});r.common.issues.push(a)}class K{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const a=[];for(const n of t){if(n.status==="aborted")return _;n.status==="dirty"&&e.dirty(),a.push(n.value)}return{status:e.value,value:a}}static async mergeObjectAsync(e,t){const a=[];for(const n of t){const i=await n.key,s=await n.value;a.push({key:i,value:s})}return K.mergeObjectSync(e,a)}static mergeObjectSync(e,t){const a={};for(const n of t){const{key:i,value:s}=n;if(i.status==="aborted"||s.status==="aborted")return _;i.status==="dirty"&&e.dirty(),s.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||n.alwaysSet)&&(a[i.value]=s.value)}return{status:e.value,value:a}}}const _=Object.freeze({status:"aborted"}),_t=r=>({status:"dirty",value:r}),G=r=>({status:"valid",value:r}),qa=r=>r.status==="aborted",Wa=r=>r.status==="dirty",Ge=r=>r.status==="valid",Ut=r=>typeof Promise<"u"&&r instanceof Promise;var v;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(v||(v={}));class ke{constructor(e,t,a,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=a,this._key=n}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 Ha=(r,e)=>{if(Ge(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 re(r.common.issues);return this._error=t,this._error}}};function k(r){if(!r)return{};const{errorMap:e,invalid_type_error:t,required_error:a,description:n}=r;if(e&&(t||a))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(s,o)=>{const{message:l}=r;return s.code==="invalid_enum_value"?{message:l??o.defaultError}:typeof o.data>"u"?{message:l??a??o.defaultError}:s.code!=="invalid_type"?{message:o.defaultError}:{message:l??t??o.defaultError}},description:n}}class M{get description(){return this._def.description}_getType(e){return be(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:be(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new K,ctx:{common:e.parent.common,data:e.data,parsedType:be(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(Ut(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 a=this.safeParse(e,t);if(a.success)return a.data;throw a.error}safeParse(e,t){const a={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:be(e)},n=this._parseSync({data:e,path:a.path,parent:a});return Ha(a,n)}"~validate"(e){var a,n;const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:be(e)};if(!this["~standard"].async)try{const i=this._parseSync({data:e,path:[],parent:t});return Ge(i)?{value:i.value}:{issues:t.common.issues}}catch(i){(n=(a=i==null?void 0:i.message)==null?void 0:a.toLowerCase())!=null&&n.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(i=>Ge(i)?{value:i.value}:{issues:t.common.issues})}async parseAsync(e,t){const a=await this.safeParseAsync(e,t);if(a.success)return a.data;throw a.error}async safeParseAsync(e,t){const a={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:be(e)},n=this._parse({data:e,path:a.path,parent:a}),i=await(Ut(n)?n:Promise.resolve(n));return Ha(a,i)}refine(e,t){const a=n=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(n):t;return this._refinement((n,i)=>{const s=e(n),o=()=>i.addIssue({code:d.custom,...a(n)});return typeof Promise<"u"&&s instanceof Promise?s.then(l=>l?!0:(o(),!1)):s?!0:(o(),!1)})}refinement(e,t){return this._refinement((a,n)=>e(a)?!0:(n.addIssue(typeof t=="function"?t(a,n):t),!1))}_refinement(e){return new et({schema:this,typeName:x.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 Me.create(this,this._def)}nullable(){return tt.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return de.create(this)}promise(){return kt.create(this,this._def)}or(e){return qt.create([this,e],this._def)}and(e){return Wt.create(this,e,this._def)}transform(e){return new et({...k(this._def),schema:this,typeName:x.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new Ar({...k(this._def),innerType:this,defaultValue:t,typeName:x.ZodDefault})}brand(){return new is({typeName:x.ZodBranded,type:this,...k(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new Nr({...k(this._def),innerType:this,catchValue:t,typeName:x.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return Lr.create(this,e)}readonly(){return Pr.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Ii=/^c[^\s-]{8,}$/i,Zi=/^[0-9a-z]+$/,Di=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Fi=/^[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,Bi=/^[a-z0-9_-]{21}$/i,Vi=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Ui=/^[-+]?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)?)??$/,$i=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,qi="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let zr;const Wi=/^(?:(?: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])$/,Hi=/^(?:(?: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])$/,Yi=/^(([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]))$/,Gi=/^(([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])$/,Xi=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Ji=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Ya="((\\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])))",Ki=new RegExp(`^${Ya}$`);function Ga(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 Qi(r){return new RegExp(`^${Ga(r)}$`)}function es(r){let e=`${Ya}T${Ga(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 ts(r,e){return!!((e==="v4"||!e)&&Wi.test(r)||(e==="v6"||!e)&&Yi.test(r))}function rs(r,e){if(!Vi.test(r))return!1;try{const[t]=r.split(".");if(!t)return!1;const a=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),n=JSON.parse(atob(a));return!(typeof n!="object"||n===null||"typ"in n&&(n==null?void 0:n.typ)!=="JWT"||!n.alg||e&&n.alg!==e)}catch{return!1}}function as(r,e){return!!((e==="v4"||!e)&&Hi.test(r)||(e==="v6"||!e)&&Gi.test(r))}class Se extends M{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==g.string){const i=this._getOrReturnCtx(e);return m(i,{code:d.invalid_type,expected:g.string,received:i.parsedType}),_}const a=new K;let n;for(const i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(n=this._getOrReturnCtx(e,n),m(n,{code:d.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),a.dirty());else if(i.kind==="max")e.data.length>i.value&&(n=this._getOrReturnCtx(e,n),m(n,{code:d.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),a.dirty());else if(i.kind==="length"){const s=e.data.length>i.value,o=e.data.length<i.value;(s||o)&&(n=this._getOrReturnCtx(e,n),s?m(n,{code:d.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):o&&m(n,{code:d.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),a.dirty())}else if(i.kind==="email")$i.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"email",code:d.invalid_string,message:i.message}),a.dirty());else if(i.kind==="emoji")zr||(zr=new RegExp(qi,"u")),zr.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"emoji",code:d.invalid_string,message:i.message}),a.dirty());else if(i.kind==="uuid")Fi.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"uuid",code:d.invalid_string,message:i.message}),a.dirty());else if(i.kind==="nanoid")Bi.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"nanoid",code:d.invalid_string,message:i.message}),a.dirty());else if(i.kind==="cuid")Ii.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"cuid",code:d.invalid_string,message:i.message}),a.dirty());else if(i.kind==="cuid2")Zi.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"cuid2",code:d.invalid_string,message:i.message}),a.dirty());else if(i.kind==="ulid")Di.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"ulid",code:d.invalid_string,message:i.message}),a.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),m(n,{validation:"url",code:d.invalid_string,message:i.message}),a.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"regex",code:d.invalid_string,message:i.message}),a.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(n=this._getOrReturnCtx(e,n),m(n,{code:d.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),a.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)||(n=this._getOrReturnCtx(e,n),m(n,{code:d.invalid_string,validation:{startsWith:i.value},message:i.message}),a.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(n=this._getOrReturnCtx(e,n),m(n,{code:d.invalid_string,validation:{endsWith:i.value},message:i.message}),a.dirty()):i.kind==="datetime"?es(i).test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{code:d.invalid_string,validation:"datetime",message:i.message}),a.dirty()):i.kind==="date"?Ki.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{code:d.invalid_string,validation:"date",message:i.message}),a.dirty()):i.kind==="time"?Qi(i).test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{code:d.invalid_string,validation:"time",message:i.message}),a.dirty()):i.kind==="duration"?Ui.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"duration",code:d.invalid_string,message:i.message}),a.dirty()):i.kind==="ip"?ts(e.data,i.version)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"ip",code:d.invalid_string,message:i.message}),a.dirty()):i.kind==="jwt"?rs(e.data,i.alg)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"jwt",code:d.invalid_string,message:i.message}),a.dirty()):i.kind==="cidr"?as(e.data,i.version)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"cidr",code:d.invalid_string,message:i.message}),a.dirty()):i.kind==="base64"?Xi.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"base64",code:d.invalid_string,message:i.message}),a.dirty()):i.kind==="base64url"?Ji.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"base64url",code:d.invalid_string,message:i.message}),a.dirty()):E.assertNever(i);return{status:a.value,value:e.data}}_regex(e,t,a){return this.refinement(n=>e.test(n),{validation:t,code:d.invalid_string,...v.errToObj(a)})}_addCheck(e){return new Se({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...v.errToObj(e)})}url(e){return this._addCheck({kind:"url",...v.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...v.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...v.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...v.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...v.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...v.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...v.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...v.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...v.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...v.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...v.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...v.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,...v.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,...v.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...v.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...v.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...v.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...v.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...v.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...v.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...v.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...v.errToObj(t)})}nonempty(e){return this.min(1,v.errToObj(e))}trim(){return new Se({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Se({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Se({...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}}Se.create=r=>new Se({checks:[],typeName:x.ZodString,coerce:(r==null?void 0:r.coerce)??!1,...k(r)});function ns(r,e){const t=(r.toString().split(".")[1]||"").length,a=(e.toString().split(".")[1]||"").length,n=t>a?t:a,i=Number.parseInt(r.toFixed(n).replace(".","")),s=Number.parseInt(e.toFixed(n).replace(".",""));return i%s/10**n}class Xe extends M{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)!==g.number){const i=this._getOrReturnCtx(e);return m(i,{code:d.invalid_type,expected:g.number,received:i.parsedType}),_}let a;const n=new K;for(const i of this._def.checks)i.kind==="int"?E.isInteger(e.data)||(a=this._getOrReturnCtx(e,a),m(a,{code:d.invalid_type,expected:"integer",received:"float",message:i.message}),n.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(a=this._getOrReturnCtx(e,a),m(a,{code:d.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(a=this._getOrReturnCtx(e,a),m(a,{code:d.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind==="multipleOf"?ns(e.data,i.value)!==0&&(a=this._getOrReturnCtx(e,a),m(a,{code:d.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(a=this._getOrReturnCtx(e,a),m(a,{code:d.not_finite,message:i.message}),n.dirty()):E.assertNever(i);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,v.toString(t))}gt(e,t){return this.setLimit("min",e,!1,v.toString(t))}lte(e,t){return this.setLimit("max",e,!0,v.toString(t))}lt(e,t){return this.setLimit("max",e,!1,v.toString(t))}setLimit(e,t,a,n){return new Xe({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:v.toString(n)}]})}_addCheck(e){return new Xe({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:v.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:v.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:v.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:v.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:v.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:v.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:v.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:v.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:v.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"&&E.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const a of this._def.checks){if(a.kind==="finite"||a.kind==="int"||a.kind==="multipleOf")return!0;a.kind==="min"?(t===null||a.value>t)&&(t=a.value):a.kind==="max"&&(e===null||a.value<e)&&(e=a.value)}return Number.isFinite(t)&&Number.isFinite(e)}}Xe.create=r=>new Xe({checks:[],typeName:x.ZodNumber,coerce:(r==null?void 0:r.coerce)||!1,...k(r)});class xt extends M{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)!==g.bigint)return this._getInvalidInput(e);let a;const n=new K;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(a=this._getOrReturnCtx(e,a),m(a,{code:d.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(a=this._getOrReturnCtx(e,a),m(a,{code:d.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(a=this._getOrReturnCtx(e,a),m(a,{code:d.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):E.assertNever(i);return{status:n.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return m(t,{code:d.invalid_type,expected:g.bigint,received:t.parsedType}),_}gte(e,t){return this.setLimit("min",e,!0,v.toString(t))}gt(e,t){return this.setLimit("min",e,!1,v.toString(t))}lte(e,t){return this.setLimit("max",e,!0,v.toString(t))}lt(e,t){return this.setLimit("max",e,!1,v.toString(t))}setLimit(e,t,a,n){return new xt({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:v.toString(n)}]})}_addCheck(e){return new xt({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:v.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:v.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:v.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:v.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:v.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}}xt.create=r=>new xt({checks:[],typeName:x.ZodBigInt,coerce:(r==null?void 0:r.coerce)??!1,...k(r)});class Mr extends M{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==g.boolean){const a=this._getOrReturnCtx(e);return m(a,{code:d.invalid_type,expected:g.boolean,received:a.parsedType}),_}return G(e.data)}}Mr.create=r=>new Mr({typeName:x.ZodBoolean,coerce:(r==null?void 0:r.coerce)||!1,...k(r)});class $t extends M{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==g.date){const i=this._getOrReturnCtx(e);return m(i,{code:d.invalid_type,expected:g.date,received:i.parsedType}),_}if(Number.isNaN(e.data.getTime())){const i=this._getOrReturnCtx(e);return m(i,{code:d.invalid_date}),_}const a=new K;let n;for(const i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(n=this._getOrReturnCtx(e,n),m(n,{code:d.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),a.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(n=this._getOrReturnCtx(e,n),m(n,{code:d.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),a.dirty()):E.assertNever(i);return{status:a.value,value:new Date(e.data.getTime())}}_addCheck(e){return new $t({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:v.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:v.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}}$t.create=r=>new $t({checks:[],coerce:(r==null?void 0:r.coerce)||!1,typeName:x.ZodDate,...k(r)});class Xa extends M{_parse(e){if(this._getType(e)!==g.symbol){const a=this._getOrReturnCtx(e);return m(a,{code:d.invalid_type,expected:g.symbol,received:a.parsedType}),_}return G(e.data)}}Xa.create=r=>new Xa({typeName:x.ZodSymbol,...k(r)});class Ja extends M{_parse(e){if(this._getType(e)!==g.undefined){const a=this._getOrReturnCtx(e);return m(a,{code:d.invalid_type,expected:g.undefined,received:a.parsedType}),_}return G(e.data)}}Ja.create=r=>new Ja({typeName:x.ZodUndefined,...k(r)});class Ka extends M{_parse(e){if(this._getType(e)!==g.null){const a=this._getOrReturnCtx(e);return m(a,{code:d.invalid_type,expected:g.null,received:a.parsedType}),_}return G(e.data)}}Ka.create=r=>new Ka({typeName:x.ZodNull,...k(r)});class Er extends M{constructor(){super(...arguments),this._any=!0}_parse(e){return G(e.data)}}Er.create=r=>new Er({typeName:x.ZodAny,...k(r)});class Je extends M{constructor(){super(...arguments),this._unknown=!0}_parse(e){return G(e.data)}}Je.create=r=>new Je({typeName:x.ZodUnknown,...k(r)});class ze extends M{_parse(e){const t=this._getOrReturnCtx(e);return m(t,{code:d.invalid_type,expected:g.never,received:t.parsedType}),_}}ze.create=r=>new ze({typeName:x.ZodNever,...k(r)});class Cr extends M{_parse(e){if(this._getType(e)!==g.undefined){const a=this._getOrReturnCtx(e);return m(a,{code:d.invalid_type,expected:g.void,received:a.parsedType}),_}return G(e.data)}}Cr.create=r=>new Cr({typeName:x.ZodVoid,...k(r)});class de extends M{_parse(e){const{ctx:t,status:a}=this._processInputParams(e),n=this._def;if(t.parsedType!==g.array)return m(t,{code:d.invalid_type,expected:g.array,received:t.parsedType}),_;if(n.exactLength!==null){const s=t.data.length>n.exactLength.value,o=t.data.length<n.exactLength.value;(s||o)&&(m(t,{code:s?d.too_big:d.too_small,minimum:o?n.exactLength.value:void 0,maximum:s?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),a.dirty())}if(n.minLength!==null&&t.data.length<n.minLength.value&&(m(t,{code:d.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),a.dirty()),n.maxLength!==null&&t.data.length>n.maxLength.value&&(m(t,{code:d.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),a.dirty()),t.common.async)return Promise.all([...t.data].map((s,o)=>n.type._parseAsync(new ke(t,s,t.path,o)))).then(s=>K.mergeArray(a,s));const i=[...t.data].map((s,o)=>n.type._parseSync(new ke(t,s,t.path,o)));return K.mergeArray(a,i)}get element(){return this._def.type}min(e,t){return new de({...this._def,minLength:{value:e,message:v.toString(t)}})}max(e,t){return new de({...this._def,maxLength:{value:e,message:v.toString(t)}})}length(e,t){return new de({...this._def,exactLength:{value:e,message:v.toString(t)}})}nonempty(e){return this.min(1,e)}}de.create=(r,e)=>new de({type:r,minLength:null,maxLength:null,exactLength:null,typeName:x.ZodArray,...k(e)});function Ke(r){if(r instanceof I){const e={};for(const t in r.shape){const a=r.shape[t];e[t]=Me.create(Ke(a))}return new I({...r._def,shape:()=>e})}else return r instanceof de?new de({...r._def,type:Ke(r.element)}):r instanceof Me?Me.create(Ke(r.unwrap())):r instanceof tt?tt.create(Ke(r.unwrap())):r instanceof fe?fe.create(r.items.map(e=>Ke(e))):r}class I extends M{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=E.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==g.object){const u=this._getOrReturnCtx(e);return m(u,{code:d.invalid_type,expected:g.object,received:u.parsedType}),_}const{status:a,ctx:n}=this._processInputParams(e),{shape:i,keys:s}=this._getCached(),o=[];if(!(this._def.catchall instanceof ze&&this._def.unknownKeys==="strip"))for(const u in n.data)s.includes(u)||o.push(u);const l=[];for(const u of s){const c=i[u],f=n.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new ke(n,f,n.path,u)),alwaysSet:u in n.data})}if(this._def.catchall instanceof ze){const u=this._def.unknownKeys;if(u==="passthrough")for(const c of o)l.push({key:{status:"valid",value:c},value:{status:"valid",value:n.data[c]}});else if(u==="strict")o.length>0&&(m(n,{code:d.unrecognized_keys,keys:o}),a.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const c of o){const f=n.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new ke(n,f,n.path,c)),alwaysSet:c in n.data})}}return n.common.async?Promise.resolve().then(async()=>{const u=[];for(const c of l){const f=await c.key,h=await c.value;u.push({key:f,value:h,alwaysSet:c.alwaysSet})}return u}).then(u=>K.mergeObjectSync(a,u)):K.mergeObjectSync(a,l)}get shape(){return this._def.shape()}strict(e){return v.errToObj,new I({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,a)=>{var i,s;const n=((s=(i=this._def).errorMap)==null?void 0:s.call(i,t,a).message)??a.defaultError;return t.code==="unrecognized_keys"?{message:v.errToObj(e).message??n}:{message:n}}}:{}})}strip(){return new I({...this._def,unknownKeys:"strip"})}passthrough(){return new I({...this._def,unknownKeys:"passthrough"})}extend(e){return new I({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new I({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:x.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new I({...this._def,catchall:e})}pick(e){const t={};for(const a of E.objectKeys(e))e[a]&&this.shape[a]&&(t[a]=this.shape[a]);return new I({...this._def,shape:()=>t})}omit(e){const t={};for(const a of E.objectKeys(this.shape))e[a]||(t[a]=this.shape[a]);return new I({...this._def,shape:()=>t})}deepPartial(){return Ke(this)}partial(e){const t={};for(const a of E.objectKeys(this.shape)){const n=this.shape[a];e&&!e[a]?t[a]=n:t[a]=n.optional()}return new I({...this._def,shape:()=>t})}required(e){const t={};for(const a of E.objectKeys(this.shape))if(e&&!e[a])t[a]=this.shape[a];else{let i=this.shape[a];for(;i instanceof Me;)i=i._def.innerType;t[a]=i}return new I({...this._def,shape:()=>t})}keyof(){return rn(E.objectKeys(this.shape))}}I.create=(r,e)=>new I({shape:()=>r,unknownKeys:"strip",catchall:ze.create(),typeName:x.ZodObject,...k(e)}),I.strictCreate=(r,e)=>new I({shape:()=>r,unknownKeys:"strict",catchall:ze.create(),typeName:x.ZodObject,...k(e)}),I.lazycreate=(r,e)=>new I({shape:r,unknownKeys:"strip",catchall:ze.create(),typeName:x.ZodObject,...k(e)});class qt extends M{_parse(e){const{ctx:t}=this._processInputParams(e),a=this._def.options;function n(i){for(const o of i)if(o.result.status==="valid")return o.result;for(const o of i)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;const s=i.map(o=>new re(o.ctx.common.issues));return m(t,{code:d.invalid_union,unionErrors:s}),_}if(t.common.async)return Promise.all(a.map(async i=>{const s={...t,common:{...t.common,issues:[]},parent:null};return{result:await i._parseAsync({data:t.data,path:t.path,parent:s}),ctx:s}})).then(n);{let i;const s=[];for(const l of a){const u={...t,common:{...t.common,issues:[]},parent:null},c=l._parseSync({data:t.data,path:t.path,parent:u});if(c.status==="valid")return c;c.status==="dirty"&&!i&&(i={result:c,ctx:u}),u.common.issues.length&&s.push(u.common.issues)}if(i)return t.common.issues.push(...i.ctx.common.issues),i.result;const o=s.map(l=>new re(l));return m(t,{code:d.invalid_union,unionErrors:o}),_}}get options(){return this._def.options}}qt.create=(r,e)=>new qt({options:r,typeName:x.ZodUnion,...k(e)});function Tr(r,e){const t=be(r),a=be(e);if(r===e)return{valid:!0,data:r};if(t===g.object&&a===g.object){const n=E.objectKeys(e),i=E.objectKeys(r).filter(o=>n.indexOf(o)!==-1),s={...r,...e};for(const o of i){const l=Tr(r[o],e[o]);if(!l.valid)return{valid:!1};s[o]=l.data}return{valid:!0,data:s}}else if(t===g.array&&a===g.array){if(r.length!==e.length)return{valid:!1};const n=[];for(let i=0;i<r.length;i++){const s=r[i],o=e[i],l=Tr(s,o);if(!l.valid)return{valid:!1};n.push(l.data)}return{valid:!0,data:n}}else return t===g.date&&a===g.date&&+r==+e?{valid:!0,data:r}:{valid:!1}}class Wt extends M{_parse(e){const{status:t,ctx:a}=this._processInputParams(e),n=(i,s)=>{if(qa(i)||qa(s))return _;const o=Tr(i.value,s.value);return o.valid?((Wa(i)||Wa(s))&&t.dirty(),{status:t.value,value:o.data}):(m(a,{code:d.invalid_intersection_types}),_)};return a.common.async?Promise.all([this._def.left._parseAsync({data:a.data,path:a.path,parent:a}),this._def.right._parseAsync({data:a.data,path:a.path,parent:a})]).then(([i,s])=>n(i,s)):n(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}}Wt.create=(r,e,t)=>new Wt({left:r,right:e,typeName:x.ZodIntersection,...k(t)});class fe extends M{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==g.array)return m(a,{code:d.invalid_type,expected:g.array,received:a.parsedType}),_;if(a.data.length<this._def.items.length)return m(a,{code:d.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),_;!this._def.rest&&a.data.length>this._def.items.length&&(m(a,{code:d.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const i=[...a.data].map((s,o)=>{const l=this._def.items[o]||this._def.rest;return l?l._parse(new ke(a,s,a.path,o)):null}).filter(s=>!!s);return a.common.async?Promise.all(i).then(s=>K.mergeArray(t,s)):K.mergeArray(t,i)}get items(){return this._def.items}rest(e){return new fe({...this._def,rest:e})}}fe.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new fe({items:r,typeName:x.ZodTuple,rest:null,...k(e)})};class Qa extends M{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==g.map)return m(a,{code:d.invalid_type,expected:g.map,received:a.parsedType}),_;const n=this._def.keyType,i=this._def.valueType,s=[...a.data.entries()].map(([o,l],u)=>({key:n._parse(new ke(a,o,a.path,[u,"key"])),value:i._parse(new ke(a,l,a.path,[u,"value"]))}));if(a.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const l of s){const u=await l.key,c=await l.value;if(u.status==="aborted"||c.status==="aborted")return _;(u.status==="dirty"||c.status==="dirty")&&t.dirty(),o.set(u.value,c.value)}return{status:t.value,value:o}})}else{const o=new Map;for(const l of s){const u=l.key,c=l.value;if(u.status==="aborted"||c.status==="aborted")return _;(u.status==="dirty"||c.status==="dirty")&&t.dirty(),o.set(u.value,c.value)}return{status:t.value,value:o}}}}Qa.create=(r,e,t)=>new Qa({valueType:e,keyType:r,typeName:x.ZodMap,...k(t)});class wt extends M{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==g.set)return m(a,{code:d.invalid_type,expected:g.set,received:a.parsedType}),_;const n=this._def;n.minSize!==null&&a.data.size<n.minSize.value&&(m(a,{code:d.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),n.maxSize!==null&&a.data.size>n.maxSize.value&&(m(a,{code:d.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());const i=this._def.valueType;function s(l){const u=new Set;for(const c of l){if(c.status==="aborted")return _;c.status==="dirty"&&t.dirty(),u.add(c.value)}return{status:t.value,value:u}}const o=[...a.data.values()].map((l,u)=>i._parse(new ke(a,l,a.path,u)));return a.common.async?Promise.all(o).then(l=>s(l)):s(o)}min(e,t){return new wt({...this._def,minSize:{value:e,message:v.toString(t)}})}max(e,t){return new wt({...this._def,maxSize:{value:e,message:v.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}wt.create=(r,e)=>new wt({valueType:r,minSize:null,maxSize:null,typeName:x.ZodSet,...k(e)});class bt extends M{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==g.function)return m(t,{code:d.invalid_type,expected:g.function,received:t.parsedType}),_;function a(o,l){return Sr({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,kr(),vt].filter(u=>!!u),issueData:{code:d.invalid_arguments,argumentsError:l}})}function n(o,l){return Sr({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,kr(),vt].filter(u=>!!u),issueData:{code:d.invalid_return_type,returnTypeError:l}})}const i={errorMap:t.common.contextualErrorMap},s=t.data;if(this._def.returns instanceof kt){const o=this;return G(async function(...l){const u=new re([]),c=await o._def.args.parseAsync(l,i).catch(y=>{throw u.addIssue(a(l,y)),u}),f=await Reflect.apply(s,this,c);return await o._def.returns._def.type.parseAsync(f,i).catch(y=>{throw u.addIssue(n(f,y)),u})})}else{const o=this;return G(function(...l){const u=o._def.args.safeParse(l,i);if(!u.success)throw new re([a(l,u.error)]);const c=Reflect.apply(s,this,u.data),f=o._def.returns.safeParse(c,i);if(!f.success)throw new re([n(c,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new bt({...this._def,args:fe.create(e).rest(Je.create())})}returns(e){return new bt({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,a){return new bt({args:e||fe.create([]).rest(Je.create()),returns:t||Je.create(),typeName:x.ZodFunction,...k(a)})}}class en extends M{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})}}en.create=(r,e)=>new en({getter:r,typeName:x.ZodLazy,...k(e)});class tn extends M{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return m(t,{received:t.data,code:d.invalid_literal,expected:this._def.value}),_}return{status:"valid",value:e.data}}get value(){return this._def.value}}tn.create=(r,e)=>new tn({value:r,typeName:x.ZodLiteral,...k(e)});function rn(r,e){return new Qe({values:r,typeName:x.ZodEnum,...k(e)})}class Qe extends M{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),a=this._def.values;return m(t,{expected:E.joinValues(a),received:t.parsedType,code:d.invalid_type}),_}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),a=this._def.values;return m(t,{received:t.data,code:d.invalid_enum_value,options:a}),_}return G(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 Qe.create(e,{...this._def,...t})}exclude(e,t=this._def){return Qe.create(this.options.filter(a=>!e.includes(a)),{...this._def,...t})}}Qe.create=rn;class an extends M{_parse(e){const t=E.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(e);if(a.parsedType!==g.string&&a.parsedType!==g.number){const n=E.objectValues(t);return m(a,{expected:E.joinValues(n),received:a.parsedType,code:d.invalid_type}),_}if(this._cache||(this._cache=new Set(E.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const n=E.objectValues(t);return m(a,{received:a.data,code:d.invalid_enum_value,options:n}),_}return G(e.data)}get enum(){return this._def.values}}an.create=(r,e)=>new an({values:r,typeName:x.ZodNativeEnum,...k(e)});class kt extends M{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==g.promise&&t.common.async===!1)return m(t,{code:d.invalid_type,expected:g.promise,received:t.parsedType}),_;const a=t.parsedType===g.promise?t.data:Promise.resolve(t.data);return G(a.then(n=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}}kt.create=(r,e)=>new kt({type:r,typeName:x.ZodPromise,...k(e)});class et extends M{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===x.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:a}=this._processInputParams(e),n=this._def.effect||null,i={addIssue:s=>{m(a,s),s.fatal?t.abort():t.dirty()},get path(){return a.path}};if(i.addIssue=i.addIssue.bind(i),n.type==="preprocess"){const s=n.transform(a.data,i);if(a.common.async)return Promise.resolve(s).then(async o=>{if(t.value==="aborted")return _;const l=await this._def.schema._parseAsync({data:o,path:a.path,parent:a});return l.status==="aborted"?_:l.status==="dirty"||t.value==="dirty"?_t(l.value):l});{if(t.value==="aborted")return _;const o=this._def.schema._parseSync({data:s,path:a.path,parent:a});return o.status==="aborted"?_:o.status==="dirty"||t.value==="dirty"?_t(o.value):o}}if(n.type==="refinement"){const s=o=>{const l=n.refinement(o,i);if(a.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(a.common.async===!1){const o=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return o.status==="aborted"?_:(o.status==="dirty"&&t.dirty(),s(o.value),{status:t.value,value:o.value})}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(o=>o.status==="aborted"?_:(o.status==="dirty"&&t.dirty(),s(o.value).then(()=>({status:t.value,value:o.value}))))}if(n.type==="transform")if(a.common.async===!1){const s=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!Ge(s))return _;const o=n.transform(s.value,i);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(s=>Ge(s)?Promise.resolve(n.transform(s.value,i)).then(o=>({status:t.value,value:o})):_);E.assertNever(n)}}et.create=(r,e,t)=>new et({schema:r,typeName:x.ZodEffects,effect:e,...k(t)}),et.createWithPreprocess=(r,e,t)=>new et({schema:e,effect:{type:"preprocess",transform:r},typeName:x.ZodEffects,...k(t)});class Me extends M{_parse(e){return this._getType(e)===g.undefined?G(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Me.create=(r,e)=>new Me({innerType:r,typeName:x.ZodOptional,...k(e)});class tt extends M{_parse(e){return this._getType(e)===g.null?G(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}tt.create=(r,e)=>new tt({innerType:r,typeName:x.ZodNullable,...k(e)});class Ar extends M{_parse(e){const{ctx:t}=this._processInputParams(e);let a=t.data;return t.parsedType===g.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}Ar.create=(r,e)=>new Ar({innerType:r,typeName:x.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...k(e)});class Nr extends M{_parse(e){const{ctx:t}=this._processInputParams(e),a={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:a.data,path:a.path,parent:{...a}});return Ut(n)?n.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new re(a.common.issues)},input:a.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new re(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}}Nr.create=(r,e)=>new Nr({innerType:r,typeName:x.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...k(e)});class nn extends M{_parse(e){if(this._getType(e)!==g.nan){const a=this._getOrReturnCtx(e);return m(a,{code:d.invalid_type,expected:g.nan,received:a.parsedType}),_}return{status:"valid",value:e.data}}}nn.create=r=>new nn({typeName:x.ZodNaN,...k(r)});class is extends M{_parse(e){const{ctx:t}=this._processInputParams(e),a=t.data;return this._def.type._parse({data:a,path:t.path,parent:t})}unwrap(){return this._def.type}}class Lr extends M{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return i.status==="aborted"?_:i.status==="dirty"?(t.dirty(),_t(i.value)):this._def.out._parseAsync({data:i.value,path:a.path,parent:a})})();{const n=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return n.status==="aborted"?_:n.status==="dirty"?(t.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:a.path,parent:a})}}static create(e,t){return new Lr({in:e,out:t,typeName:x.ZodPipeline})}}class Pr extends M{_parse(e){const t=this._def.innerType._parse(e),a=n=>(Ge(n)&&(n.value=Object.freeze(n.value)),n);return Ut(t)?t.then(n=>a(n)):a(t)}unwrap(){return this._def.innerType}}Pr.create=(r,e)=>new Pr({innerType:r,typeName:x.ZodReadonly,...k(e)});var x;(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"})(x||(x={}));const Rr=Se.create,A=Xe.create,sn=Mr.create,on=Er.create;Je.create,ze.create;const Ht=Cr.create,ss=de.create,Z=I.create;qt.create,Wt.create,fe.create;const se=bt.create;Qe.create;const os=kt.create;Me.create,tt.create,Z({pin:Z({fade:sn().optional(),maxCount:A().optional(),maxZoom:A().optional()}).optional(),animation:Z({queue:Z({limit:A().optional()}).optional()}).optional(),api:Z({states:Z({url:Rr()}).optional()}).optional()});const Or=A().min(-90).max(90),jr=A().min(-180).max(180),ls=Z({sw:Z({lat:Or,lng:jr}),ne:Z({lat:Or,lng:jr})}),Ir=on().refine(r=>r instanceof HTMLElement,"Must be an HTMLElement"),us=Z({mapSize:A().min(1),zoomMin:A().min(0),zoomMax:A().min(0),zoomScale:A().min(1).max(10)}),cs=Z({instance:on(),inserted:se().returns(sn()),insert:se().returns(Ht()),remove:se().returns(Ht()),update:se().args(A()).returns(Ht())}),ds=Z({getParameters:se().args().returns(us),getContainer:se().args().returns(Ir),getZoom:se().args().returns(A()),getBounds:se().args().returns(ls),panBy:se().args(A(),A()).returns(Ht()),createMarker:se().args(Ir,Or,jr,A()).returns(cs)}),Zr=se().args(Rr()).returns(os(Ir)),ps=Z({id:Rr().min(1),rank:A(),lat:A().min(-90).max(90),lng:A().min(-180).max(180),tooltip:Z({style:Z({width:A(),height:A(),margin:A(),radius:A()}).refine(r=>Math.min(r.width,r.height)/r.margin>=5,"Tooltip width and height must be at least 5 times the margin"),body:Zr}),pin:Z({style:Z({width:A(),height:A(),radius:A()}),body:Zr}).optional(),popup:Z({style:Z({width:A(),height:A(),radius:A(),margin:A()}),body:Zr}).optional()}),fs=ss(ps);var Oe;(r=>{r.COUNT=12,r.DEGREES=[0,30,60,90,120,150,180,210,240,270,300,330],r.DEGREES_DEFAULT=270})(Oe||(Oe={}));const ln="1.0.200",un="https://maps.api.arenarium.dev",hs=`${un}/log`,ms=`${un}/tooltip/states`;class ys{constructor(e,t,a){p(this,"apiKey");p(this,"apiStatesUrl");p(this,"mapProvider");p(this,"markerDataArray",new Array);p(this,"markerDataMap",new Map);p(this,"markerDataUpdating",!1);p(this,"markerPinProcessor");p(this,"markerTooltipProcessor");p(this,"markerPopupProcessor");ds.parse(t),this.apiKey=e,this.mapProvider=t,this.markerPinProcessor=new Br(t),this.markerTooltipProcessor=new vs(t),this.markerPopupProcessor=new _s(t),this.configuration=a,this.log("info","Loaded")}set configuration(e){var t,a,n,i;this.markerPinProcessor.setConfiguration(e),this.apiStatesUrl=((a=(t=e==null?void 0:e.api)==null?void 0:t.states)==null?void 0:a.url)??void 0,we.setLimit(((i=(n=e==null?void 0:e.animation)==null?void 0:n.queue)==null?void 0:i.limit)??8*navigator.hardwareConcurrency)}async updateMarkers(e){fs.parse(e);try{await this.updateMarkerData(e),this.processMarkerDataCallback()}catch(t){throw console.error(t),this.removeMarkerData(),t instanceof Error&&this.log("error","Failed to update markers",t),t}}removeMarkers(){try{this.removeMarkerData()}catch(e){throw console.error(e),e instanceof Error&&this.log("error","Failed to remove markers",e),e}}showPopup(e){try{for(const t of this.markerDataArray)t.marker.id==e?this.markerPopupProcessor.show(t):this.markerPopupProcessor.hide(t)}catch(t){console.error(t);for(const a of this.markerDataArray)this.markerPopupProcessor.hide(a);throw t instanceof Error&&this.log("error","Failed to show popup",t),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 a of this.markerDataArray)this.markerPopupProcessor.hide(a);throw t instanceof Error&&this.log("error","Failed to hide popup",t),t}}async updateMarkerData(e){try{let t=this.markerDataArray.map(n=>n.marker);for(let n=0;n<e.length;n++){const i=e[n];this.markerDataMap.get(i.id)||t.push(i)}let a;if(e.length>1){const n=this.mapProvider.getParameters(),i=t.map(u=>({id:u.id,rank:u.rank,lat:u.lat,lng:u.lng,width:u.tooltip.style.width,height:u.tooltip.style.height,margin:u.tooltip.style.margin})),s={key:this.apiKey,parameters:n,input:i},o=this.apiStatesUrl??ms,l=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!l.ok||!l.body)throw new Error("Failed to get marker states: "+l.statusText);a=await l.json()}else a=[[0,[[0,Oe.DEGREES.indexOf(Oe.DEGREES_DEFAULT)]]]];try{this.markerDataUpdating=!0;for(let n=0;n<t.length;n++){const i=t[n],s=a[n],o=this.markerDataMap.get(i.id);if(o)o.update(s);else{const l=new gs(this.mapProvider,i,s);l.create(),this.markerDataMap.set(i.id,l),this.markerDataArray.push(l)}}this.markerDataArray.sort((n,i)=>n.zoom-i.zoom),this.markerPinProcessor.updateElements(this.markerDataArray.map(n=>n.pin)),this.markerTooltipProcessor.updateElements(this.markerDataArray.map(n=>n.tooltip))}finally{this.markerDataUpdating=!1}}catch(t){throw console.error(t),this.markerDataArray.forEach(a=>a.remove()),this.markerDataArray.length=0,this.markerDataMap.clear(),t instanceof Error&&this.log("error","Failed to update marker data",t),t}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 instanceof Error&&this.log("error","Failed to remove marker data",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),e instanceof Error&&this.log("error","Failed to process marker data",e)}}processMarkerData(){if(this.markerDataUpdating)return;const e=this.mapProvider.getBounds(),t=this.mapProvider.getZoom();this.markerPopupProcessor.process(),this.markerTooltipProcessor.process(e,t),this.markerPinProcessor.process(e,t)}async log(e,t,a){if(!(window!=null&&window.location.host.startsWith("localhost")||window!=null&&window.location.host.startsWith("127.0.0.1")))try{const n={title:`[CLIENT:${ln}] ${t}`,level:e,content:{version:ln,...a}};await fetch(hs,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})}catch(n){console.error(n)}}}class gs{constructor(e,t,a){p(this,"marker");p(this,"zoom");p(this,"pin");p(this,"tooltip");this.marker=t,this.zoom=a[0],this.pin=new Fr(e,t,a),this.tooltip=new Vr(e,t,a)}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 Dr{constructor(e,t){p(this,"provider");p(this,"id");p(this,"lat");p(this,"lng");p(this,"shown");p(this,"element");p(this,"component");p(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,a=this.component;if(t==null||a==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 ot=class ot extends Dr{constructor(t,a,n){var i,s,o,l;super(t,a);p(this,"width");p(this,"height");p(this,"radius");p(this,"zoom");p(this,"bodyLoading",!1);p(this,"bodyLoaded",!1);p(this,"bodyCallback");this.width=((i=a.pin)==null?void 0:i.style.width)??ot.DEFAULT_SIZE,this.height=((s=a.pin)==null?void 0:s.style.height)??ot.DEFAULT_SIZE,this.radius=((o=a.pin)==null?void 0:o.style.radius)??ot.DEFAULT_SIZE,this.zoom=n[0],this.bodyCallback=(l=a.pin)==null?void 0:l.body}createElement(){this.element=document.createElement("div"),this.element.classList.add("pin"),this.component=gr(Ri,{target:this.element,props:{id:this.id+"_pin",layer:Ni,priority:this.zoom*this.provider.getParameters().zoomScale,width:this.width,height:this.height,radius:this.radius}})}update(t){this.zoom=t[0],this.updateZIndex()}updateMap(t){var a;super.updateMap(t),(a=this.component)==null||a.setDisplayed(t)}updateState(t){if(this.component==null)throw new Error("Failed to update pin state");this.component.setScale(this.getScale(t))}updateBody(){var a;if(this.bodyCallback==null||this.bodyLoaded||this.bodyLoading)return;const t=(a=this.component)==null?void 0:a.getBody();t!=null&&(this.bodyLoading=!0,this.bodyCallback(this.id).then(n=>{n instanceof HTMLElement?t.appendChild(n):console.error("Failed to load pin body")}).catch(n=>console.error(n)).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(){const t=this.provider.getParameters();return Math.round((t.zoomMax-this.zoom)*t.zoomScale)}isCollapsed(){return this.component==null?!1:this.component.getCollapsed()}isBodyLoaded(){return this.bodyCallback==null||this.bodyLoaded}};p(ot,"DEFAULT_SIZE",16);let Fr=ot;const lt=class lt{constructor(e){p(this,"provider");p(this,"pinElements",new Array);p(this,"pinMaxWidth",0);p(this,"pinMaxHeight",0);p(this,"pinFade",!1);p(this,"pinMaxCount",0);p(this,"pinMaxZoomDelta",0);this.provider=e}setConfiguration(e){var t,a,n;this.pinFade=((t=e==null?void 0:e.pin)==null?void 0:t.fade)??!0,this.pinMaxCount=((a=e==null?void 0:e.pin)==null?void 0:a.maxCount)??Math.max(lt.MAP_PINS_MAX_COUNT,8*navigator.hardwareConcurrency),this.pinMaxZoomDelta=((n=e==null?void 0:e.pin)==null?void 0:n.maxZoom)??lt.MAP_PINS_MAX_ZOOM}updateElements(e){this.pinElements=e,this.pinMaxWidth=e.reduce((t,a)=>Math.max(t,a.width),0),this.pinMaxHeight=e.reduce((t,a)=>Math.max(t,a.height),0)}removeElements(){this.pinElements.forEach(e=>e.remove()),this.pinElements.length=0}process(e,t){const a=this.provider.getParameters().mapSize,n=new Ua(e,t,a,this.pinMaxWidth*2,this.pinMaxHeight*2);let i=0;for(const s of this.pinElements)n.contains(s.lat,s.lng)?s.shown&&t<s.zoom&&s.zoom<t+this.pinMaxZoomDelta?(i<this.pinMaxCount&&(this.pinFade==!0?s.updateState(t):s.setCollapsed(!1),s.updateMap(!0),s.isBodyLoaded()==!1&&s.updateBody()),i++):(s.setCollapsed(!0),s.isCollapsed()&&s.updateMap(!1)):s.updateMap(!1)}};p(lt,"MAP_PINS_MAX_ZOOM",2),p(lt,"MAP_PINS_MAX_COUNT",128);let Br=lt;const Gt=class Gt extends Dr{constructor(t,a,n){super(t,a);p(this,"width");p(this,"height");p(this,"margin");p(this,"radius");p(this,"zoom");p(this,"angle");p(this,"states");p(this,"bodyLoading",!1);p(this,"bodyLoaded",!1);p(this,"bodyCallback");this.width=a.tooltip.style.width,this.height=a.tooltip.style.height,this.margin=a.tooltip.style.margin,this.radius=a.tooltip.style.radius,this.zoom=n[0],this.angle=Oe.DEGREES_DEFAULT,this.states=n[1].map(i=>[i[0],Oe.DEGREES[i[1]]]),this.bodyCallback=a.tooltip.body}createElement(){this.element=document.createElement("div"),this.element.classList.add("tooltip"),this.component=gr(Va,{target:this.element,props:{id:this.id+"_tooltip",layer:Ai,priority:this.zoom*this.provider.getParameters().zoomScale,width:this.width,height:this.height,margin:this.margin,radius:this.radius}})}update(t){this.zoom=t[0],this.states=t[1].map(a=>[a[0],Oe.DEGREES[a[1]]]),this.updateZIndex()}updateMap(t){var a;super.updateMap(t),(a=this.component)==null||a.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 a;if(this.bodyLoaded||this.bodyLoading)return;const t=(a=this.component)==null?void 0:a.getBody();t!=null&&(this.bodyLoading=!0,this.bodyCallback(this.id).then(n=>{n instanceof HTMLElement?t.appendChild(n):console.error("Failed to load tooltip body")}).catch(n=>console.error(n)).finally(()=>{this.bodyLoaded=!0,this.bodyLoading=!1}))}getAngle(t){const a=this.states.findLast(n=>n[0]<=t);if(!a)throw new Error("Angle not found");return a[1]}getZindex(){const t=this.provider.getParameters();return Math.round((t.zoomMax-this.zoom)*t.zoomScale)+Gt.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}};p(Gt,"Z_INDEX_OFFSET",1e6);let Vr=Gt;class vs{constructor(e){p(this,"provider");p(this,"tooltipElements",new Array);p(this,"tooltipMaxWidth",0);p(this,"tooltipMaxHeight",0);this.provider=e}updateElements(e){this.tooltipElements=e,this.tooltipMaxWidth=this.tooltipElements.reduce((t,a)=>Math.max(t,a.width),0),this.tooltipMaxHeight=this.tooltipElements.reduce((t,a)=>Math.max(t,a.height),0)}removeElements(){this.tooltipElements.forEach(e=>e.remove()),this.tooltipElements.length=0}process(e,t){const a=this.provider.getParameters().mapSize,n=new Ua(e,t,a,this.tooltipMaxWidth*2,this.tooltipMaxHeight*2);for(const i of this.tooltipElements)n.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 Xt=class Xt extends Dr{constructor(t,a){if(a.popup==null)throw new Error("Failed to create popup");super(t,a);p(this,"width");p(this,"height");p(this,"margin");p(this,"radius");p(this,"bodyLoading",!1);p(this,"bodyLoaded",!1);p(this,"bodyCallback");this.shown=!1,this.width=a.popup.style.width,this.height=a.popup.style.height,this.margin=a.popup.style.margin,this.radius=a.popup.style.radius,this.bodyCallback=a.popup.body}createElement(){this.element=document.createElement("div"),this.element.classList.add("popup"),this.component=gr(Va,{target:this.element,props:{id:this.id+"_popup",layer:Ti,priority:0,width:this.width,height:this.height,margin:this.margin,radius:this.radius}})}updateMap(t){var a;super.updateMap(t),(a=this.component)==null||a.setDisplayed(t)}updateBody(){var a;if(this.bodyLoaded||this.bodyLoading)return;const t=(a=this.component)==null?void 0:a.getBody();t!=null&&(this.bodyLoading=!0,this.bodyCallback(this.id).then(n=>{n instanceof HTMLElement?t.appendChild(n):console.error("Failed to load popup body")}).catch(n=>console.error(n)).finally(()=>{this.bodyLoaded=!0,this.bodyLoading=!1}))}getZindex(){return Xt.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}};p(Xt,"Z_INDEX_OFFSET",2e6);let Ur=Xt;class _s{constructor(e){p(this,"provider");p(this,"popupElements",new Map);p(this,"popupPositioned",new Map);this.provider=e}show(e){e.pin.shown=!1,e.tooltip.shown=!1;const t=new Ur(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 a of this.popupElements.values())if(a.shown){if(a.setCollapsed(!1),a.updateMap(!0),a.isExpanded()&&a.isBodyLoaded()==!1&&a.updateBody(),a.isCollapsed()==!1&&this.popupPositioned.get(a.id)==!1){const n=(e=a.component)==null?void 0:e.getBody();if(n==null)continue;const i=(t=a.component)==null?void 0:t.getOffsets();if(i==null)continue;const s=n.getBoundingClientRect();if(s.x==0&&s.y==0&&s.width==0&&s.height==0)continue;const o=s.x+s.width/2,l=s.y+s.height/2,u=o+i.x,c=l+i.y,f=u+a.width,h=c+a.height,y=this.provider.getContainer().getBoundingClientRect(),b=u-y.left,P=y.right-f,R=c-y.top,ae=y.bottom-h,C=Math.min(a.width,a.height)/4,W=b<0?b-C:P<0?-P+C:0,ne=R<0?R-C:ae<0?-ae+C:0;this.provider.panBy(W,ne),this.popupPositioned.set(a.id,!0)}}else a.setCollapsed(!0),a.isCollapsed()&&(a.updateMap(!1),a.remove(),this.popupElements.delete(a.id),this.popupPositioned.delete(a.id))}}class xs{constructor(e,t,a){p(this,"MapClass");p(this,"MapMarkerClass");p(this,"map");this.MapClass=e,this.MapMarkerClass=t,this.map=new this.MapClass({...a,minZoom:Math.max(a.minZoom??0,0),maxZoom:Math.min(a.maxZoom??22,24),style:a.style??"https://tiles.openfreemap.org/styles/liberty",pitchWithRotate:!1,attributionControl:a.attributionControl??{compact:!1,customAttribution:"@arenarium/maps"}}),this.map.dragRotate.disable(),this.map.keyboard.disable(),this.map.touchZoomRotate.disableRotation(),this.map.touchPitch.disable()}getParameters(){return{mapSize:512,zoomMin:this.map.getMinZoom()??0,zoomMax:this.map.getMaxZoom()??22,zoomScale:10}}getMap(){return this.map}getContainer(){return this.map.getContainer()}getZoom(){return this.map.getZoom()}getBounds(){const e=this.map.getBounds(),t=e.getSouthWest(),a=e.getNorthEast();return{sw:t,ne:a}}panBy(e,t){this.map.panBy([e,t])}createMarker(e,t,a){const n=new this.MapMarkerClass({element:e});return n.setLngLat([a,t]),{instance:n,inserted:()=>n._map!=null,insert:()=>n.addTo(this.map),remove:()=>n.remove(),update:i=>n.getElement().style.zIndex=i.toString()}}}const ws={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}}]},bs={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}}]};class ks{constructor(e,t,a){p(this,"MapClass");p(this,"MapMarkerClass");p(this,"map");this.MapClass=e,this.MapMarkerClass=t,this.map=new this.MapClass({...a,minZoom:Math.max(a.minZoom??0,0),maxZoom:Math.min(a.maxZoom??22,24),projection:"mercator",pitchWithRotate:!1,customAttribution:a.customAttribution??"@arenarium/maps"}),this.map.dragRotate.disable(),this.map.keyboard.disable(),this.map.touchZoomRotate.disableRotation(),this.map.touchPitch.disable()}getParameters(){return{mapSize:512,zoomMin:this.map.getMinZoom()??0,zoomMax:this.map.getMaxZoom()??22,zoomScale:10}}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(),a=e.getNorthEast();return{sw:t,ne:a}}panBy(e,t){this.map.panBy([e,t])}createMarker(e,t,a){const n=new this.MapMarkerClass({element:e});return n.setLngLat([a,t]),{instance:n,inserted:()=>n._map!=null,insert:()=>n.addTo(this.map),remove:()=>n.remove(),update:i=>n.getElement().style.zIndex=i.toString()}}}class Ss{constructor(e,t,a,n){p(this,"MapClass");p(this,"MapMarkerClass");p(this,"map");p(this,"options");this.MapClass=e,this.MapMarkerClass=t,this.options=n,this.map=new this.MapClass(a,{...n})}getParameters(){return{mapSize:256,zoomMin:this.options.minZoom??0,zoomMax:this.options.maxZoom??24,zoomScale:10}}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(),a=e.getNorthEast();return{sw:{lat:t.lat(),lng:t.lng()},ne:{lat:a.lat(),lng:a.lng()}}}panBy(e,t){this.map.panBy(e,t)}createMarker(e,t,a,n){const i=new this.MapMarkerClass({position:{lat:t,lng:a},content:e,zIndex:n});return{instance:i,inserted:()=>i.map!=null&&i.map==this.map,insert:()=>i.map=this.map,remove:()=>i.map=void 0,update:s=>i.zIndex=s}}}const zs=[{elementType:"labels.icon",stylers:[{visibility:"off"}]},{stylers:[{saturation:-100},{lightness:-10}]},{featureType:"landscape",stylers:[{lightness:30}]},{featureType:"road",elementType:"geometry",stylers:[{saturation:-100}]}],Ms=[{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}]}];S.GoogleMapDarkStyle=Ms,S.GoogleMapLightStyle=zs,S.GoogleMapsProvider=Ss,S.MapManager=ys,S.MapboxProvider=ks,S.MaplibreDarkStyle=ws,S.MaplibreLightStyle=bs,S.MaplibreProvider=xs,Object.defineProperty(S,Symbol.toStringTag,{value:"Module"})});
|