@arenarium/maps 1.0.152 → 1.0.158

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