From 02031cbfd7a03bbc4687056d9744d6c178b0c9c1 Mon Sep 17 00:00:00 2001 From: dabreegster Date: Tue, 3 Dec 2024 10:53:21 +0000 Subject: [PATCH] deploy: f95f97271e0a86e246f35dbc7734c067c1af2168 --- assets/backend_bg.wasm | Bin 1169423 -> 1172276 bytes assets/{main-a70c0ce3.js => main-e007f34a.js} | 75 +++++++++--------- index.html | 2 +- 3 files changed, 39 insertions(+), 38 deletions(-) rename assets/{main-a70c0ce3.js => main-e007f34a.js} (85%) diff --git a/assets/backend_bg.wasm b/assets/backend_bg.wasm index 2d0b49ef129c1fdecc4aa8b15e6c37e85f6b5fa6..49189dbd68dade524fa42ca6427e36b8df21a81f 100644 GIT binary patch delta 322054 zcmce9349jC`Tx%BzI(h!vbj&f?k0gCw_-R1%|;QtDr#%h9)N&Hf+C7nOMRn)MvEF) zbWy2-2T(ypqlPMIP;Ak9;8kgh3N2M?v4mxuenB=q$b5bmYl?sNp{U7EqG3%fF;@N zNqqKf{AJg$WmQmN>QqG`;~vd1w{*5RH>X0gMSKoP!1Efz>*X}9YDyB;CZZ~LSp^Z2#W$yz_ucRHh`#rX#-+xpvn?D zVFpDpt{Ad3$U8MwmQ*A{JW5rCs~FngIB=+G5(mu;Nk!AR!%JC~(G!NNs9a$&rh*d< zE^%4q5fpGq(d8ldRFQ@rP9KH;fF;xs;DQ_x4(bPQj*xYrR;`tQD47pKX#t1?Xd*E* z!jvQHK`n+phjTW73X(XN{4e#R# zNfWdKFet)+lt@I1NK#}J23UBM6!GTAOW0`dm+{Iq2gs&>)I7`KJO}jU-nMve z#=U*tvfLPwPM3GJn z;@?fxV27OEBjQHew%A`y}_b_r`!+PtwjgW~^Y+Voi$PrP{AmC{--nNwc3 zJd&V-^QX;foN@WZQ!kSqRP(7|){N63(lQ!`K1@km@!p)$jiyCU@N`Da(lBy z-if&myV<)4e_!$1a;w-q-lMrim3OM*^T|`Eo-+C3tGl&)m$x;ybjVVzAb{%p^QTWc z?!rr_O__D!jEklFG@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3{*w`@;N+mbCJ8yjY{TR=p^6U0JL7Jqw?IL33>|_|9j$X3X|Zijch(GyilzxgK~KZI1~a083NW`$CXfW z1ge!2{XA25Qb<>e in t?NP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Mi=(t,e,n)=>(OP(t,typeof e!="symbol"?e+"":e,n),n);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const c of s.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&r(c)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();function Pt(){}function si(t,e){for(const n in e)t[n]=e[n];return t}function kE(t){return t()}function Hx(){return Object.create(null)}function Kr(t){t.forEach(kE)}function Q_(t){return typeof t=="function"}function Ut(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let Og;function Wn(t,e){return t===e?!0:(Og||(Og=document.createElement("a")),Og.href=e,t===Og.href)}function zP(t){return Object.keys(t).length===0}function DE(t,...e){if(t==null){for(const r of e)r(void 0);return Pt}const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function Fs(t){let e;return DE(t,n=>e=n)(),e}function mt(t,e,n){t.$$.on_destroy.push(DE(e,n))}function Sr(t,e,n,r){if(t){const i=RE(t,e,n,r);return t[0](i)}}function RE(t,e,n,r){return t[1]&&r?si(n.ctx.slice(),t[1](r(e))):n.ctx}function Er(t,e,n,r){if(t[2]&&r){const i=t[2](r(n));if(e.dirty===void 0)return i;if(typeof i=="object"){const s=[],c=Math.max(e.dirty.length,i.length);for(let l=0;l32){const e=[],n=t.ctx.length/32;for(let r=0;rt.removeEventListener(e,n,r)}function NE(t){return function(e){return e.preventDefault(),t.call(this,e)}}function N0(t){return function(e){return e.stopPropagation(),t.call(this,e)}}function Ie(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function BP(t){let e;return{p(...n){e=n,e.forEach(r=>t.push(r))},r(){e.forEach(n=>t.splice(t.indexOf(n),1))}}}function VP(t){return t===""?null:+t}function UP(t){return Array.from(t.childNodes)}function hr(t,e){e=""+e,t.data!==e&&(t.data=e)}function es(t,e){t.value=e??""}function sr(t,e,n,r){n==null?t.style.removeProperty(e):t.style.setProperty(e,n,r?"important":"")}function f_(t,e,n){for(let r=0;r{const i=t.$$.callbacks[e];if(i){const s=jP(e,n,{cancelable:r});return i.slice().forEach(c=>{c.call(t,s)}),!s.defaultPrevented}return!0}}function p1(t,e){return _m().$$.context.set(t,e),e}function zE(t){return _m().$$.context.get(t)}function gn(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach(r=>r.call(this,e))}const bf=[],ai=[];let Cf=[];const pv=[],FE=Promise.resolve();let dv=!1;function BE(){dv||(dv=!0,FE.then(UE))}function VE(){return BE(),FE}function Xd(t){Cf.push(t)}function El(t){pv.push(t)}const O0=new Set;let pf=0;function UE(){if(pf!==0)return;const t=Zd;do{try{for(;pft.indexOf(r)===-1?e.push(r):n.push(r)),n.forEach(r=>r()),Cf=e}const $g=new Set;let qc;function Un(){qc={r:0,c:[],p:qc}}function jn(){qc.r||Kr(qc.c),qc=qc.p}function ue(t,e){t&&t.i&&($g.delete(t),t.i(e))}function ye(t,e,n,r){if(t&&t.o){if($g.has(t))return;$g.add(t),qc.c.push(()=>{$g.delete(t),r&&(n&&t.d(1),r())}),t.o(e)}else r&&r()}function bs(t){return(t==null?void 0:t.length)!==void 0?t:Array.from(t)}function WP(t,e){ye(t,1,1,()=>{e.delete(t.key)})}function HP(t,e,n,r,i,s,c,l,d,v,S,E){let C=t.length,M=s.length,A=C;const R={};for(;A--;)R[t[A].key]=A;const z=[],U=new Map,F=new Map,G=[];for(A=M;A--;){const fe=E(i,s,A),pe=n(fe);let se=c.get(pe);se?r&&G.push(()=>se.p(fe,e)):(se=v(pe,fe),se.c()),U.set(pe,z[A]=se),pe in R&&F.set(pe,Math.abs(A-R[pe]))}const H=new Set,te=new Set;function ee(fe){ue(fe,1),fe.m(l,S),c.set(fe.key,fe),S=fe.first,M--}for(;C&&M;){const fe=z[M-1],pe=t[C-1],se=fe.key,Ae=pe.key;fe===pe?(S=fe.first,C--,M--):U.has(Ae)?!c.has(se)||H.has(se)?ee(fe):te.has(Ae)?C--:F.get(se)>F.get(Ae)?(te.add(se),ee(fe)):(H.add(Ae),C--):(d(pe,c),C--)}for(;C--;){const fe=t[C];U.has(fe.key)||d(fe,c)}for(;M;)ee(z[M-1]);return Kr(G),z}function d1(t,e){const n={},r={},i={$$scope:1};let s=t.length;for(;s--;){const c=t[s],l=e[s];if(l){for(const d in c)d in l||(r[d]=1);for(const d in l)i[d]||(n[d]=l[d],i[d]=1);t[s]=l}else for(const d in c)i[d]=1}for(const c in r)c in n||(n[c]=void 0);return n}function Il(t,e,n){const r=t.$$.props[e];r!==void 0&&(t.$$.bound[r]=n,n(t.$$.ctx[r]))}function Ge(t){t&&t.c()}function Ue(t,e,n){const{fragment:r,after_update:i}=t.$$;r&&r.m(e,n),Xd(()=>{const s=t.$$.on_mount.map(kE).filter(Q_);t.$$.on_destroy?t.$$.on_destroy.push(...s):Kr(s),t.$$.on_mount=[]}),i.forEach(Xd)}function je(t,e){const n=t.$$;n.fragment!==null&&(qP(n.after_update),Kr(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function ZP(t,e){t.$$.dirty[0]===-1&&(bf.push(t),BE(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{const A=M.length?M[0]:C;return v.ctx&&i(v.ctx[E],v.ctx[E]=A)&&(!v.skip_bound&&v.bound[E]&&v.bound[E](A),S&&ZP(t,E)),C}):[],v.update(),S=!0,Kr(v.before_update),v.fragment=r?r(v.ctx):!1,e.target){if(e.hydrate){const E=UP(e.target);v.fragment&&v.fragment.l(E),E.forEach(be)}else v.fragment&&v.fragment.c();e.intro&&ue(t.$$.fragment),Ue(t,e.target,e.anchor),UE()}Fd(d)}class Yt{constructor(){Mi(this,"$$");Mi(this,"$$set")}$destroy(){je(this,1),this.$destroy=Pt}$on(e,n){if(!Q_(n))return Pt;const r=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return r.push(n),()=>{const i=r.indexOf(n);i!==-1&&r.splice(i,1)}}$set(e){this.$$set&&!zP(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const XP="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(XP);function Zx(t){let e,n;return{c(){e=_e("div"),n=st(t[0]),Ie(e,"class","svelte-1uuov7f")},m(r,i){xe(r,e,i),oe(e,n)},p(r,i){i&1&&hr(n,r[0])},d(r){r&&be(e)}}}function YP(t){let e,n=t[0]&&Zx(t);return{c(){n&&n.c(),e=Hi()},m(r,i){n&&n.m(r,i),xe(r,e,i)},p(r,[i]){r[0]?n?n.p(r,i):(n=Zx(r),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},i:Pt,o:Pt,d(r){r&&be(e),n&&n.d(r)}}}function $P(t,e,n){let{loading:r}=e;return t.$$set=i=>{"loading"in i&&n(0,r=i.loading)},[r]}class jE extends Yt{constructor(e){super(),Xt(this,e,$P,YP,Ut,{loading:0})}}const KP=t=>({dialog:t&1}),Xx=t=>({dialog:t[0]});function JP(t){let e,n,r,i,s;const c=t[4].default,l=Sr(c,t,t[3],Xx);return{c(){e=_e("dialog"),n=_e("article"),l&&l.c(),e.open=!0},m(d,v){xe(d,e,v),oe(e,n),l&&l.m(n,null),t[6](e),r=!0,i||(s=[Lt(window,"click",t[1]),Lt(window,"keydown",t[2]),Lt(e,"close",t[5])],i=!0)},p(d,[v]){l&&l.p&&(!r||v&9)&&Ir(l,c,d,d[3],r?Er(c,d[3],v,KP):Cr(d[3]),Xx)},i(d){r||(ue(l,d),r=!0)},o(d){ye(l,d),r=!1},d(d){d&&be(e),l&&l.d(d),t[6](null),i=!1,Kr(s)}}}function QP(t,e,n){let{$$slots:r={},$$scope:i}=e,s;function c(S){s.open&&S.target==s&&s.close()}function l(S){(S.key=="Escape"||S.key=="Enter")&&(S.stopPropagation(),s.close())}function d(S){gn.call(this,t,S)}function v(S){ai[S?"unshift":"push"](()=>{s=S,n(0,s)})}return t.$$set=S=>{"$$scope"in S&&n(3,i=S.$$scope)},[s,c,l,i,r,d,v]}class m1 extends Yt{constructor(e){super(),Xt(this,e,QP,JP,Ut,{})}}function Yx(t,e,n){const r=t.slice();return r[1]=e[n][0],r[2]=e[n][1],r}function $x(t){let e,n,r=t[1]+"",i,s,c,l=t[2]+"",d,v;return{c(){e=_e("tr"),n=_e("td"),i=st(r),s=We(),c=_e("td"),d=st(l),v=We()},m(S,E){xe(S,e,E),oe(e,n),oe(n,i),oe(e,s),oe(e,c),oe(c,d),oe(e,v)},p(S,E){E&1&&r!==(r=S[1]+"")&&hr(i,r),E&1&&l!==(l=S[2]+"")&&hr(d,l)},d(S){S&&be(e)}}}function eM(t){let e,n,r=bs(Object.entries(t[0])),i=[];for(let s=0;s{"properties"in i&&n(0,r=i.properties)},[r]}class ty extends Yt{constructor(e){super(),Xt(this,e,tM,eM,Ut,{properties:0})}}function p_(t,e){let n=document.createElement("a");n.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(e)),n.setAttribute("download",t),document.body.appendChild(n),n.click(),document.body.removeChild(n)}function Rr(t){if(t==null||t==null)throw new Error("Oops, notNull given something null");return t}let ot;const nu=new Array(128).fill(void 0);nu.push(void 0,null,!0,!1);function vn(t){return nu[t]}let Bd=nu.length;function nM(t){t<132||(nu[t]=Bd,Bd=t)}function ko(t){const e=vn(t);return nM(t),e}let Jo=0,Cd=null;function Tf(){return(Cd===null||Cd.byteLength===0)&&(Cd=new Uint8Array(ot.memory.buffer)),Cd}const Kg=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},rM=typeof Kg.encodeInto=="function"?function(t,e){return Kg.encodeInto(t,e)}:function(t,e){const n=Kg.encode(t);return e.set(n),{read:t.length,written:n.length}};function Ba(t,e,n){if(n===void 0){const l=Kg.encode(t),d=e(l.length,1)>>>0;return Tf().subarray(d,d+l.length).set(l),Jo=l.length,d}let r=t.length,i=e(r,1)>>>0;const s=Tf();let c=0;for(;c127)break;s[i+c]=l}if(c!==r){c!==0&&(t=t.slice(c)),i=n(i,r,r=c+t.length*3,1)>>>0;const l=Tf().subarray(i+c,i+r),d=rM(t,l);c+=d.written}return Jo=c,i}function xf(t){return t==null}let Td=null;function Wt(){return(Td===null||Td.byteLength===0)&&(Td=new Int32Array(ot.memory.buffer)),Td}let Ld=null;function GE(){return(Ld===null||Ld.byteLength===0)&&(Ld=new Float64Array(ot.memory.buffer)),Ld}function ur(t){Bd===nu.length&&nu.push(nu.length+1);const e=Bd;return Bd=nu[e],nu[e]=t,e}const qE=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&qE.decode();function ms(t,e){return t=t>>>0,qE.decode(Tf().subarray(t,t+e))}let Pd=null;function iM(){return(Pd===null||Pd.byteLength===0)&&(Pd=new BigInt64Array(ot.memory.buffer)),Pd}function mv(t){const e=typeof t;if(e=="number"||e=="boolean"||t==null)return`${t}`;if(e=="string")return`"${t}"`;if(e=="symbol"){const i=t.description;return i==null?"Symbol":`Symbol(${i})`}if(e=="function"){const i=t.name;return typeof i=="string"&&i.length>0?`Function(${i})`:"Function"}if(Array.isArray(t)){const i=t.length;let s="[";i>0&&(s+=mv(t[0]));for(let c=1;c1)r=n[1];else return toString.call(t);if(r=="Object")try{return"Object("+JSON.stringify(t)+")"}catch{return"Object"}return t instanceof Error?`${t.name}: ${t.message} -${t.stack}`:r}function oM(t,e){const n=e(t.length*1,1)>>>0;return Tf().set(t,n/1),Jo=t.length,n}function sM(t,e){return t=t>>>0,GE().subarray(t/8,t/8+e)}function aM(t,e){return t=t>>>0,Tf().subarray(t/1,t/1+e)}function Gc(t,e){try{return t.apply(this,e)}catch(n){ot.__wbindgen_exn_store(ur(n))}}class WE{__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,e}free(){const e=this.__destroy_into_raw();ot.__wbg_ltn_free(e)}constructor(e,n,r){try{const v=ot.__wbindgen_add_to_stack_pointer(-16),S=oM(e,ot.__wbindgen_malloc),E=Jo;var i=xf(r)?0:Ba(r,ot.__wbindgen_malloc,ot.__wbindgen_realloc),s=Jo;ot.ltn_new(v,S,E,ur(n),i,s);var c=Wt()[v/4+0],l=Wt()[v/4+1],d=Wt()[v/4+2];if(d)throw ko(l);return this.__wbg_ptr=c>>>0,this}finally{ot.__wbindgen_add_to_stack_pointer(16)}}getInvertedBoundary(){let e,n;try{const v=ot.__wbindgen_add_to_stack_pointer(-16);ot.ltn_getInvertedBoundary(v,this.__wbg_ptr);var r=Wt()[v/4+0],i=Wt()[v/4+1],s=Wt()[v/4+2],c=Wt()[v/4+3],l=r,d=i;if(c)throw l=0,d=0,ko(s);return e=l,n=d,ms(l,d)}finally{ot.__wbindgen_add_to_stack_pointer(16),ot.__wbindgen_free(e,n,1)}}getBounds(){try{const i=ot.__wbindgen_add_to_stack_pointer(-16);ot.ltn_getBounds(i,this.__wbg_ptr);var e=Wt()[i/4+0],n=Wt()[i/4+1],r=sM(e,n).slice();return ot.__wbindgen_free(e,n*8,8),r}finally{ot.__wbindgen_add_to_stack_pointer(16)}}toRouteSnapper(){try{const i=ot.__wbindgen_add_to_stack_pointer(-16);ot.ltn_toRouteSnapper(i,this.__wbg_ptr);var e=Wt()[i/4+0],n=Wt()[i/4+1],r=aM(e,n).slice();return ot.__wbindgen_free(e,n*1,1),r}finally{ot.__wbindgen_add_to_stack_pointer(16)}}toRouteSnapperGj(){let e,n;try{const v=ot.__wbindgen_add_to_stack_pointer(-16);ot.ltn_toRouteSnapperGj(v,this.__wbg_ptr);var r=Wt()[v/4+0],i=Wt()[v/4+1],s=Wt()[v/4+2],c=Wt()[v/4+3],l=r,d=i;if(c)throw l=0,d=0,ko(s);return e=l,n=d,ms(l,d)}finally{ot.__wbindgen_add_to_stack_pointer(16),ot.__wbindgen_free(e,n,1)}}renderModalFilters(){let e,n;try{const v=ot.__wbindgen_add_to_stack_pointer(-16);ot.ltn_renderModalFilters(v,this.__wbg_ptr);var r=Wt()[v/4+0],i=Wt()[v/4+1],s=Wt()[v/4+2],c=Wt()[v/4+3],l=r,d=i;if(c)throw l=0,d=0,ko(s);return e=l,n=d,ms(l,d)}finally{ot.__wbindgen_add_to_stack_pointer(16),ot.__wbindgen_free(e,n,1)}}renderNeighbourhood(){let e,n;try{const v=ot.__wbindgen_add_to_stack_pointer(-16);ot.ltn_renderNeighbourhood(v,this.__wbg_ptr);var r=Wt()[v/4+0],i=Wt()[v/4+1],s=Wt()[v/4+2],c=Wt()[v/4+3],l=r,d=i;if(c)throw l=0,d=0,ko(s);return e=l,n=d,ms(l,d)}finally{ot.__wbindgen_add_to_stack_pointer(16),ot.__wbindgen_free(e,n,1)}}renderAutoBoundaries(){let e,n;try{const v=ot.__wbindgen_add_to_stack_pointer(-16);ot.ltn_renderAutoBoundaries(v,this.__wbg_ptr);var r=Wt()[v/4+0],i=Wt()[v/4+1],s=Wt()[v/4+2],c=Wt()[v/4+3],l=r,d=i;if(c)throw l=0,d=0,ko(s);return e=l,n=d,ms(l,d)}finally{ot.__wbindgen_add_to_stack_pointer(16),ot.__wbindgen_free(e,n,1)}}setNeighbourhoodBoundary(e,n){try{const s=ot.__wbindgen_add_to_stack_pointer(-16),c=Ba(e,ot.__wbindgen_malloc,ot.__wbindgen_realloc),l=Jo;ot.ltn_setNeighbourhoodBoundary(s,this.__wbg_ptr,c,l,ur(n));var r=Wt()[s/4+0],i=Wt()[s/4+1];if(i)throw ko(r)}finally{ot.__wbindgen_add_to_stack_pointer(16)}}deleteNeighbourhoodBoundary(e){const n=Ba(e,ot.__wbindgen_malloc,ot.__wbindgen_realloc),r=Jo;ot.ltn_deleteNeighbourhoodBoundary(this.__wbg_ptr,n,r)}renameNeighbourhoodBoundary(e,n){const r=Ba(e,ot.__wbindgen_malloc,ot.__wbindgen_realloc),i=Jo,s=Ba(n,ot.__wbindgen_malloc,ot.__wbindgen_realloc),c=Jo;ot.ltn_renameNeighbourhoodBoundary(this.__wbg_ptr,r,i,s,c)}setCurrentNeighbourhood(e){try{const i=ot.__wbindgen_add_to_stack_pointer(-16),s=Ba(e,ot.__wbindgen_malloc,ot.__wbindgen_realloc),c=Jo;ot.ltn_setCurrentNeighbourhood(i,this.__wbg_ptr,s,c);var n=Wt()[i/4+0],r=Wt()[i/4+1];if(r)throw ko(n)}finally{ot.__wbindgen_add_to_stack_pointer(16)}}addModalFilter(e,n){try{const s=ot.__wbindgen_add_to_stack_pointer(-16),c=Ba(n,ot.__wbindgen_malloc,ot.__wbindgen_realloc),l=Jo;ot.ltn_addModalFilter(s,this.__wbg_ptr,ur(e),c,l);var r=Wt()[s/4+0],i=Wt()[s/4+1];if(i)throw ko(r)}finally{ot.__wbindgen_add_to_stack_pointer(16)}}addManyModalFilters(e,n){try{const s=ot.__wbindgen_add_to_stack_pointer(-16),c=Ba(n,ot.__wbindgen_malloc,ot.__wbindgen_realloc),l=Jo;ot.ltn_addManyModalFilters(s,this.__wbg_ptr,ur(e),c,l);var r=Wt()[s/4+0],i=Wt()[s/4+1];if(i)throw ko(r)}finally{ot.__wbindgen_add_to_stack_pointer(16)}}deleteModalFilter(e){ot.ltn_deleteModalFilter(this.__wbg_ptr,e)}toggleDirection(e){ot.ltn_toggleDirection(this.__wbg_ptr,e)}undo(){ot.ltn_undo(this.__wbg_ptr)}redo(){ot.ltn_redo(this.__wbg_ptr)}getShortcutsCrossingRoad(e){let n,r;try{const S=ot.__wbindgen_add_to_stack_pointer(-16);ot.ltn_getShortcutsCrossingRoad(S,this.__wbg_ptr,e);var i=Wt()[S/4+0],s=Wt()[S/4+1],c=Wt()[S/4+2],l=Wt()[S/4+3],d=i,v=s;if(l)throw d=0,v=0,ko(c);return n=d,r=v,ms(d,v)}finally{ot.__wbindgen_add_to_stack_pointer(16),ot.__wbindgen_free(n,r,1)}}getAllShortcuts(){let e,n;try{const v=ot.__wbindgen_add_to_stack_pointer(-16);ot.ltn_getAllShortcuts(v,this.__wbg_ptr);var r=Wt()[v/4+0],i=Wt()[v/4+1],s=Wt()[v/4+2],c=Wt()[v/4+3],l=r,d=i;if(c)throw l=0,d=0,ko(s);return e=l,n=d,ms(l,d)}finally{ot.__wbindgen_add_to_stack_pointer(16),ot.__wbindgen_free(e,n,1)}}toSavefile(){let e,n;try{const v=ot.__wbindgen_add_to_stack_pointer(-16);ot.ltn_toSavefile(v,this.__wbg_ptr);var r=Wt()[v/4+0],i=Wt()[v/4+1],s=Wt()[v/4+2],c=Wt()[v/4+3],l=r,d=i;if(c)throw l=0,d=0,ko(s);return e=l,n=d,ms(l,d)}finally{ot.__wbindgen_add_to_stack_pointer(16),ot.__wbindgen_free(e,n,1)}}loadSavefile(e){try{const i=ot.__wbindgen_add_to_stack_pointer(-16);ot.ltn_loadSavefile(i,this.__wbg_ptr,ur(e));var n=Wt()[i/4+0],r=Wt()[i/4+1];if(r)throw ko(n)}finally{ot.__wbindgen_add_to_stack_pointer(16)}}compareRoute(e,n,r,i,s){let c,l;try{const A=ot.__wbindgen_add_to_stack_pointer(-16);ot.ltn_compareRoute(A,this.__wbg_ptr,e,n,r,i,s);var d=Wt()[A/4+0],v=Wt()[A/4+1],S=Wt()[A/4+2],E=Wt()[A/4+3],C=d,M=v;if(E)throw C=0,M=0,ko(S);return c=C,l=M,ms(C,M)}finally{ot.__wbindgen_add_to_stack_pointer(16),ot.__wbindgen_free(c,l,1)}}}async function lM(t,e){if(typeof Response=="function"&&t instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(t,e)}catch(r){if(t.headers.get("Content-Type")!="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r);else throw r}const n=await t.arrayBuffer();return await WebAssembly.instantiate(n,e)}else{const n=await WebAssembly.instantiate(t,e);return n instanceof WebAssembly.Instance?{instance:n,module:t}:n}}function uM(){const t={};return t.wbg={},t.wbg.__wbindgen_object_drop_ref=function(e){ko(e)},t.wbg.__wbindgen_string_get=function(e,n){const r=vn(n),i=typeof r=="string"?r:void 0;var s=xf(i)?0:Ba(i,ot.__wbindgen_malloc,ot.__wbindgen_realloc),c=Jo;Wt()[e/4+1]=c,Wt()[e/4+0]=s},t.wbg.__wbindgen_boolean_get=function(e){const n=vn(e);return typeof n=="boolean"?n?1:0:2},t.wbg.__wbindgen_is_bigint=function(e){return typeof vn(e)=="bigint"},t.wbg.__wbindgen_number_get=function(e,n){const r=vn(n),i=typeof r=="number"?r:void 0;GE()[e/8+1]=xf(i)?0:i,Wt()[e/4+0]=!xf(i)},t.wbg.__wbindgen_is_object=function(e){const n=vn(e);return typeof n=="object"&&n!==null},t.wbg.__wbindgen_in=function(e,n){return vn(e)in vn(n)},t.wbg.__wbindgen_bigint_from_i64=function(e){return ur(e)},t.wbg.__wbindgen_jsval_eq=function(e,n){return vn(e)===vn(n)},t.wbg.__wbindgen_bigint_from_u64=function(e){const n=BigInt.asUintN(64,e);return ur(n)},t.wbg.__wbindgen_error_new=function(e,n){const r=new Error(ms(e,n));return ur(r)},t.wbg.__wbindgen_is_undefined=function(e){return vn(e)===void 0},t.wbg.__wbindgen_string_new=function(e,n){const r=ms(e,n);return ur(r)},t.wbg.__wbindgen_jsval_loose_eq=function(e,n){return vn(e)==vn(n)},t.wbg.__wbindgen_object_clone_ref=function(e){const n=vn(e);return ur(n)},t.wbg.__wbg_getwithrefkey_3b3c46ba20582127=function(e,n){const r=vn(e)[vn(n)];return ur(r)},t.wbg.__wbg_debug_34c9290896ec9856=function(e){console.debug(vn(e))},t.wbg.__wbg_error_e60eff06f24ab7a4=function(e){console.error(vn(e))},t.wbg.__wbg_info_d7d58472d0bab115=function(e){console.info(vn(e))},t.wbg.__wbg_log_a4530b4fe289336f=function(e){console.log(vn(e))},t.wbg.__wbg_warn_f260f49434e45e62=function(e){console.warn(vn(e))},t.wbg.__wbg_new_abda76e883ba8a5f=function(){const e=new Error;return ur(e)},t.wbg.__wbg_stack_658279fe44541cf6=function(e,n){const r=vn(n).stack,i=Ba(r,ot.__wbindgen_malloc,ot.__wbindgen_realloc),s=Jo;Wt()[e/4+1]=s,Wt()[e/4+0]=i},t.wbg.__wbg_error_f851667af71bcfc6=function(e,n){let r,i;try{r=e,i=n,console.error(ms(e,n))}finally{ot.__wbindgen_free(r,i,1)}},t.wbg.__wbg_performance_3f3012faa4463882=function(e){const n=vn(e).performance;return ur(n)},t.wbg.__wbg_now_2fd65358804c9485=function(e){return vn(e).now()},t.wbg.__wbg_get_f01601b5a68d10e3=function(e,n){const r=vn(e)[n>>>0];return ur(r)},t.wbg.__wbg_length_1009b1af0c481d7b=function(e){return vn(e).length},t.wbg.__wbindgen_is_function=function(e){return typeof vn(e)=="function"},t.wbg.__wbg_newnoargs_c62ea9419c21fbac=function(e,n){const r=new Function(ms(e,n));return ur(r)},t.wbg.__wbg_next_9b877f231f476d01=function(e){const n=vn(e).next;return ur(n)},t.wbg.__wbg_next_6529ee0cca8d57ed=function(){return Gc(function(e){const n=vn(e).next();return ur(n)},arguments)},t.wbg.__wbg_done_5fe336b092d60cf2=function(e){return vn(e).done},t.wbg.__wbg_value_0c248a78fdc8e19f=function(e){const n=vn(e).value;return ur(n)},t.wbg.__wbg_iterator_db7ca081358d4fb2=function(){return ur(Symbol.iterator)},t.wbg.__wbg_get_7b48513de5dc5ea4=function(){return Gc(function(e,n){const r=Reflect.get(vn(e),vn(n));return ur(r)},arguments)},t.wbg.__wbg_call_90c26b09837aba1c=function(){return Gc(function(e,n){const r=vn(e).call(vn(n));return ur(r)},arguments)},t.wbg.__wbg_self_f0e34d89f33b99fd=function(){return Gc(function(){const e=self.self;return ur(e)},arguments)},t.wbg.__wbg_window_d3b084224f4774d7=function(){return Gc(function(){const e=window.window;return ur(e)},arguments)},t.wbg.__wbg_globalThis_9caa27ff917c6860=function(){return Gc(function(){const e=globalThis.globalThis;return ur(e)},arguments)},t.wbg.__wbg_global_35dfdd59a4da3e74=function(){return Gc(function(){const e=global.global;return ur(e)},arguments)},t.wbg.__wbg_isArray_74fb723e24f76012=function(e){return Array.isArray(vn(e))},t.wbg.__wbg_instanceof_ArrayBuffer_e7d53d51371448e2=function(e){let n;try{n=vn(e)instanceof ArrayBuffer}catch{n=!1}return n},t.wbg.__wbg_isSafeInteger_f93fde0dca9820f8=function(e){return Number.isSafeInteger(vn(e))},t.wbg.__wbg_entries_9e2e2aa45aa5094a=function(e){const n=Object.entries(vn(e));return ur(n)},t.wbg.__wbg_buffer_a448f833075b71ba=function(e){const n=vn(e).buffer;return ur(n)},t.wbg.__wbg_new_8f67e318f15d7254=function(e){const n=new Uint8Array(vn(e));return ur(n)},t.wbg.__wbg_set_2357bf09366ee480=function(e,n,r){vn(e).set(vn(n),r>>>0)},t.wbg.__wbg_length_1d25fa9e4ac21ce7=function(e){return vn(e).length},t.wbg.__wbg_instanceof_Uint8Array_bced6f43aed8c1aa=function(e){let n;try{n=vn(e)instanceof Uint8Array}catch{n=!1}return n},t.wbg.__wbindgen_bigint_get_as_i64=function(e,n){const r=vn(n),i=typeof r=="bigint"?r:void 0;iM()[e/8+1]=xf(i)?BigInt(0):i,Wt()[e/4+0]=!xf(i)},t.wbg.__wbindgen_debug_string=function(e,n){const r=mv(vn(n)),i=Ba(r,ot.__wbindgen_malloc,ot.__wbindgen_realloc),s=Jo;Wt()[e/4+1]=s,Wt()[e/4+0]=i},t.wbg.__wbindgen_throw=function(e,n){throw new Error(ms(e,n))},t.wbg.__wbindgen_memory=function(){const e=ot.memory;return ur(e)},t}function cM(t,e){return ot=t.exports,HE.__wbindgen_wasm_module=e,Pd=null,Ld=null,Td=null,Cd=null,ot}async function HE(t){if(ot!==void 0)return ot;typeof t>"u"&&(t="/ltn/assets/backend_bg.wasm");const e=uM();(typeof t=="string"||typeof Request=="function"&&t instanceof Request||typeof URL=="function"&&t instanceof URL)&&(t=fetch(t));const{instance:n,module:r}=await lM(await t,e);return cM(n,r)}var ym=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function g1(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function ny(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}var ZE={exports:{}};/** +var zP=Object.defineProperty;var FP=(t,e,n)=>e in t?zP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Mi=(t,e,n)=>(FP(t,typeof e!="symbol"?e+"":e,n),n);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const c of s.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&r(c)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();function Pt(){}function si(t,e){for(const n in e)t[n]=e[n];return t}function RE(t){return t()}function Xx(){return Object.create(null)}function Hr(t){t.forEach(RE)}function Q_(t){return typeof t=="function"}function Ut(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let Og;function Wn(t,e){return t===e?!0:(Og||(Og=document.createElement("a")),Og.href=e,t===Og.href)}function BP(t){return Object.keys(t).length===0}function NE(t,...e){if(t==null){for(const r of e)r(void 0);return Pt}const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function Fs(t){let e;return NE(t,n=>e=n)(),e}function mt(t,e,n){t.$$.on_destroy.push(NE(e,n))}function Sr(t,e,n,r){if(t){const i=OE(t,e,n,r);return t[0](i)}}function OE(t,e,n,r){return t[1]&&r?si(n.ctx.slice(),t[1](r(e))):n.ctx}function Er(t,e,n,r){if(t[2]&&r){const i=t[2](r(n));if(e.dirty===void 0)return i;if(typeof i=="object"){const s=[],c=Math.max(e.dirty.length,i.length);for(let l=0;l32){const e=[],n=t.ctx.length/32;for(let r=0;rt.removeEventListener(e,n,r)}function zE(t){return function(e){return e.preventDefault(),t.call(this,e)}}function O0(t){return function(e){return e.stopPropagation(),t.call(this,e)}}function Ie(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function UP(t){let e;return{p(...n){e=n,e.forEach(r=>t.push(r))},r(){e.forEach(n=>t.splice(t.indexOf(n),1))}}}function m1(t){return t===""?null:+t}function jP(t){return Array.from(t.childNodes)}function cr(t,e){e=""+e,t.data!==e&&(t.data=e)}function vo(t,e){t.value=e??""}function sr(t,e,n,r){n==null?t.style.removeProperty(e):t.style.setProperty(e,n,r?"important":"")}function f_(t,e,n){for(let r=0;r{const i=t.$$.callbacks[e];if(i){const s=GP(e,n,{cancelable:r});return i.slice().forEach(c=>{c.call(t,s)}),!s.defaultPrevented}return!0}}function g1(t,e){return _m().$$.context.set(t,e),e}function BE(t){return _m().$$.context.get(t)}function gn(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach(r=>r.call(this,e))}const bf=[],ai=[];let Cf=[];const dv=[],VE=Promise.resolve();let mv=!1;function UE(){mv||(mv=!0,VE.then(GE))}function jE(){return UE(),VE}function Xd(t){Cf.push(t)}function El(t){dv.push(t)}const z0=new Set;let pf=0;function GE(){if(pf!==0)return;const t=Zd;do{try{for(;pft.indexOf(r)===-1?e.push(r):n.push(r)),n.forEach(r=>r()),Cf=e}const $g=new Set;let qc;function Un(){qc={r:0,c:[],p:qc}}function jn(){qc.r||Hr(qc.c),qc=qc.p}function ue(t,e){t&&t.i&&($g.delete(t),t.i(e))}function ye(t,e,n,r){if(t&&t.o){if($g.has(t))return;$g.add(t),qc.c.push(()=>{$g.delete(t),r&&(n&&t.d(1),r())}),t.o(e)}else r&&r()}function bs(t){return(t==null?void 0:t.length)!==void 0?t:Array.from(t)}function HP(t,e){ye(t,1,1,()=>{e.delete(t.key)})}function ZP(t,e,n,r,i,s,c,l,d,v,S,E){let C=t.length,M=s.length,A=C;const R={};for(;A--;)R[t[A].key]=A;const z=[],U=new Map,F=new Map,G=[];for(A=M;A--;){const fe=E(i,s,A),pe=n(fe);let se=c.get(pe);se?r&&G.push(()=>se.p(fe,e)):(se=v(pe,fe),se.c()),U.set(pe,z[A]=se),pe in R&&F.set(pe,Math.abs(A-R[pe]))}const H=new Set,te=new Set;function ee(fe){ue(fe,1),fe.m(l,S),c.set(fe.key,fe),S=fe.first,M--}for(;C&&M;){const fe=z[M-1],pe=t[C-1],se=fe.key,Ae=pe.key;fe===pe?(S=fe.first,C--,M--):U.has(Ae)?!c.has(se)||H.has(se)?ee(fe):te.has(Ae)?C--:F.get(se)>F.get(Ae)?(te.add(se),ee(fe)):(H.add(Ae),C--):(d(pe,c),C--)}for(;C--;){const fe=t[C];U.has(fe.key)||d(fe,c)}for(;M;)ee(z[M-1]);return Hr(G),z}function ty(t,e){const n={},r={},i={$$scope:1};let s=t.length;for(;s--;){const c=t[s],l=e[s];if(l){for(const d in c)d in l||(r[d]=1);for(const d in l)i[d]||(n[d]=l[d],i[d]=1);t[s]=l}else for(const d in c)i[d]=1}for(const c in r)c in n||(n[c]=void 0);return n}function Il(t,e,n){const r=t.$$.props[e];r!==void 0&&(t.$$.bound[r]=n,n(t.$$.ctx[r]))}function Ge(t){t&&t.c()}function Ue(t,e,n){const{fragment:r,after_update:i}=t.$$;r&&r.m(e,n),Xd(()=>{const s=t.$$.on_mount.map(RE).filter(Q_);t.$$.on_destroy?t.$$.on_destroy.push(...s):Hr(s),t.$$.on_mount=[]}),i.forEach(Xd)}function je(t,e){const n=t.$$;n.fragment!==null&&(WP(n.after_update),Hr(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function XP(t,e){t.$$.dirty[0]===-1&&(bf.push(t),UE(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{const A=M.length?M[0]:C;return v.ctx&&i(v.ctx[E],v.ctx[E]=A)&&(!v.skip_bound&&v.bound[E]&&v.bound[E](A),S&&XP(t,E)),C}):[],v.update(),S=!0,Hr(v.before_update),v.fragment=r?r(v.ctx):!1,e.target){if(e.hydrate){const E=jP(e.target);v.fragment&&v.fragment.l(E),E.forEach(be)}else v.fragment&&v.fragment.c();e.intro&&ue(t.$$.fragment),Ue(t,e.target,e.anchor),GE()}Fd(d)}class Yt{constructor(){Mi(this,"$$");Mi(this,"$$set")}$destroy(){je(this,1),this.$destroy=Pt}$on(e,n){if(!Q_(n))return Pt;const r=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return r.push(n),()=>{const i=r.indexOf(n);i!==-1&&r.splice(i,1)}}$set(e){this.$$set&&!BP(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const YP="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(YP);function Yx(t){let e,n;return{c(){e=_e("div"),n=ot(t[0]),Ie(e,"class","svelte-1uuov7f")},m(r,i){xe(r,e,i),oe(e,n)},p(r,i){i&1&&cr(n,r[0])},d(r){r&&be(e)}}}function $P(t){let e,n=t[0]&&Yx(t);return{c(){n&&n.c(),e=Hi()},m(r,i){n&&n.m(r,i),xe(r,e,i)},p(r,[i]){r[0]?n?n.p(r,i):(n=Yx(r),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},i:Pt,o:Pt,d(r){r&&be(e),n&&n.d(r)}}}function KP(t,e,n){let{loading:r}=e;return t.$$set=i=>{"loading"in i&&n(0,r=i.loading)},[r]}class qE extends Yt{constructor(e){super(),Xt(this,e,KP,$P,Ut,{loading:0})}}const JP=t=>({dialog:t&1}),$x=t=>({dialog:t[0]});function QP(t){let e,n,r,i,s;const c=t[4].default,l=Sr(c,t,t[3],$x);return{c(){e=_e("dialog"),n=_e("article"),l&&l.c(),e.open=!0},m(d,v){xe(d,e,v),oe(e,n),l&&l.m(n,null),t[6](e),r=!0,i||(s=[Lt(window,"click",t[1]),Lt(window,"keydown",t[2]),Lt(e,"close",t[5])],i=!0)},p(d,[v]){l&&l.p&&(!r||v&9)&&Ir(l,c,d,d[3],r?Er(c,d[3],v,JP):Cr(d[3]),$x)},i(d){r||(ue(l,d),r=!0)},o(d){ye(l,d),r=!1},d(d){d&&be(e),l&&l.d(d),t[6](null),i=!1,Hr(s)}}}function eM(t,e,n){let{$$slots:r={},$$scope:i}=e,s;function c(S){s.open&&S.target==s&&s.close()}function l(S){(S.key=="Escape"||S.key=="Enter")&&(S.stopPropagation(),s.close())}function d(S){gn.call(this,t,S)}function v(S){ai[S?"unshift":"push"](()=>{s=S,n(0,s)})}return t.$$set=S=>{"$$scope"in S&&n(3,i=S.$$scope)},[s,c,l,i,r,d,v]}class _1 extends Yt{constructor(e){super(),Xt(this,e,eM,QP,Ut,{})}}function Kx(t,e,n){const r=t.slice();return r[1]=e[n][0],r[2]=e[n][1],r}function Jx(t){let e,n,r=t[1]+"",i,s,c,l=t[2]+"",d,v;return{c(){e=_e("tr"),n=_e("td"),i=ot(r),s=We(),c=_e("td"),d=ot(l),v=We()},m(S,E){xe(S,e,E),oe(e,n),oe(n,i),oe(e,s),oe(e,c),oe(c,d),oe(e,v)},p(S,E){E&1&&r!==(r=S[1]+"")&&cr(i,r),E&1&&l!==(l=S[2]+"")&&cr(d,l)},d(S){S&&be(e)}}}function tM(t){let e,n,r=bs(Object.entries(t[0])),i=[];for(let s=0;s{"properties"in i&&n(0,r=i.properties)},[r]}class ny extends Yt{constructor(e){super(),Xt(this,e,nM,tM,Ut,{properties:0})}}function p_(t,e){let n=document.createElement("a");n.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(e)),n.setAttribute("download",t),document.body.appendChild(n),n.click(),document.body.removeChild(n)}function Rr(t){if(t==null||t==null)throw new Error("Oops, notNull given something null");return t}let st;const nu=new Array(128).fill(void 0);nu.push(void 0,null,!0,!1);function vn(t){return nu[t]}let Bd=nu.length;function rM(t){t<132||(nu[t]=Bd,Bd=t)}function Do(t){const e=vn(t);return rM(t),e}let Qo=0,Cd=null;function Tf(){return(Cd===null||Cd.byteLength===0)&&(Cd=new Uint8Array(st.memory.buffer)),Cd}const Kg=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},iM=typeof Kg.encodeInto=="function"?function(t,e){return Kg.encodeInto(t,e)}:function(t,e){const n=Kg.encode(t);return e.set(n),{read:t.length,written:n.length}};function Ba(t,e,n){if(n===void 0){const l=Kg.encode(t),d=e(l.length,1)>>>0;return Tf().subarray(d,d+l.length).set(l),Qo=l.length,d}let r=t.length,i=e(r,1)>>>0;const s=Tf();let c=0;for(;c127)break;s[i+c]=l}if(c!==r){c!==0&&(t=t.slice(c)),i=n(i,r,r=c+t.length*3,1)>>>0;const l=Tf().subarray(i+c,i+r),d=iM(t,l);c+=d.written}return Qo=c,i}function xf(t){return t==null}let Td=null;function Wt(){return(Td===null||Td.byteLength===0)&&(Td=new Int32Array(st.memory.buffer)),Td}const WE=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&WE.decode();function ms(t,e){return t=t>>>0,WE.decode(Tf().subarray(t,t+e))}function ur(t){Bd===nu.length&&nu.push(nu.length+1);const e=Bd;return Bd=nu[e],nu[e]=t,e}let Ld=null;function HE(){return(Ld===null||Ld.byteLength===0)&&(Ld=new Float64Array(st.memory.buffer)),Ld}let Pd=null;function oM(){return(Pd===null||Pd.byteLength===0)&&(Pd=new BigInt64Array(st.memory.buffer)),Pd}function gv(t){const e=typeof t;if(e=="number"||e=="boolean"||t==null)return`${t}`;if(e=="string")return`"${t}"`;if(e=="symbol"){const i=t.description;return i==null?"Symbol":`Symbol(${i})`}if(e=="function"){const i=t.name;return typeof i=="string"&&i.length>0?`Function(${i})`:"Function"}if(Array.isArray(t)){const i=t.length;let s="[";i>0&&(s+=gv(t[0]));for(let c=1;c1)r=n[1];else return toString.call(t);if(r=="Object")try{return"Object("+JSON.stringify(t)+")"}catch{return"Object"}return t instanceof Error?`${t.name}: ${t.message} +${t.stack}`:r}function sM(t,e){const n=e(t.length*1,1)>>>0;return Tf().set(t,n/1),Qo=t.length,n}function aM(t,e){return t=t>>>0,HE().subarray(t/8,t/8+e)}function lM(t,e){return t=t>>>0,Tf().subarray(t/1,t/1+e)}function Gc(t,e){try{return t.apply(this,e)}catch(n){st.__wbindgen_exn_store(ur(n))}}class ZE{__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,e}free(){const e=this.__destroy_into_raw();st.__wbg_ltn_free(e)}constructor(e,n,r){try{const v=st.__wbindgen_add_to_stack_pointer(-16),S=sM(e,st.__wbindgen_malloc),E=Qo;var i=xf(r)?0:Ba(r,st.__wbindgen_malloc,st.__wbindgen_realloc),s=Qo;st.ltn_new(v,S,E,ur(n),i,s);var c=Wt()[v/4+0],l=Wt()[v/4+1],d=Wt()[v/4+2];if(d)throw Do(l);return this.__wbg_ptr=c>>>0,this}finally{st.__wbindgen_add_to_stack_pointer(16)}}getInvertedBoundary(){let e,n;try{const v=st.__wbindgen_add_to_stack_pointer(-16);st.ltn_getInvertedBoundary(v,this.__wbg_ptr);var r=Wt()[v/4+0],i=Wt()[v/4+1],s=Wt()[v/4+2],c=Wt()[v/4+3],l=r,d=i;if(c)throw l=0,d=0,Do(s);return e=l,n=d,ms(l,d)}finally{st.__wbindgen_add_to_stack_pointer(16),st.__wbindgen_free(e,n,1)}}getBounds(){try{const i=st.__wbindgen_add_to_stack_pointer(-16);st.ltn_getBounds(i,this.__wbg_ptr);var e=Wt()[i/4+0],n=Wt()[i/4+1],r=aM(e,n).slice();return st.__wbindgen_free(e,n*8,8),r}finally{st.__wbindgen_add_to_stack_pointer(16)}}toRouteSnapper(){try{const i=st.__wbindgen_add_to_stack_pointer(-16);st.ltn_toRouteSnapper(i,this.__wbg_ptr);var e=Wt()[i/4+0],n=Wt()[i/4+1],r=lM(e,n).slice();return st.__wbindgen_free(e,n*1,1),r}finally{st.__wbindgen_add_to_stack_pointer(16)}}toRouteSnapperGj(){let e,n;try{const v=st.__wbindgen_add_to_stack_pointer(-16);st.ltn_toRouteSnapperGj(v,this.__wbg_ptr);var r=Wt()[v/4+0],i=Wt()[v/4+1],s=Wt()[v/4+2],c=Wt()[v/4+3],l=r,d=i;if(c)throw l=0,d=0,Do(s);return e=l,n=d,ms(l,d)}finally{st.__wbindgen_add_to_stack_pointer(16),st.__wbindgen_free(e,n,1)}}renderModalFilters(){let e,n;try{const v=st.__wbindgen_add_to_stack_pointer(-16);st.ltn_renderModalFilters(v,this.__wbg_ptr);var r=Wt()[v/4+0],i=Wt()[v/4+1],s=Wt()[v/4+2],c=Wt()[v/4+3],l=r,d=i;if(c)throw l=0,d=0,Do(s);return e=l,n=d,ms(l,d)}finally{st.__wbindgen_add_to_stack_pointer(16),st.__wbindgen_free(e,n,1)}}renderNeighbourhood(){let e,n;try{const v=st.__wbindgen_add_to_stack_pointer(-16);st.ltn_renderNeighbourhood(v,this.__wbg_ptr);var r=Wt()[v/4+0],i=Wt()[v/4+1],s=Wt()[v/4+2],c=Wt()[v/4+3],l=r,d=i;if(c)throw l=0,d=0,Do(s);return e=l,n=d,ms(l,d)}finally{st.__wbindgen_add_to_stack_pointer(16),st.__wbindgen_free(e,n,1)}}renderAutoBoundaries(){let e,n;try{const v=st.__wbindgen_add_to_stack_pointer(-16);st.ltn_renderAutoBoundaries(v,this.__wbg_ptr);var r=Wt()[v/4+0],i=Wt()[v/4+1],s=Wt()[v/4+2],c=Wt()[v/4+3],l=r,d=i;if(c)throw l=0,d=0,Do(s);return e=l,n=d,ms(l,d)}finally{st.__wbindgen_add_to_stack_pointer(16),st.__wbindgen_free(e,n,1)}}setNeighbourhoodBoundary(e,n){try{const s=st.__wbindgen_add_to_stack_pointer(-16),c=Ba(e,st.__wbindgen_malloc,st.__wbindgen_realloc),l=Qo;st.ltn_setNeighbourhoodBoundary(s,this.__wbg_ptr,c,l,ur(n));var r=Wt()[s/4+0],i=Wt()[s/4+1];if(i)throw Do(r)}finally{st.__wbindgen_add_to_stack_pointer(16)}}deleteNeighbourhoodBoundary(e){const n=Ba(e,st.__wbindgen_malloc,st.__wbindgen_realloc),r=Qo;st.ltn_deleteNeighbourhoodBoundary(this.__wbg_ptr,n,r)}renameNeighbourhoodBoundary(e,n){const r=Ba(e,st.__wbindgen_malloc,st.__wbindgen_realloc),i=Qo,s=Ba(n,st.__wbindgen_malloc,st.__wbindgen_realloc),c=Qo;st.ltn_renameNeighbourhoodBoundary(this.__wbg_ptr,r,i,s,c)}setCurrentNeighbourhood(e){try{const i=st.__wbindgen_add_to_stack_pointer(-16),s=Ba(e,st.__wbindgen_malloc,st.__wbindgen_realloc),c=Qo;st.ltn_setCurrentNeighbourhood(i,this.__wbg_ptr,s,c);var n=Wt()[i/4+0],r=Wt()[i/4+1];if(r)throw Do(n)}finally{st.__wbindgen_add_to_stack_pointer(16)}}addModalFilter(e,n){try{const s=st.__wbindgen_add_to_stack_pointer(-16),c=Ba(n,st.__wbindgen_malloc,st.__wbindgen_realloc),l=Qo;st.ltn_addModalFilter(s,this.__wbg_ptr,ur(e),c,l);var r=Wt()[s/4+0],i=Wt()[s/4+1];if(i)throw Do(r)}finally{st.__wbindgen_add_to_stack_pointer(16)}}addManyModalFilters(e,n){try{const s=st.__wbindgen_add_to_stack_pointer(-16),c=Ba(n,st.__wbindgen_malloc,st.__wbindgen_realloc),l=Qo;st.ltn_addManyModalFilters(s,this.__wbg_ptr,ur(e),c,l);var r=Wt()[s/4+0],i=Wt()[s/4+1];if(i)throw Do(r)}finally{st.__wbindgen_add_to_stack_pointer(16)}}deleteModalFilter(e){st.ltn_deleteModalFilter(this.__wbg_ptr,e)}toggleDirection(e){st.ltn_toggleDirection(this.__wbg_ptr,e)}undo(){st.ltn_undo(this.__wbg_ptr)}redo(){st.ltn_redo(this.__wbg_ptr)}getShortcutsCrossingRoad(e){let n,r;try{const S=st.__wbindgen_add_to_stack_pointer(-16);st.ltn_getShortcutsCrossingRoad(S,this.__wbg_ptr,e);var i=Wt()[S/4+0],s=Wt()[S/4+1],c=Wt()[S/4+2],l=Wt()[S/4+3],d=i,v=s;if(l)throw d=0,v=0,Do(c);return n=d,r=v,ms(d,v)}finally{st.__wbindgen_add_to_stack_pointer(16),st.__wbindgen_free(n,r,1)}}getAllShortcuts(){let e,n;try{const v=st.__wbindgen_add_to_stack_pointer(-16);st.ltn_getAllShortcuts(v,this.__wbg_ptr);var r=Wt()[v/4+0],i=Wt()[v/4+1],s=Wt()[v/4+2],c=Wt()[v/4+3],l=r,d=i;if(c)throw l=0,d=0,Do(s);return e=l,n=d,ms(l,d)}finally{st.__wbindgen_add_to_stack_pointer(16),st.__wbindgen_free(e,n,1)}}toSavefile(){let e,n;try{const v=st.__wbindgen_add_to_stack_pointer(-16);st.ltn_toSavefile(v,this.__wbg_ptr);var r=Wt()[v/4+0],i=Wt()[v/4+1],s=Wt()[v/4+2],c=Wt()[v/4+3],l=r,d=i;if(c)throw l=0,d=0,Do(s);return e=l,n=d,ms(l,d)}finally{st.__wbindgen_add_to_stack_pointer(16),st.__wbindgen_free(e,n,1)}}loadSavefile(e){try{const i=st.__wbindgen_add_to_stack_pointer(-16);st.ltn_loadSavefile(i,this.__wbg_ptr,ur(e));var n=Wt()[i/4+0],r=Wt()[i/4+1];if(r)throw Do(n)}finally{st.__wbindgen_add_to_stack_pointer(16)}}compareRoute(e,n,r,i,s){let c,l;try{const A=st.__wbindgen_add_to_stack_pointer(-16);st.ltn_compareRoute(A,this.__wbg_ptr,e,n,r,i,s);var d=Wt()[A/4+0],v=Wt()[A/4+1],S=Wt()[A/4+2],E=Wt()[A/4+3],C=d,M=v;if(E)throw C=0,M=0,Do(S);return c=C,l=M,ms(C,M)}finally{st.__wbindgen_add_to_stack_pointer(16),st.__wbindgen_free(c,l,1)}}}async function uM(t,e){if(typeof Response=="function"&&t instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(t,e)}catch(r){if(t.headers.get("Content-Type")!="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r);else throw r}const n=await t.arrayBuffer();return await WebAssembly.instantiate(n,e)}else{const n=await WebAssembly.instantiate(t,e);return n instanceof WebAssembly.Instance?{instance:n,module:t}:n}}function cM(){const t={};return t.wbg={},t.wbg.__wbindgen_object_drop_ref=function(e){Do(e)},t.wbg.__wbindgen_string_get=function(e,n){const r=vn(n),i=typeof r=="string"?r:void 0;var s=xf(i)?0:Ba(i,st.__wbindgen_malloc,st.__wbindgen_realloc),c=Qo;Wt()[e/4+1]=c,Wt()[e/4+0]=s},t.wbg.__wbindgen_error_new=function(e,n){const r=new Error(ms(e,n));return ur(r)},t.wbg.__wbindgen_string_new=function(e,n){const r=ms(e,n);return ur(r)},t.wbg.__wbindgen_boolean_get=function(e){const n=vn(e);return typeof n=="boolean"?n?1:0:2},t.wbg.__wbindgen_is_bigint=function(e){return typeof vn(e)=="bigint"},t.wbg.__wbindgen_number_get=function(e,n){const r=vn(n),i=typeof r=="number"?r:void 0;HE()[e/8+1]=xf(i)?0:i,Wt()[e/4+0]=!xf(i)},t.wbg.__wbindgen_is_object=function(e){const n=vn(e);return typeof n=="object"&&n!==null},t.wbg.__wbindgen_in=function(e,n){return vn(e)in vn(n)},t.wbg.__wbindgen_bigint_from_i64=function(e){return ur(e)},t.wbg.__wbindgen_jsval_eq=function(e,n){return vn(e)===vn(n)},t.wbg.__wbindgen_bigint_from_u64=function(e){const n=BigInt.asUintN(64,e);return ur(n)},t.wbg.__wbindgen_is_undefined=function(e){return vn(e)===void 0},t.wbg.__wbindgen_jsval_loose_eq=function(e,n){return vn(e)==vn(n)},t.wbg.__wbindgen_object_clone_ref=function(e){const n=vn(e);return ur(n)},t.wbg.__wbg_getwithrefkey_3b3c46ba20582127=function(e,n){const r=vn(e)[vn(n)];return ur(r)},t.wbg.__wbg_debug_34c9290896ec9856=function(e){console.debug(vn(e))},t.wbg.__wbg_error_e60eff06f24ab7a4=function(e){console.error(vn(e))},t.wbg.__wbg_info_d7d58472d0bab115=function(e){console.info(vn(e))},t.wbg.__wbg_log_a4530b4fe289336f=function(e){console.log(vn(e))},t.wbg.__wbg_warn_f260f49434e45e62=function(e){console.warn(vn(e))},t.wbg.__wbg_new_abda76e883ba8a5f=function(){const e=new Error;return ur(e)},t.wbg.__wbg_stack_658279fe44541cf6=function(e,n){const r=vn(n).stack,i=Ba(r,st.__wbindgen_malloc,st.__wbindgen_realloc),s=Qo;Wt()[e/4+1]=s,Wt()[e/4+0]=i},t.wbg.__wbg_error_f851667af71bcfc6=function(e,n){let r,i;try{r=e,i=n,console.error(ms(e,n))}finally{st.__wbindgen_free(r,i,1)}},t.wbg.__wbg_performance_3f3012faa4463882=function(e){const n=vn(e).performance;return ur(n)},t.wbg.__wbg_now_2fd65358804c9485=function(e){return vn(e).now()},t.wbg.__wbg_get_f01601b5a68d10e3=function(e,n){const r=vn(e)[n>>>0];return ur(r)},t.wbg.__wbg_length_1009b1af0c481d7b=function(e){return vn(e).length},t.wbg.__wbindgen_is_function=function(e){return typeof vn(e)=="function"},t.wbg.__wbg_newnoargs_c62ea9419c21fbac=function(e,n){const r=new Function(ms(e,n));return ur(r)},t.wbg.__wbg_next_9b877f231f476d01=function(e){const n=vn(e).next;return ur(n)},t.wbg.__wbg_next_6529ee0cca8d57ed=function(){return Gc(function(e){const n=vn(e).next();return ur(n)},arguments)},t.wbg.__wbg_done_5fe336b092d60cf2=function(e){return vn(e).done},t.wbg.__wbg_value_0c248a78fdc8e19f=function(e){const n=vn(e).value;return ur(n)},t.wbg.__wbg_iterator_db7ca081358d4fb2=function(){return ur(Symbol.iterator)},t.wbg.__wbg_get_7b48513de5dc5ea4=function(){return Gc(function(e,n){const r=Reflect.get(vn(e),vn(n));return ur(r)},arguments)},t.wbg.__wbg_call_90c26b09837aba1c=function(){return Gc(function(e,n){const r=vn(e).call(vn(n));return ur(r)},arguments)},t.wbg.__wbg_self_f0e34d89f33b99fd=function(){return Gc(function(){const e=self.self;return ur(e)},arguments)},t.wbg.__wbg_window_d3b084224f4774d7=function(){return Gc(function(){const e=window.window;return ur(e)},arguments)},t.wbg.__wbg_globalThis_9caa27ff917c6860=function(){return Gc(function(){const e=globalThis.globalThis;return ur(e)},arguments)},t.wbg.__wbg_global_35dfdd59a4da3e74=function(){return Gc(function(){const e=global.global;return ur(e)},arguments)},t.wbg.__wbg_isArray_74fb723e24f76012=function(e){return Array.isArray(vn(e))},t.wbg.__wbg_instanceof_ArrayBuffer_e7d53d51371448e2=function(e){let n;try{n=vn(e)instanceof ArrayBuffer}catch{n=!1}return n},t.wbg.__wbg_isSafeInteger_f93fde0dca9820f8=function(e){return Number.isSafeInteger(vn(e))},t.wbg.__wbg_entries_9e2e2aa45aa5094a=function(e){const n=Object.entries(vn(e));return ur(n)},t.wbg.__wbg_buffer_a448f833075b71ba=function(e){const n=vn(e).buffer;return ur(n)},t.wbg.__wbg_new_8f67e318f15d7254=function(e){const n=new Uint8Array(vn(e));return ur(n)},t.wbg.__wbg_set_2357bf09366ee480=function(e,n,r){vn(e).set(vn(n),r>>>0)},t.wbg.__wbg_length_1d25fa9e4ac21ce7=function(e){return vn(e).length},t.wbg.__wbg_instanceof_Uint8Array_bced6f43aed8c1aa=function(e){let n;try{n=vn(e)instanceof Uint8Array}catch{n=!1}return n},t.wbg.__wbindgen_bigint_get_as_i64=function(e,n){const r=vn(n),i=typeof r=="bigint"?r:void 0;oM()[e/8+1]=xf(i)?BigInt(0):i,Wt()[e/4+0]=!xf(i)},t.wbg.__wbindgen_debug_string=function(e,n){const r=gv(vn(n)),i=Ba(r,st.__wbindgen_malloc,st.__wbindgen_realloc),s=Qo;Wt()[e/4+1]=s,Wt()[e/4+0]=i},t.wbg.__wbindgen_throw=function(e,n){throw new Error(ms(e,n))},t.wbg.__wbindgen_memory=function(){const e=st.memory;return ur(e)},t}function hM(t,e){return st=t.exports,XE.__wbindgen_wasm_module=e,Pd=null,Ld=null,Td=null,Cd=null,st}async function XE(t){if(st!==void 0)return st;typeof t>"u"&&(t="/ltn/assets/backend_bg.wasm");const e=cM();(typeof t=="string"||typeof Request=="function"&&t instanceof Request||typeof URL=="function"&&t instanceof URL)&&(t=fetch(t));const{instance:n,module:r}=await uM(await t,e);return hM(n,r)}var ym=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function y1(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function ry(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}var YE={exports:{}};/** * MapLibre GL JS * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v4.1.3/LICENSE.txt - */(function(t,e){(function(n,r){t.exports=r()})(ym,function(){var n={},r={};function i(c,l,d){if(r[c]=d,c==="index"){var v="var sharedModule = {}; ("+r.shared+")(sharedModule); ("+r.worker+")(sharedModule);",S={};return r.shared(S),r.index(n,S),typeof window<"u"&&n.setWorkerUrl(window.URL.createObjectURL(new Blob([v],{type:"text/javascript"}))),n}}i("shared",["exports"],function(c){function l(u,o,h,p){return new(h||(h=Promise))(function(_,x){function w(D){try{P(p.next(D))}catch(O){x(O)}}function I(D){try{P(p.throw(D))}catch(O){x(O)}}function P(D){var O;D.done?_(D.value):(O=D.value,O instanceof h?O:new h(function(B){B(O)})).then(w,I)}P((p=p.apply(u,o||[])).next())})}function d(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}typeof SuppressedError=="function"&&SuppressedError;var v=S;function S(u,o){this.x=u,this.y=o}S.prototype={clone:function(){return new S(this.x,this.y)},add:function(u){return this.clone()._add(u)},sub:function(u){return this.clone()._sub(u)},multByPoint:function(u){return this.clone()._multByPoint(u)},divByPoint:function(u){return this.clone()._divByPoint(u)},mult:function(u){return this.clone()._mult(u)},div:function(u){return this.clone()._div(u)},rotate:function(u){return this.clone()._rotate(u)},rotateAround:function(u,o){return this.clone()._rotateAround(u,o)},matMult:function(u){return this.clone()._matMult(u)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(u){return this.x===u.x&&this.y===u.y},dist:function(u){return Math.sqrt(this.distSqr(u))},distSqr:function(u){var o=u.x-this.x,h=u.y-this.y;return o*o+h*h},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(u){return Math.atan2(this.y-u.y,this.x-u.x)},angleWith:function(u){return this.angleWithSep(u.x,u.y)},angleWithSep:function(u,o){return Math.atan2(this.x*o-this.y*u,this.x*u+this.y*o)},_matMult:function(u){var o=u[2]*this.x+u[3]*this.y;return this.x=u[0]*this.x+u[1]*this.y,this.y=o,this},_add:function(u){return this.x+=u.x,this.y+=u.y,this},_sub:function(u){return this.x-=u.x,this.y-=u.y,this},_mult:function(u){return this.x*=u,this.y*=u,this},_div:function(u){return this.x/=u,this.y/=u,this},_multByPoint:function(u){return this.x*=u.x,this.y*=u.y,this},_divByPoint:function(u){return this.x/=u.x,this.y/=u.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var u=this.y;return this.y=this.x,this.x=-u,this},_rotate:function(u){var o=Math.cos(u),h=Math.sin(u),p=h*this.x+o*this.y;return this.x=o*this.x-h*this.y,this.y=p,this},_rotateAround:function(u,o){var h=Math.cos(u),p=Math.sin(u),_=o.y+p*(this.x-o.x)+h*(this.y-o.y);return this.x=o.x+h*(this.x-o.x)-p*(this.y-o.y),this.y=_,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},S.convert=function(u){return u instanceof S?u:Array.isArray(u)?new S(u[0],u[1]):u};var E=d(v),C=M;function M(u,o,h,p){this.cx=3*u,this.bx=3*(h-u)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*o,this.by=3*(p-o)-this.cy,this.ay=1-this.cy-this.by,this.p1x=u,this.p1y=o,this.p2x=h,this.p2y=p}M.prototype={sampleCurveX:function(u){return((this.ax*u+this.bx)*u+this.cx)*u},sampleCurveY:function(u){return((this.ay*u+this.by)*u+this.cy)*u},sampleCurveDerivativeX:function(u){return(3*this.ax*u+2*this.bx)*u+this.cx},solveCurveX:function(u,o){if(o===void 0&&(o=1e-6),u<0)return 0;if(u>1)return 1;for(var h=u,p=0;p<8;p++){var _=this.sampleCurveX(h)-u;if(Math.abs(_)_?w=h:I=h,h=.5*(I-w)+w;return h},solve:function(u,o){return this.sampleCurveY(this.solveCurveX(u,o))}};var A=d(C);let R,z;function U(){return R==null&&(R=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),R}function F(){if(z==null&&(z=!1,U())){const o=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(o){for(let p=0;p<5*5;p++){const _=4*p;o.fillStyle=`rgb(${_},${_+1},${_+2})`,o.fillRect(p%5,Math.floor(p/5),1,1)}const h=o.getImageData(0,0,5,5).data;for(let p=0;p<5*5*4;p++)if(p%4!=3&&h[p]!==p){z=!0;break}}}return z||!1}function G(u,o,h,p){const _=new A(u,o,h,p);return function(x){return _.solve(x)}}const H=G(.25,.1,.25,1);function te(u,o,h){return Math.min(h,Math.max(o,u))}function ee(u,o,h){const p=h-o,_=((u-o)%p+p)%p+o;return _===o?h:_}function fe(u,...o){for(const h of o)for(const p in h)u[p]=h[p];return u}let pe=1;function se(u,o,h){const p={};for(const _ in u)p[_]=o.call(h||this,u[_],_,u);return p}function Ae(u,o,h){const p={};for(const _ in u)o.call(h||this,u[_],_,u)&&(p[_]=u[_]);return p}function Y(u){return Array.isArray(u)?u.map(Y):typeof u=="object"&&u?se(u,Y):u}const ae={};function Ke(u){ae[u]||(typeof console<"u"&&console.warn(u),ae[u]=!0)}function Le(u,o,h){return(h.y-u.y)*(o.x-u.x)>(o.y-u.y)*(h.x-u.x)}function tt(u){let o=0;for(let h,p,_=0,x=u.length,w=x-1;_"u")throw new Error("VideoFrame not supported");const x=new VideoFrame(u,{timestamp:0});try{const w=x==null?void 0:x.format;if(!w||!w.startsWith("BGR")&&!w.startsWith("RGB"))throw new Error(`Unrecognized format ${w}`);const I=w.startsWith("BGR"),P=new Uint8ClampedArray(p*_*4);if(yield x.copyTo(P,function(D,O,B,W,X){const K=4*Math.max(-O,0),ie=(Math.max(0,B)-B)*W*4+K,de=4*W,we=Math.max(0,O),Oe=Math.max(0,B);return{rect:{x:we,y:Oe,width:Math.min(D.width,O+W)-we,height:Math.min(D.height,B+X)-Oe},layout:[{offset:ie,stride:de}]}}(u,o,h,p,_)),I)for(let D=0;Dut(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,Pn=function(u,o){if(/:\/\//.test(u.url)&&!/^https?:|^file:/.test(u.url)){const p=_n(u.url);if(p)return p(u,o);if(ut(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:u,targetMapId:pn},o)}if(!(/^file:/.test(h=u.url)||/^file:/.test(zr())&&!/^\w+:/.test(h))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(p,_){return l(this,void 0,void 0,function*(){const x=new Request(p.url,{method:p.method||"GET",body:p.body,credentials:p.credentials,headers:p.headers,cache:p.cache,referrer:zr(),signal:_.signal});p.type==="json"&&x.headers.set("Accept","application/json");const w=yield fetch(x);if(!w.ok){const D=yield w.blob();throw new Yn(w.status,w.statusText,p.url,D)}let I;I=p.type==="arrayBuffer"||p.type==="image"?w.arrayBuffer():p.type==="json"?w.json():w.text();const P=yield I;if(_.signal.aborted)throw wn();return{data:P,cacheControl:w.headers.get("Cache-Control"),expires:w.headers.get("Expires")}})}(u,o);if(ut(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:u,mustQueue:!0,targetMapId:pn},o)}var h;return function(p,_){return new Promise((x,w)=>{const I=new XMLHttpRequest;I.open(p.method||"GET",p.url,!0),p.type!=="arrayBuffer"&&p.type!=="image"||(I.responseType="arraybuffer");for(const P in p.headers)I.setRequestHeader(P,p.headers[P]);p.type==="json"&&(I.responseType="text",I.setRequestHeader("Accept","application/json")),I.withCredentials=p.credentials==="include",I.onerror=()=>{w(new Error(I.statusText))},I.onload=()=>{if(!_.signal.aborted)if((I.status>=200&&I.status<300||I.status===0)&&I.response!==null){let P=I.response;if(p.type==="json")try{P=JSON.parse(I.response)}catch(D){return void w(D)}x({data:P,cacheControl:I.getResponseHeader("Cache-Control"),expires:I.getResponseHeader("Expires")})}else{const P=new Blob([I.response],{type:I.getResponseHeader("Content-Type")});w(new Yn(I.status,I.statusText,p.url,P))}},_.signal.addEventListener("abort",()=>{I.abort(),w(wn())}),I.send(p.body)})}(u,o)};function ar(u){if(!u||u.indexOf("://")<=0||u.indexOf("data:image/")===0||u.indexOf("blob:")===0)return!0;const o=new URL(u),h=window.location;return o.protocol===h.protocol&&o.host===h.host}function Zn(u,o,h){h[u]&&h[u].indexOf(o)!==-1||(h[u]=h[u]||[],h[u].push(o))}function ne(u,o,h){if(h&&h[u]){const p=h[u].indexOf(o);p!==-1&&h[u].splice(p,1)}}class Me{constructor(o,h={}){fe(this,h),this.type=o}}class dt extends Me{constructor(o,h={}){super("error",fe({error:o},h))}}class en{on(o,h){return this._listeners=this._listeners||{},Zn(o,h,this._listeners),this}off(o,h){return ne(o,h,this._listeners),ne(o,h,this._oneTimeListeners),this}once(o,h){return h?(this._oneTimeListeners=this._oneTimeListeners||{},Zn(o,h,this._oneTimeListeners),this):new Promise(p=>this.once(o,p))}fire(o,h){typeof o=="string"&&(o=new Me(o,h||{}));const p=o.type;if(this.listens(p)){o.target=this;const _=this._listeners&&this._listeners[p]?this._listeners[p].slice():[];for(const I of _)I.call(this,o);const x=this._oneTimeListeners&&this._oneTimeListeners[p]?this._oneTimeListeners[p].slice():[];for(const I of x)ne(p,I,this._oneTimeListeners),I.call(this,o);const w=this._eventedParent;w&&(fe(o,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),w.fire(o))}else o instanceof dt&&console.error(o.error);return this}listens(o){return this._listeners&&this._listeners[o]&&this._listeners[o].length>0||this._oneTimeListeners&&this._oneTimeListeners[o]&&this._oneTimeListeners[o].length>0||this._eventedParent&&this._eventedParent.listens(o)}setEventedParent(o,h){return this._eventedParent=o,this._eventedParentData=h,this}}var Re={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sky:{type:"sky"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};const It=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Cn(u,o){const h={};for(const p in u)p!=="ref"&&(h[p]=u[p]);return It.forEach(p=>{p in o&&(h[p]=o[p])}),h}function yn(u,o){if(Array.isArray(u)){if(!Array.isArray(o)||u.length!==o.length)return!1;for(let h=0;h`:u.itemType.kind==="value"?"array":`array<${o}>`}return u.kind}const Te=[ui,ft,ln,sn,Hr,Jr,us,J(on),me,q,Z];function Q(u,o){if(o.kind==="error")return null;if(u.kind==="array"){if(o.kind==="array"&&(o.N===0&&o.itemType.kind==="value"||!Q(u.itemType,o.itemType))&&(typeof u.N!="number"||u.N===o.N))return null}else{if(u.kind===o.kind)return null;if(u.kind==="value"){for(const h of Te)if(!Q(h,o))return null}}return`Expected ${le(u)} but found ${le(o)} instead.`}function Pe(u,o){return o.some(h=>h.kind===u.kind)}function Se(u,o){return o.some(h=>h==="null"?u===null:h==="array"?Array.isArray(u):h==="object"?u&&!Array.isArray(u)&&typeof u=="object":h===typeof u)}function Ne(u,o){return u.kind==="array"&&o.kind==="array"?u.itemType.kind===o.itemType.kind&&typeof u.N=="number":u.kind===o.kind}const qe=.96422,Ye=.82521,Je=4/29,Dt=6/29,zt=3*Dt*Dt,Qt=Dt*Dt*Dt,tn=Math.PI/180,Mn=180/Math.PI;function er(u){return(u%=360)<0&&(u+=360),u}function vr([u,o,h,p]){let _,x;const w=dn((.2225045*(u=ci(u))+.7168786*(o=ci(o))+.0606169*(h=ci(h)))/1);u===o&&o===h?_=x=w:(_=dn((.4360747*u+.3850649*o+.1430804*h)/qe),x=dn((.0139322*u+.0971045*o+.7141733*h)/Ye));const I=116*w-16;return[I<0?0:I,500*(_-w),200*(w-x),p]}function ci(u){return u<=.04045?u/12.92:Math.pow((u+.055)/1.055,2.4)}function dn(u){return u>Qt?Math.pow(u,1/3):u/zt+Je}function Fr([u,o,h,p]){let _=(u+16)/116,x=isNaN(o)?_:_+o/500,w=isNaN(h)?_:_-h/200;return _=1*uo(_),x=qe*uo(x),w=Ye*uo(w),[_i(3.1338561*x-1.6168667*_-.4906146*w),_i(-.9787684*x+1.9161415*_+.033454*w),_i(.0719453*x-.2289914*_+1.4052427*w),p]}function _i(u){return(u=u<=.00304?12.92*u:1.055*Math.pow(u,1/2.4)-.055)<0?0:u>1?1:u}function uo(u){return u>Dt?u*u*u:zt*(u-Je)}function So(u){return parseInt(u.padEnd(2,u),16)/255}function Pi(u,o){return Js(o?u/100:u,0,1)}function Js(u,o,h){return Math.min(Math.max(o,u),h)}function Am(u){return!u.some(Number.isNaN)}const My={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};class $n{constructor(o,h,p,_=1,x=!0){this.r=o,this.g=h,this.b=p,this.a=_,x||(this.r*=_,this.g*=_,this.b*=_,_||this.overwriteGetter("rgb",[o,h,p,_]))}static parse(o){if(o instanceof $n)return o;if(typeof o!="string")return;const h=function(p){if((p=p.toLowerCase().trim())==="transparent")return[0,0,0,0];const _=My[p];if(_){const[w,I,P]=_;return[w/255,I/255,P/255,1]}if(p.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(p)){const w=p.length<6?1:2;let I=1;return[So(p.slice(I,I+=w)),So(p.slice(I,I+=w)),So(p.slice(I,I+=w)),So(p.slice(I,I+w)||"ff")]}if(p.startsWith("rgb")){const w=p.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(w){const[I,P,D,O,B,W,X,K,ie,de,we,Oe]=w,Ee=[O||" ",X||" ",de].join("");if(Ee===" "||Ee===" /"||Ee===",,"||Ee===",,,"){const ke=[D,W,ie].join(""),Qe=ke==="%%%"?100:ke===""?255:0;if(Qe){const et=[Js(+P/Qe,0,1),Js(+B/Qe,0,1),Js(+K/Qe,0,1),we?Pi(+we,Oe):1];if(Am(et))return et}}return}}const x=p.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(x){const[w,I,P,D,O,B,W,X,K]=x,ie=[P||" ",O||" ",W].join("");if(ie===" "||ie===" /"||ie===",,"||ie===",,,"){const de=[+I,Js(+D,0,100),Js(+B,0,100),X?Pi(+X,K):1];if(Am(de))return function([we,Oe,Ee,ke]){function Qe(et){const St=(et+we/30)%12,kt=Oe*Math.min(Ee,1-Ee);return Ee-kt*Math.max(-1,Math.min(St-3,9-St,1))}return we=er(we),Oe/=100,Ee/=100,[Qe(0),Qe(8),Qe(4),ke]}(de)}}}(o);return h?new $n(...h,!1):void 0}get rgb(){const{r:o,g:h,b:p,a:_}=this,x=_||1/0;return this.overwriteGetter("rgb",[o/x,h/x,p/x,_])}get hcl(){return this.overwriteGetter("hcl",function(o){const[h,p,_,x]=vr(o),w=Math.sqrt(p*p+_*_);return[Math.round(1e4*w)?er(Math.atan2(_,p)*Mn):NaN,w,h,x]}(this.rgb))}get lab(){return this.overwriteGetter("lab",vr(this.rgb))}overwriteGetter(o,h){return Object.defineProperty(this,o,{value:h}),h}toString(){const[o,h,p,_]=this.rgb;return`rgba(${[o,h,p].map(x=>Math.round(255*x)).join(",")},${_})`}}$n.black=new $n(0,0,0,1),$n.white=new $n(1,1,1,1),$n.transparent=new $n(0,0,0,0),$n.red=new $n(1,0,0,1);class yp{constructor(o,h,p){this.sensitivity=o?h?"variant":"case":h?"accent":"base",this.locale=p,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(o,h){return this.collator.compare(o,h)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class vp{constructor(o,h,p,_,x){this.text=o,this.image=h,this.scale=p,this.fontStack=_,this.textColor=x}}class jo{constructor(o){this.sections=o}static fromString(o){return new jo([new vp(o,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(o=>o.text.length!==0||o.image&&o.image.name.length!==0)}static factory(o){return o instanceof jo?o:jo.fromString(o)}toString(){return this.sections.length===0?"":this.sections.map(o=>o.text).join("")}}class Eo{constructor(o){this.values=o.slice()}static parse(o){if(o instanceof Eo)return o;if(typeof o=="number")return new Eo([o,o,o,o]);if(Array.isArray(o)&&!(o.length<1||o.length>4)){for(const h of o)if(typeof h!="number")return;switch(o.length){case 1:o=[o[0],o[0],o[0],o[0]];break;case 2:o=[o[0],o[1],o[0],o[1]];break;case 3:o=[o[0],o[1],o[2],o[1]]}return new Eo(o)}}toString(){return JSON.stringify(this.values)}}const _c=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class cs{constructor(o){this.values=o.slice()}static parse(o){if(o instanceof cs)return o;if(Array.isArray(o)&&!(o.length<1)&&o.length%2==0){for(let h=0;h=0&&u<=255&&typeof o=="number"&&o>=0&&o<=255&&typeof h=="number"&&h>=0&&h<=255?p===void 0||typeof p=="number"&&p>=0&&p<=1?null:`Invalid rgba value [${[u,o,h,p].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof p=="number"?[u,o,h,p]:[u,o,h]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function mh(u){if(u===null||typeof u=="string"||typeof u=="boolean"||typeof u=="number"||u instanceof $n||u instanceof yp||u instanceof jo||u instanceof Eo||u instanceof cs||u instanceof hs)return!0;if(Array.isArray(u)){for(const o of u)if(!mh(o))return!1;return!0}if(typeof u=="object"){for(const o in u)if(!mh(u[o]))return!1;return!0}return!1}function hi(u){if(u===null)return ui;if(typeof u=="string")return ln;if(typeof u=="boolean")return sn;if(typeof u=="number")return ft;if(u instanceof $n)return Hr;if(u instanceof yp)return Aa;if(u instanceof jo)return Jr;if(u instanceof Eo)return me;if(u instanceof cs)return Z;if(u instanceof hs)return q;if(Array.isArray(u)){const o=u.length;let h;for(const p of u){const _=hi(p);if(h){if(h===_)continue;h=on;break}h=_}return J(h||on,o)}return us}function yc(u){const o=typeof u;return u===null?"":o==="string"||o==="number"||o==="boolean"?String(u):u instanceof $n||u instanceof jo||u instanceof Eo||u instanceof cs||u instanceof hs?u.toString():JSON.stringify(u)}class nl{constructor(o,h){this.type=o,this.value=h}static parse(o,h){if(o.length!==2)return h.error(`'literal' expression requires exactly one argument, but found ${o.length-1} instead.`);if(!mh(o[1]))return h.error("invalid value");const p=o[1];let _=hi(p);const x=h.expectedType;return _.kind!=="array"||_.N!==0||!x||x.kind!=="array"||typeof x.N=="number"&&x.N!==0||(_=x),new nl(_,p)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class Pr{constructor(o){this.name="ExpressionEvaluationError",this.message=o}toJSON(){return this.message}}const gh={string:ln,number:ft,boolean:sn,object:us};class Go{constructor(o,h){this.type=o,this.args=h}static parse(o,h){if(o.length<2)return h.error("Expected at least one argument.");let p,_=1;const x=o[0];if(x==="array"){let I,P;if(o.length>2){const D=o[1];if(typeof D!="string"||!(D in gh)||D==="object")return h.error('The item type argument of "array" must be one of string, number, boolean',1);I=gh[D],_++}else I=on;if(o.length>3){if(o[2]!==null&&(typeof o[2]!="number"||o[2]<0||o[2]!==Math.floor(o[2])))return h.error('The length argument to "array" must be a positive integer literal',2);P=o[2],_++}p=J(I,P)}else{if(!gh[x])throw new Error(`Types doesn't contain name = ${x}`);p=gh[x]}const w=[];for(;_o.outputDefined())}}const _h={"to-boolean":sn,"to-color":Hr,"to-number":ft,"to-string":ln};class Qs{constructor(o,h){this.type=o,this.args=h}static parse(o,h){if(o.length<2)return h.error("Expected at least one argument.");const p=o[0];if(!_h[p])throw new Error(`Can't parse ${p} as it is not part of the known types`);if((p==="to-boolean"||p==="to-string")&&o.length!==2)return h.error("Expected one argument.");const _=_h[p],x=[];for(let w=1;w4?`Invalid rbga value ${JSON.stringify(h)}: expected an array containing either three or four numeric values.`:xu(h[0],h[1],h[2],h[3]),!p))return new $n(h[0]/255,h[1]/255,h[2]/255,h[3])}throw new Pr(p||`Could not parse color from value '${typeof h=="string"?h:JSON.stringify(h)}'`)}case"padding":{let h;for(const p of this.args){h=p.evaluate(o);const _=Eo.parse(h);if(_)return _}throw new Pr(`Could not parse padding from value '${typeof h=="string"?h:JSON.stringify(h)}'`)}case"variableAnchorOffsetCollection":{let h;for(const p of this.args){h=p.evaluate(o);const _=cs.parse(h);if(_)return _}throw new Pr(`Could not parse variableAnchorOffsetCollection from value '${typeof h=="string"?h:JSON.stringify(h)}'`)}case"number":{let h=null;for(const p of this.args){if(h=p.evaluate(o),h===null)return 0;const _=Number(h);if(!isNaN(_))return _}throw new Pr(`Could not convert ${JSON.stringify(h)} to number.`)}case"formatted":return jo.fromString(yc(this.args[0].evaluate(o)));case"resolvedImage":return hs.fromString(yc(this.args[0].evaluate(o)));default:return yc(this.args[0].evaluate(o))}}eachChild(o){this.args.forEach(o)}outputDefined(){return this.args.every(o=>o.outputDefined())}}const vc=["Unknown","Point","LineString","Polygon"];class Kn{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?vc[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(o){let h=this._parseColorCache[o];return h||(h=this._parseColorCache[o]=$n.parse(o)),h}}class yh{constructor(o,h,p=[],_,x=new Fl,w=[]){this.registry=o,this.path=p,this.key=p.map(I=>`[${I}]`).join(""),this.scope=x,this.errors=w,this.expectedType=_,this._isConstant=h}parse(o,h,p,_,x={}){return h?this.concat(h,p,_)._parse(o,x):this._parse(o,x)}_parse(o,h){function p(_,x,w){return w==="assert"?new Go(x,[_]):w==="coerce"?new Qs(x,[_]):_}if(o!==null&&typeof o!="string"&&typeof o!="boolean"&&typeof o!="number"||(o=["literal",o]),Array.isArray(o)){if(o.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const _=o[0];if(typeof _!="string")return this.error(`Expression name must be a string, but found ${typeof _} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const x=this.registry[_];if(x){let w=x.parse(o,this);if(!w)return null;if(this.expectedType){const I=this.expectedType,P=w.type;if(I.kind!=="string"&&I.kind!=="number"&&I.kind!=="boolean"&&I.kind!=="object"&&I.kind!=="array"||P.kind!=="value")if(I.kind!=="color"&&I.kind!=="formatted"&&I.kind!=="resolvedImage"||P.kind!=="value"&&P.kind!=="string")if(I.kind!=="padding"||P.kind!=="value"&&P.kind!=="number"&&P.kind!=="array")if(I.kind!=="variableAnchorOffsetCollection"||P.kind!=="value"&&P.kind!=="array"){if(this.checkSubtype(I,P))return null}else w=p(w,I,h.typeAnnotation||"coerce");else w=p(w,I,h.typeAnnotation||"coerce");else w=p(w,I,h.typeAnnotation||"coerce");else w=p(w,I,h.typeAnnotation||"assert")}if(!(w instanceof nl)&&w.type.kind!=="resolvedImage"&&this._isConstant(w)){const I=new Kn;try{w=new nl(w.type,w.evaluate(I))}catch(P){return this.error(P.message),null}}return w}return this.error(`Unknown expression "${_}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(o===void 0?"'undefined' value invalid. Use null instead.":typeof o=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof o} instead.`)}concat(o,h,p){const _=typeof o=="number"?this.path.concat(o):this.path,x=p?this.scope.concat(p):this.scope;return new yh(this.registry,this._isConstant,_,h||null,x,this.errors)}error(o,...h){const p=`${this.key}${h.map(_=>`[${_}]`).join("")}`;this.errors.push(new lo(p,o))}checkSubtype(o,h){const p=Q(o,h);return p&&this.error(p),p}}class wu{constructor(o,h,p){this.type=Aa,this.locale=p,this.caseSensitive=o,this.diacriticSensitive=h}static parse(o,h){if(o.length!==2)return h.error("Expected one argument.");const p=o[1];if(typeof p!="object"||Array.isArray(p))return h.error("Collator options argument must be an object.");const _=h.parse(p["case-sensitive"]!==void 0&&p["case-sensitive"],1,sn);if(!_)return null;const x=h.parse(p["diacritic-sensitive"]!==void 0&&p["diacritic-sensitive"],1,sn);if(!x)return null;let w=null;return p.locale&&(w=h.parse(p.locale,1,ln),!w)?null:new wu(_,x,w)}evaluate(o){return new yp(this.caseSensitive.evaluate(o),this.diacriticSensitive.evaluate(o),this.locale?this.locale.evaluate(o):null)}eachChild(o){o(this.caseSensitive),o(this.diacriticSensitive),this.locale&&o(this.locale)}outputDefined(){return!1}}const rl=8192;function vh(u,o){u[0]=Math.min(u[0],o[0]),u[1]=Math.min(u[1],o[1]),u[2]=Math.max(u[2],o[0]),u[3]=Math.max(u[3],o[1])}function bc(u,o){return!(u[0]<=o[0]||u[2]>=o[2]||u[1]<=o[1]||u[3]>=o[3])}function Ay(u,o){const h=(180+u[0])/360,p=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+u[1]*Math.PI/360)))/360,_=Math.pow(2,o.z);return[Math.round(h*_*rl),Math.round(p*_*rl)]}function km(u,o,h){const p=u[0]-o[0],_=u[1]-o[1],x=u[0]-h[0],w=u[1]-h[1];return p*w-x*_==0&&p*x<=0&&_*w<=0}function bh(u,o){let h=!1;for(let w=0,I=o.length;w(p=u)[1]!=(x=P[D+1])[1]>p[1]&&p[0]<(x[0]-_[0])*(p[1]-_[1])/(x[1]-_[1])+_[0]&&(h=!h)}}var p,_,x;return h}function ky(u,o){for(let h=0;h0&&I<0||w<0&&I>0}function Dy(u,o,h){for(const D of h)for(let O=0;Oh[2]){const _=.5*p;let x=u[0]-h[0]>_?-p:h[0]-u[0]>_?p:0;x===0&&(x=u[0]-h[2]>_?-p:h[2]-u[0]>_?p:0),u[0]+=x}vh(o,u)}function wh(u,o,h,p){const _=Math.pow(2,p.z)*rl,x=[p.x*rl,p.y*rl],w=[];for(const I of u)for(const P of I){const D=[P.x+x[0],P.y+x[1]];zm(D,o,h,_),w.push(D)}return w}function Fm(u,o,h,p){const _=Math.pow(2,p.z)*rl,x=[p.x*rl,p.y*rl],w=[];for(const P of u){const D=[];for(const O of P){const B=[O.x+x[0],O.y+x[1]];vh(o,B),D.push(B)}w.push(D)}if(o[2]-o[0]<=_/2){(I=o)[0]=I[1]=1/0,I[2]=I[3]=-1/0;for(const P of w)for(const D of P)zm(D,o,h,_)}var I;return w}class Bl{constructor(o,h){this.type=sn,this.geojson=o,this.geometries=h}static parse(o,h){if(o.length!==2)return h.error(`'within' expression requires exactly one argument, but found ${o.length-1} instead.`);if(mh(o[1])){const p=o[1];if(p.type==="FeatureCollection"){const _=[];for(const x of p.features){const{type:w,coordinates:I}=x.geometry;w==="Polygon"&&_.push(I),w==="MultiPolygon"&&_.push(...I)}if(_.length)return new Bl(p,{type:"MultiPolygon",coordinates:_})}else if(p.type==="Feature"){const _=p.geometry.type;if(_==="Polygon"||_==="MultiPolygon")return new Bl(p,p.geometry)}else if(p.type==="Polygon"||p.type==="MultiPolygon")return new Bl(p,p)}return h.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(o){if(o.geometry()!=null&&o.canonicalID()!=null){if(o.geometryType()==="Point")return function(h,p){const _=[1/0,1/0,-1/0,-1/0],x=[1/0,1/0,-1/0,-1/0],w=h.canonicalID();if(p.type==="Polygon"){const I=xh(p.coordinates,x,w),P=wh(h.geometry(),_,x,w);if(!bc(_,x))return!1;for(const D of P)if(!bh(D,I))return!1}if(p.type==="MultiPolygon"){const I=Om(p.coordinates,x,w),P=wh(h.geometry(),_,x,w);if(!bc(_,x))return!1;for(const D of P)if(!ky(D,I))return!1}return!0}(o,this.geometries);if(o.geometryType()==="LineString")return function(h,p){const _=[1/0,1/0,-1/0,-1/0],x=[1/0,1/0,-1/0,-1/0],w=h.canonicalID();if(p.type==="Polygon"){const I=xh(p.coordinates,x,w),P=Fm(h.geometry(),_,x,w);if(!bc(_,x))return!1;for(const D of P)if(!Rm(D,I))return!1}if(p.type==="MultiPolygon"){const I=Om(p.coordinates,x,w),P=Fm(h.geometry(),_,x,w);if(!bc(_,x))return!1;for(const D of P)if(!Nm(D,I))return!1}return!0}(o,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}class Sh{constructor(o,h){this.type=h.type,this.name=o,this.boundExpression=h}static parse(o,h){if(o.length!==2||typeof o[1]!="string")return h.error("'var' expression requires exactly one string literal argument.");const p=o[1];return h.scope.has(p)?new Sh(p,h.scope.get(p)):h.error(`Unknown variable "${p}". Make sure "${p}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(o){return this.boundExpression.evaluate(o)}eachChild(){}outputDefined(){return!1}}class qo{constructor(o,h,p,_){this.name=o,this.type=h,this._evaluate=p,this.args=_}evaluate(o){return this._evaluate(o,this.args)}eachChild(o){this.args.forEach(o)}outputDefined(){return!1}static parse(o,h){const p=o[0],_=qo.definitions[p];if(!_)return h.error(`Unknown expression "${p}". If you wanted a literal array, use ["literal", [...]].`,0);const x=Array.isArray(_)?_[0]:_.type,w=Array.isArray(_)?[[_[1],_[2]]]:_.overloads,I=w.filter(([D])=>!Array.isArray(D)||D.length===o.length-1);let P=null;for(const[D,O]of I){P=new yh(h.registry,xc,h.path,null,h.scope);const B=[];let W=!1;for(let X=1;X{return W=B,Array.isArray(W)?`(${W.map(le).join(", ")})`:`(${le(W.type)}...)`;var W}).join(" | "),O=[];for(let B=1;B{h=o?h&&xc(p):h&&p instanceof nl}),!!h&&Eh(u)&&Sc(u,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function Eh(u){if(u instanceof qo&&(u.name==="get"&&u.args.length===1||u.name==="feature-state"||u.name==="has"&&u.args.length===1||u.name==="properties"||u.name==="geometry-type"||u.name==="id"||/^filter-/.test(u.name))||u instanceof Bl)return!1;let o=!0;return u.eachChild(h=>{o&&!Eh(h)&&(o=!1)}),o}function wc(u){if(u instanceof qo&&u.name==="feature-state")return!1;let o=!0;return u.eachChild(h=>{o&&!wc(h)&&(o=!1)}),o}function Sc(u,o){if(u instanceof qo&&o.indexOf(u.name)>=0)return!1;let h=!0;return u.eachChild(p=>{h&&!Sc(p,o)&&(h=!1)}),h}function Ec(u,o){const h=u.length-1;let p,_,x=0,w=h,I=0;for(;x<=w;)if(I=Math.floor((x+w)/2),p=u[I],_=u[I+1],p<=o){if(I===h||o<_)return I;x=I+1}else{if(!(p>o))throw new Pr("Input is not a number.");w=I-1}return 0}class Ic{constructor(o,h,p){this.type=o,this.input=h,this.labels=[],this.outputs=[];for(const[_,x]of p)this.labels.push(_),this.outputs.push(x)}static parse(o,h){if(o.length-1<4)return h.error(`Expected at least 4 arguments, but found only ${o.length-1}.`);if((o.length-1)%2!=0)return h.error("Expected an even number of arguments.");const p=h.parse(o[1],1,ft);if(!p)return null;const _=[];let x=null;h.expectedType&&h.expectedType.kind!=="value"&&(x=h.expectedType);for(let w=1;w=I)return h.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',D);const B=h.parse(P,O,x);if(!B)return null;x=x||B.type,_.push([I,B])}return new Ic(x,p,_)}evaluate(o){const h=this.labels,p=this.outputs;if(h.length===1)return p[0].evaluate(o);const _=this.input.evaluate(o);if(_<=h[0])return p[0].evaluate(o);const x=h.length;return _>=h[x-1]?p[x-1].evaluate(o):p[Ec(h,_)].evaluate(o)}eachChild(o){o(this.input);for(const h of this.outputs)o(h)}outputDefined(){return this.outputs.every(o=>o.outputDefined())}}function Ry(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var Ny=Bm;function Bm(u,o,h,p){this.cx=3*u,this.bx=3*(h-u)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*o,this.by=3*(p-o)-this.cy,this.ay=1-this.cy-this.by,this.p1x=u,this.p1y=o,this.p2x=h,this.p2y=p}Bm.prototype={sampleCurveX:function(u){return((this.ax*u+this.bx)*u+this.cx)*u},sampleCurveY:function(u){return((this.ay*u+this.by)*u+this.cy)*u},sampleCurveDerivativeX:function(u){return(3*this.ax*u+2*this.bx)*u+this.cx},solveCurveX:function(u,o){if(o===void 0&&(o=1e-6),u<0)return 0;if(u>1)return 1;for(var h=u,p=0;p<8;p++){var _=this.sampleCurveX(h)-u;if(Math.abs(_)_?w=h:I=h,h=.5*(I-w)+w;return h},solve:function(u,o){return this.sampleCurveY(this.solveCurveX(u,o))}};var Oy=Ry(Ny);function Vl(u,o,h){return u+h*(o-u)}function Ih(u,o,h){return u.map((p,_)=>Vl(p,o[_],h))}const co={number:Vl,color:function(u,o,h,p="rgb"){switch(p){case"rgb":{const[_,x,w,I]=Ih(u.rgb,o.rgb,h);return new $n(_,x,w,I,!1)}case"hcl":{const[_,x,w,I]=u.hcl,[P,D,O,B]=o.hcl;let W,X;if(isNaN(_)||isNaN(P))isNaN(_)?isNaN(P)?W=NaN:(W=P,w!==1&&w!==0||(X=D)):(W=_,O!==1&&O!==0||(X=x));else{let Oe=P-_;P>_&&Oe>180?Oe-=360:P<_&&_-P>180&&(Oe+=360),W=_+h*Oe}const[K,ie,de,we]=function([Oe,Ee,ke,Qe]){return Oe=isNaN(Oe)?0:Oe*tn,Fr([ke,Math.cos(Oe)*Ee,Math.sin(Oe)*Ee,Qe])}([W,X??Vl(x,D,h),Vl(w,O,h),Vl(I,B,h)]);return new $n(K,ie,de,we,!1)}case"lab":{const[_,x,w,I]=Fr(Ih(u.lab,o.lab,h));return new $n(_,x,w,I,!1)}}},array:Ih,padding:function(u,o,h){return new Eo(Ih(u.values,o.values,h))},variableAnchorOffsetCollection:function(u,o,h){const p=u.values,_=o.values;if(p.length!==_.length)throw new Pr(`Cannot interpolate values of different length. from: ${u.toString()}, to: ${o.toString()}`);const x=[];for(let w=0;wtypeof O!="number"||O<0||O>1))return h.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);_={name:"cubic-bezier",controlPoints:D}}}if(o.length-1<4)return h.error(`Expected at least 4 arguments, but found only ${o.length-1}.`);if((o.length-1)%2!=0)return h.error("Expected an even number of arguments.");if(x=h.parse(x,2,ft),!x)return null;const I=[];let P=null;p==="interpolate-hcl"||p==="interpolate-lab"?P=Hr:h.expectedType&&h.expectedType.kind!=="value"&&(P=h.expectedType);for(let D=0;D=O)return h.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',W);const K=h.parse(B,X,P);if(!K)return null;P=P||K.type,I.push([O,K])}return Ne(P,ft)||Ne(P,Hr)||Ne(P,me)||Ne(P,Z)||Ne(P,J(ft))?new Zi(P,p,_,x,I):h.error(`Type ${le(P)} is not interpolatable.`)}evaluate(o){const h=this.labels,p=this.outputs;if(h.length===1)return p[0].evaluate(o);const _=this.input.evaluate(o);if(_<=h[0])return p[0].evaluate(o);const x=h.length;if(_>=h[x-1])return p[x-1].evaluate(o);const w=Ec(h,_),I=Zi.interpolationFactor(this.interpolation,_,h[w],h[w+1]),P=p[w].evaluate(o),D=p[w+1].evaluate(o);switch(this.operator){case"interpolate":return co[this.type.kind](P,D,I);case"interpolate-hcl":return co.color(P,D,I,"hcl");case"interpolate-lab":return co.color(P,D,I,"lab")}}eachChild(o){o(this.input);for(const h of this.outputs)o(h)}outputDefined(){return this.outputs.every(o=>o.outputDefined())}}function Gn(u,o,h,p){const _=p-h,x=u-h;return _===0?0:o===1?x/_:(Math.pow(o,x)-1)/(Math.pow(o,_)-1)}class Ch{constructor(o,h){this.type=o,this.args=h}static parse(o,h){if(o.length<2)return h.error("Expectected at least one argument.");let p=null;const _=h.expectedType;_&&_.kind!=="value"&&(p=_);const x=[];for(const I of o.slice(1)){const P=h.parse(I,1+x.length,p,void 0,{typeAnnotation:"omit"});if(!P)return null;p=p||P.type,x.push(P)}if(!p)throw new Error("No output type");const w=_&&x.some(I=>Q(_,I.type));return new Ch(w?on:p,x)}evaluate(o){let h,p=null,_=0;for(const x of this.args)if(_++,p=x.evaluate(o),p&&p instanceof hs&&!p.available&&(h||(h=p.name),p=null,_===this.args.length&&(p=h)),p!==null)break;return p}eachChild(o){this.args.forEach(o)}outputDefined(){return this.args.every(o=>o.outputDefined())}}class Th{constructor(o,h){this.type=h.type,this.bindings=[].concat(o),this.result=h}evaluate(o){return this.result.evaluate(o)}eachChild(o){for(const h of this.bindings)o(h[1]);o(this.result)}static parse(o,h){if(o.length<4)return h.error(`Expected at least 3 arguments, but found ${o.length-1} instead.`);const p=[];for(let x=1;x=p.length)throw new Pr(`Array index out of bounds: ${h} > ${p.length-1}.`);if(h!==Math.floor(h))throw new Pr(`Array index must be an integer, but found ${h} instead.`);return p[h]}eachChild(o){o(this.index),o(this.input)}outputDefined(){return!1}}class xp{constructor(o,h){this.type=sn,this.needle=o,this.haystack=h}static parse(o,h){if(o.length!==3)return h.error(`Expected 2 arguments, but found ${o.length-1} instead.`);const p=h.parse(o[1],1,on),_=h.parse(o[2],2,on);return p&&_?Pe(p.type,[sn,ln,ft,ui,on])?new xp(p,_):h.error(`Expected first argument to be of type boolean, string, number or null, but found ${le(p.type)} instead`):null}evaluate(o){const h=this.needle.evaluate(o),p=this.haystack.evaluate(o);if(!p)return!1;if(!Se(h,["boolean","string","number","null"]))throw new Pr(`Expected first argument to be of type boolean, string, number or null, but found ${le(hi(h))} instead.`);if(!Se(p,["string","array"]))throw new Pr(`Expected second argument to be of type array or string, but found ${le(hi(p))} instead.`);return p.indexOf(h)>=0}eachChild(o){o(this.needle),o(this.haystack)}outputDefined(){return!0}}class Lh{constructor(o,h,p){this.type=ft,this.needle=o,this.haystack=h,this.fromIndex=p}static parse(o,h){if(o.length<=2||o.length>=5)return h.error(`Expected 3 or 4 arguments, but found ${o.length-1} instead.`);const p=h.parse(o[1],1,on),_=h.parse(o[2],2,on);if(!p||!_)return null;if(!Pe(p.type,[sn,ln,ft,ui,on]))return h.error(`Expected first argument to be of type boolean, string, number or null, but found ${le(p.type)} instead`);if(o.length===4){const x=h.parse(o[3],3,ft);return x?new Lh(p,_,x):null}return new Lh(p,_)}evaluate(o){const h=this.needle.evaluate(o),p=this.haystack.evaluate(o);if(!Se(h,["boolean","string","number","null"]))throw new Pr(`Expected first argument to be of type boolean, string, number or null, but found ${le(hi(h))} instead.`);if(!Se(p,["string","array"]))throw new Pr(`Expected second argument to be of type array or string, but found ${le(hi(p))} instead.`);if(this.fromIndex){const _=this.fromIndex.evaluate(o);return p.indexOf(h,_)}return p.indexOf(h)}eachChild(o){o(this.needle),o(this.haystack),this.fromIndex&&o(this.fromIndex)}outputDefined(){return!1}}class wp{constructor(o,h,p,_,x,w){this.inputType=o,this.type=h,this.input=p,this.cases=_,this.outputs=x,this.otherwise=w}static parse(o,h){if(o.length<5)return h.error(`Expected at least 4 arguments, but found only ${o.length-1}.`);if(o.length%2!=1)return h.error("Expected an even number of arguments.");let p,_;h.expectedType&&h.expectedType.kind!=="value"&&(_=h.expectedType);const x={},w=[];for(let D=2;DNumber.MAX_SAFE_INTEGER)return W.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof K=="number"&&Math.floor(K)!==K)return W.error("Numeric branch labels must be integer values.");if(p){if(W.checkSubtype(p,hi(K)))return null}else p=hi(K);if(x[String(K)]!==void 0)return W.error("Branch labels must be unique.");x[String(K)]=w.length}const X=h.parse(B,D,_);if(!X)return null;_=_||X.type,w.push(X)}const I=h.parse(o[1],1,on);if(!I)return null;const P=h.parse(o[o.length-1],o.length-1,_);return P?I.type.kind!=="value"&&h.concat(1).checkSubtype(p,I.type)?null:new wp(p,_,I,x,w,P):null}evaluate(o){const h=this.input.evaluate(o);return(hi(h)===this.inputType&&this.outputs[this.cases[h]]||this.otherwise).evaluate(o)}eachChild(o){o(this.input),this.outputs.forEach(o),o(this.otherwise)}outputDefined(){return this.outputs.every(o=>o.outputDefined())&&this.otherwise.outputDefined()}}class Sp{constructor(o,h,p){this.type=o,this.branches=h,this.otherwise=p}static parse(o,h){if(o.length<4)return h.error(`Expected at least 3 arguments, but found only ${o.length-1}.`);if(o.length%2!=0)return h.error("Expected an odd number of arguments.");let p;h.expectedType&&h.expectedType.kind!=="value"&&(p=h.expectedType);const _=[];for(let w=1;wh.outputDefined())&&this.otherwise.outputDefined()}}class Ph{constructor(o,h,p,_){this.type=o,this.input=h,this.beginIndex=p,this.endIndex=_}static parse(o,h){if(o.length<=2||o.length>=5)return h.error(`Expected 3 or 4 arguments, but found ${o.length-1} instead.`);const p=h.parse(o[1],1,on),_=h.parse(o[2],2,ft);if(!p||!_)return null;if(!Pe(p.type,[J(on),ln,on]))return h.error(`Expected first argument to be of type array or string, but found ${le(p.type)} instead`);if(o.length===4){const x=h.parse(o[3],3,ft);return x?new Ph(p.type,p,_,x):null}return new Ph(p.type,p,_)}evaluate(o){const h=this.input.evaluate(o),p=this.beginIndex.evaluate(o);if(!Se(h,["string","array"]))throw new Pr(`Expected first argument to be of type array or string, but found ${le(hi(h))} instead.`);if(this.endIndex){const _=this.endIndex.evaluate(o);return h.slice(p,_)}return h.slice(p)}eachChild(o){o(this.input),o(this.beginIndex),this.endIndex&&o(this.endIndex)}outputDefined(){return!1}}function Vm(u,o){return u==="=="||u==="!="?o.kind==="boolean"||o.kind==="string"||o.kind==="number"||o.kind==="null"||o.kind==="value":o.kind==="string"||o.kind==="number"||o.kind==="value"}function Um(u,o,h,p){return p.compare(o,h)===0}function Su(u,o,h){const p=u!=="=="&&u!=="!=";return class XE{constructor(x,w,I){this.type=sn,this.lhs=x,this.rhs=w,this.collator=I,this.hasUntypedArgument=x.type.kind==="value"||w.type.kind==="value"}static parse(x,w){if(x.length!==3&&x.length!==4)return w.error("Expected two or three arguments.");const I=x[0];let P=w.parse(x[1],1,on);if(!P)return null;if(!Vm(I,P.type))return w.concat(1).error(`"${I}" comparisons are not supported for type '${le(P.type)}'.`);let D=w.parse(x[2],2,on);if(!D)return null;if(!Vm(I,D.type))return w.concat(2).error(`"${I}" comparisons are not supported for type '${le(D.type)}'.`);if(P.type.kind!==D.type.kind&&P.type.kind!=="value"&&D.type.kind!=="value")return w.error(`Cannot compare types '${le(P.type)}' and '${le(D.type)}'.`);p&&(P.type.kind==="value"&&D.type.kind!=="value"?P=new Go(D.type,[P]):P.type.kind!=="value"&&D.type.kind==="value"&&(D=new Go(P.type,[D])));let O=null;if(x.length===4){if(P.type.kind!=="string"&&D.type.kind!=="string"&&P.type.kind!=="value"&&D.type.kind!=="value")return w.error("Cannot use collator to compare non-string types.");if(O=w.parse(x[3],3,Aa),!O)return null}return new XE(P,D,O)}evaluate(x){const w=this.lhs.evaluate(x),I=this.rhs.evaluate(x);if(p&&this.hasUntypedArgument){const P=hi(w),D=hi(I);if(P.kind!==D.kind||P.kind!=="string"&&P.kind!=="number")throw new Pr(`Expected arguments for "${u}" to be (string, string) or (number, number), but found (${P.kind}, ${D.kind}) instead.`)}if(this.collator&&!p&&this.hasUntypedArgument){const P=hi(w),D=hi(I);if(P.kind!=="string"||D.kind!=="string")return o(x,w,I)}return this.collator?h(x,w,I,this.collator.evaluate(x)):o(x,w,I)}eachChild(x){x(this.lhs),x(this.rhs),this.collator&&x(this.collator)}outputDefined(){return!0}}}const zy=Su("==",function(u,o,h){return o===h},Um),Fy=Su("!=",function(u,o,h){return o!==h},function(u,o,h,p){return!Um(0,o,h,p)}),By=Su("<",function(u,o,h){return o",function(u,o,h){return o>h},function(u,o,h,p){return p.compare(o,h)>0}),Uy=Su("<=",function(u,o,h){return o<=h},function(u,o,h,p){return p.compare(o,h)<=0}),jy=Su(">=",function(u,o,h){return o>=h},function(u,o,h,p){return p.compare(o,h)>=0});class Ep{constructor(o,h,p,_,x){this.type=ln,this.number=o,this.locale=h,this.currency=p,this.minFractionDigits=_,this.maxFractionDigits=x}static parse(o,h){if(o.length!==3)return h.error("Expected two arguments.");const p=h.parse(o[1],1,ft);if(!p)return null;const _=o[2];if(typeof _!="object"||Array.isArray(_))return h.error("NumberFormat options argument must be an object.");let x=null;if(_.locale&&(x=h.parse(_.locale,1,ln),!x))return null;let w=null;if(_.currency&&(w=h.parse(_.currency,1,ln),!w))return null;let I=null;if(_["min-fraction-digits"]&&(I=h.parse(_["min-fraction-digits"],1,ft),!I))return null;let P=null;return _["max-fraction-digits"]&&(P=h.parse(_["max-fraction-digits"],1,ft),!P)?null:new Ep(p,x,w,I,P)}evaluate(o){return new Intl.NumberFormat(this.locale?this.locale.evaluate(o):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(o):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(o):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(o):void 0}).format(this.number.evaluate(o))}eachChild(o){o(this.number),this.locale&&o(this.locale),this.currency&&o(this.currency),this.minFractionDigits&&o(this.minFractionDigits),this.maxFractionDigits&&o(this.maxFractionDigits)}outputDefined(){return!1}}class Mh{constructor(o){this.type=Jr,this.sections=o}static parse(o,h){if(o.length<2)return h.error("Expected at least one argument.");const p=o[1];if(!Array.isArray(p)&&typeof p=="object")return h.error("First argument must be an image or text section.");const _=[];let x=!1;for(let w=1;w<=o.length-1;++w){const I=o[w];if(x&&typeof I=="object"&&!Array.isArray(I)){x=!1;let P=null;if(I["font-scale"]&&(P=h.parse(I["font-scale"],1,ft),!P))return null;let D=null;if(I["text-font"]&&(D=h.parse(I["text-font"],1,J(ln)),!D))return null;let O=null;if(I["text-color"]&&(O=h.parse(I["text-color"],1,Hr),!O))return null;const B=_[_.length-1];B.scale=P,B.font=D,B.textColor=O}else{const P=h.parse(o[w],1,on);if(!P)return null;const D=P.type.kind;if(D!=="string"&&D!=="value"&&D!=="null"&&D!=="resolvedImage")return h.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");x=!0,_.push({content:P,scale:null,font:null,textColor:null})}}return new Mh(_)}evaluate(o){return new jo(this.sections.map(h=>{const p=h.content.evaluate(o);return hi(p)===q?new vp("",p,null,null,null):new vp(yc(p),null,h.scale?h.scale.evaluate(o):null,h.font?h.font.evaluate(o).join(","):null,h.textColor?h.textColor.evaluate(o):null)}))}eachChild(o){for(const h of this.sections)o(h.content),h.scale&&o(h.scale),h.font&&o(h.font),h.textColor&&o(h.textColor)}outputDefined(){return!1}}class Ip{constructor(o){this.type=q,this.input=o}static parse(o,h){if(o.length!==2)return h.error("Expected two arguments.");const p=h.parse(o[1],1,ln);return p?new Ip(p):h.error("No image name provided.")}evaluate(o){const h=this.input.evaluate(o),p=hs.fromString(h);return p&&o.availableImages&&(p.available=o.availableImages.indexOf(h)>-1),p}eachChild(o){o(this.input)}outputDefined(){return!1}}class Cp{constructor(o){this.type=ft,this.input=o}static parse(o,h){if(o.length!==2)return h.error(`Expected 1 argument, but found ${o.length-1} instead.`);const p=h.parse(o[1],1);return p?p.type.kind!=="array"&&p.type.kind!=="string"&&p.type.kind!=="value"?h.error(`Expected argument of type string or array, but found ${le(p.type)} instead.`):new Cp(p):null}evaluate(o){const h=this.input.evaluate(o);if(typeof h=="string"||Array.isArray(h))return h.length;throw new Pr(`Expected value to be of type string or array, but found ${le(hi(h))} instead.`)}eachChild(o){o(this.input)}outputDefined(){return!1}}const Eu={"==":zy,"!=":Fy,">":Vy,"<":By,">=":jy,"<=":Uy,array:Go,at:bp,boolean:Go,case:Sp,coalesce:Ch,collator:wu,format:Mh,image:Ip,in:xp,"index-of":Lh,interpolate:Zi,"interpolate-hcl":Zi,"interpolate-lab":Zi,length:Cp,let:Th,literal:nl,match:wp,number:Go,"number-format":Ep,object:Go,slice:Ph,step:Ic,string:Go,"to-boolean":Qs,"to-color":Qs,"to-number":Qs,"to-string":Qs,var:Sh,within:Bl};function jm(u,[o,h,p,_]){o=o.evaluate(u),h=h.evaluate(u),p=p.evaluate(u);const x=_?_.evaluate(u):1,w=xu(o,h,p,x);if(w)throw new Pr(w);return new $n(o/255,h/255,p/255,x,!1)}function Gm(u,o){return u in o}function Tp(u,o){const h=o[u];return h===void 0?null:h}function Ul(u){return{type:u}}function qm(u){return{result:"success",value:u}}function Iu(u){return{result:"error",value:u}}function Cu(u){return u["property-type"]==="data-driven"||u["property-type"]==="cross-faded-data-driven"}function Wm(u){return!!u.expression&&u.expression.parameters.indexOf("zoom")>-1}function Lp(u){return!!u.expression&&u.expression.interpolated}function On(u){return u instanceof Number?"number":u instanceof String?"string":u instanceof Boolean?"boolean":Array.isArray(u)?"array":u===null?"null":typeof u}function Ah(u){return typeof u=="object"&&u!==null&&!Array.isArray(u)}function Gy(u){return u}function Hm(u,o){const h=o.type==="color",p=u.stops&&typeof u.stops[0][0]=="object",_=p||!(p||u.property!==void 0),x=u.type||(Lp(o)?"exponential":"interval");if(h||o.type==="padding"){const O=h?$n.parse:Eo.parse;(u=ls({},u)).stops&&(u.stops=u.stops.map(B=>[B[0],O(B[1])])),u.default=O(u.default?u.default:o.default)}if(u.colorSpace&&(w=u.colorSpace)!=="rgb"&&w!=="hcl"&&w!=="lab")throw new Error(`Unknown color space: "${u.colorSpace}"`);var w;let I,P,D;if(x==="exponential")I=An;else if(x==="interval")I=qy;else if(x==="categorical"){I=Qr,P=Object.create(null);for(const O of u.stops)P[O[0]]=O[1];D=typeof u.stops[0][0]}else{if(x!=="identity")throw new Error(`Unknown function type "${x}"`);I=Pp}if(p){const O={},B=[];for(let K=0;KK[0]),evaluate:({zoom:K},ie)=>An({stops:W,base:u.base},o,K).evaluate(K,ie)}}if(_){const O=x==="exponential"?{name:"exponential",base:u.base!==void 0?u.base:1}:null;return{kind:"camera",interpolationType:O,interpolationFactor:Zi.interpolationFactor.bind(void 0,O),zoomStops:u.stops.map(B=>B[0]),evaluate:({zoom:B})=>I(u,o,B,P,D)}}return{kind:"source",evaluate(O,B){const W=B&&B.properties?B.properties[u.property]:void 0;return W===void 0?Cc(u.default,o.default):I(u,o,W,P,D)}}}function Cc(u,o,h){return u!==void 0?u:o!==void 0?o:h!==void 0?h:void 0}function Qr(u,o,h,p,_){return Cc(typeof h===_?p[h]:void 0,u.default,o.default)}function qy(u,o,h){if(On(h)!=="number")return Cc(u.default,o.default);const p=u.stops.length;if(p===1||h<=u.stops[0][0])return u.stops[0][1];if(h>=u.stops[p-1][0])return u.stops[p-1][1];const _=Ec(u.stops.map(x=>x[0]),h);return u.stops[_][1]}function An(u,o,h){const p=u.base!==void 0?u.base:1;if(On(h)!=="number")return Cc(u.default,o.default);const _=u.stops.length;if(_===1||h<=u.stops[0][0])return u.stops[0][1];if(h>=u.stops[_-1][0])return u.stops[_-1][1];const x=Ec(u.stops.map(O=>O[0]),h),w=function(O,B,W,X){const K=X-W,ie=O-W;return K===0?0:B===1?ie/K:(Math.pow(B,ie)-1)/(Math.pow(B,K)-1)}(h,p,u.stops[x][0],u.stops[x+1][0]),I=u.stops[x][1],P=u.stops[x+1][1],D=co[o.type]||Gy;return typeof I.evaluate=="function"?{evaluate(...O){const B=I.evaluate.apply(void 0,O),W=P.evaluate.apply(void 0,O);if(B!==void 0&&W!==void 0)return D(B,W,w,u.colorSpace)}}:D(I,P,w,u.colorSpace)}function Pp(u,o,h){switch(o.type){case"color":h=$n.parse(h);break;case"formatted":h=jo.fromString(h.toString());break;case"resolvedImage":h=hs.fromString(h.toString());break;case"padding":h=Eo.parse(h);break;default:On(h)===o.type||o.type==="enum"&&o.values[h]||(h=void 0)}return Cc(h,u.default,o.default)}qo.register(Eu,{error:[{kind:"error"},[ln],(u,[o])=>{throw new Pr(o.evaluate(u))}],typeof:[ln,[on],(u,[o])=>le(hi(o.evaluate(u)))],"to-rgba":[J(ft,4),[Hr],(u,[o])=>{const[h,p,_,x]=o.evaluate(u).rgb;return[255*h,255*p,255*_,x]}],rgb:[Hr,[ft,ft,ft],jm],rgba:[Hr,[ft,ft,ft,ft],jm],has:{type:sn,overloads:[[[ln],(u,[o])=>Gm(o.evaluate(u),u.properties())],[[ln,us],(u,[o,h])=>Gm(o.evaluate(u),h.evaluate(u))]]},get:{type:on,overloads:[[[ln],(u,[o])=>Tp(o.evaluate(u),u.properties())],[[ln,us],(u,[o,h])=>Tp(o.evaluate(u),h.evaluate(u))]]},"feature-state":[on,[ln],(u,[o])=>Tp(o.evaluate(u),u.featureState||{})],properties:[us,[],u=>u.properties()],"geometry-type":[ln,[],u=>u.geometryType()],id:[on,[],u=>u.id()],zoom:[ft,[],u=>u.globals.zoom],"heatmap-density":[ft,[],u=>u.globals.heatmapDensity||0],"line-progress":[ft,[],u=>u.globals.lineProgress||0],accumulated:[on,[],u=>u.globals.accumulated===void 0?null:u.globals.accumulated],"+":[ft,Ul(ft),(u,o)=>{let h=0;for(const p of o)h+=p.evaluate(u);return h}],"*":[ft,Ul(ft),(u,o)=>{let h=1;for(const p of o)h*=p.evaluate(u);return h}],"-":{type:ft,overloads:[[[ft,ft],(u,[o,h])=>o.evaluate(u)-h.evaluate(u)],[[ft],(u,[o])=>-o.evaluate(u)]]},"/":[ft,[ft,ft],(u,[o,h])=>o.evaluate(u)/h.evaluate(u)],"%":[ft,[ft,ft],(u,[o,h])=>o.evaluate(u)%h.evaluate(u)],ln2:[ft,[],()=>Math.LN2],pi:[ft,[],()=>Math.PI],e:[ft,[],()=>Math.E],"^":[ft,[ft,ft],(u,[o,h])=>Math.pow(o.evaluate(u),h.evaluate(u))],sqrt:[ft,[ft],(u,[o])=>Math.sqrt(o.evaluate(u))],log10:[ft,[ft],(u,[o])=>Math.log(o.evaluate(u))/Math.LN10],ln:[ft,[ft],(u,[o])=>Math.log(o.evaluate(u))],log2:[ft,[ft],(u,[o])=>Math.log(o.evaluate(u))/Math.LN2],sin:[ft,[ft],(u,[o])=>Math.sin(o.evaluate(u))],cos:[ft,[ft],(u,[o])=>Math.cos(o.evaluate(u))],tan:[ft,[ft],(u,[o])=>Math.tan(o.evaluate(u))],asin:[ft,[ft],(u,[o])=>Math.asin(o.evaluate(u))],acos:[ft,[ft],(u,[o])=>Math.acos(o.evaluate(u))],atan:[ft,[ft],(u,[o])=>Math.atan(o.evaluate(u))],min:[ft,Ul(ft),(u,o)=>Math.min(...o.map(h=>h.evaluate(u)))],max:[ft,Ul(ft),(u,o)=>Math.max(...o.map(h=>h.evaluate(u)))],abs:[ft,[ft],(u,[o])=>Math.abs(o.evaluate(u))],round:[ft,[ft],(u,[o])=>{const h=o.evaluate(u);return h<0?-Math.round(-h):Math.round(h)}],floor:[ft,[ft],(u,[o])=>Math.floor(o.evaluate(u))],ceil:[ft,[ft],(u,[o])=>Math.ceil(o.evaluate(u))],"filter-==":[sn,[ln,on],(u,[o,h])=>u.properties()[o.value]===h.value],"filter-id-==":[sn,[on],(u,[o])=>u.id()===o.value],"filter-type-==":[sn,[ln],(u,[o])=>u.geometryType()===o.value],"filter-<":[sn,[ln,on],(u,[o,h])=>{const p=u.properties()[o.value],_=h.value;return typeof p==typeof _&&p<_}],"filter-id-<":[sn,[on],(u,[o])=>{const h=u.id(),p=o.value;return typeof h==typeof p&&h":[sn,[ln,on],(u,[o,h])=>{const p=u.properties()[o.value],_=h.value;return typeof p==typeof _&&p>_}],"filter-id->":[sn,[on],(u,[o])=>{const h=u.id(),p=o.value;return typeof h==typeof p&&h>p}],"filter-<=":[sn,[ln,on],(u,[o,h])=>{const p=u.properties()[o.value],_=h.value;return typeof p==typeof _&&p<=_}],"filter-id-<=":[sn,[on],(u,[o])=>{const h=u.id(),p=o.value;return typeof h==typeof p&&h<=p}],"filter->=":[sn,[ln,on],(u,[o,h])=>{const p=u.properties()[o.value],_=h.value;return typeof p==typeof _&&p>=_}],"filter-id->=":[sn,[on],(u,[o])=>{const h=u.id(),p=o.value;return typeof h==typeof p&&h>=p}],"filter-has":[sn,[on],(u,[o])=>o.value in u.properties()],"filter-has-id":[sn,[],u=>u.id()!==null&&u.id()!==void 0],"filter-type-in":[sn,[J(ln)],(u,[o])=>o.value.indexOf(u.geometryType())>=0],"filter-id-in":[sn,[J(on)],(u,[o])=>o.value.indexOf(u.id())>=0],"filter-in-small":[sn,[ln,J(on)],(u,[o,h])=>h.value.indexOf(u.properties()[o.value])>=0],"filter-in-large":[sn,[ln,J(on)],(u,[o,h])=>function(p,_,x,w){for(;x<=w;){const I=x+w>>1;if(_[I]===p)return!0;_[I]>p?w=I-1:x=I+1}return!1}(u.properties()[o.value],h.value,0,h.value.length-1)],all:{type:sn,overloads:[[[sn,sn],(u,[o,h])=>o.evaluate(u)&&h.evaluate(u)],[Ul(sn),(u,o)=>{for(const h of o)if(!h.evaluate(u))return!1;return!0}]]},any:{type:sn,overloads:[[[sn,sn],(u,[o,h])=>o.evaluate(u)||h.evaluate(u)],[Ul(sn),(u,o)=>{for(const h of o)if(h.evaluate(u))return!0;return!1}]]},"!":[sn,[sn],(u,[o])=>!o.evaluate(u)],"is-supported-script":[sn,[ln],(u,[o])=>{const h=u.globals&&u.globals.isSupportedScript;return!h||h(o.evaluate(u))}],upcase:[ln,[ln],(u,[o])=>o.evaluate(u).toUpperCase()],downcase:[ln,[ln],(u,[o])=>o.evaluate(u).toLowerCase()],concat:[ln,Ul(on),(u,o)=>o.map(h=>yc(h.evaluate(u))).join("")],"resolved-locale":[ln,[Aa],(u,[o])=>o.evaluate(u).resolvedLocale()]});class mr{constructor(o,h){var p;this.expression=o,this._warningHistory={},this._evaluator=new Kn,this._defaultValue=h?(p=h).type==="color"&&Ah(p.default)?new $n(0,0,0,0):p.type==="color"?$n.parse(p.default)||null:p.type==="padding"?Eo.parse(p.default)||null:p.type==="variableAnchorOffsetCollection"?cs.parse(p.default)||null:p.default===void 0?null:p.default:null,this._enumValues=h&&h.type==="enum"?h.values:null}evaluateWithoutErrorHandling(o,h,p,_,x,w){return this._evaluator.globals=o,this._evaluator.feature=h,this._evaluator.featureState=p,this._evaluator.canonical=_,this._evaluator.availableImages=x||null,this._evaluator.formattedSection=w,this.expression.evaluate(this._evaluator)}evaluate(o,h,p,_,x,w){this._evaluator.globals=o,this._evaluator.feature=h||null,this._evaluator.featureState=p||null,this._evaluator.canonical=_,this._evaluator.availableImages=x||null,this._evaluator.formattedSection=w||null;try{const I=this.expression.evaluate(this._evaluator);if(I==null||typeof I=="number"&&I!=I)return this._defaultValue;if(this._enumValues&&!(I in this._enumValues))throw new Pr(`Expected value to be one of ${Object.keys(this._enumValues).map(P=>JSON.stringify(P)).join(", ")}, but found ${JSON.stringify(I)} instead.`);return I}catch(I){return this._warningHistory[I.message]||(this._warningHistory[I.message]=!0,typeof console<"u"&&console.warn(I.message)),this._defaultValue}}}function lr(u){return Array.isArray(u)&&u.length>0&&typeof u[0]=="string"&&u[0]in Eu}function jl(u,o){const h=new yh(Eu,xc,[],o?function(_){const x={color:Hr,string:ln,number:ft,enum:ln,boolean:sn,formatted:Jr,padding:me,resolvedImage:q,variableAnchorOffsetCollection:Z};return _.type==="array"?J(x[_.value]||on,_.length):x[_.type]}(o):void 0),p=h.parse(u,void 0,void 0,void 0,o&&o.type==="string"?{typeAnnotation:"coerce"}:void 0);return p?qm(new mr(p,o)):Iu(h.errors)}class kh{constructor(o,h){this.kind=o,this._styleExpression=h,this.isStateDependent=o!=="constant"&&!wc(h.expression)}evaluateWithoutErrorHandling(o,h,p,_,x,w){return this._styleExpression.evaluateWithoutErrorHandling(o,h,p,_,x,w)}evaluate(o,h,p,_,x,w){return this._styleExpression.evaluate(o,h,p,_,x,w)}}class Mp{constructor(o,h,p,_){this.kind=o,this.zoomStops=p,this._styleExpression=h,this.isStateDependent=o!=="camera"&&!wc(h.expression),this.interpolationType=_}evaluateWithoutErrorHandling(o,h,p,_,x,w){return this._styleExpression.evaluateWithoutErrorHandling(o,h,p,_,x,w)}evaluate(o,h,p,_,x,w){return this._styleExpression.evaluate(o,h,p,_,x,w)}interpolationFactor(o,h,p){return this.interpolationType?Zi.interpolationFactor(this.interpolationType,o,h,p):0}}function Zm(u,o){const h=jl(u,o);if(h.result==="error")return h;const p=h.value.expression,_=Eh(p);if(!_&&!Cu(o))return Iu([new lo("","data expressions not supported")]);const x=Sc(p,["zoom"]);if(!x&&!Wm(o))return Iu([new lo("","zoom expressions not supported")]);const w=Rh(p);return w||x?w instanceof lo?Iu([w]):w instanceof Zi&&!Lp(o)?Iu([new lo("",'"interpolate" expressions cannot be used with this property')]):qm(w?new Mp(_?"camera":"composite",h.value,w.labels,w instanceof Zi?w.interpolation:void 0):new kh(_?"constant":"source",h.value)):Iu([new lo("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class Dh{constructor(o,h){this._parameters=o,this._specification=h,ls(this,Hm(this._parameters,this._specification))}static deserialize(o){return new Dh(o._parameters,o._specification)}static serialize(o){return{_parameters:o._parameters,_specification:o._specification}}}function Rh(u){let o=null;if(u instanceof Th)o=Rh(u.result);else if(u instanceof Ch){for(const h of u.args)if(o=Rh(h),o)break}else(u instanceof Ic||u instanceof Zi)&&u.input instanceof qo&&u.input.name==="zoom"&&(o=u);return o instanceof lo||u.eachChild(h=>{const p=Rh(h);p instanceof lo?o=p:!o&&p?o=new lo("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):o&&p&&o!==p&&(o=new lo("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),o}function Nh(u){if(u===!0||u===!1)return!0;if(!Array.isArray(u)||u.length===0)return!1;switch(u[0]){case"has":return u.length>=2&&u[1]!=="$id"&&u[1]!=="$type";case"in":return u.length>=3&&(typeof u[1]!="string"||Array.isArray(u[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return u.length!==3||Array.isArray(u[1])||Array.isArray(u[2]);case"any":case"all":for(const o of u.slice(1))if(!Nh(o)&&typeof o!="boolean")return!1;return!0;default:return!0}}const Xm={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Oh(u){if(u==null)return{filter:()=>!0,needGeometry:!1};Nh(u)||(u=Fh(u));const o=jl(u,Xm);if(o.result==="error")throw new Error(o.value.map(h=>`${h.key}: ${h.message}`).join(", "));return{filter:(h,p,_)=>o.value.evaluate(h,p,{},_),needGeometry:zh(u)}}function Ym(u,o){return uo?1:0}function zh(u){if(!Array.isArray(u))return!1;if(u[0]==="within")return!0;for(let o=1;o"||o==="<="||o===">="?Ap(u[1],u[2],o):o==="any"?(h=u.slice(1),["any"].concat(h.map(Fh))):o==="all"?["all"].concat(u.slice(1).map(Fh)):o==="none"?["all"].concat(u.slice(1).map(Fh).map(Bh)):o==="in"?$m(u[1],u.slice(2)):o==="!in"?Bh($m(u[1],u.slice(2))):o==="has"?Km(u[1]):o==="!has"?Bh(Km(u[1])):o!=="within"||u;var h}function Ap(u,o,h){switch(u){case"$type":return[`filter-type-${h}`,o];case"$id":return[`filter-id-${h}`,o];default:return[`filter-${h}`,u,o]}}function $m(u,o){if(o.length===0)return!1;switch(u){case"$type":return["filter-type-in",["literal",o]];case"$id":return["filter-id-in",["literal",o]];default:return o.length>200&&!o.some(h=>typeof h!=typeof o[0])?["filter-in-large",u,["literal",o.sort(Ym)]]:["filter-in-small",u,["literal",o]]}}function Km(u){switch(u){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",u]}}function Bh(u){return["!",u]}function kp(u){const o=typeof u;if(o==="number"||o==="boolean"||o==="string"||u==null)return JSON.stringify(u);if(Array.isArray(u)){let _="[";for(const x of u)_+=`${kp(x)},`;return`${_}]`}const h=Object.keys(u).sort();let p="{";for(let _=0;_p.maximum?[new at(o,h,`${h} is greater than the maximum value ${p.maximum}`)]:[]}function Qm(u){const o=u.valueSpec,h=Br(u.value.type);let p,_,x,w={};const I=h!=="categorical"&&u.value.property===void 0,P=!I,D=On(u.value.stops)==="array"&&On(u.value.stops[0])==="array"&&On(u.value.stops[0][0])==="object",O=ho({key:u.key,value:u.value,valueSpec:u.styleSpec.function,validateSpec:u.validateSpec,style:u.style,styleSpec:u.styleSpec,objectElementValidators:{stops:function(X){if(h==="identity")return[new at(X.key,X.value,'identity function may not have a "stops" property')];let K=[];const ie=X.value;return K=K.concat(Dp({key:X.key,value:ie,valueSpec:X.valueSpec,validateSpec:X.validateSpec,style:X.style,styleSpec:X.styleSpec,arrayElementValidator:B})),On(ie)==="array"&&ie.length===0&&K.push(new at(X.key,ie,"array must have at least one stop")),K},default:function(X){return X.validateSpec({key:X.key,value:X.value,valueSpec:o,validateSpec:X.validateSpec,style:X.style,styleSpec:X.styleSpec})}}});return h==="identity"&&I&&O.push(new at(u.key,u.value,'missing required property "property"')),h==="identity"||u.value.stops||O.push(new at(u.key,u.value,'missing required property "stops"')),h==="exponential"&&u.valueSpec.expression&&!Lp(u.valueSpec)&&O.push(new at(u.key,u.value,"exponential functions not supported")),u.styleSpec.$version>=8&&(P&&!Cu(u.valueSpec)?O.push(new at(u.key,u.value,"property functions not supported")):I&&!Wm(u.valueSpec)&&O.push(new at(u.key,u.value,"zoom functions not supported"))),h!=="categorical"&&!D||u.value.property!==void 0||O.push(new at(u.key,u.value,'"property" property is required')),O;function B(X){let K=[];const ie=X.value,de=X.key;if(On(ie)!=="array")return[new at(de,ie,`array expected, ${On(ie)} found`)];if(ie.length!==2)return[new at(de,ie,`array length 2 expected, length ${ie.length} found`)];if(D){if(On(ie[0])!=="object")return[new at(de,ie,`object expected, ${On(ie[0])} found`)];if(ie[0].zoom===void 0)return[new at(de,ie,"object stop key must have zoom")];if(ie[0].value===void 0)return[new at(de,ie,"object stop key must have value")];if(x&&x>Br(ie[0].zoom))return[new at(de,ie[0].zoom,"stop zoom values must appear in ascending order")];Br(ie[0].zoom)!==x&&(x=Br(ie[0].zoom),_=void 0,w={}),K=K.concat(ho({key:`${de}[0]`,value:ie[0],valueSpec:{zoom:{}},validateSpec:X.validateSpec,style:X.style,styleSpec:X.styleSpec,objectElementValidators:{zoom:Vh,value:W}}))}else K=K.concat(W({key:`${de}[0]`,value:ie[0],valueSpec:{},validateSpec:X.validateSpec,style:X.style,styleSpec:X.styleSpec},ie));return lr(il(ie[1]))?K.concat([new at(`${de}[1]`,ie[1],"expressions are not allowed in function stops.")]):K.concat(X.validateSpec({key:`${de}[1]`,value:ie[1],valueSpec:o,validateSpec:X.validateSpec,style:X.style,styleSpec:X.styleSpec}))}function W(X,K){const ie=On(X.value),de=Br(X.value),we=X.value!==null?X.value:K;if(p){if(ie!==p)return[new at(X.key,we,`${ie} stop domain type must match previous stop domain type ${p}`)]}else p=ie;if(ie!=="number"&&ie!=="string"&&ie!=="boolean")return[new at(X.key,we,"stop domain value must be a number, string, or boolean")];if(ie!=="number"&&h!=="categorical"){let Oe=`number expected, ${ie} found`;return Cu(o)&&h===void 0&&(Oe+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new at(X.key,we,Oe)]}return h!=="categorical"||ie!=="number"||isFinite(de)&&Math.floor(de)===de?h!=="categorical"&&ie==="number"&&_!==void 0&&de<_?[new at(X.key,we,"stop domain values must appear in ascending order")]:(_=de,h==="categorical"&&de in w?[new at(X.key,we,"stop domain values must be unique")]:(w[de]=!0,[])):[new at(X.key,we,`integer expected, found ${de}`)]}}function ol(u){const o=(u.expressionContext==="property"?Zm:jl)(il(u.value),u.valueSpec);if(o.result==="error")return o.value.map(p=>new at(`${u.key}${p.key}`,u.value,p.message));const h=o.value.expression||o.value._styleExpression.expression;if(u.expressionContext==="property"&&u.propertyKey==="text-font"&&!h.outputDefined())return[new at(u.key,u.value,`Invalid data expression for "${u.propertyKey}". Output values must be contained as literals within the expression.`)];if(u.expressionContext==="property"&&u.propertyType==="layout"&&!wc(h))return[new at(u.key,u.value,'"feature-state" data expressions are not supported with layout properties.')];if(u.expressionContext==="filter"&&!wc(h))return[new at(u.key,u.value,'"feature-state" data expressions are not supported with filters.')];if(u.expressionContext&&u.expressionContext.indexOf("cluster")===0){if(!Sc(h,["zoom","feature-state"]))return[new at(u.key,u.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(u.expressionContext==="cluster-initial"&&!Eh(h))return[new at(u.key,u.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function sl(u){const o=u.key,h=u.value,p=u.valueSpec,_=[];return Array.isArray(p.values)?p.values.indexOf(Br(h))===-1&&_.push(new at(o,h,`expected one of [${p.values.join(", ")}], ${JSON.stringify(h)} found`)):Object.keys(p.values).indexOf(Br(h))===-1&&_.push(new at(o,h,`expected one of [${Object.keys(p.values).join(", ")}], ${JSON.stringify(h)} found`)),_}function Tu(u){return Nh(il(u.value))?ol(ls({},u,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Rp(u)}function Rp(u){const o=u.value,h=u.key;if(On(o)!=="array")return[new at(h,o,`array expected, ${On(o)} found`)];const p=u.styleSpec;let _,x=[];if(o.length<1)return[new at(h,o,"filter array must have at least 1 element")];switch(x=x.concat(sl({key:`${h}[0]`,value:o[0],valueSpec:p.filter_operator,style:u.style,styleSpec:u.styleSpec})),Br(o[0])){case"<":case"<=":case">":case">=":o.length>=2&&Br(o[1])==="$type"&&x.push(new at(h,o,`"$type" cannot be use with operator "${o[0]}"`));case"==":case"!=":o.length!==3&&x.push(new at(h,o,`filter array for operator "${o[0]}" must have 3 elements`));case"in":case"!in":o.length>=2&&(_=On(o[1]),_!=="string"&&x.push(new at(`${h}[1]`,o[1],`string expected, ${_} found`)));for(let w=2;w{D in h&&o.push(new at(p,h[D],`"${D}" is prohibited for ref layers`))}),_.layers.forEach(D=>{Br(D.id)===I&&(P=D)}),P?P.ref?o.push(new at(p,h.ref,"ref cannot reference another ref layer")):w=Br(P.type):o.push(new at(p,h.ref,`ref layer "${I}" not found`))}else if(w!=="background")if(h.source){const P=_.sources&&_.sources[h.source],D=P&&Br(P.type);P?D==="vector"&&w==="raster"?o.push(new at(p,h.source,`layer "${h.id}" requires a raster source`)):D!=="raster-dem"&&w==="hillshade"?o.push(new at(p,h.source,`layer "${h.id}" requires a raster-dem source`)):D==="raster"&&w!=="raster"?o.push(new at(p,h.source,`layer "${h.id}" requires a vector source`)):D!=="vector"||h["source-layer"]?D==="raster-dem"&&w!=="hillshade"?o.push(new at(p,h.source,"raster-dem source can only be used with layer type 'hillshade'.")):w!=="line"||!h.paint||!h.paint["line-gradient"]||D==="geojson"&&P.lineMetrics||o.push(new at(p,h,`layer "${h.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):o.push(new at(p,h,`layer "${h.id}" must specify a "source-layer"`)):o.push(new at(p,h.source,`source "${h.source}" not found`))}else o.push(new at(p,h,'missing required property "source"'));return o=o.concat(ho({key:p,value:h,valueSpec:x.layer,style:u.style,styleSpec:u.styleSpec,validateSpec:u.validateSpec,objectElementValidators:{"*":()=>[],type:()=>u.validateSpec({key:`${p}.type`,value:h.type,valueSpec:x.layer.type,style:u.style,styleSpec:u.styleSpec,validateSpec:u.validateSpec,object:h,objectKey:"type"}),filter:Tu,layout:P=>ho({layer:h,key:P.key,value:P.value,style:P.style,styleSpec:P.styleSpec,validateSpec:P.validateSpec,objectElementValidators:{"*":D=>Op(ls({layerType:w},D))}}),paint:P=>ho({layer:h,key:P.key,value:P.value,style:P.style,styleSpec:P.styleSpec,validateSpec:P.validateSpec,objectElementValidators:{"*":D=>Np(ls({layerType:w},D))}})}})),o}function Gl(u){const o=u.value,h=u.key,p=On(o);return p!=="string"?[new at(h,o,`string expected, ${p} found`)]:[]}const eg={promoteId:function({key:u,value:o}){if(On(o)==="string")return Gl({key:u,value:o});{const h=[];for(const p in o)h.push(...Gl({key:`${u}.${p}`,value:o[p]}));return h}}};function tg(u){const o=u.value,h=u.key,p=u.styleSpec,_=u.style,x=u.validateSpec;if(!o.type)return[new at(h,o,'"type" is required')];const w=Br(o.type);let I;switch(w){case"vector":case"raster":return I=ho({key:h,value:o,valueSpec:p[`source_${w.replace("-","_")}`],style:u.style,styleSpec:p,objectElementValidators:eg,validateSpec:x}),I;case"raster-dem":return I=function(P){var D;const O=(D=P.sourceName)!==null&&D!==void 0?D:"",B=P.value,W=P.styleSpec,X=W.source_raster_dem,K=P.style;let ie=[];const de=On(B);if(B===void 0)return ie;if(de!=="object")return ie.push(new at("source_raster_dem",B,`object expected, ${de} found`)),ie;const we=Br(B.encoding)==="custom",Oe=["redFactor","greenFactor","blueFactor","baseShift"],Ee=P.value.encoding?`"${P.value.encoding}"`:"Default";for(const ke in B)!we&&Oe.includes(ke)?ie.push(new at(ke,B[ke],`In "${O}": "${ke}" is only valid when "encoding" is set to "custom". ${Ee} encoding found`)):X[ke]?ie=ie.concat(P.validateSpec({key:ke,value:B[ke],valueSpec:X[ke],validateSpec:P.validateSpec,style:K,styleSpec:W})):ie.push(new at(ke,B[ke],`unknown property "${ke}"`));return ie}({sourceName:h,value:o,style:u.style,styleSpec:p,validateSpec:x}),I;case"geojson":if(I=ho({key:h,value:o,valueSpec:p.source_geojson,style:_,styleSpec:p,validateSpec:x,objectElementValidators:eg}),o.cluster)for(const P in o.clusterProperties){const[D,O]=o.clusterProperties[P],B=typeof D=="string"?[D,["accumulated"],["get",P]]:D;I.push(...ol({key:`${h}.${P}.map`,value:O,validateSpec:x,expressionContext:"cluster-map"})),I.push(...ol({key:`${h}.${P}.reduce`,value:B,validateSpec:x,expressionContext:"cluster-reduce"}))}return I;case"video":return ho({key:h,value:o,valueSpec:p.source_video,style:_,validateSpec:x,styleSpec:p});case"image":return ho({key:h,value:o,valueSpec:p.source_image,style:_,validateSpec:x,styleSpec:p});case"canvas":return[new at(h,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return sl({key:`${h}.type`,value:o.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:_,validateSpec:x,styleSpec:p})}}function ng(u){const o=u.value,h=u.styleSpec,p=h.light,_=u.style;let x=[];const w=On(o);if(o===void 0)return x;if(w!=="object")return x=x.concat([new at("light",o,`object expected, ${w} found`)]),x;for(const I in o){const P=I.match(/^(.*)-transition$/);x=x.concat(P&&p[P[1]]&&p[P[1]].transition?u.validateSpec({key:I,value:o[I],valueSpec:h.transition,validateSpec:u.validateSpec,style:_,styleSpec:h}):p[I]?u.validateSpec({key:I,value:o[I],valueSpec:p[I],validateSpec:u.validateSpec,style:_,styleSpec:h}):[new at(I,o[I],`unknown property "${I}"`)])}return x}function rg(u){const o=u.value,h=u.styleSpec,p=h.sky,_=u.style,x=On(o);if(o===void 0)return[];if(x!=="object")return[new at("sky",o,`object expected, ${x} found`)];let w=[];for(const I in o)w=w.concat(p[I]?ea({key:I,value:o[I],valueSpec:p[I],style:_,styleSpec:h}):[new at(I,o[I],`unknown property "${I}"`)]);return w}function Lc(u){const o=u.value,h=u.styleSpec,p=h.terrain,_=u.style;let x=[];const w=On(o);if(o===void 0)return x;if(w!=="object")return x=x.concat([new at("terrain",o,`object expected, ${w} found`)]),x;for(const I in o)x=x.concat(p[I]?u.validateSpec({key:I,value:o[I],valueSpec:p[I],validateSpec:u.validateSpec,style:_,styleSpec:h}):[new at(I,o[I],`unknown property "${I}"`)]);return x}function Pc(u){let o=[];const h=u.value,p=u.key;if(Array.isArray(h)){const _=[],x=[];for(const w in h)h[w].id&&_.includes(h[w].id)&&o.push(new at(p,h,`all the sprites' ids must be unique, but ${h[w].id} is duplicated`)),_.push(h[w].id),h[w].url&&x.includes(h[w].url)&&o.push(new at(p,h,`all the sprites' URLs must be unique, but ${h[w].url} is duplicated`)),x.push(h[w].url),o=o.concat(ho({key:`${p}[${w}]`,value:h[w],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:u.validateSpec}));return o}return Gl({key:p,value:h})}const Io={"*":()=>[],array:Dp,boolean:function(u){const o=u.value,h=u.key,p=On(o);return p!=="boolean"?[new at(h,o,`boolean expected, ${p} found`)]:[]},number:Vh,color:function(u){const o=u.key,h=u.value,p=On(h);return p!=="string"?[new at(o,h,`color expected, ${p} found`)]:$n.parse(String(h))?[]:[new at(o,h,`color expected, "${h}" found`)]},constants:Jm,enum:sl,filter:Tu,function:Qm,layer:Tc,object:ho,source:tg,light:ng,sky:rg,terrain:Lc,string:Gl,formatted:function(u){return Gl(u).length===0?[]:ol(u)},resolvedImage:function(u){return Gl(u).length===0?[]:ol(u)},padding:function(u){const o=u.key,h=u.value;if(On(h)==="array"){if(h.length<1||h.length>4)return[new at(o,h,`padding requires 1 to 4 values; ${h.length} values found`)];const p={type:"number"};let _=[];for(let x=0;x[]}})),u.constants&&(h=h.concat(Jm({key:"constants",value:u.constants,style:u,styleSpec:o,validateSpec:ea}))),Lu(h)}function ta(u){return function(o){return u({...o,validateSpec:ea})}}function Lu(u){return[].concat(u).sort((o,h)=>o.line-h.line)}function Ps(u){return function(...o){return Lu(u.apply(this,o))}}Ls.source=Ps(ta(tg)),Ls.sprite=Ps(ta(Pc)),Ls.glyphs=Ps(ta(zp)),Ls.light=Ps(ta(ng)),Ls.sky=Ps(ta(rg)),Ls.terrain=Ps(ta(Lc)),Ls.layer=Ps(ta(Tc)),Ls.filter=Ps(ta(Tu)),Ls.paintProperty=Ps(ta(Np)),Ls.layoutProperty=Ps(ta(Op));const ql=Ls,Hy=ql.light,Fp=ql.paintProperty,Zy=ql.layoutProperty;function Pu(u,o){let h=!1;if(o&&o.length)for(const p of o)u.fire(new dt(new Error(p.message))),h=!0;return h}class Mc{constructor(o,h,p){const _=this.cells=[];if(o instanceof ArrayBuffer){this.arrayBuffer=o;const w=new Int32Array(this.arrayBuffer);o=w[0],this.d=(h=w[1])+2*(p=w[2]);for(let P=0;P=B[K+0]&&_>=B[K+1])?(I[X]=!0,w.push(O[X])):I[X]=!1}}}}_forEachCell(o,h,p,_,x,w,I,P){const D=this._convertToCellCoord(o),O=this._convertToCellCoord(h),B=this._convertToCellCoord(p),W=this._convertToCellCoord(_);for(let X=D;X<=B;X++)for(let K=O;K<=W;K++){const ie=this.d*K+X;if((!P||P(this._convertFromCellCoord(X),this._convertFromCellCoord(K),this._convertFromCellCoord(X+1),this._convertFromCellCoord(K+1)))&&x.call(this,o,h,p,_,ie,w,I,P))return}}_convertFromCellCoord(o){return(o-this.padding)/this.scale}_convertToCellCoord(o){return Math.max(0,Math.min(this.d-1,Math.floor(o*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;const o=this.cells,h=3+this.cells.length+1+1;let p=0;for(let w=0;w=0)continue;const w=u[x];_[x]=na[p].shallow.indexOf(x)>=0?w:Mu(w,o)}u instanceof Error&&(_.message=u.message)}if(_.$name)throw new Error("$name property is reserved for worker serialization logic.");return p!=="Object"&&(_.$name=p),_}throw new Error("can't serialize object of type "+typeof u)}function Au(u){if(u==null||typeof u=="boolean"||typeof u=="number"||typeof u=="string"||u instanceof Boolean||u instanceof Number||u instanceof String||u instanceof Date||u instanceof RegExp||u instanceof Blob||u instanceof Error||jh(u)||Ot(u)||ArrayBuffer.isView(u)||u instanceof ImageData)return u;if(Array.isArray(u))return u.map(Au);if(typeof u=="object"){const o=u.$name||"Object";if(!na[o])throw new Error(`can't deserialize unregistered class ${o}`);const{klass:h}=na[o];if(!h)throw new Error(`can't deserialize unregistered class ${o}`);if(h.deserialize)return h.deserialize(u);const p=Object.create(h.prototype);for(const _ of Object.keys(u)){if(_==="$name")continue;const x=u[_];p[_]=na[o].shallow.indexOf(_)>=0?x:Au(x)}return p}throw new Error("can't deserialize object of type "+typeof u)}class ig{constructor(){this.first=!0}update(o,h){const p=Math.floor(o);return this.first?(this.first=!1,this.lastIntegerZoom=p,this.lastIntegerZoomTime=0,this.lastZoom=o,this.lastFloorZoom=p,!0):(this.lastFloorZoom>p?(this.lastIntegerZoom=p+1,this.lastIntegerZoomTime=h):this.lastFloorZoomu>=128&&u<=255,Arabic:u=>u>=1536&&u<=1791,"Arabic Supplement":u=>u>=1872&&u<=1919,"Arabic Extended-A":u=>u>=2208&&u<=2303,"Hangul Jamo":u=>u>=4352&&u<=4607,"Unified Canadian Aboriginal Syllabics":u=>u>=5120&&u<=5759,Khmer:u=>u>=6016&&u<=6143,"Unified Canadian Aboriginal Syllabics Extended":u=>u>=6320&&u<=6399,"General Punctuation":u=>u>=8192&&u<=8303,"Letterlike Symbols":u=>u>=8448&&u<=8527,"Number Forms":u=>u>=8528&&u<=8591,"Miscellaneous Technical":u=>u>=8960&&u<=9215,"Control Pictures":u=>u>=9216&&u<=9279,"Optical Character Recognition":u=>u>=9280&&u<=9311,"Enclosed Alphanumerics":u=>u>=9312&&u<=9471,"Geometric Shapes":u=>u>=9632&&u<=9727,"Miscellaneous Symbols":u=>u>=9728&&u<=9983,"Miscellaneous Symbols and Arrows":u=>u>=11008&&u<=11263,"CJK Radicals Supplement":u=>u>=11904&&u<=12031,"Kangxi Radicals":u=>u>=12032&&u<=12255,"Ideographic Description Characters":u=>u>=12272&&u<=12287,"CJK Symbols and Punctuation":u=>u>=12288&&u<=12351,Hiragana:u=>u>=12352&&u<=12447,Katakana:u=>u>=12448&&u<=12543,Bopomofo:u=>u>=12544&&u<=12591,"Hangul Compatibility Jamo":u=>u>=12592&&u<=12687,Kanbun:u=>u>=12688&&u<=12703,"Bopomofo Extended":u=>u>=12704&&u<=12735,"CJK Strokes":u=>u>=12736&&u<=12783,"Katakana Phonetic Extensions":u=>u>=12784&&u<=12799,"Enclosed CJK Letters and Months":u=>u>=12800&&u<=13055,"CJK Compatibility":u=>u>=13056&&u<=13311,"CJK Unified Ideographs Extension A":u=>u>=13312&&u<=19903,"Yijing Hexagram Symbols":u=>u>=19904&&u<=19967,"CJK Unified Ideographs":u=>u>=19968&&u<=40959,"Yi Syllables":u=>u>=40960&&u<=42127,"Yi Radicals":u=>u>=42128&&u<=42191,"Hangul Jamo Extended-A":u=>u>=43360&&u<=43391,"Hangul Syllables":u=>u>=44032&&u<=55215,"Hangul Jamo Extended-B":u=>u>=55216&&u<=55295,"Private Use Area":u=>u>=57344&&u<=63743,"CJK Compatibility Ideographs":u=>u>=63744&&u<=64255,"Arabic Presentation Forms-A":u=>u>=64336&&u<=65023,"Vertical Forms":u=>u>=65040&&u<=65055,"CJK Compatibility Forms":u=>u>=65072&&u<=65103,"Small Form Variants":u=>u>=65104&&u<=65135,"Arabic Presentation Forms-B":u=>u>=65136&&u<=65279,"Halfwidth and Fullwidth Forms":u=>u>=65280&&u<=65519};function ku(u){for(const o of u)if(Gh(o.charCodeAt(0)))return!0;return!1}function og(u){for(const o of u)if(!sg(o.charCodeAt(0)))return!1;return!0}function sg(u){return!(xt.Arabic(u)||xt["Arabic Supplement"](u)||xt["Arabic Extended-A"](u)||xt["Arabic Presentation Forms-A"](u)||xt["Arabic Presentation Forms-B"](u))}function Gh(u){return!(u!==746&&u!==747&&(u<4352||!(xt["Bopomofo Extended"](u)||xt.Bopomofo(u)||xt["CJK Compatibility Forms"](u)&&!(u>=65097&&u<=65103)||xt["CJK Compatibility Ideographs"](u)||xt["CJK Compatibility"](u)||xt["CJK Radicals Supplement"](u)||xt["CJK Strokes"](u)||!(!xt["CJK Symbols and Punctuation"](u)||u>=12296&&u<=12305||u>=12308&&u<=12319||u===12336)||xt["CJK Unified Ideographs Extension A"](u)||xt["CJK Unified Ideographs"](u)||xt["Enclosed CJK Letters and Months"](u)||xt["Hangul Compatibility Jamo"](u)||xt["Hangul Jamo Extended-A"](u)||xt["Hangul Jamo Extended-B"](u)||xt["Hangul Jamo"](u)||xt["Hangul Syllables"](u)||xt.Hiragana(u)||xt["Ideographic Description Characters"](u)||xt.Kanbun(u)||xt["Kangxi Radicals"](u)||xt["Katakana Phonetic Extensions"](u)||xt.Katakana(u)&&u!==12540||!(!xt["Halfwidth and Fullwidth Forms"](u)||u===65288||u===65289||u===65293||u>=65306&&u<=65310||u===65339||u===65341||u===65343||u>=65371&&u<=65503||u===65507||u>=65512&&u<=65519)||!(!xt["Small Form Variants"](u)||u>=65112&&u<=65118||u>=65123&&u<=65126)||xt["Unified Canadian Aboriginal Syllabics"](u)||xt["Unified Canadian Aboriginal Syllabics Extended"](u)||xt["Vertical Forms"](u)||xt["Yijing Hexagram Symbols"](u)||xt["Yi Syllables"](u)||xt["Yi Radicals"](u))))}function Bp(u){return!(Gh(u)||function(o){return!!(xt["Latin-1 Supplement"](o)&&(o===167||o===169||o===174||o===177||o===188||o===189||o===190||o===215||o===247)||xt["General Punctuation"](o)&&(o===8214||o===8224||o===8225||o===8240||o===8241||o===8251||o===8252||o===8258||o===8263||o===8264||o===8265||o===8273)||xt["Letterlike Symbols"](o)||xt["Number Forms"](o)||xt["Miscellaneous Technical"](o)&&(o>=8960&&o<=8967||o>=8972&&o<=8991||o>=8996&&o<=9e3||o===9003||o>=9085&&o<=9114||o>=9150&&o<=9165||o===9167||o>=9169&&o<=9179||o>=9186&&o<=9215)||xt["Control Pictures"](o)&&o!==9251||xt["Optical Character Recognition"](o)||xt["Enclosed Alphanumerics"](o)||xt["Geometric Shapes"](o)||xt["Miscellaneous Symbols"](o)&&!(o>=9754&&o<=9759)||xt["Miscellaneous Symbols and Arrows"](o)&&(o>=11026&&o<=11055||o>=11088&&o<=11097||o>=11192&&o<=11243)||xt["CJK Symbols and Punctuation"](o)||xt.Katakana(o)||xt["Private Use Area"](o)||xt["CJK Compatibility Forms"](o)||xt["Small Form Variants"](o)||xt["Halfwidth and Fullwidth Forms"](o)||o===8734||o===8756||o===8757||o>=9984&&o<=10087||o>=10102&&o<=10131||o===65532||o===65533)}(u))}function qh(u){return u>=1424&&u<=2303||xt["Arabic Presentation Forms-A"](u)||xt["Arabic Presentation Forms-B"](u)}function ag(u,o){return!(!o&&qh(u)||u>=2304&&u<=3583||u>=3840&&u<=4255||xt.Khmer(u))}function Xy(u){for(const o of u)if(qh(o.charCodeAt(0)))return!0;return!1}const al=new class{constructor(){this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null}setState(u){this.pluginStatus=u.pluginStatus,this.pluginURL=u.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(u){this.applyArabicShaping=u.applyArabicShaping,this.processBidirectionalText=u.processBidirectionalText,this.processStyledBidirectionalText=u.processStyledBidirectionalText}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getPluginURL(){return this.pluginURL}getRTLTextPluginStatus(){return this.pluginStatus}};class br{constructor(o,h){this.zoom=o,h?(this.now=h.now,this.fadeDuration=h.fadeDuration,this.zoomHistory=h.zoomHistory,this.transition=h.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new ig,this.transition={})}isSupportedScript(o){return function(h,p){for(const _ of h)if(!ag(_.charCodeAt(0),p))return!1;return!0}(o,al.getRTLTextPluginStatus()==="loaded")}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){const o=this.zoom,h=o-Math.floor(o),p=this.crossFadingFactor();return o>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:h+(1-h)*p}:{fromScale:.5,toScale:1,t:1-(1-p)*h}}}class Ac{constructor(o,h){this.property=o,this.value=h,this.expression=function(p,_){if(Ah(p))return new Dh(p,_);if(lr(p)){const x=Zm(p,_);if(x.result==="error")throw new Error(x.value.map(w=>`${w.key}: ${w.message}`).join(", "));return x.value}{let x=p;return _.type==="color"&&typeof p=="string"?x=$n.parse(p):_.type!=="padding"||typeof p!="number"&&!Array.isArray(p)?_.type==="variableAnchorOffsetCollection"&&Array.isArray(p)&&(x=cs.parse(p)):x=Eo.parse(p),{kind:"constant",evaluate:()=>x}}}(h===void 0?o.specification.default:h,o.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(o,h,p){return this.property.possiblyEvaluate(this,o,h,p)}}class Wh{constructor(o){this.property=o,this.value=new Ac(o,void 0)}transitioned(o,h){return new lg(this.property,this.value,h,fe({},o.transition,this.transition),o.now)}untransitioned(){return new lg(this.property,this.value,null,{},0)}}class Vp{constructor(o){this._properties=o,this._values=Object.create(o.defaultTransitionablePropertyValues)}getValue(o){return Y(this._values[o].value.value)}setValue(o,h){Object.prototype.hasOwnProperty.call(this._values,o)||(this._values[o]=new Wh(this._values[o].property)),this._values[o].value=new Ac(this._values[o].property,h===null?void 0:Y(h))}getTransition(o){return Y(this._values[o].transition)}setTransition(o,h){Object.prototype.hasOwnProperty.call(this._values,o)||(this._values[o]=new Wh(this._values[o].property)),this._values[o].transition=Y(h)||void 0}serialize(){const o={};for(const h of Object.keys(this._values)){const p=this.getValue(h);p!==void 0&&(o[h]=p);const _=this.getTransition(h);_!==void 0&&(o[`${h}-transition`]=_)}return o}transitioned(o,h){const p=new ug(this._properties);for(const _ of Object.keys(this._values))p._values[_]=this._values[_].transitioned(o,h._values[_]);return p}untransitioned(){const o=new ug(this._properties);for(const h of Object.keys(this._values))o._values[h]=this._values[h].untransitioned();return o}}class lg{constructor(o,h,p,_,x){this.property=o,this.value=h,this.begin=x+_.delay||0,this.end=this.begin+_.duration||0,o.specification.transition&&(_.delay||_.duration)&&(this.prior=p)}possiblyEvaluate(o,h,p){const _=o.now||0,x=this.value.possiblyEvaluate(o,h,p),w=this.prior;if(w){if(_>this.end)return this.prior=null,x;if(this.value.isDataDriven())return this.prior=null,x;if(_=1)return 1;const D=P*P,O=D*P;return 4*(P<.5?O:3*(P-D)+O-.75)}(I))}}return x}}class ug{constructor(o){this._properties=o,this._values=Object.create(o.defaultTransitioningPropertyValues)}possiblyEvaluate(o,h,p){const _=new kc(this._properties);for(const x of Object.keys(this._values))_._values[x]=this._values[x].possiblyEvaluate(o,h,p);return _}hasTransition(){for(const o of Object.keys(this._values))if(this._values[o].prior)return!0;return!1}}class cg{constructor(o){this._properties=o,this._values=Object.create(o.defaultPropertyValues)}hasValue(o){return this._values[o].value!==void 0}getValue(o){return Y(this._values[o].value)}setValue(o,h){this._values[o]=new Ac(this._values[o].property,h===null?void 0:Y(h))}serialize(){const o={};for(const h of Object.keys(this._values)){const p=this.getValue(h);p!==void 0&&(o[h]=p)}return o}possiblyEvaluate(o,h,p){const _=new kc(this._properties);for(const x of Object.keys(this._values))_._values[x]=this._values[x].possiblyEvaluate(o,h,p);return _}}class Ms{constructor(o,h,p){this.property=o,this.value=h,this.parameters=p}isConstant(){return this.value.kind==="constant"}constantOr(o){return this.value.kind==="constant"?this.value.value:o}evaluate(o,h,p,_){return this.property.evaluate(this.value,this.parameters,o,h,p,_)}}class kc{constructor(o){this._properties=o,this._values=Object.create(o.defaultPossiblyEvaluatedValues)}get(o){return this._values[o]}}class Nt{constructor(o){this.specification=o}possiblyEvaluate(o,h){if(o.isDataDriven())throw new Error("Value should not be data driven");return o.expression.evaluate(h)}interpolate(o,h,p){const _=co[this.specification.type];return _?_(o,h,p):o}}class qt{constructor(o,h){this.specification=o,this.overrides=h}possiblyEvaluate(o,h,p,_){return new Ms(this,o.expression.kind==="constant"||o.expression.kind==="camera"?{kind:"constant",value:o.expression.evaluate(h,null,{},p,_)}:o.expression,h)}interpolate(o,h,p){if(o.value.kind!=="constant"||h.value.kind!=="constant")return o;if(o.value.value===void 0||h.value.value===void 0)return new Ms(this,{kind:"constant",value:void 0},o.parameters);const _=co[this.specification.type];if(_){const x=_(o.value.value,h.value.value,p);return new Ms(this,{kind:"constant",value:x},o.parameters)}return o}evaluate(o,h,p,_,x,w){return o.kind==="constant"?o.value:o.evaluate(h,p,_,x,w)}}class Hh extends qt{possiblyEvaluate(o,h,p,_){if(o.value===void 0)return new Ms(this,{kind:"constant",value:void 0},h);if(o.expression.kind==="constant"){const x=o.expression.evaluate(h,null,{},p,_),w=o.property.specification.type==="resolvedImage"&&typeof x!="string"?x.name:x,I=this._calculate(w,w,w,h);return new Ms(this,{kind:"constant",value:I},h)}if(o.expression.kind==="camera"){const x=this._calculate(o.expression.evaluate({zoom:h.zoom-1}),o.expression.evaluate({zoom:h.zoom}),o.expression.evaluate({zoom:h.zoom+1}),h);return new Ms(this,{kind:"constant",value:x},h)}return new Ms(this,o.expression,h)}evaluate(o,h,p,_,x,w){if(o.kind==="source"){const I=o.evaluate(h,p,_,x,w);return this._calculate(I,I,I,h)}return o.kind==="composite"?this._calculate(o.evaluate({zoom:Math.floor(h.zoom)-1},p,_),o.evaluate({zoom:Math.floor(h.zoom)},p,_),o.evaluate({zoom:Math.floor(h.zoom)+1},p,_),h):o.value}_calculate(o,h,p,_){return _.zoom>_.zoomHistory.lastIntegerZoom?{from:o,to:h}:{from:p,to:h}}interpolate(o){return o}}class Dc{constructor(o){this.specification=o}possiblyEvaluate(o,h,p,_){if(o.value!==void 0){if(o.expression.kind==="constant"){const x=o.expression.evaluate(h,null,{},p,_);return this._calculate(x,x,x,h)}return this._calculate(o.expression.evaluate(new br(Math.floor(h.zoom-1),h)),o.expression.evaluate(new br(Math.floor(h.zoom),h)),o.expression.evaluate(new br(Math.floor(h.zoom+1),h)),h)}}_calculate(o,h,p,_){return _.zoom>_.zoomHistory.lastIntegerZoom?{from:o,to:h}:{from:p,to:h}}interpolate(o){return o}}class Up{constructor(o){this.specification=o}possiblyEvaluate(o,h,p,_){return!!o.expression.evaluate(h,null,{},p,_)}interpolate(){return!1}}class Co{constructor(o){this.properties=o,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(const h in o){const p=o[h];p.specification.overridable&&this.overridableProperties.push(h);const _=this.defaultPropertyValues[h]=new Ac(p,void 0),x=this.defaultTransitionablePropertyValues[h]=new Wh(p);this.defaultTransitioningPropertyValues[h]=x.untransitioned(),this.defaultPossiblyEvaluatedValues[h]=_.possiblyEvaluate({})}}}Ct("DataDrivenProperty",qt),Ct("DataConstantProperty",Nt),Ct("CrossFadedDataDrivenProperty",Hh),Ct("CrossFadedProperty",Dc),Ct("ColorRampProperty",Up);const jp="-transition";class As extends en{constructor(o,h){if(super(),this.id=o.id,this.type=o.type,this._featureFilter={filter:()=>!0,needGeometry:!1},o.type!=="custom"&&(this.metadata=o.metadata,this.minzoom=o.minzoom,this.maxzoom=o.maxzoom,o.type!=="background"&&(this.source=o.source,this.sourceLayer=o["source-layer"],this.filter=o.filter),h.layout&&(this._unevaluatedLayout=new cg(h.layout)),h.paint)){this._transitionablePaint=new Vp(h.paint);for(const p in o.paint)this.setPaintProperty(p,o.paint[p],{validate:!1});for(const p in o.layout)this.setLayoutProperty(p,o.layout[p],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new kc(h.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(o){return o==="visibility"?this.visibility:this._unevaluatedLayout.getValue(o)}setLayoutProperty(o,h,p={}){h!=null&&this._validate(Zy,`layers.${this.id}.layout.${o}`,o,h,p)||(o!=="visibility"?this._unevaluatedLayout.setValue(o,h):this.visibility=h)}getPaintProperty(o){return o.endsWith(jp)?this._transitionablePaint.getTransition(o.slice(0,-11)):this._transitionablePaint.getValue(o)}setPaintProperty(o,h,p={}){if(h!=null&&this._validate(Fp,`layers.${this.id}.paint.${o}`,o,h,p))return!1;if(o.endsWith(jp))return this._transitionablePaint.setTransition(o.slice(0,-11),h||void 0),!1;{const _=this._transitionablePaint._values[o],x=_.property.specification["property-type"]==="cross-faded-data-driven",w=_.value.isDataDriven(),I=_.value;this._transitionablePaint.setValue(o,h),this._handleSpecialPaintPropertyUpdate(o);const P=this._transitionablePaint._values[o].value;return P.isDataDriven()||w||x||this._handleOverridablePaintPropertyUpdate(o,I,P)}}_handleSpecialPaintPropertyUpdate(o){}_handleOverridablePaintPropertyUpdate(o,h,p){return!1}isHidden(o){return!!(this.minzoom&&o=this.maxzoom)||this.visibility==="none"}updateTransitions(o){this._transitioningPaint=this._transitionablePaint.transitioned(o,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(o,h){o.getCrossfadeParameters&&(this._crossfadeParameters=o.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(o,void 0,h)),this.paint=this._transitioningPaint.possiblyEvaluate(o,void 0,h)}serialize(){const o={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(o.layout=o.layout||{},o.layout.visibility=this.visibility),Ae(o,(h,p)=>!(h===void 0||p==="layout"&&!Object.keys(h).length||p==="paint"&&!Object.keys(h).length))}_validate(o,h,p,_,x={}){return(!x||x.validate!==!1)&&Pu(this,o.call(ql,{key:h,layerType:this.type,objectKey:p,value:_,styleSpec:Re,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(const o in this.paint._values){const h=this.paint.get(o);if(h instanceof Ms&&Cu(h.property.specification)&&(h.value.kind==="source"||h.value.kind==="composite")&&h.value.isStateDependent)return!0}return!1}}const hg={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class Rc{constructor(o,h){this._structArray=o,this._pos1=h*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class Vr{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(o,h){return o._trim(),h&&(o.isTransferred=!0,h.push(o.arrayBuffer)),{length:o.length,arrayBuffer:o.arrayBuffer}}static deserialize(o){const h=Object.create(this.prototype);return h.arrayBuffer=o.arrayBuffer,h.length=o.length,h.capacity=o.arrayBuffer.byteLength/h.bytesPerElement,h._refreshViews(),h}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(o){this.reserve(o),this.length=o}reserve(o){if(o>this.capacity){this.capacity=Math.max(o,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);const h=this.uint8;this._refreshViews(),h&&this.uint8.set(h)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function ei(u,o=1){let h=0,p=0;return{members:u.map(_=>{const x=hg[_.type].BYTES_PER_ELEMENT,w=h=fg(h,Math.max(o,x)),I=_.components||1;return p=Math.max(p,x),h+=x*I,{name:_.name,type:_.type,components:I,offset:w}}),size:fg(h,Math.max(p,o)),alignment:o}}function fg(u,o){return Math.ceil(u/o)*o}class Nc extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(o,h){const p=this.length;return this.resize(p+1),this.emplace(p,o,h)}emplace(o,h,p){const _=2*o;return this.int16[_+0]=h,this.int16[_+1]=p,o}}Nc.prototype.bytesPerElement=4,Ct("StructArrayLayout2i4",Nc);class ka extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(o,h,p){const _=this.length;return this.resize(_+1),this.emplace(_,o,h,p)}emplace(o,h,p,_){const x=3*o;return this.int16[x+0]=h,this.int16[x+1]=p,this.int16[x+2]=_,o}}ka.prototype.bytesPerElement=6,Ct("StructArrayLayout3i6",ka);class Gp extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(o,h,p,_){const x=this.length;return this.resize(x+1),this.emplace(x,o,h,p,_)}emplace(o,h,p,_,x){const w=4*o;return this.int16[w+0]=h,this.int16[w+1]=p,this.int16[w+2]=_,this.int16[w+3]=x,o}}Gp.prototype.bytesPerElement=8,Ct("StructArrayLayout4i8",Gp);class qp extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(o,h,p,_,x,w){const I=this.length;return this.resize(I+1),this.emplace(I,o,h,p,_,x,w)}emplace(o,h,p,_,x,w,I){const P=6*o;return this.int16[P+0]=h,this.int16[P+1]=p,this.int16[P+2]=_,this.int16[P+3]=x,this.int16[P+4]=w,this.int16[P+5]=I,o}}qp.prototype.bytesPerElement=12,Ct("StructArrayLayout2i4i12",qp);class Wp extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(o,h,p,_,x,w){const I=this.length;return this.resize(I+1),this.emplace(I,o,h,p,_,x,w)}emplace(o,h,p,_,x,w,I){const P=4*o,D=8*o;return this.int16[P+0]=h,this.int16[P+1]=p,this.uint8[D+4]=_,this.uint8[D+5]=x,this.uint8[D+6]=w,this.uint8[D+7]=I,o}}Wp.prototype.bytesPerElement=8,Ct("StructArrayLayout2i4ub8",Wp);class Oc extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(o,h){const p=this.length;return this.resize(p+1),this.emplace(p,o,h)}emplace(o,h,p){const _=2*o;return this.float32[_+0]=h,this.float32[_+1]=p,o}}Oc.prototype.bytesPerElement=8,Ct("StructArrayLayout2f8",Oc);class Zh extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(o,h,p,_,x,w,I,P,D,O){const B=this.length;return this.resize(B+1),this.emplace(B,o,h,p,_,x,w,I,P,D,O)}emplace(o,h,p,_,x,w,I,P,D,O,B){const W=10*o;return this.uint16[W+0]=h,this.uint16[W+1]=p,this.uint16[W+2]=_,this.uint16[W+3]=x,this.uint16[W+4]=w,this.uint16[W+5]=I,this.uint16[W+6]=P,this.uint16[W+7]=D,this.uint16[W+8]=O,this.uint16[W+9]=B,o}}Zh.prototype.bytesPerElement=20,Ct("StructArrayLayout10ui20",Zh);class Hp extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(o,h,p,_,x,w,I,P,D,O,B,W){const X=this.length;return this.resize(X+1),this.emplace(X,o,h,p,_,x,w,I,P,D,O,B,W)}emplace(o,h,p,_,x,w,I,P,D,O,B,W,X){const K=12*o;return this.int16[K+0]=h,this.int16[K+1]=p,this.int16[K+2]=_,this.int16[K+3]=x,this.uint16[K+4]=w,this.uint16[K+5]=I,this.uint16[K+6]=P,this.uint16[K+7]=D,this.int16[K+8]=O,this.int16[K+9]=B,this.int16[K+10]=W,this.int16[K+11]=X,o}}Hp.prototype.bytesPerElement=24,Ct("StructArrayLayout4i4ui4i24",Hp);class Zp extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(o,h,p){const _=this.length;return this.resize(_+1),this.emplace(_,o,h,p)}emplace(o,h,p,_){const x=3*o;return this.float32[x+0]=h,this.float32[x+1]=p,this.float32[x+2]=_,o}}Zp.prototype.bytesPerElement=12,Ct("StructArrayLayout3f12",Zp);class Da extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(o){const h=this.length;return this.resize(h+1),this.emplace(h,o)}emplace(o,h){return this.uint32[1*o+0]=h,o}}Da.prototype.bytesPerElement=4,Ct("StructArrayLayout1ul4",Da);class Xh extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(o,h,p,_,x,w,I,P,D){const O=this.length;return this.resize(O+1),this.emplace(O,o,h,p,_,x,w,I,P,D)}emplace(o,h,p,_,x,w,I,P,D,O){const B=10*o,W=5*o;return this.int16[B+0]=h,this.int16[B+1]=p,this.int16[B+2]=_,this.int16[B+3]=x,this.int16[B+4]=w,this.int16[B+5]=I,this.uint32[W+3]=P,this.uint16[B+8]=D,this.uint16[B+9]=O,o}}Xh.prototype.bytesPerElement=20,Ct("StructArrayLayout6i1ul2ui20",Xh);class zc extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(o,h,p,_,x,w){const I=this.length;return this.resize(I+1),this.emplace(I,o,h,p,_,x,w)}emplace(o,h,p,_,x,w,I){const P=6*o;return this.int16[P+0]=h,this.int16[P+1]=p,this.int16[P+2]=_,this.int16[P+3]=x,this.int16[P+4]=w,this.int16[P+5]=I,o}}zc.prototype.bytesPerElement=12,Ct("StructArrayLayout2i2i2i12",zc);class Yh extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(o,h,p,_,x){const w=this.length;return this.resize(w+1),this.emplace(w,o,h,p,_,x)}emplace(o,h,p,_,x,w){const I=4*o,P=8*o;return this.float32[I+0]=h,this.float32[I+1]=p,this.float32[I+2]=_,this.int16[P+6]=x,this.int16[P+7]=w,o}}Yh.prototype.bytesPerElement=16,Ct("StructArrayLayout2f1f2i16",Yh);class Fc extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(o,h,p,_){const x=this.length;return this.resize(x+1),this.emplace(x,o,h,p,_)}emplace(o,h,p,_,x){const w=12*o,I=3*o;return this.uint8[w+0]=h,this.uint8[w+1]=p,this.float32[I+1]=_,this.float32[I+2]=x,o}}Fc.prototype.bytesPerElement=12,Ct("StructArrayLayout2ub2f12",Fc);class $h extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(o,h,p){const _=this.length;return this.resize(_+1),this.emplace(_,o,h,p)}emplace(o,h,p,_){const x=3*o;return this.uint16[x+0]=h,this.uint16[x+1]=p,this.uint16[x+2]=_,o}}$h.prototype.bytesPerElement=6,Ct("StructArrayLayout3ui6",$h);class Du extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(o,h,p,_,x,w,I,P,D,O,B,W,X,K,ie,de,we){const Oe=this.length;return this.resize(Oe+1),this.emplace(Oe,o,h,p,_,x,w,I,P,D,O,B,W,X,K,ie,de,we)}emplace(o,h,p,_,x,w,I,P,D,O,B,W,X,K,ie,de,we,Oe){const Ee=24*o,ke=12*o,Qe=48*o;return this.int16[Ee+0]=h,this.int16[Ee+1]=p,this.uint16[Ee+2]=_,this.uint16[Ee+3]=x,this.uint32[ke+2]=w,this.uint32[ke+3]=I,this.uint32[ke+4]=P,this.uint16[Ee+10]=D,this.uint16[Ee+11]=O,this.uint16[Ee+12]=B,this.float32[ke+7]=W,this.float32[ke+8]=X,this.uint8[Qe+36]=K,this.uint8[Qe+37]=ie,this.uint8[Qe+38]=de,this.uint32[ke+10]=we,this.int16[Ee+22]=Oe,o}}Du.prototype.bytesPerElement=48,Ct("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Du);class Wl extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(o,h,p,_,x,w,I,P,D,O,B,W,X,K,ie,de,we,Oe,Ee,ke,Qe,et,St,kt,wt,bt,ht,Tt){const _t=this.length;return this.resize(_t+1),this.emplace(_t,o,h,p,_,x,w,I,P,D,O,B,W,X,K,ie,de,we,Oe,Ee,ke,Qe,et,St,kt,wt,bt,ht,Tt)}emplace(o,h,p,_,x,w,I,P,D,O,B,W,X,K,ie,de,we,Oe,Ee,ke,Qe,et,St,kt,wt,bt,ht,Tt,_t){const it=32*o,jt=16*o;return this.int16[it+0]=h,this.int16[it+1]=p,this.int16[it+2]=_,this.int16[it+3]=x,this.int16[it+4]=w,this.int16[it+5]=I,this.int16[it+6]=P,this.int16[it+7]=D,this.uint16[it+8]=O,this.uint16[it+9]=B,this.uint16[it+10]=W,this.uint16[it+11]=X,this.uint16[it+12]=K,this.uint16[it+13]=ie,this.uint16[it+14]=de,this.uint16[it+15]=we,this.uint16[it+16]=Oe,this.uint16[it+17]=Ee,this.uint16[it+18]=ke,this.uint16[it+19]=Qe,this.uint16[it+20]=et,this.uint16[it+21]=St,this.uint16[it+22]=kt,this.uint32[jt+12]=wt,this.float32[jt+13]=bt,this.float32[jt+14]=ht,this.uint16[it+30]=Tt,this.uint16[it+31]=_t,o}}Wl.prototype.bytesPerElement=64,Ct("StructArrayLayout8i15ui1ul2f2ui64",Wl);class Kh extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(o){const h=this.length;return this.resize(h+1),this.emplace(h,o)}emplace(o,h){return this.float32[1*o+0]=h,o}}Kh.prototype.bytesPerElement=4,Ct("StructArrayLayout1f4",Kh);class Jh extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(o,h,p){const _=this.length;return this.resize(_+1),this.emplace(_,o,h,p)}emplace(o,h,p,_){const x=3*o;return this.uint16[6*o+0]=h,this.float32[x+1]=p,this.float32[x+2]=_,o}}Jh.prototype.bytesPerElement=12,Ct("StructArrayLayout1ui2f12",Jh);class Hl extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(o,h,p){const _=this.length;return this.resize(_+1),this.emplace(_,o,h,p)}emplace(o,h,p,_){const x=4*o;return this.uint32[2*o+0]=h,this.uint16[x+2]=p,this.uint16[x+3]=_,o}}Hl.prototype.bytesPerElement=8,Ct("StructArrayLayout1ul2ui8",Hl);class Xp extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(o,h){const p=this.length;return this.resize(p+1),this.emplace(p,o,h)}emplace(o,h,p){const _=2*o;return this.uint16[_+0]=h,this.uint16[_+1]=p,o}}Xp.prototype.bytesPerElement=4,Ct("StructArrayLayout2ui4",Xp);class Yp extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(o){const h=this.length;return this.resize(h+1),this.emplace(h,o)}emplace(o,h){return this.uint16[1*o+0]=h,o}}Yp.prototype.bytesPerElement=2,Ct("StructArrayLayout1ui2",Yp);class Qh extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(o,h,p,_){const x=this.length;return this.resize(x+1),this.emplace(x,o,h,p,_)}emplace(o,h,p,_,x){const w=4*o;return this.float32[w+0]=h,this.float32[w+1]=p,this.float32[w+2]=_,this.float32[w+3]=x,o}}Qh.prototype.bytesPerElement=16,Ct("StructArrayLayout4f16",Qh);class pg extends Rc{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new E(this.anchorPointX,this.anchorPointY)}}pg.prototype.size=20;class y extends Xh{get(o){return new pg(this,o)}}Ct("CollisionBoxArray",y);class a extends Rc{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(o){this._structArray.uint8[this._pos1+37]=o}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(o){this._structArray.uint8[this._pos1+38]=o}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(o){this._structArray.uint32[this._pos4+10]=o}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}a.prototype.size=48;class f extends Du{get(o){return new a(this,o)}}Ct("PlacedSymbolArray",f);class m extends Rc{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(o){this._structArray.uint32[this._pos4+12]=o}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+14]}get textAnchorOffsetStartIndex(){return this._structArray.uint16[this._pos2+30]}get textAnchorOffsetEndIndex(){return this._structArray.uint16[this._pos2+31]}}m.prototype.size=64;class g extends Wl{get(o){return new m(this,o)}}Ct("SymbolInstanceArray",g);class b extends Kh{getoffsetX(o){return this.float32[1*o+0]}}Ct("GlyphOffsetArray",b);class T extends ka{getx(o){return this.int16[3*o+0]}gety(o){return this.int16[3*o+1]}gettileUnitDistanceFromAnchor(o){return this.int16[3*o+2]}}Ct("SymbolLineVertexArray",T);class L extends Rc{get textAnchor(){return this._structArray.uint16[this._pos2+0]}get textOffset0(){return this._structArray.float32[this._pos4+1]}get textOffset1(){return this._structArray.float32[this._pos4+2]}}L.prototype.size=12;class k extends Jh{get(o){return new L(this,o)}}Ct("TextAnchorOffsetArray",k);class N extends Rc{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}}N.prototype.size=8;class V extends Hl{get(o){return new N(this,o)}}Ct("FeatureIndexArray",V);class j extends Nc{}class $ extends Nc{}class he extends Nc{}class ce extends qp{}class ge extends Wp{}class re extends Oc{}class Ce extends Zh{}class Be extends Hp{}class ve extends Zp{}class De extends Da{}class Ve extends zc{}class Ze extends Fc{}class $e extends $h{}class rt extends Xp{}const nt=ei([{name:"a_pos",components:2,type:"Int16"}],4),{members:ct}=nt;class pt{constructor(o=[]){this.segments=o}prepareSegment(o,h,p,_){let x=this.segments[this.segments.length-1];return o>pt.MAX_VERTEX_ARRAY_LENGTH&&Ke(`Max vertices per segment is ${pt.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${o}`),(!x||x.vertexLength+o>pt.MAX_VERTEX_ARRAY_LENGTH||x.sortKey!==_)&&(x={vertexOffset:h.length,primitiveOffset:p.length,vertexLength:0,primitiveLength:0},_!==void 0&&(x.sortKey=_),this.segments.push(x)),x}get(){return this.segments}destroy(){for(const o of this.segments)for(const h in o.vaos)o.vaos[h].destroy()}static simpleSegment(o,h,p,_){return new pt([{vertexOffset:o,primitiveOffset:h,vertexLength:p,primitiveLength:_,vaos:{},sortKey:0}])}}function un(u,o){return 256*(u=te(Math.floor(u),0,255))+te(Math.floor(o),0,255)}pt.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Ct("SegmentVector",pt);const gt=ei([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]);var Ht={exports:{}},cn={exports:{}};cn.exports=function(u,o){var h,p,_,x,w,I,P,D;for(p=u.length-(h=3&u.length),_=o,w=3432918353,I=461845907,D=0;D>>16)*w&65535)<<16)&4294967295)<<15|P>>>17))*I+(((P>>>16)*I&65535)<<16)&4294967295)<<13|_>>>19))+((5*(_>>>16)&65535)<<16)&4294967295))+((58964+(x>>>16)&65535)<<16);switch(P=0,h){case 3:P^=(255&u.charCodeAt(D+2))<<16;case 2:P^=(255&u.charCodeAt(D+1))<<8;case 1:_^=P=(65535&(P=(P=(65535&(P^=255&u.charCodeAt(D)))*w+(((P>>>16)*w&65535)<<16)&4294967295)<<15|P>>>17))*I+(((P>>>16)*I&65535)<<16)&4294967295}return _^=u.length,_=2246822507*(65535&(_^=_>>>16))+((2246822507*(_>>>16)&65535)<<16)&4294967295,_=3266489909*(65535&(_^=_>>>13))+((3266489909*(_>>>16)&65535)<<16)&4294967295,(_^=_>>>16)>>>0};var kn=cn.exports,Jt={exports:{}};Jt.exports=function(u,o){for(var h,p=u.length,_=o^p,x=0;p>=4;)h=1540483477*(65535&(h=255&u.charCodeAt(x)|(255&u.charCodeAt(++x))<<8|(255&u.charCodeAt(++x))<<16|(255&u.charCodeAt(++x))<<24))+((1540483477*(h>>>16)&65535)<<16),_=1540483477*(65535&_)+((1540483477*(_>>>16)&65535)<<16)^(h=1540483477*(65535&(h^=h>>>24))+((1540483477*(h>>>16)&65535)<<16)),p-=4,++x;switch(p){case 3:_^=(255&u.charCodeAt(x+2))<<16;case 2:_^=(255&u.charCodeAt(x+1))<<8;case 1:_=1540483477*(65535&(_^=255&u.charCodeAt(x)))+((1540483477*(_>>>16)&65535)<<16)}return _=1540483477*(65535&(_^=_>>>13))+((1540483477*(_>>>16)&65535)<<16),(_^=_>>>15)>>>0};var mn=kn,bn=Jt.exports;Ht.exports=mn,Ht.exports.murmur3=mn,Ht.exports.murmur2=bn;var Ur=d(Ht.exports);class Jn{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(o,h,p,_){this.ids.push(Wo(o)),this.positions.push(h,p,_)}getPositions(o){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");const h=Wo(o);let p=0,_=this.ids.length-1;for(;p<_;){const w=p+_>>1;this.ids[w]>=h?_=w:p=w+1}const x=[];for(;this.ids[p]===h;)x.push({index:this.positions[3*p],start:this.positions[3*p+1],end:this.positions[3*p+2]}),p++;return x}static serialize(o,h){const p=new Float64Array(o.ids),_=new Uint32Array(o.positions);return yi(p,_,0,p.length-1),h&&h.push(p.buffer,_.buffer),{ids:p,positions:_}}static deserialize(o){const h=new Jn;return h.ids=o.ids,h.positions=o.positions,h.indexed=!0,h}}function Wo(u){const o=+u;return!isNaN(o)&&o<=Number.MAX_SAFE_INTEGER?o:Ur(String(u))}function yi(u,o,h,p){for(;h>1];let x=h-1,w=p+1;for(;;){do x++;while(u[x]<_);do w--;while(u[w]>_);if(x>=w)break;Mr(u,x,w),Mr(o,3*x,3*w),Mr(o,3*x+1,3*w+1),Mr(o,3*x+2,3*w+2)}w-h`u_${_}`),this.type=p}setUniform(o,h,p){o.set(p.constantOr(this.value))}getBinding(o,h,p){return this.type==="color"?new ll(o,h):new Ho(o,h)}}class fi{constructor(o,h){this.uniformNames=h.map(p=>`u_${p}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(o,h){this.pixelRatioFrom=h.pixelRatio,this.pixelRatioTo=o.pixelRatio,this.patternFrom=h.tlbr,this.patternTo=o.tlbr}setUniform(o,h,p,_){const x=_==="u_pattern_to"?this.patternTo:_==="u_pattern_from"?this.patternFrom:_==="u_pixel_ratio_to"?this.pixelRatioTo:_==="u_pixel_ratio_from"?this.pixelRatioFrom:null;x&&o.set(x)}getBinding(o,h,p){return p.substr(0,9)==="u_pattern"?new ra(o,h):new Ho(o,h)}}class Ar{constructor(o,h,p,_){this.expression=o,this.type=p,this.maxValue=0,this.paintVertexAttributes=h.map(x=>({name:`a_${x}`,type:"Float32",components:p==="color"?2:1,offset:0})),this.paintVertexArray=new _}populatePaintArray(o,h,p,_,x){const w=this.paintVertexArray.length,I=this.expression.evaluate(new br(0),h,{},_,[],x);this.paintVertexArray.resize(o),this._setPaintValue(w,o,I)}updatePaintArray(o,h,p,_){const x=this.expression.evaluate({zoom:0},p,_);this._setPaintValue(o,h,x)}_setPaintValue(o,h,p){if(this.type==="color"){const _=ul(p);for(let x=o;x`u_${I}_t`),this.type=p,this.useIntegerZoom=_,this.zoom=x,this.maxValue=0,this.paintVertexAttributes=h.map(I=>({name:`a_${I}`,type:"Float32",components:p==="color"?4:2,offset:0})),this.paintVertexArray=new w}populatePaintArray(o,h,p,_,x){const w=this.expression.evaluate(new br(this.zoom),h,{},_,[],x),I=this.expression.evaluate(new br(this.zoom+1),h,{},_,[],x),P=this.paintVertexArray.length;this.paintVertexArray.resize(o),this._setPaintValue(P,o,w,I)}updatePaintArray(o,h,p,_){const x=this.expression.evaluate({zoom:this.zoom},p,_),w=this.expression.evaluate({zoom:this.zoom+1},p,_);this._setPaintValue(o,h,x,w)}_setPaintValue(o,h,p,_){if(this.type==="color"){const x=ul(p),w=ul(_);for(let I=o;I`#define HAS_UNIFORM_${_}`))}return o}getBinderAttributes(){const o=[];for(const h in this.binders){const p=this.binders[h];if(p instanceof Ar||p instanceof xr)for(let _=0;_!0){this.programConfigurations={};for(const _ of o)this.programConfigurations[_.id]=new pi(_,h,p);this.needsUpload=!1,this._featureMap=new Jn,this._bufferOffset=0}populatePaintArrays(o,h,p,_,x,w){for(const I in this.programConfigurations)this.programConfigurations[I].populatePaintArrays(o,h,_,x,w);h.id!==void 0&&this._featureMap.add(h.id,p,this._bufferOffset,o),this._bufferOffset=o,this.needsUpload=!0}updatePaintArrays(o,h,p,_){for(const x of p)this.needsUpload=this.programConfigurations[x.id].updatePaintArrays(o,this._featureMap,h,x,_)||this.needsUpload}get(o){return this.programConfigurations[o]}upload(o){if(this.needsUpload){for(const h in this.programConfigurations)this.programConfigurations[h].upload(o);this.needsUpload=!1}}destroy(){for(const o in this.programConfigurations)this.programConfigurations[o].destroy()}}function ps(u,o){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[u]||[u.replace(`${o}-`,"").replace(/-/g,"_")]}function di(u,o,h){const p={color:{source:Oc,composite:Qh},number:{source:Kh,composite:Oc}},_=function(x){return{"line-pattern":{source:Ce,composite:Ce},"fill-pattern":{source:Ce,composite:Ce},"fill-extrusion-pattern":{source:Ce,composite:Ce}}[x]}(u);return _&&_[h]||p[o][h]}Ct("ConstantBinder",ia),Ct("CrossFadedConstantBinder",fi),Ct("SourceExpressionBinder",Ar),Ct("CrossFadedCompositeBinder",fs),Ct("CompositeExpressionBinder",xr),Ct("ProgramConfiguration",pi,{omit:["_buffers"]}),Ct("ProgramConfigurationSet",kr);const Zr=8192,$p=Math.pow(2,14)-1,dg=-$p-1;function Zl(u){const o=Zr/u.extent,h=u.loadGeometry();for(let p=0;pw.x+1||Pw.y+1)&&Ke("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return h}function Xl(u,o){return{type:u.type,id:u.id,properties:u.properties,geometry:o?Zl(u):[]}}function ef(u,o,h,p,_){u.emplaceBack(2*o+(p+1)/2,2*h+(_+1)/2)}class cl{constructor(o){this.zoom=o.zoom,this.overscaling=o.overscaling,this.layers=o.layers,this.layerIds=this.layers.map(h=>h.id),this.index=o.index,this.hasPattern=!1,this.layoutVertexArray=new $,this.indexArray=new $e,this.segments=new pt,this.programConfigurations=new kr(o.layers,o.zoom),this.stateDependentLayerIds=this.layers.filter(h=>h.isStateDependent()).map(h=>h.id)}populate(o,h,p){const _=this.layers[0],x=[];let w=null,I=!1;_.type==="circle"&&(w=_.layout.get("circle-sort-key"),I=!w.isConstant());for(const{feature:P,id:D,index:O,sourceLayerIndex:B}of o){const W=this.layers[0]._featureFilter.needGeometry,X=Xl(P,W);if(!this.layers[0]._featureFilter.filter(new br(this.zoom),X,p))continue;const K=I?w.evaluate(X,{},p):void 0,ie={id:D,properties:P.properties,type:P.type,sourceLayerIndex:B,index:O,geometry:W?X.geometry:Zl(P),patterns:{},sortKey:K};x.push(ie)}I&&x.sort((P,D)=>P.sortKey-D.sortKey);for(const P of x){const{geometry:D,index:O,sourceLayerIndex:B}=P,W=o[O].feature;this.addFeature(P,D,O,p),h.featureIndex.insert(W,D,O,B,this.index)}}update(o,h,p){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(o,h,this.stateDependentLayers,p)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(o){this.uploaded||(this.layoutVertexBuffer=o.createVertexBuffer(this.layoutVertexArray,ct),this.indexBuffer=o.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(o),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(o,h,p,_){for(const x of h)for(const w of x){const I=w.x,P=w.y;if(I<0||I>=Zr||P<0||P>=Zr)continue;const D=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,o.sortKey),O=D.vertexLength;ef(this.layoutVertexArray,I,P,-1,-1),ef(this.layoutVertexArray,I,P,1,-1),ef(this.layoutVertexArray,I,P,1,1),ef(this.layoutVertexArray,I,P,-1,1),this.indexArray.emplaceBack(O,O+1,O+2),this.indexArray.emplaceBack(O,O+3,O+2),D.vertexLength+=4,D.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,o,p,{},_)}}function Kp(u,o){for(let h=0;h1){if(tf(u,o))return!0;for(let p=0;p1?h:h.sub(o)._mult(_)._add(o))}function yb(u,o){let h,p,_,x=!1;for(let w=0;wo.y!=_.y>o.y&&o.x<(_.x-p.x)*(o.y-p.y)/(_.y-p.y)+p.x&&(x=!x)}return x}function nf(u,o){let h=!1;for(let p=0,_=u.length-1;po.y!=w.y>o.y&&o.x<(w.x-x.x)*(o.y-x.y)/(w.y-x.y)+x.x&&(h=!h)}return h}function WT(u,o,h){const p=h[0],_=h[2];if(u.x_.x&&o.x>_.x||u.y_.y&&o.y>_.y)return!1;const x=Le(u,o,h[0]);return x!==Le(u,o,h[1])||x!==Le(u,o,h[2])||x!==Le(u,o,h[3])}function td(u,o,h){const p=o.paint.get(u).value;return p.kind==="constant"?p.value:h.programConfigurations.get(o.id).getMaxValue(u)}function gg(u){return Math.sqrt(u[0]*u[0]+u[1]*u[1])}function _g(u,o,h,p,_){if(!o[0]&&!o[1])return u;const x=E.convert(o)._mult(_);h==="viewport"&&x._rotate(-p);const w=[];for(let I=0;Iwb(de,ie))}(D,P),X=B?O*I:O;for(const K of _)for(const ie of K){const de=B?ie:wb(ie,P);let we=X;const Oe=yg([],[ie.x,ie.y,0,1],P);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?we*=Oe[3]/w.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(we*=w.cameraToCenterDistance/Oe[3]),mg(W,de,we))return!0}return!1}}function wb(u,o){const h=yg([],[u.x,u.y,0,1],o);return new E(h[0]/h[3],h[1]/h[3])}class Sb extends cl{}let Eb;Ct("HeatmapBucket",Sb,{omit:["layers"]});var YT={get paint(){return Eb=Eb||new Co({"heatmap-radius":new qt(Re.paint_heatmap["heatmap-radius"]),"heatmap-weight":new qt(Re.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new Nt(Re.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Up(Re.paint_heatmap["heatmap-color"]),"heatmap-opacity":new Nt(Re.paint_heatmap["heatmap-opacity"])})}};function Ky(u,{width:o,height:h},p,_){if(_){if(_ instanceof Uint8ClampedArray)_=new Uint8Array(_.buffer);else if(_.length!==o*h*p)throw new RangeError(`mismatched image size. expected: ${_.length} but got: ${o*h*p}`)}else _=new Uint8Array(o*h*p);return u.width=o,u.height=h,u.data=_,u}function Ib(u,{width:o,height:h},p){if(o===u.width&&h===u.height)return;const _=Ky({},{width:o,height:h},p);Jy(u,_,{x:0,y:0},{x:0,y:0},{width:Math.min(u.width,o),height:Math.min(u.height,h)},p),u.width=o,u.height=h,u.data=_.data}function Jy(u,o,h,p,_,x){if(_.width===0||_.height===0)return o;if(_.width>u.width||_.height>u.height||h.x>u.width-_.width||h.y>u.height-_.height)throw new RangeError("out of range source coordinates for image copy");if(_.width>o.width||_.height>o.height||p.x>o.width-_.width||p.y>o.height-_.height)throw new RangeError("out of range destination coordinates for image copy");const w=u.data,I=o.data;if(w===I)throw new Error("srcData equals dstData, so image is already copied");for(let P=0;P<_.height;P++){const D=((h.y+P)*u.width+h.x)*x,O=((p.y+P)*o.width+p.x)*x;for(let B=0;B<_.width*x;B++)I[O+B]=w[D+B]}return o}class rd{constructor(o,h){Ky(this,o,1,h)}resize(o){Ib(this,o,1)}clone(){return new rd({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(o,h,p,_,x){Jy(o,h,p,_,x,1)}}class ks{constructor(o,h){Ky(this,o,4,h)}resize(o){Ib(this,o,4)}replace(o,h){h?this.data.set(o):this.data=o instanceof Uint8ClampedArray?new Uint8Array(o.buffer):o}clone(){return new ks({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(o,h,p,_,x){Jy(o,h,p,_,x,4)}}function Cb(u){const o={},h=u.resolution||256,p=u.clips?u.clips.length:1,_=u.image||new ks({width:h,height:p});if(Math.log(h)/Math.LN2%1!=0)throw new Error(`width is not a power of 2 - ${h}`);const x=(w,I,P)=>{o[u.evaluationKey]=P;const D=u.expression.evaluate(o);_.data[w+I+0]=Math.floor(255*D.r/D.a),_.data[w+I+1]=Math.floor(255*D.g/D.a),_.data[w+I+2]=Math.floor(255*D.b/D.a),_.data[w+I+3]=Math.floor(255*D.a)};if(u.clips)for(let w=0,I=0;w80*h){p=x=u[0],_=w=u[1];for(var K=h;Kx&&(x=I),P>w&&(w=P);D=(D=Math.max(x-p,w-_))!==0?32767/D:0}return id(W,X,h,p,_,D,0),X}function Lb(u,o,h,p,_){var x,w;if(_===n0(u,o,h,p)>0)for(x=o;x=o;x-=p)w=Ab(x,u[x],u[x+1],w);return w&&bg(w,w.next)&&(sd(w),w=w.next),w}function Vc(u,o){if(!u)return u;o||(o=u);var h,p=u;do if(h=!1,p.steiner||!bg(p,p.next)&&ti(p.prev,p,p.next)!==0)p=p.next;else{if(sd(p),(p=o=p.prev)===p.next)break;h=!0}while(h||p!==o);return o}function id(u,o,h,p,_,x,w){if(u){!w&&x&&function(O,B,W,X){var K=O;do K.z===0&&(K.z=e0(K.x,K.y,B,W,X)),K.prevZ=K.prev,K.nextZ=K.next,K=K.next;while(K!==O);K.prevZ.nextZ=null,K.prevZ=null,function(ie){var de,we,Oe,Ee,ke,Qe,et,St,kt=1;do{for(we=ie,ie=null,ke=null,Qe=0;we;){for(Qe++,Oe=we,et=0,de=0;de0||St>0&&Oe;)et!==0&&(St===0||!Oe||we.z<=Oe.z)?(Ee=we,we=we.nextZ,et--):(Ee=Oe,Oe=Oe.nextZ,St--),ke?ke.nextZ=Ee:ie=Ee,Ee.prevZ=ke,ke=Ee;we=Oe}ke.nextZ=null,kt*=2}while(Qe>1)}(K)}(u,p,_,x);for(var I,P,D=u;u.prev!==u.next;)if(I=u.prev,P=u.next,x?nL(u,p,_,x):tL(u))o.push(I.i/h|0),o.push(u.i/h|0),o.push(P.i/h|0),sd(u),u=P.next,D=P.next;else if((u=P)===D){w?w===1?id(u=rL(Vc(u),o,h),o,h,p,_,x,2):w===2&&iL(u,o,h,p,_,x):id(Vc(u),o,h,p,_,x,1);break}}}function tL(u){var o=u.prev,h=u,p=u.next;if(ti(o,h,p)>=0)return!1;for(var _=o.x,x=h.x,w=p.x,I=o.y,P=h.y,D=p.y,O=_x?_>w?_:w:x>w?x:w,X=I>P?I>D?I:D:P>D?P:D,K=p.next;K!==o;){if(K.x>=O&&K.x<=W&&K.y>=B&&K.y<=X&&of(_,I,x,P,w,D,K.x,K.y)&&ti(K.prev,K,K.next)>=0)return!1;K=K.next}return!0}function nL(u,o,h,p){var _=u.prev,x=u,w=u.next;if(ti(_,x,w)>=0)return!1;for(var I=_.x,P=x.x,D=w.x,O=_.y,B=x.y,W=w.y,X=IP?I>D?I:D:P>D?P:D,de=O>B?O>W?O:W:B>W?B:W,we=e0(X,K,o,h,p),Oe=e0(ie,de,o,h,p),Ee=u.prevZ,ke=u.nextZ;Ee&&Ee.z>=we&&ke&&ke.z<=Oe;){if(Ee.x>=X&&Ee.x<=ie&&Ee.y>=K&&Ee.y<=de&&Ee!==_&&Ee!==w&&of(I,O,P,B,D,W,Ee.x,Ee.y)&&ti(Ee.prev,Ee,Ee.next)>=0||(Ee=Ee.prevZ,ke.x>=X&&ke.x<=ie&&ke.y>=K&&ke.y<=de&&ke!==_&&ke!==w&&of(I,O,P,B,D,W,ke.x,ke.y)&&ti(ke.prev,ke,ke.next)>=0))return!1;ke=ke.nextZ}for(;Ee&&Ee.z>=we;){if(Ee.x>=X&&Ee.x<=ie&&Ee.y>=K&&Ee.y<=de&&Ee!==_&&Ee!==w&&of(I,O,P,B,D,W,Ee.x,Ee.y)&&ti(Ee.prev,Ee,Ee.next)>=0)return!1;Ee=Ee.prevZ}for(;ke&&ke.z<=Oe;){if(ke.x>=X&&ke.x<=ie&&ke.y>=K&&ke.y<=de&&ke!==_&&ke!==w&&of(I,O,P,B,D,W,ke.x,ke.y)&&ti(ke.prev,ke,ke.next)>=0)return!1;ke=ke.nextZ}return!0}function rL(u,o,h){var p=u;do{var _=p.prev,x=p.next.next;!bg(_,x)&&Pb(_,p,p.next,x)&&od(_,x)&&od(x,_)&&(o.push(_.i/h|0),o.push(p.i/h|0),o.push(x.i/h|0),sd(p),sd(p.next),p=u=x),p=p.next}while(p!==u);return Vc(p)}function iL(u,o,h,p,_,x){var w=u;do{for(var I=w.next.next;I!==w.prev;){if(w.i!==I.i&&uL(w,I)){var P=Mb(w,I);return w=Vc(w,w.next),P=Vc(P,P.next),id(w,o,h,p,_,x,0),void id(P,o,h,p,_,x,0)}I=I.next}w=w.next}while(w!==u)}function oL(u,o){return u.x-o.x}function sL(u,o){var h=function(_,x){var w,I=x,P=_.x,D=_.y,O=-1/0;do{if(D<=I.y&&D>=I.next.y&&I.next.y!==I.y){var B=I.x+(D-I.y)*(I.next.x-I.x)/(I.next.y-I.y);if(B<=P&&B>O&&(O=B,w=I.x=I.x&&I.x>=K&&P!==I.x&&of(Dw.x||I.x===w.x&&aL(w,I)))&&(w=I,de=W)),I=I.next;while(I!==X);return w}(u,o);if(!h)return o;var p=Mb(h,u);return Vc(p,p.next),Vc(h,h.next)}function aL(u,o){return ti(u.prev,u,o.prev)<0&&ti(o.next,u,u.next)<0}function e0(u,o,h,p,_){return(u=1431655765&((u=858993459&((u=252645135&((u=16711935&((u=(u-h)*_|0)|u<<8))|u<<4))|u<<2))|u<<1))|(o=1431655765&((o=858993459&((o=252645135&((o=16711935&((o=(o-p)*_|0)|o<<8))|o<<4))|o<<2))|o<<1))<<1}function lL(u){var o=u,h=u;do(o.x=(u-w)*(x-I)&&(u-w)*(p-I)>=(h-w)*(o-I)&&(h-w)*(x-I)>=(_-w)*(p-I)}function uL(u,o){return u.next.i!==o.i&&u.prev.i!==o.i&&!function(h,p){var _=h;do{if(_.i!==h.i&&_.next.i!==h.i&&_.i!==p.i&&_.next.i!==p.i&&Pb(_,_.next,h,p))return!0;_=_.next}while(_!==h);return!1}(u,o)&&(od(u,o)&&od(o,u)&&function(h,p){var _=h,x=!1,w=(h.x+p.x)/2,I=(h.y+p.y)/2;do _.y>I!=_.next.y>I&&_.next.y!==_.y&&w<(_.next.x-_.x)*(I-_.y)/(_.next.y-_.y)+_.x&&(x=!x),_=_.next;while(_!==h);return x}(u,o)&&(ti(u.prev,u,o.prev)||ti(u,o.prev,o))||bg(u,o)&&ti(u.prev,u,u.next)>0&&ti(o.prev,o,o.next)>0)}function ti(u,o,h){return(o.y-u.y)*(h.x-o.x)-(o.x-u.x)*(h.y-o.y)}function bg(u,o){return u.x===o.x&&u.y===o.y}function Pb(u,o,h,p){var _=wg(ti(u,o,h)),x=wg(ti(u,o,p)),w=wg(ti(h,p,u)),I=wg(ti(h,p,o));return _!==x&&w!==I||!(_!==0||!xg(u,h,o))||!(x!==0||!xg(u,p,o))||!(w!==0||!xg(h,u,p))||!(I!==0||!xg(h,o,p))}function xg(u,o,h){return o.x<=Math.max(u.x,h.x)&&o.x>=Math.min(u.x,h.x)&&o.y<=Math.max(u.y,h.y)&&o.y>=Math.min(u.y,h.y)}function wg(u){return u>0?1:u<0?-1:0}function od(u,o){return ti(u.prev,u,u.next)<0?ti(u,o,u.next)>=0&&ti(u,u.prev,o)>=0:ti(u,o,u.prev)<0||ti(u,u.next,o)<0}function Mb(u,o){var h=new t0(u.i,u.x,u.y),p=new t0(o.i,o.x,o.y),_=u.next,x=o.prev;return u.next=o,o.prev=u,h.next=_,_.prev=h,p.next=h,h.prev=p,x.next=p,p.prev=x,p}function Ab(u,o,h,p){var _=new t0(u,o,h);return p?(_.next=p.next,_.prev=p,p.next.prev=_,p.next=_):(_.prev=_,_.next=_),_}function sd(u){u.next.prev=u.prev,u.prev.next=u.next,u.prevZ&&(u.prevZ.nextZ=u.nextZ),u.nextZ&&(u.nextZ.prevZ=u.prevZ)}function t0(u,o,h){this.i=u,this.x=o,this.y=h,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function n0(u,o,h,p){for(var _=0,x=o,w=h-p;x0&&h.holes.push(p+=u[_-1].length)}return h};var kb=d(Qy.exports);function cL(u,o,h,p,_){Db(u,o,h||0,p||u.length-1,_||hL)}function Db(u,o,h,p,_){for(;p>h;){if(p-h>600){var x=p-h+1,w=o-h+1,I=Math.log(x),P=.5*Math.exp(2*I/3),D=.5*Math.sqrt(I*P*(x-P)/x)*(w-x/2<0?-1:1);Db(u,o,Math.max(h,Math.floor(o-w*P/x+D)),Math.min(p,Math.floor(o+(x-w)*P/x+D)),_)}var O=u[o],B=h,W=p;for(ad(u,h,o),_(u[p],O)>0&&ad(u,h,p);B0;)W--}_(u[h],O)===0?ad(u,h,W):ad(u,++W,p),W<=o&&(h=W+1),o<=W&&(p=W-1)}}function ad(u,o,h){var p=u[o];u[o]=u[h],u[h]=p}function hL(u,o){return uo?1:0}function r0(u,o){const h=u.length;if(h<=1)return[u];const p=[];let _,x;for(let w=0;w1)for(let w=0;wh.id),this.index=o.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new he,this.indexArray=new $e,this.indexArray2=new rt,this.programConfigurations=new kr(o.layers,o.zoom),this.segments=new pt,this.segments2=new pt,this.stateDependentLayerIds=this.layers.filter(h=>h.isStateDependent()).map(h=>h.id)}populate(o,h,p){this.hasPattern=i0("fill",this.layers,h);const _=this.layers[0].layout.get("fill-sort-key"),x=!_.isConstant(),w=[];for(const{feature:I,id:P,index:D,sourceLayerIndex:O}of o){const B=this.layers[0]._featureFilter.needGeometry,W=Xl(I,B);if(!this.layers[0]._featureFilter.filter(new br(this.zoom),W,p))continue;const X=x?_.evaluate(W,{},p,h.availableImages):void 0,K={id:P,properties:I.properties,type:I.type,sourceLayerIndex:O,index:D,geometry:B?W.geometry:Zl(I),patterns:{},sortKey:X};w.push(K)}x&&w.sort((I,P)=>I.sortKey-P.sortKey);for(const I of w){const{geometry:P,index:D,sourceLayerIndex:O}=I;if(this.hasPattern){const B=o0("fill",this.layers,I,this.zoom,h);this.patternFeatures.push(B)}else this.addFeature(I,P,D,p,{});h.featureIndex.insert(o[D].feature,P,D,O,this.index)}}update(o,h,p){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(o,h,this.stateDependentLayers,p)}addFeatures(o,h,p){for(const _ of this.patternFeatures)this.addFeature(_,_.geometry,_.index,h,p)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(o){this.uploaded||(this.layoutVertexBuffer=o.createVertexBuffer(this.layoutVertexArray,eL),this.indexBuffer=o.createIndexBuffer(this.indexArray),this.indexBuffer2=o.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(o),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(o,h,p,_,x){for(const w of r0(h,500)){let I=0;for(const X of w)I+=X.length;const P=this.segments.prepareSegment(I,this.layoutVertexArray,this.indexArray),D=P.vertexLength,O=[],B=[];for(const X of w){if(X.length===0)continue;X!==w[0]&&B.push(O.length/2);const K=this.segments2.prepareSegment(X.length,this.layoutVertexArray,this.indexArray2),ie=K.vertexLength;this.layoutVertexArray.emplaceBack(X[0].x,X[0].y),this.indexArray2.emplaceBack(ie+X.length-1,ie),O.push(X[0].x),O.push(X[0].y);for(let de=1;de>3}if(_--,p===1||p===2)x+=u.readSVarint(),w+=u.readSVarint(),p===1&&(o&&I.push(o),o=[]),o.push(new yL(x,w));else{if(p!==7)throw new Error("unknown command "+p);o&&o.push(o[0].clone())}}return o&&I.push(o),I},sf.prototype.bbox=function(){var u=this._pbf;u.pos=this._geometry;for(var o=u.readVarint()+u.pos,h=1,p=0,_=0,x=0,w=1/0,I=-1/0,P=1/0,D=-1/0;u.pos>3}if(p--,h===1||h===2)(_+=u.readSVarint())I&&(I=_),(x+=u.readSVarint())D&&(D=x);else if(h!==7)throw new Error("unknown command "+h)}return[w,P,I,D]},sf.prototype.toGeoJSON=function(u,o,h){var p,_,x=this.extent*Math.pow(2,h),w=this.extent*u,I=this.extent*o,P=this.loadGeometry(),D=sf.types[this.type];function O(X){for(var K=0;K>3;_=w===1?p.readString():w===2?p.readFloat():w===3?p.readDouble():w===4?p.readVarint64():w===5?p.readVarint():w===6?p.readSVarint():w===7?p.readBoolean():null}return _}(h))}Fb.prototype.feature=function(u){if(u<0||u>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[u];var o=this._pbf.readVarint()+this._pbf.pos;return new xL(this._pbf,o,this.extent,this._keys,this._values)};var SL=zb;function EL(u,o,h){if(u===3){var p=new SL(h,h.readVarint()+h.pos);p.length&&(o[p.name]=p)}}Ru.VectorTile=function(u,o){this.layers=u.readFields(EL,{},o)},Ru.VectorTileFeature=Ob,Ru.VectorTileLayer=zb;const IL=Ru.VectorTileFeature.types,a0=Math.pow(2,13);function ld(u,o,h,p,_,x,w,I){u.emplaceBack(o,h,2*Math.floor(p*a0)+w,_*a0*2,x*a0*2,Math.round(I))}class l0{constructor(o){this.zoom=o.zoom,this.overscaling=o.overscaling,this.layers=o.layers,this.layerIds=this.layers.map(h=>h.id),this.index=o.index,this.hasPattern=!1,this.layoutVertexArray=new ce,this.centroidVertexArray=new j,this.indexArray=new $e,this.programConfigurations=new kr(o.layers,o.zoom),this.segments=new pt,this.stateDependentLayerIds=this.layers.filter(h=>h.isStateDependent()).map(h=>h.id)}populate(o,h,p){this.features=[],this.hasPattern=i0("fill-extrusion",this.layers,h);for(const{feature:_,id:x,index:w,sourceLayerIndex:I}of o){const P=this.layers[0]._featureFilter.needGeometry,D=Xl(_,P);if(!this.layers[0]._featureFilter.filter(new br(this.zoom),D,p))continue;const O={id:x,sourceLayerIndex:I,index:w,geometry:P?D.geometry:Zl(_),properties:_.properties,type:_.type,patterns:{}};this.hasPattern?this.features.push(o0("fill-extrusion",this.layers,O,this.zoom,h)):this.addFeature(O,O.geometry,w,p,{}),h.featureIndex.insert(_,O.geometry,w,I,this.index,!0)}}addFeatures(o,h,p){for(const _ of this.features){const{geometry:x}=_;this.addFeature(_,x,_.index,h,p)}}update(o,h,p){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(o,h,this.stateDependentLayers,p)}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(o){this.uploaded||(this.layoutVertexBuffer=o.createVertexBuffer(this.layoutVertexArray,_L),this.centroidVertexBuffer=o.createVertexBuffer(this.centroidVertexArray,gL.members,!0),this.indexBuffer=o.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(o),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(o,h,p,_,x){const w={x:0,y:0,vertexCount:0};for(const I of r0(h,500)){let P=0;for(const K of I)P+=K.length;let D=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(const K of I){if(K.length===0||TL(K))continue;let ie=0;for(let de=0;de=1){const Oe=K[de-1];if(!CL(we,Oe)){D.vertexLength+4>pt.MAX_VERTEX_ARRAY_LENGTH&&(D=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));const Ee=we.sub(Oe)._perp()._unit(),ke=Oe.dist(we);ie+ke>32768&&(ie=0),ld(this.layoutVertexArray,we.x,we.y,Ee.x,Ee.y,0,0,ie),ld(this.layoutVertexArray,we.x,we.y,Ee.x,Ee.y,0,1,ie),w.x+=2*we.x,w.y+=2*we.y,w.vertexCount+=2,ie+=ke,ld(this.layoutVertexArray,Oe.x,Oe.y,Ee.x,Ee.y,0,0,ie),ld(this.layoutVertexArray,Oe.x,Oe.y,Ee.x,Ee.y,0,1,ie),w.x+=2*Oe.x,w.y+=2*Oe.y,w.vertexCount+=2;const Qe=D.vertexLength;this.indexArray.emplaceBack(Qe,Qe+2,Qe+1),this.indexArray.emplaceBack(Qe+1,Qe+2,Qe+3),D.vertexLength+=4,D.primitiveLength+=2}}}}if(D.vertexLength+P>pt.MAX_VERTEX_ARRAY_LENGTH&&(D=this.segments.prepareSegment(P,this.layoutVertexArray,this.indexArray)),IL[o.type]!=="Polygon")continue;const O=[],B=[],W=D.vertexLength;for(const K of I)if(K.length!==0){K!==I[0]&&B.push(O.length/2);for(let ie=0;ieZr)||u.y===o.y&&(u.y<0||u.y>Zr)}function TL(u){return u.every(o=>o.x<0)||u.every(o=>o.x>Zr)||u.every(o=>o.y<0)||u.every(o=>o.y>Zr)}let Bb;Ct("FillExtrusionBucket",l0,{omit:["layers","features"]});var LL={get paint(){return Bb=Bb||new Co({"fill-extrusion-opacity":new Nt(Re["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new qt(Re["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Nt(Re["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Nt(Re["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Hh(Re["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new qt(Re["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new qt(Re["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Nt(Re["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class PL extends As{constructor(o){super(o,LL)}createBucket(o){return new l0(o)}queryRadius(){return gg(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(o,h,p,_,x,w,I,P){const D=_g(o,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),w.angle,I),O=this.paint.get("fill-extrusion-height").evaluate(h,p),B=this.paint.get("fill-extrusion-base").evaluate(h,p),W=function(K,ie,de,we){const Oe=[];for(const Ee of K){const ke=[Ee.x,Ee.y,0,1];yg(ke,ke,ie),Oe.push(new E(ke[0]/ke[3],ke[1]/ke[3]))}return Oe}(D,P),X=function(K,ie,de,we){const Oe=[],Ee=[],ke=we[8]*ie,Qe=we[9]*ie,et=we[10]*ie,St=we[11]*ie,kt=we[8]*de,wt=we[9]*de,bt=we[10]*de,ht=we[11]*de;for(const Tt of K){const _t=[],it=[];for(const jt of Tt){const Rt=jt.x,Sn=jt.y,gr=we[0]*Rt+we[4]*Sn+we[12],wr=we[1]*Rt+we[5]*Sn+we[13],xi=we[2]*Rt+we[6]*Sn+we[14],ds=we[3]*Rt+we[7]*Sn+we[15],Lo=xi+et,mi=ds+St,Bi=gr+kt,Yi=wr+wt,Po=xi+bt,Mo=ds+ht,wi=new E((gr+ke)/mi,(wr+Qe)/mi);wi.z=Lo/mi,_t.push(wi);const Si=new E(Bi/Mo,Yi/Mo);Si.z=Po/Mo,it.push(Si)}Oe.push(_t),Ee.push(it)}return[Oe,Ee]}(_,B,O,P);return function(K,ie,de){let we=1/0;Jp(de,ie)&&(we=Vb(de,ie[0]));for(let Oe=0;Oeh.id),this.index=o.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(h=>{this.gradients[h.id]={}}),this.layoutVertexArray=new ge,this.layoutVertexArray2=new re,this.indexArray=new $e,this.programConfigurations=new kr(o.layers,o.zoom),this.segments=new pt,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(h=>h.isStateDependent()).map(h=>h.id)}populate(o,h,p){this.hasPattern=i0("line",this.layers,h);const _=this.layers[0].layout.get("line-sort-key"),x=!_.isConstant(),w=[];for(const{feature:I,id:P,index:D,sourceLayerIndex:O}of o){const B=this.layers[0]._featureFilter.needGeometry,W=Xl(I,B);if(!this.layers[0]._featureFilter.filter(new br(this.zoom),W,p))continue;const X=x?_.evaluate(W,{},p):void 0,K={id:P,properties:I.properties,type:I.type,sourceLayerIndex:O,index:D,geometry:B?W.geometry:Zl(I),patterns:{},sortKey:X};w.push(K)}x&&w.sort((I,P)=>I.sortKey-P.sortKey);for(const I of w){const{geometry:P,index:D,sourceLayerIndex:O}=I;if(this.hasPattern){const B=o0("line",this.layers,I,this.zoom,h);this.patternFeatures.push(B)}else this.addFeature(I,P,D,p,{});h.featureIndex.insert(o[D].feature,P,D,O,this.index)}}update(o,h,p){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(o,h,this.stateDependentLayers,p)}addFeatures(o,h,p){for(const _ of this.patternFeatures)this.addFeature(_,_.geometry,_.index,h,p)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(o){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=o.createVertexBuffer(this.layoutVertexArray2,DL)),this.layoutVertexBuffer=o.createVertexBuffer(this.layoutVertexArray,AL),this.indexBuffer=o.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(o),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(o){if(o.properties&&Object.prototype.hasOwnProperty.call(o.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(o.properties,"mapbox_clip_end"))return{start:+o.properties.mapbox_clip_start,end:+o.properties.mapbox_clip_end}}addFeature(o,h,p,_,x){const w=this.layers[0].layout,I=w.get("line-join").evaluate(o,{}),P=w.get("line-cap"),D=w.get("line-miter-limit"),O=w.get("line-round-limit");this.lineClips=this.lineFeatureClips(o);for(const B of h)this.addLine(B,o,I,P,D,O);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,o,p,x,_)}addLine(o,h,p,_,x,w){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let we=0;we=2&&o[P-1].equals(o[P-2]);)P--;let D=0;for(;D0;if(St&&we>D){const ht=W.dist(X);if(ht>2*O){const Tt=W.sub(W.sub(X)._mult(O/ht)._round());this.updateDistance(X,Tt),this.addCurrentVertex(Tt,ie,0,0,B),X=Tt}}const wt=X&&K;let bt=wt?p:I?"butt":_;if(wt&&bt==="round"&&(Qex&&(bt="bevel"),bt==="bevel"&&(Qe>2&&(bt="flipbevel"),Qe100)Oe=de.mult(-1);else{const ht=Qe*ie.add(de).mag()/ie.sub(de).mag();Oe._perp()._mult(ht*(kt?-1:1))}this.addCurrentVertex(W,Oe,0,0,B),this.addCurrentVertex(W,Oe.mult(-1),0,0,B)}else if(bt==="bevel"||bt==="fakeround"){const ht=-Math.sqrt(Qe*Qe-1),Tt=kt?ht:0,_t=kt?0:ht;if(X&&this.addCurrentVertex(W,ie,Tt,_t,B),bt==="fakeround"){const it=Math.round(180*et/Math.PI/20);for(let jt=1;jt2*O){const Tt=W.add(K.sub(W)._mult(O/ht)._round());this.updateDistance(W,Tt),this.addCurrentVertex(Tt,de,0,0,B),W=Tt}}}}addCurrentVertex(o,h,p,_,x,w=!1){const I=h.y*_-h.x,P=-h.y-h.x*_;this.addHalfVertex(o,h.x+h.y*p,h.y-h.x*p,w,!1,p,x),this.addHalfVertex(o,I,P,w,!0,-_,x),this.distance>Ub/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(o,h,p,_,x,w))}addHalfVertex({x:o,y:h},p,_,x,w,I,P){const D=.5*(this.lineClips?this.scaledDistance*(Ub-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((o<<1)+(x?1:0),(h<<1)+(w?1:0),Math.round(63*p)+128,Math.round(63*_)+128,1+(I===0?0:I<0?-1:1)|(63&D)<<2,D>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);const O=P.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,O),P.primitiveLength++),w?this.e2=O:this.e1=O}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(o,h){this.distance+=o.dist(h),this.updateScaledDistance()}}let jb,Gb;Ct("LineBucket",u0,{omit:["layers","patternFeatures"]});var qb={get paint(){return Gb=Gb||new Co({"line-opacity":new qt(Re.paint_line["line-opacity"]),"line-color":new qt(Re.paint_line["line-color"]),"line-translate":new Nt(Re.paint_line["line-translate"]),"line-translate-anchor":new Nt(Re.paint_line["line-translate-anchor"]),"line-width":new qt(Re.paint_line["line-width"]),"line-gap-width":new qt(Re.paint_line["line-gap-width"]),"line-offset":new qt(Re.paint_line["line-offset"]),"line-blur":new qt(Re.paint_line["line-blur"]),"line-dasharray":new Dc(Re.paint_line["line-dasharray"]),"line-pattern":new Hh(Re.paint_line["line-pattern"]),"line-gradient":new Up(Re.paint_line["line-gradient"])})},get layout(){return jb=jb||new Co({"line-cap":new Nt(Re.layout_line["line-cap"]),"line-join":new qt(Re.layout_line["line-join"]),"line-miter-limit":new Nt(Re.layout_line["line-miter-limit"]),"line-round-limit":new Nt(Re.layout_line["line-round-limit"]),"line-sort-key":new qt(Re.layout_line["line-sort-key"])})}};class OL extends qt{possiblyEvaluate(o,h){return h=new br(Math.floor(h.zoom),{now:h.now,fadeDuration:h.fadeDuration,zoomHistory:h.zoomHistory,transition:h.transition}),super.possiblyEvaluate(o,h)}evaluate(o,h,p,_){return h=fe({},h,{zoom:Math.floor(h.zoom)}),super.evaluate(o,h,p,_)}}let Sg;class zL extends As{constructor(o){super(o,qb),this.gradientVersion=0,Sg||(Sg=new OL(qb.paint.properties["line-width"].specification),Sg.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(o){if(o==="line-gradient"){const h=this.gradientExpression();this.stepInterpolant=!!function(p){return p._styleExpression!==void 0}(h)&&h._styleExpression.expression instanceof Ic,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(o,h){super.recalculate(o,h),this.paint._values["line-floorwidth"]=Sg.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,o)}createBucket(o){return new u0(o)}queryRadius(o){const h=o,p=Wb(td("line-width",this,h),td("line-gap-width",this,h)),_=td("line-offset",this,h);return p/2+Math.abs(_)+gg(this.paint.get("line-translate"))}queryIntersectsFeature(o,h,p,_,x,w,I){const P=_g(o,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),w.angle,I),D=I/2*Wb(this.paint.get("line-width").evaluate(h,p),this.paint.get("line-gap-width").evaluate(h,p)),O=this.paint.get("line-offset").evaluate(h,p);return O&&(_=function(B,W){const X=[];for(let K=0;K=3){for(let de=0;de0?o+2*u:u}const FL=ei([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),BL=ei([{name:"a_projected_pos",components:3,type:"Float32"}],4);ei([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);const VL=ei([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}]);ei([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]);const Hb=ei([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),UL=ei([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function jL(u,o,h){return u.sections.forEach(p=>{p.text=function(_,x,w){const I=x.layout.get("text-transform").evaluate(w,{});return I==="uppercase"?_=_.toLocaleUpperCase():I==="lowercase"&&(_=_.toLocaleLowerCase()),al.applyArabicShaping&&(_=al.applyArabicShaping(_)),_}(p.text,o,h)}),u}ei([{name:"triangle",components:3,type:"Uint16"}]),ei([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),ei([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",name:"collisionCircleDiameter"},{type:"Uint16",name:"textAnchorOffsetStartIndex"},{type:"Uint16",name:"textAnchorOffsetEndIndex"}]),ei([{type:"Float32",name:"offsetX"}]),ei([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),ei([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);const cd={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};var bi=24,Zb=tr,Xb=function(u,o,h,p,_){var x,w,I=8*_-p-1,P=(1<>1,O=-7,B=h?_-1:0,W=h?-1:1,X=u[o+B];for(B+=W,x=X&(1<<-O)-1,X>>=-O,O+=I;O>0;x=256*x+u[o+B],B+=W,O-=8);for(w=x&(1<<-O)-1,x>>=-O,O+=p;O>0;w=256*w+u[o+B],B+=W,O-=8);if(x===0)x=1-D;else{if(x===P)return w?NaN:1/0*(X?-1:1);w+=Math.pow(2,p),x-=D}return(X?-1:1)*w*Math.pow(2,x-p)},Yb=function(u,o,h,p,_,x){var w,I,P,D=8*x-_-1,O=(1<>1,W=_===23?Math.pow(2,-24)-Math.pow(2,-77):0,X=p?0:x-1,K=p?1:-1,ie=o<0||o===0&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(I=isNaN(o)?1:0,w=O):(w=Math.floor(Math.log(o)/Math.LN2),o*(P=Math.pow(2,-w))<1&&(w--,P*=2),(o+=w+B>=1?W/P:W*Math.pow(2,1-B))*P>=2&&(w++,P/=2),w+B>=O?(I=0,w=O):w+B>=1?(I=(o*P-1)*Math.pow(2,_),w+=B):(I=o*Math.pow(2,B-1)*Math.pow(2,_),w=0));_>=8;u[h+X]=255&I,X+=K,I/=256,_-=8);for(w=w<<_|I,D+=_;D>0;u[h+X]=255&w,X+=K,w/=256,D-=8);u[h+X-K]|=128*ie};function tr(u){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(u)?u:new Uint8Array(u||0),this.pos=0,this.type=0,this.length=this.buf.length}tr.Varint=0,tr.Fixed64=1,tr.Bytes=2,tr.Fixed32=5;var c0=4294967296,$b=1/c0,Kb=typeof TextDecoder>"u"?null:new TextDecoder("utf8");function Yl(u){return u.type===tr.Bytes?u.readVarint()+u.pos:u.pos+1}function af(u,o,h){return h?4294967296*o+(u>>>0):4294967296*(o>>>0)+(u>>>0)}function Jb(u,o,h){var p=o<=16383?1:o<=2097151?2:o<=268435455?3:Math.floor(Math.log(o)/(7*Math.LN2));h.realloc(p);for(var _=h.pos-1;_>=u;_--)h.buf[_+p]=h.buf[_]}function GL(u,o){for(var h=0;h>>8,u[h+2]=o>>>16,u[h+3]=o>>>24}function Qb(u,o){return(u[o]|u[o+1]<<8|u[o+2]<<16)+(u[o+3]<<24)}tr.prototype={destroy:function(){this.buf=null},readFields:function(u,o,h){for(h=h||this.length;this.pos>3,x=this.pos;this.type=7&p,u(_,o,this),this.pos===x&&this.skip(p)}return o},readMessage:function(u,o){return this.readFields(u,o,this.readVarint()+this.pos)},readFixed32:function(){var u=Eg(this.buf,this.pos);return this.pos+=4,u},readSFixed32:function(){var u=Qb(this.buf,this.pos);return this.pos+=4,u},readFixed64:function(){var u=Eg(this.buf,this.pos)+Eg(this.buf,this.pos+4)*c0;return this.pos+=8,u},readSFixed64:function(){var u=Eg(this.buf,this.pos)+Qb(this.buf,this.pos+4)*c0;return this.pos+=8,u},readFloat:function(){var u=Xb(this.buf,this.pos,!0,23,4);return this.pos+=4,u},readDouble:function(){var u=Xb(this.buf,this.pos,!0,52,8);return this.pos+=8,u},readVarint:function(u){var o,h,p=this.buf;return o=127&(h=p[this.pos++]),h<128?o:(o|=(127&(h=p[this.pos++]))<<7,h<128?o:(o|=(127&(h=p[this.pos++]))<<14,h<128?o:(o|=(127&(h=p[this.pos++]))<<21,h<128?o:function(_,x,w){var I,P,D=w.buf;if(I=(112&(P=D[w.pos++]))>>4,P<128||(I|=(127&(P=D[w.pos++]))<<3,P<128)||(I|=(127&(P=D[w.pos++]))<<10,P<128)||(I|=(127&(P=D[w.pos++]))<<17,P<128)||(I|=(127&(P=D[w.pos++]))<<24,P<128)||(I|=(1&(P=D[w.pos++]))<<31,P<128))return af(_,I,x);throw new Error("Expected varint not more than 10 bytes")}(o|=(15&(h=p[this.pos]))<<28,u,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var u=this.readVarint();return u%2==1?(u+1)/-2:u/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var u=this.readVarint()+this.pos,o=this.pos;return this.pos=u,u-o>=12&&Kb?function(h,p,_){return Kb.decode(h.subarray(p,_))}(this.buf,o,u):function(h,p,_){for(var x="",w=p;w<_;){var I,P,D,O=h[w],B=null,W=O>239?4:O>223?3:O>191?2:1;if(w+W>_)break;W===1?O<128&&(B=O):W===2?(192&(I=h[w+1]))==128&&(B=(31&O)<<6|63&I)<=127&&(B=null):W===3?(P=h[w+2],(192&(I=h[w+1]))==128&&(192&P)==128&&((B=(15&O)<<12|(63&I)<<6|63&P)<=2047||B>=55296&&B<=57343)&&(B=null)):W===4&&(P=h[w+2],D=h[w+3],(192&(I=h[w+1]))==128&&(192&P)==128&&(192&D)==128&&((B=(15&O)<<18|(63&I)<<12|(63&P)<<6|63&D)<=65535||B>=1114112)&&(B=null)),B===null?(B=65533,W=1):B>65535&&(B-=65536,x+=String.fromCharCode(B>>>10&1023|55296),B=56320|1023&B),x+=String.fromCharCode(B),w+=W}return x}(this.buf,o,u)},readBytes:function(){var u=this.readVarint()+this.pos,o=this.buf.subarray(this.pos,u);return this.pos=u,o},readPackedVarint:function(u,o){if(this.type!==tr.Bytes)return u.push(this.readVarint(o));var h=Yl(this);for(u=u||[];this.pos127;);else if(o===tr.Bytes)this.pos=this.readVarint()+this.pos;else if(o===tr.Fixed32)this.pos+=4;else{if(o!==tr.Fixed64)throw new Error("Unimplemented type: "+o);this.pos+=8}},writeTag:function(u,o){this.writeVarint(u<<3|o)},realloc:function(u){for(var o=this.length||16;o268435455||u<0?function(o,h){var p,_;if(o>=0?(p=o%4294967296|0,_=o/4294967296|0):(_=~(-o/4294967296),4294967295^(p=~(-o%4294967296))?p=p+1|0:(p=0,_=_+1|0)),o>=18446744073709552e3||o<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");h.realloc(10),function(x,w,I){I.buf[I.pos++]=127&x|128,x>>>=7,I.buf[I.pos++]=127&x|128,x>>>=7,I.buf[I.pos++]=127&x|128,x>>>=7,I.buf[I.pos++]=127&x|128,I.buf[I.pos]=127&(x>>>=7)}(p,0,h),function(x,w){var I=(7&x)<<4;w.buf[w.pos++]|=I|((x>>>=3)?128:0),x&&(w.buf[w.pos++]=127&x|((x>>>=7)?128:0),x&&(w.buf[w.pos++]=127&x|((x>>>=7)?128:0),x&&(w.buf[w.pos++]=127&x|((x>>>=7)?128:0),x&&(w.buf[w.pos++]=127&x|((x>>>=7)?128:0),x&&(w.buf[w.pos++]=127&x)))))}(_,h)}(u,this):(this.realloc(4),this.buf[this.pos++]=127&u|(u>127?128:0),u<=127||(this.buf[this.pos++]=127&(u>>>=7)|(u>127?128:0),u<=127||(this.buf[this.pos++]=127&(u>>>=7)|(u>127?128:0),u<=127||(this.buf[this.pos++]=u>>>7&127))))},writeSVarint:function(u){this.writeVarint(u<0?2*-u-1:2*u)},writeBoolean:function(u){this.writeVarint(!!u)},writeString:function(u){u=String(u),this.realloc(4*u.length),this.pos++;var o=this.pos;this.pos=function(p,_,x){for(var w,I,P=0;P<_.length;P++){if((w=_.charCodeAt(P))>55295&&w<57344){if(!I){w>56319||P+1===_.length?(p[x++]=239,p[x++]=191,p[x++]=189):I=w;continue}if(w<56320){p[x++]=239,p[x++]=191,p[x++]=189,I=w;continue}w=I-55296<<10|w-56320|65536,I=null}else I&&(p[x++]=239,p[x++]=191,p[x++]=189,I=null);w<128?p[x++]=w:(w<2048?p[x++]=w>>6|192:(w<65536?p[x++]=w>>12|224:(p[x++]=w>>18|240,p[x++]=w>>12&63|128),p[x++]=w>>6&63|128),p[x++]=63&w|128)}return x}(this.buf,u,this.pos);var h=this.pos-o;h>=128&&Jb(o,h,this),this.pos=o-1,this.writeVarint(h),this.pos+=h},writeFloat:function(u){this.realloc(4),Yb(this.buf,u,this.pos,!0,23,4),this.pos+=4},writeDouble:function(u){this.realloc(8),Yb(this.buf,u,this.pos,!0,52,8),this.pos+=8},writeBytes:function(u){var o=u.length;this.writeVarint(o),this.realloc(o);for(var h=0;h=128&&Jb(h,p,this),this.pos=h-1,this.writeVarint(p),this.pos+=p},writeMessage:function(u,o,h){this.writeTag(u,tr.Bytes),this.writeRawMessage(o,h)},writePackedVarint:function(u,o){o.length&&this.writeMessage(u,GL,o)},writePackedSVarint:function(u,o){o.length&&this.writeMessage(u,qL,o)},writePackedBoolean:function(u,o){o.length&&this.writeMessage(u,ZL,o)},writePackedFloat:function(u,o){o.length&&this.writeMessage(u,WL,o)},writePackedDouble:function(u,o){o.length&&this.writeMessage(u,HL,o)},writePackedFixed32:function(u,o){o.length&&this.writeMessage(u,XL,o)},writePackedSFixed32:function(u,o){o.length&&this.writeMessage(u,YL,o)},writePackedFixed64:function(u,o){o.length&&this.writeMessage(u,$L,o)},writePackedSFixed64:function(u,o){o.length&&this.writeMessage(u,KL,o)},writeBytesField:function(u,o){this.writeTag(u,tr.Bytes),this.writeBytes(o)},writeFixed32Field:function(u,o){this.writeTag(u,tr.Fixed32),this.writeFixed32(o)},writeSFixed32Field:function(u,o){this.writeTag(u,tr.Fixed32),this.writeSFixed32(o)},writeFixed64Field:function(u,o){this.writeTag(u,tr.Fixed64),this.writeFixed64(o)},writeSFixed64Field:function(u,o){this.writeTag(u,tr.Fixed64),this.writeSFixed64(o)},writeVarintField:function(u,o){this.writeTag(u,tr.Varint),this.writeVarint(o)},writeSVarintField:function(u,o){this.writeTag(u,tr.Varint),this.writeSVarint(o)},writeStringField:function(u,o){this.writeTag(u,tr.Bytes),this.writeString(o)},writeFloatField:function(u,o){this.writeTag(u,tr.Fixed32),this.writeFloat(o)},writeDoubleField:function(u,o){this.writeTag(u,tr.Fixed64),this.writeDouble(o)},writeBooleanField:function(u,o){this.writeVarintField(u,!!o)}};var h0=d(Zb);const f0=3;function JL(u,o,h){u===1&&h.readMessage(QL,o)}function QL(u,o,h){if(u===3){const{id:p,bitmap:_,width:x,height:w,left:I,top:P,advance:D}=h.readMessage(eP,{});o.push({id:p,bitmap:new rd({width:x+2*f0,height:w+2*f0},_),metrics:{width:x,height:w,left:I,top:P,advance:D}})}}function eP(u,o,h){u===1?o.id=h.readVarint():u===2?o.bitmap=h.readBytes():u===3?o.width=h.readVarint():u===4?o.height=h.readVarint():u===5?o.left=h.readSVarint():u===6?o.top=h.readSVarint():u===7&&(o.advance=h.readVarint())}const ex=f0;function tx(u){let o=0,h=0;for(const w of u)o+=w.w*w.h,h=Math.max(h,w.w);u.sort((w,I)=>I.h-w.h);const p=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(o/.95)),h),h:1/0}];let _=0,x=0;for(const w of u)for(let I=p.length-1;I>=0;I--){const P=p[I];if(!(w.w>P.w||w.h>P.h)){if(w.x=P.x,w.y=P.y,x=Math.max(x,w.y+w.h),_=Math.max(_,w.x+w.w),w.w===P.w&&w.h===P.h){const D=p.pop();I=0&&p>=o&&Cg[this.text.charCodeAt(p)];p--)h--;this.text=this.text.substring(o,h),this.sectionIndex=this.sectionIndex.slice(o,h)}substring(o,h){const p=new uf;return p.text=this.text.substring(o,h),p.sectionIndex=this.sectionIndex.slice(o,h),p.sections=this.sections,p}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((o,h)=>Math.max(o,this.sections[h].scale),0)}addTextSection(o,h){this.text+=o.text,this.sections.push(fd.forText(o.scale,o.fontStack||h));const p=this.sections.length-1;for(let _=0;_=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function Ig(u,o,h,p,_,x,w,I,P,D,O,B,W,X,K,ie){const de=uf.fromFeature(u,_);let we;B===c.ah.vertical&&de.verticalizePunctuation();const{processBidirectionalText:Oe,processStyledBidirectionalText:Ee}=al;if(Oe&&de.sections.length===1){we=[];const et=Oe(de.toString(),d0(de,D,x,o,p,X,K));for(const St of et){const kt=new uf;kt.text=St,kt.sections=de.sections;for(let wt=0;wt0&&Kl>Xo&&(Xo=Kl)}else{const Rs=kt[Tn.fontStack],$o=Rs&&Rs[$i];if($o&&$o.rect)Ra=$o.rect,oa=$o.metrics;else{const Kl=St[Tn.fontStack],_d=Kl&&Kl[$i];if(!_d)continue;oa=_d.metrics}Ii=(Si-Tn.scale)*bi}sa?(et.verticalizable=!0,po.push({glyph:$i,imageName:Na,x:gr,y:wr+Ii,vertical:sa,scale:Tn.scale,fontStack:Tn.fontStack,sectionIndex:mo,metrics:oa,rect:Ra}),gr+=$l*Tn.scale+jt):(po.push({glyph:$i,imageName:Na,x:gr,y:wr+Ii,vertical:sa,scale:Tn.scale,fontStack:Tn.fontStack,sectionIndex:mo,metrics:oa,rect:Ra}),gr+=oa.advance*Tn.scale+jt)}po.length!==0&&(xi=Math.max(gr-jt,xi),rP(po,0,po.length-1,Lo,Xo)),gr=0;const Yo=ht*Si+Xo;Ao.lineOffset=Math.max(Xo,fo),wr+=Yo,ds=Math.max(Yo,ds),++mi}var Bi;const Yi=wr-hd,{horizontalAlign:Po,verticalAlign:Mo}=m0(Tt);(function(wi,Si,fo,Ao,po,Xo,Yo,Ei,Tn){const mo=(Si-fo)*po;let $i=0;$i=Xo!==Yo?-Ei*Ao-hd:(-Ao*Tn+.5)*Yo;for(const Ii of wi)for(const oa of Ii.positionedGlyphs)oa.x+=mo,oa.y+=$i})(et.positionedLines,Lo,Po,Mo,xi,ds,ht,Yi,bt.length),et.top+=-Mo*Yi,et.bottom=et.top+Yi,et.left+=-Po*xi,et.right=et.left+xi}(Qe,o,h,p,we,w,I,P,B,D,W,ie),!function(et){for(const St of et)if(St.positionedGlyphs.length!==0)return!1;return!0}(ke)&&Qe}const Cg={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},tP={10:!0,32:!0,38:!0,40:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0};function rx(u,o,h,p,_,x){if(o.imageName){const w=p[o.imageName];return w?w.displaySize[0]*o.scale*bi/x+_:0}{const w=h[o.fontStack],I=w&&w[u];return I?I.metrics.advance*o.scale+_:0}}function ix(u,o,h,p){const _=Math.pow(u-o,2);return p?u=0;let O=0;for(let W=0;Ww.id),this.index=o.index,this.pixelRatio=o.pixelRatio,this.sourceLayerIndex=o.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=$y([]),this.placementViewportMatrix=$y([]);const h=this.layers[0]._unevaluatedLayout._values;this.textSizeData=lx(this.zoom,h["text-size"]),this.iconSizeData=lx(this.zoom,h["icon-size"]);const p=this.layers[0].layout,_=p.get("symbol-sort-key"),x=p.get("symbol-z-order");this.canOverlap=g0(p,"text-overlap","text-allow-overlap")!=="never"||g0(p,"icon-overlap","icon-allow-overlap")!=="never"||p.get("text-ignore-placement")||p.get("icon-ignore-placement"),this.sortFeaturesByKey=x!=="viewport-y"&&!_.isConstant(),this.sortFeaturesByY=(x==="viewport-y"||x==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,p.get("symbol-placement")==="point"&&(this.writingModes=p.get("text-writing-mode").map(w=>c.ah[w])),this.stateDependentLayerIds=this.layers.filter(w=>w.isStateDependent()).map(w=>w.id),this.sourceID=o.sourceID}createArrays(){this.text=new y0(new kr(this.layers,this.zoom,o=>/^text/.test(o))),this.icon=new y0(new kr(this.layers,this.zoom,o=>/^icon/.test(o))),this.glyphOffsetArray=new b,this.lineVertexArray=new T,this.symbolInstances=new g,this.textAnchorOffsets=new k}calculateGlyphDependencies(o,h,p,_,x){for(let w=0;w0)&&(w.value.kind!=="constant"||w.value.value.length>0),O=P.value.kind!=="constant"||!!P.value.value||Object.keys(P.parameters).length>0,B=x.get("symbol-sort-key");if(this.features=[],!D&&!O)return;const W=h.iconDependencies,X=h.glyphDependencies,K=h.availableImages,ie=new br(this.zoom);for(const{feature:de,id:we,index:Oe,sourceLayerIndex:Ee}of o){const ke=_._featureFilter.needGeometry,Qe=Xl(de,ke);if(!_._featureFilter.filter(ie,Qe,p))continue;let et,St;if(ke||(Qe.geometry=Zl(de)),D){const wt=_.getValueAndResolveTokens("text-field",Qe,p,K),bt=jo.factory(wt),ht=this.hasRTLText=this.hasRTLText||aP(bt);(!ht||al.getRTLTextPluginStatus()==="unavailable"||ht&&al.isParsed())&&(et=jL(bt,_,Qe))}if(O){const wt=_.getValueAndResolveTokens("icon-image",Qe,p,K);St=wt instanceof hs?wt:hs.fromString(wt)}if(!et&&!St)continue;const kt=this.sortFeaturesByKey?B.evaluate(Qe,{},p):void 0;if(this.features.push({id:we,text:et,icon:St,index:Oe,sourceLayerIndex:Ee,geometry:Qe.geometry,properties:de.properties,type:oP[de.type],sortKey:kt}),St&&(W[St.name]=!0),et){const wt=w.evaluate(Qe,{},p).join(","),bt=x.get("text-rotation-alignment")!=="viewport"&&x.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(c.ah.vertical)>=0;for(const ht of et.sections)if(ht.image)W[ht.image.name]=!0;else{const Tt=ku(et.toString()),_t=ht.fontStack||wt,it=X[_t]=X[_t]||{};this.calculateGlyphDependencies(ht.text,it,bt,this.allowVerticalPlacement,Tt)}}}x.get("symbol-placement")==="line"&&(this.features=function(de){const we={},Oe={},Ee=[];let ke=0;function Qe(wt){Ee.push(de[wt]),ke++}function et(wt,bt,ht){const Tt=Oe[wt];return delete Oe[wt],Oe[bt]=Tt,Ee[Tt].geometry[0].pop(),Ee[Tt].geometry[0]=Ee[Tt].geometry[0].concat(ht[0]),Tt}function St(wt,bt,ht){const Tt=we[bt];return delete we[bt],we[wt]=Tt,Ee[Tt].geometry[0].shift(),Ee[Tt].geometry[0]=ht[0].concat(Ee[Tt].geometry[0]),Tt}function kt(wt,bt,ht){const Tt=ht?bt[0][bt[0].length-1]:bt[0][0];return`${wt}:${Tt.x}:${Tt.y}`}for(let wt=0;wtwt.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((de,we)=>de.sortKey-we.sortKey)}update(o,h,p){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(o,h,this.layers,p),this.icon.programConfigurations.updatePaintArrays(o,h,this.layers,p))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(o){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(o),this.iconCollisionBox.upload(o)),this.text.upload(o,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(o,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(o,h){const p=this.lineVertexArray.length;if(o.segment!==void 0){let _=o.dist(h[o.segment+1]),x=o.dist(h[o.segment]);const w={};for(let I=o.segment+1;I=0;I--)w[I]={x:h[I].x,y:h[I].y,tileUnitDistanceFromAnchor:x},I>0&&(x+=h[I-1].dist(h[I]));for(let I=0;I0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(o,h){const p=o.placedSymbolArray.get(h),_=p.vertexStartIndex+4*p.numGlyphs;for(let x=p.vertexStartIndex;x<_;x+=4)o.indexArray.emplaceBack(x,x+1,x+2),o.indexArray.emplaceBack(x+1,x+2,x+3)}getSortedSymbolIndexes(o){if(this.sortedAngle===o&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;const h=Math.sin(o),p=Math.cos(o),_=[],x=[],w=[];for(let I=0;I_[I]-_[P]||x[P]-x[I]),w}addToSortKeyRanges(o,h){const p=this.sortKeyRanges[this.sortKeyRanges.length-1];p&&p.sortKey===h?p.symbolInstanceEnd=o+1:this.sortKeyRanges.push({sortKey:h,symbolInstanceStart:o,symbolInstanceEnd:o+1})}sortFeatures(o){if(this.sortFeaturesByY&&this.sortedAngle!==o&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(o),this.sortedAngle=o,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(const h of this.symbolInstanceIndexes){const p=this.symbolInstances.get(h);this.featureSortOrder.push(p.featureIndex),[p.rightJustifiedTextSymbolIndex,p.centerJustifiedTextSymbolIndex,p.leftJustifiedTextSymbolIndex].forEach((_,x,w)=>{_>=0&&w.indexOf(_)===x&&this.addIndicesForPlacedSymbol(this.text,_)}),p.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,p.verticalPlacedTextSymbolIndex),p.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,p.placedIconSymbolIndex),p.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,p.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let ux,cx;Ct("SymbolBucket",cf,{omit:["layers","collisionBoxArray","features","compareText"]}),cf.MAX_GLYPHS=65535,cf.addDynamicAttributes=_0;var b0={get paint(){return cx=cx||new Co({"icon-opacity":new qt(Re.paint_symbol["icon-opacity"]),"icon-color":new qt(Re.paint_symbol["icon-color"]),"icon-halo-color":new qt(Re.paint_symbol["icon-halo-color"]),"icon-halo-width":new qt(Re.paint_symbol["icon-halo-width"]),"icon-halo-blur":new qt(Re.paint_symbol["icon-halo-blur"]),"icon-translate":new Nt(Re.paint_symbol["icon-translate"]),"icon-translate-anchor":new Nt(Re.paint_symbol["icon-translate-anchor"]),"text-opacity":new qt(Re.paint_symbol["text-opacity"]),"text-color":new qt(Re.paint_symbol["text-color"],{runtimeType:Hr,getOverride:u=>u.textColor,hasOverride:u=>!!u.textColor}),"text-halo-color":new qt(Re.paint_symbol["text-halo-color"]),"text-halo-width":new qt(Re.paint_symbol["text-halo-width"]),"text-halo-blur":new qt(Re.paint_symbol["text-halo-blur"]),"text-translate":new Nt(Re.paint_symbol["text-translate"]),"text-translate-anchor":new Nt(Re.paint_symbol["text-translate-anchor"])})},get layout(){return ux=ux||new Co({"symbol-placement":new Nt(Re.layout_symbol["symbol-placement"]),"symbol-spacing":new Nt(Re.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Nt(Re.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new qt(Re.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Nt(Re.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Nt(Re.layout_symbol["icon-allow-overlap"]),"icon-overlap":new Nt(Re.layout_symbol["icon-overlap"]),"icon-ignore-placement":new Nt(Re.layout_symbol["icon-ignore-placement"]),"icon-optional":new Nt(Re.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Nt(Re.layout_symbol["icon-rotation-alignment"]),"icon-size":new qt(Re.layout_symbol["icon-size"]),"icon-text-fit":new Nt(Re.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Nt(Re.layout_symbol["icon-text-fit-padding"]),"icon-image":new qt(Re.layout_symbol["icon-image"]),"icon-rotate":new qt(Re.layout_symbol["icon-rotate"]),"icon-padding":new qt(Re.layout_symbol["icon-padding"]),"icon-keep-upright":new Nt(Re.layout_symbol["icon-keep-upright"]),"icon-offset":new qt(Re.layout_symbol["icon-offset"]),"icon-anchor":new qt(Re.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Nt(Re.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Nt(Re.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Nt(Re.layout_symbol["text-rotation-alignment"]),"text-field":new qt(Re.layout_symbol["text-field"]),"text-font":new qt(Re.layout_symbol["text-font"]),"text-size":new qt(Re.layout_symbol["text-size"]),"text-max-width":new qt(Re.layout_symbol["text-max-width"]),"text-line-height":new Nt(Re.layout_symbol["text-line-height"]),"text-letter-spacing":new qt(Re.layout_symbol["text-letter-spacing"]),"text-justify":new qt(Re.layout_symbol["text-justify"]),"text-radial-offset":new qt(Re.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Nt(Re.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new qt(Re.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new qt(Re.layout_symbol["text-anchor"]),"text-max-angle":new Nt(Re.layout_symbol["text-max-angle"]),"text-writing-mode":new Nt(Re.layout_symbol["text-writing-mode"]),"text-rotate":new qt(Re.layout_symbol["text-rotate"]),"text-padding":new Nt(Re.layout_symbol["text-padding"]),"text-keep-upright":new Nt(Re.layout_symbol["text-keep-upright"]),"text-transform":new qt(Re.layout_symbol["text-transform"]),"text-offset":new qt(Re.layout_symbol["text-offset"]),"text-allow-overlap":new Nt(Re.layout_symbol["text-allow-overlap"]),"text-overlap":new Nt(Re.layout_symbol["text-overlap"]),"text-ignore-placement":new Nt(Re.layout_symbol["text-ignore-placement"]),"text-optional":new Nt(Re.layout_symbol["text-optional"])})}};class hx{constructor(o){if(o.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=o.property.overrides?o.property.overrides.runtimeType:ui,this.defaultValue=o}evaluate(o){if(o.formattedSection){const h=this.defaultValue.property.overrides;if(h&&h.hasOverride(o.formattedSection))return h.getOverride(o.formattedSection)}return o.feature&&o.featureState?this.defaultValue.evaluate(o.feature,o.featureState):this.defaultValue.property.specification.default}eachChild(o){this.defaultValue.isConstant()||o(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}Ct("FormatSectionOverride",hx,{omit:["defaultValue"]});class Lg extends As{constructor(o){super(o,b0)}recalculate(o,h){if(super.recalculate(o,h),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout._values["icon-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout._values["text-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")==="map"?"map":"viewport"),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){const p=this.layout.get("text-writing-mode");if(p){const _=[];for(const x of p)_.indexOf(x)<0&&_.push(x);this.layout._values["text-writing-mode"]=_}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(o,h,p,_){const x=this.layout.get(o).evaluate(h,{},p,_),w=this._unevaluatedLayout._values[o];return w.isDataDriven()||lr(w.value)||!x?x:function(I,P){return P.replace(/{([^{}]+)}/g,(D,O)=>I&&O in I?String(I[O]):"")}(h.properties,x)}createBucket(o){return new cf(o)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(const o of b0.paint.overridableProperties){if(!Lg.hasPaintOverride(this.layout,o))continue;const h=this.paint.get(o),p=new hx(h),_=new mr(p,h.property.specification);let x=null;x=h.value.kind==="constant"||h.value.kind==="source"?new kh("source",_):new Mp("composite",_,h.value.zoomStops),this.paint._values[o]=new Ms(h.property,x,h.parameters)}}_handleOverridablePaintPropertyUpdate(o,h,p){return!(!this.layout||h.isDataDriven()||p.isDataDriven())&&Lg.hasPaintOverride(this.layout,o)}static hasPaintOverride(o,h){const p=o.get("text-field"),_=b0.paint.properties[h];let x=!1;const w=I=>{for(const P of I)if(_.overrides&&_.overrides.hasOverride(P))return void(x=!0)};if(p.value.kind==="constant"&&p.value.value instanceof jo)w(p.value.value.sections);else if(p.value.kind==="source"){const I=D=>{x||(D instanceof nl&&hi(D.value)===Jr?w(D.value.sections):D instanceof Mh?w(D.sections):D.eachChild(I))},P=p.value;P._styleExpression&&I(P._styleExpression.expression)}return x}}let fx;var lP={get paint(){return fx=fx||new Co({"background-color":new Nt(Re.paint_background["background-color"]),"background-pattern":new Dc(Re.paint_background["background-pattern"]),"background-opacity":new Nt(Re.paint_background["background-opacity"])})}};class uP extends As{constructor(o){super(o,lP)}}let px;var cP={get paint(){return px=px||new Co({"raster-opacity":new Nt(Re.paint_raster["raster-opacity"]),"raster-hue-rotate":new Nt(Re.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new Nt(Re.paint_raster["raster-brightness-min"]),"raster-brightness-max":new Nt(Re.paint_raster["raster-brightness-max"]),"raster-saturation":new Nt(Re.paint_raster["raster-saturation"]),"raster-contrast":new Nt(Re.paint_raster["raster-contrast"]),"raster-resampling":new Nt(Re.paint_raster["raster-resampling"]),"raster-fade-duration":new Nt(Re.paint_raster["raster-fade-duration"])})}};class hP extends As{constructor(o){super(o,cP)}}class fP extends As{constructor(o){super(o,{}),this.onAdd=h=>{this.implementation.onAdd&&this.implementation.onAdd(h,h.painter.context.gl)},this.onRemove=h=>{this.implementation.onRemove&&this.implementation.onRemove(h,h.painter.context.gl)},this.implementation=o}is3D(){return this.implementation.renderingMode==="3d"}hasOffscreenPass(){return this.implementation.prerender!==void 0}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw new Error("Custom layers cannot be serialized")}}class pP{constructor(o){this._methodToThrottle=o,this._triggered=!1,typeof MessageChannel<"u"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(()=>{this._triggered=!1,this._methodToThrottle()},0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}const x0=63710088e-1;class zu{constructor(o,h){if(isNaN(o)||isNaN(h))throw new Error(`Invalid LngLat object: (${o}, ${h})`);if(this.lng=+o,this.lat=+h,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new zu(ee(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(o){const h=Math.PI/180,p=this.lat*h,_=o.lat*h,x=Math.sin(p)*Math.sin(_)+Math.cos(p)*Math.cos(_)*Math.cos((o.lng-this.lng)*h);return x0*Math.acos(Math.min(x,1))}static convert(o){if(o instanceof zu)return o;if(Array.isArray(o)&&(o.length===2||o.length===3))return new zu(Number(o[0]),Number(o[1]));if(!Array.isArray(o)&&typeof o=="object"&&o!==null)return new zu(Number("lng"in o?o.lng:o.lon),Number(o.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")}}const dx=2*Math.PI*x0;function mx(u){return dx*Math.cos(u*Math.PI/180)}function gx(u){return(180+u)/360}function _x(u){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+u*Math.PI/360)))/360}function yx(u,o){return u/mx(o)}function w0(u){return 360/Math.PI*Math.atan(Math.exp((180-360*u)*Math.PI/180))-90}class Pg{constructor(o,h,p=0){this.x=+o,this.y=+h,this.z=+p}static fromLngLat(o,h=0){const p=zu.convert(o);return new Pg(gx(p.lng),_x(p.lat),yx(h,p.lat))}toLngLat(){return new zu(360*this.x-180,w0(this.y))}toAltitude(){return this.z*mx(w0(this.y))}meterInMercatorCoordinateUnits(){return 1/dx*(o=w0(this.y),1/Math.cos(o*Math.PI/180));var o}}function vx(u,o,h){var p=2*Math.PI*6378137/256/Math.pow(2,h);return[u*p-2*Math.PI*6378137/2,o*p-2*Math.PI*6378137/2]}class S0{constructor(o,h,p){if(o<0||o>25||p<0||p>=Math.pow(2,o)||h<0||h>=Math.pow(2,o))throw new Error(`x=${h}, y=${p}, z=${o} outside of bounds. 0<=x<${Math.pow(2,o)}, 0<=y<${Math.pow(2,o)} 0<=z<=25 `);this.z=o,this.x=h,this.y=p,this.key=dd(0,o,o,h,p)}equals(o){return this.z===o.z&&this.x===o.x&&this.y===o.y}url(o,h,p){const _=(w=this.y,I=this.z,P=vx(256*(x=this.x),256*(w=Math.pow(2,I)-w-1),I),D=vx(256*(x+1),256*(w+1),I),P[0]+","+P[1]+","+D[0]+","+D[1]);var x,w,I,P,D;const O=function(B,W,X){let K,ie="";for(let de=B;de>0;de--)K=1<1?"@2x":"").replace(/{quadkey}/g,O).replace(/{bbox-epsg-3857}/g,_)}isChildOf(o){const h=this.z-o.z;return h>0&&o.x===this.x>>h&&o.y===this.y>>h}getTilePoint(o){const h=Math.pow(2,this.z);return new E((o.x*h-this.x)*Zr,(o.y*h-this.y)*Zr)}toString(){return`${this.z}/${this.x}/${this.y}`}}class bx{constructor(o,h){this.wrap=o,this.canonical=h,this.key=dd(o,h.z,h.z,h.x,h.y)}}class Ds{constructor(o,h,p,_,x){if(o= z; overscaledZ = ${o}; z = ${p}`);this.overscaledZ=o,this.wrap=h,this.canonical=new S0(p,+_,+x),this.key=dd(h,o,p,_,x)}clone(){return new Ds(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(o){return this.overscaledZ===o.overscaledZ&&this.wrap===o.wrap&&this.canonical.equals(o.canonical)}scaledTo(o){if(o>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${o}; overscaledZ = ${this.overscaledZ}`);const h=this.canonical.z-o;return o>this.canonical.z?new Ds(o,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Ds(o,this.wrap,o,this.canonical.x>>h,this.canonical.y>>h)}calculateScaledKey(o,h){if(o>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${o}; overscaledZ = ${this.overscaledZ}`);const p=this.canonical.z-o;return o>this.canonical.z?dd(this.wrap*+h,o,this.canonical.z,this.canonical.x,this.canonical.y):dd(this.wrap*+h,o,o,this.canonical.x>>p,this.canonical.y>>p)}isChildOf(o){if(o.wrap!==this.wrap)return!1;const h=this.canonical.z-o.canonical.z;return o.overscaledZ===0||o.overscaledZ>h&&o.canonical.y===this.canonical.y>>h}children(o){if(this.overscaledZ>=o)return[new Ds(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];const h=this.canonical.z+1,p=2*this.canonical.x,_=2*this.canonical.y;return[new Ds(h,this.wrap,h,p,_),new Ds(h,this.wrap,h,p+1,_),new Ds(h,this.wrap,h,p,_+1),new Ds(h,this.wrap,h,p+1,_+1)]}isLessThan(o){return this.wrapo.wrap)&&(this.overscaledZo.overscaledZ)&&(this.canonical.xo.canonical.x)&&this.canonical.ythis.max&&(this.max=B),B=this.dim+1||h<-1||h>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(h+1)*this.stride+(o+1)}unpack(o,h,p){return o*this.redFactor+h*this.greenFactor+p*this.blueFactor-this.baseShift}getPixels(){return new ks({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(o,h,p){if(this.dim!==o.dim)throw new Error("dem dimension mismatch");let _=h*this.dim,x=h*this.dim+this.dim,w=p*this.dim,I=p*this.dim+this.dim;switch(h){case-1:_=x-1;break;case 1:x=_+1}switch(p){case-1:w=I-1;break;case 1:I=w+1}const P=-h*this.dim,D=-p*this.dim;for(let O=w;O=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${o} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[o]}}class Sx{constructor(o,h,p,_,x){this.type="Feature",this._vectorTileFeature=o,o._z=h,o._x=p,o._y=_,this.properties=o.properties,this.id=x}get geometry(){return this._geometry===void 0&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry}set geometry(o){this._geometry=o}toJSON(){const o={geometry:this.geometry};for(const h in this)h!=="_geometry"&&h!=="_vectorTileFeature"&&(o[h]=this[h]);return o}}class Ex{constructor(o,h){this.tileID=o,this.x=o.canonical.x,this.y=o.canonical.y,this.z=o.canonical.z,this.grid=new Mc(Zr,16,0),this.grid3D=new Mc(Zr,16,0),this.featureIndexArray=new V,this.promoteId=h}insert(o,h,p,_,x,w){const I=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(p,_,x);const P=w?this.grid3D:this.grid;for(let D=0;D=0&&B[3]>=0&&P.insert(I,B[0],B[1],B[2],B[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new Ru.VectorTile(new h0(this.rawTileData)).layers,this.sourceLayerCoder=new wx(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(o,h,p,_){this.loadVTLayers();const x=o.params||{},w=Zr/o.tileSize/o.scale,I=Oh(x.filter),P=o.queryGeometry,D=o.queryPadding*w,O=Cx(P),B=this.grid.query(O.minX-D,O.minY-D,O.maxX+D,O.maxY+D),W=Cx(o.cameraQueryGeometry),X=this.grid3D.query(W.minX-D,W.minY-D,W.maxX+D,W.maxY+D,(de,we,Oe,Ee)=>function(ke,Qe,et,St,kt){for(const bt of ke)if(Qe<=bt.x&&et<=bt.y&&St>=bt.x&&kt>=bt.y)return!0;const wt=[new E(Qe,et),new E(Qe,kt),new E(St,kt),new E(St,et)];if(ke.length>2){for(const bt of wt)if(nf(ke,bt))return!0}for(let bt=0;bt(Ee||(Ee=Zl(ke)),Qe.queryIntersectsFeature(P,ke,et,Ee,this.z,o.transform,w,o.pixelPosMatrix)))}return K}loadMatchingFeature(o,h,p,_,x,w,I,P,D,O,B){const W=this.bucketLayerIDs[h];if(w&&!function(de,we){for(let Oe=0;Oe=0)return!0;return!1}(w,W))return;const X=this.sourceLayerCoder.decode(p),K=this.vtLayers[X].feature(_);if(x.needGeometry){const de=Xl(K,!0);if(!x.filter(new br(this.tileID.overscaledZ),de,this.tileID.canonical))return}else if(!x.filter(new br(this.tileID.overscaledZ),K))return;const ie=this.getId(K,X);for(let de=0;de{const I=o instanceof kc?o.get(w):null;return I&&I.evaluate?I.evaluate(h,p,_):I})}function Cx(u){let o=1/0,h=1/0,p=-1/0,_=-1/0;for(const x of u)o=Math.min(o,x.x),h=Math.min(h,x.y),p=Math.max(p,x.x),_=Math.max(_,x.y);return{minX:o,minY:h,maxX:p,maxY:_}}function dP(u,o){return o-u}function Tx(u,o,h,p,_){const x=[];for(let w=0;w=p&&B.x>=p||(O.x>=p?O=new E(p,O.y+(p-O.x)/(B.x-O.x)*(B.y-O.y))._round():B.x>=p&&(B=new E(p,O.y+(p-O.x)/(B.x-O.x)*(B.y-O.y))._round()),O.y>=_&&B.y>=_||(O.y>=_?O=new E(O.x+(_-O.y)/(B.y-O.y)*(B.x-O.x),_)._round():B.y>=_&&(B=new E(O.x+(_-O.y)/(B.y-O.y)*(B.x-O.x),_)._round()),P&&O.equals(P[P.length-1])||(P=[O],x.push(P)),P.push(B)))))}}return x}Ct("FeatureIndex",Ex,{omit:["rawTileData","sourceLayerCoder"]});class Fu extends E{constructor(o,h,p,_){super(o,h),this.angle=p,_!==void 0&&(this.segment=_)}clone(){return new Fu(this.x,this.y,this.angle,this.segment)}}function Lx(u,o,h,p,_){if(o.segment===void 0||h===0)return!0;let x=o,w=o.segment+1,I=0;for(;I>-h/2;){if(w--,w<0)return!1;I-=u[w].dist(x),x=u[w]}I+=u[w].dist(u[w+1]),w++;const P=[];let D=0;for(;Ip;)D-=P.shift().angleDelta;if(D>_)return!1;w++,I+=O.dist(B)}return!0}function Px(u){let o=0;for(let h=0;hD){const K=(D-P)/X,ie=co.number(B.x,W.x,K),de=co.number(B.y,W.y,K),we=new Fu(ie,de,W.angleTo(B),O);return we._round(),!w||Lx(u,we,I,w,o)?we:void 0}P+=X}}function gP(u,o,h,p,_,x,w,I,P){const D=Mx(p,x,w),O=Ax(p,_),B=O*w,W=u[0].x===0||u[0].x===P||u[0].y===0||u[0].y===P;return o-B=0&&ke=0&&Qe=0&&W+D<=O){const et=new Fu(ke,Qe,Oe,K);et._round(),p&&!Lx(u,et,x,p,_)||X.push(et)}}B+=we}return I||X.length||w||(X=kx(u,B/2,h,p,_,x,w,!0,P)),X}Ct("Anchor",Fu);const hf=Zo;function Dx(u,o,h,p){const _=[],x=u.image,w=x.pixelRatio,I=x.paddedRect.w-2*hf,P=x.paddedRect.h-2*hf,D=u.right-u.left,O=u.bottom-u.top,B=x.stretchX||[[0,I]],W=x.stretchY||[[0,P]],X=(ht,Tt)=>ht+Tt[1]-Tt[0],K=B.reduce(X,0),ie=W.reduce(X,0),de=I-K,we=P-ie;let Oe=0,Ee=K,ke=0,Qe=ie,et=0,St=de,kt=0,wt=we;if(x.content&&p){const ht=x.content;Oe=Mg(B,0,ht[0]),ke=Mg(W,0,ht[1]),Ee=Mg(B,ht[0],ht[2]),Qe=Mg(W,ht[1],ht[3]),et=ht[0]-Oe,kt=ht[1]-ke,St=ht[2]-ht[0]-Ee,wt=ht[3]-ht[1]-Qe}const bt=(ht,Tt,_t,it)=>{const jt=Ag(ht.stretch-Oe,Ee,D,u.left),Rt=kg(ht.fixed-et,St,ht.stretch,K),Sn=Ag(Tt.stretch-ke,Qe,O,u.top),gr=kg(Tt.fixed-kt,wt,Tt.stretch,ie),wr=Ag(_t.stretch-Oe,Ee,D,u.left),xi=kg(_t.fixed-et,St,_t.stretch,K),ds=Ag(it.stretch-ke,Qe,O,u.top),Lo=kg(it.fixed-kt,wt,it.stretch,ie),mi=new E(jt,Sn),Bi=new E(wr,Sn),Yi=new E(wr,ds),Po=new E(jt,ds),Mo=new E(Rt/w,gr/w),wi=new E(xi/w,Lo/w),Si=o*Math.PI/180;if(Si){const po=Math.sin(Si),Xo=Math.cos(Si),Yo=[Xo,-po,po,Xo];mi._matMult(Yo),Bi._matMult(Yo),Po._matMult(Yo),Yi._matMult(Yo)}const fo=ht.stretch+ht.fixed,Ao=Tt.stretch+Tt.fixed;return{tl:mi,tr:Bi,bl:Po,br:Yi,tex:{x:x.paddedRect.x+hf+fo,y:x.paddedRect.y+hf+Ao,w:_t.stretch+_t.fixed-fo,h:it.stretch+it.fixed-Ao},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:Mo,pixelOffsetBR:wi,minFontScaleX:St/w/D,minFontScaleY:wt/w/O,isSDF:h}};if(p&&(x.stretchX||x.stretchY)){const ht=Rx(B,de,K),Tt=Rx(W,we,ie);for(let _t=0;_t0&&(K=Math.max(10,K),this.circleDiameter=K)}else{let B=w.top*I-P[0],W=w.bottom*I+P[2],X=w.left*I-P[3],K=w.right*I+P[1];const ie=w.collisionPadding;if(ie&&(X-=ie[0]*I,B-=ie[1]*I,K+=ie[2]*I,W+=ie[3]*I),O){const de=new E(X,B),we=new E(K,B),Oe=new E(X,W),Ee=new E(K,W),ke=O*Math.PI/180;de._rotate(ke),we._rotate(ke),Oe._rotate(ke),Ee._rotate(ke),X=Math.min(de.x,we.x,Oe.x,Ee.x),K=Math.max(de.x,we.x,Oe.x,Ee.x),B=Math.min(de.y,we.y,Oe.y,Ee.y),W=Math.max(de.y,we.y,Oe.y,Ee.y)}o.emplaceBack(h.x,h.y,X,B,K,W,p,_,x)}this.boxEndIndex=o.length}}class _P{constructor(o=[],h=yP){if(this.data=o,this.length=this.data.length,this.compare=h,this.length>0)for(let p=(this.length>>1)-1;p>=0;p--)this._down(p)}push(o){this.data.push(o),this.length++,this._up(this.length-1)}pop(){if(this.length===0)return;const o=this.data[0],h=this.data.pop();return this.length--,this.length>0&&(this.data[0]=h,this._down(0)),o}peek(){return this.data[0]}_up(o){const{data:h,compare:p}=this,_=h[o];for(;o>0;){const x=o-1>>1,w=h[x];if(p(_,w)>=0)break;h[o]=w,o=x}h[o]=_}_down(o){const{data:h,compare:p}=this,_=this.length>>1,x=h[o];for(;o<_;){let w=1+(o<<1),I=h[w];const P=w+1;if(P=0)break;h[o]=I,o=w}h[o]=x}}function yP(u,o){return uo?1:0}function vP(u,o=1,h=!1){let p=1/0,_=1/0,x=-1/0,w=-1/0;const I=u[0];for(let X=0;Xx)&&(x=K.x),(!X||K.y>w)&&(w=K.y)}const P=Math.min(x-p,w-_);let D=P/2;const O=new _P([],bP);if(P===0)return new E(p,_);for(let X=p;XB.d||!B.d)&&(B=X,h&&console.log("found best %d after %d probes",Math.round(1e4*X.d)/1e4,W)),X.max-B.d<=o||(D=X.h/2,O.push(new ff(X.p.x-D,X.p.y-D,D,u)),O.push(new ff(X.p.x+D,X.p.y-D,D,u)),O.push(new ff(X.p.x-D,X.p.y+D,D,u)),O.push(new ff(X.p.x+D,X.p.y+D,D,u)),W+=4)}return h&&(console.log(`num probes: ${W}`),console.log(`best distance: ${B.d}`)),B.p}function bP(u,o){return o.max-u.max}function ff(u,o,h,p){this.p=new E(u,o),this.h=h,this.d=function(_,x){let w=!1,I=1/0;for(let P=0;P_.y!=K.y>_.y&&_.x<(K.x-X.x)*(_.y-X.y)/(K.y-X.y)+X.x&&(w=!w),I=Math.min(I,_b(_,X,K))}}return(w?1:-1)*Math.sqrt(I)}(this.p,p),this.max=this.d+this.h*Math.SQRT2}var Xi;c.ap=void 0,(Xi=c.ap||(c.ap={}))[Xi.center=1]="center",Xi[Xi.left=2]="left",Xi[Xi.right=3]="right",Xi[Xi.top=4]="top",Xi[Xi.bottom=5]="bottom",Xi[Xi["top-left"]=6]="top-left",Xi[Xi["top-right"]=7]="top-right",Xi[Xi["bottom-left"]=8]="bottom-left",Xi[Xi["bottom-right"]=9]="bottom-right";const Bu=7,E0=Number.POSITIVE_INFINITY;function Nx(u,o){return o[1]!==E0?function(h,p,_){let x=0,w=0;switch(p=Math.abs(p),_=Math.abs(_),h){case"top-right":case"top-left":case"top":w=_-Bu;break;case"bottom-right":case"bottom-left":case"bottom":w=-_+Bu}switch(h){case"top-right":case"bottom-right":case"right":x=-p;break;case"top-left":case"bottom-left":case"left":x=p}return[x,w]}(u,o[0],o[1]):function(h,p){let _=0,x=0;p<0&&(p=0);const w=p/Math.SQRT2;switch(h){case"top-right":case"top-left":x=w-Bu;break;case"bottom-right":case"bottom-left":x=-w+Bu;break;case"bottom":x=-p+Bu;break;case"top":x=p-Bu}switch(h){case"top-right":case"bottom-right":_=-w;break;case"top-left":case"bottom-left":_=w;break;case"left":_=p;break;case"right":_=-p}return[_,x]}(u,o[0])}function Ox(u,o,h){var p;const _=u.layout,x=(p=_.get("text-variable-anchor-offset"))===null||p===void 0?void 0:p.evaluate(o,{},h);if(x){const I=x.values,P=[];for(let D=0;DW*bi);O.startsWith("top")?B[1]-=Bu:O.startsWith("bottom")&&(B[1]+=Bu),P[D+1]=B}return new cs(P)}const w=_.get("text-variable-anchor");if(w){let I;I=u._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[_.get("text-radial-offset").evaluate(o,{},h)*bi,E0]:_.get("text-offset").evaluate(o,{},h).map(D=>D*bi);const P=[];for(const D of w)P.push(D,Nx(D,I));return new cs(P)}return null}function I0(u){switch(u){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function xP(u,o,h,p,_,x,w,I,P,D,O){let B=x.textMaxSize.evaluate(o,{});B===void 0&&(B=w);const W=u.layers[0].layout,X=W.get("icon-offset").evaluate(o,{},O),K=Fx(h.horizontal),ie=w/24,de=u.tilePixelRatio*ie,we=u.tilePixelRatio*B/24,Oe=u.tilePixelRatio*I,Ee=u.tilePixelRatio*W.get("symbol-spacing"),ke=W.get("text-padding")*u.tilePixelRatio,Qe=function(it,jt,Rt,Sn=1){const gr=it.get("icon-padding").evaluate(jt,{},Rt),wr=gr&&gr.values;return[wr[0]*Sn,wr[1]*Sn,wr[2]*Sn,wr[3]*Sn]}(W,o,O,u.tilePixelRatio),et=W.get("text-max-angle")/180*Math.PI,St=W.get("text-rotation-alignment")!=="viewport"&&W.get("symbol-placement")!=="point",kt=W.get("icon-rotation-alignment")==="map"&&W.get("symbol-placement")!=="point",wt=W.get("symbol-placement"),bt=Ee/2,ht=W.get("icon-text-fit");let Tt;p&&ht!=="none"&&(u.allowVerticalPlacement&&h.vertical&&(Tt=ax(p,h.vertical,ht,W.get("icon-text-fit-padding"),X,ie)),K&&(p=ax(p,K,ht,W.get("icon-text-fit-padding"),X,ie)));const _t=(it,jt)=>{jt.x<0||jt.x>=Zr||jt.y<0||jt.y>=Zr||function(Rt,Sn,gr,wr,xi,ds,Lo,mi,Bi,Yi,Po,Mo,wi,Si,fo,Ao,po,Xo,Yo,Ei,Tn,mo,$i,Ii,oa){const Ra=Rt.addToLineVertexArray(Sn,gr);let Na,$l,sa,Rs,$o=0,Kl=0,_d=0,jx=0,D0=-1,R0=-1;const Jl={};let Gx=Ur("");if(Rt.allowVerticalPlacement&&wr.vertical){const go=mi.layout.get("text-rotate").evaluate(Tn,{},Ii)+90;sa=new Dg(Bi,Sn,Yi,Po,Mo,wr.vertical,wi,Si,fo,go),Lo&&(Rs=new Dg(Bi,Sn,Yi,Po,Mo,Lo,po,Xo,fo,go))}if(xi){const go=mi.layout.get("icon-rotate").evaluate(Tn,{}),Ns=mi.layout.get("icon-text-fit")!=="none",Uc=Dx(xi,go,$i,Ns),za=Lo?Dx(Lo,go,$i,Ns):void 0;$l=new Dg(Bi,Sn,Yi,Po,Mo,xi,po,Xo,!1,go),$o=4*Uc.length;const jc=Rt.iconSizeData;let fl=null;jc.kind==="source"?(fl=[hl*mi.layout.get("icon-size").evaluate(Tn,{})],fl[0]>Ou&&Ke(`${Rt.layerIds[0]}: Value for "icon-size" is >= ${pd}. Reduce your "icon-size".`)):jc.kind==="composite"&&(fl=[hl*mo.compositeIconSizes[0].evaluate(Tn,{},Ii),hl*mo.compositeIconSizes[1].evaluate(Tn,{},Ii)],(fl[0]>Ou||fl[1]>Ou)&&Ke(`${Rt.layerIds[0]}: Value for "icon-size" is >= ${pd}. Reduce your "icon-size".`)),Rt.addSymbols(Rt.icon,Uc,fl,Ei,Yo,Tn,c.ah.none,Sn,Ra.lineStartIndex,Ra.lineLength,-1,Ii),D0=Rt.icon.placedSymbolArray.length-1,za&&(Kl=4*za.length,Rt.addSymbols(Rt.icon,za,fl,Ei,Yo,Tn,c.ah.vertical,Sn,Ra.lineStartIndex,Ra.lineLength,-1,Ii),R0=Rt.icon.placedSymbolArray.length-1)}const qx=Object.keys(wr.horizontal);for(const go of qx){const Ns=wr.horizontal[go];if(!Na){Gx=Ur(Ns.text);const za=mi.layout.get("text-rotate").evaluate(Tn,{},Ii);Na=new Dg(Bi,Sn,Yi,Po,Mo,Ns,wi,Si,fo,za)}const Uc=Ns.positionedLines.length===1;if(_d+=zx(Rt,Sn,Ns,ds,mi,fo,Tn,Ao,Ra,wr.vertical?c.ah.horizontal:c.ah.horizontalOnly,Uc?qx:[go],Jl,D0,mo,Ii),Uc)break}wr.vertical&&(jx+=zx(Rt,Sn,wr.vertical,ds,mi,fo,Tn,Ao,Ra,c.ah.vertical,["vertical"],Jl,R0,mo,Ii));const EP=Na?Na.boxStartIndex:Rt.collisionBoxArray.length,IP=Na?Na.boxEndIndex:Rt.collisionBoxArray.length,CP=sa?sa.boxStartIndex:Rt.collisionBoxArray.length,TP=sa?sa.boxEndIndex:Rt.collisionBoxArray.length,LP=$l?$l.boxStartIndex:Rt.collisionBoxArray.length,PP=$l?$l.boxEndIndex:Rt.collisionBoxArray.length,MP=Rs?Rs.boxStartIndex:Rt.collisionBoxArray.length,AP=Rs?Rs.boxEndIndex:Rt.collisionBoxArray.length;let Oa=-1;const Ng=(go,Ns)=>go&&go.circleDiameter?Math.max(go.circleDiameter,Ns):Ns;Oa=Ng(Na,Oa),Oa=Ng(sa,Oa),Oa=Ng($l,Oa),Oa=Ng(Rs,Oa);const Wx=Oa>-1?1:0;Wx&&(Oa*=oa/bi),Rt.glyphOffsetArray.length>=cf.MAX_GLYPHS&&Ke("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),Tn.sortKey!==void 0&&Rt.addToSortKeyRanges(Rt.symbolInstances.length,Tn.sortKey);const kP=Ox(mi,Tn,Ii),[DP,RP]=function(go,Ns){const Uc=go.length,za=Ns==null?void 0:Ns.values;if((za==null?void 0:za.length)>0)for(let jc=0;jc=0?Jl.right:-1,Jl.center>=0?Jl.center:-1,Jl.left>=0?Jl.left:-1,Jl.vertical||-1,D0,R0,Gx,EP,IP,CP,TP,LP,PP,MP,AP,Yi,_d,jx,$o,Kl,Wx,0,wi,Oa,DP,RP)}(u,jt,it,h,p,_,Tt,u.layers[0],u.collisionBoxArray,o.index,o.sourceLayerIndex,u.index,de,[ke,ke,ke,ke],St,P,Oe,Qe,kt,X,o,x,D,O,w)};if(wt==="line")for(const it of Tx(o.geometry,0,0,Zr,Zr)){const jt=gP(it,Ee,et,h.vertical||K,p,24,we,u.overscaling,Zr);for(const Rt of jt)K&&wP(u,K.text,bt,Rt)||_t(it,Rt)}else if(wt==="line-center"){for(const it of o.geometry)if(it.length>1){const jt=mP(it,et,h.vertical||K,p,24,we);jt&&_t(it,jt)}}else if(o.type==="Polygon")for(const it of r0(o.geometry,0)){const jt=vP(it,16);_t(it[0],new Fu(jt.x,jt.y,0))}else if(o.type==="LineString")for(const it of o.geometry)_t(it,new Fu(it[0].x,it[0].y,0));else if(o.type==="Point")for(const it of o.geometry)for(const jt of it)_t([jt],new Fu(jt.x,jt.y,0))}function zx(u,o,h,p,_,x,w,I,P,D,O,B,W,X,K){const ie=function(Oe,Ee,ke,Qe,et,St,kt,wt){const bt=Qe.layout.get("text-rotate").evaluate(St,{})*Math.PI/180,ht=[];for(const Tt of Ee.positionedLines)for(const _t of Tt.positionedGlyphs){if(!_t.rect)continue;const it=_t.rect||{};let jt=ex+1,Rt=!0,Sn=1,gr=0;const wr=(et||wt)&&_t.vertical,xi=_t.metrics.advance*_t.scale/2;if(wt&&Ee.verticalizable&&(gr=Tt.lineOffset/2-(_t.imageName?-(bi-_t.metrics.width*_t.scale)/2:(_t.scale-1)*bi)),_t.imageName){const Ei=kt[_t.imageName];Rt=Ei.sdf,Sn=Ei.pixelRatio,jt=Zo/Sn}const ds=et?[_t.x+xi,_t.y]:[0,0];let Lo=et?[0,0]:[_t.x+xi+ke[0],_t.y+ke[1]-gr],mi=[0,0];wr&&(mi=Lo,Lo=[0,0]);const Bi=_t.metrics.isDoubleResolution?2:1,Yi=(_t.metrics.left-jt)*_t.scale-xi+Lo[0],Po=(-_t.metrics.top-jt)*_t.scale+Lo[1],Mo=Yi+it.w/Bi*_t.scale/Sn,wi=Po+it.h/Bi*_t.scale/Sn,Si=new E(Yi,Po),fo=new E(Mo,Po),Ao=new E(Yi,wi),po=new E(Mo,wi);if(wr){const Ei=new E(-xi,xi-hd),Tn=-Math.PI/2,mo=bi/2-xi,$i=new E(5-hd-mo,-(_t.imageName?mo:0)),Ii=new E(...mi);Si._rotateAround(Tn,Ei)._add($i)._add(Ii),fo._rotateAround(Tn,Ei)._add($i)._add(Ii),Ao._rotateAround(Tn,Ei)._add($i)._add(Ii),po._rotateAround(Tn,Ei)._add($i)._add(Ii)}if(bt){const Ei=Math.sin(bt),Tn=Math.cos(bt),mo=[Tn,-Ei,Ei,Tn];Si._matMult(mo),fo._matMult(mo),Ao._matMult(mo),po._matMult(mo)}const Xo=new E(0,0),Yo=new E(0,0);ht.push({tl:Si,tr:fo,bl:Ao,br:po,tex:it,writingMode:Ee.writingMode,glyphOffset:ds,sectionIndex:_t.sectionIndex,isSDF:Rt,pixelOffsetTL:Xo,pixelOffsetBR:Yo,minFontScaleX:0,minFontScaleY:0})}return ht}(0,h,I,_,x,w,p,u.allowVerticalPlacement),de=u.textSizeData;let we=null;de.kind==="source"?(we=[hl*_.layout.get("text-size").evaluate(w,{})],we[0]>Ou&&Ke(`${u.layerIds[0]}: Value for "text-size" is >= ${pd}. Reduce your "text-size".`)):de.kind==="composite"&&(we=[hl*X.compositeTextSizes[0].evaluate(w,{},K),hl*X.compositeTextSizes[1].evaluate(w,{},K)],(we[0]>Ou||we[1]>Ou)&&Ke(`${u.layerIds[0]}: Value for "text-size" is >= ${pd}. Reduce your "text-size".`)),u.addSymbols(u.text,ie,we,I,x,w,D,o,P.lineStartIndex,P.lineLength,W,K);for(const Oe of O)B[Oe]=u.text.placedSymbolArray.length-1;return 4*ie.length}function Fx(u){for(const o in u)return u[o];return null}function wP(u,o,h,p){const _=u.compareText;if(o in _){const x=_[o];for(let w=x.length-1;w>=0;w--)if(p.dist(x[w])>4;if(_!==1)throw new Error(`Got v${_} data when expected v1.`);const x=Bx[15&p];if(!x)throw new Error("Unrecognized array type.");const[w]=new Uint16Array(o,2,1),[I]=new Uint32Array(o,4,1);return new C0(I,w,x,o)}constructor(o,h=64,p=Float64Array,_){if(isNaN(o)||o<0)throw new Error(`Unpexpected numItems value: ${o}.`);this.numItems=+o,this.nodeSize=Math.min(Math.max(+h,2),65535),this.ArrayType=p,this.IndexArrayType=o<65536?Uint16Array:Uint32Array;const x=Bx.indexOf(this.ArrayType),w=2*o*this.ArrayType.BYTES_PER_ELEMENT,I=o*this.IndexArrayType.BYTES_PER_ELEMENT,P=(8-I%8)%8;if(x<0)throw new Error(`Unexpected typed array class: ${p}.`);_&&_ instanceof ArrayBuffer?(this.data=_,this.ids=new this.IndexArrayType(this.data,8,o),this.coords=new this.ArrayType(this.data,8+I+P,2*o),this._pos=2*o,this._finished=!0):(this.data=new ArrayBuffer(8+w+I+P),this.ids=new this.IndexArrayType(this.data,8,o),this.coords=new this.ArrayType(this.data,8+I+P,2*o),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+x]),new Uint16Array(this.data,2,1)[0]=h,new Uint32Array(this.data,4,1)[0]=o)}add(o,h){const p=this._pos>>1;return this.ids[p]=p,this.coords[this._pos++]=o,this.coords[this._pos++]=h,p}finish(){const o=this._pos>>1;if(o!==this.numItems)throw new Error(`Added ${o} items when expected ${this.numItems}.`);return T0(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(o,h,p,_){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:x,coords:w,nodeSize:I}=this,P=[0,x.length-1,0],D=[];for(;P.length;){const O=P.pop()||0,B=P.pop()||0,W=P.pop()||0;if(B-W<=I){for(let de=W;de<=B;de++){const we=w[2*de],Oe=w[2*de+1];we>=o&&we<=p&&Oe>=h&&Oe<=_&&D.push(x[de])}continue}const X=W+B>>1,K=w[2*X],ie=w[2*X+1];K>=o&&K<=p&&ie>=h&&ie<=_&&D.push(x[X]),(O===0?o<=K:h<=ie)&&(P.push(W),P.push(X-1),P.push(1-O)),(O===0?p>=K:_>=ie)&&(P.push(X+1),P.push(B),P.push(1-O))}return D}within(o,h,p){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:_,coords:x,nodeSize:w}=this,I=[0,_.length-1,0],P=[],D=p*p;for(;I.length;){const O=I.pop()||0,B=I.pop()||0,W=I.pop()||0;if(B-W<=w){for(let de=W;de<=B;de++)Ux(x[2*de],x[2*de+1],o,h)<=D&&P.push(_[de]);continue}const X=W+B>>1,K=x[2*X],ie=x[2*X+1];Ux(K,ie,o,h)<=D&&P.push(_[X]),(O===0?o-p<=K:h-p<=ie)&&(I.push(W),I.push(X-1),I.push(1-O)),(O===0?o+p>=K:h+p>=ie)&&(I.push(X+1),I.push(B),I.push(1-O))}return P}}function T0(u,o,h,p,_,x){if(_-p<=h)return;const w=p+_>>1;Vx(u,o,w,p,_,x),T0(u,o,h,p,w-1,1-x),T0(u,o,h,w+1,_,1-x)}function Vx(u,o,h,p,_,x){for(;_>p;){if(_-p>600){const D=_-p+1,O=h-p+1,B=Math.log(D),W=.5*Math.exp(2*B/3),X=.5*Math.sqrt(B*W*(D-W)/D)*(O-D/2<0?-1:1);Vx(u,o,h,Math.max(p,Math.floor(h-O*W/D+X)),Math.min(_,Math.floor(h+(D-O)*W/D+X)),x)}const w=o[2*h+x];let I=p,P=_;for(md(u,o,p,h),o[2*_+x]>w&&md(u,o,p,_);Iw;)P--}o[2*p+x]===w?md(u,o,p,P):(P++,md(u,o,P,_)),P<=h&&(p=P+1),h<=P&&(_=P-1)}}function md(u,o,h,p){L0(u,h,p),L0(o,2*h,2*p),L0(o,2*h+1,2*p+1)}function L0(u,o,h){const p=u[o];u[o]=u[h],u[h]=p}function Ux(u,o,h,p){const _=u-h,x=o-p;return _*_+x*x}var P0;c.bd=void 0,(P0=c.bd||(c.bd={})).create="create",P0.load="load",P0.fullLoad="fullLoad";let Rg=null,gd=[];const M0=1e3/60,A0="loadTime",k0="fullLoadTime",SP={mark(u){performance.mark(u)},frame(u){const o=u;Rg!=null&&gd.push(o-Rg),Rg=o},clearMetrics(){Rg=null,gd=[],performance.clearMeasures(A0),performance.clearMeasures(k0);for(const u in c.bd)performance.clearMarks(c.bd[u])},getPerformanceMetrics(){performance.measure(A0,c.bd.create,c.bd.load),performance.measure(k0,c.bd.create,c.bd.fullLoad);const u=performance.getEntriesByName(A0)[0].duration,o=performance.getEntriesByName(k0)[0].duration,h=gd.length,p=1/(gd.reduce((x,w)=>x+w,0)/h/1e3),_=gd.filter(x=>x>M0).reduce((x,w)=>x+(w-M0)/M0,0);return{loadTime:u,fullLoadTime:o,fps:p,percentDroppedFrames:_/(h+_)*100,totalFrames:h}}};c.$=pt,c.A=rf,c.B=function(u){if(He==null){const o=u.navigator?u.navigator.userAgent:null;He=!!u.safari||!(!o||!(/\b(iPad|iPhone|iPod)\b/.test(o)||o.match("Safari")&&!o.match("Chrome")))}return He},c.C=class{constructor(u,o){this.target=u,this.mapId=o,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new pP(()=>this.process()),this.subscription=function(h,p,_,x){return h.addEventListener(p,_,!1),{unsubscribe:()=>{h.removeEventListener(p,_,!1)}}}(this.target,"message",h=>this.receive(h)),this.globalScope=ut(self)?u:window}registerMessageHandler(u,o){this.messageHandlers[u]=o}sendAsync(u,o){return new Promise((h,p)=>{const _=Math.round(1e18*Math.random()).toString(36).substring(0,10);this.resolveRejects[_]={resolve:h,reject:p},o&&o.signal.addEventListener("abort",()=>{delete this.resolveRejects[_];const I={id:_,type:"",origin:location.origin,targetMapId:u.targetMapId,sourceMapId:this.mapId};this.target.postMessage(I)},{once:!0});const x=[],w=Object.assign(Object.assign({},u),{id:_,sourceMapId:this.mapId,origin:location.origin,data:Mu(u.data,x)});this.target.postMessage(w,{transfer:x})})}receive(u){const o=u.data,h=o.id;if(!(o.origin!=="file://"&&location.origin!=="file://"&&o.origin!==location.origin||o.targetMapId&&this.mapId!==o.targetMapId)){if(o.type===""){delete this.tasks[h];const p=this.abortControllers[h];return delete this.abortControllers[h],void(p&&p.abort())}if(ut(self)||o.mustQueue)return this.tasks[h]=o,this.taskQueue.push(h),void this.invoker.trigger();this.processTask(h,o)}}process(){if(this.taskQueue.length===0)return;const u=this.taskQueue.shift(),o=this.tasks[u];delete this.tasks[u],this.taskQueue.length>0&&this.invoker.trigger(),o&&this.processTask(u,o)}processTask(u,o){return l(this,void 0,void 0,function*(){if(o.type===""){const _=this.resolveRejects[u];return delete this.resolveRejects[u],_?void(o.error?_.reject(Au(o.error)):_.resolve(Au(o.data))):void 0}if(!this.messageHandlers[o.type])return void this.completeTask(u,new Error(`Could not find a registered handler for ${o.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));const h=Au(o.data),p=new AbortController;this.abortControllers[u]=p;try{const _=yield this.messageHandlers[o.type](o.sourceMapId,h,p);this.completeTask(u,null,_)}catch(_){this.completeTask(u,_)}})}completeTask(u,o,h){const p=[];delete this.abortControllers[u];const _={id:u,type:"",sourceMapId:this.mapId,origin:location.origin,error:o?Mu(o):null,data:Mu(h,p)};this.target.postMessage(_,{transfer:p})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},c.D=Nt,c.E=en,c.F=function(){var u=new rf(16);return rf!=Float32Array&&(u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[11]=0,u[12]=0,u[13]=0,u[14]=0),u[0]=1,u[5]=1,u[10]=1,u[15]=1,u},c.G=pn,c.H=function(u,o,h){var p,_,x,w,I,P,D,O,B,W,X,K,ie=h[0],de=h[1],we=h[2];return o===u?(u[12]=o[0]*ie+o[4]*de+o[8]*we+o[12],u[13]=o[1]*ie+o[5]*de+o[9]*we+o[13],u[14]=o[2]*ie+o[6]*de+o[10]*we+o[14],u[15]=o[3]*ie+o[7]*de+o[11]*we+o[15]):(_=o[1],x=o[2],w=o[3],I=o[4],P=o[5],D=o[6],O=o[7],B=o[8],W=o[9],X=o[10],K=o[11],u[0]=p=o[0],u[1]=_,u[2]=x,u[3]=w,u[4]=I,u[5]=P,u[6]=D,u[7]=O,u[8]=B,u[9]=W,u[10]=X,u[11]=K,u[12]=p*ie+I*de+B*we+o[12],u[13]=_*ie+P*de+W*we+o[13],u[14]=x*ie+D*de+X*we+o[14],u[15]=w*ie+O*de+K*we+o[15]),u},c.I=p0,c.J=function(u,o,h){var p=h[0],_=h[1],x=h[2];return u[0]=o[0]*p,u[1]=o[1]*p,u[2]=o[2]*p,u[3]=o[3]*p,u[4]=o[4]*_,u[5]=o[5]*_,u[6]=o[6]*_,u[7]=o[7]*_,u[8]=o[8]*x,u[9]=o[9]*x,u[10]=o[10]*x,u[11]=o[11]*x,u[12]=o[12],u[13]=o[13],u[14]=o[14],u[15]=o[15],u},c.K=xb,c.L=function(u,o){const h={};for(let p=0;p{const o=window.document.createElement("video");return o.muted=!0,new Promise(h=>{o.onloadstart=()=>{h(o)};for(const p of u){const _=window.document.createElement("source");ar(p)||(o.crossOrigin="Anonymous"),_.src=p,o.appendChild(_)}})},c.a3=function(){return pe++},c.a4=y,c.a5=cf,c.a6=Oh,c.a7=Xl,c.a8=br,c.a9=Sx,c.aA=Y,c.aB=function(u,o){if(!u)return[{command:"setStyle",args:[o]}];let h=[];try{if(!yn(u.version,o.version))return[{command:"setStyle",args:[o]}];yn(u.center,o.center)||h.push({command:"setCenter",args:[o.center]}),yn(u.zoom,o.zoom)||h.push({command:"setZoom",args:[o.zoom]}),yn(u.bearing,o.bearing)||h.push({command:"setBearing",args:[o.bearing]}),yn(u.pitch,o.pitch)||h.push({command:"setPitch",args:[o.pitch]}),yn(u.sprite,o.sprite)||h.push({command:"setSprite",args:[o.sprite]}),yn(u.glyphs,o.glyphs)||h.push({command:"setGlyphs",args:[o.glyphs]}),yn(u.transition,o.transition)||h.push({command:"setTransition",args:[o.transition]}),yn(u.light,o.light)||h.push({command:"setLight",args:[o.light]}),yn(u.terrain,o.terrain)||h.push({command:"setTerrain",args:[o.terrain]}),yn(u.sky,o.sky)||h.push({command:"setSky",args:[o.sky]});const p={},_=[];(function(w,I,P,D){let O;for(O in I=I||{},w=w||{})Object.prototype.hasOwnProperty.call(w,O)&&(Object.prototype.hasOwnProperty.call(I,O)||Cs(O,P,D));for(O in I)Object.prototype.hasOwnProperty.call(I,O)&&(Object.prototype.hasOwnProperty.call(w,O)?yn(w[O],I[O])||(w[O].type==="geojson"&&I[O].type==="geojson"&&tl(w,I,O)?cr(P,{command:"setGeoJSONSourceData",args:[O,I[O].data]}):Ks(O,I,P,D)):Uo(O,I,P))})(u.sources,o.sources,_,p);const x=[];u.layers&&u.layers.forEach(w=>{"source"in w&&p[w.source]?h.push({command:"removeLayer",args:[w.id]}):x.push(w)}),h=h.concat(_),function(w,I,P){I=I||[];const D=(w=w||[]).map(zl),O=I.map(zl),B=w.reduce(Ts,{}),W=I.reduce(Ts,{}),X=D.slice(),K=Object.create(null);let ie,de,we,Oe,Ee;for(let ke=0,Qe=0;ke@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(h,p,_,x)=>{const w=_||x;return o[p]=!w||w.toLowerCase(),""}),o["max-age"]){const h=parseInt(o["max-age"],10);isNaN(h)?delete o["max-age"]:o["max-age"]=h}return o},c.ab=function(u,o){const h=[];for(const p in u)p in o||h.push(p);return h},c.ac=te,c.ad=function(u,o,h){var p=Math.sin(h),_=Math.cos(h),x=o[0],w=o[1],I=o[2],P=o[3],D=o[4],O=o[5],B=o[6],W=o[7];return o!==u&&(u[8]=o[8],u[9]=o[9],u[10]=o[10],u[11]=o[11],u[12]=o[12],u[13]=o[13],u[14]=o[14],u[15]=o[15]),u[0]=x*_+D*p,u[1]=w*_+O*p,u[2]=I*_+B*p,u[3]=P*_+W*p,u[4]=D*_-x*p,u[5]=O*_-w*p,u[6]=B*_-I*p,u[7]=W*_-P*p,u},c.ae=function(u){var o=new rf(16);return o[0]=u[0],o[1]=u[1],o[2]=u[2],o[3]=u[3],o[4]=u[4],o[5]=u[5],o[6]=u[6],o[7]=u[7],o[8]=u[8],o[9]=u[9],o[10]=u[10],o[11]=u[11],o[12]=u[12],o[13]=u[13],o[14]=u[14],o[15]=u[15],o},c.af=yg,c.ag=function(u,o){let h=0,p=0;if(u.kind==="constant")p=u.layoutSize;else if(u.kind!=="source"){const{interpolationType:_,minZoom:x,maxZoom:w}=u,I=_?te(Zi.interpolationFactor(_,o,x,w),0,1):0;u.kind==="camera"?p=co.number(u.minSize,u.maxSize,I):h=I}return{uSizeT:h,uSize:p}},c.ai=function(u,{uSize:o,uSizeT:h},{lowerSize:p,upperSize:_}){return u.kind==="source"?p/hl:u.kind==="composite"?co.number(p/hl,_/hl,h):o},c.aj=_0,c.ak=function(u,o,h,p){const _=o.y-u.y,x=o.x-u.x,w=p.y-h.y,I=p.x-h.x,P=w*x-I*_;if(P===0)return null;const D=(I*(u.y-h.y)-w*(u.x-h.x))/P;return new E(u.x+D*x,u.y+D*_)},c.al=Tx,c.am=Kp,c.an=$y,c.ao=bi,c.aq=g0,c.ar=function(u,o){var h=o[0],p=o[1],_=o[2],x=o[3],w=o[4],I=o[5],P=o[6],D=o[7],O=o[8],B=o[9],W=o[10],X=o[11],K=o[12],ie=o[13],de=o[14],we=o[15],Oe=h*I-p*w,Ee=h*P-_*w,ke=h*D-x*w,Qe=p*P-_*I,et=p*D-x*I,St=_*D-x*P,kt=O*ie-B*K,wt=O*de-W*K,bt=O*we-X*K,ht=B*de-W*ie,Tt=B*we-X*ie,_t=W*we-X*de,it=Oe*_t-Ee*Tt+ke*ht+Qe*bt-et*wt+St*kt;return it?(u[0]=(I*_t-P*Tt+D*ht)*(it=1/it),u[1]=(_*Tt-p*_t-x*ht)*it,u[2]=(ie*St-de*et+we*Qe)*it,u[3]=(W*et-B*St-X*Qe)*it,u[4]=(P*bt-w*_t-D*wt)*it,u[5]=(h*_t-_*bt+x*wt)*it,u[6]=(de*ke-K*St-we*Ee)*it,u[7]=(O*St-W*ke+X*Ee)*it,u[8]=(w*Tt-I*bt+D*kt)*it,u[9]=(p*bt-h*Tt-x*kt)*it,u[10]=(K*et-ie*ke+we*Oe)*it,u[11]=(B*ke-O*et-X*Oe)*it,u[12]=(I*wt-w*ht-P*kt)*it,u[13]=(h*ht-p*wt+_*kt)*it,u[14]=(ie*Ee-K*Qe-de*Oe)*it,u[15]=(O*Qe-B*Ee+W*Oe)*it,u):null},c.as=I0,c.at=m0,c.au=C0,c.av=function(){const u={},o=Re.$version;for(const h in Re.$root){const p=Re.$root[h];if(p.required){let _=null;_=h==="version"?o:p.type==="array"?[]:{},_!=null&&(u[h]=_)}}return u},c.aw=ig,c.ax=zr,c.ay=function(u){u=u.slice();const o=Object.create(null);for(let h=0;hit*bi)}let wt=w?"center":h.get("text-justify").evaluate(D,{},u.canonical);const bt=h.get("symbol-placement"),ht=bt==="point"?h.get("text-max-width").evaluate(D,{},u.canonical)*bi:0,Tt=()=>{u.bucket.allowVerticalPlacement&&ku(ke)&&(K.vertical=Ig(ie,u.glyphMap,u.glyphPositions,u.imagePositions,O,ht,x,St,"left",et,we,c.ah.vertical,!0,bt,W,B))};if(!w&&kt){const _t=new Set;if(wt==="auto")for(let jt=0;jtl(void 0,void 0,void 0,function*(){if(u.byteLength===0)return createImageBitmap(new ImageData(1,1));const o=new Blob([new Uint8Array(u)],{type:"image/png"});try{return createImageBitmap(o)}catch(h){throw new Error(`Could not load image because of ${h.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),c.e=fe,c.f=u=>new Promise((o,h)=>{const p=new Image;p.onload=()=>{o(p),URL.revokeObjectURL(p.src),p.onload=null,window.requestAnimationFrame(()=>{p.src=Gt})},p.onerror=()=>h(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));const _=new Blob([new Uint8Array(u)],{type:"image/png"});p.src=u.byteLength?URL.createObjectURL(_):Gt}),c.g=_n,c.h=(u,o)=>Pn(fe(u,{type:"json"}),o),c.i=ut,c.j=dt,c.k=Me,c.l=(u,o)=>Pn(fe(u,{type:"arrayBuffer"}),o),c.m=Pn,c.n=function(u){return new h0(u).readFields(JL,[])},c.o=rd,c.p=tx,c.q=Co,c.r=Hy,c.s=ar,c.t=Pu,c.u=xt,c.v=Re,c.w=Ke,c.x=ql,c.y=function([u,o,h]){return o+=90,o*=Math.PI/180,h*=Math.PI/180,{x:u*Math.cos(o)*Math.sin(h),y:u*Math.sin(o)*Math.sin(h),z:u*Math.cos(h)}},c.z=co}),i("worker",["./shared"],function(c){class l{constructor(q){this.keyCache={},q&&this.replace(q)}replace(q){this._layerConfigs={},this._layers={},this.update(q,[])}update(q,Z){for(const le of q){this._layerConfigs[le.id]=le;const Te=this._layers[le.id]=c.az(le);Te._featureFilter=c.a6(Te.filter),this.keyCache[le.id]&&delete this.keyCache[le.id]}for(const le of Z)delete this.keyCache[le],delete this._layerConfigs[le],delete this._layers[le];this.familiesBySource={};const J=c.bh(Object.values(this._layerConfigs),this.keyCache);for(const le of J){const Te=le.map(Ye=>this._layers[Ye.id]),Q=Te[0];if(Q.visibility==="none")continue;const Pe=Q.source||"";let Se=this.familiesBySource[Pe];Se||(Se=this.familiesBySource[Pe]={});const Ne=Q.sourceLayer||"_geojsonTileLayer";let qe=Se[Ne];qe||(qe=Se[Ne]=[]),qe.push(Te)}}}class d{constructor(q){const Z={},J=[];for(const Pe in q){const Se=q[Pe],Ne=Z[Pe]={};for(const qe in Se){const Ye=Se[+qe];if(!Ye||Ye.bitmap.width===0||Ye.bitmap.height===0)continue;const Je={x:0,y:0,w:Ye.bitmap.width+2,h:Ye.bitmap.height+2};J.push(Je),Ne[qe]={rect:Je,metrics:Ye.metrics}}}const{w:le,h:Te}=c.p(J),Q=new c.o({width:le||1,height:Te||1});for(const Pe in q){const Se=q[Pe];for(const Ne in Se){const qe=Se[+Ne];if(!qe||qe.bitmap.width===0||qe.bitmap.height===0)continue;const Ye=Z[Pe][Ne].rect;c.o.copy(qe.bitmap,Q,{x:0,y:0},{x:Ye.x+1,y:Ye.y+1},qe.bitmap)}}this.image=Q,this.positions=Z}}c.bi("GlyphAtlas",d);class v{constructor(q){this.tileID=new c.Q(q.tileID.overscaledZ,q.tileID.wrap,q.tileID.canonical.z,q.tileID.canonical.x,q.tileID.canonical.y),this.uid=q.uid,this.zoom=q.zoom,this.pixelRatio=q.pixelRatio,this.tileSize=q.tileSize,this.source=q.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=q.showCollisionBoxes,this.collectResourceTiming=!!q.collectResourceTiming,this.returnDependencies=!!q.returnDependencies,this.promoteId=q.promoteId,this.inFlightDependencies=[]}parse(q,Z,J,le){return c._(this,void 0,void 0,function*(){this.status="parsing",this.data=q,this.collisionBoxArray=new c.a4;const Te=new c.bj(Object.keys(q.layers).sort()),Q=new c.bk(this.tileID,this.promoteId);Q.bucketLayerIDs=[];const Pe={},Se={featureIndex:Q,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:J},Ne=Z.familiesBySource[this.source];for(const dn in Ne){const Fr=q.layers[dn];if(!Fr)continue;Fr.version===1&&c.w(`Vector tile source "${this.source}" layer "${dn}" does not use vector tile spec v2 and therefore may have some rendering errors.`);const _i=Te.encode(dn),uo=[];for(let So=0;So=Pi.maxzoom||Pi.visibility!=="none"&&(S(So,this.zoom,J),(Pe[Pi.id]=Pi.createBucket({index:Q.bucketLayerIDs.length,layers:So,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:_i,sourceID:this.source})).populate(uo,Se,this.tileID.canonical),Q.bucketLayerIDs.push(So.map(Js=>Js.id)))}}const qe=c.aE(Se.glyphDependencies,dn=>Object.keys(dn).map(Number));this.inFlightDependencies.forEach(dn=>dn==null?void 0:dn.abort()),this.inFlightDependencies=[];let Ye=Promise.resolve({});if(Object.keys(qe).length){const dn=new AbortController;this.inFlightDependencies.push(dn),Ye=le.sendAsync({type:"GG",data:{stacks:qe,source:this.source,tileID:this.tileID,type:"glyphs"}},dn)}const Je=Object.keys(Se.iconDependencies);let Dt=Promise.resolve({});if(Je.length){const dn=new AbortController;this.inFlightDependencies.push(dn),Dt=le.sendAsync({type:"GI",data:{icons:Je,source:this.source,tileID:this.tileID,type:"icons"}},dn)}const zt=Object.keys(Se.patternDependencies);let Qt=Promise.resolve({});if(zt.length){const dn=new AbortController;this.inFlightDependencies.push(dn),Qt=le.sendAsync({type:"GI",data:{icons:zt,source:this.source,tileID:this.tileID,type:"patterns"}},dn)}const[tn,Mn,er]=yield Promise.all([Ye,Dt,Qt]),vr=new d(tn),ci=new c.bl(Mn,er);for(const dn in Pe){const Fr=Pe[dn];Fr instanceof c.a5?(S(Fr.layers,this.zoom,J),c.bm({bucket:Fr,glyphMap:tn,glyphPositions:vr.positions,imageMap:Mn,imagePositions:ci.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):Fr.hasPattern&&(Fr instanceof c.bn||Fr instanceof c.bo||Fr instanceof c.bp)&&(S(Fr.layers,this.zoom,J),Fr.addFeatures(Se,this.tileID.canonical,ci.patternPositions))}return this.status="done",{buckets:Object.values(Pe).filter(dn=>!dn.isEmpty()),featureIndex:Q,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:vr.image,imageAtlas:ci,glyphMap:this.returnDependencies?tn:null,iconMap:this.returnDependencies?Mn:null,glyphPositions:this.returnDependencies?vr.positions:null}})}}function S(me,q,Z){const J=new c.a8(q);for(const le of me)le.recalculate(J,Z)}class E{constructor(q,Z,J){this.actor=q,this.layerIndex=Z,this.availableImages=J,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(q,Z){return c._(this,void 0,void 0,function*(){const J=yield c.l(q.request,Z);try{return{vectorTile:new c.bq.VectorTile(new c.br(J.data)),rawData:J.data,cacheControl:J.cacheControl,expires:J.expires}}catch(le){const Te=new Uint8Array(J.data);let Q=`Unable to parse the tile at ${q.request.url}, `;throw Q+=Te[0]===31&&Te[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${le.messge}`,new Error(Q)}})}loadTile(q){return c._(this,void 0,void 0,function*(){const Z=q.uid,J=!!(q&&q.request&&q.request.collectResourceTiming)&&new c.bs(q.request),le=new v(q);this.loading[Z]=le;const Te=new AbortController;le.abort=Te;try{const Q=yield this.loadVectorTile(q,Te);if(delete this.loading[Z],!Q)return null;const Pe=Q.rawData,Se={};Q.expires&&(Se.expires=Q.expires),Q.cacheControl&&(Se.cacheControl=Q.cacheControl);const Ne={};if(J){const Ye=J.finish();Ye&&(Ne.resourceTiming=JSON.parse(JSON.stringify(Ye)))}le.vectorTile=Q.vectorTile;const qe=le.parse(Q.vectorTile,this.layerIndex,this.availableImages,this.actor);this.loaded[Z]=le,this.fetching[Z]={rawTileData:Pe,cacheControl:Se,resourceTiming:Ne};try{const Ye=yield qe;return c.e({rawTileData:Pe.slice(0)},Ye,Se,Ne)}finally{delete this.fetching[Z]}}catch(Q){throw delete this.loading[Z],le.status="done",this.loaded[Z]=le,Q}})}reloadTile(q){return c._(this,void 0,void 0,function*(){const Z=q.uid;if(!this.loaded||!this.loaded[Z])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");const J=this.loaded[Z];if(J.showCollisionBoxes=q.showCollisionBoxes,J.status==="parsing"){const le=yield J.parse(J.vectorTile,this.layerIndex,this.availableImages,this.actor);let Te;if(this.fetching[Z]){const{rawTileData:Q,cacheControl:Pe,resourceTiming:Se}=this.fetching[Z];delete this.fetching[Z],Te=c.e({rawTileData:Q.slice(0)},le,Pe,Se)}else Te=le;return Te}if(J.status==="done"&&J.vectorTile)return J.parse(J.vectorTile,this.layerIndex,this.availableImages,this.actor)})}abortTile(q){return c._(this,void 0,void 0,function*(){const Z=this.loading,J=q.uid;Z&&Z[J]&&Z[J].abort&&(Z[J].abort.abort(),delete Z[J])})}removeTile(q){return c._(this,void 0,void 0,function*(){this.loaded&&this.loaded[q.uid]&&delete this.loaded[q.uid]})}}class C{constructor(){this.loaded={}}loadTile(q){return c._(this,void 0,void 0,function*(){const{uid:Z,encoding:J,rawImageData:le,redFactor:Te,greenFactor:Q,blueFactor:Pe,baseShift:Se}=q,Ne=le.width+2,qe=le.height+2,Ye=c.b(le)?new c.R({width:Ne,height:qe},yield c.bt(le,-1,-1,Ne,qe)):le,Je=new c.bu(Z,Ye,J,Te,Q,Pe,Se);return this.loaded=this.loaded||{},this.loaded[Z]=Je,Je})}removeTile(q){const Z=this.loaded,J=q.uid;Z&&Z[J]&&delete Z[J]}}function M(me,q){if(me.length!==0){A(me[0],q);for(var Z=1;Z=Math.abs(Pe)?Z-Se+Pe:Pe-Se+Z,Z=Se}Z+J>=0!=!!q&&me.reverse()}var R=c.bv(function me(q,Z){var J,le=q&&q.type;if(le==="FeatureCollection")for(J=0;J>31}function tt(me,q){for(var Z=me.loadGeometry(),J=me.type,le=0,Te=0,Q=Z.length,Pe=0;Peme},Gt=Math.fround||(vt=new Float32Array(1),me=>(vt[0]=+me,vt[0]));var vt;const At=3,Mt=5,rn=6;class wn{constructor(q){this.options=Object.assign(Object.create(Ot),q),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(q){const{log:Z,minZoom:J,maxZoom:le}=this.options;Z&&console.time("total time");const Te=`prepare ${q.length} points`;Z&&console.time(Te),this.points=q;const Q=[];for(let Se=0;Se=J;Se--){const Ne=+Date.now();Pe=this.trees[Se]=this._createTree(this._cluster(Pe,Se)),Z&&console.log("z%d: %d clusters in %dms",Se,Pe.numItems,+Date.now()-Ne)}return Z&&console.timeEnd("total time"),this}getClusters(q,Z){let J=((q[0]+180)%360+360)%360-180;const le=Math.max(-90,Math.min(90,q[1]));let Te=q[2]===180?180:((q[2]+180)%360+360)%360-180;const Q=Math.max(-90,Math.min(90,q[3]));if(q[2]-q[0]>=360)J=-180,Te=180;else if(J>Te){const Ye=this.getClusters([J,le,180,Q],Z),Je=this.getClusters([-180,le,Te,Q],Z);return Ye.concat(Je)}const Pe=this.trees[this._limitZoom(Z)],Se=Pe.range(pn(J),Yn(Q),pn(Te),Yn(le)),Ne=Pe.data,qe=[];for(const Ye of Se){const Je=this.stride*Ye;qe.push(Ne[Je+Mt]>1?fn(Ne,Je,this.clusterProps):this.points[Ne[Je+At]])}return qe}getChildren(q){const Z=this._getOriginId(q),J=this._getOriginZoom(q),le="No cluster with the specified id.",Te=this.trees[J];if(!Te)throw new Error(le);const Q=Te.data;if(Z*this.stride>=Q.length)throw new Error(le);const Pe=this.options.radius/(this.options.extent*Math.pow(2,J-1)),Se=Te.within(Q[Z*this.stride],Q[Z*this.stride+1],Pe),Ne=[];for(const qe of Se){const Ye=qe*this.stride;Q[Ye+4]===q&&Ne.push(Q[Ye+Mt]>1?fn(Q,Ye,this.clusterProps):this.points[Q[Ye+At]])}if(Ne.length===0)throw new Error(le);return Ne}getLeaves(q,Z,J){const le=[];return this._appendLeaves(le,q,Z=Z||10,J=J||0,0),le}getTile(q,Z,J){const le=this.trees[this._limitZoom(q)],Te=Math.pow(2,q),{extent:Q,radius:Pe}=this.options,Se=Pe/Q,Ne=(J-Se)/Te,qe=(J+1+Se)/Te,Ye={features:[]};return this._addTileFeatures(le.range((Z-Se)/Te,Ne,(Z+1+Se)/Te,qe),le.data,Z,J,Te,Ye),Z===0&&this._addTileFeatures(le.range(1-Se/Te,Ne,1,qe),le.data,Te,J,Te,Ye),Z===Te-1&&this._addTileFeatures(le.range(0,Ne,Se/Te,qe),le.data,-1,J,Te,Ye),Ye.features.length?Ye:null}getClusterExpansionZoom(q){let Z=this._getOriginZoom(q)-1;for(;Z<=this.options.maxZoom;){const J=this.getChildren(q);if(Z++,J.length!==1)break;q=J[0].properties.cluster_id}return Z}_appendLeaves(q,Z,J,le,Te){const Q=this.getChildren(Z);for(const Pe of Q){const Se=Pe.properties;if(Se&&Se.cluster?Te+Se.point_count<=le?Te+=Se.point_count:Te=this._appendLeaves(q,Se.cluster_id,J,le,Te):Te1;let qe,Ye,Je;if(Ne)qe=_n(Z,Se,this.clusterProps),Ye=Z[Se],Je=Z[Se+1];else{const Qt=this.points[Z[Se+At]];qe=Qt.properties;const[tn,Mn]=Qt.geometry.coordinates;Ye=pn(tn),Je=Yn(Mn)}const Dt={type:1,geometry:[[Math.round(this.options.extent*(Ye*Te-J)),Math.round(this.options.extent*(Je*Te-le))]],tags:qe};let zt;zt=Ne||this.options.generateId?Z[Se+At]:this.points[Z[Se+At]].id,zt!==void 0&&(Dt.id=zt),Q.features.push(Dt)}}_limitZoom(q){return Math.max(this.options.minZoom,Math.min(Math.floor(+q),this.options.maxZoom+1))}_cluster(q,Z){const{radius:J,extent:le,reduce:Te,minPoints:Q}=this.options,Pe=J/(le*Math.pow(2,Z)),Se=q.data,Ne=[],qe=this.stride;for(let Ye=0;YeZ&&(tn+=Se[er+Mt])}if(tn>Qt&&tn>=Q){let Mn,er=Je*Qt,vr=Dt*Qt,ci=-1;const dn=((Ye/qe|0)<<5)+(Z+1)+this.points.length;for(const Fr of zt){const _i=Fr*qe;if(Se[_i+2]<=Z)continue;Se[_i+2]=Z;const uo=Se[_i+Mt];er+=Se[_i]*uo,vr+=Se[_i+1]*uo,Se[_i+4]=dn,Te&&(Mn||(Mn=this._map(Se,Ye,!0),ci=this.clusterProps.length,this.clusterProps.push(Mn)),Te(Mn,this._map(Se,_i)))}Se[Ye+4]=dn,Ne.push(er/tn,vr/tn,1/0,dn,-1,tn),Te&&Ne.push(ci)}else{for(let Mn=0;Mn1)for(const Mn of zt){const er=Mn*qe;if(!(Se[er+2]<=Z)){Se[er+2]=Z;for(let vr=0;vr>5}_getOriginZoom(q){return(q-this.points.length)%32}_map(q,Z,J){if(q[Z+Mt]>1){const Q=this.clusterProps[q[Z+rn]];return J?Object.assign({},Q):Q}const le=this.points[q[Z+At]].properties,Te=this.options.map(le);return J&&Te===le?Object.assign({},Te):Te}}function fn(me,q,Z){return{type:"Feature",id:me[q+At],properties:_n(me,q,Z),geometry:{type:"Point",coordinates:[(J=me[q],360*(J-.5)),zr(me[q+1])]}};var J}function _n(me,q,Z){const J=me[q+Mt],le=J>=1e4?`${Math.round(J/1e3)}k`:J>=1e3?Math.round(J/100)/10+"k":J,Te=me[q+rn],Q=Te===-1?{}:Object.assign({},Z[Te]);return Object.assign(Q,{cluster:!0,cluster_id:me[q+At],point_count:J,point_count_abbreviated:le})}function pn(me){return me/360+.5}function Yn(me){const q=Math.sin(me*Math.PI/180),Z=.5-.25*Math.log((1+q)/(1-q))/Math.PI;return Z<0?0:Z>1?1:Z}function zr(me){const q=(180-360*me)*Math.PI/180;return 360*Math.atan(Math.exp(q))/Math.PI-90}function Pn(me,q,Z,J){for(var le,Te=J,Q=Z-q>>1,Pe=Z-q,Se=me[q],Ne=me[q+1],qe=me[Z],Ye=me[Z+1],Je=q+3;JeTe)le=Je,Te=Dt;else if(Dt===Te){var zt=Math.abs(Je-Q);ztJ&&(le-q>3&&Pn(me,q,le,J),me[le+2]=Te,Z-le>3&&Pn(me,le,Z,J))}function ar(me,q,Z,J,le,Te){var Q=le-Z,Pe=Te-J;if(Q!==0||Pe!==0){var Se=((me-Z)*Q+(q-J)*Pe)/(Q*Q+Pe*Pe);Se>1?(Z=le,J=Te):Se>0&&(Z+=Q*Se,J+=Pe*Se)}return(Q=me-Z)*Q+(Pe=q-J)*Pe}function Zn(me,q,Z,J){var le={id:me===void 0?null:me,type:q,geometry:Z,tags:J,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(Te){var Q=Te.geometry,Pe=Te.type;if(Pe==="Point"||Pe==="MultiPoint"||Pe==="LineString")ne(Te,Q);else if(Pe==="Polygon"||Pe==="MultiLineString")for(var Se=0;Se0&&(Q+=J?(le*Ne-Se*Te)/2:Math.sqrt(Math.pow(Se-le,2)+Math.pow(Ne-Te,2))),le=Se,Te=Ne}var qe=q.length-3;q[2]=1,Pn(q,0,qe,Z),q[qe+2]=1,q.size=Math.abs(Q),q.start=0,q.end=q.size}function Re(me,q,Z,J){for(var le=0;le1?1:Z}function yn(me,q,Z,J,le,Te,Q,Pe){if(J/=q,Te>=(Z/=q)&&Q=J)return null;for(var Se=[],Ne=0;Ne=Z&&zt=J)){var Qt=[];if(Je==="Point"||Je==="MultiPoint")cr(Ye,Qt,Z,J,le);else if(Je==="LineString")Uo(Ye,Qt,Z,J,le,!1,Pe.lineMetrics);else if(Je==="MultiLineString")Ks(Ye,Qt,Z,J,le,!1);else if(Je==="Polygon")Ks(Ye,Qt,Z,J,le,!0);else if(Je==="MultiPolygon")for(var tn=0;tn=Z&&Q<=J&&(q.push(me[Te]),q.push(me[Te+1]),q.push(me[Te+2]))}}function Uo(me,q,Z,J,le,Te,Q){for(var Pe,Se,Ne=Cs(me),qe=le===0?Fi:zl,Ye=me.start,Je=0;JeZ&&(Se=qe(Ne,Dt,zt,tn,Mn,Z),Q&&(Ne.start=Ye+Pe*Se)):er>J?vr=Z&&(Se=qe(Ne,Dt,zt,tn,Mn,Z),ci=!0),vr>J&&er<=J&&(Se=qe(Ne,Dt,zt,tn,Mn,J),ci=!0),!Te&&ci&&(Q&&(Ne.end=Ye+Pe*Se),q.push(Ne),Ne=Cs(me)),Q&&(Ye+=Pe)}var dn=me.length-3;Dt=me[dn],zt=me[dn+1],Qt=me[dn+2],(er=le===0?Dt:zt)>=Z&&er<=J&&tl(Ne,Dt,zt,Qt),dn=Ne.length-3,Te&&dn>=3&&(Ne[dn]!==Ne[0]||Ne[dn+1]!==Ne[1])&&tl(Ne,Ne[0],Ne[1],Ne[2]),Ne.length&&q.push(Ne)}function Cs(me){var q=[];return q.size=me.size,q.start=me.start,q.end=me.end,q}function Ks(me,q,Z,J,le,Te){for(var Q=0;QQ.maxX&&(Q.maxX=qe),Ye>Q.maxY&&(Q.maxY=Ye)}return Q}function ui(me,q,Z,J){var le=q.geometry,Te=q.type,Q=[];if(Te==="Point"||Te==="MultiPoint")for(var Pe=0;Pe0&&q.size<(le?Q:J))Z.numPoints+=q.length/3;else{for(var Pe=[],Se=0;SeQ)&&(Z.numSimplified++,Pe.push(q[Se]),Pe.push(q[Se+1])),Z.numPoints++;le&&function(Ne,qe){for(var Ye=0,Je=0,Dt=Ne.length,zt=Dt-2;Je0===qe)for(Je=0,Dt=Ne.length;Je

24)throw new Error("maxZoom should be in the 0-24 range");if(q.promoteId&&q.generateId)throw new Error("promoteId and generateId cannot be used together.");var J=function(le,Te){var Q=[];if(le.type==="FeatureCollection")for(var Pe=0;Pe1&&console.time("creation"),Je=this.tiles[Ye]=Fl(me,q,Z,J,Se),this.tileCoords.push({z:q,x:Z,y:J}),Ne)){Ne>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",q,Z,J,Je.numFeatures,Je.numPoints,Je.numSimplified),console.timeEnd("creation"));var Dt="z"+q;this.stats[Dt]=(this.stats[Dt]||0)+1,this.total++}if(Je.source=me,le){if(q===Se.maxZoom||q===le)continue;var zt=1<1&&console.time("clipping");var Qt,tn,Mn,er,vr,ci,dn=.5*Se.buffer/Se.extent,Fr=.5-dn,_i=.5+dn,uo=1+dn;Qt=tn=Mn=er=null,vr=yn(me,qe,Z-dn,Z+_i,0,Je.minX,Je.maxX,Se),ci=yn(me,qe,Z+Fr,Z+uo,0,Je.minX,Je.maxX,Se),me=null,vr&&(Qt=yn(vr,qe,J-dn,J+_i,1,Je.minY,Je.maxY,Se),tn=yn(vr,qe,J+Fr,J+uo,1,Je.minY,Je.maxY,Se),vr=null),ci&&(Mn=yn(ci,qe,J-dn,J+_i,1,Je.minY,Je.maxY,Se),er=yn(ci,qe,J+Fr,J+uo,1,Je.minY,Je.maxY,Se),ci=null),Ne>1&&console.timeEnd("clipping"),Pe.push(Qt||[],q+1,2*Z,2*J),Pe.push(tn||[],q+1,2*Z,2*J+1),Pe.push(Mn||[],q+1,2*Z+1,2*J),Pe.push(er||[],q+1,2*Z+1,2*J+1)}}},ln.prototype.getTile=function(me,q,Z){var J=this.options,le=J.extent,Te=J.debug;if(me<0||me>24)return null;var Q=1<1&&console.log("drilling down to z%d-%d-%d",me,q,Z);for(var Se,Ne=me,qe=q,Ye=Z;!Se&&Ne>0;)Ne--,qe=Math.floor(qe/2),Ye=Math.floor(Ye/2),Se=this.tiles[sn(Ne,qe,Ye)];return Se&&Se.source?(Te>1&&console.log("found parent tile z%d-%d-%d",Ne,qe,Ye),Te>1&&console.time("drilling down"),this.splitTile(Se.source,Ne,qe,Ye,me,q,Z),Te>1&&console.timeEnd("drilling down"),this.tiles[Pe]?ls(this.tiles[Pe],le):null):null};class Aa extends E{constructor(){super(...arguments),this._dataUpdateable=new Map}loadVectorTile(q,Z){return c._(this,void 0,void 0,function*(){const J=q.tileID.canonical;if(!this._geoJSONIndex)throw new Error("Unable to parse the data into a cluster or geojson");const le=this._geoJSONIndex.getTile(J.z,J.x,J.y);if(!le)return null;const Te=new class{constructor(Pe){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=c.W,this.length=Pe.length,this._features=Pe}feature(Pe){return new class{constructor(Se){this._feature=Se,this.extent=c.W,this.type=Se.type,this.properties=Se.tags,"id"in Se&&!isNaN(Se.id)&&(this.id=parseInt(Se.id,10))}loadGeometry(){if(this._feature.type===1){const Se=[];for(const Ne of this._feature.geometry)Se.push([new c.P(Ne[0],Ne[1])]);return Se}{const Se=[];for(const Ne of this._feature.geometry){const qe=[];for(const Ye of Ne)qe.push(new c.P(Ye[0],Ye[1]));Se.push(qe)}return Se}}toGeoJSON(Se,Ne,qe){return z.call(this,Se,Ne,qe)}}(this._features[Pe])}}(le.features);let Q=He(Te);return Q.byteOffset===0&&Q.byteLength===Q.buffer.byteLength||(Q=new Uint8Array(Q)),{vectorTile:Te,rawData:Q.buffer}})}loadData(q){return c._(this,void 0,void 0,function*(){var Z;(Z=this._pendingRequest)===null||Z===void 0||Z.abort();const J=!!(q&&q.request&&q.request.collectResourceTiming)&&new c.bs(q.request);this._pendingRequest=new AbortController;try{let le=yield this.loadGeoJSON(q,this._pendingRequest);if(delete this._pendingRequest,typeof le!="object")throw new Error(`Input data given to '${q.source}' is not a valid GeoJSON object.`);if(R(le,!0),q.filter){const Q=c.by(q.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(Q.result==="error")throw new Error(Q.value.map(Se=>`${Se.key}: ${Se.message}`).join(", "));le={type:"FeatureCollection",features:le.features.filter(Se=>Q.value.evaluate({zoom:0},Se))}}this._geoJSONIndex=q.cluster?new wn(function({superclusterOptions:Q,clusterProperties:Pe}){if(!Pe||!Q)return Q;const Se={},Ne={},qe={accumulated:null,zoom:0},Ye={properties:null},Je=Object.keys(Pe);for(const Dt of Je){const[zt,Qt]=Pe[Dt],tn=c.by(Qt),Mn=c.by(typeof zt=="string"?[zt,["accumulated"],["get",Dt]]:zt);Se[Dt]=tn.value,Ne[Dt]=Mn.value}return Q.map=Dt=>{Ye.properties=Dt;const zt={};for(const Qt of Je)zt[Qt]=Se[Qt].evaluate(qe,Ye);return zt},Q.reduce=(Dt,zt)=>{Ye.properties=zt;for(const Qt of Je)qe.accumulated=Dt[Qt],Dt[Qt]=Ne[Qt].evaluate(qe,Ye)},Q}(q)).load(le.features):function(Q,Pe){return new ln(Q,Pe)}(le,q.geojsonVtOptions),this.loaded={};const Te={};if(J){const Q=J.finish();Q&&(Te.resourceTiming={},Te.resourceTiming[q.source]=JSON.parse(JSON.stringify(Q)))}return Te}catch(le){if(delete this._pendingRequest,c.bz(le))return{abandoned:!0};throw le}})}reloadTile(q){const Z=this.loaded;return Z&&Z[q.uid]?super.reloadTile(q):this.loadTile(q)}loadGeoJSON(q,Z){return c._(this,void 0,void 0,function*(){const{promoteId:J}=q;if(q.request){const le=yield c.h(q.request,Z);return this._dataUpdateable=us(le.data,J)?on(le.data,J):void 0,le.data}if(typeof q.data=="string")try{const le=JSON.parse(q.data);return this._dataUpdateable=us(le,J)?on(le,J):void 0,le}catch{throw new Error(`Input data given to '${q.source}' is not a valid GeoJSON object.`)}if(!q.dataDiff)throw new Error(`Input data given to '${q.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${q.source}`);return function(le,Te,Q){var Pe,Se,Ne,qe;if(Te.removeAll&&le.clear(),Te.remove)for(const Ye of Te.remove)le.delete(Ye);if(Te.add)for(const Ye of Te.add){const Je=Hr(Ye,Q);Je!=null&&le.set(Je,Ye)}if(Te.update)for(const Ye of Te.update){let Je=le.get(Ye.id);if(Je==null)continue;const Dt=!Ye.removeAllProperties&&(((Pe=Ye.removeProperties)===null||Pe===void 0?void 0:Pe.length)>0||((Se=Ye.addOrUpdateProperties)===null||Se===void 0?void 0:Se.length)>0);if((Ye.newGeometry||Ye.removeAllProperties||Dt)&&(Je=Object.assign({},Je),le.set(Ye.id,Je),Dt&&(Je.properties=Object.assign({},Je.properties))),Ye.newGeometry&&(Je.geometry=Ye.newGeometry),Ye.removeAllProperties)Je.properties={};else if(((Ne=Ye.removeProperties)===null||Ne===void 0?void 0:Ne.length)>0)for(const zt of Ye.removeProperties)Object.prototype.hasOwnProperty.call(Je.properties,zt)&&delete Je.properties[zt];if(((qe=Ye.addOrUpdateProperties)===null||qe===void 0?void 0:qe.length)>0)for(const{key:zt,value:Qt}of Ye.addOrUpdateProperties)Je.properties[zt]=Qt}}(this._dataUpdateable,q.dataDiff,J),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}})}removeSource(q){return c._(this,void 0,void 0,function*(){this._pendingRequest&&this._pendingRequest.abort()})}getClusterExpansionZoom(q){return this._geoJSONIndex.getClusterExpansionZoom(q.clusterId)}getClusterChildren(q){return this._geoJSONIndex.getChildren(q.clusterId)}getClusterLeaves(q){return this._geoJSONIndex.getLeaves(q.clusterId,q.limit,q.offset)}}class Jr{constructor(q){this.self=q,this.actor=new c.C(q),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.self.registerWorkerSource=(Z,J)=>{if(this.externalWorkerSourceTypes[Z])throw new Error(`Worker source with name "${Z}" already registered.`);this.externalWorkerSourceTypes[Z]=J},this.self.addProtocol=c.bf,this.self.removeProtocol=c.bg,this.self.registerRTLTextPlugin=Z=>{if(c.bA.isParsed())throw new Error("RTL text plugin already registered.");c.bA.setMethods(Z)},this.actor.registerMessageHandler("LDT",(Z,J)=>this._getDEMWorkerSource(Z,J.source).loadTile(J)),this.actor.registerMessageHandler("RDT",(Z,J)=>c._(this,void 0,void 0,function*(){this._getDEMWorkerSource(Z,J.source).removeTile(J)})),this.actor.registerMessageHandler("GCEZ",(Z,J)=>c._(this,void 0,void 0,function*(){return this._getWorkerSource(Z,J.type,J.source).getClusterExpansionZoom(J)})),this.actor.registerMessageHandler("GCC",(Z,J)=>c._(this,void 0,void 0,function*(){return this._getWorkerSource(Z,J.type,J.source).getClusterChildren(J)})),this.actor.registerMessageHandler("GCL",(Z,J)=>c._(this,void 0,void 0,function*(){return this._getWorkerSource(Z,J.type,J.source).getClusterLeaves(J)})),this.actor.registerMessageHandler("LD",(Z,J)=>this._getWorkerSource(Z,J.type,J.source).loadData(J)),this.actor.registerMessageHandler("LT",(Z,J)=>this._getWorkerSource(Z,J.type,J.source).loadTile(J)),this.actor.registerMessageHandler("RT",(Z,J)=>this._getWorkerSource(Z,J.type,J.source).reloadTile(J)),this.actor.registerMessageHandler("AT",(Z,J)=>this._getWorkerSource(Z,J.type,J.source).abortTile(J)),this.actor.registerMessageHandler("RMT",(Z,J)=>this._getWorkerSource(Z,J.type,J.source).removeTile(J)),this.actor.registerMessageHandler("RS",(Z,J)=>c._(this,void 0,void 0,function*(){if(!this.workerSources[Z]||!this.workerSources[Z][J.type]||!this.workerSources[Z][J.type][J.source])return;const le=this.workerSources[Z][J.type][J.source];delete this.workerSources[Z][J.type][J.source],le.removeSource!==void 0&&le.removeSource(J)})),this.actor.registerMessageHandler("RM",Z=>c._(this,void 0,void 0,function*(){delete this.layerIndexes[Z],delete this.availableImages[Z],delete this.workerSources[Z],delete this.demWorkerSources[Z]})),this.actor.registerMessageHandler("SR",(Z,J)=>c._(this,void 0,void 0,function*(){this.referrer=J})),this.actor.registerMessageHandler("SRPS",(Z,J)=>this._syncRTLPluginState(Z,J)),this.actor.registerMessageHandler("IS",(Z,J)=>c._(this,void 0,void 0,function*(){this.self.importScripts(J)})),this.actor.registerMessageHandler("SI",(Z,J)=>this._setImages(Z,J)),this.actor.registerMessageHandler("UL",(Z,J)=>c._(this,void 0,void 0,function*(){this._getLayerIndex(Z).update(J.layers,J.removedIds)})),this.actor.registerMessageHandler("SL",(Z,J)=>c._(this,void 0,void 0,function*(){this._getLayerIndex(Z).replace(J)}))}_setImages(q,Z){return c._(this,void 0,void 0,function*(){this.availableImages[q]=Z;for(const J in this.workerSources[q]){const le=this.workerSources[q][J];for(const Te in le)le[Te].availableImages=Z}})}_syncRTLPluginState(q,Z){return c._(this,void 0,void 0,function*(){if(c.bA.isParsed())return c.bA.getState();if(Z.pluginStatus!=="loading")return c.bA.setState(Z),Z;const J=Z.pluginURL;if(this.self.importScripts(J),c.bA.isParsed()){const le={pluginStatus:"loaded",pluginURL:J};return c.bA.setState(le),le}throw c.bA.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${J}`)})}_getAvailableImages(q){let Z=this.availableImages[q];return Z||(Z=[]),Z}_getLayerIndex(q){let Z=this.layerIndexes[q];return Z||(Z=this.layerIndexes[q]=new l),Z}_getWorkerSource(q,Z,J){if(this.workerSources[q]||(this.workerSources[q]={}),this.workerSources[q][Z]||(this.workerSources[q][Z]={}),!this.workerSources[q][Z][J]){const le={sendAsync:(Te,Q)=>(Te.targetMapId=q,this.actor.sendAsync(Te,Q))};switch(Z){case"vector":this.workerSources[q][Z][J]=new E(le,this._getLayerIndex(q),this._getAvailableImages(q));break;case"geojson":this.workerSources[q][Z][J]=new Aa(le,this._getLayerIndex(q),this._getAvailableImages(q));break;default:this.workerSources[q][Z][J]=new this.externalWorkerSourceTypes[Z](le,this._getLayerIndex(q),this._getAvailableImages(q))}}return this.workerSources[q][Z][J]}_getDEMWorkerSource(q,Z){return this.demWorkerSources[q]||(this.demWorkerSources[q]={}),this.demWorkerSources[q][Z]||(this.demWorkerSources[q][Z]=new C),this.demWorkerSources[q][Z]}}return c.i(self)&&(self.worker=new Jr(self)),Jr}),i("index",["exports","./shared"],function(c,l){var d="4.1.3";let v,S;const E={now:typeof performance<"u"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frameAsync:y=>new Promise((a,f)=>{const m=requestAnimationFrame(a);y.signal.addEventListener("abort",()=>{cancelAnimationFrame(m),f(l.c())})}),getImageData(y,a=0){return this.getImageCanvasContext(y).getImageData(-a,-a,y.width+2*a,y.height+2*a)},getImageCanvasContext(y){const a=window.document.createElement("canvas"),f=a.getContext("2d",{willReadFrequently:!0});if(!f)throw new Error("failed to create canvas 2d context");return a.width=y.width,a.height=y.height,f.drawImage(y,0,0,y.width,y.height),f},resolveURL:y=>(v||(v=document.createElement("a")),v.href=y,v.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(S==null&&(S=matchMedia("(prefers-reduced-motion: reduce)")),S.matches)}};class C{static testProp(a){if(!C.docStyle)return a[0];for(let f=0;f{window.removeEventListener("click",C.suppressClickInternal,!0)},0)}static getScale(a){const f=a.getBoundingClientRect();return{x:f.width/a.offsetWidth||1,y:f.height/a.offsetHeight||1,boundingClientRect:f}}static getPoint(a,f,m){const g=f.boundingClientRect;return new l.P((m.clientX-g.left)/f.x-a.clientLeft,(m.clientY-g.top)/f.y-a.clientTop)}static mousePos(a,f){const m=C.getScale(a);return C.getPoint(a,m,f)}static touchPos(a,f){const m=[],g=C.getScale(a);for(let b=0;b{a=[],f=0,m=0,g={}},y.addThrottleControl=k=>{const N=m++;return g[N]=k,N},y.removeThrottleControl=k=>{delete g[k],T()},y.getImage=(k,N,V=!0)=>new Promise((j,$)=>{M.supported&&(k.headers||(k.headers={}),k.headers.accept="image/webp,*/*"),l.e(k,{type:"image"}),a.push({abortController:N,requestParameters:k,supportImageRefresh:V,state:"queued",onError:he=>{$(he)},onSuccess:he=>{j(he)}}),T()});const b=k=>l._(this,void 0,void 0,function*(){k.state="running";const{requestParameters:N,supportImageRefresh:V,onError:j,onSuccess:$,abortController:he}=k,ce=V===!1&&!l.i(self)&&!l.g(N.url)&&(!N.headers||Object.keys(N.headers).reduce((Ce,Be)=>Ce&&Be==="accept",!0));f++;const ge=ce?L(N,he):l.m(N,he);try{const Ce=yield ge;delete k.abortController,k.state="completed",Ce.data instanceof HTMLImageElement||l.b(Ce.data)?$(Ce):Ce.data&&$({data:yield(re=Ce.data,typeof createImageBitmap=="function"?l.d(re):l.f(re)),cacheControl:Ce.cacheControl,expires:Ce.expires})}catch(Ce){delete k.abortController,j(Ce)}finally{f--,T()}var re}),T=()=>{const k=(()=>{for(const N of Object.keys(g))if(g[N]())return!0;return!1})()?l.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:l.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let N=f;N0;N++){const V=a.shift();V.abortController.signal.aborted?N--:b(V)}},L=(k,N)=>new Promise((V,j)=>{const $=new Image,he=k.url,ce=k.credentials;ce&&ce==="include"?$.crossOrigin="use-credentials":(ce&&ce==="same-origin"||!l.s(he))&&($.crossOrigin="anonymous"),N.signal.addEventListener("abort",()=>{$.src="",j(l.c())}),$.fetchPriority="high",$.onload=()=>{$.onerror=$.onload=null,V({data:$})},$.onerror=()=>{$.onerror=$.onload=null,N.signal.aborted||j(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))},$.src=he})}(G||(G={})),G.resetRequestQueue();class H{constructor(a){this._transformRequestFn=a}transformRequest(a,f){return this._transformRequestFn&&this._transformRequestFn(a,f)||{url:a}}normalizeSpriteURL(a,f,m){const g=function(b){const T=b.match(te);if(!T)throw new Error(`Unable to parse URL "${b}"`);return{protocol:T[1],authority:T[2],path:T[3]||"/",params:T[4]?T[4].split("&"):[]}}(a);return g.path+=`${f}${m}`,function(b){const T=b.params.length?`?${b.params.join("&")}`:"";return`${b.protocol}://${b.authority}${b.path}${T}`}(g)}setTransformRequest(a){this._transformRequestFn=a}}const te=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function ee(y){var a=new l.A(3);return a[0]=y[0],a[1]=y[1],a[2]=y[2],a}var fe,pe=function(y,a,f){return y[0]=a[0]-f[0],y[1]=a[1]-f[1],y[2]=a[2]-f[2],y};fe=new l.A(3),l.A!=Float32Array&&(fe[0]=0,fe[1]=0,fe[2]=0);var se=function(y){var a=y[0],f=y[1];return a*a+f*f};function Ae(y){const a=[];if(typeof y=="string")a.push({id:"default",url:y});else if(y&&y.length>0){const f=[];for(const{id:m,url:g}of y){const b=`${m}${g}`;f.indexOf(b)===-1&&(f.push(b),a.push({id:m,url:g}))}}return a}(function(){var y=new l.A(2);l.A!=Float32Array&&(y[0]=0,y[1]=0)})();class Y{constructor(a,f,m,g){this.context=a,this.format=m,this.texture=a.gl.createTexture(),this.update(f,g)}update(a,f,m){const{width:g,height:b}=a,T=!(this.size&&this.size[0]===g&&this.size[1]===b||m),{context:L}=this,{gl:k}=L;if(this.useMipmap=!!(f&&f.useMipmap),k.bindTexture(k.TEXTURE_2D,this.texture),L.pixelStoreUnpackFlipY.set(!1),L.pixelStoreUnpack.set(1),L.pixelStoreUnpackPremultiplyAlpha.set(this.format===k.RGBA&&(!f||f.premultiply!==!1)),T)this.size=[g,b],a instanceof HTMLImageElement||a instanceof HTMLCanvasElement||a instanceof HTMLVideoElement||a instanceof ImageData||l.b(a)?k.texImage2D(k.TEXTURE_2D,0,this.format,this.format,k.UNSIGNED_BYTE,a):k.texImage2D(k.TEXTURE_2D,0,this.format,g,b,0,this.format,k.UNSIGNED_BYTE,a.data);else{const{x:N,y:V}=m||{x:0,y:0};a instanceof HTMLImageElement||a instanceof HTMLCanvasElement||a instanceof HTMLVideoElement||a instanceof ImageData||l.b(a)?k.texSubImage2D(k.TEXTURE_2D,0,N,V,k.RGBA,k.UNSIGNED_BYTE,a):k.texSubImage2D(k.TEXTURE_2D,0,N,V,g,b,k.RGBA,k.UNSIGNED_BYTE,a.data)}this.useMipmap&&this.isSizePowerOfTwo()&&k.generateMipmap(k.TEXTURE_2D)}bind(a,f,m){const{context:g}=this,{gl:b}=g;b.bindTexture(b.TEXTURE_2D,this.texture),m!==b.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(m=b.LINEAR),a!==this.filter&&(b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MAG_FILTER,a),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MIN_FILTER,m||a),this.filter=a),f!==this.wrap&&(b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_S,f),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_T,f),this.wrap=f)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){const{gl:a}=this.context;a.deleteTexture(this.texture),this.texture=null}}function ae(y){const{userImage:a}=y;return!!(a&&a.render&&a.render())&&(y.data.replace(new Uint8Array(a.data.buffer)),!0)}class Ke extends l.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new l.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(a){if(this.loaded!==a&&(this.loaded=a,a)){for(const{ids:f,promiseResolve:m}of this.requestors)m(this._getImagesForIds(f));this.requestors=[]}}getImage(a){const f=this.images[a];if(f&&!f.data&&f.spriteData){const m=f.spriteData;f.data=new l.R({width:m.width,height:m.height},m.context.getImageData(m.x,m.y,m.width,m.height).data),f.spriteData=null}return f}addImage(a,f){if(this.images[a])throw new Error(`Image id ${a} already exist, use updateImage instead`);this._validate(a,f)&&(this.images[a]=f)}_validate(a,f){let m=!0;const g=f.data||f.spriteData;return this._validateStretch(f.stretchX,g&&g.width)||(this.fire(new l.j(new Error(`Image "${a}" has invalid "stretchX" value`))),m=!1),this._validateStretch(f.stretchY,g&&g.height)||(this.fire(new l.j(new Error(`Image "${a}" has invalid "stretchY" value`))),m=!1),this._validateContent(f.content,f)||(this.fire(new l.j(new Error(`Image "${a}" has invalid "content" value`))),m=!1),m}_validateStretch(a,f){if(!a)return!0;let m=0;for(const g of a){if(g[0]{let g=!0;if(!this.isLoaded())for(const b of a)this.images[b]||(g=!1);this.isLoaded()||g?f(this._getImagesForIds(a)):this.requestors.push({ids:a,promiseResolve:f})})}_getImagesForIds(a){const f={};for(const m of a){let g=this.getImage(m);g||(this.fire(new l.k("styleimagemissing",{id:m})),g=this.getImage(m)),g?f[m]={data:g.data.clone(),pixelRatio:g.pixelRatio,sdf:g.sdf,version:g.version,stretchX:g.stretchX,stretchY:g.stretchY,content:g.content,hasRenderCallback:!!(g.userImage&&g.userImage.render)}:l.w(`Image "${m}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}return f}getPixelSize(){const{width:a,height:f}=this.atlasImage;return{width:a,height:f}}getPattern(a){const f=this.patterns[a],m=this.getImage(a);if(!m)return null;if(f&&f.position.version===m.version)return f.position;if(f)f.position.version=m.version;else{const g={w:m.data.width+2,h:m.data.height+2,x:0,y:0},b=new l.I(g,m);this.patterns[a]={bin:g,position:b}}return this._updatePatternAtlas(),this.patterns[a].position}bind(a){const f=a.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new Y(a,this.atlasImage,f.RGBA),this.atlasTexture.bind(f.LINEAR,f.CLAMP_TO_EDGE)}_updatePatternAtlas(){const a=[];for(const b in this.patterns)a.push(this.patterns[b].bin);const{w:f,h:m}=l.p(a),g=this.atlasImage;g.resize({width:f||1,height:m||1});for(const b in this.patterns){const{bin:T}=this.patterns[b],L=T.x+1,k=T.y+1,N=this.getImage(b).data,V=N.width,j=N.height;l.R.copy(N,g,{x:0,y:0},{x:L,y:k},{width:V,height:j}),l.R.copy(N,g,{x:0,y:j-1},{x:L,y:k-1},{width:V,height:1}),l.R.copy(N,g,{x:0,y:0},{x:L,y:k+j},{width:V,height:1}),l.R.copy(N,g,{x:V-1,y:0},{x:L-1,y:k},{width:1,height:j}),l.R.copy(N,g,{x:0,y:0},{x:L+V,y:k},{width:1,height:j})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(a){for(const f of a){if(this.callbackDispatchedThisFrame[f])continue;this.callbackDispatchedThisFrame[f]=!0;const m=this.getImage(f);m||l.w(`Image with ID: "${f}" was not found`),ae(m)&&this.updateImage(f,m)}}}const Le=1e20;function tt(y,a,f,m,g,b,T,L,k){for(let N=a;N-1);k++,b[k]=L,T[k]=N,T[k+1]=Le}for(let L=0,k=0;L65535)throw new Error("glyphs > 65535 not supported");if(m.ranges[b])return{stack:a,id:f,glyph:g};if(!this.url)throw new Error("glyphsUrl is not set");if(!m.requests[b]){const L=He.loadGlyphRange(a,b,this.url,this.requestManager);m.requests[b]=L}const T=yield m.requests[b];for(const L in T)this._doesCharSupportLocalGlyph(+L)||(m.glyphs[+L]=T[+L]);return m.ranges[b]=!0,{stack:a,id:f,glyph:T[f]||null}})}_doesCharSupportLocalGlyph(a){return!!this.localIdeographFontFamily&&(l.u["CJK Unified Ideographs"](a)||l.u["Hangul Syllables"](a)||l.u.Hiragana(a)||l.u.Katakana(a))}_tinySDF(a,f,m){const g=this.localIdeographFontFamily;if(!g||!this._doesCharSupportLocalGlyph(m))return;let b=a.tinySDF;if(!b){let L="400";/bold/i.test(f)?L="900":/medium/i.test(f)?L="500":/light/i.test(f)&&(L="200"),b=a.tinySDF=new He.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:g,fontWeight:L})}const T=b.draw(String.fromCharCode(m));return{id:m,bitmap:new l.o({width:T.width||60,height:T.height||60},T.data),metrics:{width:T.glyphWidth/2||24,height:T.glyphHeight/2||24,left:T.glyphLeft/2+.5||0,top:T.glyphTop/2-27.5||-8,advance:T.glyphAdvance/2||24,isDoubleResolution:!0}}}}He.loadGlyphRange=function(y,a,f,m){return l._(this,void 0,void 0,function*(){const g=256*a,b=g+255,T=m.transformRequest(f.replace("{fontstack}",y).replace("{range}",`${g}-${b}`),"Glyphs"),L=yield l.l(T,new AbortController);if(!L||!L.data)throw new Error(`Could not load glyph range. range: ${a}, ${g}-${b}`);const k={};for(const N of l.n(L.data))k[N.id]=N;return k})},He.TinySDF=class{constructor({fontSize:y=24,buffer:a=3,radius:f=8,cutoff:m=.25,fontFamily:g="sans-serif",fontWeight:b="normal",fontStyle:T="normal"}={}){this.buffer=a,this.cutoff=m,this.radius=f;const L=this.size=y+4*a,k=this._createCanvas(L),N=this.ctx=k.getContext("2d",{willReadFrequently:!0});N.font=`${T} ${b} ${y}px ${g}`,N.textBaseline="alphabetic",N.textAlign="left",N.fillStyle="black",this.gridOuter=new Float64Array(L*L),this.gridInner=new Float64Array(L*L),this.f=new Float64Array(L),this.z=new Float64Array(L+1),this.v=new Uint16Array(L)}_createCanvas(y){const a=document.createElement("canvas");return a.width=a.height=y,a}draw(y){const{width:a,actualBoundingBoxAscent:f,actualBoundingBoxDescent:m,actualBoundingBoxLeft:g,actualBoundingBoxRight:b}=this.ctx.measureText(y),T=Math.ceil(f),L=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(b-g))),k=Math.min(this.size-this.buffer,T+Math.ceil(m)),N=L+2*this.buffer,V=k+2*this.buffer,j=Math.max(N*V,0),$=new Uint8ClampedArray(j),he={data:$,width:N,height:V,glyphWidth:L,glyphHeight:k,glyphTop:T,glyphLeft:0,glyphAdvance:a};if(L===0||k===0)return he;const{ctx:ce,buffer:ge,gridInner:re,gridOuter:Ce}=this;ce.clearRect(ge,ge,L,k),ce.fillText(y,ge,ge+T);const Be=ce.getImageData(ge,ge,L,k);Ce.fill(Le,0,j),re.fill(0,0,j);for(let ve=0;ve0?$e*$e:0,re[Ze]=$e<0?$e*$e:0}}tt(Ce,0,0,N,V,N,this.f,this.v,this.z),tt(re,ge,ge,L,k,N,this.f,this.v,this.z);for(let ve=0;ve1&&(k=a[++L]);const V=Math.abs(N-k.left),j=Math.abs(N-k.right),$=Math.min(V,j);let he;const ce=b/m*(g+1);if(k.isDash){const ge=g-Math.abs(ce);he=Math.sqrt($*$+ge*ge)}else he=g-Math.sqrt($*$+ce*ce);this.data[T+N]=Math.max(0,Math.min(255,he+128))}}}addRegularDash(a){for(let L=a.length-1;L>=0;--L){const k=a[L],N=a[L+1];k.zeroLength?a.splice(L,1):N&&N.isDash===k.isDash&&(N.left=k.left,a.splice(L,1))}const f=a[0],m=a[a.length-1];f.isDash===m.isDash&&(f.left=m.left-this.width,m.right=f.right+this.width);const g=this.width*this.nextRow;let b=0,T=a[b];for(let L=0;L1&&(T=a[++b]);const k=Math.abs(L-T.left),N=Math.abs(L-T.right),V=Math.min(k,N);this.data[g+L]=Math.max(0,Math.min(255,(T.isDash?V:-V)+128))}}addDash(a,f){const m=f?7:0,g=2*m+1;if(this.nextRow+g>this.height)return l.w("LineAtlas out of space"),null;let b=0;for(let L=0;L{f.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[Mt]}numActive(){return Object.keys(this.active).length}}const wn=Math.floor(E.hardwareConcurrency/2);let fn,_n;function pn(){return fn||(fn=new rn),fn}rn.workerCount=l.B(globalThis)?Math.max(Math.min(wn,3),1):1;class Yn{constructor(a,f){this.workerPool=a,this.actors=[],this.currentActor=0,this.id=f;const m=this.workerPool.acquire(f);for(let g=0;g{f.remove()}),this.actors=[],a&&this.workerPool.release(this.id)}registerMessageHandler(a,f){for(const m of this.actors)m.registerMessageHandler(a,f)}}function zr(){return _n||(_n=new Yn(pn(),l.G),_n.registerMessageHandler("GR",(y,a,f)=>l.m(a,f))),_n}function Pn(y,a){const f=l.F();return l.H(f,f,[1,1,0]),l.J(f,f,[.5*y.width,.5*y.height,1]),l.K(f,f,y.calculatePosMatrix(a.toUnwrapped()))}function ar(y,a,f,m,g,b){const T=function(j,$,he){if(j)for(const ce of j){const ge=$[ce];if(ge&&ge.source===he&&ge.type==="fill-extrusion")return!0}else for(const ce in $){const ge=$[ce];if(ge.source===he&&ge.type==="fill-extrusion")return!0}return!1}(g&&g.layers,a,y.id),L=b.maxPitchScaleFactor(),k=y.tilesIn(m,L,T);k.sort(Zn);const N=[];for(const j of k)N.push({wrappedTileID:j.tileID.wrapped().key,queryResults:j.tile.queryRenderedFeatures(a,f,y._state,j.queryGeometry,j.cameraQueryGeometry,j.scale,g,b,L,Pn(y.transform,j.tileID))});const V=function(j){const $={},he={};for(const ce of j){const ge=ce.queryResults,re=ce.wrappedTileID,Ce=he[re]=he[re]||{};for(const Be in ge){const ve=ge[Be],De=Ce[Be]=Ce[Be]||{},Ve=$[Be]=$[Be]||[];for(const Ze of ve)De[Ze.featureIndex]||(De[Ze.featureIndex]=!0,Ve.push(Ze))}}return $}(N);for(const j in V)V[j].forEach($=>{const he=$.feature,ce=y.getFeatureState(he.layer["source-layer"],he.id);he.source=he.layer.source,he.layer["source-layer"]&&(he.sourceLayer=he.layer["source-layer"]),he.state=ce});return V}function Zn(y,a){const f=y.tileID,m=a.tileID;return f.overscaledZ-m.overscaledZ||f.canonical.y-m.canonical.y||f.wrap-m.wrap||f.canonical.x-m.canonical.x}function ne(y,a,f){return l._(this,void 0,void 0,function*(){let m=y;if(y.url?m=(yield l.h(a.transformRequest(y.url,"Source"),f)).data:yield E.frameAsync(f),!m)return null;const g=l.L(l.e(m,y),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in m&&m.vector_layers&&(g.vectorLayerIds=m.vector_layers.map(b=>b.id)),g})}class Me{constructor(a,f){a&&(f?this.setSouthWest(a).setNorthEast(f):Array.isArray(a)&&(a.length===4?this.setSouthWest([a[0],a[1]]).setNorthEast([a[2],a[3]]):this.setSouthWest(a[0]).setNorthEast(a[1])))}setNorthEast(a){return this._ne=a instanceof l.M?new l.M(a.lng,a.lat):l.M.convert(a),this}setSouthWest(a){return this._sw=a instanceof l.M?new l.M(a.lng,a.lat):l.M.convert(a),this}extend(a){const f=this._sw,m=this._ne;let g,b;if(a instanceof l.M)g=a,b=a;else{if(!(a instanceof Me))return Array.isArray(a)?a.length===4||a.every(Array.isArray)?this.extend(Me.convert(a)):this.extend(l.M.convert(a)):a&&("lng"in a||"lon"in a)&&"lat"in a?this.extend(l.M.convert(a)):this;if(g=a._sw,b=a._ne,!g||!b)return this}return f||m?(f.lng=Math.min(g.lng,f.lng),f.lat=Math.min(g.lat,f.lat),m.lng=Math.max(b.lng,m.lng),m.lat=Math.max(b.lat,m.lat)):(this._sw=new l.M(g.lng,g.lat),this._ne=new l.M(b.lng,b.lat)),this}getCenter(){return new l.M((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new l.M(this.getWest(),this.getNorth())}getSouthEast(){return new l.M(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(a){const{lng:f,lat:m}=l.M.convert(a);let g=this._sw.lng<=f&&f<=this._ne.lng;return this._sw.lng>this._ne.lng&&(g=this._sw.lng>=f&&f>=this._ne.lng),this._sw.lat<=m&&m<=this._ne.lat&&g}static convert(a){return a instanceof Me?a:a&&new Me(a)}static fromLngLat(a,f=0){const m=360*f/40075017,g=m/Math.cos(Math.PI/180*a.lat);return new Me(new l.M(a.lng-g,a.lat-m),new l.M(a.lng+g,a.lat+m))}}class dt{constructor(a,f,m){this.bounds=Me.convert(this.validateBounds(a)),this.minzoom=f||0,this.maxzoom=m||24}validateBounds(a){return Array.isArray(a)&&a.length===4?[Math.max(-180,a[0]),Math.max(-90,a[1]),Math.min(180,a[2]),Math.min(90,a[3])]:[-180,-90,180,90]}contains(a){const f=Math.pow(2,a.z),m=Math.floor(l.N(this.bounds.getWest())*f),g=Math.floor(l.O(this.bounds.getNorth())*f),b=Math.ceil(l.N(this.bounds.getEast())*f),T=Math.ceil(l.O(this.bounds.getSouth())*f);return a.x>=m&&a.x=g&&a.y{this._options.tiles=a}),this}setUrl(a){return this.setSourceProperty(()=>{this.url=a,this._options.url=a}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return l.e({},this._options)}loadTile(a){return l._(this,void 0,void 0,function*(){const f=a.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),m={request:this.map._requestManager.transformRequest(f,"Tile"),uid:a.uid,tileID:a.tileID,zoom:a.tileID.overscaledZ,tileSize:this.tileSize*a.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};m.request.collectResourceTiming=this._collectResourceTiming;let g="RT";if(a.actor&&a.state!=="expired"){if(a.state==="loading")return new Promise((b,T)=>{a.reloadPromise={resolve:b,reject:T}})}else a.actor=this.dispatcher.getActor(),g="LT";a.abortController=new AbortController;try{const b=yield a.actor.sendAsync({type:g,data:m},a.abortController);if(delete a.abortController,a.aborted)return;this._afterTileLoadWorkerResponse(a,b)}catch(b){if(delete a.abortController,a.aborted)return;if(b&&b.status!==404)throw b;this._afterTileLoadWorkerResponse(a,null)}})}_afterTileLoadWorkerResponse(a,f){if(f&&f.resourceTiming&&(a.resourceTiming=f.resourceTiming),f&&this.map._refreshExpiredTiles&&a.setExpiryData(f),a.loadVectorData(f,this.map.painter),a.reloadPromise){const m=a.reloadPromise;a.reloadPromise=null,this.loadTile(a).then(m.resolve).catch(m.reject)}}abortTile(a){return l._(this,void 0,void 0,function*(){a.abortController&&(a.abortController.abort(),delete a.abortController),a.actor&&(yield a.actor.sendAsync({type:"AT",data:{uid:a.uid,type:this.type,source:this.id}}))})}unloadTile(a){return l._(this,void 0,void 0,function*(){a.unloadVectorData(),a.actor&&(yield a.actor.sendAsync({type:"RMT",data:{uid:a.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}}class Re extends l.E{constructor(a,f,m,g){super(),this.id=a,this.dispatcher=m,this.setEventedParent(g),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=l.e({type:"raster"},f),l.e(this,l.L(f,["url","scheme","tileSize"]))}load(){return l._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new l.k("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{const a=yield ne(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,a&&(l.e(this,a),a.bounds&&(this.tileBounds=new dt(a.bounds,this.minzoom,this.maxzoom)),this.fire(new l.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new l.k("data",{dataType:"source",sourceDataType:"content"})))}catch(a){this._tileJSONRequest=null,this.fire(new l.j(a))}})}loaded(){return this._loaded}onAdd(a){this.map=a,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(a){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),a(),this.load()}setTiles(a){return this.setSourceProperty(()=>{this._options.tiles=a}),this}setUrl(a){return this.setSourceProperty(()=>{this.url=a,this._options.url=a}),this}serialize(){return l.e({},this._options)}hasTile(a){return!this.tileBounds||this.tileBounds.contains(a.canonical)}loadTile(a){return l._(this,void 0,void 0,function*(){const f=a.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);a.abortController=new AbortController;try{const m=yield G.getImage(this.map._requestManager.transformRequest(f,"Tile"),a.abortController,this.map._refreshExpiredTiles);if(delete a.abortController,a.aborted)return void(a.state="unloaded");if(m&&m.data){this.map._refreshExpiredTiles&&m.cacheControl&&m.expires&&a.setExpiryData({cacheControl:m.cacheControl,expires:m.expires});const g=this.map.painter.context,b=g.gl,T=m.data;a.texture=this.map.painter.getTileTexture(T.width),a.texture?a.texture.update(T,{useMipmap:!0}):(a.texture=new Y(g,T,b.RGBA,{useMipmap:!0}),a.texture.bind(b.LINEAR,b.CLAMP_TO_EDGE,b.LINEAR_MIPMAP_NEAREST),g.extTextureFilterAnisotropic&&b.texParameterf(b.TEXTURE_2D,g.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,g.extTextureFilterAnisotropicMax)),a.state="loaded"}}catch(m){if(delete a.abortController,a.aborted)a.state="unloaded";else if(m)throw a.state="errored",m}})}abortTile(a){return l._(this,void 0,void 0,function*(){a.abortController&&(a.abortController.abort(),delete a.abortController)})}unloadTile(a){return l._(this,void 0,void 0,function*(){a.texture&&this.map.painter.saveTileTexture(a.texture)})}hasTransition(){return!1}}class It extends Re{constructor(a,f,m,g){super(a,f,m,g),this.type="raster-dem",this.maxzoom=22,this._options=l.e({type:"raster-dem"},f),this.encoding=f.encoding||"mapbox",this.redFactor=f.redFactor,this.greenFactor=f.greenFactor,this.blueFactor=f.blueFactor,this.baseShift=f.baseShift}loadTile(a){return l._(this,void 0,void 0,function*(){const f=a.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),m=this.map._requestManager.transformRequest(f,"Tile");a.neighboringTiles=this._getNeighboringTiles(a.tileID),a.abortController=new AbortController;try{const g=yield G.getImage(m,a.abortController,this.map._refreshExpiredTiles);if(delete a.abortController,a.aborted)return void(a.state="unloaded");if(g&&g.data){const b=g.data;this.map._refreshExpiredTiles&&g.cacheControl&&g.expires&&a.setExpiryData({cacheControl:g.cacheControl,expires:g.expires});const T=l.b(b)&&l.S()?b:yield this.readImageNow(b),L={type:this.type,uid:a.uid,source:this.id,rawImageData:T,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(!a.actor||a.state==="expired"){a.actor=this.dispatcher.getActor();const k=yield a.actor.sendAsync({type:"LDT",data:L});a.dem=k,a.needsHillshadePrepare=!0,a.needsTerrainPrepare=!0,a.state="loaded"}}}catch(g){if(delete a.abortController,a.aborted)a.state="unloaded";else if(g)throw a.state="errored",g}})}readImageNow(a){return l._(this,void 0,void 0,function*(){if(typeof VideoFrame<"u"&&l.U()){const f=a.width+2,m=a.height+2;try{return new l.R({width:f,height:m},yield l.V(a,-1,-1,f,m))}catch{}}return E.getImageData(a,1)})}_getNeighboringTiles(a){const f=a.canonical,m=Math.pow(2,f.z),g=(f.x-1+m)%m,b=f.x===0?a.wrap-1:a.wrap,T=(f.x+1+m)%m,L=f.x+1===m?a.wrap+1:a.wrap,k={};return k[new l.Q(a.overscaledZ,b,f.z,g,f.y).key]={backfilled:!1},k[new l.Q(a.overscaledZ,L,f.z,T,f.y).key]={backfilled:!1},f.y>0&&(k[new l.Q(a.overscaledZ,b,f.z,g,f.y-1).key]={backfilled:!1},k[new l.Q(a.overscaledZ,a.wrap,f.z,f.x,f.y-1).key]={backfilled:!1},k[new l.Q(a.overscaledZ,L,f.z,T,f.y-1).key]={backfilled:!1}),f.y+10&&l.e(b,{resourceTiming:g}),this.fire(new l.k("data",Object.assign(Object.assign({},b),{sourceDataType:"metadata"}))),this.fire(new l.k("data",Object.assign(Object.assign({},b),{sourceDataType:"content"})))}catch(m){if(this._pendingLoads--,this._removed)return void this.fire(new l.k("dataabort",{dataType:"source"}));this.fire(new l.j(m))}})}loaded(){return this._pendingLoads===0}loadTile(a){return l._(this,void 0,void 0,function*(){const f=a.actor?"RT":"LT";a.actor=this.actor;const m={type:this.type,uid:a.uid,tileID:a.tileID,zoom:a.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};a.abortController=new AbortController;const g=yield this.actor.sendAsync({type:f,data:m},a.abortController);delete a.abortController,a.unloadVectorData(),a.aborted||a.loadVectorData(g,this.map.painter,f==="RT")})}abortTile(a){return l._(this,void 0,void 0,function*(){a.abortController&&(a.abortController.abort(),delete a.abortController),a.aborted=!0})}unloadTile(a){return l._(this,void 0,void 0,function*(){a.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:a.uid,type:this.type,source:this.id}})})}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return l.e({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}var yn=l.X([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class cr extends l.E{constructor(a,f,m,g){super(),this.id=a,this.dispatcher=m,this.coordinates=f.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(g),this.options=f}load(a){return l._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new l.k("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{const f=yield G.getImage(this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,f&&f.data&&(this.image=f.data,a&&(this.coordinates=a),this._finishLoading())}catch(f){this._request=null,this._loaded=!0,this.fire(new l.j(f))}})}loaded(){return this._loaded}updateImage(a){return a.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=a.url,this.load(a.coordinates).finally(()=>{this.texture=null}),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new l.k("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(a){this.map=a,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(a){this.coordinates=a;const f=a.map(l.Y.fromLngLat);this.tileID=function(g){let b=1/0,T=1/0,L=-1/0,k=-1/0;for(const $ of g)b=Math.min(b,$.x),T=Math.min(T,$.y),L=Math.max(L,$.x),k=Math.max(k,$.y);const N=Math.max(L-b,k-T),V=Math.max(0,Math.floor(-Math.log(N)/Math.LN2)),j=Math.pow(2,V);return new l.a0(V,Math.floor((b+L)/2*j),Math.floor((T+k)/2*j))}(f),this.minzoom=this.maxzoom=this.tileID.z;const m=f.map(g=>this.tileID.getTilePoint(g)._round());return this._boundsArray=new l.Z,this._boundsArray.emplaceBack(m[0].x,m[0].y,0,0),this._boundsArray.emplaceBack(m[1].x,m[1].y,l.W,0),this._boundsArray.emplaceBack(m[3].x,m[3].y,0,l.W),this._boundsArray.emplaceBack(m[2].x,m[2].y,l.W,l.W),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new l.k("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;const a=this.map.painter.context,f=a.gl;this.boundsBuffer||(this.boundsBuffer=a.createVertexBuffer(this._boundsArray,yn.members)),this.boundsSegments||(this.boundsSegments=l.$.simpleSegment(0,0,4,2)),this.texture||(this.texture=new Y(a,this.image,f.RGBA),this.texture.bind(f.LINEAR,f.CLAMP_TO_EDGE));let m=!1;for(const g in this.tiles){const b=this.tiles[g];b.state!=="loaded"&&(b.state="loaded",b.texture=this.texture,m=!0)}m&&this.fire(new l.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(a){return l._(this,void 0,void 0,function*(){this.tileID&&this.tileID.equals(a.tileID.canonical)?(this.tiles[String(a.tileID.wrap)]=a,a.buckets={}):a.state="errored"})}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}class Uo extends cr{constructor(a,f,m,g){super(a,f,m,g),this.roundZoom=!0,this.type="video",this.options=f}load(){return l._(this,void 0,void 0,function*(){this._loaded=!1;const a=this.options;this.urls=[];for(const f of a.urls)this.urls.push(this.map._requestManager.transformRequest(f,"Source").url);try{const f=yield l.a2(this.urls);if(this._loaded=!0,!f)return;this.video=f,this.video.loop=!0,this.video.addEventListener("playing",()=>{this.map.triggerRepaint()}),this.map&&this.video.play(),this._finishLoading()}catch(f){this.fire(new l.j(f))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(a){if(this.video){const f=this.video.seekable;af.end(0)?this.fire(new l.j(new l.a1(`sources.${this.id}`,null,`Playback for this video can be set only between the ${f.start(0)} and ${f.end(0)}-second mark.`))):this.video.currentTime=a}}getVideo(){return this.video}onAdd(a){this.map||(this.map=a,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}prepare(){if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;const a=this.map.painter.context,f=a.gl;this.boundsBuffer||(this.boundsBuffer=a.createVertexBuffer(this._boundsArray,yn.members)),this.boundsSegments||(this.boundsSegments=l.$.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(f.LINEAR,f.CLAMP_TO_EDGE),f.texSubImage2D(f.TEXTURE_2D,0,0,0,f.RGBA,f.UNSIGNED_BYTE,this.video)):(this.texture=new Y(a,this.video,f.RGBA),this.texture.bind(f.LINEAR,f.CLAMP_TO_EDGE));let m=!1;for(const g in this.tiles){const b=this.tiles[g];b.state!=="loaded"&&(b.state="loaded",b.texture=this.texture,m=!0)}m&&this.fire(new l.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class Cs extends cr{constructor(a,f,m,g){super(a,f,m,g),f.coordinates?Array.isArray(f.coordinates)&&f.coordinates.length===4&&!f.coordinates.some(b=>!Array.isArray(b)||b.length!==2||b.some(T=>typeof T!="number"))||this.fire(new l.j(new l.a1(`sources.${a}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new l.j(new l.a1(`sources.${a}`,null,'missing required property "coordinates"'))),f.animate&&typeof f.animate!="boolean"&&this.fire(new l.j(new l.a1(`sources.${a}`,null,'optional "animate" property must be a boolean value'))),f.canvas?typeof f.canvas=="string"||f.canvas instanceof HTMLCanvasElement||this.fire(new l.j(new l.a1(`sources.${a}`,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new l.j(new l.a1(`sources.${a}`,null,'missing required property "canvas"'))),this.options=f,this.animate=f.animate===void 0||f.animate}load(){return l._(this,void 0,void 0,function*(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new l.j(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())})}getCanvas(){return this.canvas}onAdd(a){this.map=a,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let a=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,a=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,a=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;const f=this.map.painter.context,m=f.gl;this.boundsBuffer||(this.boundsBuffer=f.createVertexBuffer(this._boundsArray,yn.members)),this.boundsSegments||(this.boundsSegments=l.$.simpleSegment(0,0,4,2)),this.texture?(a||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new Y(f,this.canvas,m.RGBA,{premultiply:!0});let g=!1;for(const b in this.tiles){const T=this.tiles[b];T.state!=="loaded"&&(T.state="loaded",T.texture=this.texture,g=!0)}g&&this.fire(new l.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(const a of[this.canvas.width,this.canvas.height])if(isNaN(a)||a<=0)return!0;return!1}}const Ks={},tl=y=>{switch(y){case"geojson":return Cn;case"image":return cr;case"raster":return Re;case"raster-dem":return It;case"vector":return en;case"video":return Uo;case"canvas":return Cs}return Ks[y]},Fi="RTLPluginLoaded";class zl extends l.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=zr()}_syncState(a){return this.status=a,this.dispatcher.broadcast("SRPS",{pluginStatus:a,pluginURL:this.url}).catch(f=>{throw this.status="error",f})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(a){return l._(this,arguments,void 0,function*(f,m=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=E.resolveURL(f),!this.url)throw new Error(`requested url ${f} is invalid`);if(this.status==="unavailable"){if(!m)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()})}_requestImport(){return l._(this,void 0,void 0,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new l.k(Fi))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let Ts=null;function at(){return Ts||(Ts=new zl),Ts}class ls{constructor(a,f){this.timeAdded=0,this.fadeEndTime=0,this.tileID=a,this.uid=l.a3(),this.uses=0,this.tileSize=f,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttCoords={},this.expiredRequestCount=0,this.state="loading"}registerFadeDuration(a){const f=a+this.timeAdded;fb.getLayer(N)).filter(Boolean);if(k.length!==0){L.layers=k,L.stateDependentLayerIds&&(L.stateDependentLayers=L.stateDependentLayerIds.map(N=>k.filter(V=>V.id===N)[0]));for(const N of k)T[N.id]=L}}return T}(a.buckets,f.style),this.hasSymbolBuckets=!1;for(const g in this.buckets){const b=this.buckets[g];if(b instanceof l.a5){if(this.hasSymbolBuckets=!0,!m)break;b.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(const g in this.buckets){const b=this.buckets[g];if(b instanceof l.a5&&b.hasRTLText){this.hasRTLText=!0,at().lazyLoad();break}}this.queryPadding=0;for(const g in this.buckets){const b=this.buckets[g];this.queryPadding=Math.max(this.queryPadding,f.style.getLayer(g).queryRadius(b))}a.imageAtlas&&(this.imageAtlas=a.imageAtlas),a.glyphAtlasImage&&(this.glyphAtlasImage=a.glyphAtlasImage)}else this.collisionBoxArray=new l.a4}unloadVectorData(){for(const a in this.buckets)this.buckets[a].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"}getBucket(a){return this.buckets[a.id]}upload(a){for(const m in this.buckets){const g=this.buckets[m];g.uploadPending()&&g.upload(a)}const f=a.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new Y(a,this.imageAtlas.image,f.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new Y(a,this.glyphAtlasImage,f.ALPHA),this.glyphAtlasImage=null)}prepare(a){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(a,this.imageAtlasTexture)}queryRenderedFeatures(a,f,m,g,b,T,L,k,N,V){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:g,cameraQueryGeometry:b,scale:T,tileSize:this.tileSize,pixelPosMatrix:V,transform:k,params:L,queryPadding:this.queryPadding*N},a,f,m):{}}querySourceFeatures(a,f){const m=this.latestFeatureIndex;if(!m||!m.rawTileData)return;const g=m.loadVTLayers(),b=f&&f.sourceLayer?f.sourceLayer:"",T=g._geojsonTileLayer||g[b];if(!T)return;const L=l.a6(f&&f.filter),{z:k,x:N,y:V}=this.tileID.canonical,j={z:k,x:N,y:V};for(let $=0;$m)g=!1;else if(f)if(this.expirationTime{this.remove(a,b)},m)),this.data[g].push(b),this.order.push(g),this.order.length>this.max){const T=this._getAndRemoveByKey(this.order[0]);T&&this.onRemove(T)}return this}has(a){return a.wrapped().key in this.data}getAndRemove(a){return this.has(a)?this._getAndRemoveByKey(a.wrapped().key):null}_getAndRemoveByKey(a){const f=this.data[a].shift();return f.timeout&&clearTimeout(f.timeout),this.data[a].length===0&&delete this.data[a],this.order.splice(this.order.indexOf(a),1),f.value}getByKey(a){const f=this.data[a];return f?f[0].value:null}get(a){return this.has(a)?this.data[a.wrapped().key][0].value:null}remove(a,f){if(!this.has(a))return this;const m=a.wrapped().key,g=f===void 0?0:this.data[m].indexOf(f),b=this.data[m][g];return this.data[m].splice(g,1),b.timeout&&clearTimeout(b.timeout),this.data[m].length===0&&delete this.data[m],this.onRemove(b.value),this.order.splice(this.order.indexOf(m),1),this}setMaxSize(a){for(this.max=a;this.order.length>this.max;){const f=this._getAndRemoveByKey(this.order[0]);f&&this.onRemove(f)}return this}filter(a){const f=[];for(const m in this.data)for(const g of this.data[m])a(g.value)||f.push(g);for(const m of f)this.remove(m.value.tileID,m)}}class Fl{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(a,f,m){const g=String(f);if(this.stateChanges[a]=this.stateChanges[a]||{},this.stateChanges[a][g]=this.stateChanges[a][g]||{},l.e(this.stateChanges[a][g],m),this.deletedStates[a]===null){this.deletedStates[a]={};for(const b in this.state[a])b!==g&&(this.deletedStates[a][b]=null)}else if(this.deletedStates[a]&&this.deletedStates[a][g]===null){this.deletedStates[a][g]={};for(const b in this.state[a][g])m[b]||(this.deletedStates[a][g][b]=null)}else for(const b in m)this.deletedStates[a]&&this.deletedStates[a][g]&&this.deletedStates[a][g][b]===null&&delete this.deletedStates[a][g][b]}removeFeatureState(a,f,m){if(this.deletedStates[a]===null)return;const g=String(f);if(this.deletedStates[a]=this.deletedStates[a]||{},m&&f!==void 0)this.deletedStates[a][g]!==null&&(this.deletedStates[a][g]=this.deletedStates[a][g]||{},this.deletedStates[a][g][m]=null);else if(f!==void 0)if(this.stateChanges[a]&&this.stateChanges[a][g])for(m in this.deletedStates[a][g]={},this.stateChanges[a][g])this.deletedStates[a][g][m]=null;else this.deletedStates[a][g]=null;else this.deletedStates[a]=null}getState(a,f){const m=String(f),g=l.e({},(this.state[a]||{})[m],(this.stateChanges[a]||{})[m]);if(this.deletedStates[a]===null)return{};if(this.deletedStates[a]){const b=this.deletedStates[a][f];if(b===null)return{};for(const T in b)delete g[T]}return g}initializeTileState(a,f){a.setFeatureState(this.state,f)}coalesceChanges(a,f){const m={};for(const g in this.stateChanges){this.state[g]=this.state[g]||{};const b={};for(const T in this.stateChanges[g])this.state[g][T]||(this.state[g][T]={}),l.e(this.state[g][T],this.stateChanges[g][T]),b[T]=this.state[g][T];m[g]=b}for(const g in this.deletedStates){this.state[g]=this.state[g]||{};const b={};if(this.deletedStates[g]===null)for(const T in this.state[g])b[T]={},this.state[g][T]={};else for(const T in this.deletedStates[g]){if(this.deletedStates[g][T]===null)this.state[g][T]={};else for(const L of Object.keys(this.deletedStates[g][T]))delete this.state[g][T][L];b[T]=this.state[g][T]}m[g]=m[g]||{},l.e(m[g],b)}if(this.stateChanges={},this.deletedStates={},Object.keys(m).length!==0)for(const g in a)a[g].setFeatureState(m,f)}}class ui extends l.E{constructor(a,f,m){super(),this.id=a,this.dispatcher=m,this.on("data",g=>this._dataHandler(g)),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((g,b,T,L)=>{const k=new(tl(b.type))(g,b,T,L);if(k.id!==g)throw new Error(`Expected Source id to be ${g} instead of ${k.id}`);return k})(a,f,m,this),this._tiles={},this._cache=new lo(0,g=>this._unloadTile(g)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new Fl,this._didEmitContent=!1,this._updated=!1}onAdd(a){this.map=a,this._maxTileCacheSize=a?a._maxTileCacheSize:null,this._maxTileCacheZoomLevels=a?a._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(a)}onRemove(a){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(a)}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;if(!(this.used===void 0&&this.usedForTerrain===void 0||this.used||this.usedForTerrain))return!0;if(!this._updated)return!1;for(const a in this._tiles){const f=this._tiles[a];if(f.state!=="loaded"&&f.state!=="errored")return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;const a=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,a&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(a,f,m){return l._(this,void 0,void 0,function*(){try{yield this._source.loadTile(a),this._tileLoaded(a,f,m)}catch(g){a.state="errored",g.status!==404?this._source.fire(new l.j(g,{tile:a})):this.update(this.transform,this.terrain)}})}_unloadTile(a){this._source.unloadTile&&this._source.unloadTile(a)}_abortTile(a){this._source.abortTile&&this._source.abortTile(a),this._source.fire(new l.k("dataabort",{tile:a,coord:a.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(a){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(const f in this._tiles){const m=this._tiles[f];m.upload(a),m.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map(a=>a.tileID).sort(ft).map(a=>a.key)}getRenderableIds(a){const f=[];for(const m in this._tiles)this._isIdRenderable(m,a)&&f.push(this._tiles[m]);return a?f.sort((m,g)=>{const b=m.tileID,T=g.tileID,L=new l.P(b.canonical.x,b.canonical.y)._rotate(this.transform.angle),k=new l.P(T.canonical.x,T.canonical.y)._rotate(this.transform.angle);return b.overscaledZ-T.overscaledZ||k.y-L.y||k.x-L.x}).map(m=>m.tileID.key):f.map(m=>m.tileID).sort(ft).map(m=>m.key)}hasRenderableParent(a){const f=this.findLoadedParent(a,0);return!!f&&this._isIdRenderable(f.tileID.key)}_isIdRenderable(a,f){return this._tiles[a]&&this._tiles[a].hasData()&&!this._coveredTiles[a]&&(f||!this._tiles[a].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(const a in this._tiles)this._tiles[a].state!=="errored"&&this._reloadTile(a,"reloading")}}_reloadTile(a,f){return l._(this,void 0,void 0,function*(){const m=this._tiles[a];m&&(m.state!=="loading"&&(m.state=f),yield this._loadTile(m,a,f))})}_tileLoaded(a,f,m){a.timeAdded=E.now(),m==="expired"&&(a.refreshedUponExpiration=!0),this._setTileReloadTimer(f,a),this.getSource().type==="raster-dem"&&a.dem&&this._backfillDEM(a),this._state.initializeTileState(a,this.map?this.map.painter:null),a.aborted||this._source.fire(new l.k("data",{dataType:"source",tile:a,coord:a.tileID}))}_backfillDEM(a){const f=this.getRenderableIds();for(let g=0;g1||(Math.abs(T)>1&&(Math.abs(T+k)===1?T+=k:Math.abs(T-k)===1&&(T-=k)),b.dem&&g.dem&&(g.dem.backfillBorder(b.dem,T,L),g.neighboringTiles&&g.neighboringTiles[N]&&(g.neighboringTiles[N].backfilled=!0)))}}getTile(a){return this.getTileByID(a.key)}getTileByID(a){return this._tiles[a]}_retainLoadedChildren(a,f,m,g){for(const b in this._tiles){let T=this._tiles[b];if(g[b]||!T.hasData()||T.tileID.overscaledZ<=f||T.tileID.overscaledZ>m)continue;let L=T.tileID;for(;T&&T.tileID.overscaledZ>f+1;){const N=T.tileID.scaledTo(T.tileID.overscaledZ-1);T=this._tiles[N.key],T&&T.hasData()&&(L=N)}let k=L;for(;k.overscaledZ>f;)if(k=k.scaledTo(k.overscaledZ-1),a[k.key]){g[L.key]=L;break}}}findLoadedParent(a,f){if(a.key in this._loadedParentTiles){const m=this._loadedParentTiles[a.key];return m&&m.tileID.overscaledZ>=f?m:null}for(let m=a.overscaledZ-1;m>=f;m--){const g=a.scaledTo(m),b=this._getLoadedTile(g);if(b)return b}}_getLoadedTile(a){const f=this._tiles[a.key];return f&&f.hasData()?f:this._cache.getByKey(a.wrapped().key)}updateCacheSize(a){const f=Math.ceil(a.width/this._source.tileSize)+1,m=Math.ceil(a.height/this._source.tileSize)+1,g=Math.floor(f*m*(this._maxTileCacheZoomLevels===null?l.a.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),b=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,g):g;this._cache.setMaxSize(b)}handleWrapJump(a){const f=Math.round((a-(this._prevLng===void 0?a:this._prevLng))/360);if(this._prevLng=a,f){const m={};for(const g in this._tiles){const b=this._tiles[g];b.tileID=b.tileID.unwrapTo(b.tileID.wrap+f),m[b.tileID.key]=b}this._tiles=m;for(const g in this._timers)clearTimeout(this._timers[g]),delete this._timers[g];for(const g in this._tiles)this._setTileReloadTimer(g,this._tiles[g])}}update(a,f){if(!this._sourceLoaded||this._paused)return;let m;this.transform=a,this.terrain=f,this.updateCacheSize(a),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?m=a.getVisibleUnwrappedCoordinates(this._source.tileID).map(V=>new l.Q(V.canonical.z,V.wrap,V.canonical.z,V.canonical.x,V.canonical.y)):(m=a.coveringTiles({tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:f}),this._source.hasTile&&(m=m.filter(V=>this._source.hasTile(V)))):m=[];const g=a.coveringZoomLevel(this._source),b=Math.max(g-ui.maxOverzooming,this._source.minzoom),T=Math.max(g+ui.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){const V={};for(const j of m)if(j.canonical.z>this._source.minzoom){const $=j.scaledTo(j.canonical.z-1);V[$.key]=$;const he=j.scaledTo(Math.max(this._source.minzoom,Math.min(j.canonical.z,5)));V[he.key]=he}m=m.concat(Object.values(V))}const L=m.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,L&&this.fire(new l.k("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));const k=this._updateRetainedTiles(m,g);if(ln(this._source.type)){const V={},j={},$=Object.keys(k),he=E.now();for(const ce of $){const ge=k[ce],re=this._tiles[ce];if(!re||re.fadeEndTime!==0&&re.fadeEndTime<=he)continue;const Ce=this.findLoadedParent(ge,b);Ce&&(this._addTile(Ce.tileID),V[Ce.tileID.key]=Ce.tileID),j[ce]=ge}this._retainLoadedChildren(j,g,T,k);for(const ce in V)k[ce]||(this._coveredTiles[ce]=!0,k[ce]=V[ce]);if(f){const ce={},ge={};for(const re of m)this._tiles[re.key].hasData()?ce[re.key]=re:ge[re.key]=re;for(const re in ge){const Ce=ge[re].children(this._source.maxzoom);this._tiles[Ce[0].key]&&this._tiles[Ce[1].key]&&this._tiles[Ce[2].key]&&this._tiles[Ce[3].key]&&(ce[Ce[0].key]=k[Ce[0].key]=Ce[0],ce[Ce[1].key]=k[Ce[1].key]=Ce[1],ce[Ce[2].key]=k[Ce[2].key]=Ce[2],ce[Ce[3].key]=k[Ce[3].key]=Ce[3],delete ge[re])}for(const re in ge){const Ce=this.findLoadedParent(ge[re],this._source.minzoom);if(Ce){ce[Ce.tileID.key]=k[Ce.tileID.key]=Ce.tileID;for(const Be in ce)ce[Be].isChildOf(Ce.tileID)&&delete ce[Be]}}for(const re in this._tiles)ce[re]||(this._coveredTiles[re]=!0)}}for(const V in k)this._tiles[V].clearFadeHold();const N=l.ab(this._tiles,k);for(const V of N){const j=this._tiles[V];j.hasSymbolBuckets&&!j.holdingForFade()?j.setHoldDuration(this.map._fadeDuration):j.hasSymbolBuckets&&!j.symbolFadeFinished()||this._removeTile(V)}this._updateLoadedParentTileCache()}releaseSymbolFadeTiles(){for(const a in this._tiles)this._tiles[a].holdingForFade()&&this._removeTile(a)}_updateRetainedTiles(a,f){const m={},g={},b=Math.max(f-ui.maxOverzooming,this._source.minzoom),T=Math.max(f+ui.maxUnderzooming,this._source.minzoom),L={};for(const k of a){const N=this._addTile(k);m[k.key]=k,N.hasData()||fthis._source.maxzoom){const j=k.children(this._source.maxzoom)[0],$=this.getTile(j);if($&&$.hasData()){m[j.key]=j;continue}}else{const j=k.children(this._source.maxzoom);if(m[j[0].key]&&m[j[1].key]&&m[j[2].key]&&m[j[3].key])continue}let V=N.wasRequested();for(let j=k.overscaledZ-1;j>=b;--j){const $=k.scaledTo(j);if(g[$.key])break;if(g[$.key]=!0,N=this.getTile($),!N&&V&&(N=this._addTile($)),N){const he=N.hasData();if((V||he)&&(m[$.key]=$),V=N.wasRequested(),he)break}}}return m}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(const a in this._tiles){const f=[];let m,g=this._tiles[a].tileID;for(;g.overscaledZ>0;){if(g.key in this._loadedParentTiles){m=this._loadedParentTiles[g.key];break}f.push(g.key);const b=g.scaledTo(g.overscaledZ-1);if(m=this._getLoadedTile(b),m)break;g=b}for(const b of f)this._loadedParentTiles[b]=m}}_addTile(a){let f=this._tiles[a.key];if(f)return f;f=this._cache.getAndRemove(a),f&&(this._setTileReloadTimer(a.key,f),f.tileID=a,this._state.initializeTileState(f,this.map?this.map.painter:null),this._cacheTimers[a.key]&&(clearTimeout(this._cacheTimers[a.key]),delete this._cacheTimers[a.key],this._setTileReloadTimer(a.key,f)));const m=f;return f||(f=new ls(a,this._source.tileSize*a.overscaleFactor()),this._loadTile(f,a.key,f.state)),f.uses++,this._tiles[a.key]=f,m||this._source.fire(new l.k("dataloading",{tile:f,coord:f.tileID,dataType:"source"})),f}_setTileReloadTimer(a,f){a in this._timers&&(clearTimeout(this._timers[a]),delete this._timers[a]);const m=f.getExpiryTimeout();m&&(this._timers[a]=setTimeout(()=>{this._reloadTile(a,"expired"),delete this._timers[a]},m))}_removeTile(a){const f=this._tiles[a];f&&(f.uses--,delete this._tiles[a],this._timers[a]&&(clearTimeout(this._timers[a]),delete this._timers[a]),f.uses>0||(f.hasData()&&f.state!=="reloading"?this._cache.add(f.tileID,f,f.getExpiryTimeout()):(f.aborted=!0,this._abortTile(f),this._unloadTile(f))))}_dataHandler(a){const f=a.sourceDataType;a.dataType==="source"&&f==="metadata"&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&a.dataType==="source"&&f==="content"&&(this.reload(),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(const a in this._tiles)this._removeTile(a);this._cache.reset()}tilesIn(a,f,m){const g=[],b=this.transform;if(!b)return g;const T=m?b.getCameraQueryGeometry(a):a,L=a.map(ce=>b.pointCoordinate(ce,this.terrain)),k=T.map(ce=>b.pointCoordinate(ce,this.terrain)),N=this.getIds();let V=1/0,j=1/0,$=-1/0,he=-1/0;for(const ce of k)V=Math.min(V,ce.x),j=Math.min(j,ce.y),$=Math.max($,ce.x),he=Math.max(he,ce.y);for(let ce=0;ce=0&&ve[1].y+Be>=0){const De=L.map(Ze=>re.getTilePoint(Ze)),Ve=k.map(Ze=>re.getTilePoint(Ze));g.push({tile:ge,tileID:re,queryGeometry:De,cameraQueryGeometry:Ve,scale:Ce})}}return g}getVisibleCoordinates(a){const f=this.getRenderableIds(a).map(m=>this._tiles[m].tileID);for(const m of f)m.posMatrix=this.transform.calculatePosMatrix(m.toUnwrapped());return f}hasTransition(){if(this._source.hasTransition())return!0;if(ln(this._source.type)){const a=E.now();for(const f in this._tiles)if(this._tiles[f].fadeEndTime>=a)return!0}return!1}setFeatureState(a,f,m){this._state.updateState(a=a||"_geojsonTileLayer",f,m)}removeFeatureState(a,f,m){this._state.removeFeatureState(a=a||"_geojsonTileLayer",f,m)}getFeatureState(a,f){return this._state.getState(a=a||"_geojsonTileLayer",f)}setDependencies(a,f,m){const g=this._tiles[a];g&&g.setDependencies(f,m)}reloadTilesForDependencies(a,f){for(const m in this._tiles)this._tiles[m].hasDependency(a,f)&&this._reloadTile(m,"reloading");this._cache.filter(m=>!m.hasDependency(a,f))}}function ft(y,a){const f=Math.abs(2*y.wrap)-+(y.wrap<0),m=Math.abs(2*a.wrap)-+(a.wrap<0);return y.overscaledZ-a.overscaledZ||m-f||a.canonical.y-y.canonical.y||a.canonical.x-y.canonical.x}function ln(y){return y==="raster"||y==="image"||y==="video"}ui.maxOverzooming=10,ui.maxUnderzooming=3;class sn{constructor(a,f){this.reset(a,f)}reset(a,f){this.points=a||[],this._distances=[0];for(let m=1;m0?(g-T)/L:0;return this.points[b].mult(1-k).add(this.points[f].mult(k))}}function Hr(y,a){let f=!0;return y==="always"||y!=="never"&&a!=="never"||(f=!1),f}class us{constructor(a,f,m){const g=this.boxCells=[],b=this.circleCells=[];this.xCellCount=Math.ceil(a/m),this.yCellCount=Math.ceil(f/m);for(let T=0;Tthis.width||g<0||f>this.height)return[];const k=[];if(a<=0&&f<=0&&this.width<=m&&this.height<=g){if(b)return[{key:null,x1:a,y1:f,x2:m,y2:g}];for(let N=0;N0}hitTestCircle(a,f,m,g,b){const T=a-m,L=a+m,k=f-m,N=f+m;if(L<0||T>this.width||N<0||k>this.height)return!1;const V=[];return this._forEachCell(T,k,L,N,this._queryCellCircle,V,{hitTest:!0,overlapMode:g,circle:{x:a,y:f,radius:m},seenUids:{box:{},circle:{}}},b),V.length>0}_queryCell(a,f,m,g,b,T,L,k){const{seenUids:N,hitTest:V,overlapMode:j}=L,$=this.boxCells[b];if($!==null){const ce=this.bboxes;for(const ge of $)if(!N.box[ge]){N.box[ge]=!0;const re=4*ge,Ce=this.boxKeys[ge];if(a<=ce[re+2]&&f<=ce[re+3]&&m>=ce[re+0]&&g>=ce[re+1]&&(!k||k(Ce))&&(!V||!Hr(j,Ce.overlapMode))&&(T.push({key:Ce,x1:ce[re],y1:ce[re+1],x2:ce[re+2],y2:ce[re+3]}),V))return!0}}const he=this.circleCells[b];if(he!==null){const ce=this.circles;for(const ge of he)if(!N.circle[ge]){N.circle[ge]=!0;const re=3*ge,Ce=this.circleKeys[ge];if(this._circleAndRectCollide(ce[re],ce[re+1],ce[re+2],a,f,m,g)&&(!k||k(Ce))&&(!V||!Hr(j,Ce.overlapMode))){const Be=ce[re],ve=ce[re+1],De=ce[re+2];if(T.push({key:Ce,x1:Be-De,y1:ve-De,x2:Be+De,y2:ve+De}),V)return!0}}}return!1}_queryCellCircle(a,f,m,g,b,T,L,k){const{circle:N,seenUids:V,overlapMode:j}=L,$=this.boxCells[b];if($!==null){const ce=this.bboxes;for(const ge of $)if(!V.box[ge]){V.box[ge]=!0;const re=4*ge,Ce=this.boxKeys[ge];if(this._circleAndRectCollide(N.x,N.y,N.radius,ce[re+0],ce[re+1],ce[re+2],ce[re+3])&&(!k||k(Ce))&&!Hr(j,Ce.overlapMode))return T.push(!0),!0}}const he=this.circleCells[b];if(he!==null){const ce=this.circles;for(const ge of he)if(!V.circle[ge]){V.circle[ge]=!0;const re=3*ge,Ce=this.circleKeys[ge];if(this._circlesCollide(ce[re],ce[re+1],ce[re+2],N.x,N.y,N.radius)&&(!k||k(Ce))&&!Hr(j,Ce.overlapMode))return T.push(!0),!0}}}_forEachCell(a,f,m,g,b,T,L,k){const N=this._convertToXCellCoord(a),V=this._convertToYCellCoord(f),j=this._convertToXCellCoord(m),$=this._convertToYCellCoord(g);for(let he=N;he<=j;he++)for(let ce=V;ce<=$;ce++)if(b.call(this,a,f,m,g,this.xCellCount*ce+he,T,L,k))return}_convertToXCellCoord(a){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(a*this.xScale)))}_convertToYCellCoord(a){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(a*this.yScale)))}_circlesCollide(a,f,m,g,b,T){const L=g-a,k=b-f,N=m+T;return N*N>L*L+k*k}_circleAndRectCollide(a,f,m,g,b,T,L){const k=(T-g)/2,N=Math.abs(a-(g+k));if(N>k+m)return!1;const V=(L-b)/2,j=Math.abs(f-(b+V));if(j>V+m)return!1;if(N<=k||j<=V)return!0;const $=N-k,he=j-V;return $*$+he*he<=m*m}}function on(y,a,f,m,g){const b=l.F();return a?(l.J(b,b,[1/g,1/g,1]),f||l.ad(b,b,m.angle)):l.K(b,m.labelPlaneMatrix,y),b}function Aa(y,a,f,m,g){if(a){const b=l.ae(y);return l.J(b,b,[g,g,1]),f||l.ad(b,b,-m.angle),b}return m.glCoordMatrix}function Jr(y,a,f){let m;f?(m=[y.x,y.y,f(y.x,y.y),1],l.af(m,m,a)):(m=[y.x,y.y,0,1],Dt(m,m,a));const g=m[3];return{point:new l.P(m[0]/g,m[1]/g),signedDistanceFromCamera:g}}function me(y,a){return .5+y/a*.5}function q(y,a){const f=y[0]/y[3],m=y[1]/y[3];return f>=-a[0]&&f<=a[0]&&m>=-a[1]&&m<=a[1]}function Z(y,a,f,m,g,b,T,L,k,N){const V=m?y.textSizeData:y.iconSizeData,j=l.ag(V,f.transform.zoom),$=[256/f.width*2+1,256/f.height*2+1],he=m?y.text.dynamicLayoutVertexArray:y.icon.dynamicLayoutVertexArray;he.clear();const ce=y.lineVertexArray,ge=m?y.text.placedSymbolArray:y.icon.placedSymbolArray,re=f.transform.width/f.transform.height;let Ce=!1;for(let Be=0;BeMath.abs(f.x-a.x)*m?{useVertical:!0}:(y===l.ah.vertical?a.yf.x)?{needsFlipping:!0}:null}function Te(y,a,f,m,g,b,T,L,k,N,V,j,$,he,ce,ge){const re=a/24,Ce=y.lineOffsetX*re,Be=y.lineOffsetY*re;let ve;if(y.numGlyphs>1){const De=y.glyphStartIndex+y.numGlyphs,Ve=y.lineStartIndex,Ze=y.lineStartIndex+y.lineLength,$e=J(re,L,Ce,Be,f,V,j,y,k,b,$,ce,ge);if(!$e)return{notEnoughRoom:!0};const rt=Jr($e.first.point,T,ge).point,nt=Jr($e.last.point,T,ge).point;if(m&&!f){const ct=le(y.writingMode,rt,nt,he);if(ct)return ct}ve=[$e.first];for(let ct=y.glyphStartIndex+1;ct0?rt.point:Q(j,$e,Ve,1,g,ge),ct=le(y.writingMode,Ve,nt,he);if(ct)return ct}const De=qe(re*L.getoffsetX(y.glyphStartIndex),Ce,Be,f,V,j,y.segment,y.lineStartIndex,y.lineStartIndex+y.lineLength,k,b,$,ce,ge);if(!De)return{notEnoughRoom:!0};ve=[De]}for(const De of ve)l.aj(N,De.point,De.angle);return{}}function Q(y,a,f,m,g,b){const T=Jr(y.add(y.sub(a)._unit()),g,b).point,L=f.sub(T);return f.add(L._mult(m/L.mag()))}function Pe(y,a){const{projectionCache:f,lineVertexArray:m,labelPlaneMatrix:g,tileAnchorPoint:b,distanceFromAnchor:T,getElevation:L,previousVertex:k,direction:N,absOffsetX:V}=a;if(f.projections[y])return f.projections[y];const j=new l.P(m.getx(y),m.gety(y)),$=Jr(j,g,L);if($.signedDistanceFromCamera>0)return f.projections[y]=$.point,$.point;const he=y-N;return Q(T===0?b:new l.P(m.getx(he),m.gety(he)),j,k,V-T+1,g,L)}function Se(y,a,f){return y._unit()._perp()._mult(a*f)}function Ne(y,a,f,m,g,b,T,L){const{projectionCache:k,direction:N}=L;if(k.offsets[y])return k.offsets[y];const V=f.add(a);if(y+N=g)return k.offsets[y]=V,V;const j=Pe(y+N,L),$=Se(j.sub(f),T,N),he=f.add($),ce=j.add($);return k.offsets[y]=l.ak(b,V,he,ce)||V,k.offsets[y]}function qe(y,a,f,m,g,b,T,L,k,N,V,j,$,he){const ce=m?y-a:y+a;let ge=ce>0?1:-1,re=0;m&&(ge*=-1,re=Math.PI),ge<0&&(re+=Math.PI);let Ce,Be,ve=ge>0?L+T:L+T+1,De=g,Ve=g,Ze=0,$e=0;const rt=Math.abs(ce),nt=[];let ct;for(;Ze+$e<=rt;){if(ve+=ge,ve=k)return null;Ze+=$e,Ve=De,Be=Ce;const gt={projectionCache:j,lineVertexArray:N,labelPlaneMatrix:V,tileAnchorPoint:b,distanceFromAnchor:Ze,getElevation:he,previousVertex:Ve,direction:ge,absOffsetX:rt};if(De=Pe(ve,gt),f===0)nt.push(Ve),ct=De.sub(Ve);else{let Ht;const cn=De.sub(Ve);Ht=cn.mag()===0?Se(Pe(ve+ge,gt).sub(De),f,ge):Se(cn,f,ge),Be||(Be=Ve.add(Ht)),Ce=Ne(ve,Ht,De,L,k,Be,f,gt),nt.push(Be),ct=Ce.sub(Be)}$e=ct.mag()}const pt=ct._mult((rt-Ze)/$e)._add(Be||Ve),un=re+Math.atan2(De.y-Ve.y,De.x-Ve.x);return nt.push(pt),{point:pt,angle:$?un:0,path:nt}}const Ye=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Je(y,a){for(let f=0;f=1;mn--)cn.push(gt.path[mn]);for(let mn=1;mnJr(bn,k,ce));cn=mn.some(bn=>bn.signedDistanceFromCamera<=0)?[]:mn.map(bn=>bn.point)}let Jt=[];if(cn.length>0){const mn=cn[0].clone(),bn=cn[0].clone();for(let Ur=1;Ur=ct.x&&bn.x<=pt.x&&mn.y>=ct.y&&bn.y<=pt.y?[cn]:bn.xpt.x||bn.ypt.y?[]:l.al([cn],ct.x,ct.y,pt.x,pt.y)}for(const mn of Jt){un.reset(mn,.25*nt);let bn=0;bn=un.length<=.5*nt?1:Math.ceil(un.paddedLength/kn)+1;for(let Ur=0;Ur=this.screenRightBoundary||gthis.screenBottomBoundary}isInsideGrid(a,f,m,g){return m>=0&&a=0&&fm.collisionGroupID===f}}return this.collisionGroups[a]}}function _i(y,a,f,m,g){const{horizontalAlign:b,verticalAlign:T}=l.at(y);return new l.P(-(b-.5)*a+m[0]*g,-(T-.5)*f+m[1]*g)}function uo(y,a,f,m,g,b){const{x1:T,x2:L,y1:k,y2:N,anchorPointX:V,anchorPointY:j}=y,$=new l.P(a,f);return m&&$._rotate(g?b:-b),{x1:T+$.x,y1:k+$.y,x2:L+$.x,y2:N+$.y,anchorPointX:V,anchorPointY:j}}class So{constructor(a,f,m,g,b){this.transform=a.clone(),this.terrain=f,this.collisionIndex=new Qt(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=m,this.retainedQueryData={},this.collisionGroups=new Fr(g),this.collisionCircleArrays={},this.prevPlacement=b,b&&(b.prevPlacement=void 0),this.placedOrientations={}}getBucketParts(a,f,m,g){const b=m.getBucket(f),T=m.latestFeatureIndex;if(!b||!T||f.id!==b.layerIds[0])return;const L=m.collisionBoxArray,k=b.layers[0].layout,N=Math.pow(2,this.transform.zoom-m.tileID.overscaledZ),V=m.tileSize/l.W,j=this.transform.calculatePosMatrix(m.tileID.toUnwrapped()),$=k.get("text-pitch-alignment")==="map",he=k.get("text-rotation-alignment")==="map",ce=tn(m,1,this.transform.zoom),ge=on(j,$,he,this.transform,ce);let re=null;if($){const Be=Aa(j,$,he,this.transform,ce);re=l.K([],this.transform.labelPlaneMatrix,Be)}this.retainedQueryData[b.bucketInstanceId]=new dn(b.bucketInstanceId,T,b.sourceLayerIndex,b.index,m.tileID);const Ce={bucket:b,layout:k,posMatrix:j,textLabelPlaneMatrix:ge,labelToScreenMatrix:re,scale:N,textPixelRatio:V,holdingForFade:m.holdingForFade(),collisionBoxArray:L,partiallyEvaluatedTextSize:l.ag(b.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(b.sourceID)};if(g)for(const Be of b.sortKeyRanges){const{sortKey:ve,symbolInstanceStart:De,symbolInstanceEnd:Ve}=Be;a.push({sortKey:ve,symbolInstanceStart:De,symbolInstanceEnd:Ve,parameters:Ce})}else a.push({symbolInstanceStart:0,symbolInstanceEnd:b.symbolInstances.length,parameters:Ce})}attemptAnchorPlacement(a,f,m,g,b,T,L,k,N,V,j,$,he,ce,ge,re){const Ce=l.ap[a.textAnchor],Be=[a.textOffset0,a.textOffset1],ve=_i(Ce,m,g,Be,b),De=this.collisionIndex.placeCollisionBox(uo(f,ve.x,ve.y,T,L,this.transform.angle),j,k,N,V.predicate,re);if((!ge||this.collisionIndex.placeCollisionBox(uo(ge,ve.x,ve.y,T,L,this.transform.angle),j,k,N,V.predicate,re).box.length!==0)&&De.box.length>0){let Ve;if(this.prevPlacement&&this.prevPlacement.variableOffsets[$.crossTileID]&&this.prevPlacement.placements[$.crossTileID]&&this.prevPlacement.placements[$.crossTileID].text&&(Ve=this.prevPlacement.variableOffsets[$.crossTileID].anchor),$.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[$.crossTileID]={textOffset:Be,width:m,height:g,anchor:Ce,textBoxScale:b,prevAnchor:Ve},this.markUsedJustification(he,Ce,$,ce),he.allowVerticalPlacement&&(this.markUsedOrientation(he,ce,$),this.placedOrientations[$.crossTileID]=ce),{shift:ve,placedGlyphBoxes:De}}}placeLayerBucketPart(a,f,m){const{bucket:g,layout:b,posMatrix:T,textLabelPlaneMatrix:L,labelToScreenMatrix:k,textPixelRatio:N,holdingForFade:V,collisionBoxArray:j,partiallyEvaluatedTextSize:$,collisionGroup:he}=a.parameters,ce=b.get("text-optional"),ge=b.get("icon-optional"),re=l.aq(b,"text-overlap","text-allow-overlap"),Ce=re==="always",Be=l.aq(b,"icon-overlap","icon-allow-overlap"),ve=Be==="always",De=b.get("text-rotation-alignment")==="map",Ve=b.get("text-pitch-alignment")==="map",Ze=b.get("icon-text-fit")!=="none",$e=b.get("symbol-z-order")==="viewport-y",rt=Ce&&(ve||!g.hasIconData()||ge),nt=ve&&(Ce||!g.hasTextData()||ce);!g.collisionArrays&&j&&g.deserializeCollisionBoxes(j);const ct=this.retainedQueryData[g.bucketInstanceId].tileID,pt=this.terrain?(gt,Ht)=>this.terrain.getElevation(ct,gt,Ht):null,un=(gt,Ht)=>{var cn,kn;if(f[gt.crossTileID])return;if(V)return void(this.placements[gt.crossTileID]=new vr(!1,!1,!1));let Jt=!1,mn=!1,bn=!0,Ur=null,Jn={box:null,offscreen:null},Wo={box:null,offscreen:null},yi=null,Mr=null,vi=null,Ho=0,ra=0,ll=0;Ht.textFeatureIndex?Ho=Ht.textFeatureIndex:gt.useRuntimeCollisionCircles&&(Ho=gt.featureIndex),Ht.verticalTextFeatureIndex&&(ra=Ht.verticalTextFeatureIndex);const Bc=Ht.textBox;if(Bc){const fi=pi=>{let kr=l.ah.horizontal;if(g.allowVerticalPlacement&&!pi&&this.prevPlacement){const ps=this.prevPlacement.placedOrientations[gt.crossTileID];ps&&(this.placedOrientations[gt.crossTileID]=ps,kr=ps,this.markUsedOrientation(g,kr,gt))}return kr},Ar=(pi,kr)=>{if(g.allowVerticalPlacement&>.numVerticalGlyphVertices>0&&Ht.verticalTextBox){for(const ps of g.writingModes)if(ps===l.ah.vertical?(Jn=kr(),Wo=Jn):Jn=pi(),Jn&&Jn.box&&Jn.box.length)break}else Jn=pi()},xr=gt.textAnchorOffsetStartIndex,fs=gt.textAnchorOffsetEndIndex;if(fs===xr){const pi=(kr,ps)=>{const di=this.collisionIndex.placeCollisionBox(kr,re,N,T,he.predicate,pt);return di&&di.box&&di.box.length&&(this.markUsedOrientation(g,ps,gt),this.placedOrientations[gt.crossTileID]=ps),di};Ar(()=>pi(Bc,l.ah.horizontal),()=>{const kr=Ht.verticalTextBox;return g.allowVerticalPlacement&>.numVerticalGlyphVertices>0&&kr?pi(kr,l.ah.vertical):{box:null,offscreen:null}}),fi(Jn&&Jn.box&&Jn.box.length)}else{let pi=l.ap[(kn=(cn=this.prevPlacement)===null||cn===void 0?void 0:cn.variableOffsets[gt.crossTileID])===null||kn===void 0?void 0:kn.anchor];const kr=(di,Zr,$p)=>{const dg=di.x2-di.x1,Zl=di.y2-di.y1,Xl=gt.textBoxScale,ef=Ze&&Be==="never"?Zr:null;let cl={box:[],offscreen:!1},Kp=re==="never"?1:2,mg="never";pi&&Kp++;for(let Jp=0;Jpkr(Bc,Ht.iconBox,l.ah.horizontal),()=>{const di=Ht.verticalTextBox;return g.allowVerticalPlacement&&!(Jn&&Jn.box&&Jn.box.length)&>.numVerticalGlyphVertices>0&&di?kr(di,Ht.verticalIconBox,l.ah.vertical):{box:null,offscreen:null}}),Jn&&(Jt=Jn.box,bn=Jn.offscreen);const ps=fi(Jn&&Jn.box);if(!Jt&&this.prevPlacement){const di=this.prevPlacement.variableOffsets[gt.crossTileID];di&&(this.variableOffsets[gt.crossTileID]=di,this.markUsedJustification(g,di.anchor,gt,ps))}}}if(yi=Jn,Jt=yi&&yi.box&&yi.box.length>0,bn=yi&&yi.offscreen,gt.useRuntimeCollisionCircles){const fi=g.text.placedSymbolArray.get(gt.centerJustifiedTextSymbolIndex),Ar=l.ai(g.textSizeData,$,fi),xr=b.get("text-padding");Mr=this.collisionIndex.placeCollisionCircles(re,fi,g.lineVertexArray,g.glyphOffsetArray,Ar,T,L,k,m,Ve,he.predicate,gt.collisionCircleDiameter,xr,pt),Mr.circles.length&&Mr.collisionDetected&&!m&&l.w("Collisions detected, but collision boxes are not shown"),Jt=Ce||Mr.circles.length>0&&!Mr.collisionDetected,bn=bn&&Mr.offscreen}if(Ht.iconFeatureIndex&&(ll=Ht.iconFeatureIndex),Ht.iconBox){const fi=Ar=>{const xr=Ze&&Ur?uo(Ar,Ur.x,Ur.y,De,Ve,this.transform.angle):Ar;return this.collisionIndex.placeCollisionBox(xr,Be,N,T,he.predicate,pt)};Wo&&Wo.box&&Wo.box.length&&Ht.verticalIconBox?(vi=fi(Ht.verticalIconBox),mn=vi.box.length>0):(vi=fi(Ht.iconBox),mn=vi.box.length>0),bn=bn&&vi.offscreen}const ul=ce||gt.numHorizontalGlyphVertices===0&>.numVerticalGlyphVertices===0,ia=ge||gt.numIconVertices===0;if(ul||ia?ia?ul||(mn=mn&&Jt):Jt=mn&&Jt:mn=Jt=mn&&Jt,Jt&&yi&&yi.box&&this.collisionIndex.insertCollisionBox(yi.box,re,b.get("text-ignore-placement"),g.bucketInstanceId,Wo&&Wo.box&&ra?ra:Ho,he.ID),mn&&vi&&this.collisionIndex.insertCollisionBox(vi.box,Be,b.get("icon-ignore-placement"),g.bucketInstanceId,ll,he.ID),Mr&&(Jt&&this.collisionIndex.insertCollisionCircles(Mr.circles,re,b.get("text-ignore-placement"),g.bucketInstanceId,Ho,he.ID),m)){const fi=g.bucketInstanceId;let Ar=this.collisionCircleArrays[fi];Ar===void 0&&(Ar=this.collisionCircleArrays[fi]=new ci);for(let xr=0;xr=0;--Ht){const cn=gt[Ht];un(g.symbolInstances.get(cn),g.collisionArrays[cn])}}else for(let gt=a.symbolInstanceStart;gt=0&&(a.text.placedSymbolArray.get(L).crossTileID=b>=0&&L!==b?0:m.crossTileID)}markUsedOrientation(a,f,m){const g=f===l.ah.horizontal||f===l.ah.horizontalOnly?f:0,b=f===l.ah.vertical?f:0,T=[m.leftJustifiedTextSymbolIndex,m.centerJustifiedTextSymbolIndex,m.rightJustifiedTextSymbolIndex];for(const L of T)a.text.placedSymbolArray.get(L).placedOrientation=g;m.verticalPlacedTextSymbolIndex&&(a.text.placedSymbolArray.get(m.verticalPlacedTextSymbolIndex).placedOrientation=b)}commit(a){this.commitTime=a,this.zoomAtLastRecencyCheck=this.transform.zoom;const f=this.prevPlacement;let m=!1;this.prevZoomAdjustment=f?f.zoomAdjustment(this.transform.zoom):0;const g=f?f.symbolFadeChange(a):1,b=f?f.opacities:{},T=f?f.variableOffsets:{},L=f?f.placedOrientations:{};for(const k in this.placements){const N=this.placements[k],V=b[k];V?(this.opacities[k]=new er(V,g,N.text,N.icon),m=m||N.text!==V.text.placed||N.icon!==V.icon.placed):(this.opacities[k]=new er(null,g,N.text,N.icon,N.skipFade),m=m||N.text||N.icon)}for(const k in b){const N=b[k];if(!this.opacities[k]){const V=new er(N,g,!1,!1);V.isHidden()||(this.opacities[k]=V,m=m||N.text.placed||N.icon.placed)}}for(const k in T)this.variableOffsets[k]||!this.opacities[k]||this.opacities[k].isHidden()||(this.variableOffsets[k]=T[k]);for(const k in L)this.placedOrientations[k]||!this.opacities[k]||this.opacities[k].isHidden()||(this.placedOrientations[k]=L[k]);if(f&&f.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");m?this.lastPlacementChangeTime=a:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=f?f.lastPlacementChangeTime:a)}updateLayerOpacities(a,f){const m={};for(const g of f){const b=g.getBucket(a);b&&g.latestFeatureIndex&&a.id===b.layerIds[0]&&this.updateBucketOpacities(b,m,g.collisionBoxArray)}}updateBucketOpacities(a,f,m){a.hasTextData()&&(a.text.opacityVertexArray.clear(),a.text.hasVisibleVertices=!1),a.hasIconData()&&(a.icon.opacityVertexArray.clear(),a.icon.hasVisibleVertices=!1),a.hasIconCollisionBoxData()&&a.iconCollisionBox.collisionVertexArray.clear(),a.hasTextCollisionBoxData()&&a.textCollisionBox.collisionVertexArray.clear();const g=a.layers[0],b=g.layout,T=new er(null,0,!1,!1,!0),L=b.get("text-allow-overlap"),k=b.get("icon-allow-overlap"),N=g._unevaluatedLayout.hasValue("text-variable-anchor")||g._unevaluatedLayout.hasValue("text-variable-anchor-offset"),V=b.get("text-rotation-alignment")==="map",j=b.get("text-pitch-alignment")==="map",$=b.get("icon-text-fit")!=="none",he=new er(null,0,L&&(k||!a.hasIconData()||b.get("icon-optional")),k&&(L||!a.hasTextData()||b.get("text-optional")),!0);!a.collisionArrays&&m&&(a.hasIconCollisionBoxData()||a.hasTextCollisionBoxData())&&a.deserializeCollisionBoxes(m);const ce=(ge,re,Ce)=>{for(let Be=0;Be0,Ze=this.placedOrientations[re.crossTileID],$e=Ze===l.ah.vertical,rt=Ze===l.ah.horizontal||Ze===l.ah.horizontalOnly;if(Ce>0||Be>0){const nt=Eo(De.text);ce(a.text,Ce,$e?_c:nt),ce(a.text,Be,rt?_c:nt);const ct=De.text.isHidden();[re.rightJustifiedTextSymbolIndex,re.centerJustifiedTextSymbolIndex,re.leftJustifiedTextSymbolIndex].forEach(gt=>{gt>=0&&(a.text.placedSymbolArray.get(gt).hidden=ct||$e?1:0)}),re.verticalPlacedTextSymbolIndex>=0&&(a.text.placedSymbolArray.get(re.verticalPlacedTextSymbolIndex).hidden=ct||rt?1:0);const pt=this.variableOffsets[re.crossTileID];pt&&this.markUsedJustification(a,pt.anchor,re,Ze);const un=this.placedOrientations[re.crossTileID];un&&(this.markUsedJustification(a,"left",re,un),this.markUsedOrientation(a,un,re))}if(Ve){const nt=Eo(De.icon),ct=!($&&re.verticalPlacedIconSymbolIndex&&$e);re.placedIconSymbolIndex>=0&&(ce(a.icon,re.numIconVertices,ct?nt:_c),a.icon.placedSymbolArray.get(re.placedIconSymbolIndex).hidden=De.icon.isHidden()),re.verticalPlacedIconSymbolIndex>=0&&(ce(a.icon,re.numVerticalIconVertices,ct?_c:nt),a.icon.placedSymbolArray.get(re.verticalPlacedIconSymbolIndex).hidden=De.icon.isHidden())}if(a.hasIconCollisionBoxData()||a.hasTextCollisionBoxData()){const nt=a.collisionArrays[ge];if(nt){let ct=new l.P(0,0);if(nt.textBox||nt.verticalTextBox){let un=!0;if(N){const gt=this.variableOffsets[ve];gt?(ct=_i(gt.anchor,gt.width,gt.height,gt.textOffset,gt.textBoxScale),V&&ct._rotate(j?this.transform.angle:-this.transform.angle)):un=!1}nt.textBox&&Pi(a.textCollisionBox.collisionVertexArray,De.text.placed,!un||$e,ct.x,ct.y),nt.verticalTextBox&&Pi(a.textCollisionBox.collisionVertexArray,De.text.placed,!un||rt,ct.x,ct.y)}const pt=!!(!rt&&nt.verticalIconBox);nt.iconBox&&Pi(a.iconCollisionBox.collisionVertexArray,De.icon.placed,pt,$?ct.x:0,$?ct.y:0),nt.verticalIconBox&&Pi(a.iconCollisionBox.collisionVertexArray,De.icon.placed,!pt,$?ct.x:0,$?ct.y:0)}}}if(a.sortFeatures(this.transform.angle),this.retainedQueryData[a.bucketInstanceId]&&(this.retainedQueryData[a.bucketInstanceId].featureSortOrder=a.featureSortOrder),a.hasTextData()&&a.text.opacityVertexBuffer&&a.text.opacityVertexBuffer.updateData(a.text.opacityVertexArray),a.hasIconData()&&a.icon.opacityVertexBuffer&&a.icon.opacityVertexBuffer.updateData(a.icon.opacityVertexArray),a.hasIconCollisionBoxData()&&a.iconCollisionBox.collisionVertexBuffer&&a.iconCollisionBox.collisionVertexBuffer.updateData(a.iconCollisionBox.collisionVertexArray),a.hasTextCollisionBoxData()&&a.textCollisionBox.collisionVertexBuffer&&a.textCollisionBox.collisionVertexBuffer.updateData(a.textCollisionBox.collisionVertexArray),a.text.opacityVertexArray.length!==a.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${a.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${a.text.layoutVertexArray.length}) / 4`);if(a.icon.opacityVertexArray.length!==a.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${a.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${a.icon.layoutVertexArray.length}) / 4`);if(a.bucketInstanceId in this.collisionCircleArrays){const ge=this.collisionCircleArrays[a.bucketInstanceId];a.placementInvProjMatrix=ge.invProjMatrix,a.placementViewportMatrix=ge.viewportMatrix,a.collisionCircleArray=ge.circles,delete this.collisionCircleArrays[a.bucketInstanceId]}}symbolFadeChange(a){return this.fadeDuration===0?1:(a-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(a){return Math.max(0,(this.transform.zoom-a)/1.5)}hasTransitions(a){return this.stale||a-this.lastPlacementChangeTimea}setStale(){this.stale=!0}}function Pi(y,a,f,m,g){y.emplaceBack(a?1:0,f?1:0,m||0,g||0),y.emplaceBack(a?1:0,f?1:0,m||0,g||0),y.emplaceBack(a?1:0,f?1:0,m||0,g||0),y.emplaceBack(a?1:0,f?1:0,m||0,g||0)}const Js=Math.pow(2,25),Am=Math.pow(2,24),My=Math.pow(2,17),$n=Math.pow(2,16),yp=Math.pow(2,9),vp=Math.pow(2,8),jo=Math.pow(2,1);function Eo(y){if(y.opacity===0&&!y.placed)return 0;if(y.opacity===1&&y.placed)return 4294967295;const a=y.placed?1:0,f=Math.floor(127*y.opacity);return f*Js+a*Am+f*My+a*$n+f*yp+a*vp+f*jo+a}const _c=0;class cs{constructor(a){this._sortAcrossTiles=a.layout.get("symbol-z-order")!=="viewport-y"&&!a.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(a,f,m,g,b){const T=this._bucketParts;for(;this._currentTileIndexL.sortKey-k.sortKey));this._currentPartIndex!this._forceFullPlacement&&E.now()-g>2;for(;this._currentPlacementIndex>=0;){const T=f[a[this._currentPlacementIndex]],L=this.placement.collisionIndex.transform.zoom;if(T.type==="symbol"&&(!T.minzoom||T.minzoom<=L)&&(!T.maxzoom||T.maxzoom>L)){if(this._inProgressLayer||(this._inProgressLayer=new cs(T)),this._inProgressLayer.continuePlacement(m[T.source],this.placement,this._showCollisionBoxes,T,b))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(a){return this.placement.commit(a),this.placement}}const xu=512/l.W/2;class mh{constructor(a,f,m){this.tileID=a,this.bucketInstanceId=m,this._symbolsByKey={};const g=new Map;for(let b=0;b({x:Math.floor(k.anchorX*xu),y:Math.floor(k.anchorY*xu)})),crossTileIDs:T.map(k=>k.crossTileID)};if(L.positions.length>128){const k=new l.au(L.positions.length,16,Uint16Array);for(const{x:N,y:V}of L.positions)k.add(N,V);k.finish(),delete L.positions,L.index=k}this._symbolsByKey[b]=L}}getScaledCoordinates(a,f){const{x:m,y:g,z:b}=this.tileID.canonical,{x:T,y:L,z:k}=f.canonical,N=xu/Math.pow(2,k-b),V=(L*l.W+a.anchorY)*N,j=g*l.W*xu;return{x:Math.floor((T*l.W+a.anchorX)*N-m*l.W*xu),y:Math.floor(V-j)}}findMatches(a,f,m){const g=this.tileID.canonical.za)}}class hi{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class yc{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(a){const f=Math.round((a-this.lng)/360);if(f!==0)for(const m in this.indexes){const g=this.indexes[m],b={};for(const T in g){const L=g[T];L.tileID=L.tileID.unwrapTo(L.tileID.wrap+f),b[L.tileID.key]=L}this.indexes[m]=b}this.lng=a}addBucket(a,f,m){if(this.indexes[a.overscaledZ]&&this.indexes[a.overscaledZ][a.key]){if(this.indexes[a.overscaledZ][a.key].bucketInstanceId===f.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(a.overscaledZ,this.indexes[a.overscaledZ][a.key])}for(let b=0;ba.overscaledZ)for(const L in T){const k=T[L];k.tileID.isChildOf(a)&&k.findMatches(f.symbolInstances,a,g)}else{const L=T[a.scaledTo(Number(b)).key];L&&L.findMatches(f.symbolInstances,a,g)}}for(let b=0;b{f[m]=!0});for(const m in this.layerIndexes)f[m]||delete this.layerIndexes[m]}}const Pr=(y,a)=>l.t(y,a&&a.filter(f=>f.identifier!=="source.canvas")),gh=l.av();class Go extends l.E{constructor(a,f={}){super(),this._rtlPluginLoaded=()=>{for(const m in this.sourceCaches){const g=this.sourceCaches[m].getSource().type;g!=="vector"&&g!=="geojson"||this.sourceCaches[m].reload()}},this.map=a,this.dispatcher=new Yn(pn(),a._getMapId()),this.dispatcher.registerMessageHandler("GG",(m,g)=>this.getGlyphs(m,g)),this.dispatcher.registerMessageHandler("GI",(m,g)=>this.getImages(m,g)),this.imageManager=new Ke,this.imageManager.setEventedParent(this),this.glyphManager=new He(a._requestManager,f.localIdeographFontFamily),this.lineAtlas=new At(256,512),this.crossTileSymbolIndex=new nl,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new l.aw,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("SR",l.ax()),at().on(Fi,this._rtlPluginLoaded),this.on("data",m=>{if(m.dataType!=="source"||m.sourceDataType!=="metadata")return;const g=this.sourceCaches[m.sourceId];if(!g)return;const b=g.getSource();if(b&&b.vectorLayerIds)for(const T in this._layers){const L=this._layers[T];L.source===b.id&&this._validateLayer(L)}})}loadURL(a,f={},m){this.fire(new l.k("dataloading",{dataType:"style"})),f.validate=typeof f.validate!="boolean"||f.validate;const g=this.map._requestManager.transformRequest(a,"Style");this._loadStyleRequest=new AbortController,l.h(g,this._loadStyleRequest).then(b=>{this._loadStyleRequest=null,this._load(b.data,f,m)}).catch(b=>{this._loadStyleRequest=null,b&&this.fire(new l.j(b))})}loadJSON(a,f={},m){this.fire(new l.k("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,E.frameAsync(this._frameRequest).then(()=>{this._frameRequest=null,f.validate=f.validate!==!1,this._load(a,f,m)}).catch(()=>{})}loadEmpty(){this.fire(new l.k("dataloading",{dataType:"style"})),this._load(gh,{validate:!1})}_load(a,f,m){var g;const b=f.transformStyle?f.transformStyle(m,a):a;if(!f.validate||!Pr(this,l.x(b))){this._loaded=!0,this.stylesheet=b;for(const T in b.sources)this.addSource(T,b.sources[T],{validate:!1});b.sprite?this._loadSprite(b.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(b.glyphs),this._createLayers(),this.light=new vt(this.stylesheet.light),this.map.setTerrain((g=this.stylesheet.terrain)!==null&&g!==void 0?g:null),this.fire(new l.k("data",{dataType:"style"})),this.fire(new l.k("style.load"))}}_createLayers(){const a=l.ay(this.stylesheet.layers);this.dispatcher.broadcast("SL",a),this._order=a.map(f=>f.id),this._layers={},this._serializedLayers=null;for(const f of a){const m=l.az(f);m.setEventedParent(this,{layer:{id:f.id}}),this._layers[f.id]=m}}_loadSprite(a,f=!1,m=void 0){let g;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,function(b,T,L,k){return l._(this,void 0,void 0,function*(){const N=Ae(b),V=L>1?"@2x":"",j={},$={};for(const{id:he,url:ce}of N){const ge=T.transformRequest(T.normalizeSpriteURL(ce,V,".json"),"SpriteJSON");j[he]=l.h(ge,k);const re=T.transformRequest(T.normalizeSpriteURL(ce,V,".png"),"SpriteImage");$[he]=G.getImage(re,k)}return yield Promise.all([...Object.values(j),...Object.values($)]),function(he,ce){return l._(this,void 0,void 0,function*(){const ge={};for(const re in he){ge[re]={};const Ce=E.getImageCanvasContext((yield ce[re]).data),Be=(yield he[re]).data;for(const ve in Be){const{width:De,height:Ve,x:Ze,y:$e,sdf:rt,pixelRatio:nt,stretchX:ct,stretchY:pt,content:un}=Be[ve];ge[re][ve]={data:null,pixelRatio:nt,sdf:rt,stretchX:ct,stretchY:pt,content:un,spriteData:{width:De,height:Ve,x:Ze,y:$e,context:Ce}}}}return ge})}(j,$)})}(a,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(b=>{if(this._spriteRequest=null,b)for(const T in b){this._spritesImagesIds[T]=[];const L=this._spritesImagesIds[T]?this._spritesImagesIds[T].filter(k=>!(k in b)):[];for(const k of L)this.imageManager.removeImage(k),this._changedImages[k]=!0;for(const k in b[T]){const N=T==="default"?k:`${T}:${k}`;this._spritesImagesIds[T].push(N),N in this.imageManager.images?this.imageManager.updateImage(N,b[T][k],!1):this.imageManager.addImage(N,b[T][k]),f&&(this._changedImages[N]=!0)}}}).catch(b=>{this._spriteRequest=null,g=b,this.fire(new l.j(g))}).finally(()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),f&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new l.k("data",{dataType:"style"})),m&&m(g)})}_unloadSprite(){for(const a of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(a),this._changedImages[a]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new l.k("data",{dataType:"style"}))}_validateLayer(a){const f=this.sourceCaches[a.source];if(!f)return;const m=a.sourceLayer;if(!m)return;const g=f.getSource();(g.type==="geojson"||g.vectorLayerIds&&g.vectorLayerIds.indexOf(m)===-1)&&this.fire(new l.j(new Error(`Source layer "${m}" does not exist on source "${g.id}" as specified by style layer "${a.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(const a in this.sourceCaches)if(!this.sourceCaches[a].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeByIds(a){const f=this._serializedAllLayers();if(!a||a.length===0)return Object.values(f);const m=[];for(const g of a)f[g]&&m.push(f[g]);return m}_serializedAllLayers(){let a=this._serializedLayers;if(a)return a;a=this._serializedLayers={};const f=Object.keys(this._layers);for(const m of f){const g=this._layers[m];g.type!=="custom"&&(a[m]=g.serialize())}return a}hasTransitions(){if(this.light&&this.light.hasTransition())return!0;for(const a in this.sourceCaches)if(this.sourceCaches[a].hasTransition())return!0;for(const a in this._layers)if(this._layers[a].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(a){if(!this._loaded)return;const f=this._changed;if(f){const g=Object.keys(this._updatedLayers),b=Object.keys(this._removedLayers);(g.length||b.length)&&this._updateWorkerLayers(g,b);for(const T in this._updatedSources){const L=this._updatedSources[T];if(L==="reload")this._reloadSource(T);else{if(L!=="clear")throw new Error(`Invalid action ${L}`);this._clearSource(T)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(const T in this._updatedPaintProps)this._layers[T].updateTransitions(a);this.light.updateTransitions(a),this._resetUpdates()}const m={};for(const g in this.sourceCaches){const b=this.sourceCaches[g];m[g]=b.used,b.used=!1}for(const g of this._order){const b=this._layers[g];b.recalculate(a,this._availableImages),!b.isHidden(a.zoom)&&b.source&&(this.sourceCaches[b.source].used=!0)}for(const g in m){const b=this.sourceCaches[g];!!m[g]!=!!b.used&&b.fire(new l.k("data",{sourceDataType:"visibility",dataType:"source",sourceId:g}))}this.light.recalculate(a),this.z=a.zoom,f&&this.fire(new l.k("data",{dataType:"style"}))}_updateTilesForChangedImages(){const a=Object.keys(this._changedImages);if(a.length){for(const f in this.sourceCaches)this.sourceCaches[f].reloadTilesForDependencies(["icons","patterns"],a);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(const a in this.sourceCaches)this.sourceCaches[a].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(a,f){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(a),removedIds:f})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(a,f={}){var m;this._checkLoaded();const g=this.serialize();if(a=f.transformStyle?f.transformStyle(g,a):a,((m=f.validate)===null||m===void 0||m)&&Pr(this,l.x(a)))return!1;(a=l.aA(a)).layers=l.ay(a.layers);const b=l.aB(g,a),T=this._getOperationsToPerform(b);if(T.unimplemented.length>0)throw new Error(`Unimplemented: ${T.unimplemented.join(", ")}.`);if(T.operations.length===0)return!1;for(const L of T.operations)L();return this.stylesheet=a,this._serializedLayers=null,!0}_getOperationsToPerform(a){const f=[],m=[];for(const g of a)switch(g.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":continue;case"addLayer":f.push(()=>this.addLayer.apply(this,g.args));break;case"removeLayer":f.push(()=>this.removeLayer.apply(this,g.args));break;case"setPaintProperty":f.push(()=>this.setPaintProperty.apply(this,g.args));break;case"setLayoutProperty":f.push(()=>this.setLayoutProperty.apply(this,g.args));break;case"setFilter":f.push(()=>this.setFilter.apply(this,g.args));break;case"addSource":f.push(()=>this.addSource.apply(this,g.args));break;case"removeSource":f.push(()=>this.removeSource.apply(this,g.args));break;case"setLayerZoomRange":f.push(()=>this.setLayerZoomRange.apply(this,g.args));break;case"setLight":f.push(()=>this.setLight.apply(this,g.args));break;case"setGeoJSONSourceData":f.push(()=>this.setGeoJSONSourceData.apply(this,g.args));break;case"setGlyphs":f.push(()=>this.setGlyphs.apply(this,g.args));break;case"setSprite":f.push(()=>this.setSprite.apply(this,g.args));break;case"setTerrain":f.push(()=>this.map.setTerrain.apply(this,g.args));break;case"setTransition":f.push(()=>{});break;default:m.push(g.command)}return{operations:f,unimplemented:m}}addImage(a,f){if(this.getImage(a))return this.fire(new l.j(new Error(`An image named "${a}" already exists.`)));this.imageManager.addImage(a,f),this._afterImageUpdated(a)}updateImage(a,f){this.imageManager.updateImage(a,f)}getImage(a){return this.imageManager.getImage(a)}removeImage(a){if(!this.getImage(a))return this.fire(new l.j(new Error(`An image named "${a}" does not exist.`)));this.imageManager.removeImage(a),this._afterImageUpdated(a)}_afterImageUpdated(a){this._availableImages=this.imageManager.listImages(),this._changedImages[a]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new l.k("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(a,f,m={}){if(this._checkLoaded(),this.sourceCaches[a]!==void 0)throw new Error(`Source "${a}" already exists.`);if(!f.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(f).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(f.type)>=0&&this._validate(l.x.source,`sources.${a}`,f,null,m))return;this.map&&this.map._collectResourceTiming&&(f.collectResourceTiming=!0);const g=this.sourceCaches[a]=new ui(a,f,this.dispatcher);g.style=this,g.setEventedParent(this,()=>({isSourceLoaded:g.loaded(),source:g.serialize(),sourceId:a})),g.onAdd(this.map),this._changed=!0}removeSource(a){if(this._checkLoaded(),this.sourceCaches[a]===void 0)throw new Error("There is no source with this ID");for(const m in this._layers)if(this._layers[m].source===a)return this.fire(new l.j(new Error(`Source "${a}" cannot be removed while layer "${m}" is using it.`)));const f=this.sourceCaches[a];delete this.sourceCaches[a],delete this._updatedSources[a],f.fire(new l.k("data",{sourceDataType:"metadata",dataType:"source",sourceId:a})),f.setEventedParent(null),f.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(a,f){if(this._checkLoaded(),this.sourceCaches[a]===void 0)throw new Error(`There is no source with this ID=${a}`);const m=this.sourceCaches[a].getSource();if(m.type!=="geojson")throw new Error(`geojsonSource.type is ${m.type}, which is !== 'geojson`);m.setData(f),this._changed=!0}getSource(a){return this.sourceCaches[a]&&this.sourceCaches[a].getSource()}addLayer(a,f,m={}){this._checkLoaded();const g=a.id;if(this.getLayer(g))return void this.fire(new l.j(new Error(`Layer "${g}" already exists on this map.`)));let b;if(a.type==="custom"){if(Pr(this,l.aC(a)))return;b=l.az(a)}else{if("source"in a&&typeof a.source=="object"&&(this.addSource(g,a.source),a=l.aA(a),a=l.e(a,{source:g})),this._validate(l.x.layer,`layers.${g}`,a,{arrayIndex:-1},m))return;b=l.az(a),this._validateLayer(b),b.setEventedParent(this,{layer:{id:g}})}const T=f?this._order.indexOf(f):this._order.length;if(f&&T===-1)this.fire(new l.j(new Error(`Cannot add layer "${g}" before non-existing layer "${f}".`)));else{if(this._order.splice(T,0,g),this._layerOrderChanged=!0,this._layers[g]=b,this._removedLayers[g]&&b.source&&b.type!=="custom"){const L=this._removedLayers[g];delete this._removedLayers[g],L.type!==b.type?this._updatedSources[b.source]="clear":(this._updatedSources[b.source]="reload",this.sourceCaches[b.source].pause())}this._updateLayer(b),b.onAdd&&b.onAdd(this.map)}}moveLayer(a,f){if(this._checkLoaded(),this._changed=!0,!this._layers[a])return void this.fire(new l.j(new Error(`The layer '${a}' does not exist in the map's style and cannot be moved.`)));if(a===f)return;const m=this._order.indexOf(a);this._order.splice(m,1);const g=f?this._order.indexOf(f):this._order.length;f&&g===-1?this.fire(new l.j(new Error(`Cannot move layer "${a}" before non-existing layer "${f}".`))):(this._order.splice(g,0,a),this._layerOrderChanged=!0)}removeLayer(a){this._checkLoaded();const f=this._layers[a];if(!f)return void this.fire(new l.j(new Error(`Cannot remove non-existing layer "${a}".`)));f.setEventedParent(null);const m=this._order.indexOf(a);this._order.splice(m,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[a]=f,delete this._layers[a],this._serializedLayers&&delete this._serializedLayers[a],delete this._updatedLayers[a],delete this._updatedPaintProps[a],f.onRemove&&f.onRemove(this.map)}getLayer(a){return this._layers[a]}getLayersOrder(){return[...this._order]}hasLayer(a){return a in this._layers}setLayerZoomRange(a,f,m){this._checkLoaded();const g=this.getLayer(a);g?g.minzoom===f&&g.maxzoom===m||(f!=null&&(g.minzoom=f),m!=null&&(g.maxzoom=m),this._updateLayer(g)):this.fire(new l.j(new Error(`Cannot set the zoom range of non-existing layer "${a}".`)))}setFilter(a,f,m={}){this._checkLoaded();const g=this.getLayer(a);if(g){if(!l.aD(g.filter,f))return f==null?(g.filter=void 0,void this._updateLayer(g)):void(this._validate(l.x.filter,`layers.${g.id}.filter`,f,null,m)||(g.filter=l.aA(f),this._updateLayer(g)))}else this.fire(new l.j(new Error(`Cannot filter non-existing layer "${a}".`)))}getFilter(a){return l.aA(this.getLayer(a).filter)}setLayoutProperty(a,f,m,g={}){this._checkLoaded();const b=this.getLayer(a);b?l.aD(b.getLayoutProperty(f),m)||(b.setLayoutProperty(f,m,g),this._updateLayer(b)):this.fire(new l.j(new Error(`Cannot style non-existing layer "${a}".`)))}getLayoutProperty(a,f){const m=this.getLayer(a);if(m)return m.getLayoutProperty(f);this.fire(new l.j(new Error(`Cannot get style of non-existing layer "${a}".`)))}setPaintProperty(a,f,m,g={}){this._checkLoaded();const b=this.getLayer(a);b?l.aD(b.getPaintProperty(f),m)||(b.setPaintProperty(f,m,g)&&this._updateLayer(b),this._changed=!0,this._updatedPaintProps[a]=!0,this._serializedLayers=null):this.fire(new l.j(new Error(`Cannot style non-existing layer "${a}".`)))}getPaintProperty(a,f){return this.getLayer(a).getPaintProperty(f)}setFeatureState(a,f){this._checkLoaded();const m=a.source,g=a.sourceLayer,b=this.sourceCaches[m];if(b===void 0)return void this.fire(new l.j(new Error(`The source '${m}' does not exist in the map's style.`)));const T=b.getSource().type;T==="geojson"&&g?this.fire(new l.j(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):T!=="vector"||g?(a.id===void 0&&this.fire(new l.j(new Error("The feature id parameter must be provided."))),b.setFeatureState(g,a.id,f)):this.fire(new l.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(a,f){this._checkLoaded();const m=a.source,g=this.sourceCaches[m];if(g===void 0)return void this.fire(new l.j(new Error(`The source '${m}' does not exist in the map's style.`)));const b=g.getSource().type,T=b==="vector"?a.sourceLayer:void 0;b!=="vector"||T?f&&typeof a.id!="string"&&typeof a.id!="number"?this.fire(new l.j(new Error("A feature id is required to remove its specific state property."))):g.removeFeatureState(T,a.id,f):this.fire(new l.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(a){this._checkLoaded();const f=a.source,m=a.sourceLayer,g=this.sourceCaches[f];if(g!==void 0)return g.getSource().type!=="vector"||m?(a.id===void 0&&this.fire(new l.j(new Error("The feature id parameter must be provided."))),g.getFeatureState(m,a.id)):void this.fire(new l.j(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new l.j(new Error(`The source '${f}' does not exist in the map's style.`)))}getTransition(){return l.e({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){if(!this._loaded)return;const a=l.aE(this.sourceCaches,b=>b.serialize()),f=this._serializeByIds(this._order),m=this.map.getTerrain()||void 0,g=this.stylesheet;return l.aF({version:g.version,name:g.name,metadata:g.metadata,light:g.light,center:g.center,zoom:g.zoom,bearing:g.bearing,pitch:g.pitch,sprite:g.sprite,glyphs:g.glyphs,transition:g.transition,sources:a,layers:f,terrain:m},b=>b!==void 0)}_updateLayer(a){this._updatedLayers[a.id]=!0,a.source&&!this._updatedSources[a.source]&&this.sourceCaches[a.source].getSource().type!=="raster"&&(this._updatedSources[a.source]="reload",this.sourceCaches[a.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(a){const f=T=>this._layers[T].type==="fill-extrusion",m={},g=[];for(let T=this._order.length-1;T>=0;T--){const L=this._order[T];if(f(L)){m[L]=T;for(const k of a){const N=k[L];if(N)for(const V of N)g.push(V)}}}g.sort((T,L)=>L.intersectionZ-T.intersectionZ);const b=[];for(let T=this._order.length-1;T>=0;T--){const L=this._order[T];if(f(L))for(let k=g.length-1;k>=0;k--){const N=g[k].feature;if(m[N.layer.id]{const rt=Ce.featureSortOrder;if(rt){const nt=rt.indexOf(Ze.featureIndex);return rt.indexOf($e.featureIndex)-nt}return $e.featureIndex-Ze.featureIndex});for(const Ze of Ve)De.push(Ze)}}for(const Ce in ce)ce[Ce].forEach(Be=>{const ve=Be.feature,De=N[L[Ce].source].getFeatureState(ve.layer["source-layer"],ve.id);ve.source=ve.layer.source,ve.layer["source-layer"]&&(ve.sourceLayer=ve.layer["source-layer"]),ve.state=De});return ce}(this._layers,T,this.sourceCaches,a,f,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(b)}querySourceFeatures(a,f){f&&f.filter&&this._validate(l.x.filter,"querySourceFeatures.filter",f.filter,null,f);const m=this.sourceCaches[a];return m?function(g,b){const T=g.getRenderableIds().map(N=>g.getTileByID(N)),L=[],k={};for(let N=0;N$.getTileByID(he)).sort((he,ce)=>ce.tileID.overscaledZ-he.tileID.overscaledZ||(he.tileID.isLessThan(ce.tileID)?-1:1))}const j=this.crossTileSymbolIndex.addLayer(V,k[V.source],a.center.lng);T=T||j}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((b=b||this._layerOrderChanged||m===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(E.now(),a.zoom))&&(this.pauseablePlacement=new hs(a,this.map.terrain,this._order,b,f,m,g,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,k),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(E.now()),L=!0),T&&this.pauseablePlacement.placement.setStale()),L||T)for(const N of this._order){const V=this._layers[N];V.type==="symbol"&&this.placement.updateLayerOpacities(V,k[V.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(E.now())}_releaseSymbolFadeTiles(){for(const a in this.sourceCaches)this.sourceCaches[a].releaseSymbolFadeTiles()}getImages(a,f){return l._(this,void 0,void 0,function*(){const m=yield this.imageManager.getImages(f.icons);this._updateTilesForChangedImages();const g=this.sourceCaches[f.source];return g&&g.setDependencies(f.tileID.key,f.type,f.icons),m})}getGlyphs(a,f){return l._(this,void 0,void 0,function*(){const m=yield this.glyphManager.getGlyphs(f.stacks),g=this.sourceCaches[f.source];return g&&g.setDependencies(f.tileID.key,f.type,[""]),m})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(a,f={}){this._checkLoaded(),a&&this._validate(l.x.glyphs,"glyphs",a,null,f)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=a,this.glyphManager.entries={},this.glyphManager.setURL(a))}addSprite(a,f,m={},g){this._checkLoaded();const b=[{id:a,url:f}],T=[...Ae(this.stylesheet.sprite),...b];this._validate(l.x.sprite,"sprite",T,null,m)||(this.stylesheet.sprite=T,this._loadSprite(b,!0,g))}removeSprite(a){this._checkLoaded();const f=Ae(this.stylesheet.sprite);if(f.find(m=>m.id===a)){if(this._spritesImagesIds[a])for(const m of this._spritesImagesIds[a])this.imageManager.removeImage(m),this._changedImages[m]=!0;f.splice(f.findIndex(m=>m.id===a),1),this.stylesheet.sprite=f.length>0?f:void 0,delete this._spritesImagesIds[a],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new l.k("data",{dataType:"style"}))}else this.fire(new l.j(new Error(`Sprite "${a}" doesn't exists on this map.`)))}getSprite(){return Ae(this.stylesheet.sprite)}setSprite(a,f={},m){this._checkLoaded(),a&&this._validate(l.x.sprite,"sprite",a,null,f)||(this.stylesheet.sprite=a,a?this._loadSprite(a,!0,m):(this._unloadSprite(),m&&m(null)))}}var _h=l.X([{name:"a_pos",type:"Int16",components:2}]),Qs="attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;varying float v_depth;void main() {float extent=8192.0;float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/extent;gl_Position=u_matrix*vec4(a_pos3d.xy,get_elevation(a_pos3d.xy)-ele_delta,1.0);v_depth=gl_Position.z/gl_Position.w;}";const vc={prelude:Kn(`#ifdef GL_ES + */(function(t,e){(function(n,r){t.exports=r()})(ym,function(){var n={},r={};function i(c,l,d){if(r[c]=d,c==="index"){var v="var sharedModule = {}; ("+r.shared+")(sharedModule); ("+r.worker+")(sharedModule);",S={};return r.shared(S),r.index(n,S),typeof window<"u"&&n.setWorkerUrl(window.URL.createObjectURL(new Blob([v],{type:"text/javascript"}))),n}}i("shared",["exports"],function(c){function l(u,o,h,p){return new(h||(h=Promise))(function(_,x){function w(D){try{P(p.next(D))}catch(O){x(O)}}function I(D){try{P(p.throw(D))}catch(O){x(O)}}function P(D){var O;D.done?_(D.value):(O=D.value,O instanceof h?O:new h(function(B){B(O)})).then(w,I)}P((p=p.apply(u,o||[])).next())})}function d(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}typeof SuppressedError=="function"&&SuppressedError;var v=S;function S(u,o){this.x=u,this.y=o}S.prototype={clone:function(){return new S(this.x,this.y)},add:function(u){return this.clone()._add(u)},sub:function(u){return this.clone()._sub(u)},multByPoint:function(u){return this.clone()._multByPoint(u)},divByPoint:function(u){return this.clone()._divByPoint(u)},mult:function(u){return this.clone()._mult(u)},div:function(u){return this.clone()._div(u)},rotate:function(u){return this.clone()._rotate(u)},rotateAround:function(u,o){return this.clone()._rotateAround(u,o)},matMult:function(u){return this.clone()._matMult(u)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(u){return this.x===u.x&&this.y===u.y},dist:function(u){return Math.sqrt(this.distSqr(u))},distSqr:function(u){var o=u.x-this.x,h=u.y-this.y;return o*o+h*h},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(u){return Math.atan2(this.y-u.y,this.x-u.x)},angleWith:function(u){return this.angleWithSep(u.x,u.y)},angleWithSep:function(u,o){return Math.atan2(this.x*o-this.y*u,this.x*u+this.y*o)},_matMult:function(u){var o=u[2]*this.x+u[3]*this.y;return this.x=u[0]*this.x+u[1]*this.y,this.y=o,this},_add:function(u){return this.x+=u.x,this.y+=u.y,this},_sub:function(u){return this.x-=u.x,this.y-=u.y,this},_mult:function(u){return this.x*=u,this.y*=u,this},_div:function(u){return this.x/=u,this.y/=u,this},_multByPoint:function(u){return this.x*=u.x,this.y*=u.y,this},_divByPoint:function(u){return this.x/=u.x,this.y/=u.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var u=this.y;return this.y=this.x,this.x=-u,this},_rotate:function(u){var o=Math.cos(u),h=Math.sin(u),p=h*this.x+o*this.y;return this.x=o*this.x-h*this.y,this.y=p,this},_rotateAround:function(u,o){var h=Math.cos(u),p=Math.sin(u),_=o.y+p*(this.x-o.x)+h*(this.y-o.y);return this.x=o.x+h*(this.x-o.x)-p*(this.y-o.y),this.y=_,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},S.convert=function(u){return u instanceof S?u:Array.isArray(u)?new S(u[0],u[1]):u};var E=d(v),C=M;function M(u,o,h,p){this.cx=3*u,this.bx=3*(h-u)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*o,this.by=3*(p-o)-this.cy,this.ay=1-this.cy-this.by,this.p1x=u,this.p1y=o,this.p2x=h,this.p2y=p}M.prototype={sampleCurveX:function(u){return((this.ax*u+this.bx)*u+this.cx)*u},sampleCurveY:function(u){return((this.ay*u+this.by)*u+this.cy)*u},sampleCurveDerivativeX:function(u){return(3*this.ax*u+2*this.bx)*u+this.cx},solveCurveX:function(u,o){if(o===void 0&&(o=1e-6),u<0)return 0;if(u>1)return 1;for(var h=u,p=0;p<8;p++){var _=this.sampleCurveX(h)-u;if(Math.abs(_)_?w=h:I=h,h=.5*(I-w)+w;return h},solve:function(u,o){return this.sampleCurveY(this.solveCurveX(u,o))}};var A=d(C);let R,z;function U(){return R==null&&(R=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),R}function F(){if(z==null&&(z=!1,U())){const o=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(o){for(let p=0;p<5*5;p++){const _=4*p;o.fillStyle=`rgb(${_},${_+1},${_+2})`,o.fillRect(p%5,Math.floor(p/5),1,1)}const h=o.getImageData(0,0,5,5).data;for(let p=0;p<5*5*4;p++)if(p%4!=3&&h[p]!==p){z=!0;break}}}return z||!1}function G(u,o,h,p){const _=new A(u,o,h,p);return function(x){return _.solve(x)}}const H=G(.25,.1,.25,1);function te(u,o,h){return Math.min(h,Math.max(o,u))}function ee(u,o,h){const p=h-o,_=((u-o)%p+p)%p+o;return _===o?h:_}function fe(u,...o){for(const h of o)for(const p in h)u[p]=h[p];return u}let pe=1;function se(u,o,h){const p={};for(const _ in u)p[_]=o.call(h||this,u[_],_,u);return p}function Ae(u,o,h){const p={};for(const _ in u)o.call(h||this,u[_],_,u)&&(p[_]=u[_]);return p}function Y(u){return Array.isArray(u)?u.map(Y):typeof u=="object"&&u?se(u,Y):u}const ae={};function Ke(u){ae[u]||(typeof console<"u"&&console.warn(u),ae[u]=!0)}function Le(u,o,h){return(h.y-u.y)*(o.x-u.x)>(o.y-u.y)*(h.x-u.x)}function tt(u){let o=0;for(let h,p,_=0,x=u.length,w=x-1;_"u")throw new Error("VideoFrame not supported");const x=new VideoFrame(u,{timestamp:0});try{const w=x==null?void 0:x.format;if(!w||!w.startsWith("BGR")&&!w.startsWith("RGB"))throw new Error(`Unrecognized format ${w}`);const I=w.startsWith("BGR"),P=new Uint8ClampedArray(p*_*4);if(yield x.copyTo(P,function(D,O,B,W,X){const K=4*Math.max(-O,0),ie=(Math.max(0,B)-B)*W*4+K,de=4*W,we=Math.max(0,O),Oe=Math.max(0,B);return{rect:{x:we,y:Oe,width:Math.min(D.width,O+W)-we,height:Math.min(D.height,B+X)-Oe},layout:[{offset:ie,stride:de}]}}(u,o,h,p,_)),I)for(let D=0;Dut(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,Pn=function(u,o){if(/:\/\//.test(u.url)&&!/^https?:|^file:/.test(u.url)){const p=_n(u.url);if(p)return p(u,o);if(ut(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:u,targetMapId:pn},o)}if(!(/^file:/.test(h=u.url)||/^file:/.test(zr())&&!/^\w+:/.test(h))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(p,_){return l(this,void 0,void 0,function*(){const x=new Request(p.url,{method:p.method||"GET",body:p.body,credentials:p.credentials,headers:p.headers,cache:p.cache,referrer:zr(),signal:_.signal});p.type==="json"&&x.headers.set("Accept","application/json");const w=yield fetch(x);if(!w.ok){const D=yield w.blob();throw new Yn(w.status,w.statusText,p.url,D)}let I;I=p.type==="arrayBuffer"||p.type==="image"?w.arrayBuffer():p.type==="json"?w.json():w.text();const P=yield I;if(_.signal.aborted)throw wn();return{data:P,cacheControl:w.headers.get("Cache-Control"),expires:w.headers.get("Expires")}})}(u,o);if(ut(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:u,mustQueue:!0,targetMapId:pn},o)}var h;return function(p,_){return new Promise((x,w)=>{const I=new XMLHttpRequest;I.open(p.method||"GET",p.url,!0),p.type!=="arrayBuffer"&&p.type!=="image"||(I.responseType="arraybuffer");for(const P in p.headers)I.setRequestHeader(P,p.headers[P]);p.type==="json"&&(I.responseType="text",I.setRequestHeader("Accept","application/json")),I.withCredentials=p.credentials==="include",I.onerror=()=>{w(new Error(I.statusText))},I.onload=()=>{if(!_.signal.aborted)if((I.status>=200&&I.status<300||I.status===0)&&I.response!==null){let P=I.response;if(p.type==="json")try{P=JSON.parse(I.response)}catch(D){return void w(D)}x({data:P,cacheControl:I.getResponseHeader("Cache-Control"),expires:I.getResponseHeader("Expires")})}else{const P=new Blob([I.response],{type:I.getResponseHeader("Content-Type")});w(new Yn(I.status,I.statusText,p.url,P))}},_.signal.addEventListener("abort",()=>{I.abort(),w(wn())}),I.send(p.body)})}(u,o)};function ar(u){if(!u||u.indexOf("://")<=0||u.indexOf("data:image/")===0||u.indexOf("blob:")===0)return!0;const o=new URL(u),h=window.location;return o.protocol===h.protocol&&o.host===h.host}function Zn(u,o,h){h[u]&&h[u].indexOf(o)!==-1||(h[u]=h[u]||[],h[u].push(o))}function ne(u,o,h){if(h&&h[u]){const p=h[u].indexOf(o);p!==-1&&h[u].splice(p,1)}}class Me{constructor(o,h={}){fe(this,h),this.type=o}}class dt extends Me{constructor(o,h={}){super("error",fe({error:o},h))}}class en{on(o,h){return this._listeners=this._listeners||{},Zn(o,h,this._listeners),this}off(o,h){return ne(o,h,this._listeners),ne(o,h,this._oneTimeListeners),this}once(o,h){return h?(this._oneTimeListeners=this._oneTimeListeners||{},Zn(o,h,this._oneTimeListeners),this):new Promise(p=>this.once(o,p))}fire(o,h){typeof o=="string"&&(o=new Me(o,h||{}));const p=o.type;if(this.listens(p)){o.target=this;const _=this._listeners&&this._listeners[p]?this._listeners[p].slice():[];for(const I of _)I.call(this,o);const x=this._oneTimeListeners&&this._oneTimeListeners[p]?this._oneTimeListeners[p].slice():[];for(const I of x)ne(p,I,this._oneTimeListeners),I.call(this,o);const w=this._eventedParent;w&&(fe(o,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),w.fire(o))}else o instanceof dt&&console.error(o.error);return this}listens(o){return this._listeners&&this._listeners[o]&&this._listeners[o].length>0||this._oneTimeListeners&&this._oneTimeListeners[o]&&this._oneTimeListeners[o].length>0||this._eventedParent&&this._eventedParent.listens(o)}setEventedParent(o,h){return this._eventedParent=o,this._eventedParentData=h,this}}var Re={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sky:{type:"sky"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};const It=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Cn(u,o){const h={};for(const p in u)p!=="ref"&&(h[p]=u[p]);return It.forEach(p=>{p in o&&(h[p]=o[p])}),h}function yn(u,o){if(Array.isArray(u)){if(!Array.isArray(o)||u.length!==o.length)return!1;for(let h=0;h`:u.itemType.kind==="value"?"array":`array<${o}>`}return u.kind}const Te=[ui,ft,ln,sn,Zr,Jr,us,J(on),me,q,Z];function Q(u,o){if(o.kind==="error")return null;if(u.kind==="array"){if(o.kind==="array"&&(o.N===0&&o.itemType.kind==="value"||!Q(u.itemType,o.itemType))&&(typeof u.N!="number"||u.N===o.N))return null}else{if(u.kind===o.kind)return null;if(u.kind==="value"){for(const h of Te)if(!Q(h,o))return null}}return`Expected ${le(u)} but found ${le(o)} instead.`}function Pe(u,o){return o.some(h=>h.kind===u.kind)}function Se(u,o){return o.some(h=>h==="null"?u===null:h==="array"?Array.isArray(u):h==="object"?u&&!Array.isArray(u)&&typeof u=="object":h===typeof u)}function Ne(u,o){return u.kind==="array"&&o.kind==="array"?u.itemType.kind===o.itemType.kind&&typeof u.N=="number":u.kind===o.kind}const qe=.96422,Ye=.82521,Je=4/29,Dt=6/29,zt=3*Dt*Dt,Qt=Dt*Dt*Dt,tn=Math.PI/180,Mn=180/Math.PI;function er(u){return(u%=360)<0&&(u+=360),u}function vr([u,o,h,p]){let _,x;const w=dn((.2225045*(u=ci(u))+.7168786*(o=ci(o))+.0606169*(h=ci(h)))/1);u===o&&o===h?_=x=w:(_=dn((.4360747*u+.3850649*o+.1430804*h)/qe),x=dn((.0139322*u+.0971045*o+.7141733*h)/Ye));const I=116*w-16;return[I<0?0:I,500*(_-w),200*(w-x),p]}function ci(u){return u<=.04045?u/12.92:Math.pow((u+.055)/1.055,2.4)}function dn(u){return u>Qt?Math.pow(u,1/3):u/zt+Je}function Fr([u,o,h,p]){let _=(u+16)/116,x=isNaN(o)?_:_+o/500,w=isNaN(h)?_:_-h/200;return _=1*uo(_),x=qe*uo(x),w=Ye*uo(w),[_i(3.1338561*x-1.6168667*_-.4906146*w),_i(-.9787684*x+1.9161415*_+.033454*w),_i(.0719453*x-.2289914*_+1.4052427*w),p]}function _i(u){return(u=u<=.00304?12.92*u:1.055*Math.pow(u,1/2.4)-.055)<0?0:u>1?1:u}function uo(u){return u>Dt?u*u*u:zt*(u-Je)}function Eo(u){return parseInt(u.padEnd(2,u),16)/255}function Pi(u,o){return Js(o?u/100:u,0,1)}function Js(u,o,h){return Math.min(Math.max(o,u),h)}function Am(u){return!u.some(Number.isNaN)}const Ay={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};class $n{constructor(o,h,p,_=1,x=!0){this.r=o,this.g=h,this.b=p,this.a=_,x||(this.r*=_,this.g*=_,this.b*=_,_||this.overwriteGetter("rgb",[o,h,p,_]))}static parse(o){if(o instanceof $n)return o;if(typeof o!="string")return;const h=function(p){if((p=p.toLowerCase().trim())==="transparent")return[0,0,0,0];const _=Ay[p];if(_){const[w,I,P]=_;return[w/255,I/255,P/255,1]}if(p.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(p)){const w=p.length<6?1:2;let I=1;return[Eo(p.slice(I,I+=w)),Eo(p.slice(I,I+=w)),Eo(p.slice(I,I+=w)),Eo(p.slice(I,I+w)||"ff")]}if(p.startsWith("rgb")){const w=p.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(w){const[I,P,D,O,B,W,X,K,ie,de,we,Oe]=w,Ee=[O||" ",X||" ",de].join("");if(Ee===" "||Ee===" /"||Ee===",,"||Ee===",,,"){const ke=[D,W,ie].join(""),Qe=ke==="%%%"?100:ke===""?255:0;if(Qe){const et=[Js(+P/Qe,0,1),Js(+B/Qe,0,1),Js(+K/Qe,0,1),we?Pi(+we,Oe):1];if(Am(et))return et}}return}}const x=p.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(x){const[w,I,P,D,O,B,W,X,K]=x,ie=[P||" ",O||" ",W].join("");if(ie===" "||ie===" /"||ie===",,"||ie===",,,"){const de=[+I,Js(+D,0,100),Js(+B,0,100),X?Pi(+X,K):1];if(Am(de))return function([we,Oe,Ee,ke]){function Qe(et){const St=(et+we/30)%12,kt=Oe*Math.min(Ee,1-Ee);return Ee-kt*Math.max(-1,Math.min(St-3,9-St,1))}return we=er(we),Oe/=100,Ee/=100,[Qe(0),Qe(8),Qe(4),ke]}(de)}}}(o);return h?new $n(...h,!1):void 0}get rgb(){const{r:o,g:h,b:p,a:_}=this,x=_||1/0;return this.overwriteGetter("rgb",[o/x,h/x,p/x,_])}get hcl(){return this.overwriteGetter("hcl",function(o){const[h,p,_,x]=vr(o),w=Math.sqrt(p*p+_*_);return[Math.round(1e4*w)?er(Math.atan2(_,p)*Mn):NaN,w,h,x]}(this.rgb))}get lab(){return this.overwriteGetter("lab",vr(this.rgb))}overwriteGetter(o,h){return Object.defineProperty(this,o,{value:h}),h}toString(){const[o,h,p,_]=this.rgb;return`rgba(${[o,h,p].map(x=>Math.round(255*x)).join(",")},${_})`}}$n.black=new $n(0,0,0,1),$n.white=new $n(1,1,1,1),$n.transparent=new $n(0,0,0,0),$n.red=new $n(1,0,0,1);class yp{constructor(o,h,p){this.sensitivity=o?h?"variant":"case":h?"accent":"base",this.locale=p,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(o,h){return this.collator.compare(o,h)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class vp{constructor(o,h,p,_,x){this.text=o,this.image=h,this.scale=p,this.fontStack=_,this.textColor=x}}class Go{constructor(o){this.sections=o}static fromString(o){return new Go([new vp(o,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(o=>o.text.length!==0||o.image&&o.image.name.length!==0)}static factory(o){return o instanceof Go?o:Go.fromString(o)}toString(){return this.sections.length===0?"":this.sections.map(o=>o.text).join("")}}class Io{constructor(o){this.values=o.slice()}static parse(o){if(o instanceof Io)return o;if(typeof o=="number")return new Io([o,o,o,o]);if(Array.isArray(o)&&!(o.length<1||o.length>4)){for(const h of o)if(typeof h!="number")return;switch(o.length){case 1:o=[o[0],o[0],o[0],o[0]];break;case 2:o=[o[0],o[1],o[0],o[1]];break;case 3:o=[o[0],o[1],o[2],o[1]]}return new Io(o)}}toString(){return JSON.stringify(this.values)}}const _c=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class cs{constructor(o){this.values=o.slice()}static parse(o){if(o instanceof cs)return o;if(Array.isArray(o)&&!(o.length<1)&&o.length%2==0){for(let h=0;h=0&&u<=255&&typeof o=="number"&&o>=0&&o<=255&&typeof h=="number"&&h>=0&&h<=255?p===void 0||typeof p=="number"&&p>=0&&p<=1?null:`Invalid rgba value [${[u,o,h,p].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof p=="number"?[u,o,h,p]:[u,o,h]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function mh(u){if(u===null||typeof u=="string"||typeof u=="boolean"||typeof u=="number"||u instanceof $n||u instanceof yp||u instanceof Go||u instanceof Io||u instanceof cs||u instanceof hs)return!0;if(Array.isArray(u)){for(const o of u)if(!mh(o))return!1;return!0}if(typeof u=="object"){for(const o in u)if(!mh(u[o]))return!1;return!0}return!1}function hi(u){if(u===null)return ui;if(typeof u=="string")return ln;if(typeof u=="boolean")return sn;if(typeof u=="number")return ft;if(u instanceof $n)return Zr;if(u instanceof yp)return Aa;if(u instanceof Go)return Jr;if(u instanceof Io)return me;if(u instanceof cs)return Z;if(u instanceof hs)return q;if(Array.isArray(u)){const o=u.length;let h;for(const p of u){const _=hi(p);if(h){if(h===_)continue;h=on;break}h=_}return J(h||on,o)}return us}function yc(u){const o=typeof u;return u===null?"":o==="string"||o==="number"||o==="boolean"?String(u):u instanceof $n||u instanceof Go||u instanceof Io||u instanceof cs||u instanceof hs?u.toString():JSON.stringify(u)}class nl{constructor(o,h){this.type=o,this.value=h}static parse(o,h){if(o.length!==2)return h.error(`'literal' expression requires exactly one argument, but found ${o.length-1} instead.`);if(!mh(o[1]))return h.error("invalid value");const p=o[1];let _=hi(p);const x=h.expectedType;return _.kind!=="array"||_.N!==0||!x||x.kind!=="array"||typeof x.N=="number"&&x.N!==0||(_=x),new nl(_,p)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class Pr{constructor(o){this.name="ExpressionEvaluationError",this.message=o}toJSON(){return this.message}}const gh={string:ln,number:ft,boolean:sn,object:us};class qo{constructor(o,h){this.type=o,this.args=h}static parse(o,h){if(o.length<2)return h.error("Expected at least one argument.");let p,_=1;const x=o[0];if(x==="array"){let I,P;if(o.length>2){const D=o[1];if(typeof D!="string"||!(D in gh)||D==="object")return h.error('The item type argument of "array" must be one of string, number, boolean',1);I=gh[D],_++}else I=on;if(o.length>3){if(o[2]!==null&&(typeof o[2]!="number"||o[2]<0||o[2]!==Math.floor(o[2])))return h.error('The length argument to "array" must be a positive integer literal',2);P=o[2],_++}p=J(I,P)}else{if(!gh[x])throw new Error(`Types doesn't contain name = ${x}`);p=gh[x]}const w=[];for(;_o.outputDefined())}}const _h={"to-boolean":sn,"to-color":Zr,"to-number":ft,"to-string":ln};class Qs{constructor(o,h){this.type=o,this.args=h}static parse(o,h){if(o.length<2)return h.error("Expected at least one argument.");const p=o[0];if(!_h[p])throw new Error(`Can't parse ${p} as it is not part of the known types`);if((p==="to-boolean"||p==="to-string")&&o.length!==2)return h.error("Expected one argument.");const _=_h[p],x=[];for(let w=1;w4?`Invalid rbga value ${JSON.stringify(h)}: expected an array containing either three or four numeric values.`:wu(h[0],h[1],h[2],h[3]),!p))return new $n(h[0]/255,h[1]/255,h[2]/255,h[3])}throw new Pr(p||`Could not parse color from value '${typeof h=="string"?h:JSON.stringify(h)}'`)}case"padding":{let h;for(const p of this.args){h=p.evaluate(o);const _=Io.parse(h);if(_)return _}throw new Pr(`Could not parse padding from value '${typeof h=="string"?h:JSON.stringify(h)}'`)}case"variableAnchorOffsetCollection":{let h;for(const p of this.args){h=p.evaluate(o);const _=cs.parse(h);if(_)return _}throw new Pr(`Could not parse variableAnchorOffsetCollection from value '${typeof h=="string"?h:JSON.stringify(h)}'`)}case"number":{let h=null;for(const p of this.args){if(h=p.evaluate(o),h===null)return 0;const _=Number(h);if(!isNaN(_))return _}throw new Pr(`Could not convert ${JSON.stringify(h)} to number.`)}case"formatted":return Go.fromString(yc(this.args[0].evaluate(o)));case"resolvedImage":return hs.fromString(yc(this.args[0].evaluate(o)));default:return yc(this.args[0].evaluate(o))}}eachChild(o){this.args.forEach(o)}outputDefined(){return this.args.every(o=>o.outputDefined())}}const vc=["Unknown","Point","LineString","Polygon"];class Kn{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?vc[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(o){let h=this._parseColorCache[o];return h||(h=this._parseColorCache[o]=$n.parse(o)),h}}class yh{constructor(o,h,p=[],_,x=new Fl,w=[]){this.registry=o,this.path=p,this.key=p.map(I=>`[${I}]`).join(""),this.scope=x,this.errors=w,this.expectedType=_,this._isConstant=h}parse(o,h,p,_,x={}){return h?this.concat(h,p,_)._parse(o,x):this._parse(o,x)}_parse(o,h){function p(_,x,w){return w==="assert"?new qo(x,[_]):w==="coerce"?new Qs(x,[_]):_}if(o!==null&&typeof o!="string"&&typeof o!="boolean"&&typeof o!="number"||(o=["literal",o]),Array.isArray(o)){if(o.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const _=o[0];if(typeof _!="string")return this.error(`Expression name must be a string, but found ${typeof _} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const x=this.registry[_];if(x){let w=x.parse(o,this);if(!w)return null;if(this.expectedType){const I=this.expectedType,P=w.type;if(I.kind!=="string"&&I.kind!=="number"&&I.kind!=="boolean"&&I.kind!=="object"&&I.kind!=="array"||P.kind!=="value")if(I.kind!=="color"&&I.kind!=="formatted"&&I.kind!=="resolvedImage"||P.kind!=="value"&&P.kind!=="string")if(I.kind!=="padding"||P.kind!=="value"&&P.kind!=="number"&&P.kind!=="array")if(I.kind!=="variableAnchorOffsetCollection"||P.kind!=="value"&&P.kind!=="array"){if(this.checkSubtype(I,P))return null}else w=p(w,I,h.typeAnnotation||"coerce");else w=p(w,I,h.typeAnnotation||"coerce");else w=p(w,I,h.typeAnnotation||"coerce");else w=p(w,I,h.typeAnnotation||"assert")}if(!(w instanceof nl)&&w.type.kind!=="resolvedImage"&&this._isConstant(w)){const I=new Kn;try{w=new nl(w.type,w.evaluate(I))}catch(P){return this.error(P.message),null}}return w}return this.error(`Unknown expression "${_}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(o===void 0?"'undefined' value invalid. Use null instead.":typeof o=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof o} instead.`)}concat(o,h,p){const _=typeof o=="number"?this.path.concat(o):this.path,x=p?this.scope.concat(p):this.scope;return new yh(this.registry,this._isConstant,_,h||null,x,this.errors)}error(o,...h){const p=`${this.key}${h.map(_=>`[${_}]`).join("")}`;this.errors.push(new lo(p,o))}checkSubtype(o,h){const p=Q(o,h);return p&&this.error(p),p}}class Su{constructor(o,h,p){this.type=Aa,this.locale=p,this.caseSensitive=o,this.diacriticSensitive=h}static parse(o,h){if(o.length!==2)return h.error("Expected one argument.");const p=o[1];if(typeof p!="object"||Array.isArray(p))return h.error("Collator options argument must be an object.");const _=h.parse(p["case-sensitive"]!==void 0&&p["case-sensitive"],1,sn);if(!_)return null;const x=h.parse(p["diacritic-sensitive"]!==void 0&&p["diacritic-sensitive"],1,sn);if(!x)return null;let w=null;return p.locale&&(w=h.parse(p.locale,1,ln),!w)?null:new Su(_,x,w)}evaluate(o){return new yp(this.caseSensitive.evaluate(o),this.diacriticSensitive.evaluate(o),this.locale?this.locale.evaluate(o):null)}eachChild(o){o(this.caseSensitive),o(this.diacriticSensitive),this.locale&&o(this.locale)}outputDefined(){return!1}}const rl=8192;function vh(u,o){u[0]=Math.min(u[0],o[0]),u[1]=Math.min(u[1],o[1]),u[2]=Math.max(u[2],o[0]),u[3]=Math.max(u[3],o[1])}function bc(u,o){return!(u[0]<=o[0]||u[2]>=o[2]||u[1]<=o[1]||u[3]>=o[3])}function ky(u,o){const h=(180+u[0])/360,p=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+u[1]*Math.PI/360)))/360,_=Math.pow(2,o.z);return[Math.round(h*_*rl),Math.round(p*_*rl)]}function km(u,o,h){const p=u[0]-o[0],_=u[1]-o[1],x=u[0]-h[0],w=u[1]-h[1];return p*w-x*_==0&&p*x<=0&&_*w<=0}function bh(u,o){let h=!1;for(let w=0,I=o.length;w(p=u)[1]!=(x=P[D+1])[1]>p[1]&&p[0]<(x[0]-_[0])*(p[1]-_[1])/(x[1]-_[1])+_[0]&&(h=!h)}}var p,_,x;return h}function Dy(u,o){for(let h=0;h0&&I<0||w<0&&I>0}function Ry(u,o,h){for(const D of h)for(let O=0;Oh[2]){const _=.5*p;let x=u[0]-h[0]>_?-p:h[0]-u[0]>_?p:0;x===0&&(x=u[0]-h[2]>_?-p:h[2]-u[0]>_?p:0),u[0]+=x}vh(o,u)}function wh(u,o,h,p){const _=Math.pow(2,p.z)*rl,x=[p.x*rl,p.y*rl],w=[];for(const I of u)for(const P of I){const D=[P.x+x[0],P.y+x[1]];zm(D,o,h,_),w.push(D)}return w}function Fm(u,o,h,p){const _=Math.pow(2,p.z)*rl,x=[p.x*rl,p.y*rl],w=[];for(const P of u){const D=[];for(const O of P){const B=[O.x+x[0],O.y+x[1]];vh(o,B),D.push(B)}w.push(D)}if(o[2]-o[0]<=_/2){(I=o)[0]=I[1]=1/0,I[2]=I[3]=-1/0;for(const P of w)for(const D of P)zm(D,o,h,_)}var I;return w}class Bl{constructor(o,h){this.type=sn,this.geojson=o,this.geometries=h}static parse(o,h){if(o.length!==2)return h.error(`'within' expression requires exactly one argument, but found ${o.length-1} instead.`);if(mh(o[1])){const p=o[1];if(p.type==="FeatureCollection"){const _=[];for(const x of p.features){const{type:w,coordinates:I}=x.geometry;w==="Polygon"&&_.push(I),w==="MultiPolygon"&&_.push(...I)}if(_.length)return new Bl(p,{type:"MultiPolygon",coordinates:_})}else if(p.type==="Feature"){const _=p.geometry.type;if(_==="Polygon"||_==="MultiPolygon")return new Bl(p,p.geometry)}else if(p.type==="Polygon"||p.type==="MultiPolygon")return new Bl(p,p)}return h.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(o){if(o.geometry()!=null&&o.canonicalID()!=null){if(o.geometryType()==="Point")return function(h,p){const _=[1/0,1/0,-1/0,-1/0],x=[1/0,1/0,-1/0,-1/0],w=h.canonicalID();if(p.type==="Polygon"){const I=xh(p.coordinates,x,w),P=wh(h.geometry(),_,x,w);if(!bc(_,x))return!1;for(const D of P)if(!bh(D,I))return!1}if(p.type==="MultiPolygon"){const I=Om(p.coordinates,x,w),P=wh(h.geometry(),_,x,w);if(!bc(_,x))return!1;for(const D of P)if(!Dy(D,I))return!1}return!0}(o,this.geometries);if(o.geometryType()==="LineString")return function(h,p){const _=[1/0,1/0,-1/0,-1/0],x=[1/0,1/0,-1/0,-1/0],w=h.canonicalID();if(p.type==="Polygon"){const I=xh(p.coordinates,x,w),P=Fm(h.geometry(),_,x,w);if(!bc(_,x))return!1;for(const D of P)if(!Rm(D,I))return!1}if(p.type==="MultiPolygon"){const I=Om(p.coordinates,x,w),P=Fm(h.geometry(),_,x,w);if(!bc(_,x))return!1;for(const D of P)if(!Nm(D,I))return!1}return!0}(o,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}class Sh{constructor(o,h){this.type=h.type,this.name=o,this.boundExpression=h}static parse(o,h){if(o.length!==2||typeof o[1]!="string")return h.error("'var' expression requires exactly one string literal argument.");const p=o[1];return h.scope.has(p)?new Sh(p,h.scope.get(p)):h.error(`Unknown variable "${p}". Make sure "${p}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(o){return this.boundExpression.evaluate(o)}eachChild(){}outputDefined(){return!1}}class Wo{constructor(o,h,p,_){this.name=o,this.type=h,this._evaluate=p,this.args=_}evaluate(o){return this._evaluate(o,this.args)}eachChild(o){this.args.forEach(o)}outputDefined(){return!1}static parse(o,h){const p=o[0],_=Wo.definitions[p];if(!_)return h.error(`Unknown expression "${p}". If you wanted a literal array, use ["literal", [...]].`,0);const x=Array.isArray(_)?_[0]:_.type,w=Array.isArray(_)?[[_[1],_[2]]]:_.overloads,I=w.filter(([D])=>!Array.isArray(D)||D.length===o.length-1);let P=null;for(const[D,O]of I){P=new yh(h.registry,xc,h.path,null,h.scope);const B=[];let W=!1;for(let X=1;X{return W=B,Array.isArray(W)?`(${W.map(le).join(", ")})`:`(${le(W.type)}...)`;var W}).join(" | "),O=[];for(let B=1;B{h=o?h&&xc(p):h&&p instanceof nl}),!!h&&Eh(u)&&Sc(u,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function Eh(u){if(u instanceof Wo&&(u.name==="get"&&u.args.length===1||u.name==="feature-state"||u.name==="has"&&u.args.length===1||u.name==="properties"||u.name==="geometry-type"||u.name==="id"||/^filter-/.test(u.name))||u instanceof Bl)return!1;let o=!0;return u.eachChild(h=>{o&&!Eh(h)&&(o=!1)}),o}function wc(u){if(u instanceof Wo&&u.name==="feature-state")return!1;let o=!0;return u.eachChild(h=>{o&&!wc(h)&&(o=!1)}),o}function Sc(u,o){if(u instanceof Wo&&o.indexOf(u.name)>=0)return!1;let h=!0;return u.eachChild(p=>{h&&!Sc(p,o)&&(h=!1)}),h}function Ec(u,o){const h=u.length-1;let p,_,x=0,w=h,I=0;for(;x<=w;)if(I=Math.floor((x+w)/2),p=u[I],_=u[I+1],p<=o){if(I===h||o<_)return I;x=I+1}else{if(!(p>o))throw new Pr("Input is not a number.");w=I-1}return 0}class Ic{constructor(o,h,p){this.type=o,this.input=h,this.labels=[],this.outputs=[];for(const[_,x]of p)this.labels.push(_),this.outputs.push(x)}static parse(o,h){if(o.length-1<4)return h.error(`Expected at least 4 arguments, but found only ${o.length-1}.`);if((o.length-1)%2!=0)return h.error("Expected an even number of arguments.");const p=h.parse(o[1],1,ft);if(!p)return null;const _=[];let x=null;h.expectedType&&h.expectedType.kind!=="value"&&(x=h.expectedType);for(let w=1;w=I)return h.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',D);const B=h.parse(P,O,x);if(!B)return null;x=x||B.type,_.push([I,B])}return new Ic(x,p,_)}evaluate(o){const h=this.labels,p=this.outputs;if(h.length===1)return p[0].evaluate(o);const _=this.input.evaluate(o);if(_<=h[0])return p[0].evaluate(o);const x=h.length;return _>=h[x-1]?p[x-1].evaluate(o):p[Ec(h,_)].evaluate(o)}eachChild(o){o(this.input);for(const h of this.outputs)o(h)}outputDefined(){return this.outputs.every(o=>o.outputDefined())}}function Ny(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var Oy=Bm;function Bm(u,o,h,p){this.cx=3*u,this.bx=3*(h-u)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*o,this.by=3*(p-o)-this.cy,this.ay=1-this.cy-this.by,this.p1x=u,this.p1y=o,this.p2x=h,this.p2y=p}Bm.prototype={sampleCurveX:function(u){return((this.ax*u+this.bx)*u+this.cx)*u},sampleCurveY:function(u){return((this.ay*u+this.by)*u+this.cy)*u},sampleCurveDerivativeX:function(u){return(3*this.ax*u+2*this.bx)*u+this.cx},solveCurveX:function(u,o){if(o===void 0&&(o=1e-6),u<0)return 0;if(u>1)return 1;for(var h=u,p=0;p<8;p++){var _=this.sampleCurveX(h)-u;if(Math.abs(_)_?w=h:I=h,h=.5*(I-w)+w;return h},solve:function(u,o){return this.sampleCurveY(this.solveCurveX(u,o))}};var zy=Ny(Oy);function Vl(u,o,h){return u+h*(o-u)}function Ih(u,o,h){return u.map((p,_)=>Vl(p,o[_],h))}const co={number:Vl,color:function(u,o,h,p="rgb"){switch(p){case"rgb":{const[_,x,w,I]=Ih(u.rgb,o.rgb,h);return new $n(_,x,w,I,!1)}case"hcl":{const[_,x,w,I]=u.hcl,[P,D,O,B]=o.hcl;let W,X;if(isNaN(_)||isNaN(P))isNaN(_)?isNaN(P)?W=NaN:(W=P,w!==1&&w!==0||(X=D)):(W=_,O!==1&&O!==0||(X=x));else{let Oe=P-_;P>_&&Oe>180?Oe-=360:P<_&&_-P>180&&(Oe+=360),W=_+h*Oe}const[K,ie,de,we]=function([Oe,Ee,ke,Qe]){return Oe=isNaN(Oe)?0:Oe*tn,Fr([ke,Math.cos(Oe)*Ee,Math.sin(Oe)*Ee,Qe])}([W,X??Vl(x,D,h),Vl(w,O,h),Vl(I,B,h)]);return new $n(K,ie,de,we,!1)}case"lab":{const[_,x,w,I]=Fr(Ih(u.lab,o.lab,h));return new $n(_,x,w,I,!1)}}},array:Ih,padding:function(u,o,h){return new Io(Ih(u.values,o.values,h))},variableAnchorOffsetCollection:function(u,o,h){const p=u.values,_=o.values;if(p.length!==_.length)throw new Pr(`Cannot interpolate values of different length. from: ${u.toString()}, to: ${o.toString()}`);const x=[];for(let w=0;wtypeof O!="number"||O<0||O>1))return h.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);_={name:"cubic-bezier",controlPoints:D}}}if(o.length-1<4)return h.error(`Expected at least 4 arguments, but found only ${o.length-1}.`);if((o.length-1)%2!=0)return h.error("Expected an even number of arguments.");if(x=h.parse(x,2,ft),!x)return null;const I=[];let P=null;p==="interpolate-hcl"||p==="interpolate-lab"?P=Zr:h.expectedType&&h.expectedType.kind!=="value"&&(P=h.expectedType);for(let D=0;D=O)return h.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',W);const K=h.parse(B,X,P);if(!K)return null;P=P||K.type,I.push([O,K])}return Ne(P,ft)||Ne(P,Zr)||Ne(P,me)||Ne(P,Z)||Ne(P,J(ft))?new Zi(P,p,_,x,I):h.error(`Type ${le(P)} is not interpolatable.`)}evaluate(o){const h=this.labels,p=this.outputs;if(h.length===1)return p[0].evaluate(o);const _=this.input.evaluate(o);if(_<=h[0])return p[0].evaluate(o);const x=h.length;if(_>=h[x-1])return p[x-1].evaluate(o);const w=Ec(h,_),I=Zi.interpolationFactor(this.interpolation,_,h[w],h[w+1]),P=p[w].evaluate(o),D=p[w+1].evaluate(o);switch(this.operator){case"interpolate":return co[this.type.kind](P,D,I);case"interpolate-hcl":return co.color(P,D,I,"hcl");case"interpolate-lab":return co.color(P,D,I,"lab")}}eachChild(o){o(this.input);for(const h of this.outputs)o(h)}outputDefined(){return this.outputs.every(o=>o.outputDefined())}}function Gn(u,o,h,p){const _=p-h,x=u-h;return _===0?0:o===1?x/_:(Math.pow(o,x)-1)/(Math.pow(o,_)-1)}class Ch{constructor(o,h){this.type=o,this.args=h}static parse(o,h){if(o.length<2)return h.error("Expectected at least one argument.");let p=null;const _=h.expectedType;_&&_.kind!=="value"&&(p=_);const x=[];for(const I of o.slice(1)){const P=h.parse(I,1+x.length,p,void 0,{typeAnnotation:"omit"});if(!P)return null;p=p||P.type,x.push(P)}if(!p)throw new Error("No output type");const w=_&&x.some(I=>Q(_,I.type));return new Ch(w?on:p,x)}evaluate(o){let h,p=null,_=0;for(const x of this.args)if(_++,p=x.evaluate(o),p&&p instanceof hs&&!p.available&&(h||(h=p.name),p=null,_===this.args.length&&(p=h)),p!==null)break;return p}eachChild(o){this.args.forEach(o)}outputDefined(){return this.args.every(o=>o.outputDefined())}}class Th{constructor(o,h){this.type=h.type,this.bindings=[].concat(o),this.result=h}evaluate(o){return this.result.evaluate(o)}eachChild(o){for(const h of this.bindings)o(h[1]);o(this.result)}static parse(o,h){if(o.length<4)return h.error(`Expected at least 3 arguments, but found ${o.length-1} instead.`);const p=[];for(let x=1;x=p.length)throw new Pr(`Array index out of bounds: ${h} > ${p.length-1}.`);if(h!==Math.floor(h))throw new Pr(`Array index must be an integer, but found ${h} instead.`);return p[h]}eachChild(o){o(this.index),o(this.input)}outputDefined(){return!1}}class xp{constructor(o,h){this.type=sn,this.needle=o,this.haystack=h}static parse(o,h){if(o.length!==3)return h.error(`Expected 2 arguments, but found ${o.length-1} instead.`);const p=h.parse(o[1],1,on),_=h.parse(o[2],2,on);return p&&_?Pe(p.type,[sn,ln,ft,ui,on])?new xp(p,_):h.error(`Expected first argument to be of type boolean, string, number or null, but found ${le(p.type)} instead`):null}evaluate(o){const h=this.needle.evaluate(o),p=this.haystack.evaluate(o);if(!p)return!1;if(!Se(h,["boolean","string","number","null"]))throw new Pr(`Expected first argument to be of type boolean, string, number or null, but found ${le(hi(h))} instead.`);if(!Se(p,["string","array"]))throw new Pr(`Expected second argument to be of type array or string, but found ${le(hi(p))} instead.`);return p.indexOf(h)>=0}eachChild(o){o(this.needle),o(this.haystack)}outputDefined(){return!0}}class Lh{constructor(o,h,p){this.type=ft,this.needle=o,this.haystack=h,this.fromIndex=p}static parse(o,h){if(o.length<=2||o.length>=5)return h.error(`Expected 3 or 4 arguments, but found ${o.length-1} instead.`);const p=h.parse(o[1],1,on),_=h.parse(o[2],2,on);if(!p||!_)return null;if(!Pe(p.type,[sn,ln,ft,ui,on]))return h.error(`Expected first argument to be of type boolean, string, number or null, but found ${le(p.type)} instead`);if(o.length===4){const x=h.parse(o[3],3,ft);return x?new Lh(p,_,x):null}return new Lh(p,_)}evaluate(o){const h=this.needle.evaluate(o),p=this.haystack.evaluate(o);if(!Se(h,["boolean","string","number","null"]))throw new Pr(`Expected first argument to be of type boolean, string, number or null, but found ${le(hi(h))} instead.`);if(!Se(p,["string","array"]))throw new Pr(`Expected second argument to be of type array or string, but found ${le(hi(p))} instead.`);if(this.fromIndex){const _=this.fromIndex.evaluate(o);return p.indexOf(h,_)}return p.indexOf(h)}eachChild(o){o(this.needle),o(this.haystack),this.fromIndex&&o(this.fromIndex)}outputDefined(){return!1}}class wp{constructor(o,h,p,_,x,w){this.inputType=o,this.type=h,this.input=p,this.cases=_,this.outputs=x,this.otherwise=w}static parse(o,h){if(o.length<5)return h.error(`Expected at least 4 arguments, but found only ${o.length-1}.`);if(o.length%2!=1)return h.error("Expected an even number of arguments.");let p,_;h.expectedType&&h.expectedType.kind!=="value"&&(_=h.expectedType);const x={},w=[];for(let D=2;DNumber.MAX_SAFE_INTEGER)return W.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof K=="number"&&Math.floor(K)!==K)return W.error("Numeric branch labels must be integer values.");if(p){if(W.checkSubtype(p,hi(K)))return null}else p=hi(K);if(x[String(K)]!==void 0)return W.error("Branch labels must be unique.");x[String(K)]=w.length}const X=h.parse(B,D,_);if(!X)return null;_=_||X.type,w.push(X)}const I=h.parse(o[1],1,on);if(!I)return null;const P=h.parse(o[o.length-1],o.length-1,_);return P?I.type.kind!=="value"&&h.concat(1).checkSubtype(p,I.type)?null:new wp(p,_,I,x,w,P):null}evaluate(o){const h=this.input.evaluate(o);return(hi(h)===this.inputType&&this.outputs[this.cases[h]]||this.otherwise).evaluate(o)}eachChild(o){o(this.input),this.outputs.forEach(o),o(this.otherwise)}outputDefined(){return this.outputs.every(o=>o.outputDefined())&&this.otherwise.outputDefined()}}class Sp{constructor(o,h,p){this.type=o,this.branches=h,this.otherwise=p}static parse(o,h){if(o.length<4)return h.error(`Expected at least 3 arguments, but found only ${o.length-1}.`);if(o.length%2!=0)return h.error("Expected an odd number of arguments.");let p;h.expectedType&&h.expectedType.kind!=="value"&&(p=h.expectedType);const _=[];for(let w=1;wh.outputDefined())&&this.otherwise.outputDefined()}}class Ph{constructor(o,h,p,_){this.type=o,this.input=h,this.beginIndex=p,this.endIndex=_}static parse(o,h){if(o.length<=2||o.length>=5)return h.error(`Expected 3 or 4 arguments, but found ${o.length-1} instead.`);const p=h.parse(o[1],1,on),_=h.parse(o[2],2,ft);if(!p||!_)return null;if(!Pe(p.type,[J(on),ln,on]))return h.error(`Expected first argument to be of type array or string, but found ${le(p.type)} instead`);if(o.length===4){const x=h.parse(o[3],3,ft);return x?new Ph(p.type,p,_,x):null}return new Ph(p.type,p,_)}evaluate(o){const h=this.input.evaluate(o),p=this.beginIndex.evaluate(o);if(!Se(h,["string","array"]))throw new Pr(`Expected first argument to be of type array or string, but found ${le(hi(h))} instead.`);if(this.endIndex){const _=this.endIndex.evaluate(o);return h.slice(p,_)}return h.slice(p)}eachChild(o){o(this.input),o(this.beginIndex),this.endIndex&&o(this.endIndex)}outputDefined(){return!1}}function Vm(u,o){return u==="=="||u==="!="?o.kind==="boolean"||o.kind==="string"||o.kind==="number"||o.kind==="null"||o.kind==="value":o.kind==="string"||o.kind==="number"||o.kind==="value"}function Um(u,o,h,p){return p.compare(o,h)===0}function Eu(u,o,h){const p=u!=="=="&&u!=="!=";return class $E{constructor(x,w,I){this.type=sn,this.lhs=x,this.rhs=w,this.collator=I,this.hasUntypedArgument=x.type.kind==="value"||w.type.kind==="value"}static parse(x,w){if(x.length!==3&&x.length!==4)return w.error("Expected two or three arguments.");const I=x[0];let P=w.parse(x[1],1,on);if(!P)return null;if(!Vm(I,P.type))return w.concat(1).error(`"${I}" comparisons are not supported for type '${le(P.type)}'.`);let D=w.parse(x[2],2,on);if(!D)return null;if(!Vm(I,D.type))return w.concat(2).error(`"${I}" comparisons are not supported for type '${le(D.type)}'.`);if(P.type.kind!==D.type.kind&&P.type.kind!=="value"&&D.type.kind!=="value")return w.error(`Cannot compare types '${le(P.type)}' and '${le(D.type)}'.`);p&&(P.type.kind==="value"&&D.type.kind!=="value"?P=new qo(D.type,[P]):P.type.kind!=="value"&&D.type.kind==="value"&&(D=new qo(P.type,[D])));let O=null;if(x.length===4){if(P.type.kind!=="string"&&D.type.kind!=="string"&&P.type.kind!=="value"&&D.type.kind!=="value")return w.error("Cannot use collator to compare non-string types.");if(O=w.parse(x[3],3,Aa),!O)return null}return new $E(P,D,O)}evaluate(x){const w=this.lhs.evaluate(x),I=this.rhs.evaluate(x);if(p&&this.hasUntypedArgument){const P=hi(w),D=hi(I);if(P.kind!==D.kind||P.kind!=="string"&&P.kind!=="number")throw new Pr(`Expected arguments for "${u}" to be (string, string) or (number, number), but found (${P.kind}, ${D.kind}) instead.`)}if(this.collator&&!p&&this.hasUntypedArgument){const P=hi(w),D=hi(I);if(P.kind!=="string"||D.kind!=="string")return o(x,w,I)}return this.collator?h(x,w,I,this.collator.evaluate(x)):o(x,w,I)}eachChild(x){x(this.lhs),x(this.rhs),this.collator&&x(this.collator)}outputDefined(){return!0}}}const Fy=Eu("==",function(u,o,h){return o===h},Um),By=Eu("!=",function(u,o,h){return o!==h},function(u,o,h,p){return!Um(0,o,h,p)}),Vy=Eu("<",function(u,o,h){return o",function(u,o,h){return o>h},function(u,o,h,p){return p.compare(o,h)>0}),jy=Eu("<=",function(u,o,h){return o<=h},function(u,o,h,p){return p.compare(o,h)<=0}),Gy=Eu(">=",function(u,o,h){return o>=h},function(u,o,h,p){return p.compare(o,h)>=0});class Ep{constructor(o,h,p,_,x){this.type=ln,this.number=o,this.locale=h,this.currency=p,this.minFractionDigits=_,this.maxFractionDigits=x}static parse(o,h){if(o.length!==3)return h.error("Expected two arguments.");const p=h.parse(o[1],1,ft);if(!p)return null;const _=o[2];if(typeof _!="object"||Array.isArray(_))return h.error("NumberFormat options argument must be an object.");let x=null;if(_.locale&&(x=h.parse(_.locale,1,ln),!x))return null;let w=null;if(_.currency&&(w=h.parse(_.currency,1,ln),!w))return null;let I=null;if(_["min-fraction-digits"]&&(I=h.parse(_["min-fraction-digits"],1,ft),!I))return null;let P=null;return _["max-fraction-digits"]&&(P=h.parse(_["max-fraction-digits"],1,ft),!P)?null:new Ep(p,x,w,I,P)}evaluate(o){return new Intl.NumberFormat(this.locale?this.locale.evaluate(o):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(o):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(o):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(o):void 0}).format(this.number.evaluate(o))}eachChild(o){o(this.number),this.locale&&o(this.locale),this.currency&&o(this.currency),this.minFractionDigits&&o(this.minFractionDigits),this.maxFractionDigits&&o(this.maxFractionDigits)}outputDefined(){return!1}}class Mh{constructor(o){this.type=Jr,this.sections=o}static parse(o,h){if(o.length<2)return h.error("Expected at least one argument.");const p=o[1];if(!Array.isArray(p)&&typeof p=="object")return h.error("First argument must be an image or text section.");const _=[];let x=!1;for(let w=1;w<=o.length-1;++w){const I=o[w];if(x&&typeof I=="object"&&!Array.isArray(I)){x=!1;let P=null;if(I["font-scale"]&&(P=h.parse(I["font-scale"],1,ft),!P))return null;let D=null;if(I["text-font"]&&(D=h.parse(I["text-font"],1,J(ln)),!D))return null;let O=null;if(I["text-color"]&&(O=h.parse(I["text-color"],1,Zr),!O))return null;const B=_[_.length-1];B.scale=P,B.font=D,B.textColor=O}else{const P=h.parse(o[w],1,on);if(!P)return null;const D=P.type.kind;if(D!=="string"&&D!=="value"&&D!=="null"&&D!=="resolvedImage")return h.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");x=!0,_.push({content:P,scale:null,font:null,textColor:null})}}return new Mh(_)}evaluate(o){return new Go(this.sections.map(h=>{const p=h.content.evaluate(o);return hi(p)===q?new vp("",p,null,null,null):new vp(yc(p),null,h.scale?h.scale.evaluate(o):null,h.font?h.font.evaluate(o).join(","):null,h.textColor?h.textColor.evaluate(o):null)}))}eachChild(o){for(const h of this.sections)o(h.content),h.scale&&o(h.scale),h.font&&o(h.font),h.textColor&&o(h.textColor)}outputDefined(){return!1}}class Ip{constructor(o){this.type=q,this.input=o}static parse(o,h){if(o.length!==2)return h.error("Expected two arguments.");const p=h.parse(o[1],1,ln);return p?new Ip(p):h.error("No image name provided.")}evaluate(o){const h=this.input.evaluate(o),p=hs.fromString(h);return p&&o.availableImages&&(p.available=o.availableImages.indexOf(h)>-1),p}eachChild(o){o(this.input)}outputDefined(){return!1}}class Cp{constructor(o){this.type=ft,this.input=o}static parse(o,h){if(o.length!==2)return h.error(`Expected 1 argument, but found ${o.length-1} instead.`);const p=h.parse(o[1],1);return p?p.type.kind!=="array"&&p.type.kind!=="string"&&p.type.kind!=="value"?h.error(`Expected argument of type string or array, but found ${le(p.type)} instead.`):new Cp(p):null}evaluate(o){const h=this.input.evaluate(o);if(typeof h=="string"||Array.isArray(h))return h.length;throw new Pr(`Expected value to be of type string or array, but found ${le(hi(h))} instead.`)}eachChild(o){o(this.input)}outputDefined(){return!1}}const Iu={"==":Fy,"!=":By,">":Uy,"<":Vy,">=":Gy,"<=":jy,array:qo,at:bp,boolean:qo,case:Sp,coalesce:Ch,collator:Su,format:Mh,image:Ip,in:xp,"index-of":Lh,interpolate:Zi,"interpolate-hcl":Zi,"interpolate-lab":Zi,length:Cp,let:Th,literal:nl,match:wp,number:qo,"number-format":Ep,object:qo,slice:Ph,step:Ic,string:qo,"to-boolean":Qs,"to-color":Qs,"to-number":Qs,"to-string":Qs,var:Sh,within:Bl};function jm(u,[o,h,p,_]){o=o.evaluate(u),h=h.evaluate(u),p=p.evaluate(u);const x=_?_.evaluate(u):1,w=wu(o,h,p,x);if(w)throw new Pr(w);return new $n(o/255,h/255,p/255,x,!1)}function Gm(u,o){return u in o}function Tp(u,o){const h=o[u];return h===void 0?null:h}function Ul(u){return{type:u}}function qm(u){return{result:"success",value:u}}function Cu(u){return{result:"error",value:u}}function Tu(u){return u["property-type"]==="data-driven"||u["property-type"]==="cross-faded-data-driven"}function Wm(u){return!!u.expression&&u.expression.parameters.indexOf("zoom")>-1}function Lp(u){return!!u.expression&&u.expression.interpolated}function On(u){return u instanceof Number?"number":u instanceof String?"string":u instanceof Boolean?"boolean":Array.isArray(u)?"array":u===null?"null":typeof u}function Ah(u){return typeof u=="object"&&u!==null&&!Array.isArray(u)}function qy(u){return u}function Hm(u,o){const h=o.type==="color",p=u.stops&&typeof u.stops[0][0]=="object",_=p||!(p||u.property!==void 0),x=u.type||(Lp(o)?"exponential":"interval");if(h||o.type==="padding"){const O=h?$n.parse:Io.parse;(u=ls({},u)).stops&&(u.stops=u.stops.map(B=>[B[0],O(B[1])])),u.default=O(u.default?u.default:o.default)}if(u.colorSpace&&(w=u.colorSpace)!=="rgb"&&w!=="hcl"&&w!=="lab")throw new Error(`Unknown color space: "${u.colorSpace}"`);var w;let I,P,D;if(x==="exponential")I=An;else if(x==="interval")I=Wy;else if(x==="categorical"){I=Qr,P=Object.create(null);for(const O of u.stops)P[O[0]]=O[1];D=typeof u.stops[0][0]}else{if(x!=="identity")throw new Error(`Unknown function type "${x}"`);I=Pp}if(p){const O={},B=[];for(let K=0;KK[0]),evaluate:({zoom:K},ie)=>An({stops:W,base:u.base},o,K).evaluate(K,ie)}}if(_){const O=x==="exponential"?{name:"exponential",base:u.base!==void 0?u.base:1}:null;return{kind:"camera",interpolationType:O,interpolationFactor:Zi.interpolationFactor.bind(void 0,O),zoomStops:u.stops.map(B=>B[0]),evaluate:({zoom:B})=>I(u,o,B,P,D)}}return{kind:"source",evaluate(O,B){const W=B&&B.properties?B.properties[u.property]:void 0;return W===void 0?Cc(u.default,o.default):I(u,o,W,P,D)}}}function Cc(u,o,h){return u!==void 0?u:o!==void 0?o:h!==void 0?h:void 0}function Qr(u,o,h,p,_){return Cc(typeof h===_?p[h]:void 0,u.default,o.default)}function Wy(u,o,h){if(On(h)!=="number")return Cc(u.default,o.default);const p=u.stops.length;if(p===1||h<=u.stops[0][0])return u.stops[0][1];if(h>=u.stops[p-1][0])return u.stops[p-1][1];const _=Ec(u.stops.map(x=>x[0]),h);return u.stops[_][1]}function An(u,o,h){const p=u.base!==void 0?u.base:1;if(On(h)!=="number")return Cc(u.default,o.default);const _=u.stops.length;if(_===1||h<=u.stops[0][0])return u.stops[0][1];if(h>=u.stops[_-1][0])return u.stops[_-1][1];const x=Ec(u.stops.map(O=>O[0]),h),w=function(O,B,W,X){const K=X-W,ie=O-W;return K===0?0:B===1?ie/K:(Math.pow(B,ie)-1)/(Math.pow(B,K)-1)}(h,p,u.stops[x][0],u.stops[x+1][0]),I=u.stops[x][1],P=u.stops[x+1][1],D=co[o.type]||qy;return typeof I.evaluate=="function"?{evaluate(...O){const B=I.evaluate.apply(void 0,O),W=P.evaluate.apply(void 0,O);if(B!==void 0&&W!==void 0)return D(B,W,w,u.colorSpace)}}:D(I,P,w,u.colorSpace)}function Pp(u,o,h){switch(o.type){case"color":h=$n.parse(h);break;case"formatted":h=Go.fromString(h.toString());break;case"resolvedImage":h=hs.fromString(h.toString());break;case"padding":h=Io.parse(h);break;default:On(h)===o.type||o.type==="enum"&&o.values[h]||(h=void 0)}return Cc(h,u.default,o.default)}Wo.register(Iu,{error:[{kind:"error"},[ln],(u,[o])=>{throw new Pr(o.evaluate(u))}],typeof:[ln,[on],(u,[o])=>le(hi(o.evaluate(u)))],"to-rgba":[J(ft,4),[Zr],(u,[o])=>{const[h,p,_,x]=o.evaluate(u).rgb;return[255*h,255*p,255*_,x]}],rgb:[Zr,[ft,ft,ft],jm],rgba:[Zr,[ft,ft,ft,ft],jm],has:{type:sn,overloads:[[[ln],(u,[o])=>Gm(o.evaluate(u),u.properties())],[[ln,us],(u,[o,h])=>Gm(o.evaluate(u),h.evaluate(u))]]},get:{type:on,overloads:[[[ln],(u,[o])=>Tp(o.evaluate(u),u.properties())],[[ln,us],(u,[o,h])=>Tp(o.evaluate(u),h.evaluate(u))]]},"feature-state":[on,[ln],(u,[o])=>Tp(o.evaluate(u),u.featureState||{})],properties:[us,[],u=>u.properties()],"geometry-type":[ln,[],u=>u.geometryType()],id:[on,[],u=>u.id()],zoom:[ft,[],u=>u.globals.zoom],"heatmap-density":[ft,[],u=>u.globals.heatmapDensity||0],"line-progress":[ft,[],u=>u.globals.lineProgress||0],accumulated:[on,[],u=>u.globals.accumulated===void 0?null:u.globals.accumulated],"+":[ft,Ul(ft),(u,o)=>{let h=0;for(const p of o)h+=p.evaluate(u);return h}],"*":[ft,Ul(ft),(u,o)=>{let h=1;for(const p of o)h*=p.evaluate(u);return h}],"-":{type:ft,overloads:[[[ft,ft],(u,[o,h])=>o.evaluate(u)-h.evaluate(u)],[[ft],(u,[o])=>-o.evaluate(u)]]},"/":[ft,[ft,ft],(u,[o,h])=>o.evaluate(u)/h.evaluate(u)],"%":[ft,[ft,ft],(u,[o,h])=>o.evaluate(u)%h.evaluate(u)],ln2:[ft,[],()=>Math.LN2],pi:[ft,[],()=>Math.PI],e:[ft,[],()=>Math.E],"^":[ft,[ft,ft],(u,[o,h])=>Math.pow(o.evaluate(u),h.evaluate(u))],sqrt:[ft,[ft],(u,[o])=>Math.sqrt(o.evaluate(u))],log10:[ft,[ft],(u,[o])=>Math.log(o.evaluate(u))/Math.LN10],ln:[ft,[ft],(u,[o])=>Math.log(o.evaluate(u))],log2:[ft,[ft],(u,[o])=>Math.log(o.evaluate(u))/Math.LN2],sin:[ft,[ft],(u,[o])=>Math.sin(o.evaluate(u))],cos:[ft,[ft],(u,[o])=>Math.cos(o.evaluate(u))],tan:[ft,[ft],(u,[o])=>Math.tan(o.evaluate(u))],asin:[ft,[ft],(u,[o])=>Math.asin(o.evaluate(u))],acos:[ft,[ft],(u,[o])=>Math.acos(o.evaluate(u))],atan:[ft,[ft],(u,[o])=>Math.atan(o.evaluate(u))],min:[ft,Ul(ft),(u,o)=>Math.min(...o.map(h=>h.evaluate(u)))],max:[ft,Ul(ft),(u,o)=>Math.max(...o.map(h=>h.evaluate(u)))],abs:[ft,[ft],(u,[o])=>Math.abs(o.evaluate(u))],round:[ft,[ft],(u,[o])=>{const h=o.evaluate(u);return h<0?-Math.round(-h):Math.round(h)}],floor:[ft,[ft],(u,[o])=>Math.floor(o.evaluate(u))],ceil:[ft,[ft],(u,[o])=>Math.ceil(o.evaluate(u))],"filter-==":[sn,[ln,on],(u,[o,h])=>u.properties()[o.value]===h.value],"filter-id-==":[sn,[on],(u,[o])=>u.id()===o.value],"filter-type-==":[sn,[ln],(u,[o])=>u.geometryType()===o.value],"filter-<":[sn,[ln,on],(u,[o,h])=>{const p=u.properties()[o.value],_=h.value;return typeof p==typeof _&&p<_}],"filter-id-<":[sn,[on],(u,[o])=>{const h=u.id(),p=o.value;return typeof h==typeof p&&h":[sn,[ln,on],(u,[o,h])=>{const p=u.properties()[o.value],_=h.value;return typeof p==typeof _&&p>_}],"filter-id->":[sn,[on],(u,[o])=>{const h=u.id(),p=o.value;return typeof h==typeof p&&h>p}],"filter-<=":[sn,[ln,on],(u,[o,h])=>{const p=u.properties()[o.value],_=h.value;return typeof p==typeof _&&p<=_}],"filter-id-<=":[sn,[on],(u,[o])=>{const h=u.id(),p=o.value;return typeof h==typeof p&&h<=p}],"filter->=":[sn,[ln,on],(u,[o,h])=>{const p=u.properties()[o.value],_=h.value;return typeof p==typeof _&&p>=_}],"filter-id->=":[sn,[on],(u,[o])=>{const h=u.id(),p=o.value;return typeof h==typeof p&&h>=p}],"filter-has":[sn,[on],(u,[o])=>o.value in u.properties()],"filter-has-id":[sn,[],u=>u.id()!==null&&u.id()!==void 0],"filter-type-in":[sn,[J(ln)],(u,[o])=>o.value.indexOf(u.geometryType())>=0],"filter-id-in":[sn,[J(on)],(u,[o])=>o.value.indexOf(u.id())>=0],"filter-in-small":[sn,[ln,J(on)],(u,[o,h])=>h.value.indexOf(u.properties()[o.value])>=0],"filter-in-large":[sn,[ln,J(on)],(u,[o,h])=>function(p,_,x,w){for(;x<=w;){const I=x+w>>1;if(_[I]===p)return!0;_[I]>p?w=I-1:x=I+1}return!1}(u.properties()[o.value],h.value,0,h.value.length-1)],all:{type:sn,overloads:[[[sn,sn],(u,[o,h])=>o.evaluate(u)&&h.evaluate(u)],[Ul(sn),(u,o)=>{for(const h of o)if(!h.evaluate(u))return!1;return!0}]]},any:{type:sn,overloads:[[[sn,sn],(u,[o,h])=>o.evaluate(u)||h.evaluate(u)],[Ul(sn),(u,o)=>{for(const h of o)if(h.evaluate(u))return!0;return!1}]]},"!":[sn,[sn],(u,[o])=>!o.evaluate(u)],"is-supported-script":[sn,[ln],(u,[o])=>{const h=u.globals&&u.globals.isSupportedScript;return!h||h(o.evaluate(u))}],upcase:[ln,[ln],(u,[o])=>o.evaluate(u).toUpperCase()],downcase:[ln,[ln],(u,[o])=>o.evaluate(u).toLowerCase()],concat:[ln,Ul(on),(u,o)=>o.map(h=>yc(h.evaluate(u))).join("")],"resolved-locale":[ln,[Aa],(u,[o])=>o.evaluate(u).resolvedLocale()]});class mr{constructor(o,h){var p;this.expression=o,this._warningHistory={},this._evaluator=new Kn,this._defaultValue=h?(p=h).type==="color"&&Ah(p.default)?new $n(0,0,0,0):p.type==="color"?$n.parse(p.default)||null:p.type==="padding"?Io.parse(p.default)||null:p.type==="variableAnchorOffsetCollection"?cs.parse(p.default)||null:p.default===void 0?null:p.default:null,this._enumValues=h&&h.type==="enum"?h.values:null}evaluateWithoutErrorHandling(o,h,p,_,x,w){return this._evaluator.globals=o,this._evaluator.feature=h,this._evaluator.featureState=p,this._evaluator.canonical=_,this._evaluator.availableImages=x||null,this._evaluator.formattedSection=w,this.expression.evaluate(this._evaluator)}evaluate(o,h,p,_,x,w){this._evaluator.globals=o,this._evaluator.feature=h||null,this._evaluator.featureState=p||null,this._evaluator.canonical=_,this._evaluator.availableImages=x||null,this._evaluator.formattedSection=w||null;try{const I=this.expression.evaluate(this._evaluator);if(I==null||typeof I=="number"&&I!=I)return this._defaultValue;if(this._enumValues&&!(I in this._enumValues))throw new Pr(`Expected value to be one of ${Object.keys(this._enumValues).map(P=>JSON.stringify(P)).join(", ")}, but found ${JSON.stringify(I)} instead.`);return I}catch(I){return this._warningHistory[I.message]||(this._warningHistory[I.message]=!0,typeof console<"u"&&console.warn(I.message)),this._defaultValue}}}function lr(u){return Array.isArray(u)&&u.length>0&&typeof u[0]=="string"&&u[0]in Iu}function jl(u,o){const h=new yh(Iu,xc,[],o?function(_){const x={color:Zr,string:ln,number:ft,enum:ln,boolean:sn,formatted:Jr,padding:me,resolvedImage:q,variableAnchorOffsetCollection:Z};return _.type==="array"?J(x[_.value]||on,_.length):x[_.type]}(o):void 0),p=h.parse(u,void 0,void 0,void 0,o&&o.type==="string"?{typeAnnotation:"coerce"}:void 0);return p?qm(new mr(p,o)):Cu(h.errors)}class kh{constructor(o,h){this.kind=o,this._styleExpression=h,this.isStateDependent=o!=="constant"&&!wc(h.expression)}evaluateWithoutErrorHandling(o,h,p,_,x,w){return this._styleExpression.evaluateWithoutErrorHandling(o,h,p,_,x,w)}evaluate(o,h,p,_,x,w){return this._styleExpression.evaluate(o,h,p,_,x,w)}}class Mp{constructor(o,h,p,_){this.kind=o,this.zoomStops=p,this._styleExpression=h,this.isStateDependent=o!=="camera"&&!wc(h.expression),this.interpolationType=_}evaluateWithoutErrorHandling(o,h,p,_,x,w){return this._styleExpression.evaluateWithoutErrorHandling(o,h,p,_,x,w)}evaluate(o,h,p,_,x,w){return this._styleExpression.evaluate(o,h,p,_,x,w)}interpolationFactor(o,h,p){return this.interpolationType?Zi.interpolationFactor(this.interpolationType,o,h,p):0}}function Zm(u,o){const h=jl(u,o);if(h.result==="error")return h;const p=h.value.expression,_=Eh(p);if(!_&&!Tu(o))return Cu([new lo("","data expressions not supported")]);const x=Sc(p,["zoom"]);if(!x&&!Wm(o))return Cu([new lo("","zoom expressions not supported")]);const w=Rh(p);return w||x?w instanceof lo?Cu([w]):w instanceof Zi&&!Lp(o)?Cu([new lo("",'"interpolate" expressions cannot be used with this property')]):qm(w?new Mp(_?"camera":"composite",h.value,w.labels,w instanceof Zi?w.interpolation:void 0):new kh(_?"constant":"source",h.value)):Cu([new lo("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class Dh{constructor(o,h){this._parameters=o,this._specification=h,ls(this,Hm(this._parameters,this._specification))}static deserialize(o){return new Dh(o._parameters,o._specification)}static serialize(o){return{_parameters:o._parameters,_specification:o._specification}}}function Rh(u){let o=null;if(u instanceof Th)o=Rh(u.result);else if(u instanceof Ch){for(const h of u.args)if(o=Rh(h),o)break}else(u instanceof Ic||u instanceof Zi)&&u.input instanceof Wo&&u.input.name==="zoom"&&(o=u);return o instanceof lo||u.eachChild(h=>{const p=Rh(h);p instanceof lo?o=p:!o&&p?o=new lo("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):o&&p&&o!==p&&(o=new lo("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),o}function Nh(u){if(u===!0||u===!1)return!0;if(!Array.isArray(u)||u.length===0)return!1;switch(u[0]){case"has":return u.length>=2&&u[1]!=="$id"&&u[1]!=="$type";case"in":return u.length>=3&&(typeof u[1]!="string"||Array.isArray(u[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return u.length!==3||Array.isArray(u[1])||Array.isArray(u[2]);case"any":case"all":for(const o of u.slice(1))if(!Nh(o)&&typeof o!="boolean")return!1;return!0;default:return!0}}const Xm={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Oh(u){if(u==null)return{filter:()=>!0,needGeometry:!1};Nh(u)||(u=Fh(u));const o=jl(u,Xm);if(o.result==="error")throw new Error(o.value.map(h=>`${h.key}: ${h.message}`).join(", "));return{filter:(h,p,_)=>o.value.evaluate(h,p,{},_),needGeometry:zh(u)}}function Ym(u,o){return uo?1:0}function zh(u){if(!Array.isArray(u))return!1;if(u[0]==="within")return!0;for(let o=1;o"||o==="<="||o===">="?Ap(u[1],u[2],o):o==="any"?(h=u.slice(1),["any"].concat(h.map(Fh))):o==="all"?["all"].concat(u.slice(1).map(Fh)):o==="none"?["all"].concat(u.slice(1).map(Fh).map(Bh)):o==="in"?$m(u[1],u.slice(2)):o==="!in"?Bh($m(u[1],u.slice(2))):o==="has"?Km(u[1]):o==="!has"?Bh(Km(u[1])):o!=="within"||u;var h}function Ap(u,o,h){switch(u){case"$type":return[`filter-type-${h}`,o];case"$id":return[`filter-id-${h}`,o];default:return[`filter-${h}`,u,o]}}function $m(u,o){if(o.length===0)return!1;switch(u){case"$type":return["filter-type-in",["literal",o]];case"$id":return["filter-id-in",["literal",o]];default:return o.length>200&&!o.some(h=>typeof h!=typeof o[0])?["filter-in-large",u,["literal",o.sort(Ym)]]:["filter-in-small",u,["literal",o]]}}function Km(u){switch(u){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",u]}}function Bh(u){return["!",u]}function kp(u){const o=typeof u;if(o==="number"||o==="boolean"||o==="string"||u==null)return JSON.stringify(u);if(Array.isArray(u)){let _="[";for(const x of u)_+=`${kp(x)},`;return`${_}]`}const h=Object.keys(u).sort();let p="{";for(let _=0;_p.maximum?[new at(o,h,`${h} is greater than the maximum value ${p.maximum}`)]:[]}function Qm(u){const o=u.valueSpec,h=Br(u.value.type);let p,_,x,w={};const I=h!=="categorical"&&u.value.property===void 0,P=!I,D=On(u.value.stops)==="array"&&On(u.value.stops[0])==="array"&&On(u.value.stops[0][0])==="object",O=ho({key:u.key,value:u.value,valueSpec:u.styleSpec.function,validateSpec:u.validateSpec,style:u.style,styleSpec:u.styleSpec,objectElementValidators:{stops:function(X){if(h==="identity")return[new at(X.key,X.value,'identity function may not have a "stops" property')];let K=[];const ie=X.value;return K=K.concat(Dp({key:X.key,value:ie,valueSpec:X.valueSpec,validateSpec:X.validateSpec,style:X.style,styleSpec:X.styleSpec,arrayElementValidator:B})),On(ie)==="array"&&ie.length===0&&K.push(new at(X.key,ie,"array must have at least one stop")),K},default:function(X){return X.validateSpec({key:X.key,value:X.value,valueSpec:o,validateSpec:X.validateSpec,style:X.style,styleSpec:X.styleSpec})}}});return h==="identity"&&I&&O.push(new at(u.key,u.value,'missing required property "property"')),h==="identity"||u.value.stops||O.push(new at(u.key,u.value,'missing required property "stops"')),h==="exponential"&&u.valueSpec.expression&&!Lp(u.valueSpec)&&O.push(new at(u.key,u.value,"exponential functions not supported")),u.styleSpec.$version>=8&&(P&&!Tu(u.valueSpec)?O.push(new at(u.key,u.value,"property functions not supported")):I&&!Wm(u.valueSpec)&&O.push(new at(u.key,u.value,"zoom functions not supported"))),h!=="categorical"&&!D||u.value.property!==void 0||O.push(new at(u.key,u.value,'"property" property is required')),O;function B(X){let K=[];const ie=X.value,de=X.key;if(On(ie)!=="array")return[new at(de,ie,`array expected, ${On(ie)} found`)];if(ie.length!==2)return[new at(de,ie,`array length 2 expected, length ${ie.length} found`)];if(D){if(On(ie[0])!=="object")return[new at(de,ie,`object expected, ${On(ie[0])} found`)];if(ie[0].zoom===void 0)return[new at(de,ie,"object stop key must have zoom")];if(ie[0].value===void 0)return[new at(de,ie,"object stop key must have value")];if(x&&x>Br(ie[0].zoom))return[new at(de,ie[0].zoom,"stop zoom values must appear in ascending order")];Br(ie[0].zoom)!==x&&(x=Br(ie[0].zoom),_=void 0,w={}),K=K.concat(ho({key:`${de}[0]`,value:ie[0],valueSpec:{zoom:{}},validateSpec:X.validateSpec,style:X.style,styleSpec:X.styleSpec,objectElementValidators:{zoom:Vh,value:W}}))}else K=K.concat(W({key:`${de}[0]`,value:ie[0],valueSpec:{},validateSpec:X.validateSpec,style:X.style,styleSpec:X.styleSpec},ie));return lr(il(ie[1]))?K.concat([new at(`${de}[1]`,ie[1],"expressions are not allowed in function stops.")]):K.concat(X.validateSpec({key:`${de}[1]`,value:ie[1],valueSpec:o,validateSpec:X.validateSpec,style:X.style,styleSpec:X.styleSpec}))}function W(X,K){const ie=On(X.value),de=Br(X.value),we=X.value!==null?X.value:K;if(p){if(ie!==p)return[new at(X.key,we,`${ie} stop domain type must match previous stop domain type ${p}`)]}else p=ie;if(ie!=="number"&&ie!=="string"&&ie!=="boolean")return[new at(X.key,we,"stop domain value must be a number, string, or boolean")];if(ie!=="number"&&h!=="categorical"){let Oe=`number expected, ${ie} found`;return Tu(o)&&h===void 0&&(Oe+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new at(X.key,we,Oe)]}return h!=="categorical"||ie!=="number"||isFinite(de)&&Math.floor(de)===de?h!=="categorical"&&ie==="number"&&_!==void 0&&de<_?[new at(X.key,we,"stop domain values must appear in ascending order")]:(_=de,h==="categorical"&&de in w?[new at(X.key,we,"stop domain values must be unique")]:(w[de]=!0,[])):[new at(X.key,we,`integer expected, found ${de}`)]}}function ol(u){const o=(u.expressionContext==="property"?Zm:jl)(il(u.value),u.valueSpec);if(o.result==="error")return o.value.map(p=>new at(`${u.key}${p.key}`,u.value,p.message));const h=o.value.expression||o.value._styleExpression.expression;if(u.expressionContext==="property"&&u.propertyKey==="text-font"&&!h.outputDefined())return[new at(u.key,u.value,`Invalid data expression for "${u.propertyKey}". Output values must be contained as literals within the expression.`)];if(u.expressionContext==="property"&&u.propertyType==="layout"&&!wc(h))return[new at(u.key,u.value,'"feature-state" data expressions are not supported with layout properties.')];if(u.expressionContext==="filter"&&!wc(h))return[new at(u.key,u.value,'"feature-state" data expressions are not supported with filters.')];if(u.expressionContext&&u.expressionContext.indexOf("cluster")===0){if(!Sc(h,["zoom","feature-state"]))return[new at(u.key,u.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(u.expressionContext==="cluster-initial"&&!Eh(h))return[new at(u.key,u.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function sl(u){const o=u.key,h=u.value,p=u.valueSpec,_=[];return Array.isArray(p.values)?p.values.indexOf(Br(h))===-1&&_.push(new at(o,h,`expected one of [${p.values.join(", ")}], ${JSON.stringify(h)} found`)):Object.keys(p.values).indexOf(Br(h))===-1&&_.push(new at(o,h,`expected one of [${Object.keys(p.values).join(", ")}], ${JSON.stringify(h)} found`)),_}function Lu(u){return Nh(il(u.value))?ol(ls({},u,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Rp(u)}function Rp(u){const o=u.value,h=u.key;if(On(o)!=="array")return[new at(h,o,`array expected, ${On(o)} found`)];const p=u.styleSpec;let _,x=[];if(o.length<1)return[new at(h,o,"filter array must have at least 1 element")];switch(x=x.concat(sl({key:`${h}[0]`,value:o[0],valueSpec:p.filter_operator,style:u.style,styleSpec:u.styleSpec})),Br(o[0])){case"<":case"<=":case">":case">=":o.length>=2&&Br(o[1])==="$type"&&x.push(new at(h,o,`"$type" cannot be use with operator "${o[0]}"`));case"==":case"!=":o.length!==3&&x.push(new at(h,o,`filter array for operator "${o[0]}" must have 3 elements`));case"in":case"!in":o.length>=2&&(_=On(o[1]),_!=="string"&&x.push(new at(`${h}[1]`,o[1],`string expected, ${_} found`)));for(let w=2;w{D in h&&o.push(new at(p,h[D],`"${D}" is prohibited for ref layers`))}),_.layers.forEach(D=>{Br(D.id)===I&&(P=D)}),P?P.ref?o.push(new at(p,h.ref,"ref cannot reference another ref layer")):w=Br(P.type):o.push(new at(p,h.ref,`ref layer "${I}" not found`))}else if(w!=="background")if(h.source){const P=_.sources&&_.sources[h.source],D=P&&Br(P.type);P?D==="vector"&&w==="raster"?o.push(new at(p,h.source,`layer "${h.id}" requires a raster source`)):D!=="raster-dem"&&w==="hillshade"?o.push(new at(p,h.source,`layer "${h.id}" requires a raster-dem source`)):D==="raster"&&w!=="raster"?o.push(new at(p,h.source,`layer "${h.id}" requires a vector source`)):D!=="vector"||h["source-layer"]?D==="raster-dem"&&w!=="hillshade"?o.push(new at(p,h.source,"raster-dem source can only be used with layer type 'hillshade'.")):w!=="line"||!h.paint||!h.paint["line-gradient"]||D==="geojson"&&P.lineMetrics||o.push(new at(p,h,`layer "${h.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):o.push(new at(p,h,`layer "${h.id}" must specify a "source-layer"`)):o.push(new at(p,h.source,`source "${h.source}" not found`))}else o.push(new at(p,h,'missing required property "source"'));return o=o.concat(ho({key:p,value:h,valueSpec:x.layer,style:u.style,styleSpec:u.styleSpec,validateSpec:u.validateSpec,objectElementValidators:{"*":()=>[],type:()=>u.validateSpec({key:`${p}.type`,value:h.type,valueSpec:x.layer.type,style:u.style,styleSpec:u.styleSpec,validateSpec:u.validateSpec,object:h,objectKey:"type"}),filter:Lu,layout:P=>ho({layer:h,key:P.key,value:P.value,style:P.style,styleSpec:P.styleSpec,validateSpec:P.validateSpec,objectElementValidators:{"*":D=>Op(ls({layerType:w},D))}}),paint:P=>ho({layer:h,key:P.key,value:P.value,style:P.style,styleSpec:P.styleSpec,validateSpec:P.validateSpec,objectElementValidators:{"*":D=>Np(ls({layerType:w},D))}})}})),o}function Gl(u){const o=u.value,h=u.key,p=On(o);return p!=="string"?[new at(h,o,`string expected, ${p} found`)]:[]}const eg={promoteId:function({key:u,value:o}){if(On(o)==="string")return Gl({key:u,value:o});{const h=[];for(const p in o)h.push(...Gl({key:`${u}.${p}`,value:o[p]}));return h}}};function tg(u){const o=u.value,h=u.key,p=u.styleSpec,_=u.style,x=u.validateSpec;if(!o.type)return[new at(h,o,'"type" is required')];const w=Br(o.type);let I;switch(w){case"vector":case"raster":return I=ho({key:h,value:o,valueSpec:p[`source_${w.replace("-","_")}`],style:u.style,styleSpec:p,objectElementValidators:eg,validateSpec:x}),I;case"raster-dem":return I=function(P){var D;const O=(D=P.sourceName)!==null&&D!==void 0?D:"",B=P.value,W=P.styleSpec,X=W.source_raster_dem,K=P.style;let ie=[];const de=On(B);if(B===void 0)return ie;if(de!=="object")return ie.push(new at("source_raster_dem",B,`object expected, ${de} found`)),ie;const we=Br(B.encoding)==="custom",Oe=["redFactor","greenFactor","blueFactor","baseShift"],Ee=P.value.encoding?`"${P.value.encoding}"`:"Default";for(const ke in B)!we&&Oe.includes(ke)?ie.push(new at(ke,B[ke],`In "${O}": "${ke}" is only valid when "encoding" is set to "custom". ${Ee} encoding found`)):X[ke]?ie=ie.concat(P.validateSpec({key:ke,value:B[ke],valueSpec:X[ke],validateSpec:P.validateSpec,style:K,styleSpec:W})):ie.push(new at(ke,B[ke],`unknown property "${ke}"`));return ie}({sourceName:h,value:o,style:u.style,styleSpec:p,validateSpec:x}),I;case"geojson":if(I=ho({key:h,value:o,valueSpec:p.source_geojson,style:_,styleSpec:p,validateSpec:x,objectElementValidators:eg}),o.cluster)for(const P in o.clusterProperties){const[D,O]=o.clusterProperties[P],B=typeof D=="string"?[D,["accumulated"],["get",P]]:D;I.push(...ol({key:`${h}.${P}.map`,value:O,validateSpec:x,expressionContext:"cluster-map"})),I.push(...ol({key:`${h}.${P}.reduce`,value:B,validateSpec:x,expressionContext:"cluster-reduce"}))}return I;case"video":return ho({key:h,value:o,valueSpec:p.source_video,style:_,validateSpec:x,styleSpec:p});case"image":return ho({key:h,value:o,valueSpec:p.source_image,style:_,validateSpec:x,styleSpec:p});case"canvas":return[new at(h,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return sl({key:`${h}.type`,value:o.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:_,validateSpec:x,styleSpec:p})}}function ng(u){const o=u.value,h=u.styleSpec,p=h.light,_=u.style;let x=[];const w=On(o);if(o===void 0)return x;if(w!=="object")return x=x.concat([new at("light",o,`object expected, ${w} found`)]),x;for(const I in o){const P=I.match(/^(.*)-transition$/);x=x.concat(P&&p[P[1]]&&p[P[1]].transition?u.validateSpec({key:I,value:o[I],valueSpec:h.transition,validateSpec:u.validateSpec,style:_,styleSpec:h}):p[I]?u.validateSpec({key:I,value:o[I],valueSpec:p[I],validateSpec:u.validateSpec,style:_,styleSpec:h}):[new at(I,o[I],`unknown property "${I}"`)])}return x}function rg(u){const o=u.value,h=u.styleSpec,p=h.sky,_=u.style,x=On(o);if(o===void 0)return[];if(x!=="object")return[new at("sky",o,`object expected, ${x} found`)];let w=[];for(const I in o)w=w.concat(p[I]?ea({key:I,value:o[I],valueSpec:p[I],style:_,styleSpec:h}):[new at(I,o[I],`unknown property "${I}"`)]);return w}function Lc(u){const o=u.value,h=u.styleSpec,p=h.terrain,_=u.style;let x=[];const w=On(o);if(o===void 0)return x;if(w!=="object")return x=x.concat([new at("terrain",o,`object expected, ${w} found`)]),x;for(const I in o)x=x.concat(p[I]?u.validateSpec({key:I,value:o[I],valueSpec:p[I],validateSpec:u.validateSpec,style:_,styleSpec:h}):[new at(I,o[I],`unknown property "${I}"`)]);return x}function Pc(u){let o=[];const h=u.value,p=u.key;if(Array.isArray(h)){const _=[],x=[];for(const w in h)h[w].id&&_.includes(h[w].id)&&o.push(new at(p,h,`all the sprites' ids must be unique, but ${h[w].id} is duplicated`)),_.push(h[w].id),h[w].url&&x.includes(h[w].url)&&o.push(new at(p,h,`all the sprites' URLs must be unique, but ${h[w].url} is duplicated`)),x.push(h[w].url),o=o.concat(ho({key:`${p}[${w}]`,value:h[w],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:u.validateSpec}));return o}return Gl({key:p,value:h})}const Co={"*":()=>[],array:Dp,boolean:function(u){const o=u.value,h=u.key,p=On(o);return p!=="boolean"?[new at(h,o,`boolean expected, ${p} found`)]:[]},number:Vh,color:function(u){const o=u.key,h=u.value,p=On(h);return p!=="string"?[new at(o,h,`color expected, ${p} found`)]:$n.parse(String(h))?[]:[new at(o,h,`color expected, "${h}" found`)]},constants:Jm,enum:sl,filter:Lu,function:Qm,layer:Tc,object:ho,source:tg,light:ng,sky:rg,terrain:Lc,string:Gl,formatted:function(u){return Gl(u).length===0?[]:ol(u)},resolvedImage:function(u){return Gl(u).length===0?[]:ol(u)},padding:function(u){const o=u.key,h=u.value;if(On(h)==="array"){if(h.length<1||h.length>4)return[new at(o,h,`padding requires 1 to 4 values; ${h.length} values found`)];const p={type:"number"};let _=[];for(let x=0;x[]}})),u.constants&&(h=h.concat(Jm({key:"constants",value:u.constants,style:u,styleSpec:o,validateSpec:ea}))),Pu(h)}function ta(u){return function(o){return u({...o,validateSpec:ea})}}function Pu(u){return[].concat(u).sort((o,h)=>o.line-h.line)}function Ps(u){return function(...o){return Pu(u.apply(this,o))}}Ls.source=Ps(ta(tg)),Ls.sprite=Ps(ta(Pc)),Ls.glyphs=Ps(ta(zp)),Ls.light=Ps(ta(ng)),Ls.sky=Ps(ta(rg)),Ls.terrain=Ps(ta(Lc)),Ls.layer=Ps(ta(Tc)),Ls.filter=Ps(ta(Lu)),Ls.paintProperty=Ps(ta(Np)),Ls.layoutProperty=Ps(ta(Op));const ql=Ls,Zy=ql.light,Fp=ql.paintProperty,Xy=ql.layoutProperty;function Mu(u,o){let h=!1;if(o&&o.length)for(const p of o)u.fire(new dt(new Error(p.message))),h=!0;return h}class Mc{constructor(o,h,p){const _=this.cells=[];if(o instanceof ArrayBuffer){this.arrayBuffer=o;const w=new Int32Array(this.arrayBuffer);o=w[0],this.d=(h=w[1])+2*(p=w[2]);for(let P=0;P=B[K+0]&&_>=B[K+1])?(I[X]=!0,w.push(O[X])):I[X]=!1}}}}_forEachCell(o,h,p,_,x,w,I,P){const D=this._convertToCellCoord(o),O=this._convertToCellCoord(h),B=this._convertToCellCoord(p),W=this._convertToCellCoord(_);for(let X=D;X<=B;X++)for(let K=O;K<=W;K++){const ie=this.d*K+X;if((!P||P(this._convertFromCellCoord(X),this._convertFromCellCoord(K),this._convertFromCellCoord(X+1),this._convertFromCellCoord(K+1)))&&x.call(this,o,h,p,_,ie,w,I,P))return}}_convertFromCellCoord(o){return(o-this.padding)/this.scale}_convertToCellCoord(o){return Math.max(0,Math.min(this.d-1,Math.floor(o*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;const o=this.cells,h=3+this.cells.length+1+1;let p=0;for(let w=0;w=0)continue;const w=u[x];_[x]=na[p].shallow.indexOf(x)>=0?w:Au(w,o)}u instanceof Error&&(_.message=u.message)}if(_.$name)throw new Error("$name property is reserved for worker serialization logic.");return p!=="Object"&&(_.$name=p),_}throw new Error("can't serialize object of type "+typeof u)}function ku(u){if(u==null||typeof u=="boolean"||typeof u=="number"||typeof u=="string"||u instanceof Boolean||u instanceof Number||u instanceof String||u instanceof Date||u instanceof RegExp||u instanceof Blob||u instanceof Error||jh(u)||Ot(u)||ArrayBuffer.isView(u)||u instanceof ImageData)return u;if(Array.isArray(u))return u.map(ku);if(typeof u=="object"){const o=u.$name||"Object";if(!na[o])throw new Error(`can't deserialize unregistered class ${o}`);const{klass:h}=na[o];if(!h)throw new Error(`can't deserialize unregistered class ${o}`);if(h.deserialize)return h.deserialize(u);const p=Object.create(h.prototype);for(const _ of Object.keys(u)){if(_==="$name")continue;const x=u[_];p[_]=na[o].shallow.indexOf(_)>=0?x:ku(x)}return p}throw new Error("can't deserialize object of type "+typeof u)}class ig{constructor(){this.first=!0}update(o,h){const p=Math.floor(o);return this.first?(this.first=!1,this.lastIntegerZoom=p,this.lastIntegerZoomTime=0,this.lastZoom=o,this.lastFloorZoom=p,!0):(this.lastFloorZoom>p?(this.lastIntegerZoom=p+1,this.lastIntegerZoomTime=h):this.lastFloorZoomu>=128&&u<=255,Arabic:u=>u>=1536&&u<=1791,"Arabic Supplement":u=>u>=1872&&u<=1919,"Arabic Extended-A":u=>u>=2208&&u<=2303,"Hangul Jamo":u=>u>=4352&&u<=4607,"Unified Canadian Aboriginal Syllabics":u=>u>=5120&&u<=5759,Khmer:u=>u>=6016&&u<=6143,"Unified Canadian Aboriginal Syllabics Extended":u=>u>=6320&&u<=6399,"General Punctuation":u=>u>=8192&&u<=8303,"Letterlike Symbols":u=>u>=8448&&u<=8527,"Number Forms":u=>u>=8528&&u<=8591,"Miscellaneous Technical":u=>u>=8960&&u<=9215,"Control Pictures":u=>u>=9216&&u<=9279,"Optical Character Recognition":u=>u>=9280&&u<=9311,"Enclosed Alphanumerics":u=>u>=9312&&u<=9471,"Geometric Shapes":u=>u>=9632&&u<=9727,"Miscellaneous Symbols":u=>u>=9728&&u<=9983,"Miscellaneous Symbols and Arrows":u=>u>=11008&&u<=11263,"CJK Radicals Supplement":u=>u>=11904&&u<=12031,"Kangxi Radicals":u=>u>=12032&&u<=12255,"Ideographic Description Characters":u=>u>=12272&&u<=12287,"CJK Symbols and Punctuation":u=>u>=12288&&u<=12351,Hiragana:u=>u>=12352&&u<=12447,Katakana:u=>u>=12448&&u<=12543,Bopomofo:u=>u>=12544&&u<=12591,"Hangul Compatibility Jamo":u=>u>=12592&&u<=12687,Kanbun:u=>u>=12688&&u<=12703,"Bopomofo Extended":u=>u>=12704&&u<=12735,"CJK Strokes":u=>u>=12736&&u<=12783,"Katakana Phonetic Extensions":u=>u>=12784&&u<=12799,"Enclosed CJK Letters and Months":u=>u>=12800&&u<=13055,"CJK Compatibility":u=>u>=13056&&u<=13311,"CJK Unified Ideographs Extension A":u=>u>=13312&&u<=19903,"Yijing Hexagram Symbols":u=>u>=19904&&u<=19967,"CJK Unified Ideographs":u=>u>=19968&&u<=40959,"Yi Syllables":u=>u>=40960&&u<=42127,"Yi Radicals":u=>u>=42128&&u<=42191,"Hangul Jamo Extended-A":u=>u>=43360&&u<=43391,"Hangul Syllables":u=>u>=44032&&u<=55215,"Hangul Jamo Extended-B":u=>u>=55216&&u<=55295,"Private Use Area":u=>u>=57344&&u<=63743,"CJK Compatibility Ideographs":u=>u>=63744&&u<=64255,"Arabic Presentation Forms-A":u=>u>=64336&&u<=65023,"Vertical Forms":u=>u>=65040&&u<=65055,"CJK Compatibility Forms":u=>u>=65072&&u<=65103,"Small Form Variants":u=>u>=65104&&u<=65135,"Arabic Presentation Forms-B":u=>u>=65136&&u<=65279,"Halfwidth and Fullwidth Forms":u=>u>=65280&&u<=65519};function Du(u){for(const o of u)if(Gh(o.charCodeAt(0)))return!0;return!1}function og(u){for(const o of u)if(!sg(o.charCodeAt(0)))return!1;return!0}function sg(u){return!(xt.Arabic(u)||xt["Arabic Supplement"](u)||xt["Arabic Extended-A"](u)||xt["Arabic Presentation Forms-A"](u)||xt["Arabic Presentation Forms-B"](u))}function Gh(u){return!(u!==746&&u!==747&&(u<4352||!(xt["Bopomofo Extended"](u)||xt.Bopomofo(u)||xt["CJK Compatibility Forms"](u)&&!(u>=65097&&u<=65103)||xt["CJK Compatibility Ideographs"](u)||xt["CJK Compatibility"](u)||xt["CJK Radicals Supplement"](u)||xt["CJK Strokes"](u)||!(!xt["CJK Symbols and Punctuation"](u)||u>=12296&&u<=12305||u>=12308&&u<=12319||u===12336)||xt["CJK Unified Ideographs Extension A"](u)||xt["CJK Unified Ideographs"](u)||xt["Enclosed CJK Letters and Months"](u)||xt["Hangul Compatibility Jamo"](u)||xt["Hangul Jamo Extended-A"](u)||xt["Hangul Jamo Extended-B"](u)||xt["Hangul Jamo"](u)||xt["Hangul Syllables"](u)||xt.Hiragana(u)||xt["Ideographic Description Characters"](u)||xt.Kanbun(u)||xt["Kangxi Radicals"](u)||xt["Katakana Phonetic Extensions"](u)||xt.Katakana(u)&&u!==12540||!(!xt["Halfwidth and Fullwidth Forms"](u)||u===65288||u===65289||u===65293||u>=65306&&u<=65310||u===65339||u===65341||u===65343||u>=65371&&u<=65503||u===65507||u>=65512&&u<=65519)||!(!xt["Small Form Variants"](u)||u>=65112&&u<=65118||u>=65123&&u<=65126)||xt["Unified Canadian Aboriginal Syllabics"](u)||xt["Unified Canadian Aboriginal Syllabics Extended"](u)||xt["Vertical Forms"](u)||xt["Yijing Hexagram Symbols"](u)||xt["Yi Syllables"](u)||xt["Yi Radicals"](u))))}function Bp(u){return!(Gh(u)||function(o){return!!(xt["Latin-1 Supplement"](o)&&(o===167||o===169||o===174||o===177||o===188||o===189||o===190||o===215||o===247)||xt["General Punctuation"](o)&&(o===8214||o===8224||o===8225||o===8240||o===8241||o===8251||o===8252||o===8258||o===8263||o===8264||o===8265||o===8273)||xt["Letterlike Symbols"](o)||xt["Number Forms"](o)||xt["Miscellaneous Technical"](o)&&(o>=8960&&o<=8967||o>=8972&&o<=8991||o>=8996&&o<=9e3||o===9003||o>=9085&&o<=9114||o>=9150&&o<=9165||o===9167||o>=9169&&o<=9179||o>=9186&&o<=9215)||xt["Control Pictures"](o)&&o!==9251||xt["Optical Character Recognition"](o)||xt["Enclosed Alphanumerics"](o)||xt["Geometric Shapes"](o)||xt["Miscellaneous Symbols"](o)&&!(o>=9754&&o<=9759)||xt["Miscellaneous Symbols and Arrows"](o)&&(o>=11026&&o<=11055||o>=11088&&o<=11097||o>=11192&&o<=11243)||xt["CJK Symbols and Punctuation"](o)||xt.Katakana(o)||xt["Private Use Area"](o)||xt["CJK Compatibility Forms"](o)||xt["Small Form Variants"](o)||xt["Halfwidth and Fullwidth Forms"](o)||o===8734||o===8756||o===8757||o>=9984&&o<=10087||o>=10102&&o<=10131||o===65532||o===65533)}(u))}function qh(u){return u>=1424&&u<=2303||xt["Arabic Presentation Forms-A"](u)||xt["Arabic Presentation Forms-B"](u)}function ag(u,o){return!(!o&&qh(u)||u>=2304&&u<=3583||u>=3840&&u<=4255||xt.Khmer(u))}function Yy(u){for(const o of u)if(qh(o.charCodeAt(0)))return!0;return!1}const al=new class{constructor(){this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null}setState(u){this.pluginStatus=u.pluginStatus,this.pluginURL=u.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(u){this.applyArabicShaping=u.applyArabicShaping,this.processBidirectionalText=u.processBidirectionalText,this.processStyledBidirectionalText=u.processStyledBidirectionalText}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getPluginURL(){return this.pluginURL}getRTLTextPluginStatus(){return this.pluginStatus}};class br{constructor(o,h){this.zoom=o,h?(this.now=h.now,this.fadeDuration=h.fadeDuration,this.zoomHistory=h.zoomHistory,this.transition=h.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new ig,this.transition={})}isSupportedScript(o){return function(h,p){for(const _ of h)if(!ag(_.charCodeAt(0),p))return!1;return!0}(o,al.getRTLTextPluginStatus()==="loaded")}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){const o=this.zoom,h=o-Math.floor(o),p=this.crossFadingFactor();return o>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:h+(1-h)*p}:{fromScale:.5,toScale:1,t:1-(1-p)*h}}}class Ac{constructor(o,h){this.property=o,this.value=h,this.expression=function(p,_){if(Ah(p))return new Dh(p,_);if(lr(p)){const x=Zm(p,_);if(x.result==="error")throw new Error(x.value.map(w=>`${w.key}: ${w.message}`).join(", "));return x.value}{let x=p;return _.type==="color"&&typeof p=="string"?x=$n.parse(p):_.type!=="padding"||typeof p!="number"&&!Array.isArray(p)?_.type==="variableAnchorOffsetCollection"&&Array.isArray(p)&&(x=cs.parse(p)):x=Io.parse(p),{kind:"constant",evaluate:()=>x}}}(h===void 0?o.specification.default:h,o.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(o,h,p){return this.property.possiblyEvaluate(this,o,h,p)}}class Wh{constructor(o){this.property=o,this.value=new Ac(o,void 0)}transitioned(o,h){return new lg(this.property,this.value,h,fe({},o.transition,this.transition),o.now)}untransitioned(){return new lg(this.property,this.value,null,{},0)}}class Vp{constructor(o){this._properties=o,this._values=Object.create(o.defaultTransitionablePropertyValues)}getValue(o){return Y(this._values[o].value.value)}setValue(o,h){Object.prototype.hasOwnProperty.call(this._values,o)||(this._values[o]=new Wh(this._values[o].property)),this._values[o].value=new Ac(this._values[o].property,h===null?void 0:Y(h))}getTransition(o){return Y(this._values[o].transition)}setTransition(o,h){Object.prototype.hasOwnProperty.call(this._values,o)||(this._values[o]=new Wh(this._values[o].property)),this._values[o].transition=Y(h)||void 0}serialize(){const o={};for(const h of Object.keys(this._values)){const p=this.getValue(h);p!==void 0&&(o[h]=p);const _=this.getTransition(h);_!==void 0&&(o[`${h}-transition`]=_)}return o}transitioned(o,h){const p=new ug(this._properties);for(const _ of Object.keys(this._values))p._values[_]=this._values[_].transitioned(o,h._values[_]);return p}untransitioned(){const o=new ug(this._properties);for(const h of Object.keys(this._values))o._values[h]=this._values[h].untransitioned();return o}}class lg{constructor(o,h,p,_,x){this.property=o,this.value=h,this.begin=x+_.delay||0,this.end=this.begin+_.duration||0,o.specification.transition&&(_.delay||_.duration)&&(this.prior=p)}possiblyEvaluate(o,h,p){const _=o.now||0,x=this.value.possiblyEvaluate(o,h,p),w=this.prior;if(w){if(_>this.end)return this.prior=null,x;if(this.value.isDataDriven())return this.prior=null,x;if(_=1)return 1;const D=P*P,O=D*P;return 4*(P<.5?O:3*(P-D)+O-.75)}(I))}}return x}}class ug{constructor(o){this._properties=o,this._values=Object.create(o.defaultTransitioningPropertyValues)}possiblyEvaluate(o,h,p){const _=new kc(this._properties);for(const x of Object.keys(this._values))_._values[x]=this._values[x].possiblyEvaluate(o,h,p);return _}hasTransition(){for(const o of Object.keys(this._values))if(this._values[o].prior)return!0;return!1}}class cg{constructor(o){this._properties=o,this._values=Object.create(o.defaultPropertyValues)}hasValue(o){return this._values[o].value!==void 0}getValue(o){return Y(this._values[o].value)}setValue(o,h){this._values[o]=new Ac(this._values[o].property,h===null?void 0:Y(h))}serialize(){const o={};for(const h of Object.keys(this._values)){const p=this.getValue(h);p!==void 0&&(o[h]=p)}return o}possiblyEvaluate(o,h,p){const _=new kc(this._properties);for(const x of Object.keys(this._values))_._values[x]=this._values[x].possiblyEvaluate(o,h,p);return _}}class Ms{constructor(o,h,p){this.property=o,this.value=h,this.parameters=p}isConstant(){return this.value.kind==="constant"}constantOr(o){return this.value.kind==="constant"?this.value.value:o}evaluate(o,h,p,_){return this.property.evaluate(this.value,this.parameters,o,h,p,_)}}class kc{constructor(o){this._properties=o,this._values=Object.create(o.defaultPossiblyEvaluatedValues)}get(o){return this._values[o]}}class Nt{constructor(o){this.specification=o}possiblyEvaluate(o,h){if(o.isDataDriven())throw new Error("Value should not be data driven");return o.expression.evaluate(h)}interpolate(o,h,p){const _=co[this.specification.type];return _?_(o,h,p):o}}class qt{constructor(o,h){this.specification=o,this.overrides=h}possiblyEvaluate(o,h,p,_){return new Ms(this,o.expression.kind==="constant"||o.expression.kind==="camera"?{kind:"constant",value:o.expression.evaluate(h,null,{},p,_)}:o.expression,h)}interpolate(o,h,p){if(o.value.kind!=="constant"||h.value.kind!=="constant")return o;if(o.value.value===void 0||h.value.value===void 0)return new Ms(this,{kind:"constant",value:void 0},o.parameters);const _=co[this.specification.type];if(_){const x=_(o.value.value,h.value.value,p);return new Ms(this,{kind:"constant",value:x},o.parameters)}return o}evaluate(o,h,p,_,x,w){return o.kind==="constant"?o.value:o.evaluate(h,p,_,x,w)}}class Hh extends qt{possiblyEvaluate(o,h,p,_){if(o.value===void 0)return new Ms(this,{kind:"constant",value:void 0},h);if(o.expression.kind==="constant"){const x=o.expression.evaluate(h,null,{},p,_),w=o.property.specification.type==="resolvedImage"&&typeof x!="string"?x.name:x,I=this._calculate(w,w,w,h);return new Ms(this,{kind:"constant",value:I},h)}if(o.expression.kind==="camera"){const x=this._calculate(o.expression.evaluate({zoom:h.zoom-1}),o.expression.evaluate({zoom:h.zoom}),o.expression.evaluate({zoom:h.zoom+1}),h);return new Ms(this,{kind:"constant",value:x},h)}return new Ms(this,o.expression,h)}evaluate(o,h,p,_,x,w){if(o.kind==="source"){const I=o.evaluate(h,p,_,x,w);return this._calculate(I,I,I,h)}return o.kind==="composite"?this._calculate(o.evaluate({zoom:Math.floor(h.zoom)-1},p,_),o.evaluate({zoom:Math.floor(h.zoom)},p,_),o.evaluate({zoom:Math.floor(h.zoom)+1},p,_),h):o.value}_calculate(o,h,p,_){return _.zoom>_.zoomHistory.lastIntegerZoom?{from:o,to:h}:{from:p,to:h}}interpolate(o){return o}}class Dc{constructor(o){this.specification=o}possiblyEvaluate(o,h,p,_){if(o.value!==void 0){if(o.expression.kind==="constant"){const x=o.expression.evaluate(h,null,{},p,_);return this._calculate(x,x,x,h)}return this._calculate(o.expression.evaluate(new br(Math.floor(h.zoom-1),h)),o.expression.evaluate(new br(Math.floor(h.zoom),h)),o.expression.evaluate(new br(Math.floor(h.zoom+1),h)),h)}}_calculate(o,h,p,_){return _.zoom>_.zoomHistory.lastIntegerZoom?{from:o,to:h}:{from:p,to:h}}interpolate(o){return o}}class Up{constructor(o){this.specification=o}possiblyEvaluate(o,h,p,_){return!!o.expression.evaluate(h,null,{},p,_)}interpolate(){return!1}}class To{constructor(o){this.properties=o,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(const h in o){const p=o[h];p.specification.overridable&&this.overridableProperties.push(h);const _=this.defaultPropertyValues[h]=new Ac(p,void 0),x=this.defaultTransitionablePropertyValues[h]=new Wh(p);this.defaultTransitioningPropertyValues[h]=x.untransitioned(),this.defaultPossiblyEvaluatedValues[h]=_.possiblyEvaluate({})}}}Ct("DataDrivenProperty",qt),Ct("DataConstantProperty",Nt),Ct("CrossFadedDataDrivenProperty",Hh),Ct("CrossFadedProperty",Dc),Ct("ColorRampProperty",Up);const jp="-transition";class As extends en{constructor(o,h){if(super(),this.id=o.id,this.type=o.type,this._featureFilter={filter:()=>!0,needGeometry:!1},o.type!=="custom"&&(this.metadata=o.metadata,this.minzoom=o.minzoom,this.maxzoom=o.maxzoom,o.type!=="background"&&(this.source=o.source,this.sourceLayer=o["source-layer"],this.filter=o.filter),h.layout&&(this._unevaluatedLayout=new cg(h.layout)),h.paint)){this._transitionablePaint=new Vp(h.paint);for(const p in o.paint)this.setPaintProperty(p,o.paint[p],{validate:!1});for(const p in o.layout)this.setLayoutProperty(p,o.layout[p],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new kc(h.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(o){return o==="visibility"?this.visibility:this._unevaluatedLayout.getValue(o)}setLayoutProperty(o,h,p={}){h!=null&&this._validate(Xy,`layers.${this.id}.layout.${o}`,o,h,p)||(o!=="visibility"?this._unevaluatedLayout.setValue(o,h):this.visibility=h)}getPaintProperty(o){return o.endsWith(jp)?this._transitionablePaint.getTransition(o.slice(0,-11)):this._transitionablePaint.getValue(o)}setPaintProperty(o,h,p={}){if(h!=null&&this._validate(Fp,`layers.${this.id}.paint.${o}`,o,h,p))return!1;if(o.endsWith(jp))return this._transitionablePaint.setTransition(o.slice(0,-11),h||void 0),!1;{const _=this._transitionablePaint._values[o],x=_.property.specification["property-type"]==="cross-faded-data-driven",w=_.value.isDataDriven(),I=_.value;this._transitionablePaint.setValue(o,h),this._handleSpecialPaintPropertyUpdate(o);const P=this._transitionablePaint._values[o].value;return P.isDataDriven()||w||x||this._handleOverridablePaintPropertyUpdate(o,I,P)}}_handleSpecialPaintPropertyUpdate(o){}_handleOverridablePaintPropertyUpdate(o,h,p){return!1}isHidden(o){return!!(this.minzoom&&o=this.maxzoom)||this.visibility==="none"}updateTransitions(o){this._transitioningPaint=this._transitionablePaint.transitioned(o,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(o,h){o.getCrossfadeParameters&&(this._crossfadeParameters=o.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(o,void 0,h)),this.paint=this._transitioningPaint.possiblyEvaluate(o,void 0,h)}serialize(){const o={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(o.layout=o.layout||{},o.layout.visibility=this.visibility),Ae(o,(h,p)=>!(h===void 0||p==="layout"&&!Object.keys(h).length||p==="paint"&&!Object.keys(h).length))}_validate(o,h,p,_,x={}){return(!x||x.validate!==!1)&&Mu(this,o.call(ql,{key:h,layerType:this.type,objectKey:p,value:_,styleSpec:Re,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(const o in this.paint._values){const h=this.paint.get(o);if(h instanceof Ms&&Tu(h.property.specification)&&(h.value.kind==="source"||h.value.kind==="composite")&&h.value.isStateDependent)return!0}return!1}}const hg={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class Rc{constructor(o,h){this._structArray=o,this._pos1=h*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class Vr{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(o,h){return o._trim(),h&&(o.isTransferred=!0,h.push(o.arrayBuffer)),{length:o.length,arrayBuffer:o.arrayBuffer}}static deserialize(o){const h=Object.create(this.prototype);return h.arrayBuffer=o.arrayBuffer,h.length=o.length,h.capacity=o.arrayBuffer.byteLength/h.bytesPerElement,h._refreshViews(),h}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(o){this.reserve(o),this.length=o}reserve(o){if(o>this.capacity){this.capacity=Math.max(o,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);const h=this.uint8;this._refreshViews(),h&&this.uint8.set(h)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function ei(u,o=1){let h=0,p=0;return{members:u.map(_=>{const x=hg[_.type].BYTES_PER_ELEMENT,w=h=fg(h,Math.max(o,x)),I=_.components||1;return p=Math.max(p,x),h+=x*I,{name:_.name,type:_.type,components:I,offset:w}}),size:fg(h,Math.max(p,o)),alignment:o}}function fg(u,o){return Math.ceil(u/o)*o}class Nc extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(o,h){const p=this.length;return this.resize(p+1),this.emplace(p,o,h)}emplace(o,h,p){const _=2*o;return this.int16[_+0]=h,this.int16[_+1]=p,o}}Nc.prototype.bytesPerElement=4,Ct("StructArrayLayout2i4",Nc);class ka extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(o,h,p){const _=this.length;return this.resize(_+1),this.emplace(_,o,h,p)}emplace(o,h,p,_){const x=3*o;return this.int16[x+0]=h,this.int16[x+1]=p,this.int16[x+2]=_,o}}ka.prototype.bytesPerElement=6,Ct("StructArrayLayout3i6",ka);class Gp extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(o,h,p,_){const x=this.length;return this.resize(x+1),this.emplace(x,o,h,p,_)}emplace(o,h,p,_,x){const w=4*o;return this.int16[w+0]=h,this.int16[w+1]=p,this.int16[w+2]=_,this.int16[w+3]=x,o}}Gp.prototype.bytesPerElement=8,Ct("StructArrayLayout4i8",Gp);class qp extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(o,h,p,_,x,w){const I=this.length;return this.resize(I+1),this.emplace(I,o,h,p,_,x,w)}emplace(o,h,p,_,x,w,I){const P=6*o;return this.int16[P+0]=h,this.int16[P+1]=p,this.int16[P+2]=_,this.int16[P+3]=x,this.int16[P+4]=w,this.int16[P+5]=I,o}}qp.prototype.bytesPerElement=12,Ct("StructArrayLayout2i4i12",qp);class Wp extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(o,h,p,_,x,w){const I=this.length;return this.resize(I+1),this.emplace(I,o,h,p,_,x,w)}emplace(o,h,p,_,x,w,I){const P=4*o,D=8*o;return this.int16[P+0]=h,this.int16[P+1]=p,this.uint8[D+4]=_,this.uint8[D+5]=x,this.uint8[D+6]=w,this.uint8[D+7]=I,o}}Wp.prototype.bytesPerElement=8,Ct("StructArrayLayout2i4ub8",Wp);class Oc extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(o,h){const p=this.length;return this.resize(p+1),this.emplace(p,o,h)}emplace(o,h,p){const _=2*o;return this.float32[_+0]=h,this.float32[_+1]=p,o}}Oc.prototype.bytesPerElement=8,Ct("StructArrayLayout2f8",Oc);class Zh extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(o,h,p,_,x,w,I,P,D,O){const B=this.length;return this.resize(B+1),this.emplace(B,o,h,p,_,x,w,I,P,D,O)}emplace(o,h,p,_,x,w,I,P,D,O,B){const W=10*o;return this.uint16[W+0]=h,this.uint16[W+1]=p,this.uint16[W+2]=_,this.uint16[W+3]=x,this.uint16[W+4]=w,this.uint16[W+5]=I,this.uint16[W+6]=P,this.uint16[W+7]=D,this.uint16[W+8]=O,this.uint16[W+9]=B,o}}Zh.prototype.bytesPerElement=20,Ct("StructArrayLayout10ui20",Zh);class Hp extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(o,h,p,_,x,w,I,P,D,O,B,W){const X=this.length;return this.resize(X+1),this.emplace(X,o,h,p,_,x,w,I,P,D,O,B,W)}emplace(o,h,p,_,x,w,I,P,D,O,B,W,X){const K=12*o;return this.int16[K+0]=h,this.int16[K+1]=p,this.int16[K+2]=_,this.int16[K+3]=x,this.uint16[K+4]=w,this.uint16[K+5]=I,this.uint16[K+6]=P,this.uint16[K+7]=D,this.int16[K+8]=O,this.int16[K+9]=B,this.int16[K+10]=W,this.int16[K+11]=X,o}}Hp.prototype.bytesPerElement=24,Ct("StructArrayLayout4i4ui4i24",Hp);class Zp extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(o,h,p){const _=this.length;return this.resize(_+1),this.emplace(_,o,h,p)}emplace(o,h,p,_){const x=3*o;return this.float32[x+0]=h,this.float32[x+1]=p,this.float32[x+2]=_,o}}Zp.prototype.bytesPerElement=12,Ct("StructArrayLayout3f12",Zp);class Da extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(o){const h=this.length;return this.resize(h+1),this.emplace(h,o)}emplace(o,h){return this.uint32[1*o+0]=h,o}}Da.prototype.bytesPerElement=4,Ct("StructArrayLayout1ul4",Da);class Xh extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(o,h,p,_,x,w,I,P,D){const O=this.length;return this.resize(O+1),this.emplace(O,o,h,p,_,x,w,I,P,D)}emplace(o,h,p,_,x,w,I,P,D,O){const B=10*o,W=5*o;return this.int16[B+0]=h,this.int16[B+1]=p,this.int16[B+2]=_,this.int16[B+3]=x,this.int16[B+4]=w,this.int16[B+5]=I,this.uint32[W+3]=P,this.uint16[B+8]=D,this.uint16[B+9]=O,o}}Xh.prototype.bytesPerElement=20,Ct("StructArrayLayout6i1ul2ui20",Xh);class zc extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(o,h,p,_,x,w){const I=this.length;return this.resize(I+1),this.emplace(I,o,h,p,_,x,w)}emplace(o,h,p,_,x,w,I){const P=6*o;return this.int16[P+0]=h,this.int16[P+1]=p,this.int16[P+2]=_,this.int16[P+3]=x,this.int16[P+4]=w,this.int16[P+5]=I,o}}zc.prototype.bytesPerElement=12,Ct("StructArrayLayout2i2i2i12",zc);class Yh extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(o,h,p,_,x){const w=this.length;return this.resize(w+1),this.emplace(w,o,h,p,_,x)}emplace(o,h,p,_,x,w){const I=4*o,P=8*o;return this.float32[I+0]=h,this.float32[I+1]=p,this.float32[I+2]=_,this.int16[P+6]=x,this.int16[P+7]=w,o}}Yh.prototype.bytesPerElement=16,Ct("StructArrayLayout2f1f2i16",Yh);class Fc extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(o,h,p,_){const x=this.length;return this.resize(x+1),this.emplace(x,o,h,p,_)}emplace(o,h,p,_,x){const w=12*o,I=3*o;return this.uint8[w+0]=h,this.uint8[w+1]=p,this.float32[I+1]=_,this.float32[I+2]=x,o}}Fc.prototype.bytesPerElement=12,Ct("StructArrayLayout2ub2f12",Fc);class $h extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(o,h,p){const _=this.length;return this.resize(_+1),this.emplace(_,o,h,p)}emplace(o,h,p,_){const x=3*o;return this.uint16[x+0]=h,this.uint16[x+1]=p,this.uint16[x+2]=_,o}}$h.prototype.bytesPerElement=6,Ct("StructArrayLayout3ui6",$h);class Ru extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(o,h,p,_,x,w,I,P,D,O,B,W,X,K,ie,de,we){const Oe=this.length;return this.resize(Oe+1),this.emplace(Oe,o,h,p,_,x,w,I,P,D,O,B,W,X,K,ie,de,we)}emplace(o,h,p,_,x,w,I,P,D,O,B,W,X,K,ie,de,we,Oe){const Ee=24*o,ke=12*o,Qe=48*o;return this.int16[Ee+0]=h,this.int16[Ee+1]=p,this.uint16[Ee+2]=_,this.uint16[Ee+3]=x,this.uint32[ke+2]=w,this.uint32[ke+3]=I,this.uint32[ke+4]=P,this.uint16[Ee+10]=D,this.uint16[Ee+11]=O,this.uint16[Ee+12]=B,this.float32[ke+7]=W,this.float32[ke+8]=X,this.uint8[Qe+36]=K,this.uint8[Qe+37]=ie,this.uint8[Qe+38]=de,this.uint32[ke+10]=we,this.int16[Ee+22]=Oe,o}}Ru.prototype.bytesPerElement=48,Ct("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Ru);class Wl extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(o,h,p,_,x,w,I,P,D,O,B,W,X,K,ie,de,we,Oe,Ee,ke,Qe,et,St,kt,wt,bt,ht,Tt){const _t=this.length;return this.resize(_t+1),this.emplace(_t,o,h,p,_,x,w,I,P,D,O,B,W,X,K,ie,de,we,Oe,Ee,ke,Qe,et,St,kt,wt,bt,ht,Tt)}emplace(o,h,p,_,x,w,I,P,D,O,B,W,X,K,ie,de,we,Oe,Ee,ke,Qe,et,St,kt,wt,bt,ht,Tt,_t){const it=32*o,jt=16*o;return this.int16[it+0]=h,this.int16[it+1]=p,this.int16[it+2]=_,this.int16[it+3]=x,this.int16[it+4]=w,this.int16[it+5]=I,this.int16[it+6]=P,this.int16[it+7]=D,this.uint16[it+8]=O,this.uint16[it+9]=B,this.uint16[it+10]=W,this.uint16[it+11]=X,this.uint16[it+12]=K,this.uint16[it+13]=ie,this.uint16[it+14]=de,this.uint16[it+15]=we,this.uint16[it+16]=Oe,this.uint16[it+17]=Ee,this.uint16[it+18]=ke,this.uint16[it+19]=Qe,this.uint16[it+20]=et,this.uint16[it+21]=St,this.uint16[it+22]=kt,this.uint32[jt+12]=wt,this.float32[jt+13]=bt,this.float32[jt+14]=ht,this.uint16[it+30]=Tt,this.uint16[it+31]=_t,o}}Wl.prototype.bytesPerElement=64,Ct("StructArrayLayout8i15ui1ul2f2ui64",Wl);class Kh extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(o){const h=this.length;return this.resize(h+1),this.emplace(h,o)}emplace(o,h){return this.float32[1*o+0]=h,o}}Kh.prototype.bytesPerElement=4,Ct("StructArrayLayout1f4",Kh);class Jh extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(o,h,p){const _=this.length;return this.resize(_+1),this.emplace(_,o,h,p)}emplace(o,h,p,_){const x=3*o;return this.uint16[6*o+0]=h,this.float32[x+1]=p,this.float32[x+2]=_,o}}Jh.prototype.bytesPerElement=12,Ct("StructArrayLayout1ui2f12",Jh);class Hl extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(o,h,p){const _=this.length;return this.resize(_+1),this.emplace(_,o,h,p)}emplace(o,h,p,_){const x=4*o;return this.uint32[2*o+0]=h,this.uint16[x+2]=p,this.uint16[x+3]=_,o}}Hl.prototype.bytesPerElement=8,Ct("StructArrayLayout1ul2ui8",Hl);class Xp extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(o,h){const p=this.length;return this.resize(p+1),this.emplace(p,o,h)}emplace(o,h,p){const _=2*o;return this.uint16[_+0]=h,this.uint16[_+1]=p,o}}Xp.prototype.bytesPerElement=4,Ct("StructArrayLayout2ui4",Xp);class Yp extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(o){const h=this.length;return this.resize(h+1),this.emplace(h,o)}emplace(o,h){return this.uint16[1*o+0]=h,o}}Yp.prototype.bytesPerElement=2,Ct("StructArrayLayout1ui2",Yp);class Qh extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(o,h,p,_){const x=this.length;return this.resize(x+1),this.emplace(x,o,h,p,_)}emplace(o,h,p,_,x){const w=4*o;return this.float32[w+0]=h,this.float32[w+1]=p,this.float32[w+2]=_,this.float32[w+3]=x,o}}Qh.prototype.bytesPerElement=16,Ct("StructArrayLayout4f16",Qh);class pg extends Rc{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new E(this.anchorPointX,this.anchorPointY)}}pg.prototype.size=20;class y extends Xh{get(o){return new pg(this,o)}}Ct("CollisionBoxArray",y);class a extends Rc{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(o){this._structArray.uint8[this._pos1+37]=o}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(o){this._structArray.uint8[this._pos1+38]=o}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(o){this._structArray.uint32[this._pos4+10]=o}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}a.prototype.size=48;class f extends Ru{get(o){return new a(this,o)}}Ct("PlacedSymbolArray",f);class m extends Rc{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(o){this._structArray.uint32[this._pos4+12]=o}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+14]}get textAnchorOffsetStartIndex(){return this._structArray.uint16[this._pos2+30]}get textAnchorOffsetEndIndex(){return this._structArray.uint16[this._pos2+31]}}m.prototype.size=64;class g extends Wl{get(o){return new m(this,o)}}Ct("SymbolInstanceArray",g);class b extends Kh{getoffsetX(o){return this.float32[1*o+0]}}Ct("GlyphOffsetArray",b);class T extends ka{getx(o){return this.int16[3*o+0]}gety(o){return this.int16[3*o+1]}gettileUnitDistanceFromAnchor(o){return this.int16[3*o+2]}}Ct("SymbolLineVertexArray",T);class L extends Rc{get textAnchor(){return this._structArray.uint16[this._pos2+0]}get textOffset0(){return this._structArray.float32[this._pos4+1]}get textOffset1(){return this._structArray.float32[this._pos4+2]}}L.prototype.size=12;class k extends Jh{get(o){return new L(this,o)}}Ct("TextAnchorOffsetArray",k);class N extends Rc{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}}N.prototype.size=8;class V extends Hl{get(o){return new N(this,o)}}Ct("FeatureIndexArray",V);class j extends Nc{}class $ extends Nc{}class he extends Nc{}class ce extends qp{}class ge extends Wp{}class re extends Oc{}class Ce extends Zh{}class Be extends Hp{}class ve extends Zp{}class De extends Da{}class Ve extends zc{}class Ze extends Fc{}class $e extends $h{}class rt extends Xp{}const nt=ei([{name:"a_pos",components:2,type:"Int16"}],4),{members:ct}=nt;class pt{constructor(o=[]){this.segments=o}prepareSegment(o,h,p,_){let x=this.segments[this.segments.length-1];return o>pt.MAX_VERTEX_ARRAY_LENGTH&&Ke(`Max vertices per segment is ${pt.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${o}`),(!x||x.vertexLength+o>pt.MAX_VERTEX_ARRAY_LENGTH||x.sortKey!==_)&&(x={vertexOffset:h.length,primitiveOffset:p.length,vertexLength:0,primitiveLength:0},_!==void 0&&(x.sortKey=_),this.segments.push(x)),x}get(){return this.segments}destroy(){for(const o of this.segments)for(const h in o.vaos)o.vaos[h].destroy()}static simpleSegment(o,h,p,_){return new pt([{vertexOffset:o,primitiveOffset:h,vertexLength:p,primitiveLength:_,vaos:{},sortKey:0}])}}function un(u,o){return 256*(u=te(Math.floor(u),0,255))+te(Math.floor(o),0,255)}pt.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Ct("SegmentVector",pt);const gt=ei([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]);var Ht={exports:{}},cn={exports:{}};cn.exports=function(u,o){var h,p,_,x,w,I,P,D;for(p=u.length-(h=3&u.length),_=o,w=3432918353,I=461845907,D=0;D>>16)*w&65535)<<16)&4294967295)<<15|P>>>17))*I+(((P>>>16)*I&65535)<<16)&4294967295)<<13|_>>>19))+((5*(_>>>16)&65535)<<16)&4294967295))+((58964+(x>>>16)&65535)<<16);switch(P=0,h){case 3:P^=(255&u.charCodeAt(D+2))<<16;case 2:P^=(255&u.charCodeAt(D+1))<<8;case 1:_^=P=(65535&(P=(P=(65535&(P^=255&u.charCodeAt(D)))*w+(((P>>>16)*w&65535)<<16)&4294967295)<<15|P>>>17))*I+(((P>>>16)*I&65535)<<16)&4294967295}return _^=u.length,_=2246822507*(65535&(_^=_>>>16))+((2246822507*(_>>>16)&65535)<<16)&4294967295,_=3266489909*(65535&(_^=_>>>13))+((3266489909*(_>>>16)&65535)<<16)&4294967295,(_^=_>>>16)>>>0};var kn=cn.exports,Jt={exports:{}};Jt.exports=function(u,o){for(var h,p=u.length,_=o^p,x=0;p>=4;)h=1540483477*(65535&(h=255&u.charCodeAt(x)|(255&u.charCodeAt(++x))<<8|(255&u.charCodeAt(++x))<<16|(255&u.charCodeAt(++x))<<24))+((1540483477*(h>>>16)&65535)<<16),_=1540483477*(65535&_)+((1540483477*(_>>>16)&65535)<<16)^(h=1540483477*(65535&(h^=h>>>24))+((1540483477*(h>>>16)&65535)<<16)),p-=4,++x;switch(p){case 3:_^=(255&u.charCodeAt(x+2))<<16;case 2:_^=(255&u.charCodeAt(x+1))<<8;case 1:_=1540483477*(65535&(_^=255&u.charCodeAt(x)))+((1540483477*(_>>>16)&65535)<<16)}return _=1540483477*(65535&(_^=_>>>13))+((1540483477*(_>>>16)&65535)<<16),(_^=_>>>15)>>>0};var mn=kn,bn=Jt.exports;Ht.exports=mn,Ht.exports.murmur3=mn,Ht.exports.murmur2=bn;var Ur=d(Ht.exports);class Jn{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(o,h,p,_){this.ids.push(Ho(o)),this.positions.push(h,p,_)}getPositions(o){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");const h=Ho(o);let p=0,_=this.ids.length-1;for(;p<_;){const w=p+_>>1;this.ids[w]>=h?_=w:p=w+1}const x=[];for(;this.ids[p]===h;)x.push({index:this.positions[3*p],start:this.positions[3*p+1],end:this.positions[3*p+2]}),p++;return x}static serialize(o,h){const p=new Float64Array(o.ids),_=new Uint32Array(o.positions);return yi(p,_,0,p.length-1),h&&h.push(p.buffer,_.buffer),{ids:p,positions:_}}static deserialize(o){const h=new Jn;return h.ids=o.ids,h.positions=o.positions,h.indexed=!0,h}}function Ho(u){const o=+u;return!isNaN(o)&&o<=Number.MAX_SAFE_INTEGER?o:Ur(String(u))}function yi(u,o,h,p){for(;h>1];let x=h-1,w=p+1;for(;;){do x++;while(u[x]<_);do w--;while(u[w]>_);if(x>=w)break;Mr(u,x,w),Mr(o,3*x,3*w),Mr(o,3*x+1,3*w+1),Mr(o,3*x+2,3*w+2)}w-h`u_${_}`),this.type=p}setUniform(o,h,p){o.set(p.constantOr(this.value))}getBinding(o,h,p){return this.type==="color"?new ll(o,h):new Zo(o,h)}}class fi{constructor(o,h){this.uniformNames=h.map(p=>`u_${p}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(o,h){this.pixelRatioFrom=h.pixelRatio,this.pixelRatioTo=o.pixelRatio,this.patternFrom=h.tlbr,this.patternTo=o.tlbr}setUniform(o,h,p,_){const x=_==="u_pattern_to"?this.patternTo:_==="u_pattern_from"?this.patternFrom:_==="u_pixel_ratio_to"?this.pixelRatioTo:_==="u_pixel_ratio_from"?this.pixelRatioFrom:null;x&&o.set(x)}getBinding(o,h,p){return p.substr(0,9)==="u_pattern"?new ra(o,h):new Zo(o,h)}}class Ar{constructor(o,h,p,_){this.expression=o,this.type=p,this.maxValue=0,this.paintVertexAttributes=h.map(x=>({name:`a_${x}`,type:"Float32",components:p==="color"?2:1,offset:0})),this.paintVertexArray=new _}populatePaintArray(o,h,p,_,x){const w=this.paintVertexArray.length,I=this.expression.evaluate(new br(0),h,{},_,[],x);this.paintVertexArray.resize(o),this._setPaintValue(w,o,I)}updatePaintArray(o,h,p,_){const x=this.expression.evaluate({zoom:0},p,_);this._setPaintValue(o,h,x)}_setPaintValue(o,h,p){if(this.type==="color"){const _=ul(p);for(let x=o;x`u_${I}_t`),this.type=p,this.useIntegerZoom=_,this.zoom=x,this.maxValue=0,this.paintVertexAttributes=h.map(I=>({name:`a_${I}`,type:"Float32",components:p==="color"?4:2,offset:0})),this.paintVertexArray=new w}populatePaintArray(o,h,p,_,x){const w=this.expression.evaluate(new br(this.zoom),h,{},_,[],x),I=this.expression.evaluate(new br(this.zoom+1),h,{},_,[],x),P=this.paintVertexArray.length;this.paintVertexArray.resize(o),this._setPaintValue(P,o,w,I)}updatePaintArray(o,h,p,_){const x=this.expression.evaluate({zoom:this.zoom},p,_),w=this.expression.evaluate({zoom:this.zoom+1},p,_);this._setPaintValue(o,h,x,w)}_setPaintValue(o,h,p,_){if(this.type==="color"){const x=ul(p),w=ul(_);for(let I=o;I`#define HAS_UNIFORM_${_}`))}return o}getBinderAttributes(){const o=[];for(const h in this.binders){const p=this.binders[h];if(p instanceof Ar||p instanceof xr)for(let _=0;_!0){this.programConfigurations={};for(const _ of o)this.programConfigurations[_.id]=new pi(_,h,p);this.needsUpload=!1,this._featureMap=new Jn,this._bufferOffset=0}populatePaintArrays(o,h,p,_,x,w){for(const I in this.programConfigurations)this.programConfigurations[I].populatePaintArrays(o,h,_,x,w);h.id!==void 0&&this._featureMap.add(h.id,p,this._bufferOffset,o),this._bufferOffset=o,this.needsUpload=!0}updatePaintArrays(o,h,p,_){for(const x of p)this.needsUpload=this.programConfigurations[x.id].updatePaintArrays(o,this._featureMap,h,x,_)||this.needsUpload}get(o){return this.programConfigurations[o]}upload(o){if(this.needsUpload){for(const h in this.programConfigurations)this.programConfigurations[h].upload(o);this.needsUpload=!1}}destroy(){for(const o in this.programConfigurations)this.programConfigurations[o].destroy()}}function ps(u,o){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[u]||[u.replace(`${o}-`,"").replace(/-/g,"_")]}function di(u,o,h){const p={color:{source:Oc,composite:Qh},number:{source:Kh,composite:Oc}},_=function(x){return{"line-pattern":{source:Ce,composite:Ce},"fill-pattern":{source:Ce,composite:Ce},"fill-extrusion-pattern":{source:Ce,composite:Ce}}[x]}(u);return _&&_[h]||p[o][h]}Ct("ConstantBinder",ia),Ct("CrossFadedConstantBinder",fi),Ct("SourceExpressionBinder",Ar),Ct("CrossFadedCompositeBinder",fs),Ct("CompositeExpressionBinder",xr),Ct("ProgramConfiguration",pi,{omit:["_buffers"]}),Ct("ProgramConfigurationSet",kr);const Xr=8192,$p=Math.pow(2,14)-1,dg=-$p-1;function Zl(u){const o=Xr/u.extent,h=u.loadGeometry();for(let p=0;pw.x+1||Pw.y+1)&&Ke("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return h}function Xl(u,o){return{type:u.type,id:u.id,properties:u.properties,geometry:o?Zl(u):[]}}function ef(u,o,h,p,_){u.emplaceBack(2*o+(p+1)/2,2*h+(_+1)/2)}class cl{constructor(o){this.zoom=o.zoom,this.overscaling=o.overscaling,this.layers=o.layers,this.layerIds=this.layers.map(h=>h.id),this.index=o.index,this.hasPattern=!1,this.layoutVertexArray=new $,this.indexArray=new $e,this.segments=new pt,this.programConfigurations=new kr(o.layers,o.zoom),this.stateDependentLayerIds=this.layers.filter(h=>h.isStateDependent()).map(h=>h.id)}populate(o,h,p){const _=this.layers[0],x=[];let w=null,I=!1;_.type==="circle"&&(w=_.layout.get("circle-sort-key"),I=!w.isConstant());for(const{feature:P,id:D,index:O,sourceLayerIndex:B}of o){const W=this.layers[0]._featureFilter.needGeometry,X=Xl(P,W);if(!this.layers[0]._featureFilter.filter(new br(this.zoom),X,p))continue;const K=I?w.evaluate(X,{},p):void 0,ie={id:D,properties:P.properties,type:P.type,sourceLayerIndex:B,index:O,geometry:W?X.geometry:Zl(P),patterns:{},sortKey:K};x.push(ie)}I&&x.sort((P,D)=>P.sortKey-D.sortKey);for(const P of x){const{geometry:D,index:O,sourceLayerIndex:B}=P,W=o[O].feature;this.addFeature(P,D,O,p),h.featureIndex.insert(W,D,O,B,this.index)}}update(o,h,p){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(o,h,this.stateDependentLayers,p)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(o){this.uploaded||(this.layoutVertexBuffer=o.createVertexBuffer(this.layoutVertexArray,ct),this.indexBuffer=o.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(o),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(o,h,p,_){for(const x of h)for(const w of x){const I=w.x,P=w.y;if(I<0||I>=Xr||P<0||P>=Xr)continue;const D=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,o.sortKey),O=D.vertexLength;ef(this.layoutVertexArray,I,P,-1,-1),ef(this.layoutVertexArray,I,P,1,-1),ef(this.layoutVertexArray,I,P,1,1),ef(this.layoutVertexArray,I,P,-1,1),this.indexArray.emplaceBack(O,O+1,O+2),this.indexArray.emplaceBack(O,O+3,O+2),D.vertexLength+=4,D.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,o,p,{},_)}}function Kp(u,o){for(let h=0;h1){if(tf(u,o))return!0;for(let p=0;p1?h:h.sub(o)._mult(_)._add(o))}function bb(u,o){let h,p,_,x=!1;for(let w=0;wo.y!=_.y>o.y&&o.x<(_.x-p.x)*(o.y-p.y)/(_.y-p.y)+p.x&&(x=!x)}return x}function nf(u,o){let h=!1;for(let p=0,_=u.length-1;po.y!=w.y>o.y&&o.x<(w.x-x.x)*(o.y-x.y)/(w.y-x.y)+x.x&&(h=!h)}return h}function ZT(u,o,h){const p=h[0],_=h[2];if(u.x_.x&&o.x>_.x||u.y_.y&&o.y>_.y)return!1;const x=Le(u,o,h[0]);return x!==Le(u,o,h[1])||x!==Le(u,o,h[2])||x!==Le(u,o,h[3])}function td(u,o,h){const p=o.paint.get(u).value;return p.kind==="constant"?p.value:h.programConfigurations.get(o.id).getMaxValue(u)}function gg(u){return Math.sqrt(u[0]*u[0]+u[1]*u[1])}function _g(u,o,h,p,_){if(!o[0]&&!o[1])return u;const x=E.convert(o)._mult(_);h==="viewport"&&x._rotate(-p);const w=[];for(let I=0;IEb(de,ie))}(D,P),X=B?O*I:O;for(const K of _)for(const ie of K){const de=B?ie:Eb(ie,P);let we=X;const Oe=yg([],[ie.x,ie.y,0,1],P);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?we*=Oe[3]/w.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(we*=w.cameraToCenterDistance/Oe[3]),mg(W,de,we))return!0}return!1}}function Eb(u,o){const h=yg([],[u.x,u.y,0,1],o);return new E(h[0]/h[3],h[1]/h[3])}class Ib extends cl{}let Cb;Ct("HeatmapBucket",Ib,{omit:["layers"]});var KT={get paint(){return Cb=Cb||new To({"heatmap-radius":new qt(Re.paint_heatmap["heatmap-radius"]),"heatmap-weight":new qt(Re.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new Nt(Re.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Up(Re.paint_heatmap["heatmap-color"]),"heatmap-opacity":new Nt(Re.paint_heatmap["heatmap-opacity"])})}};function Jy(u,{width:o,height:h},p,_){if(_){if(_ instanceof Uint8ClampedArray)_=new Uint8Array(_.buffer);else if(_.length!==o*h*p)throw new RangeError(`mismatched image size. expected: ${_.length} but got: ${o*h*p}`)}else _=new Uint8Array(o*h*p);return u.width=o,u.height=h,u.data=_,u}function Tb(u,{width:o,height:h},p){if(o===u.width&&h===u.height)return;const _=Jy({},{width:o,height:h},p);Qy(u,_,{x:0,y:0},{x:0,y:0},{width:Math.min(u.width,o),height:Math.min(u.height,h)},p),u.width=o,u.height=h,u.data=_.data}function Qy(u,o,h,p,_,x){if(_.width===0||_.height===0)return o;if(_.width>u.width||_.height>u.height||h.x>u.width-_.width||h.y>u.height-_.height)throw new RangeError("out of range source coordinates for image copy");if(_.width>o.width||_.height>o.height||p.x>o.width-_.width||p.y>o.height-_.height)throw new RangeError("out of range destination coordinates for image copy");const w=u.data,I=o.data;if(w===I)throw new Error("srcData equals dstData, so image is already copied");for(let P=0;P<_.height;P++){const D=((h.y+P)*u.width+h.x)*x,O=((p.y+P)*o.width+p.x)*x;for(let B=0;B<_.width*x;B++)I[O+B]=w[D+B]}return o}class rd{constructor(o,h){Jy(this,o,1,h)}resize(o){Tb(this,o,1)}clone(){return new rd({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(o,h,p,_,x){Qy(o,h,p,_,x,1)}}class ks{constructor(o,h){Jy(this,o,4,h)}resize(o){Tb(this,o,4)}replace(o,h){h?this.data.set(o):this.data=o instanceof Uint8ClampedArray?new Uint8Array(o.buffer):o}clone(){return new ks({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(o,h,p,_,x){Qy(o,h,p,_,x,4)}}function Lb(u){const o={},h=u.resolution||256,p=u.clips?u.clips.length:1,_=u.image||new ks({width:h,height:p});if(Math.log(h)/Math.LN2%1!=0)throw new Error(`width is not a power of 2 - ${h}`);const x=(w,I,P)=>{o[u.evaluationKey]=P;const D=u.expression.evaluate(o);_.data[w+I+0]=Math.floor(255*D.r/D.a),_.data[w+I+1]=Math.floor(255*D.g/D.a),_.data[w+I+2]=Math.floor(255*D.b/D.a),_.data[w+I+3]=Math.floor(255*D.a)};if(u.clips)for(let w=0,I=0;w80*h){p=x=u[0],_=w=u[1];for(var K=h;Kx&&(x=I),P>w&&(w=P);D=(D=Math.max(x-p,w-_))!==0?32767/D:0}return id(W,X,h,p,_,D,0),X}function Mb(u,o,h,p,_){var x,w;if(_===r0(u,o,h,p)>0)for(x=o;x=o;x-=p)w=Db(x,u[x],u[x+1],w);return w&&bg(w,w.next)&&(sd(w),w=w.next),w}function Vc(u,o){if(!u)return u;o||(o=u);var h,p=u;do if(h=!1,p.steiner||!bg(p,p.next)&&ti(p.prev,p,p.next)!==0)p=p.next;else{if(sd(p),(p=o=p.prev)===p.next)break;h=!0}while(h||p!==o);return o}function id(u,o,h,p,_,x,w){if(u){!w&&x&&function(O,B,W,X){var K=O;do K.z===0&&(K.z=t0(K.x,K.y,B,W,X)),K.prevZ=K.prev,K.nextZ=K.next,K=K.next;while(K!==O);K.prevZ.nextZ=null,K.prevZ=null,function(ie){var de,we,Oe,Ee,ke,Qe,et,St,kt=1;do{for(we=ie,ie=null,ke=null,Qe=0;we;){for(Qe++,Oe=we,et=0,de=0;de0||St>0&&Oe;)et!==0&&(St===0||!Oe||we.z<=Oe.z)?(Ee=we,we=we.nextZ,et--):(Ee=Oe,Oe=Oe.nextZ,St--),ke?ke.nextZ=Ee:ie=Ee,Ee.prevZ=ke,ke=Ee;we=Oe}ke.nextZ=null,kt*=2}while(Qe>1)}(K)}(u,p,_,x);for(var I,P,D=u;u.prev!==u.next;)if(I=u.prev,P=u.next,x?iL(u,p,_,x):rL(u))o.push(I.i/h|0),o.push(u.i/h|0),o.push(P.i/h|0),sd(u),u=P.next,D=P.next;else if((u=P)===D){w?w===1?id(u=oL(Vc(u),o,h),o,h,p,_,x,2):w===2&&sL(u,o,h,p,_,x):id(Vc(u),o,h,p,_,x,1);break}}}function rL(u){var o=u.prev,h=u,p=u.next;if(ti(o,h,p)>=0)return!1;for(var _=o.x,x=h.x,w=p.x,I=o.y,P=h.y,D=p.y,O=_x?_>w?_:w:x>w?x:w,X=I>P?I>D?I:D:P>D?P:D,K=p.next;K!==o;){if(K.x>=O&&K.x<=W&&K.y>=B&&K.y<=X&&of(_,I,x,P,w,D,K.x,K.y)&&ti(K.prev,K,K.next)>=0)return!1;K=K.next}return!0}function iL(u,o,h,p){var _=u.prev,x=u,w=u.next;if(ti(_,x,w)>=0)return!1;for(var I=_.x,P=x.x,D=w.x,O=_.y,B=x.y,W=w.y,X=IP?I>D?I:D:P>D?P:D,de=O>B?O>W?O:W:B>W?B:W,we=t0(X,K,o,h,p),Oe=t0(ie,de,o,h,p),Ee=u.prevZ,ke=u.nextZ;Ee&&Ee.z>=we&&ke&&ke.z<=Oe;){if(Ee.x>=X&&Ee.x<=ie&&Ee.y>=K&&Ee.y<=de&&Ee!==_&&Ee!==w&&of(I,O,P,B,D,W,Ee.x,Ee.y)&&ti(Ee.prev,Ee,Ee.next)>=0||(Ee=Ee.prevZ,ke.x>=X&&ke.x<=ie&&ke.y>=K&&ke.y<=de&&ke!==_&&ke!==w&&of(I,O,P,B,D,W,ke.x,ke.y)&&ti(ke.prev,ke,ke.next)>=0))return!1;ke=ke.nextZ}for(;Ee&&Ee.z>=we;){if(Ee.x>=X&&Ee.x<=ie&&Ee.y>=K&&Ee.y<=de&&Ee!==_&&Ee!==w&&of(I,O,P,B,D,W,Ee.x,Ee.y)&&ti(Ee.prev,Ee,Ee.next)>=0)return!1;Ee=Ee.prevZ}for(;ke&&ke.z<=Oe;){if(ke.x>=X&&ke.x<=ie&&ke.y>=K&&ke.y<=de&&ke!==_&&ke!==w&&of(I,O,P,B,D,W,ke.x,ke.y)&&ti(ke.prev,ke,ke.next)>=0)return!1;ke=ke.nextZ}return!0}function oL(u,o,h){var p=u;do{var _=p.prev,x=p.next.next;!bg(_,x)&&Ab(_,p,p.next,x)&&od(_,x)&&od(x,_)&&(o.push(_.i/h|0),o.push(p.i/h|0),o.push(x.i/h|0),sd(p),sd(p.next),p=u=x),p=p.next}while(p!==u);return Vc(p)}function sL(u,o,h,p,_,x){var w=u;do{for(var I=w.next.next;I!==w.prev;){if(w.i!==I.i&&hL(w,I)){var P=kb(w,I);return w=Vc(w,w.next),P=Vc(P,P.next),id(w,o,h,p,_,x,0),void id(P,o,h,p,_,x,0)}I=I.next}w=w.next}while(w!==u)}function aL(u,o){return u.x-o.x}function lL(u,o){var h=function(_,x){var w,I=x,P=_.x,D=_.y,O=-1/0;do{if(D<=I.y&&D>=I.next.y&&I.next.y!==I.y){var B=I.x+(D-I.y)*(I.next.x-I.x)/(I.next.y-I.y);if(B<=P&&B>O&&(O=B,w=I.x=I.x&&I.x>=K&&P!==I.x&&of(Dw.x||I.x===w.x&&uL(w,I)))&&(w=I,de=W)),I=I.next;while(I!==X);return w}(u,o);if(!h)return o;var p=kb(h,u);return Vc(p,p.next),Vc(h,h.next)}function uL(u,o){return ti(u.prev,u,o.prev)<0&&ti(o.next,u,u.next)<0}function t0(u,o,h,p,_){return(u=1431655765&((u=858993459&((u=252645135&((u=16711935&((u=(u-h)*_|0)|u<<8))|u<<4))|u<<2))|u<<1))|(o=1431655765&((o=858993459&((o=252645135&((o=16711935&((o=(o-p)*_|0)|o<<8))|o<<4))|o<<2))|o<<1))<<1}function cL(u){var o=u,h=u;do(o.x=(u-w)*(x-I)&&(u-w)*(p-I)>=(h-w)*(o-I)&&(h-w)*(x-I)>=(_-w)*(p-I)}function hL(u,o){return u.next.i!==o.i&&u.prev.i!==o.i&&!function(h,p){var _=h;do{if(_.i!==h.i&&_.next.i!==h.i&&_.i!==p.i&&_.next.i!==p.i&&Ab(_,_.next,h,p))return!0;_=_.next}while(_!==h);return!1}(u,o)&&(od(u,o)&&od(o,u)&&function(h,p){var _=h,x=!1,w=(h.x+p.x)/2,I=(h.y+p.y)/2;do _.y>I!=_.next.y>I&&_.next.y!==_.y&&w<(_.next.x-_.x)*(I-_.y)/(_.next.y-_.y)+_.x&&(x=!x),_=_.next;while(_!==h);return x}(u,o)&&(ti(u.prev,u,o.prev)||ti(u,o.prev,o))||bg(u,o)&&ti(u.prev,u,u.next)>0&&ti(o.prev,o,o.next)>0)}function ti(u,o,h){return(o.y-u.y)*(h.x-o.x)-(o.x-u.x)*(h.y-o.y)}function bg(u,o){return u.x===o.x&&u.y===o.y}function Ab(u,o,h,p){var _=wg(ti(u,o,h)),x=wg(ti(u,o,p)),w=wg(ti(h,p,u)),I=wg(ti(h,p,o));return _!==x&&w!==I||!(_!==0||!xg(u,h,o))||!(x!==0||!xg(u,p,o))||!(w!==0||!xg(h,u,p))||!(I!==0||!xg(h,o,p))}function xg(u,o,h){return o.x<=Math.max(u.x,h.x)&&o.x>=Math.min(u.x,h.x)&&o.y<=Math.max(u.y,h.y)&&o.y>=Math.min(u.y,h.y)}function wg(u){return u>0?1:u<0?-1:0}function od(u,o){return ti(u.prev,u,u.next)<0?ti(u,o,u.next)>=0&&ti(u,u.prev,o)>=0:ti(u,o,u.prev)<0||ti(u,u.next,o)<0}function kb(u,o){var h=new n0(u.i,u.x,u.y),p=new n0(o.i,o.x,o.y),_=u.next,x=o.prev;return u.next=o,o.prev=u,h.next=_,_.prev=h,p.next=h,h.prev=p,x.next=p,p.prev=x,p}function Db(u,o,h,p){var _=new n0(u,o,h);return p?(_.next=p.next,_.prev=p,p.next.prev=_,p.next=_):(_.prev=_,_.next=_),_}function sd(u){u.next.prev=u.prev,u.prev.next=u.next,u.prevZ&&(u.prevZ.nextZ=u.nextZ),u.nextZ&&(u.nextZ.prevZ=u.prevZ)}function n0(u,o,h){this.i=u,this.x=o,this.y=h,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function r0(u,o,h,p){for(var _=0,x=o,w=h-p;x0&&h.holes.push(p+=u[_-1].length)}return h};var Rb=d(e0.exports);function fL(u,o,h,p,_){Nb(u,o,h||0,p||u.length-1,_||pL)}function Nb(u,o,h,p,_){for(;p>h;){if(p-h>600){var x=p-h+1,w=o-h+1,I=Math.log(x),P=.5*Math.exp(2*I/3),D=.5*Math.sqrt(I*P*(x-P)/x)*(w-x/2<0?-1:1);Nb(u,o,Math.max(h,Math.floor(o-w*P/x+D)),Math.min(p,Math.floor(o+(x-w)*P/x+D)),_)}var O=u[o],B=h,W=p;for(ad(u,h,o),_(u[p],O)>0&&ad(u,h,p);B0;)W--}_(u[h],O)===0?ad(u,h,W):ad(u,++W,p),W<=o&&(h=W+1),o<=W&&(p=W-1)}}function ad(u,o,h){var p=u[o];u[o]=u[h],u[h]=p}function pL(u,o){return uo?1:0}function i0(u,o){const h=u.length;if(h<=1)return[u];const p=[];let _,x;for(let w=0;w1)for(let w=0;wh.id),this.index=o.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new he,this.indexArray=new $e,this.indexArray2=new rt,this.programConfigurations=new kr(o.layers,o.zoom),this.segments=new pt,this.segments2=new pt,this.stateDependentLayerIds=this.layers.filter(h=>h.isStateDependent()).map(h=>h.id)}populate(o,h,p){this.hasPattern=o0("fill",this.layers,h);const _=this.layers[0].layout.get("fill-sort-key"),x=!_.isConstant(),w=[];for(const{feature:I,id:P,index:D,sourceLayerIndex:O}of o){const B=this.layers[0]._featureFilter.needGeometry,W=Xl(I,B);if(!this.layers[0]._featureFilter.filter(new br(this.zoom),W,p))continue;const X=x?_.evaluate(W,{},p,h.availableImages):void 0,K={id:P,properties:I.properties,type:I.type,sourceLayerIndex:O,index:D,geometry:B?W.geometry:Zl(I),patterns:{},sortKey:X};w.push(K)}x&&w.sort((I,P)=>I.sortKey-P.sortKey);for(const I of w){const{geometry:P,index:D,sourceLayerIndex:O}=I;if(this.hasPattern){const B=s0("fill",this.layers,I,this.zoom,h);this.patternFeatures.push(B)}else this.addFeature(I,P,D,p,{});h.featureIndex.insert(o[D].feature,P,D,O,this.index)}}update(o,h,p){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(o,h,this.stateDependentLayers,p)}addFeatures(o,h,p){for(const _ of this.patternFeatures)this.addFeature(_,_.geometry,_.index,h,p)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(o){this.uploaded||(this.layoutVertexBuffer=o.createVertexBuffer(this.layoutVertexArray,nL),this.indexBuffer=o.createIndexBuffer(this.indexArray),this.indexBuffer2=o.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(o),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(o,h,p,_,x){for(const w of i0(h,500)){let I=0;for(const X of w)I+=X.length;const P=this.segments.prepareSegment(I,this.layoutVertexArray,this.indexArray),D=P.vertexLength,O=[],B=[];for(const X of w){if(X.length===0)continue;X!==w[0]&&B.push(O.length/2);const K=this.segments2.prepareSegment(X.length,this.layoutVertexArray,this.indexArray2),ie=K.vertexLength;this.layoutVertexArray.emplaceBack(X[0].x,X[0].y),this.indexArray2.emplaceBack(ie+X.length-1,ie),O.push(X[0].x),O.push(X[0].y);for(let de=1;de>3}if(_--,p===1||p===2)x+=u.readSVarint(),w+=u.readSVarint(),p===1&&(o&&I.push(o),o=[]),o.push(new bL(x,w));else{if(p!==7)throw new Error("unknown command "+p);o&&o.push(o[0].clone())}}return o&&I.push(o),I},sf.prototype.bbox=function(){var u=this._pbf;u.pos=this._geometry;for(var o=u.readVarint()+u.pos,h=1,p=0,_=0,x=0,w=1/0,I=-1/0,P=1/0,D=-1/0;u.pos>3}if(p--,h===1||h===2)(_+=u.readSVarint())I&&(I=_),(x+=u.readSVarint())D&&(D=x);else if(h!==7)throw new Error("unknown command "+h)}return[w,P,I,D]},sf.prototype.toGeoJSON=function(u,o,h){var p,_,x=this.extent*Math.pow(2,h),w=this.extent*u,I=this.extent*o,P=this.loadGeometry(),D=sf.types[this.type];function O(X){for(var K=0;K>3;_=w===1?p.readString():w===2?p.readFloat():w===3?p.readDouble():w===4?p.readVarint64():w===5?p.readVarint():w===6?p.readSVarint():w===7?p.readBoolean():null}return _}(h))}Vb.prototype.feature=function(u){if(u<0||u>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[u];var o=this._pbf.readVarint()+this._pbf.pos;return new SL(this._pbf,o,this.extent,this._keys,this._values)};var IL=Bb;function CL(u,o,h){if(u===3){var p=new IL(h,h.readVarint()+h.pos);p.length&&(o[p.name]=p)}}Nu.VectorTile=function(u,o){this.layers=u.readFields(CL,{},o)},Nu.VectorTileFeature=Fb,Nu.VectorTileLayer=Bb;const TL=Nu.VectorTileFeature.types,l0=Math.pow(2,13);function ld(u,o,h,p,_,x,w,I){u.emplaceBack(o,h,2*Math.floor(p*l0)+w,_*l0*2,x*l0*2,Math.round(I))}class u0{constructor(o){this.zoom=o.zoom,this.overscaling=o.overscaling,this.layers=o.layers,this.layerIds=this.layers.map(h=>h.id),this.index=o.index,this.hasPattern=!1,this.layoutVertexArray=new ce,this.centroidVertexArray=new j,this.indexArray=new $e,this.programConfigurations=new kr(o.layers,o.zoom),this.segments=new pt,this.stateDependentLayerIds=this.layers.filter(h=>h.isStateDependent()).map(h=>h.id)}populate(o,h,p){this.features=[],this.hasPattern=o0("fill-extrusion",this.layers,h);for(const{feature:_,id:x,index:w,sourceLayerIndex:I}of o){const P=this.layers[0]._featureFilter.needGeometry,D=Xl(_,P);if(!this.layers[0]._featureFilter.filter(new br(this.zoom),D,p))continue;const O={id:x,sourceLayerIndex:I,index:w,geometry:P?D.geometry:Zl(_),properties:_.properties,type:_.type,patterns:{}};this.hasPattern?this.features.push(s0("fill-extrusion",this.layers,O,this.zoom,h)):this.addFeature(O,O.geometry,w,p,{}),h.featureIndex.insert(_,O.geometry,w,I,this.index,!0)}}addFeatures(o,h,p){for(const _ of this.features){const{geometry:x}=_;this.addFeature(_,x,_.index,h,p)}}update(o,h,p){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(o,h,this.stateDependentLayers,p)}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(o){this.uploaded||(this.layoutVertexBuffer=o.createVertexBuffer(this.layoutVertexArray,vL),this.centroidVertexBuffer=o.createVertexBuffer(this.centroidVertexArray,yL.members,!0),this.indexBuffer=o.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(o),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(o,h,p,_,x){const w={x:0,y:0,vertexCount:0};for(const I of i0(h,500)){let P=0;for(const K of I)P+=K.length;let D=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(const K of I){if(K.length===0||PL(K))continue;let ie=0;for(let de=0;de=1){const Oe=K[de-1];if(!LL(we,Oe)){D.vertexLength+4>pt.MAX_VERTEX_ARRAY_LENGTH&&(D=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));const Ee=we.sub(Oe)._perp()._unit(),ke=Oe.dist(we);ie+ke>32768&&(ie=0),ld(this.layoutVertexArray,we.x,we.y,Ee.x,Ee.y,0,0,ie),ld(this.layoutVertexArray,we.x,we.y,Ee.x,Ee.y,0,1,ie),w.x+=2*we.x,w.y+=2*we.y,w.vertexCount+=2,ie+=ke,ld(this.layoutVertexArray,Oe.x,Oe.y,Ee.x,Ee.y,0,0,ie),ld(this.layoutVertexArray,Oe.x,Oe.y,Ee.x,Ee.y,0,1,ie),w.x+=2*Oe.x,w.y+=2*Oe.y,w.vertexCount+=2;const Qe=D.vertexLength;this.indexArray.emplaceBack(Qe,Qe+2,Qe+1),this.indexArray.emplaceBack(Qe+1,Qe+2,Qe+3),D.vertexLength+=4,D.primitiveLength+=2}}}}if(D.vertexLength+P>pt.MAX_VERTEX_ARRAY_LENGTH&&(D=this.segments.prepareSegment(P,this.layoutVertexArray,this.indexArray)),TL[o.type]!=="Polygon")continue;const O=[],B=[],W=D.vertexLength;for(const K of I)if(K.length!==0){K!==I[0]&&B.push(O.length/2);for(let ie=0;ieXr)||u.y===o.y&&(u.y<0||u.y>Xr)}function PL(u){return u.every(o=>o.x<0)||u.every(o=>o.x>Xr)||u.every(o=>o.y<0)||u.every(o=>o.y>Xr)}let Ub;Ct("FillExtrusionBucket",u0,{omit:["layers","features"]});var ML={get paint(){return Ub=Ub||new To({"fill-extrusion-opacity":new Nt(Re["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new qt(Re["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Nt(Re["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Nt(Re["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Hh(Re["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new qt(Re["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new qt(Re["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Nt(Re["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class AL extends As{constructor(o){super(o,ML)}createBucket(o){return new u0(o)}queryRadius(){return gg(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(o,h,p,_,x,w,I,P){const D=_g(o,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),w.angle,I),O=this.paint.get("fill-extrusion-height").evaluate(h,p),B=this.paint.get("fill-extrusion-base").evaluate(h,p),W=function(K,ie,de,we){const Oe=[];for(const Ee of K){const ke=[Ee.x,Ee.y,0,1];yg(ke,ke,ie),Oe.push(new E(ke[0]/ke[3],ke[1]/ke[3]))}return Oe}(D,P),X=function(K,ie,de,we){const Oe=[],Ee=[],ke=we[8]*ie,Qe=we[9]*ie,et=we[10]*ie,St=we[11]*ie,kt=we[8]*de,wt=we[9]*de,bt=we[10]*de,ht=we[11]*de;for(const Tt of K){const _t=[],it=[];for(const jt of Tt){const Rt=jt.x,Sn=jt.y,gr=we[0]*Rt+we[4]*Sn+we[12],wr=we[1]*Rt+we[5]*Sn+we[13],xi=we[2]*Rt+we[6]*Sn+we[14],ds=we[3]*Rt+we[7]*Sn+we[15],Po=xi+et,mi=ds+St,Bi=gr+kt,Yi=wr+wt,Mo=xi+bt,Ao=ds+ht,wi=new E((gr+ke)/mi,(wr+Qe)/mi);wi.z=Po/mi,_t.push(wi);const Si=new E(Bi/Ao,Yi/Ao);Si.z=Mo/Ao,it.push(Si)}Oe.push(_t),Ee.push(it)}return[Oe,Ee]}(_,B,O,P);return function(K,ie,de){let we=1/0;Jp(de,ie)&&(we=jb(de,ie[0]));for(let Oe=0;Oeh.id),this.index=o.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(h=>{this.gradients[h.id]={}}),this.layoutVertexArray=new ge,this.layoutVertexArray2=new re,this.indexArray=new $e,this.programConfigurations=new kr(o.layers,o.zoom),this.segments=new pt,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(h=>h.isStateDependent()).map(h=>h.id)}populate(o,h,p){this.hasPattern=o0("line",this.layers,h);const _=this.layers[0].layout.get("line-sort-key"),x=!_.isConstant(),w=[];for(const{feature:I,id:P,index:D,sourceLayerIndex:O}of o){const B=this.layers[0]._featureFilter.needGeometry,W=Xl(I,B);if(!this.layers[0]._featureFilter.filter(new br(this.zoom),W,p))continue;const X=x?_.evaluate(W,{},p):void 0,K={id:P,properties:I.properties,type:I.type,sourceLayerIndex:O,index:D,geometry:B?W.geometry:Zl(I),patterns:{},sortKey:X};w.push(K)}x&&w.sort((I,P)=>I.sortKey-P.sortKey);for(const I of w){const{geometry:P,index:D,sourceLayerIndex:O}=I;if(this.hasPattern){const B=s0("line",this.layers,I,this.zoom,h);this.patternFeatures.push(B)}else this.addFeature(I,P,D,p,{});h.featureIndex.insert(o[D].feature,P,D,O,this.index)}}update(o,h,p){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(o,h,this.stateDependentLayers,p)}addFeatures(o,h,p){for(const _ of this.patternFeatures)this.addFeature(_,_.geometry,_.index,h,p)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(o){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=o.createVertexBuffer(this.layoutVertexArray2,NL)),this.layoutVertexBuffer=o.createVertexBuffer(this.layoutVertexArray,DL),this.indexBuffer=o.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(o),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(o){if(o.properties&&Object.prototype.hasOwnProperty.call(o.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(o.properties,"mapbox_clip_end"))return{start:+o.properties.mapbox_clip_start,end:+o.properties.mapbox_clip_end}}addFeature(o,h,p,_,x){const w=this.layers[0].layout,I=w.get("line-join").evaluate(o,{}),P=w.get("line-cap"),D=w.get("line-miter-limit"),O=w.get("line-round-limit");this.lineClips=this.lineFeatureClips(o);for(const B of h)this.addLine(B,o,I,P,D,O);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,o,p,x,_)}addLine(o,h,p,_,x,w){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let we=0;we=2&&o[P-1].equals(o[P-2]);)P--;let D=0;for(;D0;if(St&&we>D){const ht=W.dist(X);if(ht>2*O){const Tt=W.sub(W.sub(X)._mult(O/ht)._round());this.updateDistance(X,Tt),this.addCurrentVertex(Tt,ie,0,0,B),X=Tt}}const wt=X&&K;let bt=wt?p:I?"butt":_;if(wt&&bt==="round"&&(Qex&&(bt="bevel"),bt==="bevel"&&(Qe>2&&(bt="flipbevel"),Qe100)Oe=de.mult(-1);else{const ht=Qe*ie.add(de).mag()/ie.sub(de).mag();Oe._perp()._mult(ht*(kt?-1:1))}this.addCurrentVertex(W,Oe,0,0,B),this.addCurrentVertex(W,Oe.mult(-1),0,0,B)}else if(bt==="bevel"||bt==="fakeround"){const ht=-Math.sqrt(Qe*Qe-1),Tt=kt?ht:0,_t=kt?0:ht;if(X&&this.addCurrentVertex(W,ie,Tt,_t,B),bt==="fakeround"){const it=Math.round(180*et/Math.PI/20);for(let jt=1;jt2*O){const Tt=W.add(K.sub(W)._mult(O/ht)._round());this.updateDistance(W,Tt),this.addCurrentVertex(Tt,de,0,0,B),W=Tt}}}}addCurrentVertex(o,h,p,_,x,w=!1){const I=h.y*_-h.x,P=-h.y-h.x*_;this.addHalfVertex(o,h.x+h.y*p,h.y-h.x*p,w,!1,p,x),this.addHalfVertex(o,I,P,w,!0,-_,x),this.distance>Gb/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(o,h,p,_,x,w))}addHalfVertex({x:o,y:h},p,_,x,w,I,P){const D=.5*(this.lineClips?this.scaledDistance*(Gb-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((o<<1)+(x?1:0),(h<<1)+(w?1:0),Math.round(63*p)+128,Math.round(63*_)+128,1+(I===0?0:I<0?-1:1)|(63&D)<<2,D>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);const O=P.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,O),P.primitiveLength++),w?this.e2=O:this.e1=O}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(o,h){this.distance+=o.dist(h),this.updateScaledDistance()}}let qb,Wb;Ct("LineBucket",c0,{omit:["layers","patternFeatures"]});var Hb={get paint(){return Wb=Wb||new To({"line-opacity":new qt(Re.paint_line["line-opacity"]),"line-color":new qt(Re.paint_line["line-color"]),"line-translate":new Nt(Re.paint_line["line-translate"]),"line-translate-anchor":new Nt(Re.paint_line["line-translate-anchor"]),"line-width":new qt(Re.paint_line["line-width"]),"line-gap-width":new qt(Re.paint_line["line-gap-width"]),"line-offset":new qt(Re.paint_line["line-offset"]),"line-blur":new qt(Re.paint_line["line-blur"]),"line-dasharray":new Dc(Re.paint_line["line-dasharray"]),"line-pattern":new Hh(Re.paint_line["line-pattern"]),"line-gradient":new Up(Re.paint_line["line-gradient"])})},get layout(){return qb=qb||new To({"line-cap":new Nt(Re.layout_line["line-cap"]),"line-join":new qt(Re.layout_line["line-join"]),"line-miter-limit":new Nt(Re.layout_line["line-miter-limit"]),"line-round-limit":new Nt(Re.layout_line["line-round-limit"]),"line-sort-key":new qt(Re.layout_line["line-sort-key"])})}};class FL extends qt{possiblyEvaluate(o,h){return h=new br(Math.floor(h.zoom),{now:h.now,fadeDuration:h.fadeDuration,zoomHistory:h.zoomHistory,transition:h.transition}),super.possiblyEvaluate(o,h)}evaluate(o,h,p,_){return h=fe({},h,{zoom:Math.floor(h.zoom)}),super.evaluate(o,h,p,_)}}let Sg;class BL extends As{constructor(o){super(o,Hb),this.gradientVersion=0,Sg||(Sg=new FL(Hb.paint.properties["line-width"].specification),Sg.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(o){if(o==="line-gradient"){const h=this.gradientExpression();this.stepInterpolant=!!function(p){return p._styleExpression!==void 0}(h)&&h._styleExpression.expression instanceof Ic,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(o,h){super.recalculate(o,h),this.paint._values["line-floorwidth"]=Sg.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,o)}createBucket(o){return new c0(o)}queryRadius(o){const h=o,p=Zb(td("line-width",this,h),td("line-gap-width",this,h)),_=td("line-offset",this,h);return p/2+Math.abs(_)+gg(this.paint.get("line-translate"))}queryIntersectsFeature(o,h,p,_,x,w,I){const P=_g(o,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),w.angle,I),D=I/2*Zb(this.paint.get("line-width").evaluate(h,p),this.paint.get("line-gap-width").evaluate(h,p)),O=this.paint.get("line-offset").evaluate(h,p);return O&&(_=function(B,W){const X=[];for(let K=0;K=3){for(let de=0;de0?o+2*u:u}const VL=ei([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),UL=ei([{name:"a_projected_pos",components:3,type:"Float32"}],4);ei([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);const jL=ei([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}]);ei([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]);const Xb=ei([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),GL=ei([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function qL(u,o,h){return u.sections.forEach(p=>{p.text=function(_,x,w){const I=x.layout.get("text-transform").evaluate(w,{});return I==="uppercase"?_=_.toLocaleUpperCase():I==="lowercase"&&(_=_.toLocaleLowerCase()),al.applyArabicShaping&&(_=al.applyArabicShaping(_)),_}(p.text,o,h)}),u}ei([{name:"triangle",components:3,type:"Uint16"}]),ei([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),ei([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",name:"collisionCircleDiameter"},{type:"Uint16",name:"textAnchorOffsetStartIndex"},{type:"Uint16",name:"textAnchorOffsetEndIndex"}]),ei([{type:"Float32",name:"offsetX"}]),ei([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),ei([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);const cd={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};var bi=24,Yb=tr,$b=function(u,o,h,p,_){var x,w,I=8*_-p-1,P=(1<>1,O=-7,B=h?_-1:0,W=h?-1:1,X=u[o+B];for(B+=W,x=X&(1<<-O)-1,X>>=-O,O+=I;O>0;x=256*x+u[o+B],B+=W,O-=8);for(w=x&(1<<-O)-1,x>>=-O,O+=p;O>0;w=256*w+u[o+B],B+=W,O-=8);if(x===0)x=1-D;else{if(x===P)return w?NaN:1/0*(X?-1:1);w+=Math.pow(2,p),x-=D}return(X?-1:1)*w*Math.pow(2,x-p)},Kb=function(u,o,h,p,_,x){var w,I,P,D=8*x-_-1,O=(1<>1,W=_===23?Math.pow(2,-24)-Math.pow(2,-77):0,X=p?0:x-1,K=p?1:-1,ie=o<0||o===0&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(I=isNaN(o)?1:0,w=O):(w=Math.floor(Math.log(o)/Math.LN2),o*(P=Math.pow(2,-w))<1&&(w--,P*=2),(o+=w+B>=1?W/P:W*Math.pow(2,1-B))*P>=2&&(w++,P/=2),w+B>=O?(I=0,w=O):w+B>=1?(I=(o*P-1)*Math.pow(2,_),w+=B):(I=o*Math.pow(2,B-1)*Math.pow(2,_),w=0));_>=8;u[h+X]=255&I,X+=K,I/=256,_-=8);for(w=w<<_|I,D+=_;D>0;u[h+X]=255&w,X+=K,w/=256,D-=8);u[h+X-K]|=128*ie};function tr(u){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(u)?u:new Uint8Array(u||0),this.pos=0,this.type=0,this.length=this.buf.length}tr.Varint=0,tr.Fixed64=1,tr.Bytes=2,tr.Fixed32=5;var h0=4294967296,Jb=1/h0,Qb=typeof TextDecoder>"u"?null:new TextDecoder("utf8");function Yl(u){return u.type===tr.Bytes?u.readVarint()+u.pos:u.pos+1}function af(u,o,h){return h?4294967296*o+(u>>>0):4294967296*(o>>>0)+(u>>>0)}function ex(u,o,h){var p=o<=16383?1:o<=2097151?2:o<=268435455?3:Math.floor(Math.log(o)/(7*Math.LN2));h.realloc(p);for(var _=h.pos-1;_>=u;_--)h.buf[_+p]=h.buf[_]}function WL(u,o){for(var h=0;h>>8,u[h+2]=o>>>16,u[h+3]=o>>>24}function tx(u,o){return(u[o]|u[o+1]<<8|u[o+2]<<16)+(u[o+3]<<24)}tr.prototype={destroy:function(){this.buf=null},readFields:function(u,o,h){for(h=h||this.length;this.pos>3,x=this.pos;this.type=7&p,u(_,o,this),this.pos===x&&this.skip(p)}return o},readMessage:function(u,o){return this.readFields(u,o,this.readVarint()+this.pos)},readFixed32:function(){var u=Eg(this.buf,this.pos);return this.pos+=4,u},readSFixed32:function(){var u=tx(this.buf,this.pos);return this.pos+=4,u},readFixed64:function(){var u=Eg(this.buf,this.pos)+Eg(this.buf,this.pos+4)*h0;return this.pos+=8,u},readSFixed64:function(){var u=Eg(this.buf,this.pos)+tx(this.buf,this.pos+4)*h0;return this.pos+=8,u},readFloat:function(){var u=$b(this.buf,this.pos,!0,23,4);return this.pos+=4,u},readDouble:function(){var u=$b(this.buf,this.pos,!0,52,8);return this.pos+=8,u},readVarint:function(u){var o,h,p=this.buf;return o=127&(h=p[this.pos++]),h<128?o:(o|=(127&(h=p[this.pos++]))<<7,h<128?o:(o|=(127&(h=p[this.pos++]))<<14,h<128?o:(o|=(127&(h=p[this.pos++]))<<21,h<128?o:function(_,x,w){var I,P,D=w.buf;if(I=(112&(P=D[w.pos++]))>>4,P<128||(I|=(127&(P=D[w.pos++]))<<3,P<128)||(I|=(127&(P=D[w.pos++]))<<10,P<128)||(I|=(127&(P=D[w.pos++]))<<17,P<128)||(I|=(127&(P=D[w.pos++]))<<24,P<128)||(I|=(1&(P=D[w.pos++]))<<31,P<128))return af(_,I,x);throw new Error("Expected varint not more than 10 bytes")}(o|=(15&(h=p[this.pos]))<<28,u,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var u=this.readVarint();return u%2==1?(u+1)/-2:u/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var u=this.readVarint()+this.pos,o=this.pos;return this.pos=u,u-o>=12&&Qb?function(h,p,_){return Qb.decode(h.subarray(p,_))}(this.buf,o,u):function(h,p,_){for(var x="",w=p;w<_;){var I,P,D,O=h[w],B=null,W=O>239?4:O>223?3:O>191?2:1;if(w+W>_)break;W===1?O<128&&(B=O):W===2?(192&(I=h[w+1]))==128&&(B=(31&O)<<6|63&I)<=127&&(B=null):W===3?(P=h[w+2],(192&(I=h[w+1]))==128&&(192&P)==128&&((B=(15&O)<<12|(63&I)<<6|63&P)<=2047||B>=55296&&B<=57343)&&(B=null)):W===4&&(P=h[w+2],D=h[w+3],(192&(I=h[w+1]))==128&&(192&P)==128&&(192&D)==128&&((B=(15&O)<<18|(63&I)<<12|(63&P)<<6|63&D)<=65535||B>=1114112)&&(B=null)),B===null?(B=65533,W=1):B>65535&&(B-=65536,x+=String.fromCharCode(B>>>10&1023|55296),B=56320|1023&B),x+=String.fromCharCode(B),w+=W}return x}(this.buf,o,u)},readBytes:function(){var u=this.readVarint()+this.pos,o=this.buf.subarray(this.pos,u);return this.pos=u,o},readPackedVarint:function(u,o){if(this.type!==tr.Bytes)return u.push(this.readVarint(o));var h=Yl(this);for(u=u||[];this.pos127;);else if(o===tr.Bytes)this.pos=this.readVarint()+this.pos;else if(o===tr.Fixed32)this.pos+=4;else{if(o!==tr.Fixed64)throw new Error("Unimplemented type: "+o);this.pos+=8}},writeTag:function(u,o){this.writeVarint(u<<3|o)},realloc:function(u){for(var o=this.length||16;o268435455||u<0?function(o,h){var p,_;if(o>=0?(p=o%4294967296|0,_=o/4294967296|0):(_=~(-o/4294967296),4294967295^(p=~(-o%4294967296))?p=p+1|0:(p=0,_=_+1|0)),o>=18446744073709552e3||o<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");h.realloc(10),function(x,w,I){I.buf[I.pos++]=127&x|128,x>>>=7,I.buf[I.pos++]=127&x|128,x>>>=7,I.buf[I.pos++]=127&x|128,x>>>=7,I.buf[I.pos++]=127&x|128,I.buf[I.pos]=127&(x>>>=7)}(p,0,h),function(x,w){var I=(7&x)<<4;w.buf[w.pos++]|=I|((x>>>=3)?128:0),x&&(w.buf[w.pos++]=127&x|((x>>>=7)?128:0),x&&(w.buf[w.pos++]=127&x|((x>>>=7)?128:0),x&&(w.buf[w.pos++]=127&x|((x>>>=7)?128:0),x&&(w.buf[w.pos++]=127&x|((x>>>=7)?128:0),x&&(w.buf[w.pos++]=127&x)))))}(_,h)}(u,this):(this.realloc(4),this.buf[this.pos++]=127&u|(u>127?128:0),u<=127||(this.buf[this.pos++]=127&(u>>>=7)|(u>127?128:0),u<=127||(this.buf[this.pos++]=127&(u>>>=7)|(u>127?128:0),u<=127||(this.buf[this.pos++]=u>>>7&127))))},writeSVarint:function(u){this.writeVarint(u<0?2*-u-1:2*u)},writeBoolean:function(u){this.writeVarint(!!u)},writeString:function(u){u=String(u),this.realloc(4*u.length),this.pos++;var o=this.pos;this.pos=function(p,_,x){for(var w,I,P=0;P<_.length;P++){if((w=_.charCodeAt(P))>55295&&w<57344){if(!I){w>56319||P+1===_.length?(p[x++]=239,p[x++]=191,p[x++]=189):I=w;continue}if(w<56320){p[x++]=239,p[x++]=191,p[x++]=189,I=w;continue}w=I-55296<<10|w-56320|65536,I=null}else I&&(p[x++]=239,p[x++]=191,p[x++]=189,I=null);w<128?p[x++]=w:(w<2048?p[x++]=w>>6|192:(w<65536?p[x++]=w>>12|224:(p[x++]=w>>18|240,p[x++]=w>>12&63|128),p[x++]=w>>6&63|128),p[x++]=63&w|128)}return x}(this.buf,u,this.pos);var h=this.pos-o;h>=128&&ex(o,h,this),this.pos=o-1,this.writeVarint(h),this.pos+=h},writeFloat:function(u){this.realloc(4),Kb(this.buf,u,this.pos,!0,23,4),this.pos+=4},writeDouble:function(u){this.realloc(8),Kb(this.buf,u,this.pos,!0,52,8),this.pos+=8},writeBytes:function(u){var o=u.length;this.writeVarint(o),this.realloc(o);for(var h=0;h=128&&ex(h,p,this),this.pos=h-1,this.writeVarint(p),this.pos+=p},writeMessage:function(u,o,h){this.writeTag(u,tr.Bytes),this.writeRawMessage(o,h)},writePackedVarint:function(u,o){o.length&&this.writeMessage(u,WL,o)},writePackedSVarint:function(u,o){o.length&&this.writeMessage(u,HL,o)},writePackedBoolean:function(u,o){o.length&&this.writeMessage(u,YL,o)},writePackedFloat:function(u,o){o.length&&this.writeMessage(u,ZL,o)},writePackedDouble:function(u,o){o.length&&this.writeMessage(u,XL,o)},writePackedFixed32:function(u,o){o.length&&this.writeMessage(u,$L,o)},writePackedSFixed32:function(u,o){o.length&&this.writeMessage(u,KL,o)},writePackedFixed64:function(u,o){o.length&&this.writeMessage(u,JL,o)},writePackedSFixed64:function(u,o){o.length&&this.writeMessage(u,QL,o)},writeBytesField:function(u,o){this.writeTag(u,tr.Bytes),this.writeBytes(o)},writeFixed32Field:function(u,o){this.writeTag(u,tr.Fixed32),this.writeFixed32(o)},writeSFixed32Field:function(u,o){this.writeTag(u,tr.Fixed32),this.writeSFixed32(o)},writeFixed64Field:function(u,o){this.writeTag(u,tr.Fixed64),this.writeFixed64(o)},writeSFixed64Field:function(u,o){this.writeTag(u,tr.Fixed64),this.writeSFixed64(o)},writeVarintField:function(u,o){this.writeTag(u,tr.Varint),this.writeVarint(o)},writeSVarintField:function(u,o){this.writeTag(u,tr.Varint),this.writeSVarint(o)},writeStringField:function(u,o){this.writeTag(u,tr.Bytes),this.writeString(o)},writeFloatField:function(u,o){this.writeTag(u,tr.Fixed32),this.writeFloat(o)},writeDoubleField:function(u,o){this.writeTag(u,tr.Fixed64),this.writeDouble(o)},writeBooleanField:function(u,o){this.writeVarintField(u,!!o)}};var f0=d(Yb);const p0=3;function eP(u,o,h){u===1&&h.readMessage(tP,o)}function tP(u,o,h){if(u===3){const{id:p,bitmap:_,width:x,height:w,left:I,top:P,advance:D}=h.readMessage(nP,{});o.push({id:p,bitmap:new rd({width:x+2*p0,height:w+2*p0},_),metrics:{width:x,height:w,left:I,top:P,advance:D}})}}function nP(u,o,h){u===1?o.id=h.readVarint():u===2?o.bitmap=h.readBytes():u===3?o.width=h.readVarint():u===4?o.height=h.readVarint():u===5?o.left=h.readSVarint():u===6?o.top=h.readSVarint():u===7&&(o.advance=h.readVarint())}const nx=p0;function rx(u){let o=0,h=0;for(const w of u)o+=w.w*w.h,h=Math.max(h,w.w);u.sort((w,I)=>I.h-w.h);const p=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(o/.95)),h),h:1/0}];let _=0,x=0;for(const w of u)for(let I=p.length-1;I>=0;I--){const P=p[I];if(!(w.w>P.w||w.h>P.h)){if(w.x=P.x,w.y=P.y,x=Math.max(x,w.y+w.h),_=Math.max(_,w.x+w.w),w.w===P.w&&w.h===P.h){const D=p.pop();I=0&&p>=o&&Cg[this.text.charCodeAt(p)];p--)h--;this.text=this.text.substring(o,h),this.sectionIndex=this.sectionIndex.slice(o,h)}substring(o,h){const p=new uf;return p.text=this.text.substring(o,h),p.sectionIndex=this.sectionIndex.slice(o,h),p.sections=this.sections,p}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((o,h)=>Math.max(o,this.sections[h].scale),0)}addTextSection(o,h){this.text+=o.text,this.sections.push(fd.forText(o.scale,o.fontStack||h));const p=this.sections.length-1;for(let _=0;_=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function Ig(u,o,h,p,_,x,w,I,P,D,O,B,W,X,K,ie){const de=uf.fromFeature(u,_);let we;B===c.ah.vertical&&de.verticalizePunctuation();const{processBidirectionalText:Oe,processStyledBidirectionalText:Ee}=al;if(Oe&&de.sections.length===1){we=[];const et=Oe(de.toString(),m0(de,D,x,o,p,X,K));for(const St of et){const kt=new uf;kt.text=St,kt.sections=de.sections;for(let wt=0;wt0&&Kl>Yo&&(Yo=Kl)}else{const Rs=kt[Tn.fontStack],Ko=Rs&&Rs[$i];if(Ko&&Ko.rect)Ra=Ko.rect,oa=Ko.metrics;else{const Kl=St[Tn.fontStack],_d=Kl&&Kl[$i];if(!_d)continue;oa=_d.metrics}Ii=(Si-Tn.scale)*bi}sa?(et.verticalizable=!0,po.push({glyph:$i,imageName:Na,x:gr,y:wr+Ii,vertical:sa,scale:Tn.scale,fontStack:Tn.fontStack,sectionIndex:mo,metrics:oa,rect:Ra}),gr+=$l*Tn.scale+jt):(po.push({glyph:$i,imageName:Na,x:gr,y:wr+Ii,vertical:sa,scale:Tn.scale,fontStack:Tn.fontStack,sectionIndex:mo,metrics:oa,rect:Ra}),gr+=oa.advance*Tn.scale+jt)}po.length!==0&&(xi=Math.max(gr-jt,xi),oP(po,0,po.length-1,Po,Yo)),gr=0;const $o=ht*Si+Yo;ko.lineOffset=Math.max(Yo,fo),wr+=$o,ds=Math.max($o,ds),++mi}var Bi;const Yi=wr-hd,{horizontalAlign:Mo,verticalAlign:Ao}=g0(Tt);(function(wi,Si,fo,ko,po,Yo,$o,Ei,Tn){const mo=(Si-fo)*po;let $i=0;$i=Yo!==$o?-Ei*ko-hd:(-ko*Tn+.5)*$o;for(const Ii of wi)for(const oa of Ii.positionedGlyphs)oa.x+=mo,oa.y+=$i})(et.positionedLines,Po,Mo,Ao,xi,ds,ht,Yi,bt.length),et.top+=-Ao*Yi,et.bottom=et.top+Yi,et.left+=-Mo*xi,et.right=et.left+xi}(Qe,o,h,p,we,w,I,P,B,D,W,ie),!function(et){for(const St of et)if(St.positionedGlyphs.length!==0)return!1;return!0}(ke)&&Qe}const Cg={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},rP={10:!0,32:!0,38:!0,40:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0};function ox(u,o,h,p,_,x){if(o.imageName){const w=p[o.imageName];return w?w.displaySize[0]*o.scale*bi/x+_:0}{const w=h[o.fontStack],I=w&&w[u];return I?I.metrics.advance*o.scale+_:0}}function sx(u,o,h,p){const _=Math.pow(u-o,2);return p?u=0;let O=0;for(let W=0;Ww.id),this.index=o.index,this.pixelRatio=o.pixelRatio,this.sourceLayerIndex=o.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=Ky([]),this.placementViewportMatrix=Ky([]);const h=this.layers[0]._unevaluatedLayout._values;this.textSizeData=cx(this.zoom,h["text-size"]),this.iconSizeData=cx(this.zoom,h["icon-size"]);const p=this.layers[0].layout,_=p.get("symbol-sort-key"),x=p.get("symbol-z-order");this.canOverlap=_0(p,"text-overlap","text-allow-overlap")!=="never"||_0(p,"icon-overlap","icon-allow-overlap")!=="never"||p.get("text-ignore-placement")||p.get("icon-ignore-placement"),this.sortFeaturesByKey=x!=="viewport-y"&&!_.isConstant(),this.sortFeaturesByY=(x==="viewport-y"||x==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,p.get("symbol-placement")==="point"&&(this.writingModes=p.get("text-writing-mode").map(w=>c.ah[w])),this.stateDependentLayerIds=this.layers.filter(w=>w.isStateDependent()).map(w=>w.id),this.sourceID=o.sourceID}createArrays(){this.text=new v0(new kr(this.layers,this.zoom,o=>/^text/.test(o))),this.icon=new v0(new kr(this.layers,this.zoom,o=>/^icon/.test(o))),this.glyphOffsetArray=new b,this.lineVertexArray=new T,this.symbolInstances=new g,this.textAnchorOffsets=new k}calculateGlyphDependencies(o,h,p,_,x){for(let w=0;w0)&&(w.value.kind!=="constant"||w.value.value.length>0),O=P.value.kind!=="constant"||!!P.value.value||Object.keys(P.parameters).length>0,B=x.get("symbol-sort-key");if(this.features=[],!D&&!O)return;const W=h.iconDependencies,X=h.glyphDependencies,K=h.availableImages,ie=new br(this.zoom);for(const{feature:de,id:we,index:Oe,sourceLayerIndex:Ee}of o){const ke=_._featureFilter.needGeometry,Qe=Xl(de,ke);if(!_._featureFilter.filter(ie,Qe,p))continue;let et,St;if(ke||(Qe.geometry=Zl(de)),D){const wt=_.getValueAndResolveTokens("text-field",Qe,p,K),bt=Go.factory(wt),ht=this.hasRTLText=this.hasRTLText||uP(bt);(!ht||al.getRTLTextPluginStatus()==="unavailable"||ht&&al.isParsed())&&(et=qL(bt,_,Qe))}if(O){const wt=_.getValueAndResolveTokens("icon-image",Qe,p,K);St=wt instanceof hs?wt:hs.fromString(wt)}if(!et&&!St)continue;const kt=this.sortFeaturesByKey?B.evaluate(Qe,{},p):void 0;if(this.features.push({id:we,text:et,icon:St,index:Oe,sourceLayerIndex:Ee,geometry:Qe.geometry,properties:de.properties,type:aP[de.type],sortKey:kt}),St&&(W[St.name]=!0),et){const wt=w.evaluate(Qe,{},p).join(","),bt=x.get("text-rotation-alignment")!=="viewport"&&x.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(c.ah.vertical)>=0;for(const ht of et.sections)if(ht.image)W[ht.image.name]=!0;else{const Tt=Du(et.toString()),_t=ht.fontStack||wt,it=X[_t]=X[_t]||{};this.calculateGlyphDependencies(ht.text,it,bt,this.allowVerticalPlacement,Tt)}}}x.get("symbol-placement")==="line"&&(this.features=function(de){const we={},Oe={},Ee=[];let ke=0;function Qe(wt){Ee.push(de[wt]),ke++}function et(wt,bt,ht){const Tt=Oe[wt];return delete Oe[wt],Oe[bt]=Tt,Ee[Tt].geometry[0].pop(),Ee[Tt].geometry[0]=Ee[Tt].geometry[0].concat(ht[0]),Tt}function St(wt,bt,ht){const Tt=we[bt];return delete we[bt],we[wt]=Tt,Ee[Tt].geometry[0].shift(),Ee[Tt].geometry[0]=ht[0].concat(Ee[Tt].geometry[0]),Tt}function kt(wt,bt,ht){const Tt=ht?bt[0][bt[0].length-1]:bt[0][0];return`${wt}:${Tt.x}:${Tt.y}`}for(let wt=0;wtwt.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((de,we)=>de.sortKey-we.sortKey)}update(o,h,p){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(o,h,this.layers,p),this.icon.programConfigurations.updatePaintArrays(o,h,this.layers,p))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(o){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(o),this.iconCollisionBox.upload(o)),this.text.upload(o,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(o,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(o,h){const p=this.lineVertexArray.length;if(o.segment!==void 0){let _=o.dist(h[o.segment+1]),x=o.dist(h[o.segment]);const w={};for(let I=o.segment+1;I=0;I--)w[I]={x:h[I].x,y:h[I].y,tileUnitDistanceFromAnchor:x},I>0&&(x+=h[I-1].dist(h[I]));for(let I=0;I0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(o,h){const p=o.placedSymbolArray.get(h),_=p.vertexStartIndex+4*p.numGlyphs;for(let x=p.vertexStartIndex;x<_;x+=4)o.indexArray.emplaceBack(x,x+1,x+2),o.indexArray.emplaceBack(x+1,x+2,x+3)}getSortedSymbolIndexes(o){if(this.sortedAngle===o&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;const h=Math.sin(o),p=Math.cos(o),_=[],x=[],w=[];for(let I=0;I_[I]-_[P]||x[P]-x[I]),w}addToSortKeyRanges(o,h){const p=this.sortKeyRanges[this.sortKeyRanges.length-1];p&&p.sortKey===h?p.symbolInstanceEnd=o+1:this.sortKeyRanges.push({sortKey:h,symbolInstanceStart:o,symbolInstanceEnd:o+1})}sortFeatures(o){if(this.sortFeaturesByY&&this.sortedAngle!==o&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(o),this.sortedAngle=o,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(const h of this.symbolInstanceIndexes){const p=this.symbolInstances.get(h);this.featureSortOrder.push(p.featureIndex),[p.rightJustifiedTextSymbolIndex,p.centerJustifiedTextSymbolIndex,p.leftJustifiedTextSymbolIndex].forEach((_,x,w)=>{_>=0&&w.indexOf(_)===x&&this.addIndicesForPlacedSymbol(this.text,_)}),p.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,p.verticalPlacedTextSymbolIndex),p.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,p.placedIconSymbolIndex),p.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,p.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let hx,fx;Ct("SymbolBucket",cf,{omit:["layers","collisionBoxArray","features","compareText"]}),cf.MAX_GLYPHS=65535,cf.addDynamicAttributes=y0;var x0={get paint(){return fx=fx||new To({"icon-opacity":new qt(Re.paint_symbol["icon-opacity"]),"icon-color":new qt(Re.paint_symbol["icon-color"]),"icon-halo-color":new qt(Re.paint_symbol["icon-halo-color"]),"icon-halo-width":new qt(Re.paint_symbol["icon-halo-width"]),"icon-halo-blur":new qt(Re.paint_symbol["icon-halo-blur"]),"icon-translate":new Nt(Re.paint_symbol["icon-translate"]),"icon-translate-anchor":new Nt(Re.paint_symbol["icon-translate-anchor"]),"text-opacity":new qt(Re.paint_symbol["text-opacity"]),"text-color":new qt(Re.paint_symbol["text-color"],{runtimeType:Zr,getOverride:u=>u.textColor,hasOverride:u=>!!u.textColor}),"text-halo-color":new qt(Re.paint_symbol["text-halo-color"]),"text-halo-width":new qt(Re.paint_symbol["text-halo-width"]),"text-halo-blur":new qt(Re.paint_symbol["text-halo-blur"]),"text-translate":new Nt(Re.paint_symbol["text-translate"]),"text-translate-anchor":new Nt(Re.paint_symbol["text-translate-anchor"])})},get layout(){return hx=hx||new To({"symbol-placement":new Nt(Re.layout_symbol["symbol-placement"]),"symbol-spacing":new Nt(Re.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Nt(Re.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new qt(Re.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Nt(Re.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Nt(Re.layout_symbol["icon-allow-overlap"]),"icon-overlap":new Nt(Re.layout_symbol["icon-overlap"]),"icon-ignore-placement":new Nt(Re.layout_symbol["icon-ignore-placement"]),"icon-optional":new Nt(Re.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Nt(Re.layout_symbol["icon-rotation-alignment"]),"icon-size":new qt(Re.layout_symbol["icon-size"]),"icon-text-fit":new Nt(Re.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Nt(Re.layout_symbol["icon-text-fit-padding"]),"icon-image":new qt(Re.layout_symbol["icon-image"]),"icon-rotate":new qt(Re.layout_symbol["icon-rotate"]),"icon-padding":new qt(Re.layout_symbol["icon-padding"]),"icon-keep-upright":new Nt(Re.layout_symbol["icon-keep-upright"]),"icon-offset":new qt(Re.layout_symbol["icon-offset"]),"icon-anchor":new qt(Re.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Nt(Re.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Nt(Re.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Nt(Re.layout_symbol["text-rotation-alignment"]),"text-field":new qt(Re.layout_symbol["text-field"]),"text-font":new qt(Re.layout_symbol["text-font"]),"text-size":new qt(Re.layout_symbol["text-size"]),"text-max-width":new qt(Re.layout_symbol["text-max-width"]),"text-line-height":new Nt(Re.layout_symbol["text-line-height"]),"text-letter-spacing":new qt(Re.layout_symbol["text-letter-spacing"]),"text-justify":new qt(Re.layout_symbol["text-justify"]),"text-radial-offset":new qt(Re.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Nt(Re.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new qt(Re.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new qt(Re.layout_symbol["text-anchor"]),"text-max-angle":new Nt(Re.layout_symbol["text-max-angle"]),"text-writing-mode":new Nt(Re.layout_symbol["text-writing-mode"]),"text-rotate":new qt(Re.layout_symbol["text-rotate"]),"text-padding":new Nt(Re.layout_symbol["text-padding"]),"text-keep-upright":new Nt(Re.layout_symbol["text-keep-upright"]),"text-transform":new qt(Re.layout_symbol["text-transform"]),"text-offset":new qt(Re.layout_symbol["text-offset"]),"text-allow-overlap":new Nt(Re.layout_symbol["text-allow-overlap"]),"text-overlap":new Nt(Re.layout_symbol["text-overlap"]),"text-ignore-placement":new Nt(Re.layout_symbol["text-ignore-placement"]),"text-optional":new Nt(Re.layout_symbol["text-optional"])})}};class px{constructor(o){if(o.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=o.property.overrides?o.property.overrides.runtimeType:ui,this.defaultValue=o}evaluate(o){if(o.formattedSection){const h=this.defaultValue.property.overrides;if(h&&h.hasOverride(o.formattedSection))return h.getOverride(o.formattedSection)}return o.feature&&o.featureState?this.defaultValue.evaluate(o.feature,o.featureState):this.defaultValue.property.specification.default}eachChild(o){this.defaultValue.isConstant()||o(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}Ct("FormatSectionOverride",px,{omit:["defaultValue"]});class Lg extends As{constructor(o){super(o,x0)}recalculate(o,h){if(super.recalculate(o,h),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout._values["icon-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout._values["text-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")==="map"?"map":"viewport"),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){const p=this.layout.get("text-writing-mode");if(p){const _=[];for(const x of p)_.indexOf(x)<0&&_.push(x);this.layout._values["text-writing-mode"]=_}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(o,h,p,_){const x=this.layout.get(o).evaluate(h,{},p,_),w=this._unevaluatedLayout._values[o];return w.isDataDriven()||lr(w.value)||!x?x:function(I,P){return P.replace(/{([^{}]+)}/g,(D,O)=>I&&O in I?String(I[O]):"")}(h.properties,x)}createBucket(o){return new cf(o)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(const o of x0.paint.overridableProperties){if(!Lg.hasPaintOverride(this.layout,o))continue;const h=this.paint.get(o),p=new px(h),_=new mr(p,h.property.specification);let x=null;x=h.value.kind==="constant"||h.value.kind==="source"?new kh("source",_):new Mp("composite",_,h.value.zoomStops),this.paint._values[o]=new Ms(h.property,x,h.parameters)}}_handleOverridablePaintPropertyUpdate(o,h,p){return!(!this.layout||h.isDataDriven()||p.isDataDriven())&&Lg.hasPaintOverride(this.layout,o)}static hasPaintOverride(o,h){const p=o.get("text-field"),_=x0.paint.properties[h];let x=!1;const w=I=>{for(const P of I)if(_.overrides&&_.overrides.hasOverride(P))return void(x=!0)};if(p.value.kind==="constant"&&p.value.value instanceof Go)w(p.value.value.sections);else if(p.value.kind==="source"){const I=D=>{x||(D instanceof nl&&hi(D.value)===Jr?w(D.value.sections):D instanceof Mh?w(D.sections):D.eachChild(I))},P=p.value;P._styleExpression&&I(P._styleExpression.expression)}return x}}let dx;var cP={get paint(){return dx=dx||new To({"background-color":new Nt(Re.paint_background["background-color"]),"background-pattern":new Dc(Re.paint_background["background-pattern"]),"background-opacity":new Nt(Re.paint_background["background-opacity"])})}};class hP extends As{constructor(o){super(o,cP)}}let mx;var fP={get paint(){return mx=mx||new To({"raster-opacity":new Nt(Re.paint_raster["raster-opacity"]),"raster-hue-rotate":new Nt(Re.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new Nt(Re.paint_raster["raster-brightness-min"]),"raster-brightness-max":new Nt(Re.paint_raster["raster-brightness-max"]),"raster-saturation":new Nt(Re.paint_raster["raster-saturation"]),"raster-contrast":new Nt(Re.paint_raster["raster-contrast"]),"raster-resampling":new Nt(Re.paint_raster["raster-resampling"]),"raster-fade-duration":new Nt(Re.paint_raster["raster-fade-duration"])})}};class pP extends As{constructor(o){super(o,fP)}}class dP extends As{constructor(o){super(o,{}),this.onAdd=h=>{this.implementation.onAdd&&this.implementation.onAdd(h,h.painter.context.gl)},this.onRemove=h=>{this.implementation.onRemove&&this.implementation.onRemove(h,h.painter.context.gl)},this.implementation=o}is3D(){return this.implementation.renderingMode==="3d"}hasOffscreenPass(){return this.implementation.prerender!==void 0}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw new Error("Custom layers cannot be serialized")}}class mP{constructor(o){this._methodToThrottle=o,this._triggered=!1,typeof MessageChannel<"u"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(()=>{this._triggered=!1,this._methodToThrottle()},0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}const w0=63710088e-1;class Fu{constructor(o,h){if(isNaN(o)||isNaN(h))throw new Error(`Invalid LngLat object: (${o}, ${h})`);if(this.lng=+o,this.lat=+h,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new Fu(ee(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(o){const h=Math.PI/180,p=this.lat*h,_=o.lat*h,x=Math.sin(p)*Math.sin(_)+Math.cos(p)*Math.cos(_)*Math.cos((o.lng-this.lng)*h);return w0*Math.acos(Math.min(x,1))}static convert(o){if(o instanceof Fu)return o;if(Array.isArray(o)&&(o.length===2||o.length===3))return new Fu(Number(o[0]),Number(o[1]));if(!Array.isArray(o)&&typeof o=="object"&&o!==null)return new Fu(Number("lng"in o?o.lng:o.lon),Number(o.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")}}const gx=2*Math.PI*w0;function _x(u){return gx*Math.cos(u*Math.PI/180)}function yx(u){return(180+u)/360}function vx(u){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+u*Math.PI/360)))/360}function bx(u,o){return u/_x(o)}function S0(u){return 360/Math.PI*Math.atan(Math.exp((180-360*u)*Math.PI/180))-90}class Pg{constructor(o,h,p=0){this.x=+o,this.y=+h,this.z=+p}static fromLngLat(o,h=0){const p=Fu.convert(o);return new Pg(yx(p.lng),vx(p.lat),bx(h,p.lat))}toLngLat(){return new Fu(360*this.x-180,S0(this.y))}toAltitude(){return this.z*_x(S0(this.y))}meterInMercatorCoordinateUnits(){return 1/gx*(o=S0(this.y),1/Math.cos(o*Math.PI/180));var o}}function xx(u,o,h){var p=2*Math.PI*6378137/256/Math.pow(2,h);return[u*p-2*Math.PI*6378137/2,o*p-2*Math.PI*6378137/2]}class E0{constructor(o,h,p){if(o<0||o>25||p<0||p>=Math.pow(2,o)||h<0||h>=Math.pow(2,o))throw new Error(`x=${h}, y=${p}, z=${o} outside of bounds. 0<=x<${Math.pow(2,o)}, 0<=y<${Math.pow(2,o)} 0<=z<=25 `);this.z=o,this.x=h,this.y=p,this.key=dd(0,o,o,h,p)}equals(o){return this.z===o.z&&this.x===o.x&&this.y===o.y}url(o,h,p){const _=(w=this.y,I=this.z,P=xx(256*(x=this.x),256*(w=Math.pow(2,I)-w-1),I),D=xx(256*(x+1),256*(w+1),I),P[0]+","+P[1]+","+D[0]+","+D[1]);var x,w,I,P,D;const O=function(B,W,X){let K,ie="";for(let de=B;de>0;de--)K=1<1?"@2x":"").replace(/{quadkey}/g,O).replace(/{bbox-epsg-3857}/g,_)}isChildOf(o){const h=this.z-o.z;return h>0&&o.x===this.x>>h&&o.y===this.y>>h}getTilePoint(o){const h=Math.pow(2,this.z);return new E((o.x*h-this.x)*Xr,(o.y*h-this.y)*Xr)}toString(){return`${this.z}/${this.x}/${this.y}`}}class wx{constructor(o,h){this.wrap=o,this.canonical=h,this.key=dd(o,h.z,h.z,h.x,h.y)}}class Ds{constructor(o,h,p,_,x){if(o= z; overscaledZ = ${o}; z = ${p}`);this.overscaledZ=o,this.wrap=h,this.canonical=new E0(p,+_,+x),this.key=dd(h,o,p,_,x)}clone(){return new Ds(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(o){return this.overscaledZ===o.overscaledZ&&this.wrap===o.wrap&&this.canonical.equals(o.canonical)}scaledTo(o){if(o>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${o}; overscaledZ = ${this.overscaledZ}`);const h=this.canonical.z-o;return o>this.canonical.z?new Ds(o,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Ds(o,this.wrap,o,this.canonical.x>>h,this.canonical.y>>h)}calculateScaledKey(o,h){if(o>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${o}; overscaledZ = ${this.overscaledZ}`);const p=this.canonical.z-o;return o>this.canonical.z?dd(this.wrap*+h,o,this.canonical.z,this.canonical.x,this.canonical.y):dd(this.wrap*+h,o,o,this.canonical.x>>p,this.canonical.y>>p)}isChildOf(o){if(o.wrap!==this.wrap)return!1;const h=this.canonical.z-o.canonical.z;return o.overscaledZ===0||o.overscaledZ>h&&o.canonical.y===this.canonical.y>>h}children(o){if(this.overscaledZ>=o)return[new Ds(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];const h=this.canonical.z+1,p=2*this.canonical.x,_=2*this.canonical.y;return[new Ds(h,this.wrap,h,p,_),new Ds(h,this.wrap,h,p+1,_),new Ds(h,this.wrap,h,p,_+1),new Ds(h,this.wrap,h,p+1,_+1)]}isLessThan(o){return this.wrapo.wrap)&&(this.overscaledZo.overscaledZ)&&(this.canonical.xo.canonical.x)&&this.canonical.ythis.max&&(this.max=B),B=this.dim+1||h<-1||h>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(h+1)*this.stride+(o+1)}unpack(o,h,p){return o*this.redFactor+h*this.greenFactor+p*this.blueFactor-this.baseShift}getPixels(){return new ks({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(o,h,p){if(this.dim!==o.dim)throw new Error("dem dimension mismatch");let _=h*this.dim,x=h*this.dim+this.dim,w=p*this.dim,I=p*this.dim+this.dim;switch(h){case-1:_=x-1;break;case 1:x=_+1}switch(p){case-1:w=I-1;break;case 1:I=w+1}const P=-h*this.dim,D=-p*this.dim;for(let O=w;O=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${o} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[o]}}class Ix{constructor(o,h,p,_,x){this.type="Feature",this._vectorTileFeature=o,o._z=h,o._x=p,o._y=_,this.properties=o.properties,this.id=x}get geometry(){return this._geometry===void 0&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry}set geometry(o){this._geometry=o}toJSON(){const o={geometry:this.geometry};for(const h in this)h!=="_geometry"&&h!=="_vectorTileFeature"&&(o[h]=this[h]);return o}}class Cx{constructor(o,h){this.tileID=o,this.x=o.canonical.x,this.y=o.canonical.y,this.z=o.canonical.z,this.grid=new Mc(Xr,16,0),this.grid3D=new Mc(Xr,16,0),this.featureIndexArray=new V,this.promoteId=h}insert(o,h,p,_,x,w){const I=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(p,_,x);const P=w?this.grid3D:this.grid;for(let D=0;D=0&&B[3]>=0&&P.insert(I,B[0],B[1],B[2],B[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new Nu.VectorTile(new f0(this.rawTileData)).layers,this.sourceLayerCoder=new Ex(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(o,h,p,_){this.loadVTLayers();const x=o.params||{},w=Xr/o.tileSize/o.scale,I=Oh(x.filter),P=o.queryGeometry,D=o.queryPadding*w,O=Lx(P),B=this.grid.query(O.minX-D,O.minY-D,O.maxX+D,O.maxY+D),W=Lx(o.cameraQueryGeometry),X=this.grid3D.query(W.minX-D,W.minY-D,W.maxX+D,W.maxY+D,(de,we,Oe,Ee)=>function(ke,Qe,et,St,kt){for(const bt of ke)if(Qe<=bt.x&&et<=bt.y&&St>=bt.x&&kt>=bt.y)return!0;const wt=[new E(Qe,et),new E(Qe,kt),new E(St,kt),new E(St,et)];if(ke.length>2){for(const bt of wt)if(nf(ke,bt))return!0}for(let bt=0;bt(Ee||(Ee=Zl(ke)),Qe.queryIntersectsFeature(P,ke,et,Ee,this.z,o.transform,w,o.pixelPosMatrix)))}return K}loadMatchingFeature(o,h,p,_,x,w,I,P,D,O,B){const W=this.bucketLayerIDs[h];if(w&&!function(de,we){for(let Oe=0;Oe=0)return!0;return!1}(w,W))return;const X=this.sourceLayerCoder.decode(p),K=this.vtLayers[X].feature(_);if(x.needGeometry){const de=Xl(K,!0);if(!x.filter(new br(this.tileID.overscaledZ),de,this.tileID.canonical))return}else if(!x.filter(new br(this.tileID.overscaledZ),K))return;const ie=this.getId(K,X);for(let de=0;de{const I=o instanceof kc?o.get(w):null;return I&&I.evaluate?I.evaluate(h,p,_):I})}function Lx(u){let o=1/0,h=1/0,p=-1/0,_=-1/0;for(const x of u)o=Math.min(o,x.x),h=Math.min(h,x.y),p=Math.max(p,x.x),_=Math.max(_,x.y);return{minX:o,minY:h,maxX:p,maxY:_}}function gP(u,o){return o-u}function Px(u,o,h,p,_){const x=[];for(let w=0;w=p&&B.x>=p||(O.x>=p?O=new E(p,O.y+(p-O.x)/(B.x-O.x)*(B.y-O.y))._round():B.x>=p&&(B=new E(p,O.y+(p-O.x)/(B.x-O.x)*(B.y-O.y))._round()),O.y>=_&&B.y>=_||(O.y>=_?O=new E(O.x+(_-O.y)/(B.y-O.y)*(B.x-O.x),_)._round():B.y>=_&&(B=new E(O.x+(_-O.y)/(B.y-O.y)*(B.x-O.x),_)._round()),P&&O.equals(P[P.length-1])||(P=[O],x.push(P)),P.push(B)))))}}return x}Ct("FeatureIndex",Cx,{omit:["rawTileData","sourceLayerCoder"]});class Bu extends E{constructor(o,h,p,_){super(o,h),this.angle=p,_!==void 0&&(this.segment=_)}clone(){return new Bu(this.x,this.y,this.angle,this.segment)}}function Mx(u,o,h,p,_){if(o.segment===void 0||h===0)return!0;let x=o,w=o.segment+1,I=0;for(;I>-h/2;){if(w--,w<0)return!1;I-=u[w].dist(x),x=u[w]}I+=u[w].dist(u[w+1]),w++;const P=[];let D=0;for(;Ip;)D-=P.shift().angleDelta;if(D>_)return!1;w++,I+=O.dist(B)}return!0}function Ax(u){let o=0;for(let h=0;hD){const K=(D-P)/X,ie=co.number(B.x,W.x,K),de=co.number(B.y,W.y,K),we=new Bu(ie,de,W.angleTo(B),O);return we._round(),!w||Mx(u,we,I,w,o)?we:void 0}P+=X}}function yP(u,o,h,p,_,x,w,I,P){const D=kx(p,x,w),O=Dx(p,_),B=O*w,W=u[0].x===0||u[0].x===P||u[0].y===0||u[0].y===P;return o-B=0&&ke=0&&Qe=0&&W+D<=O){const et=new Bu(ke,Qe,Oe,K);et._round(),p&&!Mx(u,et,x,p,_)||X.push(et)}}B+=we}return I||X.length||w||(X=Rx(u,B/2,h,p,_,x,w,!0,P)),X}Ct("Anchor",Bu);const hf=Xo;function Nx(u,o,h,p){const _=[],x=u.image,w=x.pixelRatio,I=x.paddedRect.w-2*hf,P=x.paddedRect.h-2*hf,D=u.right-u.left,O=u.bottom-u.top,B=x.stretchX||[[0,I]],W=x.stretchY||[[0,P]],X=(ht,Tt)=>ht+Tt[1]-Tt[0],K=B.reduce(X,0),ie=W.reduce(X,0),de=I-K,we=P-ie;let Oe=0,Ee=K,ke=0,Qe=ie,et=0,St=de,kt=0,wt=we;if(x.content&&p){const ht=x.content;Oe=Mg(B,0,ht[0]),ke=Mg(W,0,ht[1]),Ee=Mg(B,ht[0],ht[2]),Qe=Mg(W,ht[1],ht[3]),et=ht[0]-Oe,kt=ht[1]-ke,St=ht[2]-ht[0]-Ee,wt=ht[3]-ht[1]-Qe}const bt=(ht,Tt,_t,it)=>{const jt=Ag(ht.stretch-Oe,Ee,D,u.left),Rt=kg(ht.fixed-et,St,ht.stretch,K),Sn=Ag(Tt.stretch-ke,Qe,O,u.top),gr=kg(Tt.fixed-kt,wt,Tt.stretch,ie),wr=Ag(_t.stretch-Oe,Ee,D,u.left),xi=kg(_t.fixed-et,St,_t.stretch,K),ds=Ag(it.stretch-ke,Qe,O,u.top),Po=kg(it.fixed-kt,wt,it.stretch,ie),mi=new E(jt,Sn),Bi=new E(wr,Sn),Yi=new E(wr,ds),Mo=new E(jt,ds),Ao=new E(Rt/w,gr/w),wi=new E(xi/w,Po/w),Si=o*Math.PI/180;if(Si){const po=Math.sin(Si),Yo=Math.cos(Si),$o=[Yo,-po,po,Yo];mi._matMult($o),Bi._matMult($o),Mo._matMult($o),Yi._matMult($o)}const fo=ht.stretch+ht.fixed,ko=Tt.stretch+Tt.fixed;return{tl:mi,tr:Bi,bl:Mo,br:Yi,tex:{x:x.paddedRect.x+hf+fo,y:x.paddedRect.y+hf+ko,w:_t.stretch+_t.fixed-fo,h:it.stretch+it.fixed-ko},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:Ao,pixelOffsetBR:wi,minFontScaleX:St/w/D,minFontScaleY:wt/w/O,isSDF:h}};if(p&&(x.stretchX||x.stretchY)){const ht=Ox(B,de,K),Tt=Ox(W,we,ie);for(let _t=0;_t0&&(K=Math.max(10,K),this.circleDiameter=K)}else{let B=w.top*I-P[0],W=w.bottom*I+P[2],X=w.left*I-P[3],K=w.right*I+P[1];const ie=w.collisionPadding;if(ie&&(X-=ie[0]*I,B-=ie[1]*I,K+=ie[2]*I,W+=ie[3]*I),O){const de=new E(X,B),we=new E(K,B),Oe=new E(X,W),Ee=new E(K,W),ke=O*Math.PI/180;de._rotate(ke),we._rotate(ke),Oe._rotate(ke),Ee._rotate(ke),X=Math.min(de.x,we.x,Oe.x,Ee.x),K=Math.max(de.x,we.x,Oe.x,Ee.x),B=Math.min(de.y,we.y,Oe.y,Ee.y),W=Math.max(de.y,we.y,Oe.y,Ee.y)}o.emplaceBack(h.x,h.y,X,B,K,W,p,_,x)}this.boxEndIndex=o.length}}class vP{constructor(o=[],h=bP){if(this.data=o,this.length=this.data.length,this.compare=h,this.length>0)for(let p=(this.length>>1)-1;p>=0;p--)this._down(p)}push(o){this.data.push(o),this.length++,this._up(this.length-1)}pop(){if(this.length===0)return;const o=this.data[0],h=this.data.pop();return this.length--,this.length>0&&(this.data[0]=h,this._down(0)),o}peek(){return this.data[0]}_up(o){const{data:h,compare:p}=this,_=h[o];for(;o>0;){const x=o-1>>1,w=h[x];if(p(_,w)>=0)break;h[o]=w,o=x}h[o]=_}_down(o){const{data:h,compare:p}=this,_=this.length>>1,x=h[o];for(;o<_;){let w=1+(o<<1),I=h[w];const P=w+1;if(P=0)break;h[o]=I,o=w}h[o]=x}}function bP(u,o){return uo?1:0}function xP(u,o=1,h=!1){let p=1/0,_=1/0,x=-1/0,w=-1/0;const I=u[0];for(let X=0;Xx)&&(x=K.x),(!X||K.y>w)&&(w=K.y)}const P=Math.min(x-p,w-_);let D=P/2;const O=new vP([],wP);if(P===0)return new E(p,_);for(let X=p;XB.d||!B.d)&&(B=X,h&&console.log("found best %d after %d probes",Math.round(1e4*X.d)/1e4,W)),X.max-B.d<=o||(D=X.h/2,O.push(new ff(X.p.x-D,X.p.y-D,D,u)),O.push(new ff(X.p.x+D,X.p.y-D,D,u)),O.push(new ff(X.p.x-D,X.p.y+D,D,u)),O.push(new ff(X.p.x+D,X.p.y+D,D,u)),W+=4)}return h&&(console.log(`num probes: ${W}`),console.log(`best distance: ${B.d}`)),B.p}function wP(u,o){return o.max-u.max}function ff(u,o,h,p){this.p=new E(u,o),this.h=h,this.d=function(_,x){let w=!1,I=1/0;for(let P=0;P_.y!=K.y>_.y&&_.x<(K.x-X.x)*(_.y-X.y)/(K.y-X.y)+X.x&&(w=!w),I=Math.min(I,vb(_,X,K))}}return(w?1:-1)*Math.sqrt(I)}(this.p,p),this.max=this.d+this.h*Math.SQRT2}var Xi;c.ap=void 0,(Xi=c.ap||(c.ap={}))[Xi.center=1]="center",Xi[Xi.left=2]="left",Xi[Xi.right=3]="right",Xi[Xi.top=4]="top",Xi[Xi.bottom=5]="bottom",Xi[Xi["top-left"]=6]="top-left",Xi[Xi["top-right"]=7]="top-right",Xi[Xi["bottom-left"]=8]="bottom-left",Xi[Xi["bottom-right"]=9]="bottom-right";const Vu=7,I0=Number.POSITIVE_INFINITY;function zx(u,o){return o[1]!==I0?function(h,p,_){let x=0,w=0;switch(p=Math.abs(p),_=Math.abs(_),h){case"top-right":case"top-left":case"top":w=_-Vu;break;case"bottom-right":case"bottom-left":case"bottom":w=-_+Vu}switch(h){case"top-right":case"bottom-right":case"right":x=-p;break;case"top-left":case"bottom-left":case"left":x=p}return[x,w]}(u,o[0],o[1]):function(h,p){let _=0,x=0;p<0&&(p=0);const w=p/Math.SQRT2;switch(h){case"top-right":case"top-left":x=w-Vu;break;case"bottom-right":case"bottom-left":x=-w+Vu;break;case"bottom":x=-p+Vu;break;case"top":x=p-Vu}switch(h){case"top-right":case"bottom-right":_=-w;break;case"top-left":case"bottom-left":_=w;break;case"left":_=p;break;case"right":_=-p}return[_,x]}(u,o[0])}function Fx(u,o,h){var p;const _=u.layout,x=(p=_.get("text-variable-anchor-offset"))===null||p===void 0?void 0:p.evaluate(o,{},h);if(x){const I=x.values,P=[];for(let D=0;DW*bi);O.startsWith("top")?B[1]-=Vu:O.startsWith("bottom")&&(B[1]+=Vu),P[D+1]=B}return new cs(P)}const w=_.get("text-variable-anchor");if(w){let I;I=u._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[_.get("text-radial-offset").evaluate(o,{},h)*bi,I0]:_.get("text-offset").evaluate(o,{},h).map(D=>D*bi);const P=[];for(const D of w)P.push(D,zx(D,I));return new cs(P)}return null}function C0(u){switch(u){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function SP(u,o,h,p,_,x,w,I,P,D,O){let B=x.textMaxSize.evaluate(o,{});B===void 0&&(B=w);const W=u.layers[0].layout,X=W.get("icon-offset").evaluate(o,{},O),K=Vx(h.horizontal),ie=w/24,de=u.tilePixelRatio*ie,we=u.tilePixelRatio*B/24,Oe=u.tilePixelRatio*I,Ee=u.tilePixelRatio*W.get("symbol-spacing"),ke=W.get("text-padding")*u.tilePixelRatio,Qe=function(it,jt,Rt,Sn=1){const gr=it.get("icon-padding").evaluate(jt,{},Rt),wr=gr&&gr.values;return[wr[0]*Sn,wr[1]*Sn,wr[2]*Sn,wr[3]*Sn]}(W,o,O,u.tilePixelRatio),et=W.get("text-max-angle")/180*Math.PI,St=W.get("text-rotation-alignment")!=="viewport"&&W.get("symbol-placement")!=="point",kt=W.get("icon-rotation-alignment")==="map"&&W.get("symbol-placement")!=="point",wt=W.get("symbol-placement"),bt=Ee/2,ht=W.get("icon-text-fit");let Tt;p&&ht!=="none"&&(u.allowVerticalPlacement&&h.vertical&&(Tt=ux(p,h.vertical,ht,W.get("icon-text-fit-padding"),X,ie)),K&&(p=ux(p,K,ht,W.get("icon-text-fit-padding"),X,ie)));const _t=(it,jt)=>{jt.x<0||jt.x>=Xr||jt.y<0||jt.y>=Xr||function(Rt,Sn,gr,wr,xi,ds,Po,mi,Bi,Yi,Mo,Ao,wi,Si,fo,ko,po,Yo,$o,Ei,Tn,mo,$i,Ii,oa){const Ra=Rt.addToLineVertexArray(Sn,gr);let Na,$l,sa,Rs,Ko=0,Kl=0,_d=0,qx=0,R0=-1,N0=-1;const Jl={};let Wx=Ur("");if(Rt.allowVerticalPlacement&&wr.vertical){const go=mi.layout.get("text-rotate").evaluate(Tn,{},Ii)+90;sa=new Dg(Bi,Sn,Yi,Mo,Ao,wr.vertical,wi,Si,fo,go),Po&&(Rs=new Dg(Bi,Sn,Yi,Mo,Ao,Po,po,Yo,fo,go))}if(xi){const go=mi.layout.get("icon-rotate").evaluate(Tn,{}),Ns=mi.layout.get("icon-text-fit")!=="none",Uc=Nx(xi,go,$i,Ns),za=Po?Nx(Po,go,$i,Ns):void 0;$l=new Dg(Bi,Sn,Yi,Mo,Ao,xi,po,Yo,!1,go),Ko=4*Uc.length;const jc=Rt.iconSizeData;let fl=null;jc.kind==="source"?(fl=[hl*mi.layout.get("icon-size").evaluate(Tn,{})],fl[0]>zu&&Ke(`${Rt.layerIds[0]}: Value for "icon-size" is >= ${pd}. Reduce your "icon-size".`)):jc.kind==="composite"&&(fl=[hl*mo.compositeIconSizes[0].evaluate(Tn,{},Ii),hl*mo.compositeIconSizes[1].evaluate(Tn,{},Ii)],(fl[0]>zu||fl[1]>zu)&&Ke(`${Rt.layerIds[0]}: Value for "icon-size" is >= ${pd}. Reduce your "icon-size".`)),Rt.addSymbols(Rt.icon,Uc,fl,Ei,$o,Tn,c.ah.none,Sn,Ra.lineStartIndex,Ra.lineLength,-1,Ii),R0=Rt.icon.placedSymbolArray.length-1,za&&(Kl=4*za.length,Rt.addSymbols(Rt.icon,za,fl,Ei,$o,Tn,c.ah.vertical,Sn,Ra.lineStartIndex,Ra.lineLength,-1,Ii),N0=Rt.icon.placedSymbolArray.length-1)}const Hx=Object.keys(wr.horizontal);for(const go of Hx){const Ns=wr.horizontal[go];if(!Na){Wx=Ur(Ns.text);const za=mi.layout.get("text-rotate").evaluate(Tn,{},Ii);Na=new Dg(Bi,Sn,Yi,Mo,Ao,Ns,wi,Si,fo,za)}const Uc=Ns.positionedLines.length===1;if(_d+=Bx(Rt,Sn,Ns,ds,mi,fo,Tn,ko,Ra,wr.vertical?c.ah.horizontal:c.ah.horizontalOnly,Uc?Hx:[go],Jl,R0,mo,Ii),Uc)break}wr.vertical&&(qx+=Bx(Rt,Sn,wr.vertical,ds,mi,fo,Tn,ko,Ra,c.ah.vertical,["vertical"],Jl,N0,mo,Ii));const CP=Na?Na.boxStartIndex:Rt.collisionBoxArray.length,TP=Na?Na.boxEndIndex:Rt.collisionBoxArray.length,LP=sa?sa.boxStartIndex:Rt.collisionBoxArray.length,PP=sa?sa.boxEndIndex:Rt.collisionBoxArray.length,MP=$l?$l.boxStartIndex:Rt.collisionBoxArray.length,AP=$l?$l.boxEndIndex:Rt.collisionBoxArray.length,kP=Rs?Rs.boxStartIndex:Rt.collisionBoxArray.length,DP=Rs?Rs.boxEndIndex:Rt.collisionBoxArray.length;let Oa=-1;const Ng=(go,Ns)=>go&&go.circleDiameter?Math.max(go.circleDiameter,Ns):Ns;Oa=Ng(Na,Oa),Oa=Ng(sa,Oa),Oa=Ng($l,Oa),Oa=Ng(Rs,Oa);const Zx=Oa>-1?1:0;Zx&&(Oa*=oa/bi),Rt.glyphOffsetArray.length>=cf.MAX_GLYPHS&&Ke("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),Tn.sortKey!==void 0&&Rt.addToSortKeyRanges(Rt.symbolInstances.length,Tn.sortKey);const RP=Fx(mi,Tn,Ii),[NP,OP]=function(go,Ns){const Uc=go.length,za=Ns==null?void 0:Ns.values;if((za==null?void 0:za.length)>0)for(let jc=0;jc=0?Jl.right:-1,Jl.center>=0?Jl.center:-1,Jl.left>=0?Jl.left:-1,Jl.vertical||-1,R0,N0,Wx,CP,TP,LP,PP,MP,AP,kP,DP,Yi,_d,qx,Ko,Kl,Zx,0,wi,Oa,NP,OP)}(u,jt,it,h,p,_,Tt,u.layers[0],u.collisionBoxArray,o.index,o.sourceLayerIndex,u.index,de,[ke,ke,ke,ke],St,P,Oe,Qe,kt,X,o,x,D,O,w)};if(wt==="line")for(const it of Px(o.geometry,0,0,Xr,Xr)){const jt=yP(it,Ee,et,h.vertical||K,p,24,we,u.overscaling,Xr);for(const Rt of jt)K&&EP(u,K.text,bt,Rt)||_t(it,Rt)}else if(wt==="line-center"){for(const it of o.geometry)if(it.length>1){const jt=_P(it,et,h.vertical||K,p,24,we);jt&&_t(it,jt)}}else if(o.type==="Polygon")for(const it of i0(o.geometry,0)){const jt=xP(it,16);_t(it[0],new Bu(jt.x,jt.y,0))}else if(o.type==="LineString")for(const it of o.geometry)_t(it,new Bu(it[0].x,it[0].y,0));else if(o.type==="Point")for(const it of o.geometry)for(const jt of it)_t([jt],new Bu(jt.x,jt.y,0))}function Bx(u,o,h,p,_,x,w,I,P,D,O,B,W,X,K){const ie=function(Oe,Ee,ke,Qe,et,St,kt,wt){const bt=Qe.layout.get("text-rotate").evaluate(St,{})*Math.PI/180,ht=[];for(const Tt of Ee.positionedLines)for(const _t of Tt.positionedGlyphs){if(!_t.rect)continue;const it=_t.rect||{};let jt=nx+1,Rt=!0,Sn=1,gr=0;const wr=(et||wt)&&_t.vertical,xi=_t.metrics.advance*_t.scale/2;if(wt&&Ee.verticalizable&&(gr=Tt.lineOffset/2-(_t.imageName?-(bi-_t.metrics.width*_t.scale)/2:(_t.scale-1)*bi)),_t.imageName){const Ei=kt[_t.imageName];Rt=Ei.sdf,Sn=Ei.pixelRatio,jt=Xo/Sn}const ds=et?[_t.x+xi,_t.y]:[0,0];let Po=et?[0,0]:[_t.x+xi+ke[0],_t.y+ke[1]-gr],mi=[0,0];wr&&(mi=Po,Po=[0,0]);const Bi=_t.metrics.isDoubleResolution?2:1,Yi=(_t.metrics.left-jt)*_t.scale-xi+Po[0],Mo=(-_t.metrics.top-jt)*_t.scale+Po[1],Ao=Yi+it.w/Bi*_t.scale/Sn,wi=Mo+it.h/Bi*_t.scale/Sn,Si=new E(Yi,Mo),fo=new E(Ao,Mo),ko=new E(Yi,wi),po=new E(Ao,wi);if(wr){const Ei=new E(-xi,xi-hd),Tn=-Math.PI/2,mo=bi/2-xi,$i=new E(5-hd-mo,-(_t.imageName?mo:0)),Ii=new E(...mi);Si._rotateAround(Tn,Ei)._add($i)._add(Ii),fo._rotateAround(Tn,Ei)._add($i)._add(Ii),ko._rotateAround(Tn,Ei)._add($i)._add(Ii),po._rotateAround(Tn,Ei)._add($i)._add(Ii)}if(bt){const Ei=Math.sin(bt),Tn=Math.cos(bt),mo=[Tn,-Ei,Ei,Tn];Si._matMult(mo),fo._matMult(mo),ko._matMult(mo),po._matMult(mo)}const Yo=new E(0,0),$o=new E(0,0);ht.push({tl:Si,tr:fo,bl:ko,br:po,tex:it,writingMode:Ee.writingMode,glyphOffset:ds,sectionIndex:_t.sectionIndex,isSDF:Rt,pixelOffsetTL:Yo,pixelOffsetBR:$o,minFontScaleX:0,minFontScaleY:0})}return ht}(0,h,I,_,x,w,p,u.allowVerticalPlacement),de=u.textSizeData;let we=null;de.kind==="source"?(we=[hl*_.layout.get("text-size").evaluate(w,{})],we[0]>zu&&Ke(`${u.layerIds[0]}: Value for "text-size" is >= ${pd}. Reduce your "text-size".`)):de.kind==="composite"&&(we=[hl*X.compositeTextSizes[0].evaluate(w,{},K),hl*X.compositeTextSizes[1].evaluate(w,{},K)],(we[0]>zu||we[1]>zu)&&Ke(`${u.layerIds[0]}: Value for "text-size" is >= ${pd}. Reduce your "text-size".`)),u.addSymbols(u.text,ie,we,I,x,w,D,o,P.lineStartIndex,P.lineLength,W,K);for(const Oe of O)B[Oe]=u.text.placedSymbolArray.length-1;return 4*ie.length}function Vx(u){for(const o in u)return u[o];return null}function EP(u,o,h,p){const _=u.compareText;if(o in _){const x=_[o];for(let w=x.length-1;w>=0;w--)if(p.dist(x[w])>4;if(_!==1)throw new Error(`Got v${_} data when expected v1.`);const x=Ux[15&p];if(!x)throw new Error("Unrecognized array type.");const[w]=new Uint16Array(o,2,1),[I]=new Uint32Array(o,4,1);return new T0(I,w,x,o)}constructor(o,h=64,p=Float64Array,_){if(isNaN(o)||o<0)throw new Error(`Unpexpected numItems value: ${o}.`);this.numItems=+o,this.nodeSize=Math.min(Math.max(+h,2),65535),this.ArrayType=p,this.IndexArrayType=o<65536?Uint16Array:Uint32Array;const x=Ux.indexOf(this.ArrayType),w=2*o*this.ArrayType.BYTES_PER_ELEMENT,I=o*this.IndexArrayType.BYTES_PER_ELEMENT,P=(8-I%8)%8;if(x<0)throw new Error(`Unexpected typed array class: ${p}.`);_&&_ instanceof ArrayBuffer?(this.data=_,this.ids=new this.IndexArrayType(this.data,8,o),this.coords=new this.ArrayType(this.data,8+I+P,2*o),this._pos=2*o,this._finished=!0):(this.data=new ArrayBuffer(8+w+I+P),this.ids=new this.IndexArrayType(this.data,8,o),this.coords=new this.ArrayType(this.data,8+I+P,2*o),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+x]),new Uint16Array(this.data,2,1)[0]=h,new Uint32Array(this.data,4,1)[0]=o)}add(o,h){const p=this._pos>>1;return this.ids[p]=p,this.coords[this._pos++]=o,this.coords[this._pos++]=h,p}finish(){const o=this._pos>>1;if(o!==this.numItems)throw new Error(`Added ${o} items when expected ${this.numItems}.`);return L0(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(o,h,p,_){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:x,coords:w,nodeSize:I}=this,P=[0,x.length-1,0],D=[];for(;P.length;){const O=P.pop()||0,B=P.pop()||0,W=P.pop()||0;if(B-W<=I){for(let de=W;de<=B;de++){const we=w[2*de],Oe=w[2*de+1];we>=o&&we<=p&&Oe>=h&&Oe<=_&&D.push(x[de])}continue}const X=W+B>>1,K=w[2*X],ie=w[2*X+1];K>=o&&K<=p&&ie>=h&&ie<=_&&D.push(x[X]),(O===0?o<=K:h<=ie)&&(P.push(W),P.push(X-1),P.push(1-O)),(O===0?p>=K:_>=ie)&&(P.push(X+1),P.push(B),P.push(1-O))}return D}within(o,h,p){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:_,coords:x,nodeSize:w}=this,I=[0,_.length-1,0],P=[],D=p*p;for(;I.length;){const O=I.pop()||0,B=I.pop()||0,W=I.pop()||0;if(B-W<=w){for(let de=W;de<=B;de++)Gx(x[2*de],x[2*de+1],o,h)<=D&&P.push(_[de]);continue}const X=W+B>>1,K=x[2*X],ie=x[2*X+1];Gx(K,ie,o,h)<=D&&P.push(_[X]),(O===0?o-p<=K:h-p<=ie)&&(I.push(W),I.push(X-1),I.push(1-O)),(O===0?o+p>=K:h+p>=ie)&&(I.push(X+1),I.push(B),I.push(1-O))}return P}}function L0(u,o,h,p,_,x){if(_-p<=h)return;const w=p+_>>1;jx(u,o,w,p,_,x),L0(u,o,h,p,w-1,1-x),L0(u,o,h,w+1,_,1-x)}function jx(u,o,h,p,_,x){for(;_>p;){if(_-p>600){const D=_-p+1,O=h-p+1,B=Math.log(D),W=.5*Math.exp(2*B/3),X=.5*Math.sqrt(B*W*(D-W)/D)*(O-D/2<0?-1:1);jx(u,o,h,Math.max(p,Math.floor(h-O*W/D+X)),Math.min(_,Math.floor(h+(D-O)*W/D+X)),x)}const w=o[2*h+x];let I=p,P=_;for(md(u,o,p,h),o[2*_+x]>w&&md(u,o,p,_);Iw;)P--}o[2*p+x]===w?md(u,o,p,P):(P++,md(u,o,P,_)),P<=h&&(p=P+1),h<=P&&(_=P-1)}}function md(u,o,h,p){P0(u,h,p),P0(o,2*h,2*p),P0(o,2*h+1,2*p+1)}function P0(u,o,h){const p=u[o];u[o]=u[h],u[h]=p}function Gx(u,o,h,p){const _=u-h,x=o-p;return _*_+x*x}var M0;c.bd=void 0,(M0=c.bd||(c.bd={})).create="create",M0.load="load",M0.fullLoad="fullLoad";let Rg=null,gd=[];const A0=1e3/60,k0="loadTime",D0="fullLoadTime",IP={mark(u){performance.mark(u)},frame(u){const o=u;Rg!=null&&gd.push(o-Rg),Rg=o},clearMetrics(){Rg=null,gd=[],performance.clearMeasures(k0),performance.clearMeasures(D0);for(const u in c.bd)performance.clearMarks(c.bd[u])},getPerformanceMetrics(){performance.measure(k0,c.bd.create,c.bd.load),performance.measure(D0,c.bd.create,c.bd.fullLoad);const u=performance.getEntriesByName(k0)[0].duration,o=performance.getEntriesByName(D0)[0].duration,h=gd.length,p=1/(gd.reduce((x,w)=>x+w,0)/h/1e3),_=gd.filter(x=>x>A0).reduce((x,w)=>x+(w-A0)/A0,0);return{loadTime:u,fullLoadTime:o,fps:p,percentDroppedFrames:_/(h+_)*100,totalFrames:h}}};c.$=pt,c.A=rf,c.B=function(u){if(He==null){const o=u.navigator?u.navigator.userAgent:null;He=!!u.safari||!(!o||!(/\b(iPad|iPhone|iPod)\b/.test(o)||o.match("Safari")&&!o.match("Chrome")))}return He},c.C=class{constructor(u,o){this.target=u,this.mapId=o,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new mP(()=>this.process()),this.subscription=function(h,p,_,x){return h.addEventListener(p,_,!1),{unsubscribe:()=>{h.removeEventListener(p,_,!1)}}}(this.target,"message",h=>this.receive(h)),this.globalScope=ut(self)?u:window}registerMessageHandler(u,o){this.messageHandlers[u]=o}sendAsync(u,o){return new Promise((h,p)=>{const _=Math.round(1e18*Math.random()).toString(36).substring(0,10);this.resolveRejects[_]={resolve:h,reject:p},o&&o.signal.addEventListener("abort",()=>{delete this.resolveRejects[_];const I={id:_,type:"",origin:location.origin,targetMapId:u.targetMapId,sourceMapId:this.mapId};this.target.postMessage(I)},{once:!0});const x=[],w=Object.assign(Object.assign({},u),{id:_,sourceMapId:this.mapId,origin:location.origin,data:Au(u.data,x)});this.target.postMessage(w,{transfer:x})})}receive(u){const o=u.data,h=o.id;if(!(o.origin!=="file://"&&location.origin!=="file://"&&o.origin!==location.origin||o.targetMapId&&this.mapId!==o.targetMapId)){if(o.type===""){delete this.tasks[h];const p=this.abortControllers[h];return delete this.abortControllers[h],void(p&&p.abort())}if(ut(self)||o.mustQueue)return this.tasks[h]=o,this.taskQueue.push(h),void this.invoker.trigger();this.processTask(h,o)}}process(){if(this.taskQueue.length===0)return;const u=this.taskQueue.shift(),o=this.tasks[u];delete this.tasks[u],this.taskQueue.length>0&&this.invoker.trigger(),o&&this.processTask(u,o)}processTask(u,o){return l(this,void 0,void 0,function*(){if(o.type===""){const _=this.resolveRejects[u];return delete this.resolveRejects[u],_?void(o.error?_.reject(ku(o.error)):_.resolve(ku(o.data))):void 0}if(!this.messageHandlers[o.type])return void this.completeTask(u,new Error(`Could not find a registered handler for ${o.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));const h=ku(o.data),p=new AbortController;this.abortControllers[u]=p;try{const _=yield this.messageHandlers[o.type](o.sourceMapId,h,p);this.completeTask(u,null,_)}catch(_){this.completeTask(u,_)}})}completeTask(u,o,h){const p=[];delete this.abortControllers[u];const _={id:u,type:"",sourceMapId:this.mapId,origin:location.origin,error:o?Au(o):null,data:Au(h,p)};this.target.postMessage(_,{transfer:p})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},c.D=Nt,c.E=en,c.F=function(){var u=new rf(16);return rf!=Float32Array&&(u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[11]=0,u[12]=0,u[13]=0,u[14]=0),u[0]=1,u[5]=1,u[10]=1,u[15]=1,u},c.G=pn,c.H=function(u,o,h){var p,_,x,w,I,P,D,O,B,W,X,K,ie=h[0],de=h[1],we=h[2];return o===u?(u[12]=o[0]*ie+o[4]*de+o[8]*we+o[12],u[13]=o[1]*ie+o[5]*de+o[9]*we+o[13],u[14]=o[2]*ie+o[6]*de+o[10]*we+o[14],u[15]=o[3]*ie+o[7]*de+o[11]*we+o[15]):(_=o[1],x=o[2],w=o[3],I=o[4],P=o[5],D=o[6],O=o[7],B=o[8],W=o[9],X=o[10],K=o[11],u[0]=p=o[0],u[1]=_,u[2]=x,u[3]=w,u[4]=I,u[5]=P,u[6]=D,u[7]=O,u[8]=B,u[9]=W,u[10]=X,u[11]=K,u[12]=p*ie+I*de+B*we+o[12],u[13]=_*ie+P*de+W*we+o[13],u[14]=x*ie+D*de+X*we+o[14],u[15]=w*ie+O*de+K*we+o[15]),u},c.I=d0,c.J=function(u,o,h){var p=h[0],_=h[1],x=h[2];return u[0]=o[0]*p,u[1]=o[1]*p,u[2]=o[2]*p,u[3]=o[3]*p,u[4]=o[4]*_,u[5]=o[5]*_,u[6]=o[6]*_,u[7]=o[7]*_,u[8]=o[8]*x,u[9]=o[9]*x,u[10]=o[10]*x,u[11]=o[11]*x,u[12]=o[12],u[13]=o[13],u[14]=o[14],u[15]=o[15],u},c.K=Sb,c.L=function(u,o){const h={};for(let p=0;p{const o=window.document.createElement("video");return o.muted=!0,new Promise(h=>{o.onloadstart=()=>{h(o)};for(const p of u){const _=window.document.createElement("source");ar(p)||(o.crossOrigin="Anonymous"),_.src=p,o.appendChild(_)}})},c.a3=function(){return pe++},c.a4=y,c.a5=cf,c.a6=Oh,c.a7=Xl,c.a8=br,c.a9=Ix,c.aA=Y,c.aB=function(u,o){if(!u)return[{command:"setStyle",args:[o]}];let h=[];try{if(!yn(u.version,o.version))return[{command:"setStyle",args:[o]}];yn(u.center,o.center)||h.push({command:"setCenter",args:[o.center]}),yn(u.zoom,o.zoom)||h.push({command:"setZoom",args:[o.zoom]}),yn(u.bearing,o.bearing)||h.push({command:"setBearing",args:[o.bearing]}),yn(u.pitch,o.pitch)||h.push({command:"setPitch",args:[o.pitch]}),yn(u.sprite,o.sprite)||h.push({command:"setSprite",args:[o.sprite]}),yn(u.glyphs,o.glyphs)||h.push({command:"setGlyphs",args:[o.glyphs]}),yn(u.transition,o.transition)||h.push({command:"setTransition",args:[o.transition]}),yn(u.light,o.light)||h.push({command:"setLight",args:[o.light]}),yn(u.terrain,o.terrain)||h.push({command:"setTerrain",args:[o.terrain]}),yn(u.sky,o.sky)||h.push({command:"setSky",args:[o.sky]});const p={},_=[];(function(w,I,P,D){let O;for(O in I=I||{},w=w||{})Object.prototype.hasOwnProperty.call(w,O)&&(Object.prototype.hasOwnProperty.call(I,O)||Cs(O,P,D));for(O in I)Object.prototype.hasOwnProperty.call(I,O)&&(Object.prototype.hasOwnProperty.call(w,O)?yn(w[O],I[O])||(w[O].type==="geojson"&&I[O].type==="geojson"&&tl(w,I,O)?hr(P,{command:"setGeoJSONSourceData",args:[O,I[O].data]}):Ks(O,I,P,D)):jo(O,I,P))})(u.sources,o.sources,_,p);const x=[];u.layers&&u.layers.forEach(w=>{"source"in w&&p[w.source]?h.push({command:"removeLayer",args:[w.id]}):x.push(w)}),h=h.concat(_),function(w,I,P){I=I||[];const D=(w=w||[]).map(zl),O=I.map(zl),B=w.reduce(Ts,{}),W=I.reduce(Ts,{}),X=D.slice(),K=Object.create(null);let ie,de,we,Oe,Ee;for(let ke=0,Qe=0;ke@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(h,p,_,x)=>{const w=_||x;return o[p]=!w||w.toLowerCase(),""}),o["max-age"]){const h=parseInt(o["max-age"],10);isNaN(h)?delete o["max-age"]:o["max-age"]=h}return o},c.ab=function(u,o){const h=[];for(const p in u)p in o||h.push(p);return h},c.ac=te,c.ad=function(u,o,h){var p=Math.sin(h),_=Math.cos(h),x=o[0],w=o[1],I=o[2],P=o[3],D=o[4],O=o[5],B=o[6],W=o[7];return o!==u&&(u[8]=o[8],u[9]=o[9],u[10]=o[10],u[11]=o[11],u[12]=o[12],u[13]=o[13],u[14]=o[14],u[15]=o[15]),u[0]=x*_+D*p,u[1]=w*_+O*p,u[2]=I*_+B*p,u[3]=P*_+W*p,u[4]=D*_-x*p,u[5]=O*_-w*p,u[6]=B*_-I*p,u[7]=W*_-P*p,u},c.ae=function(u){var o=new rf(16);return o[0]=u[0],o[1]=u[1],o[2]=u[2],o[3]=u[3],o[4]=u[4],o[5]=u[5],o[6]=u[6],o[7]=u[7],o[8]=u[8],o[9]=u[9],o[10]=u[10],o[11]=u[11],o[12]=u[12],o[13]=u[13],o[14]=u[14],o[15]=u[15],o},c.af=yg,c.ag=function(u,o){let h=0,p=0;if(u.kind==="constant")p=u.layoutSize;else if(u.kind!=="source"){const{interpolationType:_,minZoom:x,maxZoom:w}=u,I=_?te(Zi.interpolationFactor(_,o,x,w),0,1):0;u.kind==="camera"?p=co.number(u.minSize,u.maxSize,I):h=I}return{uSizeT:h,uSize:p}},c.ai=function(u,{uSize:o,uSizeT:h},{lowerSize:p,upperSize:_}){return u.kind==="source"?p/hl:u.kind==="composite"?co.number(p/hl,_/hl,h):o},c.aj=y0,c.ak=function(u,o,h,p){const _=o.y-u.y,x=o.x-u.x,w=p.y-h.y,I=p.x-h.x,P=w*x-I*_;if(P===0)return null;const D=(I*(u.y-h.y)-w*(u.x-h.x))/P;return new E(u.x+D*x,u.y+D*_)},c.al=Px,c.am=Kp,c.an=Ky,c.ao=bi,c.aq=_0,c.ar=function(u,o){var h=o[0],p=o[1],_=o[2],x=o[3],w=o[4],I=o[5],P=o[6],D=o[7],O=o[8],B=o[9],W=o[10],X=o[11],K=o[12],ie=o[13],de=o[14],we=o[15],Oe=h*I-p*w,Ee=h*P-_*w,ke=h*D-x*w,Qe=p*P-_*I,et=p*D-x*I,St=_*D-x*P,kt=O*ie-B*K,wt=O*de-W*K,bt=O*we-X*K,ht=B*de-W*ie,Tt=B*we-X*ie,_t=W*we-X*de,it=Oe*_t-Ee*Tt+ke*ht+Qe*bt-et*wt+St*kt;return it?(u[0]=(I*_t-P*Tt+D*ht)*(it=1/it),u[1]=(_*Tt-p*_t-x*ht)*it,u[2]=(ie*St-de*et+we*Qe)*it,u[3]=(W*et-B*St-X*Qe)*it,u[4]=(P*bt-w*_t-D*wt)*it,u[5]=(h*_t-_*bt+x*wt)*it,u[6]=(de*ke-K*St-we*Ee)*it,u[7]=(O*St-W*ke+X*Ee)*it,u[8]=(w*Tt-I*bt+D*kt)*it,u[9]=(p*bt-h*Tt-x*kt)*it,u[10]=(K*et-ie*ke+we*Oe)*it,u[11]=(B*ke-O*et-X*Oe)*it,u[12]=(I*wt-w*ht-P*kt)*it,u[13]=(h*ht-p*wt+_*kt)*it,u[14]=(ie*Ee-K*Qe-de*Oe)*it,u[15]=(O*Qe-B*Ee+W*Oe)*it,u):null},c.as=C0,c.at=g0,c.au=T0,c.av=function(){const u={},o=Re.$version;for(const h in Re.$root){const p=Re.$root[h];if(p.required){let _=null;_=h==="version"?o:p.type==="array"?[]:{},_!=null&&(u[h]=_)}}return u},c.aw=ig,c.ax=zr,c.ay=function(u){u=u.slice();const o=Object.create(null);for(let h=0;hit*bi)}let wt=w?"center":h.get("text-justify").evaluate(D,{},u.canonical);const bt=h.get("symbol-placement"),ht=bt==="point"?h.get("text-max-width").evaluate(D,{},u.canonical)*bi:0,Tt=()=>{u.bucket.allowVerticalPlacement&&Du(ke)&&(K.vertical=Ig(ie,u.glyphMap,u.glyphPositions,u.imagePositions,O,ht,x,St,"left",et,we,c.ah.vertical,!0,bt,W,B))};if(!w&&kt){const _t=new Set;if(wt==="auto")for(let jt=0;jtl(void 0,void 0,void 0,function*(){if(u.byteLength===0)return createImageBitmap(new ImageData(1,1));const o=new Blob([new Uint8Array(u)],{type:"image/png"});try{return createImageBitmap(o)}catch(h){throw new Error(`Could not load image because of ${h.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),c.e=fe,c.f=u=>new Promise((o,h)=>{const p=new Image;p.onload=()=>{o(p),URL.revokeObjectURL(p.src),p.onload=null,window.requestAnimationFrame(()=>{p.src=Gt})},p.onerror=()=>h(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));const _=new Blob([new Uint8Array(u)],{type:"image/png"});p.src=u.byteLength?URL.createObjectURL(_):Gt}),c.g=_n,c.h=(u,o)=>Pn(fe(u,{type:"json"}),o),c.i=ut,c.j=dt,c.k=Me,c.l=(u,o)=>Pn(fe(u,{type:"arrayBuffer"}),o),c.m=Pn,c.n=function(u){return new f0(u).readFields(eP,[])},c.o=rd,c.p=rx,c.q=To,c.r=Zy,c.s=ar,c.t=Mu,c.u=xt,c.v=Re,c.w=Ke,c.x=ql,c.y=function([u,o,h]){return o+=90,o*=Math.PI/180,h*=Math.PI/180,{x:u*Math.cos(o)*Math.sin(h),y:u*Math.sin(o)*Math.sin(h),z:u*Math.cos(h)}},c.z=co}),i("worker",["./shared"],function(c){class l{constructor(q){this.keyCache={},q&&this.replace(q)}replace(q){this._layerConfigs={},this._layers={},this.update(q,[])}update(q,Z){for(const le of q){this._layerConfigs[le.id]=le;const Te=this._layers[le.id]=c.az(le);Te._featureFilter=c.a6(Te.filter),this.keyCache[le.id]&&delete this.keyCache[le.id]}for(const le of Z)delete this.keyCache[le],delete this._layerConfigs[le],delete this._layers[le];this.familiesBySource={};const J=c.bh(Object.values(this._layerConfigs),this.keyCache);for(const le of J){const Te=le.map(Ye=>this._layers[Ye.id]),Q=Te[0];if(Q.visibility==="none")continue;const Pe=Q.source||"";let Se=this.familiesBySource[Pe];Se||(Se=this.familiesBySource[Pe]={});const Ne=Q.sourceLayer||"_geojsonTileLayer";let qe=Se[Ne];qe||(qe=Se[Ne]=[]),qe.push(Te)}}}class d{constructor(q){const Z={},J=[];for(const Pe in q){const Se=q[Pe],Ne=Z[Pe]={};for(const qe in Se){const Ye=Se[+qe];if(!Ye||Ye.bitmap.width===0||Ye.bitmap.height===0)continue;const Je={x:0,y:0,w:Ye.bitmap.width+2,h:Ye.bitmap.height+2};J.push(Je),Ne[qe]={rect:Je,metrics:Ye.metrics}}}const{w:le,h:Te}=c.p(J),Q=new c.o({width:le||1,height:Te||1});for(const Pe in q){const Se=q[Pe];for(const Ne in Se){const qe=Se[+Ne];if(!qe||qe.bitmap.width===0||qe.bitmap.height===0)continue;const Ye=Z[Pe][Ne].rect;c.o.copy(qe.bitmap,Q,{x:0,y:0},{x:Ye.x+1,y:Ye.y+1},qe.bitmap)}}this.image=Q,this.positions=Z}}c.bi("GlyphAtlas",d);class v{constructor(q){this.tileID=new c.Q(q.tileID.overscaledZ,q.tileID.wrap,q.tileID.canonical.z,q.tileID.canonical.x,q.tileID.canonical.y),this.uid=q.uid,this.zoom=q.zoom,this.pixelRatio=q.pixelRatio,this.tileSize=q.tileSize,this.source=q.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=q.showCollisionBoxes,this.collectResourceTiming=!!q.collectResourceTiming,this.returnDependencies=!!q.returnDependencies,this.promoteId=q.promoteId,this.inFlightDependencies=[]}parse(q,Z,J,le){return c._(this,void 0,void 0,function*(){this.status="parsing",this.data=q,this.collisionBoxArray=new c.a4;const Te=new c.bj(Object.keys(q.layers).sort()),Q=new c.bk(this.tileID,this.promoteId);Q.bucketLayerIDs=[];const Pe={},Se={featureIndex:Q,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:J},Ne=Z.familiesBySource[this.source];for(const dn in Ne){const Fr=q.layers[dn];if(!Fr)continue;Fr.version===1&&c.w(`Vector tile source "${this.source}" layer "${dn}" does not use vector tile spec v2 and therefore may have some rendering errors.`);const _i=Te.encode(dn),uo=[];for(let Eo=0;Eo=Pi.maxzoom||Pi.visibility!=="none"&&(S(Eo,this.zoom,J),(Pe[Pi.id]=Pi.createBucket({index:Q.bucketLayerIDs.length,layers:Eo,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:_i,sourceID:this.source})).populate(uo,Se,this.tileID.canonical),Q.bucketLayerIDs.push(Eo.map(Js=>Js.id)))}}const qe=c.aE(Se.glyphDependencies,dn=>Object.keys(dn).map(Number));this.inFlightDependencies.forEach(dn=>dn==null?void 0:dn.abort()),this.inFlightDependencies=[];let Ye=Promise.resolve({});if(Object.keys(qe).length){const dn=new AbortController;this.inFlightDependencies.push(dn),Ye=le.sendAsync({type:"GG",data:{stacks:qe,source:this.source,tileID:this.tileID,type:"glyphs"}},dn)}const Je=Object.keys(Se.iconDependencies);let Dt=Promise.resolve({});if(Je.length){const dn=new AbortController;this.inFlightDependencies.push(dn),Dt=le.sendAsync({type:"GI",data:{icons:Je,source:this.source,tileID:this.tileID,type:"icons"}},dn)}const zt=Object.keys(Se.patternDependencies);let Qt=Promise.resolve({});if(zt.length){const dn=new AbortController;this.inFlightDependencies.push(dn),Qt=le.sendAsync({type:"GI",data:{icons:zt,source:this.source,tileID:this.tileID,type:"patterns"}},dn)}const[tn,Mn,er]=yield Promise.all([Ye,Dt,Qt]),vr=new d(tn),ci=new c.bl(Mn,er);for(const dn in Pe){const Fr=Pe[dn];Fr instanceof c.a5?(S(Fr.layers,this.zoom,J),c.bm({bucket:Fr,glyphMap:tn,glyphPositions:vr.positions,imageMap:Mn,imagePositions:ci.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):Fr.hasPattern&&(Fr instanceof c.bn||Fr instanceof c.bo||Fr instanceof c.bp)&&(S(Fr.layers,this.zoom,J),Fr.addFeatures(Se,this.tileID.canonical,ci.patternPositions))}return this.status="done",{buckets:Object.values(Pe).filter(dn=>!dn.isEmpty()),featureIndex:Q,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:vr.image,imageAtlas:ci,glyphMap:this.returnDependencies?tn:null,iconMap:this.returnDependencies?Mn:null,glyphPositions:this.returnDependencies?vr.positions:null}})}}function S(me,q,Z){const J=new c.a8(q);for(const le of me)le.recalculate(J,Z)}class E{constructor(q,Z,J){this.actor=q,this.layerIndex=Z,this.availableImages=J,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(q,Z){return c._(this,void 0,void 0,function*(){const J=yield c.l(q.request,Z);try{return{vectorTile:new c.bq.VectorTile(new c.br(J.data)),rawData:J.data,cacheControl:J.cacheControl,expires:J.expires}}catch(le){const Te=new Uint8Array(J.data);let Q=`Unable to parse the tile at ${q.request.url}, `;throw Q+=Te[0]===31&&Te[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${le.messge}`,new Error(Q)}})}loadTile(q){return c._(this,void 0,void 0,function*(){const Z=q.uid,J=!!(q&&q.request&&q.request.collectResourceTiming)&&new c.bs(q.request),le=new v(q);this.loading[Z]=le;const Te=new AbortController;le.abort=Te;try{const Q=yield this.loadVectorTile(q,Te);if(delete this.loading[Z],!Q)return null;const Pe=Q.rawData,Se={};Q.expires&&(Se.expires=Q.expires),Q.cacheControl&&(Se.cacheControl=Q.cacheControl);const Ne={};if(J){const Ye=J.finish();Ye&&(Ne.resourceTiming=JSON.parse(JSON.stringify(Ye)))}le.vectorTile=Q.vectorTile;const qe=le.parse(Q.vectorTile,this.layerIndex,this.availableImages,this.actor);this.loaded[Z]=le,this.fetching[Z]={rawTileData:Pe,cacheControl:Se,resourceTiming:Ne};try{const Ye=yield qe;return c.e({rawTileData:Pe.slice(0)},Ye,Se,Ne)}finally{delete this.fetching[Z]}}catch(Q){throw delete this.loading[Z],le.status="done",this.loaded[Z]=le,Q}})}reloadTile(q){return c._(this,void 0,void 0,function*(){const Z=q.uid;if(!this.loaded||!this.loaded[Z])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");const J=this.loaded[Z];if(J.showCollisionBoxes=q.showCollisionBoxes,J.status==="parsing"){const le=yield J.parse(J.vectorTile,this.layerIndex,this.availableImages,this.actor);let Te;if(this.fetching[Z]){const{rawTileData:Q,cacheControl:Pe,resourceTiming:Se}=this.fetching[Z];delete this.fetching[Z],Te=c.e({rawTileData:Q.slice(0)},le,Pe,Se)}else Te=le;return Te}if(J.status==="done"&&J.vectorTile)return J.parse(J.vectorTile,this.layerIndex,this.availableImages,this.actor)})}abortTile(q){return c._(this,void 0,void 0,function*(){const Z=this.loading,J=q.uid;Z&&Z[J]&&Z[J].abort&&(Z[J].abort.abort(),delete Z[J])})}removeTile(q){return c._(this,void 0,void 0,function*(){this.loaded&&this.loaded[q.uid]&&delete this.loaded[q.uid]})}}class C{constructor(){this.loaded={}}loadTile(q){return c._(this,void 0,void 0,function*(){const{uid:Z,encoding:J,rawImageData:le,redFactor:Te,greenFactor:Q,blueFactor:Pe,baseShift:Se}=q,Ne=le.width+2,qe=le.height+2,Ye=c.b(le)?new c.R({width:Ne,height:qe},yield c.bt(le,-1,-1,Ne,qe)):le,Je=new c.bu(Z,Ye,J,Te,Q,Pe,Se);return this.loaded=this.loaded||{},this.loaded[Z]=Je,Je})}removeTile(q){const Z=this.loaded,J=q.uid;Z&&Z[J]&&delete Z[J]}}function M(me,q){if(me.length!==0){A(me[0],q);for(var Z=1;Z=Math.abs(Pe)?Z-Se+Pe:Pe-Se+Z,Z=Se}Z+J>=0!=!!q&&me.reverse()}var R=c.bv(function me(q,Z){var J,le=q&&q.type;if(le==="FeatureCollection")for(J=0;J>31}function tt(me,q){for(var Z=me.loadGeometry(),J=me.type,le=0,Te=0,Q=Z.length,Pe=0;Peme},Gt=Math.fround||(vt=new Float32Array(1),me=>(vt[0]=+me,vt[0]));var vt;const At=3,Mt=5,rn=6;class wn{constructor(q){this.options=Object.assign(Object.create(Ot),q),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(q){const{log:Z,minZoom:J,maxZoom:le}=this.options;Z&&console.time("total time");const Te=`prepare ${q.length} points`;Z&&console.time(Te),this.points=q;const Q=[];for(let Se=0;Se=J;Se--){const Ne=+Date.now();Pe=this.trees[Se]=this._createTree(this._cluster(Pe,Se)),Z&&console.log("z%d: %d clusters in %dms",Se,Pe.numItems,+Date.now()-Ne)}return Z&&console.timeEnd("total time"),this}getClusters(q,Z){let J=((q[0]+180)%360+360)%360-180;const le=Math.max(-90,Math.min(90,q[1]));let Te=q[2]===180?180:((q[2]+180)%360+360)%360-180;const Q=Math.max(-90,Math.min(90,q[3]));if(q[2]-q[0]>=360)J=-180,Te=180;else if(J>Te){const Ye=this.getClusters([J,le,180,Q],Z),Je=this.getClusters([-180,le,Te,Q],Z);return Ye.concat(Je)}const Pe=this.trees[this._limitZoom(Z)],Se=Pe.range(pn(J),Yn(Q),pn(Te),Yn(le)),Ne=Pe.data,qe=[];for(const Ye of Se){const Je=this.stride*Ye;qe.push(Ne[Je+Mt]>1?fn(Ne,Je,this.clusterProps):this.points[Ne[Je+At]])}return qe}getChildren(q){const Z=this._getOriginId(q),J=this._getOriginZoom(q),le="No cluster with the specified id.",Te=this.trees[J];if(!Te)throw new Error(le);const Q=Te.data;if(Z*this.stride>=Q.length)throw new Error(le);const Pe=this.options.radius/(this.options.extent*Math.pow(2,J-1)),Se=Te.within(Q[Z*this.stride],Q[Z*this.stride+1],Pe),Ne=[];for(const qe of Se){const Ye=qe*this.stride;Q[Ye+4]===q&&Ne.push(Q[Ye+Mt]>1?fn(Q,Ye,this.clusterProps):this.points[Q[Ye+At]])}if(Ne.length===0)throw new Error(le);return Ne}getLeaves(q,Z,J){const le=[];return this._appendLeaves(le,q,Z=Z||10,J=J||0,0),le}getTile(q,Z,J){const le=this.trees[this._limitZoom(q)],Te=Math.pow(2,q),{extent:Q,radius:Pe}=this.options,Se=Pe/Q,Ne=(J-Se)/Te,qe=(J+1+Se)/Te,Ye={features:[]};return this._addTileFeatures(le.range((Z-Se)/Te,Ne,(Z+1+Se)/Te,qe),le.data,Z,J,Te,Ye),Z===0&&this._addTileFeatures(le.range(1-Se/Te,Ne,1,qe),le.data,Te,J,Te,Ye),Z===Te-1&&this._addTileFeatures(le.range(0,Ne,Se/Te,qe),le.data,-1,J,Te,Ye),Ye.features.length?Ye:null}getClusterExpansionZoom(q){let Z=this._getOriginZoom(q)-1;for(;Z<=this.options.maxZoom;){const J=this.getChildren(q);if(Z++,J.length!==1)break;q=J[0].properties.cluster_id}return Z}_appendLeaves(q,Z,J,le,Te){const Q=this.getChildren(Z);for(const Pe of Q){const Se=Pe.properties;if(Se&&Se.cluster?Te+Se.point_count<=le?Te+=Se.point_count:Te=this._appendLeaves(q,Se.cluster_id,J,le,Te):Te1;let qe,Ye,Je;if(Ne)qe=_n(Z,Se,this.clusterProps),Ye=Z[Se],Je=Z[Se+1];else{const Qt=this.points[Z[Se+At]];qe=Qt.properties;const[tn,Mn]=Qt.geometry.coordinates;Ye=pn(tn),Je=Yn(Mn)}const Dt={type:1,geometry:[[Math.round(this.options.extent*(Ye*Te-J)),Math.round(this.options.extent*(Je*Te-le))]],tags:qe};let zt;zt=Ne||this.options.generateId?Z[Se+At]:this.points[Z[Se+At]].id,zt!==void 0&&(Dt.id=zt),Q.features.push(Dt)}}_limitZoom(q){return Math.max(this.options.minZoom,Math.min(Math.floor(+q),this.options.maxZoom+1))}_cluster(q,Z){const{radius:J,extent:le,reduce:Te,minPoints:Q}=this.options,Pe=J/(le*Math.pow(2,Z)),Se=q.data,Ne=[],qe=this.stride;for(let Ye=0;YeZ&&(tn+=Se[er+Mt])}if(tn>Qt&&tn>=Q){let Mn,er=Je*Qt,vr=Dt*Qt,ci=-1;const dn=((Ye/qe|0)<<5)+(Z+1)+this.points.length;for(const Fr of zt){const _i=Fr*qe;if(Se[_i+2]<=Z)continue;Se[_i+2]=Z;const uo=Se[_i+Mt];er+=Se[_i]*uo,vr+=Se[_i+1]*uo,Se[_i+4]=dn,Te&&(Mn||(Mn=this._map(Se,Ye,!0),ci=this.clusterProps.length,this.clusterProps.push(Mn)),Te(Mn,this._map(Se,_i)))}Se[Ye+4]=dn,Ne.push(er/tn,vr/tn,1/0,dn,-1,tn),Te&&Ne.push(ci)}else{for(let Mn=0;Mn1)for(const Mn of zt){const er=Mn*qe;if(!(Se[er+2]<=Z)){Se[er+2]=Z;for(let vr=0;vr>5}_getOriginZoom(q){return(q-this.points.length)%32}_map(q,Z,J){if(q[Z+Mt]>1){const Q=this.clusterProps[q[Z+rn]];return J?Object.assign({},Q):Q}const le=this.points[q[Z+At]].properties,Te=this.options.map(le);return J&&Te===le?Object.assign({},Te):Te}}function fn(me,q,Z){return{type:"Feature",id:me[q+At],properties:_n(me,q,Z),geometry:{type:"Point",coordinates:[(J=me[q],360*(J-.5)),zr(me[q+1])]}};var J}function _n(me,q,Z){const J=me[q+Mt],le=J>=1e4?`${Math.round(J/1e3)}k`:J>=1e3?Math.round(J/100)/10+"k":J,Te=me[q+rn],Q=Te===-1?{}:Object.assign({},Z[Te]);return Object.assign(Q,{cluster:!0,cluster_id:me[q+At],point_count:J,point_count_abbreviated:le})}function pn(me){return me/360+.5}function Yn(me){const q=Math.sin(me*Math.PI/180),Z=.5-.25*Math.log((1+q)/(1-q))/Math.PI;return Z<0?0:Z>1?1:Z}function zr(me){const q=(180-360*me)*Math.PI/180;return 360*Math.atan(Math.exp(q))/Math.PI-90}function Pn(me,q,Z,J){for(var le,Te=J,Q=Z-q>>1,Pe=Z-q,Se=me[q],Ne=me[q+1],qe=me[Z],Ye=me[Z+1],Je=q+3;JeTe)le=Je,Te=Dt;else if(Dt===Te){var zt=Math.abs(Je-Q);ztJ&&(le-q>3&&Pn(me,q,le,J),me[le+2]=Te,Z-le>3&&Pn(me,le,Z,J))}function ar(me,q,Z,J,le,Te){var Q=le-Z,Pe=Te-J;if(Q!==0||Pe!==0){var Se=((me-Z)*Q+(q-J)*Pe)/(Q*Q+Pe*Pe);Se>1?(Z=le,J=Te):Se>0&&(Z+=Q*Se,J+=Pe*Se)}return(Q=me-Z)*Q+(Pe=q-J)*Pe}function Zn(me,q,Z,J){var le={id:me===void 0?null:me,type:q,geometry:Z,tags:J,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(Te){var Q=Te.geometry,Pe=Te.type;if(Pe==="Point"||Pe==="MultiPoint"||Pe==="LineString")ne(Te,Q);else if(Pe==="Polygon"||Pe==="MultiLineString")for(var Se=0;Se0&&(Q+=J?(le*Ne-Se*Te)/2:Math.sqrt(Math.pow(Se-le,2)+Math.pow(Ne-Te,2))),le=Se,Te=Ne}var qe=q.length-3;q[2]=1,Pn(q,0,qe,Z),q[qe+2]=1,q.size=Math.abs(Q),q.start=0,q.end=q.size}function Re(me,q,Z,J){for(var le=0;le1?1:Z}function yn(me,q,Z,J,le,Te,Q,Pe){if(J/=q,Te>=(Z/=q)&&Q=J)return null;for(var Se=[],Ne=0;Ne=Z&&zt=J)){var Qt=[];if(Je==="Point"||Je==="MultiPoint")hr(Ye,Qt,Z,J,le);else if(Je==="LineString")jo(Ye,Qt,Z,J,le,!1,Pe.lineMetrics);else if(Je==="MultiLineString")Ks(Ye,Qt,Z,J,le,!1);else if(Je==="Polygon")Ks(Ye,Qt,Z,J,le,!0);else if(Je==="MultiPolygon")for(var tn=0;tn=Z&&Q<=J&&(q.push(me[Te]),q.push(me[Te+1]),q.push(me[Te+2]))}}function jo(me,q,Z,J,le,Te,Q){for(var Pe,Se,Ne=Cs(me),qe=le===0?Fi:zl,Ye=me.start,Je=0;JeZ&&(Se=qe(Ne,Dt,zt,tn,Mn,Z),Q&&(Ne.start=Ye+Pe*Se)):er>J?vr=Z&&(Se=qe(Ne,Dt,zt,tn,Mn,Z),ci=!0),vr>J&&er<=J&&(Se=qe(Ne,Dt,zt,tn,Mn,J),ci=!0),!Te&&ci&&(Q&&(Ne.end=Ye+Pe*Se),q.push(Ne),Ne=Cs(me)),Q&&(Ye+=Pe)}var dn=me.length-3;Dt=me[dn],zt=me[dn+1],Qt=me[dn+2],(er=le===0?Dt:zt)>=Z&&er<=J&&tl(Ne,Dt,zt,Qt),dn=Ne.length-3,Te&&dn>=3&&(Ne[dn]!==Ne[0]||Ne[dn+1]!==Ne[1])&&tl(Ne,Ne[0],Ne[1],Ne[2]),Ne.length&&q.push(Ne)}function Cs(me){var q=[];return q.size=me.size,q.start=me.start,q.end=me.end,q}function Ks(me,q,Z,J,le,Te){for(var Q=0;QQ.maxX&&(Q.maxX=qe),Ye>Q.maxY&&(Q.maxY=Ye)}return Q}function ui(me,q,Z,J){var le=q.geometry,Te=q.type,Q=[];if(Te==="Point"||Te==="MultiPoint")for(var Pe=0;Pe0&&q.size<(le?Q:J))Z.numPoints+=q.length/3;else{for(var Pe=[],Se=0;SeQ)&&(Z.numSimplified++,Pe.push(q[Se]),Pe.push(q[Se+1])),Z.numPoints++;le&&function(Ne,qe){for(var Ye=0,Je=0,Dt=Ne.length,zt=Dt-2;Je0===qe)for(Je=0,Dt=Ne.length;Je
24)throw new Error("maxZoom should be in the 0-24 range");if(q.promoteId&&q.generateId)throw new Error("promoteId and generateId cannot be used together.");var J=function(le,Te){var Q=[];if(le.type==="FeatureCollection")for(var Pe=0;Pe1&&console.time("creation"),Je=this.tiles[Ye]=Fl(me,q,Z,J,Se),this.tileCoords.push({z:q,x:Z,y:J}),Ne)){Ne>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",q,Z,J,Je.numFeatures,Je.numPoints,Je.numSimplified),console.timeEnd("creation"));var Dt="z"+q;this.stats[Dt]=(this.stats[Dt]||0)+1,this.total++}if(Je.source=me,le){if(q===Se.maxZoom||q===le)continue;var zt=1<1&&console.time("clipping");var Qt,tn,Mn,er,vr,ci,dn=.5*Se.buffer/Se.extent,Fr=.5-dn,_i=.5+dn,uo=1+dn;Qt=tn=Mn=er=null,vr=yn(me,qe,Z-dn,Z+_i,0,Je.minX,Je.maxX,Se),ci=yn(me,qe,Z+Fr,Z+uo,0,Je.minX,Je.maxX,Se),me=null,vr&&(Qt=yn(vr,qe,J-dn,J+_i,1,Je.minY,Je.maxY,Se),tn=yn(vr,qe,J+Fr,J+uo,1,Je.minY,Je.maxY,Se),vr=null),ci&&(Mn=yn(ci,qe,J-dn,J+_i,1,Je.minY,Je.maxY,Se),er=yn(ci,qe,J+Fr,J+uo,1,Je.minY,Je.maxY,Se),ci=null),Ne>1&&console.timeEnd("clipping"),Pe.push(Qt||[],q+1,2*Z,2*J),Pe.push(tn||[],q+1,2*Z,2*J+1),Pe.push(Mn||[],q+1,2*Z+1,2*J),Pe.push(er||[],q+1,2*Z+1,2*J+1)}}},ln.prototype.getTile=function(me,q,Z){var J=this.options,le=J.extent,Te=J.debug;if(me<0||me>24)return null;var Q=1<1&&console.log("drilling down to z%d-%d-%d",me,q,Z);for(var Se,Ne=me,qe=q,Ye=Z;!Se&&Ne>0;)Ne--,qe=Math.floor(qe/2),Ye=Math.floor(Ye/2),Se=this.tiles[sn(Ne,qe,Ye)];return Se&&Se.source?(Te>1&&console.log("found parent tile z%d-%d-%d",Ne,qe,Ye),Te>1&&console.time("drilling down"),this.splitTile(Se.source,Ne,qe,Ye,me,q,Z),Te>1&&console.timeEnd("drilling down"),this.tiles[Pe]?ls(this.tiles[Pe],le):null):null};class Aa extends E{constructor(){super(...arguments),this._dataUpdateable=new Map}loadVectorTile(q,Z){return c._(this,void 0,void 0,function*(){const J=q.tileID.canonical;if(!this._geoJSONIndex)throw new Error("Unable to parse the data into a cluster or geojson");const le=this._geoJSONIndex.getTile(J.z,J.x,J.y);if(!le)return null;const Te=new class{constructor(Pe){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=c.W,this.length=Pe.length,this._features=Pe}feature(Pe){return new class{constructor(Se){this._feature=Se,this.extent=c.W,this.type=Se.type,this.properties=Se.tags,"id"in Se&&!isNaN(Se.id)&&(this.id=parseInt(Se.id,10))}loadGeometry(){if(this._feature.type===1){const Se=[];for(const Ne of this._feature.geometry)Se.push([new c.P(Ne[0],Ne[1])]);return Se}{const Se=[];for(const Ne of this._feature.geometry){const qe=[];for(const Ye of Ne)qe.push(new c.P(Ye[0],Ye[1]));Se.push(qe)}return Se}}toGeoJSON(Se,Ne,qe){return z.call(this,Se,Ne,qe)}}(this._features[Pe])}}(le.features);let Q=He(Te);return Q.byteOffset===0&&Q.byteLength===Q.buffer.byteLength||(Q=new Uint8Array(Q)),{vectorTile:Te,rawData:Q.buffer}})}loadData(q){return c._(this,void 0,void 0,function*(){var Z;(Z=this._pendingRequest)===null||Z===void 0||Z.abort();const J=!!(q&&q.request&&q.request.collectResourceTiming)&&new c.bs(q.request);this._pendingRequest=new AbortController;try{let le=yield this.loadGeoJSON(q,this._pendingRequest);if(delete this._pendingRequest,typeof le!="object")throw new Error(`Input data given to '${q.source}' is not a valid GeoJSON object.`);if(R(le,!0),q.filter){const Q=c.by(q.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(Q.result==="error")throw new Error(Q.value.map(Se=>`${Se.key}: ${Se.message}`).join(", "));le={type:"FeatureCollection",features:le.features.filter(Se=>Q.value.evaluate({zoom:0},Se))}}this._geoJSONIndex=q.cluster?new wn(function({superclusterOptions:Q,clusterProperties:Pe}){if(!Pe||!Q)return Q;const Se={},Ne={},qe={accumulated:null,zoom:0},Ye={properties:null},Je=Object.keys(Pe);for(const Dt of Je){const[zt,Qt]=Pe[Dt],tn=c.by(Qt),Mn=c.by(typeof zt=="string"?[zt,["accumulated"],["get",Dt]]:zt);Se[Dt]=tn.value,Ne[Dt]=Mn.value}return Q.map=Dt=>{Ye.properties=Dt;const zt={};for(const Qt of Je)zt[Qt]=Se[Qt].evaluate(qe,Ye);return zt},Q.reduce=(Dt,zt)=>{Ye.properties=zt;for(const Qt of Je)qe.accumulated=Dt[Qt],Dt[Qt]=Ne[Qt].evaluate(qe,Ye)},Q}(q)).load(le.features):function(Q,Pe){return new ln(Q,Pe)}(le,q.geojsonVtOptions),this.loaded={};const Te={};if(J){const Q=J.finish();Q&&(Te.resourceTiming={},Te.resourceTiming[q.source]=JSON.parse(JSON.stringify(Q)))}return Te}catch(le){if(delete this._pendingRequest,c.bz(le))return{abandoned:!0};throw le}})}reloadTile(q){const Z=this.loaded;return Z&&Z[q.uid]?super.reloadTile(q):this.loadTile(q)}loadGeoJSON(q,Z){return c._(this,void 0,void 0,function*(){const{promoteId:J}=q;if(q.request){const le=yield c.h(q.request,Z);return this._dataUpdateable=us(le.data,J)?on(le.data,J):void 0,le.data}if(typeof q.data=="string")try{const le=JSON.parse(q.data);return this._dataUpdateable=us(le,J)?on(le,J):void 0,le}catch{throw new Error(`Input data given to '${q.source}' is not a valid GeoJSON object.`)}if(!q.dataDiff)throw new Error(`Input data given to '${q.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${q.source}`);return function(le,Te,Q){var Pe,Se,Ne,qe;if(Te.removeAll&&le.clear(),Te.remove)for(const Ye of Te.remove)le.delete(Ye);if(Te.add)for(const Ye of Te.add){const Je=Zr(Ye,Q);Je!=null&&le.set(Je,Ye)}if(Te.update)for(const Ye of Te.update){let Je=le.get(Ye.id);if(Je==null)continue;const Dt=!Ye.removeAllProperties&&(((Pe=Ye.removeProperties)===null||Pe===void 0?void 0:Pe.length)>0||((Se=Ye.addOrUpdateProperties)===null||Se===void 0?void 0:Se.length)>0);if((Ye.newGeometry||Ye.removeAllProperties||Dt)&&(Je=Object.assign({},Je),le.set(Ye.id,Je),Dt&&(Je.properties=Object.assign({},Je.properties))),Ye.newGeometry&&(Je.geometry=Ye.newGeometry),Ye.removeAllProperties)Je.properties={};else if(((Ne=Ye.removeProperties)===null||Ne===void 0?void 0:Ne.length)>0)for(const zt of Ye.removeProperties)Object.prototype.hasOwnProperty.call(Je.properties,zt)&&delete Je.properties[zt];if(((qe=Ye.addOrUpdateProperties)===null||qe===void 0?void 0:qe.length)>0)for(const{key:zt,value:Qt}of Ye.addOrUpdateProperties)Je.properties[zt]=Qt}}(this._dataUpdateable,q.dataDiff,J),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}})}removeSource(q){return c._(this,void 0,void 0,function*(){this._pendingRequest&&this._pendingRequest.abort()})}getClusterExpansionZoom(q){return this._geoJSONIndex.getClusterExpansionZoom(q.clusterId)}getClusterChildren(q){return this._geoJSONIndex.getChildren(q.clusterId)}getClusterLeaves(q){return this._geoJSONIndex.getLeaves(q.clusterId,q.limit,q.offset)}}class Jr{constructor(q){this.self=q,this.actor=new c.C(q),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.self.registerWorkerSource=(Z,J)=>{if(this.externalWorkerSourceTypes[Z])throw new Error(`Worker source with name "${Z}" already registered.`);this.externalWorkerSourceTypes[Z]=J},this.self.addProtocol=c.bf,this.self.removeProtocol=c.bg,this.self.registerRTLTextPlugin=Z=>{if(c.bA.isParsed())throw new Error("RTL text plugin already registered.");c.bA.setMethods(Z)},this.actor.registerMessageHandler("LDT",(Z,J)=>this._getDEMWorkerSource(Z,J.source).loadTile(J)),this.actor.registerMessageHandler("RDT",(Z,J)=>c._(this,void 0,void 0,function*(){this._getDEMWorkerSource(Z,J.source).removeTile(J)})),this.actor.registerMessageHandler("GCEZ",(Z,J)=>c._(this,void 0,void 0,function*(){return this._getWorkerSource(Z,J.type,J.source).getClusterExpansionZoom(J)})),this.actor.registerMessageHandler("GCC",(Z,J)=>c._(this,void 0,void 0,function*(){return this._getWorkerSource(Z,J.type,J.source).getClusterChildren(J)})),this.actor.registerMessageHandler("GCL",(Z,J)=>c._(this,void 0,void 0,function*(){return this._getWorkerSource(Z,J.type,J.source).getClusterLeaves(J)})),this.actor.registerMessageHandler("LD",(Z,J)=>this._getWorkerSource(Z,J.type,J.source).loadData(J)),this.actor.registerMessageHandler("LT",(Z,J)=>this._getWorkerSource(Z,J.type,J.source).loadTile(J)),this.actor.registerMessageHandler("RT",(Z,J)=>this._getWorkerSource(Z,J.type,J.source).reloadTile(J)),this.actor.registerMessageHandler("AT",(Z,J)=>this._getWorkerSource(Z,J.type,J.source).abortTile(J)),this.actor.registerMessageHandler("RMT",(Z,J)=>this._getWorkerSource(Z,J.type,J.source).removeTile(J)),this.actor.registerMessageHandler("RS",(Z,J)=>c._(this,void 0,void 0,function*(){if(!this.workerSources[Z]||!this.workerSources[Z][J.type]||!this.workerSources[Z][J.type][J.source])return;const le=this.workerSources[Z][J.type][J.source];delete this.workerSources[Z][J.type][J.source],le.removeSource!==void 0&&le.removeSource(J)})),this.actor.registerMessageHandler("RM",Z=>c._(this,void 0,void 0,function*(){delete this.layerIndexes[Z],delete this.availableImages[Z],delete this.workerSources[Z],delete this.demWorkerSources[Z]})),this.actor.registerMessageHandler("SR",(Z,J)=>c._(this,void 0,void 0,function*(){this.referrer=J})),this.actor.registerMessageHandler("SRPS",(Z,J)=>this._syncRTLPluginState(Z,J)),this.actor.registerMessageHandler("IS",(Z,J)=>c._(this,void 0,void 0,function*(){this.self.importScripts(J)})),this.actor.registerMessageHandler("SI",(Z,J)=>this._setImages(Z,J)),this.actor.registerMessageHandler("UL",(Z,J)=>c._(this,void 0,void 0,function*(){this._getLayerIndex(Z).update(J.layers,J.removedIds)})),this.actor.registerMessageHandler("SL",(Z,J)=>c._(this,void 0,void 0,function*(){this._getLayerIndex(Z).replace(J)}))}_setImages(q,Z){return c._(this,void 0,void 0,function*(){this.availableImages[q]=Z;for(const J in this.workerSources[q]){const le=this.workerSources[q][J];for(const Te in le)le[Te].availableImages=Z}})}_syncRTLPluginState(q,Z){return c._(this,void 0,void 0,function*(){if(c.bA.isParsed())return c.bA.getState();if(Z.pluginStatus!=="loading")return c.bA.setState(Z),Z;const J=Z.pluginURL;if(this.self.importScripts(J),c.bA.isParsed()){const le={pluginStatus:"loaded",pluginURL:J};return c.bA.setState(le),le}throw c.bA.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${J}`)})}_getAvailableImages(q){let Z=this.availableImages[q];return Z||(Z=[]),Z}_getLayerIndex(q){let Z=this.layerIndexes[q];return Z||(Z=this.layerIndexes[q]=new l),Z}_getWorkerSource(q,Z,J){if(this.workerSources[q]||(this.workerSources[q]={}),this.workerSources[q][Z]||(this.workerSources[q][Z]={}),!this.workerSources[q][Z][J]){const le={sendAsync:(Te,Q)=>(Te.targetMapId=q,this.actor.sendAsync(Te,Q))};switch(Z){case"vector":this.workerSources[q][Z][J]=new E(le,this._getLayerIndex(q),this._getAvailableImages(q));break;case"geojson":this.workerSources[q][Z][J]=new Aa(le,this._getLayerIndex(q),this._getAvailableImages(q));break;default:this.workerSources[q][Z][J]=new this.externalWorkerSourceTypes[Z](le,this._getLayerIndex(q),this._getAvailableImages(q))}}return this.workerSources[q][Z][J]}_getDEMWorkerSource(q,Z){return this.demWorkerSources[q]||(this.demWorkerSources[q]={}),this.demWorkerSources[q][Z]||(this.demWorkerSources[q][Z]=new C),this.demWorkerSources[q][Z]}}return c.i(self)&&(self.worker=new Jr(self)),Jr}),i("index",["exports","./shared"],function(c,l){var d="4.1.3";let v,S;const E={now:typeof performance<"u"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frameAsync:y=>new Promise((a,f)=>{const m=requestAnimationFrame(a);y.signal.addEventListener("abort",()=>{cancelAnimationFrame(m),f(l.c())})}),getImageData(y,a=0){return this.getImageCanvasContext(y).getImageData(-a,-a,y.width+2*a,y.height+2*a)},getImageCanvasContext(y){const a=window.document.createElement("canvas"),f=a.getContext("2d",{willReadFrequently:!0});if(!f)throw new Error("failed to create canvas 2d context");return a.width=y.width,a.height=y.height,f.drawImage(y,0,0,y.width,y.height),f},resolveURL:y=>(v||(v=document.createElement("a")),v.href=y,v.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(S==null&&(S=matchMedia("(prefers-reduced-motion: reduce)")),S.matches)}};class C{static testProp(a){if(!C.docStyle)return a[0];for(let f=0;f{window.removeEventListener("click",C.suppressClickInternal,!0)},0)}static getScale(a){const f=a.getBoundingClientRect();return{x:f.width/a.offsetWidth||1,y:f.height/a.offsetHeight||1,boundingClientRect:f}}static getPoint(a,f,m){const g=f.boundingClientRect;return new l.P((m.clientX-g.left)/f.x-a.clientLeft,(m.clientY-g.top)/f.y-a.clientTop)}static mousePos(a,f){const m=C.getScale(a);return C.getPoint(a,m,f)}static touchPos(a,f){const m=[],g=C.getScale(a);for(let b=0;b{a=[],f=0,m=0,g={}},y.addThrottleControl=k=>{const N=m++;return g[N]=k,N},y.removeThrottleControl=k=>{delete g[k],T()},y.getImage=(k,N,V=!0)=>new Promise((j,$)=>{M.supported&&(k.headers||(k.headers={}),k.headers.accept="image/webp,*/*"),l.e(k,{type:"image"}),a.push({abortController:N,requestParameters:k,supportImageRefresh:V,state:"queued",onError:he=>{$(he)},onSuccess:he=>{j(he)}}),T()});const b=k=>l._(this,void 0,void 0,function*(){k.state="running";const{requestParameters:N,supportImageRefresh:V,onError:j,onSuccess:$,abortController:he}=k,ce=V===!1&&!l.i(self)&&!l.g(N.url)&&(!N.headers||Object.keys(N.headers).reduce((Ce,Be)=>Ce&&Be==="accept",!0));f++;const ge=ce?L(N,he):l.m(N,he);try{const Ce=yield ge;delete k.abortController,k.state="completed",Ce.data instanceof HTMLImageElement||l.b(Ce.data)?$(Ce):Ce.data&&$({data:yield(re=Ce.data,typeof createImageBitmap=="function"?l.d(re):l.f(re)),cacheControl:Ce.cacheControl,expires:Ce.expires})}catch(Ce){delete k.abortController,j(Ce)}finally{f--,T()}var re}),T=()=>{const k=(()=>{for(const N of Object.keys(g))if(g[N]())return!0;return!1})()?l.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:l.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let N=f;N0;N++){const V=a.shift();V.abortController.signal.aborted?N--:b(V)}},L=(k,N)=>new Promise((V,j)=>{const $=new Image,he=k.url,ce=k.credentials;ce&&ce==="include"?$.crossOrigin="use-credentials":(ce&&ce==="same-origin"||!l.s(he))&&($.crossOrigin="anonymous"),N.signal.addEventListener("abort",()=>{$.src="",j(l.c())}),$.fetchPriority="high",$.onload=()=>{$.onerror=$.onload=null,V({data:$})},$.onerror=()=>{$.onerror=$.onload=null,N.signal.aborted||j(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))},$.src=he})}(G||(G={})),G.resetRequestQueue();class H{constructor(a){this._transformRequestFn=a}transformRequest(a,f){return this._transformRequestFn&&this._transformRequestFn(a,f)||{url:a}}normalizeSpriteURL(a,f,m){const g=function(b){const T=b.match(te);if(!T)throw new Error(`Unable to parse URL "${b}"`);return{protocol:T[1],authority:T[2],path:T[3]||"/",params:T[4]?T[4].split("&"):[]}}(a);return g.path+=`${f}${m}`,function(b){const T=b.params.length?`?${b.params.join("&")}`:"";return`${b.protocol}://${b.authority}${b.path}${T}`}(g)}setTransformRequest(a){this._transformRequestFn=a}}const te=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function ee(y){var a=new l.A(3);return a[0]=y[0],a[1]=y[1],a[2]=y[2],a}var fe,pe=function(y,a,f){return y[0]=a[0]-f[0],y[1]=a[1]-f[1],y[2]=a[2]-f[2],y};fe=new l.A(3),l.A!=Float32Array&&(fe[0]=0,fe[1]=0,fe[2]=0);var se=function(y){var a=y[0],f=y[1];return a*a+f*f};function Ae(y){const a=[];if(typeof y=="string")a.push({id:"default",url:y});else if(y&&y.length>0){const f=[];for(const{id:m,url:g}of y){const b=`${m}${g}`;f.indexOf(b)===-1&&(f.push(b),a.push({id:m,url:g}))}}return a}(function(){var y=new l.A(2);l.A!=Float32Array&&(y[0]=0,y[1]=0)})();class Y{constructor(a,f,m,g){this.context=a,this.format=m,this.texture=a.gl.createTexture(),this.update(f,g)}update(a,f,m){const{width:g,height:b}=a,T=!(this.size&&this.size[0]===g&&this.size[1]===b||m),{context:L}=this,{gl:k}=L;if(this.useMipmap=!!(f&&f.useMipmap),k.bindTexture(k.TEXTURE_2D,this.texture),L.pixelStoreUnpackFlipY.set(!1),L.pixelStoreUnpack.set(1),L.pixelStoreUnpackPremultiplyAlpha.set(this.format===k.RGBA&&(!f||f.premultiply!==!1)),T)this.size=[g,b],a instanceof HTMLImageElement||a instanceof HTMLCanvasElement||a instanceof HTMLVideoElement||a instanceof ImageData||l.b(a)?k.texImage2D(k.TEXTURE_2D,0,this.format,this.format,k.UNSIGNED_BYTE,a):k.texImage2D(k.TEXTURE_2D,0,this.format,g,b,0,this.format,k.UNSIGNED_BYTE,a.data);else{const{x:N,y:V}=m||{x:0,y:0};a instanceof HTMLImageElement||a instanceof HTMLCanvasElement||a instanceof HTMLVideoElement||a instanceof ImageData||l.b(a)?k.texSubImage2D(k.TEXTURE_2D,0,N,V,k.RGBA,k.UNSIGNED_BYTE,a):k.texSubImage2D(k.TEXTURE_2D,0,N,V,g,b,k.RGBA,k.UNSIGNED_BYTE,a.data)}this.useMipmap&&this.isSizePowerOfTwo()&&k.generateMipmap(k.TEXTURE_2D)}bind(a,f,m){const{context:g}=this,{gl:b}=g;b.bindTexture(b.TEXTURE_2D,this.texture),m!==b.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(m=b.LINEAR),a!==this.filter&&(b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MAG_FILTER,a),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MIN_FILTER,m||a),this.filter=a),f!==this.wrap&&(b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_S,f),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_T,f),this.wrap=f)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){const{gl:a}=this.context;a.deleteTexture(this.texture),this.texture=null}}function ae(y){const{userImage:a}=y;return!!(a&&a.render&&a.render())&&(y.data.replace(new Uint8Array(a.data.buffer)),!0)}class Ke extends l.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new l.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(a){if(this.loaded!==a&&(this.loaded=a,a)){for(const{ids:f,promiseResolve:m}of this.requestors)m(this._getImagesForIds(f));this.requestors=[]}}getImage(a){const f=this.images[a];if(f&&!f.data&&f.spriteData){const m=f.spriteData;f.data=new l.R({width:m.width,height:m.height},m.context.getImageData(m.x,m.y,m.width,m.height).data),f.spriteData=null}return f}addImage(a,f){if(this.images[a])throw new Error(`Image id ${a} already exist, use updateImage instead`);this._validate(a,f)&&(this.images[a]=f)}_validate(a,f){let m=!0;const g=f.data||f.spriteData;return this._validateStretch(f.stretchX,g&&g.width)||(this.fire(new l.j(new Error(`Image "${a}" has invalid "stretchX" value`))),m=!1),this._validateStretch(f.stretchY,g&&g.height)||(this.fire(new l.j(new Error(`Image "${a}" has invalid "stretchY" value`))),m=!1),this._validateContent(f.content,f)||(this.fire(new l.j(new Error(`Image "${a}" has invalid "content" value`))),m=!1),m}_validateStretch(a,f){if(!a)return!0;let m=0;for(const g of a){if(g[0]{let g=!0;if(!this.isLoaded())for(const b of a)this.images[b]||(g=!1);this.isLoaded()||g?f(this._getImagesForIds(a)):this.requestors.push({ids:a,promiseResolve:f})})}_getImagesForIds(a){const f={};for(const m of a){let g=this.getImage(m);g||(this.fire(new l.k("styleimagemissing",{id:m})),g=this.getImage(m)),g?f[m]={data:g.data.clone(),pixelRatio:g.pixelRatio,sdf:g.sdf,version:g.version,stretchX:g.stretchX,stretchY:g.stretchY,content:g.content,hasRenderCallback:!!(g.userImage&&g.userImage.render)}:l.w(`Image "${m}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}return f}getPixelSize(){const{width:a,height:f}=this.atlasImage;return{width:a,height:f}}getPattern(a){const f=this.patterns[a],m=this.getImage(a);if(!m)return null;if(f&&f.position.version===m.version)return f.position;if(f)f.position.version=m.version;else{const g={w:m.data.width+2,h:m.data.height+2,x:0,y:0},b=new l.I(g,m);this.patterns[a]={bin:g,position:b}}return this._updatePatternAtlas(),this.patterns[a].position}bind(a){const f=a.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new Y(a,this.atlasImage,f.RGBA),this.atlasTexture.bind(f.LINEAR,f.CLAMP_TO_EDGE)}_updatePatternAtlas(){const a=[];for(const b in this.patterns)a.push(this.patterns[b].bin);const{w:f,h:m}=l.p(a),g=this.atlasImage;g.resize({width:f||1,height:m||1});for(const b in this.patterns){const{bin:T}=this.patterns[b],L=T.x+1,k=T.y+1,N=this.getImage(b).data,V=N.width,j=N.height;l.R.copy(N,g,{x:0,y:0},{x:L,y:k},{width:V,height:j}),l.R.copy(N,g,{x:0,y:j-1},{x:L,y:k-1},{width:V,height:1}),l.R.copy(N,g,{x:0,y:0},{x:L,y:k+j},{width:V,height:1}),l.R.copy(N,g,{x:V-1,y:0},{x:L-1,y:k},{width:1,height:j}),l.R.copy(N,g,{x:0,y:0},{x:L+V,y:k},{width:1,height:j})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(a){for(const f of a){if(this.callbackDispatchedThisFrame[f])continue;this.callbackDispatchedThisFrame[f]=!0;const m=this.getImage(f);m||l.w(`Image with ID: "${f}" was not found`),ae(m)&&this.updateImage(f,m)}}}const Le=1e20;function tt(y,a,f,m,g,b,T,L,k){for(let N=a;N-1);k++,b[k]=L,T[k]=N,T[k+1]=Le}for(let L=0,k=0;L65535)throw new Error("glyphs > 65535 not supported");if(m.ranges[b])return{stack:a,id:f,glyph:g};if(!this.url)throw new Error("glyphsUrl is not set");if(!m.requests[b]){const L=He.loadGlyphRange(a,b,this.url,this.requestManager);m.requests[b]=L}const T=yield m.requests[b];for(const L in T)this._doesCharSupportLocalGlyph(+L)||(m.glyphs[+L]=T[+L]);return m.ranges[b]=!0,{stack:a,id:f,glyph:T[f]||null}})}_doesCharSupportLocalGlyph(a){return!!this.localIdeographFontFamily&&(l.u["CJK Unified Ideographs"](a)||l.u["Hangul Syllables"](a)||l.u.Hiragana(a)||l.u.Katakana(a))}_tinySDF(a,f,m){const g=this.localIdeographFontFamily;if(!g||!this._doesCharSupportLocalGlyph(m))return;let b=a.tinySDF;if(!b){let L="400";/bold/i.test(f)?L="900":/medium/i.test(f)?L="500":/light/i.test(f)&&(L="200"),b=a.tinySDF=new He.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:g,fontWeight:L})}const T=b.draw(String.fromCharCode(m));return{id:m,bitmap:new l.o({width:T.width||60,height:T.height||60},T.data),metrics:{width:T.glyphWidth/2||24,height:T.glyphHeight/2||24,left:T.glyphLeft/2+.5||0,top:T.glyphTop/2-27.5||-8,advance:T.glyphAdvance/2||24,isDoubleResolution:!0}}}}He.loadGlyphRange=function(y,a,f,m){return l._(this,void 0,void 0,function*(){const g=256*a,b=g+255,T=m.transformRequest(f.replace("{fontstack}",y).replace("{range}",`${g}-${b}`),"Glyphs"),L=yield l.l(T,new AbortController);if(!L||!L.data)throw new Error(`Could not load glyph range. range: ${a}, ${g}-${b}`);const k={};for(const N of l.n(L.data))k[N.id]=N;return k})},He.TinySDF=class{constructor({fontSize:y=24,buffer:a=3,radius:f=8,cutoff:m=.25,fontFamily:g="sans-serif",fontWeight:b="normal",fontStyle:T="normal"}={}){this.buffer=a,this.cutoff=m,this.radius=f;const L=this.size=y+4*a,k=this._createCanvas(L),N=this.ctx=k.getContext("2d",{willReadFrequently:!0});N.font=`${T} ${b} ${y}px ${g}`,N.textBaseline="alphabetic",N.textAlign="left",N.fillStyle="black",this.gridOuter=new Float64Array(L*L),this.gridInner=new Float64Array(L*L),this.f=new Float64Array(L),this.z=new Float64Array(L+1),this.v=new Uint16Array(L)}_createCanvas(y){const a=document.createElement("canvas");return a.width=a.height=y,a}draw(y){const{width:a,actualBoundingBoxAscent:f,actualBoundingBoxDescent:m,actualBoundingBoxLeft:g,actualBoundingBoxRight:b}=this.ctx.measureText(y),T=Math.ceil(f),L=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(b-g))),k=Math.min(this.size-this.buffer,T+Math.ceil(m)),N=L+2*this.buffer,V=k+2*this.buffer,j=Math.max(N*V,0),$=new Uint8ClampedArray(j),he={data:$,width:N,height:V,glyphWidth:L,glyphHeight:k,glyphTop:T,glyphLeft:0,glyphAdvance:a};if(L===0||k===0)return he;const{ctx:ce,buffer:ge,gridInner:re,gridOuter:Ce}=this;ce.clearRect(ge,ge,L,k),ce.fillText(y,ge,ge+T);const Be=ce.getImageData(ge,ge,L,k);Ce.fill(Le,0,j),re.fill(0,0,j);for(let ve=0;ve0?$e*$e:0,re[Ze]=$e<0?$e*$e:0}}tt(Ce,0,0,N,V,N,this.f,this.v,this.z),tt(re,ge,ge,L,k,N,this.f,this.v,this.z);for(let ve=0;ve1&&(k=a[++L]);const V=Math.abs(N-k.left),j=Math.abs(N-k.right),$=Math.min(V,j);let he;const ce=b/m*(g+1);if(k.isDash){const ge=g-Math.abs(ce);he=Math.sqrt($*$+ge*ge)}else he=g-Math.sqrt($*$+ce*ce);this.data[T+N]=Math.max(0,Math.min(255,he+128))}}}addRegularDash(a){for(let L=a.length-1;L>=0;--L){const k=a[L],N=a[L+1];k.zeroLength?a.splice(L,1):N&&N.isDash===k.isDash&&(N.left=k.left,a.splice(L,1))}const f=a[0],m=a[a.length-1];f.isDash===m.isDash&&(f.left=m.left-this.width,m.right=f.right+this.width);const g=this.width*this.nextRow;let b=0,T=a[b];for(let L=0;L1&&(T=a[++b]);const k=Math.abs(L-T.left),N=Math.abs(L-T.right),V=Math.min(k,N);this.data[g+L]=Math.max(0,Math.min(255,(T.isDash?V:-V)+128))}}addDash(a,f){const m=f?7:0,g=2*m+1;if(this.nextRow+g>this.height)return l.w("LineAtlas out of space"),null;let b=0;for(let L=0;L{f.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[Mt]}numActive(){return Object.keys(this.active).length}}const wn=Math.floor(E.hardwareConcurrency/2);let fn,_n;function pn(){return fn||(fn=new rn),fn}rn.workerCount=l.B(globalThis)?Math.max(Math.min(wn,3),1):1;class Yn{constructor(a,f){this.workerPool=a,this.actors=[],this.currentActor=0,this.id=f;const m=this.workerPool.acquire(f);for(let g=0;g{f.remove()}),this.actors=[],a&&this.workerPool.release(this.id)}registerMessageHandler(a,f){for(const m of this.actors)m.registerMessageHandler(a,f)}}function zr(){return _n||(_n=new Yn(pn(),l.G),_n.registerMessageHandler("GR",(y,a,f)=>l.m(a,f))),_n}function Pn(y,a){const f=l.F();return l.H(f,f,[1,1,0]),l.J(f,f,[.5*y.width,.5*y.height,1]),l.K(f,f,y.calculatePosMatrix(a.toUnwrapped()))}function ar(y,a,f,m,g,b){const T=function(j,$,he){if(j)for(const ce of j){const ge=$[ce];if(ge&&ge.source===he&&ge.type==="fill-extrusion")return!0}else for(const ce in $){const ge=$[ce];if(ge.source===he&&ge.type==="fill-extrusion")return!0}return!1}(g&&g.layers,a,y.id),L=b.maxPitchScaleFactor(),k=y.tilesIn(m,L,T);k.sort(Zn);const N=[];for(const j of k)N.push({wrappedTileID:j.tileID.wrapped().key,queryResults:j.tile.queryRenderedFeatures(a,f,y._state,j.queryGeometry,j.cameraQueryGeometry,j.scale,g,b,L,Pn(y.transform,j.tileID))});const V=function(j){const $={},he={};for(const ce of j){const ge=ce.queryResults,re=ce.wrappedTileID,Ce=he[re]=he[re]||{};for(const Be in ge){const ve=ge[Be],De=Ce[Be]=Ce[Be]||{},Ve=$[Be]=$[Be]||[];for(const Ze of ve)De[Ze.featureIndex]||(De[Ze.featureIndex]=!0,Ve.push(Ze))}}return $}(N);for(const j in V)V[j].forEach($=>{const he=$.feature,ce=y.getFeatureState(he.layer["source-layer"],he.id);he.source=he.layer.source,he.layer["source-layer"]&&(he.sourceLayer=he.layer["source-layer"]),he.state=ce});return V}function Zn(y,a){const f=y.tileID,m=a.tileID;return f.overscaledZ-m.overscaledZ||f.canonical.y-m.canonical.y||f.wrap-m.wrap||f.canonical.x-m.canonical.x}function ne(y,a,f){return l._(this,void 0,void 0,function*(){let m=y;if(y.url?m=(yield l.h(a.transformRequest(y.url,"Source"),f)).data:yield E.frameAsync(f),!m)return null;const g=l.L(l.e(m,y),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in m&&m.vector_layers&&(g.vectorLayerIds=m.vector_layers.map(b=>b.id)),g})}class Me{constructor(a,f){a&&(f?this.setSouthWest(a).setNorthEast(f):Array.isArray(a)&&(a.length===4?this.setSouthWest([a[0],a[1]]).setNorthEast([a[2],a[3]]):this.setSouthWest(a[0]).setNorthEast(a[1])))}setNorthEast(a){return this._ne=a instanceof l.M?new l.M(a.lng,a.lat):l.M.convert(a),this}setSouthWest(a){return this._sw=a instanceof l.M?new l.M(a.lng,a.lat):l.M.convert(a),this}extend(a){const f=this._sw,m=this._ne;let g,b;if(a instanceof l.M)g=a,b=a;else{if(!(a instanceof Me))return Array.isArray(a)?a.length===4||a.every(Array.isArray)?this.extend(Me.convert(a)):this.extend(l.M.convert(a)):a&&("lng"in a||"lon"in a)&&"lat"in a?this.extend(l.M.convert(a)):this;if(g=a._sw,b=a._ne,!g||!b)return this}return f||m?(f.lng=Math.min(g.lng,f.lng),f.lat=Math.min(g.lat,f.lat),m.lng=Math.max(b.lng,m.lng),m.lat=Math.max(b.lat,m.lat)):(this._sw=new l.M(g.lng,g.lat),this._ne=new l.M(b.lng,b.lat)),this}getCenter(){return new l.M((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new l.M(this.getWest(),this.getNorth())}getSouthEast(){return new l.M(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(a){const{lng:f,lat:m}=l.M.convert(a);let g=this._sw.lng<=f&&f<=this._ne.lng;return this._sw.lng>this._ne.lng&&(g=this._sw.lng>=f&&f>=this._ne.lng),this._sw.lat<=m&&m<=this._ne.lat&&g}static convert(a){return a instanceof Me?a:a&&new Me(a)}static fromLngLat(a,f=0){const m=360*f/40075017,g=m/Math.cos(Math.PI/180*a.lat);return new Me(new l.M(a.lng-g,a.lat-m),new l.M(a.lng+g,a.lat+m))}}class dt{constructor(a,f,m){this.bounds=Me.convert(this.validateBounds(a)),this.minzoom=f||0,this.maxzoom=m||24}validateBounds(a){return Array.isArray(a)&&a.length===4?[Math.max(-180,a[0]),Math.max(-90,a[1]),Math.min(180,a[2]),Math.min(90,a[3])]:[-180,-90,180,90]}contains(a){const f=Math.pow(2,a.z),m=Math.floor(l.N(this.bounds.getWest())*f),g=Math.floor(l.O(this.bounds.getNorth())*f),b=Math.ceil(l.N(this.bounds.getEast())*f),T=Math.ceil(l.O(this.bounds.getSouth())*f);return a.x>=m&&a.x=g&&a.y{this._options.tiles=a}),this}setUrl(a){return this.setSourceProperty(()=>{this.url=a,this._options.url=a}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return l.e({},this._options)}loadTile(a){return l._(this,void 0,void 0,function*(){const f=a.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),m={request:this.map._requestManager.transformRequest(f,"Tile"),uid:a.uid,tileID:a.tileID,zoom:a.tileID.overscaledZ,tileSize:this.tileSize*a.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};m.request.collectResourceTiming=this._collectResourceTiming;let g="RT";if(a.actor&&a.state!=="expired"){if(a.state==="loading")return new Promise((b,T)=>{a.reloadPromise={resolve:b,reject:T}})}else a.actor=this.dispatcher.getActor(),g="LT";a.abortController=new AbortController;try{const b=yield a.actor.sendAsync({type:g,data:m},a.abortController);if(delete a.abortController,a.aborted)return;this._afterTileLoadWorkerResponse(a,b)}catch(b){if(delete a.abortController,a.aborted)return;if(b&&b.status!==404)throw b;this._afterTileLoadWorkerResponse(a,null)}})}_afterTileLoadWorkerResponse(a,f){if(f&&f.resourceTiming&&(a.resourceTiming=f.resourceTiming),f&&this.map._refreshExpiredTiles&&a.setExpiryData(f),a.loadVectorData(f,this.map.painter),a.reloadPromise){const m=a.reloadPromise;a.reloadPromise=null,this.loadTile(a).then(m.resolve).catch(m.reject)}}abortTile(a){return l._(this,void 0,void 0,function*(){a.abortController&&(a.abortController.abort(),delete a.abortController),a.actor&&(yield a.actor.sendAsync({type:"AT",data:{uid:a.uid,type:this.type,source:this.id}}))})}unloadTile(a){return l._(this,void 0,void 0,function*(){a.unloadVectorData(),a.actor&&(yield a.actor.sendAsync({type:"RMT",data:{uid:a.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}}class Re extends l.E{constructor(a,f,m,g){super(),this.id=a,this.dispatcher=m,this.setEventedParent(g),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=l.e({type:"raster"},f),l.e(this,l.L(f,["url","scheme","tileSize"]))}load(){return l._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new l.k("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{const a=yield ne(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,a&&(l.e(this,a),a.bounds&&(this.tileBounds=new dt(a.bounds,this.minzoom,this.maxzoom)),this.fire(new l.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new l.k("data",{dataType:"source",sourceDataType:"content"})))}catch(a){this._tileJSONRequest=null,this.fire(new l.j(a))}})}loaded(){return this._loaded}onAdd(a){this.map=a,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(a){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),a(),this.load()}setTiles(a){return this.setSourceProperty(()=>{this._options.tiles=a}),this}setUrl(a){return this.setSourceProperty(()=>{this.url=a,this._options.url=a}),this}serialize(){return l.e({},this._options)}hasTile(a){return!this.tileBounds||this.tileBounds.contains(a.canonical)}loadTile(a){return l._(this,void 0,void 0,function*(){const f=a.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);a.abortController=new AbortController;try{const m=yield G.getImage(this.map._requestManager.transformRequest(f,"Tile"),a.abortController,this.map._refreshExpiredTiles);if(delete a.abortController,a.aborted)return void(a.state="unloaded");if(m&&m.data){this.map._refreshExpiredTiles&&m.cacheControl&&m.expires&&a.setExpiryData({cacheControl:m.cacheControl,expires:m.expires});const g=this.map.painter.context,b=g.gl,T=m.data;a.texture=this.map.painter.getTileTexture(T.width),a.texture?a.texture.update(T,{useMipmap:!0}):(a.texture=new Y(g,T,b.RGBA,{useMipmap:!0}),a.texture.bind(b.LINEAR,b.CLAMP_TO_EDGE,b.LINEAR_MIPMAP_NEAREST),g.extTextureFilterAnisotropic&&b.texParameterf(b.TEXTURE_2D,g.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,g.extTextureFilterAnisotropicMax)),a.state="loaded"}}catch(m){if(delete a.abortController,a.aborted)a.state="unloaded";else if(m)throw a.state="errored",m}})}abortTile(a){return l._(this,void 0,void 0,function*(){a.abortController&&(a.abortController.abort(),delete a.abortController)})}unloadTile(a){return l._(this,void 0,void 0,function*(){a.texture&&this.map.painter.saveTileTexture(a.texture)})}hasTransition(){return!1}}class It extends Re{constructor(a,f,m,g){super(a,f,m,g),this.type="raster-dem",this.maxzoom=22,this._options=l.e({type:"raster-dem"},f),this.encoding=f.encoding||"mapbox",this.redFactor=f.redFactor,this.greenFactor=f.greenFactor,this.blueFactor=f.blueFactor,this.baseShift=f.baseShift}loadTile(a){return l._(this,void 0,void 0,function*(){const f=a.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),m=this.map._requestManager.transformRequest(f,"Tile");a.neighboringTiles=this._getNeighboringTiles(a.tileID),a.abortController=new AbortController;try{const g=yield G.getImage(m,a.abortController,this.map._refreshExpiredTiles);if(delete a.abortController,a.aborted)return void(a.state="unloaded");if(g&&g.data){const b=g.data;this.map._refreshExpiredTiles&&g.cacheControl&&g.expires&&a.setExpiryData({cacheControl:g.cacheControl,expires:g.expires});const T=l.b(b)&&l.S()?b:yield this.readImageNow(b),L={type:this.type,uid:a.uid,source:this.id,rawImageData:T,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(!a.actor||a.state==="expired"){a.actor=this.dispatcher.getActor();const k=yield a.actor.sendAsync({type:"LDT",data:L});a.dem=k,a.needsHillshadePrepare=!0,a.needsTerrainPrepare=!0,a.state="loaded"}}}catch(g){if(delete a.abortController,a.aborted)a.state="unloaded";else if(g)throw a.state="errored",g}})}readImageNow(a){return l._(this,void 0,void 0,function*(){if(typeof VideoFrame<"u"&&l.U()){const f=a.width+2,m=a.height+2;try{return new l.R({width:f,height:m},yield l.V(a,-1,-1,f,m))}catch{}}return E.getImageData(a,1)})}_getNeighboringTiles(a){const f=a.canonical,m=Math.pow(2,f.z),g=(f.x-1+m)%m,b=f.x===0?a.wrap-1:a.wrap,T=(f.x+1+m)%m,L=f.x+1===m?a.wrap+1:a.wrap,k={};return k[new l.Q(a.overscaledZ,b,f.z,g,f.y).key]={backfilled:!1},k[new l.Q(a.overscaledZ,L,f.z,T,f.y).key]={backfilled:!1},f.y>0&&(k[new l.Q(a.overscaledZ,b,f.z,g,f.y-1).key]={backfilled:!1},k[new l.Q(a.overscaledZ,a.wrap,f.z,f.x,f.y-1).key]={backfilled:!1},k[new l.Q(a.overscaledZ,L,f.z,T,f.y-1).key]={backfilled:!1}),f.y+10&&l.e(b,{resourceTiming:g}),this.fire(new l.k("data",Object.assign(Object.assign({},b),{sourceDataType:"metadata"}))),this.fire(new l.k("data",Object.assign(Object.assign({},b),{sourceDataType:"content"})))}catch(m){if(this._pendingLoads--,this._removed)return void this.fire(new l.k("dataabort",{dataType:"source"}));this.fire(new l.j(m))}})}loaded(){return this._pendingLoads===0}loadTile(a){return l._(this,void 0,void 0,function*(){const f=a.actor?"RT":"LT";a.actor=this.actor;const m={type:this.type,uid:a.uid,tileID:a.tileID,zoom:a.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};a.abortController=new AbortController;const g=yield this.actor.sendAsync({type:f,data:m},a.abortController);delete a.abortController,a.unloadVectorData(),a.aborted||a.loadVectorData(g,this.map.painter,f==="RT")})}abortTile(a){return l._(this,void 0,void 0,function*(){a.abortController&&(a.abortController.abort(),delete a.abortController),a.aborted=!0})}unloadTile(a){return l._(this,void 0,void 0,function*(){a.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:a.uid,type:this.type,source:this.id}})})}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return l.e({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}var yn=l.X([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class hr extends l.E{constructor(a,f,m,g){super(),this.id=a,this.dispatcher=m,this.coordinates=f.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(g),this.options=f}load(a){return l._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new l.k("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{const f=yield G.getImage(this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,f&&f.data&&(this.image=f.data,a&&(this.coordinates=a),this._finishLoading())}catch(f){this._request=null,this._loaded=!0,this.fire(new l.j(f))}})}loaded(){return this._loaded}updateImage(a){return a.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=a.url,this.load(a.coordinates).finally(()=>{this.texture=null}),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new l.k("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(a){this.map=a,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(a){this.coordinates=a;const f=a.map(l.Y.fromLngLat);this.tileID=function(g){let b=1/0,T=1/0,L=-1/0,k=-1/0;for(const $ of g)b=Math.min(b,$.x),T=Math.min(T,$.y),L=Math.max(L,$.x),k=Math.max(k,$.y);const N=Math.max(L-b,k-T),V=Math.max(0,Math.floor(-Math.log(N)/Math.LN2)),j=Math.pow(2,V);return new l.a0(V,Math.floor((b+L)/2*j),Math.floor((T+k)/2*j))}(f),this.minzoom=this.maxzoom=this.tileID.z;const m=f.map(g=>this.tileID.getTilePoint(g)._round());return this._boundsArray=new l.Z,this._boundsArray.emplaceBack(m[0].x,m[0].y,0,0),this._boundsArray.emplaceBack(m[1].x,m[1].y,l.W,0),this._boundsArray.emplaceBack(m[3].x,m[3].y,0,l.W),this._boundsArray.emplaceBack(m[2].x,m[2].y,l.W,l.W),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new l.k("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;const a=this.map.painter.context,f=a.gl;this.boundsBuffer||(this.boundsBuffer=a.createVertexBuffer(this._boundsArray,yn.members)),this.boundsSegments||(this.boundsSegments=l.$.simpleSegment(0,0,4,2)),this.texture||(this.texture=new Y(a,this.image,f.RGBA),this.texture.bind(f.LINEAR,f.CLAMP_TO_EDGE));let m=!1;for(const g in this.tiles){const b=this.tiles[g];b.state!=="loaded"&&(b.state="loaded",b.texture=this.texture,m=!0)}m&&this.fire(new l.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(a){return l._(this,void 0,void 0,function*(){this.tileID&&this.tileID.equals(a.tileID.canonical)?(this.tiles[String(a.tileID.wrap)]=a,a.buckets={}):a.state="errored"})}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}class jo extends hr{constructor(a,f,m,g){super(a,f,m,g),this.roundZoom=!0,this.type="video",this.options=f}load(){return l._(this,void 0,void 0,function*(){this._loaded=!1;const a=this.options;this.urls=[];for(const f of a.urls)this.urls.push(this.map._requestManager.transformRequest(f,"Source").url);try{const f=yield l.a2(this.urls);if(this._loaded=!0,!f)return;this.video=f,this.video.loop=!0,this.video.addEventListener("playing",()=>{this.map.triggerRepaint()}),this.map&&this.video.play(),this._finishLoading()}catch(f){this.fire(new l.j(f))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(a){if(this.video){const f=this.video.seekable;af.end(0)?this.fire(new l.j(new l.a1(`sources.${this.id}`,null,`Playback for this video can be set only between the ${f.start(0)} and ${f.end(0)}-second mark.`))):this.video.currentTime=a}}getVideo(){return this.video}onAdd(a){this.map||(this.map=a,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}prepare(){if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;const a=this.map.painter.context,f=a.gl;this.boundsBuffer||(this.boundsBuffer=a.createVertexBuffer(this._boundsArray,yn.members)),this.boundsSegments||(this.boundsSegments=l.$.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(f.LINEAR,f.CLAMP_TO_EDGE),f.texSubImage2D(f.TEXTURE_2D,0,0,0,f.RGBA,f.UNSIGNED_BYTE,this.video)):(this.texture=new Y(a,this.video,f.RGBA),this.texture.bind(f.LINEAR,f.CLAMP_TO_EDGE));let m=!1;for(const g in this.tiles){const b=this.tiles[g];b.state!=="loaded"&&(b.state="loaded",b.texture=this.texture,m=!0)}m&&this.fire(new l.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class Cs extends hr{constructor(a,f,m,g){super(a,f,m,g),f.coordinates?Array.isArray(f.coordinates)&&f.coordinates.length===4&&!f.coordinates.some(b=>!Array.isArray(b)||b.length!==2||b.some(T=>typeof T!="number"))||this.fire(new l.j(new l.a1(`sources.${a}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new l.j(new l.a1(`sources.${a}`,null,'missing required property "coordinates"'))),f.animate&&typeof f.animate!="boolean"&&this.fire(new l.j(new l.a1(`sources.${a}`,null,'optional "animate" property must be a boolean value'))),f.canvas?typeof f.canvas=="string"||f.canvas instanceof HTMLCanvasElement||this.fire(new l.j(new l.a1(`sources.${a}`,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new l.j(new l.a1(`sources.${a}`,null,'missing required property "canvas"'))),this.options=f,this.animate=f.animate===void 0||f.animate}load(){return l._(this,void 0,void 0,function*(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new l.j(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())})}getCanvas(){return this.canvas}onAdd(a){this.map=a,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let a=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,a=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,a=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;const f=this.map.painter.context,m=f.gl;this.boundsBuffer||(this.boundsBuffer=f.createVertexBuffer(this._boundsArray,yn.members)),this.boundsSegments||(this.boundsSegments=l.$.simpleSegment(0,0,4,2)),this.texture?(a||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new Y(f,this.canvas,m.RGBA,{premultiply:!0});let g=!1;for(const b in this.tiles){const T=this.tiles[b];T.state!=="loaded"&&(T.state="loaded",T.texture=this.texture,g=!0)}g&&this.fire(new l.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(const a of[this.canvas.width,this.canvas.height])if(isNaN(a)||a<=0)return!0;return!1}}const Ks={},tl=y=>{switch(y){case"geojson":return Cn;case"image":return hr;case"raster":return Re;case"raster-dem":return It;case"vector":return en;case"video":return jo;case"canvas":return Cs}return Ks[y]},Fi="RTLPluginLoaded";class zl extends l.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=zr()}_syncState(a){return this.status=a,this.dispatcher.broadcast("SRPS",{pluginStatus:a,pluginURL:this.url}).catch(f=>{throw this.status="error",f})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(a){return l._(this,arguments,void 0,function*(f,m=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=E.resolveURL(f),!this.url)throw new Error(`requested url ${f} is invalid`);if(this.status==="unavailable"){if(!m)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()})}_requestImport(){return l._(this,void 0,void 0,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new l.k(Fi))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let Ts=null;function at(){return Ts||(Ts=new zl),Ts}class ls{constructor(a,f){this.timeAdded=0,this.fadeEndTime=0,this.tileID=a,this.uid=l.a3(),this.uses=0,this.tileSize=f,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttCoords={},this.expiredRequestCount=0,this.state="loading"}registerFadeDuration(a){const f=a+this.timeAdded;fb.getLayer(N)).filter(Boolean);if(k.length!==0){L.layers=k,L.stateDependentLayerIds&&(L.stateDependentLayers=L.stateDependentLayerIds.map(N=>k.filter(V=>V.id===N)[0]));for(const N of k)T[N.id]=L}}return T}(a.buckets,f.style),this.hasSymbolBuckets=!1;for(const g in this.buckets){const b=this.buckets[g];if(b instanceof l.a5){if(this.hasSymbolBuckets=!0,!m)break;b.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(const g in this.buckets){const b=this.buckets[g];if(b instanceof l.a5&&b.hasRTLText){this.hasRTLText=!0,at().lazyLoad();break}}this.queryPadding=0;for(const g in this.buckets){const b=this.buckets[g];this.queryPadding=Math.max(this.queryPadding,f.style.getLayer(g).queryRadius(b))}a.imageAtlas&&(this.imageAtlas=a.imageAtlas),a.glyphAtlasImage&&(this.glyphAtlasImage=a.glyphAtlasImage)}else this.collisionBoxArray=new l.a4}unloadVectorData(){for(const a in this.buckets)this.buckets[a].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"}getBucket(a){return this.buckets[a.id]}upload(a){for(const m in this.buckets){const g=this.buckets[m];g.uploadPending()&&g.upload(a)}const f=a.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new Y(a,this.imageAtlas.image,f.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new Y(a,this.glyphAtlasImage,f.ALPHA),this.glyphAtlasImage=null)}prepare(a){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(a,this.imageAtlasTexture)}queryRenderedFeatures(a,f,m,g,b,T,L,k,N,V){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:g,cameraQueryGeometry:b,scale:T,tileSize:this.tileSize,pixelPosMatrix:V,transform:k,params:L,queryPadding:this.queryPadding*N},a,f,m):{}}querySourceFeatures(a,f){const m=this.latestFeatureIndex;if(!m||!m.rawTileData)return;const g=m.loadVTLayers(),b=f&&f.sourceLayer?f.sourceLayer:"",T=g._geojsonTileLayer||g[b];if(!T)return;const L=l.a6(f&&f.filter),{z:k,x:N,y:V}=this.tileID.canonical,j={z:k,x:N,y:V};for(let $=0;$m)g=!1;else if(f)if(this.expirationTime{this.remove(a,b)},m)),this.data[g].push(b),this.order.push(g),this.order.length>this.max){const T=this._getAndRemoveByKey(this.order[0]);T&&this.onRemove(T)}return this}has(a){return a.wrapped().key in this.data}getAndRemove(a){return this.has(a)?this._getAndRemoveByKey(a.wrapped().key):null}_getAndRemoveByKey(a){const f=this.data[a].shift();return f.timeout&&clearTimeout(f.timeout),this.data[a].length===0&&delete this.data[a],this.order.splice(this.order.indexOf(a),1),f.value}getByKey(a){const f=this.data[a];return f?f[0].value:null}get(a){return this.has(a)?this.data[a.wrapped().key][0].value:null}remove(a,f){if(!this.has(a))return this;const m=a.wrapped().key,g=f===void 0?0:this.data[m].indexOf(f),b=this.data[m][g];return this.data[m].splice(g,1),b.timeout&&clearTimeout(b.timeout),this.data[m].length===0&&delete this.data[m],this.onRemove(b.value),this.order.splice(this.order.indexOf(m),1),this}setMaxSize(a){for(this.max=a;this.order.length>this.max;){const f=this._getAndRemoveByKey(this.order[0]);f&&this.onRemove(f)}return this}filter(a){const f=[];for(const m in this.data)for(const g of this.data[m])a(g.value)||f.push(g);for(const m of f)this.remove(m.value.tileID,m)}}class Fl{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(a,f,m){const g=String(f);if(this.stateChanges[a]=this.stateChanges[a]||{},this.stateChanges[a][g]=this.stateChanges[a][g]||{},l.e(this.stateChanges[a][g],m),this.deletedStates[a]===null){this.deletedStates[a]={};for(const b in this.state[a])b!==g&&(this.deletedStates[a][b]=null)}else if(this.deletedStates[a]&&this.deletedStates[a][g]===null){this.deletedStates[a][g]={};for(const b in this.state[a][g])m[b]||(this.deletedStates[a][g][b]=null)}else for(const b in m)this.deletedStates[a]&&this.deletedStates[a][g]&&this.deletedStates[a][g][b]===null&&delete this.deletedStates[a][g][b]}removeFeatureState(a,f,m){if(this.deletedStates[a]===null)return;const g=String(f);if(this.deletedStates[a]=this.deletedStates[a]||{},m&&f!==void 0)this.deletedStates[a][g]!==null&&(this.deletedStates[a][g]=this.deletedStates[a][g]||{},this.deletedStates[a][g][m]=null);else if(f!==void 0)if(this.stateChanges[a]&&this.stateChanges[a][g])for(m in this.deletedStates[a][g]={},this.stateChanges[a][g])this.deletedStates[a][g][m]=null;else this.deletedStates[a][g]=null;else this.deletedStates[a]=null}getState(a,f){const m=String(f),g=l.e({},(this.state[a]||{})[m],(this.stateChanges[a]||{})[m]);if(this.deletedStates[a]===null)return{};if(this.deletedStates[a]){const b=this.deletedStates[a][f];if(b===null)return{};for(const T in b)delete g[T]}return g}initializeTileState(a,f){a.setFeatureState(this.state,f)}coalesceChanges(a,f){const m={};for(const g in this.stateChanges){this.state[g]=this.state[g]||{};const b={};for(const T in this.stateChanges[g])this.state[g][T]||(this.state[g][T]={}),l.e(this.state[g][T],this.stateChanges[g][T]),b[T]=this.state[g][T];m[g]=b}for(const g in this.deletedStates){this.state[g]=this.state[g]||{};const b={};if(this.deletedStates[g]===null)for(const T in this.state[g])b[T]={},this.state[g][T]={};else for(const T in this.deletedStates[g]){if(this.deletedStates[g][T]===null)this.state[g][T]={};else for(const L of Object.keys(this.deletedStates[g][T]))delete this.state[g][T][L];b[T]=this.state[g][T]}m[g]=m[g]||{},l.e(m[g],b)}if(this.stateChanges={},this.deletedStates={},Object.keys(m).length!==0)for(const g in a)a[g].setFeatureState(m,f)}}class ui extends l.E{constructor(a,f,m){super(),this.id=a,this.dispatcher=m,this.on("data",g=>this._dataHandler(g)),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((g,b,T,L)=>{const k=new(tl(b.type))(g,b,T,L);if(k.id!==g)throw new Error(`Expected Source id to be ${g} instead of ${k.id}`);return k})(a,f,m,this),this._tiles={},this._cache=new lo(0,g=>this._unloadTile(g)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new Fl,this._didEmitContent=!1,this._updated=!1}onAdd(a){this.map=a,this._maxTileCacheSize=a?a._maxTileCacheSize:null,this._maxTileCacheZoomLevels=a?a._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(a)}onRemove(a){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(a)}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;if(!(this.used===void 0&&this.usedForTerrain===void 0||this.used||this.usedForTerrain))return!0;if(!this._updated)return!1;for(const a in this._tiles){const f=this._tiles[a];if(f.state!=="loaded"&&f.state!=="errored")return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;const a=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,a&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(a,f,m){return l._(this,void 0,void 0,function*(){try{yield this._source.loadTile(a),this._tileLoaded(a,f,m)}catch(g){a.state="errored",g.status!==404?this._source.fire(new l.j(g,{tile:a})):this.update(this.transform,this.terrain)}})}_unloadTile(a){this._source.unloadTile&&this._source.unloadTile(a)}_abortTile(a){this._source.abortTile&&this._source.abortTile(a),this._source.fire(new l.k("dataabort",{tile:a,coord:a.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(a){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(const f in this._tiles){const m=this._tiles[f];m.upload(a),m.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map(a=>a.tileID).sort(ft).map(a=>a.key)}getRenderableIds(a){const f=[];for(const m in this._tiles)this._isIdRenderable(m,a)&&f.push(this._tiles[m]);return a?f.sort((m,g)=>{const b=m.tileID,T=g.tileID,L=new l.P(b.canonical.x,b.canonical.y)._rotate(this.transform.angle),k=new l.P(T.canonical.x,T.canonical.y)._rotate(this.transform.angle);return b.overscaledZ-T.overscaledZ||k.y-L.y||k.x-L.x}).map(m=>m.tileID.key):f.map(m=>m.tileID).sort(ft).map(m=>m.key)}hasRenderableParent(a){const f=this.findLoadedParent(a,0);return!!f&&this._isIdRenderable(f.tileID.key)}_isIdRenderable(a,f){return this._tiles[a]&&this._tiles[a].hasData()&&!this._coveredTiles[a]&&(f||!this._tiles[a].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(const a in this._tiles)this._tiles[a].state!=="errored"&&this._reloadTile(a,"reloading")}}_reloadTile(a,f){return l._(this,void 0,void 0,function*(){const m=this._tiles[a];m&&(m.state!=="loading"&&(m.state=f),yield this._loadTile(m,a,f))})}_tileLoaded(a,f,m){a.timeAdded=E.now(),m==="expired"&&(a.refreshedUponExpiration=!0),this._setTileReloadTimer(f,a),this.getSource().type==="raster-dem"&&a.dem&&this._backfillDEM(a),this._state.initializeTileState(a,this.map?this.map.painter:null),a.aborted||this._source.fire(new l.k("data",{dataType:"source",tile:a,coord:a.tileID}))}_backfillDEM(a){const f=this.getRenderableIds();for(let g=0;g1||(Math.abs(T)>1&&(Math.abs(T+k)===1?T+=k:Math.abs(T-k)===1&&(T-=k)),b.dem&&g.dem&&(g.dem.backfillBorder(b.dem,T,L),g.neighboringTiles&&g.neighboringTiles[N]&&(g.neighboringTiles[N].backfilled=!0)))}}getTile(a){return this.getTileByID(a.key)}getTileByID(a){return this._tiles[a]}_retainLoadedChildren(a,f,m,g){for(const b in this._tiles){let T=this._tiles[b];if(g[b]||!T.hasData()||T.tileID.overscaledZ<=f||T.tileID.overscaledZ>m)continue;let L=T.tileID;for(;T&&T.tileID.overscaledZ>f+1;){const N=T.tileID.scaledTo(T.tileID.overscaledZ-1);T=this._tiles[N.key],T&&T.hasData()&&(L=N)}let k=L;for(;k.overscaledZ>f;)if(k=k.scaledTo(k.overscaledZ-1),a[k.key]){g[L.key]=L;break}}}findLoadedParent(a,f){if(a.key in this._loadedParentTiles){const m=this._loadedParentTiles[a.key];return m&&m.tileID.overscaledZ>=f?m:null}for(let m=a.overscaledZ-1;m>=f;m--){const g=a.scaledTo(m),b=this._getLoadedTile(g);if(b)return b}}_getLoadedTile(a){const f=this._tiles[a.key];return f&&f.hasData()?f:this._cache.getByKey(a.wrapped().key)}updateCacheSize(a){const f=Math.ceil(a.width/this._source.tileSize)+1,m=Math.ceil(a.height/this._source.tileSize)+1,g=Math.floor(f*m*(this._maxTileCacheZoomLevels===null?l.a.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),b=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,g):g;this._cache.setMaxSize(b)}handleWrapJump(a){const f=Math.round((a-(this._prevLng===void 0?a:this._prevLng))/360);if(this._prevLng=a,f){const m={};for(const g in this._tiles){const b=this._tiles[g];b.tileID=b.tileID.unwrapTo(b.tileID.wrap+f),m[b.tileID.key]=b}this._tiles=m;for(const g in this._timers)clearTimeout(this._timers[g]),delete this._timers[g];for(const g in this._tiles)this._setTileReloadTimer(g,this._tiles[g])}}update(a,f){if(!this._sourceLoaded||this._paused)return;let m;this.transform=a,this.terrain=f,this.updateCacheSize(a),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?m=a.getVisibleUnwrappedCoordinates(this._source.tileID).map(V=>new l.Q(V.canonical.z,V.wrap,V.canonical.z,V.canonical.x,V.canonical.y)):(m=a.coveringTiles({tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:f}),this._source.hasTile&&(m=m.filter(V=>this._source.hasTile(V)))):m=[];const g=a.coveringZoomLevel(this._source),b=Math.max(g-ui.maxOverzooming,this._source.minzoom),T=Math.max(g+ui.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){const V={};for(const j of m)if(j.canonical.z>this._source.minzoom){const $=j.scaledTo(j.canonical.z-1);V[$.key]=$;const he=j.scaledTo(Math.max(this._source.minzoom,Math.min(j.canonical.z,5)));V[he.key]=he}m=m.concat(Object.values(V))}const L=m.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,L&&this.fire(new l.k("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));const k=this._updateRetainedTiles(m,g);if(ln(this._source.type)){const V={},j={},$=Object.keys(k),he=E.now();for(const ce of $){const ge=k[ce],re=this._tiles[ce];if(!re||re.fadeEndTime!==0&&re.fadeEndTime<=he)continue;const Ce=this.findLoadedParent(ge,b);Ce&&(this._addTile(Ce.tileID),V[Ce.tileID.key]=Ce.tileID),j[ce]=ge}this._retainLoadedChildren(j,g,T,k);for(const ce in V)k[ce]||(this._coveredTiles[ce]=!0,k[ce]=V[ce]);if(f){const ce={},ge={};for(const re of m)this._tiles[re.key].hasData()?ce[re.key]=re:ge[re.key]=re;for(const re in ge){const Ce=ge[re].children(this._source.maxzoom);this._tiles[Ce[0].key]&&this._tiles[Ce[1].key]&&this._tiles[Ce[2].key]&&this._tiles[Ce[3].key]&&(ce[Ce[0].key]=k[Ce[0].key]=Ce[0],ce[Ce[1].key]=k[Ce[1].key]=Ce[1],ce[Ce[2].key]=k[Ce[2].key]=Ce[2],ce[Ce[3].key]=k[Ce[3].key]=Ce[3],delete ge[re])}for(const re in ge){const Ce=this.findLoadedParent(ge[re],this._source.minzoom);if(Ce){ce[Ce.tileID.key]=k[Ce.tileID.key]=Ce.tileID;for(const Be in ce)ce[Be].isChildOf(Ce.tileID)&&delete ce[Be]}}for(const re in this._tiles)ce[re]||(this._coveredTiles[re]=!0)}}for(const V in k)this._tiles[V].clearFadeHold();const N=l.ab(this._tiles,k);for(const V of N){const j=this._tiles[V];j.hasSymbolBuckets&&!j.holdingForFade()?j.setHoldDuration(this.map._fadeDuration):j.hasSymbolBuckets&&!j.symbolFadeFinished()||this._removeTile(V)}this._updateLoadedParentTileCache()}releaseSymbolFadeTiles(){for(const a in this._tiles)this._tiles[a].holdingForFade()&&this._removeTile(a)}_updateRetainedTiles(a,f){const m={},g={},b=Math.max(f-ui.maxOverzooming,this._source.minzoom),T=Math.max(f+ui.maxUnderzooming,this._source.minzoom),L={};for(const k of a){const N=this._addTile(k);m[k.key]=k,N.hasData()||fthis._source.maxzoom){const j=k.children(this._source.maxzoom)[0],$=this.getTile(j);if($&&$.hasData()){m[j.key]=j;continue}}else{const j=k.children(this._source.maxzoom);if(m[j[0].key]&&m[j[1].key]&&m[j[2].key]&&m[j[3].key])continue}let V=N.wasRequested();for(let j=k.overscaledZ-1;j>=b;--j){const $=k.scaledTo(j);if(g[$.key])break;if(g[$.key]=!0,N=this.getTile($),!N&&V&&(N=this._addTile($)),N){const he=N.hasData();if((V||he)&&(m[$.key]=$),V=N.wasRequested(),he)break}}}return m}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(const a in this._tiles){const f=[];let m,g=this._tiles[a].tileID;for(;g.overscaledZ>0;){if(g.key in this._loadedParentTiles){m=this._loadedParentTiles[g.key];break}f.push(g.key);const b=g.scaledTo(g.overscaledZ-1);if(m=this._getLoadedTile(b),m)break;g=b}for(const b of f)this._loadedParentTiles[b]=m}}_addTile(a){let f=this._tiles[a.key];if(f)return f;f=this._cache.getAndRemove(a),f&&(this._setTileReloadTimer(a.key,f),f.tileID=a,this._state.initializeTileState(f,this.map?this.map.painter:null),this._cacheTimers[a.key]&&(clearTimeout(this._cacheTimers[a.key]),delete this._cacheTimers[a.key],this._setTileReloadTimer(a.key,f)));const m=f;return f||(f=new ls(a,this._source.tileSize*a.overscaleFactor()),this._loadTile(f,a.key,f.state)),f.uses++,this._tiles[a.key]=f,m||this._source.fire(new l.k("dataloading",{tile:f,coord:f.tileID,dataType:"source"})),f}_setTileReloadTimer(a,f){a in this._timers&&(clearTimeout(this._timers[a]),delete this._timers[a]);const m=f.getExpiryTimeout();m&&(this._timers[a]=setTimeout(()=>{this._reloadTile(a,"expired"),delete this._timers[a]},m))}_removeTile(a){const f=this._tiles[a];f&&(f.uses--,delete this._tiles[a],this._timers[a]&&(clearTimeout(this._timers[a]),delete this._timers[a]),f.uses>0||(f.hasData()&&f.state!=="reloading"?this._cache.add(f.tileID,f,f.getExpiryTimeout()):(f.aborted=!0,this._abortTile(f),this._unloadTile(f))))}_dataHandler(a){const f=a.sourceDataType;a.dataType==="source"&&f==="metadata"&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&a.dataType==="source"&&f==="content"&&(this.reload(),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(const a in this._tiles)this._removeTile(a);this._cache.reset()}tilesIn(a,f,m){const g=[],b=this.transform;if(!b)return g;const T=m?b.getCameraQueryGeometry(a):a,L=a.map(ce=>b.pointCoordinate(ce,this.terrain)),k=T.map(ce=>b.pointCoordinate(ce,this.terrain)),N=this.getIds();let V=1/0,j=1/0,$=-1/0,he=-1/0;for(const ce of k)V=Math.min(V,ce.x),j=Math.min(j,ce.y),$=Math.max($,ce.x),he=Math.max(he,ce.y);for(let ce=0;ce=0&&ve[1].y+Be>=0){const De=L.map(Ze=>re.getTilePoint(Ze)),Ve=k.map(Ze=>re.getTilePoint(Ze));g.push({tile:ge,tileID:re,queryGeometry:De,cameraQueryGeometry:Ve,scale:Ce})}}return g}getVisibleCoordinates(a){const f=this.getRenderableIds(a).map(m=>this._tiles[m].tileID);for(const m of f)m.posMatrix=this.transform.calculatePosMatrix(m.toUnwrapped());return f}hasTransition(){if(this._source.hasTransition())return!0;if(ln(this._source.type)){const a=E.now();for(const f in this._tiles)if(this._tiles[f].fadeEndTime>=a)return!0}return!1}setFeatureState(a,f,m){this._state.updateState(a=a||"_geojsonTileLayer",f,m)}removeFeatureState(a,f,m){this._state.removeFeatureState(a=a||"_geojsonTileLayer",f,m)}getFeatureState(a,f){return this._state.getState(a=a||"_geojsonTileLayer",f)}setDependencies(a,f,m){const g=this._tiles[a];g&&g.setDependencies(f,m)}reloadTilesForDependencies(a,f){for(const m in this._tiles)this._tiles[m].hasDependency(a,f)&&this._reloadTile(m,"reloading");this._cache.filter(m=>!m.hasDependency(a,f))}}function ft(y,a){const f=Math.abs(2*y.wrap)-+(y.wrap<0),m=Math.abs(2*a.wrap)-+(a.wrap<0);return y.overscaledZ-a.overscaledZ||m-f||a.canonical.y-y.canonical.y||a.canonical.x-y.canonical.x}function ln(y){return y==="raster"||y==="image"||y==="video"}ui.maxOverzooming=10,ui.maxUnderzooming=3;class sn{constructor(a,f){this.reset(a,f)}reset(a,f){this.points=a||[],this._distances=[0];for(let m=1;m0?(g-T)/L:0;return this.points[b].mult(1-k).add(this.points[f].mult(k))}}function Zr(y,a){let f=!0;return y==="always"||y!=="never"&&a!=="never"||(f=!1),f}class us{constructor(a,f,m){const g=this.boxCells=[],b=this.circleCells=[];this.xCellCount=Math.ceil(a/m),this.yCellCount=Math.ceil(f/m);for(let T=0;Tthis.width||g<0||f>this.height)return[];const k=[];if(a<=0&&f<=0&&this.width<=m&&this.height<=g){if(b)return[{key:null,x1:a,y1:f,x2:m,y2:g}];for(let N=0;N0}hitTestCircle(a,f,m,g,b){const T=a-m,L=a+m,k=f-m,N=f+m;if(L<0||T>this.width||N<0||k>this.height)return!1;const V=[];return this._forEachCell(T,k,L,N,this._queryCellCircle,V,{hitTest:!0,overlapMode:g,circle:{x:a,y:f,radius:m},seenUids:{box:{},circle:{}}},b),V.length>0}_queryCell(a,f,m,g,b,T,L,k){const{seenUids:N,hitTest:V,overlapMode:j}=L,$=this.boxCells[b];if($!==null){const ce=this.bboxes;for(const ge of $)if(!N.box[ge]){N.box[ge]=!0;const re=4*ge,Ce=this.boxKeys[ge];if(a<=ce[re+2]&&f<=ce[re+3]&&m>=ce[re+0]&&g>=ce[re+1]&&(!k||k(Ce))&&(!V||!Zr(j,Ce.overlapMode))&&(T.push({key:Ce,x1:ce[re],y1:ce[re+1],x2:ce[re+2],y2:ce[re+3]}),V))return!0}}const he=this.circleCells[b];if(he!==null){const ce=this.circles;for(const ge of he)if(!N.circle[ge]){N.circle[ge]=!0;const re=3*ge,Ce=this.circleKeys[ge];if(this._circleAndRectCollide(ce[re],ce[re+1],ce[re+2],a,f,m,g)&&(!k||k(Ce))&&(!V||!Zr(j,Ce.overlapMode))){const Be=ce[re],ve=ce[re+1],De=ce[re+2];if(T.push({key:Ce,x1:Be-De,y1:ve-De,x2:Be+De,y2:ve+De}),V)return!0}}}return!1}_queryCellCircle(a,f,m,g,b,T,L,k){const{circle:N,seenUids:V,overlapMode:j}=L,$=this.boxCells[b];if($!==null){const ce=this.bboxes;for(const ge of $)if(!V.box[ge]){V.box[ge]=!0;const re=4*ge,Ce=this.boxKeys[ge];if(this._circleAndRectCollide(N.x,N.y,N.radius,ce[re+0],ce[re+1],ce[re+2],ce[re+3])&&(!k||k(Ce))&&!Zr(j,Ce.overlapMode))return T.push(!0),!0}}const he=this.circleCells[b];if(he!==null){const ce=this.circles;for(const ge of he)if(!V.circle[ge]){V.circle[ge]=!0;const re=3*ge,Ce=this.circleKeys[ge];if(this._circlesCollide(ce[re],ce[re+1],ce[re+2],N.x,N.y,N.radius)&&(!k||k(Ce))&&!Zr(j,Ce.overlapMode))return T.push(!0),!0}}}_forEachCell(a,f,m,g,b,T,L,k){const N=this._convertToXCellCoord(a),V=this._convertToYCellCoord(f),j=this._convertToXCellCoord(m),$=this._convertToYCellCoord(g);for(let he=N;he<=j;he++)for(let ce=V;ce<=$;ce++)if(b.call(this,a,f,m,g,this.xCellCount*ce+he,T,L,k))return}_convertToXCellCoord(a){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(a*this.xScale)))}_convertToYCellCoord(a){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(a*this.yScale)))}_circlesCollide(a,f,m,g,b,T){const L=g-a,k=b-f,N=m+T;return N*N>L*L+k*k}_circleAndRectCollide(a,f,m,g,b,T,L){const k=(T-g)/2,N=Math.abs(a-(g+k));if(N>k+m)return!1;const V=(L-b)/2,j=Math.abs(f-(b+V));if(j>V+m)return!1;if(N<=k||j<=V)return!0;const $=N-k,he=j-V;return $*$+he*he<=m*m}}function on(y,a,f,m,g){const b=l.F();return a?(l.J(b,b,[1/g,1/g,1]),f||l.ad(b,b,m.angle)):l.K(b,m.labelPlaneMatrix,y),b}function Aa(y,a,f,m,g){if(a){const b=l.ae(y);return l.J(b,b,[g,g,1]),f||l.ad(b,b,-m.angle),b}return m.glCoordMatrix}function Jr(y,a,f){let m;f?(m=[y.x,y.y,f(y.x,y.y),1],l.af(m,m,a)):(m=[y.x,y.y,0,1],Dt(m,m,a));const g=m[3];return{point:new l.P(m[0]/g,m[1]/g),signedDistanceFromCamera:g}}function me(y,a){return .5+y/a*.5}function q(y,a){const f=y[0]/y[3],m=y[1]/y[3];return f>=-a[0]&&f<=a[0]&&m>=-a[1]&&m<=a[1]}function Z(y,a,f,m,g,b,T,L,k,N){const V=m?y.textSizeData:y.iconSizeData,j=l.ag(V,f.transform.zoom),$=[256/f.width*2+1,256/f.height*2+1],he=m?y.text.dynamicLayoutVertexArray:y.icon.dynamicLayoutVertexArray;he.clear();const ce=y.lineVertexArray,ge=m?y.text.placedSymbolArray:y.icon.placedSymbolArray,re=f.transform.width/f.transform.height;let Ce=!1;for(let Be=0;BeMath.abs(f.x-a.x)*m?{useVertical:!0}:(y===l.ah.vertical?a.yf.x)?{needsFlipping:!0}:null}function Te(y,a,f,m,g,b,T,L,k,N,V,j,$,he,ce,ge){const re=a/24,Ce=y.lineOffsetX*re,Be=y.lineOffsetY*re;let ve;if(y.numGlyphs>1){const De=y.glyphStartIndex+y.numGlyphs,Ve=y.lineStartIndex,Ze=y.lineStartIndex+y.lineLength,$e=J(re,L,Ce,Be,f,V,j,y,k,b,$,ce,ge);if(!$e)return{notEnoughRoom:!0};const rt=Jr($e.first.point,T,ge).point,nt=Jr($e.last.point,T,ge).point;if(m&&!f){const ct=le(y.writingMode,rt,nt,he);if(ct)return ct}ve=[$e.first];for(let ct=y.glyphStartIndex+1;ct0?rt.point:Q(j,$e,Ve,1,g,ge),ct=le(y.writingMode,Ve,nt,he);if(ct)return ct}const De=qe(re*L.getoffsetX(y.glyphStartIndex),Ce,Be,f,V,j,y.segment,y.lineStartIndex,y.lineStartIndex+y.lineLength,k,b,$,ce,ge);if(!De)return{notEnoughRoom:!0};ve=[De]}for(const De of ve)l.aj(N,De.point,De.angle);return{}}function Q(y,a,f,m,g,b){const T=Jr(y.add(y.sub(a)._unit()),g,b).point,L=f.sub(T);return f.add(L._mult(m/L.mag()))}function Pe(y,a){const{projectionCache:f,lineVertexArray:m,labelPlaneMatrix:g,tileAnchorPoint:b,distanceFromAnchor:T,getElevation:L,previousVertex:k,direction:N,absOffsetX:V}=a;if(f.projections[y])return f.projections[y];const j=new l.P(m.getx(y),m.gety(y)),$=Jr(j,g,L);if($.signedDistanceFromCamera>0)return f.projections[y]=$.point,$.point;const he=y-N;return Q(T===0?b:new l.P(m.getx(he),m.gety(he)),j,k,V-T+1,g,L)}function Se(y,a,f){return y._unit()._perp()._mult(a*f)}function Ne(y,a,f,m,g,b,T,L){const{projectionCache:k,direction:N}=L;if(k.offsets[y])return k.offsets[y];const V=f.add(a);if(y+N=g)return k.offsets[y]=V,V;const j=Pe(y+N,L),$=Se(j.sub(f),T,N),he=f.add($),ce=j.add($);return k.offsets[y]=l.ak(b,V,he,ce)||V,k.offsets[y]}function qe(y,a,f,m,g,b,T,L,k,N,V,j,$,he){const ce=m?y-a:y+a;let ge=ce>0?1:-1,re=0;m&&(ge*=-1,re=Math.PI),ge<0&&(re+=Math.PI);let Ce,Be,ve=ge>0?L+T:L+T+1,De=g,Ve=g,Ze=0,$e=0;const rt=Math.abs(ce),nt=[];let ct;for(;Ze+$e<=rt;){if(ve+=ge,ve=k)return null;Ze+=$e,Ve=De,Be=Ce;const gt={projectionCache:j,lineVertexArray:N,labelPlaneMatrix:V,tileAnchorPoint:b,distanceFromAnchor:Ze,getElevation:he,previousVertex:Ve,direction:ge,absOffsetX:rt};if(De=Pe(ve,gt),f===0)nt.push(Ve),ct=De.sub(Ve);else{let Ht;const cn=De.sub(Ve);Ht=cn.mag()===0?Se(Pe(ve+ge,gt).sub(De),f,ge):Se(cn,f,ge),Be||(Be=Ve.add(Ht)),Ce=Ne(ve,Ht,De,L,k,Be,f,gt),nt.push(Be),ct=Ce.sub(Be)}$e=ct.mag()}const pt=ct._mult((rt-Ze)/$e)._add(Be||Ve),un=re+Math.atan2(De.y-Ve.y,De.x-Ve.x);return nt.push(pt),{point:pt,angle:$?un:0,path:nt}}const Ye=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Je(y,a){for(let f=0;f=1;mn--)cn.push(gt.path[mn]);for(let mn=1;mnJr(bn,k,ce));cn=mn.some(bn=>bn.signedDistanceFromCamera<=0)?[]:mn.map(bn=>bn.point)}let Jt=[];if(cn.length>0){const mn=cn[0].clone(),bn=cn[0].clone();for(let Ur=1;Ur=ct.x&&bn.x<=pt.x&&mn.y>=ct.y&&bn.y<=pt.y?[cn]:bn.xpt.x||bn.ypt.y?[]:l.al([cn],ct.x,ct.y,pt.x,pt.y)}for(const mn of Jt){un.reset(mn,.25*nt);let bn=0;bn=un.length<=.5*nt?1:Math.ceil(un.paddedLength/kn)+1;for(let Ur=0;Ur=this.screenRightBoundary||gthis.screenBottomBoundary}isInsideGrid(a,f,m,g){return m>=0&&a=0&&fm.collisionGroupID===f}}return this.collisionGroups[a]}}function _i(y,a,f,m,g){const{horizontalAlign:b,verticalAlign:T}=l.at(y);return new l.P(-(b-.5)*a+m[0]*g,-(T-.5)*f+m[1]*g)}function uo(y,a,f,m,g,b){const{x1:T,x2:L,y1:k,y2:N,anchorPointX:V,anchorPointY:j}=y,$=new l.P(a,f);return m&&$._rotate(g?b:-b),{x1:T+$.x,y1:k+$.y,x2:L+$.x,y2:N+$.y,anchorPointX:V,anchorPointY:j}}class Eo{constructor(a,f,m,g,b){this.transform=a.clone(),this.terrain=f,this.collisionIndex=new Qt(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=m,this.retainedQueryData={},this.collisionGroups=new Fr(g),this.collisionCircleArrays={},this.prevPlacement=b,b&&(b.prevPlacement=void 0),this.placedOrientations={}}getBucketParts(a,f,m,g){const b=m.getBucket(f),T=m.latestFeatureIndex;if(!b||!T||f.id!==b.layerIds[0])return;const L=m.collisionBoxArray,k=b.layers[0].layout,N=Math.pow(2,this.transform.zoom-m.tileID.overscaledZ),V=m.tileSize/l.W,j=this.transform.calculatePosMatrix(m.tileID.toUnwrapped()),$=k.get("text-pitch-alignment")==="map",he=k.get("text-rotation-alignment")==="map",ce=tn(m,1,this.transform.zoom),ge=on(j,$,he,this.transform,ce);let re=null;if($){const Be=Aa(j,$,he,this.transform,ce);re=l.K([],this.transform.labelPlaneMatrix,Be)}this.retainedQueryData[b.bucketInstanceId]=new dn(b.bucketInstanceId,T,b.sourceLayerIndex,b.index,m.tileID);const Ce={bucket:b,layout:k,posMatrix:j,textLabelPlaneMatrix:ge,labelToScreenMatrix:re,scale:N,textPixelRatio:V,holdingForFade:m.holdingForFade(),collisionBoxArray:L,partiallyEvaluatedTextSize:l.ag(b.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(b.sourceID)};if(g)for(const Be of b.sortKeyRanges){const{sortKey:ve,symbolInstanceStart:De,symbolInstanceEnd:Ve}=Be;a.push({sortKey:ve,symbolInstanceStart:De,symbolInstanceEnd:Ve,parameters:Ce})}else a.push({symbolInstanceStart:0,symbolInstanceEnd:b.symbolInstances.length,parameters:Ce})}attemptAnchorPlacement(a,f,m,g,b,T,L,k,N,V,j,$,he,ce,ge,re){const Ce=l.ap[a.textAnchor],Be=[a.textOffset0,a.textOffset1],ve=_i(Ce,m,g,Be,b),De=this.collisionIndex.placeCollisionBox(uo(f,ve.x,ve.y,T,L,this.transform.angle),j,k,N,V.predicate,re);if((!ge||this.collisionIndex.placeCollisionBox(uo(ge,ve.x,ve.y,T,L,this.transform.angle),j,k,N,V.predicate,re).box.length!==0)&&De.box.length>0){let Ve;if(this.prevPlacement&&this.prevPlacement.variableOffsets[$.crossTileID]&&this.prevPlacement.placements[$.crossTileID]&&this.prevPlacement.placements[$.crossTileID].text&&(Ve=this.prevPlacement.variableOffsets[$.crossTileID].anchor),$.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[$.crossTileID]={textOffset:Be,width:m,height:g,anchor:Ce,textBoxScale:b,prevAnchor:Ve},this.markUsedJustification(he,Ce,$,ce),he.allowVerticalPlacement&&(this.markUsedOrientation(he,ce,$),this.placedOrientations[$.crossTileID]=ce),{shift:ve,placedGlyphBoxes:De}}}placeLayerBucketPart(a,f,m){const{bucket:g,layout:b,posMatrix:T,textLabelPlaneMatrix:L,labelToScreenMatrix:k,textPixelRatio:N,holdingForFade:V,collisionBoxArray:j,partiallyEvaluatedTextSize:$,collisionGroup:he}=a.parameters,ce=b.get("text-optional"),ge=b.get("icon-optional"),re=l.aq(b,"text-overlap","text-allow-overlap"),Ce=re==="always",Be=l.aq(b,"icon-overlap","icon-allow-overlap"),ve=Be==="always",De=b.get("text-rotation-alignment")==="map",Ve=b.get("text-pitch-alignment")==="map",Ze=b.get("icon-text-fit")!=="none",$e=b.get("symbol-z-order")==="viewport-y",rt=Ce&&(ve||!g.hasIconData()||ge),nt=ve&&(Ce||!g.hasTextData()||ce);!g.collisionArrays&&j&&g.deserializeCollisionBoxes(j);const ct=this.retainedQueryData[g.bucketInstanceId].tileID,pt=this.terrain?(gt,Ht)=>this.terrain.getElevation(ct,gt,Ht):null,un=(gt,Ht)=>{var cn,kn;if(f[gt.crossTileID])return;if(V)return void(this.placements[gt.crossTileID]=new vr(!1,!1,!1));let Jt=!1,mn=!1,bn=!0,Ur=null,Jn={box:null,offscreen:null},Ho={box:null,offscreen:null},yi=null,Mr=null,vi=null,Zo=0,ra=0,ll=0;Ht.textFeatureIndex?Zo=Ht.textFeatureIndex:gt.useRuntimeCollisionCircles&&(Zo=gt.featureIndex),Ht.verticalTextFeatureIndex&&(ra=Ht.verticalTextFeatureIndex);const Bc=Ht.textBox;if(Bc){const fi=pi=>{let kr=l.ah.horizontal;if(g.allowVerticalPlacement&&!pi&&this.prevPlacement){const ps=this.prevPlacement.placedOrientations[gt.crossTileID];ps&&(this.placedOrientations[gt.crossTileID]=ps,kr=ps,this.markUsedOrientation(g,kr,gt))}return kr},Ar=(pi,kr)=>{if(g.allowVerticalPlacement&>.numVerticalGlyphVertices>0&&Ht.verticalTextBox){for(const ps of g.writingModes)if(ps===l.ah.vertical?(Jn=kr(),Ho=Jn):Jn=pi(),Jn&&Jn.box&&Jn.box.length)break}else Jn=pi()},xr=gt.textAnchorOffsetStartIndex,fs=gt.textAnchorOffsetEndIndex;if(fs===xr){const pi=(kr,ps)=>{const di=this.collisionIndex.placeCollisionBox(kr,re,N,T,he.predicate,pt);return di&&di.box&&di.box.length&&(this.markUsedOrientation(g,ps,gt),this.placedOrientations[gt.crossTileID]=ps),di};Ar(()=>pi(Bc,l.ah.horizontal),()=>{const kr=Ht.verticalTextBox;return g.allowVerticalPlacement&>.numVerticalGlyphVertices>0&&kr?pi(kr,l.ah.vertical):{box:null,offscreen:null}}),fi(Jn&&Jn.box&&Jn.box.length)}else{let pi=l.ap[(kn=(cn=this.prevPlacement)===null||cn===void 0?void 0:cn.variableOffsets[gt.crossTileID])===null||kn===void 0?void 0:kn.anchor];const kr=(di,Xr,$p)=>{const dg=di.x2-di.x1,Zl=di.y2-di.y1,Xl=gt.textBoxScale,ef=Ze&&Be==="never"?Xr:null;let cl={box:[],offscreen:!1},Kp=re==="never"?1:2,mg="never";pi&&Kp++;for(let Jp=0;Jpkr(Bc,Ht.iconBox,l.ah.horizontal),()=>{const di=Ht.verticalTextBox;return g.allowVerticalPlacement&&!(Jn&&Jn.box&&Jn.box.length)&>.numVerticalGlyphVertices>0&&di?kr(di,Ht.verticalIconBox,l.ah.vertical):{box:null,offscreen:null}}),Jn&&(Jt=Jn.box,bn=Jn.offscreen);const ps=fi(Jn&&Jn.box);if(!Jt&&this.prevPlacement){const di=this.prevPlacement.variableOffsets[gt.crossTileID];di&&(this.variableOffsets[gt.crossTileID]=di,this.markUsedJustification(g,di.anchor,gt,ps))}}}if(yi=Jn,Jt=yi&&yi.box&&yi.box.length>0,bn=yi&&yi.offscreen,gt.useRuntimeCollisionCircles){const fi=g.text.placedSymbolArray.get(gt.centerJustifiedTextSymbolIndex),Ar=l.ai(g.textSizeData,$,fi),xr=b.get("text-padding");Mr=this.collisionIndex.placeCollisionCircles(re,fi,g.lineVertexArray,g.glyphOffsetArray,Ar,T,L,k,m,Ve,he.predicate,gt.collisionCircleDiameter,xr,pt),Mr.circles.length&&Mr.collisionDetected&&!m&&l.w("Collisions detected, but collision boxes are not shown"),Jt=Ce||Mr.circles.length>0&&!Mr.collisionDetected,bn=bn&&Mr.offscreen}if(Ht.iconFeatureIndex&&(ll=Ht.iconFeatureIndex),Ht.iconBox){const fi=Ar=>{const xr=Ze&&Ur?uo(Ar,Ur.x,Ur.y,De,Ve,this.transform.angle):Ar;return this.collisionIndex.placeCollisionBox(xr,Be,N,T,he.predicate,pt)};Ho&&Ho.box&&Ho.box.length&&Ht.verticalIconBox?(vi=fi(Ht.verticalIconBox),mn=vi.box.length>0):(vi=fi(Ht.iconBox),mn=vi.box.length>0),bn=bn&&vi.offscreen}const ul=ce||gt.numHorizontalGlyphVertices===0&>.numVerticalGlyphVertices===0,ia=ge||gt.numIconVertices===0;if(ul||ia?ia?ul||(mn=mn&&Jt):Jt=mn&&Jt:mn=Jt=mn&&Jt,Jt&&yi&&yi.box&&this.collisionIndex.insertCollisionBox(yi.box,re,b.get("text-ignore-placement"),g.bucketInstanceId,Ho&&Ho.box&&ra?ra:Zo,he.ID),mn&&vi&&this.collisionIndex.insertCollisionBox(vi.box,Be,b.get("icon-ignore-placement"),g.bucketInstanceId,ll,he.ID),Mr&&(Jt&&this.collisionIndex.insertCollisionCircles(Mr.circles,re,b.get("text-ignore-placement"),g.bucketInstanceId,Zo,he.ID),m)){const fi=g.bucketInstanceId;let Ar=this.collisionCircleArrays[fi];Ar===void 0&&(Ar=this.collisionCircleArrays[fi]=new ci);for(let xr=0;xr=0;--Ht){const cn=gt[Ht];un(g.symbolInstances.get(cn),g.collisionArrays[cn])}}else for(let gt=a.symbolInstanceStart;gt=0&&(a.text.placedSymbolArray.get(L).crossTileID=b>=0&&L!==b?0:m.crossTileID)}markUsedOrientation(a,f,m){const g=f===l.ah.horizontal||f===l.ah.horizontalOnly?f:0,b=f===l.ah.vertical?f:0,T=[m.leftJustifiedTextSymbolIndex,m.centerJustifiedTextSymbolIndex,m.rightJustifiedTextSymbolIndex];for(const L of T)a.text.placedSymbolArray.get(L).placedOrientation=g;m.verticalPlacedTextSymbolIndex&&(a.text.placedSymbolArray.get(m.verticalPlacedTextSymbolIndex).placedOrientation=b)}commit(a){this.commitTime=a,this.zoomAtLastRecencyCheck=this.transform.zoom;const f=this.prevPlacement;let m=!1;this.prevZoomAdjustment=f?f.zoomAdjustment(this.transform.zoom):0;const g=f?f.symbolFadeChange(a):1,b=f?f.opacities:{},T=f?f.variableOffsets:{},L=f?f.placedOrientations:{};for(const k in this.placements){const N=this.placements[k],V=b[k];V?(this.opacities[k]=new er(V,g,N.text,N.icon),m=m||N.text!==V.text.placed||N.icon!==V.icon.placed):(this.opacities[k]=new er(null,g,N.text,N.icon,N.skipFade),m=m||N.text||N.icon)}for(const k in b){const N=b[k];if(!this.opacities[k]){const V=new er(N,g,!1,!1);V.isHidden()||(this.opacities[k]=V,m=m||N.text.placed||N.icon.placed)}}for(const k in T)this.variableOffsets[k]||!this.opacities[k]||this.opacities[k].isHidden()||(this.variableOffsets[k]=T[k]);for(const k in L)this.placedOrientations[k]||!this.opacities[k]||this.opacities[k].isHidden()||(this.placedOrientations[k]=L[k]);if(f&&f.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");m?this.lastPlacementChangeTime=a:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=f?f.lastPlacementChangeTime:a)}updateLayerOpacities(a,f){const m={};for(const g of f){const b=g.getBucket(a);b&&g.latestFeatureIndex&&a.id===b.layerIds[0]&&this.updateBucketOpacities(b,m,g.collisionBoxArray)}}updateBucketOpacities(a,f,m){a.hasTextData()&&(a.text.opacityVertexArray.clear(),a.text.hasVisibleVertices=!1),a.hasIconData()&&(a.icon.opacityVertexArray.clear(),a.icon.hasVisibleVertices=!1),a.hasIconCollisionBoxData()&&a.iconCollisionBox.collisionVertexArray.clear(),a.hasTextCollisionBoxData()&&a.textCollisionBox.collisionVertexArray.clear();const g=a.layers[0],b=g.layout,T=new er(null,0,!1,!1,!0),L=b.get("text-allow-overlap"),k=b.get("icon-allow-overlap"),N=g._unevaluatedLayout.hasValue("text-variable-anchor")||g._unevaluatedLayout.hasValue("text-variable-anchor-offset"),V=b.get("text-rotation-alignment")==="map",j=b.get("text-pitch-alignment")==="map",$=b.get("icon-text-fit")!=="none",he=new er(null,0,L&&(k||!a.hasIconData()||b.get("icon-optional")),k&&(L||!a.hasTextData()||b.get("text-optional")),!0);!a.collisionArrays&&m&&(a.hasIconCollisionBoxData()||a.hasTextCollisionBoxData())&&a.deserializeCollisionBoxes(m);const ce=(ge,re,Ce)=>{for(let Be=0;Be0,Ze=this.placedOrientations[re.crossTileID],$e=Ze===l.ah.vertical,rt=Ze===l.ah.horizontal||Ze===l.ah.horizontalOnly;if(Ce>0||Be>0){const nt=Io(De.text);ce(a.text,Ce,$e?_c:nt),ce(a.text,Be,rt?_c:nt);const ct=De.text.isHidden();[re.rightJustifiedTextSymbolIndex,re.centerJustifiedTextSymbolIndex,re.leftJustifiedTextSymbolIndex].forEach(gt=>{gt>=0&&(a.text.placedSymbolArray.get(gt).hidden=ct||$e?1:0)}),re.verticalPlacedTextSymbolIndex>=0&&(a.text.placedSymbolArray.get(re.verticalPlacedTextSymbolIndex).hidden=ct||rt?1:0);const pt=this.variableOffsets[re.crossTileID];pt&&this.markUsedJustification(a,pt.anchor,re,Ze);const un=this.placedOrientations[re.crossTileID];un&&(this.markUsedJustification(a,"left",re,un),this.markUsedOrientation(a,un,re))}if(Ve){const nt=Io(De.icon),ct=!($&&re.verticalPlacedIconSymbolIndex&&$e);re.placedIconSymbolIndex>=0&&(ce(a.icon,re.numIconVertices,ct?nt:_c),a.icon.placedSymbolArray.get(re.placedIconSymbolIndex).hidden=De.icon.isHidden()),re.verticalPlacedIconSymbolIndex>=0&&(ce(a.icon,re.numVerticalIconVertices,ct?_c:nt),a.icon.placedSymbolArray.get(re.verticalPlacedIconSymbolIndex).hidden=De.icon.isHidden())}if(a.hasIconCollisionBoxData()||a.hasTextCollisionBoxData()){const nt=a.collisionArrays[ge];if(nt){let ct=new l.P(0,0);if(nt.textBox||nt.verticalTextBox){let un=!0;if(N){const gt=this.variableOffsets[ve];gt?(ct=_i(gt.anchor,gt.width,gt.height,gt.textOffset,gt.textBoxScale),V&&ct._rotate(j?this.transform.angle:-this.transform.angle)):un=!1}nt.textBox&&Pi(a.textCollisionBox.collisionVertexArray,De.text.placed,!un||$e,ct.x,ct.y),nt.verticalTextBox&&Pi(a.textCollisionBox.collisionVertexArray,De.text.placed,!un||rt,ct.x,ct.y)}const pt=!!(!rt&&nt.verticalIconBox);nt.iconBox&&Pi(a.iconCollisionBox.collisionVertexArray,De.icon.placed,pt,$?ct.x:0,$?ct.y:0),nt.verticalIconBox&&Pi(a.iconCollisionBox.collisionVertexArray,De.icon.placed,!pt,$?ct.x:0,$?ct.y:0)}}}if(a.sortFeatures(this.transform.angle),this.retainedQueryData[a.bucketInstanceId]&&(this.retainedQueryData[a.bucketInstanceId].featureSortOrder=a.featureSortOrder),a.hasTextData()&&a.text.opacityVertexBuffer&&a.text.opacityVertexBuffer.updateData(a.text.opacityVertexArray),a.hasIconData()&&a.icon.opacityVertexBuffer&&a.icon.opacityVertexBuffer.updateData(a.icon.opacityVertexArray),a.hasIconCollisionBoxData()&&a.iconCollisionBox.collisionVertexBuffer&&a.iconCollisionBox.collisionVertexBuffer.updateData(a.iconCollisionBox.collisionVertexArray),a.hasTextCollisionBoxData()&&a.textCollisionBox.collisionVertexBuffer&&a.textCollisionBox.collisionVertexBuffer.updateData(a.textCollisionBox.collisionVertexArray),a.text.opacityVertexArray.length!==a.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${a.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${a.text.layoutVertexArray.length}) / 4`);if(a.icon.opacityVertexArray.length!==a.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${a.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${a.icon.layoutVertexArray.length}) / 4`);if(a.bucketInstanceId in this.collisionCircleArrays){const ge=this.collisionCircleArrays[a.bucketInstanceId];a.placementInvProjMatrix=ge.invProjMatrix,a.placementViewportMatrix=ge.viewportMatrix,a.collisionCircleArray=ge.circles,delete this.collisionCircleArrays[a.bucketInstanceId]}}symbolFadeChange(a){return this.fadeDuration===0?1:(a-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(a){return Math.max(0,(this.transform.zoom-a)/1.5)}hasTransitions(a){return this.stale||a-this.lastPlacementChangeTimea}setStale(){this.stale=!0}}function Pi(y,a,f,m,g){y.emplaceBack(a?1:0,f?1:0,m||0,g||0),y.emplaceBack(a?1:0,f?1:0,m||0,g||0),y.emplaceBack(a?1:0,f?1:0,m||0,g||0),y.emplaceBack(a?1:0,f?1:0,m||0,g||0)}const Js=Math.pow(2,25),Am=Math.pow(2,24),Ay=Math.pow(2,17),$n=Math.pow(2,16),yp=Math.pow(2,9),vp=Math.pow(2,8),Go=Math.pow(2,1);function Io(y){if(y.opacity===0&&!y.placed)return 0;if(y.opacity===1&&y.placed)return 4294967295;const a=y.placed?1:0,f=Math.floor(127*y.opacity);return f*Js+a*Am+f*Ay+a*$n+f*yp+a*vp+f*Go+a}const _c=0;class cs{constructor(a){this._sortAcrossTiles=a.layout.get("symbol-z-order")!=="viewport-y"&&!a.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(a,f,m,g,b){const T=this._bucketParts;for(;this._currentTileIndexL.sortKey-k.sortKey));this._currentPartIndex!this._forceFullPlacement&&E.now()-g>2;for(;this._currentPlacementIndex>=0;){const T=f[a[this._currentPlacementIndex]],L=this.placement.collisionIndex.transform.zoom;if(T.type==="symbol"&&(!T.minzoom||T.minzoom<=L)&&(!T.maxzoom||T.maxzoom>L)){if(this._inProgressLayer||(this._inProgressLayer=new cs(T)),this._inProgressLayer.continuePlacement(m[T.source],this.placement,this._showCollisionBoxes,T,b))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(a){return this.placement.commit(a),this.placement}}const wu=512/l.W/2;class mh{constructor(a,f,m){this.tileID=a,this.bucketInstanceId=m,this._symbolsByKey={};const g=new Map;for(let b=0;b({x:Math.floor(k.anchorX*wu),y:Math.floor(k.anchorY*wu)})),crossTileIDs:T.map(k=>k.crossTileID)};if(L.positions.length>128){const k=new l.au(L.positions.length,16,Uint16Array);for(const{x:N,y:V}of L.positions)k.add(N,V);k.finish(),delete L.positions,L.index=k}this._symbolsByKey[b]=L}}getScaledCoordinates(a,f){const{x:m,y:g,z:b}=this.tileID.canonical,{x:T,y:L,z:k}=f.canonical,N=wu/Math.pow(2,k-b),V=(L*l.W+a.anchorY)*N,j=g*l.W*wu;return{x:Math.floor((T*l.W+a.anchorX)*N-m*l.W*wu),y:Math.floor(V-j)}}findMatches(a,f,m){const g=this.tileID.canonical.za)}}class hi{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class yc{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(a){const f=Math.round((a-this.lng)/360);if(f!==0)for(const m in this.indexes){const g=this.indexes[m],b={};for(const T in g){const L=g[T];L.tileID=L.tileID.unwrapTo(L.tileID.wrap+f),b[L.tileID.key]=L}this.indexes[m]=b}this.lng=a}addBucket(a,f,m){if(this.indexes[a.overscaledZ]&&this.indexes[a.overscaledZ][a.key]){if(this.indexes[a.overscaledZ][a.key].bucketInstanceId===f.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(a.overscaledZ,this.indexes[a.overscaledZ][a.key])}for(let b=0;ba.overscaledZ)for(const L in T){const k=T[L];k.tileID.isChildOf(a)&&k.findMatches(f.symbolInstances,a,g)}else{const L=T[a.scaledTo(Number(b)).key];L&&L.findMatches(f.symbolInstances,a,g)}}for(let b=0;b{f[m]=!0});for(const m in this.layerIndexes)f[m]||delete this.layerIndexes[m]}}const Pr=(y,a)=>l.t(y,a&&a.filter(f=>f.identifier!=="source.canvas")),gh=l.av();class qo extends l.E{constructor(a,f={}){super(),this._rtlPluginLoaded=()=>{for(const m in this.sourceCaches){const g=this.sourceCaches[m].getSource().type;g!=="vector"&&g!=="geojson"||this.sourceCaches[m].reload()}},this.map=a,this.dispatcher=new Yn(pn(),a._getMapId()),this.dispatcher.registerMessageHandler("GG",(m,g)=>this.getGlyphs(m,g)),this.dispatcher.registerMessageHandler("GI",(m,g)=>this.getImages(m,g)),this.imageManager=new Ke,this.imageManager.setEventedParent(this),this.glyphManager=new He(a._requestManager,f.localIdeographFontFamily),this.lineAtlas=new At(256,512),this.crossTileSymbolIndex=new nl,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new l.aw,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("SR",l.ax()),at().on(Fi,this._rtlPluginLoaded),this.on("data",m=>{if(m.dataType!=="source"||m.sourceDataType!=="metadata")return;const g=this.sourceCaches[m.sourceId];if(!g)return;const b=g.getSource();if(b&&b.vectorLayerIds)for(const T in this._layers){const L=this._layers[T];L.source===b.id&&this._validateLayer(L)}})}loadURL(a,f={},m){this.fire(new l.k("dataloading",{dataType:"style"})),f.validate=typeof f.validate!="boolean"||f.validate;const g=this.map._requestManager.transformRequest(a,"Style");this._loadStyleRequest=new AbortController,l.h(g,this._loadStyleRequest).then(b=>{this._loadStyleRequest=null,this._load(b.data,f,m)}).catch(b=>{this._loadStyleRequest=null,b&&this.fire(new l.j(b))})}loadJSON(a,f={},m){this.fire(new l.k("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,E.frameAsync(this._frameRequest).then(()=>{this._frameRequest=null,f.validate=f.validate!==!1,this._load(a,f,m)}).catch(()=>{})}loadEmpty(){this.fire(new l.k("dataloading",{dataType:"style"})),this._load(gh,{validate:!1})}_load(a,f,m){var g;const b=f.transformStyle?f.transformStyle(m,a):a;if(!f.validate||!Pr(this,l.x(b))){this._loaded=!0,this.stylesheet=b;for(const T in b.sources)this.addSource(T,b.sources[T],{validate:!1});b.sprite?this._loadSprite(b.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(b.glyphs),this._createLayers(),this.light=new vt(this.stylesheet.light),this.map.setTerrain((g=this.stylesheet.terrain)!==null&&g!==void 0?g:null),this.fire(new l.k("data",{dataType:"style"})),this.fire(new l.k("style.load"))}}_createLayers(){const a=l.ay(this.stylesheet.layers);this.dispatcher.broadcast("SL",a),this._order=a.map(f=>f.id),this._layers={},this._serializedLayers=null;for(const f of a){const m=l.az(f);m.setEventedParent(this,{layer:{id:f.id}}),this._layers[f.id]=m}}_loadSprite(a,f=!1,m=void 0){let g;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,function(b,T,L,k){return l._(this,void 0,void 0,function*(){const N=Ae(b),V=L>1?"@2x":"",j={},$={};for(const{id:he,url:ce}of N){const ge=T.transformRequest(T.normalizeSpriteURL(ce,V,".json"),"SpriteJSON");j[he]=l.h(ge,k);const re=T.transformRequest(T.normalizeSpriteURL(ce,V,".png"),"SpriteImage");$[he]=G.getImage(re,k)}return yield Promise.all([...Object.values(j),...Object.values($)]),function(he,ce){return l._(this,void 0,void 0,function*(){const ge={};for(const re in he){ge[re]={};const Ce=E.getImageCanvasContext((yield ce[re]).data),Be=(yield he[re]).data;for(const ve in Be){const{width:De,height:Ve,x:Ze,y:$e,sdf:rt,pixelRatio:nt,stretchX:ct,stretchY:pt,content:un}=Be[ve];ge[re][ve]={data:null,pixelRatio:nt,sdf:rt,stretchX:ct,stretchY:pt,content:un,spriteData:{width:De,height:Ve,x:Ze,y:$e,context:Ce}}}}return ge})}(j,$)})}(a,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(b=>{if(this._spriteRequest=null,b)for(const T in b){this._spritesImagesIds[T]=[];const L=this._spritesImagesIds[T]?this._spritesImagesIds[T].filter(k=>!(k in b)):[];for(const k of L)this.imageManager.removeImage(k),this._changedImages[k]=!0;for(const k in b[T]){const N=T==="default"?k:`${T}:${k}`;this._spritesImagesIds[T].push(N),N in this.imageManager.images?this.imageManager.updateImage(N,b[T][k],!1):this.imageManager.addImage(N,b[T][k]),f&&(this._changedImages[N]=!0)}}}).catch(b=>{this._spriteRequest=null,g=b,this.fire(new l.j(g))}).finally(()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),f&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new l.k("data",{dataType:"style"})),m&&m(g)})}_unloadSprite(){for(const a of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(a),this._changedImages[a]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new l.k("data",{dataType:"style"}))}_validateLayer(a){const f=this.sourceCaches[a.source];if(!f)return;const m=a.sourceLayer;if(!m)return;const g=f.getSource();(g.type==="geojson"||g.vectorLayerIds&&g.vectorLayerIds.indexOf(m)===-1)&&this.fire(new l.j(new Error(`Source layer "${m}" does not exist on source "${g.id}" as specified by style layer "${a.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(const a in this.sourceCaches)if(!this.sourceCaches[a].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeByIds(a){const f=this._serializedAllLayers();if(!a||a.length===0)return Object.values(f);const m=[];for(const g of a)f[g]&&m.push(f[g]);return m}_serializedAllLayers(){let a=this._serializedLayers;if(a)return a;a=this._serializedLayers={};const f=Object.keys(this._layers);for(const m of f){const g=this._layers[m];g.type!=="custom"&&(a[m]=g.serialize())}return a}hasTransitions(){if(this.light&&this.light.hasTransition())return!0;for(const a in this.sourceCaches)if(this.sourceCaches[a].hasTransition())return!0;for(const a in this._layers)if(this._layers[a].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(a){if(!this._loaded)return;const f=this._changed;if(f){const g=Object.keys(this._updatedLayers),b=Object.keys(this._removedLayers);(g.length||b.length)&&this._updateWorkerLayers(g,b);for(const T in this._updatedSources){const L=this._updatedSources[T];if(L==="reload")this._reloadSource(T);else{if(L!=="clear")throw new Error(`Invalid action ${L}`);this._clearSource(T)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(const T in this._updatedPaintProps)this._layers[T].updateTransitions(a);this.light.updateTransitions(a),this._resetUpdates()}const m={};for(const g in this.sourceCaches){const b=this.sourceCaches[g];m[g]=b.used,b.used=!1}for(const g of this._order){const b=this._layers[g];b.recalculate(a,this._availableImages),!b.isHidden(a.zoom)&&b.source&&(this.sourceCaches[b.source].used=!0)}for(const g in m){const b=this.sourceCaches[g];!!m[g]!=!!b.used&&b.fire(new l.k("data",{sourceDataType:"visibility",dataType:"source",sourceId:g}))}this.light.recalculate(a),this.z=a.zoom,f&&this.fire(new l.k("data",{dataType:"style"}))}_updateTilesForChangedImages(){const a=Object.keys(this._changedImages);if(a.length){for(const f in this.sourceCaches)this.sourceCaches[f].reloadTilesForDependencies(["icons","patterns"],a);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(const a in this.sourceCaches)this.sourceCaches[a].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(a,f){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(a),removedIds:f})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(a,f={}){var m;this._checkLoaded();const g=this.serialize();if(a=f.transformStyle?f.transformStyle(g,a):a,((m=f.validate)===null||m===void 0||m)&&Pr(this,l.x(a)))return!1;(a=l.aA(a)).layers=l.ay(a.layers);const b=l.aB(g,a),T=this._getOperationsToPerform(b);if(T.unimplemented.length>0)throw new Error(`Unimplemented: ${T.unimplemented.join(", ")}.`);if(T.operations.length===0)return!1;for(const L of T.operations)L();return this.stylesheet=a,this._serializedLayers=null,!0}_getOperationsToPerform(a){const f=[],m=[];for(const g of a)switch(g.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":continue;case"addLayer":f.push(()=>this.addLayer.apply(this,g.args));break;case"removeLayer":f.push(()=>this.removeLayer.apply(this,g.args));break;case"setPaintProperty":f.push(()=>this.setPaintProperty.apply(this,g.args));break;case"setLayoutProperty":f.push(()=>this.setLayoutProperty.apply(this,g.args));break;case"setFilter":f.push(()=>this.setFilter.apply(this,g.args));break;case"addSource":f.push(()=>this.addSource.apply(this,g.args));break;case"removeSource":f.push(()=>this.removeSource.apply(this,g.args));break;case"setLayerZoomRange":f.push(()=>this.setLayerZoomRange.apply(this,g.args));break;case"setLight":f.push(()=>this.setLight.apply(this,g.args));break;case"setGeoJSONSourceData":f.push(()=>this.setGeoJSONSourceData.apply(this,g.args));break;case"setGlyphs":f.push(()=>this.setGlyphs.apply(this,g.args));break;case"setSprite":f.push(()=>this.setSprite.apply(this,g.args));break;case"setTerrain":f.push(()=>this.map.setTerrain.apply(this,g.args));break;case"setTransition":f.push(()=>{});break;default:m.push(g.command)}return{operations:f,unimplemented:m}}addImage(a,f){if(this.getImage(a))return this.fire(new l.j(new Error(`An image named "${a}" already exists.`)));this.imageManager.addImage(a,f),this._afterImageUpdated(a)}updateImage(a,f){this.imageManager.updateImage(a,f)}getImage(a){return this.imageManager.getImage(a)}removeImage(a){if(!this.getImage(a))return this.fire(new l.j(new Error(`An image named "${a}" does not exist.`)));this.imageManager.removeImage(a),this._afterImageUpdated(a)}_afterImageUpdated(a){this._availableImages=this.imageManager.listImages(),this._changedImages[a]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new l.k("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(a,f,m={}){if(this._checkLoaded(),this.sourceCaches[a]!==void 0)throw new Error(`Source "${a}" already exists.`);if(!f.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(f).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(f.type)>=0&&this._validate(l.x.source,`sources.${a}`,f,null,m))return;this.map&&this.map._collectResourceTiming&&(f.collectResourceTiming=!0);const g=this.sourceCaches[a]=new ui(a,f,this.dispatcher);g.style=this,g.setEventedParent(this,()=>({isSourceLoaded:g.loaded(),source:g.serialize(),sourceId:a})),g.onAdd(this.map),this._changed=!0}removeSource(a){if(this._checkLoaded(),this.sourceCaches[a]===void 0)throw new Error("There is no source with this ID");for(const m in this._layers)if(this._layers[m].source===a)return this.fire(new l.j(new Error(`Source "${a}" cannot be removed while layer "${m}" is using it.`)));const f=this.sourceCaches[a];delete this.sourceCaches[a],delete this._updatedSources[a],f.fire(new l.k("data",{sourceDataType:"metadata",dataType:"source",sourceId:a})),f.setEventedParent(null),f.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(a,f){if(this._checkLoaded(),this.sourceCaches[a]===void 0)throw new Error(`There is no source with this ID=${a}`);const m=this.sourceCaches[a].getSource();if(m.type!=="geojson")throw new Error(`geojsonSource.type is ${m.type}, which is !== 'geojson`);m.setData(f),this._changed=!0}getSource(a){return this.sourceCaches[a]&&this.sourceCaches[a].getSource()}addLayer(a,f,m={}){this._checkLoaded();const g=a.id;if(this.getLayer(g))return void this.fire(new l.j(new Error(`Layer "${g}" already exists on this map.`)));let b;if(a.type==="custom"){if(Pr(this,l.aC(a)))return;b=l.az(a)}else{if("source"in a&&typeof a.source=="object"&&(this.addSource(g,a.source),a=l.aA(a),a=l.e(a,{source:g})),this._validate(l.x.layer,`layers.${g}`,a,{arrayIndex:-1},m))return;b=l.az(a),this._validateLayer(b),b.setEventedParent(this,{layer:{id:g}})}const T=f?this._order.indexOf(f):this._order.length;if(f&&T===-1)this.fire(new l.j(new Error(`Cannot add layer "${g}" before non-existing layer "${f}".`)));else{if(this._order.splice(T,0,g),this._layerOrderChanged=!0,this._layers[g]=b,this._removedLayers[g]&&b.source&&b.type!=="custom"){const L=this._removedLayers[g];delete this._removedLayers[g],L.type!==b.type?this._updatedSources[b.source]="clear":(this._updatedSources[b.source]="reload",this.sourceCaches[b.source].pause())}this._updateLayer(b),b.onAdd&&b.onAdd(this.map)}}moveLayer(a,f){if(this._checkLoaded(),this._changed=!0,!this._layers[a])return void this.fire(new l.j(new Error(`The layer '${a}' does not exist in the map's style and cannot be moved.`)));if(a===f)return;const m=this._order.indexOf(a);this._order.splice(m,1);const g=f?this._order.indexOf(f):this._order.length;f&&g===-1?this.fire(new l.j(new Error(`Cannot move layer "${a}" before non-existing layer "${f}".`))):(this._order.splice(g,0,a),this._layerOrderChanged=!0)}removeLayer(a){this._checkLoaded();const f=this._layers[a];if(!f)return void this.fire(new l.j(new Error(`Cannot remove non-existing layer "${a}".`)));f.setEventedParent(null);const m=this._order.indexOf(a);this._order.splice(m,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[a]=f,delete this._layers[a],this._serializedLayers&&delete this._serializedLayers[a],delete this._updatedLayers[a],delete this._updatedPaintProps[a],f.onRemove&&f.onRemove(this.map)}getLayer(a){return this._layers[a]}getLayersOrder(){return[...this._order]}hasLayer(a){return a in this._layers}setLayerZoomRange(a,f,m){this._checkLoaded();const g=this.getLayer(a);g?g.minzoom===f&&g.maxzoom===m||(f!=null&&(g.minzoom=f),m!=null&&(g.maxzoom=m),this._updateLayer(g)):this.fire(new l.j(new Error(`Cannot set the zoom range of non-existing layer "${a}".`)))}setFilter(a,f,m={}){this._checkLoaded();const g=this.getLayer(a);if(g){if(!l.aD(g.filter,f))return f==null?(g.filter=void 0,void this._updateLayer(g)):void(this._validate(l.x.filter,`layers.${g.id}.filter`,f,null,m)||(g.filter=l.aA(f),this._updateLayer(g)))}else this.fire(new l.j(new Error(`Cannot filter non-existing layer "${a}".`)))}getFilter(a){return l.aA(this.getLayer(a).filter)}setLayoutProperty(a,f,m,g={}){this._checkLoaded();const b=this.getLayer(a);b?l.aD(b.getLayoutProperty(f),m)||(b.setLayoutProperty(f,m,g),this._updateLayer(b)):this.fire(new l.j(new Error(`Cannot style non-existing layer "${a}".`)))}getLayoutProperty(a,f){const m=this.getLayer(a);if(m)return m.getLayoutProperty(f);this.fire(new l.j(new Error(`Cannot get style of non-existing layer "${a}".`)))}setPaintProperty(a,f,m,g={}){this._checkLoaded();const b=this.getLayer(a);b?l.aD(b.getPaintProperty(f),m)||(b.setPaintProperty(f,m,g)&&this._updateLayer(b),this._changed=!0,this._updatedPaintProps[a]=!0,this._serializedLayers=null):this.fire(new l.j(new Error(`Cannot style non-existing layer "${a}".`)))}getPaintProperty(a,f){return this.getLayer(a).getPaintProperty(f)}setFeatureState(a,f){this._checkLoaded();const m=a.source,g=a.sourceLayer,b=this.sourceCaches[m];if(b===void 0)return void this.fire(new l.j(new Error(`The source '${m}' does not exist in the map's style.`)));const T=b.getSource().type;T==="geojson"&&g?this.fire(new l.j(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):T!=="vector"||g?(a.id===void 0&&this.fire(new l.j(new Error("The feature id parameter must be provided."))),b.setFeatureState(g,a.id,f)):this.fire(new l.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(a,f){this._checkLoaded();const m=a.source,g=this.sourceCaches[m];if(g===void 0)return void this.fire(new l.j(new Error(`The source '${m}' does not exist in the map's style.`)));const b=g.getSource().type,T=b==="vector"?a.sourceLayer:void 0;b!=="vector"||T?f&&typeof a.id!="string"&&typeof a.id!="number"?this.fire(new l.j(new Error("A feature id is required to remove its specific state property."))):g.removeFeatureState(T,a.id,f):this.fire(new l.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(a){this._checkLoaded();const f=a.source,m=a.sourceLayer,g=this.sourceCaches[f];if(g!==void 0)return g.getSource().type!=="vector"||m?(a.id===void 0&&this.fire(new l.j(new Error("The feature id parameter must be provided."))),g.getFeatureState(m,a.id)):void this.fire(new l.j(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new l.j(new Error(`The source '${f}' does not exist in the map's style.`)))}getTransition(){return l.e({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){if(!this._loaded)return;const a=l.aE(this.sourceCaches,b=>b.serialize()),f=this._serializeByIds(this._order),m=this.map.getTerrain()||void 0,g=this.stylesheet;return l.aF({version:g.version,name:g.name,metadata:g.metadata,light:g.light,center:g.center,zoom:g.zoom,bearing:g.bearing,pitch:g.pitch,sprite:g.sprite,glyphs:g.glyphs,transition:g.transition,sources:a,layers:f,terrain:m},b=>b!==void 0)}_updateLayer(a){this._updatedLayers[a.id]=!0,a.source&&!this._updatedSources[a.source]&&this.sourceCaches[a.source].getSource().type!=="raster"&&(this._updatedSources[a.source]="reload",this.sourceCaches[a.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(a){const f=T=>this._layers[T].type==="fill-extrusion",m={},g=[];for(let T=this._order.length-1;T>=0;T--){const L=this._order[T];if(f(L)){m[L]=T;for(const k of a){const N=k[L];if(N)for(const V of N)g.push(V)}}}g.sort((T,L)=>L.intersectionZ-T.intersectionZ);const b=[];for(let T=this._order.length-1;T>=0;T--){const L=this._order[T];if(f(L))for(let k=g.length-1;k>=0;k--){const N=g[k].feature;if(m[N.layer.id]{const rt=Ce.featureSortOrder;if(rt){const nt=rt.indexOf(Ze.featureIndex);return rt.indexOf($e.featureIndex)-nt}return $e.featureIndex-Ze.featureIndex});for(const Ze of Ve)De.push(Ze)}}for(const Ce in ce)ce[Ce].forEach(Be=>{const ve=Be.feature,De=N[L[Ce].source].getFeatureState(ve.layer["source-layer"],ve.id);ve.source=ve.layer.source,ve.layer["source-layer"]&&(ve.sourceLayer=ve.layer["source-layer"]),ve.state=De});return ce}(this._layers,T,this.sourceCaches,a,f,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(b)}querySourceFeatures(a,f){f&&f.filter&&this._validate(l.x.filter,"querySourceFeatures.filter",f.filter,null,f);const m=this.sourceCaches[a];return m?function(g,b){const T=g.getRenderableIds().map(N=>g.getTileByID(N)),L=[],k={};for(let N=0;N$.getTileByID(he)).sort((he,ce)=>ce.tileID.overscaledZ-he.tileID.overscaledZ||(he.tileID.isLessThan(ce.tileID)?-1:1))}const j=this.crossTileSymbolIndex.addLayer(V,k[V.source],a.center.lng);T=T||j}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((b=b||this._layerOrderChanged||m===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(E.now(),a.zoom))&&(this.pauseablePlacement=new hs(a,this.map.terrain,this._order,b,f,m,g,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,k),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(E.now()),L=!0),T&&this.pauseablePlacement.placement.setStale()),L||T)for(const N of this._order){const V=this._layers[N];V.type==="symbol"&&this.placement.updateLayerOpacities(V,k[V.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(E.now())}_releaseSymbolFadeTiles(){for(const a in this.sourceCaches)this.sourceCaches[a].releaseSymbolFadeTiles()}getImages(a,f){return l._(this,void 0,void 0,function*(){const m=yield this.imageManager.getImages(f.icons);this._updateTilesForChangedImages();const g=this.sourceCaches[f.source];return g&&g.setDependencies(f.tileID.key,f.type,f.icons),m})}getGlyphs(a,f){return l._(this,void 0,void 0,function*(){const m=yield this.glyphManager.getGlyphs(f.stacks),g=this.sourceCaches[f.source];return g&&g.setDependencies(f.tileID.key,f.type,[""]),m})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(a,f={}){this._checkLoaded(),a&&this._validate(l.x.glyphs,"glyphs",a,null,f)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=a,this.glyphManager.entries={},this.glyphManager.setURL(a))}addSprite(a,f,m={},g){this._checkLoaded();const b=[{id:a,url:f}],T=[...Ae(this.stylesheet.sprite),...b];this._validate(l.x.sprite,"sprite",T,null,m)||(this.stylesheet.sprite=T,this._loadSprite(b,!0,g))}removeSprite(a){this._checkLoaded();const f=Ae(this.stylesheet.sprite);if(f.find(m=>m.id===a)){if(this._spritesImagesIds[a])for(const m of this._spritesImagesIds[a])this.imageManager.removeImage(m),this._changedImages[m]=!0;f.splice(f.findIndex(m=>m.id===a),1),this.stylesheet.sprite=f.length>0?f:void 0,delete this._spritesImagesIds[a],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new l.k("data",{dataType:"style"}))}else this.fire(new l.j(new Error(`Sprite "${a}" doesn't exists on this map.`)))}getSprite(){return Ae(this.stylesheet.sprite)}setSprite(a,f={},m){this._checkLoaded(),a&&this._validate(l.x.sprite,"sprite",a,null,f)||(this.stylesheet.sprite=a,a?this._loadSprite(a,!0,m):(this._unloadSprite(),m&&m(null)))}}var _h=l.X([{name:"a_pos",type:"Int16",components:2}]),Qs="attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;varying float v_depth;void main() {float extent=8192.0;float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/extent;gl_Position=u_matrix*vec4(a_pos3d.xy,get_elevation(a_pos3d.xy)-ele_delta,1.0);v_depth=gl_Position.z/gl_Position.w;}";const vc={prelude:Kn(`#ifdef GL_ES precision mediump float; #else #if !defined(lowp) @@ -576,13 +576,13 @@ uniform ${V} ${j} u_${$}; #else ${V} ${j} ${$} = u_${$}; #endif -`}),staticAttributes:m,staticUniforms:T}}class yh{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(a,f,m,g,b,T,L,k,N){this.context=a;let V=this.boundPaintVertexBuffers.length!==g.length;for(let j=0;!V&&j({u_depth:new l.aG(Ze,$e.u_depth),u_terrain:new l.aG(Ze,$e.u_terrain),u_terrain_dim:new l.aH(Ze,$e.u_terrain_dim),u_terrain_matrix:new l.aI(Ze,$e.u_terrain_matrix),u_terrain_unpack:new l.aJ(Ze,$e.u_terrain_unpack),u_terrain_exaggeration:new l.aH(Ze,$e.u_terrain_exaggeration)}))(a,Ve),this.binderUniforms=m?m.getUniforms(a,Ve):[]}draw(a,f,m,g,b,T,L,k,N,V,j,$,he,ce,ge,re,Ce,Be){const ve=a.gl;if(this.failedToCreate)return;if(a.program.set(this.program),a.setDepthMode(m),a.setStencilMode(g),a.setColorMode(b),a.setCullFace(T),k){a.activeTexture.set(ve.TEXTURE2),ve.bindTexture(ve.TEXTURE_2D,k.depthTexture),a.activeTexture.set(ve.TEXTURE3),ve.bindTexture(ve.TEXTURE_2D,k.texture);for(const Ve in this.terrainUniforms)this.terrainUniforms[Ve].set(k[Ve])}for(const Ve in this.fixedUniforms)this.fixedUniforms[Ve].set(L[Ve]);ge&&ge.setUniforms(a,this.binderUniforms,he,{zoom:ce});let De=0;switch(f){case ve.LINES:De=2;break;case ve.TRIANGLES:De=3;break;case ve.LINE_STRIP:De=1}for(const Ve of $.get()){const Ze=Ve.vaos||(Ve.vaos={});(Ze[N]||(Ze[N]=new yh)).bind(a,this,V,ge?ge.getPaintVertexBuffers():[],j,Ve.vertexOffset,re,Ce,Be),ve.drawElements(f,Ve.primitiveLength*De,ve.UNSIGNED_SHORT,Ve.primitiveOffset*De*2)}}}function vh(y,a,f){const m=1/tn(f,1,a.transform.tileZoom),g=Math.pow(2,f.tileID.overscaledZ),b=f.tileSize*Math.pow(2,a.transform.tileZoom)/g,T=b*(f.tileID.canonical.x+f.tileID.wrap*g),L=b*f.tileID.canonical.y;return{u_image:0,u_texsize:f.imageAtlasTexture.size,u_scale:[m,y.fromScale,y.toScale],u_fade:y.t,u_pixel_coord_upper:[T>>16,L>>16],u_pixel_coord_lower:[65535&T,65535&L]}}const bc=(y,a,f,m)=>{const g=a.style.light,b=g.properties.get("position"),T=[b.x,b.y,b.z],L=function(){var N=new l.A(9);return l.A!=Float32Array&&(N[1]=0,N[2]=0,N[3]=0,N[5]=0,N[6]=0,N[7]=0),N[0]=1,N[4]=1,N[8]=1,N}();g.properties.get("anchor")==="viewport"&&function(N,V){var j=Math.sin(V),$=Math.cos(V);N[0]=$,N[1]=j,N[2]=0,N[3]=-j,N[4]=$,N[5]=0,N[6]=0,N[7]=0,N[8]=1}(L,-a.transform.angle),function(N,V,j){var $=V[0],he=V[1],ce=V[2];N[0]=$*j[0]+he*j[3]+ce*j[6],N[1]=$*j[1]+he*j[4]+ce*j[7],N[2]=$*j[2]+he*j[5]+ce*j[8]}(T,T,L);const k=g.properties.get("color");return{u_matrix:y,u_lightpos:T,u_lightintensity:g.properties.get("intensity"),u_lightcolor:[k.r,k.g,k.b],u_vertical_gradient:+f,u_opacity:m}},Ay=(y,a,f,m,g,b,T)=>l.e(bc(y,a,f,m),vh(b,a,T),{u_height_factor:-Math.pow(2,g.overscaledZ)/T.tileSize/8}),km=y=>({u_matrix:y}),bh=(y,a,f,m)=>l.e(km(y),vh(f,a,m)),ky=(y,a)=>({u_matrix:y,u_world:a}),Dm=(y,a,f,m,g)=>l.e(bh(y,a,f,m),{u_world:g}),Dy=(y,a,f,m)=>{const g=y.transform;let b,T;if(m.paint.get("circle-pitch-alignment")==="map"){const L=tn(f,1,g.zoom);b=!0,T=[L,L]}else b=!1,T=g.pixelsToGLUnits;return{u_camera_to_center_distance:g.cameraToCenterDistance,u_scale_with_map:+(m.paint.get("circle-pitch-scale")==="map"),u_matrix:y.translatePosMatrix(a.posMatrix,f,m.paint.get("circle-translate"),m.paint.get("circle-translate-anchor")),u_pitch_with_map:+b,u_device_pixel_ratio:y.pixelRatio,u_extrude_scale:T}},Rm=(y,a,f)=>{const m=tn(f,1,a.zoom),g=Math.pow(2,a.zoom-f.tileID.overscaledZ),b=f.tileID.overscaleFactor();return{u_matrix:y,u_camera_to_center_distance:a.cameraToCenterDistance,u_pixels_to_tile_units:m,u_extrude_scale:[a.pixelsToGLUnits[0]/(m*g),a.pixelsToGLUnits[1]/(m*g)],u_overscale_factor:b}},Nm=(y,a,f=1)=>({u_matrix:y,u_color:a,u_overlay:0,u_overlay_scale:f}),xh=y=>({u_matrix:y}),Om=(y,a,f,m)=>({u_matrix:y,u_extrude_scale:tn(a,1,f),u_intensity:m});function zm(y,a){const f=Math.pow(2,a.canonical.z),m=a.canonical.y;return[new l.Y(0,m/f).toLngLat().lat,new l.Y(0,(m+1)/f).toLngLat().lat]}const wh=(y,a,f,m)=>{const g=y.transform;return{u_matrix:xc(y,a,f,m),u_ratio:1/tn(a,1,g.zoom),u_device_pixel_ratio:y.pixelRatio,u_units_to_pixels:[1/g.pixelsToGLUnits[0],1/g.pixelsToGLUnits[1]]}},Fm=(y,a,f,m,g)=>l.e(wh(y,a,f,g),{u_image:0,u_image_height:m}),Bl=(y,a,f,m,g)=>{const b=y.transform,T=qo(a,b);return{u_matrix:xc(y,a,f,g),u_texsize:a.imageAtlasTexture.size,u_ratio:1/tn(a,1,b.zoom),u_device_pixel_ratio:y.pixelRatio,u_image:0,u_scale:[T,m.fromScale,m.toScale],u_fade:m.t,u_units_to_pixels:[1/b.pixelsToGLUnits[0],1/b.pixelsToGLUnits[1]]}},Sh=(y,a,f,m,g,b)=>{const T=y.lineAtlas,L=qo(a,y.transform),k=f.layout.get("line-cap")==="round",N=T.getDash(m.from,k),V=T.getDash(m.to,k),j=N.width*g.fromScale,$=V.width*g.toScale;return l.e(wh(y,a,f,b),{u_patternscale_a:[L/j,-N.height/2],u_patternscale_b:[L/$,-V.height/2],u_sdfgamma:T.width/(256*Math.min(j,$)*y.pixelRatio)/2,u_image:0,u_tex_y_a:N.y,u_tex_y_b:V.y,u_mix:g.t})};function qo(y,a){return 1/tn(y,1,a.tileZoom)}function xc(y,a,f,m){return y.translatePosMatrix(m?m.posMatrix:a.tileID.posMatrix,a,f.paint.get("line-translate"),f.paint.get("line-translate-anchor"))}const Eh=(y,a,f,m,g)=>{return{u_matrix:y,u_tl_parent:a,u_scale_parent:f,u_buffer_scale:1,u_fade_t:m.mix,u_opacity:m.opacity*g.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:g.paint.get("raster-brightness-min"),u_brightness_high:g.paint.get("raster-brightness-max"),u_saturation_factor:(T=g.paint.get("raster-saturation"),T>0?1-1/(1.001-T):-T),u_contrast_factor:(b=g.paint.get("raster-contrast"),b>0?1/(1-b):1+b),u_spin_weights:wc(g.paint.get("raster-hue-rotate"))};var b,T};function wc(y){y*=Math.PI/180;const a=Math.sin(y),f=Math.cos(y);return[(2*f+1)/3,(-Math.sqrt(3)*a-f+1)/3,(Math.sqrt(3)*a-f+1)/3]}const Sc=(y,a,f,m,g,b,T,L,k,N)=>{const V=g.transform;return{u_is_size_zoom_constant:+(y==="constant"||y==="source"),u_is_size_feature_constant:+(y==="constant"||y==="camera"),u_size_t:a?a.uSizeT:0,u_size:a?a.uSize:0,u_camera_to_center_distance:V.cameraToCenterDistance,u_pitch:V.pitch/360*2*Math.PI,u_rotate_symbol:+f,u_aspect_ratio:V.width/V.height,u_fade_change:g.options.fadeDuration?g.symbolFadeChange:1,u_matrix:b,u_label_plane_matrix:T,u_coord_matrix:L,u_is_text:+k,u_pitch_with_map:+m,u_texsize:N,u_texture:0}},Ec=(y,a,f,m,g,b,T,L,k,N,V)=>{const j=g.transform;return l.e(Sc(y,a,f,m,g,b,T,L,k,N),{u_gamma_scale:m?Math.cos(j._pitch)*j.cameraToCenterDistance:1,u_device_pixel_ratio:g.pixelRatio,u_is_halo:+V})},Ic=(y,a,f,m,g,b,T,L,k,N)=>l.e(Ec(y,a,f,m,g,b,T,L,!0,k,!0),{u_texsize_icon:N,u_texture_icon:1}),Ry=(y,a,f)=>({u_matrix:y,u_opacity:a,u_color:f}),Ny=(y,a,f,m,g,b)=>l.e(function(T,L,k,N){const V=k.imageManager.getPattern(T.from.toString()),j=k.imageManager.getPattern(T.to.toString()),{width:$,height:he}=k.imageManager.getPixelSize(),ce=Math.pow(2,N.tileID.overscaledZ),ge=N.tileSize*Math.pow(2,k.transform.tileZoom)/ce,re=ge*(N.tileID.canonical.x+N.tileID.wrap*ce),Ce=ge*N.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:V.tl,u_pattern_br_a:V.br,u_pattern_tl_b:j.tl,u_pattern_br_b:j.br,u_texsize:[$,he],u_mix:L.t,u_pattern_size_a:V.displaySize,u_pattern_size_b:j.displaySize,u_scale_a:L.fromScale,u_scale_b:L.toScale,u_tile_units_to_pixels:1/tn(N,1,k.transform.tileZoom),u_pixel_coord_upper:[re>>16,Ce>>16],u_pixel_coord_lower:[65535&re,65535&Ce]}}(m,b,f,g),{u_matrix:y,u_opacity:a}),Bm={fillExtrusion:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_lightpos:new l.aK(y,a.u_lightpos),u_lightintensity:new l.aH(y,a.u_lightintensity),u_lightcolor:new l.aK(y,a.u_lightcolor),u_vertical_gradient:new l.aH(y,a.u_vertical_gradient),u_opacity:new l.aH(y,a.u_opacity)}),fillExtrusionPattern:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_lightpos:new l.aK(y,a.u_lightpos),u_lightintensity:new l.aH(y,a.u_lightintensity),u_lightcolor:new l.aK(y,a.u_lightcolor),u_vertical_gradient:new l.aH(y,a.u_vertical_gradient),u_height_factor:new l.aH(y,a.u_height_factor),u_image:new l.aG(y,a.u_image),u_texsize:new l.aL(y,a.u_texsize),u_pixel_coord_upper:new l.aL(y,a.u_pixel_coord_upper),u_pixel_coord_lower:new l.aL(y,a.u_pixel_coord_lower),u_scale:new l.aK(y,a.u_scale),u_fade:new l.aH(y,a.u_fade),u_opacity:new l.aH(y,a.u_opacity)}),fill:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix)}),fillPattern:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_image:new l.aG(y,a.u_image),u_texsize:new l.aL(y,a.u_texsize),u_pixel_coord_upper:new l.aL(y,a.u_pixel_coord_upper),u_pixel_coord_lower:new l.aL(y,a.u_pixel_coord_lower),u_scale:new l.aK(y,a.u_scale),u_fade:new l.aH(y,a.u_fade)}),fillOutline:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_world:new l.aL(y,a.u_world)}),fillOutlinePattern:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_world:new l.aL(y,a.u_world),u_image:new l.aG(y,a.u_image),u_texsize:new l.aL(y,a.u_texsize),u_pixel_coord_upper:new l.aL(y,a.u_pixel_coord_upper),u_pixel_coord_lower:new l.aL(y,a.u_pixel_coord_lower),u_scale:new l.aK(y,a.u_scale),u_fade:new l.aH(y,a.u_fade)}),circle:(y,a)=>({u_camera_to_center_distance:new l.aH(y,a.u_camera_to_center_distance),u_scale_with_map:new l.aG(y,a.u_scale_with_map),u_pitch_with_map:new l.aG(y,a.u_pitch_with_map),u_extrude_scale:new l.aL(y,a.u_extrude_scale),u_device_pixel_ratio:new l.aH(y,a.u_device_pixel_ratio),u_matrix:new l.aI(y,a.u_matrix)}),collisionBox:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_camera_to_center_distance:new l.aH(y,a.u_camera_to_center_distance),u_pixels_to_tile_units:new l.aH(y,a.u_pixels_to_tile_units),u_extrude_scale:new l.aL(y,a.u_extrude_scale),u_overscale_factor:new l.aH(y,a.u_overscale_factor)}),collisionCircle:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_inv_matrix:new l.aI(y,a.u_inv_matrix),u_camera_to_center_distance:new l.aH(y,a.u_camera_to_center_distance),u_viewport_size:new l.aL(y,a.u_viewport_size)}),debug:(y,a)=>({u_color:new l.aM(y,a.u_color),u_matrix:new l.aI(y,a.u_matrix),u_overlay:new l.aG(y,a.u_overlay),u_overlay_scale:new l.aH(y,a.u_overlay_scale)}),clippingMask:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix)}),heatmap:(y,a)=>({u_extrude_scale:new l.aH(y,a.u_extrude_scale),u_intensity:new l.aH(y,a.u_intensity),u_matrix:new l.aI(y,a.u_matrix)}),heatmapTexture:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_world:new l.aL(y,a.u_world),u_image:new l.aG(y,a.u_image),u_color_ramp:new l.aG(y,a.u_color_ramp),u_opacity:new l.aH(y,a.u_opacity)}),hillshade:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_image:new l.aG(y,a.u_image),u_latrange:new l.aL(y,a.u_latrange),u_light:new l.aL(y,a.u_light),u_shadow:new l.aM(y,a.u_shadow),u_highlight:new l.aM(y,a.u_highlight),u_accent:new l.aM(y,a.u_accent)}),hillshadePrepare:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_image:new l.aG(y,a.u_image),u_dimension:new l.aL(y,a.u_dimension),u_zoom:new l.aH(y,a.u_zoom),u_unpack:new l.aJ(y,a.u_unpack)}),line:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_ratio:new l.aH(y,a.u_ratio),u_device_pixel_ratio:new l.aH(y,a.u_device_pixel_ratio),u_units_to_pixels:new l.aL(y,a.u_units_to_pixels)}),lineGradient:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_ratio:new l.aH(y,a.u_ratio),u_device_pixel_ratio:new l.aH(y,a.u_device_pixel_ratio),u_units_to_pixels:new l.aL(y,a.u_units_to_pixels),u_image:new l.aG(y,a.u_image),u_image_height:new l.aH(y,a.u_image_height)}),linePattern:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_texsize:new l.aL(y,a.u_texsize),u_ratio:new l.aH(y,a.u_ratio),u_device_pixel_ratio:new l.aH(y,a.u_device_pixel_ratio),u_image:new l.aG(y,a.u_image),u_units_to_pixels:new l.aL(y,a.u_units_to_pixels),u_scale:new l.aK(y,a.u_scale),u_fade:new l.aH(y,a.u_fade)}),lineSDF:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_ratio:new l.aH(y,a.u_ratio),u_device_pixel_ratio:new l.aH(y,a.u_device_pixel_ratio),u_units_to_pixels:new l.aL(y,a.u_units_to_pixels),u_patternscale_a:new l.aL(y,a.u_patternscale_a),u_patternscale_b:new l.aL(y,a.u_patternscale_b),u_sdfgamma:new l.aH(y,a.u_sdfgamma),u_image:new l.aG(y,a.u_image),u_tex_y_a:new l.aH(y,a.u_tex_y_a),u_tex_y_b:new l.aH(y,a.u_tex_y_b),u_mix:new l.aH(y,a.u_mix)}),raster:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_tl_parent:new l.aL(y,a.u_tl_parent),u_scale_parent:new l.aH(y,a.u_scale_parent),u_buffer_scale:new l.aH(y,a.u_buffer_scale),u_fade_t:new l.aH(y,a.u_fade_t),u_opacity:new l.aH(y,a.u_opacity),u_image0:new l.aG(y,a.u_image0),u_image1:new l.aG(y,a.u_image1),u_brightness_low:new l.aH(y,a.u_brightness_low),u_brightness_high:new l.aH(y,a.u_brightness_high),u_saturation_factor:new l.aH(y,a.u_saturation_factor),u_contrast_factor:new l.aH(y,a.u_contrast_factor),u_spin_weights:new l.aK(y,a.u_spin_weights)}),symbolIcon:(y,a)=>({u_is_size_zoom_constant:new l.aG(y,a.u_is_size_zoom_constant),u_is_size_feature_constant:new l.aG(y,a.u_is_size_feature_constant),u_size_t:new l.aH(y,a.u_size_t),u_size:new l.aH(y,a.u_size),u_camera_to_center_distance:new l.aH(y,a.u_camera_to_center_distance),u_pitch:new l.aH(y,a.u_pitch),u_rotate_symbol:new l.aG(y,a.u_rotate_symbol),u_aspect_ratio:new l.aH(y,a.u_aspect_ratio),u_fade_change:new l.aH(y,a.u_fade_change),u_matrix:new l.aI(y,a.u_matrix),u_label_plane_matrix:new l.aI(y,a.u_label_plane_matrix),u_coord_matrix:new l.aI(y,a.u_coord_matrix),u_is_text:new l.aG(y,a.u_is_text),u_pitch_with_map:new l.aG(y,a.u_pitch_with_map),u_texsize:new l.aL(y,a.u_texsize),u_texture:new l.aG(y,a.u_texture)}),symbolSDF:(y,a)=>({u_is_size_zoom_constant:new l.aG(y,a.u_is_size_zoom_constant),u_is_size_feature_constant:new l.aG(y,a.u_is_size_feature_constant),u_size_t:new l.aH(y,a.u_size_t),u_size:new l.aH(y,a.u_size),u_camera_to_center_distance:new l.aH(y,a.u_camera_to_center_distance),u_pitch:new l.aH(y,a.u_pitch),u_rotate_symbol:new l.aG(y,a.u_rotate_symbol),u_aspect_ratio:new l.aH(y,a.u_aspect_ratio),u_fade_change:new l.aH(y,a.u_fade_change),u_matrix:new l.aI(y,a.u_matrix),u_label_plane_matrix:new l.aI(y,a.u_label_plane_matrix),u_coord_matrix:new l.aI(y,a.u_coord_matrix),u_is_text:new l.aG(y,a.u_is_text),u_pitch_with_map:new l.aG(y,a.u_pitch_with_map),u_texsize:new l.aL(y,a.u_texsize),u_texture:new l.aG(y,a.u_texture),u_gamma_scale:new l.aH(y,a.u_gamma_scale),u_device_pixel_ratio:new l.aH(y,a.u_device_pixel_ratio),u_is_halo:new l.aG(y,a.u_is_halo)}),symbolTextAndIcon:(y,a)=>({u_is_size_zoom_constant:new l.aG(y,a.u_is_size_zoom_constant),u_is_size_feature_constant:new l.aG(y,a.u_is_size_feature_constant),u_size_t:new l.aH(y,a.u_size_t),u_size:new l.aH(y,a.u_size),u_camera_to_center_distance:new l.aH(y,a.u_camera_to_center_distance),u_pitch:new l.aH(y,a.u_pitch),u_rotate_symbol:new l.aG(y,a.u_rotate_symbol),u_aspect_ratio:new l.aH(y,a.u_aspect_ratio),u_fade_change:new l.aH(y,a.u_fade_change),u_matrix:new l.aI(y,a.u_matrix),u_label_plane_matrix:new l.aI(y,a.u_label_plane_matrix),u_coord_matrix:new l.aI(y,a.u_coord_matrix),u_is_text:new l.aG(y,a.u_is_text),u_pitch_with_map:new l.aG(y,a.u_pitch_with_map),u_texsize:new l.aL(y,a.u_texsize),u_texsize_icon:new l.aL(y,a.u_texsize_icon),u_texture:new l.aG(y,a.u_texture),u_texture_icon:new l.aG(y,a.u_texture_icon),u_gamma_scale:new l.aH(y,a.u_gamma_scale),u_device_pixel_ratio:new l.aH(y,a.u_device_pixel_ratio),u_is_halo:new l.aG(y,a.u_is_halo)}),background:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_opacity:new l.aH(y,a.u_opacity),u_color:new l.aM(y,a.u_color)}),backgroundPattern:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_opacity:new l.aH(y,a.u_opacity),u_image:new l.aG(y,a.u_image),u_pattern_tl_a:new l.aL(y,a.u_pattern_tl_a),u_pattern_br_a:new l.aL(y,a.u_pattern_br_a),u_pattern_tl_b:new l.aL(y,a.u_pattern_tl_b),u_pattern_br_b:new l.aL(y,a.u_pattern_br_b),u_texsize:new l.aL(y,a.u_texsize),u_mix:new l.aH(y,a.u_mix),u_pattern_size_a:new l.aL(y,a.u_pattern_size_a),u_pattern_size_b:new l.aL(y,a.u_pattern_size_b),u_scale_a:new l.aH(y,a.u_scale_a),u_scale_b:new l.aH(y,a.u_scale_b),u_pixel_coord_upper:new l.aL(y,a.u_pixel_coord_upper),u_pixel_coord_lower:new l.aL(y,a.u_pixel_coord_lower),u_tile_units_to_pixels:new l.aH(y,a.u_tile_units_to_pixels)}),terrain:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_texture:new l.aG(y,a.u_texture),u_ele_delta:new l.aH(y,a.u_ele_delta)}),terrainDepth:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_ele_delta:new l.aH(y,a.u_ele_delta)}),terrainCoords:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_texture:new l.aG(y,a.u_texture),u_terrain_coords_id:new l.aH(y,a.u_terrain_coords_id),u_ele_delta:new l.aH(y,a.u_ele_delta)})};class Oy{constructor(a,f,m){this.context=a;const g=a.gl;this.buffer=g.createBuffer(),this.dynamicDraw=!!m,this.context.unbindVAO(),a.bindElementBuffer.set(this.buffer),g.bufferData(g.ELEMENT_ARRAY_BUFFER,f.arrayBuffer,this.dynamicDraw?g.DYNAMIC_DRAW:g.STATIC_DRAW),this.dynamicDraw||delete f.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(a){const f=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),f.bufferSubData(f.ELEMENT_ARRAY_BUFFER,0,a.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const Vl={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class Ih{constructor(a,f,m,g){this.length=f.length,this.attributes=m,this.itemSize=f.bytesPerElement,this.dynamicDraw=g,this.context=a;const b=a.gl;this.buffer=b.createBuffer(),a.bindVertexBuffer.set(this.buffer),b.bufferData(b.ARRAY_BUFFER,f.arrayBuffer,this.dynamicDraw?b.DYNAMIC_DRAW:b.STATIC_DRAW),this.dynamicDraw||delete f.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(a){if(a.length!==this.length)throw new Error(`Length of new data is ${a.length}, which doesn't match current length of ${this.length}`);const f=this.context.gl;this.bind(),f.bufferSubData(f.ARRAY_BUFFER,0,a.arrayBuffer)}enableAttributes(a,f){for(let m=0;m0){const ct=l.F(),pt=$e;l.aP(ct,Ze.placementInvProjMatrix,y.transform.glCoordMatrix),l.aP(ct,ct,Ze.placementViewportMatrix),V.push({circleArray:nt,circleOffset:$,transform:pt,invTransform:ct,coord:De}),j+=nt.length/4,$=j}rt&&N.draw(L,k.LINES,An.disabled,mr.disabled,y.colorModeForRenderPass(),lr.disabled,Rm($e,y.transform,Ve),y.style.map.terrain&&y.style.map.terrain.getTerrainData(De),f.id,rt.layoutVertexBuffer,rt.indexBuffer,rt.segments,null,y.transform.zoom,null,null,rt.collisionVertexBuffer)}if(!T||!V.length)return;const he=y.useProgram("collisionCircle"),ce=new l.aQ;ce.resize(4*j),ce._trim();let ge=0;for(const ve of V)for(let De=0;De=0&&(ce[re.associatedIconIndex]={shiftedAnchor:un,angle:gt})}else Je(re.numGlyphs,$)}if(N){he.clear();const ge=y.icon.placedSymbolArray;for(let re=0;rey.style.map.terrain.getElevation(rt,ps,di):null,kr=f.layout.get("text-rotation-alignment")==="map";Z(ct,rt.posMatrix,y,g,Ho,ra,re,N,kr,pi)}const ul=y.translatePosMatrix(rt.posMatrix,nt,b,T),ia=Ce||g&&Ze||Bc?Mp:Ho,fi=y.translatePosMatrix(ra,nt,b,T,!0),Ar=gt&&f.paint.get(g?"text-halo-width":"icon-halo-width").constantOr(1)!==0;let xr;xr=gt?ct.iconsInText?Ic(Ht.kind,Jt,Be,re,y,ul,ia,fi,bn,yi):Ec(Ht.kind,Jt,Be,re,y,ul,ia,fi,g,bn,!0):Sc(Ht.kind,Jt,Be,re,y,ul,ia,fi,g,bn);const fs={program:kn,buffers:pt,uniformValues:xr,atlasTexture:Ur,atlasTextureIcon:Mr,atlasInterpolation:Jn,atlasInterpolationIcon:Wo,isSDF:gt,hasHalo:Ar};if(ve&&ct.canOverlap){De=!0;const pi=pt.segments.get();for(const kr of pi)$e.push({segments:new l.$([kr]),sortKey:kr.sortKey,state:fs,terrainData:mn})}else $e.push({segments:pt.segments,sortKey:0,state:fs,terrainData:mn})}De&&$e.sort((rt,nt)=>rt.sortKey-nt.sortKey);for(const rt of $e){const nt=rt.state;if($.activeTexture.set(he.TEXTURE0),nt.atlasTexture.bind(nt.atlasInterpolation,he.CLAMP_TO_EDGE),nt.atlasTextureIcon&&($.activeTexture.set(he.TEXTURE1),nt.atlasTextureIcon&&nt.atlasTextureIcon.bind(nt.atlasInterpolationIcon,he.CLAMP_TO_EDGE)),nt.isSDF){const ct=nt.uniformValues;nt.hasHalo&&(ct.u_is_halo=1,Xm(nt.buffers,rt.segments,f,y,nt.program,Ve,V,j,ct,rt.terrainData)),ct.u_is_halo=0}Xm(nt.buffers,rt.segments,f,y,nt.program,Ve,V,j,nt.uniformValues,rt.terrainData)}}function Xm(y,a,f,m,g,b,T,L,k,N){const V=m.context;g.draw(V,V.gl.TRIANGLES,b,T,L,lr.disabled,k,N,f.id,y.layoutVertexBuffer,y.indexBuffer,a,f.paint,m.transform.zoom,y.programConfigurations.get(f.id),y.dynamicLayoutVertexBuffer,y.opacityVertexBuffer)}function Oh(y,a,f,m,g){if(!f||!m||!m.imageAtlas)return;const b=m.imageAtlas.patternPositions;let T=b[f.to.toString()],L=b[f.from.toString()];if(!T&&L&&(T=L),!L&&T&&(L=T),!T||!L){const k=g.getPaintProperty(a);T=b[k],L=b[k]}T&&L&&y.setConstantPatternPositions(T,L)}function Ym(y,a,f,m,g,b,T){const L=y.context.gl,k="fill-pattern",N=f.paint.get(k),V=N&&N.constantOr(1),j=f.getCrossfadeParameters();let $,he,ce,ge,re;T?(he=V&&!f.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",$=L.LINES):(he=V?"fillPattern":"fill",$=L.TRIANGLES);const Ce=N.constantOr(null);for(const Be of m){const ve=a.getTile(Be);if(V&&!ve.patternsLoaded())continue;const De=ve.getBucket(f);if(!De)continue;const Ve=De.programConfigurations.get(f.id),Ze=y.useProgram(he,Ve),$e=y.style.map.terrain&&y.style.map.terrain.getTerrainData(Be);V&&(y.context.activeTexture.set(L.TEXTURE0),ve.imageAtlasTexture.bind(L.LINEAR,L.CLAMP_TO_EDGE),Ve.updatePaintBuffers(j)),Oh(Ve,k,Ce,ve,f);const rt=$e?Be:null,nt=y.translatePosMatrix(rt?rt.posMatrix:Be.posMatrix,ve,f.paint.get("fill-translate"),f.paint.get("fill-translate-anchor"));if(T){ge=De.indexBuffer2,re=De.segments2;const ct=[L.drawingBufferWidth,L.drawingBufferHeight];ce=he==="fillOutlinePattern"&&V?Dm(nt,y,j,ve,ct):ky(nt,ct)}else ge=De.indexBuffer,re=De.segments,ce=V?bh(nt,y,j,ve):km(nt);Ze.draw(y.context,$,g,y.stencilModeForClipping(Be),b,lr.disabled,ce,$e,f.id,De.layoutVertexBuffer,ge,re,f.paint,y.transform.zoom,Ve)}}function zh(y,a,f,m,g,b,T){const L=y.context,k=L.gl,N="fill-extrusion-pattern",V=f.paint.get(N),j=V.constantOr(1),$=f.getCrossfadeParameters(),he=f.paint.get("fill-extrusion-opacity"),ce=V.constantOr(null);for(const ge of m){const re=a.getTile(ge),Ce=re.getBucket(f);if(!Ce)continue;const Be=y.style.map.terrain&&y.style.map.terrain.getTerrainData(ge),ve=Ce.programConfigurations.get(f.id),De=y.useProgram(j?"fillExtrusionPattern":"fillExtrusion",ve);j&&(y.context.activeTexture.set(k.TEXTURE0),re.imageAtlasTexture.bind(k.LINEAR,k.CLAMP_TO_EDGE),ve.updatePaintBuffers($)),Oh(ve,N,ce,re,f);const Ve=y.translatePosMatrix(ge.posMatrix,re,f.paint.get("fill-extrusion-translate"),f.paint.get("fill-extrusion-translate-anchor")),Ze=f.paint.get("fill-extrusion-vertical-gradient"),$e=j?Ay(Ve,y,Ze,he,ge,$,re):bc(Ve,y,Ze,he);De.draw(L,L.gl.TRIANGLES,g,b,T,lr.backCCW,$e,Be,f.id,Ce.layoutVertexBuffer,Ce.indexBuffer,Ce.segments,f.paint,y.transform.zoom,ve,y.style.map.terrain&&Ce.centroidVertexBuffer)}}function Fh(y,a,f,m,g,b,T){const L=y.context,k=L.gl,N=f.fbo;if(!N)return;const V=y.useProgram("hillshade"),j=y.style.map.terrain&&y.style.map.terrain.getTerrainData(a);L.activeTexture.set(k.TEXTURE0),k.bindTexture(k.TEXTURE_2D,N.colorAttachment.get()),V.draw(L,k.TRIANGLES,g,b,T,lr.disabled,(($,he,ce,ge)=>{const re=ce.paint.get("hillshade-shadow-color"),Ce=ce.paint.get("hillshade-highlight-color"),Be=ce.paint.get("hillshade-accent-color");let ve=ce.paint.get("hillshade-illumination-direction")*(Math.PI/180);ce.paint.get("hillshade-illumination-anchor")==="viewport"&&(ve-=$.transform.angle);const De=!$.options.moving;return{u_matrix:ge?ge.posMatrix:$.transform.calculatePosMatrix(he.tileID.toUnwrapped(),De),u_image:0,u_latrange:zm(0,he.tileID),u_light:[ce.paint.get("hillshade-exaggeration"),ve],u_shadow:re,u_highlight:Ce,u_accent:Be}})(y,f,m,j?a:null),j,m.id,y.rasterBoundsBuffer,y.quadTriangleIndexBuffer,y.rasterBoundsSegments)}function Ap(y,a,f,m,g,b){const T=y.context,L=T.gl,k=a.dem;if(k&&k.data){const N=k.dim,V=k.stride,j=k.getPixels();if(T.activeTexture.set(L.TEXTURE1),T.pixelStoreUnpackPremultiplyAlpha.set(!1),a.demTexture=a.demTexture||y.getTileTexture(V),a.demTexture){const he=a.demTexture;he.update(j,{premultiply:!1}),he.bind(L.NEAREST,L.CLAMP_TO_EDGE)}else a.demTexture=new Y(T,j,L.RGBA,{premultiply:!1}),a.demTexture.bind(L.NEAREST,L.CLAMP_TO_EDGE);T.activeTexture.set(L.TEXTURE0);let $=a.fbo;if(!$){const he=new Y(T,{width:N,height:N,data:null},L.RGBA);he.bind(L.LINEAR,L.CLAMP_TO_EDGE),$=a.fbo=T.createFramebuffer(N,N,!0,!1),$.colorAttachment.set(he.texture)}T.bindFramebuffer.set($.framebuffer),T.viewport.set([0,0,N,N]),y.useProgram("hillshadePrepare").draw(T,L.TRIANGLES,m,g,b,lr.disabled,((he,ce)=>{const ge=ce.stride,re=l.F();return l.aN(re,0,l.W,-l.W,0,0,1),l.H(re,re,[0,-l.W,0]),{u_matrix:re,u_image:1,u_dimension:[ge,ge],u_zoom:he.overscaledZ,u_unpack:ce.getUnpackVector()}})(a.tileID,k),null,f.id,y.rasterBoundsBuffer,y.quadTriangleIndexBuffer,y.rasterBoundsSegments),a.needsHillshadePrepare=!1}}function $m(y,a,f,m,g,b){const T=m.paint.get("raster-fade-duration");if(!b&&T>0){const L=E.now(),k=(L-y.timeAdded)/T,N=a?(L-a.timeAdded)/T:-1,V=f.getSource(),j=g.coveringZoomLevel({tileSize:V.tileSize,roundZoom:V.roundZoom}),$=!a||Math.abs(a.tileID.overscaledZ-j)>Math.abs(y.tileID.overscaledZ-j),he=$&&y.refreshedUponExpiration?1:l.ac($?k:1-N,0,1);return y.refreshedUponExpiration&&k>=1&&(y.refreshedUponExpiration=!1),a?{opacity:1,mix:1-he}:{opacity:he,mix:0}}return{opacity:1,mix:0}}const Km=new l.aO(1,0,0,1),Bh=new l.aO(0,1,0,1),kp=new l.aO(0,0,1,1),Wy=new l.aO(1,0,1,1),Jm=new l.aO(0,1,1,1);function Br(y,a,f,m){ho(y,0,a+f/2,y.transform.width,f,m)}function il(y,a,f,m){ho(y,a-f/2,0,f,y.transform.height,m)}function ho(y,a,f,m,g,b){const T=y.context,L=T.gl;L.enable(L.SCISSOR_TEST),L.scissor(a*y.pixelRatio,f*y.pixelRatio,m*y.pixelRatio,g*y.pixelRatio),T.clear({color:b}),L.disable(L.SCISSOR_TEST)}function Dp(y,a,f){const m=y.context,g=m.gl,b=f.posMatrix,T=y.useProgram("debug"),L=An.disabled,k=mr.disabled,N=y.colorModeForRenderPass(),V="$debug",j=y.style.map.terrain&&y.style.map.terrain.getTerrainData(f);m.activeTexture.set(g.TEXTURE0);const $=a.getTileByID(f.key).latestRawTileData,he=Math.floor(($&&$.byteLength||0)/1024),ce=a.getTile(f).tileSize,ge=512/Math.min(ce,512)*(f.overscaledZ/y.transform.zoom)*.5;let re=f.canonical.toString();f.overscaledZ!==f.canonical.z&&(re+=` => ${f.overscaledZ}`),function(Ce,Be){Ce.initDebugOverlayCanvas();const ve=Ce.debugOverlayCanvas,De=Ce.context.gl,Ve=Ce.debugOverlayCanvas.getContext("2d");Ve.clearRect(0,0,ve.width,ve.height),Ve.shadowColor="white",Ve.shadowBlur=2,Ve.lineWidth=1.5,Ve.strokeStyle="white",Ve.textBaseline="top",Ve.font="bold 36px Open Sans, sans-serif",Ve.fillText(Be,5,5),Ve.strokeText(Be,5,5),Ce.debugOverlayTexture.update(ve),Ce.debugOverlayTexture.bind(De.LINEAR,De.CLAMP_TO_EDGE)}(y,`${re} ${he}kB`),T.draw(m,g.TRIANGLES,L,k,Qr.alphaBlended,lr.disabled,Nm(b,l.aO.transparent,ge),null,V,y.debugBuffer,y.quadTriangleIndexBuffer,y.debugSegments),T.draw(m,g.LINE_STRIP,L,k,N,lr.disabled,Nm(b,l.aO.red),j,V,y.debugBuffer,y.tileBorderIndexBuffer,y.debugSegments)}function Vh(y,a,f){const m=y.context,g=m.gl,b=y.colorModeForRenderPass(),T=new An(g.LEQUAL,An.ReadWrite,y.depthRangeFor3D),L=y.useProgram("terrain"),k=a.getTerrainMesh();m.bindFramebuffer.set(null),m.viewport.set([0,0,y.width,y.height]);for(const N of f){const V=y.renderToTexture.getTexture(N),j=a.getTerrainData(N.tileID);m.activeTexture.set(g.TEXTURE0),g.bindTexture(g.TEXTURE_2D,V.texture);const $={u_matrix:y.transform.calculatePosMatrix(N.tileID.toUnwrapped()),u_texture:0,u_ele_delta:a.getMeshFrameDelta(y.transform.zoom)};L.draw(m,g.TRIANGLES,T,mr.disabled,b,lr.backCCW,$,j,"terrain",k.vertexBuffer,k.indexBuffer,k.segments)}}class Qm{constructor(a,f){this.context=new qy(a),this.transform=f,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:l.an(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=ui.maxUnderzooming+ui.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new nl}resize(a,f,m){if(this.width=Math.floor(a*m),this.height=Math.floor(f*m),this.pixelRatio=m,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const g of this.style._order)this.style._layers[g].resize()}setup(){const a=this.context,f=new l.aV;f.emplaceBack(0,0),f.emplaceBack(l.W,0),f.emplaceBack(0,l.W),f.emplaceBack(l.W,l.W),this.tileExtentBuffer=a.createVertexBuffer(f,_h.members),this.tileExtentSegments=l.$.simpleSegment(0,0,4,2);const m=new l.aV;m.emplaceBack(0,0),m.emplaceBack(l.W,0),m.emplaceBack(0,l.W),m.emplaceBack(l.W,l.W),this.debugBuffer=a.createVertexBuffer(m,_h.members),this.debugSegments=l.$.simpleSegment(0,0,4,5);const g=new l.Z;g.emplaceBack(0,0,0,0),g.emplaceBack(l.W,0,l.W,0),g.emplaceBack(0,l.W,0,l.W),g.emplaceBack(l.W,l.W,l.W,l.W),this.rasterBoundsBuffer=a.createVertexBuffer(g,yn.members),this.rasterBoundsSegments=l.$.simpleSegment(0,0,4,2);const b=new l.aV;b.emplaceBack(0,0),b.emplaceBack(1,0),b.emplaceBack(0,1),b.emplaceBack(1,1),this.viewportBuffer=a.createVertexBuffer(b,_h.members),this.viewportSegments=l.$.simpleSegment(0,0,4,2);const T=new l.aW;T.emplaceBack(0),T.emplaceBack(1),T.emplaceBack(3),T.emplaceBack(2),T.emplaceBack(0),this.tileBorderIndexBuffer=a.createIndexBuffer(T);const L=new l.aX;L.emplaceBack(0,1,2),L.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=a.createIndexBuffer(L);const k=this.context.gl;this.stencilClearMode=new mr({func:k.ALWAYS,mask:0},0,255,k.ZERO,k.ZERO,k.ZERO)}clearStencil(){const a=this.context,f=a.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const m=l.F();l.aN(m,0,this.width,this.height,0,0,1),l.J(m,m,[f.drawingBufferWidth,f.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(a,f.TRIANGLES,An.disabled,this.stencilClearMode,Qr.disabled,lr.disabled,xh(m),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(a,f){if(this.currentStencilSource===a.source||!a.isTileClipped()||!f||!f.length)return;this.currentStencilSource=a.source;const m=this.context,g=m.gl;this.nextStencilID+f.length>256&&this.clearStencil(),m.setColorMode(Qr.disabled),m.setDepthMode(An.disabled);const b=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(const T of f){const L=this._tileClippingMaskIDs[T.key]=this.nextStencilID++,k=this.style.map.terrain&&this.style.map.terrain.getTerrainData(T);b.draw(m,g.TRIANGLES,An.disabled,new mr({func:g.ALWAYS,mask:0},L,255,g.KEEP,g.KEEP,g.REPLACE),Qr.disabled,lr.disabled,xh(T.posMatrix),k,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const a=this.nextStencilID++,f=this.context.gl;return new mr({func:f.NOTEQUAL,mask:255},a,255,f.KEEP,f.KEEP,f.REPLACE)}stencilModeForClipping(a){const f=this.context.gl;return new mr({func:f.EQUAL,mask:255},this._tileClippingMaskIDs[a.key],0,f.KEEP,f.KEEP,f.REPLACE)}stencilConfigForOverlap(a){const f=this.context.gl,m=a.sort((T,L)=>L.overscaledZ-T.overscaledZ),g=m[m.length-1].overscaledZ,b=m[0].overscaledZ-g+1;if(b>1){this.currentStencilSource=void 0,this.nextStencilID+b>256&&this.clearStencil();const T={};for(let L=0;L=0;this.currentLayer--){const k=this.style._layers[m[this.currentLayer]],N=g[k.source],V=b[k.source];this._renderTileClippingMasks(k,V),this.renderLayer(this,N,k,V)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayerre.source&&!re.isHidden(V)?[N.sourceCaches[re.source]]:[]),he=$.filter(re=>re.getSource().type==="vector"),ce=$.filter(re=>re.getSource().type!=="vector"),ge=re=>{(!j||j.getSource().maxzoomge(re)),j||ce.forEach(re=>ge(re)),j}(this.style,this.transform.zoom);k&&function(N,V,j){for(let $=0;$0),g&&(l.a_(f,m),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(b,T){const L=b.context,k=L.gl,N=Qr.unblended,V=new An(k.LEQUAL,An.ReadWrite,[0,1]),j=T.getTerrainMesh(),$=T.sourceCache.getRenderableTiles(),he=b.useProgram("terrainDepth");L.bindFramebuffer.set(T.getFramebuffer("depth").framebuffer),L.viewport.set([0,0,b.width/devicePixelRatio,b.height/devicePixelRatio]),L.clear({color:l.aO.transparent,depth:1});for(const ce of $){const ge=T.getTerrainData(ce.tileID),re={u_matrix:b.transform.calculatePosMatrix(ce.tileID.toUnwrapped()),u_ele_delta:T.getMeshFrameDelta(b.transform.zoom)};he.draw(L,k.TRIANGLES,V,mr.disabled,N,lr.backCCW,re,ge,"terrain",j.vertexBuffer,j.indexBuffer,j.segments)}L.bindFramebuffer.set(null),L.viewport.set([0,0,b.width,b.height])}(this,this.style.map.terrain),function(b,T){const L=b.context,k=L.gl,N=Qr.unblended,V=new An(k.LEQUAL,An.ReadWrite,[0,1]),j=T.getTerrainMesh(),$=T.getCoordsTexture(),he=T.sourceCache.getRenderableTiles(),ce=b.useProgram("terrainCoords");L.bindFramebuffer.set(T.getFramebuffer("coords").framebuffer),L.viewport.set([0,0,b.width/devicePixelRatio,b.height/devicePixelRatio]),L.clear({color:l.aO.transparent,depth:1}),T.coordsIndex=[];for(const ge of he){const re=T.getTerrainData(ge.tileID);L.activeTexture.set(k.TEXTURE0),k.bindTexture(k.TEXTURE_2D,$.texture);const Ce={u_matrix:b.transform.calculatePosMatrix(ge.tileID.toUnwrapped()),u_terrain_coords_id:(255-T.coordsIndex.length)/255,u_texture:0,u_ele_delta:T.getMeshFrameDelta(b.transform.zoom)};ce.draw(L,k.TRIANGLES,V,mr.disabled,N,lr.backCCW,Ce,re,"terrain",j.vertexBuffer,j.indexBuffer,j.segments),T.coordsIndex.push(ge.tileID.key)}L.bindFramebuffer.set(null),L.viewport.set([0,0,b.width,b.height])}(this,this.style.map.terrain))}renderLayer(a,f,m,g){if(!m.isHidden(this.transform.zoom)&&(m.type==="background"||m.type==="custom"||(g||[]).length))switch(this.id=m.id,m.type){case"symbol":(function(b,T,L,k,N){if(b.renderPass!=="translucent")return;const V=mr.disabled,j=b.colorModeForRenderPass();(L._unevaluatedLayout.hasValue("text-variable-anchor")||L._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function($,he,ce,ge,re,Ce,Be){const ve=he.transform,De=re==="map",Ve=Ce==="map";for(const Ze of $){const $e=ge.getTile(Ze),rt=$e.getBucket(ce);if(!rt||!rt.text||!rt.text.segments.get().length)continue;const nt=l.ag(rt.textSizeData,ve.zoom),ct=tn($e,1,he.transform.zoom),pt=on(Ze.posMatrix,Ve,De,he.transform,ct),un=ce.layout.get("icon-text-fit")!=="none"&&rt.hasIconData();if(nt){const gt=Math.pow(2,ve.zoom-$e.tileID.overscaledZ);Dh(rt,De,Ve,Be,ve,pt,Ze.posMatrix,gt,nt,un,he.style.map.terrain?(Ht,cn)=>he.style.map.terrain.getElevation(Ze,Ht,cn):null)}}}(k,b,L,T,L.layout.get("text-rotation-alignment"),L.layout.get("text-pitch-alignment"),N),L.paint.get("icon-opacity").constantOr(1)!==0&&Nh(b,T,L,k,!1,L.paint.get("icon-translate"),L.paint.get("icon-translate-anchor"),L.layout.get("icon-rotation-alignment"),L.layout.get("icon-pitch-alignment"),L.layout.get("icon-keep-upright"),V,j),L.paint.get("text-opacity").constantOr(1)!==0&&Nh(b,T,L,k,!0,L.paint.get("text-translate"),L.paint.get("text-translate-anchor"),L.layout.get("text-rotation-alignment"),L.layout.get("text-pitch-alignment"),L.layout.get("text-keep-upright"),V,j),T.map.showCollisionBoxes&&(kh(b,T,L,k,L.paint.get("text-translate"),L.paint.get("text-translate-anchor"),!0),kh(b,T,L,k,L.paint.get("icon-translate"),L.paint.get("icon-translate-anchor"),!1))})(a,f,m,g,this.style.placement.variableOffsets);break;case"circle":(function(b,T,L,k){if(b.renderPass!=="translucent")return;const N=L.paint.get("circle-opacity"),V=L.paint.get("circle-stroke-width"),j=L.paint.get("circle-stroke-opacity"),$=!L.layout.get("circle-sort-key").isConstant();if(N.constantOr(1)===0&&(V.constantOr(1)===0||j.constantOr(1)===0))return;const he=b.context,ce=he.gl,ge=b.depthModeForSublayer(0,An.ReadOnly),re=mr.disabled,Ce=b.colorModeForRenderPass(),Be=[];for(let ve=0;veve.sortKey-De.sortKey);for(const ve of Be){const{programConfiguration:De,program:Ve,layoutVertexBuffer:Ze,indexBuffer:$e,uniformValues:rt,terrainData:nt}=ve.state;Ve.draw(he,ce.TRIANGLES,ge,re,Ce,lr.disabled,rt,nt,L.id,Ze,$e,ve.segments,L.paint,b.transform.zoom,De)}})(a,f,m,g);break;case"heatmap":(function(b,T,L,k){if(L.paint.get("heatmap-opacity")!==0)if(b.renderPass==="offscreen"){const N=b.context,V=N.gl,j=mr.disabled,$=new Qr([V.ONE,V.ONE],l.aO.transparent,[!0,!0,!0,!0]);(function(he,ce,ge){const re=he.gl;he.activeTexture.set(re.TEXTURE1),he.viewport.set([0,0,ce.width/4,ce.height/4]);let Ce=ge.heatmapFbo;if(Ce)re.bindTexture(re.TEXTURE_2D,Ce.colorAttachment.get()),he.bindFramebuffer.set(Ce.framebuffer);else{const Be=re.createTexture();re.bindTexture(re.TEXTURE_2D,Be),re.texParameteri(re.TEXTURE_2D,re.TEXTURE_WRAP_S,re.CLAMP_TO_EDGE),re.texParameteri(re.TEXTURE_2D,re.TEXTURE_WRAP_T,re.CLAMP_TO_EDGE),re.texParameteri(re.TEXTURE_2D,re.TEXTURE_MIN_FILTER,re.LINEAR),re.texParameteri(re.TEXTURE_2D,re.TEXTURE_MAG_FILTER,re.LINEAR),Ce=ge.heatmapFbo=he.createFramebuffer(ce.width/4,ce.height/4,!1,!1),function(ve,De,Ve,Ze){var $e,rt;const nt=ve.gl,ct=($e=ve.HALF_FLOAT)!==null&&$e!==void 0?$e:nt.UNSIGNED_BYTE,pt=(rt=ve.RGBA16F)!==null&&rt!==void 0?rt:nt.RGBA;nt.texImage2D(nt.TEXTURE_2D,0,pt,De.width/4,De.height/4,0,nt.RGBA,ct,null),Ze.colorAttachment.set(Ve)}(he,ce,Be,Ce)}})(N,b,L),N.clear({color:l.aO.transparent});for(let he=0;he{const ve=l.F();l.aN(ve,0,ge.width,ge.height,0,0,1);const De=ge.context.gl;return{u_matrix:ve,u_world:[De.drawingBufferWidth,De.drawingBufferHeight],u_image:0,u_color_ramp:1,u_opacity:re.paint.get("heatmap-opacity")}})(N,V),null,V.id,N.viewportBuffer,N.quadTriangleIndexBuffer,N.viewportSegments,V.paint,N.transform.zoom)}(b,L))})(a,f,m,g);break;case"line":(function(b,T,L,k){if(b.renderPass!=="translucent")return;const N=L.paint.get("line-opacity"),V=L.paint.get("line-width");if(N.constantOr(1)===0||V.constantOr(1)===0)return;const j=b.depthModeForSublayer(0,An.ReadOnly),$=b.colorModeForRenderPass(),he=L.paint.get("line-dasharray"),ce=L.paint.get("line-pattern"),ge=ce.constantOr(1),re=L.paint.get("line-gradient"),Ce=L.getCrossfadeParameters(),Be=ge?"linePattern":he?"lineSDF":re?"lineGradient":"line",ve=b.context,De=ve.gl;let Ve=!0;for(const Ze of k){const $e=T.getTile(Ze);if(ge&&!$e.patternsLoaded())continue;const rt=$e.getBucket(L);if(!rt)continue;const nt=rt.programConfigurations.get(L.id),ct=b.context.program.get(),pt=b.useProgram(Be,nt),un=Ve||pt.program!==ct,gt=b.style.map.terrain&&b.style.map.terrain.getTerrainData(Ze),Ht=ce.constantOr(null);if(Ht&&$e.imageAtlas){const Jt=$e.imageAtlas,mn=Jt.patternPositions[Ht.to.toString()],bn=Jt.patternPositions[Ht.from.toString()];mn&&bn&&nt.setConstantPatternPositions(mn,bn)}const cn=gt?Ze:null,kn=ge?Bl(b,$e,L,Ce,cn):he?Sh(b,$e,L,he,Ce,cn):re?Fm(b,$e,L,rt.lineClipsArray.length,cn):wh(b,$e,L,cn);if(ge)ve.activeTexture.set(De.TEXTURE0),$e.imageAtlasTexture.bind(De.LINEAR,De.CLAMP_TO_EDGE),nt.updatePaintBuffers(Ce);else if(he&&(un||b.lineAtlas.dirty))ve.activeTexture.set(De.TEXTURE0),b.lineAtlas.bind(ve);else if(re){const Jt=rt.gradients[L.id];let mn=Jt.texture;if(L.gradientVersion!==Jt.version){let bn=256;if(L.stepInterpolant){const Ur=T.getSource().maxzoom,Jn=Ze.canonical.z===Ur?Math.ceil(1<0?f.pop():null}isPatternMissing(a){if(!a)return!1;if(!a.from||!a.to)return!0;const f=this.imageManager.getPattern(a.from.toString()),m=this.imageManager.getPattern(a.to.toString());return!f||!m}useProgram(a,f){this.cache=this.cache||{};const m=a+(f?f.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[m]||(this.cache[m]=new rl(this.context,vc[a],f,Bm[a],this._showOverdrawInspector,this.style.map.terrain)),this.cache[m]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){const a=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(a.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new Y(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){const{drawingBufferWidth:a,drawingBufferHeight:f}=this.context.gl;return this.width!==a||this.height!==f}}class ol{constructor(a,f){this.points=a,this.planes=f}static fromInvProjectionMatrix(a,f,m){const g=Math.pow(2,m),b=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(L=>{const k=1/(L=l.af([],L,a))[3]/f*g;return l.a$(L,L,[k,k,1/L[3],k])}),T=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(L=>{const k=function($,he){var ce=he[0],ge=he[1],re=he[2],Ce=ce*ce+ge*ge+re*re;return Ce>0&&(Ce=1/Math.sqrt(Ce)),$[0]=he[0]*Ce,$[1]=he[1]*Ce,$[2]=he[2]*Ce,$}([],function($,he,ce){var ge=he[0],re=he[1],Ce=he[2],Be=ce[0],ve=ce[1],De=ce[2];return $[0]=re*De-Ce*ve,$[1]=Ce*Be-ge*De,$[2]=ge*ve-re*Be,$}([],pe([],b[L[0]],b[L[1]]),pe([],b[L[2]],b[L[1]]))),N=-((V=k)[0]*(j=b[L[1]])[0]+V[1]*j[1]+V[2]*j[2]);var V,j;return k.concat(N)});return new ol(b,T)}}class sl{constructor(a,f){this.min=a,this.max=f,this.center=function(m,g,b){return m[0]=.5*g[0],m[1]=.5*g[1],m[2]=.5*g[2],m}([],function(m,g,b){return m[0]=g[0]+b[0],m[1]=g[1]+b[1],m[2]=g[2]+b[2],m}([],this.min,this.max))}quadrant(a){const f=[a%2==0,a<2],m=ee(this.min),g=ee(this.max);for(let b=0;b=0&&T++;if(T===0)return 0;T!==f.length&&(m=!1)}if(m)return 2;for(let g=0;g<3;g++){let b=Number.MAX_VALUE,T=-Number.MAX_VALUE;for(let L=0;Lthis.max[g]-this.min[g])return 0}return 1}}class Tu{constructor(a=0,f=0,m=0,g=0){if(isNaN(a)||a<0||isNaN(f)||f<0||isNaN(m)||m<0||isNaN(g)||g<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=a,this.bottom=f,this.left=m,this.right=g}interpolate(a,f,m){return f.top!=null&&a.top!=null&&(this.top=l.z.number(a.top,f.top,m)),f.bottom!=null&&a.bottom!=null&&(this.bottom=l.z.number(a.bottom,f.bottom,m)),f.left!=null&&a.left!=null&&(this.left=l.z.number(a.left,f.left,m)),f.right!=null&&a.right!=null&&(this.right=l.z.number(a.right,f.right,m)),this}getCenter(a,f){const m=l.ac((this.left+a-this.right)/2,0,a),g=l.ac((this.top+f-this.bottom)/2,0,f);return new l.P(m,g)}equals(a){return this.top===a.top&&this.bottom===a.bottom&&this.left===a.left&&this.right===a.right}clone(){return new Tu(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}const Rp=85.051129;class Uh{constructor(a,f,m,g,b){this.tileSize=512,this._renderWorldCopies=b===void 0||!!b,this._minZoom=a||0,this._maxZoom=f||22,this._minPitch=m??0,this._maxPitch=g??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new l.M(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Tu,this._posMatrixCache={},this._alignedPosMatrixCache={},this.minElevationForCurrentTile=0}clone(){const a=new Uh(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return a.apply(this),a}apply(a){this.tileSize=a.tileSize,this.latRange=a.latRange,this.width=a.width,this.height=a.height,this._center=a._center,this._elevation=a._elevation,this.minElevationForCurrentTile=a.minElevationForCurrentTile,this.zoom=a.zoom,this.angle=a.angle,this._fov=a._fov,this._pitch=a._pitch,this._unmodified=a._unmodified,this._edgeInsets=a._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(a){this._minZoom!==a&&(this._minZoom=a,this.zoom=Math.max(this.zoom,a))}get maxZoom(){return this._maxZoom}set maxZoom(a){this._maxZoom!==a&&(this._maxZoom=a,this.zoom=Math.min(this.zoom,a))}get minPitch(){return this._minPitch}set minPitch(a){this._minPitch!==a&&(this._minPitch=a,this.pitch=Math.max(this.pitch,a))}get maxPitch(){return this._maxPitch}set maxPitch(a){this._maxPitch!==a&&(this._maxPitch=a,this.pitch=Math.min(this.pitch,a))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(a){a===void 0?a=!0:a===null&&(a=!1),this._renderWorldCopies=a}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new l.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(a){const f=-l.b1(a,-180,180)*Math.PI/180;this.angle!==f&&(this._unmodified=!1,this.angle=f,this._calcMatrices(),this.rotationMatrix=function(){var m=new l.A(4);return l.A!=Float32Array&&(m[1]=0,m[2]=0),m[0]=1,m[3]=1,m}(),function(m,g,b){var T=g[0],L=g[1],k=g[2],N=g[3],V=Math.sin(b),j=Math.cos(b);m[0]=T*j+k*V,m[1]=L*j+N*V,m[2]=T*-V+k*j,m[3]=L*-V+N*j}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(a){const f=l.ac(a,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==f&&(this._unmodified=!1,this._pitch=f,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(a){a=Math.max(.01,Math.min(60,a)),this._fov!==a&&(this._unmodified=!1,this._fov=a/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(a){const f=Math.min(Math.max(a,this.minZoom),this.maxZoom);this._zoom!==f&&(this._unmodified=!1,this._zoom=f,this.tileZoom=Math.max(0,Math.floor(f)),this.scale=this.zoomScale(f),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(a){a.lat===this._center.lat&&a.lng===this._center.lng||(this._unmodified=!1,this._center=a,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(a){a!==this._elevation&&(this._elevation=a,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(a){this._edgeInsets.equals(a)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,a,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(a){return this._edgeInsets.equals(a)}interpolatePadding(a,f,m){this._unmodified=!1,this._edgeInsets.interpolate(a,f,m),this._constrain(),this._calcMatrices()}coveringZoomLevel(a){const f=(a.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/a.tileSize));return Math.max(0,f)}getVisibleUnwrappedCoordinates(a){const f=[new l.b2(0,a)];if(this._renderWorldCopies){const m=this.pointCoordinate(new l.P(0,0)),g=this.pointCoordinate(new l.P(this.width,0)),b=this.pointCoordinate(new l.P(this.width,this.height)),T=this.pointCoordinate(new l.P(0,this.height)),L=Math.floor(Math.min(m.x,g.x,b.x,T.x)),k=Math.floor(Math.max(m.x,g.x,b.x,T.x)),N=1;for(let V=L-N;V<=k+N;V++)V!==0&&f.push(new l.b2(V,a))}return f}coveringTiles(a){var f,m;let g=this.coveringZoomLevel(a);const b=g;if(a.minzoom!==void 0&&ga.maxzoom&&(g=a.maxzoom);const T=this.pointCoordinate(this.getCameraPoint()),L=l.Y.fromLngLat(this.center),k=Math.pow(2,g),N=[k*T.x,k*T.y,0],V=[k*L.x,k*L.y,0],j=ol.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,g);let $=a.minzoom||0;!a.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&($=g);const he=a.terrain?2/Math.min(this.tileSize,a.tileSize)*this.tileSize:3,ce=ve=>({aabb:new sl([ve*k,0,0],[(ve+1)*k,k,0]),zoom:0,x:0,y:0,wrap:ve,fullyVisible:!1}),ge=[],re=[],Ce=g,Be=a.reparseOverscaled?b:g;if(this._renderWorldCopies)for(let ve=1;ve<=3;ve++)ge.push(ce(-ve)),ge.push(ce(ve));for(ge.push(ce(0));ge.length>0;){const ve=ge.pop(),De=ve.x,Ve=ve.y;let Ze=ve.fullyVisible;if(!Ze){const pt=ve.aabb.intersects(j);if(pt===0)continue;Ze=pt===2}const $e=a.terrain?N:V,rt=ve.aabb.distanceX($e),nt=ve.aabb.distanceY($e),ct=Math.max(Math.abs(rt),Math.abs(nt));if(ve.zoom===Ce||ct>he+(1<=$){const pt=Ce-ve.zoom,un=N[0]-.5-(De<>1),Ht=ve.zoom+1;let cn=ve.aabb.quadrant(pt);if(a.terrain){const kn=new l.Q(Ht,ve.wrap,Ht,un,gt),Jt=a.terrain.getMinMaxElevation(kn),mn=(f=Jt.minElevation)!==null&&f!==void 0?f:this.elevation,bn=(m=Jt.maxElevation)!==null&&m!==void 0?m:this.elevation;cn=new sl([cn.min[0],cn.min[1],mn],[cn.max[0],cn.max[1],bn])}ge.push({aabb:cn,zoom:Ht,x:un,y:gt,wrap:ve.wrap,fullyVisible:Ze})}}return re.sort((ve,De)=>ve.distanceSq-De.distanceSq).map(ve=>ve.tileID)}resize(a,f){this.width=a,this.height=f,this.pixelsToGLUnits=[2/a,-2/f],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(a){return Math.pow(2,a)}scaleZoom(a){return Math.log(a)/Math.LN2}project(a){const f=l.ac(a.lat,-85.051129,Rp);return new l.P(l.N(a.lng)*this.worldSize,l.O(f)*this.worldSize)}unproject(a){return new l.Y(a.x/this.worldSize,a.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}getCameraPosition(){return{lngLat:this.pointLocation(this.getCameraPoint()),altitude:Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter+this.elevation}}recalculateZoom(a){const f=this.elevation,m=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,g=this.pointLocation(this.centerPoint,a),b=a.getElevationForLngLatZoom(g,this.tileZoom);if(!(this.elevation-b))return;const T=m+f-b,L=Math.cos(this._pitch)*this.cameraToCenterDistance/T/l.b3(1,g.lat),k=this.scaleZoom(L/this.tileSize);this._elevation=b,this._center=g,this.zoom=k}setLocationAtPoint(a,f){const m=this.pointCoordinate(f),g=this.pointCoordinate(this.centerPoint),b=this.locationCoordinate(a),T=new l.Y(b.x-(m.x-g.x),b.y-(m.y-g.y));this.center=this.coordinateLocation(T),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(a,f){return f?this.coordinatePoint(this.locationCoordinate(a),f.getElevationForLngLatZoom(a,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(a))}pointLocation(a,f){return this.coordinateLocation(this.pointCoordinate(a,f))}locationCoordinate(a){return l.Y.fromLngLat(a)}coordinateLocation(a){return a&&a.toLngLat()}pointCoordinate(a,f){if(f){const $=f.pointCoordinate(a);if($!=null)return $}const m=[a.x,a.y,0,1],g=[a.x,a.y,1,1];l.af(m,m,this.pixelMatrixInverse),l.af(g,g,this.pixelMatrixInverse);const b=m[3],T=g[3],L=m[1]/b,k=g[1]/T,N=m[2]/b,V=g[2]/T,j=N===V?0:(0-N)/(V-N);return new l.Y(l.z.number(m[0]/b,g[0]/T,j)/this.worldSize,l.z.number(L,k,j)/this.worldSize)}coordinatePoint(a,f=0,m=this.pixelMatrix){const g=[a.x*this.worldSize,a.y*this.worldSize,f,1];return l.af(g,g,m),new l.P(g[0]/g[3],g[1]/g[3])}getBounds(){const a=Math.max(0,this.height/2-this.getHorizon());return new Me().extend(this.pointLocation(new l.P(0,a))).extend(this.pointLocation(new l.P(this.width,a))).extend(this.pointLocation(new l.P(this.width,this.height))).extend(this.pointLocation(new l.P(0,this.height)))}getMaxBounds(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new Me([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}getHorizon(){return Math.tan(Math.PI/2-this._pitch)*this.cameraToCenterDistance*.85}setMaxBounds(a){a?(this.lngRange=[a.getWest(),a.getEast()],this.latRange=[a.getSouth(),a.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,Rp])}calculatePosMatrix(a,f=!1){const m=a.key,g=f?this._alignedPosMatrixCache:this._posMatrixCache;if(g[m])return g[m];const b=a.canonical,T=this.worldSize/this.zoomScale(b.z),L=b.x+Math.pow(2,b.z)*a.wrap,k=l.an(new Float64Array(16));return l.H(k,k,[L*T,b.y*T,0]),l.J(k,k,[T/l.W,T/l.W,1]),l.K(k,f?this.alignedProjMatrix:this.projMatrix,k),g[m]=new Float32Array(k),g[m]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(a,f){f=l.ac(+f,this.minZoom,this.maxZoom);const m={center:new l.M(a.lng,a.lat),zoom:f};let g=this.lngRange;if(!this._renderWorldCopies&&g===null){const ve=179.9999999999;g=[-ve,ve]}const b=this.tileSize*this.zoomScale(m.zoom);let T=0,L=b,k=0,N=b,V=0,j=0;const{x:$,y:he}=this.size;if(this.latRange){const ve=this.latRange;T=l.O(ve[1])*b,L=l.O(ve[0])*b,L-TL&&(Ce=L-ve)}if(g){const ve=(k+N)/2;let De=ce;this._renderWorldCopies&&(De=l.b1(ce,ve-b/2,ve+b/2));const Ve=$/2;De-VeN&&(re=N-Ve)}if(re!==void 0||Ce!==void 0){const ve=new l.P(re??ce,Ce??ge);m.center=this.unproject.call({worldSize:b},ve).wrap()}return m}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;const a=this._unmodified,{center:f,zoom:m}=this.getConstrained(this.center,this.zoom);this.center=f,this.zoom=m,this._unmodified=a,this._constraining=!1}_calcMatrices(){if(!this.height)return;const a=this.centerOffset,f=this.point.x,m=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=l.b3(1,this.center.lat)*this.worldSize;let g=l.an(new Float64Array(16));l.J(g,g,[this.width/2,-this.height/2,1]),l.H(g,g,[1,-1,0]),this.labelPlaneMatrix=g,g=l.an(new Float64Array(16)),l.J(g,g,[1,-1,1]),l.H(g,g,[-1,-1,0]),l.J(g,g,[2/this.width,2/this.height,1]),this.glCoordMatrix=g;const b=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),T=Math.min(this.elevation,this.minElevationForCurrentTile),L=b-T*this._pixelPerMeter/Math.cos(this._pitch),k=T<0?L:b,N=Math.PI/2+this._pitch,V=this._fov*(.5+a.y/this.height),j=Math.sin(V)*k/Math.sin(l.ac(Math.PI-N-V,.01,Math.PI-.01)),$=this.getHorizon(),he=2*Math.atan($/this.cameraToCenterDistance)*(.5+a.y/(2*$)),ce=Math.sin(he)*k/Math.sin(l.ac(Math.PI-N-he,.01,Math.PI-.01)),ge=Math.min(j,ce),re=1.01*(Math.cos(Math.PI/2-this._pitch)*ge+k),Ce=this.height/50;g=new Float64Array(16),l.b4(g,this._fov,this.width/this.height,Ce,re),g[8]=2*-a.x/this.width,g[9]=2*a.y/this.height,l.J(g,g,[1,-1,1]),l.H(g,g,[0,0,-this.cameraToCenterDistance]),l.b5(g,g,this._pitch),l.ad(g,g,this.angle),l.H(g,g,[-f,-m,0]),this.mercatorMatrix=l.J([],g,[this.worldSize,this.worldSize,this.worldSize]),l.J(g,g,[1,1,this._pixelPerMeter]),this.pixelMatrix=l.K(new Float64Array(16),this.labelPlaneMatrix,g),l.H(g,g,[0,0,-this.elevation]),this.projMatrix=g,this.invProjMatrix=l.ar([],g),this.pixelMatrix3D=l.K(new Float64Array(16),this.labelPlaneMatrix,g);const Be=this.width%2/2,ve=this.height%2/2,De=Math.cos(this.angle),Ve=Math.sin(this.angle),Ze=f-Math.round(f)+De*Be+Ve*ve,$e=m-Math.round(m)+De*ve+Ve*Be,rt=new Float64Array(g);if(l.H(rt,rt,[Ze>.5?Ze-1:Ze,$e>.5?$e-1:$e,0]),this.alignedProjMatrix=rt,g=l.ar(new Float64Array(16),this.pixelMatrix),!g)throw new Error("failed to invert matrix");this.pixelMatrixInverse=g,this._posMatrixCache={},this._alignedPosMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;const a=this.pointCoordinate(new l.P(0,0)),f=[a.x*this.worldSize,a.y*this.worldSize,0,1];return l.af(f,f,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){const a=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new l.P(0,a))}getCameraQueryGeometry(a){const f=this.getCameraPoint();if(a.length===1)return[a[0],f];{let m=f.x,g=f.y,b=f.x,T=f.y;for(const L of a)m=Math.min(m,L.x),g=Math.min(g,L.y),b=Math.max(b,L.x),T=Math.max(T,L.y);return[new l.P(m,g),new l.P(b,g),new l.P(b,T),new l.P(m,T),new l.P(m,g)]}}lngLatToCameraDepth(a,f){const m=this.locationCoordinate(a),g=[m.x*this.worldSize,m.y*this.worldSize,f,1];return l.af(g,g,this.projMatrix),g[2]/g[3]}}function Np(y,a){let f,m=!1,g=null,b=null;const T=()=>{g=null,m&&(y.apply(b,f),g=setTimeout(T,a),m=!1)};return(...L)=>(m=!0,b=this,f=L,g||T(),g)}class Op{constructor(a){this._getCurrentHash=()=>{const f=window.location.hash.replace("#","");if(this._hashName){let m;return f.split("&").map(g=>g.split("=")).forEach(g=>{g[0]===this._hashName&&(m=g)}),(m&&m[1]||"").split("/")}return f.split("/")},this._onHashChange=()=>{const f=this._getCurrentHash();if(f.length>=3&&!f.some(m=>isNaN(m))){const m=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(f[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+f[2],+f[1]],zoom:+f[0],bearing:m,pitch:+(f[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{const f=window.location.href.replace(/(#.+)?$/,this.getHashString());try{window.history.replaceState(window.history.state,null,f)}catch{}},this._updateHash=Np(this._updateHashUnthrottled,300),this._hashName=a&&encodeURIComponent(a)}addTo(a){return this._map=a,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this}getHashString(a){const f=this._map.getCenter(),m=Math.round(100*this._map.getZoom())/100,g=Math.ceil((m*Math.LN2+Math.log(512/360/.5))/Math.LN10),b=Math.pow(10,g),T=Math.round(f.lng*b)/b,L=Math.round(f.lat*b)/b,k=this._map.getBearing(),N=this._map.getPitch();let V="";if(V+=a?`/${T}/${L}/${m}`:`${m}/${L}/${T}`,(k||N)&&(V+="/"+Math.round(10*k)/10),N&&(V+=`/${Math.round(N)}`),this._hashName){const j=this._hashName;let $=!1;const he=window.location.hash.slice(1).split("&").map(ce=>{const ge=ce.split("=")[0];return ge===j?($=!0,`${ge}=${V}`):ce}).filter(ce=>ce);return $||he.push(`${j}=${V}`),`#${he.join("&")}`}return`#${V}`}}const Tc={linearity:.3,easing:l.b6(0,0,.3,1)},Gl=l.e({deceleration:2500,maxSpeed:1400},Tc),eg=l.e({deceleration:20,maxSpeed:1400},Tc),tg=l.e({deceleration:1e3,maxSpeed:360},Tc),ng=l.e({deceleration:1e3,maxSpeed:90},Tc);class rg{constructor(a){this._map=a,this.clear()}clear(){this._inertiaBuffer=[]}record(a){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:E.now(),settings:a})}_drainInertiaBuffer(){const a=this._inertiaBuffer,f=E.now();for(;a.length>0&&f-a[0].time>160;)a.shift()}_onMoveEnd(a){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const f={zoom:0,bearing:0,pitch:0,pan:new l.P(0,0),pinchAround:void 0,around:void 0};for(const{settings:b}of this._inertiaBuffer)f.zoom+=b.zoomDelta||0,f.bearing+=b.bearingDelta||0,f.pitch+=b.pitchDelta||0,b.panDelta&&f.pan._add(b.panDelta),b.around&&(f.around=b.around),b.pinchAround&&(f.pinchAround=b.pinchAround);const m=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,g={};if(f.pan.mag()){const b=Pc(f.pan.mag(),m,l.e({},Gl,a||{}));g.offset=f.pan.mult(b.amount/f.pan.mag()),g.center=this._map.transform.center,Lc(g,b)}if(f.zoom){const b=Pc(f.zoom,m,eg);g.zoom=this._map.transform.zoom+b.amount,Lc(g,b)}if(f.bearing){const b=Pc(f.bearing,m,tg);g.bearing=this._map.transform.bearing+l.ac(b.amount,-179,179),Lc(g,b)}if(f.pitch){const b=Pc(f.pitch,m,ng);g.pitch=this._map.transform.pitch+b.amount,Lc(g,b)}if(g.zoom||g.bearing){const b=f.pinchAround===void 0?f.around:f.pinchAround;g.around=b?this._map.unproject(b):this._map.getCenter()}return this.clear(),l.e(g,{noMoveStart:!0})}}function Lc(y,a){(!y.duration||y.durationf.unproject(k)),L=b.reduce((k,N,V,j)=>k.add(N.div(j.length)),new l.P(0,0));super(a,{points:b,point:L,lngLats:T,lngLat:f.unproject(L),originalEvent:m}),this._defaultPrevented=!1}}class zp extends l.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(a,f,m){super(a,{originalEvent:m}),this._defaultPrevented=!1}}class Ls{constructor(a,f){this._map=a,this._clickTolerance=f.clickTolerance}reset(){delete this._mousedownPos}wheel(a){return this._firePreventable(new zp(a.type,this._map,a))}mousedown(a,f){return this._mousedownPos=f,this._firePreventable(new Io(a.type,this._map,a))}mouseup(a){this._map.fire(new Io(a.type,this._map,a))}click(a,f){this._mousedownPos&&this._mousedownPos.dist(f)>=this._clickTolerance||this._map.fire(new Io(a.type,this._map,a))}dblclick(a){return this._firePreventable(new Io(a.type,this._map,a))}mouseover(a){this._map.fire(new Io(a.type,this._map,a))}mouseout(a){this._map.fire(new Io(a.type,this._map,a))}touchstart(a){return this._firePreventable(new ea(a.type,this._map,a))}touchmove(a){this._map.fire(new ea(a.type,this._map,a))}touchend(a){this._map.fire(new ea(a.type,this._map,a))}touchcancel(a){this._map.fire(new ea(a.type,this._map,a))}_firePreventable(a){if(this._map.fire(a),a.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class ta{constructor(a){this._map=a}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(a){this._map.fire(new Io(a.type,this._map,a))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Io("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(a){this._delayContextMenu?this._contextMenuEvent=a:this._ignoreContextMenu||this._map.fire(new Io(a.type,this._map,a)),this._map.listens("contextmenu")&&a.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Lu{constructor(a){this._map=a}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(a){return this.transform.pointLocation(l.P.convert(a),this._map.terrain)}}class Ps{constructor(a,f){this._map=a,this._tr=new Lu(a),this._el=a.getCanvasContainer(),this._container=a.getContainer(),this._clickTolerance=f.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(a,f){this.isEnabled()&&a.shiftKey&&a.button===0&&(C.disableDrag(),this._startPos=this._lastPos=f,this._active=!0)}mousemoveWindow(a,f){if(!this._active)return;const m=f;if(this._lastPos.equals(m)||!this._box&&m.dist(this._startPos)b.fitScreenCoordinates(m,g,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",a)}keydown(a){this._active&&a.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",a))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(C.remove(this._box),this._box=null),C.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(a,f){return this._map.fire(new l.k(a,{originalEvent:f}))}}function ql(y,a){if(y.length!==a.length)throw new Error(`The number of touches and points are not equal - touches ${y.length}, points ${a.length}`);const f={};for(let m=0;mthis.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=a.timeStamp),m.length===this.numTouches&&(this.centroid=function(g){const b=new l.P(0,0);for(const T of g)b._add(T);return b.div(g.length)}(f),this.touches=ql(m,f)))}touchmove(a,f,m){if(this.aborted||!this.centroid)return;const g=ql(m,f);for(const b in this.touches){const T=g[b];(!T||T.dist(this.touches[b])>30)&&(this.aborted=!0)}}touchend(a,f,m){if((!this.centroid||a.timeStamp-this.startTime>500)&&(this.aborted=!0),m.length===0){const g=!this.aborted&&this.centroid;if(this.reset(),g)return g}}}class Fp{constructor(a){this.singleTap=new Hy(a),this.numTaps=a.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(a,f,m){this.singleTap.touchstart(a,f,m)}touchmove(a,f,m){this.singleTap.touchmove(a,f,m)}touchend(a,f,m){const g=this.singleTap.touchend(a,f,m);if(g){const b=a.timeStamp-this.lastTime<500,T=!this.lastTap||this.lastTap.dist(g)<30;if(b&&T||this.reset(),this.count++,this.lastTime=a.timeStamp,this.lastTap=g,this.count===this.numTaps)return this.reset(),g}}}class Zy{constructor(a){this._tr=new Lu(a),this._zoomIn=new Fp({numTouches:1,numTaps:2}),this._zoomOut=new Fp({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(a,f,m){this._zoomIn.touchstart(a,f,m),this._zoomOut.touchstart(a,f,m)}touchmove(a,f,m){this._zoomIn.touchmove(a,f,m),this._zoomOut.touchmove(a,f,m)}touchend(a,f,m){const g=this._zoomIn.touchend(a,f,m),b=this._zoomOut.touchend(a,f,m),T=this._tr;return g?(this._active=!0,a.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:L=>L.easeTo({duration:300,zoom:T.zoom+1,around:T.unproject(g)},{originalEvent:a})}):b?(this._active=!0,a.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:L=>L.easeTo({duration:300,zoom:T.zoom-1,around:T.unproject(b)},{originalEvent:a})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Pu{constructor(a){this._enabled=!!a.enable,this._moveStateManager=a.moveStateManager,this._clickTolerance=a.clickTolerance||1,this._moveFunction=a.move,this._activateOnStart=!!a.activateOnStart,a.assignEvents(this),this.reset()}reset(a){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(a)}_move(...a){const f=this._moveFunction(...a);if(f.bearingDelta||f.pitchDelta||f.around||f.panDelta)return this._active=!0,f}dragStart(a,f){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(a)&&(this._moveStateManager.startMove(a),this._lastPoint=f.length?f[0]:f,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(a,f){if(!this.isEnabled())return;const m=this._lastPoint;if(!m)return;if(a.preventDefault(),!this._moveStateManager.isValidMoveEvent(a))return void this.reset(a);const g=f.length?f[0]:f;return!this._moved&&g.dist(m){y.mousedown=y.dragStart,y.mousemoveWindow=y.dragMove,y.mouseup=y.dragEnd,y.contextmenu=function(a){a.preventDefault()}},Mu=({enable:y,clickTolerance:a,bearingDegreesPerPixelMoved:f=.8})=>{const m=new na({checkCorrectEvent:g=>C.mouseButton(g)===0&&g.ctrlKey||C.mouseButton(g)===2});return new Pu({clickTolerance:a,move:(g,b)=>({bearingDelta:(b.x-g.x)*f}),moveStateManager:m,enable:y,assignEvents:jh})},Au=({enable:y,clickTolerance:a,pitchDegreesPerPixelMoved:f=-.5})=>{const m=new na({checkCorrectEvent:g=>C.mouseButton(g)===0&&g.ctrlKey||C.mouseButton(g)===2});return new Pu({clickTolerance:a,move:(g,b)=>({pitchDelta:(b.y-g.y)*f}),moveStateManager:m,enable:y,assignEvents:jh})};class ig{constructor(a,f){this._clickTolerance=a.clickTolerance||1,this._map=f,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new l.P(0,0)}minTouchs(){return this._map.cooperativeGestures.isEnabled()?2:1}touchstart(a,f,m){return this._calculateTransform(a,f,m)}touchmove(a,f,m){if(this._active&&!(m.length0&&(this._active=!0);const g=ql(m,f),b=new l.P(0,0),T=new l.P(0,0);let L=0;for(const N in g){const V=g[N],j=this._touches[N];j&&(b._add(V),T._add(V.sub(j)),L++,g[N]=V)}if(this._touches=g,LMath.abs(y.x)}class ag extends xt{constructor(a){super(),this._currentTouchCount=0,this._map=a}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(a,f,m){super.touchstart(a,f,m),this._currentTouchCount=m.length}_start(a){this._lastPoints=a,qh(a[0].sub(a[1]))&&(this._valid=!1)}_move(a,f,m){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;const g=a[0].sub(this._lastPoints[0]),b=a[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(g,b,m.timeStamp),this._valid?(this._lastPoints=a,this._active=!0,{pitchDelta:(g.y+b.y)/2*-.5}):void 0}gestureBeginsVertically(a,f,m){if(this._valid!==void 0)return this._valid;const g=a.mag()>=2,b=f.mag()>=2;if(!g&&!b)return;if(!g||!b)return this._firstMove===void 0&&(this._firstMove=m),m-this._firstMove<100&&void 0;const T=a.y>0==f.y>0;return qh(a)&&qh(f)&&T}}const Xy={panStep:100,bearingStep:15,pitchStep:10};class al{constructor(a){this._tr=new Lu(a);const f=Xy;this._panStep=f.panStep,this._bearingStep=f.bearingStep,this._pitchStep=f.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(a){if(a.altKey||a.ctrlKey||a.metaKey)return;let f=0,m=0,g=0,b=0,T=0;switch(a.keyCode){case 61:case 107:case 171:case 187:f=1;break;case 189:case 109:case 173:f=-1;break;case 37:a.shiftKey?m=-1:(a.preventDefault(),b=-1);break;case 39:a.shiftKey?m=1:(a.preventDefault(),b=1);break;case 38:a.shiftKey?g=1:(a.preventDefault(),T=-1);break;case 40:a.shiftKey?g=-1:(a.preventDefault(),T=1);break;default:return}return this._rotationDisabled&&(m=0,g=0),{cameraAnimation:L=>{const k=this._tr;L.easeTo({duration:300,easeId:"keyboardHandler",easing:br,zoom:f?Math.round(k.zoom)+f*(a.shiftKey?2:1):k.zoom,bearing:k.bearing+m*this._bearingStep,pitch:k.pitch+g*this._pitchStep,offset:[-b*this._panStep,-T*this._panStep],center:k.center},{originalEvent:a})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function br(y){return y*(2-y)}const Ac=4.000244140625;class Wh{constructor(a,f){this._onTimeout=m=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(m)},this._map=a,this._tr=new Lu(a),this._triggerRenderFrame=f,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(a){this._defaultZoomRate=a}setWheelZoomRate(a){this._wheelZoomRate=a}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(a){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!a&&a.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}wheel(a){if(!this.isEnabled()||this._map.cooperativeGestures.isEnabled()&&!a[this._map.cooperativeGestures._bypassKey])return;let f=a.deltaMode===WheelEvent.DOM_DELTA_LINE?40*a.deltaY:a.deltaY;const m=E.now(),g=m-(this._lastWheelEventTime||0);this._lastWheelEventTime=m,f!==0&&f%Ac==0?this._type="wheel":f!==0&&Math.abs(f)<4?this._type="trackpad":g>400?(this._type=null,this._lastValue=f,this._timeout=setTimeout(this._onTimeout,40,a)):this._type||(this._type=Math.abs(g*f)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,f+=this._lastValue)),a.shiftKey&&f&&(f/=4),this._type&&(this._lastWheelEvent=a,this._delta-=f,this._active||this._start(a)),a.preventDefault()}_start(a){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);const f=C.mousePos(this._map.getCanvas(),a),m=this._tr;this._around=f.y>m.transform.height/2-m.transform.getHorizon()?l.M.convert(this._aroundCenter?m.center:m.unproject(f)):l.M.convert(m.center),this._aroundPoint=m.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;const a=this._tr.transform;if(this._delta!==0){const L=this._type==="wheel"&&Math.abs(this._delta)>Ac?this._wheelZoomRate:this._defaultZoomRate;let k=2/(1+Math.exp(-Math.abs(this._delta*L)));this._delta<0&&k!==0&&(k=1/k);const N=typeof this._targetZoom=="number"?a.zoomScale(this._targetZoom):a.scale;this._targetZoom=Math.min(a.maxZoom,Math.max(a.minZoom,a.scaleZoom(N*k))),this._type==="wheel"&&(this._startZoom=a.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const f=typeof this._targetZoom=="number"?this._targetZoom:a.zoom,m=this._startZoom,g=this._easing;let b,T=!1;if(this._type==="wheel"&&m&&g){const L=Math.min((E.now()-this._lastWheelEventTime)/200,1),k=g(L);b=l.z.number(m,f,k),L<1?this._frameId||(this._frameId=!0):T=!0}else b=f,T=!0;return this._active=!0,T&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!T,zoomDelta:b-a.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(a){let f=l.b7;if(this._prevEase){const m=this._prevEase,g=(E.now()-m.start)/m.duration,b=m.easing(g+.01)-m.easing(g),T=.27/Math.sqrt(b*b+1e-4)*.01,L=Math.sqrt(.0729-T*T);f=l.b6(T,L,.25,1)}return this._prevEase={start:E.now(),duration:a,easing:f},f}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class Vp{constructor(a,f){this._clickZoom=a,this._tapZoom=f}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class lg{constructor(a){this._tr=new Lu(a),this.reset()}reset(){this._active=!1}dblclick(a,f){return a.preventDefault(),{cameraAnimation:m=>{m.easeTo({duration:300,zoom:this._tr.zoom+(a.shiftKey?-1:1),around:this._tr.unproject(f)},{originalEvent:a})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class ug{constructor(){this._tap=new Fp({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(a,f,m){if(!this._swipePoint)if(this._tapTime){const g=f[0],b=a.timeStamp-this._tapTime<500,T=this._tapPoint.dist(g)<30;b&&T?m.length>0&&(this._swipePoint=g,this._swipeTouch=m[0].identifier):this.reset()}else this._tap.touchstart(a,f,m)}touchmove(a,f,m){if(this._tapTime){if(this._swipePoint){if(m[0].identifier!==this._swipeTouch)return;const g=f[0],b=g.y-this._swipePoint.y;return this._swipePoint=g,a.preventDefault(),this._active=!0,{zoomDelta:b/128}}}else this._tap.touchmove(a,f,m)}touchend(a,f,m){if(this._tapTime)this._swipePoint&&m.length===0&&this.reset();else{const g=this._tap.touchend(a,f,m);g&&(this._tapTime=a.timeStamp,this._tapPoint=g)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class cg{constructor(a,f,m){this._el=a,this._mousePan=f,this._touchPan=m}enable(a){this._inertiaOptions=a||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class Ms{constructor(a,f,m){this._pitchWithRotate=a.pitchWithRotate,this._mouseRotate=f,this._mousePitch=m}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()}}class kc{constructor(a,f,m,g){this._el=a,this._touchZoom=f,this._touchRotate=m,this._tapDragZoom=g,this._rotationDisabled=!1,this._enabled=!0}enable(a){this._touchZoom.enable(a),this._rotationDisabled||this._touchRotate.enable(a),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class Nt{constructor(a,f){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=a,this._options=f,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;const a=this._map.getCanvasContainer();a.classList.add("maplibregl-cooperative-gestures"),this._container=C.create("div","maplibregl-cooperative-gesture-screen",a);let f=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(f=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));const m=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),g=document.createElement("div");g.className="maplibregl-desktop-message",g.textContent=f,this._container.appendChild(g);const b=document.createElement("div");b.className="maplibregl-mobile-message",b.textContent=m,this._container.appendChild(b),this._container.setAttribute("aria-hidden","true")}_destoryUI(){this._container&&(C.remove(this._container),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destoryUI()}isEnabled(){return this._enabled}touchmove(a){this._onCooperativeGesture(a.touches.length===1)}wheel(a){this._map.scrollZoom.isEnabled()&&this._onCooperativeGesture(!a[this._bypassKey])}_onCooperativeGesture(a){this._enabled&&a&&(this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}const qt=y=>y.zoom||y.drag||y.pitch||y.rotate;class Hh extends l.k{}function Dc(y){return y.panDelta&&y.panDelta.mag()||y.zoomDelta||y.bearingDelta||y.pitchDelta}class Up{constructor(a,f){this.handleWindowEvent=g=>{this.handleEvent(g,`${g.type}Window`)},this.handleEvent=(g,b)=>{if(g.type==="blur")return void this.stop(!0);this._updatingCamera=!0;const T=g.type==="renderFrame"?void 0:g,L={needsRenderFrame:!1},k={},N={},V=g.touches,j=V?this._getMapTouches(V):void 0,$=j?C.touchPos(this._map.getCanvas(),j):C.mousePos(this._map.getCanvas(),g);for(const{handlerName:ge,handler:re,allowed:Ce}of this._handlers){if(!re.isEnabled())continue;let Be;this._blockedByActive(N,Ce,ge)?re.reset():re[b||g.type]&&(Be=re[b||g.type](g,$,j),this.mergeHandlerResult(L,k,Be,ge,T),Be&&Be.needsRenderFrame&&this._triggerRenderFrame()),(Be||re.isActive())&&(N[ge]=re)}const he={};for(const ge in this._previousActiveHandlers)N[ge]||(he[ge]=T);this._previousActiveHandlers=N,(Object.keys(he).length||Dc(L))&&(this._changes.push([L,k,he]),this._triggerRenderFrame()),(Object.keys(N).length||Dc(L))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:ce}=L;ce&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],ce(this._map))},this._map=a,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new rg(a),this._bearingSnap=f.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(f);const m=this._el;this._listeners=[[m,"touchstart",{passive:!0}],[m,"touchmove",{passive:!1}],[m,"touchend",void 0],[m,"touchcancel",void 0],[m,"mousedown",void 0],[m,"mousemove",void 0],[m,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[m,"mouseover",void 0],[m,"mouseout",void 0],[m,"dblclick",void 0],[m,"click",void 0],[m,"keydown",{capture:!1}],[m,"keyup",void 0],[m,"wheel",{passive:!1}],[m,"contextmenu",void 0],[window,"blur",void 0]];for(const[g,b,T]of this._listeners)C.addEventListener(g,b,g===document?this.handleWindowEvent:this.handleEvent,T)}destroy(){for(const[a,f,m]of this._listeners)C.removeEventListener(a,f,a===document?this.handleWindowEvent:this.handleEvent,m)}_addDefaultHandlers(a){const f=this._map,m=f.getCanvasContainer();this._add("mapEvent",new Ls(f,a));const g=f.boxZoom=new Ps(f,a);this._add("boxZoom",g),a.interactive&&a.boxZoom&&g.enable();const b=f.cooperativeGestures=new Nt(f,a.cooperativeGestures);this._add("cooperativeGestures",b),a.cooperativeGestures&&b.enable();const T=new Zy(f),L=new lg(f);f.doubleClickZoom=new Vp(L,T),this._add("tapZoom",T),this._add("clickZoom",L),a.interactive&&a.doubleClickZoom&&f.doubleClickZoom.enable();const k=new ug;this._add("tapDragZoom",k);const N=f.touchPitch=new ag(f);this._add("touchPitch",N),a.interactive&&a.touchPitch&&f.touchPitch.enable(a.touchPitch);const V=Mu(a),j=Au(a);f.dragRotate=new Ms(a,V,j),this._add("mouseRotate",V,["mousePitch"]),this._add("mousePitch",j,["mouseRotate"]),a.interactive&&a.dragRotate&&f.dragRotate.enable();const $=(({enable:Be,clickTolerance:ve})=>{const De=new na({checkCorrectEvent:Ve=>C.mouseButton(Ve)===0&&!Ve.ctrlKey});return new Pu({clickTolerance:ve,move:(Ve,Ze)=>({around:Ze,panDelta:Ze.sub(Ve)}),activateOnStart:!0,moveStateManager:De,enable:Be,assignEvents:jh})})(a),he=new ig(a,f);f.dragPan=new cg(m,$,he),this._add("mousePan",$),this._add("touchPan",he,["touchZoom","touchRotate"]),a.interactive&&a.dragPan&&f.dragPan.enable(a.dragPan);const ce=new Bp,ge=new sg;f.touchZoomRotate=new kc(m,ge,ce,k),this._add("touchRotate",ce,["touchPan","touchZoom"]),this._add("touchZoom",ge,["touchPan","touchRotate"]),a.interactive&&a.touchZoomRotate&&f.touchZoomRotate.enable(a.touchZoomRotate);const re=f.scrollZoom=new Wh(f,()=>this._triggerRenderFrame());this._add("scrollZoom",re,["mousePan"]),a.interactive&&a.scrollZoom&&f.scrollZoom.enable(a.scrollZoom);const Ce=f.keyboard=new al(f);this._add("keyboard",Ce),a.interactive&&a.keyboard&&f.keyboard.enable(),this._add("blockableMapEvent",new ta(f))}_add(a,f,m){this._handlers.push({handlerName:a,handler:f,allowed:m}),this._handlersById[a]=f}stop(a){if(!this._updatingCamera){for(const{handler:f}of this._handlers)f.reset();this._inertia.clear(),this._fireEvents({},{},a),this._changes=[]}}isActive(){for(const{handler:a}of this._handlers)if(a.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!qt(this._eventsInProgress)||this.isZooming()}_blockedByActive(a,f,m){for(const g in a)if(g!==m&&(!f||f.indexOf(g)<0))return!0;return!1}_getMapTouches(a){const f=[];for(const m of a)this._el.contains(m.target)&&f.push(m);return f}mergeHandlerResult(a,f,m,g,b){if(!m)return;l.e(a,m);const T={handlerName:g,originalEvent:m.originalEvent||b};m.zoomDelta!==void 0&&(f.zoom=T),m.panDelta!==void 0&&(f.drag=T),m.pitchDelta!==void 0&&(f.pitch=T),m.bearingDelta!==void 0&&(f.rotate=T)}_applyChanges(){const a={},f={},m={};for(const[g,b,T]of this._changes)g.panDelta&&(a.panDelta=(a.panDelta||new l.P(0,0))._add(g.panDelta)),g.zoomDelta&&(a.zoomDelta=(a.zoomDelta||0)+g.zoomDelta),g.bearingDelta&&(a.bearingDelta=(a.bearingDelta||0)+g.bearingDelta),g.pitchDelta&&(a.pitchDelta=(a.pitchDelta||0)+g.pitchDelta),g.around!==void 0&&(a.around=g.around),g.pinchAround!==void 0&&(a.pinchAround=g.pinchAround),g.noInertia&&(a.noInertia=g.noInertia),l.e(f,b),l.e(m,T);this._updateMapTransform(a,f,m),this._changes=[]}_updateMapTransform(a,f,m){const g=this._map,b=g._getTransformForUpdate(),T=g.terrain;if(!(Dc(a)||T&&this._terrainMovement))return this._fireEvents(f,m,!0);let{panDelta:L,zoomDelta:k,bearingDelta:N,pitchDelta:V,around:j,pinchAround:$}=a;$!==void 0&&(j=$),g._stop(!0),j=j||g.transform.centerPoint;const he=b.pointLocation(L?j.sub(L):j);N&&(b.bearing+=N),V&&(b.pitch+=V),k&&(b.zoom+=k),T?this._terrainMovement||!f.drag&&!f.zoom?f.drag&&this._terrainMovement?b.center=b.pointLocation(b.centerPoint.sub(L)):b.setLocationAtPoint(he,j):(this._terrainMovement=!0,this._map._elevationFreeze=!0,b.setLocationAtPoint(he,j),this._map.once("moveend",()=>{this._map._elevationFreeze=!1,this._terrainMovement=!1,b.recalculateZoom(g.terrain)})):b.setLocationAtPoint(he,j),g._applyUpdatedTransform(b),this._map._update(),a.noInertia||this._inertia.record(a),this._fireEvents(f,m,!0)}_fireEvents(a,f,m){const g=qt(this._eventsInProgress),b=qt(a),T={};for(const V in a){const{originalEvent:j}=a[V];this._eventsInProgress[V]||(T[`${V}start`]=j),this._eventsInProgress[V]=a[V]}!g&&b&&this._fireEvent("movestart",b.originalEvent);for(const V in T)this._fireEvent(V,T[V]);b&&this._fireEvent("move",b.originalEvent);for(const V in a){const{originalEvent:j}=a[V];this._fireEvent(V,j)}const L={};let k;for(const V in this._eventsInProgress){const{handlerName:j,originalEvent:$}=this._eventsInProgress[V];this._handlersById[j].isActive()||(delete this._eventsInProgress[V],k=f[j]||$,L[`${V}end`]=k)}for(const V in L)this._fireEvent(V,L[V]);const N=qt(this._eventsInProgress);if(m&&(g||b)&&!N){this._updatingCamera=!0;const V=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),j=$=>$!==0&&-this._bearingSnap<$&&${delete this._frameId,this.handleEvent(new Hh("renderFrame",{timeStamp:a})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class Co extends l.E{constructor(a,f){super(),this._renderFrameCallback=()=>{const m=Math.min((E.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(m)),m<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=a,this._bearingSnap=f.bearingSnap,this.on("moveend",()=>{delete this._requestedCameraState})}getCenter(){return new l.M(this.transform.center.lng,this.transform.center.lat)}setCenter(a,f){return this.jumpTo({center:a},f)}panBy(a,f,m){return a=l.P.convert(a).mult(-1),this.panTo(this.transform.center,l.e({offset:a},f),m)}panTo(a,f,m){return this.easeTo(l.e({center:a},f),m)}getZoom(){return this.transform.zoom}setZoom(a,f){return this.jumpTo({zoom:a},f),this}zoomTo(a,f,m){return this.easeTo(l.e({zoom:a},f),m)}zoomIn(a,f){return this.zoomTo(this.getZoom()+1,a,f),this}zoomOut(a,f){return this.zoomTo(this.getZoom()-1,a,f),this}getBearing(){return this.transform.bearing}setBearing(a,f){return this.jumpTo({bearing:a},f),this}getPadding(){return this.transform.padding}setPadding(a,f){return this.jumpTo({padding:a},f),this}rotateTo(a,f,m){return this.easeTo(l.e({bearing:a},f),m)}resetNorth(a,f){return this.rotateTo(0,l.e({duration:1e3},a),f),this}resetNorthPitch(a,f){return this.easeTo(l.e({bearing:0,pitch:0,duration:1e3},a),f),this}snapToNorth(a,f){return Math.abs(this.getBearing()){if(this._zooming&&(g.zoom=l.z.number(b,re,$e)),this._rotating&&(g.bearing=l.z.number(T,N,$e)),this._pitching&&(g.pitch=l.z.number(L,V,$e)),this._padding&&(g.interpolatePadding(k,j,$e),he=g.centerPoint.add($)),this.terrain&&!a.freezeElevation&&this._updateElevation($e),De)g.setLocationAtPoint(De,Ve);else{const rt=g.zoomScale(g.zoom-b),nt=re>b?Math.min(2,ve):Math.max(.5,ve),ct=Math.pow(nt,1-$e),pt=g.unproject(Ce.add(Be.mult($e*ct)).mult(rt));g.setLocationAtPoint(g.renderWorldCopies?pt.wrap():pt,he)}this._applyUpdatedTransform(g),this._fireMoveEvents(f)},$e=>{this.terrain&&this._finalizeElevation(),this._afterEase(f,$e)},a),this}_prepareEase(a,f,m={}){this._moving=!0,f||m.moving||this.fire(new l.k("movestart",a)),this._zooming&&!m.zooming&&this.fire(new l.k("zoomstart",a)),this._rotating&&!m.rotating&&this.fire(new l.k("rotatestart",a)),this._pitching&&!m.pitching&&this.fire(new l.k("pitchstart",a))}_prepareElevation(a){this._elevationCenter=a,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(a,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(a){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);const f=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(a<1&&f!==this._elevationTarget){const m=this._elevationTarget-this._elevationStart;this._elevationStart+=a*(m-(f-(m*a+this._elevationStart))/(1-a)),this._elevationTarget=f}this.transform.elevation=l.z.number(this._elevationStart,this._elevationTarget,a)}_finalizeElevation(){this._elevationFreeze=!1,this.transform.recalculateZoom(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_applyUpdatedTransform(a){if(!this.transformCameraUpdate)return;const f=a.clone(),{center:m,zoom:g,pitch:b,bearing:T,elevation:L}=this.transformCameraUpdate(f);m&&(f.center=m),g!==void 0&&(f.zoom=g),b!==void 0&&(f.pitch=b),T!==void 0&&(f.bearing=T),L!==void 0&&(f.elevation=L),this.transform.apply(f)}_fireMoveEvents(a){this.fire(new l.k("move",a)),this._zooming&&this.fire(new l.k("zoom",a)),this._rotating&&this.fire(new l.k("rotate",a)),this._pitching&&this.fire(new l.k("pitch",a))}_afterEase(a,f){if(this._easeId&&f&&this._easeId===f)return;delete this._easeId;const m=this._zooming,g=this._rotating,b=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,m&&this.fire(new l.k("zoomend",a)),g&&this.fire(new l.k("rotateend",a)),b&&this.fire(new l.k("pitchend",a)),this.fire(new l.k("moveend",a))}flyTo(a,f){var m;if(!a.essential&&E.prefersReducedMotion){const kn=l.L(a,["center","zoom","bearing","pitch","around"]);return this.jumpTo(kn,f)}this.stop(),a=l.e({offset:[0,0],speed:1.2,curve:1.42,easing:l.b7},a);const g=this._getTransformForUpdate(),b=this.getZoom(),T=this.getBearing(),L=this.getPitch(),k=this.getPadding(),N="bearing"in a?this._normalizeBearing(a.bearing,T):T,V="pitch"in a?+a.pitch:L,j="padding"in a?a.padding:g.padding,$=l.P.convert(a.offset);let he=g.centerPoint.add($);const ce=g.pointLocation(he),{center:ge,zoom:re}=g.getConstrained(l.M.convert(a.center||ce),(m=a.zoom)!==null&&m!==void 0?m:b);this._normalizeCenter(ge);const Ce=g.zoomScale(re-b),Be=g.project(ce),ve=g.project(ge).sub(Be);let De=a.curve;const Ve=Math.max(g.width,g.height),Ze=Ve/Ce,$e=ve.mag();if("minZoom"in a){const kn=l.ac(Math.min(a.minZoom,b,re),g.minZoom,g.maxZoom),Jt=Ve/g.zoomScale(kn-b);De=Math.sqrt(Jt/$e*2)}const rt=De*De;function nt(kn){const Jt=(Ze*Ze-Ve*Ve+(kn?-1:1)*rt*rt*$e*$e)/(2*(kn?Ze:Ve)*rt*$e);return Math.log(Math.sqrt(Jt*Jt+1)-Jt)}function ct(kn){return(Math.exp(kn)-Math.exp(-kn))/2}function pt(kn){return(Math.exp(kn)+Math.exp(-kn))/2}const un=nt(!1);let gt=function(kn){return pt(un)/pt(un+De*kn)},Ht=function(kn){return Ve*((pt(un)*(ct(Jt=un+De*kn)/pt(Jt))-ct(un))/rt)/$e;var Jt},cn=(nt(!0)-un)/De;if(Math.abs($e)<1e-6||!isFinite(cn)){if(Math.abs(Ve-Ze)<1e-6)return this.easeTo(a,f);const kn=Zea.maxDuration&&(a.duration=0),this._zooming=!0,this._rotating=T!==N,this._pitching=V!==L,this._padding=!g.isPaddingEqual(j),this._prepareEase(f,!1),this.terrain&&this._prepareElevation(ge),this._ease(kn=>{const Jt=kn*cn,mn=1/gt(Jt);g.zoom=kn===1?re:b+g.scaleZoom(mn),this._rotating&&(g.bearing=l.z.number(T,N,kn)),this._pitching&&(g.pitch=l.z.number(L,V,kn)),this._padding&&(g.interpolatePadding(k,j,kn),he=g.centerPoint.add($)),this.terrain&&!a.freezeElevation&&this._updateElevation(kn);const bn=kn===1?ge:g.unproject(Be.add(ve.mult(Ht(Jt))).mult(mn));g.setLocationAtPoint(g.renderWorldCopies?bn.wrap():bn,he),this._applyUpdatedTransform(g),this._fireMoveEvents(f)},()=>{this.terrain&&this._finalizeElevation(),this._afterEase(f)},a),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(a,f){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const m=this._onEaseEnd;delete this._onEaseEnd,m.call(this,f)}if(!a){const m=this.handlers;m&&m.stop(!1)}return this}_ease(a,f,m){m.animate===!1||m.duration===0?(a(1),f()):(this._easeStart=E.now(),this._easeOptions=m,this._onEaseFrame=a,this._onEaseEnd=f,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(a,f){a=l.b1(a,-180,180);const m=Math.abs(a-f);return Math.abs(a-360-f)180?-360:m<-180?360:0}queryTerrainElevation(a){return this.terrain?this.terrain.getElevationForLngLatZoom(l.M.convert(a),this.transform.tileZoom)-this.transform.elevation:null}}const jp={compact:!0,customAttribution:'MapLibre'};class As{constructor(a=jp){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=f=>{!f||f.sourceDataType!=="metadata"&&f.sourceDataType!=="visibility"&&f.dataType!=="style"&&f.type!=="terrain"||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=a}getDefaultPosition(){return"bottom-right"}onAdd(a){return this._map=a,this._compact=this.options.compact,this._container=C.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=C.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=C.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){C.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(a,f){const m=this._map._getUIString(`AttributionControl.${f}`);a.title=m,a.setAttribute("aria-label",m)}_updateAttributions(){if(!this._map.style)return;let a=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?a=a.concat(this.options.customAttribution.map(g=>typeof g!="string"?"":g)):typeof this.options.customAttribution=="string"&&a.push(this.options.customAttribution)),this._map.style.stylesheet){const g=this._map.style.stylesheet;this.styleOwner=g.owner,this.styleId=g.id}const f=this._map.style.sourceCaches;for(const g in f){const b=f[g];if(b.used||b.usedForTerrain){const T=b.getSource();T.attribution&&a.indexOf(T.attribution)<0&&a.push(T.attribution)}}a=a.filter(g=>String(g).trim()),a.sort((g,b)=>g.length-b.length),a=a.filter((g,b)=>{for(let T=b+1;T=0)return!1;return!0});const m=a.join(" | ");m!==this._attribHTML&&(this._attribHTML=m,a.length?(this._innerContainer.innerHTML=m,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class hg{constructor(a={}){this._updateCompact=()=>{const f=this._container.children;if(f.length){const m=f[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&m.classList.add("maplibregl-compact"):m.classList.remove("maplibregl-compact")}},this.options=a}getDefaultPosition(){return"bottom-left"}onAdd(a){this._map=a,this._compact=this.options&&this.options.compact,this._container=C.create("div","maplibregl-ctrl");const f=C.create("a","maplibregl-ctrl-logo");return f.target="_blank",f.rel="noopener nofollow",f.href="https://maplibre.org/",f.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),f.setAttribute("rel","noopener nofollow"),this._container.appendChild(f),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){C.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class Rc{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(a){const f=++this._id;return this._queue.push({callback:a,id:f,cancelled:!1}),f}remove(a){const f=this._currentlyRunning,m=f?this._queue.concat(f):this._queue;for(const g of m)if(g.id===a)return void(g.cancelled=!0)}run(a=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const f=this._currentlyRunning=this._queue;this._queue=[];for(const m of f)if(!m.cancelled&&(m.callback(a),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var Vr=l.X([{name:"a_pos3d",type:"Int16",components:3}]);class ei extends l.E{constructor(a){super(),this.sourceCache=a,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,a.usedForTerrain=!0,a.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(a,f){this.sourceCache.update(a,f),this._renderableTilesKeys=[];const m={};for(const g of a.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:f}))m[g.key]=!0,this._renderableTilesKeys.push(g.key),this._tiles[g.key]||(g.posMatrix=new Float64Array(16),l.aN(g.posMatrix,0,l.W,0,l.W,0,1),this._tiles[g.key]=new ls(g,this.tileSize));for(const g in this._tiles)m[g]||delete this._tiles[g]}freeRtt(a){for(const f in this._tiles){const m=this._tiles[f];(!a||m.tileID.equals(a)||m.tileID.isChildOf(a)||a.isChildOf(m.tileID))&&(m.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(a=>this.getTileByID(a))}getTileByID(a){return this._tiles[a]}getTerrainCoords(a){const f={};for(const m of this._renderableTilesKeys){const g=this._tiles[m].tileID;if(g.canonical.equals(a.canonical)){const b=a.clone();b.posMatrix=new Float64Array(16),l.aN(b.posMatrix,0,l.W,0,l.W,0,1),f[m]=b}else if(g.canonical.isChildOf(a.canonical)){const b=a.clone();b.posMatrix=new Float64Array(16);const T=g.canonical.z-a.canonical.z,L=g.canonical.x-(g.canonical.x>>T<>T<>T;l.aN(b.posMatrix,0,N,0,N,0,1),l.H(b.posMatrix,b.posMatrix,[-L*N,-k*N,0]),f[m]=b}else if(a.canonical.isChildOf(g.canonical)){const b=a.clone();b.posMatrix=new Float64Array(16);const T=a.canonical.z-g.canonical.z,L=a.canonical.x-(a.canonical.x>>T<>T<>T;l.aN(b.posMatrix,0,l.W,0,l.W,0,1),l.H(b.posMatrix,b.posMatrix,[L*N,k*N,0]),l.J(b.posMatrix,b.posMatrix,[1/2**T,1/2**T,0]),f[m]=b}}return f}getSourceTile(a,f){const m=this.sourceCache._source;let g=a.overscaledZ-this.deltaZoom;if(g>m.maxzoom&&(g=m.maxzoom),g=m.minzoom&&(!b||!b.dem);)b=this.sourceCache.getTileByID(a.scaledTo(g--).key);return b}tilesAfterTime(a=Date.now()){return Object.values(this._tiles).filter(f=>f.timeAdded>=a)}}class fg{constructor(a,f,m){this.painter=a,this.sourceCache=new ei(f),this.options=m,this.exaggeration=typeof m.exaggeration=="number"?m.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(a,f,m,g=l.W){var b;if(!(f>=0&&f=0&&ma.canonical.z&&(a.canonical.z>=g?b=a.canonical.z-g:l.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const T=a.canonical.x-(a.canonical.x>>b<>b<>8<<4|b>>8,f[T+3]=0;const m=new l.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(f.buffer)),g=new Y(a,m,a.gl.RGBA,{premultiply:!1});return g.bind(a.gl.NEAREST,a.gl.CLAMP_TO_EDGE),this._coordsTexture=g,g}pointCoordinate(a){this.painter.maybeDrawDepthAndCoords(!0);const f=new Uint8Array(4),m=this.painter.context,g=m.gl,b=Math.round(a.x*this.painter.pixelRatio/devicePixelRatio),T=Math.round(a.y*this.painter.pixelRatio/devicePixelRatio),L=Math.round(this.painter.height/devicePixelRatio);m.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),g.readPixels(b,L-T-1,1,1,g.RGBA,g.UNSIGNED_BYTE,f),m.bindFramebuffer.set(null);const k=f[0]+(f[2]>>4<<8),N=f[1]+((15&f[2])<<8),V=this.coordsIndex[255-f[3]],j=V&&this.sourceCache.getTileByID(V);if(!j)return null;const $=this._coordsTextureSize,he=(1<a.id!==f),this._recentlyUsed.push(a.id)}stampObject(a){a.stamp=++this._stamp}getOrCreateFreeObject(){for(const f of this._recentlyUsed)if(!this._objects[f].inUse)return this._objects[f];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");const a=this._createObject(this._objects.length);return this._objects.push(a),a}freeObject(a){a.inUse=!1}freeAllObjects(){for(const a of this._objects)this.freeObject(a)}isFull(){return!(this._objects.length!a.inUse)===!1}}const ka={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class Gp{constructor(a,f){this.painter=a,this.terrain=f,this.pool=new Nc(a.context,30,f.sourceCache.tileSize*f.qualityFactor)}destruct(){this.pool.destruct()}getTexture(a){return this.pool.getObjectForId(a.rtt[this._stacks.length-1].id).texture}prepareForRender(a,f){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=a._order.filter(m=>!a._layers[m].isHidden(f)),this._coordsDescendingInv={};for(const m in a.sourceCaches){this._coordsDescendingInv[m]={};const g=a.sourceCaches[m].getVisibleCoordinates();for(const b of g){const T=this.terrain.sourceCache.getTerrainCoords(b);for(const L in T)this._coordsDescendingInv[m][L]||(this._coordsDescendingInv[m][L]=[]),this._coordsDescendingInv[m][L].push(T[L])}}this._coordsDescendingInvStr={};for(const m of a._order){const g=a._layers[m],b=g.source;if(ka[g.type]&&!this._coordsDescendingInvStr[b]){this._coordsDescendingInvStr[b]={};for(const T in this._coordsDescendingInv[b])this._coordsDescendingInvStr[b][T]=this._coordsDescendingInv[b][T].map(L=>L.key).sort().join()}}for(const m of this._renderableTiles)for(const g in this._coordsDescendingInvStr){const b=this._coordsDescendingInvStr[g][m.tileID.key];b&&b!==m.rttCoords[g]&&(m.rtt=[])}}renderLayer(a){if(a.isHidden(this.painter.transform.zoom))return!1;const f=a.type,m=this.painter,g=this._renderableLayerIds[this._renderableLayerIds.length-1]===a.id;if(ka[f]&&(this._prevType&&ka[this._prevType]||this._stacks.push([]),this._prevType=f,this._stacks[this._stacks.length-1].push(a.id),!g))return!0;if(ka[this._prevType]||ka[f]&&g){this._prevType=f;const b=this._stacks.length-1,T=this._stacks[b]||[];for(const L of this._renderableTiles){if(this.pool.isFull()&&(Vh(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(L),L.rtt[b]){const N=this.pool.getObjectForId(L.rtt[b].id);if(N.stamp===L.rtt[b].stamp){this.pool.useObject(N);continue}}const k=this.pool.getOrCreateFreeObject();this.pool.useObject(k),this.pool.stampObject(k),L.rtt[b]={id:k.id,stamp:k.stamp},m.context.bindFramebuffer.set(k.fbo.framebuffer),m.context.clear({color:l.aO.transparent,stencil:0}),m.currentStencilSource=void 0;for(let N=0;N{y.touchstart=y.dragStart,y.touchmoveWindow=y.dragMove,y.touchend=y.dragEnd},Hp={showCompass:!0,showZoom:!0,visualizePitch:!1};class Zp{constructor(a,f,m=!1){this.mousedown=T=>{this.startMouse(l.e({},T,{ctrlKey:!0,preventDefault:()=>T.preventDefault()}),C.mousePos(this.element,T)),C.addEventListener(window,"mousemove",this.mousemove),C.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=T=>{this.moveMouse(T,C.mousePos(this.element,T))},this.mouseup=T=>{this.mouseRotate.dragEnd(T),this.mousePitch&&this.mousePitch.dragEnd(T),this.offTemp()},this.touchstart=T=>{T.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=C.touchPos(this.element,T.targetTouches)[0],this.startTouch(T,this._startPos),C.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),C.addEventListener(window,"touchend",this.touchend))},this.touchmove=T=>{T.targetTouches.length!==1?this.reset():(this._lastPos=C.touchPos(this.element,T.targetTouches)[0],this.moveTouch(T,this._lastPos))},this.touchend=T=>{T.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),this.touchRotate.reset(),this.touchPitch&&this.touchPitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10;const g=a.dragRotate._mouseRotate.getClickTolerance(),b=a.dragRotate._mousePitch.getClickTolerance();this.element=f,this.mouseRotate=Mu({clickTolerance:g,enable:!0}),this.touchRotate=(({enable:T,clickTolerance:L,bearingDegreesPerPixelMoved:k=.8})=>{const N=new Ct;return new Pu({clickTolerance:L,move:(V,j)=>({bearingDelta:(j.x-V.x)*k}),moveStateManager:N,enable:T,assignEvents:Zh})})({clickTolerance:g,enable:!0}),this.map=a,m&&(this.mousePitch=Au({clickTolerance:b,enable:!0}),this.touchPitch=(({enable:T,clickTolerance:L,pitchDegreesPerPixelMoved:k=-.5})=>{const N=new Ct;return new Pu({clickTolerance:L,move:(V,j)=>({pitchDelta:(j.y-V.y)*k}),moveStateManager:N,enable:T,assignEvents:Zh})})({clickTolerance:b,enable:!0})),C.addEventListener(f,"mousedown",this.mousedown),C.addEventListener(f,"touchstart",this.touchstart,{passive:!1}),C.addEventListener(f,"touchcancel",this.reset)}startMouse(a,f){this.mouseRotate.dragStart(a,f),this.mousePitch&&this.mousePitch.dragStart(a,f),C.disableDrag()}startTouch(a,f){this.touchRotate.dragStart(a,f),this.touchPitch&&this.touchPitch.dragStart(a,f),C.disableDrag()}moveMouse(a,f){const m=this.map,{bearingDelta:g}=this.mouseRotate.dragMove(a,f)||{};if(g&&m.setBearing(m.getBearing()+g),this.mousePitch){const{pitchDelta:b}=this.mousePitch.dragMove(a,f)||{};b&&m.setPitch(m.getPitch()+b)}}moveTouch(a,f){const m=this.map,{bearingDelta:g}=this.touchRotate.dragMove(a,f)||{};if(g&&m.setBearing(m.getBearing()+g),this.touchPitch){const{pitchDelta:b}=this.touchPitch.dragMove(a,f)||{};b&&m.setPitch(m.getPitch()+b)}}off(){const a=this.element;C.removeEventListener(a,"mousedown",this.mousedown),C.removeEventListener(a,"touchstart",this.touchstart,{passive:!1}),C.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),C.removeEventListener(window,"touchend",this.touchend),C.removeEventListener(a,"touchcancel",this.reset),this.offTemp()}offTemp(){C.enableDrag(),C.removeEventListener(window,"mousemove",this.mousemove),C.removeEventListener(window,"mouseup",this.mouseup),C.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),C.removeEventListener(window,"touchend",this.touchend)}}let Da;function Xh(y,a,f){const m=new l.M(y.lng,y.lat);if(y=new l.M(y.lng,y.lat),a){const g=new l.M(y.lng-360,y.lat),b=new l.M(y.lng+360,y.lat),T=f.locationPoint(y).distSqr(a);f.locationPoint(g).distSqr(a)180;){const g=f.locationPoint(y);if(g.x>=0&&g.y>=0&&g.x<=f.width&&g.y<=f.height)break;y.lng>f.center.lng?y.lng-=360:y.lng+=360}return y.lng!==m.lng&&f.locationPoint(y).y>f.height/2-f.getHorizon()?y:m}const zc={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function Yh(y,a,f){const m=y.classList;for(const g in zc)m.remove(`maplibregl-${f}-anchor-${g}`);m.add(`maplibregl-${f}-anchor-${a}`)}class Fc extends l.E{constructor(a){if(super(),this._onKeyPress=f=>{const m=f.code,g=f.charCode||f.keyCode;m!=="Space"&&m!=="Enter"&&g!==32&&g!==13||this.togglePopup()},this._onMapClick=f=>{const m=f.originalEvent.target,g=this._element;this._popup&&(m===g||g.contains(m))&&this.togglePopup()},this._update=f=>{var m;if(!this._map)return;const g=this._map.loaded()&&!this._map.isMoving();((f==null?void 0:f.type)==="terrain"||(f==null?void 0:f.type)==="render"&&!g)&&this._map.once("render",this._update),this._lngLat=this._map.transform.renderWorldCopies?Xh(this._lngLat,this._flatPos,this._map.transform):(m=this._lngLat)===null||m===void 0?void 0:m.wrap(),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationPoint(this._lngLat)._add(this._offset));let b="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?b=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(b=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let T="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?T="rotateX(0deg)":this._pitchAlignment==="map"&&(T=`rotateX(${this._map.getPitch()}deg)`),f&&f.type!=="moveend"||(this._pos=this._pos.round()),C.setTransform(this._element,`${zc[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${T} ${b}`),E.frameAsync(new AbortController).then(()=>{this._updateOpacity(f&&f.type==="moveend")}).catch(()=>{})},this._onMove=f=>{if(!this._isDragging){const m=this._clickTolerance||this._map._clickTolerance;this._isDragging=f.point.dist(this._pointerdownPos)>=m}this._isDragging&&(this._pos=f.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new l.k("dragstart"))),this.fire(new l.k("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new l.k("dragend")),this._state="inactive"},this._addDragHandler=f=>{this._element.contains(f.originalEvent.target)&&(f.preventDefault(),this._positionDelta=f.point.sub(this._pos).add(this._offset),this._pointerdownPos=f.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=a&&a.anchor||"center",this._color=a&&a.color||"#3FB1CE",this._scale=a&&a.scale||1,this._draggable=a&&a.draggable||!1,this._clickTolerance=a&&a.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=a&&a.rotation||0,this._rotationAlignment=a&&a.rotationAlignment||"auto",this._pitchAlignment=a&&a.pitchAlignment&&a.pitchAlignment!=="auto"?a.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(a==null?void 0:a.opacity,a==null?void 0:a.opacityWhenCovered),a&&a.element)this._element=a.element,this._offset=l.P.convert(a&&a.offset||[0,0]);else{this._defaultMarker=!0,this._element=C.create("div"),this._element.setAttribute("aria-label","Map marker");const f=C.createNS("http://www.w3.org/2000/svg","svg"),m=41,g=27;f.setAttributeNS(null,"display","block"),f.setAttributeNS(null,"height",`${m}px`),f.setAttributeNS(null,"width",`${g}px`),f.setAttributeNS(null,"viewBox",`0 0 ${g} ${m}`);const b=C.createNS("http://www.w3.org/2000/svg","g");b.setAttributeNS(null,"stroke","none"),b.setAttributeNS(null,"stroke-width","1"),b.setAttributeNS(null,"fill","none"),b.setAttributeNS(null,"fill-rule","evenodd");const T=C.createNS("http://www.w3.org/2000/svg","g");T.setAttributeNS(null,"fill-rule","nonzero");const L=C.createNS("http://www.w3.org/2000/svg","g");L.setAttributeNS(null,"transform","translate(3.0, 29.0)"),L.setAttributeNS(null,"fill","#000000");const k=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(const Ce of k){const Be=C.createNS("http://www.w3.org/2000/svg","ellipse");Be.setAttributeNS(null,"opacity","0.04"),Be.setAttributeNS(null,"cx","10.5"),Be.setAttributeNS(null,"cy","5.80029008"),Be.setAttributeNS(null,"rx",Ce.rx),Be.setAttributeNS(null,"ry",Ce.ry),L.appendChild(Be)}const N=C.createNS("http://www.w3.org/2000/svg","g");N.setAttributeNS(null,"fill",this._color);const V=C.createNS("http://www.w3.org/2000/svg","path");V.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),N.appendChild(V);const j=C.createNS("http://www.w3.org/2000/svg","g");j.setAttributeNS(null,"opacity","0.25"),j.setAttributeNS(null,"fill","#000000");const $=C.createNS("http://www.w3.org/2000/svg","path");$.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),j.appendChild($);const he=C.createNS("http://www.w3.org/2000/svg","g");he.setAttributeNS(null,"transform","translate(6.0, 7.0)"),he.setAttributeNS(null,"fill","#FFFFFF");const ce=C.createNS("http://www.w3.org/2000/svg","g");ce.setAttributeNS(null,"transform","translate(8.0, 8.0)");const ge=C.createNS("http://www.w3.org/2000/svg","circle");ge.setAttributeNS(null,"fill","#000000"),ge.setAttributeNS(null,"opacity","0.25"),ge.setAttributeNS(null,"cx","5.5"),ge.setAttributeNS(null,"cy","5.5"),ge.setAttributeNS(null,"r","5.4999962");const re=C.createNS("http://www.w3.org/2000/svg","circle");re.setAttributeNS(null,"fill","#FFFFFF"),re.setAttributeNS(null,"cx","5.5"),re.setAttributeNS(null,"cy","5.5"),re.setAttributeNS(null,"r","5.4999962"),ce.appendChild(ge),ce.appendChild(re),T.appendChild(L),T.appendChild(N),T.appendChild(j),T.appendChild(he),T.appendChild(ce),f.appendChild(T),f.setAttributeNS(null,"height",m*this._scale+"px"),f.setAttributeNS(null,"width",g*this._scale+"px"),this._element.appendChild(f),this._offset=l.P.convert(a&&a.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",f=>{f.preventDefault()}),this._element.addEventListener("mousedown",f=>{f.preventDefault()}),Yh(this._element,this._anchor,"marker"),a&&a.className)for(const f of a.className.split(" "))this._element.classList.add(f);this._popup=null}addTo(a){return this.remove(),this._map=a,a.getCanvasContainer().appendChild(this._element),a.on("move",this._update),a.on("moveend",this._update),a.on("terrain",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),C.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(a){return this._lngLat=l.M.convert(a),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(a){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),a){if(!("offset"in a.options)){const g=Math.abs(13.5)/Math.SQRT2;a.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[g,-1*(38.1-13.5+g)],"bottom-right":[-g,-1*(38.1-13.5+g)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=a,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}getPopup(){return this._popup}togglePopup(){const a=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:a?(a.isOpen()?a.remove():(a.setLngLat(this._lngLat),a.addTo(this._map)),this):this}_updateOpacity(a=!1){var f,m;if(!(!((f=this._map)===null||f===void 0)&&f.terrain))return void(this._element.style.opacity!==this._opacity&&(this._element.style.opacity=this._opacity));if(a)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}const g=this._map,b=g.terrain.depthAtPoint(this._pos),T=g.terrain.getElevationForLngLatZoom(this._lngLat,g.transform.tileZoom);if(g.transform.lngLatToCameraDepth(this._lngLat,T)-b<.006)return void(this._element.style.opacity=this._opacity);const L=-this._offset.y/g.transform._pixelPerMeter,k=Math.sin(g.getPitch()*Math.PI/180)*L,N=g.terrain.depthAtPoint(new l.P(this._pos.x,this._pos.y-this._offset.y)),V=g.transform.lngLatToCameraDepth(this._lngLat,T+k)-N>.006;!((m=this._popup)===null||m===void 0)&&m.isOpen()&&V&&this._popup.remove(),this._element.style.opacity=V?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(a){return this._offset=l.P.convert(a),this._update(),this}addClassName(a){this._element.classList.add(a)}removeClassName(a){this._element.classList.remove(a)}toggleClassName(a){return this._element.classList.toggle(a)}setDraggable(a){return this._draggable=!!a,this._map&&(a?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(a){return this._rotation=a||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(a){return this._rotationAlignment=a||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(a){return this._pitchAlignment=a&&a!=="auto"?a:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(a,f){return a===void 0&&f===void 0&&(this._opacity="1",this._opacityWhenCovered="0.2"),a!==void 0&&(this._opacity=a),f!==void 0&&(this._opacityWhenCovered=f),this._map&&this._updateOpacity(!0),this}}const $h={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let Du=0,Wl=!1;const Kh={maxWidth:100,unit:"metric"};function Jh(y,a,f){const m=f&&f.maxWidth||100,g=y._container.clientHeight/2,b=y.unproject([0,g]),T=y.unproject([m,g]),L=b.distanceTo(T);if(f&&f.unit==="imperial"){const k=3.2808*L;k>5280?Hl(a,m,k/5280,y._getUIString("ScaleControl.Miles")):Hl(a,m,k,y._getUIString("ScaleControl.Feet"))}else f&&f.unit==="nautical"?Hl(a,m,L/1852,y._getUIString("ScaleControl.NauticalMiles")):L>=1e3?Hl(a,m,L/1e3,y._getUIString("ScaleControl.Kilometers")):Hl(a,m,L,y._getUIString("ScaleControl.Meters"))}function Hl(y,a,f,m){const g=function(b){const T=Math.pow(10,`${Math.floor(b)}`.length-1);let L=b/T;return L=L>=10?10:L>=5?5:L>=3?3:L>=2?2:L>=1?1:function(k){const N=Math.pow(10,Math.ceil(-Math.log(k)/Math.LN10));return Math.round(k*N)/N}(L),T*L}(f);y.style.width=a*(g/f)+"px",y.innerHTML=`${g} ${m}`}const Xp={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},Yp=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function Qh(y){if(y){if(typeof y=="number"){const a=Math.round(Math.abs(y)/Math.SQRT2);return{center:new l.P(0,0),top:new l.P(0,y),"top-left":new l.P(a,a),"top-right":new l.P(-a,a),bottom:new l.P(0,-y),"bottom-left":new l.P(a,-a),"bottom-right":new l.P(-a,-a),left:new l.P(y,0),right:new l.P(-y,0)}}if(y instanceof l.P||Array.isArray(y)){const a=l.P.convert(y);return{center:a,top:a,"top-left":a,"top-right":a,bottom:a,"bottom-left":a,"bottom-right":a,left:a,right:a}}return{center:l.P.convert(y.center||[0,0]),top:l.P.convert(y.top||[0,0]),"top-left":l.P.convert(y["top-left"]||[0,0]),"top-right":l.P.convert(y["top-right"]||[0,0]),bottom:l.P.convert(y.bottom||[0,0]),"bottom-left":l.P.convert(y["bottom-left"]||[0,0]),"bottom-right":l.P.convert(y["bottom-right"]||[0,0]),left:l.P.convert(y.left||[0,0]),right:l.P.convert(y.right||[0,0])}}return Qh(new l.P(0,0))}const pg=d;c.AJAXError=l.be,c.Evented=l.E,c.LngLat=l.M,c.MercatorCoordinate=l.Y,c.Point=l.P,c.addProtocol=l.bf,c.config=l.a,c.removeProtocol=l.bg,c.AttributionControl=As,c.BoxZoomHandler=Ps,c.CanvasSource=Cs,c.CooperativeGesturesHandler=Nt,c.DoubleClickZoomHandler=Vp,c.DragPanHandler=cg,c.DragRotateHandler=Ms,c.EdgeInsets=Tu,c.FullscreenControl=class extends l.E{constructor(y={}){super(),this._onFullscreenChange=()=>{var a;let f=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((a=f==null?void 0:f.shadowRoot)===null||a===void 0)&&a.fullscreenElement;)f=f.shadowRoot.fullscreenElement;f===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,y&&y.container&&(y.container instanceof HTMLElement?this._container=y.container:l.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(y){return this._map=y,this._container||(this._container=this._map.getContainer()),this._controlContainer=C.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){C.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){const y=this._fullscreenButton=C.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);C.create("span","maplibregl-ctrl-icon",y).setAttribute("aria-hidden","true"),y.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){const y=this._getTitle();this._fullscreenButton.setAttribute("aria-label",y),this._fullscreenButton.title=y}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new l.k("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new l.k("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},c.GeoJSONSource=Cn,c.GeolocateControl=class extends l.E{constructor(y){super(),this._onSuccess=a=>{if(this._map){if(this._isOutOfMapMaxBounds(a))return this._setErrorState(),this.fire(new l.k("outofmaxbounds",a)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=a,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(a),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(a),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new l.k("geolocate",a)),this._finish()}},this._updateCamera=a=>{const f=new l.M(a.coords.longitude,a.coords.latitude),m=a.coords.accuracy,g=this._map.getBearing(),b=l.e({bearing:g},this.options.fitBoundsOptions),T=Me.fromLngLat(f,m);this._map.fitBounds(T,b,{geolocateSource:!0})},this._updateMarker=a=>{if(a){const f=new l.M(a.coords.longitude,a.coords.latitude);this._accuracyCircleMarker.setLngLat(f).addTo(this._map),this._userLocationDotMarker.setLngLat(f).addTo(this._map),this._accuracy=a.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onZoom=()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},this._onError=a=>{if(this._map){if(this.options.trackUserLocation)if(a.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;const f=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=f,this._geolocateButton.setAttribute("aria-label",f),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(a.code===3&&Wl)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new l.k("error",a)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=a=>{if(this._map){if(this._container.addEventListener("contextmenu",f=>f.preventDefault()),this._geolocateButton=C.create("button","maplibregl-ctrl-geolocate",this._container),C.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",a===!1){l.w("Geolocation support is not available so the GeolocateControl will be disabled.");const f=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=f,this._geolocateButton.setAttribute("aria-label",f)}else{const f=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=f,this._geolocateButton.setAttribute("aria-label",f)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=C.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Fc({element:this._dotElement}),this._circleElement=C.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Fc({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",f=>{f.geolocateSource||this._watchState!=="ACTIVE_LOCK"||f.originalEvent&&f.originalEvent.type==="resize"||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new l.k("trackuserlocationend")))})}},this.options=l.e({},$h,y)}onAdd(y){return this._map=y,this._container=C.create("div","maplibregl-ctrl maplibregl-ctrl-group"),function(){return l._(this,arguments,void 0,function*(a=!1){if(Da!==void 0&&!a)return Da;if(window.navigator.permissions===void 0)return Da=!!window.navigator.geolocation,Da;try{Da=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{Da=!!window.navigator.geolocation}return Da})}().then(a=>this._setupUI(a)),this._container}onRemove(){this._geolocationWatchID!==void 0&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),C.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Du=0,Wl=!1}_isOutOfMapMaxBounds(y){const a=this._map.getMaxBounds(),f=y.coords;return a&&(f.longitudea.getEast()||f.latitudea.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadius(){const y=this._map.getBounds(),a=y.getSouthEast(),f=y.getNorthEast(),m=a.distanceTo(f),g=Math.ceil(this._accuracy/(m/this._map._container.clientHeight)*2);this._circleElement.style.width=`${g}px`,this._circleElement.style.height=`${g}px`}trigger(){if(!this._setup)return l.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new l.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Du--,Wl=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new l.k("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new l.k("trackuserlocationstart"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let y;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Du++,Du>1?(y={maximumAge:6e5,timeout:0},Wl=!0):(y=this.options.positionOptions,Wl=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,y)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},c.Hash=Op,c.ImageSource=cr,c.KeyboardHandler=al,c.LngLatBounds=Me,c.LogoControl=hg,c.Map=class extends Co{constructor(y){if(l.bc.mark(l.bd.create),(y=l.e({},Oc,y)).minZoom!=null&&y.maxZoom!=null&&y.minZoom>y.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(y.minPitch!=null&&y.maxPitch!=null&&y.minPitch>y.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(y.minPitch!=null&&y.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(y.maxPitch!=null&&y.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new Uh(y.minZoom,y.maxZoom,y.minPitch,y.maxPitch,y.renderWorldCopies),{bearingSnap:y.bearingSnap}),this._contextLost=a=>{a.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new l.k("webglcontextlost",{originalEvent:a}))},this._contextRestored=a=>{this._setupPainter(),this.resize(),this._update(),this.fire(new l.k("webglcontextrestored",{originalEvent:a}))},this._onMapScroll=a=>{if(a.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=y.interactive,this._maxTileCacheSize=y.maxTileCacheSize,this._maxTileCacheZoomLevels=y.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=y.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=y.preserveDrawingBuffer,this._antialias=y.antialias,this._trackResize=y.trackResize,this._bearingSnap=y.bearingSnap,this._refreshExpiredTiles=y.refreshExpiredTiles,this._fadeDuration=y.fadeDuration,this._crossSourceCollisions=y.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=y.collectResourceTiming,this._renderTaskQueue=new Rc,this._controls=[],this._mapId=l.a3(),this._locale=l.e({},qp,y.locale),this._clickTolerance=y.clickTolerance,this._overridePixelRatio=y.pixelRatio,this._maxCanvasSize=y.maxCanvasSize,this.transformCameraUpdate=y.transformCameraUpdate,this._imageQueueHandle=G.addThrottleControl(()=>this.isMoving()),this._requestManager=new H(y.transformRequest),typeof y.container=="string"){if(this._container=document.getElementById(y.container),!this._container)throw new Error(`Container '${y.container}' not found.`)}else{if(!(y.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=y.container}if(y.maxBounds&&this.setMaxBounds(y.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)),this.on("moveend",()=>this._update(!1)),this.on("zoom",()=>this._update(!0)),this.on("terrain",()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)}),this.once("idle",()=>{this._idleTriggered=!0}),typeof window<"u"){addEventListener("online",this._onWindowOnline,!1);let a=!1;const f=Np(m=>{this._trackResize&&!this._removed&&this.resize(m)._update()},50);this._resizeObserver=new ResizeObserver(m=>{a?f(m):a=!0}),this._resizeObserver.observe(this._container)}this.handlers=new Up(this,y),this._hash=y.hash&&new Op(typeof y.hash=="string"&&y.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:y.center,zoom:y.zoom,bearing:y.bearing,pitch:y.pitch}),y.bounds&&(this.resize(),this.fitBounds(y.bounds,l.e({},y.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=y.localIdeographFontFamily,this._validateStyle=y.validateStyle,y.style&&this.setStyle(y.style,{localIdeographFontFamily:y.localIdeographFontFamily}),y.attributionControl&&this.addControl(new As(typeof y.attributionControl=="boolean"?void 0:y.attributionControl)),y.maplibreLogo&&this.addControl(new hg,y.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",a=>{this._update(a.dataType==="style"),this.fire(new l.k(`${a.dataType}data`,a))}),this.on("dataloading",a=>{this.fire(new l.k(`${a.dataType}dataloading`,a))}),this.on("dataabort",a=>{this.fire(new l.k("sourcedataabort",a))})}_getMapId(){return this._mapId}addControl(y,a){if(a===void 0&&(a=y.getDefaultPosition?y.getDefaultPosition():"top-right"),!y||!y.onAdd)return this.fire(new l.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const f=y.onAdd(this);this._controls.push(y);const m=this._controlPositions[a];return a.indexOf("bottom")!==-1?m.insertBefore(f,m.firstChild):m.appendChild(f),this}removeControl(y){if(!y||!y.onRemove)return this.fire(new l.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const a=this._controls.indexOf(y);return a>-1&&this._controls.splice(a,1),y.onRemove(this),this}hasControl(y){return this._controls.indexOf(y)>-1}calculateCameraOptionsFromTo(y,a,f,m){return m==null&&this.terrain&&(m=this.terrain.getElevationForLngLatZoom(f,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(y,a,f,m)}resize(y){var a;const f=this._containerDimensions(),m=f[0],g=f[1],b=this._getClampedPixelRatio(m,g);if(this._resizeCanvas(m,g,b),this.painter.resize(m,g,b),this.painter.overLimit()){const L=this.painter.context.gl;this._maxCanvasSize=[L.drawingBufferWidth,L.drawingBufferHeight];const k=this._getClampedPixelRatio(m,g);this._resizeCanvas(m,g,k),this.painter.resize(m,g,k)}this.transform.resize(m,g),(a=this._requestedCameraState)===null||a===void 0||a.resize(m,g);const T=!this._moving;return T&&(this.stop(),this.fire(new l.k("movestart",y)).fire(new l.k("move",y))),this.fire(new l.k("resize",y)),T&&this.fire(new l.k("moveend",y)),this}_getClampedPixelRatio(y,a){const{0:f,1:m}=this._maxCanvasSize,g=this.getPixelRatio(),b=y*g,T=a*g;return Math.min(b>f?f/b:1,T>m?m/T:1)*g}getPixelRatio(){var y;return(y=this._overridePixelRatio)!==null&&y!==void 0?y:devicePixelRatio}setPixelRatio(y){this._overridePixelRatio=y,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(y){return this.transform.setMaxBounds(Me.convert(y)),this._update()}setMinZoom(y){if((y=y??-2)>=-2&&y<=this.transform.maxZoom)return this.transform.minZoom=y,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=y,this._update(),this.getZoom()>y&&this.setZoom(y),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(y){if((y=y??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(y>=0&&y<=this.transform.maxPitch)return this.transform.minPitch=y,this._update(),this.getPitch()85)throw new Error("maxPitch must be less than or equal to 85");if(y>=this.transform.minPitch)return this.transform.maxPitch=y,this._update(),this.getPitch()>y&&this.setPitch(y),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(y){return this.transform.renderWorldCopies=y,this._update()}project(y){return this.transform.locationPoint(l.M.convert(y),this.style&&this.terrain)}unproject(y){return this.transform.pointLocation(l.P.convert(y),this.terrain)}isMoving(){var y;return this._moving||((y=this.handlers)===null||y===void 0?void 0:y.isMoving())}isZooming(){var y;return this._zooming||((y=this.handlers)===null||y===void 0?void 0:y.isZooming())}isRotating(){var y;return this._rotating||((y=this.handlers)===null||y===void 0?void 0:y.isRotating())}_createDelegatedListener(y,a,f){if(y==="mouseenter"||y==="mouseover"){let m=!1;return{layer:a,listener:f,delegates:{mousemove:b=>{const T=this.getLayer(a)?this.queryRenderedFeatures(b.point,{layers:[a]}):[];T.length?m||(m=!0,f.call(this,new Io(y,this,b.originalEvent,{features:T}))):m=!1},mouseout:()=>{m=!1}}}}if(y==="mouseleave"||y==="mouseout"){let m=!1;return{layer:a,listener:f,delegates:{mousemove:T=>{(this.getLayer(a)?this.queryRenderedFeatures(T.point,{layers:[a]}):[]).length?m=!0:m&&(m=!1,f.call(this,new Io(y,this,T.originalEvent)))},mouseout:T=>{m&&(m=!1,f.call(this,new Io(y,this,T.originalEvent)))}}}}{const m=g=>{const b=this.getLayer(a)?this.queryRenderedFeatures(g.point,{layers:[a]}):[];b.length&&(g.features=b,f.call(this,g),delete g.features)};return{layer:a,listener:f,delegates:{[y]:m}}}}on(y,a,f){if(f===void 0)return super.on(y,a);const m=this._createDelegatedListener(y,a,f);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[y]=this._delegatedListeners[y]||[],this._delegatedListeners[y].push(m);for(const g in m.delegates)this.on(g,m.delegates[g]);return this}once(y,a,f){if(f===void 0)return super.once(y,a);const m=this._createDelegatedListener(y,a,f);for(const g in m.delegates)this.once(g,m.delegates[g]);return this}off(y,a,f){return f===void 0?super.off(y,a):(this._delegatedListeners&&this._delegatedListeners[y]&&(m=>{const g=this._delegatedListeners[y];for(let b=0;bthis._updateStyle(y,a));const f=this.style&&a.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!y)),y?(this.style=new Go(this,a||{}),this.style.setEventedParent(this,{style:this.style}),typeof y=="string"?this.style.loadURL(y,a,f):this.style.loadJSON(y,a,f),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Go(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(y,a){if(typeof y=="string"){const f=this._requestManager.transformRequest(y,"Style");l.h(f,new AbortController).then(m=>{this._updateDiff(m.data,a)}).catch(m=>{m&&this.fire(new l.j(m))})}else typeof y=="object"&&this._updateDiff(y,a)}_updateDiff(y,a){try{this.style.setState(y,a)&&this._update(!0)}catch(f){l.w(`Unable to perform style diff: ${f.message||f.error||f}. Rebuilding the style from scratch.`),this._updateStyle(y,a)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():l.w("There is no style added to the map.")}addSource(y,a){return this._lazyInitEmptyStyle(),this.style.addSource(y,a),this._update(!0)}isSourceLoaded(y){const a=this.style&&this.style.sourceCaches[y];if(a!==void 0)return a.loaded();this.fire(new l.j(new Error(`There is no source with ID '${y}'`)))}setTerrain(y){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),y){const a=this.style.sourceCaches[y.source];if(!a)throw new Error(`cannot load terrain, because there exists no source with ID: ${y.source}`);this.terrain===null&&a.reload();for(const f in this.style._layers){const m=this.style._layers[f];m.type==="hillshade"&&m.source===y.source&&l.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new fg(this.painter,a,y),this.painter.renderToTexture=new Gp(this.painter,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._terrainDataCallback=f=>{f.dataType==="style"?this.terrain.sourceCache.freeRtt():f.dataType==="source"&&f.tile&&(f.sourceId!==y.source||this._elevationFreeze||(this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.terrain.sourceCache.freeRtt(f.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.minElevationForCurrentTile=0,this.transform.elevation=0;return this.fire(new l.k("terrain",{terrain:y})),this}getTerrain(){var y,a;return(a=(y=this.terrain)===null||y===void 0?void 0:y.options)!==null&&a!==void 0?a:null}areTilesLoaded(){const y=this.style&&this.style.sourceCaches;for(const a in y){const f=y[a]._tiles;for(const m in f){const g=f[m];if(g.state!=="loaded"&&g.state!=="errored")return!1}}return!0}removeSource(y){return this.style.removeSource(y),this._update(!0)}getSource(y){return this.style.getSource(y)}addImage(y,a,f={}){const{pixelRatio:m=1,sdf:g=!1,stretchX:b,stretchY:T,content:L}=f;if(this._lazyInitEmptyStyle(),!(a instanceof HTMLImageElement||l.b(a))){if(a.width===void 0||a.height===void 0)return this.fire(new l.j(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{const{width:k,height:N,data:V}=a,j=a;return this.style.addImage(y,{data:new l.R({width:k,height:N},new Uint8Array(V)),pixelRatio:m,stretchX:b,stretchY:T,content:L,sdf:g,version:0,userImage:j}),j.onAdd&&j.onAdd(this,y),this}}{const{width:k,height:N,data:V}=E.getImageData(a);this.style.addImage(y,{data:new l.R({width:k,height:N},V),pixelRatio:m,stretchX:b,stretchY:T,content:L,sdf:g,version:0})}}updateImage(y,a){const f=this.style.getImage(y);if(!f)return this.fire(new l.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const m=a instanceof HTMLImageElement||l.b(a)?E.getImageData(a):a,{width:g,height:b,data:T}=m;if(g===void 0||b===void 0)return this.fire(new l.j(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(g!==f.data.width||b!==f.data.height)return this.fire(new l.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));const L=!(a instanceof HTMLImageElement||l.b(a));return f.data.replace(T,L),this.style.updateImage(y,f),this}getImage(y){return this.style.getImage(y)}hasImage(y){return y?!!this.style.getImage(y):(this.fire(new l.j(new Error("Missing required image id"))),!1)}removeImage(y){this.style.removeImage(y)}loadImage(y){return G.getImage(this._requestManager.transformRequest(y,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(y,a){return this._lazyInitEmptyStyle(),this.style.addLayer(y,a),this._update(!0)}moveLayer(y,a){return this.style.moveLayer(y,a),this._update(!0)}removeLayer(y){return this.style.removeLayer(y),this._update(!0)}getLayer(y){return this.style.getLayer(y)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(y,a,f){return this.style.setLayerZoomRange(y,a,f),this._update(!0)}setFilter(y,a,f={}){return this.style.setFilter(y,a,f),this._update(!0)}getFilter(y){return this.style.getFilter(y)}setPaintProperty(y,a,f,m={}){return this.style.setPaintProperty(y,a,f,m),this._update(!0)}getPaintProperty(y,a){return this.style.getPaintProperty(y,a)}setLayoutProperty(y,a,f,m={}){return this.style.setLayoutProperty(y,a,f,m),this._update(!0)}getLayoutProperty(y,a){return this.style.getLayoutProperty(y,a)}setGlyphs(y,a={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(y,a),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(y,a,f={}){return this._lazyInitEmptyStyle(),this.style.addSprite(y,a,f,m=>{m||this._update(!0)}),this}removeSprite(y){return this._lazyInitEmptyStyle(),this.style.removeSprite(y),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(y,a={}){return this._lazyInitEmptyStyle(),this.style.setSprite(y,a,f=>{f||this._update(!0)}),this}setLight(y,a={}){return this._lazyInitEmptyStyle(),this.style.setLight(y,a),this._update(!0)}getLight(){return this.style.getLight()}setFeatureState(y,a){return this.style.setFeatureState(y,a),this._update()}removeFeatureState(y,a){return this.style.removeFeatureState(y,a),this._update()}getFeatureState(y){return this.style.getFeatureState(y)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let y=0,a=0;return this._container&&(y=this._container.clientWidth||400,a=this._container.clientHeight||300),[y,a]}_setupContainer(){const y=this._container;y.classList.add("maplibregl-map");const a=this._canvasContainer=C.create("div","maplibregl-canvas-container",y);this._interactive&&a.classList.add("maplibregl-interactive"),this._canvas=C.create("canvas","maplibregl-canvas",a),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex","0"),this._canvas.setAttribute("aria-label","Map"),this._canvas.setAttribute("role","region");const f=this._containerDimensions(),m=this._getClampedPixelRatio(f[0],f[1]);this._resizeCanvas(f[0],f[1],m);const g=this._controlContainer=C.create("div","maplibregl-control-container",y),b=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(T=>{b[T]=C.create("div",`maplibregl-ctrl-${T} `,g)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(y,a,f){this._canvas.width=Math.floor(f*y),this._canvas.height=Math.floor(f*a),this._canvas.style.width=`${y}px`,this._canvas.style.height=`${a}px`}_setupPainter(){const y={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1};let a=null;this._canvas.addEventListener("webglcontextcreationerror",m=>{a={requestedAttributes:y},m&&(a.statusMessage=m.statusMessage,a.type=m.type)},{once:!0});const f=this._canvas.getContext("webgl2",y)||this._canvas.getContext("webgl",y);if(!f){const m="Failed to initialize WebGL";throw a?(a.message=m,new Error(JSON.stringify(a))):new Error(m)}this.painter=new Qm(f,this.transform),M.testSupport(f)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(y){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||y,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(y){return this._update(),this._renderTaskQueue.add(y)}_cancelRenderFrame(y){this._renderTaskQueue.remove(y)}_render(y){const a=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(y),this._removed)return;let f=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const g=this.transform.zoom,b=E.now();this.style.zoomHistory.update(g,b);const T=new l.a8(g,{now:b,fadeDuration:a,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),L=T.crossFadingFactor();L===1&&L===this._crossFadingFactor||(f=!0,this._crossFadingFactor=L),this.style.update(T)}this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._elevationFreeze||(this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.minElevationForCurrentTile=0,this.transform.elevation=0),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,a,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:a,showPadding:this.showPadding}),this.fire(new l.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,l.bc.mark(l.bd.load),this.fire(new l.k("load"))),this.style&&(this.style.hasTransitions()||f)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();const m=this._sourcesDirty||this._styleDirty||this._placementDirty;return m||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new l.k("idle")),!this._loaded||this._fullyLoaded||m||(this._fullyLoaded=!0,l.bc.mark(l.bd.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var y;this._hash&&this._hash.remove();for(const f of this._controls)f.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&removeEventListener("online",this._onWindowOnline,!1),G.removeThrottleControl(this._imageQueueHandle),(y=this._resizeObserver)===null||y===void 0||y.disconnect();const a=this.painter.context.gl.getExtension("WEBGL_lose_context");a&&a.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),C.remove(this._canvasContainer),C.remove(this._controlContainer),this._container.classList.remove("maplibregl-map"),l.bc.clearMetrics(),this._removed=!0,this.fire(new l.k("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,E.frameAsync(this._frameRequest).then(y=>{l.bc.frame(y),this._frameRequest=null,this._render(y)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(y){this._showTileBoundaries!==y&&(this._showTileBoundaries=y,this._update())}get showPadding(){return!!this._showPadding}set showPadding(y){this._showPadding!==y&&(this._showPadding=y,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(y){this._showCollisionBoxes!==y&&(this._showCollisionBoxes=y,y?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(y){this._showOverdrawInspector!==y&&(this._showOverdrawInspector=y,this._update())}get repaint(){return!!this._repaint}set repaint(y){this._repaint!==y&&(this._repaint=y,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(y){this._vertices=y,this._update()}get version(){return Wp}getCameraTargetElevation(){return this.transform.elevation}},c.MapMouseEvent=Io,c.MapTouchEvent=ea,c.MapWheelEvent=zp,c.Marker=Fc,c.NavigationControl=class{constructor(y){this._updateZoomButtons=()=>{const a=this._map.getZoom(),f=a===this._map.getMaxZoom(),m=a===this._map.getMinZoom();this._zoomInButton.disabled=f,this._zoomOutButton.disabled=m,this._zoomInButton.setAttribute("aria-disabled",f.toString()),this._zoomOutButton.setAttribute("aria-disabled",m.toString())},this._rotateCompassArrow=()=>{const a=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${this._map.transform.angle*(180/Math.PI)}deg)`:`rotate(${this._map.transform.angle*(180/Math.PI)}deg)`;this._compassIcon.style.transform=a},this._setButtonTitle=(a,f)=>{const m=this._map._getUIString(`NavigationControl.${f}`);a.title=m,a.setAttribute("aria-label",m)},this.options=l.e({},Hp,y),this._container=C.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",a=>a.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",a=>this._map.zoomIn({},{originalEvent:a})),C.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",a=>this._map.zoomOut({},{originalEvent:a})),C.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",a=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:a}):this._map.resetNorth({},{originalEvent:a})}),this._compassIcon=C.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(y){return this._map=y,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Zp(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){C.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(y,a){const f=C.create("button",y,this._container);return f.type="button",f.addEventListener("click",a),f}},c.Popup=class extends l.E{constructor(y){super(),this.remove=()=>(this._content&&C.remove(this._content),this._container&&(C.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new l.k("close"))),this),this._onMouseUp=a=>{this._update(a.point)},this._onMouseMove=a=>{this._update(a.point)},this._onDrag=a=>{this._update(a.point)},this._update=a=>{var f;if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=C.create("div","maplibregl-popup",this._map.getContainer()),this._tip=C.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(const L of this.options.className.split(" "))this._container.classList.add(L);this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=this._map.transform.renderWorldCopies&&!this._trackPointer?Xh(this._lngLat,this._flatPos,this._map.transform):(f=this._lngLat)===null||f===void 0?void 0:f.wrap(),this._trackPointer&&!a)return;const m=this._flatPos=this._pos=this._trackPointer&&a?a:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&a?a:this._map.transform.locationPoint(this._lngLat));let g=this.options.anchor;const b=Qh(this.options.offset);if(!g){const L=this._container.offsetWidth,k=this._container.offsetHeight;let N;N=m.y+b.bottom.ythis._map.transform.height-k?["bottom"]:[],m.xthis._map.transform.width-L/2&&N.push("right"),g=N.length===0?"bottom":N.join("-")}let T=m.add(b[g]);this.options.subpixelPositioning||(T=T.round()),C.setTransform(this._container,`${zc[g]} translate(${T.x}px,${T.y}px)`),Yh(this._container,g,"popup")},this._onClose=()=>{this.remove()},this.options=l.e(Object.create(Xp),y)}addTo(y){return this._map&&this.remove(),this._map=y,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new l.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(y){return this._lngLat=l.M.convert(y),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(y){return this.setDOMContent(document.createTextNode(y))}setHTML(y){const a=document.createDocumentFragment(),f=document.createElement("body");let m;for(f.innerHTML=y;m=f.firstChild,m;)a.appendChild(m);return this.setDOMContent(a)}getMaxWidth(){var y;return(y=this._container)===null||y===void 0?void 0:y.style.maxWidth}setMaxWidth(y){return this.options.maxWidth=y,this._update(),this}setDOMContent(y){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=C.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(y),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(y){this._container&&this._container.classList.add(y)}removeClassName(y){this._container&&this._container.classList.remove(y)}setOffset(y){return this.options.offset=y,this._update(),this}toggleClassName(y){if(this._container)return this._container.classList.toggle(y)}setSubpixelPositioning(y){this.options.subpixelPositioning=y}_createCloseButton(){this.options.closeButton&&(this._closeButton=C.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const y=this._container.querySelector(Yp);y&&y.focus()}},c.RasterDEMTileSource=It,c.RasterTileSource=Re,c.ScaleControl=class{constructor(y){this._onMove=()=>{Jh(this._map,this._container,this.options)},this.setUnit=a=>{this.options.unit=a,Jh(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},Kh),y)}getDefaultPosition(){return"bottom-left"}onAdd(y){return this._map=y,this._container=C.create("div","maplibregl-ctrl maplibregl-ctrl-scale",y.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){C.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},c.ScrollZoomHandler=Wh,c.Style=Go,c.TerrainControl=class{constructor(y){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=y}onAdd(y){return this._map=y,this._container=C.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=C.create("button","maplibregl-ctrl-terrain",this._container),C.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){C.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},c.TwoFingersTouchPitchHandler=ag,c.TwoFingersTouchRotateHandler=Bp,c.TwoFingersTouchZoomHandler=sg,c.TwoFingersTouchZoomRotateHandler=kc,c.VectorTileSource=en,c.VideoSource=Uo,c.addSourceType=(y,a)=>l._(void 0,void 0,void 0,function*(){if(tl(y))throw new Error(`A source type called "${y}" already exists.`);((f,m)=>{Ks[f]=m})(y,a)}),c.clearPrewarmedResources=function(){const y=fn;y&&(y.isPreloaded()&&y.numActive()===1?(y.release(Mt),fn=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},c.getMaxParallelImageRequests=function(){return l.a.MAX_PARALLEL_IMAGE_REQUESTS},c.getRTLTextPluginStatus=function(){return at().getRTLTextPluginStatus()},c.getVersion=function(){return pg},c.getWorkerCount=function(){return rn.workerCount},c.getWorkerUrl=function(){return l.a.WORKER_URL},c.importScriptInWorkers=function(y){return zr().broadcast("IS",y)},c.prewarm=function(){pn().acquire(Mt)},c.setMaxParallelImageRequests=function(y){l.a.MAX_PARALLEL_IMAGE_REQUESTS=y},c.setRTLTextPlugin=function(y,a){return at().setRTLTextPlugin(y,a)},c.setWorkerCount=function(y){rn.workerCount=y},c.setWorkerUrl=function(y){l.a.WORKER_URL=y}});var s=n;return s})})(ZE);var ry=ZE.exports;const Bs=g1(ry),df=[];function z0(t,e){return{subscribe:Nn(t,e).subscribe}}function Nn(t,e=Pt){let n;const r=new Set;function i(l){if(Ut(t,l)&&(t=l,n)){const d=!df.length;for(const v of r)v[1](),df.push(v,t);if(d){for(let v=0;v{r.delete(v),r.size===0&&n&&(n(),n=null)}}return{set:i,update:s,subscribe:c}}let Zt;const YE=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&YE.decode();let Md=null;function Vd(){return(Md===null||Md.byteLength===0)&&(Md=new Uint8Array(Zt.memory.buffer)),Md}function vl(t,e){return t=t>>>0,YE.decode(Vd().subarray(t,t+e))}const ru=new Array(128).fill(void 0);ru.push(void 0,null,!0,!1);let Ud=ru.length;function Vi(t){Ud===ru.length&&ru.push(ru.length+1);const e=Ud;return Ud=ru[e],ru[e]=t,e}function Dn(t){return ru[t]}function hM(t){t<132||(ru[t]=Ud,Ud=t)}function Jg(t){const e=Dn(t);return hM(t),e}function F0(t){return t==null}let Ad=null;function fM(){return(Ad===null||Ad.byteLength===0)&&(Ad=new Float64Array(Zt.memory.buffer)),Ad}let kd=null;function _r(){return(kd===null||kd.byteLength===0)&&(kd=new Int32Array(Zt.memory.buffer)),kd}let Hu=0;const Qg=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},pM=typeof Qg.encodeInto=="function"?function(t,e){return Qg.encodeInto(t,e)}:function(t,e){const n=Qg.encode(t);return e.set(n),{read:t.length,written:n.length}};function zg(t,e,n){if(n===void 0){const l=Qg.encode(t),d=e(l.length,1)>>>0;return Vd().subarray(d,d+l.length).set(l),Hu=l.length,d}let r=t.length,i=e(r,1)>>>0;const s=Vd();let c=0;for(;c127)break;s[i+c]=l}if(c!==r){c!==0&&(t=t.slice(c)),i=n(i,r,r=c+t.length*3,1)>>>0;const l=Vd().subarray(i+c,i+r),d=pM(t,l);c+=d.written}return Hu=c,i}function gv(t){const e=typeof t;if(e=="number"||e=="boolean"||t==null)return`${t}`;if(e=="string")return`"${t}"`;if(e=="symbol"){const i=t.description;return i==null?"Symbol":`Symbol(${i})`}if(e=="function"){const i=t.name;return typeof i=="string"&&i.length>0?`Function(${i})`:"Function"}if(Array.isArray(t)){const i=t.length;let s="[";i>0&&(s+=gv(t[0]));for(let c=1;c1)r=n[1];else return toString.call(t);if(r=="Object")try{return"Object("+JSON.stringify(t)+")"}catch{return"Object"}return t instanceof Error?`${t.name}: ${t.message} -${t.stack}`:r}function dM(t,e){const n=e(t.length*1,1)>>>0;return Vd().set(t,n/1),Hu=t.length,n}function B0(t,e){try{return t.apply(this,e)}catch(n){Zt.__wbindgen_exn_store(Vi(n))}}class d_{static __wrap(e){e=e>>>0;const n=Object.create(d_.prototype);return n.__wbg_ptr=e,n}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,e}free(){const e=this.__destroy_into_raw();Zt.__wbg_jsroutesnapper_free(e)}constructor(e){try{const s=Zt.__wbindgen_add_to_stack_pointer(-16),c=dM(e,Zt.__wbindgen_malloc),l=Hu;Zt.jsroutesnapper_new(s,c,l);var n=_r()[s/4+0],r=_r()[s/4+1],i=_r()[s/4+2];if(i)throw Jg(r);return d_.__wrap(n)}finally{Zt.__wbindgen_add_to_stack_pointer(16)}}setRouteConfig(e){Zt.jsroutesnapper_setRouteConfig(this.__wbg_ptr,Vi(e))}setAreaMode(){Zt.jsroutesnapper_setAreaMode(this.__wbg_ptr)}getConfig(){let e,n;try{const s=Zt.__wbindgen_add_to_stack_pointer(-16);Zt.jsroutesnapper_getConfig(s,this.__wbg_ptr);var r=_r()[s/4+0],i=_r()[s/4+1];return e=r,n=i,vl(r,i)}finally{Zt.__wbindgen_add_to_stack_pointer(16),Zt.__wbindgen_free(e,n,1)}}toFinalFeature(){try{const r=Zt.__wbindgen_add_to_stack_pointer(-16);Zt.jsroutesnapper_toFinalFeature(r,this.__wbg_ptr);var e=_r()[r/4+0],n=_r()[r/4+1];let i;return e!==0&&(i=vl(e,n).slice(),Zt.__wbindgen_free(e,n*1)),i}finally{Zt.__wbindgen_add_to_stack_pointer(16)}}renderGeojson(){let e,n;try{const s=Zt.__wbindgen_add_to_stack_pointer(-16);Zt.jsroutesnapper_renderGeojson(s,this.__wbg_ptr);var r=_r()[s/4+0],i=_r()[s/4+1];return e=r,n=i,vl(r,i)}finally{Zt.__wbindgen_add_to_stack_pointer(16),Zt.__wbindgen_free(e,n,1)}}toggleSnapMode(){Zt.jsroutesnapper_toggleSnapMode(this.__wbg_ptr)}onMouseMove(e,n,r){return Zt.jsroutesnapper_onMouseMove(this.__wbg_ptr,e,n,r)!==0}onClick(){Zt.jsroutesnapper_onClick(this.__wbg_ptr)}onDragStart(){return Zt.jsroutesnapper_onDragStart(this.__wbg_ptr)!==0}onMouseUp(){return Zt.jsroutesnapper_onMouseUp(this.__wbg_ptr)!==0}clearState(){Zt.jsroutesnapper_clearState(this.__wbg_ptr)}editExisting(e){try{const i=Zt.__wbindgen_add_to_stack_pointer(-16);Zt.jsroutesnapper_editExisting(i,this.__wbg_ptr,Vi(e));var n=_r()[i/4+0],r=_r()[i/4+1];if(r)throw Jg(n)}finally{Zt.__wbindgen_add_to_stack_pointer(16)}}debugRenderGraph(){let e,n;try{const s=Zt.__wbindgen_add_to_stack_pointer(-16);Zt.jsroutesnapper_debugRenderGraph(s,this.__wbg_ptr);var r=_r()[s/4+0],i=_r()[s/4+1];return e=r,n=i,vl(r,i)}finally{Zt.__wbindgen_add_to_stack_pointer(16),Zt.__wbindgen_free(e,n,1)}}debugSnappableNodes(){let e,n;try{const s=Zt.__wbindgen_add_to_stack_pointer(-16);Zt.jsroutesnapper_debugSnappableNodes(s,this.__wbg_ptr);var r=_r()[s/4+0],i=_r()[s/4+1];return e=r,n=i,vl(r,i)}finally{Zt.__wbindgen_add_to_stack_pointer(16),Zt.__wbindgen_free(e,n,1)}}routeNameForWaypoints(e){let n,r;try{const S=Zt.__wbindgen_add_to_stack_pointer(-16);Zt.jsroutesnapper_routeNameForWaypoints(S,this.__wbg_ptr,Vi(e));var i=_r()[S/4+0],s=_r()[S/4+1],c=_r()[S/4+2],l=_r()[S/4+3],d=i,v=s;if(l)throw d=0,v=0,Jg(c);return n=d,r=v,vl(d,v)}finally{Zt.__wbindgen_add_to_stack_pointer(16),Zt.__wbindgen_free(n,r,1)}}addSnappedWaypoint(e,n){Zt.jsroutesnapper_addSnappedWaypoint(this.__wbg_ptr,e,n)}undo(){Zt.jsroutesnapper_undo(this.__wbg_ptr)}}async function mM(t,e){if(typeof Response=="function"&&t instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(t,e)}catch(r){if(t.headers.get("Content-Type")!="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r);else throw r}const n=await t.arrayBuffer();return await WebAssembly.instantiate(n,e)}else{const n=await WebAssembly.instantiate(t,e);return n instanceof WebAssembly.Instance?{instance:n,module:t}:n}}function gM(){const t={};return t.wbg={},t.wbg.__wbindgen_string_new=function(e,n){const r=vl(e,n);return Vi(r)},t.wbg.__wbindgen_object_drop_ref=function(e){Jg(e)},t.wbg.__wbindgen_error_new=function(e,n){const r=new Error(vl(e,n));return Vi(r)},t.wbg.__wbindgen_is_object=function(e){const n=Dn(e);return typeof n=="object"&&n!==null},t.wbg.__wbindgen_is_undefined=function(e){return Dn(e)===void 0},t.wbg.__wbindgen_in=function(e,n){return Dn(e)in Dn(n)},t.wbg.__wbindgen_number_get=function(e,n){const r=Dn(n),i=typeof r=="number"?r:void 0;fM()[e/8+1]=F0(i)?0:i,_r()[e/4+0]=!F0(i)},t.wbg.__wbindgen_boolean_get=function(e){const n=Dn(e);return typeof n=="boolean"?n?1:0:2},t.wbg.__wbindgen_jsval_loose_eq=function(e,n){return Dn(e)==Dn(n)},t.wbg.__wbindgen_string_get=function(e,n){const r=Dn(n),i=typeof r=="string"?r:void 0;var s=F0(i)?0:zg(i,Zt.__wbindgen_malloc,Zt.__wbindgen_realloc),c=Hu;_r()[e/4+1]=c,_r()[e/4+0]=s},t.wbg.__wbg_getwithrefkey_d1f0d12f1f1b63ea=function(e,n){const r=Dn(e)[Dn(n)];return Vi(r)},t.wbg.__wbindgen_object_clone_ref=function(e){const n=Dn(e);return Vi(n)},t.wbg.__wbg_String_4370c5505c674d30=function(e,n){const r=String(Dn(n)),i=zg(r,Zt.__wbindgen_malloc,Zt.__wbindgen_realloc),s=Hu;_r()[e/4+1]=s,_r()[e/4+0]=i},t.wbg.__wbg_new_abda76e883ba8a5f=function(){const e=new Error;return Vi(e)},t.wbg.__wbg_stack_658279fe44541cf6=function(e,n){const r=Dn(n).stack,i=zg(r,Zt.__wbindgen_malloc,Zt.__wbindgen_realloc),s=Hu;_r()[e/4+1]=s,_r()[e/4+0]=i},t.wbg.__wbg_error_f851667af71bcfc6=function(e,n){let r,i;try{r=e,i=n,console.error(vl(e,n))}finally{Zt.__wbindgen_free(r,i,1)}},t.wbg.__wbg_debug_9a6b3243fbbebb61=function(e){console.debug(Dn(e))},t.wbg.__wbg_error_788ae33f81d3b84b=function(e){console.error(Dn(e))},t.wbg.__wbg_info_2e30e8204b29d91d=function(e){console.info(Dn(e))},t.wbg.__wbg_log_1d3ae0273d8f4f8a=function(e){console.log(Dn(e))},t.wbg.__wbg_warn_d60e832f9882c1b2=function(e){console.warn(Dn(e))},t.wbg.__wbg_get_44be0491f933a435=function(e,n){const r=Dn(e)[n>>>0];return Vi(r)},t.wbg.__wbg_length_fff51ee6522a1a18=function(e){return Dn(e).length},t.wbg.__wbindgen_is_function=function(e){return typeof Dn(e)=="function"},t.wbg.__wbg_next_526fc47e980da008=function(e){const n=Dn(e).next;return Vi(n)},t.wbg.__wbg_next_ddb3312ca1c4e32a=function(){return B0(function(e){const n=Dn(e).next();return Vi(n)},arguments)},t.wbg.__wbg_done_5c1f01fb660d73b5=function(e){return Dn(e).done},t.wbg.__wbg_value_1695675138684bd5=function(e){const n=Dn(e).value;return Vi(n)},t.wbg.__wbg_iterator_97f0c81209c6c35a=function(){return Vi(Symbol.iterator)},t.wbg.__wbg_get_97b561fb56f034b5=function(){return B0(function(e,n){const r=Reflect.get(Dn(e),Dn(n));return Vi(r)},arguments)},t.wbg.__wbg_call_cb65541d95d71282=function(){return B0(function(e,n){const r=Dn(e).call(Dn(n));return Vi(r)},arguments)},t.wbg.__wbg_isArray_4c24b343cb13cfb1=function(e){return Array.isArray(Dn(e))},t.wbg.__wbg_instanceof_ArrayBuffer_39ac22089b74fddb=function(e){let n;try{n=Dn(e)instanceof ArrayBuffer}catch{n=!1}return n},t.wbg.__wbg_buffer_085ec1f694018c4f=function(e){const n=Dn(e).buffer;return Vi(n)},t.wbg.__wbg_new_8125e318e6245eed=function(e){const n=new Uint8Array(Dn(e));return Vi(n)},t.wbg.__wbg_set_5cf90238115182c3=function(e,n,r){Dn(e).set(Dn(n),r>>>0)},t.wbg.__wbg_length_72e2208bbc0efc61=function(e){return Dn(e).length},t.wbg.__wbg_instanceof_Uint8Array_d8d9cb2b8e8ac1d4=function(e){let n;try{n=Dn(e)instanceof Uint8Array}catch{n=!1}return n},t.wbg.__wbindgen_debug_string=function(e,n){const r=gv(Dn(n)),i=zg(r,Zt.__wbindgen_malloc,Zt.__wbindgen_realloc),s=Hu;_r()[e/4+1]=s,_r()[e/4+0]=i},t.wbg.__wbindgen_throw=function(e,n){throw new Error(vl(e,n))},t.wbg.__wbindgen_memory=function(){const e=Zt.memory;return Vi(e)},t}function _M(t,e){return Zt=t.exports,$E.__wbindgen_wasm_module=e,Ad=null,kd=null,Md=null,Zt}async function $E(t){if(Zt!==void 0)return Zt;typeof t>"u"&&(t="/ltn/assets/route_snapper_bg.wasm");const e=gM();(typeof t=="string"||typeof Request=="function"&&t instanceof Request||typeof URL=="function"&&t instanceof URL)&&(t=fetch(t));const{instance:n,module:r}=await mM(await t,e);return _M(n,r)}var Do=63710088e-1,_1={centimeters:Do*100,centimetres:Do*100,degrees:Do/111325,feet:Do*3.28084,inches:Do*39.37,kilometers:Do/1e3,kilometres:Do/1e3,meters:Do,metres:Do,miles:Do/1609.344,millimeters:Do*1e3,millimetres:Do*1e3,nauticalmiles:Do/1852,radians:1,yards:Do*1.0936},yM={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:1/1e3,kilometres:1/1e3,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/Do,yards:1.0936133},_v={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046};function ga(t,e,n){n===void 0&&(n={});var r={type:"Feature"};return(n.id===0||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function vM(t,e,n){switch(t){case"Point":return gs(e).geometry;case"LineString":return ha(e).geometry;case"Polygon":return y1(e).geometry;case"MultiPoint":return JE(e).geometry;case"MultiLineString":return KE(e).geometry;case"MultiPolygon":return QE(e).geometry;default:throw new Error(t+" is invalid")}}function gs(t,e,n){if(n===void 0&&(n={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!m_(t[0])||!m_(t[1]))throw new Error("coordinates must contain numbers");var r={type:"Point",coordinates:t};return ga(r,e,n)}function bM(t,e,n){return n===void 0&&(n={}),Zc(t.map(function(r){return gs(r,e)}),n)}function y1(t,e,n){n===void 0&&(n={});for(var r=0,i=t;r=0))throw new Error("precision must be a positive number");var n=Math.pow(10,e||0);return Math.round(t*n)/n}function v1(t,e){e===void 0&&(e="kilometers");var n=_1[e];if(!n)throw new Error(e+" units is invalid");return t*n}function iy(t,e){e===void 0&&(e="kilometers");var n=_1[e];if(!n)throw new Error(e+" units is invalid");return t/n}function IM(t,e){return Yd(iy(t,e))}function CM(t){var e=t%360;return e<0&&(e+=360),e}function Yd(t){var e=t%(2*Math.PI);return e*180/Math.PI}function fa(t){var e=t%360;return e*Math.PI/180}function TM(t,e,n){if(e===void 0&&(e="kilometers"),n===void 0&&(n="kilometers"),!(t>=0))throw new Error("length must be a positive number");return v1(iy(t,e),n)}function LM(t,e,n){if(e===void 0&&(e="meters"),n===void 0&&(n="kilometers"),!(t>=0))throw new Error("area must be a positive number");var r=_v[e];if(!r)throw new Error("invalid original units");var i=_v[n];if(!i)throw new Error("invalid final units");return t/r*i}function m_(t){return!isNaN(t)&&t!==null&&!Array.isArray(t)}function b1(t){return!!t&&t.constructor===Object}function PM(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(t.length!==4&&t.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(function(e){if(!m_(e))throw new Error("bbox must only contain numbers")})}function MM(t){if(!t)throw new Error("id is required");if(["string","number"].indexOf(typeof t)===-1)throw new Error("id must be a number or a string")}const AM=Object.freeze(Object.defineProperty({__proto__:null,areaFactors:_v,bearingToAzimuth:CM,convertArea:LM,convertLength:TM,degreesToRadians:fa,earthRadius:Do,factors:_1,feature:ga,featureCollection:Zc,geometry:vM,geometryCollection:SM,isNumber:m_,isObject:b1,lengthToDegrees:IM,lengthToRadians:iy,lineString:ha,lineStrings:wM,multiLineString:KE,multiPoint:JE,multiPolygon:QE,point:gs,points:bM,polygon:y1,polygons:xM,radiansToDegrees:Yd,radiansToLength:v1,round:EM,unitsFactors:yM,validateBBox:PM,validateId:MM},Symbol.toStringTag,{value:"Module"}));function $d(t){if(!t)throw new Error("coord is required");if(!Array.isArray(t)){if(t.type==="Feature"&&t.geometry!==null&&t.geometry.type==="Point")return t.geometry.coordinates;if(t.type==="Point")return t.coordinates}if(Array.isArray(t)&&t.length>=2&&!Array.isArray(t[0])&&!Array.isArray(t[1]))return t;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function Mf(t){if(Array.isArray(t))return t;if(t.type==="Feature"){if(t.geometry!==null)return t.geometry.coordinates}else if(t.coordinates)return t.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function yd(t,e,n){n===void 0&&(n={});var r=$d(t),i=$d(e),s=fa(i[1]-r[1]),c=fa(i[0]-r[0]),l=fa(r[1]),d=fa(i[1]),v=Math.pow(Math.sin(s/2),2)+Math.pow(Math.sin(c/2),2)*Math.cos(l)*Math.cos(d);return v1(2*Math.atan2(Math.sqrt(v),Math.sqrt(1-v)),n.units)}function vm(t,e,n){if(t!==null)for(var r,i,s,c,l,d,v,S=0,E=0,C,M=t.type,A=M==="FeatureCollection",R=M==="Feature",z=A?t.features.length:1,U=0;Ud||A>v||R>S){l=E,d=r,v=A,S=R,s=0;return}var z=ha([l,E],n.properties);if(e(z,r,i,R,s)===!1)return!1;s++,l=E})===!1)return!1}}})}function FM(t,e,n){var r=n,i=!1;return tI(t,function(s,c,l,d,v){i===!1&&n===void 0?r=s:r=e(r,s,c,l,d,v),i=!0}),r}function nI(t,e){if(!t)throw new Error("geojson is required");ap(t,function(n,r,i){if(n.geometry!==null){var s=n.geometry.type,c=n.geometry.coordinates;switch(s){case"LineString":if(e(n,r,i,0,0)===!1)return!1;break;case"Polygon":for(var l=0;li?n:i,v=r>s?r:s;return[c,l,d,v]}var w1={exports:{}},iI={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(ym,function(){function n(F,G,H,te,ee){(function fe(pe,se,Ae,Y,ae){for(;Y>Ae;){if(Y-Ae>600){var Ke=Y-Ae+1,Le=se-Ae+1,tt=Math.log(Ke),ut=.5*Math.exp(2*tt/3),He=.5*Math.sqrt(tt*ut*(Ke-ut)/Ke)*(Le-Ke/2<0?-1:1),Ot=Math.max(Ae,Math.floor(se-Le*ut/Ke+He)),Gt=Math.min(Y,Math.floor(se+(Ke-Le)*ut/Ke+He));fe(pe,se,Ot,Gt,ae)}var vt=pe[se],At=Ae,Mt=Y;for(r(pe,Ae,se),ae(pe[Y],vt)>0&&r(pe,Ae,Y);At0;)Mt--}ae(pe[Ae],vt)===0?r(pe,Ae,Mt):r(pe,++Mt,Y),Mt<=se&&(Ae=Mt+1),se<=Mt&&(Y=Mt-1)}})(F,G,H||0,te||F.length-1,ee||i)}function r(F,G,H){var te=F[G];F[G]=F[H],F[H]=te}function i(F,G){return FG?1:0}var s=function(F){F===void 0&&(F=9),this._maxEntries=Math.max(4,F),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function c(F,G,H){if(!H)return G.indexOf(F);for(var te=0;te=F.minX&&G.maxY>=F.minY}function z(F){return{children:F,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function U(F,G,H,te,ee){for(var fe=[G,H];fe.length;)if(!((H=fe.pop())-(G=fe.pop())<=te)){var pe=G+Math.ceil((H-G)/te/2)*te;n(F,pe,G,H,ee),fe.push(G,pe,pe,H)}}return s.prototype.all=function(){return this._all(this.data,[])},s.prototype.search=function(F){var G=this.data,H=[];if(!R(F,G))return H;for(var te=this.toBBox,ee=[];G;){for(var fe=0;fe=0&&ee[G].children.length>this._maxEntries;)this._split(ee,G),G--;this._adjustParentBBoxes(te,ee,G)},s.prototype._split=function(F,G){var H=F[G],te=H.children.length,ee=this._minEntries;this._chooseSplitAxis(H,ee,te);var fe=this._chooseSplitIndex(H,ee,te),pe=z(H.children.splice(fe,H.children.length-fe));pe.height=H.height,pe.leaf=H.leaf,l(H,this.toBBox),l(pe,this.toBBox),G?F[G-1].children.push(pe):this._splitRoot(H,pe)},s.prototype._splitRoot=function(F,G){this.data=z([F,G]),this.data.height=F.height+1,this.data.leaf=!1,l(this.data,this.toBBox)},s.prototype._chooseSplitIndex=function(F,G,H){for(var te,ee,fe,pe,se,Ae,Y,ae=1/0,Ke=1/0,Le=G;Le<=H-G;Le++){var tt=d(F,0,Le,this.toBBox),ut=d(F,Le,H,this.toBBox),He=(ee=tt,fe=ut,pe=void 0,se=void 0,Ae=void 0,Y=void 0,pe=Math.max(ee.minX,fe.minX),se=Math.max(ee.minY,fe.minY),Ae=Math.min(ee.maxX,fe.maxX),Y=Math.min(ee.maxY,fe.maxY),Math.max(0,Ae-pe)*Math.max(0,Y-se)),Ot=C(tt)+C(ut);He=G;ae--){var Ke=F.children[ae];v(pe,F.leaf?ee(Ke):Ke),se+=M(pe)}return se},s.prototype._adjustParentBBoxes=function(F,G,H){for(var te=H;te>=0;te--)v(G[te],F)},s.prototype._condense=function(F){for(var G=F.length-1,H=void 0;G>=0;G--)F[G].children.length===0?G>0?(H=F[G-1].children).splice(H.indexOf(F[G]),1):this.clear():l(F[G],this.toBBox)},s})})(iI);var ZM=iI.exports;const XM=ny(AM),YM=ny(jM);var Qx=Object.prototype.toString,oI=function(e){var n=Qx.call(e),r=n==="[object Arguments]";return r||(r=n!=="[object Array]"&&e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&Qx.call(e.callee)==="[object Function]"),r},V0,ew;function $M(){if(ew)return V0;ew=1;var t;if(!Object.keys){var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=oI,i=Object.prototype.propertyIsEnumerable,s=!i.call({toString:null},"toString"),c=i.call(function(){},"prototype"),l=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],d=function(C){var M=C.constructor;return M&&M.prototype===C},v={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},S=function(){if(typeof window>"u")return!1;for(var C in window)try{if(!v["$"+C]&&e.call(window,C)&&window[C]!==null&&typeof window[C]=="object")try{d(window[C])}catch{return!0}}catch{return!0}return!1}(),E=function(C){if(typeof window>"u"||!S)return d(C);try{return d(C)}catch{return!1}};t=function(M){var A=M!==null&&typeof M=="object",R=n.call(M)==="[object Function]",z=r(M),U=A&&n.call(M)==="[object String]",F=[];if(!A&&!R&&!z)throw new TypeError("Object.keys called on a non-object");var G=c&&R;if(U&&M.length>0&&!e.call(M,0))for(var H=0;H0)for(var te=0;te"u"||!Ki?qn:Ki(Uint8Array),Hc={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?qn:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?qn:ArrayBuffer,"%ArrayIteratorPrototype%":mf&&Ki?Ki([][Symbol.iterator]()):qn,"%AsyncFromSyncIteratorPrototype%":qn,"%AsyncFunction%":wf,"%AsyncGenerator%":wf,"%AsyncGeneratorFunction%":wf,"%AsyncIteratorPrototype%":wf,"%Atomics%":typeof Atomics>"u"?qn:Atomics,"%BigInt%":typeof BigInt>"u"?qn:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?qn:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?qn:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?qn:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":yA,"%eval%":eval,"%EvalError%":vA,"%Float32Array%":typeof Float32Array>"u"?qn:Float32Array,"%Float64Array%":typeof Float64Array>"u"?qn:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?qn:FinalizationRegistry,"%Function%":lI,"%GeneratorFunction%":wf,"%Int8Array%":typeof Int8Array>"u"?qn:Int8Array,"%Int16Array%":typeof Int16Array>"u"?qn:Int16Array,"%Int32Array%":typeof Int32Array>"u"?qn:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":mf&&Ki?Ki(Ki([][Symbol.iterator]())):qn,"%JSON%":typeof JSON=="object"?JSON:qn,"%Map%":typeof Map>"u"?qn:Map,"%MapIteratorPrototype%":typeof Map>"u"||!mf||!Ki?qn:Ki(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?qn:Promise,"%Proxy%":typeof Proxy>"u"?qn:Proxy,"%RangeError%":bA,"%ReferenceError%":xA,"%Reflect%":typeof Reflect>"u"?qn:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?qn:Set,"%SetIteratorPrototype%":typeof Set>"u"||!mf||!Ki?qn:Ki(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?qn:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":mf&&Ki?Ki(""[Symbol.iterator]()):qn,"%Symbol%":mf?Symbol:qn,"%SyntaxError%":Af,"%ThrowTypeError%":SA,"%TypedArray%":IA,"%TypeError%":Lf,"%Uint8Array%":typeof Uint8Array>"u"?qn:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?qn:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?qn:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?qn:Uint32Array,"%URIError%":wA,"%WeakMap%":typeof WeakMap>"u"?qn:WeakMap,"%WeakRef%":typeof WeakRef>"u"?qn:WeakRef,"%WeakSet%":typeof WeakSet>"u"?qn:WeakSet};if(Ki)try{null.error}catch(t){var CA=Ki(Ki(t));Hc["%Error.prototype%"]=CA}var TA=function t(e){var n;if(e==="%AsyncFunction%")n=j0("async function () {}");else if(e==="%GeneratorFunction%")n=j0("function* () {}");else if(e==="%AsyncGeneratorFunction%")n=j0("async function* () {}");else if(e==="%AsyncGenerator%"){var r=t("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=t("%AsyncGenerator%");i&&Ki&&(n=Ki(i.prototype))}return Hc[e]=n,n},ow={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},bm=I1,__=aI,LA=bm.call(Function.call,Array.prototype.concat),PA=bm.call(Function.apply,Array.prototype.splice),sw=bm.call(Function.call,String.prototype.replace),y_=bm.call(Function.call,String.prototype.slice),MA=bm.call(Function.call,RegExp.prototype.exec),AA=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,kA=/\\(\\)?/g,DA=function(e){var n=y_(e,0,1),r=y_(e,-1);if(n==="%"&&r!=="%")throw new Af("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Af("invalid intrinsic syntax, expected opening `%`");var i=[];return sw(e,AA,function(s,c,l,d){i[i.length]=l?sw(d,kA,"$1"):c||s}),i},RA=function(e,n){var r=e,i;if(__(ow,r)&&(i=ow[r],r="%"+i[0]+"%"),__(Hc,r)){var s=Hc[r];if(s===wf&&(s=TA(r)),typeof s>"u"&&!n)throw new Lf("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:s}}throw new Af("intrinsic "+e+" does not exist!")},Dl=function(e,n){if(typeof e!="string"||e.length===0)throw new Lf("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Lf('"allowMissing" argument must be a boolean');if(MA(/^%?[^%]*%?$/,e)===null)throw new Af("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=DA(e),i=r.length>0?r[0]:"",s=RA("%"+i+"%",n),c=s.name,l=s.value,d=!1,v=s.alias;v&&(i=v[0],PA(r,LA([0,1],v)));for(var S=1,E=!0;S=r.length){var R=Wc(l,C);E=!!R,E&&"get"in R&&!("originalValue"in R.get)?l=R.get:l=l[C]}else E=__(l,C),l=l[C];E&&!d&&(Hc[c]=l)}}return l},q0,aw;function C1(){if(aw)return q0;aw=1;var t=Dl,e=t("%Object.defineProperty%",!0)||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return q0=e,q0}var NA=Dl,t_=NA("%Object.getOwnPropertyDescriptor%",!0);if(t_)try{t_([],"length")}catch{t_=null}var T1=t_,lw=C1(),OA=sI,gf=lc,uw=T1,L1=function(e,n,r){if(!e||typeof e!="object"&&typeof e!="function")throw new gf("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new gf("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new gf("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new gf("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new gf("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new gf("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,l=arguments.length>6?arguments[6]:!1,d=!!uw&&uw(e,n);if(lw)lw(e,n,{configurable:c===null&&d?d.configurable:!c,enumerable:i===null&&d?d.enumerable:!i,value:r,writable:s===null&&d?d.writable:!s});else if(l||!i&&!s&&!c)e[n]=r;else throw new OA("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},yv=C1(),uI=function(){return!!yv};uI.hasArrayLengthDefineBug=function(){if(!yv)return null;try{return yv([],"length",{value:1}).length!==1}catch{return!0}};var P1=uI,zA=S1,FA=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",BA=Object.prototype.toString,VA=Array.prototype.concat,cw=L1,UA=function(t){return typeof t=="function"&&BA.call(t)==="[object Function]"},cI=P1(),jA=function(t,e,n,r){if(e in t){if(r===!0){if(t[e]===n)return}else if(!UA(r)||!r())return}cI?cw(t,e,n,!0):cw(t,e,n)},hI=function(t,e){var n=arguments.length>2?arguments[2]:{},r=zA(e);FA&&(r=VA.call(r,Object.getOwnPropertySymbols(e)));for(var i=0;i4294967295||WA(n)!==n)throw new pw("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],i=!0,s=!0;if("length"in e&&fw){var c=fw(e,"length");c&&!c.configurable&&(i=!1),c&&!c.writable&&(s=!1)}return(i||s||!r)&&(qA?hw(e,"length",n,!0,!0):hw(e,"length",n)),e};(function(t){var e=I1,n=Dl,r=HA,i=lc,s=n("%Function.prototype.apply%"),c=n("%Function.prototype.call%"),l=n("%Reflect.apply%",!0)||e.call(c,s),d=C1(),v=n("%Math.max%");t.exports=function(C){if(typeof C!="function")throw new i("a function is required");var M=l(e,c,arguments);return r(M,1+v(0,C.length-(arguments.length-1)),!0)};var S=function(){return l(e,s,arguments)};d?d(t.exports,"apply",{value:S}):t.exports.apply=S})(fI);var lp=fI.exports,pI=Dl,dI=lp,ZA=dI(pI("String.prototype.indexOf")),Ta=function(e,n){var r=pI(e,!!n);return typeof r=="function"&&ZA(e,".prototype.")>-1?dI(r):r},XA=S1,mI=oy(),gI=Ta,dw=Object,YA=gI("Array.prototype.push"),mw=gI("Object.prototype.propertyIsEnumerable"),$A=mI?Object.getOwnPropertySymbols:null,_I=function(e,n){if(e==null)throw new TypeError("target must be an object");var r=dw(e);if(arguments.length===1)return r;for(var i=1;i2&&!!arguments[2];return(!r||hk)&&(ck?gw(e,"name",n,!0,!0):gw(e,"name",n)),e},dk=pk,mk=lc,gk=Object,xI=dk(function(){if(this==null||this!==gk(this))throw new mk("RegExp.prototype.flags getter called on non-object");var e="";return this.hasIndices&&(e+="d"),this.global&&(e+="g"),this.ignoreCase&&(e+="i"),this.multiline&&(e+="m"),this.dotAll&&(e+="s"),this.unicode&&(e+="u"),this.unicodeSets&&(e+="v"),this.sticky&&(e+="y"),e},"get flags",!0),_k=xI,yk=lh.supportsDescriptors,vk=Object.getOwnPropertyDescriptor,wI=function(){if(yk&&/a/mig.flags==="gim"){var e=vk(RegExp.prototype,"flags");if(e&&typeof e.get=="function"&&typeof RegExp.prototype.dotAll=="boolean"&&typeof RegExp.prototype.hasIndices=="boolean"){var n="",r={};if(Object.defineProperty(r,"hasIndices",{get:function(){n+="d"}}),Object.defineProperty(r,"sticky",{get:function(){n+="y"}}),n==="dy")return e.get}}return _k},bk=lh.supportsDescriptors,xk=wI,wk=Object.getOwnPropertyDescriptor,Sk=Object.defineProperty,Ek=TypeError,_w=Object.getPrototypeOf,Ik=/a/,Ck=function(){if(!bk||!_w)throw new Ek("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var e=xk(),n=_w(Ik),r=wk(n,"flags");return(!r||r.get!==e)&&Sk(n,"flags",{configurable:!0,enumerable:!1,get:e}),e},Tk=lh,Lk=lp,Pk=xI,SI=wI,Mk=Ck,EI=Lk(SI());Tk(EI,{getPolyfill:SI,implementation:Pk,shim:Mk});var Ak=EI,n_={exports:{}},kk=oy,uh=function(){return kk()&&!!Symbol.toStringTag},Dk=uh(),Rk=Ta,vv=Rk("Object.prototype.toString"),sy=function(e){return Dk&&e&&typeof e=="object"&&Symbol.toStringTag in e?!1:vv(e)==="[object Arguments]"},II=function(e){return sy(e)?!0:e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&vv(e)!=="[object Array]"&&vv(e.callee)==="[object Function]"},Nk=function(){return sy(arguments)}();sy.isLegacyArguments=II;var CI=Nk?sy:II;const Ok={},zk=Object.freeze(Object.defineProperty({__proto__:null,default:Ok},Symbol.toStringTag,{value:"Module"})),Fk=ny(zk);var M1=typeof Map=="function"&&Map.prototype,H0=Object.getOwnPropertyDescriptor&&M1?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,v_=M1&&H0&&typeof H0.get=="function"?H0.get:null,yw=M1&&Map.prototype.forEach,A1=typeof Set=="function"&&Set.prototype,Z0=Object.getOwnPropertyDescriptor&&A1?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,b_=A1&&Z0&&typeof Z0.get=="function"?Z0.get:null,vw=A1&&Set.prototype.forEach,Bk=typeof WeakMap=="function"&&WeakMap.prototype,Gd=Bk?WeakMap.prototype.has:null,Vk=typeof WeakSet=="function"&&WeakSet.prototype,qd=Vk?WeakSet.prototype.has:null,Uk=typeof WeakRef=="function"&&WeakRef.prototype,bw=Uk?WeakRef.prototype.deref:null,jk=Boolean.prototype.valueOf,Gk=Object.prototype.toString,qk=Function.prototype.toString,Wk=String.prototype.match,k1=String.prototype.slice,Zu=String.prototype.replace,Hk=String.prototype.toUpperCase,xw=String.prototype.toLowerCase,TI=RegExp.prototype.test,ww=Array.prototype.concat,bl=Array.prototype.join,Zk=Array.prototype.slice,Sw=Math.floor,bv=typeof BigInt=="function"?BigInt.prototype.valueOf:null,X0=Object.getOwnPropertySymbols,xv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,kf=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Oo=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===kf||"symbol")?Symbol.toStringTag:null,LI=Object.prototype.propertyIsEnumerable,Ew=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function Iw(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||TI.call(/e/,e))return e;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var r=t<0?-Sw(-t):Sw(t);if(r!==t){var i=String(r),s=k1.call(e,i.length+1);return Zu.call(i,n,"$&_")+"."+Zu.call(Zu.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Zu.call(e,n,"$&_")}var wv=Fk,Cw=wv.custom,Tw=MI(Cw)?Cw:null,Xk=function t(e,n,r,i){var s=n||{};if(qu(s,"quoteStyle")&&s.quoteStyle!=="single"&&s.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(qu(s,"maxStringLength")&&(typeof s.maxStringLength=="number"?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var c=qu(s,"customInspect")?s.customInspect:!0;if(typeof c!="boolean"&&c!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(qu(s,"indent")&&s.indent!==null&&s.indent!==" "&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(qu(s,"numericSeparator")&&typeof s.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var l=s.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return kI(e,s);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var d=String(e);return l?Iw(e,d):d}if(typeof e=="bigint"){var v=String(e)+"n";return l?Iw(e,v):v}var S=typeof s.depth>"u"?5:s.depth;if(typeof r>"u"&&(r=0),r>=S&&S>0&&typeof e=="object")return Sv(e)?"[Array]":"[Object]";var E=f3(s,r);if(typeof i>"u")i=[];else if(AI(i,e)>=0)return"[Circular]";function C(Ke,Le,tt){if(Le&&(i=Zk.call(i),i.push(Le)),tt){var ut={depth:s.depth};return qu(s,"quoteStyle")&&(ut.quoteStyle=s.quoteStyle),t(Ke,ut,r+1,i)}return t(Ke,s,r+1,i)}if(typeof e=="function"&&!Lw(e)){var M=r3(e),A=Fg(e,C);return"[Function"+(M?": "+M:" (anonymous)")+"]"+(A.length>0?" { "+bl.call(A,", ")+" }":"")}if(MI(e)){var R=kf?Zu.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):xv.call(e);return typeof e=="object"&&!kf?vd(R):R}if(u3(e)){for(var z="<"+xw.call(String(e.nodeName)),U=e.attributes||[],F=0;F",z}if(Sv(e)){if(e.length===0)return"[]";var G=Fg(e,C);return E&&!h3(G)?"["+Ev(G,E)+"]":"[ "+bl.call(G,", ")+" ]"}if(Kk(e)){var H=Fg(e,C);return!("cause"in Error.prototype)&&"cause"in e&&!LI.call(e,"cause")?"{ ["+String(e)+"] "+bl.call(ww.call("[cause]: "+C(e.cause),H),", ")+" }":H.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+bl.call(H,", ")+" }"}if(typeof e=="object"&&c){if(Tw&&typeof e[Tw]=="function"&&wv)return wv(e,{depth:S-r});if(c!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(i3(e)){var te=[];return yw&&yw.call(e,function(Ke,Le){te.push(C(Le,e,!0)+" => "+C(Ke,e))}),Pw("Map",v_.call(e),te,E)}if(a3(e)){var ee=[];return vw&&vw.call(e,function(Ke){ee.push(C(Ke,e))}),Pw("Set",b_.call(e),ee,E)}if(o3(e))return Y0("WeakMap");if(l3(e))return Y0("WeakSet");if(s3(e))return Y0("WeakRef");if(Qk(e))return vd(C(Number(e)));if(t3(e))return vd(C(bv.call(e)));if(e3(e))return vd(jk.call(e));if(Jk(e))return vd(C(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(e===ym)return"{ [object globalThis] }";if(!$k(e)&&!Lw(e)){var fe=Fg(e,C),pe=Ew?Ew(e)===Object.prototype:e instanceof Object||e.constructor===Object,se=e instanceof Object?"":"null prototype",Ae=!pe&&Oo&&Object(e)===e&&Oo in e?k1.call(uc(e),8,-1):se?"Object":"",Y=pe||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",ae=Y+(Ae||se?"["+bl.call(ww.call([],Ae||[],se||[]),": ")+"] ":"");return fe.length===0?ae+"{}":E?ae+"{"+Ev(fe,E)+"}":ae+"{ "+bl.call(fe,", ")+" }"}return String(e)};function PI(t,e,n){var r=(n.quoteStyle||e)==="double"?'"':"'";return r+t+r}function Yk(t){return Zu.call(String(t),/"/g,""")}function Sv(t){return uc(t)==="[object Array]"&&(!Oo||!(typeof t=="object"&&Oo in t))}function $k(t){return uc(t)==="[object Date]"&&(!Oo||!(typeof t=="object"&&Oo in t))}function Lw(t){return uc(t)==="[object RegExp]"&&(!Oo||!(typeof t=="object"&&Oo in t))}function Kk(t){return uc(t)==="[object Error]"&&(!Oo||!(typeof t=="object"&&Oo in t))}function Jk(t){return uc(t)==="[object String]"&&(!Oo||!(typeof t=="object"&&Oo in t))}function Qk(t){return uc(t)==="[object Number]"&&(!Oo||!(typeof t=="object"&&Oo in t))}function e3(t){return uc(t)==="[object Boolean]"&&(!Oo||!(typeof t=="object"&&Oo in t))}function MI(t){if(kf)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!xv)return!1;try{return xv.call(t),!0}catch{}return!1}function t3(t){if(!t||typeof t!="object"||!bv)return!1;try{return bv.call(t),!0}catch{}return!1}var n3=Object.prototype.hasOwnProperty||function(t){return t in this};function qu(t,e){return n3.call(t,e)}function uc(t){return Gk.call(t)}function r3(t){if(t.name)return t.name;var e=Wk.call(qk.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function AI(t,e){if(t.indexOf)return t.indexOf(e);for(var n=0,r=t.length;ne.maxStringLength){var n=t.length-e.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return kI(k1.call(t,0,e.maxStringLength),e)+r}var i=Zu.call(Zu.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,c3);return PI(i,"single",e)}function c3(t){var e=t.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return n?"\\"+n:"\\x"+(e<16?"0":"")+Hk.call(e.toString(16))}function vd(t){return"Object("+t+")"}function Y0(t){return t+" { ? }"}function Pw(t,e,n,r){var i=r?Ev(n,r):bl.call(n,", ");return t+" ("+e+") {"+i+"}"}function h3(t){for(var e=0;e=0)return!1;return!0}function f3(t,e){var n;if(t.indent===" ")n=" ";else if(typeof t.indent=="number"&&t.indent>0)n=bl.call(Array(t.indent+1)," ");else return null;return{base:n,prev:bl.call(Array(e+1),n)}}function Ev(t,e){if(t.length===0)return"";var n=` +`),ve=L.createShader(L.FRAGMENT_SHADER);if(L.isContextLost())return void(this.failedToCreate=!0);if(L.shaderSource(ve,Ce),L.compileShader(ve),!L.getShaderParameter(ve,L.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${L.getShaderInfoLog(ve)}`);L.attachShader(this.program,ve);const De=L.createShader(L.VERTEX_SHADER);if(L.isContextLost())return void(this.failedToCreate=!0);if(L.shaderSource(De,Be),L.compileShader(De),!L.getShaderParameter(De,L.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${L.getShaderInfoLog(De)}`);L.attachShader(this.program,De),this.attributes={};const Ve={};this.numAttributes=V.length;for(let Ze=0;Ze({u_depth:new l.aG(Ze,$e.u_depth),u_terrain:new l.aG(Ze,$e.u_terrain),u_terrain_dim:new l.aH(Ze,$e.u_terrain_dim),u_terrain_matrix:new l.aI(Ze,$e.u_terrain_matrix),u_terrain_unpack:new l.aJ(Ze,$e.u_terrain_unpack),u_terrain_exaggeration:new l.aH(Ze,$e.u_terrain_exaggeration)}))(a,Ve),this.binderUniforms=m?m.getUniforms(a,Ve):[]}draw(a,f,m,g,b,T,L,k,N,V,j,$,he,ce,ge,re,Ce,Be){const ve=a.gl;if(this.failedToCreate)return;if(a.program.set(this.program),a.setDepthMode(m),a.setStencilMode(g),a.setColorMode(b),a.setCullFace(T),k){a.activeTexture.set(ve.TEXTURE2),ve.bindTexture(ve.TEXTURE_2D,k.depthTexture),a.activeTexture.set(ve.TEXTURE3),ve.bindTexture(ve.TEXTURE_2D,k.texture);for(const Ve in this.terrainUniforms)this.terrainUniforms[Ve].set(k[Ve])}for(const Ve in this.fixedUniforms)this.fixedUniforms[Ve].set(L[Ve]);ge&&ge.setUniforms(a,this.binderUniforms,he,{zoom:ce});let De=0;switch(f){case ve.LINES:De=2;break;case ve.TRIANGLES:De=3;break;case ve.LINE_STRIP:De=1}for(const Ve of $.get()){const Ze=Ve.vaos||(Ve.vaos={});(Ze[N]||(Ze[N]=new yh)).bind(a,this,V,ge?ge.getPaintVertexBuffers():[],j,Ve.vertexOffset,re,Ce,Be),ve.drawElements(f,Ve.primitiveLength*De,ve.UNSIGNED_SHORT,Ve.primitiveOffset*De*2)}}}function vh(y,a,f){const m=1/tn(f,1,a.transform.tileZoom),g=Math.pow(2,f.tileID.overscaledZ),b=f.tileSize*Math.pow(2,a.transform.tileZoom)/g,T=b*(f.tileID.canonical.x+f.tileID.wrap*g),L=b*f.tileID.canonical.y;return{u_image:0,u_texsize:f.imageAtlasTexture.size,u_scale:[m,y.fromScale,y.toScale],u_fade:y.t,u_pixel_coord_upper:[T>>16,L>>16],u_pixel_coord_lower:[65535&T,65535&L]}}const bc=(y,a,f,m)=>{const g=a.style.light,b=g.properties.get("position"),T=[b.x,b.y,b.z],L=function(){var N=new l.A(9);return l.A!=Float32Array&&(N[1]=0,N[2]=0,N[3]=0,N[5]=0,N[6]=0,N[7]=0),N[0]=1,N[4]=1,N[8]=1,N}();g.properties.get("anchor")==="viewport"&&function(N,V){var j=Math.sin(V),$=Math.cos(V);N[0]=$,N[1]=j,N[2]=0,N[3]=-j,N[4]=$,N[5]=0,N[6]=0,N[7]=0,N[8]=1}(L,-a.transform.angle),function(N,V,j){var $=V[0],he=V[1],ce=V[2];N[0]=$*j[0]+he*j[3]+ce*j[6],N[1]=$*j[1]+he*j[4]+ce*j[7],N[2]=$*j[2]+he*j[5]+ce*j[8]}(T,T,L);const k=g.properties.get("color");return{u_matrix:y,u_lightpos:T,u_lightintensity:g.properties.get("intensity"),u_lightcolor:[k.r,k.g,k.b],u_vertical_gradient:+f,u_opacity:m}},ky=(y,a,f,m,g,b,T)=>l.e(bc(y,a,f,m),vh(b,a,T),{u_height_factor:-Math.pow(2,g.overscaledZ)/T.tileSize/8}),km=y=>({u_matrix:y}),bh=(y,a,f,m)=>l.e(km(y),vh(f,a,m)),Dy=(y,a)=>({u_matrix:y,u_world:a}),Dm=(y,a,f,m,g)=>l.e(bh(y,a,f,m),{u_world:g}),Ry=(y,a,f,m)=>{const g=y.transform;let b,T;if(m.paint.get("circle-pitch-alignment")==="map"){const L=tn(f,1,g.zoom);b=!0,T=[L,L]}else b=!1,T=g.pixelsToGLUnits;return{u_camera_to_center_distance:g.cameraToCenterDistance,u_scale_with_map:+(m.paint.get("circle-pitch-scale")==="map"),u_matrix:y.translatePosMatrix(a.posMatrix,f,m.paint.get("circle-translate"),m.paint.get("circle-translate-anchor")),u_pitch_with_map:+b,u_device_pixel_ratio:y.pixelRatio,u_extrude_scale:T}},Rm=(y,a,f)=>{const m=tn(f,1,a.zoom),g=Math.pow(2,a.zoom-f.tileID.overscaledZ),b=f.tileID.overscaleFactor();return{u_matrix:y,u_camera_to_center_distance:a.cameraToCenterDistance,u_pixels_to_tile_units:m,u_extrude_scale:[a.pixelsToGLUnits[0]/(m*g),a.pixelsToGLUnits[1]/(m*g)],u_overscale_factor:b}},Nm=(y,a,f=1)=>({u_matrix:y,u_color:a,u_overlay:0,u_overlay_scale:f}),xh=y=>({u_matrix:y}),Om=(y,a,f,m)=>({u_matrix:y,u_extrude_scale:tn(a,1,f),u_intensity:m});function zm(y,a){const f=Math.pow(2,a.canonical.z),m=a.canonical.y;return[new l.Y(0,m/f).toLngLat().lat,new l.Y(0,(m+1)/f).toLngLat().lat]}const wh=(y,a,f,m)=>{const g=y.transform;return{u_matrix:xc(y,a,f,m),u_ratio:1/tn(a,1,g.zoom),u_device_pixel_ratio:y.pixelRatio,u_units_to_pixels:[1/g.pixelsToGLUnits[0],1/g.pixelsToGLUnits[1]]}},Fm=(y,a,f,m,g)=>l.e(wh(y,a,f,g),{u_image:0,u_image_height:m}),Bl=(y,a,f,m,g)=>{const b=y.transform,T=Wo(a,b);return{u_matrix:xc(y,a,f,g),u_texsize:a.imageAtlasTexture.size,u_ratio:1/tn(a,1,b.zoom),u_device_pixel_ratio:y.pixelRatio,u_image:0,u_scale:[T,m.fromScale,m.toScale],u_fade:m.t,u_units_to_pixels:[1/b.pixelsToGLUnits[0],1/b.pixelsToGLUnits[1]]}},Sh=(y,a,f,m,g,b)=>{const T=y.lineAtlas,L=Wo(a,y.transform),k=f.layout.get("line-cap")==="round",N=T.getDash(m.from,k),V=T.getDash(m.to,k),j=N.width*g.fromScale,$=V.width*g.toScale;return l.e(wh(y,a,f,b),{u_patternscale_a:[L/j,-N.height/2],u_patternscale_b:[L/$,-V.height/2],u_sdfgamma:T.width/(256*Math.min(j,$)*y.pixelRatio)/2,u_image:0,u_tex_y_a:N.y,u_tex_y_b:V.y,u_mix:g.t})};function Wo(y,a){return 1/tn(y,1,a.tileZoom)}function xc(y,a,f,m){return y.translatePosMatrix(m?m.posMatrix:a.tileID.posMatrix,a,f.paint.get("line-translate"),f.paint.get("line-translate-anchor"))}const Eh=(y,a,f,m,g)=>{return{u_matrix:y,u_tl_parent:a,u_scale_parent:f,u_buffer_scale:1,u_fade_t:m.mix,u_opacity:m.opacity*g.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:g.paint.get("raster-brightness-min"),u_brightness_high:g.paint.get("raster-brightness-max"),u_saturation_factor:(T=g.paint.get("raster-saturation"),T>0?1-1/(1.001-T):-T),u_contrast_factor:(b=g.paint.get("raster-contrast"),b>0?1/(1-b):1+b),u_spin_weights:wc(g.paint.get("raster-hue-rotate"))};var b,T};function wc(y){y*=Math.PI/180;const a=Math.sin(y),f=Math.cos(y);return[(2*f+1)/3,(-Math.sqrt(3)*a-f+1)/3,(Math.sqrt(3)*a-f+1)/3]}const Sc=(y,a,f,m,g,b,T,L,k,N)=>{const V=g.transform;return{u_is_size_zoom_constant:+(y==="constant"||y==="source"),u_is_size_feature_constant:+(y==="constant"||y==="camera"),u_size_t:a?a.uSizeT:0,u_size:a?a.uSize:0,u_camera_to_center_distance:V.cameraToCenterDistance,u_pitch:V.pitch/360*2*Math.PI,u_rotate_symbol:+f,u_aspect_ratio:V.width/V.height,u_fade_change:g.options.fadeDuration?g.symbolFadeChange:1,u_matrix:b,u_label_plane_matrix:T,u_coord_matrix:L,u_is_text:+k,u_pitch_with_map:+m,u_texsize:N,u_texture:0}},Ec=(y,a,f,m,g,b,T,L,k,N,V)=>{const j=g.transform;return l.e(Sc(y,a,f,m,g,b,T,L,k,N),{u_gamma_scale:m?Math.cos(j._pitch)*j.cameraToCenterDistance:1,u_device_pixel_ratio:g.pixelRatio,u_is_halo:+V})},Ic=(y,a,f,m,g,b,T,L,k,N)=>l.e(Ec(y,a,f,m,g,b,T,L,!0,k,!0),{u_texsize_icon:N,u_texture_icon:1}),Ny=(y,a,f)=>({u_matrix:y,u_opacity:a,u_color:f}),Oy=(y,a,f,m,g,b)=>l.e(function(T,L,k,N){const V=k.imageManager.getPattern(T.from.toString()),j=k.imageManager.getPattern(T.to.toString()),{width:$,height:he}=k.imageManager.getPixelSize(),ce=Math.pow(2,N.tileID.overscaledZ),ge=N.tileSize*Math.pow(2,k.transform.tileZoom)/ce,re=ge*(N.tileID.canonical.x+N.tileID.wrap*ce),Ce=ge*N.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:V.tl,u_pattern_br_a:V.br,u_pattern_tl_b:j.tl,u_pattern_br_b:j.br,u_texsize:[$,he],u_mix:L.t,u_pattern_size_a:V.displaySize,u_pattern_size_b:j.displaySize,u_scale_a:L.fromScale,u_scale_b:L.toScale,u_tile_units_to_pixels:1/tn(N,1,k.transform.tileZoom),u_pixel_coord_upper:[re>>16,Ce>>16],u_pixel_coord_lower:[65535&re,65535&Ce]}}(m,b,f,g),{u_matrix:y,u_opacity:a}),Bm={fillExtrusion:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_lightpos:new l.aK(y,a.u_lightpos),u_lightintensity:new l.aH(y,a.u_lightintensity),u_lightcolor:new l.aK(y,a.u_lightcolor),u_vertical_gradient:new l.aH(y,a.u_vertical_gradient),u_opacity:new l.aH(y,a.u_opacity)}),fillExtrusionPattern:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_lightpos:new l.aK(y,a.u_lightpos),u_lightintensity:new l.aH(y,a.u_lightintensity),u_lightcolor:new l.aK(y,a.u_lightcolor),u_vertical_gradient:new l.aH(y,a.u_vertical_gradient),u_height_factor:new l.aH(y,a.u_height_factor),u_image:new l.aG(y,a.u_image),u_texsize:new l.aL(y,a.u_texsize),u_pixel_coord_upper:new l.aL(y,a.u_pixel_coord_upper),u_pixel_coord_lower:new l.aL(y,a.u_pixel_coord_lower),u_scale:new l.aK(y,a.u_scale),u_fade:new l.aH(y,a.u_fade),u_opacity:new l.aH(y,a.u_opacity)}),fill:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix)}),fillPattern:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_image:new l.aG(y,a.u_image),u_texsize:new l.aL(y,a.u_texsize),u_pixel_coord_upper:new l.aL(y,a.u_pixel_coord_upper),u_pixel_coord_lower:new l.aL(y,a.u_pixel_coord_lower),u_scale:new l.aK(y,a.u_scale),u_fade:new l.aH(y,a.u_fade)}),fillOutline:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_world:new l.aL(y,a.u_world)}),fillOutlinePattern:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_world:new l.aL(y,a.u_world),u_image:new l.aG(y,a.u_image),u_texsize:new l.aL(y,a.u_texsize),u_pixel_coord_upper:new l.aL(y,a.u_pixel_coord_upper),u_pixel_coord_lower:new l.aL(y,a.u_pixel_coord_lower),u_scale:new l.aK(y,a.u_scale),u_fade:new l.aH(y,a.u_fade)}),circle:(y,a)=>({u_camera_to_center_distance:new l.aH(y,a.u_camera_to_center_distance),u_scale_with_map:new l.aG(y,a.u_scale_with_map),u_pitch_with_map:new l.aG(y,a.u_pitch_with_map),u_extrude_scale:new l.aL(y,a.u_extrude_scale),u_device_pixel_ratio:new l.aH(y,a.u_device_pixel_ratio),u_matrix:new l.aI(y,a.u_matrix)}),collisionBox:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_camera_to_center_distance:new l.aH(y,a.u_camera_to_center_distance),u_pixels_to_tile_units:new l.aH(y,a.u_pixels_to_tile_units),u_extrude_scale:new l.aL(y,a.u_extrude_scale),u_overscale_factor:new l.aH(y,a.u_overscale_factor)}),collisionCircle:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_inv_matrix:new l.aI(y,a.u_inv_matrix),u_camera_to_center_distance:new l.aH(y,a.u_camera_to_center_distance),u_viewport_size:new l.aL(y,a.u_viewport_size)}),debug:(y,a)=>({u_color:new l.aM(y,a.u_color),u_matrix:new l.aI(y,a.u_matrix),u_overlay:new l.aG(y,a.u_overlay),u_overlay_scale:new l.aH(y,a.u_overlay_scale)}),clippingMask:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix)}),heatmap:(y,a)=>({u_extrude_scale:new l.aH(y,a.u_extrude_scale),u_intensity:new l.aH(y,a.u_intensity),u_matrix:new l.aI(y,a.u_matrix)}),heatmapTexture:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_world:new l.aL(y,a.u_world),u_image:new l.aG(y,a.u_image),u_color_ramp:new l.aG(y,a.u_color_ramp),u_opacity:new l.aH(y,a.u_opacity)}),hillshade:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_image:new l.aG(y,a.u_image),u_latrange:new l.aL(y,a.u_latrange),u_light:new l.aL(y,a.u_light),u_shadow:new l.aM(y,a.u_shadow),u_highlight:new l.aM(y,a.u_highlight),u_accent:new l.aM(y,a.u_accent)}),hillshadePrepare:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_image:new l.aG(y,a.u_image),u_dimension:new l.aL(y,a.u_dimension),u_zoom:new l.aH(y,a.u_zoom),u_unpack:new l.aJ(y,a.u_unpack)}),line:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_ratio:new l.aH(y,a.u_ratio),u_device_pixel_ratio:new l.aH(y,a.u_device_pixel_ratio),u_units_to_pixels:new l.aL(y,a.u_units_to_pixels)}),lineGradient:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_ratio:new l.aH(y,a.u_ratio),u_device_pixel_ratio:new l.aH(y,a.u_device_pixel_ratio),u_units_to_pixels:new l.aL(y,a.u_units_to_pixels),u_image:new l.aG(y,a.u_image),u_image_height:new l.aH(y,a.u_image_height)}),linePattern:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_texsize:new l.aL(y,a.u_texsize),u_ratio:new l.aH(y,a.u_ratio),u_device_pixel_ratio:new l.aH(y,a.u_device_pixel_ratio),u_image:new l.aG(y,a.u_image),u_units_to_pixels:new l.aL(y,a.u_units_to_pixels),u_scale:new l.aK(y,a.u_scale),u_fade:new l.aH(y,a.u_fade)}),lineSDF:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_ratio:new l.aH(y,a.u_ratio),u_device_pixel_ratio:new l.aH(y,a.u_device_pixel_ratio),u_units_to_pixels:new l.aL(y,a.u_units_to_pixels),u_patternscale_a:new l.aL(y,a.u_patternscale_a),u_patternscale_b:new l.aL(y,a.u_patternscale_b),u_sdfgamma:new l.aH(y,a.u_sdfgamma),u_image:new l.aG(y,a.u_image),u_tex_y_a:new l.aH(y,a.u_tex_y_a),u_tex_y_b:new l.aH(y,a.u_tex_y_b),u_mix:new l.aH(y,a.u_mix)}),raster:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_tl_parent:new l.aL(y,a.u_tl_parent),u_scale_parent:new l.aH(y,a.u_scale_parent),u_buffer_scale:new l.aH(y,a.u_buffer_scale),u_fade_t:new l.aH(y,a.u_fade_t),u_opacity:new l.aH(y,a.u_opacity),u_image0:new l.aG(y,a.u_image0),u_image1:new l.aG(y,a.u_image1),u_brightness_low:new l.aH(y,a.u_brightness_low),u_brightness_high:new l.aH(y,a.u_brightness_high),u_saturation_factor:new l.aH(y,a.u_saturation_factor),u_contrast_factor:new l.aH(y,a.u_contrast_factor),u_spin_weights:new l.aK(y,a.u_spin_weights)}),symbolIcon:(y,a)=>({u_is_size_zoom_constant:new l.aG(y,a.u_is_size_zoom_constant),u_is_size_feature_constant:new l.aG(y,a.u_is_size_feature_constant),u_size_t:new l.aH(y,a.u_size_t),u_size:new l.aH(y,a.u_size),u_camera_to_center_distance:new l.aH(y,a.u_camera_to_center_distance),u_pitch:new l.aH(y,a.u_pitch),u_rotate_symbol:new l.aG(y,a.u_rotate_symbol),u_aspect_ratio:new l.aH(y,a.u_aspect_ratio),u_fade_change:new l.aH(y,a.u_fade_change),u_matrix:new l.aI(y,a.u_matrix),u_label_plane_matrix:new l.aI(y,a.u_label_plane_matrix),u_coord_matrix:new l.aI(y,a.u_coord_matrix),u_is_text:new l.aG(y,a.u_is_text),u_pitch_with_map:new l.aG(y,a.u_pitch_with_map),u_texsize:new l.aL(y,a.u_texsize),u_texture:new l.aG(y,a.u_texture)}),symbolSDF:(y,a)=>({u_is_size_zoom_constant:new l.aG(y,a.u_is_size_zoom_constant),u_is_size_feature_constant:new l.aG(y,a.u_is_size_feature_constant),u_size_t:new l.aH(y,a.u_size_t),u_size:new l.aH(y,a.u_size),u_camera_to_center_distance:new l.aH(y,a.u_camera_to_center_distance),u_pitch:new l.aH(y,a.u_pitch),u_rotate_symbol:new l.aG(y,a.u_rotate_symbol),u_aspect_ratio:new l.aH(y,a.u_aspect_ratio),u_fade_change:new l.aH(y,a.u_fade_change),u_matrix:new l.aI(y,a.u_matrix),u_label_plane_matrix:new l.aI(y,a.u_label_plane_matrix),u_coord_matrix:new l.aI(y,a.u_coord_matrix),u_is_text:new l.aG(y,a.u_is_text),u_pitch_with_map:new l.aG(y,a.u_pitch_with_map),u_texsize:new l.aL(y,a.u_texsize),u_texture:new l.aG(y,a.u_texture),u_gamma_scale:new l.aH(y,a.u_gamma_scale),u_device_pixel_ratio:new l.aH(y,a.u_device_pixel_ratio),u_is_halo:new l.aG(y,a.u_is_halo)}),symbolTextAndIcon:(y,a)=>({u_is_size_zoom_constant:new l.aG(y,a.u_is_size_zoom_constant),u_is_size_feature_constant:new l.aG(y,a.u_is_size_feature_constant),u_size_t:new l.aH(y,a.u_size_t),u_size:new l.aH(y,a.u_size),u_camera_to_center_distance:new l.aH(y,a.u_camera_to_center_distance),u_pitch:new l.aH(y,a.u_pitch),u_rotate_symbol:new l.aG(y,a.u_rotate_symbol),u_aspect_ratio:new l.aH(y,a.u_aspect_ratio),u_fade_change:new l.aH(y,a.u_fade_change),u_matrix:new l.aI(y,a.u_matrix),u_label_plane_matrix:new l.aI(y,a.u_label_plane_matrix),u_coord_matrix:new l.aI(y,a.u_coord_matrix),u_is_text:new l.aG(y,a.u_is_text),u_pitch_with_map:new l.aG(y,a.u_pitch_with_map),u_texsize:new l.aL(y,a.u_texsize),u_texsize_icon:new l.aL(y,a.u_texsize_icon),u_texture:new l.aG(y,a.u_texture),u_texture_icon:new l.aG(y,a.u_texture_icon),u_gamma_scale:new l.aH(y,a.u_gamma_scale),u_device_pixel_ratio:new l.aH(y,a.u_device_pixel_ratio),u_is_halo:new l.aG(y,a.u_is_halo)}),background:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_opacity:new l.aH(y,a.u_opacity),u_color:new l.aM(y,a.u_color)}),backgroundPattern:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_opacity:new l.aH(y,a.u_opacity),u_image:new l.aG(y,a.u_image),u_pattern_tl_a:new l.aL(y,a.u_pattern_tl_a),u_pattern_br_a:new l.aL(y,a.u_pattern_br_a),u_pattern_tl_b:new l.aL(y,a.u_pattern_tl_b),u_pattern_br_b:new l.aL(y,a.u_pattern_br_b),u_texsize:new l.aL(y,a.u_texsize),u_mix:new l.aH(y,a.u_mix),u_pattern_size_a:new l.aL(y,a.u_pattern_size_a),u_pattern_size_b:new l.aL(y,a.u_pattern_size_b),u_scale_a:new l.aH(y,a.u_scale_a),u_scale_b:new l.aH(y,a.u_scale_b),u_pixel_coord_upper:new l.aL(y,a.u_pixel_coord_upper),u_pixel_coord_lower:new l.aL(y,a.u_pixel_coord_lower),u_tile_units_to_pixels:new l.aH(y,a.u_tile_units_to_pixels)}),terrain:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_texture:new l.aG(y,a.u_texture),u_ele_delta:new l.aH(y,a.u_ele_delta)}),terrainDepth:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_ele_delta:new l.aH(y,a.u_ele_delta)}),terrainCoords:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_texture:new l.aG(y,a.u_texture),u_terrain_coords_id:new l.aH(y,a.u_terrain_coords_id),u_ele_delta:new l.aH(y,a.u_ele_delta)})};class zy{constructor(a,f,m){this.context=a;const g=a.gl;this.buffer=g.createBuffer(),this.dynamicDraw=!!m,this.context.unbindVAO(),a.bindElementBuffer.set(this.buffer),g.bufferData(g.ELEMENT_ARRAY_BUFFER,f.arrayBuffer,this.dynamicDraw?g.DYNAMIC_DRAW:g.STATIC_DRAW),this.dynamicDraw||delete f.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(a){const f=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),f.bufferSubData(f.ELEMENT_ARRAY_BUFFER,0,a.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const Vl={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class Ih{constructor(a,f,m,g){this.length=f.length,this.attributes=m,this.itemSize=f.bytesPerElement,this.dynamicDraw=g,this.context=a;const b=a.gl;this.buffer=b.createBuffer(),a.bindVertexBuffer.set(this.buffer),b.bufferData(b.ARRAY_BUFFER,f.arrayBuffer,this.dynamicDraw?b.DYNAMIC_DRAW:b.STATIC_DRAW),this.dynamicDraw||delete f.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(a){if(a.length!==this.length)throw new Error(`Length of new data is ${a.length}, which doesn't match current length of ${this.length}`);const f=this.context.gl;this.bind(),f.bufferSubData(f.ARRAY_BUFFER,0,a.arrayBuffer)}enableAttributes(a,f){for(let m=0;m0){const ct=l.F(),pt=$e;l.aP(ct,Ze.placementInvProjMatrix,y.transform.glCoordMatrix),l.aP(ct,ct,Ze.placementViewportMatrix),V.push({circleArray:nt,circleOffset:$,transform:pt,invTransform:ct,coord:De}),j+=nt.length/4,$=j}rt&&N.draw(L,k.LINES,An.disabled,mr.disabled,y.colorModeForRenderPass(),lr.disabled,Rm($e,y.transform,Ve),y.style.map.terrain&&y.style.map.terrain.getTerrainData(De),f.id,rt.layoutVertexBuffer,rt.indexBuffer,rt.segments,null,y.transform.zoom,null,null,rt.collisionVertexBuffer)}if(!T||!V.length)return;const he=y.useProgram("collisionCircle"),ce=new l.aQ;ce.resize(4*j),ce._trim();let ge=0;for(const ve of V)for(let De=0;De=0&&(ce[re.associatedIconIndex]={shiftedAnchor:un,angle:gt})}else Je(re.numGlyphs,$)}if(N){he.clear();const ge=y.icon.placedSymbolArray;for(let re=0;rey.style.map.terrain.getElevation(rt,ps,di):null,kr=f.layout.get("text-rotation-alignment")==="map";Z(ct,rt.posMatrix,y,g,Zo,ra,re,N,kr,pi)}const ul=y.translatePosMatrix(rt.posMatrix,nt,b,T),ia=Ce||g&&Ze||Bc?Mp:Zo,fi=y.translatePosMatrix(ra,nt,b,T,!0),Ar=gt&&f.paint.get(g?"text-halo-width":"icon-halo-width").constantOr(1)!==0;let xr;xr=gt?ct.iconsInText?Ic(Ht.kind,Jt,Be,re,y,ul,ia,fi,bn,yi):Ec(Ht.kind,Jt,Be,re,y,ul,ia,fi,g,bn,!0):Sc(Ht.kind,Jt,Be,re,y,ul,ia,fi,g,bn);const fs={program:kn,buffers:pt,uniformValues:xr,atlasTexture:Ur,atlasTextureIcon:Mr,atlasInterpolation:Jn,atlasInterpolationIcon:Ho,isSDF:gt,hasHalo:Ar};if(ve&&ct.canOverlap){De=!0;const pi=pt.segments.get();for(const kr of pi)$e.push({segments:new l.$([kr]),sortKey:kr.sortKey,state:fs,terrainData:mn})}else $e.push({segments:pt.segments,sortKey:0,state:fs,terrainData:mn})}De&&$e.sort((rt,nt)=>rt.sortKey-nt.sortKey);for(const rt of $e){const nt=rt.state;if($.activeTexture.set(he.TEXTURE0),nt.atlasTexture.bind(nt.atlasInterpolation,he.CLAMP_TO_EDGE),nt.atlasTextureIcon&&($.activeTexture.set(he.TEXTURE1),nt.atlasTextureIcon&&nt.atlasTextureIcon.bind(nt.atlasInterpolationIcon,he.CLAMP_TO_EDGE)),nt.isSDF){const ct=nt.uniformValues;nt.hasHalo&&(ct.u_is_halo=1,Xm(nt.buffers,rt.segments,f,y,nt.program,Ve,V,j,ct,rt.terrainData)),ct.u_is_halo=0}Xm(nt.buffers,rt.segments,f,y,nt.program,Ve,V,j,nt.uniformValues,rt.terrainData)}}function Xm(y,a,f,m,g,b,T,L,k,N){const V=m.context;g.draw(V,V.gl.TRIANGLES,b,T,L,lr.disabled,k,N,f.id,y.layoutVertexBuffer,y.indexBuffer,a,f.paint,m.transform.zoom,y.programConfigurations.get(f.id),y.dynamicLayoutVertexBuffer,y.opacityVertexBuffer)}function Oh(y,a,f,m,g){if(!f||!m||!m.imageAtlas)return;const b=m.imageAtlas.patternPositions;let T=b[f.to.toString()],L=b[f.from.toString()];if(!T&&L&&(T=L),!L&&T&&(L=T),!T||!L){const k=g.getPaintProperty(a);T=b[k],L=b[k]}T&&L&&y.setConstantPatternPositions(T,L)}function Ym(y,a,f,m,g,b,T){const L=y.context.gl,k="fill-pattern",N=f.paint.get(k),V=N&&N.constantOr(1),j=f.getCrossfadeParameters();let $,he,ce,ge,re;T?(he=V&&!f.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",$=L.LINES):(he=V?"fillPattern":"fill",$=L.TRIANGLES);const Ce=N.constantOr(null);for(const Be of m){const ve=a.getTile(Be);if(V&&!ve.patternsLoaded())continue;const De=ve.getBucket(f);if(!De)continue;const Ve=De.programConfigurations.get(f.id),Ze=y.useProgram(he,Ve),$e=y.style.map.terrain&&y.style.map.terrain.getTerrainData(Be);V&&(y.context.activeTexture.set(L.TEXTURE0),ve.imageAtlasTexture.bind(L.LINEAR,L.CLAMP_TO_EDGE),Ve.updatePaintBuffers(j)),Oh(Ve,k,Ce,ve,f);const rt=$e?Be:null,nt=y.translatePosMatrix(rt?rt.posMatrix:Be.posMatrix,ve,f.paint.get("fill-translate"),f.paint.get("fill-translate-anchor"));if(T){ge=De.indexBuffer2,re=De.segments2;const ct=[L.drawingBufferWidth,L.drawingBufferHeight];ce=he==="fillOutlinePattern"&&V?Dm(nt,y,j,ve,ct):Dy(nt,ct)}else ge=De.indexBuffer,re=De.segments,ce=V?bh(nt,y,j,ve):km(nt);Ze.draw(y.context,$,g,y.stencilModeForClipping(Be),b,lr.disabled,ce,$e,f.id,De.layoutVertexBuffer,ge,re,f.paint,y.transform.zoom,Ve)}}function zh(y,a,f,m,g,b,T){const L=y.context,k=L.gl,N="fill-extrusion-pattern",V=f.paint.get(N),j=V.constantOr(1),$=f.getCrossfadeParameters(),he=f.paint.get("fill-extrusion-opacity"),ce=V.constantOr(null);for(const ge of m){const re=a.getTile(ge),Ce=re.getBucket(f);if(!Ce)continue;const Be=y.style.map.terrain&&y.style.map.terrain.getTerrainData(ge),ve=Ce.programConfigurations.get(f.id),De=y.useProgram(j?"fillExtrusionPattern":"fillExtrusion",ve);j&&(y.context.activeTexture.set(k.TEXTURE0),re.imageAtlasTexture.bind(k.LINEAR,k.CLAMP_TO_EDGE),ve.updatePaintBuffers($)),Oh(ve,N,ce,re,f);const Ve=y.translatePosMatrix(ge.posMatrix,re,f.paint.get("fill-extrusion-translate"),f.paint.get("fill-extrusion-translate-anchor")),Ze=f.paint.get("fill-extrusion-vertical-gradient"),$e=j?ky(Ve,y,Ze,he,ge,$,re):bc(Ve,y,Ze,he);De.draw(L,L.gl.TRIANGLES,g,b,T,lr.backCCW,$e,Be,f.id,Ce.layoutVertexBuffer,Ce.indexBuffer,Ce.segments,f.paint,y.transform.zoom,ve,y.style.map.terrain&&Ce.centroidVertexBuffer)}}function Fh(y,a,f,m,g,b,T){const L=y.context,k=L.gl,N=f.fbo;if(!N)return;const V=y.useProgram("hillshade"),j=y.style.map.terrain&&y.style.map.terrain.getTerrainData(a);L.activeTexture.set(k.TEXTURE0),k.bindTexture(k.TEXTURE_2D,N.colorAttachment.get()),V.draw(L,k.TRIANGLES,g,b,T,lr.disabled,(($,he,ce,ge)=>{const re=ce.paint.get("hillshade-shadow-color"),Ce=ce.paint.get("hillshade-highlight-color"),Be=ce.paint.get("hillshade-accent-color");let ve=ce.paint.get("hillshade-illumination-direction")*(Math.PI/180);ce.paint.get("hillshade-illumination-anchor")==="viewport"&&(ve-=$.transform.angle);const De=!$.options.moving;return{u_matrix:ge?ge.posMatrix:$.transform.calculatePosMatrix(he.tileID.toUnwrapped(),De),u_image:0,u_latrange:zm(0,he.tileID),u_light:[ce.paint.get("hillshade-exaggeration"),ve],u_shadow:re,u_highlight:Ce,u_accent:Be}})(y,f,m,j?a:null),j,m.id,y.rasterBoundsBuffer,y.quadTriangleIndexBuffer,y.rasterBoundsSegments)}function Ap(y,a,f,m,g,b){const T=y.context,L=T.gl,k=a.dem;if(k&&k.data){const N=k.dim,V=k.stride,j=k.getPixels();if(T.activeTexture.set(L.TEXTURE1),T.pixelStoreUnpackPremultiplyAlpha.set(!1),a.demTexture=a.demTexture||y.getTileTexture(V),a.demTexture){const he=a.demTexture;he.update(j,{premultiply:!1}),he.bind(L.NEAREST,L.CLAMP_TO_EDGE)}else a.demTexture=new Y(T,j,L.RGBA,{premultiply:!1}),a.demTexture.bind(L.NEAREST,L.CLAMP_TO_EDGE);T.activeTexture.set(L.TEXTURE0);let $=a.fbo;if(!$){const he=new Y(T,{width:N,height:N,data:null},L.RGBA);he.bind(L.LINEAR,L.CLAMP_TO_EDGE),$=a.fbo=T.createFramebuffer(N,N,!0,!1),$.colorAttachment.set(he.texture)}T.bindFramebuffer.set($.framebuffer),T.viewport.set([0,0,N,N]),y.useProgram("hillshadePrepare").draw(T,L.TRIANGLES,m,g,b,lr.disabled,((he,ce)=>{const ge=ce.stride,re=l.F();return l.aN(re,0,l.W,-l.W,0,0,1),l.H(re,re,[0,-l.W,0]),{u_matrix:re,u_image:1,u_dimension:[ge,ge],u_zoom:he.overscaledZ,u_unpack:ce.getUnpackVector()}})(a.tileID,k),null,f.id,y.rasterBoundsBuffer,y.quadTriangleIndexBuffer,y.rasterBoundsSegments),a.needsHillshadePrepare=!1}}function $m(y,a,f,m,g,b){const T=m.paint.get("raster-fade-duration");if(!b&&T>0){const L=E.now(),k=(L-y.timeAdded)/T,N=a?(L-a.timeAdded)/T:-1,V=f.getSource(),j=g.coveringZoomLevel({tileSize:V.tileSize,roundZoom:V.roundZoom}),$=!a||Math.abs(a.tileID.overscaledZ-j)>Math.abs(y.tileID.overscaledZ-j),he=$&&y.refreshedUponExpiration?1:l.ac($?k:1-N,0,1);return y.refreshedUponExpiration&&k>=1&&(y.refreshedUponExpiration=!1),a?{opacity:1,mix:1-he}:{opacity:he,mix:0}}return{opacity:1,mix:0}}const Km=new l.aO(1,0,0,1),Bh=new l.aO(0,1,0,1),kp=new l.aO(0,0,1,1),Hy=new l.aO(1,0,1,1),Jm=new l.aO(0,1,1,1);function Br(y,a,f,m){ho(y,0,a+f/2,y.transform.width,f,m)}function il(y,a,f,m){ho(y,a-f/2,0,f,y.transform.height,m)}function ho(y,a,f,m,g,b){const T=y.context,L=T.gl;L.enable(L.SCISSOR_TEST),L.scissor(a*y.pixelRatio,f*y.pixelRatio,m*y.pixelRatio,g*y.pixelRatio),T.clear({color:b}),L.disable(L.SCISSOR_TEST)}function Dp(y,a,f){const m=y.context,g=m.gl,b=f.posMatrix,T=y.useProgram("debug"),L=An.disabled,k=mr.disabled,N=y.colorModeForRenderPass(),V="$debug",j=y.style.map.terrain&&y.style.map.terrain.getTerrainData(f);m.activeTexture.set(g.TEXTURE0);const $=a.getTileByID(f.key).latestRawTileData,he=Math.floor(($&&$.byteLength||0)/1024),ce=a.getTile(f).tileSize,ge=512/Math.min(ce,512)*(f.overscaledZ/y.transform.zoom)*.5;let re=f.canonical.toString();f.overscaledZ!==f.canonical.z&&(re+=` => ${f.overscaledZ}`),function(Ce,Be){Ce.initDebugOverlayCanvas();const ve=Ce.debugOverlayCanvas,De=Ce.context.gl,Ve=Ce.debugOverlayCanvas.getContext("2d");Ve.clearRect(0,0,ve.width,ve.height),Ve.shadowColor="white",Ve.shadowBlur=2,Ve.lineWidth=1.5,Ve.strokeStyle="white",Ve.textBaseline="top",Ve.font="bold 36px Open Sans, sans-serif",Ve.fillText(Be,5,5),Ve.strokeText(Be,5,5),Ce.debugOverlayTexture.update(ve),Ce.debugOverlayTexture.bind(De.LINEAR,De.CLAMP_TO_EDGE)}(y,`${re} ${he}kB`),T.draw(m,g.TRIANGLES,L,k,Qr.alphaBlended,lr.disabled,Nm(b,l.aO.transparent,ge),null,V,y.debugBuffer,y.quadTriangleIndexBuffer,y.debugSegments),T.draw(m,g.LINE_STRIP,L,k,N,lr.disabled,Nm(b,l.aO.red),j,V,y.debugBuffer,y.tileBorderIndexBuffer,y.debugSegments)}function Vh(y,a,f){const m=y.context,g=m.gl,b=y.colorModeForRenderPass(),T=new An(g.LEQUAL,An.ReadWrite,y.depthRangeFor3D),L=y.useProgram("terrain"),k=a.getTerrainMesh();m.bindFramebuffer.set(null),m.viewport.set([0,0,y.width,y.height]);for(const N of f){const V=y.renderToTexture.getTexture(N),j=a.getTerrainData(N.tileID);m.activeTexture.set(g.TEXTURE0),g.bindTexture(g.TEXTURE_2D,V.texture);const $={u_matrix:y.transform.calculatePosMatrix(N.tileID.toUnwrapped()),u_texture:0,u_ele_delta:a.getMeshFrameDelta(y.transform.zoom)};L.draw(m,g.TRIANGLES,T,mr.disabled,b,lr.backCCW,$,j,"terrain",k.vertexBuffer,k.indexBuffer,k.segments)}}class Qm{constructor(a,f){this.context=new Wy(a),this.transform=f,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:l.an(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=ui.maxUnderzooming+ui.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new nl}resize(a,f,m){if(this.width=Math.floor(a*m),this.height=Math.floor(f*m),this.pixelRatio=m,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const g of this.style._order)this.style._layers[g].resize()}setup(){const a=this.context,f=new l.aV;f.emplaceBack(0,0),f.emplaceBack(l.W,0),f.emplaceBack(0,l.W),f.emplaceBack(l.W,l.W),this.tileExtentBuffer=a.createVertexBuffer(f,_h.members),this.tileExtentSegments=l.$.simpleSegment(0,0,4,2);const m=new l.aV;m.emplaceBack(0,0),m.emplaceBack(l.W,0),m.emplaceBack(0,l.W),m.emplaceBack(l.W,l.W),this.debugBuffer=a.createVertexBuffer(m,_h.members),this.debugSegments=l.$.simpleSegment(0,0,4,5);const g=new l.Z;g.emplaceBack(0,0,0,0),g.emplaceBack(l.W,0,l.W,0),g.emplaceBack(0,l.W,0,l.W),g.emplaceBack(l.W,l.W,l.W,l.W),this.rasterBoundsBuffer=a.createVertexBuffer(g,yn.members),this.rasterBoundsSegments=l.$.simpleSegment(0,0,4,2);const b=new l.aV;b.emplaceBack(0,0),b.emplaceBack(1,0),b.emplaceBack(0,1),b.emplaceBack(1,1),this.viewportBuffer=a.createVertexBuffer(b,_h.members),this.viewportSegments=l.$.simpleSegment(0,0,4,2);const T=new l.aW;T.emplaceBack(0),T.emplaceBack(1),T.emplaceBack(3),T.emplaceBack(2),T.emplaceBack(0),this.tileBorderIndexBuffer=a.createIndexBuffer(T);const L=new l.aX;L.emplaceBack(0,1,2),L.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=a.createIndexBuffer(L);const k=this.context.gl;this.stencilClearMode=new mr({func:k.ALWAYS,mask:0},0,255,k.ZERO,k.ZERO,k.ZERO)}clearStencil(){const a=this.context,f=a.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const m=l.F();l.aN(m,0,this.width,this.height,0,0,1),l.J(m,m,[f.drawingBufferWidth,f.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(a,f.TRIANGLES,An.disabled,this.stencilClearMode,Qr.disabled,lr.disabled,xh(m),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(a,f){if(this.currentStencilSource===a.source||!a.isTileClipped()||!f||!f.length)return;this.currentStencilSource=a.source;const m=this.context,g=m.gl;this.nextStencilID+f.length>256&&this.clearStencil(),m.setColorMode(Qr.disabled),m.setDepthMode(An.disabled);const b=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(const T of f){const L=this._tileClippingMaskIDs[T.key]=this.nextStencilID++,k=this.style.map.terrain&&this.style.map.terrain.getTerrainData(T);b.draw(m,g.TRIANGLES,An.disabled,new mr({func:g.ALWAYS,mask:0},L,255,g.KEEP,g.KEEP,g.REPLACE),Qr.disabled,lr.disabled,xh(T.posMatrix),k,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const a=this.nextStencilID++,f=this.context.gl;return new mr({func:f.NOTEQUAL,mask:255},a,255,f.KEEP,f.KEEP,f.REPLACE)}stencilModeForClipping(a){const f=this.context.gl;return new mr({func:f.EQUAL,mask:255},this._tileClippingMaskIDs[a.key],0,f.KEEP,f.KEEP,f.REPLACE)}stencilConfigForOverlap(a){const f=this.context.gl,m=a.sort((T,L)=>L.overscaledZ-T.overscaledZ),g=m[m.length-1].overscaledZ,b=m[0].overscaledZ-g+1;if(b>1){this.currentStencilSource=void 0,this.nextStencilID+b>256&&this.clearStencil();const T={};for(let L=0;L=0;this.currentLayer--){const k=this.style._layers[m[this.currentLayer]],N=g[k.source],V=b[k.source];this._renderTileClippingMasks(k,V),this.renderLayer(this,N,k,V)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayerre.source&&!re.isHidden(V)?[N.sourceCaches[re.source]]:[]),he=$.filter(re=>re.getSource().type==="vector"),ce=$.filter(re=>re.getSource().type!=="vector"),ge=re=>{(!j||j.getSource().maxzoomge(re)),j||ce.forEach(re=>ge(re)),j}(this.style,this.transform.zoom);k&&function(N,V,j){for(let $=0;$0),g&&(l.a_(f,m),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(b,T){const L=b.context,k=L.gl,N=Qr.unblended,V=new An(k.LEQUAL,An.ReadWrite,[0,1]),j=T.getTerrainMesh(),$=T.sourceCache.getRenderableTiles(),he=b.useProgram("terrainDepth");L.bindFramebuffer.set(T.getFramebuffer("depth").framebuffer),L.viewport.set([0,0,b.width/devicePixelRatio,b.height/devicePixelRatio]),L.clear({color:l.aO.transparent,depth:1});for(const ce of $){const ge=T.getTerrainData(ce.tileID),re={u_matrix:b.transform.calculatePosMatrix(ce.tileID.toUnwrapped()),u_ele_delta:T.getMeshFrameDelta(b.transform.zoom)};he.draw(L,k.TRIANGLES,V,mr.disabled,N,lr.backCCW,re,ge,"terrain",j.vertexBuffer,j.indexBuffer,j.segments)}L.bindFramebuffer.set(null),L.viewport.set([0,0,b.width,b.height])}(this,this.style.map.terrain),function(b,T){const L=b.context,k=L.gl,N=Qr.unblended,V=new An(k.LEQUAL,An.ReadWrite,[0,1]),j=T.getTerrainMesh(),$=T.getCoordsTexture(),he=T.sourceCache.getRenderableTiles(),ce=b.useProgram("terrainCoords");L.bindFramebuffer.set(T.getFramebuffer("coords").framebuffer),L.viewport.set([0,0,b.width/devicePixelRatio,b.height/devicePixelRatio]),L.clear({color:l.aO.transparent,depth:1}),T.coordsIndex=[];for(const ge of he){const re=T.getTerrainData(ge.tileID);L.activeTexture.set(k.TEXTURE0),k.bindTexture(k.TEXTURE_2D,$.texture);const Ce={u_matrix:b.transform.calculatePosMatrix(ge.tileID.toUnwrapped()),u_terrain_coords_id:(255-T.coordsIndex.length)/255,u_texture:0,u_ele_delta:T.getMeshFrameDelta(b.transform.zoom)};ce.draw(L,k.TRIANGLES,V,mr.disabled,N,lr.backCCW,Ce,re,"terrain",j.vertexBuffer,j.indexBuffer,j.segments),T.coordsIndex.push(ge.tileID.key)}L.bindFramebuffer.set(null),L.viewport.set([0,0,b.width,b.height])}(this,this.style.map.terrain))}renderLayer(a,f,m,g){if(!m.isHidden(this.transform.zoom)&&(m.type==="background"||m.type==="custom"||(g||[]).length))switch(this.id=m.id,m.type){case"symbol":(function(b,T,L,k,N){if(b.renderPass!=="translucent")return;const V=mr.disabled,j=b.colorModeForRenderPass();(L._unevaluatedLayout.hasValue("text-variable-anchor")||L._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function($,he,ce,ge,re,Ce,Be){const ve=he.transform,De=re==="map",Ve=Ce==="map";for(const Ze of $){const $e=ge.getTile(Ze),rt=$e.getBucket(ce);if(!rt||!rt.text||!rt.text.segments.get().length)continue;const nt=l.ag(rt.textSizeData,ve.zoom),ct=tn($e,1,he.transform.zoom),pt=on(Ze.posMatrix,Ve,De,he.transform,ct),un=ce.layout.get("icon-text-fit")!=="none"&&rt.hasIconData();if(nt){const gt=Math.pow(2,ve.zoom-$e.tileID.overscaledZ);Dh(rt,De,Ve,Be,ve,pt,Ze.posMatrix,gt,nt,un,he.style.map.terrain?(Ht,cn)=>he.style.map.terrain.getElevation(Ze,Ht,cn):null)}}}(k,b,L,T,L.layout.get("text-rotation-alignment"),L.layout.get("text-pitch-alignment"),N),L.paint.get("icon-opacity").constantOr(1)!==0&&Nh(b,T,L,k,!1,L.paint.get("icon-translate"),L.paint.get("icon-translate-anchor"),L.layout.get("icon-rotation-alignment"),L.layout.get("icon-pitch-alignment"),L.layout.get("icon-keep-upright"),V,j),L.paint.get("text-opacity").constantOr(1)!==0&&Nh(b,T,L,k,!0,L.paint.get("text-translate"),L.paint.get("text-translate-anchor"),L.layout.get("text-rotation-alignment"),L.layout.get("text-pitch-alignment"),L.layout.get("text-keep-upright"),V,j),T.map.showCollisionBoxes&&(kh(b,T,L,k,L.paint.get("text-translate"),L.paint.get("text-translate-anchor"),!0),kh(b,T,L,k,L.paint.get("icon-translate"),L.paint.get("icon-translate-anchor"),!1))})(a,f,m,g,this.style.placement.variableOffsets);break;case"circle":(function(b,T,L,k){if(b.renderPass!=="translucent")return;const N=L.paint.get("circle-opacity"),V=L.paint.get("circle-stroke-width"),j=L.paint.get("circle-stroke-opacity"),$=!L.layout.get("circle-sort-key").isConstant();if(N.constantOr(1)===0&&(V.constantOr(1)===0||j.constantOr(1)===0))return;const he=b.context,ce=he.gl,ge=b.depthModeForSublayer(0,An.ReadOnly),re=mr.disabled,Ce=b.colorModeForRenderPass(),Be=[];for(let ve=0;veve.sortKey-De.sortKey);for(const ve of Be){const{programConfiguration:De,program:Ve,layoutVertexBuffer:Ze,indexBuffer:$e,uniformValues:rt,terrainData:nt}=ve.state;Ve.draw(he,ce.TRIANGLES,ge,re,Ce,lr.disabled,rt,nt,L.id,Ze,$e,ve.segments,L.paint,b.transform.zoom,De)}})(a,f,m,g);break;case"heatmap":(function(b,T,L,k){if(L.paint.get("heatmap-opacity")!==0)if(b.renderPass==="offscreen"){const N=b.context,V=N.gl,j=mr.disabled,$=new Qr([V.ONE,V.ONE],l.aO.transparent,[!0,!0,!0,!0]);(function(he,ce,ge){const re=he.gl;he.activeTexture.set(re.TEXTURE1),he.viewport.set([0,0,ce.width/4,ce.height/4]);let Ce=ge.heatmapFbo;if(Ce)re.bindTexture(re.TEXTURE_2D,Ce.colorAttachment.get()),he.bindFramebuffer.set(Ce.framebuffer);else{const Be=re.createTexture();re.bindTexture(re.TEXTURE_2D,Be),re.texParameteri(re.TEXTURE_2D,re.TEXTURE_WRAP_S,re.CLAMP_TO_EDGE),re.texParameteri(re.TEXTURE_2D,re.TEXTURE_WRAP_T,re.CLAMP_TO_EDGE),re.texParameteri(re.TEXTURE_2D,re.TEXTURE_MIN_FILTER,re.LINEAR),re.texParameteri(re.TEXTURE_2D,re.TEXTURE_MAG_FILTER,re.LINEAR),Ce=ge.heatmapFbo=he.createFramebuffer(ce.width/4,ce.height/4,!1,!1),function(ve,De,Ve,Ze){var $e,rt;const nt=ve.gl,ct=($e=ve.HALF_FLOAT)!==null&&$e!==void 0?$e:nt.UNSIGNED_BYTE,pt=(rt=ve.RGBA16F)!==null&&rt!==void 0?rt:nt.RGBA;nt.texImage2D(nt.TEXTURE_2D,0,pt,De.width/4,De.height/4,0,nt.RGBA,ct,null),Ze.colorAttachment.set(Ve)}(he,ce,Be,Ce)}})(N,b,L),N.clear({color:l.aO.transparent});for(let he=0;he{const ve=l.F();l.aN(ve,0,ge.width,ge.height,0,0,1);const De=ge.context.gl;return{u_matrix:ve,u_world:[De.drawingBufferWidth,De.drawingBufferHeight],u_image:0,u_color_ramp:1,u_opacity:re.paint.get("heatmap-opacity")}})(N,V),null,V.id,N.viewportBuffer,N.quadTriangleIndexBuffer,N.viewportSegments,V.paint,N.transform.zoom)}(b,L))})(a,f,m,g);break;case"line":(function(b,T,L,k){if(b.renderPass!=="translucent")return;const N=L.paint.get("line-opacity"),V=L.paint.get("line-width");if(N.constantOr(1)===0||V.constantOr(1)===0)return;const j=b.depthModeForSublayer(0,An.ReadOnly),$=b.colorModeForRenderPass(),he=L.paint.get("line-dasharray"),ce=L.paint.get("line-pattern"),ge=ce.constantOr(1),re=L.paint.get("line-gradient"),Ce=L.getCrossfadeParameters(),Be=ge?"linePattern":he?"lineSDF":re?"lineGradient":"line",ve=b.context,De=ve.gl;let Ve=!0;for(const Ze of k){const $e=T.getTile(Ze);if(ge&&!$e.patternsLoaded())continue;const rt=$e.getBucket(L);if(!rt)continue;const nt=rt.programConfigurations.get(L.id),ct=b.context.program.get(),pt=b.useProgram(Be,nt),un=Ve||pt.program!==ct,gt=b.style.map.terrain&&b.style.map.terrain.getTerrainData(Ze),Ht=ce.constantOr(null);if(Ht&&$e.imageAtlas){const Jt=$e.imageAtlas,mn=Jt.patternPositions[Ht.to.toString()],bn=Jt.patternPositions[Ht.from.toString()];mn&&bn&&nt.setConstantPatternPositions(mn,bn)}const cn=gt?Ze:null,kn=ge?Bl(b,$e,L,Ce,cn):he?Sh(b,$e,L,he,Ce,cn):re?Fm(b,$e,L,rt.lineClipsArray.length,cn):wh(b,$e,L,cn);if(ge)ve.activeTexture.set(De.TEXTURE0),$e.imageAtlasTexture.bind(De.LINEAR,De.CLAMP_TO_EDGE),nt.updatePaintBuffers(Ce);else if(he&&(un||b.lineAtlas.dirty))ve.activeTexture.set(De.TEXTURE0),b.lineAtlas.bind(ve);else if(re){const Jt=rt.gradients[L.id];let mn=Jt.texture;if(L.gradientVersion!==Jt.version){let bn=256;if(L.stepInterpolant){const Ur=T.getSource().maxzoom,Jn=Ze.canonical.z===Ur?Math.ceil(1<0?f.pop():null}isPatternMissing(a){if(!a)return!1;if(!a.from||!a.to)return!0;const f=this.imageManager.getPattern(a.from.toString()),m=this.imageManager.getPattern(a.to.toString());return!f||!m}useProgram(a,f){this.cache=this.cache||{};const m=a+(f?f.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[m]||(this.cache[m]=new rl(this.context,vc[a],f,Bm[a],this._showOverdrawInspector,this.style.map.terrain)),this.cache[m]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){const a=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(a.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new Y(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){const{drawingBufferWidth:a,drawingBufferHeight:f}=this.context.gl;return this.width!==a||this.height!==f}}class ol{constructor(a,f){this.points=a,this.planes=f}static fromInvProjectionMatrix(a,f,m){const g=Math.pow(2,m),b=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(L=>{const k=1/(L=l.af([],L,a))[3]/f*g;return l.a$(L,L,[k,k,1/L[3],k])}),T=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(L=>{const k=function($,he){var ce=he[0],ge=he[1],re=he[2],Ce=ce*ce+ge*ge+re*re;return Ce>0&&(Ce=1/Math.sqrt(Ce)),$[0]=he[0]*Ce,$[1]=he[1]*Ce,$[2]=he[2]*Ce,$}([],function($,he,ce){var ge=he[0],re=he[1],Ce=he[2],Be=ce[0],ve=ce[1],De=ce[2];return $[0]=re*De-Ce*ve,$[1]=Ce*Be-ge*De,$[2]=ge*ve-re*Be,$}([],pe([],b[L[0]],b[L[1]]),pe([],b[L[2]],b[L[1]]))),N=-((V=k)[0]*(j=b[L[1]])[0]+V[1]*j[1]+V[2]*j[2]);var V,j;return k.concat(N)});return new ol(b,T)}}class sl{constructor(a,f){this.min=a,this.max=f,this.center=function(m,g,b){return m[0]=.5*g[0],m[1]=.5*g[1],m[2]=.5*g[2],m}([],function(m,g,b){return m[0]=g[0]+b[0],m[1]=g[1]+b[1],m[2]=g[2]+b[2],m}([],this.min,this.max))}quadrant(a){const f=[a%2==0,a<2],m=ee(this.min),g=ee(this.max);for(let b=0;b=0&&T++;if(T===0)return 0;T!==f.length&&(m=!1)}if(m)return 2;for(let g=0;g<3;g++){let b=Number.MAX_VALUE,T=-Number.MAX_VALUE;for(let L=0;Lthis.max[g]-this.min[g])return 0}return 1}}class Lu{constructor(a=0,f=0,m=0,g=0){if(isNaN(a)||a<0||isNaN(f)||f<0||isNaN(m)||m<0||isNaN(g)||g<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=a,this.bottom=f,this.left=m,this.right=g}interpolate(a,f,m){return f.top!=null&&a.top!=null&&(this.top=l.z.number(a.top,f.top,m)),f.bottom!=null&&a.bottom!=null&&(this.bottom=l.z.number(a.bottom,f.bottom,m)),f.left!=null&&a.left!=null&&(this.left=l.z.number(a.left,f.left,m)),f.right!=null&&a.right!=null&&(this.right=l.z.number(a.right,f.right,m)),this}getCenter(a,f){const m=l.ac((this.left+a-this.right)/2,0,a),g=l.ac((this.top+f-this.bottom)/2,0,f);return new l.P(m,g)}equals(a){return this.top===a.top&&this.bottom===a.bottom&&this.left===a.left&&this.right===a.right}clone(){return new Lu(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}const Rp=85.051129;class Uh{constructor(a,f,m,g,b){this.tileSize=512,this._renderWorldCopies=b===void 0||!!b,this._minZoom=a||0,this._maxZoom=f||22,this._minPitch=m??0,this._maxPitch=g??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new l.M(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Lu,this._posMatrixCache={},this._alignedPosMatrixCache={},this.minElevationForCurrentTile=0}clone(){const a=new Uh(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return a.apply(this),a}apply(a){this.tileSize=a.tileSize,this.latRange=a.latRange,this.width=a.width,this.height=a.height,this._center=a._center,this._elevation=a._elevation,this.minElevationForCurrentTile=a.minElevationForCurrentTile,this.zoom=a.zoom,this.angle=a.angle,this._fov=a._fov,this._pitch=a._pitch,this._unmodified=a._unmodified,this._edgeInsets=a._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(a){this._minZoom!==a&&(this._minZoom=a,this.zoom=Math.max(this.zoom,a))}get maxZoom(){return this._maxZoom}set maxZoom(a){this._maxZoom!==a&&(this._maxZoom=a,this.zoom=Math.min(this.zoom,a))}get minPitch(){return this._minPitch}set minPitch(a){this._minPitch!==a&&(this._minPitch=a,this.pitch=Math.max(this.pitch,a))}get maxPitch(){return this._maxPitch}set maxPitch(a){this._maxPitch!==a&&(this._maxPitch=a,this.pitch=Math.min(this.pitch,a))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(a){a===void 0?a=!0:a===null&&(a=!1),this._renderWorldCopies=a}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new l.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(a){const f=-l.b1(a,-180,180)*Math.PI/180;this.angle!==f&&(this._unmodified=!1,this.angle=f,this._calcMatrices(),this.rotationMatrix=function(){var m=new l.A(4);return l.A!=Float32Array&&(m[1]=0,m[2]=0),m[0]=1,m[3]=1,m}(),function(m,g,b){var T=g[0],L=g[1],k=g[2],N=g[3],V=Math.sin(b),j=Math.cos(b);m[0]=T*j+k*V,m[1]=L*j+N*V,m[2]=T*-V+k*j,m[3]=L*-V+N*j}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(a){const f=l.ac(a,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==f&&(this._unmodified=!1,this._pitch=f,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(a){a=Math.max(.01,Math.min(60,a)),this._fov!==a&&(this._unmodified=!1,this._fov=a/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(a){const f=Math.min(Math.max(a,this.minZoom),this.maxZoom);this._zoom!==f&&(this._unmodified=!1,this._zoom=f,this.tileZoom=Math.max(0,Math.floor(f)),this.scale=this.zoomScale(f),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(a){a.lat===this._center.lat&&a.lng===this._center.lng||(this._unmodified=!1,this._center=a,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(a){a!==this._elevation&&(this._elevation=a,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(a){this._edgeInsets.equals(a)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,a,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(a){return this._edgeInsets.equals(a)}interpolatePadding(a,f,m){this._unmodified=!1,this._edgeInsets.interpolate(a,f,m),this._constrain(),this._calcMatrices()}coveringZoomLevel(a){const f=(a.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/a.tileSize));return Math.max(0,f)}getVisibleUnwrappedCoordinates(a){const f=[new l.b2(0,a)];if(this._renderWorldCopies){const m=this.pointCoordinate(new l.P(0,0)),g=this.pointCoordinate(new l.P(this.width,0)),b=this.pointCoordinate(new l.P(this.width,this.height)),T=this.pointCoordinate(new l.P(0,this.height)),L=Math.floor(Math.min(m.x,g.x,b.x,T.x)),k=Math.floor(Math.max(m.x,g.x,b.x,T.x)),N=1;for(let V=L-N;V<=k+N;V++)V!==0&&f.push(new l.b2(V,a))}return f}coveringTiles(a){var f,m;let g=this.coveringZoomLevel(a);const b=g;if(a.minzoom!==void 0&&ga.maxzoom&&(g=a.maxzoom);const T=this.pointCoordinate(this.getCameraPoint()),L=l.Y.fromLngLat(this.center),k=Math.pow(2,g),N=[k*T.x,k*T.y,0],V=[k*L.x,k*L.y,0],j=ol.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,g);let $=a.minzoom||0;!a.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&($=g);const he=a.terrain?2/Math.min(this.tileSize,a.tileSize)*this.tileSize:3,ce=ve=>({aabb:new sl([ve*k,0,0],[(ve+1)*k,k,0]),zoom:0,x:0,y:0,wrap:ve,fullyVisible:!1}),ge=[],re=[],Ce=g,Be=a.reparseOverscaled?b:g;if(this._renderWorldCopies)for(let ve=1;ve<=3;ve++)ge.push(ce(-ve)),ge.push(ce(ve));for(ge.push(ce(0));ge.length>0;){const ve=ge.pop(),De=ve.x,Ve=ve.y;let Ze=ve.fullyVisible;if(!Ze){const pt=ve.aabb.intersects(j);if(pt===0)continue;Ze=pt===2}const $e=a.terrain?N:V,rt=ve.aabb.distanceX($e),nt=ve.aabb.distanceY($e),ct=Math.max(Math.abs(rt),Math.abs(nt));if(ve.zoom===Ce||ct>he+(1<=$){const pt=Ce-ve.zoom,un=N[0]-.5-(De<>1),Ht=ve.zoom+1;let cn=ve.aabb.quadrant(pt);if(a.terrain){const kn=new l.Q(Ht,ve.wrap,Ht,un,gt),Jt=a.terrain.getMinMaxElevation(kn),mn=(f=Jt.minElevation)!==null&&f!==void 0?f:this.elevation,bn=(m=Jt.maxElevation)!==null&&m!==void 0?m:this.elevation;cn=new sl([cn.min[0],cn.min[1],mn],[cn.max[0],cn.max[1],bn])}ge.push({aabb:cn,zoom:Ht,x:un,y:gt,wrap:ve.wrap,fullyVisible:Ze})}}return re.sort((ve,De)=>ve.distanceSq-De.distanceSq).map(ve=>ve.tileID)}resize(a,f){this.width=a,this.height=f,this.pixelsToGLUnits=[2/a,-2/f],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(a){return Math.pow(2,a)}scaleZoom(a){return Math.log(a)/Math.LN2}project(a){const f=l.ac(a.lat,-85.051129,Rp);return new l.P(l.N(a.lng)*this.worldSize,l.O(f)*this.worldSize)}unproject(a){return new l.Y(a.x/this.worldSize,a.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}getCameraPosition(){return{lngLat:this.pointLocation(this.getCameraPoint()),altitude:Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter+this.elevation}}recalculateZoom(a){const f=this.elevation,m=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,g=this.pointLocation(this.centerPoint,a),b=a.getElevationForLngLatZoom(g,this.tileZoom);if(!(this.elevation-b))return;const T=m+f-b,L=Math.cos(this._pitch)*this.cameraToCenterDistance/T/l.b3(1,g.lat),k=this.scaleZoom(L/this.tileSize);this._elevation=b,this._center=g,this.zoom=k}setLocationAtPoint(a,f){const m=this.pointCoordinate(f),g=this.pointCoordinate(this.centerPoint),b=this.locationCoordinate(a),T=new l.Y(b.x-(m.x-g.x),b.y-(m.y-g.y));this.center=this.coordinateLocation(T),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(a,f){return f?this.coordinatePoint(this.locationCoordinate(a),f.getElevationForLngLatZoom(a,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(a))}pointLocation(a,f){return this.coordinateLocation(this.pointCoordinate(a,f))}locationCoordinate(a){return l.Y.fromLngLat(a)}coordinateLocation(a){return a&&a.toLngLat()}pointCoordinate(a,f){if(f){const $=f.pointCoordinate(a);if($!=null)return $}const m=[a.x,a.y,0,1],g=[a.x,a.y,1,1];l.af(m,m,this.pixelMatrixInverse),l.af(g,g,this.pixelMatrixInverse);const b=m[3],T=g[3],L=m[1]/b,k=g[1]/T,N=m[2]/b,V=g[2]/T,j=N===V?0:(0-N)/(V-N);return new l.Y(l.z.number(m[0]/b,g[0]/T,j)/this.worldSize,l.z.number(L,k,j)/this.worldSize)}coordinatePoint(a,f=0,m=this.pixelMatrix){const g=[a.x*this.worldSize,a.y*this.worldSize,f,1];return l.af(g,g,m),new l.P(g[0]/g[3],g[1]/g[3])}getBounds(){const a=Math.max(0,this.height/2-this.getHorizon());return new Me().extend(this.pointLocation(new l.P(0,a))).extend(this.pointLocation(new l.P(this.width,a))).extend(this.pointLocation(new l.P(this.width,this.height))).extend(this.pointLocation(new l.P(0,this.height)))}getMaxBounds(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new Me([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}getHorizon(){return Math.tan(Math.PI/2-this._pitch)*this.cameraToCenterDistance*.85}setMaxBounds(a){a?(this.lngRange=[a.getWest(),a.getEast()],this.latRange=[a.getSouth(),a.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,Rp])}calculatePosMatrix(a,f=!1){const m=a.key,g=f?this._alignedPosMatrixCache:this._posMatrixCache;if(g[m])return g[m];const b=a.canonical,T=this.worldSize/this.zoomScale(b.z),L=b.x+Math.pow(2,b.z)*a.wrap,k=l.an(new Float64Array(16));return l.H(k,k,[L*T,b.y*T,0]),l.J(k,k,[T/l.W,T/l.W,1]),l.K(k,f?this.alignedProjMatrix:this.projMatrix,k),g[m]=new Float32Array(k),g[m]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(a,f){f=l.ac(+f,this.minZoom,this.maxZoom);const m={center:new l.M(a.lng,a.lat),zoom:f};let g=this.lngRange;if(!this._renderWorldCopies&&g===null){const ve=179.9999999999;g=[-ve,ve]}const b=this.tileSize*this.zoomScale(m.zoom);let T=0,L=b,k=0,N=b,V=0,j=0;const{x:$,y:he}=this.size;if(this.latRange){const ve=this.latRange;T=l.O(ve[1])*b,L=l.O(ve[0])*b,L-TL&&(Ce=L-ve)}if(g){const ve=(k+N)/2;let De=ce;this._renderWorldCopies&&(De=l.b1(ce,ve-b/2,ve+b/2));const Ve=$/2;De-VeN&&(re=N-Ve)}if(re!==void 0||Ce!==void 0){const ve=new l.P(re??ce,Ce??ge);m.center=this.unproject.call({worldSize:b},ve).wrap()}return m}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;const a=this._unmodified,{center:f,zoom:m}=this.getConstrained(this.center,this.zoom);this.center=f,this.zoom=m,this._unmodified=a,this._constraining=!1}_calcMatrices(){if(!this.height)return;const a=this.centerOffset,f=this.point.x,m=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=l.b3(1,this.center.lat)*this.worldSize;let g=l.an(new Float64Array(16));l.J(g,g,[this.width/2,-this.height/2,1]),l.H(g,g,[1,-1,0]),this.labelPlaneMatrix=g,g=l.an(new Float64Array(16)),l.J(g,g,[1,-1,1]),l.H(g,g,[-1,-1,0]),l.J(g,g,[2/this.width,2/this.height,1]),this.glCoordMatrix=g;const b=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),T=Math.min(this.elevation,this.minElevationForCurrentTile),L=b-T*this._pixelPerMeter/Math.cos(this._pitch),k=T<0?L:b,N=Math.PI/2+this._pitch,V=this._fov*(.5+a.y/this.height),j=Math.sin(V)*k/Math.sin(l.ac(Math.PI-N-V,.01,Math.PI-.01)),$=this.getHorizon(),he=2*Math.atan($/this.cameraToCenterDistance)*(.5+a.y/(2*$)),ce=Math.sin(he)*k/Math.sin(l.ac(Math.PI-N-he,.01,Math.PI-.01)),ge=Math.min(j,ce),re=1.01*(Math.cos(Math.PI/2-this._pitch)*ge+k),Ce=this.height/50;g=new Float64Array(16),l.b4(g,this._fov,this.width/this.height,Ce,re),g[8]=2*-a.x/this.width,g[9]=2*a.y/this.height,l.J(g,g,[1,-1,1]),l.H(g,g,[0,0,-this.cameraToCenterDistance]),l.b5(g,g,this._pitch),l.ad(g,g,this.angle),l.H(g,g,[-f,-m,0]),this.mercatorMatrix=l.J([],g,[this.worldSize,this.worldSize,this.worldSize]),l.J(g,g,[1,1,this._pixelPerMeter]),this.pixelMatrix=l.K(new Float64Array(16),this.labelPlaneMatrix,g),l.H(g,g,[0,0,-this.elevation]),this.projMatrix=g,this.invProjMatrix=l.ar([],g),this.pixelMatrix3D=l.K(new Float64Array(16),this.labelPlaneMatrix,g);const Be=this.width%2/2,ve=this.height%2/2,De=Math.cos(this.angle),Ve=Math.sin(this.angle),Ze=f-Math.round(f)+De*Be+Ve*ve,$e=m-Math.round(m)+De*ve+Ve*Be,rt=new Float64Array(g);if(l.H(rt,rt,[Ze>.5?Ze-1:Ze,$e>.5?$e-1:$e,0]),this.alignedProjMatrix=rt,g=l.ar(new Float64Array(16),this.pixelMatrix),!g)throw new Error("failed to invert matrix");this.pixelMatrixInverse=g,this._posMatrixCache={},this._alignedPosMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;const a=this.pointCoordinate(new l.P(0,0)),f=[a.x*this.worldSize,a.y*this.worldSize,0,1];return l.af(f,f,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){const a=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new l.P(0,a))}getCameraQueryGeometry(a){const f=this.getCameraPoint();if(a.length===1)return[a[0],f];{let m=f.x,g=f.y,b=f.x,T=f.y;for(const L of a)m=Math.min(m,L.x),g=Math.min(g,L.y),b=Math.max(b,L.x),T=Math.max(T,L.y);return[new l.P(m,g),new l.P(b,g),new l.P(b,T),new l.P(m,T),new l.P(m,g)]}}lngLatToCameraDepth(a,f){const m=this.locationCoordinate(a),g=[m.x*this.worldSize,m.y*this.worldSize,f,1];return l.af(g,g,this.projMatrix),g[2]/g[3]}}function Np(y,a){let f,m=!1,g=null,b=null;const T=()=>{g=null,m&&(y.apply(b,f),g=setTimeout(T,a),m=!1)};return(...L)=>(m=!0,b=this,f=L,g||T(),g)}class Op{constructor(a){this._getCurrentHash=()=>{const f=window.location.hash.replace("#","");if(this._hashName){let m;return f.split("&").map(g=>g.split("=")).forEach(g=>{g[0]===this._hashName&&(m=g)}),(m&&m[1]||"").split("/")}return f.split("/")},this._onHashChange=()=>{const f=this._getCurrentHash();if(f.length>=3&&!f.some(m=>isNaN(m))){const m=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(f[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+f[2],+f[1]],zoom:+f[0],bearing:m,pitch:+(f[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{const f=window.location.href.replace(/(#.+)?$/,this.getHashString());try{window.history.replaceState(window.history.state,null,f)}catch{}},this._updateHash=Np(this._updateHashUnthrottled,300),this._hashName=a&&encodeURIComponent(a)}addTo(a){return this._map=a,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this}getHashString(a){const f=this._map.getCenter(),m=Math.round(100*this._map.getZoom())/100,g=Math.ceil((m*Math.LN2+Math.log(512/360/.5))/Math.LN10),b=Math.pow(10,g),T=Math.round(f.lng*b)/b,L=Math.round(f.lat*b)/b,k=this._map.getBearing(),N=this._map.getPitch();let V="";if(V+=a?`/${T}/${L}/${m}`:`${m}/${L}/${T}`,(k||N)&&(V+="/"+Math.round(10*k)/10),N&&(V+=`/${Math.round(N)}`),this._hashName){const j=this._hashName;let $=!1;const he=window.location.hash.slice(1).split("&").map(ce=>{const ge=ce.split("=")[0];return ge===j?($=!0,`${ge}=${V}`):ce}).filter(ce=>ce);return $||he.push(`${j}=${V}`),`#${he.join("&")}`}return`#${V}`}}const Tc={linearity:.3,easing:l.b6(0,0,.3,1)},Gl=l.e({deceleration:2500,maxSpeed:1400},Tc),eg=l.e({deceleration:20,maxSpeed:1400},Tc),tg=l.e({deceleration:1e3,maxSpeed:360},Tc),ng=l.e({deceleration:1e3,maxSpeed:90},Tc);class rg{constructor(a){this._map=a,this.clear()}clear(){this._inertiaBuffer=[]}record(a){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:E.now(),settings:a})}_drainInertiaBuffer(){const a=this._inertiaBuffer,f=E.now();for(;a.length>0&&f-a[0].time>160;)a.shift()}_onMoveEnd(a){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const f={zoom:0,bearing:0,pitch:0,pan:new l.P(0,0),pinchAround:void 0,around:void 0};for(const{settings:b}of this._inertiaBuffer)f.zoom+=b.zoomDelta||0,f.bearing+=b.bearingDelta||0,f.pitch+=b.pitchDelta||0,b.panDelta&&f.pan._add(b.panDelta),b.around&&(f.around=b.around),b.pinchAround&&(f.pinchAround=b.pinchAround);const m=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,g={};if(f.pan.mag()){const b=Pc(f.pan.mag(),m,l.e({},Gl,a||{}));g.offset=f.pan.mult(b.amount/f.pan.mag()),g.center=this._map.transform.center,Lc(g,b)}if(f.zoom){const b=Pc(f.zoom,m,eg);g.zoom=this._map.transform.zoom+b.amount,Lc(g,b)}if(f.bearing){const b=Pc(f.bearing,m,tg);g.bearing=this._map.transform.bearing+l.ac(b.amount,-179,179),Lc(g,b)}if(f.pitch){const b=Pc(f.pitch,m,ng);g.pitch=this._map.transform.pitch+b.amount,Lc(g,b)}if(g.zoom||g.bearing){const b=f.pinchAround===void 0?f.around:f.pinchAround;g.around=b?this._map.unproject(b):this._map.getCenter()}return this.clear(),l.e(g,{noMoveStart:!0})}}function Lc(y,a){(!y.duration||y.durationf.unproject(k)),L=b.reduce((k,N,V,j)=>k.add(N.div(j.length)),new l.P(0,0));super(a,{points:b,point:L,lngLats:T,lngLat:f.unproject(L),originalEvent:m}),this._defaultPrevented=!1}}class zp extends l.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(a,f,m){super(a,{originalEvent:m}),this._defaultPrevented=!1}}class Ls{constructor(a,f){this._map=a,this._clickTolerance=f.clickTolerance}reset(){delete this._mousedownPos}wheel(a){return this._firePreventable(new zp(a.type,this._map,a))}mousedown(a,f){return this._mousedownPos=f,this._firePreventable(new Co(a.type,this._map,a))}mouseup(a){this._map.fire(new Co(a.type,this._map,a))}click(a,f){this._mousedownPos&&this._mousedownPos.dist(f)>=this._clickTolerance||this._map.fire(new Co(a.type,this._map,a))}dblclick(a){return this._firePreventable(new Co(a.type,this._map,a))}mouseover(a){this._map.fire(new Co(a.type,this._map,a))}mouseout(a){this._map.fire(new Co(a.type,this._map,a))}touchstart(a){return this._firePreventable(new ea(a.type,this._map,a))}touchmove(a){this._map.fire(new ea(a.type,this._map,a))}touchend(a){this._map.fire(new ea(a.type,this._map,a))}touchcancel(a){this._map.fire(new ea(a.type,this._map,a))}_firePreventable(a){if(this._map.fire(a),a.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class ta{constructor(a){this._map=a}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(a){this._map.fire(new Co(a.type,this._map,a))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Co("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(a){this._delayContextMenu?this._contextMenuEvent=a:this._ignoreContextMenu||this._map.fire(new Co(a.type,this._map,a)),this._map.listens("contextmenu")&&a.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Pu{constructor(a){this._map=a}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(a){return this.transform.pointLocation(l.P.convert(a),this._map.terrain)}}class Ps{constructor(a,f){this._map=a,this._tr=new Pu(a),this._el=a.getCanvasContainer(),this._container=a.getContainer(),this._clickTolerance=f.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(a,f){this.isEnabled()&&a.shiftKey&&a.button===0&&(C.disableDrag(),this._startPos=this._lastPos=f,this._active=!0)}mousemoveWindow(a,f){if(!this._active)return;const m=f;if(this._lastPos.equals(m)||!this._box&&m.dist(this._startPos)b.fitScreenCoordinates(m,g,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",a)}keydown(a){this._active&&a.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",a))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(C.remove(this._box),this._box=null),C.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(a,f){return this._map.fire(new l.k(a,{originalEvent:f}))}}function ql(y,a){if(y.length!==a.length)throw new Error(`The number of touches and points are not equal - touches ${y.length}, points ${a.length}`);const f={};for(let m=0;mthis.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=a.timeStamp),m.length===this.numTouches&&(this.centroid=function(g){const b=new l.P(0,0);for(const T of g)b._add(T);return b.div(g.length)}(f),this.touches=ql(m,f)))}touchmove(a,f,m){if(this.aborted||!this.centroid)return;const g=ql(m,f);for(const b in this.touches){const T=g[b];(!T||T.dist(this.touches[b])>30)&&(this.aborted=!0)}}touchend(a,f,m){if((!this.centroid||a.timeStamp-this.startTime>500)&&(this.aborted=!0),m.length===0){const g=!this.aborted&&this.centroid;if(this.reset(),g)return g}}}class Fp{constructor(a){this.singleTap=new Zy(a),this.numTaps=a.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(a,f,m){this.singleTap.touchstart(a,f,m)}touchmove(a,f,m){this.singleTap.touchmove(a,f,m)}touchend(a,f,m){const g=this.singleTap.touchend(a,f,m);if(g){const b=a.timeStamp-this.lastTime<500,T=!this.lastTap||this.lastTap.dist(g)<30;if(b&&T||this.reset(),this.count++,this.lastTime=a.timeStamp,this.lastTap=g,this.count===this.numTaps)return this.reset(),g}}}class Xy{constructor(a){this._tr=new Pu(a),this._zoomIn=new Fp({numTouches:1,numTaps:2}),this._zoomOut=new Fp({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(a,f,m){this._zoomIn.touchstart(a,f,m),this._zoomOut.touchstart(a,f,m)}touchmove(a,f,m){this._zoomIn.touchmove(a,f,m),this._zoomOut.touchmove(a,f,m)}touchend(a,f,m){const g=this._zoomIn.touchend(a,f,m),b=this._zoomOut.touchend(a,f,m),T=this._tr;return g?(this._active=!0,a.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:L=>L.easeTo({duration:300,zoom:T.zoom+1,around:T.unproject(g)},{originalEvent:a})}):b?(this._active=!0,a.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:L=>L.easeTo({duration:300,zoom:T.zoom-1,around:T.unproject(b)},{originalEvent:a})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Mu{constructor(a){this._enabled=!!a.enable,this._moveStateManager=a.moveStateManager,this._clickTolerance=a.clickTolerance||1,this._moveFunction=a.move,this._activateOnStart=!!a.activateOnStart,a.assignEvents(this),this.reset()}reset(a){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(a)}_move(...a){const f=this._moveFunction(...a);if(f.bearingDelta||f.pitchDelta||f.around||f.panDelta)return this._active=!0,f}dragStart(a,f){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(a)&&(this._moveStateManager.startMove(a),this._lastPoint=f.length?f[0]:f,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(a,f){if(!this.isEnabled())return;const m=this._lastPoint;if(!m)return;if(a.preventDefault(),!this._moveStateManager.isValidMoveEvent(a))return void this.reset(a);const g=f.length?f[0]:f;return!this._moved&&g.dist(m){y.mousedown=y.dragStart,y.mousemoveWindow=y.dragMove,y.mouseup=y.dragEnd,y.contextmenu=function(a){a.preventDefault()}},Au=({enable:y,clickTolerance:a,bearingDegreesPerPixelMoved:f=.8})=>{const m=new na({checkCorrectEvent:g=>C.mouseButton(g)===0&&g.ctrlKey||C.mouseButton(g)===2});return new Mu({clickTolerance:a,move:(g,b)=>({bearingDelta:(b.x-g.x)*f}),moveStateManager:m,enable:y,assignEvents:jh})},ku=({enable:y,clickTolerance:a,pitchDegreesPerPixelMoved:f=-.5})=>{const m=new na({checkCorrectEvent:g=>C.mouseButton(g)===0&&g.ctrlKey||C.mouseButton(g)===2});return new Mu({clickTolerance:a,move:(g,b)=>({pitchDelta:(b.y-g.y)*f}),moveStateManager:m,enable:y,assignEvents:jh})};class ig{constructor(a,f){this._clickTolerance=a.clickTolerance||1,this._map=f,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new l.P(0,0)}minTouchs(){return this._map.cooperativeGestures.isEnabled()?2:1}touchstart(a,f,m){return this._calculateTransform(a,f,m)}touchmove(a,f,m){if(this._active&&!(m.length0&&(this._active=!0);const g=ql(m,f),b=new l.P(0,0),T=new l.P(0,0);let L=0;for(const N in g){const V=g[N],j=this._touches[N];j&&(b._add(V),T._add(V.sub(j)),L++,g[N]=V)}if(this._touches=g,LMath.abs(y.x)}class ag extends xt{constructor(a){super(),this._currentTouchCount=0,this._map=a}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(a,f,m){super.touchstart(a,f,m),this._currentTouchCount=m.length}_start(a){this._lastPoints=a,qh(a[0].sub(a[1]))&&(this._valid=!1)}_move(a,f,m){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;const g=a[0].sub(this._lastPoints[0]),b=a[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(g,b,m.timeStamp),this._valid?(this._lastPoints=a,this._active=!0,{pitchDelta:(g.y+b.y)/2*-.5}):void 0}gestureBeginsVertically(a,f,m){if(this._valid!==void 0)return this._valid;const g=a.mag()>=2,b=f.mag()>=2;if(!g&&!b)return;if(!g||!b)return this._firstMove===void 0&&(this._firstMove=m),m-this._firstMove<100&&void 0;const T=a.y>0==f.y>0;return qh(a)&&qh(f)&&T}}const Yy={panStep:100,bearingStep:15,pitchStep:10};class al{constructor(a){this._tr=new Pu(a);const f=Yy;this._panStep=f.panStep,this._bearingStep=f.bearingStep,this._pitchStep=f.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(a){if(a.altKey||a.ctrlKey||a.metaKey)return;let f=0,m=0,g=0,b=0,T=0;switch(a.keyCode){case 61:case 107:case 171:case 187:f=1;break;case 189:case 109:case 173:f=-1;break;case 37:a.shiftKey?m=-1:(a.preventDefault(),b=-1);break;case 39:a.shiftKey?m=1:(a.preventDefault(),b=1);break;case 38:a.shiftKey?g=1:(a.preventDefault(),T=-1);break;case 40:a.shiftKey?g=-1:(a.preventDefault(),T=1);break;default:return}return this._rotationDisabled&&(m=0,g=0),{cameraAnimation:L=>{const k=this._tr;L.easeTo({duration:300,easeId:"keyboardHandler",easing:br,zoom:f?Math.round(k.zoom)+f*(a.shiftKey?2:1):k.zoom,bearing:k.bearing+m*this._bearingStep,pitch:k.pitch+g*this._pitchStep,offset:[-b*this._panStep,-T*this._panStep],center:k.center},{originalEvent:a})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function br(y){return y*(2-y)}const Ac=4.000244140625;class Wh{constructor(a,f){this._onTimeout=m=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(m)},this._map=a,this._tr=new Pu(a),this._triggerRenderFrame=f,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(a){this._defaultZoomRate=a}setWheelZoomRate(a){this._wheelZoomRate=a}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(a){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!a&&a.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}wheel(a){if(!this.isEnabled()||this._map.cooperativeGestures.isEnabled()&&!a[this._map.cooperativeGestures._bypassKey])return;let f=a.deltaMode===WheelEvent.DOM_DELTA_LINE?40*a.deltaY:a.deltaY;const m=E.now(),g=m-(this._lastWheelEventTime||0);this._lastWheelEventTime=m,f!==0&&f%Ac==0?this._type="wheel":f!==0&&Math.abs(f)<4?this._type="trackpad":g>400?(this._type=null,this._lastValue=f,this._timeout=setTimeout(this._onTimeout,40,a)):this._type||(this._type=Math.abs(g*f)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,f+=this._lastValue)),a.shiftKey&&f&&(f/=4),this._type&&(this._lastWheelEvent=a,this._delta-=f,this._active||this._start(a)),a.preventDefault()}_start(a){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);const f=C.mousePos(this._map.getCanvas(),a),m=this._tr;this._around=f.y>m.transform.height/2-m.transform.getHorizon()?l.M.convert(this._aroundCenter?m.center:m.unproject(f)):l.M.convert(m.center),this._aroundPoint=m.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;const a=this._tr.transform;if(this._delta!==0){const L=this._type==="wheel"&&Math.abs(this._delta)>Ac?this._wheelZoomRate:this._defaultZoomRate;let k=2/(1+Math.exp(-Math.abs(this._delta*L)));this._delta<0&&k!==0&&(k=1/k);const N=typeof this._targetZoom=="number"?a.zoomScale(this._targetZoom):a.scale;this._targetZoom=Math.min(a.maxZoom,Math.max(a.minZoom,a.scaleZoom(N*k))),this._type==="wheel"&&(this._startZoom=a.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const f=typeof this._targetZoom=="number"?this._targetZoom:a.zoom,m=this._startZoom,g=this._easing;let b,T=!1;if(this._type==="wheel"&&m&&g){const L=Math.min((E.now()-this._lastWheelEventTime)/200,1),k=g(L);b=l.z.number(m,f,k),L<1?this._frameId||(this._frameId=!0):T=!0}else b=f,T=!0;return this._active=!0,T&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!T,zoomDelta:b-a.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(a){let f=l.b7;if(this._prevEase){const m=this._prevEase,g=(E.now()-m.start)/m.duration,b=m.easing(g+.01)-m.easing(g),T=.27/Math.sqrt(b*b+1e-4)*.01,L=Math.sqrt(.0729-T*T);f=l.b6(T,L,.25,1)}return this._prevEase={start:E.now(),duration:a,easing:f},f}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class Vp{constructor(a,f){this._clickZoom=a,this._tapZoom=f}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class lg{constructor(a){this._tr=new Pu(a),this.reset()}reset(){this._active=!1}dblclick(a,f){return a.preventDefault(),{cameraAnimation:m=>{m.easeTo({duration:300,zoom:this._tr.zoom+(a.shiftKey?-1:1),around:this._tr.unproject(f)},{originalEvent:a})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class ug{constructor(){this._tap=new Fp({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(a,f,m){if(!this._swipePoint)if(this._tapTime){const g=f[0],b=a.timeStamp-this._tapTime<500,T=this._tapPoint.dist(g)<30;b&&T?m.length>0&&(this._swipePoint=g,this._swipeTouch=m[0].identifier):this.reset()}else this._tap.touchstart(a,f,m)}touchmove(a,f,m){if(this._tapTime){if(this._swipePoint){if(m[0].identifier!==this._swipeTouch)return;const g=f[0],b=g.y-this._swipePoint.y;return this._swipePoint=g,a.preventDefault(),this._active=!0,{zoomDelta:b/128}}}else this._tap.touchmove(a,f,m)}touchend(a,f,m){if(this._tapTime)this._swipePoint&&m.length===0&&this.reset();else{const g=this._tap.touchend(a,f,m);g&&(this._tapTime=a.timeStamp,this._tapPoint=g)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class cg{constructor(a,f,m){this._el=a,this._mousePan=f,this._touchPan=m}enable(a){this._inertiaOptions=a||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class Ms{constructor(a,f,m){this._pitchWithRotate=a.pitchWithRotate,this._mouseRotate=f,this._mousePitch=m}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()}}class kc{constructor(a,f,m,g){this._el=a,this._touchZoom=f,this._touchRotate=m,this._tapDragZoom=g,this._rotationDisabled=!1,this._enabled=!0}enable(a){this._touchZoom.enable(a),this._rotationDisabled||this._touchRotate.enable(a),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class Nt{constructor(a,f){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=a,this._options=f,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;const a=this._map.getCanvasContainer();a.classList.add("maplibregl-cooperative-gestures"),this._container=C.create("div","maplibregl-cooperative-gesture-screen",a);let f=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(f=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));const m=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),g=document.createElement("div");g.className="maplibregl-desktop-message",g.textContent=f,this._container.appendChild(g);const b=document.createElement("div");b.className="maplibregl-mobile-message",b.textContent=m,this._container.appendChild(b),this._container.setAttribute("aria-hidden","true")}_destoryUI(){this._container&&(C.remove(this._container),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destoryUI()}isEnabled(){return this._enabled}touchmove(a){this._onCooperativeGesture(a.touches.length===1)}wheel(a){this._map.scrollZoom.isEnabled()&&this._onCooperativeGesture(!a[this._bypassKey])}_onCooperativeGesture(a){this._enabled&&a&&(this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}const qt=y=>y.zoom||y.drag||y.pitch||y.rotate;class Hh extends l.k{}function Dc(y){return y.panDelta&&y.panDelta.mag()||y.zoomDelta||y.bearingDelta||y.pitchDelta}class Up{constructor(a,f){this.handleWindowEvent=g=>{this.handleEvent(g,`${g.type}Window`)},this.handleEvent=(g,b)=>{if(g.type==="blur")return void this.stop(!0);this._updatingCamera=!0;const T=g.type==="renderFrame"?void 0:g,L={needsRenderFrame:!1},k={},N={},V=g.touches,j=V?this._getMapTouches(V):void 0,$=j?C.touchPos(this._map.getCanvas(),j):C.mousePos(this._map.getCanvas(),g);for(const{handlerName:ge,handler:re,allowed:Ce}of this._handlers){if(!re.isEnabled())continue;let Be;this._blockedByActive(N,Ce,ge)?re.reset():re[b||g.type]&&(Be=re[b||g.type](g,$,j),this.mergeHandlerResult(L,k,Be,ge,T),Be&&Be.needsRenderFrame&&this._triggerRenderFrame()),(Be||re.isActive())&&(N[ge]=re)}const he={};for(const ge in this._previousActiveHandlers)N[ge]||(he[ge]=T);this._previousActiveHandlers=N,(Object.keys(he).length||Dc(L))&&(this._changes.push([L,k,he]),this._triggerRenderFrame()),(Object.keys(N).length||Dc(L))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:ce}=L;ce&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],ce(this._map))},this._map=a,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new rg(a),this._bearingSnap=f.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(f);const m=this._el;this._listeners=[[m,"touchstart",{passive:!0}],[m,"touchmove",{passive:!1}],[m,"touchend",void 0],[m,"touchcancel",void 0],[m,"mousedown",void 0],[m,"mousemove",void 0],[m,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[m,"mouseover",void 0],[m,"mouseout",void 0],[m,"dblclick",void 0],[m,"click",void 0],[m,"keydown",{capture:!1}],[m,"keyup",void 0],[m,"wheel",{passive:!1}],[m,"contextmenu",void 0],[window,"blur",void 0]];for(const[g,b,T]of this._listeners)C.addEventListener(g,b,g===document?this.handleWindowEvent:this.handleEvent,T)}destroy(){for(const[a,f,m]of this._listeners)C.removeEventListener(a,f,a===document?this.handleWindowEvent:this.handleEvent,m)}_addDefaultHandlers(a){const f=this._map,m=f.getCanvasContainer();this._add("mapEvent",new Ls(f,a));const g=f.boxZoom=new Ps(f,a);this._add("boxZoom",g),a.interactive&&a.boxZoom&&g.enable();const b=f.cooperativeGestures=new Nt(f,a.cooperativeGestures);this._add("cooperativeGestures",b),a.cooperativeGestures&&b.enable();const T=new Xy(f),L=new lg(f);f.doubleClickZoom=new Vp(L,T),this._add("tapZoom",T),this._add("clickZoom",L),a.interactive&&a.doubleClickZoom&&f.doubleClickZoom.enable();const k=new ug;this._add("tapDragZoom",k);const N=f.touchPitch=new ag(f);this._add("touchPitch",N),a.interactive&&a.touchPitch&&f.touchPitch.enable(a.touchPitch);const V=Au(a),j=ku(a);f.dragRotate=new Ms(a,V,j),this._add("mouseRotate",V,["mousePitch"]),this._add("mousePitch",j,["mouseRotate"]),a.interactive&&a.dragRotate&&f.dragRotate.enable();const $=(({enable:Be,clickTolerance:ve})=>{const De=new na({checkCorrectEvent:Ve=>C.mouseButton(Ve)===0&&!Ve.ctrlKey});return new Mu({clickTolerance:ve,move:(Ve,Ze)=>({around:Ze,panDelta:Ze.sub(Ve)}),activateOnStart:!0,moveStateManager:De,enable:Be,assignEvents:jh})})(a),he=new ig(a,f);f.dragPan=new cg(m,$,he),this._add("mousePan",$),this._add("touchPan",he,["touchZoom","touchRotate"]),a.interactive&&a.dragPan&&f.dragPan.enable(a.dragPan);const ce=new Bp,ge=new sg;f.touchZoomRotate=new kc(m,ge,ce,k),this._add("touchRotate",ce,["touchPan","touchZoom"]),this._add("touchZoom",ge,["touchPan","touchRotate"]),a.interactive&&a.touchZoomRotate&&f.touchZoomRotate.enable(a.touchZoomRotate);const re=f.scrollZoom=new Wh(f,()=>this._triggerRenderFrame());this._add("scrollZoom",re,["mousePan"]),a.interactive&&a.scrollZoom&&f.scrollZoom.enable(a.scrollZoom);const Ce=f.keyboard=new al(f);this._add("keyboard",Ce),a.interactive&&a.keyboard&&f.keyboard.enable(),this._add("blockableMapEvent",new ta(f))}_add(a,f,m){this._handlers.push({handlerName:a,handler:f,allowed:m}),this._handlersById[a]=f}stop(a){if(!this._updatingCamera){for(const{handler:f}of this._handlers)f.reset();this._inertia.clear(),this._fireEvents({},{},a),this._changes=[]}}isActive(){for(const{handler:a}of this._handlers)if(a.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!qt(this._eventsInProgress)||this.isZooming()}_blockedByActive(a,f,m){for(const g in a)if(g!==m&&(!f||f.indexOf(g)<0))return!0;return!1}_getMapTouches(a){const f=[];for(const m of a)this._el.contains(m.target)&&f.push(m);return f}mergeHandlerResult(a,f,m,g,b){if(!m)return;l.e(a,m);const T={handlerName:g,originalEvent:m.originalEvent||b};m.zoomDelta!==void 0&&(f.zoom=T),m.panDelta!==void 0&&(f.drag=T),m.pitchDelta!==void 0&&(f.pitch=T),m.bearingDelta!==void 0&&(f.rotate=T)}_applyChanges(){const a={},f={},m={};for(const[g,b,T]of this._changes)g.panDelta&&(a.panDelta=(a.panDelta||new l.P(0,0))._add(g.panDelta)),g.zoomDelta&&(a.zoomDelta=(a.zoomDelta||0)+g.zoomDelta),g.bearingDelta&&(a.bearingDelta=(a.bearingDelta||0)+g.bearingDelta),g.pitchDelta&&(a.pitchDelta=(a.pitchDelta||0)+g.pitchDelta),g.around!==void 0&&(a.around=g.around),g.pinchAround!==void 0&&(a.pinchAround=g.pinchAround),g.noInertia&&(a.noInertia=g.noInertia),l.e(f,b),l.e(m,T);this._updateMapTransform(a,f,m),this._changes=[]}_updateMapTransform(a,f,m){const g=this._map,b=g._getTransformForUpdate(),T=g.terrain;if(!(Dc(a)||T&&this._terrainMovement))return this._fireEvents(f,m,!0);let{panDelta:L,zoomDelta:k,bearingDelta:N,pitchDelta:V,around:j,pinchAround:$}=a;$!==void 0&&(j=$),g._stop(!0),j=j||g.transform.centerPoint;const he=b.pointLocation(L?j.sub(L):j);N&&(b.bearing+=N),V&&(b.pitch+=V),k&&(b.zoom+=k),T?this._terrainMovement||!f.drag&&!f.zoom?f.drag&&this._terrainMovement?b.center=b.pointLocation(b.centerPoint.sub(L)):b.setLocationAtPoint(he,j):(this._terrainMovement=!0,this._map._elevationFreeze=!0,b.setLocationAtPoint(he,j),this._map.once("moveend",()=>{this._map._elevationFreeze=!1,this._terrainMovement=!1,b.recalculateZoom(g.terrain)})):b.setLocationAtPoint(he,j),g._applyUpdatedTransform(b),this._map._update(),a.noInertia||this._inertia.record(a),this._fireEvents(f,m,!0)}_fireEvents(a,f,m){const g=qt(this._eventsInProgress),b=qt(a),T={};for(const V in a){const{originalEvent:j}=a[V];this._eventsInProgress[V]||(T[`${V}start`]=j),this._eventsInProgress[V]=a[V]}!g&&b&&this._fireEvent("movestart",b.originalEvent);for(const V in T)this._fireEvent(V,T[V]);b&&this._fireEvent("move",b.originalEvent);for(const V in a){const{originalEvent:j}=a[V];this._fireEvent(V,j)}const L={};let k;for(const V in this._eventsInProgress){const{handlerName:j,originalEvent:$}=this._eventsInProgress[V];this._handlersById[j].isActive()||(delete this._eventsInProgress[V],k=f[j]||$,L[`${V}end`]=k)}for(const V in L)this._fireEvent(V,L[V]);const N=qt(this._eventsInProgress);if(m&&(g||b)&&!N){this._updatingCamera=!0;const V=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),j=$=>$!==0&&-this._bearingSnap<$&&${delete this._frameId,this.handleEvent(new Hh("renderFrame",{timeStamp:a})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class To extends l.E{constructor(a,f){super(),this._renderFrameCallback=()=>{const m=Math.min((E.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(m)),m<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=a,this._bearingSnap=f.bearingSnap,this.on("moveend",()=>{delete this._requestedCameraState})}getCenter(){return new l.M(this.transform.center.lng,this.transform.center.lat)}setCenter(a,f){return this.jumpTo({center:a},f)}panBy(a,f,m){return a=l.P.convert(a).mult(-1),this.panTo(this.transform.center,l.e({offset:a},f),m)}panTo(a,f,m){return this.easeTo(l.e({center:a},f),m)}getZoom(){return this.transform.zoom}setZoom(a,f){return this.jumpTo({zoom:a},f),this}zoomTo(a,f,m){return this.easeTo(l.e({zoom:a},f),m)}zoomIn(a,f){return this.zoomTo(this.getZoom()+1,a,f),this}zoomOut(a,f){return this.zoomTo(this.getZoom()-1,a,f),this}getBearing(){return this.transform.bearing}setBearing(a,f){return this.jumpTo({bearing:a},f),this}getPadding(){return this.transform.padding}setPadding(a,f){return this.jumpTo({padding:a},f),this}rotateTo(a,f,m){return this.easeTo(l.e({bearing:a},f),m)}resetNorth(a,f){return this.rotateTo(0,l.e({duration:1e3},a),f),this}resetNorthPitch(a,f){return this.easeTo(l.e({bearing:0,pitch:0,duration:1e3},a),f),this}snapToNorth(a,f){return Math.abs(this.getBearing()){if(this._zooming&&(g.zoom=l.z.number(b,re,$e)),this._rotating&&(g.bearing=l.z.number(T,N,$e)),this._pitching&&(g.pitch=l.z.number(L,V,$e)),this._padding&&(g.interpolatePadding(k,j,$e),he=g.centerPoint.add($)),this.terrain&&!a.freezeElevation&&this._updateElevation($e),De)g.setLocationAtPoint(De,Ve);else{const rt=g.zoomScale(g.zoom-b),nt=re>b?Math.min(2,ve):Math.max(.5,ve),ct=Math.pow(nt,1-$e),pt=g.unproject(Ce.add(Be.mult($e*ct)).mult(rt));g.setLocationAtPoint(g.renderWorldCopies?pt.wrap():pt,he)}this._applyUpdatedTransform(g),this._fireMoveEvents(f)},$e=>{this.terrain&&this._finalizeElevation(),this._afterEase(f,$e)},a),this}_prepareEase(a,f,m={}){this._moving=!0,f||m.moving||this.fire(new l.k("movestart",a)),this._zooming&&!m.zooming&&this.fire(new l.k("zoomstart",a)),this._rotating&&!m.rotating&&this.fire(new l.k("rotatestart",a)),this._pitching&&!m.pitching&&this.fire(new l.k("pitchstart",a))}_prepareElevation(a){this._elevationCenter=a,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(a,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(a){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);const f=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(a<1&&f!==this._elevationTarget){const m=this._elevationTarget-this._elevationStart;this._elevationStart+=a*(m-(f-(m*a+this._elevationStart))/(1-a)),this._elevationTarget=f}this.transform.elevation=l.z.number(this._elevationStart,this._elevationTarget,a)}_finalizeElevation(){this._elevationFreeze=!1,this.transform.recalculateZoom(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_applyUpdatedTransform(a){if(!this.transformCameraUpdate)return;const f=a.clone(),{center:m,zoom:g,pitch:b,bearing:T,elevation:L}=this.transformCameraUpdate(f);m&&(f.center=m),g!==void 0&&(f.zoom=g),b!==void 0&&(f.pitch=b),T!==void 0&&(f.bearing=T),L!==void 0&&(f.elevation=L),this.transform.apply(f)}_fireMoveEvents(a){this.fire(new l.k("move",a)),this._zooming&&this.fire(new l.k("zoom",a)),this._rotating&&this.fire(new l.k("rotate",a)),this._pitching&&this.fire(new l.k("pitch",a))}_afterEase(a,f){if(this._easeId&&f&&this._easeId===f)return;delete this._easeId;const m=this._zooming,g=this._rotating,b=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,m&&this.fire(new l.k("zoomend",a)),g&&this.fire(new l.k("rotateend",a)),b&&this.fire(new l.k("pitchend",a)),this.fire(new l.k("moveend",a))}flyTo(a,f){var m;if(!a.essential&&E.prefersReducedMotion){const kn=l.L(a,["center","zoom","bearing","pitch","around"]);return this.jumpTo(kn,f)}this.stop(),a=l.e({offset:[0,0],speed:1.2,curve:1.42,easing:l.b7},a);const g=this._getTransformForUpdate(),b=this.getZoom(),T=this.getBearing(),L=this.getPitch(),k=this.getPadding(),N="bearing"in a?this._normalizeBearing(a.bearing,T):T,V="pitch"in a?+a.pitch:L,j="padding"in a?a.padding:g.padding,$=l.P.convert(a.offset);let he=g.centerPoint.add($);const ce=g.pointLocation(he),{center:ge,zoom:re}=g.getConstrained(l.M.convert(a.center||ce),(m=a.zoom)!==null&&m!==void 0?m:b);this._normalizeCenter(ge);const Ce=g.zoomScale(re-b),Be=g.project(ce),ve=g.project(ge).sub(Be);let De=a.curve;const Ve=Math.max(g.width,g.height),Ze=Ve/Ce,$e=ve.mag();if("minZoom"in a){const kn=l.ac(Math.min(a.minZoom,b,re),g.minZoom,g.maxZoom),Jt=Ve/g.zoomScale(kn-b);De=Math.sqrt(Jt/$e*2)}const rt=De*De;function nt(kn){const Jt=(Ze*Ze-Ve*Ve+(kn?-1:1)*rt*rt*$e*$e)/(2*(kn?Ze:Ve)*rt*$e);return Math.log(Math.sqrt(Jt*Jt+1)-Jt)}function ct(kn){return(Math.exp(kn)-Math.exp(-kn))/2}function pt(kn){return(Math.exp(kn)+Math.exp(-kn))/2}const un=nt(!1);let gt=function(kn){return pt(un)/pt(un+De*kn)},Ht=function(kn){return Ve*((pt(un)*(ct(Jt=un+De*kn)/pt(Jt))-ct(un))/rt)/$e;var Jt},cn=(nt(!0)-un)/De;if(Math.abs($e)<1e-6||!isFinite(cn)){if(Math.abs(Ve-Ze)<1e-6)return this.easeTo(a,f);const kn=Zea.maxDuration&&(a.duration=0),this._zooming=!0,this._rotating=T!==N,this._pitching=V!==L,this._padding=!g.isPaddingEqual(j),this._prepareEase(f,!1),this.terrain&&this._prepareElevation(ge),this._ease(kn=>{const Jt=kn*cn,mn=1/gt(Jt);g.zoom=kn===1?re:b+g.scaleZoom(mn),this._rotating&&(g.bearing=l.z.number(T,N,kn)),this._pitching&&(g.pitch=l.z.number(L,V,kn)),this._padding&&(g.interpolatePadding(k,j,kn),he=g.centerPoint.add($)),this.terrain&&!a.freezeElevation&&this._updateElevation(kn);const bn=kn===1?ge:g.unproject(Be.add(ve.mult(Ht(Jt))).mult(mn));g.setLocationAtPoint(g.renderWorldCopies?bn.wrap():bn,he),this._applyUpdatedTransform(g),this._fireMoveEvents(f)},()=>{this.terrain&&this._finalizeElevation(),this._afterEase(f)},a),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(a,f){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const m=this._onEaseEnd;delete this._onEaseEnd,m.call(this,f)}if(!a){const m=this.handlers;m&&m.stop(!1)}return this}_ease(a,f,m){m.animate===!1||m.duration===0?(a(1),f()):(this._easeStart=E.now(),this._easeOptions=m,this._onEaseFrame=a,this._onEaseEnd=f,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(a,f){a=l.b1(a,-180,180);const m=Math.abs(a-f);return Math.abs(a-360-f)180?-360:m<-180?360:0}queryTerrainElevation(a){return this.terrain?this.terrain.getElevationForLngLatZoom(l.M.convert(a),this.transform.tileZoom)-this.transform.elevation:null}}const jp={compact:!0,customAttribution:'MapLibre'};class As{constructor(a=jp){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=f=>{!f||f.sourceDataType!=="metadata"&&f.sourceDataType!=="visibility"&&f.dataType!=="style"&&f.type!=="terrain"||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=a}getDefaultPosition(){return"bottom-right"}onAdd(a){return this._map=a,this._compact=this.options.compact,this._container=C.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=C.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=C.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){C.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(a,f){const m=this._map._getUIString(`AttributionControl.${f}`);a.title=m,a.setAttribute("aria-label",m)}_updateAttributions(){if(!this._map.style)return;let a=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?a=a.concat(this.options.customAttribution.map(g=>typeof g!="string"?"":g)):typeof this.options.customAttribution=="string"&&a.push(this.options.customAttribution)),this._map.style.stylesheet){const g=this._map.style.stylesheet;this.styleOwner=g.owner,this.styleId=g.id}const f=this._map.style.sourceCaches;for(const g in f){const b=f[g];if(b.used||b.usedForTerrain){const T=b.getSource();T.attribution&&a.indexOf(T.attribution)<0&&a.push(T.attribution)}}a=a.filter(g=>String(g).trim()),a.sort((g,b)=>g.length-b.length),a=a.filter((g,b)=>{for(let T=b+1;T=0)return!1;return!0});const m=a.join(" | ");m!==this._attribHTML&&(this._attribHTML=m,a.length?(this._innerContainer.innerHTML=m,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class hg{constructor(a={}){this._updateCompact=()=>{const f=this._container.children;if(f.length){const m=f[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&m.classList.add("maplibregl-compact"):m.classList.remove("maplibregl-compact")}},this.options=a}getDefaultPosition(){return"bottom-left"}onAdd(a){this._map=a,this._compact=this.options&&this.options.compact,this._container=C.create("div","maplibregl-ctrl");const f=C.create("a","maplibregl-ctrl-logo");return f.target="_blank",f.rel="noopener nofollow",f.href="https://maplibre.org/",f.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),f.setAttribute("rel","noopener nofollow"),this._container.appendChild(f),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){C.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class Rc{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(a){const f=++this._id;return this._queue.push({callback:a,id:f,cancelled:!1}),f}remove(a){const f=this._currentlyRunning,m=f?this._queue.concat(f):this._queue;for(const g of m)if(g.id===a)return void(g.cancelled=!0)}run(a=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const f=this._currentlyRunning=this._queue;this._queue=[];for(const m of f)if(!m.cancelled&&(m.callback(a),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var Vr=l.X([{name:"a_pos3d",type:"Int16",components:3}]);class ei extends l.E{constructor(a){super(),this.sourceCache=a,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,a.usedForTerrain=!0,a.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(a,f){this.sourceCache.update(a,f),this._renderableTilesKeys=[];const m={};for(const g of a.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:f}))m[g.key]=!0,this._renderableTilesKeys.push(g.key),this._tiles[g.key]||(g.posMatrix=new Float64Array(16),l.aN(g.posMatrix,0,l.W,0,l.W,0,1),this._tiles[g.key]=new ls(g,this.tileSize));for(const g in this._tiles)m[g]||delete this._tiles[g]}freeRtt(a){for(const f in this._tiles){const m=this._tiles[f];(!a||m.tileID.equals(a)||m.tileID.isChildOf(a)||a.isChildOf(m.tileID))&&(m.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(a=>this.getTileByID(a))}getTileByID(a){return this._tiles[a]}getTerrainCoords(a){const f={};for(const m of this._renderableTilesKeys){const g=this._tiles[m].tileID;if(g.canonical.equals(a.canonical)){const b=a.clone();b.posMatrix=new Float64Array(16),l.aN(b.posMatrix,0,l.W,0,l.W,0,1),f[m]=b}else if(g.canonical.isChildOf(a.canonical)){const b=a.clone();b.posMatrix=new Float64Array(16);const T=g.canonical.z-a.canonical.z,L=g.canonical.x-(g.canonical.x>>T<>T<>T;l.aN(b.posMatrix,0,N,0,N,0,1),l.H(b.posMatrix,b.posMatrix,[-L*N,-k*N,0]),f[m]=b}else if(a.canonical.isChildOf(g.canonical)){const b=a.clone();b.posMatrix=new Float64Array(16);const T=a.canonical.z-g.canonical.z,L=a.canonical.x-(a.canonical.x>>T<>T<>T;l.aN(b.posMatrix,0,l.W,0,l.W,0,1),l.H(b.posMatrix,b.posMatrix,[L*N,k*N,0]),l.J(b.posMatrix,b.posMatrix,[1/2**T,1/2**T,0]),f[m]=b}}return f}getSourceTile(a,f){const m=this.sourceCache._source;let g=a.overscaledZ-this.deltaZoom;if(g>m.maxzoom&&(g=m.maxzoom),g=m.minzoom&&(!b||!b.dem);)b=this.sourceCache.getTileByID(a.scaledTo(g--).key);return b}tilesAfterTime(a=Date.now()){return Object.values(this._tiles).filter(f=>f.timeAdded>=a)}}class fg{constructor(a,f,m){this.painter=a,this.sourceCache=new ei(f),this.options=m,this.exaggeration=typeof m.exaggeration=="number"?m.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(a,f,m,g=l.W){var b;if(!(f>=0&&f=0&&ma.canonical.z&&(a.canonical.z>=g?b=a.canonical.z-g:l.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const T=a.canonical.x-(a.canonical.x>>b<>b<>8<<4|b>>8,f[T+3]=0;const m=new l.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(f.buffer)),g=new Y(a,m,a.gl.RGBA,{premultiply:!1});return g.bind(a.gl.NEAREST,a.gl.CLAMP_TO_EDGE),this._coordsTexture=g,g}pointCoordinate(a){this.painter.maybeDrawDepthAndCoords(!0);const f=new Uint8Array(4),m=this.painter.context,g=m.gl,b=Math.round(a.x*this.painter.pixelRatio/devicePixelRatio),T=Math.round(a.y*this.painter.pixelRatio/devicePixelRatio),L=Math.round(this.painter.height/devicePixelRatio);m.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),g.readPixels(b,L-T-1,1,1,g.RGBA,g.UNSIGNED_BYTE,f),m.bindFramebuffer.set(null);const k=f[0]+(f[2]>>4<<8),N=f[1]+((15&f[2])<<8),V=this.coordsIndex[255-f[3]],j=V&&this.sourceCache.getTileByID(V);if(!j)return null;const $=this._coordsTextureSize,he=(1<a.id!==f),this._recentlyUsed.push(a.id)}stampObject(a){a.stamp=++this._stamp}getOrCreateFreeObject(){for(const f of this._recentlyUsed)if(!this._objects[f].inUse)return this._objects[f];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");const a=this._createObject(this._objects.length);return this._objects.push(a),a}freeObject(a){a.inUse=!1}freeAllObjects(){for(const a of this._objects)this.freeObject(a)}isFull(){return!(this._objects.length!a.inUse)===!1}}const ka={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class Gp{constructor(a,f){this.painter=a,this.terrain=f,this.pool=new Nc(a.context,30,f.sourceCache.tileSize*f.qualityFactor)}destruct(){this.pool.destruct()}getTexture(a){return this.pool.getObjectForId(a.rtt[this._stacks.length-1].id).texture}prepareForRender(a,f){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=a._order.filter(m=>!a._layers[m].isHidden(f)),this._coordsDescendingInv={};for(const m in a.sourceCaches){this._coordsDescendingInv[m]={};const g=a.sourceCaches[m].getVisibleCoordinates();for(const b of g){const T=this.terrain.sourceCache.getTerrainCoords(b);for(const L in T)this._coordsDescendingInv[m][L]||(this._coordsDescendingInv[m][L]=[]),this._coordsDescendingInv[m][L].push(T[L])}}this._coordsDescendingInvStr={};for(const m of a._order){const g=a._layers[m],b=g.source;if(ka[g.type]&&!this._coordsDescendingInvStr[b]){this._coordsDescendingInvStr[b]={};for(const T in this._coordsDescendingInv[b])this._coordsDescendingInvStr[b][T]=this._coordsDescendingInv[b][T].map(L=>L.key).sort().join()}}for(const m of this._renderableTiles)for(const g in this._coordsDescendingInvStr){const b=this._coordsDescendingInvStr[g][m.tileID.key];b&&b!==m.rttCoords[g]&&(m.rtt=[])}}renderLayer(a){if(a.isHidden(this.painter.transform.zoom))return!1;const f=a.type,m=this.painter,g=this._renderableLayerIds[this._renderableLayerIds.length-1]===a.id;if(ka[f]&&(this._prevType&&ka[this._prevType]||this._stacks.push([]),this._prevType=f,this._stacks[this._stacks.length-1].push(a.id),!g))return!0;if(ka[this._prevType]||ka[f]&&g){this._prevType=f;const b=this._stacks.length-1,T=this._stacks[b]||[];for(const L of this._renderableTiles){if(this.pool.isFull()&&(Vh(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(L),L.rtt[b]){const N=this.pool.getObjectForId(L.rtt[b].id);if(N.stamp===L.rtt[b].stamp){this.pool.useObject(N);continue}}const k=this.pool.getOrCreateFreeObject();this.pool.useObject(k),this.pool.stampObject(k),L.rtt[b]={id:k.id,stamp:k.stamp},m.context.bindFramebuffer.set(k.fbo.framebuffer),m.context.clear({color:l.aO.transparent,stencil:0}),m.currentStencilSource=void 0;for(let N=0;N{y.touchstart=y.dragStart,y.touchmoveWindow=y.dragMove,y.touchend=y.dragEnd},Hp={showCompass:!0,showZoom:!0,visualizePitch:!1};class Zp{constructor(a,f,m=!1){this.mousedown=T=>{this.startMouse(l.e({},T,{ctrlKey:!0,preventDefault:()=>T.preventDefault()}),C.mousePos(this.element,T)),C.addEventListener(window,"mousemove",this.mousemove),C.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=T=>{this.moveMouse(T,C.mousePos(this.element,T))},this.mouseup=T=>{this.mouseRotate.dragEnd(T),this.mousePitch&&this.mousePitch.dragEnd(T),this.offTemp()},this.touchstart=T=>{T.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=C.touchPos(this.element,T.targetTouches)[0],this.startTouch(T,this._startPos),C.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),C.addEventListener(window,"touchend",this.touchend))},this.touchmove=T=>{T.targetTouches.length!==1?this.reset():(this._lastPos=C.touchPos(this.element,T.targetTouches)[0],this.moveTouch(T,this._lastPos))},this.touchend=T=>{T.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),this.touchRotate.reset(),this.touchPitch&&this.touchPitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10;const g=a.dragRotate._mouseRotate.getClickTolerance(),b=a.dragRotate._mousePitch.getClickTolerance();this.element=f,this.mouseRotate=Au({clickTolerance:g,enable:!0}),this.touchRotate=(({enable:T,clickTolerance:L,bearingDegreesPerPixelMoved:k=.8})=>{const N=new Ct;return new Mu({clickTolerance:L,move:(V,j)=>({bearingDelta:(j.x-V.x)*k}),moveStateManager:N,enable:T,assignEvents:Zh})})({clickTolerance:g,enable:!0}),this.map=a,m&&(this.mousePitch=ku({clickTolerance:b,enable:!0}),this.touchPitch=(({enable:T,clickTolerance:L,pitchDegreesPerPixelMoved:k=-.5})=>{const N=new Ct;return new Mu({clickTolerance:L,move:(V,j)=>({pitchDelta:(j.y-V.y)*k}),moveStateManager:N,enable:T,assignEvents:Zh})})({clickTolerance:b,enable:!0})),C.addEventListener(f,"mousedown",this.mousedown),C.addEventListener(f,"touchstart",this.touchstart,{passive:!1}),C.addEventListener(f,"touchcancel",this.reset)}startMouse(a,f){this.mouseRotate.dragStart(a,f),this.mousePitch&&this.mousePitch.dragStart(a,f),C.disableDrag()}startTouch(a,f){this.touchRotate.dragStart(a,f),this.touchPitch&&this.touchPitch.dragStart(a,f),C.disableDrag()}moveMouse(a,f){const m=this.map,{bearingDelta:g}=this.mouseRotate.dragMove(a,f)||{};if(g&&m.setBearing(m.getBearing()+g),this.mousePitch){const{pitchDelta:b}=this.mousePitch.dragMove(a,f)||{};b&&m.setPitch(m.getPitch()+b)}}moveTouch(a,f){const m=this.map,{bearingDelta:g}=this.touchRotate.dragMove(a,f)||{};if(g&&m.setBearing(m.getBearing()+g),this.touchPitch){const{pitchDelta:b}=this.touchPitch.dragMove(a,f)||{};b&&m.setPitch(m.getPitch()+b)}}off(){const a=this.element;C.removeEventListener(a,"mousedown",this.mousedown),C.removeEventListener(a,"touchstart",this.touchstart,{passive:!1}),C.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),C.removeEventListener(window,"touchend",this.touchend),C.removeEventListener(a,"touchcancel",this.reset),this.offTemp()}offTemp(){C.enableDrag(),C.removeEventListener(window,"mousemove",this.mousemove),C.removeEventListener(window,"mouseup",this.mouseup),C.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),C.removeEventListener(window,"touchend",this.touchend)}}let Da;function Xh(y,a,f){const m=new l.M(y.lng,y.lat);if(y=new l.M(y.lng,y.lat),a){const g=new l.M(y.lng-360,y.lat),b=new l.M(y.lng+360,y.lat),T=f.locationPoint(y).distSqr(a);f.locationPoint(g).distSqr(a)180;){const g=f.locationPoint(y);if(g.x>=0&&g.y>=0&&g.x<=f.width&&g.y<=f.height)break;y.lng>f.center.lng?y.lng-=360:y.lng+=360}return y.lng!==m.lng&&f.locationPoint(y).y>f.height/2-f.getHorizon()?y:m}const zc={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function Yh(y,a,f){const m=y.classList;for(const g in zc)m.remove(`maplibregl-${f}-anchor-${g}`);m.add(`maplibregl-${f}-anchor-${a}`)}class Fc extends l.E{constructor(a){if(super(),this._onKeyPress=f=>{const m=f.code,g=f.charCode||f.keyCode;m!=="Space"&&m!=="Enter"&&g!==32&&g!==13||this.togglePopup()},this._onMapClick=f=>{const m=f.originalEvent.target,g=this._element;this._popup&&(m===g||g.contains(m))&&this.togglePopup()},this._update=f=>{var m;if(!this._map)return;const g=this._map.loaded()&&!this._map.isMoving();((f==null?void 0:f.type)==="terrain"||(f==null?void 0:f.type)==="render"&&!g)&&this._map.once("render",this._update),this._lngLat=this._map.transform.renderWorldCopies?Xh(this._lngLat,this._flatPos,this._map.transform):(m=this._lngLat)===null||m===void 0?void 0:m.wrap(),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationPoint(this._lngLat)._add(this._offset));let b="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?b=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(b=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let T="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?T="rotateX(0deg)":this._pitchAlignment==="map"&&(T=`rotateX(${this._map.getPitch()}deg)`),f&&f.type!=="moveend"||(this._pos=this._pos.round()),C.setTransform(this._element,`${zc[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${T} ${b}`),E.frameAsync(new AbortController).then(()=>{this._updateOpacity(f&&f.type==="moveend")}).catch(()=>{})},this._onMove=f=>{if(!this._isDragging){const m=this._clickTolerance||this._map._clickTolerance;this._isDragging=f.point.dist(this._pointerdownPos)>=m}this._isDragging&&(this._pos=f.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new l.k("dragstart"))),this.fire(new l.k("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new l.k("dragend")),this._state="inactive"},this._addDragHandler=f=>{this._element.contains(f.originalEvent.target)&&(f.preventDefault(),this._positionDelta=f.point.sub(this._pos).add(this._offset),this._pointerdownPos=f.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=a&&a.anchor||"center",this._color=a&&a.color||"#3FB1CE",this._scale=a&&a.scale||1,this._draggable=a&&a.draggable||!1,this._clickTolerance=a&&a.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=a&&a.rotation||0,this._rotationAlignment=a&&a.rotationAlignment||"auto",this._pitchAlignment=a&&a.pitchAlignment&&a.pitchAlignment!=="auto"?a.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(a==null?void 0:a.opacity,a==null?void 0:a.opacityWhenCovered),a&&a.element)this._element=a.element,this._offset=l.P.convert(a&&a.offset||[0,0]);else{this._defaultMarker=!0,this._element=C.create("div"),this._element.setAttribute("aria-label","Map marker");const f=C.createNS("http://www.w3.org/2000/svg","svg"),m=41,g=27;f.setAttributeNS(null,"display","block"),f.setAttributeNS(null,"height",`${m}px`),f.setAttributeNS(null,"width",`${g}px`),f.setAttributeNS(null,"viewBox",`0 0 ${g} ${m}`);const b=C.createNS("http://www.w3.org/2000/svg","g");b.setAttributeNS(null,"stroke","none"),b.setAttributeNS(null,"stroke-width","1"),b.setAttributeNS(null,"fill","none"),b.setAttributeNS(null,"fill-rule","evenodd");const T=C.createNS("http://www.w3.org/2000/svg","g");T.setAttributeNS(null,"fill-rule","nonzero");const L=C.createNS("http://www.w3.org/2000/svg","g");L.setAttributeNS(null,"transform","translate(3.0, 29.0)"),L.setAttributeNS(null,"fill","#000000");const k=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(const Ce of k){const Be=C.createNS("http://www.w3.org/2000/svg","ellipse");Be.setAttributeNS(null,"opacity","0.04"),Be.setAttributeNS(null,"cx","10.5"),Be.setAttributeNS(null,"cy","5.80029008"),Be.setAttributeNS(null,"rx",Ce.rx),Be.setAttributeNS(null,"ry",Ce.ry),L.appendChild(Be)}const N=C.createNS("http://www.w3.org/2000/svg","g");N.setAttributeNS(null,"fill",this._color);const V=C.createNS("http://www.w3.org/2000/svg","path");V.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),N.appendChild(V);const j=C.createNS("http://www.w3.org/2000/svg","g");j.setAttributeNS(null,"opacity","0.25"),j.setAttributeNS(null,"fill","#000000");const $=C.createNS("http://www.w3.org/2000/svg","path");$.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),j.appendChild($);const he=C.createNS("http://www.w3.org/2000/svg","g");he.setAttributeNS(null,"transform","translate(6.0, 7.0)"),he.setAttributeNS(null,"fill","#FFFFFF");const ce=C.createNS("http://www.w3.org/2000/svg","g");ce.setAttributeNS(null,"transform","translate(8.0, 8.0)");const ge=C.createNS("http://www.w3.org/2000/svg","circle");ge.setAttributeNS(null,"fill","#000000"),ge.setAttributeNS(null,"opacity","0.25"),ge.setAttributeNS(null,"cx","5.5"),ge.setAttributeNS(null,"cy","5.5"),ge.setAttributeNS(null,"r","5.4999962");const re=C.createNS("http://www.w3.org/2000/svg","circle");re.setAttributeNS(null,"fill","#FFFFFF"),re.setAttributeNS(null,"cx","5.5"),re.setAttributeNS(null,"cy","5.5"),re.setAttributeNS(null,"r","5.4999962"),ce.appendChild(ge),ce.appendChild(re),T.appendChild(L),T.appendChild(N),T.appendChild(j),T.appendChild(he),T.appendChild(ce),f.appendChild(T),f.setAttributeNS(null,"height",m*this._scale+"px"),f.setAttributeNS(null,"width",g*this._scale+"px"),this._element.appendChild(f),this._offset=l.P.convert(a&&a.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",f=>{f.preventDefault()}),this._element.addEventListener("mousedown",f=>{f.preventDefault()}),Yh(this._element,this._anchor,"marker"),a&&a.className)for(const f of a.className.split(" "))this._element.classList.add(f);this._popup=null}addTo(a){return this.remove(),this._map=a,a.getCanvasContainer().appendChild(this._element),a.on("move",this._update),a.on("moveend",this._update),a.on("terrain",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),C.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(a){return this._lngLat=l.M.convert(a),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(a){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),a){if(!("offset"in a.options)){const g=Math.abs(13.5)/Math.SQRT2;a.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[g,-1*(38.1-13.5+g)],"bottom-right":[-g,-1*(38.1-13.5+g)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=a,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}getPopup(){return this._popup}togglePopup(){const a=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:a?(a.isOpen()?a.remove():(a.setLngLat(this._lngLat),a.addTo(this._map)),this):this}_updateOpacity(a=!1){var f,m;if(!(!((f=this._map)===null||f===void 0)&&f.terrain))return void(this._element.style.opacity!==this._opacity&&(this._element.style.opacity=this._opacity));if(a)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}const g=this._map,b=g.terrain.depthAtPoint(this._pos),T=g.terrain.getElevationForLngLatZoom(this._lngLat,g.transform.tileZoom);if(g.transform.lngLatToCameraDepth(this._lngLat,T)-b<.006)return void(this._element.style.opacity=this._opacity);const L=-this._offset.y/g.transform._pixelPerMeter,k=Math.sin(g.getPitch()*Math.PI/180)*L,N=g.terrain.depthAtPoint(new l.P(this._pos.x,this._pos.y-this._offset.y)),V=g.transform.lngLatToCameraDepth(this._lngLat,T+k)-N>.006;!((m=this._popup)===null||m===void 0)&&m.isOpen()&&V&&this._popup.remove(),this._element.style.opacity=V?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(a){return this._offset=l.P.convert(a),this._update(),this}addClassName(a){this._element.classList.add(a)}removeClassName(a){this._element.classList.remove(a)}toggleClassName(a){return this._element.classList.toggle(a)}setDraggable(a){return this._draggable=!!a,this._map&&(a?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(a){return this._rotation=a||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(a){return this._rotationAlignment=a||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(a){return this._pitchAlignment=a&&a!=="auto"?a:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(a,f){return a===void 0&&f===void 0&&(this._opacity="1",this._opacityWhenCovered="0.2"),a!==void 0&&(this._opacity=a),f!==void 0&&(this._opacityWhenCovered=f),this._map&&this._updateOpacity(!0),this}}const $h={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let Ru=0,Wl=!1;const Kh={maxWidth:100,unit:"metric"};function Jh(y,a,f){const m=f&&f.maxWidth||100,g=y._container.clientHeight/2,b=y.unproject([0,g]),T=y.unproject([m,g]),L=b.distanceTo(T);if(f&&f.unit==="imperial"){const k=3.2808*L;k>5280?Hl(a,m,k/5280,y._getUIString("ScaleControl.Miles")):Hl(a,m,k,y._getUIString("ScaleControl.Feet"))}else f&&f.unit==="nautical"?Hl(a,m,L/1852,y._getUIString("ScaleControl.NauticalMiles")):L>=1e3?Hl(a,m,L/1e3,y._getUIString("ScaleControl.Kilometers")):Hl(a,m,L,y._getUIString("ScaleControl.Meters"))}function Hl(y,a,f,m){const g=function(b){const T=Math.pow(10,`${Math.floor(b)}`.length-1);let L=b/T;return L=L>=10?10:L>=5?5:L>=3?3:L>=2?2:L>=1?1:function(k){const N=Math.pow(10,Math.ceil(-Math.log(k)/Math.LN10));return Math.round(k*N)/N}(L),T*L}(f);y.style.width=a*(g/f)+"px",y.innerHTML=`${g} ${m}`}const Xp={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},Yp=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function Qh(y){if(y){if(typeof y=="number"){const a=Math.round(Math.abs(y)/Math.SQRT2);return{center:new l.P(0,0),top:new l.P(0,y),"top-left":new l.P(a,a),"top-right":new l.P(-a,a),bottom:new l.P(0,-y),"bottom-left":new l.P(a,-a),"bottom-right":new l.P(-a,-a),left:new l.P(y,0),right:new l.P(-y,0)}}if(y instanceof l.P||Array.isArray(y)){const a=l.P.convert(y);return{center:a,top:a,"top-left":a,"top-right":a,bottom:a,"bottom-left":a,"bottom-right":a,left:a,right:a}}return{center:l.P.convert(y.center||[0,0]),top:l.P.convert(y.top||[0,0]),"top-left":l.P.convert(y["top-left"]||[0,0]),"top-right":l.P.convert(y["top-right"]||[0,0]),bottom:l.P.convert(y.bottom||[0,0]),"bottom-left":l.P.convert(y["bottom-left"]||[0,0]),"bottom-right":l.P.convert(y["bottom-right"]||[0,0]),left:l.P.convert(y.left||[0,0]),right:l.P.convert(y.right||[0,0])}}return Qh(new l.P(0,0))}const pg=d;c.AJAXError=l.be,c.Evented=l.E,c.LngLat=l.M,c.MercatorCoordinate=l.Y,c.Point=l.P,c.addProtocol=l.bf,c.config=l.a,c.removeProtocol=l.bg,c.AttributionControl=As,c.BoxZoomHandler=Ps,c.CanvasSource=Cs,c.CooperativeGesturesHandler=Nt,c.DoubleClickZoomHandler=Vp,c.DragPanHandler=cg,c.DragRotateHandler=Ms,c.EdgeInsets=Lu,c.FullscreenControl=class extends l.E{constructor(y={}){super(),this._onFullscreenChange=()=>{var a;let f=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((a=f==null?void 0:f.shadowRoot)===null||a===void 0)&&a.fullscreenElement;)f=f.shadowRoot.fullscreenElement;f===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,y&&y.container&&(y.container instanceof HTMLElement?this._container=y.container:l.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(y){return this._map=y,this._container||(this._container=this._map.getContainer()),this._controlContainer=C.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){C.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){const y=this._fullscreenButton=C.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);C.create("span","maplibregl-ctrl-icon",y).setAttribute("aria-hidden","true"),y.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){const y=this._getTitle();this._fullscreenButton.setAttribute("aria-label",y),this._fullscreenButton.title=y}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new l.k("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new l.k("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},c.GeoJSONSource=Cn,c.GeolocateControl=class extends l.E{constructor(y){super(),this._onSuccess=a=>{if(this._map){if(this._isOutOfMapMaxBounds(a))return this._setErrorState(),this.fire(new l.k("outofmaxbounds",a)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=a,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(a),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(a),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new l.k("geolocate",a)),this._finish()}},this._updateCamera=a=>{const f=new l.M(a.coords.longitude,a.coords.latitude),m=a.coords.accuracy,g=this._map.getBearing(),b=l.e({bearing:g},this.options.fitBoundsOptions),T=Me.fromLngLat(f,m);this._map.fitBounds(T,b,{geolocateSource:!0})},this._updateMarker=a=>{if(a){const f=new l.M(a.coords.longitude,a.coords.latitude);this._accuracyCircleMarker.setLngLat(f).addTo(this._map),this._userLocationDotMarker.setLngLat(f).addTo(this._map),this._accuracy=a.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onZoom=()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},this._onError=a=>{if(this._map){if(this.options.trackUserLocation)if(a.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;const f=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=f,this._geolocateButton.setAttribute("aria-label",f),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(a.code===3&&Wl)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new l.k("error",a)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=a=>{if(this._map){if(this._container.addEventListener("contextmenu",f=>f.preventDefault()),this._geolocateButton=C.create("button","maplibregl-ctrl-geolocate",this._container),C.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",a===!1){l.w("Geolocation support is not available so the GeolocateControl will be disabled.");const f=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=f,this._geolocateButton.setAttribute("aria-label",f)}else{const f=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=f,this._geolocateButton.setAttribute("aria-label",f)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=C.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Fc({element:this._dotElement}),this._circleElement=C.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Fc({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",f=>{f.geolocateSource||this._watchState!=="ACTIVE_LOCK"||f.originalEvent&&f.originalEvent.type==="resize"||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new l.k("trackuserlocationend")))})}},this.options=l.e({},$h,y)}onAdd(y){return this._map=y,this._container=C.create("div","maplibregl-ctrl maplibregl-ctrl-group"),function(){return l._(this,arguments,void 0,function*(a=!1){if(Da!==void 0&&!a)return Da;if(window.navigator.permissions===void 0)return Da=!!window.navigator.geolocation,Da;try{Da=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{Da=!!window.navigator.geolocation}return Da})}().then(a=>this._setupUI(a)),this._container}onRemove(){this._geolocationWatchID!==void 0&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),C.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Ru=0,Wl=!1}_isOutOfMapMaxBounds(y){const a=this._map.getMaxBounds(),f=y.coords;return a&&(f.longitudea.getEast()||f.latitudea.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadius(){const y=this._map.getBounds(),a=y.getSouthEast(),f=y.getNorthEast(),m=a.distanceTo(f),g=Math.ceil(this._accuracy/(m/this._map._container.clientHeight)*2);this._circleElement.style.width=`${g}px`,this._circleElement.style.height=`${g}px`}trigger(){if(!this._setup)return l.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new l.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Ru--,Wl=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new l.k("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new l.k("trackuserlocationstart"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let y;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Ru++,Ru>1?(y={maximumAge:6e5,timeout:0},Wl=!0):(y=this.options.positionOptions,Wl=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,y)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},c.Hash=Op,c.ImageSource=hr,c.KeyboardHandler=al,c.LngLatBounds=Me,c.LogoControl=hg,c.Map=class extends To{constructor(y){if(l.bc.mark(l.bd.create),(y=l.e({},Oc,y)).minZoom!=null&&y.maxZoom!=null&&y.minZoom>y.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(y.minPitch!=null&&y.maxPitch!=null&&y.minPitch>y.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(y.minPitch!=null&&y.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(y.maxPitch!=null&&y.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new Uh(y.minZoom,y.maxZoom,y.minPitch,y.maxPitch,y.renderWorldCopies),{bearingSnap:y.bearingSnap}),this._contextLost=a=>{a.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new l.k("webglcontextlost",{originalEvent:a}))},this._contextRestored=a=>{this._setupPainter(),this.resize(),this._update(),this.fire(new l.k("webglcontextrestored",{originalEvent:a}))},this._onMapScroll=a=>{if(a.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=y.interactive,this._maxTileCacheSize=y.maxTileCacheSize,this._maxTileCacheZoomLevels=y.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=y.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=y.preserveDrawingBuffer,this._antialias=y.antialias,this._trackResize=y.trackResize,this._bearingSnap=y.bearingSnap,this._refreshExpiredTiles=y.refreshExpiredTiles,this._fadeDuration=y.fadeDuration,this._crossSourceCollisions=y.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=y.collectResourceTiming,this._renderTaskQueue=new Rc,this._controls=[],this._mapId=l.a3(),this._locale=l.e({},qp,y.locale),this._clickTolerance=y.clickTolerance,this._overridePixelRatio=y.pixelRatio,this._maxCanvasSize=y.maxCanvasSize,this.transformCameraUpdate=y.transformCameraUpdate,this._imageQueueHandle=G.addThrottleControl(()=>this.isMoving()),this._requestManager=new H(y.transformRequest),typeof y.container=="string"){if(this._container=document.getElementById(y.container),!this._container)throw new Error(`Container '${y.container}' not found.`)}else{if(!(y.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=y.container}if(y.maxBounds&&this.setMaxBounds(y.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)),this.on("moveend",()=>this._update(!1)),this.on("zoom",()=>this._update(!0)),this.on("terrain",()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)}),this.once("idle",()=>{this._idleTriggered=!0}),typeof window<"u"){addEventListener("online",this._onWindowOnline,!1);let a=!1;const f=Np(m=>{this._trackResize&&!this._removed&&this.resize(m)._update()},50);this._resizeObserver=new ResizeObserver(m=>{a?f(m):a=!0}),this._resizeObserver.observe(this._container)}this.handlers=new Up(this,y),this._hash=y.hash&&new Op(typeof y.hash=="string"&&y.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:y.center,zoom:y.zoom,bearing:y.bearing,pitch:y.pitch}),y.bounds&&(this.resize(),this.fitBounds(y.bounds,l.e({},y.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=y.localIdeographFontFamily,this._validateStyle=y.validateStyle,y.style&&this.setStyle(y.style,{localIdeographFontFamily:y.localIdeographFontFamily}),y.attributionControl&&this.addControl(new As(typeof y.attributionControl=="boolean"?void 0:y.attributionControl)),y.maplibreLogo&&this.addControl(new hg,y.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",a=>{this._update(a.dataType==="style"),this.fire(new l.k(`${a.dataType}data`,a))}),this.on("dataloading",a=>{this.fire(new l.k(`${a.dataType}dataloading`,a))}),this.on("dataabort",a=>{this.fire(new l.k("sourcedataabort",a))})}_getMapId(){return this._mapId}addControl(y,a){if(a===void 0&&(a=y.getDefaultPosition?y.getDefaultPosition():"top-right"),!y||!y.onAdd)return this.fire(new l.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const f=y.onAdd(this);this._controls.push(y);const m=this._controlPositions[a];return a.indexOf("bottom")!==-1?m.insertBefore(f,m.firstChild):m.appendChild(f),this}removeControl(y){if(!y||!y.onRemove)return this.fire(new l.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const a=this._controls.indexOf(y);return a>-1&&this._controls.splice(a,1),y.onRemove(this),this}hasControl(y){return this._controls.indexOf(y)>-1}calculateCameraOptionsFromTo(y,a,f,m){return m==null&&this.terrain&&(m=this.terrain.getElevationForLngLatZoom(f,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(y,a,f,m)}resize(y){var a;const f=this._containerDimensions(),m=f[0],g=f[1],b=this._getClampedPixelRatio(m,g);if(this._resizeCanvas(m,g,b),this.painter.resize(m,g,b),this.painter.overLimit()){const L=this.painter.context.gl;this._maxCanvasSize=[L.drawingBufferWidth,L.drawingBufferHeight];const k=this._getClampedPixelRatio(m,g);this._resizeCanvas(m,g,k),this.painter.resize(m,g,k)}this.transform.resize(m,g),(a=this._requestedCameraState)===null||a===void 0||a.resize(m,g);const T=!this._moving;return T&&(this.stop(),this.fire(new l.k("movestart",y)).fire(new l.k("move",y))),this.fire(new l.k("resize",y)),T&&this.fire(new l.k("moveend",y)),this}_getClampedPixelRatio(y,a){const{0:f,1:m}=this._maxCanvasSize,g=this.getPixelRatio(),b=y*g,T=a*g;return Math.min(b>f?f/b:1,T>m?m/T:1)*g}getPixelRatio(){var y;return(y=this._overridePixelRatio)!==null&&y!==void 0?y:devicePixelRatio}setPixelRatio(y){this._overridePixelRatio=y,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(y){return this.transform.setMaxBounds(Me.convert(y)),this._update()}setMinZoom(y){if((y=y??-2)>=-2&&y<=this.transform.maxZoom)return this.transform.minZoom=y,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=y,this._update(),this.getZoom()>y&&this.setZoom(y),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(y){if((y=y??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(y>=0&&y<=this.transform.maxPitch)return this.transform.minPitch=y,this._update(),this.getPitch()85)throw new Error("maxPitch must be less than or equal to 85");if(y>=this.transform.minPitch)return this.transform.maxPitch=y,this._update(),this.getPitch()>y&&this.setPitch(y),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(y){return this.transform.renderWorldCopies=y,this._update()}project(y){return this.transform.locationPoint(l.M.convert(y),this.style&&this.terrain)}unproject(y){return this.transform.pointLocation(l.P.convert(y),this.terrain)}isMoving(){var y;return this._moving||((y=this.handlers)===null||y===void 0?void 0:y.isMoving())}isZooming(){var y;return this._zooming||((y=this.handlers)===null||y===void 0?void 0:y.isZooming())}isRotating(){var y;return this._rotating||((y=this.handlers)===null||y===void 0?void 0:y.isRotating())}_createDelegatedListener(y,a,f){if(y==="mouseenter"||y==="mouseover"){let m=!1;return{layer:a,listener:f,delegates:{mousemove:b=>{const T=this.getLayer(a)?this.queryRenderedFeatures(b.point,{layers:[a]}):[];T.length?m||(m=!0,f.call(this,new Co(y,this,b.originalEvent,{features:T}))):m=!1},mouseout:()=>{m=!1}}}}if(y==="mouseleave"||y==="mouseout"){let m=!1;return{layer:a,listener:f,delegates:{mousemove:T=>{(this.getLayer(a)?this.queryRenderedFeatures(T.point,{layers:[a]}):[]).length?m=!0:m&&(m=!1,f.call(this,new Co(y,this,T.originalEvent)))},mouseout:T=>{m&&(m=!1,f.call(this,new Co(y,this,T.originalEvent)))}}}}{const m=g=>{const b=this.getLayer(a)?this.queryRenderedFeatures(g.point,{layers:[a]}):[];b.length&&(g.features=b,f.call(this,g),delete g.features)};return{layer:a,listener:f,delegates:{[y]:m}}}}on(y,a,f){if(f===void 0)return super.on(y,a);const m=this._createDelegatedListener(y,a,f);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[y]=this._delegatedListeners[y]||[],this._delegatedListeners[y].push(m);for(const g in m.delegates)this.on(g,m.delegates[g]);return this}once(y,a,f){if(f===void 0)return super.once(y,a);const m=this._createDelegatedListener(y,a,f);for(const g in m.delegates)this.once(g,m.delegates[g]);return this}off(y,a,f){return f===void 0?super.off(y,a):(this._delegatedListeners&&this._delegatedListeners[y]&&(m=>{const g=this._delegatedListeners[y];for(let b=0;bthis._updateStyle(y,a));const f=this.style&&a.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!y)),y?(this.style=new qo(this,a||{}),this.style.setEventedParent(this,{style:this.style}),typeof y=="string"?this.style.loadURL(y,a,f):this.style.loadJSON(y,a,f),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new qo(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(y,a){if(typeof y=="string"){const f=this._requestManager.transformRequest(y,"Style");l.h(f,new AbortController).then(m=>{this._updateDiff(m.data,a)}).catch(m=>{m&&this.fire(new l.j(m))})}else typeof y=="object"&&this._updateDiff(y,a)}_updateDiff(y,a){try{this.style.setState(y,a)&&this._update(!0)}catch(f){l.w(`Unable to perform style diff: ${f.message||f.error||f}. Rebuilding the style from scratch.`),this._updateStyle(y,a)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():l.w("There is no style added to the map.")}addSource(y,a){return this._lazyInitEmptyStyle(),this.style.addSource(y,a),this._update(!0)}isSourceLoaded(y){const a=this.style&&this.style.sourceCaches[y];if(a!==void 0)return a.loaded();this.fire(new l.j(new Error(`There is no source with ID '${y}'`)))}setTerrain(y){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),y){const a=this.style.sourceCaches[y.source];if(!a)throw new Error(`cannot load terrain, because there exists no source with ID: ${y.source}`);this.terrain===null&&a.reload();for(const f in this.style._layers){const m=this.style._layers[f];m.type==="hillshade"&&m.source===y.source&&l.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new fg(this.painter,a,y),this.painter.renderToTexture=new Gp(this.painter,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._terrainDataCallback=f=>{f.dataType==="style"?this.terrain.sourceCache.freeRtt():f.dataType==="source"&&f.tile&&(f.sourceId!==y.source||this._elevationFreeze||(this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.terrain.sourceCache.freeRtt(f.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.minElevationForCurrentTile=0,this.transform.elevation=0;return this.fire(new l.k("terrain",{terrain:y})),this}getTerrain(){var y,a;return(a=(y=this.terrain)===null||y===void 0?void 0:y.options)!==null&&a!==void 0?a:null}areTilesLoaded(){const y=this.style&&this.style.sourceCaches;for(const a in y){const f=y[a]._tiles;for(const m in f){const g=f[m];if(g.state!=="loaded"&&g.state!=="errored")return!1}}return!0}removeSource(y){return this.style.removeSource(y),this._update(!0)}getSource(y){return this.style.getSource(y)}addImage(y,a,f={}){const{pixelRatio:m=1,sdf:g=!1,stretchX:b,stretchY:T,content:L}=f;if(this._lazyInitEmptyStyle(),!(a instanceof HTMLImageElement||l.b(a))){if(a.width===void 0||a.height===void 0)return this.fire(new l.j(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{const{width:k,height:N,data:V}=a,j=a;return this.style.addImage(y,{data:new l.R({width:k,height:N},new Uint8Array(V)),pixelRatio:m,stretchX:b,stretchY:T,content:L,sdf:g,version:0,userImage:j}),j.onAdd&&j.onAdd(this,y),this}}{const{width:k,height:N,data:V}=E.getImageData(a);this.style.addImage(y,{data:new l.R({width:k,height:N},V),pixelRatio:m,stretchX:b,stretchY:T,content:L,sdf:g,version:0})}}updateImage(y,a){const f=this.style.getImage(y);if(!f)return this.fire(new l.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const m=a instanceof HTMLImageElement||l.b(a)?E.getImageData(a):a,{width:g,height:b,data:T}=m;if(g===void 0||b===void 0)return this.fire(new l.j(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(g!==f.data.width||b!==f.data.height)return this.fire(new l.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));const L=!(a instanceof HTMLImageElement||l.b(a));return f.data.replace(T,L),this.style.updateImage(y,f),this}getImage(y){return this.style.getImage(y)}hasImage(y){return y?!!this.style.getImage(y):(this.fire(new l.j(new Error("Missing required image id"))),!1)}removeImage(y){this.style.removeImage(y)}loadImage(y){return G.getImage(this._requestManager.transformRequest(y,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(y,a){return this._lazyInitEmptyStyle(),this.style.addLayer(y,a),this._update(!0)}moveLayer(y,a){return this.style.moveLayer(y,a),this._update(!0)}removeLayer(y){return this.style.removeLayer(y),this._update(!0)}getLayer(y){return this.style.getLayer(y)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(y,a,f){return this.style.setLayerZoomRange(y,a,f),this._update(!0)}setFilter(y,a,f={}){return this.style.setFilter(y,a,f),this._update(!0)}getFilter(y){return this.style.getFilter(y)}setPaintProperty(y,a,f,m={}){return this.style.setPaintProperty(y,a,f,m),this._update(!0)}getPaintProperty(y,a){return this.style.getPaintProperty(y,a)}setLayoutProperty(y,a,f,m={}){return this.style.setLayoutProperty(y,a,f,m),this._update(!0)}getLayoutProperty(y,a){return this.style.getLayoutProperty(y,a)}setGlyphs(y,a={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(y,a),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(y,a,f={}){return this._lazyInitEmptyStyle(),this.style.addSprite(y,a,f,m=>{m||this._update(!0)}),this}removeSprite(y){return this._lazyInitEmptyStyle(),this.style.removeSprite(y),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(y,a={}){return this._lazyInitEmptyStyle(),this.style.setSprite(y,a,f=>{f||this._update(!0)}),this}setLight(y,a={}){return this._lazyInitEmptyStyle(),this.style.setLight(y,a),this._update(!0)}getLight(){return this.style.getLight()}setFeatureState(y,a){return this.style.setFeatureState(y,a),this._update()}removeFeatureState(y,a){return this.style.removeFeatureState(y,a),this._update()}getFeatureState(y){return this.style.getFeatureState(y)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let y=0,a=0;return this._container&&(y=this._container.clientWidth||400,a=this._container.clientHeight||300),[y,a]}_setupContainer(){const y=this._container;y.classList.add("maplibregl-map");const a=this._canvasContainer=C.create("div","maplibregl-canvas-container",y);this._interactive&&a.classList.add("maplibregl-interactive"),this._canvas=C.create("canvas","maplibregl-canvas",a),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex","0"),this._canvas.setAttribute("aria-label","Map"),this._canvas.setAttribute("role","region");const f=this._containerDimensions(),m=this._getClampedPixelRatio(f[0],f[1]);this._resizeCanvas(f[0],f[1],m);const g=this._controlContainer=C.create("div","maplibregl-control-container",y),b=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(T=>{b[T]=C.create("div",`maplibregl-ctrl-${T} `,g)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(y,a,f){this._canvas.width=Math.floor(f*y),this._canvas.height=Math.floor(f*a),this._canvas.style.width=`${y}px`,this._canvas.style.height=`${a}px`}_setupPainter(){const y={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1};let a=null;this._canvas.addEventListener("webglcontextcreationerror",m=>{a={requestedAttributes:y},m&&(a.statusMessage=m.statusMessage,a.type=m.type)},{once:!0});const f=this._canvas.getContext("webgl2",y)||this._canvas.getContext("webgl",y);if(!f){const m="Failed to initialize WebGL";throw a?(a.message=m,new Error(JSON.stringify(a))):new Error(m)}this.painter=new Qm(f,this.transform),M.testSupport(f)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(y){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||y,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(y){return this._update(),this._renderTaskQueue.add(y)}_cancelRenderFrame(y){this._renderTaskQueue.remove(y)}_render(y){const a=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(y),this._removed)return;let f=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const g=this.transform.zoom,b=E.now();this.style.zoomHistory.update(g,b);const T=new l.a8(g,{now:b,fadeDuration:a,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),L=T.crossFadingFactor();L===1&&L===this._crossFadingFactor||(f=!0,this._crossFadingFactor=L),this.style.update(T)}this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._elevationFreeze||(this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.minElevationForCurrentTile=0,this.transform.elevation=0),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,a,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:a,showPadding:this.showPadding}),this.fire(new l.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,l.bc.mark(l.bd.load),this.fire(new l.k("load"))),this.style&&(this.style.hasTransitions()||f)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();const m=this._sourcesDirty||this._styleDirty||this._placementDirty;return m||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new l.k("idle")),!this._loaded||this._fullyLoaded||m||(this._fullyLoaded=!0,l.bc.mark(l.bd.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var y;this._hash&&this._hash.remove();for(const f of this._controls)f.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&removeEventListener("online",this._onWindowOnline,!1),G.removeThrottleControl(this._imageQueueHandle),(y=this._resizeObserver)===null||y===void 0||y.disconnect();const a=this.painter.context.gl.getExtension("WEBGL_lose_context");a&&a.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),C.remove(this._canvasContainer),C.remove(this._controlContainer),this._container.classList.remove("maplibregl-map"),l.bc.clearMetrics(),this._removed=!0,this.fire(new l.k("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,E.frameAsync(this._frameRequest).then(y=>{l.bc.frame(y),this._frameRequest=null,this._render(y)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(y){this._showTileBoundaries!==y&&(this._showTileBoundaries=y,this._update())}get showPadding(){return!!this._showPadding}set showPadding(y){this._showPadding!==y&&(this._showPadding=y,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(y){this._showCollisionBoxes!==y&&(this._showCollisionBoxes=y,y?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(y){this._showOverdrawInspector!==y&&(this._showOverdrawInspector=y,this._update())}get repaint(){return!!this._repaint}set repaint(y){this._repaint!==y&&(this._repaint=y,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(y){this._vertices=y,this._update()}get version(){return Wp}getCameraTargetElevation(){return this.transform.elevation}},c.MapMouseEvent=Co,c.MapTouchEvent=ea,c.MapWheelEvent=zp,c.Marker=Fc,c.NavigationControl=class{constructor(y){this._updateZoomButtons=()=>{const a=this._map.getZoom(),f=a===this._map.getMaxZoom(),m=a===this._map.getMinZoom();this._zoomInButton.disabled=f,this._zoomOutButton.disabled=m,this._zoomInButton.setAttribute("aria-disabled",f.toString()),this._zoomOutButton.setAttribute("aria-disabled",m.toString())},this._rotateCompassArrow=()=>{const a=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${this._map.transform.angle*(180/Math.PI)}deg)`:`rotate(${this._map.transform.angle*(180/Math.PI)}deg)`;this._compassIcon.style.transform=a},this._setButtonTitle=(a,f)=>{const m=this._map._getUIString(`NavigationControl.${f}`);a.title=m,a.setAttribute("aria-label",m)},this.options=l.e({},Hp,y),this._container=C.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",a=>a.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",a=>this._map.zoomIn({},{originalEvent:a})),C.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",a=>this._map.zoomOut({},{originalEvent:a})),C.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",a=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:a}):this._map.resetNorth({},{originalEvent:a})}),this._compassIcon=C.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(y){return this._map=y,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Zp(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){C.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(y,a){const f=C.create("button",y,this._container);return f.type="button",f.addEventListener("click",a),f}},c.Popup=class extends l.E{constructor(y){super(),this.remove=()=>(this._content&&C.remove(this._content),this._container&&(C.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new l.k("close"))),this),this._onMouseUp=a=>{this._update(a.point)},this._onMouseMove=a=>{this._update(a.point)},this._onDrag=a=>{this._update(a.point)},this._update=a=>{var f;if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=C.create("div","maplibregl-popup",this._map.getContainer()),this._tip=C.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(const L of this.options.className.split(" "))this._container.classList.add(L);this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=this._map.transform.renderWorldCopies&&!this._trackPointer?Xh(this._lngLat,this._flatPos,this._map.transform):(f=this._lngLat)===null||f===void 0?void 0:f.wrap(),this._trackPointer&&!a)return;const m=this._flatPos=this._pos=this._trackPointer&&a?a:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&a?a:this._map.transform.locationPoint(this._lngLat));let g=this.options.anchor;const b=Qh(this.options.offset);if(!g){const L=this._container.offsetWidth,k=this._container.offsetHeight;let N;N=m.y+b.bottom.ythis._map.transform.height-k?["bottom"]:[],m.xthis._map.transform.width-L/2&&N.push("right"),g=N.length===0?"bottom":N.join("-")}let T=m.add(b[g]);this.options.subpixelPositioning||(T=T.round()),C.setTransform(this._container,`${zc[g]} translate(${T.x}px,${T.y}px)`),Yh(this._container,g,"popup")},this._onClose=()=>{this.remove()},this.options=l.e(Object.create(Xp),y)}addTo(y){return this._map&&this.remove(),this._map=y,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new l.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(y){return this._lngLat=l.M.convert(y),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(y){return this.setDOMContent(document.createTextNode(y))}setHTML(y){const a=document.createDocumentFragment(),f=document.createElement("body");let m;for(f.innerHTML=y;m=f.firstChild,m;)a.appendChild(m);return this.setDOMContent(a)}getMaxWidth(){var y;return(y=this._container)===null||y===void 0?void 0:y.style.maxWidth}setMaxWidth(y){return this.options.maxWidth=y,this._update(),this}setDOMContent(y){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=C.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(y),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(y){this._container&&this._container.classList.add(y)}removeClassName(y){this._container&&this._container.classList.remove(y)}setOffset(y){return this.options.offset=y,this._update(),this}toggleClassName(y){if(this._container)return this._container.classList.toggle(y)}setSubpixelPositioning(y){this.options.subpixelPositioning=y}_createCloseButton(){this.options.closeButton&&(this._closeButton=C.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const y=this._container.querySelector(Yp);y&&y.focus()}},c.RasterDEMTileSource=It,c.RasterTileSource=Re,c.ScaleControl=class{constructor(y){this._onMove=()=>{Jh(this._map,this._container,this.options)},this.setUnit=a=>{this.options.unit=a,Jh(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},Kh),y)}getDefaultPosition(){return"bottom-left"}onAdd(y){return this._map=y,this._container=C.create("div","maplibregl-ctrl maplibregl-ctrl-scale",y.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){C.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},c.ScrollZoomHandler=Wh,c.Style=qo,c.TerrainControl=class{constructor(y){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=y}onAdd(y){return this._map=y,this._container=C.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=C.create("button","maplibregl-ctrl-terrain",this._container),C.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){C.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},c.TwoFingersTouchPitchHandler=ag,c.TwoFingersTouchRotateHandler=Bp,c.TwoFingersTouchZoomHandler=sg,c.TwoFingersTouchZoomRotateHandler=kc,c.VectorTileSource=en,c.VideoSource=jo,c.addSourceType=(y,a)=>l._(void 0,void 0,void 0,function*(){if(tl(y))throw new Error(`A source type called "${y}" already exists.`);((f,m)=>{Ks[f]=m})(y,a)}),c.clearPrewarmedResources=function(){const y=fn;y&&(y.isPreloaded()&&y.numActive()===1?(y.release(Mt),fn=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},c.getMaxParallelImageRequests=function(){return l.a.MAX_PARALLEL_IMAGE_REQUESTS},c.getRTLTextPluginStatus=function(){return at().getRTLTextPluginStatus()},c.getVersion=function(){return pg},c.getWorkerCount=function(){return rn.workerCount},c.getWorkerUrl=function(){return l.a.WORKER_URL},c.importScriptInWorkers=function(y){return zr().broadcast("IS",y)},c.prewarm=function(){pn().acquire(Mt)},c.setMaxParallelImageRequests=function(y){l.a.MAX_PARALLEL_IMAGE_REQUESTS=y},c.setRTLTextPlugin=function(y,a){return at().setRTLTextPlugin(y,a)},c.setWorkerCount=function(y){rn.workerCount=y},c.setWorkerUrl=function(y){l.a.WORKER_URL=y}});var s=n;return s})})(YE);var iy=YE.exports;const Bs=y1(iy),df=[];function F0(t,e){return{subscribe:Nn(t,e).subscribe}}function Nn(t,e=Pt){let n;const r=new Set;function i(l){if(Ut(t,l)&&(t=l,n)){const d=!df.length;for(const v of r)v[1](),df.push(v,t);if(d){for(let v=0;v{r.delete(v),r.size===0&&n&&(n(),n=null)}}return{set:i,update:s,subscribe:c}}let Zt;const KE=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&KE.decode();let Md=null;function Vd(){return(Md===null||Md.byteLength===0)&&(Md=new Uint8Array(Zt.memory.buffer)),Md}function vl(t,e){return t=t>>>0,KE.decode(Vd().subarray(t,t+e))}const ru=new Array(128).fill(void 0);ru.push(void 0,null,!0,!1);let Ud=ru.length;function Vi(t){Ud===ru.length&&ru.push(ru.length+1);const e=Ud;return Ud=ru[e],ru[e]=t,e}function Dn(t){return ru[t]}function fM(t){t<132||(ru[t]=Ud,Ud=t)}function Jg(t){const e=Dn(t);return fM(t),e}function B0(t){return t==null}let Ad=null;function pM(){return(Ad===null||Ad.byteLength===0)&&(Ad=new Float64Array(Zt.memory.buffer)),Ad}let kd=null;function _r(){return(kd===null||kd.byteLength===0)&&(kd=new Int32Array(Zt.memory.buffer)),kd}let Zu=0;const Qg=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},dM=typeof Qg.encodeInto=="function"?function(t,e){return Qg.encodeInto(t,e)}:function(t,e){const n=Qg.encode(t);return e.set(n),{read:t.length,written:n.length}};function zg(t,e,n){if(n===void 0){const l=Qg.encode(t),d=e(l.length,1)>>>0;return Vd().subarray(d,d+l.length).set(l),Zu=l.length,d}let r=t.length,i=e(r,1)>>>0;const s=Vd();let c=0;for(;c127)break;s[i+c]=l}if(c!==r){c!==0&&(t=t.slice(c)),i=n(i,r,r=c+t.length*3,1)>>>0;const l=Vd().subarray(i+c,i+r),d=dM(t,l);c+=d.written}return Zu=c,i}function _v(t){const e=typeof t;if(e=="number"||e=="boolean"||t==null)return`${t}`;if(e=="string")return`"${t}"`;if(e=="symbol"){const i=t.description;return i==null?"Symbol":`Symbol(${i})`}if(e=="function"){const i=t.name;return typeof i=="string"&&i.length>0?`Function(${i})`:"Function"}if(Array.isArray(t)){const i=t.length;let s="[";i>0&&(s+=_v(t[0]));for(let c=1;c1)r=n[1];else return toString.call(t);if(r=="Object")try{return"Object("+JSON.stringify(t)+")"}catch{return"Object"}return t instanceof Error?`${t.name}: ${t.message} +${t.stack}`:r}function mM(t,e){const n=e(t.length*1,1)>>>0;return Vd().set(t,n/1),Zu=t.length,n}function V0(t,e){try{return t.apply(this,e)}catch(n){Zt.__wbindgen_exn_store(Vi(n))}}class d_{static __wrap(e){e=e>>>0;const n=Object.create(d_.prototype);return n.__wbg_ptr=e,n}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,e}free(){const e=this.__destroy_into_raw();Zt.__wbg_jsroutesnapper_free(e)}constructor(e){try{const s=Zt.__wbindgen_add_to_stack_pointer(-16),c=mM(e,Zt.__wbindgen_malloc),l=Zu;Zt.jsroutesnapper_new(s,c,l);var n=_r()[s/4+0],r=_r()[s/4+1],i=_r()[s/4+2];if(i)throw Jg(r);return d_.__wrap(n)}finally{Zt.__wbindgen_add_to_stack_pointer(16)}}setRouteConfig(e){Zt.jsroutesnapper_setRouteConfig(this.__wbg_ptr,Vi(e))}setAreaMode(){Zt.jsroutesnapper_setAreaMode(this.__wbg_ptr)}getConfig(){let e,n;try{const s=Zt.__wbindgen_add_to_stack_pointer(-16);Zt.jsroutesnapper_getConfig(s,this.__wbg_ptr);var r=_r()[s/4+0],i=_r()[s/4+1];return e=r,n=i,vl(r,i)}finally{Zt.__wbindgen_add_to_stack_pointer(16),Zt.__wbindgen_free(e,n,1)}}toFinalFeature(){try{const r=Zt.__wbindgen_add_to_stack_pointer(-16);Zt.jsroutesnapper_toFinalFeature(r,this.__wbg_ptr);var e=_r()[r/4+0],n=_r()[r/4+1];let i;return e!==0&&(i=vl(e,n).slice(),Zt.__wbindgen_free(e,n*1)),i}finally{Zt.__wbindgen_add_to_stack_pointer(16)}}renderGeojson(){let e,n;try{const s=Zt.__wbindgen_add_to_stack_pointer(-16);Zt.jsroutesnapper_renderGeojson(s,this.__wbg_ptr);var r=_r()[s/4+0],i=_r()[s/4+1];return e=r,n=i,vl(r,i)}finally{Zt.__wbindgen_add_to_stack_pointer(16),Zt.__wbindgen_free(e,n,1)}}toggleSnapMode(){Zt.jsroutesnapper_toggleSnapMode(this.__wbg_ptr)}onMouseMove(e,n,r){return Zt.jsroutesnapper_onMouseMove(this.__wbg_ptr,e,n,r)!==0}onClick(){Zt.jsroutesnapper_onClick(this.__wbg_ptr)}onDragStart(){return Zt.jsroutesnapper_onDragStart(this.__wbg_ptr)!==0}onMouseUp(){return Zt.jsroutesnapper_onMouseUp(this.__wbg_ptr)!==0}clearState(){Zt.jsroutesnapper_clearState(this.__wbg_ptr)}editExisting(e){try{const i=Zt.__wbindgen_add_to_stack_pointer(-16);Zt.jsroutesnapper_editExisting(i,this.__wbg_ptr,Vi(e));var n=_r()[i/4+0],r=_r()[i/4+1];if(r)throw Jg(n)}finally{Zt.__wbindgen_add_to_stack_pointer(16)}}debugRenderGraph(){let e,n;try{const s=Zt.__wbindgen_add_to_stack_pointer(-16);Zt.jsroutesnapper_debugRenderGraph(s,this.__wbg_ptr);var r=_r()[s/4+0],i=_r()[s/4+1];return e=r,n=i,vl(r,i)}finally{Zt.__wbindgen_add_to_stack_pointer(16),Zt.__wbindgen_free(e,n,1)}}debugSnappableNodes(){let e,n;try{const s=Zt.__wbindgen_add_to_stack_pointer(-16);Zt.jsroutesnapper_debugSnappableNodes(s,this.__wbg_ptr);var r=_r()[s/4+0],i=_r()[s/4+1];return e=r,n=i,vl(r,i)}finally{Zt.__wbindgen_add_to_stack_pointer(16),Zt.__wbindgen_free(e,n,1)}}routeNameForWaypoints(e){let n,r;try{const S=Zt.__wbindgen_add_to_stack_pointer(-16);Zt.jsroutesnapper_routeNameForWaypoints(S,this.__wbg_ptr,Vi(e));var i=_r()[S/4+0],s=_r()[S/4+1],c=_r()[S/4+2],l=_r()[S/4+3],d=i,v=s;if(l)throw d=0,v=0,Jg(c);return n=d,r=v,vl(d,v)}finally{Zt.__wbindgen_add_to_stack_pointer(16),Zt.__wbindgen_free(n,r,1)}}addSnappedWaypoint(e,n){Zt.jsroutesnapper_addSnappedWaypoint(this.__wbg_ptr,e,n)}undo(){Zt.jsroutesnapper_undo(this.__wbg_ptr)}}async function gM(t,e){if(typeof Response=="function"&&t instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(t,e)}catch(r){if(t.headers.get("Content-Type")!="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r);else throw r}const n=await t.arrayBuffer();return await WebAssembly.instantiate(n,e)}else{const n=await WebAssembly.instantiate(t,e);return n instanceof WebAssembly.Instance?{instance:n,module:t}:n}}function _M(){const t={};return t.wbg={},t.wbg.__wbindgen_string_new=function(e,n){const r=vl(e,n);return Vi(r)},t.wbg.__wbindgen_object_drop_ref=function(e){Jg(e)},t.wbg.__wbindgen_error_new=function(e,n){const r=new Error(vl(e,n));return Vi(r)},t.wbg.__wbindgen_is_object=function(e){const n=Dn(e);return typeof n=="object"&&n!==null},t.wbg.__wbindgen_is_undefined=function(e){return Dn(e)===void 0},t.wbg.__wbindgen_in=function(e,n){return Dn(e)in Dn(n)},t.wbg.__wbindgen_number_get=function(e,n){const r=Dn(n),i=typeof r=="number"?r:void 0;pM()[e/8+1]=B0(i)?0:i,_r()[e/4+0]=!B0(i)},t.wbg.__wbindgen_boolean_get=function(e){const n=Dn(e);return typeof n=="boolean"?n?1:0:2},t.wbg.__wbindgen_jsval_loose_eq=function(e,n){return Dn(e)==Dn(n)},t.wbg.__wbindgen_string_get=function(e,n){const r=Dn(n),i=typeof r=="string"?r:void 0;var s=B0(i)?0:zg(i,Zt.__wbindgen_malloc,Zt.__wbindgen_realloc),c=Zu;_r()[e/4+1]=c,_r()[e/4+0]=s},t.wbg.__wbg_getwithrefkey_d1f0d12f1f1b63ea=function(e,n){const r=Dn(e)[Dn(n)];return Vi(r)},t.wbg.__wbindgen_object_clone_ref=function(e){const n=Dn(e);return Vi(n)},t.wbg.__wbg_String_4370c5505c674d30=function(e,n){const r=String(Dn(n)),i=zg(r,Zt.__wbindgen_malloc,Zt.__wbindgen_realloc),s=Zu;_r()[e/4+1]=s,_r()[e/4+0]=i},t.wbg.__wbg_new_abda76e883ba8a5f=function(){const e=new Error;return Vi(e)},t.wbg.__wbg_stack_658279fe44541cf6=function(e,n){const r=Dn(n).stack,i=zg(r,Zt.__wbindgen_malloc,Zt.__wbindgen_realloc),s=Zu;_r()[e/4+1]=s,_r()[e/4+0]=i},t.wbg.__wbg_error_f851667af71bcfc6=function(e,n){let r,i;try{r=e,i=n,console.error(vl(e,n))}finally{Zt.__wbindgen_free(r,i,1)}},t.wbg.__wbg_debug_9a6b3243fbbebb61=function(e){console.debug(Dn(e))},t.wbg.__wbg_error_788ae33f81d3b84b=function(e){console.error(Dn(e))},t.wbg.__wbg_info_2e30e8204b29d91d=function(e){console.info(Dn(e))},t.wbg.__wbg_log_1d3ae0273d8f4f8a=function(e){console.log(Dn(e))},t.wbg.__wbg_warn_d60e832f9882c1b2=function(e){console.warn(Dn(e))},t.wbg.__wbg_get_44be0491f933a435=function(e,n){const r=Dn(e)[n>>>0];return Vi(r)},t.wbg.__wbg_length_fff51ee6522a1a18=function(e){return Dn(e).length},t.wbg.__wbindgen_is_function=function(e){return typeof Dn(e)=="function"},t.wbg.__wbg_next_526fc47e980da008=function(e){const n=Dn(e).next;return Vi(n)},t.wbg.__wbg_next_ddb3312ca1c4e32a=function(){return V0(function(e){const n=Dn(e).next();return Vi(n)},arguments)},t.wbg.__wbg_done_5c1f01fb660d73b5=function(e){return Dn(e).done},t.wbg.__wbg_value_1695675138684bd5=function(e){const n=Dn(e).value;return Vi(n)},t.wbg.__wbg_iterator_97f0c81209c6c35a=function(){return Vi(Symbol.iterator)},t.wbg.__wbg_get_97b561fb56f034b5=function(){return V0(function(e,n){const r=Reflect.get(Dn(e),Dn(n));return Vi(r)},arguments)},t.wbg.__wbg_call_cb65541d95d71282=function(){return V0(function(e,n){const r=Dn(e).call(Dn(n));return Vi(r)},arguments)},t.wbg.__wbg_isArray_4c24b343cb13cfb1=function(e){return Array.isArray(Dn(e))},t.wbg.__wbg_instanceof_ArrayBuffer_39ac22089b74fddb=function(e){let n;try{n=Dn(e)instanceof ArrayBuffer}catch{n=!1}return n},t.wbg.__wbg_buffer_085ec1f694018c4f=function(e){const n=Dn(e).buffer;return Vi(n)},t.wbg.__wbg_new_8125e318e6245eed=function(e){const n=new Uint8Array(Dn(e));return Vi(n)},t.wbg.__wbg_set_5cf90238115182c3=function(e,n,r){Dn(e).set(Dn(n),r>>>0)},t.wbg.__wbg_length_72e2208bbc0efc61=function(e){return Dn(e).length},t.wbg.__wbg_instanceof_Uint8Array_d8d9cb2b8e8ac1d4=function(e){let n;try{n=Dn(e)instanceof Uint8Array}catch{n=!1}return n},t.wbg.__wbindgen_debug_string=function(e,n){const r=_v(Dn(n)),i=zg(r,Zt.__wbindgen_malloc,Zt.__wbindgen_realloc),s=Zu;_r()[e/4+1]=s,_r()[e/4+0]=i},t.wbg.__wbindgen_throw=function(e,n){throw new Error(vl(e,n))},t.wbg.__wbindgen_memory=function(){const e=Zt.memory;return Vi(e)},t}function yM(t,e){return Zt=t.exports,JE.__wbindgen_wasm_module=e,Ad=null,kd=null,Md=null,Zt}async function JE(t){if(Zt!==void 0)return Zt;typeof t>"u"&&(t="/ltn/assets/route_snapper_bg.wasm");const e=_M();(typeof t=="string"||typeof Request=="function"&&t instanceof Request||typeof URL=="function"&&t instanceof URL)&&(t=fetch(t));const{instance:n,module:r}=await gM(await t,e);return yM(n,r)}var Ro=63710088e-1,v1={centimeters:Ro*100,centimetres:Ro*100,degrees:Ro/111325,feet:Ro*3.28084,inches:Ro*39.37,kilometers:Ro/1e3,kilometres:Ro/1e3,meters:Ro,metres:Ro,miles:Ro/1609.344,millimeters:Ro*1e3,millimetres:Ro*1e3,nauticalmiles:Ro/1852,radians:1,yards:Ro*1.0936},vM={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:1/1e3,kilometres:1/1e3,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/Ro,yards:1.0936133},yv={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046};function ga(t,e,n){n===void 0&&(n={});var r={type:"Feature"};return(n.id===0||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function bM(t,e,n){switch(t){case"Point":return gs(e).geometry;case"LineString":return ha(e).geometry;case"Polygon":return b1(e).geometry;case"MultiPoint":return eI(e).geometry;case"MultiLineString":return QE(e).geometry;case"MultiPolygon":return tI(e).geometry;default:throw new Error(t+" is invalid")}}function gs(t,e,n){if(n===void 0&&(n={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!m_(t[0])||!m_(t[1]))throw new Error("coordinates must contain numbers");var r={type:"Point",coordinates:t};return ga(r,e,n)}function xM(t,e,n){return n===void 0&&(n={}),Zc(t.map(function(r){return gs(r,e)}),n)}function b1(t,e,n){n===void 0&&(n={});for(var r=0,i=t;r=0))throw new Error("precision must be a positive number");var n=Math.pow(10,e||0);return Math.round(t*n)/n}function x1(t,e){e===void 0&&(e="kilometers");var n=v1[e];if(!n)throw new Error(e+" units is invalid");return t*n}function oy(t,e){e===void 0&&(e="kilometers");var n=v1[e];if(!n)throw new Error(e+" units is invalid");return t/n}function CM(t,e){return Yd(oy(t,e))}function TM(t){var e=t%360;return e<0&&(e+=360),e}function Yd(t){var e=t%(2*Math.PI);return e*180/Math.PI}function fa(t){var e=t%360;return e*Math.PI/180}function LM(t,e,n){if(e===void 0&&(e="kilometers"),n===void 0&&(n="kilometers"),!(t>=0))throw new Error("length must be a positive number");return x1(oy(t,e),n)}function PM(t,e,n){if(e===void 0&&(e="meters"),n===void 0&&(n="kilometers"),!(t>=0))throw new Error("area must be a positive number");var r=yv[e];if(!r)throw new Error("invalid original units");var i=yv[n];if(!i)throw new Error("invalid final units");return t/r*i}function m_(t){return!isNaN(t)&&t!==null&&!Array.isArray(t)}function w1(t){return!!t&&t.constructor===Object}function MM(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(t.length!==4&&t.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(function(e){if(!m_(e))throw new Error("bbox must only contain numbers")})}function AM(t){if(!t)throw new Error("id is required");if(["string","number"].indexOf(typeof t)===-1)throw new Error("id must be a number or a string")}const kM=Object.freeze(Object.defineProperty({__proto__:null,areaFactors:yv,bearingToAzimuth:TM,convertArea:PM,convertLength:LM,degreesToRadians:fa,earthRadius:Ro,factors:v1,feature:ga,featureCollection:Zc,geometry:bM,geometryCollection:EM,isNumber:m_,isObject:w1,lengthToDegrees:CM,lengthToRadians:oy,lineString:ha,lineStrings:SM,multiLineString:QE,multiPoint:eI,multiPolygon:tI,point:gs,points:xM,polygon:b1,polygons:wM,radiansToDegrees:Yd,radiansToLength:x1,round:IM,unitsFactors:vM,validateBBox:MM,validateId:AM},Symbol.toStringTag,{value:"Module"}));function $d(t){if(!t)throw new Error("coord is required");if(!Array.isArray(t)){if(t.type==="Feature"&&t.geometry!==null&&t.geometry.type==="Point")return t.geometry.coordinates;if(t.type==="Point")return t.coordinates}if(Array.isArray(t)&&t.length>=2&&!Array.isArray(t[0])&&!Array.isArray(t[1]))return t;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function Mf(t){if(Array.isArray(t))return t;if(t.type==="Feature"){if(t.geometry!==null)return t.geometry.coordinates}else if(t.coordinates)return t.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function yd(t,e,n){n===void 0&&(n={});var r=$d(t),i=$d(e),s=fa(i[1]-r[1]),c=fa(i[0]-r[0]),l=fa(r[1]),d=fa(i[1]),v=Math.pow(Math.sin(s/2),2)+Math.pow(Math.sin(c/2),2)*Math.cos(l)*Math.cos(d);return x1(2*Math.atan2(Math.sqrt(v),Math.sqrt(1-v)),n.units)}function vm(t,e,n){if(t!==null)for(var r,i,s,c,l,d,v,S=0,E=0,C,M=t.type,A=M==="FeatureCollection",R=M==="Feature",z=A?t.features.length:1,U=0;Ud||A>v||R>S){l=E,d=r,v=A,S=R,s=0;return}var z=ha([l,E],n.properties);if(e(z,r,i,R,s)===!1)return!1;s++,l=E})===!1)return!1}}})}function BM(t,e,n){var r=n,i=!1;return rI(t,function(s,c,l,d,v){i===!1&&n===void 0?r=s:r=e(r,s,c,l,d,v),i=!0}),r}function iI(t,e){if(!t)throw new Error("geojson is required");ap(t,function(n,r,i){if(n.geometry!==null){var s=n.geometry.type,c=n.geometry.coordinates;switch(s){case"LineString":if(e(n,r,i,0,0)===!1)return!1;break;case"Polygon":for(var l=0;li?n:i,v=r>s?r:s;return[c,l,d,v]}var E1={exports:{}},sI={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(ym,function(){function n(F,G,H,te,ee){(function fe(pe,se,Ae,Y,ae){for(;Y>Ae;){if(Y-Ae>600){var Ke=Y-Ae+1,Le=se-Ae+1,tt=Math.log(Ke),ut=.5*Math.exp(2*tt/3),He=.5*Math.sqrt(tt*ut*(Ke-ut)/Ke)*(Le-Ke/2<0?-1:1),Ot=Math.max(Ae,Math.floor(se-Le*ut/Ke+He)),Gt=Math.min(Y,Math.floor(se+(Ke-Le)*ut/Ke+He));fe(pe,se,Ot,Gt,ae)}var vt=pe[se],At=Ae,Mt=Y;for(r(pe,Ae,se),ae(pe[Y],vt)>0&&r(pe,Ae,Y);At0;)Mt--}ae(pe[Ae],vt)===0?r(pe,Ae,Mt):r(pe,++Mt,Y),Mt<=se&&(Ae=Mt+1),se<=Mt&&(Y=Mt-1)}})(F,G,H||0,te||F.length-1,ee||i)}function r(F,G,H){var te=F[G];F[G]=F[H],F[H]=te}function i(F,G){return FG?1:0}var s=function(F){F===void 0&&(F=9),this._maxEntries=Math.max(4,F),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function c(F,G,H){if(!H)return G.indexOf(F);for(var te=0;te=F.minX&&G.maxY>=F.minY}function z(F){return{children:F,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function U(F,G,H,te,ee){for(var fe=[G,H];fe.length;)if(!((H=fe.pop())-(G=fe.pop())<=te)){var pe=G+Math.ceil((H-G)/te/2)*te;n(F,pe,G,H,ee),fe.push(G,pe,pe,H)}}return s.prototype.all=function(){return this._all(this.data,[])},s.prototype.search=function(F){var G=this.data,H=[];if(!R(F,G))return H;for(var te=this.toBBox,ee=[];G;){for(var fe=0;fe=0&&ee[G].children.length>this._maxEntries;)this._split(ee,G),G--;this._adjustParentBBoxes(te,ee,G)},s.prototype._split=function(F,G){var H=F[G],te=H.children.length,ee=this._minEntries;this._chooseSplitAxis(H,ee,te);var fe=this._chooseSplitIndex(H,ee,te),pe=z(H.children.splice(fe,H.children.length-fe));pe.height=H.height,pe.leaf=H.leaf,l(H,this.toBBox),l(pe,this.toBBox),G?F[G-1].children.push(pe):this._splitRoot(H,pe)},s.prototype._splitRoot=function(F,G){this.data=z([F,G]),this.data.height=F.height+1,this.data.leaf=!1,l(this.data,this.toBBox)},s.prototype._chooseSplitIndex=function(F,G,H){for(var te,ee,fe,pe,se,Ae,Y,ae=1/0,Ke=1/0,Le=G;Le<=H-G;Le++){var tt=d(F,0,Le,this.toBBox),ut=d(F,Le,H,this.toBBox),He=(ee=tt,fe=ut,pe=void 0,se=void 0,Ae=void 0,Y=void 0,pe=Math.max(ee.minX,fe.minX),se=Math.max(ee.minY,fe.minY),Ae=Math.min(ee.maxX,fe.maxX),Y=Math.min(ee.maxY,fe.maxY),Math.max(0,Ae-pe)*Math.max(0,Y-se)),Ot=C(tt)+C(ut);He=G;ae--){var Ke=F.children[ae];v(pe,F.leaf?ee(Ke):Ke),se+=M(pe)}return se},s.prototype._adjustParentBBoxes=function(F,G,H){for(var te=H;te>=0;te--)v(G[te],F)},s.prototype._condense=function(F){for(var G=F.length-1,H=void 0;G>=0;G--)F[G].children.length===0?G>0?(H=F[G-1].children).splice(H.indexOf(F[G]),1):this.clear():l(F[G],this.toBBox)},s})})(sI);var XM=sI.exports;const YM=ry(kM),$M=ry(GM);var tw=Object.prototype.toString,aI=function(e){var n=tw.call(e),r=n==="[object Arguments]";return r||(r=n!=="[object Array]"&&e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&tw.call(e.callee)==="[object Function]"),r},U0,nw;function KM(){if(nw)return U0;nw=1;var t;if(!Object.keys){var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=aI,i=Object.prototype.propertyIsEnumerable,s=!i.call({toString:null},"toString"),c=i.call(function(){},"prototype"),l=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],d=function(C){var M=C.constructor;return M&&M.prototype===C},v={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},S=function(){if(typeof window>"u")return!1;for(var C in window)try{if(!v["$"+C]&&e.call(window,C)&&window[C]!==null&&typeof window[C]=="object")try{d(window[C])}catch{return!0}}catch{return!0}return!1}(),E=function(C){if(typeof window>"u"||!S)return d(C);try{return d(C)}catch{return!1}};t=function(M){var A=M!==null&&typeof M=="object",R=n.call(M)==="[object Function]",z=r(M),U=A&&n.call(M)==="[object String]",F=[];if(!A&&!R&&!z)throw new TypeError("Object.keys called on a non-object");var G=c&&R;if(U&&M.length>0&&!e.call(M,0))for(var H=0;H0)for(var te=0;te"u"||!Ki?qn:Ki(Uint8Array),Hc={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?qn:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?qn:ArrayBuffer,"%ArrayIteratorPrototype%":mf&&Ki?Ki([][Symbol.iterator]()):qn,"%AsyncFromSyncIteratorPrototype%":qn,"%AsyncFunction%":wf,"%AsyncGenerator%":wf,"%AsyncGeneratorFunction%":wf,"%AsyncIteratorPrototype%":wf,"%Atomics%":typeof Atomics>"u"?qn:Atomics,"%BigInt%":typeof BigInt>"u"?qn:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?qn:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?qn:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?qn:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":vA,"%eval%":eval,"%EvalError%":bA,"%Float32Array%":typeof Float32Array>"u"?qn:Float32Array,"%Float64Array%":typeof Float64Array>"u"?qn:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?qn:FinalizationRegistry,"%Function%":cI,"%GeneratorFunction%":wf,"%Int8Array%":typeof Int8Array>"u"?qn:Int8Array,"%Int16Array%":typeof Int16Array>"u"?qn:Int16Array,"%Int32Array%":typeof Int32Array>"u"?qn:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":mf&&Ki?Ki(Ki([][Symbol.iterator]())):qn,"%JSON%":typeof JSON=="object"?JSON:qn,"%Map%":typeof Map>"u"?qn:Map,"%MapIteratorPrototype%":typeof Map>"u"||!mf||!Ki?qn:Ki(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?qn:Promise,"%Proxy%":typeof Proxy>"u"?qn:Proxy,"%RangeError%":xA,"%ReferenceError%":wA,"%Reflect%":typeof Reflect>"u"?qn:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?qn:Set,"%SetIteratorPrototype%":typeof Set>"u"||!mf||!Ki?qn:Ki(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?qn:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":mf&&Ki?Ki(""[Symbol.iterator]()):qn,"%Symbol%":mf?Symbol:qn,"%SyntaxError%":Af,"%ThrowTypeError%":EA,"%TypedArray%":CA,"%TypeError%":Lf,"%Uint8Array%":typeof Uint8Array>"u"?qn:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?qn:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?qn:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?qn:Uint32Array,"%URIError%":SA,"%WeakMap%":typeof WeakMap>"u"?qn:WeakMap,"%WeakRef%":typeof WeakRef>"u"?qn:WeakRef,"%WeakSet%":typeof WeakSet>"u"?qn:WeakSet};if(Ki)try{null.error}catch(t){var TA=Ki(Ki(t));Hc["%Error.prototype%"]=TA}var LA=function t(e){var n;if(e==="%AsyncFunction%")n=G0("async function () {}");else if(e==="%GeneratorFunction%")n=G0("function* () {}");else if(e==="%AsyncGeneratorFunction%")n=G0("async function* () {}");else if(e==="%AsyncGenerator%"){var r=t("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=t("%AsyncGenerator%");i&&Ki&&(n=Ki(i.prototype))}return Hc[e]=n,n},aw={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},bm=T1,__=uI,PA=bm.call(Function.call,Array.prototype.concat),MA=bm.call(Function.apply,Array.prototype.splice),lw=bm.call(Function.call,String.prototype.replace),y_=bm.call(Function.call,String.prototype.slice),AA=bm.call(Function.call,RegExp.prototype.exec),kA=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,DA=/\\(\\)?/g,RA=function(e){var n=y_(e,0,1),r=y_(e,-1);if(n==="%"&&r!=="%")throw new Af("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Af("invalid intrinsic syntax, expected opening `%`");var i=[];return lw(e,kA,function(s,c,l,d){i[i.length]=l?lw(d,DA,"$1"):c||s}),i},NA=function(e,n){var r=e,i;if(__(aw,r)&&(i=aw[r],r="%"+i[0]+"%"),__(Hc,r)){var s=Hc[r];if(s===wf&&(s=LA(r)),typeof s>"u"&&!n)throw new Lf("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:s}}throw new Af("intrinsic "+e+" does not exist!")},Dl=function(e,n){if(typeof e!="string"||e.length===0)throw new Lf("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Lf('"allowMissing" argument must be a boolean');if(AA(/^%?[^%]*%?$/,e)===null)throw new Af("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=RA(e),i=r.length>0?r[0]:"",s=NA("%"+i+"%",n),c=s.name,l=s.value,d=!1,v=s.alias;v&&(i=v[0],MA(r,PA([0,1],v)));for(var S=1,E=!0;S=r.length){var R=Wc(l,C);E=!!R,E&&"get"in R&&!("originalValue"in R.get)?l=R.get:l=l[C]}else E=__(l,C),l=l[C];E&&!d&&(Hc[c]=l)}}return l},W0,uw;function L1(){if(uw)return W0;uw=1;var t=Dl,e=t("%Object.defineProperty%",!0)||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return W0=e,W0}var OA=Dl,t_=OA("%Object.getOwnPropertyDescriptor%",!0);if(t_)try{t_([],"length")}catch{t_=null}var P1=t_,cw=L1(),zA=lI,gf=uc,hw=P1,M1=function(e,n,r){if(!e||typeof e!="object"&&typeof e!="function")throw new gf("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new gf("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new gf("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new gf("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new gf("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new gf("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,l=arguments.length>6?arguments[6]:!1,d=!!hw&&hw(e,n);if(cw)cw(e,n,{configurable:c===null&&d?d.configurable:!c,enumerable:i===null&&d?d.enumerable:!i,value:r,writable:s===null&&d?d.writable:!s});else if(l||!i&&!s&&!c)e[n]=r;else throw new zA("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},vv=L1(),hI=function(){return!!vv};hI.hasArrayLengthDefineBug=function(){if(!vv)return null;try{return vv([],"length",{value:1}).length!==1}catch{return!0}};var A1=hI,FA=I1,BA=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",VA=Object.prototype.toString,UA=Array.prototype.concat,fw=M1,jA=function(t){return typeof t=="function"&&VA.call(t)==="[object Function]"},fI=A1(),GA=function(t,e,n,r){if(e in t){if(r===!0){if(t[e]===n)return}else if(!jA(r)||!r())return}fI?fw(t,e,n,!0):fw(t,e,n)},pI=function(t,e){var n=arguments.length>2?arguments[2]:{},r=FA(e);BA&&(r=UA.call(r,Object.getOwnPropertySymbols(e)));for(var i=0;i4294967295||HA(n)!==n)throw new mw("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],i=!0,s=!0;if("length"in e&&dw){var c=dw(e,"length");c&&!c.configurable&&(i=!1),c&&!c.writable&&(s=!1)}return(i||s||!r)&&(WA?pw(e,"length",n,!0,!0):pw(e,"length",n)),e};(function(t){var e=T1,n=Dl,r=ZA,i=uc,s=n("%Function.prototype.apply%"),c=n("%Function.prototype.call%"),l=n("%Reflect.apply%",!0)||e.call(c,s),d=L1(),v=n("%Math.max%");t.exports=function(C){if(typeof C!="function")throw new i("a function is required");var M=l(e,c,arguments);return r(M,1+v(0,C.length-(arguments.length-1)),!0)};var S=function(){return l(e,s,arguments)};d?d(t.exports,"apply",{value:S}):t.exports.apply=S})(dI);var lp=dI.exports,mI=Dl,gI=lp,XA=gI(mI("String.prototype.indexOf")),Ta=function(e,n){var r=mI(e,!!n);return typeof r=="function"&&XA(e,".prototype.")>-1?gI(r):r},YA=I1,_I=sy(),yI=Ta,gw=Object,$A=yI("Array.prototype.push"),_w=yI("Object.prototype.propertyIsEnumerable"),KA=_I?Object.getOwnPropertySymbols:null,vI=function(e,n){if(e==null)throw new TypeError("target must be an object");var r=gw(e);if(arguments.length===1)return r;for(var i=1;i2&&!!arguments[2];return(!r||fk)&&(hk?yw(e,"name",n,!0,!0):yw(e,"name",n)),e},mk=dk,gk=uc,_k=Object,SI=mk(function(){if(this==null||this!==_k(this))throw new gk("RegExp.prototype.flags getter called on non-object");var e="";return this.hasIndices&&(e+="d"),this.global&&(e+="g"),this.ignoreCase&&(e+="i"),this.multiline&&(e+="m"),this.dotAll&&(e+="s"),this.unicode&&(e+="u"),this.unicodeSets&&(e+="v"),this.sticky&&(e+="y"),e},"get flags",!0),yk=SI,vk=lh.supportsDescriptors,bk=Object.getOwnPropertyDescriptor,EI=function(){if(vk&&/a/mig.flags==="gim"){var e=bk(RegExp.prototype,"flags");if(e&&typeof e.get=="function"&&typeof RegExp.prototype.dotAll=="boolean"&&typeof RegExp.prototype.hasIndices=="boolean"){var n="",r={};if(Object.defineProperty(r,"hasIndices",{get:function(){n+="d"}}),Object.defineProperty(r,"sticky",{get:function(){n+="y"}}),n==="dy")return e.get}}return yk},xk=lh.supportsDescriptors,wk=EI,Sk=Object.getOwnPropertyDescriptor,Ek=Object.defineProperty,Ik=TypeError,vw=Object.getPrototypeOf,Ck=/a/,Tk=function(){if(!xk||!vw)throw new Ik("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var e=wk(),n=vw(Ck),r=Sk(n,"flags");return(!r||r.get!==e)&&Ek(n,"flags",{configurable:!0,enumerable:!1,get:e}),e},Lk=lh,Pk=lp,Mk=SI,II=EI,Ak=Tk,CI=Pk(II());Lk(CI,{getPolyfill:II,implementation:Mk,shim:Ak});var kk=CI,n_={exports:{}},Dk=sy,uh=function(){return Dk()&&!!Symbol.toStringTag},Rk=uh(),Nk=Ta,bv=Nk("Object.prototype.toString"),ay=function(e){return Rk&&e&&typeof e=="object"&&Symbol.toStringTag in e?!1:bv(e)==="[object Arguments]"},TI=function(e){return ay(e)?!0:e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&bv(e)!=="[object Array]"&&bv(e.callee)==="[object Function]"},Ok=function(){return ay(arguments)}();ay.isLegacyArguments=TI;var LI=Ok?ay:TI;const zk={},Fk=Object.freeze(Object.defineProperty({__proto__:null,default:zk},Symbol.toStringTag,{value:"Module"})),Bk=ry(Fk);var k1=typeof Map=="function"&&Map.prototype,Z0=Object.getOwnPropertyDescriptor&&k1?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,v_=k1&&Z0&&typeof Z0.get=="function"?Z0.get:null,bw=k1&&Map.prototype.forEach,D1=typeof Set=="function"&&Set.prototype,X0=Object.getOwnPropertyDescriptor&&D1?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,b_=D1&&X0&&typeof X0.get=="function"?X0.get:null,xw=D1&&Set.prototype.forEach,Vk=typeof WeakMap=="function"&&WeakMap.prototype,Gd=Vk?WeakMap.prototype.has:null,Uk=typeof WeakSet=="function"&&WeakSet.prototype,qd=Uk?WeakSet.prototype.has:null,jk=typeof WeakRef=="function"&&WeakRef.prototype,ww=jk?WeakRef.prototype.deref:null,Gk=Boolean.prototype.valueOf,qk=Object.prototype.toString,Wk=Function.prototype.toString,Hk=String.prototype.match,R1=String.prototype.slice,Xu=String.prototype.replace,Zk=String.prototype.toUpperCase,Sw=String.prototype.toLowerCase,PI=RegExp.prototype.test,Ew=Array.prototype.concat,bl=Array.prototype.join,Xk=Array.prototype.slice,Iw=Math.floor,xv=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Y0=Object.getOwnPropertySymbols,wv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,kf=typeof Symbol=="function"&&typeof Symbol.iterator=="object",zo=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===kf||"symbol")?Symbol.toStringTag:null,MI=Object.prototype.propertyIsEnumerable,Cw=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function Tw(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||PI.call(/e/,e))return e;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var r=t<0?-Iw(-t):Iw(t);if(r!==t){var i=String(r),s=R1.call(e,i.length+1);return Xu.call(i,n,"$&_")+"."+Xu.call(Xu.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Xu.call(e,n,"$&_")}var Sv=Bk,Lw=Sv.custom,Pw=kI(Lw)?Lw:null,Yk=function t(e,n,r,i){var s=n||{};if(Wu(s,"quoteStyle")&&s.quoteStyle!=="single"&&s.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Wu(s,"maxStringLength")&&(typeof s.maxStringLength=="number"?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var c=Wu(s,"customInspect")?s.customInspect:!0;if(typeof c!="boolean"&&c!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Wu(s,"indent")&&s.indent!==null&&s.indent!==" "&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Wu(s,"numericSeparator")&&typeof s.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var l=s.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return RI(e,s);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var d=String(e);return l?Tw(e,d):d}if(typeof e=="bigint"){var v=String(e)+"n";return l?Tw(e,v):v}var S=typeof s.depth>"u"?5:s.depth;if(typeof r>"u"&&(r=0),r>=S&&S>0&&typeof e=="object")return Ev(e)?"[Array]":"[Object]";var E=p3(s,r);if(typeof i>"u")i=[];else if(DI(i,e)>=0)return"[Circular]";function C(Ke,Le,tt){if(Le&&(i=Xk.call(i),i.push(Le)),tt){var ut={depth:s.depth};return Wu(s,"quoteStyle")&&(ut.quoteStyle=s.quoteStyle),t(Ke,ut,r+1,i)}return t(Ke,s,r+1,i)}if(typeof e=="function"&&!Mw(e)){var M=i3(e),A=Fg(e,C);return"[Function"+(M?": "+M:" (anonymous)")+"]"+(A.length>0?" { "+bl.call(A,", ")+" }":"")}if(kI(e)){var R=kf?Xu.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):wv.call(e);return typeof e=="object"&&!kf?vd(R):R}if(c3(e)){for(var z="<"+Sw.call(String(e.nodeName)),U=e.attributes||[],F=0;F",z}if(Ev(e)){if(e.length===0)return"[]";var G=Fg(e,C);return E&&!f3(G)?"["+Iv(G,E)+"]":"[ "+bl.call(G,", ")+" ]"}if(Jk(e)){var H=Fg(e,C);return!("cause"in Error.prototype)&&"cause"in e&&!MI.call(e,"cause")?"{ ["+String(e)+"] "+bl.call(Ew.call("[cause]: "+C(e.cause),H),", ")+" }":H.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+bl.call(H,", ")+" }"}if(typeof e=="object"&&c){if(Pw&&typeof e[Pw]=="function"&&Sv)return Sv(e,{depth:S-r});if(c!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(o3(e)){var te=[];return bw&&bw.call(e,function(Ke,Le){te.push(C(Le,e,!0)+" => "+C(Ke,e))}),Aw("Map",v_.call(e),te,E)}if(l3(e)){var ee=[];return xw&&xw.call(e,function(Ke){ee.push(C(Ke,e))}),Aw("Set",b_.call(e),ee,E)}if(s3(e))return $0("WeakMap");if(u3(e))return $0("WeakSet");if(a3(e))return $0("WeakRef");if(e3(e))return vd(C(Number(e)));if(n3(e))return vd(C(xv.call(e)));if(t3(e))return vd(Gk.call(e));if(Qk(e))return vd(C(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(e===ym)return"{ [object globalThis] }";if(!Kk(e)&&!Mw(e)){var fe=Fg(e,C),pe=Cw?Cw(e)===Object.prototype:e instanceof Object||e.constructor===Object,se=e instanceof Object?"":"null prototype",Ae=!pe&&zo&&Object(e)===e&&zo in e?R1.call(cc(e),8,-1):se?"Object":"",Y=pe||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",ae=Y+(Ae||se?"["+bl.call(Ew.call([],Ae||[],se||[]),": ")+"] ":"");return fe.length===0?ae+"{}":E?ae+"{"+Iv(fe,E)+"}":ae+"{ "+bl.call(fe,", ")+" }"}return String(e)};function AI(t,e,n){var r=(n.quoteStyle||e)==="double"?'"':"'";return r+t+r}function $k(t){return Xu.call(String(t),/"/g,""")}function Ev(t){return cc(t)==="[object Array]"&&(!zo||!(typeof t=="object"&&zo in t))}function Kk(t){return cc(t)==="[object Date]"&&(!zo||!(typeof t=="object"&&zo in t))}function Mw(t){return cc(t)==="[object RegExp]"&&(!zo||!(typeof t=="object"&&zo in t))}function Jk(t){return cc(t)==="[object Error]"&&(!zo||!(typeof t=="object"&&zo in t))}function Qk(t){return cc(t)==="[object String]"&&(!zo||!(typeof t=="object"&&zo in t))}function e3(t){return cc(t)==="[object Number]"&&(!zo||!(typeof t=="object"&&zo in t))}function t3(t){return cc(t)==="[object Boolean]"&&(!zo||!(typeof t=="object"&&zo in t))}function kI(t){if(kf)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!wv)return!1;try{return wv.call(t),!0}catch{}return!1}function n3(t){if(!t||typeof t!="object"||!xv)return!1;try{return xv.call(t),!0}catch{}return!1}var r3=Object.prototype.hasOwnProperty||function(t){return t in this};function Wu(t,e){return r3.call(t,e)}function cc(t){return qk.call(t)}function i3(t){if(t.name)return t.name;var e=Hk.call(Wk.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function DI(t,e){if(t.indexOf)return t.indexOf(e);for(var n=0,r=t.length;ne.maxStringLength){var n=t.length-e.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return RI(R1.call(t,0,e.maxStringLength),e)+r}var i=Xu.call(Xu.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,h3);return AI(i,"single",e)}function h3(t){var e=t.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return n?"\\"+n:"\\x"+(e<16?"0":"")+Zk.call(e.toString(16))}function vd(t){return"Object("+t+")"}function $0(t){return t+" { ? }"}function Aw(t,e,n,r){var i=r?Iv(n,r):bl.call(n,", ");return t+" ("+e+") {"+i+"}"}function f3(t){for(var e=0;e=0)return!1;return!0}function p3(t,e){var n;if(t.indent===" ")n=" ";else if(typeof t.indent=="number"&&t.indent>0)n=bl.call(Array(t.indent+1)," ");else return null;return{base:n,prev:bl.call(Array(e+1),n)}}function Iv(t,e){if(t.length===0)return"";var n=` `+e.prev+e.base;return n+bl.call(t,","+n)+` -`+e.prev}function Fg(t,e){var n=Sv(t),r=[];if(n){r.length=t.length;for(var i=0;i=r)return n+1;var i=zw(e,n);if(i<55296||i>56319)return n+1;var s=zw(e,n+1);return s<56320||s>57343?n+1:n+2},K0=function(e){var n=0;return{next:function(){var i=n>=e.length,s;return i||(s=e[n],n+=1),{done:i,value:s}}}},Fw=function(e,n){if(O3(e)||Dw(e))return K0(e);if(z3(e)){var r=0;return{next:function(){var s=U3(e,r),c=V3(e,r,s);return r=s,{done:s>e.length,value:c}}}}if(n&&typeof e["_es6-shim iterator_"]<"u")return e["_es6-shim iterator_"]()};if(!F3&&!B3)n_.exports=function(e){if(e!=null)return Fw(e,!0)};else{var j3=FI,G3=VI,Bw=Fa("Map.prototype.forEach",!0),Vw=Fa("Set.prototype.forEach",!0);if(typeof process>"u"||!process.versions||!process.versions.node)var Uw=Fa("Map.prototype.iterator",!0),jw=Fa("Set.prototype.iterator",!0);var Gw=Fa("Map.prototype.@@iterator",!0)||Fa("Map.prototype._es6-shim iterator_",!0),qw=Fa("Set.prototype.@@iterator",!0)||Fa("Set.prototype._es6-shim iterator_",!0),q3=function(e){if(j3(e)){if(Uw)return Rw(Uw(e));if(Gw)return Gw(e);if(Bw){var n=[];return Bw(e,function(i,s){Ow(n,[s,i])}),K0(n)}}if(G3(e)){if(jw)return Rw(jw(e));if(qw)return qw(e);if(Vw){var r=[];return Vw(e,function(i){Ow(r,i)}),K0(r)}}};n_.exports=function(e){return q3(e)||Fw(e)}}}var W3=n_.exports,Ww=function(t){return t!==t},UI=function(e,n){return e===0&&n===0?1/e===1/n:!!(e===n||Ww(e)&&Ww(n))},H3=UI,jI=function(){return typeof Object.is=="function"?Object.is:H3},Z3=jI,X3=lh,Y3=function(){var e=Z3();return X3(Object,{is:e},{is:function(){return Object.is!==e}}),e},$3=lh,K3=lp,J3=UI,GI=jI,Q3=Y3,qI=K3(GI(),Object);$3(qI,{getPolyfill:GI,implementation:J3,shim:Q3});var e4=qI,t4=lp,WI=Ta,n4=Dl,Iv=n4("%ArrayBuffer%",!0),r_=WI("ArrayBuffer.prototype.byteLength",!0),r4=WI("Object.prototype.toString"),Hw=!!Iv&&!r_&&new Iv(0).slice,Zw=!!Hw&&t4(Hw),HI=r_||Zw?function(e){if(!e||typeof e!="object")return!1;try{return r_?r_(e):Zw(e,0),!0}catch{return!1}}:Iv?function(e){return r4(e)==="[object ArrayBuffer]"}:function(e){return!1},i4=Date.prototype.getDay,o4=function(e){try{return i4.call(e),!0}catch{return!1}},s4=Object.prototype.toString,a4="[object Date]",l4=uh(),u4=function(e){return typeof e!="object"||e===null?!1:l4?o4(e):s4.call(e)===a4},Cv=Ta,ZI=uh(),XI,YI,Tv,Lv;if(ZI){XI=Cv("Object.prototype.hasOwnProperty"),YI=Cv("RegExp.prototype.exec"),Tv={};var J0=function(){throw Tv};Lv={toString:J0,valueOf:J0},typeof Symbol.toPrimitive=="symbol"&&(Lv[Symbol.toPrimitive]=J0)}var c4=Cv("Object.prototype.toString"),h4=Object.getOwnPropertyDescriptor,f4="[object RegExp]",p4=ZI?function(e){if(!e||typeof e!="object")return!1;var n=h4(e,"lastIndex"),r=n&&XI(n,"value");if(!r)return!1;try{YI(e,Lv)}catch(i){return i===Tv}}:function(e){return!e||typeof e!="object"&&typeof e!="function"?!1:c4(e)===f4},d4=Ta,Xw=d4("SharedArrayBuffer.prototype.byteLength",!0),m4=Xw?function(e){if(!e||typeof e!="object")return!1;try{return Xw(e),!0}catch{return!1}}:function(e){return!1},g4=Number.prototype.toString,_4=function(e){try{return g4.call(e),!0}catch{return!1}},y4=Object.prototype.toString,v4="[object Number]",b4=uh(),x4=function(e){return typeof e=="number"?!0:typeof e!="object"?!1:b4?_4(e):y4.call(e)===v4},$I=Ta,w4=$I("Boolean.prototype.toString"),S4=$I("Object.prototype.toString"),E4=function(e){try{return w4(e),!0}catch{return!1}},I4="[object Boolean]",C4=uh(),T4=function(e){return typeof e=="boolean"?!0:e===null||typeof e!="object"?!1:C4&&Symbol.toStringTag in e?E4(e):S4(e)===I4},Pv={exports:{}},L4=Object.prototype.toString,P4=E1();if(P4){var M4=Symbol.prototype.toString,A4=/^Symbol\(.*\)$/,k4=function(e){return typeof e.valueOf()!="symbol"?!1:A4.test(M4.call(e))};Pv.exports=function(e){if(typeof e=="symbol")return!0;if(L4.call(e)!=="[object Symbol]")return!1;try{return k4(e)}catch{return!1}}}else Pv.exports=function(e){return!1};var D4=Pv.exports,Mv={exports:{}},Yw=typeof BigInt<"u"&&BigInt,R4=function(){return typeof Yw=="function"&&typeof BigInt=="function"&&typeof Yw(42)=="bigint"&&typeof BigInt(42)=="bigint"},N4=R4();if(N4){var O4=BigInt.prototype.valueOf,z4=function(e){try{return O4.call(e),!0}catch{}return!1};Mv.exports=function(e){return e===null||typeof e>"u"||typeof e=="boolean"||typeof e=="string"||typeof e=="number"||typeof e=="symbol"||typeof e=="function"?!1:typeof e=="bigint"?!0:z4(e)}}else Mv.exports=function(e){return!1};var F4=Mv.exports,B4=OI,V4=x4,U4=T4,j4=D4,G4=F4,q4=function(e){if(e==null||typeof e!="object"&&typeof e!="function")return null;if(B4(e))return"String";if(V4(e))return"Number";if(U4(e))return"Boolean";if(j4(e))return"Symbol";if(G4(e))return"BigInt"},S_=typeof WeakMap=="function"&&WeakMap.prototype?WeakMap:null,$w=typeof WeakSet=="function"&&WeakSet.prototype?WeakSet:null,E_;S_||(E_=function(e){return!1});var Av=S_?S_.prototype.has:null,Q0=$w?$w.prototype.has:null;!E_&&!Av&&(E_=function(e){return!1});var W4=E_||function(e){if(!e||typeof e!="object")return!1;try{if(Av.call(e,Av),Q0)try{Q0.call(e,Q0)}catch{return!0}return e instanceof S_}catch{}return!1},kv={exports:{}},H4=Dl,KI=Ta,Z4=H4("%WeakSet%",!0),ev=KI("WeakSet.prototype.has",!0);if(ev){var tv=KI("WeakMap.prototype.has",!0);kv.exports=function(e){if(!e||typeof e!="object")return!1;try{if(ev(e,ev),tv)try{tv(e,tv)}catch{return!0}return e instanceof Z4}catch{}return!1}}else kv.exports=function(e){return!1};var X4=kv.exports,Y4=FI,$4=VI,K4=W4,J4=X4,Q4=function(e){if(e&&typeof e=="object"){if(Y4(e))return"Map";if($4(e))return"Set";if(K4(e))return"WeakMap";if(J4(e))return"WeakSet"}return!1},JI=Function.prototype.toString,Ef=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,Dv,i_;if(typeof Ef=="function"&&typeof Object.defineProperty=="function")try{Dv=Object.defineProperty({},"length",{get:function(){throw i_}}),i_={},Ef(function(){throw 42},null,Dv)}catch(t){t!==i_&&(Ef=null)}else Ef=null;var eD=/^\s*class\b/,Rv=function(e){try{var n=JI.call(e);return eD.test(n)}catch{return!1}},nv=function(e){try{return Rv(e)?!1:(JI.call(e),!0)}catch{return!1}},o_=Object.prototype.toString,tD="[object Object]",nD="[object Function]",rD="[object GeneratorFunction]",iD="[object HTMLAllCollection]",oD="[object HTML document.all class]",sD="[object HTMLCollection]",aD=typeof Symbol=="function"&&!!Symbol.toStringTag,lD=!(0 in[,]),Nv=function(){return!1};if(typeof document=="object"){var uD=document.all;o_.call(uD)===o_.call(document.all)&&(Nv=function(e){if((lD||!e)&&(typeof e>"u"||typeof e=="object"))try{var n=o_.call(e);return(n===iD||n===oD||n===sD||n===tD)&&e("")==null}catch{}return!1})}var cD=Ef?function(e){if(Nv(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{Ef(e,null,Dv)}catch(n){if(n!==i_)return!1}return!Rv(e)&&nv(e)}:function(e){if(Nv(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(aD)return nv(e);if(Rv(e))return!1;var n=o_.call(e);return n!==nD&&n!==rD&&!/^\[object HTML/.test(n)?!1:nv(e)},hD=cD,fD=Object.prototype.toString,QI=Object.prototype.hasOwnProperty,pD=function(e,n,r){for(var i=0,s=e.length;i=3&&(i=r),fD.call(e)==="[object Array]"?pD(e,n,i):typeof e=="string"?dD(e,n,i):mD(e,n,i)},_D=gD,yD=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"],rv=yD,vD=typeof globalThis>"u"?ym:globalThis,bD=function(){for(var e=[],n=0;n"u"?ym:globalThis,Ov=xD(),F1=z1("String.prototype.slice"),iv=Object.getPrototypeOf,SD=z1("Array.prototype.indexOf",!0)||function(e,n){for(var r=0;r-1?n:n!=="Object"?!1:ID(e)}return s_?ED(e):null},TD=Ta,Qw=TD("ArrayBuffer.prototype.byteLength",!0),LD=HI,PD=function(e){return LD(e)?Qw?Qw(e):e.byteLength:NaN},tC=ak,Rl=Ta,e2=Ak,MD=Dl,Df=W3,AD=RI,t2=e4,n2=CI,r2=NI,i2=HI,o2=u4,s2=p4,a2=m4,l2=S1,u2=q4,c2=Q4,h2=CD,f2=PD,p2=Rl("SharedArrayBuffer.prototype.byteLength",!0),d2=Rl("Date.prototype.getTime"),ov=Object.getPrototypeOf,m2=Rl("Object.prototype.toString"),T_=MD("%Set%",!0),zv=Rl("Map.prototype.has",!0),L_=Rl("Map.prototype.get",!0),g2=Rl("Map.prototype.size",!0),P_=Rl("Set.prototype.add",!0),nC=Rl("Set.prototype.delete",!0),M_=Rl("Set.prototype.has",!0),a_=Rl("Set.prototype.size",!0);function _2(t,e,n,r){for(var i=Df(t),s;(s=i.next())&&!s.done;)if(ja(e,s.value,n,r))return nC(t,s.value),!0;return!1}function rC(t){if(typeof t>"u")return null;if(typeof t!="object")return typeof t=="symbol"?!1:typeof t=="string"||typeof t=="number"?+t==+t:!0}function kD(t,e,n,r,i,s){var c=rC(n);if(c!=null)return c;var l=L_(e,c),d=tC({},i,{strict:!1});return typeof l>"u"&&!zv(e,c)||!ja(r,l,d,s)?!1:!zv(t,c)&&ja(r,l,d,s)}function DD(t,e,n){var r=rC(n);return r??(M_(e,r)&&!M_(t,r))}function y2(t,e,n,r,i,s){for(var c=Df(t),l,d;(l=c.next())&&!l.done;)if(d=l.value,ja(n,d,i,s)&&ja(r,L_(e,d),i,s))return nC(t,d),!0;return!1}function ja(t,e,n,r){var i=n||{};if(i.strict?t2(t,e):t===e)return!0;var s=u2(t),c=u2(e);if(s!==c)return!1;if(!t||!e||typeof t!="object"&&typeof e!="object")return i.strict?t2(t,e):t==e;var l=r.has(t),d=r.has(e),v;if(l&&d){if(r.get(t)===r.get(e))return!0}else v={};return l||r.set(t,v),d||r.set(e,v),OD(t,e,i,r)}function v2(t){return!t||typeof t!="object"||typeof t.length!="number"||typeof t.copy!="function"||typeof t.slice!="function"||t.length>0&&typeof t[0]!="number"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))}function RD(t,e,n,r){if(a_(t)!==a_(e))return!1;for(var i=Df(t),s=Df(e),c,l,d;(c=i.next())&&!c.done;)if(c.value&&typeof c.value=="object")d||(d=new T_),P_(d,c.value);else if(!M_(e,c.value)){if(n.strict||!DD(t,e,c.value))return!1;d||(d=new T_),P_(d,c.value)}if(d){for(;(l=s.next())&&!l.done;)if(l.value&&typeof l.value=="object"){if(!_2(d,l.value,n.strict,r))return!1}else if(!n.strict&&!M_(t,l.value)&&!_2(d,l.value,n.strict,r))return!1;return a_(d)===0}return!0}function ND(t,e,n,r){if(g2(t)!==g2(e))return!1;for(var i=Df(t),s=Df(e),c,l,d,v,S,E;(c=i.next())&&!c.done;)if(v=c.value[0],S=c.value[1],v&&typeof v=="object")d||(d=new T_),P_(d,v);else if(E=L_(e,v),typeof E>"u"&&!zv(e,v)||!ja(S,E,n,r)){if(n.strict||!kD(t,e,v,S,n,r))return!1;d||(d=new T_),P_(d,v)}if(d){for(;(l=s.next())&&!l.done;)if(v=l.value[0],E=l.value[1],v&&typeof v=="object"){if(!y2(d,t,v,E,n,r))return!1}else if(!n.strict&&(!t.has(v)||!ja(L_(t,v),E,n,r))&&!y2(d,t,v,E,tC({},n,{strict:!1}),r))return!1;return a_(d)===0}return!0}function OD(t,e,n,r){var i,s;if(typeof t!=typeof e||t==null||e==null||m2(t)!==m2(e)||n2(t)!==n2(e))return!1;var c=r2(t),l=r2(e);if(c!==l)return!1;var d=t instanceof Error,v=e instanceof Error;if(d!==v||(d||v)&&(t.name!==e.name||t.message!==e.message))return!1;var S=s2(t),E=s2(e);if(S!==E||(S||E)&&(t.source!==e.source||e2(t)!==e2(e)))return!1;var C=o2(t),M=o2(e);if(C!==M||(C||M)&&d2(t)!==d2(e)||n.strict&&ov&&ov(t)!==ov(e))return!1;var A=h2(t),R=h2(e);if(A!==R)return!1;if(A||R){if(t.length!==e.length)return!1;for(i=0;i=0;i--)if(ee[i]!=fe[i])return!1;for(i=ee.length-1;i>=0;i--)if(s=ee[i],!ja(t[s],e[s],n,r))return!1;var pe=c2(t),se=c2(e);return pe!==se?!1:pe==="Set"||se==="Set"?RD(t,e,n,r):pe==="Map"?ND(t,e,n,r):!0}var zD=function(e,n,r){return ja(e,n,r,AD())};const iC=g1(zD);var FD=Object.defineProperty,pr=(t,e)=>FD(t,"name",{value:e,configurable:!0}),BD=class{constructor(e){this.direction=!1,this.compareProperties=!0;var n,r,i;this.precision=10**-((n=e==null?void 0:e.precision)!=null?n:17),this.direction=(r=e==null?void 0:e.direction)!=null?r:!1,this.compareProperties=(i=e==null?void 0:e.compareProperties)!=null?i:!0}compare(e,n){if(e.type!==n.type||!Dd(e,n))return!1;switch(e.type){case"Point":return this.compareCoord(e.coordinates,n.coordinates);case"LineString":return this.compareLine(e.coordinates,n.coordinates);case"Polygon":return this.comparePolygon(e,n);case"GeometryCollection":return this.compareGeometryCollection(e,n);case"Feature":return this.compareFeature(e,n);case"FeatureCollection":return this.compareFeatureCollection(e,n);default:if(e.type.startsWith("Multi")){const r=Fv(e),i=Fv(n);return r.every(s=>i.some(c=>this.compare(s,c)))}}return!1}compareCoord(e,n){return e.length===n.length&&e.every((r,i)=>Math.abs(r-n[i])=0&&(r=[].concat(e.slice(i,e.length),e.slice(1,i+1))),r}comparePath(e,n){return e.every((r,i)=>this.compareCoord(r,n[i]))}comparePolygon(e,n){if(this.compareLine(e.coordinates[0],n.coordinates[0],1,!0)){const r=e.coordinates.slice(1,e.coordinates.length),i=n.coordinates.slice(1,n.coordinates.length);return r.every(s=>i.some(c=>this.compareLine(s,c,1,!0)))}return!1}compareGeometryCollection(e,n){return Dd(e.geometries,n.geometries)&&this.compareBBox(e,n)&&e.geometries.every((r,i)=>this.compare(r,n.geometries[i]))}compareFeature(e,n){return e.id===n.id&&(this.compareProperties?iC(e.properties,n.properties):!0)&&this.compareBBox(e,n)&&this.compare(e.geometry,n.geometry)}compareFeatureCollection(e,n){return Dd(e.features,n.features)&&this.compareBBox(e,n)&&e.features.every((r,i)=>this.compare(r,n.features[i]))}compareBBox(e,n){return!e.bbox&&!n.bbox||(e.bbox&&n.bbox?this.compareCoord(e.bbox,n.bbox):!1)}};pr(BD,"GeojsonEquality");function Dd(t,e){return t.coordinates?t.coordinates.length===e.coordinates.length:t.length===e.length}pr(Dd,"sameLength");function Fv(t){return t.coordinates.map(e=>({type:t.type.replace("Multi",""),coordinates:e}))}pr(Fv,"explode");var Os=63710088e-1,oC={centimeters:Os*100,centimetres:Os*100,degrees:360/(2*Math.PI),feet:Os*3.28084,inches:Os*39.37,kilometers:Os/1e3,kilometres:Os/1e3,meters:Os,metres:Os,miles:Os/1609.344,millimeters:Os*1e3,millimetres:Os*1e3,nauticalmiles:Os/1852,radians:1,yards:Os*1.0936},b2={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:29155334959812285e-23,millimeters:1e6,millimetres:1e6,yards:1.195990046};function Cl(t,e,n={}){const r={type:"Feature"};return(n.id===0||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}pr(Cl,"feature");function VD(t,e,n={}){switch(t){case"Point":return tu(e).geometry;case"LineString":return iu(e).geometry;case"Polygon":return B1(e).geometry;case"MultiPoint":return aC(e).geometry;case"MultiLineString":return sC(e).geometry;case"MultiPolygon":return lC(e).geometry;default:throw new Error(t+" is invalid")}}pr(VD,"geometry");function tu(t,e,n={}){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!A_(t[0])||!A_(t[1]))throw new Error("coordinates must contain numbers");return Cl({type:"Point",coordinates:t},e,n)}pr(tu,"point");function UD(t,e,n={}){return ay(t.map(r=>tu(r,e)),n)}pr(UD,"points");function B1(t,e,n={}){for(const i of t){if(i.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(i[i.length-1].length!==i[0].length)throw new Error("First and last Position are not equivalent.");for(let s=0;sB1(r,e)),n)}pr(jD,"polygons");function iu(t,e,n={}){if(t.length<2)throw new Error("coordinates must be an array of two or more positions");return Cl({type:"LineString",coordinates:t},e,n)}pr(iu,"lineString");function GD(t,e,n={}){return ay(t.map(r=>iu(r,e)),n)}pr(GD,"lineStrings");function ay(t,e={}){const n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}pr(ay,"featureCollection");function sC(t,e,n={}){return Cl({type:"MultiLineString",coordinates:t},e,n)}pr(sC,"multiLineString");function aC(t,e,n={}){return Cl({type:"MultiPoint",coordinates:t},e,n)}pr(aC,"multiPoint");function lC(t,e,n={}){return Cl({type:"MultiPolygon",coordinates:t},e,n)}pr(lC,"multiPolygon");function qD(t,e,n={}){return Cl({type:"GeometryCollection",geometries:t},e,n)}pr(qD,"geometryCollection");function WD(t,e=0){if(e&&!(e>=0))throw new Error("precision must be a positive number");const n=Math.pow(10,e||0);return Math.round(t*n)/n}pr(WD,"round");function uC(t,e="kilometers"){const n=oC[e];if(!n)throw new Error(e+" units is invalid");return t*n}pr(uC,"radiansToLength");function V1(t,e="kilometers"){const n=oC[e];if(!n)throw new Error(e+" units is invalid");return t/n}pr(V1,"lengthToRadians");function HD(t,e){return cC(V1(t,e))}pr(HD,"lengthToDegrees");function ZD(t){let e=t%360;return e<0&&(e+=360),e}pr(ZD,"bearingToAzimuth");function cC(t){return t%(2*Math.PI)*180/Math.PI}pr(cC,"radiansToDegrees");function XD(t){return t%360*Math.PI/180}pr(XD,"degreesToRadians");function YD(t,e="kilometers",n="kilometers"){if(!(t>=0))throw new Error("length must be a positive number");return uC(V1(t,e),n)}pr(YD,"convertLength");function $D(t,e="meters",n="kilometers"){if(!(t>=0))throw new Error("area must be a positive number");const r=b2[e];if(!r)throw new Error("invalid original units");const i=b2[n];if(!i)throw new Error("invalid final units");return t/r*i}pr($D,"convertArea");function A_(t){return!isNaN(t)&&t!==null&&!Array.isArray(t)}pr(A_,"isNumber");function U1(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}pr(U1,"isObject");function KD(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(t.length!==4&&t.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(e=>{if(!A_(e))throw new Error("bbox must only contain numbers")})}pr(KD,"validateBBox");function JD(t){if(!t)throw new Error("id is required");if(["string","number"].indexOf(typeof t)===-1)throw new Error("id must be a number or a string")}pr(JD,"validateId");var QD=Object.defineProperty,wo=(t,e)=>QD(t,"name",{value:e,configurable:!0});function cp(t,e,n){if(t!==null)for(var r,i,s,c,l,d,v,S=0,E=0,C,M=t.type,A=M==="FeatureCollection",R=M==="Feature",z=A?t.features.length:1,U=0;Ud||A>v||R>S){l=E,d=r,v=A,S=R,s=0;return}var z=iu([l,E],n.properties);if(e(z,r,i,R,s)===!1)return!1;s++,l=E})===!1)return!1}}})}wo(pC,"segmentEach");function sR(t,e,n){var r=n,i=!1;return pC(t,function(s,c,l,d,v){i===!1&&n===void 0?r=s:r=e(r,s,c,l,d,v),i=!0}),r}wo(sR,"segmentReduce");function dC(t,e){if(!t)throw new Error("geojson is required");ly(t,function(n,r,i){if(n.geometry!==null){var s=n.geometry.type,c=n.geometry.coordinates;switch(s){case"LineString":if(e(n,r,i,0,0)===!1)return!1;break;case"Polygon":for(var l=0;lcR(t,"name",{value:e,configurable:!0});function G1(t,e={}){if(t.bbox!=null&&e.recompute!==!0)return t.bbox;const n=[1/0,1/0,-1/0,-1/0];return cp(t,r=>{n[0]>r[0]&&(n[0]=r[0]),n[1]>r[1]&&(n[1]=r[1]),n[2] line1 must only contain 2 coordinates");if(r.length!==2)throw new Error(" line2 must only contain 2 coordinates");var i=n[0][0],s=n[0][1],c=n[1][0],l=n[1][1],d=r[0][0],v=r[0][1],S=r[1][0],E=r[1][1],C=(E-v)*(c-i)-(S-d)*(l-s),M=(S-d)*(s-v)-(E-v)*(i-d),A=(c-i)*(s-v)-(l-s)*(i-d);if(C===0)return null;var R=M/C,z=A/C;if(R>=0&&R<=1&&z>=0&&z<=1){var U=i+R*(c-i),F=s+R*(l-s);return gs([U,F])}return null}function vR(t,e,n){n===void 0&&(n={});var r=gs([1/0,1/0],{dist:1/0}),i=0;return ap(t,function(s){for(var c=Mf(s),l=0;l0&&(z=R.features[0],z.properties.dist=yd(e,z,n),z.properties.location=i+yd(d,z,n)),d.properties.dist{if(!this.active)return;const l=[c.point.x-bR,c.point.y],d=this.map.unproject(c.point).distanceTo(this.map.unproject(l));this.inner.onMouseMove(c.lngLat.lng,c.lngLat.lat,d)&&(this.redraw(),this.dataUpdated())},this.onClick=()=>{this.active&&(this.inner.onClick(),this.redraw(),this.dataUpdated())},this.onDoubleClick=c=>{this.active&&(c.preventDefault(),this.inner.onClick(),this.finish())},this.onDragStart=()=>{this.active&&this.inner.onDragStart()&&this.map.dragPan.disable()},this.onMouseUp=()=>{this.active&&this.inner.onMouseUp()&&this.map.dragPan.enable()},this.onKeyDown=c=>{this.active&&c.key=="Escape"&&(c.stopPropagation(),this.cancel())},this.onKeyPress=c=>{this.active&&c.target.tagName!="INPUT"&&(c.key=="Enter"?(c.stopPropagation(),this.finish()):c.key=="s"||c.key=="S"?(c.stopPropagation(),this.inner.toggleSnapMode(),this.redraw()):c.key=="z"&&c.ctrlKey&&this.undo())},this.map=e,console.time("Deserialize and setup JsRouteSnapper"),this.inner=new d_(n),console.timeEnd("Deserialize and setup JsRouteSnapper"),this.active=!1,this.eventListenersSuccess=[],this.eventListenersUpdated=[],this.eventListenersFailure=[],this.routeToolGj=r,this.snapMode=i,this.undoLength=s,this.map.on("mousemove",this.onMouseMove),this.map.on("click",this.onClick),this.map.on("dblclick",this.onDoubleClick),this.map.on("dragstart",this.onDragStart),this.map.on("mouseup",this.onMouseUp),document.addEventListener("keydown",this.onKeyDown),document.addEventListener("keypress",this.onKeyPress)}tearDown(){this.map.off("mousemove",this.onMouseMove),this.map.off("click",this.onClick),this.map.off("dblclick",this.onDoubleClick),this.map.off("dragstart",this.onDragStart),this.map.off("mouseup",this.onMouseUp),document.removeEventListener("keydown",this.onKeyDown),document.removeEventListener("keypress",this.onKeyPress)}startRoute(){this.active||(this.active=!0,this.map.boxZoom.disable(),this.map.doubleClickZoom.disable())}startArea(){this.active||(this.inner.setAreaMode(),this.active=!0,this.map.boxZoom.disable(),this.map.doubleClickZoom.disable())}stop(){this.active=!1,this.inner.clearState(),this.redraw(),this.map.boxZoom.enable(),this.map.doubleClickZoom.enable()}editExistingRoute(e){this.active&&window.alert("Bug: editExistingRoute called when tool is already active"),e.properties.waypoints||(e.properties.waypoints=[{lon:e.geometry.coordinates[0][0],lat:e.geometry.coordinates[0][1],snapped:!0},{lon:e.geometry.coordinates[e.geometry.coordinates.length-1][0],lat:e.geometry.coordinates[e.geometry.coordinates.length-1][1],snapped:!0}]),this.startRoute(),this.inner.editExisting(e.properties.waypoints),this.redraw()}editExistingArea(e){this.active&&window.alert("Bug: editExistingArea called when tool is already active"),e.properties.waypoints||window.alert("Bug: editExistingArea called for a polygon not produced by the route-snapper"),this.startArea(),this.inner.editExisting(e.properties.waypoints),this.redraw()}addEventListenerSuccess(e){this.eventListenersSuccess.push(e)}addEventListenerUpdated(e){this.eventListenersUpdated.push(e)}addEventListenerFailure(e){this.eventListenersFailure.push(e)}clearEventListeners(){this.eventListenersSuccess=[],this.eventListenersUpdated=[],this.eventListenersFailure=[]}isActive(){return this.active}finish(){let e=this.inner.toFinalFeature();if(e)for(let n of this.eventListenersSuccess)n(JSON.parse(e));else for(let n of this.eventListenersFailure)n();this.stop()}cancel(){this.inner.clearState(),this.finish()}setRouteConfig(e){this.inner.setRouteConfig(e),this.redraw()}addSnappedWaypoint(e){this.inner.addSnappedWaypoint(e[0],e[1]),this.redraw()}undo(){this.inner.undo(),this.redraw()}toggleSnapMode(){this.inner.toggleSnapMode(),this.redraw()}redraw(){let e=JSON.parse(this.inner.renderGeojson());this.routeToolGj.set(e),this.map.getCanvas().style.cursor=e.cursor,this.snapMode.set(e.snap_mode),this.undoLength.set(e.undo_length)}dataUpdated(){let e=this.inner.toFinalFeature();if(e)for(let n of this.eventListenersUpdated)n(JSON.parse(e))}}const Bv="MZEJTanw3WpxRvt7qDfo";let uu=Nn(null),Vv=Nn("dataviz"),Jd=Nn(!window.matchMedia("(prefers-color-scheme: dark)").matches),Qd=Nn(!1),Ku=Nn(""),k_=Nn(!0),ji=Nn(null),D_=Nn(null),Uv=Nn(new ry.LngLat(0,0)),jv=Nn(new ry.LngLat(0,0)),S2=Nn(1),Gu=Nn(1),xn=Nn({mode:"title"}),Gv=Nn("walk_cycle_only"),E2=Nn(!1);function Rf(){let t=Fs(Ku);t||window.alert("Autosave failed; no projectName set?!"),window.localStorage.setItem(t,Fs(ji).toSavefile())}function I2(t){let e,n;return e=new m1({props:{$$slots:{default:[wR,({dialog:r})=>({3:r}),({dialog:r})=>r?8:0]},$$scope:{ctx:t}}}),e.$on("close",t[2]),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,i){const s={};i&24&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function wR(t){let e,n,r,i,s,c,l,d,v,S,E,C,M,A;function R(){return t[1](t[3])}return{c(){e=_e("h1"),e.textContent="The low-traffic neighbourhood (LTN) tool, v2",n=We(),r=_e("p"),r.innerHTML=`This is an experimental +`+e.prev}function Fg(t,e){var n=Ev(t),r=[];if(n){r.length=t.length;for(var i=0;i=r)return n+1;var i=Bw(e,n);if(i<55296||i>56319)return n+1;var s=Bw(e,n+1);return s<56320||s>57343?n+1:n+2},J0=function(e){var n=0;return{next:function(){var i=n>=e.length,s;return i||(s=e[n],n+=1),{done:i,value:s}}}},Vw=function(e,n){if(z3(e)||Nw(e))return J0(e);if(F3(e)){var r=0;return{next:function(){var s=j3(e,r),c=U3(e,r,s);return r=s,{done:s>e.length,value:c}}}}if(n&&typeof e["_es6-shim iterator_"]<"u")return e["_es6-shim iterator_"]()};if(!B3&&!V3)n_.exports=function(e){if(e!=null)return Vw(e,!0)};else{var G3=VI,q3=jI,Uw=Fa("Map.prototype.forEach",!0),jw=Fa("Set.prototype.forEach",!0);if(typeof process>"u"||!process.versions||!process.versions.node)var Gw=Fa("Map.prototype.iterator",!0),qw=Fa("Set.prototype.iterator",!0);var Ww=Fa("Map.prototype.@@iterator",!0)||Fa("Map.prototype._es6-shim iterator_",!0),Hw=Fa("Set.prototype.@@iterator",!0)||Fa("Set.prototype._es6-shim iterator_",!0),W3=function(e){if(G3(e)){if(Gw)return Ow(Gw(e));if(Ww)return Ww(e);if(Uw){var n=[];return Uw(e,function(i,s){Fw(n,[s,i])}),J0(n)}}if(q3(e)){if(qw)return Ow(qw(e));if(Hw)return Hw(e);if(jw){var r=[];return jw(e,function(i){Fw(r,i)}),J0(r)}}};n_.exports=function(e){return W3(e)||Vw(e)}}}var H3=n_.exports,Zw=function(t){return t!==t},GI=function(e,n){return e===0&&n===0?1/e===1/n:!!(e===n||Zw(e)&&Zw(n))},Z3=GI,qI=function(){return typeof Object.is=="function"?Object.is:Z3},X3=qI,Y3=lh,$3=function(){var e=X3();return Y3(Object,{is:e},{is:function(){return Object.is!==e}}),e},K3=lh,J3=lp,Q3=GI,WI=qI,e4=$3,HI=J3(WI(),Object);K3(HI,{getPolyfill:WI,implementation:Q3,shim:e4});var t4=HI,n4=lp,ZI=Ta,r4=Dl,Cv=r4("%ArrayBuffer%",!0),r_=ZI("ArrayBuffer.prototype.byteLength",!0),i4=ZI("Object.prototype.toString"),Xw=!!Cv&&!r_&&new Cv(0).slice,Yw=!!Xw&&n4(Xw),XI=r_||Yw?function(e){if(!e||typeof e!="object")return!1;try{return r_?r_(e):Yw(e,0),!0}catch{return!1}}:Cv?function(e){return i4(e)==="[object ArrayBuffer]"}:function(e){return!1},o4=Date.prototype.getDay,s4=function(e){try{return o4.call(e),!0}catch{return!1}},a4=Object.prototype.toString,l4="[object Date]",u4=uh(),c4=function(e){return typeof e!="object"||e===null?!1:u4?s4(e):a4.call(e)===l4},Tv=Ta,YI=uh(),$I,KI,Lv,Pv;if(YI){$I=Tv("Object.prototype.hasOwnProperty"),KI=Tv("RegExp.prototype.exec"),Lv={};var Q0=function(){throw Lv};Pv={toString:Q0,valueOf:Q0},typeof Symbol.toPrimitive=="symbol"&&(Pv[Symbol.toPrimitive]=Q0)}var h4=Tv("Object.prototype.toString"),f4=Object.getOwnPropertyDescriptor,p4="[object RegExp]",d4=YI?function(e){if(!e||typeof e!="object")return!1;var n=f4(e,"lastIndex"),r=n&&$I(n,"value");if(!r)return!1;try{KI(e,Pv)}catch(i){return i===Lv}}:function(e){return!e||typeof e!="object"&&typeof e!="function"?!1:h4(e)===p4},m4=Ta,$w=m4("SharedArrayBuffer.prototype.byteLength",!0),g4=$w?function(e){if(!e||typeof e!="object")return!1;try{return $w(e),!0}catch{return!1}}:function(e){return!1},_4=Number.prototype.toString,y4=function(e){try{return _4.call(e),!0}catch{return!1}},v4=Object.prototype.toString,b4="[object Number]",x4=uh(),w4=function(e){return typeof e=="number"?!0:typeof e!="object"?!1:x4?y4(e):v4.call(e)===b4},JI=Ta,S4=JI("Boolean.prototype.toString"),E4=JI("Object.prototype.toString"),I4=function(e){try{return S4(e),!0}catch{return!1}},C4="[object Boolean]",T4=uh(),L4=function(e){return typeof e=="boolean"?!0:e===null||typeof e!="object"?!1:T4&&Symbol.toStringTag in e?I4(e):E4(e)===C4},Mv={exports:{}},P4=Object.prototype.toString,M4=C1();if(M4){var A4=Symbol.prototype.toString,k4=/^Symbol\(.*\)$/,D4=function(e){return typeof e.valueOf()!="symbol"?!1:k4.test(A4.call(e))};Mv.exports=function(e){if(typeof e=="symbol")return!0;if(P4.call(e)!=="[object Symbol]")return!1;try{return D4(e)}catch{return!1}}}else Mv.exports=function(e){return!1};var R4=Mv.exports,Av={exports:{}},Kw=typeof BigInt<"u"&&BigInt,N4=function(){return typeof Kw=="function"&&typeof BigInt=="function"&&typeof Kw(42)=="bigint"&&typeof BigInt(42)=="bigint"},O4=N4();if(O4){var z4=BigInt.prototype.valueOf,F4=function(e){try{return z4.call(e),!0}catch{}return!1};Av.exports=function(e){return e===null||typeof e>"u"||typeof e=="boolean"||typeof e=="string"||typeof e=="number"||typeof e=="symbol"||typeof e=="function"?!1:typeof e=="bigint"?!0:F4(e)}}else Av.exports=function(e){return!1};var B4=Av.exports,V4=FI,U4=w4,j4=L4,G4=R4,q4=B4,W4=function(e){if(e==null||typeof e!="object"&&typeof e!="function")return null;if(V4(e))return"String";if(U4(e))return"Number";if(j4(e))return"Boolean";if(G4(e))return"Symbol";if(q4(e))return"BigInt"},S_=typeof WeakMap=="function"&&WeakMap.prototype?WeakMap:null,Jw=typeof WeakSet=="function"&&WeakSet.prototype?WeakSet:null,E_;S_||(E_=function(e){return!1});var kv=S_?S_.prototype.has:null,ev=Jw?Jw.prototype.has:null;!E_&&!kv&&(E_=function(e){return!1});var H4=E_||function(e){if(!e||typeof e!="object")return!1;try{if(kv.call(e,kv),ev)try{ev.call(e,ev)}catch{return!0}return e instanceof S_}catch{}return!1},Dv={exports:{}},Z4=Dl,QI=Ta,X4=Z4("%WeakSet%",!0),tv=QI("WeakSet.prototype.has",!0);if(tv){var nv=QI("WeakMap.prototype.has",!0);Dv.exports=function(e){if(!e||typeof e!="object")return!1;try{if(tv(e,tv),nv)try{nv(e,nv)}catch{return!0}return e instanceof X4}catch{}return!1}}else Dv.exports=function(e){return!1};var Y4=Dv.exports,$4=VI,K4=jI,J4=H4,Q4=Y4,eD=function(e){if(e&&typeof e=="object"){if($4(e))return"Map";if(K4(e))return"Set";if(J4(e))return"WeakMap";if(Q4(e))return"WeakSet"}return!1},eC=Function.prototype.toString,Ef=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,Rv,i_;if(typeof Ef=="function"&&typeof Object.defineProperty=="function")try{Rv=Object.defineProperty({},"length",{get:function(){throw i_}}),i_={},Ef(function(){throw 42},null,Rv)}catch(t){t!==i_&&(Ef=null)}else Ef=null;var tD=/^\s*class\b/,Nv=function(e){try{var n=eC.call(e);return tD.test(n)}catch{return!1}},rv=function(e){try{return Nv(e)?!1:(eC.call(e),!0)}catch{return!1}},o_=Object.prototype.toString,nD="[object Object]",rD="[object Function]",iD="[object GeneratorFunction]",oD="[object HTMLAllCollection]",sD="[object HTML document.all class]",aD="[object HTMLCollection]",lD=typeof Symbol=="function"&&!!Symbol.toStringTag,uD=!(0 in[,]),Ov=function(){return!1};if(typeof document=="object"){var cD=document.all;o_.call(cD)===o_.call(document.all)&&(Ov=function(e){if((uD||!e)&&(typeof e>"u"||typeof e=="object"))try{var n=o_.call(e);return(n===oD||n===sD||n===aD||n===nD)&&e("")==null}catch{}return!1})}var hD=Ef?function(e){if(Ov(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{Ef(e,null,Rv)}catch(n){if(n!==i_)return!1}return!Nv(e)&&rv(e)}:function(e){if(Ov(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(lD)return rv(e);if(Nv(e))return!1;var n=o_.call(e);return n!==rD&&n!==iD&&!/^\[object HTML/.test(n)?!1:rv(e)},fD=hD,pD=Object.prototype.toString,tC=Object.prototype.hasOwnProperty,dD=function(e,n,r){for(var i=0,s=e.length;i=3&&(i=r),pD.call(e)==="[object Array]"?dD(e,n,i):typeof e=="string"?mD(e,n,i):gD(e,n,i)},yD=_D,vD=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"],iv=vD,bD=typeof globalThis>"u"?ym:globalThis,xD=function(){for(var e=[],n=0;n"u"?ym:globalThis,zv=wD(),V1=B1("String.prototype.slice"),ov=Object.getPrototypeOf,ED=B1("Array.prototype.indexOf",!0)||function(e,n){for(var r=0;r-1?n:n!=="Object"?!1:CD(e)}return s_?ID(e):null},LD=Ta,t2=LD("ArrayBuffer.prototype.byteLength",!0),PD=XI,MD=function(e){return PD(e)?t2?t2(e):e.byteLength:NaN},rC=lk,Rl=Ta,n2=kk,AD=Dl,Df=H3,kD=OI,r2=t4,i2=LI,o2=zI,s2=XI,a2=c4,l2=d4,u2=g4,c2=I1,h2=W4,f2=eD,p2=TD,d2=MD,m2=Rl("SharedArrayBuffer.prototype.byteLength",!0),g2=Rl("Date.prototype.getTime"),sv=Object.getPrototypeOf,_2=Rl("Object.prototype.toString"),T_=AD("%Set%",!0),Fv=Rl("Map.prototype.has",!0),L_=Rl("Map.prototype.get",!0),y2=Rl("Map.prototype.size",!0),P_=Rl("Set.prototype.add",!0),iC=Rl("Set.prototype.delete",!0),M_=Rl("Set.prototype.has",!0),a_=Rl("Set.prototype.size",!0);function v2(t,e,n,r){for(var i=Df(t),s;(s=i.next())&&!s.done;)if(ja(e,s.value,n,r))return iC(t,s.value),!0;return!1}function oC(t){if(typeof t>"u")return null;if(typeof t!="object")return typeof t=="symbol"?!1:typeof t=="string"||typeof t=="number"?+t==+t:!0}function DD(t,e,n,r,i,s){var c=oC(n);if(c!=null)return c;var l=L_(e,c),d=rC({},i,{strict:!1});return typeof l>"u"&&!Fv(e,c)||!ja(r,l,d,s)?!1:!Fv(t,c)&&ja(r,l,d,s)}function RD(t,e,n){var r=oC(n);return r??(M_(e,r)&&!M_(t,r))}function b2(t,e,n,r,i,s){for(var c=Df(t),l,d;(l=c.next())&&!l.done;)if(d=l.value,ja(n,d,i,s)&&ja(r,L_(e,d),i,s))return iC(t,d),!0;return!1}function ja(t,e,n,r){var i=n||{};if(i.strict?r2(t,e):t===e)return!0;var s=h2(t),c=h2(e);if(s!==c)return!1;if(!t||!e||typeof t!="object"&&typeof e!="object")return i.strict?r2(t,e):t==e;var l=r.has(t),d=r.has(e),v;if(l&&d){if(r.get(t)===r.get(e))return!0}else v={};return l||r.set(t,v),d||r.set(e,v),zD(t,e,i,r)}function x2(t){return!t||typeof t!="object"||typeof t.length!="number"||typeof t.copy!="function"||typeof t.slice!="function"||t.length>0&&typeof t[0]!="number"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))}function ND(t,e,n,r){if(a_(t)!==a_(e))return!1;for(var i=Df(t),s=Df(e),c,l,d;(c=i.next())&&!c.done;)if(c.value&&typeof c.value=="object")d||(d=new T_),P_(d,c.value);else if(!M_(e,c.value)){if(n.strict||!RD(t,e,c.value))return!1;d||(d=new T_),P_(d,c.value)}if(d){for(;(l=s.next())&&!l.done;)if(l.value&&typeof l.value=="object"){if(!v2(d,l.value,n.strict,r))return!1}else if(!n.strict&&!M_(t,l.value)&&!v2(d,l.value,n.strict,r))return!1;return a_(d)===0}return!0}function OD(t,e,n,r){if(y2(t)!==y2(e))return!1;for(var i=Df(t),s=Df(e),c,l,d,v,S,E;(c=i.next())&&!c.done;)if(v=c.value[0],S=c.value[1],v&&typeof v=="object")d||(d=new T_),P_(d,v);else if(E=L_(e,v),typeof E>"u"&&!Fv(e,v)||!ja(S,E,n,r)){if(n.strict||!DD(t,e,v,S,n,r))return!1;d||(d=new T_),P_(d,v)}if(d){for(;(l=s.next())&&!l.done;)if(v=l.value[0],E=l.value[1],v&&typeof v=="object"){if(!b2(d,t,v,E,n,r))return!1}else if(!n.strict&&(!t.has(v)||!ja(L_(t,v),E,n,r))&&!b2(d,t,v,E,rC({},n,{strict:!1}),r))return!1;return a_(d)===0}return!0}function zD(t,e,n,r){var i,s;if(typeof t!=typeof e||t==null||e==null||_2(t)!==_2(e)||i2(t)!==i2(e))return!1;var c=o2(t),l=o2(e);if(c!==l)return!1;var d=t instanceof Error,v=e instanceof Error;if(d!==v||(d||v)&&(t.name!==e.name||t.message!==e.message))return!1;var S=l2(t),E=l2(e);if(S!==E||(S||E)&&(t.source!==e.source||n2(t)!==n2(e)))return!1;var C=a2(t),M=a2(e);if(C!==M||(C||M)&&g2(t)!==g2(e)||n.strict&&sv&&sv(t)!==sv(e))return!1;var A=p2(t),R=p2(e);if(A!==R)return!1;if(A||R){if(t.length!==e.length)return!1;for(i=0;i=0;i--)if(ee[i]!=fe[i])return!1;for(i=ee.length-1;i>=0;i--)if(s=ee[i],!ja(t[s],e[s],n,r))return!1;var pe=f2(t),se=f2(e);return pe!==se?!1:pe==="Set"||se==="Set"?ND(t,e,n,r):pe==="Map"?OD(t,e,n,r):!0}var FD=function(e,n,r){return ja(e,n,r,kD())};const sC=y1(FD);var BD=Object.defineProperty,pr=(t,e)=>BD(t,"name",{value:e,configurable:!0}),VD=class{constructor(e){this.direction=!1,this.compareProperties=!0;var n,r,i;this.precision=10**-((n=e==null?void 0:e.precision)!=null?n:17),this.direction=(r=e==null?void 0:e.direction)!=null?r:!1,this.compareProperties=(i=e==null?void 0:e.compareProperties)!=null?i:!0}compare(e,n){if(e.type!==n.type||!Dd(e,n))return!1;switch(e.type){case"Point":return this.compareCoord(e.coordinates,n.coordinates);case"LineString":return this.compareLine(e.coordinates,n.coordinates);case"Polygon":return this.comparePolygon(e,n);case"GeometryCollection":return this.compareGeometryCollection(e,n);case"Feature":return this.compareFeature(e,n);case"FeatureCollection":return this.compareFeatureCollection(e,n);default:if(e.type.startsWith("Multi")){const r=Bv(e),i=Bv(n);return r.every(s=>i.some(c=>this.compare(s,c)))}}return!1}compareCoord(e,n){return e.length===n.length&&e.every((r,i)=>Math.abs(r-n[i])=0&&(r=[].concat(e.slice(i,e.length),e.slice(1,i+1))),r}comparePath(e,n){return e.every((r,i)=>this.compareCoord(r,n[i]))}comparePolygon(e,n){if(this.compareLine(e.coordinates[0],n.coordinates[0],1,!0)){const r=e.coordinates.slice(1,e.coordinates.length),i=n.coordinates.slice(1,n.coordinates.length);return r.every(s=>i.some(c=>this.compareLine(s,c,1,!0)))}return!1}compareGeometryCollection(e,n){return Dd(e.geometries,n.geometries)&&this.compareBBox(e,n)&&e.geometries.every((r,i)=>this.compare(r,n.geometries[i]))}compareFeature(e,n){return e.id===n.id&&(this.compareProperties?sC(e.properties,n.properties):!0)&&this.compareBBox(e,n)&&this.compare(e.geometry,n.geometry)}compareFeatureCollection(e,n){return Dd(e.features,n.features)&&this.compareBBox(e,n)&&e.features.every((r,i)=>this.compare(r,n.features[i]))}compareBBox(e,n){return!e.bbox&&!n.bbox||(e.bbox&&n.bbox?this.compareCoord(e.bbox,n.bbox):!1)}};pr(VD,"GeojsonEquality");function Dd(t,e){return t.coordinates?t.coordinates.length===e.coordinates.length:t.length===e.length}pr(Dd,"sameLength");function Bv(t){return t.coordinates.map(e=>({type:t.type.replace("Multi",""),coordinates:e}))}pr(Bv,"explode");var Os=63710088e-1,aC={centimeters:Os*100,centimetres:Os*100,degrees:360/(2*Math.PI),feet:Os*3.28084,inches:Os*39.37,kilometers:Os/1e3,kilometres:Os/1e3,meters:Os,metres:Os,miles:Os/1609.344,millimeters:Os*1e3,millimetres:Os*1e3,nauticalmiles:Os/1852,radians:1,yards:Os*1.0936},w2={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:29155334959812285e-23,millimeters:1e6,millimetres:1e6,yards:1.195990046};function Cl(t,e,n={}){const r={type:"Feature"};return(n.id===0||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}pr(Cl,"feature");function UD(t,e,n={}){switch(t){case"Point":return tu(e).geometry;case"LineString":return iu(e).geometry;case"Polygon":return U1(e).geometry;case"MultiPoint":return uC(e).geometry;case"MultiLineString":return lC(e).geometry;case"MultiPolygon":return cC(e).geometry;default:throw new Error(t+" is invalid")}}pr(UD,"geometry");function tu(t,e,n={}){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!A_(t[0])||!A_(t[1]))throw new Error("coordinates must contain numbers");return Cl({type:"Point",coordinates:t},e,n)}pr(tu,"point");function jD(t,e,n={}){return ly(t.map(r=>tu(r,e)),n)}pr(jD,"points");function U1(t,e,n={}){for(const i of t){if(i.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(i[i.length-1].length!==i[0].length)throw new Error("First and last Position are not equivalent.");for(let s=0;sU1(r,e)),n)}pr(GD,"polygons");function iu(t,e,n={}){if(t.length<2)throw new Error("coordinates must be an array of two or more positions");return Cl({type:"LineString",coordinates:t},e,n)}pr(iu,"lineString");function qD(t,e,n={}){return ly(t.map(r=>iu(r,e)),n)}pr(qD,"lineStrings");function ly(t,e={}){const n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}pr(ly,"featureCollection");function lC(t,e,n={}){return Cl({type:"MultiLineString",coordinates:t},e,n)}pr(lC,"multiLineString");function uC(t,e,n={}){return Cl({type:"MultiPoint",coordinates:t},e,n)}pr(uC,"multiPoint");function cC(t,e,n={}){return Cl({type:"MultiPolygon",coordinates:t},e,n)}pr(cC,"multiPolygon");function WD(t,e,n={}){return Cl({type:"GeometryCollection",geometries:t},e,n)}pr(WD,"geometryCollection");function HD(t,e=0){if(e&&!(e>=0))throw new Error("precision must be a positive number");const n=Math.pow(10,e||0);return Math.round(t*n)/n}pr(HD,"round");function hC(t,e="kilometers"){const n=aC[e];if(!n)throw new Error(e+" units is invalid");return t*n}pr(hC,"radiansToLength");function j1(t,e="kilometers"){const n=aC[e];if(!n)throw new Error(e+" units is invalid");return t/n}pr(j1,"lengthToRadians");function ZD(t,e){return fC(j1(t,e))}pr(ZD,"lengthToDegrees");function XD(t){let e=t%360;return e<0&&(e+=360),e}pr(XD,"bearingToAzimuth");function fC(t){return t%(2*Math.PI)*180/Math.PI}pr(fC,"radiansToDegrees");function YD(t){return t%360*Math.PI/180}pr(YD,"degreesToRadians");function $D(t,e="kilometers",n="kilometers"){if(!(t>=0))throw new Error("length must be a positive number");return hC(j1(t,e),n)}pr($D,"convertLength");function KD(t,e="meters",n="kilometers"){if(!(t>=0))throw new Error("area must be a positive number");const r=w2[e];if(!r)throw new Error("invalid original units");const i=w2[n];if(!i)throw new Error("invalid final units");return t/r*i}pr(KD,"convertArea");function A_(t){return!isNaN(t)&&t!==null&&!Array.isArray(t)}pr(A_,"isNumber");function G1(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}pr(G1,"isObject");function JD(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(t.length!==4&&t.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(e=>{if(!A_(e))throw new Error("bbox must only contain numbers")})}pr(JD,"validateBBox");function QD(t){if(!t)throw new Error("id is required");if(["string","number"].indexOf(typeof t)===-1)throw new Error("id must be a number or a string")}pr(QD,"validateId");var eR=Object.defineProperty,So=(t,e)=>eR(t,"name",{value:e,configurable:!0});function cp(t,e,n){if(t!==null)for(var r,i,s,c,l,d,v,S=0,E=0,C,M=t.type,A=M==="FeatureCollection",R=M==="Feature",z=A?t.features.length:1,U=0;Ud||A>v||R>S){l=E,d=r,v=A,S=R,s=0;return}var z=iu([l,E],n.properties);if(e(z,r,i,R,s)===!1)return!1;s++,l=E})===!1)return!1}}})}So(mC,"segmentEach");function aR(t,e,n){var r=n,i=!1;return mC(t,function(s,c,l,d,v){i===!1&&n===void 0?r=s:r=e(r,s,c,l,d,v),i=!0}),r}So(aR,"segmentReduce");function gC(t,e){if(!t)throw new Error("geojson is required");uy(t,function(n,r,i){if(n.geometry!==null){var s=n.geometry.type,c=n.geometry.coordinates;switch(s){case"LineString":if(e(n,r,i,0,0)===!1)return!1;break;case"Polygon":for(var l=0;lhR(t,"name",{value:e,configurable:!0});function W1(t,e={}){if(t.bbox!=null&&e.recompute!==!0)return t.bbox;const n=[1/0,1/0,-1/0,-1/0];return cp(t,r=>{n[0]>r[0]&&(n[0]=r[0]),n[1]>r[1]&&(n[1]=r[1]),n[2] line1 must only contain 2 coordinates");if(r.length!==2)throw new Error(" line2 must only contain 2 coordinates");var i=n[0][0],s=n[0][1],c=n[1][0],l=n[1][1],d=r[0][0],v=r[0][1],S=r[1][0],E=r[1][1],C=(E-v)*(c-i)-(S-d)*(l-s),M=(S-d)*(s-v)-(E-v)*(i-d),A=(c-i)*(s-v)-(l-s)*(i-d);if(C===0)return null;var R=M/C,z=A/C;if(R>=0&&R<=1&&z>=0&&z<=1){var U=i+R*(c-i),F=s+R*(l-s);return gs([U,F])}return null}function bR(t,e,n){n===void 0&&(n={});var r=gs([1/0,1/0],{dist:1/0}),i=0;return ap(t,function(s){for(var c=Mf(s),l=0;l0&&(z=R.features[0],z.properties.dist=yd(e,z,n),z.properties.location=i+yd(d,z,n)),d.properties.dist{if(!this.active)return;const l=[c.point.x-xR,c.point.y],d=this.map.unproject(c.point).distanceTo(this.map.unproject(l));this.inner.onMouseMove(c.lngLat.lng,c.lngLat.lat,d)&&(this.redraw(),this.dataUpdated())},this.onClick=()=>{this.active&&(this.inner.onClick(),this.redraw(),this.dataUpdated())},this.onDoubleClick=c=>{this.active&&(c.preventDefault(),this.inner.onClick(),this.finish())},this.onDragStart=()=>{this.active&&this.inner.onDragStart()&&this.map.dragPan.disable()},this.onMouseUp=()=>{this.active&&this.inner.onMouseUp()&&this.map.dragPan.enable()},this.onKeyDown=c=>{this.active&&c.key=="Escape"&&(c.stopPropagation(),this.cancel())},this.onKeyPress=c=>{this.active&&c.target.tagName!="INPUT"&&(c.key=="Enter"?(c.stopPropagation(),this.finish()):c.key=="s"||c.key=="S"?(c.stopPropagation(),this.inner.toggleSnapMode(),this.redraw()):c.key=="z"&&c.ctrlKey&&this.undo())},this.map=e,console.time("Deserialize and setup JsRouteSnapper"),this.inner=new d_(n),console.timeEnd("Deserialize and setup JsRouteSnapper"),this.active=!1,this.eventListenersSuccess=[],this.eventListenersUpdated=[],this.eventListenersFailure=[],this.routeToolGj=r,this.snapMode=i,this.undoLength=s,this.map.on("mousemove",this.onMouseMove),this.map.on("click",this.onClick),this.map.on("dblclick",this.onDoubleClick),this.map.on("dragstart",this.onDragStart),this.map.on("mouseup",this.onMouseUp),document.addEventListener("keydown",this.onKeyDown),document.addEventListener("keypress",this.onKeyPress)}tearDown(){this.map.off("mousemove",this.onMouseMove),this.map.off("click",this.onClick),this.map.off("dblclick",this.onDoubleClick),this.map.off("dragstart",this.onDragStart),this.map.off("mouseup",this.onMouseUp),document.removeEventListener("keydown",this.onKeyDown),document.removeEventListener("keypress",this.onKeyPress)}startRoute(){this.active||(this.active=!0,this.map.boxZoom.disable(),this.map.doubleClickZoom.disable())}startArea(){this.active||(this.inner.setAreaMode(),this.active=!0,this.map.boxZoom.disable(),this.map.doubleClickZoom.disable())}stop(){this.active=!1,this.inner.clearState(),this.redraw(),this.map.boxZoom.enable(),this.map.doubleClickZoom.enable()}editExistingRoute(e){this.active&&window.alert("Bug: editExistingRoute called when tool is already active"),e.properties.waypoints||(e.properties.waypoints=[{lon:e.geometry.coordinates[0][0],lat:e.geometry.coordinates[0][1],snapped:!0},{lon:e.geometry.coordinates[e.geometry.coordinates.length-1][0],lat:e.geometry.coordinates[e.geometry.coordinates.length-1][1],snapped:!0}]),this.startRoute(),this.inner.editExisting(e.properties.waypoints),this.redraw()}editExistingArea(e){this.active&&window.alert("Bug: editExistingArea called when tool is already active"),e.properties.waypoints||window.alert("Bug: editExistingArea called for a polygon not produced by the route-snapper"),this.startArea(),this.inner.editExisting(e.properties.waypoints),this.redraw()}addEventListenerSuccess(e){this.eventListenersSuccess.push(e)}addEventListenerUpdated(e){this.eventListenersUpdated.push(e)}addEventListenerFailure(e){this.eventListenersFailure.push(e)}clearEventListeners(){this.eventListenersSuccess=[],this.eventListenersUpdated=[],this.eventListenersFailure=[]}isActive(){return this.active}finish(){let e=this.inner.toFinalFeature();if(e)for(let n of this.eventListenersSuccess)n(JSON.parse(e));else for(let n of this.eventListenersFailure)n();this.stop()}cancel(){this.inner.clearState(),this.finish()}setRouteConfig(e){this.inner.setRouteConfig(e),this.redraw()}addSnappedWaypoint(e){this.inner.addSnappedWaypoint(e[0],e[1]),this.redraw()}undo(){this.inner.undo(),this.redraw()}toggleSnapMode(){this.inner.toggleSnapMode(),this.redraw()}redraw(){let e=JSON.parse(this.inner.renderGeojson());this.routeToolGj.set(e),this.map.getCanvas().style.cursor=e.cursor,this.snapMode.set(e.snap_mode),this.undoLength.set(e.undo_length)}dataUpdated(){let e=this.inner.toFinalFeature();if(e)for(let n of this.eventListenersUpdated)n(JSON.parse(e))}}const Vv="MZEJTanw3WpxRvt7qDfo";let uu=Nn(null),Uv=Nn("dataviz"),Jd=Nn(!window.matchMedia("(prefers-color-scheme: dark)").matches),Qd=Nn(!1),Ju=Nn(""),k_=Nn(!0),ji=Nn(null),D_=Nn(null),jv=Nn(new iy.LngLat(0,0)),Gv=Nn(new iy.LngLat(0,0)),I2=Nn(1),qu=Nn(1),xn=Nn({mode:"title"}),qv=Nn("walk_cycle_only"),C2=Nn(!1);function Rf(){let t=Fs(Ju);t||window.alert("Autosave failed; no projectName set?!"),window.localStorage.setItem(t,Fs(ji).toSavefile())}function T2(t){let e,n;return e=new _1({props:{$$slots:{default:[SR,({dialog:r})=>({3:r}),({dialog:r})=>r?8:0]},$$scope:{ctx:t}}}),e.$on("close",t[2]),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,i){const s={};i&24&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function SR(t){let e,n,r,i,s,c,l,d,v,S,E,C,M,A;function R(){return t[1](t[3])}return{c(){e=_e("h1"),e.textContent="The low-traffic neighbourhood (LTN) tool, v2",n=We(),r=_e("p"),r.innerHTML=`This is an experimental version of the A/B Street LTN tool . Most parts of it do not work yet, and you should probably use the other version @@ -591,7 +591,7 @@ ${t.stack}`:r}function dM(t,e){const n=e(t.length*1,1)>>>0;return Vd().set(t,n/1 effects`,d=We(),v=_e("p"),v.innerHTML=`This tool is created by Dustin Carlino and relies heavily on OpenStreetMap - data.`,S=We(),E=_e("center"),C=_e("button"),C.textContent="Start!"},m(z,U){xe(z,e,U),xe(z,n,U),xe(z,r,U),xe(z,i,U),xe(z,s,U),xe(z,c,U),xe(z,l,U),xe(z,d,U),xe(z,v,U),xe(z,S,U),xe(z,E,U),oe(E,C),M||(A=Lt(C,"click",R),M=!0)},p(z,U){t=z},d(z){z&&(be(e),be(n),be(r),be(i),be(s),be(c),be(l),be(d),be(v),be(S),be(E)),M=!1,A()}}}function SR(t){let e,n,r=t[0]&&I2(t);return{c(){r&&r.c(),e=Hi()},m(i,s){r&&r.m(i,s),xe(i,e,s),n=!0},p(i,[s]){i[0]?r?(r.p(i,s),s&1&&ue(r,1)):(r=I2(i),r.c(),ue(r,1),r.m(e.parentNode,e)):r&&(Un(),ye(r,1,1,()=>{r=null}),jn())},i(i){n||(ue(r),n=!0)},o(i){ye(r),n=!1},d(i){i&&be(e),r&&r.d(i)}}}function ER(t,e,n){let r;return mt(t,k_,c=>n(0,r=c)),[r,c=>Rr(c).close(),()=>Ft(k_,r=!1,r)]}class IR extends Yt{constructor(e){super(),Xt(this,e,ER,SR,Ut,{})}}const CR="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAk0lEQVRIS+3U0Q2AIAwEUNjMUXQydRJH0zZB0wjGuwJfSsKfuWfO1hg6n9g5P3wPWKTSXe6EVstUNEjoloIVghAG0OxR7swgLEAjHoBCvACM1AAQUgJ0DL0nm67WwJom7XrBlhVl4arUAHYniuE1ABTuBeBwD0CFs4D92T12fp9v9iPrnJ8LBu0KC0Ch9qEfeK3sAPceHxk8hJ17AAAAAElFTkSuQmCC",C2="/ltn/assets/logo_light-97f2d067.svg",T2="/ltn/assets/logo_dark-ed08d841.svg";let TR=Date.now();function hp(t){return`${t}-${TR++}`}const q1=Symbol.for("svelte-maplibre");function fp(){return zE(q1)}function LR(t){let e=new WeakMap;return n=>{var c;let r=e.get(n.originalEvent);if(r!==void 0)return r;let s=(c=n.target.queryRenderedFeatures(n.point).find(l=>{var d;return(d=t.get(l.layer.id))==null?void 0:d.interactive}))==null?void 0:c.layer.id;return e.set(n.originalEvent,s),s}}function PR(){let t=new Map;return p1(q1,{map:Nn(null),source:z0(null),layer:z0(null),popupTarget:z0(null),cluster:Nn(),loadedImages:Nn(new Set),minzoom:Nn(0),maxzoom:Nn(24),layerEvent:Nn(null),layerInfo:t,eventTopMost:LR(t)})}function L2(t){return{subscribe:t.subscribe}}function W1({key:t,setPopupTarget:e=!1,setCluster:n=!1,setMouseEvent:r=!1}){let i=fp(),s=Nn(null),c=L2(s),l={...i,[t]:L2(s)};if(e&&(l.popupTarget=c),r){let d=Nn(null);l.layerEvent=d,i.layerEvent=d}return n&&(l.cluster=Nn()),p1(q1,l),{...i,self:s}}function MR(){return W1({key:"source",setCluster:!0})}function AR(t=!0){return W1({key:"layer",setPopupTarget:t,setMouseEvent:t})}function kR(){return W1({key:"popupTarget",setPopupTarget:!0,setMouseEvent:!0})}function DR(t){return"layerType"in t&&t.layerType==="deckgl"}function P2(t){let e;return n=>{if(n)for(let r in n){let i=e==null?void 0:e[r],s=n[r];i!==s&&t(r,s,i)}else if(e)for(let r in e)t(r,void 0,e[r]);e=n}}function RR(t,...e){let n=[t];for(let r of e)if(r)Array.isArray(r)&&r[0]===t?n.push(...r.slice(1)):n.push(r);else continue;if(n.length!==1)return n.length===2?n[1]:n}function NR(t){return t===!0?["has","point_count"]:t===!1?["!",["has","point_count"]]:void 0}function Nf(t,e){return["case",["boolean",["feature-state","hover"],!1],e,t]}var Xc=OR;function OR(t){var e,n,r;if(t){if(Array.isArray(t)){for(e=[],n=t.length,r=0;r{r=null}),jn())},i(i){n||(ue(r),n=!0)},o(i){ye(r),n=!1},d(i){i&&be(e),r&&r.d(i)}}}function FR(t,e,n){let r,i,s,c,l,d,v,S,E,C,M,A,{$$slots:R={},$$scope:z}=e,{id:U=hp("layer")}=e,{source:F=void 0}=e,{sourceLayer:G=void 0}=e,{beforeId:H=void 0}=e,{beforeLayerType:te=void 0}=e,{type:ee}=e,{paint:fe=void 0}=e,{layout:pe=void 0}=e,{filter:se=void 0}=e,{applyToClusters:Ae=void 0}=e,{minzoom:Y=void 0}=e,{maxzoom:ae=void 0}=e,{manageHoverState:Ke=!1}=e,{hovered:Le=null}=e,{interactive:tt=!0}=e,{hoverCursor:ut=void 0}=e,{eventsIfTopMost:He=!1}=e;const Ot=vu(),{map:Gt,source:vt,self:At,minzoom:Mt,maxzoom:rn,eventTopMost:wn,layerInfo:fn}=AR();mt(t,Gt,ne=>n(31,E=ne)),mt(t,vt,ne=>n(32,C=ne)),mt(t,At,ne=>n(0,S=ne)),mt(t,Mt,ne=>n(34,A=ne)),mt(t,rn,ne=>n(33,M=ne)),ro(()=>{S&&E&&(fn.delete(S),E==null||E.removeLayer(S))});let _n;function pn(ne){var Re,It;if(!tt||!S||!E||He&&wn(ne)!==S)return;let Me=ne.features??[],dt=(It=(Re=Me[0])==null?void 0:Re.properties)==null?void 0:It.cluster_id,en={event:ne,map:E,clusterId:dt,layer:S,source:l,features:Me};Ot(ne.type,en)}function Yn(ne){var Re,It;if(!tt||!S||!E||He&&wn(ne)!==S)return;ut&&(E.getCanvas().style.cursor=ut);let Me=ne.features??[];n(6,Le=Me[0]??null);let dt=(It=(Re=Me[0])==null?void 0:Re.properties)==null?void 0:It.cluster_id;Ot("mouseenter",{event:ne,map:E,clusterId:dt,layer:S,source:l,features:Me})}function zr(ne){var Re,It,Cn;if(!tt||!E)return;if(He&&wn(ne)!==S){n(6,Le=null),Ke&&_n!==void 0&&(E==null||E.setFeatureState({source:l,sourceLayer:G,id:_n},{hover:!1}),_n=void 0);return}E.getCanvas().style.cursor=ut;let Me=ne.features??[],dt=(It=(Re=Me[0])==null?void 0:Re.properties)==null?void 0:It.cluster_id,en=(Cn=Me[0])==null?void 0:Cn.id;en!==_n&&(Ke&&(_n!==void 0&&(E==null||E.setFeatureState({source:l,id:_n,sourceLayer:G},{hover:!1})),E==null||E.setFeatureState({source:l,id:en,sourceLayer:G},{hover:!0})),_n=en,n(6,Le=Me[0]??null)),Ot("mousemove",{event:ne,map:E,clusterId:dt,layer:S,source:l,features:Me})}function Pn(ne){if(!(!tt||!S||!E)){if(ut&&(E.getCanvas().style.cursor=""),n(6,Le=null),Ke&&_n!==void 0){const Me={source:l,id:_n,sourceLayer:G};E==null||E.setFeatureState(Me,{hover:!1}),_n=void 0}Ot("mouseleave",{map:E,layer:S,source:l})}}let ar=!0;function Zn(ne){E&&(E.off("click",ne,pn),E.off("dblclick",ne,pn),E.off("contextmenu",ne,pn),E.off("mouseenter",ne,Yn),E.off("mousemove",ne,zr),E.off("mouseleave",ne,Pn))}return ro(()=>{E&&S&&Zn(S)}),t.$$set=ne=>{"id"in ne&&n(7,U=ne.id),"source"in ne&&n(8,F=ne.source),"sourceLayer"in ne&&n(9,G=ne.sourceLayer),"beforeId"in ne&&n(10,H=ne.beforeId),"beforeLayerType"in ne&&n(11,te=ne.beforeLayerType),"type"in ne&&n(12,ee=ne.type),"paint"in ne&&n(13,fe=ne.paint),"layout"in ne&&n(14,pe=ne.layout),"filter"in ne&&n(15,se=ne.filter),"applyToClusters"in ne&&n(16,Ae=ne.applyToClusters),"minzoom"in ne&&n(17,Y=ne.minzoom),"maxzoom"in ne&&n(18,ae=ne.maxzoom),"manageHoverState"in ne&&n(19,Ke=ne.manageHoverState),"hovered"in ne&&n(6,Le=ne.hovered),"interactive"in ne&&n(20,tt=ne.interactive),"hoverCursor"in ne&&n(21,ut=ne.hoverCursor),"eventsIfTopMost"in ne&&n(22,He=ne.eventsIfTopMost),"$$scope"in ne&&n(35,z=ne.$$scope)},t.$$.update=()=>{if(t.$$.dirty[0]&65536&&n(30,r=NR(Ae)),t.$$.dirty[0]&1073774592&&n(24,i=RR("all",r,se)),t.$$.dirty[0]&131072|t.$$.dirty[1]&8&&n(26,s=Y??A),t.$$.dirty[0]&262144|t.$$.dirty[1]&4&&n(25,c=ae??M),t.$$.dirty[0]&256|t.$$.dirty[1]&2&&n(29,l=F||C),t.$$.dirty[0]&654343809|t.$$.dirty[1]&1&&E&&S!==U&&l){S&&(Zn(S),fn.delete(S));let ne=H;if(!H&&te){let Me=E.getStyle().layers,dt=typeof te=="function"?te:Re=>Re.type===te,en=Me==null?void 0:Me.find(dt);en&&(ne=en.id)}Ft(At,S=U,S),E.addLayer(Xc({id:S,type:ee,source:l,"source-layer":G,filter:i,paint:fe,layout:pe,minzoom:s,maxzoom:c}),ne),n(23,ar=!0),E.on("click",S,pn),E.on("dblclick",S,pn),E.on("contextmenu",S,pn),E.on("mouseenter",S,Yn),E.on("mousemove",S,zr),E.on("mouseleave",S,Pn)}t.$$.dirty[0]&1048577&&S&&fn.set(S,{interactive:tt}),t.$$.dirty[0]&1|t.$$.dirty[1]&1&&n(28,d=S?P2((ne,Me)=>E==null?void 0:E.setPaintProperty(S,ne,Me)):void 0),t.$$.dirty[0]&1|t.$$.dirty[1]&1&&n(27,v=S?P2((ne,Me)=>E==null?void 0:E.setLayoutProperty(S,ne,Me)):void 0),t.$$.dirty[0]&268443648&&(d==null||d(fe)),t.$$.dirty[0]&134234112&&(v==null||v(pe)),t.$$.dirty[0]&100663297|t.$$.dirty[1]&1&&S&&(E==null||E.setLayerZoomRange(S,s,c)),t.$$.dirty[0]&25165825|t.$$.dirty[1]&1&&S&&(ar?n(23,ar=!1):E==null||E.setFilter(S,i))},[S,Gt,vt,At,Mt,rn,Le,U,F,G,H,te,ee,fe,pe,se,Ae,Y,ae,Ke,tt,ut,He,ar,i,c,s,v,d,l,r,E,C,M,A,z,R]}let uy=class extends Yt{constructor(e){super(),Xt(this,e,FR,zR,Ut,{id:7,source:8,sourceLayer:9,beforeId:10,beforeLayerType:11,type:12,paint:13,layout:14,filter:15,applyToClusters:16,minzoom:17,maxzoom:18,manageHoverState:19,hovered:6,interactive:20,hoverCursor:21,eventsIfTopMost:22},null,[-1,-1])}};function BR(t){let e;const n=t[16].default,r=Sr(n,t,t[24],null);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&16777216)&&Ir(r,n,i,i[24],e?Er(n,i[24],s,null):Cr(i[24]),null)},i(i){e||(ue(r,i),e=!0)},o(i){ye(r,i),e=!1},d(i){r&&r.d(i)}}}function VR(t){let e,n,r;function i(c){t[17](c)}let s={id:t[1],type:"circle",source:t[2],sourceLayer:t[3],beforeId:t[4],beforeLayerType:t[5],paint:t[6],layout:t[7],filter:t[8],applyToClusters:t[9],minzoom:t[10],maxzoom:t[11],hoverCursor:t[12],manageHoverState:t[13],eventsIfTopMost:t[14],interactive:t[15],$$slots:{default:[BR]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.hovered=t[0]),e=new uy({props:s}),ai.push(()=>Il(e,"hovered",i)),e.$on("click",t[18]),e.$on("dblclick",t[19]),e.$on("contextmenu",t[20]),e.$on("mouseenter",t[21]),e.$on("mousemove",t[22]),e.$on("mouseleave",t[23]),{c(){Ge(e.$$.fragment)},m(c,l){Ue(e,c,l),r=!0},p(c,[l]){const d={};l&2&&(d.id=c[1]),l&4&&(d.source=c[2]),l&8&&(d.sourceLayer=c[3]),l&16&&(d.beforeId=c[4]),l&32&&(d.beforeLayerType=c[5]),l&64&&(d.paint=c[6]),l&128&&(d.layout=c[7]),l&256&&(d.filter=c[8]),l&512&&(d.applyToClusters=c[9]),l&1024&&(d.minzoom=c[10]),l&2048&&(d.maxzoom=c[11]),l&4096&&(d.hoverCursor=c[12]),l&8192&&(d.manageHoverState=c[13]),l&16384&&(d.eventsIfTopMost=c[14]),l&32768&&(d.interactive=c[15]),l&16777216&&(d.$$scope={dirty:l,ctx:c}),!n&&l&1&&(n=!0,d.hovered=c[0],El(()=>n=!1)),e.$set(d)},i(c){r||(ue(e.$$.fragment,c),r=!0)},o(c){ye(e.$$.fragment,c),r=!1},d(c){je(e,c)}}}function UR(t,e,n){let{$$slots:r={},$$scope:i}=e,{id:s=hp("circle")}=e,{source:c=void 0}=e,{sourceLayer:l=void 0}=e,{beforeId:d=void 0}=e,{beforeLayerType:v=void 0}=e,{paint:S}=e,{layout:E=void 0}=e,{filter:C=void 0}=e,{applyToClusters:M=void 0}=e,{minzoom:A=void 0}=e,{maxzoom:R=void 0}=e,{hoverCursor:z=void 0}=e,{manageHoverState:U=!1}=e,{hovered:F=null}=e,{eventsIfTopMost:G=!1}=e,{interactive:H=!0}=e;function te(ae){F=ae,n(0,F)}function ee(ae){gn.call(this,t,ae)}function fe(ae){gn.call(this,t,ae)}function pe(ae){gn.call(this,t,ae)}function se(ae){gn.call(this,t,ae)}function Ae(ae){gn.call(this,t,ae)}function Y(ae){gn.call(this,t,ae)}return t.$$set=ae=>{"id"in ae&&n(1,s=ae.id),"source"in ae&&n(2,c=ae.source),"sourceLayer"in ae&&n(3,l=ae.sourceLayer),"beforeId"in ae&&n(4,d=ae.beforeId),"beforeLayerType"in ae&&n(5,v=ae.beforeLayerType),"paint"in ae&&n(6,S=ae.paint),"layout"in ae&&n(7,E=ae.layout),"filter"in ae&&n(8,C=ae.filter),"applyToClusters"in ae&&n(9,M=ae.applyToClusters),"minzoom"in ae&&n(10,A=ae.minzoom),"maxzoom"in ae&&n(11,R=ae.maxzoom),"hoverCursor"in ae&&n(12,z=ae.hoverCursor),"manageHoverState"in ae&&n(13,U=ae.manageHoverState),"hovered"in ae&&n(0,F=ae.hovered),"eventsIfTopMost"in ae&&n(14,G=ae.eventsIfTopMost),"interactive"in ae&&n(15,H=ae.interactive),"$$scope"in ae&&n(24,i=ae.$$scope)},[F,s,c,l,d,v,S,E,C,M,A,R,z,U,G,H,r,te,ee,fe,pe,se,Ae,Y,i]}let xm=class extends Yt{constructor(e){super(),Xt(this,e,UR,VR,Ut,{id:1,source:2,sourceLayer:3,beforeId:4,beforeLayerType:5,paint:6,layout:7,filter:8,applyToClusters:9,minzoom:10,maxzoom:11,hoverCursor:12,manageHoverState:13,hovered:0,eventsIfTopMost:14,interactive:15})}};function jR(t){let e;const n=t[15].default,r=Sr(n,t,t[23],null);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&8388608)&&Ir(r,n,i,i[23],e?Er(n,i[23],s,null):Cr(i[23]),null)},i(i){e||(ue(r,i),e=!0)},o(i){ye(r,i),e=!1},d(i){r&&r.d(i)}}}function GR(t){let e,n,r;function i(c){t[16](c)}let s={id:t[1],type:"fill",source:t[2],sourceLayer:t[3],beforeId:t[4],beforeLayerType:t[5],paint:t[6],layout:t[7],filter:t[8],minzoom:t[9],maxzoom:t[10],hoverCursor:t[11],manageHoverState:t[12],eventsIfTopMost:t[13],interactive:t[14],$$slots:{default:[jR]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.hovered=t[0]),e=new uy({props:s}),ai.push(()=>Il(e,"hovered",i)),e.$on("click",t[17]),e.$on("dblclick",t[18]),e.$on("contextmenu",t[19]),e.$on("mouseenter",t[20]),e.$on("mousemove",t[21]),e.$on("mouseleave",t[22]),{c(){Ge(e.$$.fragment)},m(c,l){Ue(e,c,l),r=!0},p(c,[l]){const d={};l&2&&(d.id=c[1]),l&4&&(d.source=c[2]),l&8&&(d.sourceLayer=c[3]),l&16&&(d.beforeId=c[4]),l&32&&(d.beforeLayerType=c[5]),l&64&&(d.paint=c[6]),l&128&&(d.layout=c[7]),l&256&&(d.filter=c[8]),l&512&&(d.minzoom=c[9]),l&1024&&(d.maxzoom=c[10]),l&2048&&(d.hoverCursor=c[11]),l&4096&&(d.manageHoverState=c[12]),l&8192&&(d.eventsIfTopMost=c[13]),l&16384&&(d.interactive=c[14]),l&8388608&&(d.$$scope={dirty:l,ctx:c}),!n&&l&1&&(n=!0,d.hovered=c[0],El(()=>n=!1)),e.$set(d)},i(c){r||(ue(e.$$.fragment,c),r=!0)},o(c){ye(e.$$.fragment,c),r=!1},d(c){je(e,c)}}}function qR(t,e,n){let{$$slots:r={},$$scope:i}=e,{id:s=hp("fill")}=e,{source:c=void 0}=e,{sourceLayer:l=void 0}=e,{beforeId:d=void 0}=e,{beforeLayerType:v=void 0}=e,{paint:S}=e,{layout:E=void 0}=e,{filter:C=void 0}=e,{minzoom:M=void 0}=e,{maxzoom:A=void 0}=e,{hoverCursor:R=void 0}=e,{manageHoverState:z=!1}=e,{hovered:U=null}=e,{eventsIfTopMost:F=!1}=e,{interactive:G=!0}=e;function H(Y){U=Y,n(0,U)}function te(Y){gn.call(this,t,Y)}function ee(Y){gn.call(this,t,Y)}function fe(Y){gn.call(this,t,Y)}function pe(Y){gn.call(this,t,Y)}function se(Y){gn.call(this,t,Y)}function Ae(Y){gn.call(this,t,Y)}return t.$$set=Y=>{"id"in Y&&n(1,s=Y.id),"source"in Y&&n(2,c=Y.source),"sourceLayer"in Y&&n(3,l=Y.sourceLayer),"beforeId"in Y&&n(4,d=Y.beforeId),"beforeLayerType"in Y&&n(5,v=Y.beforeLayerType),"paint"in Y&&n(6,S=Y.paint),"layout"in Y&&n(7,E=Y.layout),"filter"in Y&&n(8,C=Y.filter),"minzoom"in Y&&n(9,M=Y.minzoom),"maxzoom"in Y&&n(10,A=Y.maxzoom),"hoverCursor"in Y&&n(11,R=Y.hoverCursor),"manageHoverState"in Y&&n(12,z=Y.manageHoverState),"hovered"in Y&&n(0,U=Y.hovered),"eventsIfTopMost"in Y&&n(13,F=Y.eventsIfTopMost),"interactive"in Y&&n(14,G=Y.interactive),"$$scope"in Y&&n(23,i=Y.$$scope)},[U,s,c,l,d,v,S,E,C,M,A,R,z,F,G,r,H,te,ee,fe,pe,se,Ae,i]}let cc=class extends Yt{constructor(e){super(),Xt(this,e,qR,GR,Ut,{id:1,source:2,sourceLayer:3,beforeId:4,beforeLayerType:5,paint:6,layout:7,filter:8,minzoom:9,maxzoom:10,hoverCursor:11,manageHoverState:12,hovered:0,eventsIfTopMost:13,interactive:14})}};function WR(t,e,n){let r;const{map:i}=fp();mt(t,i,d=>n(4,r=d));let{position:s="top-left"}=e,{container:c=void 0}=e,l=null;return ro(()=>{r!=null&&r.loaded()&&l&&r.removeControl(l)}),t.$$set=d=>{"position"in d&&n(1,s=d.position),"container"in d&&n(2,c=d.container)},t.$$.update=()=>{if(t.$$.dirty&30&&r&&!l){let d;typeof c=="string"?d=document.querySelector(c)??void 0:d=c,n(3,l=new Bs.FullscreenControl({container:d})),r.addControl(l,s)}},[i,s,c,l,r]}class HR extends Yt{constructor(e){super(),Xt(this,e,WR,null,Ut,{position:1,container:2})}}function ZR(t,e,n,r,i){let s=!1;t.getSource(e)&&(s=!0,t.removeSource(e));const c=()=>{r(e)&&(t.addSource(e,n),i())};if(s){const l=()=>{e&&(t.getSource(e)?setTimeout(l,1):c())};l()}else c()}function XR(t,e,n){VE().then(()=>{let r=Fs(t);if(!r)return;r.getSource(e)===n&&r.removeSource(e)})}function k2(t){let e=t[0],n,r,i=D2(t);return{c(){i.c(),n=Hi()},m(s,c){i.m(s,c),xe(s,n,c),r=!0},p(s,c){c&1&&Ut(e,e=s[0])?(Un(),ye(i,1,1,Pt),jn(),i=D2(s),i.c(),ue(i,1),i.m(n.parentNode,n)):i.p(s,c)},i(s){r||(ue(i),r=!0)},o(s){ye(i),r=!1},d(s){s&&be(n),i.d(s)}}}function D2(t){let e;const n=t[19].default,r=Sr(n,t,t[18],null);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&262144)&&Ir(r,n,i,i[18],e?Er(n,i[18],s,null):Cr(i[18]),null)},i(i){e||(ue(r,i),e=!0)},o(i){ye(r,i),e=!1},d(i){r&&r.d(i)}}}function YR(t){let e,n,r=t[0]&&k2(t);return{c(){r&&r.c(),e=Hi()},m(i,s){r&&r.m(i,s),xe(i,e,s),n=!0},p(i,[s]){i[0]?r?(r.p(i,s),s&1&&ue(r,1)):(r=k2(i),r.c(),ue(r,1),r.m(e.parentNode,e)):r&&(Un(),ye(r,1,1,()=>{r=null}),jn())},i(i){n||(ue(r),n=!0)},o(i){ye(r),n=!1},d(i){i&&be(e),r&&r.d(i)}}}function $R(t,e,n){let r,i,s,{$$slots:c={},$$scope:l}=e,{id:d=hp("geojson")}=e,{data:v}=e,{generateId:S=!1}=e,{promoteId:E=void 0}=e,{filter:C=void 0}=e,{lineMetrics:M=void 0}=e,{cluster:A=void 0}=e,{maxzoom:R=void 0}=e,{attribution:z=void 0}=e,{buffer:U=void 0}=e,{tolerance:F=void 0}=e;const{map:G,cluster:H,self:te}=MR();mt(t,G,pe=>n(17,i=pe)),mt(t,H,pe=>n(20,s=pe)),mt(t,te,pe=>n(0,r=pe));let ee,fe=!0;return ro(()=>{r&&ee&&i&&(XR(G,r,ee),Ft(te,r=null,r),n(15,ee=void 0))}),t.$$set=pe=>{"id"in pe&&n(4,d=pe.id),"data"in pe&&n(5,v=pe.data),"generateId"in pe&&n(6,S=pe.generateId),"promoteId"in pe&&n(7,E=pe.promoteId),"filter"in pe&&n(8,C=pe.filter),"lineMetrics"in pe&&n(9,M=pe.lineMetrics),"cluster"in pe&&n(10,A=pe.cluster),"maxzoom"in pe&&n(11,R=pe.maxzoom),"attribution"in pe&&n(12,z=pe.attribution),"buffer"in pe&&n(13,U=pe.buffer),"tolerance"in pe&&n(14,F=pe.tolerance),"$$scope"in pe&&n(18,l=pe.$$scope)},t.$$.update=()=>{t.$$.dirty&1024&&Ft(H,s=A,s),t.$$.dirty&196593&&i&&r!==d&&(Ft(te,r=d,r),ZR(i,r,Xc({type:"geojson",data:v,filter:C,lineMetrics:M,generateId:S,promoteId:E,cluster:!!A,clusterMinPoints:A==null?void 0:A.minPoints,clusterMaxZoom:A==null?void 0:A.maxZoom,clusterRadius:A==null?void 0:A.radius,clusterProperties:A==null?void 0:A.properties,maxzoom:R,attribution:z,buffer:U,tolerance:F}),pe=>i&&pe===r,()=>{r&&(n(15,ee=i==null?void 0:i.getSource(r)),n(16,fe=!0))})),t.$$.dirty&131088&&(i==null||i.on("style.load",()=>{n(15,ee=i==null?void 0:i.getSource(d))})),t.$$.dirty&98336&&ee&&(fe?n(16,fe=!1):ee.setData(v)),t.$$.dirty&33792&&(ee==null||ee.setClusterOptions(Xc({cluster:!!A,clusterMaxZoom:A==null?void 0:A.maxZoom,clusterRadius:A==null?void 0:A.radius})))},[r,G,H,te,d,v,S,E,C,M,A,R,z,U,F,ee,fe,i,l,c]}let Ro=class extends Yt{constructor(e){super(),Xt(this,e,$R,YR,Ut,{id:4,data:5,generateId:6,promoteId:7,filter:8,lineMetrics:9,cluster:10,maxzoom:11,attribution:12,buffer:13,tolerance:14})}};function KR(t,e,n){let r;const{map:i}=fp();mt(t,i,C=>n(8,r=C));let{position:s="top-left"}=e,{positionOptions:c=void 0}=e,{fitBoundsOptions:l=void 0}=e,{trackUserLocation:d=!1}=e,{showAccuracyCircle:v=!0}=e,{showUserLocation:S=!0}=e,{control:E=null}=e;return ro(()=>{r!=null&&r.loaded()&&E&&r.removeControl(E)}),t.$$set=C=>{"position"in C&&n(2,s=C.position),"positionOptions"in C&&n(3,c=C.positionOptions),"fitBoundsOptions"in C&&n(4,l=C.fitBoundsOptions),"trackUserLocation"in C&&n(5,d=C.trackUserLocation),"showAccuracyCircle"in C&&n(6,v=C.showAccuracyCircle),"showUserLocation"in C&&n(7,S=C.showUserLocation),"control"in C&&n(1,E=C.control)},t.$$.update=()=>{t.$$.dirty&510&&r&&!E&&(n(1,E=new Bs.GeolocateControl({positionOptions:c,fitBoundsOptions:l,trackUserLocation:d,showAccuracyCircle:v,showUserLocation:S})),r.addControl(E,s))},[i,E,s,c,l,d,v,S,r]}class JR extends Yt{constructor(e){super(),Xt(this,e,KR,null,Ut,{position:2,positionOptions:3,fitBoundsOptions:4,trackUserLocation:5,showAccuracyCircle:6,showUserLocation:7,control:1})}}function QR(t){let e;const n=t[15].default,r=Sr(n,t,t[23],null);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&8388608)&&Ir(r,n,i,i[23],e?Er(n,i[23],s,null):Cr(i[23]),null)},i(i){e||(ue(r,i),e=!0)},o(i){ye(r,i),e=!1},d(i){r&&r.d(i)}}}function eN(t){let e,n,r;function i(c){t[16](c)}let s={id:t[1],type:"line",source:t[2],sourceLayer:t[3],beforeId:t[4],beforeLayerType:t[5],paint:t[6],layout:t[7],filter:t[8],minzoom:t[9],maxzoom:t[10],hoverCursor:t[11],manageHoverState:t[12],eventsIfTopMost:t[13],interactive:t[14],$$slots:{default:[QR]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.hovered=t[0]),e=new uy({props:s}),ai.push(()=>Il(e,"hovered",i)),e.$on("click",t[17]),e.$on("dblclick",t[18]),e.$on("contextmenu",t[19]),e.$on("mouseenter",t[20]),e.$on("mousemove",t[21]),e.$on("mouseleave",t[22]),{c(){Ge(e.$$.fragment)},m(c,l){Ue(e,c,l),r=!0},p(c,[l]){const d={};l&2&&(d.id=c[1]),l&4&&(d.source=c[2]),l&8&&(d.sourceLayer=c[3]),l&16&&(d.beforeId=c[4]),l&32&&(d.beforeLayerType=c[5]),l&64&&(d.paint=c[6]),l&128&&(d.layout=c[7]),l&256&&(d.filter=c[8]),l&512&&(d.minzoom=c[9]),l&1024&&(d.maxzoom=c[10]),l&2048&&(d.hoverCursor=c[11]),l&4096&&(d.manageHoverState=c[12]),l&8192&&(d.eventsIfTopMost=c[13]),l&16384&&(d.interactive=c[14]),l&8388608&&(d.$$scope={dirty:l,ctx:c}),!n&&l&1&&(n=!0,d.hovered=c[0],El(()=>n=!1)),e.$set(d)},i(c){r||(ue(e.$$.fragment,c),r=!0)},o(c){ye(e.$$.fragment,c),r=!1},d(c){je(e,c)}}}function tN(t,e,n){let{$$slots:r={},$$scope:i}=e,{id:s=hp("line")}=e,{source:c=void 0}=e,{sourceLayer:l=void 0}=e,{beforeId:d=void 0}=e,{beforeLayerType:v=void 0}=e,{paint:S}=e,{layout:E=void 0}=e,{filter:C=void 0}=e,{minzoom:M=void 0}=e,{maxzoom:A=void 0}=e,{hoverCursor:R=void 0}=e,{manageHoverState:z=!1}=e,{hovered:U=null}=e,{eventsIfTopMost:F=!1}=e,{interactive:G=!0}=e;function H(Y){U=Y,n(0,U)}function te(Y){gn.call(this,t,Y)}function ee(Y){gn.call(this,t,Y)}function fe(Y){gn.call(this,t,Y)}function pe(Y){gn.call(this,t,Y)}function se(Y){gn.call(this,t,Y)}function Ae(Y){gn.call(this,t,Y)}return t.$$set=Y=>{"id"in Y&&n(1,s=Y.id),"source"in Y&&n(2,c=Y.source),"sourceLayer"in Y&&n(3,l=Y.sourceLayer),"beforeId"in Y&&n(4,d=Y.beforeId),"beforeLayerType"in Y&&n(5,v=Y.beforeLayerType),"paint"in Y&&n(6,S=Y.paint),"layout"in Y&&n(7,E=Y.layout),"filter"in Y&&n(8,C=Y.filter),"minzoom"in Y&&n(9,M=Y.minzoom),"maxzoom"in Y&&n(10,A=Y.maxzoom),"hoverCursor"in Y&&n(11,R=Y.hoverCursor),"manageHoverState"in Y&&n(12,z=Y.manageHoverState),"hovered"in Y&&n(0,U=Y.hovered),"eventsIfTopMost"in Y&&n(13,F=Y.eventsIfTopMost),"interactive"in Y&&n(14,G=Y.interactive),"$$scope"in Y&&n(23,i=Y.$$scope)},[U,s,c,l,d,v,S,E,C,M,A,R,z,F,G,r,H,te,ee,fe,pe,se,Ae,i]}let hc=class extends Yt{constructor(e){super(),Xt(this,e,tN,eN,Ut,{id:1,source:2,sourceLayer:3,beforeId:4,beforeLayerType:5,paint:6,layout:7,filter:8,minzoom:9,maxzoom:10,hoverCursor:11,manageHoverState:12,hovered:0,eventsIfTopMost:13,interactive:14})}};function nN(t){let e=t.getCenter(),n=Math.round(t.getZoom()*100)/100,r=Math.ceil((n*Math.LN2+Math.log(512/360/.5))/Math.LN10),i=Math.pow(10,r),s=Math.round(e.lat*i)/i,c=Math.round(e.lng*i)/i,l=`${n}/${s}/${c}`,d=t.getBearing(),v=t.getPitch();return(d||v)&&(l+=`/${Math.round(d*10)/10}`),v&&(l+=`/${Math.round(v)}`),`#${l}`}function rN(t){return t.replace("#","").split("/").map(parseFloat)}var yf=H1;function H1(t,e){return t===e||t!==t&&e!==e?!0:typeof t!=typeof e||{}.toString.call(t)!={}.toString.call(e)||t!==Object(t)||!t?!1:Array.isArray(t)?R2(t,e):{}.toString.call(t)=="[object Set]"?R2(Array.from(t),Array.from(e)):{}.toString.call(t)=="[object Object]"?oN(t,e):iN(t,e)}function iN(t,e){return t.toString()===e.toString()}function R2(t,e){var n=t.length;if(n!=e.length)return!1;for(var r=0;rn(6,r=S));let{position:s="top-left"}=e,{showCompass:c=!0}=e,{showZoom:l=!0}=e,{visualizePitch:d=!1}=e,v=null;return ro(()=>{r!=null&&r.loaded()&&v&&r.removeControl(v)}),t.$$set=S=>{"position"in S&&n(1,s=S.position),"showCompass"in S&&n(2,c=S.showCompass),"showZoom"in S&&n(3,l=S.showZoom),"visualizePitch"in S&&n(4,d=S.visualizePitch)},t.$$.update=()=>{t.$$.dirty&126&&r&&!v&&(n(5,v=new Bs.NavigationControl({showCompass:c,showZoom:l,visualizePitch:d})),r.addControl(v,s))},[i,s,c,l,d,v,r]}class aN extends Yt{constructor(e){super(),Xt(this,e,sN,null,Ut,{position:1,showCompass:2,showZoom:3,visualizePitch:4})}}function lN(t,e,n){let r;const{map:i}=fp();mt(t,i,v=>n(5,r=v));let{position:s="bottom-left"}=e,{maxWidth:c=void 0}=e,{unit:l="metric"}=e,d=null;return ro(()=>{r!=null&&r.loaded()&&d&&r.removeControl(d)}),t.$$set=v=>{"position"in v&&n(1,s=v.position),"maxWidth"in v&&n(2,c=v.maxWidth),"unit"in v&&n(3,l=v.unit)},t.$$.update=()=>{t.$$.dirty&62&&r&&!d&&(n(4,d=new Bs.ScaleControl({maxWidth:c,unit:l})),r.addControl(d,s))},[i,s,c,l,d,r]}class uN extends Yt{constructor(e){super(),Xt(this,e,lN,null,Ut,{position:1,maxWidth:2,unit:3})}}const{window:cN}=f1,hN=t=>({map:t[0]&16,loadedImages:t[0]&32,allImagesLoaded:t[0]&64}),N2=t=>({map:t[4],loadedImages:t[5],allImagesLoaded:t[6]});function O2(t){let e,n,r=t[3]&&z2(t);const i=t[40].default,s=Sr(i,t,t[39],N2);return{c(){r&&r.c(),e=We(),s&&s.c()},m(c,l){r&&r.m(c,l),xe(c,e,l),s&&s.m(c,l),n=!0},p(c,l){c[3]?r?(r.p(c,l),l[0]&8&&ue(r,1)):(r=z2(c),r.c(),ue(r,1),r.m(e.parentNode,e)):r&&(Un(),ye(r,1,1,()=>{r=null}),jn()),s&&s.p&&(!n||l[0]&112|l[1]&256)&&Ir(s,i,c,c[39],n?Er(i,c[39],l,hN):Cr(c[39]),N2)},i(c){n||(ue(r),ue(s,c),n=!0)},o(c){ye(r),ye(s,c),n=!1},d(c){c&&be(e),r&&r.d(c),s&&s.d(c)}}}function z2(t){let e,n,r,i,s,c,l,d;return e=new aN({props:{position:t[7]}}),r=new JR({props:{position:t[7],fitBoundsOptions:{maxZoom:12}}}),s=new HR({props:{position:t[7]}}),l=new uN({props:{position:t[7]}}),{c(){Ge(e.$$.fragment),n=We(),Ge(r.$$.fragment),i=We(),Ge(s.$$.fragment),c=We(),Ge(l.$$.fragment)},m(v,S){Ue(e,v,S),xe(v,n,S),Ue(r,v,S),xe(v,i,S),Ue(s,v,S),xe(v,c,S),Ue(l,v,S),d=!0},p(v,S){const E={};S[0]&128&&(E.position=v[7]),e.$set(E);const C={};S[0]&128&&(C.position=v[7]),r.$set(C);const M={};S[0]&128&&(M.position=v[7]),s.$set(M);const A={};S[0]&128&&(A.position=v[7]),l.$set(A)},i(v){d||(ue(e.$$.fragment,v),ue(r.$$.fragment,v),ue(s.$$.fragment,v),ue(l.$$.fragment,v),d=!0)},o(v){ye(e.$$.fragment,v),ye(r.$$.fragment,v),ye(s.$$.fragment,v),ye(l.$$.fragment,v),d=!1},d(v){v&&(be(n),be(i),be(c)),je(e,v),je(r,v),je(s,v),je(l,v)}}}function fN(t){let e,n,r,i,s,c=t[4]&&t[0]&&O2(t);return{c(){e=_e("div"),c&&c.c(),Ie(e,"class",n=h_(t[2])+" svelte-p00lfq"),Ie(e,"data-testid","map-container"),xl(e,"expand-map",!t[2])},m(l,d){xe(l,e,d),c&&c.m(e,null),t[41](e),r=!0,i||(s=[Lt(cN,"hashchange",t[11]),fv(t[10].call(null,e))],i=!0)},p(l,d){l[4]&&l[0]?c?(c.p(l,d),d[0]&17&&ue(c,1)):(c=O2(l),c.c(),ue(c,1),c.m(e,null)):c&&(Un(),ye(c,1,1,()=>{c=null}),jn()),(!r||d[0]&4&&n!==(n=h_(l[2])+" svelte-p00lfq"))&&Ie(e,"class",n),(!r||d[0]&4)&&xl(e,"expand-map",!l[2])},i(l){r||(ue(c),r=!0)},o(l){ye(c),r=!1},d(l){l&&be(e),c&&c.d(),t[41](null),i=!1,Kr(s)}}}function pN(t,e,n){let r,i,s,c,{$$slots:l={},$$scope:d}=e,{map:v=null}=e,{mapContainer:S=void 0}=e,{class:E=void 0}=e,{style:C}=e,{diffStyleUpdates:M=!1}=e,{center:A=void 0}=e,{zoom:R=void 0}=e,{pitch:z=0}=e,{bearing:U=0}=e,{bounds:F=void 0}=e,{hash:G=!1}=e,{updateHash:H=ne=>{window.history.replaceState(window.history.state,"",ne)}}=e,{loaded:te=!1}=e,{minZoom:ee=0}=e,{maxZoom:fe=22}=e,{antialias:pe=void 0}=e,{zoomOnDoubleClick:se=!0}=e,{locale:Ae=void 0}=e,{interactive:Y=!0}=e,{attributionControl:ae=!0}=e,{cooperativeGestures:Ke=!1}=e,{preserveDrawingBuffer:Le=!1}=e,{maxBounds:tt=void 0}=e,{images:ut=[]}=e,{standardControls:He=!1}=e,{filterLayers:Ot=void 0}=e,{transformRequest:Gt=void 0}=e;const vt=vu(),{map:At,loadedImages:Mt}=PR();mt(t,At,ne=>n(4,s=ne)),mt(t,Mt,ne=>n(5,c=ne));let rn=new Set;async function wn(ne,Me=!1){if(s&&!(!s.loaded()&&!Me))if("url"in ne){rn.add(ne.id);try{let dt=await s.loadImage(ne.url);s==null||s.addImage(ne.id,dt.data,ne.options),c.add(ne.id),Mt.set(c)}catch(dt){vt("error",dt)}finally{rn.delete(ne.id)}}else s.addImage(ne.id,ne.data,ne.options),c.add(ne.id),Mt.set(c)}let fn,_n,pn,Yn;function zr(ne){return ar(),Ft(At,s=new Bs.Map(Xc({container:ne,style:C,locale:Ae,center:A,zoom:R,pitch:z,bearing:U,minZoom:ee,maxZoom:fe,antialias:pe,interactive:Y,preserveDrawingBuffer:Le,maxBounds:tt,bounds:F,attributionControl:ae,transformRequest:Gt,cooperativeGestures:Ke})),s),s.on("load",Me=>{Me.target.getContainer().setAttribute("data-testid","map"),Me.target.getCanvas().setAttribute("data-testid","map-canvas"),n(0,te=!0),vt("load",s)}),s.on("error",Me=>vt("error",{...Me,map:s})),s.on("movestart",Me=>vt("movestart",{...Me,map:s})),s.on("moveend",Me=>{if(n(12,A=Me.target.getCenter()),n(13,R=Me.target.getZoom()),n(14,z=Me.target.getPitch()),n(15,U=Me.target.getBearing()),n(16,F=Me.target.getBounds()),vt("moveend",{...Me,map:s}),G){let dt=new URL(window.location.href.replace(/(#.+)?$/,nN(s)));H(dt)}}),s.on("click",Me=>vt("click",{...Me,map:s})),s.on("dblclick",Me=>vt("dblclick",{...Me,map:s})),s.on("contextmenu",Me=>vt("contextmenu",{...Me,map:s})),s.on("zoomstart",Me=>vt("zoomstart",{...Me,map:s})),s.on("zoom",Me=>{vt("zoom",{...Me,map:s})}),s.on("zoomend",Me=>{vt("zoomend",{...Me,map:s})}),s.on("style.load",()=>{if(s){const Me=s.getStyle();if(n(36,fn=Me.layers.map(dt=>dt.id)),n(37,_n=Object.keys(Me.sources)),Yn)for(const[dt,en]of Object.entries(Yn))s.addSource(dt,en);if(pn)for(const dt of pn)s.addLayer(dt);for(const dt of ut)wn(dt,!0)}}),s.on("styledata",Me=>{if(s&&Ot){const dt=s.getStyle().layers;if(dt)for(let en of dt)Ot(en)||s.setLayoutProperty(en.id,"visibility","none")}vt("styledata",{...Me,map:s})}),{destroy(){n(0,te=!1),s==null||s.remove(),Ft(At,s=null,s)}}}let Pn=C;function ar(){if(G){let ne=rN(window.location.hash);ne.length>=3&&(n(13,R=ne[0]),n(12,A=[ne[2],ne[1]])),ne.length==5&&(n(15,U=ne[3]),n(14,z=ne[4]))}}function Zn(ne){ai[ne?"unshift":"push"](()=>{S=ne,n(1,S)})}return t.$$set=ne=>{"map"in ne&&n(17,v=ne.map),"mapContainer"in ne&&n(1,S=ne.mapContainer),"class"in ne&&n(2,E=ne.class),"style"in ne&&n(18,C=ne.style),"diffStyleUpdates"in ne&&n(19,M=ne.diffStyleUpdates),"center"in ne&&n(12,A=ne.center),"zoom"in ne&&n(13,R=ne.zoom),"pitch"in ne&&n(14,z=ne.pitch),"bearing"in ne&&n(15,U=ne.bearing),"bounds"in ne&&n(16,F=ne.bounds),"hash"in ne&&n(20,G=ne.hash),"updateHash"in ne&&n(21,H=ne.updateHash),"loaded"in ne&&n(0,te=ne.loaded),"minZoom"in ne&&n(22,ee=ne.minZoom),"maxZoom"in ne&&n(23,fe=ne.maxZoom),"antialias"in ne&&n(24,pe=ne.antialias),"zoomOnDoubleClick"in ne&&n(25,se=ne.zoomOnDoubleClick),"locale"in ne&&n(26,Ae=ne.locale),"interactive"in ne&&n(27,Y=ne.interactive),"attributionControl"in ne&&n(28,ae=ne.attributionControl),"cooperativeGestures"in ne&&n(29,Ke=ne.cooperativeGestures),"preserveDrawingBuffer"in ne&&n(30,Le=ne.preserveDrawingBuffer),"maxBounds"in ne&&n(31,tt=ne.maxBounds),"images"in ne&&n(32,ut=ne.images),"standardControls"in ne&&n(3,He=ne.standardControls),"filterLayers"in ne&&n(33,Ot=ne.filterLayers),"transformRequest"in ne&&n(34,Gt=ne.transformRequest),"$$scope"in ne&&n(39,d=ne.$$scope)},t.$$.update=()=>{if(t.$$.dirty[0]&8&&n(7,r=typeof He=="boolean"?void 0:He),t.$$.dirty[0]&16&&n(17,v=s),t.$$.dirty[0]&786448|t.$$.dirty[1]&224&&s&&!yf(C,Pn)){const ne=s.getStyle();if(fn&&(pn=ne.layers.filter(Me=>!fn.includes(Me.id))),_n){const Me=Object.keys(ne.sources).filter(dt=>!_n.includes(dt));Yn={};for(const dt of Me)Yn[dt]=ne.sources[dt]}n(38,Pn=C),s.setStyle(C,{diff:M}),Ft(Mt,c=new Set,c),n(35,rn=new Set)}if(t.$$.dirty[0]&49|t.$$.dirty[1]&18&&te&&s!=null&&s.loaded())for(let ne of ut)!c.has(ne.id)&&!rn.has(ne.id)&&!s.hasImage(ne.id)&&wn(ne);if(t.$$.dirty[0]&32|t.$$.dirty[1]&2&&n(6,i=ut.every(ne=>c.has(ne.id))),t.$$.dirty[0]&61456&&s){let ne={};A!=null&&!yf(A,s==null?void 0:s.getCenter())&&(ne.center=A),R!=null&&!yf(R,s==null?void 0:s.getZoom())&&(ne.zoom=R),U!=null&&!yf(U,s==null?void 0:s.getBearing())&&(ne.bearing=U),z!=null&&!yf(z,s==null?void 0:s.getPitch())&&(ne.pitch=z),Object.keys(ne).length&&s.easeTo(ne)}t.$$.dirty[0]&65552&&F&&!yf(F,s==null?void 0:s.getBounds())&&(s==null||s.fitBounds(F)),t.$$.dirty[0]&33554448&&(se?s==null||s.doubleClickZoom.enable():s==null||s.doubleClickZoom.disable())},[te,S,E,He,s,c,i,r,At,Mt,zr,ar,A,R,z,U,F,v,C,M,G,H,ee,fe,pe,se,Ae,Y,ae,Ke,Le,tt,ut,Ot,Gt,rn,fn,_n,Pn,d,l,Zn]}class dN extends Yt{constructor(e){super(),Xt(this,e,pN,fN,Ut,{map:17,mapContainer:1,class:2,style:18,diffStyleUpdates:19,center:12,zoom:13,pitch:14,bearing:15,bounds:16,hash:20,updateHash:21,loaded:0,minZoom:22,maxZoom:23,antialias:24,zoomOnDoubleClick:25,locale:26,interactive:27,attributionControl:28,cooperativeGestures:29,preserveDrawingBuffer:30,maxBounds:31,images:32,standardControls:3,filterLayers:33,transformRequest:34},null,[-1,-1])}}const mN=t=>({marker:t&8}),F2=t=>({marker:t[3]});function gN(t){let e,n,r,i,s,c,l;const d=t[19].default,v=Sr(d,t,t[18],F2);return{c(){e=_e("div"),v&&v.c(),Ie(e,"tabindex",n=t[1]?0:void 0),Ie(e,"role",r=t[1]?"button":void 0),sr(e,"z-index",t[2])},m(S,E){xe(S,e,E),v&&v.m(e,null),s=!0,c||(l=[fv(t[7].call(null,e)),fv(i=_N.call(null,e,t[0])),Lt(e,"click",N0(t[20])),Lt(e,"dblclick",N0(t[21])),Lt(e,"contextmenu",N0(t[22])),Lt(e,"mouseenter",t[23]),Lt(e,"mouseleave",t[24]),Lt(e,"mousemove",t[25]),Lt(e,"keydown",t[8])],c=!0)},p(S,[E]){v&&v.p&&(!s||E&262152)&&Ir(v,d,S,S[18],s?Er(d,S[18],E,mN):Cr(S[18]),F2),(!s||E&2&&n!==(n=S[1]?0:void 0))&&Ie(e,"tabindex",n),(!s||E&2&&r!==(r=S[1]?"button":void 0))&&Ie(e,"role",r),i&&Q_(i.update)&&E&1&&i.update.call(null,S[0]),E&4&&sr(e,"z-index",S[2])},i(S){s||(ue(v,S),s=!0)},o(S){ye(v,S),s=!1},d(S){S&&be(e),v&&v.d(S),c=!1,Kr(l)}}}function _N(t,e){const n=t.className;function r(i){i?t.className=`${n} ${i}`:t.className=n}return r(e),{update:r}}function yN(t,e,n){let r,i,s,{$$slots:c={},$$scope:l}=e,{marker:d=void 0}=e,{lngLat:v}=e,{class:S=void 0}=e,{interactive:E=!0}=e,{asButton:C=!1}=e,{draggable:M=!1}=e,{feature:A=null}=e,{offset:R=void 0}=e,{zIndex:z=void 0}=e,{rotation:U=0}=e,{opacity:F=1}=e;const G=vu(),{map:H,layerEvent:te,self:ee}=kR();mt(t,H,He=>n(27,s=He)),mt(t,te,He=>n(26,r=He)),mt(t,ee,He=>n(3,i=He));function fe(He){Ft(ee,i=new Bs.Marker({element:He,rotation:U,draggable:M,offset:R,opacity:F.toString()}).setLngLat(v).addTo(s),i),n(11,d=i);const Ot=()=>Ae("dragstart"),Gt=()=>{pe(),Ae("drag")},vt=()=>{pe(),Ae("dragend")};return M&&(i.on("dragstart",Ot),i.on("drag",Gt),i.on("dragend",vt)),{destroy(){M&&(i==null||i.off("dragstart",Ot),i==null||i.off("drag",Gt),i==null||i.off("dragend",vt)),n(11,d=void 0),i==null||i.remove()}}}function pe(){let He=i==null?void 0:i.getLngLat();He&&(Array.isArray(v)?n(10,v=[He.lng,He.lat]):v&&"lon"in v?n(10,v={lon:He.lng,lat:He.lat}):n(10,v=He))}function se(He){He.key===" "&&(He.preventDefault(),He.stopPropagation(),Ae("click"))}function Ae(He){if(!E)return;let Ot=i==null?void 0:i.getLngLat();if(!Ot)return;const Gt=[Ot.lng,Ot.lat];let vt={map:s,marker:i,lngLat:Gt,features:[{type:"Feature",properties:(A==null?void 0:A.properties)??{},geometry:{type:"Point",coordinates:Gt}}]};Ft(te,r={...vt,layerType:"marker",type:He},r),G(He,vt)}const Y=()=>Ae("click"),ae=()=>Ae("dblclick"),Ke=()=>Ae("contextmenu"),Le=He=>{Ae("mouseenter")},tt=()=>{Ae("mouseleave")},ut=()=>Ae("mousemove");return t.$$set=He=>{"marker"in He&&n(11,d=He.marker),"lngLat"in He&&n(10,v=He.lngLat),"class"in He&&n(0,S=He.class),"interactive"in He&&n(12,E=He.interactive),"asButton"in He&&n(1,C=He.asButton),"draggable"in He&&n(13,M=He.draggable),"feature"in He&&n(14,A=He.feature),"offset"in He&&n(15,R=He.offset),"zIndex"in He&&n(2,z=He.zIndex),"rotation"in He&&n(16,U=He.rotation),"opacity"in He&&n(17,F=He.opacity),"$$scope"in He&&n(18,l=He.$$scope)},t.$$.update=()=>{t.$$.dirty&1032&&(i==null||i.setLngLat(v)),t.$$.dirty&32776&&(i==null||i.setOffset(R??[0,0])),t.$$.dirty&65544&&(i==null||i.setRotation(U)),t.$$.dirty&131080&&(i==null||i.setOpacity(F.toString()))},[S,C,z,i,H,te,ee,fe,se,Ae,v,d,E,M,A,R,U,F,l,c,Y,ae,Ke,Le,tt,ut]}class B2 extends Yt{constructor(e){super(),Xt(this,e,yN,gN,Ut,{marker:11,lngLat:10,class:0,interactive:12,asButton:1,draggable:13,feature:14,offset:15,zIndex:2,rotation:16,opacity:17})}}const vN=t=>({features:t[0]&16,data:t[0]&16,map:t[0]&4,close:t[0]&1}),V2=t=>{var e;return{features:t[4],data:(e=t[4])==null?void 0:e[0],map:t[2],close:t[31]}};function U2(t){let e,n,r=(t[4]||t[3]instanceof Bs.Marker)&&j2(t);return{c(){e=_e("div"),r&&r.c()},m(i,s){xe(i,e,s),r&&r.m(e,null),t[32](e),n=!0},p(i,s){i[4]||i[3]instanceof Bs.Marker?r?(r.p(i,s),s[0]&24&&ue(r,1)):(r=j2(i),r.c(),ue(r,1),r.m(e,null)):r&&(Un(),ye(r,1,1,()=>{r=null}),jn())},i(i){n||(ue(r),n=!0)},o(i){ye(r),n=!1},d(i){i&&be(e),r&&r.d(),t[32](null)}}}function j2(t){let e;const n=t[30].default,r=Sr(n,t,t[29],V2);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s[0]&536870933)&&Ir(r,n,i,i[29],e?Er(n,i[29],s,vN):Cr(i[29]),V2)},i(i){e||(ue(r,i),e=!0)},o(i){ye(r,i),e=!1},d(i){r&&r.d(i)}}}function bN(t){let e,n,r=t[9].default&&U2(t);return{c(){r&&r.c(),e=Hi()},m(i,s){r&&r.m(i,s),xe(i,e,s),n=!0},p(i,s){i[9].default?r?(r.p(i,s),s[0]&512&&ue(r,1)):(r=U2(i),r.c(),ue(r,1),r.m(e.parentNode,e)):r&&(Un(),ye(r,1,1,()=>{r=null}),jn())},i(i){n||(ue(r),n=!0)},o(i){ye(r),n=!1},d(i){i&&be(e),r&&r.d(i)}}}function xN(t,e,n){let r,i,s,c,l,d,{$$slots:v={},$$scope:S}=e;const E=FP(v);let{closeButton:C=void 0}=e,{closeOnClickOutside:M=!0}=e,{closeOnClickInside:A=!1}=e,{closeOnMove:R=!1}=e,{openOn:z="click"}=e,{openIfTopMost:U=!0}=e,{focusAfterOpen:F=!0}=e,{anchor:G=void 0}=e,{offset:H=void 0}=e,{popupClass:te=void 0}=e,{maxWidth:ee=void 0}=e,{lngLat:fe=void 0}=e,{html:pe=void 0}=e,{open:se=!1}=e;const Ae=vu(),{map:Y,popupTarget:ae,layerEvent:Ke,layer:Le,eventTopMost:tt}=fp();mt(t,Y,Me=>n(2,s=Me)),mt(t,ae,Me=>n(3,l=Me)),mt(t,Ke,Me=>n(28,c=Me)),mt(t,Le,Me=>n(35,d=Me));const ut=["click","dblclick","contextmenu"];let He,Ot=!1,Gt;function vt(){if(!He)return;let Me=He.getElement();!Me||Me===Gt||(Gt=Me,z==="hover"&&(Gt.style.pointerEvents="none"),Gt.addEventListener("mouseenter",()=>{n(24,Ot=!0)},{passive:!0}),Gt.addEventListener("mouseleave",()=>{n(24,Ot=!1)},{passive:!0}),Gt.addEventListener("click",()=>{A&&n(0,se=!1)},{passive:!0}))}ey(()=>{if(s)return s.on("click",Pn),s.on("contextmenu",Pn),typeof l=="string"&&(s.on("click",l,wn),s.on("dblclick",l,wn),s.on("contextmenu",l,wn),s.on("mousemove",l,zr),s.on("mouseleave",l,Yn),s.on("touchstart",l,_n),s.on("touchend",l,pn)),()=>{s!=null&&s.loaded()&&(He==null||He.remove(),s.off("click",Pn),s.off("contextmenu",Pn),l instanceof Bs.Marker?l.getPopup()===He&&l.setPopup(void 0):typeof l=="string"&&(s.off("click",l,wn),s.off("dblclick",l,wn),s.off("contextmenu",l,wn),s.off("mousemove",l,zr),s.off("mouseleave",l,Yn),s.off("touchstart",l,_n),s.off("touchend",l,pn)))}});function At(Me){return U?!("marker"in Me)&&!DR(Me)&&tt(Me)!==d:!1}let Mt=null,rn="normal";function wn(Me){Me.type===z&&(At(Me)||("layerType"in Me?Me.layerType==="deckgl"?(n(10,fe=Me.coordinate),n(4,Mt=Me.object?[Me.object]:null)):(n(10,fe=Me.lngLat),n(4,Mt=Me.features??[])):(n(10,fe=Me.lngLat),n(4,Mt=Me.features??[])),setTimeout(()=>n(0,se=!0))))}let fn=null;function _n(Me){fn=Me.point}function pn(Me){if(!fn||z!=="hover")return;let dt=fn.dist(Me.point);fn=null,dt<3&&(n(10,fe=Me.lngLat),n(4,Mt=Me.features??[]),He.isOpen()?n(25,rn="justOpened"):(n(25,rn="opening"),n(0,se=!0)))}function Yn(Me){z!=="hover"||fn||rn!=="normal"||(n(0,se=!1),n(4,Mt=null))}function zr(Me){if(!(z!=="hover"||fn||rn!=="normal")){if(At(Me)){n(0,se=!1),n(4,Mt=null);return}n(0,se=!0),n(4,Mt=Me.features??[]),n(10,fe=Me.lngLat)}}function Pn(Me){if(rn==="justOpened"){n(25,rn="normal");return}if(!M)return;let dt=[Gt,l instanceof Bs.Marker?l==null?void 0:l.getElement():null];se&&He.isOpen()&&!dt.some(en=>en==null?void 0:en.contains(Me.originalEvent.target))&&(Me.type==="contextmenu"&&z==="contextmenu"||Me.type!=="contextmenu")&&n(0,se=!1)}ro(()=>{s&&(He!=null&&He.isOpen())&&He.remove()});let ar;const Zn=()=>n(0,se=!1);function ne(Me){ai[Me?"unshift":"push"](()=>{ar=Me,n(1,ar)})}return t.$$set=Me=>{"closeButton"in Me&&n(11,C=Me.closeButton),"closeOnClickOutside"in Me&&n(12,M=Me.closeOnClickOutside),"closeOnClickInside"in Me&&n(13,A=Me.closeOnClickInside),"closeOnMove"in Me&&n(14,R=Me.closeOnMove),"openOn"in Me&&n(15,z=Me.openOn),"openIfTopMost"in Me&&n(16,U=Me.openIfTopMost),"focusAfterOpen"in Me&&n(17,F=Me.focusAfterOpen),"anchor"in Me&&n(18,G=Me.anchor),"offset"in Me&&n(19,H=Me.offset),"popupClass"in Me&&n(20,te=Me.popupClass),"maxWidth"in Me&&n(21,ee=Me.maxWidth),"lngLat"in Me&&n(10,fe=Me.lngLat),"html"in Me&&n(22,pe=Me.html),"open"in Me&&n(0,se=Me.open),"$$scope"in Me&&n(29,S=Me.$$scope)},t.$$.update=()=>{if(t.$$.dirty[0]&14336&&n(27,r=C??(!M&&!A)),t.$$.dirty[0]&146685952&&(He||(n(23,He=new Bs.Popup({closeButton:r,closeOnClick:!1,closeOnMove:R,focusAfterOpen:F,maxWidth:ee,className:te,anchor:G,offset:H})),Gt=He.getElement(),He.on("open",()=>{n(0,se=!0),vt(),Ae("open",He)}),He.on("close",()=>{n(0,se=!1),Ae("close",He)}),He.on("hover",()=>{Ae("hover",He)}))),t.$$.dirty[0]&8421384&&He&&l instanceof Bs.Marker&&(z==="click"?l.setPopup(He):l.getPopup()===He&&l.setPopup(void 0)),t.$$.dirty[0]&268468224&&ut.includes(z)&&(c==null?void 0:c.type)===z&&(wn(c),Ft(Ke,c=null,c)),t.$$.dirty[0]&268468224&&n(26,i=z==="hover"&&((c==null?void 0:c.type)==="mousemove"||(c==null?void 0:c.type)==="mouseenter")),t.$$.dirty[0]&352354304&&z==="hover"&&Ke&&(i&&c&&(c.layerType==="deckgl"?(n(10,fe=c.coordinate),n(4,Mt=c.object?[c.object]:null)):(n(10,fe=c.lngLat),n(4,Mt=c.features??[]))),n(0,se=(i||Ot)??!1)),t.$$.dirty[0]&12582914&&(ar?He.setDOMContent(ar):pe&&He.setHTML(pe)),t.$$.dirty[0]&8389632&&fe&&He.setLngLat(fe),t.$$.dirty[0]&41943045&&s){let Me=He.isOpen();se&&!Me?(He.addTo(s),rn==="opening"&&n(25,rn="justOpened")):!se&&Me&&He.remove()}},[se,ar,s,l,Mt,Y,ae,Ke,Le,E,fe,C,M,A,R,z,U,F,G,H,te,ee,pe,He,Ot,rn,i,r,c,S,v,Zn,ne]}class wN extends Yt{constructor(e){super(),Xt(this,e,xN,bN,Ut,{closeButton:11,closeOnClickOutside:12,closeOnClickInside:13,closeOnMove:14,openOn:15,openIfTopMost:16,focusAfterOpen:17,anchor:18,offset:19,popupClass:20,maxWidth:21,lngLat:10,html:22,open:0},null,[-1,-1])}}function SN(t){let e;const n=t[16].default,r=Sr(n,t,t[24],null);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&16777216)&&Ir(r,n,i,i[24],e?Er(n,i[24],s,null):Cr(i[24]),null)},i(i){e||(ue(r,i),e=!0)},o(i){ye(r,i),e=!1},d(i){r&&r.d(i)}}}function EN(t){let e,n,r;function i(c){t[17](c)}let s={id:t[1],type:"symbol",source:t[2],sourceLayer:t[3],beforeId:t[4],beforeLayerType:t[5],paint:t[6],layout:t[7],filter:t[8],applyToClusters:t[9],minzoom:t[10],maxzoom:t[11],hoverCursor:t[12],manageHoverState:t[13],eventsIfTopMost:t[14],interactive:t[15],$$slots:{default:[SN]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.hovered=t[0]),e=new uy({props:s}),ai.push(()=>Il(e,"hovered",i)),e.$on("click",t[18]),e.$on("dblclick",t[19]),e.$on("contextmenu",t[20]),e.$on("mouseenter",t[21]),e.$on("mousemove",t[22]),e.$on("mouseleave",t[23]),{c(){Ge(e.$$.fragment)},m(c,l){Ue(e,c,l),r=!0},p(c,[l]){const d={};l&2&&(d.id=c[1]),l&4&&(d.source=c[2]),l&8&&(d.sourceLayer=c[3]),l&16&&(d.beforeId=c[4]),l&32&&(d.beforeLayerType=c[5]),l&64&&(d.paint=c[6]),l&128&&(d.layout=c[7]),l&256&&(d.filter=c[8]),l&512&&(d.applyToClusters=c[9]),l&1024&&(d.minzoom=c[10]),l&2048&&(d.maxzoom=c[11]),l&4096&&(d.hoverCursor=c[12]),l&8192&&(d.manageHoverState=c[13]),l&16384&&(d.eventsIfTopMost=c[14]),l&32768&&(d.interactive=c[15]),l&16777216&&(d.$$scope={dirty:l,ctx:c}),!n&&l&1&&(n=!0,d.hovered=c[0],El(()=>n=!1)),e.$set(d)},i(c){r||(ue(e.$$.fragment,c),r=!0)},o(c){ye(e.$$.fragment,c),r=!1},d(c){je(e,c)}}}function IN(t,e,n){let{$$slots:r={},$$scope:i}=e,{id:s=hp("symbol")}=e,{source:c=void 0}=e,{sourceLayer:l=void 0}=e,{beforeId:d=void 0}=e,{beforeLayerType:v=void 0}=e,{paint:S=void 0}=e,{layout:E=void 0}=e,{filter:C=void 0}=e,{applyToClusters:M=void 0}=e,{minzoom:A=void 0}=e,{maxzoom:R=void 0}=e,{hoverCursor:z=void 0}=e,{manageHoverState:U=!1}=e,{hovered:F=null}=e,{eventsIfTopMost:G=!1}=e,{interactive:H=!0}=e;function te(ae){F=ae,n(0,F)}function ee(ae){gn.call(this,t,ae)}function fe(ae){gn.call(this,t,ae)}function pe(ae){gn.call(this,t,ae)}function se(ae){gn.call(this,t,ae)}function Ae(ae){gn.call(this,t,ae)}function Y(ae){gn.call(this,t,ae)}return t.$$set=ae=>{"id"in ae&&n(1,s=ae.id),"source"in ae&&n(2,c=ae.source),"sourceLayer"in ae&&n(3,l=ae.sourceLayer),"beforeId"in ae&&n(4,d=ae.beforeId),"beforeLayerType"in ae&&n(5,v=ae.beforeLayerType),"paint"in ae&&n(6,S=ae.paint),"layout"in ae&&n(7,E=ae.layout),"filter"in ae&&n(8,C=ae.filter),"applyToClusters"in ae&&n(9,M=ae.applyToClusters),"minzoom"in ae&&n(10,A=ae.minzoom),"maxzoom"in ae&&n(11,R=ae.maxzoom),"hoverCursor"in ae&&n(12,z=ae.hoverCursor),"manageHoverState"in ae&&n(13,U=ae.manageHoverState),"hovered"in ae&&n(0,F=ae.hovered),"eventsIfTopMost"in ae&&n(14,G=ae.eventsIfTopMost),"interactive"in ae&&n(15,H=ae.interactive),"$$scope"in ae&&n(24,i=ae.$$scope)},[F,s,c,l,d,v,S,E,C,M,A,R,z,U,G,H,r,te,ee,fe,pe,se,Ae,Y,i]}class yC extends Yt{constructor(e){super(),Xt(this,e,IN,EN,Ut,{id:1,source:2,sourceLayer:3,beforeId:4,beforeLayerType:5,paint:6,layout:7,filter:8,applyToClusters:9,minzoom:10,maxzoom:11,hoverCursor:12,manageHoverState:13,hovered:0,eventsIfTopMost:14,interactive:15})}}var wm=Uint8Array,vC=Uint16Array,CN=Int32Array,TN=new wm([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),LN=new wm([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),bC=function(t,e){for(var n=new vC(31),r=0;r<31;++r)n[r]=e+=1<>1|(ir&21845)<<1,eu=(eu&52428)>>2|(eu&13107)<<2,eu=(eu&61680)>>4|(eu&3855)<<4,AN[ir]=((eu&65280)>>8|(eu&255)<<8)>>1;var eu,ir,cy=new wm(288);for(ir=0;ir<144;++ir)cy[ir]=8;var ir;for(ir=144;ir<256;++ir)cy[ir]=9;var ir;for(ir=256;ir<280;++ir)cy[ir]=7;var ir;for(ir=280;ir<288;++ir)cy[ir]=8;var ir,kN=new wm(32);for(ir=0;ir<32;++ir)kN[ir]=5;var ir,DN=new wm(0),RN=typeof TextDecoder<"u"&&new TextDecoder,NN=0;try{RN.decode(DN,{stream:!0}),NN=1}catch{}var ON=Object.defineProperty,zN=(t,e,n)=>e in t?ON(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,G2=(t,e,n)=>(zN(t,typeof e!="symbol"?e+"":e,n),n);function em(){}function wC(t){return t()}function q2(){return Object.create(null)}function hy(t){t.forEach(wC)}function SC(t){return typeof t=="function"}function FN(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}function BN(t){return Object.keys(t).length===0}function VN(t,e){t.appendChild(e)}function UN(t,e,n){t.insertBefore(e,n||null)}function EC(t){t.parentNode&&t.parentNode.removeChild(t)}function W2(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Vu(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function jN(t){return Array.from(t.childNodes)}function Ug(t,e,n){t.classList.toggle(e,!!n)}let Z1;function Wd(t){Z1=t}const Sf=[],H2=[];let Pf=[];const Z2=[],GN=Promise.resolve();let qv=!1;function qN(){qv||(qv=!0,GN.then(IC))}function Wv(t){Pf.push(t)}const sv=new Set;let vf=0;function IC(){if(vf!==0)return;const t=Z1;do{try{for(;vft.indexOf(r)===-1?e.push(r):n.push(r)),n.forEach(r=>r()),Pf=e}const ZN=new Set;function XN(t,e){t&&t.i&&(ZN.delete(t),t.i(e))}function YN(t,e,n){const{fragment:r,after_update:i}=t.$$;r&&r.m(e,n),Wv(()=>{const s=t.$$.on_mount.map(wC).filter(SC);t.$$.on_destroy?t.$$.on_destroy.push(...s):hy(s),t.$$.on_mount=[]}),i.forEach(Wv)}function $N(t,e){const n=t.$$;n.fragment!==null&&(HN(n.after_update),hy(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function KN(t,e){t.$$.dirty[0]===-1&&(Sf.push(t),qN(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{const A=M.length?M[0]:C;return v.ctx&&i(v.ctx[E],v.ctx[E]=A)&&(!v.skip_bound&&v.bound[E]&&v.bound[E](A),S&&KN(t,E)),C}):[],v.update(),S=!0,hy(v.before_update),v.fragment=r?r(v.ctx):!1,e.target){if(e.hydrate){const E=jN(e.target);v.fragment&&v.fragment.l(E),E.forEach(EC)}else v.fragment&&v.fragment.c();e.intro&&XN(t.$$.fragment),YN(t,e.target,e.anchor),IC()}Wd(d)}class QN{constructor(){G2(this,"$$"),G2(this,"$$set")}$destroy(){$N(this,1),this.$destroy=em}$on(e,n){if(!SC(n))return em;const r=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return r.push(n),()=>{const i=r.indexOf(n);i!==-1&&r.splice(i,1)}}$set(e){this.$$set&&!BN(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const eO="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(eO);function tO(t){let e,n,r;return{c(){e=W2("svg"),n=W2("path"),Vu(n,"stroke-width","4"),Vu(n,"d","M 5,33.103579 C 5,17.607779 18.457,5 35,5 C 51.543,5 65,17.607779 65,33.103579 C 65,56.388679 40.4668,76.048179 36.6112,79.137779 C 36.3714,79.329879 36.2116,79.457979 36.1427,79.518879 C 35.8203,79.800879 35.4102,79.942779 35,79.942779 C 34.5899,79.942779 34.1797,79.800879 33.8575,79.518879 C 33.7886,79.457979 33.6289,79.330079 33.3893,79.138079 C 29.5346,76.049279 5,56.389379 5,33.103579 Z M 35.0001,49.386379 C 43.1917,49.386379 49.8323,42.646079 49.8323,34.331379 C 49.8323,26.016779 43.1917,19.276479 35.0001,19.276479 C 26.8085,19.276479 20.1679,26.016779 20.1679,34.331379 C 20.1679,42.646079 26.8085,49.386379 35.0001,49.386379 Z"),Vu(n,"class","svelte-gzo3ar"),Vu(e,"width",r=t[0]==="list"?20:void 0),Vu(e,"viewBox","0 0 70 85"),Vu(e,"fill","none"),Vu(e,"class","svelte-gzo3ar"),Ug(e,"in-map",t[0]!=="list"),Ug(e,"list-icon",t[0]==="list")},m(i,s){UN(i,e,s),VN(e,n)},p(i,[s]){s&1&&r!==(r=i[0]==="list"?20:void 0)&&Vu(e,"width",r),s&1&&Ug(e,"in-map",i[0]!=="list"),s&1&&Ug(e,"list-icon",i[0]==="list")},i:em,o:em,d(i){i&&EC(e)}}}function nO(t,e,n){let{displayIn:r}=e;return t.$$set=i=>{"displayIn"in i&&n(0,r=i.displayIn)},[r]}class rO extends QN{constructor(e){super(),JN(this,e,nO,tO,FN,{displayIn:0})}}const iO=[{verbatimCoordinates:"40.123, -74.123",verbatimLatitude:"40.123",verbatimLongitude:"-74.123"},{verbatimCoordinates:"40.123° N 74.123° W",verbatimLatitude:"40.123° N",verbatimLongitude:"74.123° W"},{verbatimCoordinates:"40.123° N 74.123° W",verbatimLatitude:"40.123° N",verbatimLongitude:"74.123° W"},{verbatimCoordinates:'40° 7´ 22.8" N 74° 7´ 22.8" W',verbatimLatitude:'40° 7´ 22.8" N',verbatimLongitude:'74° 7´ 22.8" W'},{verbatimCoordinates:"40° 7.38’ , -74° 7.38’",verbatimLatitude:"40° 7.38’",verbatimLongitude:"-74° 7.38’"},{verbatimCoordinates:"N40°7’22.8’’, W74°7’22.8’’",verbatimLatitude:"N40°7’22.8’’",verbatimLongitude:"W74°7’22.8’’"},{verbatimCoordinates:'40°7’22.8"N, 74°7’22.8"W',verbatimLatitude:'40°7’22.8"N',verbatimLongitude:'74°7’22.8"W'},{verbatimCoordinates:`40°7'22.8"N, 74°7'22.8"W`,verbatimLatitude:`40°7'22.8"N`,verbatimLongitude:`74°7'22.8"W`},{verbatimCoordinates:"40 7 22.8, -74 7 22.8",verbatimLatitude:"40 7 22.8",verbatimLongitude:"-74 7 22.8"},{verbatimCoordinates:"40.123 -74.123",verbatimLatitude:"40.123",verbatimLongitude:"-74.123"},{verbatimCoordinates:"40.123°,-74.123°",verbatimLatitude:"40.123°",verbatimLongitude:"-74.123°"},{verbatimCoordinates:"40.123N74.123W",verbatimLatitude:"40.123N",verbatimLongitude:"74.123W"},{verbatimCoordinates:"4007.38N7407.38W",verbatimLatitude:"4007.38N",verbatimLongitude:"7407.38W"},{verbatimCoordinates:'40°7’22.8"N, 74°7’22.8"W',verbatimLatitude:'40°7’22.8"N',verbatimLongitude:'74°7’22.8"W'},{verbatimCoordinates:"400722.8N740722.8W",verbatimLatitude:"400722.8N",verbatimLongitude:"740722.8W"},{verbatimCoordinates:"N 40 7.38 W 74 7.38",verbatimLatitude:"N 40 7.38",verbatimLongitude:"W 74 7.38"},{verbatimCoordinates:"40:7:22.8N 74:7:22.8W",verbatimLatitude:"40:7:22.8N",verbatimLongitude:"74:7:22.8W"},{verbatimCoordinates:"40:7:23N,74:7:23W",verbatimLatitude:"40:7:23N",verbatimLongitude:"74:7:23W",decimalLatitude:40.1230555555,decimalLongitude:-74.1230555555},{verbatimCoordinates:'40°7’23"N 74°7’23"W',verbatimLatitude:'40°7’23"N',verbatimLongitude:'74°7’23"W',decimalLatitude:40.1230555555,decimalLongitude:-74.12305555555555},{verbatimCoordinates:'40°7’23"S 74°7’23"E',verbatimLatitude:'40°7’23"S',verbatimLongitude:'74°7’23"E',decimalLatitude:-40.1230555555,decimalLongitude:74.12305555555555},{verbatimCoordinates:'40°7’23" -74°7’23"',verbatimLatitude:'40°7’23"',verbatimLongitude:'-74°7’23"',decimalLatitude:40.1230555555,decimalLongitude:-74.123055555},{verbatimCoordinates:'40d 7’ 23" N 74d 7’ 23" W',verbatimLatitude:'40d 7’ 23" N',verbatimLongitude:'74d 7’ 23" W',decimalLatitude:40.1230555555,decimalLongitude:-74.123055555},{verbatimCoordinates:"40.123N 74.123W",verbatimLatitude:"40.123N",verbatimLongitude:"74.123W"},{verbatimCoordinates:"40° 7.38, -74° 7.38",verbatimLatitude:"40° 7.38",verbatimLongitude:"-74° 7.38"},{verbatimCoordinates:"40° 7.38, -74° 7.38",verbatimLatitude:"40° 7.38",verbatimLongitude:"-74° 7.38"},{verbatimCoordinates:"40 7 22.8; -74 7 22.8",verbatimLatitude:"40 7 22.8",verbatimLongitude:"-74 7 22.8"}],oO={decimalLatitude:40.123,decimalLongitude:-74.123},sO=[{verbatimCoordinates:`50°4'17.698"south, 14°24'2.826"east`,verbatimLatitude:`50°4'17.698"south`,verbatimLongitude:`14°24'2.826"east`,decimalLatitude:-50.07158277777778,decimalLongitude:14.400785},{verbatimCoordinates:"50d4m17.698S 14d24m2.826E",verbatimLatitude:"50d4m17.698S",verbatimLongitude:"14d24m2.826E",decimalLatitude:-50.07158277777778,decimalLongitude:14.400785},{verbatimCoordinates:"40:26:46N,79:56:55W",verbatimLatitude:"40:26:46N",verbatimLongitude:"79:56:55W",decimalLatitude:40.44611111111111,decimalLongitude:-79.9486111111111},{verbatimCoordinates:"40:26:46.302N 79:56:55.903W",verbatimLatitude:"40:26:46.302N",verbatimLongitude:"79:56:55.903W",decimalLatitude:40.446195,decimalLongitude:-79.94886194444445},{verbatimCoordinates:"40°26′47″N 79°58′36″W",verbatimLatitude:"40°26′47″N",verbatimLongitude:"79°58′36″W",decimalLatitude:40.44638888888889,decimalLongitude:-79.97666666666667},{verbatimCoordinates:"40d 26′ 47″ N 79d 58′ 36″ W",verbatimLatitude:"40d 26′ 47″ N",verbatimLongitude:"79d 58′ 36″ W",decimalLatitude:40.44638888888889,decimalLongitude:-79.97666666666667},{verbatimCoordinates:"40.446195N 79.948862W",verbatimLatitude:"40.446195N",verbatimLongitude:"79.948862W",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"40,446195° 79,948862°",verbatimLatitude:"40,446195°",verbatimLongitude:"79,948862°",decimalLatitude:40.446195,decimalLongitude:79.948862},{verbatimCoordinates:"40° 26.7717, -79° 56.93172",verbatimLatitude:"40° 26.7717",verbatimLongitude:"-79° 56.93172",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"40.446195, -79.948862",verbatimLatitude:"40.446195",verbatimLongitude:"-79.948862",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"40.123256; -74.123256",verbatimLatitude:"40.123256",verbatimLongitude:"-74.123256",decimalLatitude:40.123256,decimalLongitude:-74.123256},{verbatimCoordinates:"18°24S 22°45E",verbatimLatitude:"18°24S",verbatimLongitude:"22°45E",decimalLatitude:-18.4,decimalLongitude:22.75}],aO=[{verbatimCoordinates:"10.432342S 10.6345345E",verbatimLatitude:"10.432342S",verbatimLongitude:"10.6345345E",decimalLatitude:-10.432342,decimalLongitude:10.6345345},{verbatimCoordinates:"10.00S 10.00E",verbatimLatitude:"10.00S",verbatimLongitude:"10.00E",decimalLatitude:-10,decimalLongitude:10},{verbatimCoordinates:"00.00S 01.00E",verbatimLatitude:"00.00S",verbatimLongitude:"01.00E",decimalLatitude:0,decimalLongitude:1},{verbatimCoordinates:"18.24S 22.45E",verbatimLatitude:"18.24S",verbatimLongitude:"22.45E",decimalLatitude:-18.4,decimalLongitude:22.75},{verbatimCoordinates:"27deg 15min 45.2sec S 18deg 32min 53.7sec E",verbatimLatitude:"27deg 15min 45.2sec S",verbatimLongitude:"18deg 32min 53.7sec E",decimalLatitude:-27.262555555555554,decimalLongitude:18.54825},{verbatimCoordinates:"-23.3245° S / 28.2344° E",verbatimLatitude:"-23.3245° S",verbatimLongitude:"28.2344° E",decimalLatitude:-23.3245,decimalLongitude:28.2344},{verbatimCoordinates:"40° 26.7717 -79° 56.93172",verbatimLatitude:"40° 26.7717",verbatimLongitude:"-79° 56.93172",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"27.15.45S 18.32.53E",verbatimLatitude:"27.15.45S",verbatimLongitude:"18.32.53E",decimalLatitude:-27.2625,decimalLongitude:18.548055},{verbatimCoordinates:"-27.15.45 18.32.53",verbatimLatitude:"-27.15.45",verbatimLongitude:"18.32.53",decimalLatitude:-27.2625,decimalLongitude:18.548055},{verbatimCoordinates:"27.15.45.2S 18.32.53.4E",verbatimLatitude:"27.15.45.2S",verbatimLongitude:"18.32.53.4E",decimalLatitude:-27.262556,decimalLongitude:18.548167},{verbatimCoordinates:"27.15.45,2S 18.32.53,4E",verbatimLatitude:"27.15.45,2S",verbatimLongitude:"18.32.53,4E",decimalLatitude:-27.262556,decimalLongitude:18.548167},{verbatimCoordinates:"S23.43563 ° E22.45634 °",verbatimLatitude:"S23.43563 °",verbatimLongitude:"E22.45634 °",decimalLatitude:-23.43563,decimalLongitude:22.45634},{verbatimCoordinates:"27,71372° S 23,07771° E",verbatimLatitude:"27,71372° S",verbatimLongitude:"23,07771° E",decimalLatitude:-27.71372,decimalLongitude:23.07771},{verbatimCoordinates:"27.45.34 S 23.23.23 E",verbatimLatitude:"27.45.34 S",verbatimLongitude:"23.23.23 E",decimalLatitude:-27.759444,decimalLongitude:23.38972222},{verbatimCoordinates:"S 27.45.34 E 23.23.23",verbatimLatitude:"S 27.45.34",verbatimLongitude:"E 23.23.23",decimalLatitude:-27.759444,decimalLongitude:23.38972222}];function lO(){const t=[];return iO.forEach(e=>{e.decimalLatitude?t.push(e):t.push({...e,...oO})}),[...t,...sO,...aO]}const uO=lO();uO.map(t=>t.verbatimCoordinates);/** + data.`,S=We(),E=_e("center"),C=_e("button"),C.textContent="Start!"},m(z,U){xe(z,e,U),xe(z,n,U),xe(z,r,U),xe(z,i,U),xe(z,s,U),xe(z,c,U),xe(z,l,U),xe(z,d,U),xe(z,v,U),xe(z,S,U),xe(z,E,U),oe(E,C),M||(A=Lt(C,"click",R),M=!0)},p(z,U){t=z},d(z){z&&(be(e),be(n),be(r),be(i),be(s),be(c),be(l),be(d),be(v),be(S),be(E)),M=!1,A()}}}function ER(t){let e,n,r=t[0]&&T2(t);return{c(){r&&r.c(),e=Hi()},m(i,s){r&&r.m(i,s),xe(i,e,s),n=!0},p(i,[s]){i[0]?r?(r.p(i,s),s&1&&ue(r,1)):(r=T2(i),r.c(),ue(r,1),r.m(e.parentNode,e)):r&&(Un(),ye(r,1,1,()=>{r=null}),jn())},i(i){n||(ue(r),n=!0)},o(i){ye(r),n=!1},d(i){i&&be(e),r&&r.d(i)}}}function IR(t,e,n){let r;return mt(t,k_,c=>n(0,r=c)),[r,c=>Rr(c).close(),()=>Ft(k_,r=!1,r)]}class CR extends Yt{constructor(e){super(),Xt(this,e,IR,ER,Ut,{})}}const TR="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAk0lEQVRIS+3U0Q2AIAwEUNjMUXQydRJH0zZB0wjGuwJfSsKfuWfO1hg6n9g5P3wPWKTSXe6EVstUNEjoloIVghAG0OxR7swgLEAjHoBCvACM1AAQUgJ0DL0nm67WwJom7XrBlhVl4arUAHYniuE1ABTuBeBwD0CFs4D92T12fp9v9iPrnJ8LBu0KC0Ch9qEfeK3sAPceHxk8hJ17AAAAAElFTkSuQmCC",L2="/ltn/assets/logo_light-97f2d067.svg",P2="/ltn/assets/logo_dark-ed08d841.svg";let LR=Date.now();function hp(t){return`${t}-${LR++}`}const H1=Symbol.for("svelte-maplibre");function fp(){return BE(H1)}function PR(t){let e=new WeakMap;return n=>{var c;let r=e.get(n.originalEvent);if(r!==void 0)return r;let s=(c=n.target.queryRenderedFeatures(n.point).find(l=>{var d;return(d=t.get(l.layer.id))==null?void 0:d.interactive}))==null?void 0:c.layer.id;return e.set(n.originalEvent,s),s}}function MR(){let t=new Map;return g1(H1,{map:Nn(null),source:F0(null),layer:F0(null),popupTarget:F0(null),cluster:Nn(),loadedImages:Nn(new Set),minzoom:Nn(0),maxzoom:Nn(24),layerEvent:Nn(null),layerInfo:t,eventTopMost:PR(t)})}function M2(t){return{subscribe:t.subscribe}}function Z1({key:t,setPopupTarget:e=!1,setCluster:n=!1,setMouseEvent:r=!1}){let i=fp(),s=Nn(null),c=M2(s),l={...i,[t]:M2(s)};if(e&&(l.popupTarget=c),r){let d=Nn(null);l.layerEvent=d,i.layerEvent=d}return n&&(l.cluster=Nn()),g1(H1,l),{...i,self:s}}function AR(){return Z1({key:"source",setCluster:!0})}function kR(t=!0){return Z1({key:"layer",setPopupTarget:t,setMouseEvent:t})}function DR(){return Z1({key:"popupTarget",setPopupTarget:!0,setMouseEvent:!0})}function RR(t){return"layerType"in t&&t.layerType==="deckgl"}function A2(t){let e;return n=>{if(n)for(let r in n){let i=e==null?void 0:e[r],s=n[r];i!==s&&t(r,s,i)}else if(e)for(let r in e)t(r,void 0,e[r]);e=n}}function NR(t,...e){let n=[t];for(let r of e)if(r)Array.isArray(r)&&r[0]===t?n.push(...r.slice(1)):n.push(r);else continue;if(n.length!==1)return n.length===2?n[1]:n}function OR(t){return t===!0?["has","point_count"]:t===!1?["!",["has","point_count"]]:void 0}function Nf(t,e){return["case",["boolean",["feature-state","hover"],!1],e,t]}var Xc=zR;function zR(t){var e,n,r;if(t){if(Array.isArray(t)){for(e=[],n=t.length,r=0;r{r=null}),jn())},i(i){n||(ue(r),n=!0)},o(i){ye(r),n=!1},d(i){i&&be(e),r&&r.d(i)}}}function BR(t,e,n){let r,i,s,c,l,d,v,S,E,C,M,A,{$$slots:R={},$$scope:z}=e,{id:U=hp("layer")}=e,{source:F=void 0}=e,{sourceLayer:G=void 0}=e,{beforeId:H=void 0}=e,{beforeLayerType:te=void 0}=e,{type:ee}=e,{paint:fe=void 0}=e,{layout:pe=void 0}=e,{filter:se=void 0}=e,{applyToClusters:Ae=void 0}=e,{minzoom:Y=void 0}=e,{maxzoom:ae=void 0}=e,{manageHoverState:Ke=!1}=e,{hovered:Le=null}=e,{interactive:tt=!0}=e,{hoverCursor:ut=void 0}=e,{eventsIfTopMost:He=!1}=e;const Ot=vu(),{map:Gt,source:vt,self:At,minzoom:Mt,maxzoom:rn,eventTopMost:wn,layerInfo:fn}=kR();mt(t,Gt,ne=>n(31,E=ne)),mt(t,vt,ne=>n(32,C=ne)),mt(t,At,ne=>n(0,S=ne)),mt(t,Mt,ne=>n(34,A=ne)),mt(t,rn,ne=>n(33,M=ne)),ro(()=>{S&&E&&(fn.delete(S),E==null||E.removeLayer(S))});let _n;function pn(ne){var Re,It;if(!tt||!S||!E||He&&wn(ne)!==S)return;let Me=ne.features??[],dt=(It=(Re=Me[0])==null?void 0:Re.properties)==null?void 0:It.cluster_id,en={event:ne,map:E,clusterId:dt,layer:S,source:l,features:Me};Ot(ne.type,en)}function Yn(ne){var Re,It;if(!tt||!S||!E||He&&wn(ne)!==S)return;ut&&(E.getCanvas().style.cursor=ut);let Me=ne.features??[];n(6,Le=Me[0]??null);let dt=(It=(Re=Me[0])==null?void 0:Re.properties)==null?void 0:It.cluster_id;Ot("mouseenter",{event:ne,map:E,clusterId:dt,layer:S,source:l,features:Me})}function zr(ne){var Re,It,Cn;if(!tt||!E)return;if(He&&wn(ne)!==S){n(6,Le=null),Ke&&_n!==void 0&&(E==null||E.setFeatureState({source:l,sourceLayer:G,id:_n},{hover:!1}),_n=void 0);return}E.getCanvas().style.cursor=ut;let Me=ne.features??[],dt=(It=(Re=Me[0])==null?void 0:Re.properties)==null?void 0:It.cluster_id,en=(Cn=Me[0])==null?void 0:Cn.id;en!==_n&&(Ke&&(_n!==void 0&&(E==null||E.setFeatureState({source:l,id:_n,sourceLayer:G},{hover:!1})),E==null||E.setFeatureState({source:l,id:en,sourceLayer:G},{hover:!0})),_n=en,n(6,Le=Me[0]??null)),Ot("mousemove",{event:ne,map:E,clusterId:dt,layer:S,source:l,features:Me})}function Pn(ne){if(!(!tt||!S||!E)){if(ut&&(E.getCanvas().style.cursor=""),n(6,Le=null),Ke&&_n!==void 0){const Me={source:l,id:_n,sourceLayer:G};E==null||E.setFeatureState(Me,{hover:!1}),_n=void 0}Ot("mouseleave",{map:E,layer:S,source:l})}}let ar=!0;function Zn(ne){E&&(E.off("click",ne,pn),E.off("dblclick",ne,pn),E.off("contextmenu",ne,pn),E.off("mouseenter",ne,Yn),E.off("mousemove",ne,zr),E.off("mouseleave",ne,Pn))}return ro(()=>{E&&S&&Zn(S)}),t.$$set=ne=>{"id"in ne&&n(7,U=ne.id),"source"in ne&&n(8,F=ne.source),"sourceLayer"in ne&&n(9,G=ne.sourceLayer),"beforeId"in ne&&n(10,H=ne.beforeId),"beforeLayerType"in ne&&n(11,te=ne.beforeLayerType),"type"in ne&&n(12,ee=ne.type),"paint"in ne&&n(13,fe=ne.paint),"layout"in ne&&n(14,pe=ne.layout),"filter"in ne&&n(15,se=ne.filter),"applyToClusters"in ne&&n(16,Ae=ne.applyToClusters),"minzoom"in ne&&n(17,Y=ne.minzoom),"maxzoom"in ne&&n(18,ae=ne.maxzoom),"manageHoverState"in ne&&n(19,Ke=ne.manageHoverState),"hovered"in ne&&n(6,Le=ne.hovered),"interactive"in ne&&n(20,tt=ne.interactive),"hoverCursor"in ne&&n(21,ut=ne.hoverCursor),"eventsIfTopMost"in ne&&n(22,He=ne.eventsIfTopMost),"$$scope"in ne&&n(35,z=ne.$$scope)},t.$$.update=()=>{if(t.$$.dirty[0]&65536&&n(30,r=OR(Ae)),t.$$.dirty[0]&1073774592&&n(24,i=NR("all",r,se)),t.$$.dirty[0]&131072|t.$$.dirty[1]&8&&n(26,s=Y??A),t.$$.dirty[0]&262144|t.$$.dirty[1]&4&&n(25,c=ae??M),t.$$.dirty[0]&256|t.$$.dirty[1]&2&&n(29,l=F||C),t.$$.dirty[0]&654343809|t.$$.dirty[1]&1&&E&&S!==U&&l){S&&(Zn(S),fn.delete(S));let ne=H;if(!H&&te){let Me=E.getStyle().layers,dt=typeof te=="function"?te:Re=>Re.type===te,en=Me==null?void 0:Me.find(dt);en&&(ne=en.id)}Ft(At,S=U,S),E.addLayer(Xc({id:S,type:ee,source:l,"source-layer":G,filter:i,paint:fe,layout:pe,minzoom:s,maxzoom:c}),ne),n(23,ar=!0),E.on("click",S,pn),E.on("dblclick",S,pn),E.on("contextmenu",S,pn),E.on("mouseenter",S,Yn),E.on("mousemove",S,zr),E.on("mouseleave",S,Pn)}t.$$.dirty[0]&1048577&&S&&fn.set(S,{interactive:tt}),t.$$.dirty[0]&1|t.$$.dirty[1]&1&&n(28,d=S?A2((ne,Me)=>E==null?void 0:E.setPaintProperty(S,ne,Me)):void 0),t.$$.dirty[0]&1|t.$$.dirty[1]&1&&n(27,v=S?A2((ne,Me)=>E==null?void 0:E.setLayoutProperty(S,ne,Me)):void 0),t.$$.dirty[0]&268443648&&(d==null||d(fe)),t.$$.dirty[0]&134234112&&(v==null||v(pe)),t.$$.dirty[0]&100663297|t.$$.dirty[1]&1&&S&&(E==null||E.setLayerZoomRange(S,s,c)),t.$$.dirty[0]&25165825|t.$$.dirty[1]&1&&S&&(ar?n(23,ar=!1):E==null||E.setFilter(S,i))},[S,Gt,vt,At,Mt,rn,Le,U,F,G,H,te,ee,fe,pe,se,Ae,Y,ae,Ke,tt,ut,He,ar,i,c,s,v,d,l,r,E,C,M,A,z,R]}let cy=class extends Yt{constructor(e){super(),Xt(this,e,BR,FR,Ut,{id:7,source:8,sourceLayer:9,beforeId:10,beforeLayerType:11,type:12,paint:13,layout:14,filter:15,applyToClusters:16,minzoom:17,maxzoom:18,manageHoverState:19,hovered:6,interactive:20,hoverCursor:21,eventsIfTopMost:22},null,[-1,-1])}};function VR(t){let e;const n=t[16].default,r=Sr(n,t,t[24],null);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&16777216)&&Ir(r,n,i,i[24],e?Er(n,i[24],s,null):Cr(i[24]),null)},i(i){e||(ue(r,i),e=!0)},o(i){ye(r,i),e=!1},d(i){r&&r.d(i)}}}function UR(t){let e,n,r;function i(c){t[17](c)}let s={id:t[1],type:"circle",source:t[2],sourceLayer:t[3],beforeId:t[4],beforeLayerType:t[5],paint:t[6],layout:t[7],filter:t[8],applyToClusters:t[9],minzoom:t[10],maxzoom:t[11],hoverCursor:t[12],manageHoverState:t[13],eventsIfTopMost:t[14],interactive:t[15],$$slots:{default:[VR]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.hovered=t[0]),e=new cy({props:s}),ai.push(()=>Il(e,"hovered",i)),e.$on("click",t[18]),e.$on("dblclick",t[19]),e.$on("contextmenu",t[20]),e.$on("mouseenter",t[21]),e.$on("mousemove",t[22]),e.$on("mouseleave",t[23]),{c(){Ge(e.$$.fragment)},m(c,l){Ue(e,c,l),r=!0},p(c,[l]){const d={};l&2&&(d.id=c[1]),l&4&&(d.source=c[2]),l&8&&(d.sourceLayer=c[3]),l&16&&(d.beforeId=c[4]),l&32&&(d.beforeLayerType=c[5]),l&64&&(d.paint=c[6]),l&128&&(d.layout=c[7]),l&256&&(d.filter=c[8]),l&512&&(d.applyToClusters=c[9]),l&1024&&(d.minzoom=c[10]),l&2048&&(d.maxzoom=c[11]),l&4096&&(d.hoverCursor=c[12]),l&8192&&(d.manageHoverState=c[13]),l&16384&&(d.eventsIfTopMost=c[14]),l&32768&&(d.interactive=c[15]),l&16777216&&(d.$$scope={dirty:l,ctx:c}),!n&&l&1&&(n=!0,d.hovered=c[0],El(()=>n=!1)),e.$set(d)},i(c){r||(ue(e.$$.fragment,c),r=!0)},o(c){ye(e.$$.fragment,c),r=!1},d(c){je(e,c)}}}function jR(t,e,n){let{$$slots:r={},$$scope:i}=e,{id:s=hp("circle")}=e,{source:c=void 0}=e,{sourceLayer:l=void 0}=e,{beforeId:d=void 0}=e,{beforeLayerType:v=void 0}=e,{paint:S}=e,{layout:E=void 0}=e,{filter:C=void 0}=e,{applyToClusters:M=void 0}=e,{minzoom:A=void 0}=e,{maxzoom:R=void 0}=e,{hoverCursor:z=void 0}=e,{manageHoverState:U=!1}=e,{hovered:F=null}=e,{eventsIfTopMost:G=!1}=e,{interactive:H=!0}=e;function te(ae){F=ae,n(0,F)}function ee(ae){gn.call(this,t,ae)}function fe(ae){gn.call(this,t,ae)}function pe(ae){gn.call(this,t,ae)}function se(ae){gn.call(this,t,ae)}function Ae(ae){gn.call(this,t,ae)}function Y(ae){gn.call(this,t,ae)}return t.$$set=ae=>{"id"in ae&&n(1,s=ae.id),"source"in ae&&n(2,c=ae.source),"sourceLayer"in ae&&n(3,l=ae.sourceLayer),"beforeId"in ae&&n(4,d=ae.beforeId),"beforeLayerType"in ae&&n(5,v=ae.beforeLayerType),"paint"in ae&&n(6,S=ae.paint),"layout"in ae&&n(7,E=ae.layout),"filter"in ae&&n(8,C=ae.filter),"applyToClusters"in ae&&n(9,M=ae.applyToClusters),"minzoom"in ae&&n(10,A=ae.minzoom),"maxzoom"in ae&&n(11,R=ae.maxzoom),"hoverCursor"in ae&&n(12,z=ae.hoverCursor),"manageHoverState"in ae&&n(13,U=ae.manageHoverState),"hovered"in ae&&n(0,F=ae.hovered),"eventsIfTopMost"in ae&&n(14,G=ae.eventsIfTopMost),"interactive"in ae&&n(15,H=ae.interactive),"$$scope"in ae&&n(24,i=ae.$$scope)},[F,s,c,l,d,v,S,E,C,M,A,R,z,U,G,H,r,te,ee,fe,pe,se,Ae,Y,i]}let xm=class extends Yt{constructor(e){super(),Xt(this,e,jR,UR,Ut,{id:1,source:2,sourceLayer:3,beforeId:4,beforeLayerType:5,paint:6,layout:7,filter:8,applyToClusters:9,minzoom:10,maxzoom:11,hoverCursor:12,manageHoverState:13,hovered:0,eventsIfTopMost:14,interactive:15})}};function GR(t){let e;const n=t[15].default,r=Sr(n,t,t[23],null);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&8388608)&&Ir(r,n,i,i[23],e?Er(n,i[23],s,null):Cr(i[23]),null)},i(i){e||(ue(r,i),e=!0)},o(i){ye(r,i),e=!1},d(i){r&&r.d(i)}}}function qR(t){let e,n,r;function i(c){t[16](c)}let s={id:t[1],type:"fill",source:t[2],sourceLayer:t[3],beforeId:t[4],beforeLayerType:t[5],paint:t[6],layout:t[7],filter:t[8],minzoom:t[9],maxzoom:t[10],hoverCursor:t[11],manageHoverState:t[12],eventsIfTopMost:t[13],interactive:t[14],$$slots:{default:[GR]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.hovered=t[0]),e=new cy({props:s}),ai.push(()=>Il(e,"hovered",i)),e.$on("click",t[17]),e.$on("dblclick",t[18]),e.$on("contextmenu",t[19]),e.$on("mouseenter",t[20]),e.$on("mousemove",t[21]),e.$on("mouseleave",t[22]),{c(){Ge(e.$$.fragment)},m(c,l){Ue(e,c,l),r=!0},p(c,[l]){const d={};l&2&&(d.id=c[1]),l&4&&(d.source=c[2]),l&8&&(d.sourceLayer=c[3]),l&16&&(d.beforeId=c[4]),l&32&&(d.beforeLayerType=c[5]),l&64&&(d.paint=c[6]),l&128&&(d.layout=c[7]),l&256&&(d.filter=c[8]),l&512&&(d.minzoom=c[9]),l&1024&&(d.maxzoom=c[10]),l&2048&&(d.hoverCursor=c[11]),l&4096&&(d.manageHoverState=c[12]),l&8192&&(d.eventsIfTopMost=c[13]),l&16384&&(d.interactive=c[14]),l&8388608&&(d.$$scope={dirty:l,ctx:c}),!n&&l&1&&(n=!0,d.hovered=c[0],El(()=>n=!1)),e.$set(d)},i(c){r||(ue(e.$$.fragment,c),r=!0)},o(c){ye(e.$$.fragment,c),r=!1},d(c){je(e,c)}}}function WR(t,e,n){let{$$slots:r={},$$scope:i}=e,{id:s=hp("fill")}=e,{source:c=void 0}=e,{sourceLayer:l=void 0}=e,{beforeId:d=void 0}=e,{beforeLayerType:v=void 0}=e,{paint:S}=e,{layout:E=void 0}=e,{filter:C=void 0}=e,{minzoom:M=void 0}=e,{maxzoom:A=void 0}=e,{hoverCursor:R=void 0}=e,{manageHoverState:z=!1}=e,{hovered:U=null}=e,{eventsIfTopMost:F=!1}=e,{interactive:G=!0}=e;function H(Y){U=Y,n(0,U)}function te(Y){gn.call(this,t,Y)}function ee(Y){gn.call(this,t,Y)}function fe(Y){gn.call(this,t,Y)}function pe(Y){gn.call(this,t,Y)}function se(Y){gn.call(this,t,Y)}function Ae(Y){gn.call(this,t,Y)}return t.$$set=Y=>{"id"in Y&&n(1,s=Y.id),"source"in Y&&n(2,c=Y.source),"sourceLayer"in Y&&n(3,l=Y.sourceLayer),"beforeId"in Y&&n(4,d=Y.beforeId),"beforeLayerType"in Y&&n(5,v=Y.beforeLayerType),"paint"in Y&&n(6,S=Y.paint),"layout"in Y&&n(7,E=Y.layout),"filter"in Y&&n(8,C=Y.filter),"minzoom"in Y&&n(9,M=Y.minzoom),"maxzoom"in Y&&n(10,A=Y.maxzoom),"hoverCursor"in Y&&n(11,R=Y.hoverCursor),"manageHoverState"in Y&&n(12,z=Y.manageHoverState),"hovered"in Y&&n(0,U=Y.hovered),"eventsIfTopMost"in Y&&n(13,F=Y.eventsIfTopMost),"interactive"in Y&&n(14,G=Y.interactive),"$$scope"in Y&&n(23,i=Y.$$scope)},[U,s,c,l,d,v,S,E,C,M,A,R,z,F,G,r,H,te,ee,fe,pe,se,Ae,i]}let hc=class extends Yt{constructor(e){super(),Xt(this,e,WR,qR,Ut,{id:1,source:2,sourceLayer:3,beforeId:4,beforeLayerType:5,paint:6,layout:7,filter:8,minzoom:9,maxzoom:10,hoverCursor:11,manageHoverState:12,hovered:0,eventsIfTopMost:13,interactive:14})}};function HR(t,e,n){let r;const{map:i}=fp();mt(t,i,d=>n(4,r=d));let{position:s="top-left"}=e,{container:c=void 0}=e,l=null;return ro(()=>{r!=null&&r.loaded()&&l&&r.removeControl(l)}),t.$$set=d=>{"position"in d&&n(1,s=d.position),"container"in d&&n(2,c=d.container)},t.$$.update=()=>{if(t.$$.dirty&30&&r&&!l){let d;typeof c=="string"?d=document.querySelector(c)??void 0:d=c,n(3,l=new Bs.FullscreenControl({container:d})),r.addControl(l,s)}},[i,s,c,l,r]}class ZR extends Yt{constructor(e){super(),Xt(this,e,HR,null,Ut,{position:1,container:2})}}function XR(t,e,n,r,i){let s=!1;t.getSource(e)&&(s=!0,t.removeSource(e));const c=()=>{r(e)&&(t.addSource(e,n),i())};if(s){const l=()=>{e&&(t.getSource(e)?setTimeout(l,1):c())};l()}else c()}function YR(t,e,n){jE().then(()=>{let r=Fs(t);if(!r)return;r.getSource(e)===n&&r.removeSource(e)})}function R2(t){let e=t[0],n,r,i=N2(t);return{c(){i.c(),n=Hi()},m(s,c){i.m(s,c),xe(s,n,c),r=!0},p(s,c){c&1&&Ut(e,e=s[0])?(Un(),ye(i,1,1,Pt),jn(),i=N2(s),i.c(),ue(i,1),i.m(n.parentNode,n)):i.p(s,c)},i(s){r||(ue(i),r=!0)},o(s){ye(i),r=!1},d(s){s&&be(n),i.d(s)}}}function N2(t){let e;const n=t[19].default,r=Sr(n,t,t[18],null);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&262144)&&Ir(r,n,i,i[18],e?Er(n,i[18],s,null):Cr(i[18]),null)},i(i){e||(ue(r,i),e=!0)},o(i){ye(r,i),e=!1},d(i){r&&r.d(i)}}}function $R(t){let e,n,r=t[0]&&R2(t);return{c(){r&&r.c(),e=Hi()},m(i,s){r&&r.m(i,s),xe(i,e,s),n=!0},p(i,[s]){i[0]?r?(r.p(i,s),s&1&&ue(r,1)):(r=R2(i),r.c(),ue(r,1),r.m(e.parentNode,e)):r&&(Un(),ye(r,1,1,()=>{r=null}),jn())},i(i){n||(ue(r),n=!0)},o(i){ye(r),n=!1},d(i){i&&be(e),r&&r.d(i)}}}function KR(t,e,n){let r,i,s,{$$slots:c={},$$scope:l}=e,{id:d=hp("geojson")}=e,{data:v}=e,{generateId:S=!1}=e,{promoteId:E=void 0}=e,{filter:C=void 0}=e,{lineMetrics:M=void 0}=e,{cluster:A=void 0}=e,{maxzoom:R=void 0}=e,{attribution:z=void 0}=e,{buffer:U=void 0}=e,{tolerance:F=void 0}=e;const{map:G,cluster:H,self:te}=AR();mt(t,G,pe=>n(17,i=pe)),mt(t,H,pe=>n(20,s=pe)),mt(t,te,pe=>n(0,r=pe));let ee,fe=!0;return ro(()=>{r&&ee&&i&&(YR(G,r,ee),Ft(te,r=null,r),n(15,ee=void 0))}),t.$$set=pe=>{"id"in pe&&n(4,d=pe.id),"data"in pe&&n(5,v=pe.data),"generateId"in pe&&n(6,S=pe.generateId),"promoteId"in pe&&n(7,E=pe.promoteId),"filter"in pe&&n(8,C=pe.filter),"lineMetrics"in pe&&n(9,M=pe.lineMetrics),"cluster"in pe&&n(10,A=pe.cluster),"maxzoom"in pe&&n(11,R=pe.maxzoom),"attribution"in pe&&n(12,z=pe.attribution),"buffer"in pe&&n(13,U=pe.buffer),"tolerance"in pe&&n(14,F=pe.tolerance),"$$scope"in pe&&n(18,l=pe.$$scope)},t.$$.update=()=>{t.$$.dirty&1024&&Ft(H,s=A,s),t.$$.dirty&196593&&i&&r!==d&&(Ft(te,r=d,r),XR(i,r,Xc({type:"geojson",data:v,filter:C,lineMetrics:M,generateId:S,promoteId:E,cluster:!!A,clusterMinPoints:A==null?void 0:A.minPoints,clusterMaxZoom:A==null?void 0:A.maxZoom,clusterRadius:A==null?void 0:A.radius,clusterProperties:A==null?void 0:A.properties,maxzoom:R,attribution:z,buffer:U,tolerance:F}),pe=>i&&pe===r,()=>{r&&(n(15,ee=i==null?void 0:i.getSource(r)),n(16,fe=!0))})),t.$$.dirty&131088&&(i==null||i.on("style.load",()=>{n(15,ee=i==null?void 0:i.getSource(d))})),t.$$.dirty&98336&&ee&&(fe?n(16,fe=!1):ee.setData(v)),t.$$.dirty&33792&&(ee==null||ee.setClusterOptions(Xc({cluster:!!A,clusterMaxZoom:A==null?void 0:A.maxZoom,clusterRadius:A==null?void 0:A.radius})))},[r,G,H,te,d,v,S,E,C,M,A,R,z,U,F,ee,fe,i,l,c]}let No=class extends Yt{constructor(e){super(),Xt(this,e,KR,$R,Ut,{id:4,data:5,generateId:6,promoteId:7,filter:8,lineMetrics:9,cluster:10,maxzoom:11,attribution:12,buffer:13,tolerance:14})}};function JR(t,e,n){let r;const{map:i}=fp();mt(t,i,C=>n(8,r=C));let{position:s="top-left"}=e,{positionOptions:c=void 0}=e,{fitBoundsOptions:l=void 0}=e,{trackUserLocation:d=!1}=e,{showAccuracyCircle:v=!0}=e,{showUserLocation:S=!0}=e,{control:E=null}=e;return ro(()=>{r!=null&&r.loaded()&&E&&r.removeControl(E)}),t.$$set=C=>{"position"in C&&n(2,s=C.position),"positionOptions"in C&&n(3,c=C.positionOptions),"fitBoundsOptions"in C&&n(4,l=C.fitBoundsOptions),"trackUserLocation"in C&&n(5,d=C.trackUserLocation),"showAccuracyCircle"in C&&n(6,v=C.showAccuracyCircle),"showUserLocation"in C&&n(7,S=C.showUserLocation),"control"in C&&n(1,E=C.control)},t.$$.update=()=>{t.$$.dirty&510&&r&&!E&&(n(1,E=new Bs.GeolocateControl({positionOptions:c,fitBoundsOptions:l,trackUserLocation:d,showAccuracyCircle:v,showUserLocation:S})),r.addControl(E,s))},[i,E,s,c,l,d,v,S,r]}class QR extends Yt{constructor(e){super(),Xt(this,e,JR,null,Ut,{position:2,positionOptions:3,fitBoundsOptions:4,trackUserLocation:5,showAccuracyCircle:6,showUserLocation:7,control:1})}}function eN(t){let e;const n=t[15].default,r=Sr(n,t,t[23],null);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&8388608)&&Ir(r,n,i,i[23],e?Er(n,i[23],s,null):Cr(i[23]),null)},i(i){e||(ue(r,i),e=!0)},o(i){ye(r,i),e=!1},d(i){r&&r.d(i)}}}function tN(t){let e,n,r;function i(c){t[16](c)}let s={id:t[1],type:"line",source:t[2],sourceLayer:t[3],beforeId:t[4],beforeLayerType:t[5],paint:t[6],layout:t[7],filter:t[8],minzoom:t[9],maxzoom:t[10],hoverCursor:t[11],manageHoverState:t[12],eventsIfTopMost:t[13],interactive:t[14],$$slots:{default:[eN]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.hovered=t[0]),e=new cy({props:s}),ai.push(()=>Il(e,"hovered",i)),e.$on("click",t[17]),e.$on("dblclick",t[18]),e.$on("contextmenu",t[19]),e.$on("mouseenter",t[20]),e.$on("mousemove",t[21]),e.$on("mouseleave",t[22]),{c(){Ge(e.$$.fragment)},m(c,l){Ue(e,c,l),r=!0},p(c,[l]){const d={};l&2&&(d.id=c[1]),l&4&&(d.source=c[2]),l&8&&(d.sourceLayer=c[3]),l&16&&(d.beforeId=c[4]),l&32&&(d.beforeLayerType=c[5]),l&64&&(d.paint=c[6]),l&128&&(d.layout=c[7]),l&256&&(d.filter=c[8]),l&512&&(d.minzoom=c[9]),l&1024&&(d.maxzoom=c[10]),l&2048&&(d.hoverCursor=c[11]),l&4096&&(d.manageHoverState=c[12]),l&8192&&(d.eventsIfTopMost=c[13]),l&16384&&(d.interactive=c[14]),l&8388608&&(d.$$scope={dirty:l,ctx:c}),!n&&l&1&&(n=!0,d.hovered=c[0],El(()=>n=!1)),e.$set(d)},i(c){r||(ue(e.$$.fragment,c),r=!0)},o(c){ye(e.$$.fragment,c),r=!1},d(c){je(e,c)}}}function nN(t,e,n){let{$$slots:r={},$$scope:i}=e,{id:s=hp("line")}=e,{source:c=void 0}=e,{sourceLayer:l=void 0}=e,{beforeId:d=void 0}=e,{beforeLayerType:v=void 0}=e,{paint:S}=e,{layout:E=void 0}=e,{filter:C=void 0}=e,{minzoom:M=void 0}=e,{maxzoom:A=void 0}=e,{hoverCursor:R=void 0}=e,{manageHoverState:z=!1}=e,{hovered:U=null}=e,{eventsIfTopMost:F=!1}=e,{interactive:G=!0}=e;function H(Y){U=Y,n(0,U)}function te(Y){gn.call(this,t,Y)}function ee(Y){gn.call(this,t,Y)}function fe(Y){gn.call(this,t,Y)}function pe(Y){gn.call(this,t,Y)}function se(Y){gn.call(this,t,Y)}function Ae(Y){gn.call(this,t,Y)}return t.$$set=Y=>{"id"in Y&&n(1,s=Y.id),"source"in Y&&n(2,c=Y.source),"sourceLayer"in Y&&n(3,l=Y.sourceLayer),"beforeId"in Y&&n(4,d=Y.beforeId),"beforeLayerType"in Y&&n(5,v=Y.beforeLayerType),"paint"in Y&&n(6,S=Y.paint),"layout"in Y&&n(7,E=Y.layout),"filter"in Y&&n(8,C=Y.filter),"minzoom"in Y&&n(9,M=Y.minzoom),"maxzoom"in Y&&n(10,A=Y.maxzoom),"hoverCursor"in Y&&n(11,R=Y.hoverCursor),"manageHoverState"in Y&&n(12,z=Y.manageHoverState),"hovered"in Y&&n(0,U=Y.hovered),"eventsIfTopMost"in Y&&n(13,F=Y.eventsIfTopMost),"interactive"in Y&&n(14,G=Y.interactive),"$$scope"in Y&&n(23,i=Y.$$scope)},[U,s,c,l,d,v,S,E,C,M,A,R,z,F,G,r,H,te,ee,fe,pe,se,Ae,i]}let fc=class extends Yt{constructor(e){super(),Xt(this,e,nN,tN,Ut,{id:1,source:2,sourceLayer:3,beforeId:4,beforeLayerType:5,paint:6,layout:7,filter:8,minzoom:9,maxzoom:10,hoverCursor:11,manageHoverState:12,hovered:0,eventsIfTopMost:13,interactive:14})}};function rN(t){let e=t.getCenter(),n=Math.round(t.getZoom()*100)/100,r=Math.ceil((n*Math.LN2+Math.log(512/360/.5))/Math.LN10),i=Math.pow(10,r),s=Math.round(e.lat*i)/i,c=Math.round(e.lng*i)/i,l=`${n}/${s}/${c}`,d=t.getBearing(),v=t.getPitch();return(d||v)&&(l+=`/${Math.round(d*10)/10}`),v&&(l+=`/${Math.round(v)}`),`#${l}`}function iN(t){return t.replace("#","").split("/").map(parseFloat)}var yf=X1;function X1(t,e){return t===e||t!==t&&e!==e?!0:typeof t!=typeof e||{}.toString.call(t)!={}.toString.call(e)||t!==Object(t)||!t?!1:Array.isArray(t)?O2(t,e):{}.toString.call(t)=="[object Set]"?O2(Array.from(t),Array.from(e)):{}.toString.call(t)=="[object Object]"?sN(t,e):oN(t,e)}function oN(t,e){return t.toString()===e.toString()}function O2(t,e){var n=t.length;if(n!=e.length)return!1;for(var r=0;rn(6,r=S));let{position:s="top-left"}=e,{showCompass:c=!0}=e,{showZoom:l=!0}=e,{visualizePitch:d=!1}=e,v=null;return ro(()=>{r!=null&&r.loaded()&&v&&r.removeControl(v)}),t.$$set=S=>{"position"in S&&n(1,s=S.position),"showCompass"in S&&n(2,c=S.showCompass),"showZoom"in S&&n(3,l=S.showZoom),"visualizePitch"in S&&n(4,d=S.visualizePitch)},t.$$.update=()=>{t.$$.dirty&126&&r&&!v&&(n(5,v=new Bs.NavigationControl({showCompass:c,showZoom:l,visualizePitch:d})),r.addControl(v,s))},[i,s,c,l,d,v,r]}class lN extends Yt{constructor(e){super(),Xt(this,e,aN,null,Ut,{position:1,showCompass:2,showZoom:3,visualizePitch:4})}}function uN(t,e,n){let r;const{map:i}=fp();mt(t,i,v=>n(5,r=v));let{position:s="bottom-left"}=e,{maxWidth:c=void 0}=e,{unit:l="metric"}=e,d=null;return ro(()=>{r!=null&&r.loaded()&&d&&r.removeControl(d)}),t.$$set=v=>{"position"in v&&n(1,s=v.position),"maxWidth"in v&&n(2,c=v.maxWidth),"unit"in v&&n(3,l=v.unit)},t.$$.update=()=>{t.$$.dirty&62&&r&&!d&&(n(4,d=new Bs.ScaleControl({maxWidth:c,unit:l})),r.addControl(d,s))},[i,s,c,l,d,r]}class cN extends Yt{constructor(e){super(),Xt(this,e,uN,null,Ut,{position:1,maxWidth:2,unit:3})}}const{window:hN}=d1,fN=t=>({map:t[0]&16,loadedImages:t[0]&32,allImagesLoaded:t[0]&64}),z2=t=>({map:t[4],loadedImages:t[5],allImagesLoaded:t[6]});function F2(t){let e,n,r=t[3]&&B2(t);const i=t[40].default,s=Sr(i,t,t[39],z2);return{c(){r&&r.c(),e=We(),s&&s.c()},m(c,l){r&&r.m(c,l),xe(c,e,l),s&&s.m(c,l),n=!0},p(c,l){c[3]?r?(r.p(c,l),l[0]&8&&ue(r,1)):(r=B2(c),r.c(),ue(r,1),r.m(e.parentNode,e)):r&&(Un(),ye(r,1,1,()=>{r=null}),jn()),s&&s.p&&(!n||l[0]&112|l[1]&256)&&Ir(s,i,c,c[39],n?Er(i,c[39],l,fN):Cr(c[39]),z2)},i(c){n||(ue(r),ue(s,c),n=!0)},o(c){ye(r),ye(s,c),n=!1},d(c){c&&be(e),r&&r.d(c),s&&s.d(c)}}}function B2(t){let e,n,r,i,s,c,l,d;return e=new lN({props:{position:t[7]}}),r=new QR({props:{position:t[7],fitBoundsOptions:{maxZoom:12}}}),s=new ZR({props:{position:t[7]}}),l=new cN({props:{position:t[7]}}),{c(){Ge(e.$$.fragment),n=We(),Ge(r.$$.fragment),i=We(),Ge(s.$$.fragment),c=We(),Ge(l.$$.fragment)},m(v,S){Ue(e,v,S),xe(v,n,S),Ue(r,v,S),xe(v,i,S),Ue(s,v,S),xe(v,c,S),Ue(l,v,S),d=!0},p(v,S){const E={};S[0]&128&&(E.position=v[7]),e.$set(E);const C={};S[0]&128&&(C.position=v[7]),r.$set(C);const M={};S[0]&128&&(M.position=v[7]),s.$set(M);const A={};S[0]&128&&(A.position=v[7]),l.$set(A)},i(v){d||(ue(e.$$.fragment,v),ue(r.$$.fragment,v),ue(s.$$.fragment,v),ue(l.$$.fragment,v),d=!0)},o(v){ye(e.$$.fragment,v),ye(r.$$.fragment,v),ye(s.$$.fragment,v),ye(l.$$.fragment,v),d=!1},d(v){v&&(be(n),be(i),be(c)),je(e,v),je(r,v),je(s,v),je(l,v)}}}function pN(t){let e,n,r,i,s,c=t[4]&&t[0]&&F2(t);return{c(){e=_e("div"),c&&c.c(),Ie(e,"class",n=h_(t[2])+" svelte-p00lfq"),Ie(e,"data-testid","map-container"),xl(e,"expand-map",!t[2])},m(l,d){xe(l,e,d),c&&c.m(e,null),t[41](e),r=!0,i||(s=[Lt(hN,"hashchange",t[11]),pv(t[10].call(null,e))],i=!0)},p(l,d){l[4]&&l[0]?c?(c.p(l,d),d[0]&17&&ue(c,1)):(c=F2(l),c.c(),ue(c,1),c.m(e,null)):c&&(Un(),ye(c,1,1,()=>{c=null}),jn()),(!r||d[0]&4&&n!==(n=h_(l[2])+" svelte-p00lfq"))&&Ie(e,"class",n),(!r||d[0]&4)&&xl(e,"expand-map",!l[2])},i(l){r||(ue(c),r=!0)},o(l){ye(c),r=!1},d(l){l&&be(e),c&&c.d(),t[41](null),i=!1,Hr(s)}}}function dN(t,e,n){let r,i,s,c,{$$slots:l={},$$scope:d}=e,{map:v=null}=e,{mapContainer:S=void 0}=e,{class:E=void 0}=e,{style:C}=e,{diffStyleUpdates:M=!1}=e,{center:A=void 0}=e,{zoom:R=void 0}=e,{pitch:z=0}=e,{bearing:U=0}=e,{bounds:F=void 0}=e,{hash:G=!1}=e,{updateHash:H=ne=>{window.history.replaceState(window.history.state,"",ne)}}=e,{loaded:te=!1}=e,{minZoom:ee=0}=e,{maxZoom:fe=22}=e,{antialias:pe=void 0}=e,{zoomOnDoubleClick:se=!0}=e,{locale:Ae=void 0}=e,{interactive:Y=!0}=e,{attributionControl:ae=!0}=e,{cooperativeGestures:Ke=!1}=e,{preserveDrawingBuffer:Le=!1}=e,{maxBounds:tt=void 0}=e,{images:ut=[]}=e,{standardControls:He=!1}=e,{filterLayers:Ot=void 0}=e,{transformRequest:Gt=void 0}=e;const vt=vu(),{map:At,loadedImages:Mt}=MR();mt(t,At,ne=>n(4,s=ne)),mt(t,Mt,ne=>n(5,c=ne));let rn=new Set;async function wn(ne,Me=!1){if(s&&!(!s.loaded()&&!Me))if("url"in ne){rn.add(ne.id);try{let dt=await s.loadImage(ne.url);s==null||s.addImage(ne.id,dt.data,ne.options),c.add(ne.id),Mt.set(c)}catch(dt){vt("error",dt)}finally{rn.delete(ne.id)}}else s.addImage(ne.id,ne.data,ne.options),c.add(ne.id),Mt.set(c)}let fn,_n,pn,Yn;function zr(ne){return ar(),Ft(At,s=new Bs.Map(Xc({container:ne,style:C,locale:Ae,center:A,zoom:R,pitch:z,bearing:U,minZoom:ee,maxZoom:fe,antialias:pe,interactive:Y,preserveDrawingBuffer:Le,maxBounds:tt,bounds:F,attributionControl:ae,transformRequest:Gt,cooperativeGestures:Ke})),s),s.on("load",Me=>{Me.target.getContainer().setAttribute("data-testid","map"),Me.target.getCanvas().setAttribute("data-testid","map-canvas"),n(0,te=!0),vt("load",s)}),s.on("error",Me=>vt("error",{...Me,map:s})),s.on("movestart",Me=>vt("movestart",{...Me,map:s})),s.on("moveend",Me=>{if(n(12,A=Me.target.getCenter()),n(13,R=Me.target.getZoom()),n(14,z=Me.target.getPitch()),n(15,U=Me.target.getBearing()),n(16,F=Me.target.getBounds()),vt("moveend",{...Me,map:s}),G){let dt=new URL(window.location.href.replace(/(#.+)?$/,rN(s)));H(dt)}}),s.on("click",Me=>vt("click",{...Me,map:s})),s.on("dblclick",Me=>vt("dblclick",{...Me,map:s})),s.on("contextmenu",Me=>vt("contextmenu",{...Me,map:s})),s.on("zoomstart",Me=>vt("zoomstart",{...Me,map:s})),s.on("zoom",Me=>{vt("zoom",{...Me,map:s})}),s.on("zoomend",Me=>{vt("zoomend",{...Me,map:s})}),s.on("style.load",()=>{if(s){const Me=s.getStyle();if(n(36,fn=Me.layers.map(dt=>dt.id)),n(37,_n=Object.keys(Me.sources)),Yn)for(const[dt,en]of Object.entries(Yn))s.addSource(dt,en);if(pn)for(const dt of pn)s.addLayer(dt);for(const dt of ut)wn(dt,!0)}}),s.on("styledata",Me=>{if(s&&Ot){const dt=s.getStyle().layers;if(dt)for(let en of dt)Ot(en)||s.setLayoutProperty(en.id,"visibility","none")}vt("styledata",{...Me,map:s})}),{destroy(){n(0,te=!1),s==null||s.remove(),Ft(At,s=null,s)}}}let Pn=C;function ar(){if(G){let ne=iN(window.location.hash);ne.length>=3&&(n(13,R=ne[0]),n(12,A=[ne[2],ne[1]])),ne.length==5&&(n(15,U=ne[3]),n(14,z=ne[4]))}}function Zn(ne){ai[ne?"unshift":"push"](()=>{S=ne,n(1,S)})}return t.$$set=ne=>{"map"in ne&&n(17,v=ne.map),"mapContainer"in ne&&n(1,S=ne.mapContainer),"class"in ne&&n(2,E=ne.class),"style"in ne&&n(18,C=ne.style),"diffStyleUpdates"in ne&&n(19,M=ne.diffStyleUpdates),"center"in ne&&n(12,A=ne.center),"zoom"in ne&&n(13,R=ne.zoom),"pitch"in ne&&n(14,z=ne.pitch),"bearing"in ne&&n(15,U=ne.bearing),"bounds"in ne&&n(16,F=ne.bounds),"hash"in ne&&n(20,G=ne.hash),"updateHash"in ne&&n(21,H=ne.updateHash),"loaded"in ne&&n(0,te=ne.loaded),"minZoom"in ne&&n(22,ee=ne.minZoom),"maxZoom"in ne&&n(23,fe=ne.maxZoom),"antialias"in ne&&n(24,pe=ne.antialias),"zoomOnDoubleClick"in ne&&n(25,se=ne.zoomOnDoubleClick),"locale"in ne&&n(26,Ae=ne.locale),"interactive"in ne&&n(27,Y=ne.interactive),"attributionControl"in ne&&n(28,ae=ne.attributionControl),"cooperativeGestures"in ne&&n(29,Ke=ne.cooperativeGestures),"preserveDrawingBuffer"in ne&&n(30,Le=ne.preserveDrawingBuffer),"maxBounds"in ne&&n(31,tt=ne.maxBounds),"images"in ne&&n(32,ut=ne.images),"standardControls"in ne&&n(3,He=ne.standardControls),"filterLayers"in ne&&n(33,Ot=ne.filterLayers),"transformRequest"in ne&&n(34,Gt=ne.transformRequest),"$$scope"in ne&&n(39,d=ne.$$scope)},t.$$.update=()=>{if(t.$$.dirty[0]&8&&n(7,r=typeof He=="boolean"?void 0:He),t.$$.dirty[0]&16&&n(17,v=s),t.$$.dirty[0]&786448|t.$$.dirty[1]&224&&s&&!yf(C,Pn)){const ne=s.getStyle();if(fn&&(pn=ne.layers.filter(Me=>!fn.includes(Me.id))),_n){const Me=Object.keys(ne.sources).filter(dt=>!_n.includes(dt));Yn={};for(const dt of Me)Yn[dt]=ne.sources[dt]}n(38,Pn=C),s.setStyle(C,{diff:M}),Ft(Mt,c=new Set,c),n(35,rn=new Set)}if(t.$$.dirty[0]&49|t.$$.dirty[1]&18&&te&&s!=null&&s.loaded())for(let ne of ut)!c.has(ne.id)&&!rn.has(ne.id)&&!s.hasImage(ne.id)&&wn(ne);if(t.$$.dirty[0]&32|t.$$.dirty[1]&2&&n(6,i=ut.every(ne=>c.has(ne.id))),t.$$.dirty[0]&61456&&s){let ne={};A!=null&&!yf(A,s==null?void 0:s.getCenter())&&(ne.center=A),R!=null&&!yf(R,s==null?void 0:s.getZoom())&&(ne.zoom=R),U!=null&&!yf(U,s==null?void 0:s.getBearing())&&(ne.bearing=U),z!=null&&!yf(z,s==null?void 0:s.getPitch())&&(ne.pitch=z),Object.keys(ne).length&&s.easeTo(ne)}t.$$.dirty[0]&65552&&F&&!yf(F,s==null?void 0:s.getBounds())&&(s==null||s.fitBounds(F)),t.$$.dirty[0]&33554448&&(se?s==null||s.doubleClickZoom.enable():s==null||s.doubleClickZoom.disable())},[te,S,E,He,s,c,i,r,At,Mt,zr,ar,A,R,z,U,F,v,C,M,G,H,ee,fe,pe,se,Ae,Y,ae,Ke,Le,tt,ut,Ot,Gt,rn,fn,_n,Pn,d,l,Zn]}class mN extends Yt{constructor(e){super(),Xt(this,e,dN,pN,Ut,{map:17,mapContainer:1,class:2,style:18,diffStyleUpdates:19,center:12,zoom:13,pitch:14,bearing:15,bounds:16,hash:20,updateHash:21,loaded:0,minZoom:22,maxZoom:23,antialias:24,zoomOnDoubleClick:25,locale:26,interactive:27,attributionControl:28,cooperativeGestures:29,preserveDrawingBuffer:30,maxBounds:31,images:32,standardControls:3,filterLayers:33,transformRequest:34},null,[-1,-1])}}const gN=t=>({marker:t&8}),V2=t=>({marker:t[3]});function _N(t){let e,n,r,i,s,c,l;const d=t[19].default,v=Sr(d,t,t[18],V2);return{c(){e=_e("div"),v&&v.c(),Ie(e,"tabindex",n=t[1]?0:void 0),Ie(e,"role",r=t[1]?"button":void 0),sr(e,"z-index",t[2])},m(S,E){xe(S,e,E),v&&v.m(e,null),s=!0,c||(l=[pv(t[7].call(null,e)),pv(i=yN.call(null,e,t[0])),Lt(e,"click",O0(t[20])),Lt(e,"dblclick",O0(t[21])),Lt(e,"contextmenu",O0(t[22])),Lt(e,"mouseenter",t[23]),Lt(e,"mouseleave",t[24]),Lt(e,"mousemove",t[25]),Lt(e,"keydown",t[8])],c=!0)},p(S,[E]){v&&v.p&&(!s||E&262152)&&Ir(v,d,S,S[18],s?Er(d,S[18],E,gN):Cr(S[18]),V2),(!s||E&2&&n!==(n=S[1]?0:void 0))&&Ie(e,"tabindex",n),(!s||E&2&&r!==(r=S[1]?"button":void 0))&&Ie(e,"role",r),i&&Q_(i.update)&&E&1&&i.update.call(null,S[0]),E&4&&sr(e,"z-index",S[2])},i(S){s||(ue(v,S),s=!0)},o(S){ye(v,S),s=!1},d(S){S&&be(e),v&&v.d(S),c=!1,Hr(l)}}}function yN(t,e){const n=t.className;function r(i){i?t.className=`${n} ${i}`:t.className=n}return r(e),{update:r}}function vN(t,e,n){let r,i,s,{$$slots:c={},$$scope:l}=e,{marker:d=void 0}=e,{lngLat:v}=e,{class:S=void 0}=e,{interactive:E=!0}=e,{asButton:C=!1}=e,{draggable:M=!1}=e,{feature:A=null}=e,{offset:R=void 0}=e,{zIndex:z=void 0}=e,{rotation:U=0}=e,{opacity:F=1}=e;const G=vu(),{map:H,layerEvent:te,self:ee}=DR();mt(t,H,He=>n(27,s=He)),mt(t,te,He=>n(26,r=He)),mt(t,ee,He=>n(3,i=He));function fe(He){Ft(ee,i=new Bs.Marker({element:He,rotation:U,draggable:M,offset:R,opacity:F.toString()}).setLngLat(v).addTo(s),i),n(11,d=i);const Ot=()=>Ae("dragstart"),Gt=()=>{pe(),Ae("drag")},vt=()=>{pe(),Ae("dragend")};return M&&(i.on("dragstart",Ot),i.on("drag",Gt),i.on("dragend",vt)),{destroy(){M&&(i==null||i.off("dragstart",Ot),i==null||i.off("drag",Gt),i==null||i.off("dragend",vt)),n(11,d=void 0),i==null||i.remove()}}}function pe(){let He=i==null?void 0:i.getLngLat();He&&(Array.isArray(v)?n(10,v=[He.lng,He.lat]):v&&"lon"in v?n(10,v={lon:He.lng,lat:He.lat}):n(10,v=He))}function se(He){He.key===" "&&(He.preventDefault(),He.stopPropagation(),Ae("click"))}function Ae(He){if(!E)return;let Ot=i==null?void 0:i.getLngLat();if(!Ot)return;const Gt=[Ot.lng,Ot.lat];let vt={map:s,marker:i,lngLat:Gt,features:[{type:"Feature",properties:(A==null?void 0:A.properties)??{},geometry:{type:"Point",coordinates:Gt}}]};Ft(te,r={...vt,layerType:"marker",type:He},r),G(He,vt)}const Y=()=>Ae("click"),ae=()=>Ae("dblclick"),Ke=()=>Ae("contextmenu"),Le=He=>{Ae("mouseenter")},tt=()=>{Ae("mouseleave")},ut=()=>Ae("mousemove");return t.$$set=He=>{"marker"in He&&n(11,d=He.marker),"lngLat"in He&&n(10,v=He.lngLat),"class"in He&&n(0,S=He.class),"interactive"in He&&n(12,E=He.interactive),"asButton"in He&&n(1,C=He.asButton),"draggable"in He&&n(13,M=He.draggable),"feature"in He&&n(14,A=He.feature),"offset"in He&&n(15,R=He.offset),"zIndex"in He&&n(2,z=He.zIndex),"rotation"in He&&n(16,U=He.rotation),"opacity"in He&&n(17,F=He.opacity),"$$scope"in He&&n(18,l=He.$$scope)},t.$$.update=()=>{t.$$.dirty&1032&&(i==null||i.setLngLat(v)),t.$$.dirty&32776&&(i==null||i.setOffset(R??[0,0])),t.$$.dirty&65544&&(i==null||i.setRotation(U)),t.$$.dirty&131080&&(i==null||i.setOpacity(F.toString()))},[S,C,z,i,H,te,ee,fe,se,Ae,v,d,E,M,A,R,U,F,l,c,Y,ae,Ke,Le,tt,ut]}class U2 extends Yt{constructor(e){super(),Xt(this,e,vN,_N,Ut,{marker:11,lngLat:10,class:0,interactive:12,asButton:1,draggable:13,feature:14,offset:15,zIndex:2,rotation:16,opacity:17})}}const bN=t=>({features:t[0]&16,data:t[0]&16,map:t[0]&4,close:t[0]&1}),j2=t=>{var e;return{features:t[4],data:(e=t[4])==null?void 0:e[0],map:t[2],close:t[31]}};function G2(t){let e,n,r=(t[4]||t[3]instanceof Bs.Marker)&&q2(t);return{c(){e=_e("div"),r&&r.c()},m(i,s){xe(i,e,s),r&&r.m(e,null),t[32](e),n=!0},p(i,s){i[4]||i[3]instanceof Bs.Marker?r?(r.p(i,s),s[0]&24&&ue(r,1)):(r=q2(i),r.c(),ue(r,1),r.m(e,null)):r&&(Un(),ye(r,1,1,()=>{r=null}),jn())},i(i){n||(ue(r),n=!0)},o(i){ye(r),n=!1},d(i){i&&be(e),r&&r.d(),t[32](null)}}}function q2(t){let e;const n=t[30].default,r=Sr(n,t,t[29],j2);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s[0]&536870933)&&Ir(r,n,i,i[29],e?Er(n,i[29],s,bN):Cr(i[29]),j2)},i(i){e||(ue(r,i),e=!0)},o(i){ye(r,i),e=!1},d(i){r&&r.d(i)}}}function xN(t){let e,n,r=t[9].default&&G2(t);return{c(){r&&r.c(),e=Hi()},m(i,s){r&&r.m(i,s),xe(i,e,s),n=!0},p(i,s){i[9].default?r?(r.p(i,s),s[0]&512&&ue(r,1)):(r=G2(i),r.c(),ue(r,1),r.m(e.parentNode,e)):r&&(Un(),ye(r,1,1,()=>{r=null}),jn())},i(i){n||(ue(r),n=!0)},o(i){ye(r),n=!1},d(i){i&&be(e),r&&r.d(i)}}}function wN(t,e,n){let r,i,s,c,l,d,{$$slots:v={},$$scope:S}=e;const E=VP(v);let{closeButton:C=void 0}=e,{closeOnClickOutside:M=!0}=e,{closeOnClickInside:A=!1}=e,{closeOnMove:R=!1}=e,{openOn:z="click"}=e,{openIfTopMost:U=!0}=e,{focusAfterOpen:F=!0}=e,{anchor:G=void 0}=e,{offset:H=void 0}=e,{popupClass:te=void 0}=e,{maxWidth:ee=void 0}=e,{lngLat:fe=void 0}=e,{html:pe=void 0}=e,{open:se=!1}=e;const Ae=vu(),{map:Y,popupTarget:ae,layerEvent:Ke,layer:Le,eventTopMost:tt}=fp();mt(t,Y,Me=>n(2,s=Me)),mt(t,ae,Me=>n(3,l=Me)),mt(t,Ke,Me=>n(28,c=Me)),mt(t,Le,Me=>n(35,d=Me));const ut=["click","dblclick","contextmenu"];let He,Ot=!1,Gt;function vt(){if(!He)return;let Me=He.getElement();!Me||Me===Gt||(Gt=Me,z==="hover"&&(Gt.style.pointerEvents="none"),Gt.addEventListener("mouseenter",()=>{n(24,Ot=!0)},{passive:!0}),Gt.addEventListener("mouseleave",()=>{n(24,Ot=!1)},{passive:!0}),Gt.addEventListener("click",()=>{A&&n(0,se=!1)},{passive:!0}))}ey(()=>{if(s)return s.on("click",Pn),s.on("contextmenu",Pn),typeof l=="string"&&(s.on("click",l,wn),s.on("dblclick",l,wn),s.on("contextmenu",l,wn),s.on("mousemove",l,zr),s.on("mouseleave",l,Yn),s.on("touchstart",l,_n),s.on("touchend",l,pn)),()=>{s!=null&&s.loaded()&&(He==null||He.remove(),s.off("click",Pn),s.off("contextmenu",Pn),l instanceof Bs.Marker?l.getPopup()===He&&l.setPopup(void 0):typeof l=="string"&&(s.off("click",l,wn),s.off("dblclick",l,wn),s.off("contextmenu",l,wn),s.off("mousemove",l,zr),s.off("mouseleave",l,Yn),s.off("touchstart",l,_n),s.off("touchend",l,pn)))}});function At(Me){return U?!("marker"in Me)&&!RR(Me)&&tt(Me)!==d:!1}let Mt=null,rn="normal";function wn(Me){Me.type===z&&(At(Me)||("layerType"in Me?Me.layerType==="deckgl"?(n(10,fe=Me.coordinate),n(4,Mt=Me.object?[Me.object]:null)):(n(10,fe=Me.lngLat),n(4,Mt=Me.features??[])):(n(10,fe=Me.lngLat),n(4,Mt=Me.features??[])),setTimeout(()=>n(0,se=!0))))}let fn=null;function _n(Me){fn=Me.point}function pn(Me){if(!fn||z!=="hover")return;let dt=fn.dist(Me.point);fn=null,dt<3&&(n(10,fe=Me.lngLat),n(4,Mt=Me.features??[]),He.isOpen()?n(25,rn="justOpened"):(n(25,rn="opening"),n(0,se=!0)))}function Yn(Me){z!=="hover"||fn||rn!=="normal"||(n(0,se=!1),n(4,Mt=null))}function zr(Me){if(!(z!=="hover"||fn||rn!=="normal")){if(At(Me)){n(0,se=!1),n(4,Mt=null);return}n(0,se=!0),n(4,Mt=Me.features??[]),n(10,fe=Me.lngLat)}}function Pn(Me){if(rn==="justOpened"){n(25,rn="normal");return}if(!M)return;let dt=[Gt,l instanceof Bs.Marker?l==null?void 0:l.getElement():null];se&&He.isOpen()&&!dt.some(en=>en==null?void 0:en.contains(Me.originalEvent.target))&&(Me.type==="contextmenu"&&z==="contextmenu"||Me.type!=="contextmenu")&&n(0,se=!1)}ro(()=>{s&&(He!=null&&He.isOpen())&&He.remove()});let ar;const Zn=()=>n(0,se=!1);function ne(Me){ai[Me?"unshift":"push"](()=>{ar=Me,n(1,ar)})}return t.$$set=Me=>{"closeButton"in Me&&n(11,C=Me.closeButton),"closeOnClickOutside"in Me&&n(12,M=Me.closeOnClickOutside),"closeOnClickInside"in Me&&n(13,A=Me.closeOnClickInside),"closeOnMove"in Me&&n(14,R=Me.closeOnMove),"openOn"in Me&&n(15,z=Me.openOn),"openIfTopMost"in Me&&n(16,U=Me.openIfTopMost),"focusAfterOpen"in Me&&n(17,F=Me.focusAfterOpen),"anchor"in Me&&n(18,G=Me.anchor),"offset"in Me&&n(19,H=Me.offset),"popupClass"in Me&&n(20,te=Me.popupClass),"maxWidth"in Me&&n(21,ee=Me.maxWidth),"lngLat"in Me&&n(10,fe=Me.lngLat),"html"in Me&&n(22,pe=Me.html),"open"in Me&&n(0,se=Me.open),"$$scope"in Me&&n(29,S=Me.$$scope)},t.$$.update=()=>{if(t.$$.dirty[0]&14336&&n(27,r=C??(!M&&!A)),t.$$.dirty[0]&146685952&&(He||(n(23,He=new Bs.Popup({closeButton:r,closeOnClick:!1,closeOnMove:R,focusAfterOpen:F,maxWidth:ee,className:te,anchor:G,offset:H})),Gt=He.getElement(),He.on("open",()=>{n(0,se=!0),vt(),Ae("open",He)}),He.on("close",()=>{n(0,se=!1),Ae("close",He)}),He.on("hover",()=>{Ae("hover",He)}))),t.$$.dirty[0]&8421384&&He&&l instanceof Bs.Marker&&(z==="click"?l.setPopup(He):l.getPopup()===He&&l.setPopup(void 0)),t.$$.dirty[0]&268468224&&ut.includes(z)&&(c==null?void 0:c.type)===z&&(wn(c),Ft(Ke,c=null,c)),t.$$.dirty[0]&268468224&&n(26,i=z==="hover"&&((c==null?void 0:c.type)==="mousemove"||(c==null?void 0:c.type)==="mouseenter")),t.$$.dirty[0]&352354304&&z==="hover"&&Ke&&(i&&c&&(c.layerType==="deckgl"?(n(10,fe=c.coordinate),n(4,Mt=c.object?[c.object]:null)):(n(10,fe=c.lngLat),n(4,Mt=c.features??[]))),n(0,se=(i||Ot)??!1)),t.$$.dirty[0]&12582914&&(ar?He.setDOMContent(ar):pe&&He.setHTML(pe)),t.$$.dirty[0]&8389632&&fe&&He.setLngLat(fe),t.$$.dirty[0]&41943045&&s){let Me=He.isOpen();se&&!Me?(He.addTo(s),rn==="opening"&&n(25,rn="justOpened")):!se&&Me&&He.remove()}},[se,ar,s,l,Mt,Y,ae,Ke,Le,E,fe,C,M,A,R,z,U,F,G,H,te,ee,pe,He,Ot,rn,i,r,c,S,v,Zn,ne]}class SN extends Yt{constructor(e){super(),Xt(this,e,wN,xN,Ut,{closeButton:11,closeOnClickOutside:12,closeOnClickInside:13,closeOnMove:14,openOn:15,openIfTopMost:16,focusAfterOpen:17,anchor:18,offset:19,popupClass:20,maxWidth:21,lngLat:10,html:22,open:0},null,[-1,-1])}}function EN(t){let e;const n=t[16].default,r=Sr(n,t,t[24],null);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&16777216)&&Ir(r,n,i,i[24],e?Er(n,i[24],s,null):Cr(i[24]),null)},i(i){e||(ue(r,i),e=!0)},o(i){ye(r,i),e=!1},d(i){r&&r.d(i)}}}function IN(t){let e,n,r;function i(c){t[17](c)}let s={id:t[1],type:"symbol",source:t[2],sourceLayer:t[3],beforeId:t[4],beforeLayerType:t[5],paint:t[6],layout:t[7],filter:t[8],applyToClusters:t[9],minzoom:t[10],maxzoom:t[11],hoverCursor:t[12],manageHoverState:t[13],eventsIfTopMost:t[14],interactive:t[15],$$slots:{default:[EN]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.hovered=t[0]),e=new cy({props:s}),ai.push(()=>Il(e,"hovered",i)),e.$on("click",t[18]),e.$on("dblclick",t[19]),e.$on("contextmenu",t[20]),e.$on("mouseenter",t[21]),e.$on("mousemove",t[22]),e.$on("mouseleave",t[23]),{c(){Ge(e.$$.fragment)},m(c,l){Ue(e,c,l),r=!0},p(c,[l]){const d={};l&2&&(d.id=c[1]),l&4&&(d.source=c[2]),l&8&&(d.sourceLayer=c[3]),l&16&&(d.beforeId=c[4]),l&32&&(d.beforeLayerType=c[5]),l&64&&(d.paint=c[6]),l&128&&(d.layout=c[7]),l&256&&(d.filter=c[8]),l&512&&(d.applyToClusters=c[9]),l&1024&&(d.minzoom=c[10]),l&2048&&(d.maxzoom=c[11]),l&4096&&(d.hoverCursor=c[12]),l&8192&&(d.manageHoverState=c[13]),l&16384&&(d.eventsIfTopMost=c[14]),l&32768&&(d.interactive=c[15]),l&16777216&&(d.$$scope={dirty:l,ctx:c}),!n&&l&1&&(n=!0,d.hovered=c[0],El(()=>n=!1)),e.$set(d)},i(c){r||(ue(e.$$.fragment,c),r=!0)},o(c){ye(e.$$.fragment,c),r=!1},d(c){je(e,c)}}}function CN(t,e,n){let{$$slots:r={},$$scope:i}=e,{id:s=hp("symbol")}=e,{source:c=void 0}=e,{sourceLayer:l=void 0}=e,{beforeId:d=void 0}=e,{beforeLayerType:v=void 0}=e,{paint:S=void 0}=e,{layout:E=void 0}=e,{filter:C=void 0}=e,{applyToClusters:M=void 0}=e,{minzoom:A=void 0}=e,{maxzoom:R=void 0}=e,{hoverCursor:z=void 0}=e,{manageHoverState:U=!1}=e,{hovered:F=null}=e,{eventsIfTopMost:G=!1}=e,{interactive:H=!0}=e;function te(ae){F=ae,n(0,F)}function ee(ae){gn.call(this,t,ae)}function fe(ae){gn.call(this,t,ae)}function pe(ae){gn.call(this,t,ae)}function se(ae){gn.call(this,t,ae)}function Ae(ae){gn.call(this,t,ae)}function Y(ae){gn.call(this,t,ae)}return t.$$set=ae=>{"id"in ae&&n(1,s=ae.id),"source"in ae&&n(2,c=ae.source),"sourceLayer"in ae&&n(3,l=ae.sourceLayer),"beforeId"in ae&&n(4,d=ae.beforeId),"beforeLayerType"in ae&&n(5,v=ae.beforeLayerType),"paint"in ae&&n(6,S=ae.paint),"layout"in ae&&n(7,E=ae.layout),"filter"in ae&&n(8,C=ae.filter),"applyToClusters"in ae&&n(9,M=ae.applyToClusters),"minzoom"in ae&&n(10,A=ae.minzoom),"maxzoom"in ae&&n(11,R=ae.maxzoom),"hoverCursor"in ae&&n(12,z=ae.hoverCursor),"manageHoverState"in ae&&n(13,U=ae.manageHoverState),"hovered"in ae&&n(0,F=ae.hovered),"eventsIfTopMost"in ae&&n(14,G=ae.eventsIfTopMost),"interactive"in ae&&n(15,H=ae.interactive),"$$scope"in ae&&n(24,i=ae.$$scope)},[F,s,c,l,d,v,S,E,C,M,A,R,z,U,G,H,r,te,ee,fe,pe,se,Ae,Y,i]}class bC extends Yt{constructor(e){super(),Xt(this,e,CN,IN,Ut,{id:1,source:2,sourceLayer:3,beforeId:4,beforeLayerType:5,paint:6,layout:7,filter:8,applyToClusters:9,minzoom:10,maxzoom:11,hoverCursor:12,manageHoverState:13,hovered:0,eventsIfTopMost:14,interactive:15})}}var wm=Uint8Array,xC=Uint16Array,TN=Int32Array,LN=new wm([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),PN=new wm([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),wC=function(t,e){for(var n=new xC(31),r=0;r<31;++r)n[r]=e+=1<>1|(ir&21845)<<1,eu=(eu&52428)>>2|(eu&13107)<<2,eu=(eu&61680)>>4|(eu&3855)<<4,kN[ir]=((eu&65280)>>8|(eu&255)<<8)>>1;var eu,ir,hy=new wm(288);for(ir=0;ir<144;++ir)hy[ir]=8;var ir;for(ir=144;ir<256;++ir)hy[ir]=9;var ir;for(ir=256;ir<280;++ir)hy[ir]=7;var ir;for(ir=280;ir<288;++ir)hy[ir]=8;var ir,DN=new wm(32);for(ir=0;ir<32;++ir)DN[ir]=5;var ir,RN=new wm(0),NN=typeof TextDecoder<"u"&&new TextDecoder,ON=0;try{NN.decode(RN,{stream:!0}),ON=1}catch{}var zN=Object.defineProperty,FN=(t,e,n)=>e in t?zN(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,W2=(t,e,n)=>(FN(t,typeof e!="symbol"?e+"":e,n),n);function em(){}function EC(t){return t()}function H2(){return Object.create(null)}function fy(t){t.forEach(EC)}function IC(t){return typeof t=="function"}function BN(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}function VN(t){return Object.keys(t).length===0}function UN(t,e){t.appendChild(e)}function jN(t,e,n){t.insertBefore(e,n||null)}function CC(t){t.parentNode&&t.parentNode.removeChild(t)}function Z2(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Uu(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function GN(t){return Array.from(t.childNodes)}function Ug(t,e,n){t.classList.toggle(e,!!n)}let Y1;function Wd(t){Y1=t}const Sf=[],X2=[];let Pf=[];const Y2=[],qN=Promise.resolve();let Wv=!1;function WN(){Wv||(Wv=!0,qN.then(TC))}function Hv(t){Pf.push(t)}const av=new Set;let vf=0;function TC(){if(vf!==0)return;const t=Y1;do{try{for(;vft.indexOf(r)===-1?e.push(r):n.push(r)),n.forEach(r=>r()),Pf=e}const XN=new Set;function YN(t,e){t&&t.i&&(XN.delete(t),t.i(e))}function $N(t,e,n){const{fragment:r,after_update:i}=t.$$;r&&r.m(e,n),Hv(()=>{const s=t.$$.on_mount.map(EC).filter(IC);t.$$.on_destroy?t.$$.on_destroy.push(...s):fy(s),t.$$.on_mount=[]}),i.forEach(Hv)}function KN(t,e){const n=t.$$;n.fragment!==null&&(ZN(n.after_update),fy(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function JN(t,e){t.$$.dirty[0]===-1&&(Sf.push(t),WN(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{const A=M.length?M[0]:C;return v.ctx&&i(v.ctx[E],v.ctx[E]=A)&&(!v.skip_bound&&v.bound[E]&&v.bound[E](A),S&&JN(t,E)),C}):[],v.update(),S=!0,fy(v.before_update),v.fragment=r?r(v.ctx):!1,e.target){if(e.hydrate){const E=GN(e.target);v.fragment&&v.fragment.l(E),E.forEach(CC)}else v.fragment&&v.fragment.c();e.intro&&YN(t.$$.fragment),$N(t,e.target,e.anchor),TC()}Wd(d)}class eO{constructor(){W2(this,"$$"),W2(this,"$$set")}$destroy(){KN(this,1),this.$destroy=em}$on(e,n){if(!IC(n))return em;const r=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return r.push(n),()=>{const i=r.indexOf(n);i!==-1&&r.splice(i,1)}}$set(e){this.$$set&&!VN(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const tO="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(tO);function nO(t){let e,n,r;return{c(){e=Z2("svg"),n=Z2("path"),Uu(n,"stroke-width","4"),Uu(n,"d","M 5,33.103579 C 5,17.607779 18.457,5 35,5 C 51.543,5 65,17.607779 65,33.103579 C 65,56.388679 40.4668,76.048179 36.6112,79.137779 C 36.3714,79.329879 36.2116,79.457979 36.1427,79.518879 C 35.8203,79.800879 35.4102,79.942779 35,79.942779 C 34.5899,79.942779 34.1797,79.800879 33.8575,79.518879 C 33.7886,79.457979 33.6289,79.330079 33.3893,79.138079 C 29.5346,76.049279 5,56.389379 5,33.103579 Z M 35.0001,49.386379 C 43.1917,49.386379 49.8323,42.646079 49.8323,34.331379 C 49.8323,26.016779 43.1917,19.276479 35.0001,19.276479 C 26.8085,19.276479 20.1679,26.016779 20.1679,34.331379 C 20.1679,42.646079 26.8085,49.386379 35.0001,49.386379 Z"),Uu(n,"class","svelte-gzo3ar"),Uu(e,"width",r=t[0]==="list"?20:void 0),Uu(e,"viewBox","0 0 70 85"),Uu(e,"fill","none"),Uu(e,"class","svelte-gzo3ar"),Ug(e,"in-map",t[0]!=="list"),Ug(e,"list-icon",t[0]==="list")},m(i,s){jN(i,e,s),UN(e,n)},p(i,[s]){s&1&&r!==(r=i[0]==="list"?20:void 0)&&Uu(e,"width",r),s&1&&Ug(e,"in-map",i[0]!=="list"),s&1&&Ug(e,"list-icon",i[0]==="list")},i:em,o:em,d(i){i&&CC(e)}}}function rO(t,e,n){let{displayIn:r}=e;return t.$$set=i=>{"displayIn"in i&&n(0,r=i.displayIn)},[r]}class iO extends eO{constructor(e){super(),QN(this,e,rO,nO,BN,{displayIn:0})}}const oO=[{verbatimCoordinates:"40.123, -74.123",verbatimLatitude:"40.123",verbatimLongitude:"-74.123"},{verbatimCoordinates:"40.123° N 74.123° W",verbatimLatitude:"40.123° N",verbatimLongitude:"74.123° W"},{verbatimCoordinates:"40.123° N 74.123° W",verbatimLatitude:"40.123° N",verbatimLongitude:"74.123° W"},{verbatimCoordinates:'40° 7´ 22.8" N 74° 7´ 22.8" W',verbatimLatitude:'40° 7´ 22.8" N',verbatimLongitude:'74° 7´ 22.8" W'},{verbatimCoordinates:"40° 7.38’ , -74° 7.38’",verbatimLatitude:"40° 7.38’",verbatimLongitude:"-74° 7.38’"},{verbatimCoordinates:"N40°7’22.8’’, W74°7’22.8’’",verbatimLatitude:"N40°7’22.8’’",verbatimLongitude:"W74°7’22.8’’"},{verbatimCoordinates:'40°7’22.8"N, 74°7’22.8"W',verbatimLatitude:'40°7’22.8"N',verbatimLongitude:'74°7’22.8"W'},{verbatimCoordinates:`40°7'22.8"N, 74°7'22.8"W`,verbatimLatitude:`40°7'22.8"N`,verbatimLongitude:`74°7'22.8"W`},{verbatimCoordinates:"40 7 22.8, -74 7 22.8",verbatimLatitude:"40 7 22.8",verbatimLongitude:"-74 7 22.8"},{verbatimCoordinates:"40.123 -74.123",verbatimLatitude:"40.123",verbatimLongitude:"-74.123"},{verbatimCoordinates:"40.123°,-74.123°",verbatimLatitude:"40.123°",verbatimLongitude:"-74.123°"},{verbatimCoordinates:"40.123N74.123W",verbatimLatitude:"40.123N",verbatimLongitude:"74.123W"},{verbatimCoordinates:"4007.38N7407.38W",verbatimLatitude:"4007.38N",verbatimLongitude:"7407.38W"},{verbatimCoordinates:'40°7’22.8"N, 74°7’22.8"W',verbatimLatitude:'40°7’22.8"N',verbatimLongitude:'74°7’22.8"W'},{verbatimCoordinates:"400722.8N740722.8W",verbatimLatitude:"400722.8N",verbatimLongitude:"740722.8W"},{verbatimCoordinates:"N 40 7.38 W 74 7.38",verbatimLatitude:"N 40 7.38",verbatimLongitude:"W 74 7.38"},{verbatimCoordinates:"40:7:22.8N 74:7:22.8W",verbatimLatitude:"40:7:22.8N",verbatimLongitude:"74:7:22.8W"},{verbatimCoordinates:"40:7:23N,74:7:23W",verbatimLatitude:"40:7:23N",verbatimLongitude:"74:7:23W",decimalLatitude:40.1230555555,decimalLongitude:-74.1230555555},{verbatimCoordinates:'40°7’23"N 74°7’23"W',verbatimLatitude:'40°7’23"N',verbatimLongitude:'74°7’23"W',decimalLatitude:40.1230555555,decimalLongitude:-74.12305555555555},{verbatimCoordinates:'40°7’23"S 74°7’23"E',verbatimLatitude:'40°7’23"S',verbatimLongitude:'74°7’23"E',decimalLatitude:-40.1230555555,decimalLongitude:74.12305555555555},{verbatimCoordinates:'40°7’23" -74°7’23"',verbatimLatitude:'40°7’23"',verbatimLongitude:'-74°7’23"',decimalLatitude:40.1230555555,decimalLongitude:-74.123055555},{verbatimCoordinates:'40d 7’ 23" N 74d 7’ 23" W',verbatimLatitude:'40d 7’ 23" N',verbatimLongitude:'74d 7’ 23" W',decimalLatitude:40.1230555555,decimalLongitude:-74.123055555},{verbatimCoordinates:"40.123N 74.123W",verbatimLatitude:"40.123N",verbatimLongitude:"74.123W"},{verbatimCoordinates:"40° 7.38, -74° 7.38",verbatimLatitude:"40° 7.38",verbatimLongitude:"-74° 7.38"},{verbatimCoordinates:"40° 7.38, -74° 7.38",verbatimLatitude:"40° 7.38",verbatimLongitude:"-74° 7.38"},{verbatimCoordinates:"40 7 22.8; -74 7 22.8",verbatimLatitude:"40 7 22.8",verbatimLongitude:"-74 7 22.8"}],sO={decimalLatitude:40.123,decimalLongitude:-74.123},aO=[{verbatimCoordinates:`50°4'17.698"south, 14°24'2.826"east`,verbatimLatitude:`50°4'17.698"south`,verbatimLongitude:`14°24'2.826"east`,decimalLatitude:-50.07158277777778,decimalLongitude:14.400785},{verbatimCoordinates:"50d4m17.698S 14d24m2.826E",verbatimLatitude:"50d4m17.698S",verbatimLongitude:"14d24m2.826E",decimalLatitude:-50.07158277777778,decimalLongitude:14.400785},{verbatimCoordinates:"40:26:46N,79:56:55W",verbatimLatitude:"40:26:46N",verbatimLongitude:"79:56:55W",decimalLatitude:40.44611111111111,decimalLongitude:-79.9486111111111},{verbatimCoordinates:"40:26:46.302N 79:56:55.903W",verbatimLatitude:"40:26:46.302N",verbatimLongitude:"79:56:55.903W",decimalLatitude:40.446195,decimalLongitude:-79.94886194444445},{verbatimCoordinates:"40°26′47″N 79°58′36″W",verbatimLatitude:"40°26′47″N",verbatimLongitude:"79°58′36″W",decimalLatitude:40.44638888888889,decimalLongitude:-79.97666666666667},{verbatimCoordinates:"40d 26′ 47″ N 79d 58′ 36″ W",verbatimLatitude:"40d 26′ 47″ N",verbatimLongitude:"79d 58′ 36″ W",decimalLatitude:40.44638888888889,decimalLongitude:-79.97666666666667},{verbatimCoordinates:"40.446195N 79.948862W",verbatimLatitude:"40.446195N",verbatimLongitude:"79.948862W",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"40,446195° 79,948862°",verbatimLatitude:"40,446195°",verbatimLongitude:"79,948862°",decimalLatitude:40.446195,decimalLongitude:79.948862},{verbatimCoordinates:"40° 26.7717, -79° 56.93172",verbatimLatitude:"40° 26.7717",verbatimLongitude:"-79° 56.93172",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"40.446195, -79.948862",verbatimLatitude:"40.446195",verbatimLongitude:"-79.948862",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"40.123256; -74.123256",verbatimLatitude:"40.123256",verbatimLongitude:"-74.123256",decimalLatitude:40.123256,decimalLongitude:-74.123256},{verbatimCoordinates:"18°24S 22°45E",verbatimLatitude:"18°24S",verbatimLongitude:"22°45E",decimalLatitude:-18.4,decimalLongitude:22.75}],lO=[{verbatimCoordinates:"10.432342S 10.6345345E",verbatimLatitude:"10.432342S",verbatimLongitude:"10.6345345E",decimalLatitude:-10.432342,decimalLongitude:10.6345345},{verbatimCoordinates:"10.00S 10.00E",verbatimLatitude:"10.00S",verbatimLongitude:"10.00E",decimalLatitude:-10,decimalLongitude:10},{verbatimCoordinates:"00.00S 01.00E",verbatimLatitude:"00.00S",verbatimLongitude:"01.00E",decimalLatitude:0,decimalLongitude:1},{verbatimCoordinates:"18.24S 22.45E",verbatimLatitude:"18.24S",verbatimLongitude:"22.45E",decimalLatitude:-18.4,decimalLongitude:22.75},{verbatimCoordinates:"27deg 15min 45.2sec S 18deg 32min 53.7sec E",verbatimLatitude:"27deg 15min 45.2sec S",verbatimLongitude:"18deg 32min 53.7sec E",decimalLatitude:-27.262555555555554,decimalLongitude:18.54825},{verbatimCoordinates:"-23.3245° S / 28.2344° E",verbatimLatitude:"-23.3245° S",verbatimLongitude:"28.2344° E",decimalLatitude:-23.3245,decimalLongitude:28.2344},{verbatimCoordinates:"40° 26.7717 -79° 56.93172",verbatimLatitude:"40° 26.7717",verbatimLongitude:"-79° 56.93172",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"27.15.45S 18.32.53E",verbatimLatitude:"27.15.45S",verbatimLongitude:"18.32.53E",decimalLatitude:-27.2625,decimalLongitude:18.548055},{verbatimCoordinates:"-27.15.45 18.32.53",verbatimLatitude:"-27.15.45",verbatimLongitude:"18.32.53",decimalLatitude:-27.2625,decimalLongitude:18.548055},{verbatimCoordinates:"27.15.45.2S 18.32.53.4E",verbatimLatitude:"27.15.45.2S",verbatimLongitude:"18.32.53.4E",decimalLatitude:-27.262556,decimalLongitude:18.548167},{verbatimCoordinates:"27.15.45,2S 18.32.53,4E",verbatimLatitude:"27.15.45,2S",verbatimLongitude:"18.32.53,4E",decimalLatitude:-27.262556,decimalLongitude:18.548167},{verbatimCoordinates:"S23.43563 ° E22.45634 °",verbatimLatitude:"S23.43563 °",verbatimLongitude:"E22.45634 °",decimalLatitude:-23.43563,decimalLongitude:22.45634},{verbatimCoordinates:"27,71372° S 23,07771° E",verbatimLatitude:"27,71372° S",verbatimLongitude:"23,07771° E",decimalLatitude:-27.71372,decimalLongitude:23.07771},{verbatimCoordinates:"27.45.34 S 23.23.23 E",verbatimLatitude:"27.45.34 S",verbatimLongitude:"23.23.23 E",decimalLatitude:-27.759444,decimalLongitude:23.38972222},{verbatimCoordinates:"S 27.45.34 E 23.23.23",verbatimLatitude:"S 27.45.34",verbatimLongitude:"E 23.23.23",decimalLatitude:-27.759444,decimalLongitude:23.38972222}];function uO(){const t=[];return oO.forEach(e=>{e.decimalLatitude?t.push(e):t.push({...e,...sO})}),[...t,...aO,...lO]}const cO=uO();cO.map(t=>t.verbatimCoordinates);/** * splaytree v3.1.2 * Fast Splay tree for Node and browser * @@ -611,34 +611,34 @@ MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. -***************************************************************************** */function cO(t,e){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,i,s,c;return c={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function l(v){return function(S){return d([v,S])}}function d(v){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(s=v[0]&2?i.return:v[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,v[1])).done)return s;switch(i=0,s&&(v=[v[0]&2,s.value]),v[0]){case 0:case 1:s=v;break;case 4:return n.label++,{value:v[1],done:!1};case 5:n.label++,i=v[1],v=[0];continue;case 7:v=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(v[0]===6||v[0]===2)){n=0;continue}if(v[0]===3&&(!s||v[1]>s[0]&&v[1]e?1:t0){if(e.right===null)break;if(n(t,e.right.key)>0){var l=e.right;if(e.right=l.left,l.left=e,e=l,e.right===null)break}i.right=e,i=e,e=e.right}else break}return i.right=e.left,s.left=e.right,e.left=r.right,e.right=r.left,e}function av(t,e,n,r){var i=new Ju(t,e);if(n===null)return i.left=i.right=null,i;n=Wu(t,n,r);var s=r(t,n.key);return s<0?(i.left=n.left,i.right=n,n.left=null):s>=0&&(i.right=n.right,i.left=n,n.right=null),i}function X2(t,e,n){var r=null,i=null;if(e){e=Wu(t,e,n);var s=n(e.key,t);s===0?(r=e.left,i=e.right):s<0?(i=e.right,e.right=null,r=e):(r=e.left,e.left=null,i=e)}return{left:r,right:i}}function fO(t,e,n){return e===null?t:(t===null||(e=Wu(t.key,e,n),e.left=t),e)}function Hv(t,e,n,r,i){if(t){r(""+e+(n?"└── ":"├── ")+i(t)+` -`);var s=e+(n?" ":"│ ");t.left&&Hv(t.left,s,!1,r,i),t.right&&Hv(t.right,s,!0,r,i)}}var X1=function(){function t(e){e===void 0&&(e=hO),this._root=null,this._size=0,this._comparator=e}return t.prototype.insert=function(e,n){return this._size++,this._root=av(e,n,this._root,this._comparator)},t.prototype.add=function(e,n){var r=new Ju(e,n);this._root===null&&(r.left=r.right=null,this._size++,this._root=r);var i=this._comparator,s=Wu(e,this._root,i),c=i(e,s.key);return c===0?this._root=s:(c<0?(r.left=s.left,r.right=s,s.left=null):c>0&&(r.right=s.right,r.left=s,s.right=null),this._size++,this._root=r),this._root},t.prototype.remove=function(e){this._root=this._remove(e,this._root,this._comparator)},t.prototype._remove=function(e,n,r){var i;if(n===null)return null;n=Wu(e,n,r);var s=r(e,n.key);return s===0?(n.left===null?i=n.right:(i=Wu(e,n.left,r),i.right=n.right),this._size--,i):n},t.prototype.pop=function(){var e=this._root;if(e){for(;e.left;)e=e.left;return this._root=Wu(e.key,this._root,this._comparator),this._root=this._remove(e.key,this._root,this._comparator),{key:e.key,data:e.data}}return null},t.prototype.findStatic=function(e){for(var n=this._root,r=this._comparator;n;){var i=r(e,n.key);if(i===0)return n;i<0?n=n.left:n=n.right}return null},t.prototype.find=function(e){return this._root&&(this._root=Wu(e,this._root,this._comparator),this._comparator(e,this._root.key)!==0)?null:this._root},t.prototype.contains=function(e){for(var n=this._root,r=this._comparator;n;){var i=r(e,n.key);if(i===0)return!0;i<0?n=n.left:n=n.right}return!1},t.prototype.forEach=function(e,n){for(var r=this._root,i=[],s=!1;!s;)r!==null?(i.push(r),r=r.left):i.length!==0?(r=i.pop(),e.call(n,r),r=r.right):s=!0;return this},t.prototype.range=function(e,n,r,i){for(var s=[],c=this._comparator,l=this._root,d;s.length!==0||l;)if(l)s.push(l),l=l.left;else{if(l=s.pop(),d=c(l.key,n),d>0)break;if(c(l.key,e)>=0&&r.call(i,l))return this;l=l.right}return this},t.prototype.keys=function(){var e=[];return this.forEach(function(n){var r=n.key;return e.push(r)}),e},t.prototype.values=function(){var e=[];return this.forEach(function(n){var r=n.data;return e.push(r)}),e},t.prototype.min=function(){return this._root?this.minNode(this._root).key:null},t.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},t.prototype.minNode=function(e){if(e===void 0&&(e=this._root),e)for(;e.left;)e=e.left;return e},t.prototype.maxNode=function(e){if(e===void 0&&(e=this._root),e)for(;e.right;)e=e.right;return e},t.prototype.at=function(e){for(var n=this._root,r=!1,i=0,s=[];!r;)if(n)s.push(n),n=n.left;else if(s.length>0){if(n=s.pop(),i===e)return n;i++,n=n.right}else r=!0;return null},t.prototype.next=function(e){var n=this._root,r=null;if(e.right){for(r=e.right;r.left;)r=r.left;return r}for(var i=this._comparator;n;){var s=i(e.key,n.key);if(s===0)break;s<0?(r=n,n=n.left):n=n.right}return r},t.prototype.prev=function(e){var n=this._root,r=null;if(e.left!==null){for(r=e.left;r.right;)r=r.right;return r}for(var i=this._comparator;n;){var s=i(e.key,n.key);if(s===0)break;s<0?n=n.left:(r=n,n=n.right)}return r},t.prototype.clear=function(){return this._root=null,this._size=0,this},t.prototype.toList=function(){return dO(this._root)},t.prototype.load=function(e,n,r){n===void 0&&(n=[]),r===void 0&&(r=!1);var i=e.length,s=this._comparator;if(r&&Yv(e,n,0,i-1,s),this._root===null)this._root=Zv(e,n,0,i),this._size=i;else{var c=mO(this.toList(),pO(e,n),s);i=this._size+i,this._root=Xv({head:c},0,i)}return this},t.prototype.isEmpty=function(){return this._root===null},Object.defineProperty(t.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),t.prototype.toString=function(e){e===void 0&&(e=function(r){return String(r.key)});var n=[];return Hv(this._root,"",!0,function(r){return n.push(r)},e),n.join("")},t.prototype.update=function(e,n,r){var i=this._comparator,s=X2(e,this._root,i),c=s.left,l=s.right;i(e,n)<0?l=av(n,r,l,i):c=av(n,r,c,i),this._root=fO(c,l,i)},t.prototype.split=function(e){return X2(e,this._root,this._comparator)},t.prototype[Symbol.iterator]=function(){var e,n,r;return cO(this,function(i){switch(i.label){case 0:e=this._root,n=[],r=!1,i.label=1;case 1:return r?[3,6]:e===null?[3,2]:(n.push(e),e=e.left,[3,5]);case 2:return n.length===0?[3,4]:(e=n.pop(),[4,e]);case 3:return i.sent(),e=e.right,[3,5];case 4:r=!0,i.label=5;case 5:return[3,1];case 6:return[2]}})},t}();function Zv(t,e,n,r){var i=r-n;if(i>0){var s=n+Math.floor(i/2),c=t[s],l=e[s],d=new Ju(c,l);return d.left=Zv(t,e,n,s),d.right=Zv(t,e,s+1,r),d}return null}function pO(t,e){for(var n=new Ju(null,null),r=n,i=0;i0?(e=s=s.next=n.pop(),e=e.right):r=!0;return s.next=null,i.next}function Xv(t,e,n){var r=n-e;if(r>0){var i=e+Math.floor(r/2),s=Xv(t,e,i),c=t.head;return c.left=s,t.head=t.head.next,c.right=Xv(t,i+1,n),c}return null}function mO(t,e,n){for(var r=new Ju(null,null),i=r,s=t,c=e;s!==null&&c!==null;)n(s.key,c.key)<0?(i.next=s,s=s.next):(i.next=c,c=c.next),i=i.next;return s!==null?i.next=s:c!==null&&(i.next=c),r.next}function Yv(t,e,n,r,i){if(!(n>=r)){for(var s=t[n+r>>1],c=n-1,l=r+1;;){do c++;while(i(t[c],s)<0);do l--;while(i(t[l],s)>0);if(c>=l)break;var d=t[c];t[c]=t[l],t[l]=d,d=e[c],e[c]=e[l],e[l]=d}Yv(t,e,n,l,i),Yv(t,e,l+1,r,i)}}function La(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Y2(t,e){for(var n=0;nn.x?1:e.yn.y?1:0}}]);function t(e,n){La(this,t),e.events===void 0?e.events=[this]:e.events.push(this),this.point=e,this.isLeft=n}return ns(t,[{key:"link",value:function(e){if(e.point===this.point)throw new Error("Tried to link already linked events");for(var n=e.point.events,r=0,i=n.length;r=0&&E>=0?vC?-1:0:d<0&&E<0?vC?1:0:Ed?1:0}}}]),t}(),xO=0,N_=function(){ns(t,null,[{key:"compare",value:function(e,n){var r=e.leftSE.point.x,i=n.leftSE.point.x,s=e.rightSE.point.x,c=n.rightSE.point.x;if(cl&&d>v)return-1;var E=e.comparePoint(n.leftSE.point);if(E<0)return 1;if(E>0)return-1;var C=n.comparePoint(e.rightSE.point);return C!==0?C:-1}if(r>i){if(ld&&l>S)return 1;var M=n.comparePoint(e.leftSE.point);if(M!==0)return M;var A=e.comparePoint(n.rightSE.point);return A<0?1:A>0?-1:1}if(ld)return 1;if(sc){var z=e.comparePoint(n.rightSE.point);if(z<0)return 1;if(z>0)return-1}if(s!==c){var U=v-l,F=s-r,G=S-d,H=c-i;if(U>F&&GH)return-1}return s>c?1:sS?1:e.idn.id?1:0}}]);function t(e,n,r,i){La(this,t),this.id=++xO,this.leftSE=e,e.segment=this,e.otherSE=n,this.rightSE=n,n.segment=this,n.otherSE=e,this.rings=r,this.windings=i}return ns(t,[{key:"replaceRightSE",value:function(e){this.rightSE=e,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}},{key:"bbox",value:function(){var e=this.leftSE.point.y,n=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:en?e:n}}}},{key:"vector",value:function(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}},{key:"isAnEndpoint",value:function(e){return e.x===this.leftSE.point.x&&e.y===this.leftSE.point.y||e.x===this.rightSE.point.x&&e.y===this.rightSE.point.y}},{key:"comparePoint",value:function(e){if(this.isAnEndpoint(e))return 0;var n=this.leftSE.point,r=this.rightSE.point,i=this.vector();if(n.x===r.x)return e.x===n.x?0:e.x0&&l.swapEvents(),_l.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),r&&(i.checkForConsuming(),s.checkForConsuming()),n}},{key:"swapEvents",value:function(){var e=this.rightSE;this.rightSE=this.leftSE,this.leftSE=e,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(var n=0,r=this.windings.length;n0){var s=n;n=r,r=s}if(n.prev===r){var c=n;n=r,r=c}for(var l=0,d=r.rings.length;l0)i=n,s=e,c=-1;else throw new Error("Tried to create degenerate segment at [".concat(e.x,", ").concat(e.y,"]"));var d=new _l(i,!0),v=new _l(s,!1);return new t(d,v,[r],[c])}}]),t}(),eS=function(){function t(e,n,r){if(La(this,t),!Array.isArray(e)||e.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=n,this.isExterior=r,this.segments=[],typeof e[0][0]!="number"||typeof e[0][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var i=tm.round(e[0][0],e[0][1]);this.bbox={ll:{x:i.x,y:i.y},ur:{x:i.x,y:i.y}};for(var s=i,c=1,l=e.length;cthis.bbox.ur.x&&(this.bbox.ur.x=d.x),d.y>this.bbox.ur.y&&(this.bbox.ur.y=d.y),s=d)}(i.x!==s.x||i.y!==s.y)&&this.segments.push(N_.fromRing(s,i,this))}return ns(t,[{key:"getSweepEvents",value:function(){for(var e=[],n=0,r=this.segments.length;nthis.bbox.ur.x&&(this.bbox.ur.x=s.bbox.ur.x),s.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=s.bbox.ur.y),this.interiorRings.push(s)}this.multiPoly=n}return ns(t,[{key:"getSweepEvents",value:function(){for(var e=this.exteriorRing.getSweepEvents(),n=0,r=this.interiorRings.length;nthis.bbox.ur.x&&(this.bbox.ur.x=s.bbox.ur.x),s.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=s.bbox.ur.y),this.polys.push(s)}this.isSubject=n}return ns(t,[{key:"getSweepEvents",value:function(){for(var e=[],n=0,r=this.polys.length;n0&&(e=i)}for(var s=e.segment.prevInResult(),c=s?s.prevInResult():null;;){if(!s)return null;if(!c)return s.ringOut;if(c.ringOut!==s.ringOut)return c.ringOut.enclosingRing()!==s.ringOut?s.ringOut:s.ringOut.enclosingRing();s=c.prevInResult(),c=s?s.prevInResult():null}}}]),t}(),nS=function(){function t(e){La(this,t),this.exteriorRing=e,e.poly=this,this.interiorRings=[]}return ns(t,[{key:"addInterior",value:function(e){this.interiorRings.push(e),e.poly=this}},{key:"getGeom",value:function(){var e=[this.exteriorRing.getGeom()];if(e[0]===null)return null;for(var n=0,r=this.interiorRings.length;n1&&arguments[1]!==void 0?arguments[1]:N_.compare;La(this,t),this.queue=e,this.tree=new X1(n),this.segments=[]}return ns(t,[{key:"process",value:function(e){var n=e.segment,r=[];if(e.consumedBy)return e.isLeft?this.queue.remove(e.otherSE):this.tree.remove(n),r;var i=e.isLeft?this.tree.insert(n):this.tree.find(n);if(!i)throw new Error("Unable to find segment #".concat(n.id," ")+"[".concat(n.leftSE.point.x,", ").concat(n.leftSE.point.y,"] -> ")+"[".concat(n.rightSE.point.x,", ").concat(n.rightSE.point.y,"] ")+"in SweepLine tree. Please submit a bug report.");for(var s=i,c=i,l=void 0,d=void 0;l===void 0;)s=this.tree.prev(s),s===null?l=null:s.key.consumedBy===void 0&&(l=s.key);for(;d===void 0;)c=this.tree.next(c),c===null?d=null:c.key.consumedBy===void 0&&(d=c.key);if(e.isLeft){var v=null;if(l){var S=l.getIntersection(n);if(S!==null&&(n.isAnEndpoint(S)||(v=S),!l.isAnEndpoint(S)))for(var E=this._splitSafely(l,S),C=0,M=E.length;C0?(this.tree.remove(n),r.push(e)):(this.segments.push(n),n.prev=l)}else{if(l&&d){var pe=l.getIntersection(d);if(pe!==null){if(!l.isAnEndpoint(pe))for(var se=this._splitSafely(l,pe),Ae=0,Y=se.length;AerS)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big). Please file a bug report.");for(var H=new IO(A),te=A.size,ee=A.pop();ee;){var fe=ee.key;if(A.size===te){var pe=fe.segment;throw new Error("Unable to pop() ".concat(fe.isLeft?"left":"right"," SweepEvent ")+"[".concat(fe.point.x,", ").concat(fe.point.y,"] from segment #").concat(pe.id," ")+"[".concat(pe.leftSE.point.x,", ").concat(pe.leftSE.point.y,"] -> ")+"[".concat(pe.rightSE.point.x,", ").concat(pe.rightSE.point.y,"] from queue. ")+"Please file a bug report.")}if(A.size>rS)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big). Please file a bug report.");if(H.segments.length>CO)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments). Please file a bug report.");for(var se=H.process(fe),Ae=0,Y=se.length;Ae1?e-1:0),r=1;r1?e-1:0),r=1;r1?e-1:0),r=1;r1?e-1:0),r=1;rn[0]&&(e[0]=n[0]),e[1]>n[1]&&(e[1]=n[1]),e[2]e.x?1:this.ye.y?1:0};ze.prototype.clone=function(){};ze.prototype.copy=function(){return new ze(this)};ze.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"};ze.prototype.distance3D=function(t){var e=this.x-t.x,n=this.y-t.y,r=this.z-t.z;return Math.sqrt(e*e+n*n+r*r)};ze.prototype.distance=function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)};ze.prototype.hashCode=function(){var t=17;return t=37*t+ze.hashCode(this.x),t=37*t+ze.hashCode(this.y),t};ze.prototype.setCoordinate=function(t){this.x=t.x,this.y=t.y,this.z=t.z};ze.prototype.interfaces_=function(){return[Es,py,Is]};ze.prototype.getClass=function(){return ze};ze.hashCode=function(){if(arguments.length===1){var t=arguments[0],e=nn.doubleToLongBits(t);return Math.trunc((e^e)>>>32)}};ch.DimensionalComparator.get=function(){return ou};ch.serialVersionUID.get=function(){return 6683108902428367e3};ch.NULL_ORDINATE.get=function(){return nn.NaN};ch.X.get=function(){return 0};ch.Y.get=function(){return 1};ch.Z.get=function(){return 2};Object.defineProperties(ze,ch);var ou=function(t){if(this._dimensionsToTest=2,arguments.length!==0&&arguments.length===1){var e=arguments[0];if(e!==2&&e!==3)throw new yr("only 2 or 3 dimensions may be specified");this._dimensionsToTest=e}};ou.prototype.compare=function(t,e){var n=t,r=e,i=ou.compare(n.x,r.x);if(i!==0)return i;var s=ou.compare(n.y,r.y);if(s!==0)return s;if(this._dimensionsToTest<=2)return 0;var c=ou.compare(n.z,r.z);return c};ou.prototype.interfaces_=function(){return[Of]};ou.prototype.getClass=function(){return ou};ou.compare=function(t,e){return te?1:nn.isNaN(t)?nn.isNaN(e)?0:-1:nn.isNaN(e)?1:0};var zf=function(){};zf.prototype.create=function(){};zf.prototype.interfaces_=function(){return[]};zf.prototype.getClass=function(){return zf};var Fe=function(){},Sm={INTERIOR:{configurable:!0},BOUNDARY:{configurable:!0},EXTERIOR:{configurable:!0},NONE:{configurable:!0}};Fe.prototype.interfaces_=function(){return[]};Fe.prototype.getClass=function(){return Fe};Fe.toLocationSymbol=function(t){switch(t){case Fe.EXTERIOR:return"e";case Fe.BOUNDARY:return"b";case Fe.INTERIOR:return"i";case Fe.NONE:return"-"}throw new yr("Unknown location value: "+t)};Sm.INTERIOR.get=function(){return 0};Sm.BOUNDARY.get=function(){return 1};Sm.EXTERIOR.get=function(){return 2};Sm.NONE.get=function(){return-1};Object.defineProperties(Fe,Sm);var Kt=function(t,e){return t.interfaces_&&t.interfaces_().indexOf(e)>-1},rs=function(){},RC={LOG_10:{configurable:!0}};rs.prototype.interfaces_=function(){return[]};rs.prototype.getClass=function(){return rs};rs.log10=function(t){var e=Math.log(t);return nn.isInfinite(e)||nn.isNaN(e)?e:e/rs.LOG_10};rs.min=function(t,e,n,r){var i=t;return en?n:t}else if(Number.isInteger(arguments[2])&&Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var r=arguments[0],i=arguments[1],s=arguments[2];return rs?s:r}};rs.wrap=function(t,e){return t<0?e- -t%e:t%e};rs.max=function(){if(arguments.length===3){var t=arguments[0],e=arguments[1],n=arguments[2],r=t;return e>r&&(r=e),n>r&&(r=n),r}else if(arguments.length===4){var i=arguments[0],s=arguments[1],c=arguments[2],l=arguments[3],d=i;return s>d&&(d=s),c>d&&(d=c),l>d&&(d=l),d}};rs.average=function(t,e){return(t+e)/2};RC.LOG_10.get=function(){return Math.log(10)};Object.defineProperties(rs,RC);var Pa=function(t){this.str=t};Pa.prototype.append=function(t){this.str+=t};Pa.prototype.setCharAt=function(t,e){this.str=this.str.substr(0,t)+e+this.str.substr(t+1)};Pa.prototype.toString=function(t){return this.str};var _a=function(t){this.value=t};_a.prototype.intValue=function(){return this.value};_a.prototype.compareTo=function(t){return this.valuet?1:0};_a.isNaN=function(t){return Number.isNaN(t)};var nm=function(){};nm.isWhitespace=function(t){return t<=32&&t>=0||t===127};nm.toUpperCase=function(t){return t.toUpperCase()};var Xe=function t(){if(this._hi=0,this._lo=0,arguments.length===0)this.init(0);else if(arguments.length===1){if(typeof arguments[0]=="number"){var e=arguments[0];this.init(e)}else if(arguments[0]instanceof t){var n=arguments[0];this.init(n)}else if(typeof arguments[0]=="string"){var r=arguments[0];t.call(this,t.parse(r))}}else if(arguments.length===2){var i=arguments[0],s=arguments[1];this.init(i,s)}},Ys={PI:{configurable:!0},TWO_PI:{configurable:!0},PI_2:{configurable:!0},E:{configurable:!0},NaN:{configurable:!0},EPS:{configurable:!0},SPLIT:{configurable:!0},MAX_PRINT_DIGITS:{configurable:!0},TEN:{configurable:!0},ONE:{configurable:!0},SCI_NOT_EXPONENT_CHAR:{configurable:!0},SCI_NOT_ZERO:{configurable:!0}};Xe.prototype.le=function(t){return(this._hi9?(S=!0,E="9"):E="0"+v,c.append(E),n=n.subtract(Xe.valueOf(v)).multiply(Xe.TEN),S&&n.selfAdd(Xe.TEN);var C=!0,M=Xe.magnitude(n._hi);if(M<0&&Math.abs(M)>=l-d&&(C=!1),!C)break}return e[0]=r,c.toString()};Xe.prototype.sqr=function(){return this.multiply(this)};Xe.prototype.doubleValue=function(){return this._hi+this._lo};Xe.prototype.subtract=function(){if(arguments[0]instanceof Xe){var t=arguments[0];return this.add(t.negate())}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.add(-e)}};Xe.prototype.equals=function(){if(arguments.length===1){var t=arguments[0];return this._hi===t._hi&&this._lo===t._lo}};Xe.prototype.isZero=function(){return this._hi===0&&this._lo===0};Xe.prototype.selfSubtract=function(){if(arguments[0]instanceof Xe){var t=arguments[0];return this.isNaN()?this:this.selfAdd(-t._hi,-t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.isNaN()?this:this.selfAdd(-e,0)}};Xe.prototype.getSpecialNumberString=function(){return this.isZero()?"0.0":this.isNaN()?"NaN ":null};Xe.prototype.min=function(t){return this.le(t)?this:t};Xe.prototype.selfDivide=function(){if(arguments.length===1){if(arguments[0]instanceof Xe){var t=arguments[0];return this.selfDivide(t._hi,t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.selfDivide(e,0)}}else if(arguments.length===2){var n=arguments[0],r=arguments[1],i=null,s=null,c=null,l=null,d=null,v=null,S=null,E=null;return d=this._hi/n,v=Xe.SPLIT*d,i=v-d,E=Xe.SPLIT*n,i=v-i,s=d-i,c=E-n,S=d*n,c=E-c,l=n-c,E=i*c-S+i*l+s*c+s*l,v=(this._hi-S-E+this._lo-d*r)/n,E=d+v,this._hi=E,this._lo=d-E+v,this}};Xe.prototype.dump=function(){return"DD<"+this._hi+", "+this._lo+">"};Xe.prototype.divide=function(){if(arguments[0]instanceof Xe){var t=arguments[0],e=null,n=null,r=null,i=null,s=null,c=null,l=null,d=null;s=this._hi/t._hi,c=Xe.SPLIT*s,e=c-s,d=Xe.SPLIT*t._hi,e=c-e,n=s-e,r=d-t._hi,l=s*t._hi,r=d-r,i=t._hi-r,d=e*r-l+e*i+n*r+n*i,c=(this._hi-l-d+this._lo-s*t._lo)/t._hi,d=s+c;var v=d,S=s-d+c;return new Xe(v,S)}else if(typeof arguments[0]=="number"){var E=arguments[0];return nn.isNaN(E)?Xe.createNaN():Xe.copy(this).selfDivide(E,0)}};Xe.prototype.ge=function(t){return(this._hi>t._hi||this._hi===t._hi)&&this._lo>=t._lo};Xe.prototype.pow=function(t){if(t===0)return Xe.valueOf(1);var e=new Xe(this),n=Xe.valueOf(1),r=Math.abs(t);if(r>1)for(;r>0;)r%2===1&&n.selfMultiply(e),r/=2,r>0&&(e=e.sqr());else n=e;return t<0?n.reciprocal():n};Xe.prototype.ceil=function(){if(this.isNaN())return Xe.NaN;var t=Math.ceil(this._hi),e=0;return t===this._hi&&(e=Math.ceil(this._lo)),new Xe(t,e)};Xe.prototype.compareTo=function(t){var e=t;return this._hie._hi?1:this._loe._lo?1:0};Xe.prototype.rint=function(){if(this.isNaN())return this;var t=this.add(.5);return t.floor()};Xe.prototype.setValue=function(){if(arguments[0]instanceof Xe){var t=arguments[0];return this.init(t),this}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.init(e),this}};Xe.prototype.max=function(t){return this.ge(t)?this:t};Xe.prototype.sqrt=function(){if(this.isZero())return Xe.valueOf(0);if(this.isNegative())return Xe.NaN;var t=1/Math.sqrt(this._hi),e=this._hi*t,n=Xe.valueOf(e),r=this.subtract(n.sqr()),i=r._hi*(t*.5);return n.add(i)};Xe.prototype.selfAdd=function(){if(arguments.length===1){if(arguments[0]instanceof Xe){var t=arguments[0];return this.selfAdd(t._hi,t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0],n=null,r=null,i=null,s=null,c=null,l=null;return i=this._hi+e,c=i-this._hi,s=i-c,s=e-c+(this._hi-s),l=s+this._lo,n=i+l,r=l+(i-n),this._hi=n+r,this._lo=r+(n-this._hi),this}}else if(arguments.length===2){var d=arguments[0],v=arguments[1],S=null,E=null,C=null,M=null,A=null,R=null,z=null,U=null;A=this._hi+d,C=this._lo+v,z=A-this._hi,U=C-this._lo,R=A-z,M=C-U,R=d-z+(this._hi-R),M=v-U+(this._lo-M),z=R+C,S=A+z,E=z+(A-S),z=M+E;var F=S+z,G=z+(S-F);return this._hi=F,this._lo=G,this}};Xe.prototype.selfMultiply=function(){if(arguments.length===1){if(arguments[0]instanceof Xe){var t=arguments[0];return this.selfMultiply(t._hi,t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.selfMultiply(e,0)}}else if(arguments.length===2){var n=arguments[0],r=arguments[1],i=null,s=null,c=null,l=null,d=null,v=null;d=Xe.SPLIT*this._hi,i=d-this._hi,v=Xe.SPLIT*n,i=d-i,s=this._hi-i,c=v-n,d=this._hi*n,c=v-c,l=n-c,v=i*c-d+i*l+s*c+s*l+(this._hi*r+this._lo*n);var S=d+v;i=d-S;var E=v+i;return this._hi=S,this._lo=E,this}};Xe.prototype.selfSqr=function(){return this.selfMultiply(this)};Xe.prototype.floor=function(){if(this.isNaN())return Xe.NaN;var t=Math.floor(this._hi),e=0;return t===this._hi&&(e=Math.floor(this._lo)),new Xe(t,e)};Xe.prototype.negate=function(){return this.isNaN()?this:new Xe(-this._hi,-this._lo)};Xe.prototype.clone=function(){};Xe.prototype.multiply=function(){if(arguments[0]instanceof Xe){var t=arguments[0];return t.isNaN()?Xe.createNaN():Xe.copy(this).selfMultiply(t)}else if(typeof arguments[0]=="number"){var e=arguments[0];return nn.isNaN(e)?Xe.createNaN():Xe.copy(this).selfMultiply(e,0)}};Xe.prototype.isNaN=function(){return nn.isNaN(this._hi)};Xe.prototype.intValue=function(){return Math.trunc(this._hi)};Xe.prototype.toString=function(){var t=Xe.magnitude(this._hi);return t>=-3&&t<=20?this.toStandardNotation():this.toSciNotation()};Xe.prototype.toStandardNotation=function(){var t=this.getSpecialNumberString();if(t!==null)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!0,e),r=e[0]+1,i=n;if(n.charAt(0)===".")i="0"+n;else if(r<0)i="0."+Xe.stringOfChar("0",-r)+n;else if(n.indexOf(".")===-1){var s=r-n.length,c=Xe.stringOfChar("0",s);i=n+c+".0"}return this.isNegative()?"-"+i:i};Xe.prototype.reciprocal=function(){var t=null,e=null,n=null,r=null,i=null,s=null,c=null,l=null;i=1/this._hi,s=Xe.SPLIT*i,t=s-i,l=Xe.SPLIT*this._hi,t=s-t,e=i-t,n=l-this._hi,c=i*this._hi,n=l-n,r=this._hi-n,l=t*n-c+t*r+e*n+e*r,s=(1-c-l-i*this._lo)/this._hi;var d=i+s,v=i-d+s;return new Xe(d,v)};Xe.prototype.toSciNotation=function(){if(this.isZero())return Xe.SCI_NOT_ZERO;var t=this.getSpecialNumberString();if(t!==null)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!1,e),r=Xe.SCI_NOT_EXPONENT_CHAR+e[0];if(n.charAt(0)==="0")throw new Error("Found leading zero: "+n);var i="";n.length>1&&(i=n.substring(1));var s=n.charAt(0)+"."+i;return this.isNegative()?"-"+s+r:s+r};Xe.prototype.abs=function(){return this.isNaN()?Xe.NaN:this.isNegative()?this.negate():new Xe(this)};Xe.prototype.isPositive=function(){return(this._hi>0||this._hi===0)&&this._lo>0};Xe.prototype.lt=function(t){return(this._hit._hi||this._hi===t._hi)&&this._lo>t._lo};Xe.prototype.isNegative=function(){return(this._hi<0||this._hi===0)&&this._lo<0};Xe.prototype.trunc=function(){return this.isNaN()?Xe.NaN:this.isPositive()?this.floor():this.ceil()};Xe.prototype.signum=function(){return this._hi>0?1:this._hi<0?-1:this._lo>0?1:this._lo<0?-1:0};Xe.prototype.interfaces_=function(){return[Is,Es,py]};Xe.prototype.getClass=function(){return Xe};Xe.sqr=function(t){return Xe.valueOf(t).selfMultiply(t)};Xe.valueOf=function(){if(typeof arguments[0]=="string"){var t=arguments[0];return Xe.parse(t)}else if(typeof arguments[0]=="number"){var e=arguments[0];return new Xe(e)}};Xe.sqrt=function(t){return Xe.valueOf(t).sqrt()};Xe.parse=function(t){for(var e=0,n=t.length;nm.isWhitespace(t.charAt(e));)e++;var r=!1;if(e=n);){var v=t.charAt(e);if(e++,nm.isDigit(v)){var S=v-"0";s.selfMultiply(Xe.TEN),s.selfAdd(S),c++;continue}if(v==="."){l=c;continue}if(v==="e"||v==="E"){var E=t.substring(e);try{d=_a.parseInt(E)}catch(z){throw z instanceof Error?new Error("Invalid exponent "+E+" in string "+t):z}finally{}break}throw new Error("Unexpected character '"+v+"' at position "+e+" in string "+t)}var C=s,M=c-l-d;if(M===0)C=s;else if(M>0){var A=Xe.TEN.pow(M);C=s.divide(A)}else if(M<0){var R=Xe.TEN.pow(-M);C=s.multiply(R)}return r?C.negate():C};Xe.createNaN=function(){return new Xe(nn.NaN,nn.NaN)};Xe.copy=function(t){return new Xe(t)};Xe.magnitude=function(t){var e=Math.abs(t),n=Math.log(e)/Math.log(10),r=Math.trunc(Math.floor(n)),i=Math.pow(10,r);return i*10<=e&&(r+=1),r};Xe.stringOfChar=function(t,e){for(var n=new Pa,r=0;r0){if(s<=0)return yo.signum(c);r=i+s}else if(i<0){if(s>=0)return yo.signum(c);r=-i-s}else return yo.signum(c);var l=yo.DP_SAFE_EPSILON*r;return c>=l||-c>=l?yo.signum(c):2};yo.signum=function(t){return t>0?1:t<0?-1:0};NC.DP_SAFE_EPSILON.get=function(){return 1e-15};Object.defineProperties(yo,NC);var Rn=function(){},Em={X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0},M:{configurable:!0}};Em.X.get=function(){return 0};Em.Y.get=function(){return 1};Em.Z.get=function(){return 2};Em.M.get=function(){return 3};Rn.prototype.setOrdinate=function(t,e,n){};Rn.prototype.size=function(){};Rn.prototype.getOrdinate=function(t,e){};Rn.prototype.getCoordinate=function(){};Rn.prototype.getCoordinateCopy=function(t){};Rn.prototype.getDimension=function(){};Rn.prototype.getX=function(t){};Rn.prototype.clone=function(){};Rn.prototype.expandEnvelope=function(t){};Rn.prototype.copy=function(){};Rn.prototype.getY=function(t){};Rn.prototype.toCoordinateArray=function(){};Rn.prototype.interfaces_=function(){return[py]};Rn.prototype.getClass=function(){return Rn};Object.defineProperties(Rn,Em);var OC=function(){},pp=function(t){function e(){t.call(this,"Projective point not representable on the Cartesian plane.")}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(OC),Ri=function(){};Ri.arraycopy=function(t,e,n,r,i){for(var s=0,c=e;ct._minx?this._minx:t._minx,n=this._miny>t._miny?this._miny:t._miny,r=this._maxx=this._minx&&e.getMaxX()<=this._maxx&&e.getMinY()>=this._miny&&e.getMaxY()<=this._maxy}}else if(arguments.length===2){var n=arguments[0],r=arguments[1];return this.isNull()?!1:n>=this._minx&&n<=this._maxx&&r>=this._miny&&r<=this._maxy}};Bt.prototype.intersects=function(){if(arguments.length===1){if(arguments[0]instanceof Bt){var t=arguments[0];return this.isNull()||t.isNull()?!1:!(t._minx>this._maxx||t._maxxthis._maxy||t._maxythis._maxx||nthis._maxy||rthis._maxx&&(this._maxx=e._maxx),e._minythis._maxy&&(this._maxy=e._maxy))}}else if(arguments.length===2){var n=arguments[0],r=arguments[1];this.isNull()?(this._minx=n,this._maxx=n,this._miny=r,this._maxy=r):(nthis._maxx&&(this._maxx=n),rthis._maxy&&(this._maxy=r))}};Bt.prototype.minExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return te._minx?1:this._minye._miny?1:this._maxxe._maxx?1:this._maxye._maxy?1:0};Bt.prototype.translate=function(t,e){if(this.isNull())return null;this.init(this.getMinX()+t,this.getMaxX()+t,this.getMinY()+e,this.getMaxY()+e)};Bt.prototype.toString=function(){return"Env["+this._minx+" : "+this._maxx+", "+this._miny+" : "+this._maxy+"]"};Bt.prototype.setToNull=function(){this._minx=0,this._maxx=-1,this._miny=0,this._maxy=-1};Bt.prototype.getHeight=function(){return this.isNull()?0:this._maxy-this._miny};Bt.prototype.maxExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t>e?t:e};Bt.prototype.expandBy=function(){if(arguments.length===1){var t=arguments[0];this.expandBy(t,t)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];if(this.isNull())return null;this._minx-=e,this._maxx+=e,this._miny-=n,this._maxy+=n,(this._minx>this._maxx||this._miny>this._maxy)&&this.setToNull()}};Bt.prototype.contains=function(){if(arguments.length===1){if(arguments[0]instanceof Bt){var t=arguments[0];return this.covers(t)}else if(arguments[0]instanceof ze){var e=arguments[0];return this.covers(e)}}else if(arguments.length===2){var n=arguments[0],r=arguments[1];return this.covers(n,r)}};Bt.prototype.centre=function(){return this.isNull()?null:new ze((this.getMinX()+this.getMaxX())/2,(this.getMinY()+this.getMaxY())/2)};Bt.prototype.init=function(){if(arguments.length===0)this.setToNull();else if(arguments.length===1){if(arguments[0]instanceof ze){var t=arguments[0];this.init(t.x,t.x,t.y,t.y)}else if(arguments[0]instanceof Bt){var e=arguments[0];this._minx=e._minx,this._maxx=e._maxx,this._miny=e._miny,this._maxy=e._maxy}}else if(arguments.length===2){var n=arguments[0],r=arguments[1];this.init(n.x,r.x,n.y,r.y)}else if(arguments.length===4){var i=arguments[0],s=arguments[1],c=arguments[2],l=arguments[3];it._maxx&&(e=this._minx-t._maxx);var n=0;return this._maxyt._maxy&&(n=this._miny-t._maxy),e===0?n:n===0?e:Math.sqrt(e*e+n*n)};Bt.prototype.hashCode=function(){var t=17;return t=37*t+ze.hashCode(this._minx),t=37*t+ze.hashCode(this._maxx),t=37*t+ze.hashCode(this._miny),t=37*t+ze.hashCode(this._maxy),t};Bt.prototype.interfaces_=function(){return[Es,Is]};Bt.prototype.getClass=function(){return Bt};Bt.intersects=function(){if(arguments.length===3){var t=arguments[0],e=arguments[1],n=arguments[2];return n.x>=(t.xe.x?t.x:e.x)&&n.y>=(t.ye.y?t.y:e.y)}else if(arguments.length===4){var r=arguments[0],i=arguments[1],s=arguments[2],c=arguments[3],l=Math.min(s.x,c.x),d=Math.max(s.x,c.x),v=Math.min(r.x,i.x),S=Math.max(r.x,i.x);return!(v>d||Sd)||Sn?(this._intLineIndex[t][0]=0,this._intLineIndex[t][1]=1):(this._intLineIndex[t][0]=1,this._intLineIndex[t][1]=0)}};Tr.prototype.isProper=function(){return this.hasIntersection()&&this._isProper};Tr.prototype.setPrecisionModel=function(t){this._precisionModel=t};Tr.prototype.isInteriorIntersection=function(){var t=this;if(arguments.length===0)return!!(this.isInteriorIntersection(0)||this.isInteriorIntersection(1));if(arguments.length===1){for(var e=arguments[0],n=0;ni?s=r:s=i;else{var c=Math.abs(t.x-e.x),l=Math.abs(t.y-e.y);r>i?s=c:s=l,s===0&&!t.equals(e)&&(s=Math.max(c,l))}return hn.isTrue(!(s===0&&!t.equals(e)),"Bad distance calculation"),s};Tr.nonRobustComputeEdgeDistance=function(t,e,n){var r=t.x-e.x,i=t.y-e.y,s=Math.sqrt(r*r+i*i);return hn.isTrue(!(s===0&&!t.equals(e)),"Invalid distance calculation"),s};hh.DONT_INTERSECT.get=function(){return 0};hh.DO_INTERSECT.get=function(){return 1};hh.COLLINEAR.get=function(){return 2};hh.NO_INTERSECTION.get=function(){return 0};hh.POINT_INTERSECTION.get=function(){return 1};hh.COLLINEAR_INTERSECTION.get=function(){return 2};Object.defineProperties(Tr,hh);var fc=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isInSegmentEnvelopes=function(n){var r=new Bt(this._inputLines[0][0],this._inputLines[0][1]),i=new Bt(this._inputLines[1][0],this._inputLines[1][1]);return r.contains(n)&&i.contains(n)},e.prototype.computeIntersection=function(){if(arguments.length===3){var n=arguments[0],r=arguments[1],i=arguments[2];if(this._isProper=!1,Bt.intersects(r,i,n)&&Et.orientationIndex(r,i,n)===0&&Et.orientationIndex(i,r,n)===0)return this._isProper=!0,(n.equals(r)||n.equals(i))&&(this._isProper=!1),this._result=t.POINT_INTERSECTION,null;this._result=t.NO_INTERSECTION}else return t.prototype.computeIntersection.apply(this,arguments)},e.prototype.normalizeToMinimum=function(n,r,i,s,c){c.x=this.smallestInAbsValue(n.x,r.x,i.x,s.x),c.y=this.smallestInAbsValue(n.y,r.y,i.y,s.y),n.x-=c.x,n.y-=c.y,r.x-=c.x,r.y-=c.y,i.x-=c.x,i.y-=c.y,s.x-=c.x,s.y-=c.y},e.prototype.safeHCoordinateIntersection=function(n,r,i,s){var c=null;try{c=Vs.intersection(n,r,i,s)}catch(l){if(l instanceof pp)c=e.nearestEndpoint(n,r,i,s);else throw l}finally{}return c},e.prototype.intersection=function(n,r,i,s){var c=this.intersectionWithNormalization(n,r,i,s);return this.isInSegmentEnvelopes(c)||(c=new ze(e.nearestEndpoint(n,r,i,s))),this._precisionModel!==null&&this._precisionModel.makePrecise(c),c},e.prototype.smallestInAbsValue=function(n,r,i,s){var c=n,l=Math.abs(c);return Math.abs(r)1e-4&&Ri.out.println("Distance = "+c.distance(l))},e.prototype.intersectionWithNormalization=function(n,r,i,s){var c=new ze(n),l=new ze(r),d=new ze(i),v=new ze(s),S=new ze;this.normalizeToEnvCentre(c,l,d,v,S);var E=this.safeHCoordinateIntersection(c,l,d,v);return E.x+=S.x,E.y+=S.y,E},e.prototype.computeCollinearIntersection=function(n,r,i,s){var c=Bt.intersects(n,r,i),l=Bt.intersects(n,r,s),d=Bt.intersects(i,s,n),v=Bt.intersects(i,s,r);return c&&l?(this._intPt[0]=i,this._intPt[1]=s,t.COLLINEAR_INTERSECTION):d&&v?(this._intPt[0]=n,this._intPt[1]=r,t.COLLINEAR_INTERSECTION):c&&d?(this._intPt[0]=i,this._intPt[1]=n,i.equals(n)&&!l&&!v?t.POINT_INTERSECTION:t.COLLINEAR_INTERSECTION):c&&v?(this._intPt[0]=i,this._intPt[1]=r,i.equals(r)&&!l&&!d?t.POINT_INTERSECTION:t.COLLINEAR_INTERSECTION):l&&d?(this._intPt[0]=s,this._intPt[1]=n,s.equals(n)&&!c&&!v?t.POINT_INTERSECTION:t.COLLINEAR_INTERSECTION):l&&v?(this._intPt[0]=s,this._intPt[1]=r,s.equals(r)&&!c&&!d?t.POINT_INTERSECTION:t.COLLINEAR_INTERSECTION):t.NO_INTERSECTION},e.prototype.normalizeToEnvCentre=function(n,r,i,s,c){var l=n.xr.x?n.x:r.x,S=n.y>r.y?n.y:r.y,E=i.xs.x?i.x:s.x,A=i.y>s.y?i.y:s.y,R=l>E?l:E,z=vC?d:C,F=S0&&l>0||c<0&&l<0)return t.NO_INTERSECTION;var d=Et.orientationIndex(i,s,n),v=Et.orientationIndex(i,s,r);if(d>0&&v>0||d<0&&v<0)return t.NO_INTERSECTION;var S=c===0&&l===0&&d===0&&v===0;return S?this.computeCollinearIntersection(n,r,i,s):(c===0||l===0||d===0||v===0?(this._isProper=!1,n.equals2D(i)||n.equals2D(s)?this._intPt[0]=n:r.equals2D(i)||r.equals2D(s)?this._intPt[0]=r:c===0?this._intPt[0]=new ze(i):l===0?this._intPt[0]=new ze(s):d===0?this._intPt[0]=new ze(n):v===0&&(this._intPt[0]=new ze(r))):(this._isProper=!0,this._intPt[0]=this.intersection(n,r,i,s)),t.POINT_INTERSECTION)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.nearestEndpoint=function(n,r,i,s){var c=n,l=Et.distancePointLine(n,i,s),d=Et.distancePointLine(r,i,s);return d0?n>0?-i:i:n>0?i:-i;if(e===0||n===0)return r>0?t>0?i:-i:t>0?-i:i;if(e>0?r>0?e<=r||(i=-i,s=t,t=n,n=s,s=e,e=r,r=s):e<=-r?(i=-i,n=-n,r=-r):(s=t,t=-n,n=s,s=e,e=-r,r=s):r>0?-e<=r?(i=-i,t=-t,e=-e):(s=-t,t=n,n=s,s=-e,e=r,r=s):e>=r?(t=-t,e=-e,n=-n,r=-r):(i=-i,s=-t,t=-n,n=s,s=-e,e=-r,r=s),t>0)if(n>0){if(!(t<=n))return i}else return i;else{if(n>0)return-i;if(t>=n)i=-i,t=-t,n=-n;else return-i}for(;;){if(c=Math.floor(n/t),n=n-c*t,r=r-c*e,r<0)return-i;if(r>e)return i;if(t>n+n){if(er+r)return-i;n=t-n,r=e-r,i=-i}if(r===0)return n===0?0:-i;if(n===0||(c=Math.floor(t/n),t=t-c*n,e=e-c*r,e<0))return i;if(e>r)return-i;if(n>t+t){if(re+e)return i;t=n-t,e=r-e,i=-i}if(e===0)return t===0?0:i;if(t===0)return-i}};var da=function(){this._p=null,this._crossingCount=0,this._isPointOnSegment=!1;var t=arguments[0];this._p=t};da.prototype.countSegment=function(t,e){if(t.xr&&(n=e.x,r=t.x),this._p.x>=n&&this._p.x<=r&&(this._isPointOnSegment=!0),null}if(t.y>this._p.y&&e.y<=this._p.y||e.y>this._p.y&&t.y<=this._p.y){var i=t.x-this._p.x,s=t.y-this._p.y,c=e.x-this._p.x,l=e.y-this._p.y,d=$c.signOfDet2x2(i,s,c,l);if(d===0)return this._isPointOnSegment=!0,null;l0&&this._crossingCount++}};da.prototype.isPointInPolygon=function(){return this.getLocation()!==Fe.EXTERIOR};da.prototype.getLocation=function(){return this._isPointOnSegment?Fe.BOUNDARY:this._crossingCount%2===1?Fe.INTERIOR:Fe.EXTERIOR};da.prototype.isOnSegment=function(){return this._isPointOnSegment};da.prototype.interfaces_=function(){return[]};da.prototype.getClass=function(){return da};da.locatePointInRing=function(){if(arguments[0]instanceof ze&&Kt(arguments[1],Rn)){for(var t=arguments[0],e=arguments[1],n=new da(t),r=new ze,i=new ze,s=1;s1||d<0||d>1)&&(i=!0)}}return i?rs.min(Et.distancePointLine(t,n,r),Et.distancePointLine(e,n,r),Et.distancePointLine(n,t,e),Et.distancePointLine(r,t,e)):0};Et.isPointInRing=function(t,e){return Et.locatePointInRing(t,e)!==Fe.EXTERIOR};Et.computeLength=function(t){var e=t.size();if(e<=1)return 0;var n=0,r=new ze;t.getCoordinate(0,r);for(var i=r.x,s=r.y,c=1;cn.y&&(n=s,r=i)}var c=r;do c=c-1,c<0&&(c=e);while(t[c].equals2D(n)&&c!==r);var l=r;do l=(l+1)%e;while(t[l].equals2D(n)&&l!==r);var d=t[c],v=t[l];if(d.equals2D(n)||v.equals2D(n)||d.equals2D(v))return!1;var S=Et.computeOrientation(d,n,v),E=!1;return S===0?E=d.x>v.x:E=S>0,E};Et.locatePointInRing=function(t,e){return da.locatePointInRing(t,e)};Et.distancePointLinePerpendicular=function(t,e,n){var r=(n.x-e.x)*(n.x-e.x)+(n.y-e.y)*(n.y-e.y),i=((e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y))/r;return Math.abs(i)*Math.sqrt(r)};Et.computeOrientation=function(t,e,n){return Et.orientationIndex(t,e,n)};Et.distancePointLine=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];if(e.length===0)throw new yr("Line array must contain at least one vertex");for(var n=t.distance(e[0]),r=0;r=1)return s.distance(l);var S=((c.y-s.y)*(l.x-c.x)-(c.x-s.x)*(l.y-c.y))/d;return Math.abs(S)*Math.sqrt(d)}};Et.isOnLine=function(t,e){for(var n=new fc,r=1;r0};Bf.prototype.interfaces_=function(){return[xs]};Bf.prototype.getClass=function(){return Bf};var Vf=function(){};Vf.prototype.isInBoundary=function(t){return t>1};Vf.prototype.interfaces_=function(){return[xs]};Vf.prototype.getClass=function(){return Vf};var Uf=function(){};Uf.prototype.isInBoundary=function(t){return t===1};Uf.prototype.interfaces_=function(){return[xs]};Uf.prototype.getClass=function(){return Uf};var ni=function(){};ni.prototype.add=function(){};ni.prototype.addAll=function(){};ni.prototype.isEmpty=function(){};ni.prototype.iterator=function(){};ni.prototype.size=function(){};ni.prototype.toArray=function(){};ni.prototype.remove=function(){};function $1(t){this.message=t||""}$1.prototype=new Error;$1.prototype.name="IndexOutOfBoundsException";var dp=function(){};dp.prototype.hasNext=function(){};dp.prototype.next=function(){};dp.prototype.remove=function(){};var Us=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(){},e.prototype.set=function(){},e.prototype.isEmpty=function(){},e}(ni);function mp(t){this.message=t||""}mp.prototype=new Error;mp.prototype.name="NoSuchElementException";var yt=function(t){function e(){t.call(this),this.array_=[],arguments[0]instanceof ni&&this.addAll(arguments[0])}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.ensureCapacity=function(){},e.prototype.interfaces_=function(){return[t,ni]},e.prototype.add=function(n){return arguments.length===1?this.array_.push(n):this.array_.splice(arguments[0],arguments[1]),!0},e.prototype.clear=function(){this.array_=[]},e.prototype.addAll=function(n){for(var r=this,i=n.iterator();i.hasNext();)r.add(i.next());return!0},e.prototype.set=function(n,r){var i=this.array_[n];return this.array_[n]=r,i},e.prototype.iterator=function(){return new zO(this)},e.prototype.get=function(n){if(n<0||n>=this.size())throw new $1;return this.array_[n]},e.prototype.isEmpty=function(){return this.array_.length===0},e.prototype.size=function(){return this.array_.length},e.prototype.toArray=function(){for(var n=this,r=[],i=0,s=this.array_.length;i=1){var v=this.get(this.size()-1);if(v.equals2D(l))return null}t.prototype.add.call(this,l)}else if(arguments[0]instanceof Object&&typeof arguments[1]=="boolean"){var S=arguments[0],E=arguments[1];return this.add(S,E),!0}}else if(arguments.length===3){if(typeof arguments[2]=="boolean"&&arguments[0]instanceof Array&&typeof arguments[1]=="boolean"){var C=arguments[0],M=arguments[1],A=arguments[2];if(A)for(var R=0;R=0;z--)r.add(C[z],M);return!0}else if(typeof arguments[2]=="boolean"&&Number.isInteger(arguments[0])&&arguments[1]instanceof ze){var U=arguments[0],F=arguments[1],G=arguments[2];if(!G){var H=this.size();if(H>0){if(U>0){var te=this.get(U-1);if(te.equals2D(F))return null}if(UAe&&(Y=-1);for(var ae=se;ae!==Ae;ae+=Y)r.add(fe[ae],pe);return!0}},e.prototype.closeRing=function(){this.size()>0&&this.add(new ze(this.get(0)),!1)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},Object.defineProperties(e,n),e}(yt),In=function(){},my={ForwardComparator:{configurable:!0},BidirectionalComparator:{configurable:!0},coordArrayType:{configurable:!0}};my.ForwardComparator.get=function(){return rm};my.BidirectionalComparator.get=function(){return jf};my.coordArrayType.get=function(){return new Array(0).fill(null)};In.prototype.interfaces_=function(){return[]};In.prototype.getClass=function(){return In};In.isRing=function(t){return!(t.length<4||!t[0].equals2D(t[t.length-1]))};In.ptNotInList=function(t,e){for(var n=0;n=t?e:[]};In.indexOf=function(t,e){for(var n=0;n0)&&(e=t[n]);return e};In.extract=function(t,e,n){e=rs.clamp(e,0,t.length),n=rs.clamp(n,-1,t.length);var r=n-e+1;n<0&&(r=0),e>=t.length&&(r=0),nr.length)return 1;if(n.length===0)return 0;var i=In.compare(n,r),s=In.isEqualReversed(n,r);return s?0:i};jf.prototype.OLDcompare=function(t,e){var n=t,r=e;if(n.lengthr.length)return 1;if(n.length===0)return 0;for(var i=In.increasingDirection(n),s=In.increasingDirection(r),c=i>0?0:n.length-1,l=s>0?0:n.length-1,d=0;d0)e=e.right;else return e.value}return null};Gi.prototype.put=function(t,e){if(this.root_===null)return this.root_={key:t,value:e,left:null,right:null,parent:null,color:yl,getValue:function(){return this.value},getKey:function(){return this.key}},this.size_=1,null;var n=this.root_,r,i;do if(r=n,i=t.compareTo(n.key),i<0)n=n.left;else if(i>0)n=n.right;else{var s=n.value;return n.value=e,s}while(n!==null);var c={key:t,left:null,right:null,value:e,parent:r,color:yl,getValue:function(){return this.value},getKey:function(){return this.key}};return i<0?r.left=c:r.right=c,this.fixAfterInsertion(c),this.size_++,null};Gi.prototype.fixAfterInsertion=function(t){var e=this;for(t.color=Uu;t!=null&&t!==this.root_&&t.parent.color===Uu;)if(nr(t)===lv(nr(nr(t)))){var n=aS(nr(nr(t)));sS(n)===Uu?(dl(nr(t),yl),dl(n,yl),dl(nr(nr(t)),Uu),t=nr(nr(t))):(t===aS(nr(t))&&(t=nr(t),e.rotateLeft(t)),dl(nr(t),yl),dl(nr(nr(t)),Uu),e.rotateRight(nr(nr(t))))}else{var r=lv(nr(nr(t)));sS(r)===Uu?(dl(nr(t),yl),dl(r,yl),dl(nr(nr(t)),Uu),t=nr(nr(t))):(t===lv(nr(t))&&(t=nr(t),e.rotateRight(t)),dl(nr(t),yl),dl(nr(nr(t)),Uu),e.rotateLeft(nr(nr(t))))}this.root_.color=yl};Gi.prototype.values=function(){var t=new yt,e=this.getFirstEntry();if(e!==null)for(t.add(e.value);(e=Gi.successor(e))!==null;)t.add(e.value);return t};Gi.prototype.entrySet=function(){var t=new K1,e=this.getFirstEntry();if(e!==null)for(t.add(e);(e=Gi.successor(e))!==null;)t.add(e);return t};Gi.prototype.rotateLeft=function(t){if(t!=null){var e=t.right;t.right=e.left,e.left!=null&&(e.left.parent=t),e.parent=t.parent,t.parent===null?this.root_=e:t.parent.left===t?t.parent.left=e:t.parent.right=e,e.left=t,t.parent=e}};Gi.prototype.rotateRight=function(t){if(t!=null){var e=t.left;t.left=e.right,e.right!=null&&(e.right.parent=t),e.parent=t.parent,t.parent===null?this.root_=e:t.parent.right===t?t.parent.right=e:t.parent.left=e,e.right=t,t.parent=e}};Gi.prototype.getFirstEntry=function(){var t=this.root_;if(t!=null)for(;t.left!=null;)t=t.left;return t};Gi.successor=function(t){if(t===null)return null;if(t.right!==null){for(var e=t.right;e.left!==null;)e=e.left;return e}else{for(var n=t.parent,r=t;n!==null&&r===n.right;)r=n,n=n.parent;return n}};Gi.prototype.size=function(){return this.size_};var im=function(){};im.prototype.interfaces_=function(){return[]};im.prototype.getClass=function(){return im};function FC(){}FC.prototype=new gy;function ya(){this.array_=[],arguments[0]instanceof ni&&this.addAll(arguments[0])}ya.prototype=new FC;ya.prototype.contains=function(t){for(var e=this,n=0,r=this.array_.length;n=0;){var c=i.substring(0,s);r.add(c),i=i.substring(s+n),s=i.indexOf(e)}i.length>0&&r.add(i);for(var l=new Array(r.size()).fill(null),d=0;d0)for(var s=i;s0&&r.append(" ");for(var s=0;s0&&r.append(","),r.append(ys.toString(t.getOrdinate(i,s)))}return r.append(")"),r.toString()}};qr.ensureValidRing=function(t,e){var n=e.size();if(n===0)return e;if(n<=3)return qr.createClosedRing(t,e,4);var r=e.getOrdinate(0,Rn.X)===e.getOrdinate(n-1,Rn.X)&&e.getOrdinate(0,Rn.Y)===e.getOrdinate(n-1,Rn.Y);return r?e:qr.createClosedRing(t,e,n+1)};qr.createClosedRing=function(t,e,n){var r=t.create(n,e.getDimension()),i=e.size();qr.copy(e,0,r,0,i);for(var s=i;s0&&qr.reverse(r._points),null}},e.prototype.getCoordinate=function(){return this.isEmpty()?null:this._points.getCoordinate(0)},e.prototype.getBoundaryDimension=function(){return this.isClosed()?zn.FALSE:0},e.prototype.isClosed=function(){return this.isEmpty()?!1:this.getCoordinateN(0).equals2D(this.getCoordinateN(this.getNumPoints()-1))},e.prototype.getEndPoint=function(){return this.isEmpty()?null:this.getPointN(this.getNumPoints()-1)},e.prototype.getDimension=function(){return 1},e.prototype.getLength=function(){return Et.computeLength(this._points)},e.prototype.getNumPoints=function(){return this._points.size()},e.prototype.reverse=function(){var r=this._points.copy();qr.reverse(r);var i=this.getFactory().createLineString(r);return i},e.prototype.compareToSameClass=function(){var r=this;if(arguments.length===1){for(var i=arguments[0],s=i,c=0,l=0;c= 2)");this._points=r},e.prototype.isCoordinate=function(r){for(var i=this,s=0;s=1&&this.getCoordinateSequence().size()= 4)")},e.prototype.getGeometryType=function(){return"LinearRing"},e.prototype.copy=function(){return new e(this._points.copy(),this._factory)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},n.MINIMUM_VALID_SIZE.get=function(){return 4},n.serialVersionUID.get=function(){return-0x3b229e262367a600},Object.defineProperties(e,n),e}(Nr),Ga=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return $t.SORTINDEX_MULTIPOLYGON},e.prototype.equalsExact=function(){if(arguments.length===2){var r=arguments[0],i=arguments[1];return this.isEquivalentClass(r)?t.prototype.equalsExact.call(this,r,i):!1}else return t.prototype.equalsExact.apply(this,arguments)},e.prototype.getBoundaryDimension=function(){return 1},e.prototype.getDimension=function(){return 2},e.prototype.reverse=function(){for(var r=this,i=this._geometries.length,s=new Array(i).fill(null),c=0;c0?e.createPoint(n[0]):e.createPoint():t};am.prototype.interfaces_=function(){return[ws.GeometryEditorOperation]};am.prototype.getClass=function(){return am};var lm=function(){};lm.prototype.edit=function(t,e){return t instanceof Ha?e.createLinearRing(this.edit(t.getCoordinateSequence(),t)):t instanceof Nr?e.createLineString(this.edit(t.getCoordinateSequence(),t)):t instanceof zo?e.createPoint(this.edit(t.getCoordinateSequence(),t)):t};lm.prototype.interfaces_=function(){return[ws.GeometryEditorOperation]};lm.prototype.getClass=function(){return lm};var jr=function(){var t=this;if(this._dimension=3,this._coordinates=null,arguments.length===1){if(arguments[0]instanceof Array)this._coordinates=arguments[0],this._dimension=3;else if(Number.isInteger(arguments[0])){var e=arguments[0];this._coordinates=new Array(e).fill(null);for(var n=0;n0){var e=new Pa(17*this._coordinates.length);e.append("("),e.append(this._coordinates[0]);for(var n=1;n3&&(r=3),r<2?new jr(n):new jr(n,r)}};Za.prototype.interfaces_=function(){return[zf,Is]};Za.prototype.getClass=function(){return Za};Za.instance=function(){return Za.instanceObject};Q1.serialVersionUID.get=function(){return-0x38e49fa6cf6f2e00};Q1.instanceObject.get=function(){return new Za};Object.defineProperties(Za,Q1);var VC=function(t){function e(){t.call(this),this.map_=new Map}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(n){return this.map_.get(n)||null},e.prototype.put=function(n,r){return this.map_.set(n,r),r},e.prototype.values=function(){for(var n=new yt,r=this.map_.values(),i=r.next();!i.done;)n.add(i.value),i=r.next();return n},e.prototype.entrySet=function(){var n=new K1;return this.map_.entries().forEach(function(r){return n.add(r)}),n},e.prototype.size=function(){return this.map_.size()},e}(ph),Bn=function t(){if(this._modelType=null,this._scale=null,arguments.length===0)this._modelType=t.FLOATING;else if(arguments.length===1){if(arguments[0]instanceof ba){var e=arguments[0];this._modelType=e,e===t.FIXED&&this.setScale(1)}else if(typeof arguments[0]=="number"){var n=arguments[0];this._modelType=t.FIXED,this.setScale(n)}else if(arguments[0]instanceof t){var r=arguments[0];this._modelType=r._modelType,this._scale=r._scale}}},eb={serialVersionUID:{configurable:!0},maximumPreciseValue:{configurable:!0}};Bn.prototype.equals=function(t){if(!(t instanceof Bn))return!1;var e=t;return this._modelType===e._modelType&&this._scale===e._scale};Bn.prototype.compareTo=function(t){var e=t,n=this.getMaximumSignificantDigits(),r=e.getMaximumSignificantDigits();return new _a(n).compareTo(new _a(r))};Bn.prototype.getScale=function(){return this._scale};Bn.prototype.isFloating=function(){return this._modelType===Bn.FLOATING||this._modelType===Bn.FLOATING_SINGLE};Bn.prototype.getType=function(){return this._modelType};Bn.prototype.toString=function(){var t="UNKNOWN";return this._modelType===Bn.FLOATING?t="Floating":this._modelType===Bn.FLOATING_SINGLE?t="Floating-Single":this._modelType===Bn.FIXED&&(t="Fixed (Scale="+this.getScale()+")"),t};Bn.prototype.makePrecise=function(){if(typeof arguments[0]=="number"){var t=arguments[0];if(nn.isNaN(t))return t;if(this._modelType===Bn.FLOATING_SINGLE){var e=t;return e}return this._modelType===Bn.FIXED?Math.round(t*this._scale)/this._scale:t}else if(arguments[0]instanceof ze){var n=arguments[0];if(this._modelType===Bn.FLOATING)return null;n.x=this.makePrecise(n.x),n.y=this.makePrecise(n.y)}};Bn.prototype.getMaximumSignificantDigits=function(){var t=16;return this._modelType===Bn.FLOATING?t=16:this._modelType===Bn.FLOATING_SINGLE?t=6:this._modelType===Bn.FIXED&&(t=1+Math.trunc(Math.ceil(Math.log(this.getScale())/Math.log(10)))),t};Bn.prototype.setScale=function(t){this._scale=Math.abs(t)};Bn.prototype.interfaces_=function(){return[Is,Es]};Bn.prototype.getClass=function(){return Bn};Bn.mostPrecise=function(t,e){return t.compareTo(e)>=0?t:e};eb.serialVersionUID.get=function(){return 7777263578777804e3};eb.maximumPreciseValue.get=function(){return 9007199254740992};Object.defineProperties(Bn,eb);var ba=function t(e){this._name=e||null,t.nameToTypeMap.put(e,this)},tb={serialVersionUID:{configurable:!0},nameToTypeMap:{configurable:!0}};ba.prototype.readResolve=function(){return ba.nameToTypeMap.get(this._name)};ba.prototype.toString=function(){return this._name};ba.prototype.interfaces_=function(){return[Is]};ba.prototype.getClass=function(){return ba};tb.serialVersionUID.get=function(){return-552860263173159e4};tb.nameToTypeMap.get=function(){return new VC};Object.defineProperties(ba,tb);Bn.Type=ba;Bn.FIXED=new ba("FIXED");Bn.FLOATING=new ba("FLOATING");Bn.FLOATING_SINGLE=new ba("FLOATING SINGLE");var En=function t(){this._precisionModel=new Bn,this._SRID=0,this._coordinateSequenceFactory=t.getDefaultCoordinateSequenceFactory(),arguments.length===0||(arguments.length===1?Kt(arguments[0],zf)?this._coordinateSequenceFactory=arguments[0]:arguments[0]instanceof Bn&&(this._precisionModel=arguments[0]):arguments.length===2?(this._precisionModel=arguments[0],this._SRID=arguments[1]):arguments.length===3&&(this._precisionModel=arguments[0],this._SRID=arguments[1],this._coordinateSequenceFactory=arguments[2]))},UC={serialVersionUID:{configurable:!0}};En.prototype.toGeometry=function(t){return t.isNull()?this.createPoint(null):t.getMinX()===t.getMaxX()&&t.getMinY()===t.getMaxY()?this.createPoint(new ze(t.getMinX(),t.getMinY())):t.getMinX()===t.getMaxX()||t.getMinY()===t.getMaxY()?this.createLineString([new ze(t.getMinX(),t.getMinY()),new ze(t.getMaxX(),t.getMaxY())]):this.createPolygon(this.createLinearRing([new ze(t.getMinX(),t.getMinY()),new ze(t.getMinX(),t.getMaxY()),new ze(t.getMaxX(),t.getMaxY()),new ze(t.getMaxX(),t.getMinY()),new ze(t.getMinX(),t.getMinY())]),null)};En.prototype.createLineString=function(t){if(t){if(t instanceof Array)return new Nr(this.getCoordinateSequenceFactory().create(t),this);if(Kt(t,Rn))return new Nr(t,this)}else return new Nr(this.getCoordinateSequenceFactory().create([]),this)};En.prototype.createMultiLineString=function(){if(arguments.length===0)return new Qu(null,this);if(arguments.length===1){var t=arguments[0];return new Qu(t,this)}};En.prototype.buildGeometry=function(t){for(var e=null,n=!1,r=!1,i=t.iterator();i.hasNext();){var s=i.next(),c=s.getClass();e===null&&(e=c),c!==e&&(n=!0),s.isGeometryCollectionOrDerived()&&(r=!0)}if(e===null)return this.createGeometryCollection();if(n||r)return this.createGeometryCollection(En.toGeometryArray(t));var l=t.iterator().next(),d=t.size()>1;if(d){if(l instanceof li)return this.createMultiPolygon(En.toPolygonArray(t));if(l instanceof Nr)return this.createMultiLineString(En.toLineStringArray(t));if(l instanceof zo)return this.createMultiPoint(En.toPointArray(t));hn.shouldNeverReachHere("Unhandled class: "+l.getClass().getName())}return l};En.prototype.createMultiPointFromCoords=function(t){return this.createMultiPoint(t!==null?this.getCoordinateSequenceFactory().create(t):null)};En.prototype.createPoint=function(){if(arguments.length===0)return this.createPoint(this.getCoordinateSequenceFactory().create([]));if(arguments.length===1){if(arguments[0]instanceof ze){var t=arguments[0];return this.createPoint(t!==null?this.getCoordinateSequenceFactory().create([t]):null)}else if(Kt(arguments[0],Rn)){var e=arguments[0];return new zo(e,this)}}};En.prototype.getCoordinateSequenceFactory=function(){return this._coordinateSequenceFactory};En.prototype.createPolygon=function(){if(arguments.length===0)return new li(null,null,this);if(arguments.length===1){if(Kt(arguments[0],Rn)){var t=arguments[0];return this.createPolygon(this.createLinearRing(t))}else if(arguments[0]instanceof Array){var e=arguments[0];return this.createPolygon(this.createLinearRing(e))}else if(arguments[0]instanceof Ha){var n=arguments[0];return this.createPolygon(n,null)}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];return new li(r,i,this)}};En.prototype.getSRID=function(){return this._SRID};En.prototype.createGeometryCollection=function(){if(arguments.length===0)return new io(null,this);if(arguments.length===1){var t=arguments[0];return new io(t,this)}};En.prototype.createGeometry=function(t){var e=new ws(this);return e.edit(t,{edit:function(){if(arguments.length===2){var n=arguments[0];return this._coordinateSequenceFactory.create(n)}}})};En.prototype.getPrecisionModel=function(){return this._precisionModel};En.prototype.createLinearRing=function(){if(arguments.length===0)return this.createLinearRing(this.getCoordinateSequenceFactory().create([]));if(arguments.length===1){if(arguments[0]instanceof Array){var t=arguments[0];return this.createLinearRing(t!==null?this.getCoordinateSequenceFactory().create(t):null)}else if(Kt(arguments[0],Rn)){var e=arguments[0];return new Ha(e,this)}}};En.prototype.createMultiPolygon=function(){if(arguments.length===0)return new Ga(null,this);if(arguments.length===1){var t=arguments[0];return new Ga(t,this)}};En.prototype.createMultiPoint=function(){var t=this;if(arguments.length===0)return new Gf(null,this);if(arguments.length===1){if(arguments[0]instanceof Array){var e=arguments[0];return new Gf(e,this)}else if(arguments[0]instanceof Array){var n=arguments[0];return this.createMultiPoint(n!==null?this.getCoordinateSequenceFactory().create(n):null)}else if(Kt(arguments[0],Rn)){var r=arguments[0];if(r===null)return this.createMultiPoint(new Array(0).fill(null));for(var i=new Array(r.size()).fill(null),s=0;s=this.size())throw new Error;return this.array_[t]};Ma.prototype.push=function(t){return this.array_.push(t),t};Ma.prototype.pop=function(t){if(this.array_.length===0)throw new xy;return this.array_.pop()};Ma.prototype.peek=function(){if(this.array_.length===0)throw new xy;return this.array_[this.array_.length-1]};Ma.prototype.empty=function(){return this.array_.length===0};Ma.prototype.isEmpty=function(){return this.empty()};Ma.prototype.search=function(t){return this.array_.indexOf(t)};Ma.prototype.size=function(){return this.array_.length};Ma.prototype.toArray=function(){for(var t=this,e=[],n=0,r=this.array_.length;n0&&this._minIndexthis._minCoord.y&&n.y>this._minCoord.y&&r===Et.CLOCKWISE)&&(i=!0),i&&(this._minIndex=this._minIndex-1)};xa.prototype.getRightmostSideOfSegment=function(t,e){var n=t.getEdge(),r=n.getCoordinates();if(e<0||e+1>=r.length||r[e].y===r[e+1].y)return-1;var i=lt.LEFT;return r[e].ye._minCoord.x)&&(e._minDe=t,e._minIndex=r,e._minCoord=n[r])};xa.prototype.findRightmostEdgeAtNode=function(){var t=this._minDe.getNode(),e=t.getEdges();this._minDe=e.getRightmostEdge(),this._minDe.isForward()||(this._minDe=this._minDe.getSym(),this._minIndex=this._minDe.getEdge().getCoordinates().length-1)};xa.prototype.findEdge=function(t){for(var e=this,n=t.iterator();n.hasNext();){var r=n.next();r.isForward()&&e.checkForRightmostCoordinate(r)}hn.isTrue(this._minIndex!==0||this._minCoord.equals(this._minDe.getCoordinate()),"inconsistency in rightmost processing"),this._minIndex===0?this.findRightmostEdgeAtNode():this.findRightmostEdgeAtVertex(),this._orientedDe=this._minDe;var i=this.getRightmostSide(this._minDe,this._minIndex);i===lt.LEFT&&(this._orientedDe=this._minDe.getSym())};xa.prototype.interfaces_=function(){return[]};xa.prototype.getClass=function(){return xa};var Pl=function(t){function e(n,r){t.call(this,e.msgWithCoord(n,r)),this.pt=r?new ze(r):null,this.name="TopologyException"}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getCoordinate=function(){return this.pt},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.msgWithCoord=function(n,r){return r?n:n+" [ "+r+" ]"},e}(Tl),wy=function(){this.array_=[]};wy.prototype.addLast=function(t){this.array_.push(t)};wy.prototype.removeFirst=function(){return this.array_.shift()};wy.prototype.isEmpty=function(){return this.array_.length===0};var oo=function(){this._finder=null,this._dirEdgeList=new yt,this._nodes=new yt,this._rightMostCoord=null,this._env=null,this._finder=new xa};oo.prototype.clearVisitedEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();){var e=t.next();e.setVisited(!1)}};oo.prototype.getRightmostCoordinate=function(){return this._rightMostCoord};oo.prototype.computeNodeDepth=function(t){for(var e=this,n=null,r=t.getEdges().iterator();r.hasNext();){var i=r.next();if(i.isVisited()||i.getSym().isVisited()){n=i;break}}if(n===null)throw new Pl("unable to find edge to compute depths at "+t.getCoordinate());t.getEdges().computeDepths(n);for(var s=t.getEdges().iterator();s.hasNext();){var c=s.next();c.setVisited(!0),e.copySymDepths(c)}};oo.prototype.computeDepth=function(t){this.clearVisitedEdges();var e=this._finder.getEdge();e.setEdgeDepths(lt.RIGHT,t),this.copySymDepths(e),this.computeDepths(e)};oo.prototype.create=function(t){this.addReachable(t),this._finder.findEdge(this._dirEdgeList),this._rightMostCoord=this._finder.getCoordinate()};oo.prototype.findResultEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();){var e=t.next();e.getDepth(lt.RIGHT)>=1&&e.getDepth(lt.LEFT)<=0&&!e.isInteriorAreaEdge()&&e.setInResult(!0)}};oo.prototype.computeDepths=function(t){var e=this,n=new K1,r=new wy,i=t.getNode();for(r.addLast(i),n.add(i),t.setVisited(!0);!r.isEmpty();){var s=r.removeFirst();n.add(s),e.computeNodeDepth(s);for(var c=s.getEdges().iterator();c.hasNext();){var l=c.next(),d=l.getSym();if(!d.isVisited()){var v=d.getNode();n.contains(v)||(r.addLast(v),n.add(v))}}}};oo.prototype.compareTo=function(t){var e=t;return this._rightMostCoord.xe._rightMostCoord.x?1:0};oo.prototype.getEnvelope=function(){if(this._env===null){for(var t=new Bt,e=this._dirEdgeList.iterator();e.hasNext();)for(var n=e.next(),r=n.getEdge().getCoordinates(),i=0;ithis.location.length){var n=new Array(3).fill(null);n[lt.ON]=this.location[lt.ON],n[lt.LEFT]=Fe.NONE,n[lt.RIGHT]=Fe.NONE,this.location=n}for(var r=0;r1&&t.append(Fe.toLocationSymbol(this.location[lt.LEFT])),t.append(Fe.toLocationSymbol(this.location[lt.ON])),this.location.length>1&&t.append(Fe.toLocationSymbol(this.location[lt.RIGHT])),t.toString()};rr.prototype.setLocations=function(t,e,n){this.location[lt.ON]=t,this.location[lt.LEFT]=e,this.location[lt.RIGHT]=n};rr.prototype.get=function(t){return t1};rr.prototype.isAnyNull=function(){for(var t=this,e=0;et._maxNodeDegree&&(t._maxNodeDegree=r),e=t.getNext(e)}while(e!==this._startDe);this._maxNodeDegree*=2};$r.prototype.addPoints=function(t,e,n){var r=this,i=t.getCoordinates();if(e){var s=1;n&&(s=0);for(var c=s;c=0;d--)r._pts.add(i[d])}};$r.prototype.isHole=function(){return this._isHole};$r.prototype.setInResult=function(){var t=this._startDe;do t.getEdge().setInResult(!0),t=t.getNext();while(t!==this._startDe)};$r.prototype.containsPoint=function(t){var e=this.getLinearRing(),n=e.getEnvelopeInternal();if(!n.contains(t)||!Et.isPointInRing(t,e.getCoordinates()))return!1;for(var r=this._holes.iterator();r.hasNext();){var i=r.next();if(i.containsPoint(t))return!1}return!0};$r.prototype.addHole=function(t){this._holes.add(t)};$r.prototype.isShell=function(){return this._shell===null};$r.prototype.getLabel=function(){return this._label};$r.prototype.getEdges=function(){return this._edges};$r.prototype.getMaxNodeDegree=function(){return this._maxNodeDegree<0&&this.computeMaxNodeDegree(),this._maxNodeDegree};$r.prototype.getShell=function(){return this._shell};$r.prototype.mergeLabel=function(){if(arguments.length===1){var t=arguments[0];this.mergeLabel(t,0),this.mergeLabel(t,1)}else if(arguments.length===2){var e=arguments[0],n=arguments[1],r=e.getLocation(n,lt.RIGHT);if(r===Fe.NONE)return null;if(this._label.getLocation(n)===Fe.NONE)return this._label.setLocation(n,r),null}};$r.prototype.setShell=function(t){this._shell=t,t!==null&&t.addHole(this)};$r.prototype.toPolygon=function(t){for(var e=this,n=new Array(this._holes.size()).fill(null),r=0;r=2,"found partial label"),this.computeIM(t)};is.prototype.isInResult=function(){return this._isInResult};is.prototype.isVisited=function(){return this._isVisited};is.prototype.interfaces_=function(){return[]};is.prototype.getClass=function(){return is};var Sy=function(t){function e(){t.call(this),this._coord=null,this._edges=null;var n=arguments[0],r=arguments[1];this._coord=n,this._edges=r,this._label=new Hn(0,Fe.NONE)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isIncidentEdgeInResult=function(){for(var n=this.getEdges().getEdges().iterator();n.hasNext();){var r=n.next();if(r.getEdge().isInResult())return!0}return!1},e.prototype.isIsolated=function(){return this._label.getGeometryCount()===1},e.prototype.getCoordinate=function(){return this._coord},e.prototype.print=function(n){n.println("node "+this._coord+" lbl: "+this._label)},e.prototype.computeIM=function(n){},e.prototype.computeMergedLocation=function(n,r){var i=Fe.NONE;if(i=this._label.getLocation(r),!n.isNull(r)){var s=n.getLocation(r);i!==Fe.BOUNDARY&&(i=s)}return i},e.prototype.setLabel=function(){if(arguments.length===2){var n=arguments[0],r=arguments[1];this._label===null?this._label=new Hn(n,r):this._label.setLocation(n,r)}else return t.prototype.setLabel.apply(this,arguments)},e.prototype.getEdges=function(){return this._edges},e.prototype.mergeLabel=function(){var n=this;if(arguments[0]instanceof e){var r=arguments[0];this.mergeLabel(r._label)}else if(arguments[0]instanceof Hn)for(var i=arguments[0],s=0;s<2;s++){var c=n.computeMergedLocation(i,s),l=n._label.getLocation(s);l===Fe.NONE&&n._label.setLocation(s,c)}},e.prototype.add=function(n){this._edges.insert(n),n.setNode(this)},e.prototype.setLabelBoundary=function(n){if(this._label===null)return null;var r=Fe.NONE;this._label!==null&&(r=this._label.getLocation(n));var i=null;switch(r){case Fe.BOUNDARY:i=Fe.INTERIOR;break;case Fe.INTERIOR:i=Fe.BOUNDARY;break;default:i=Fe.BOUNDARY;break}this._label.setLocation(n,i)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(is),wa=function(){this.nodeMap=new Gi,this.nodeFact=null;var t=arguments[0];this.nodeFact=t};wa.prototype.find=function(t){return this.nodeMap.get(t)};wa.prototype.addNode=function(){if(arguments[0]instanceof ze){var t=arguments[0],e=this.nodeMap.get(t);return e===null&&(e=this.nodeFact.createNode(t),this.nodeMap.put(t,e)),e}else if(arguments[0]instanceof Sy){var n=arguments[0],r=this.nodeMap.get(n.getCoordinate());return r===null?(this.nodeMap.put(n.getCoordinate(),n),n):(r.mergeLabel(n),r)}};wa.prototype.print=function(t){for(var e=this.iterator();e.hasNext();){var n=e.next();n.print(t)}};wa.prototype.iterator=function(){return this.nodeMap.values().iterator()};wa.prototype.values=function(){return this.nodeMap.values()};wa.prototype.getBoundaryNodes=function(t){for(var e=new yt,n=this.iterator();n.hasNext();){var r=n.next();r.getLabel().getLocation(t)===Fe.BOUNDARY&&e.add(r)}return e};wa.prototype.add=function(t){var e=t.getCoordinate(),n=this.addNode(e);n.add(t)};wa.prototype.interfaces_=function(){return[]};wa.prototype.getClass=function(){return wa};var Xn=function(){},Tm={NE:{configurable:!0},NW:{configurable:!0},SW:{configurable:!0},SE:{configurable:!0}};Xn.prototype.interfaces_=function(){return[]};Xn.prototype.getClass=function(){return Xn};Xn.isNorthern=function(t){return t===Xn.NE||t===Xn.NW};Xn.isOpposite=function(t,e){if(t===e)return!1;var n=(t-e+4)%4;return n===2};Xn.commonHalfPlane=function(t,e){if(t===e)return t;var n=(t-e+4)%4;if(n===2)return-1;var r=te?t:e;return r===0&&i===3?3:r};Xn.isInHalfPlane=function(t,e){return e===Xn.SE?t===Xn.SE||t===Xn.SW:t===e||t===e+1};Xn.quadrant=function(){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var t=arguments[0],e=arguments[1];if(t===0&&e===0)throw new yr("Cannot compute the quadrant for point ( "+t+", "+e+" )");return t>=0?e>=0?Xn.NE:Xn.SE:e>=0?Xn.NW:Xn.SW}else if(arguments[0]instanceof ze&&arguments[1]instanceof ze){var n=arguments[0],r=arguments[1];if(r.x===n.x&&r.y===n.y)throw new yr("Cannot compute the quadrant for two identical points "+n);return r.x>=n.x?r.y>=n.y?Xn.NE:Xn.SE:r.y>=n.y?Xn.NW:Xn.SW}};Tm.NE.get=function(){return 0};Tm.NW.get=function(){return 1};Tm.SW.get=function(){return 2};Tm.SE.get=function(){return 3};Object.defineProperties(Xn,Tm);var qi=function(){if(this._edge=null,this._label=null,this._node=null,this._p0=null,this._p1=null,this._dx=null,this._dy=null,this._quadrant=null,arguments.length===1){var t=arguments[0];this._edge=t}else if(arguments.length===3){var e=arguments[0],n=arguments[1],r=arguments[2],i=null;this._edge=e,this.init(n,r),this._label=i}else if(arguments.length===4){var s=arguments[0],c=arguments[1],l=arguments[2],d=arguments[3];this._edge=s,this.init(c,l),this._label=d}};qi.prototype.compareDirection=function(t){return this._dx===t._dx&&this._dy===t._dy?0:this._quadrant>t._quadrant?1:this._quadrant2){c.linkDirectedEdgesForMinimalEdgeRings();var l=c.buildMinimalRings(),d=r.findShell(l);d!==null?(r.placePolygonHoles(d,l),e.add(d)):n.addAll(l)}else i.add(c)}return i};Fo.prototype.containsPoint=function(t){for(var e=this._shellList.iterator();e.hasNext();){var n=e.next();if(n.containsPoint(t))return!0}return!1};Fo.prototype.buildMaximalEdgeRings=function(t){for(var e=this,n=new yt,r=t.iterator();r.hasNext();){var i=r.next();if(i.isInResult()&&i.getLabel().isArea()&&i.getEdgeRing()===null){var s=new XO(i,e._geometryFactory);n.add(s),s.setInResult()}}return n};Fo.prototype.placePolygonHoles=function(t,e){for(var n=e.iterator();n.hasNext();){var r=n.next();r.isHole()&&r.setShell(t)}};Fo.prototype.getPolygons=function(){var t=this.computePolygons(this._shellList);return t};Fo.prototype.findEdgeRingContaining=function(t,e){for(var n=t.getLinearRing(),r=n.getEnvelopeInternal(),i=n.getCoordinateN(0),s=null,c=null,l=e.iterator();l.hasNext();){var d=l.next(),v=d.getLinearRing(),S=v.getEnvelopeInternal();s!==null&&(c=s.getLinearRing().getEnvelopeInternal());var E=!1;S.contains(r)&&Et.isPointInRing(i,v.getCoordinates())&&(E=!0),E&&(s===null||c.contains(S))&&(s=d)}return s};Fo.prototype.findShell=function(t){for(var e=0,n=null,r=t.iterator();r.hasNext();){var i=r.next();i.isHole()||(n=i,e++)}return hn.isTrue(e<=1,"found two shells in MinimalEdgeRing list"),n};Fo.prototype.add=function(){if(arguments.length===1){var t=arguments[0];this.add(t.getEdgeEnds(),t.getNodes())}else if(arguments.length===2){var e=arguments[0],n=arguments[1];Lr.linkResultDirectedEdges(n);var r=this.buildMaximalEdgeRings(e),i=new yt,s=this.buildMinimalEdgeRings(r,this._shellList,i);this.sortShellsAndHoles(s,this._shellList,i),this.placeFreeHoles(this._shellList,i)}};Fo.prototype.interfaces_=function(){return[]};Fo.prototype.getClass=function(){return Fo};var Wf=function(){};Wf.prototype.getBounds=function(){};Wf.prototype.interfaces_=function(){return[]};Wf.prototype.getClass=function(){return Wf};var qs=function(){this._bounds=null,this._item=null;var t=arguments[0],e=arguments[1];this._bounds=t,this._item=e};qs.prototype.getItem=function(){return this._item};qs.prototype.getBounds=function(){return this._bounds};qs.prototype.interfaces_=function(){return[Wf,Is]};qs.prototype.getClass=function(){return qs};var Ml=function(){this._size=null,this._items=null,this._size=0,this._items=new yt,this._items.add(null)};Ml.prototype.poll=function(){if(this.isEmpty())return null;var t=this._items.get(1);return this._items.set(1,this._items.get(this._size)),this._size-=1,this.reorder(1),t};Ml.prototype.size=function(){return this._size};Ml.prototype.reorder=function(t){for(var e=this,n=null,r=this._items.get(t);t*2<=this._size&&(n=t*2,n!==e._size&&e._items.get(n+1).compareTo(e._items.get(n))<0&&n++,e._items.get(n).compareTo(r)<0);t=n)e._items.set(t,e._items.get(n));this._items.set(t,r)};Ml.prototype.clear=function(){this._size=0,this._items.clear()};Ml.prototype.isEmpty=function(){return this._size===0};Ml.prototype.add=function(t){var e=this;this._items.add(null),this._size+=1;var n=this._size;for(this._items.set(0,t);t.compareTo(this._items.get(Math.trunc(n/2)))<0;n/=2)e._items.set(n,e._items.get(Math.trunc(n/2)));this._items.set(n,t)};Ml.prototype.interfaces_=function(){return[]};Ml.prototype.getClass=function(){return Ml};var hu=function(){};hu.prototype.visitItem=function(t){};hu.prototype.interfaces_=function(){return[]};hu.prototype.getClass=function(){return hu};var Kc=function(){};Kc.prototype.insert=function(t,e){};Kc.prototype.remove=function(t,e){};Kc.prototype.query=function(){};Kc.prototype.interfaces_=function(){return[]};Kc.prototype.getClass=function(){return Kc};var oi=function(){if(this._childBoundables=new yt,this._bounds=null,this._level=null,arguments.length!==0&&arguments.length===1){var t=arguments[0];this._level=t}},GC={serialVersionUID:{configurable:!0}};oi.prototype.getLevel=function(){return this._level};oi.prototype.size=function(){return this._childBoundables.size()};oi.prototype.getChildBoundables=function(){return this._childBoundables};oi.prototype.addChildBoundable=function(t){hn.isTrue(this._bounds===null),this._childBoundables.add(t)};oi.prototype.isEmpty=function(){return this._childBoundables.isEmpty()};oi.prototype.getBounds=function(){return this._bounds===null&&(this._bounds=this.computeBounds()),this._bounds};oi.prototype.interfaces_=function(){return[Wf,Is]};oi.prototype.getClass=function(){return oi};GC.serialVersionUID.get=function(){return 6493722185909574e3};Object.defineProperties(oi,GC);var Ws=function(){};Ws.reverseOrder=function(){return{compare:function(t,e){return e.compareTo(t)}}};Ws.min=function(t){return Ws.sort(t),t.get(0)};Ws.sort=function(t,e){var n=t.toArray();e?Yu.sort(n,e):Yu.sort(n);for(var r=t.iterator(),i=0,s=n.length;iXr.area(this._boundable2)?(this.expand(this._boundable1,this._boundable2,t,e),null):(this.expand(this._boundable2,this._boundable1,t,e),null);if(n)return this.expand(this._boundable1,this._boundable2,t,e),null;if(r)return this.expand(this._boundable2,this._boundable1,t,e),null;throw new yr("neither boundable is composite")};Xr.prototype.isLeaves=function(){return!(Xr.isComposite(this._boundable1)||Xr.isComposite(this._boundable2))};Xr.prototype.compareTo=function(t){var e=t;return this._distancee._distance?1:0};Xr.prototype.expand=function(t,e,n,r){for(var i=this,s=t.getChildBoundables(),c=s.iterator();c.hasNext();){var l=c.next(),d=new Xr(l,e,i._itemDistance);d.getDistance()1,"Node capacity must be greater than 1"),this._nodeCapacity=n}},Ey={IntersectsOp:{configurable:!0},serialVersionUID:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};Ci.prototype.getNodeCapacity=function(){return this._nodeCapacity};Ci.prototype.lastNode=function(t){return t.get(t.size()-1)};Ci.prototype.size=function(){var t=this;if(arguments.length===0)return this.isEmpty()?0:(this.build(),this.size(this._root));if(arguments.length===1){for(var e=arguments[0],n=0,r=e.getChildBoundables().iterator();r.hasNext();){var i=r.next();i instanceof oi?n+=t.size(i):i instanceof qs&&(n+=1)}return n}};Ci.prototype.removeItem=function(t,e){for(var n=null,r=t.getChildBoundables().iterator();r.hasNext();){var i=r.next();i instanceof qs&&i.getItem()===e&&(n=i)}return n!==null?(t.getChildBoundables().remove(n),!0):!1};Ci.prototype.itemsTree=function(){var t=this;if(arguments.length===0){this.build();var e=this.itemsTree(this._root);return e===null?new yt:e}else if(arguments.length===1){for(var n=arguments[0],r=new yt,i=n.getChildBoundables().iterator();i.hasNext();){var s=i.next();if(s instanceof oi){var c=t.itemsTree(s);c!==null&&r.add(c)}else s instanceof qs?r.add(s.getItem()):hn.shouldNeverReachHere()}return r.size()<=0?null:r}};Ci.prototype.insert=function(t,e){hn.isTrue(!this._built,"Cannot insert items into an STR packed R-tree after it has been built."),this._itemBoundables.add(new qs(t,e))};Ci.prototype.boundablesAtLevel=function(){var t=this;if(arguments.length===1){var e=arguments[0],n=new yt;return this.boundablesAtLevel(e,this._root,n),n}else if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2];if(hn.isTrue(r>-2),i.getLevel()===r)return s.add(i),null;for(var c=i.getChildBoundables().iterator();c.hasNext();){var l=c.next();l instanceof oi?t.boundablesAtLevel(r,l,s):(hn.isTrue(l instanceof qs),r===-1&&s.add(l))}return null}};Ci.prototype.query=function(){var t=this;if(arguments.length===1){var e=arguments[0];this.build();var n=new yt;return this.isEmpty()||this.getIntersectsOp().intersects(this._root.getBounds(),e)&&this.query(e,this._root,n),n}else if(arguments.length===2){var r=arguments[0],i=arguments[1];if(this.build(),this.isEmpty())return null;this.getIntersectsOp().intersects(this._root.getBounds(),r)&&this.query(r,this._root,i)}else if(arguments.length===3){if(Kt(arguments[2],hu)&&arguments[0]instanceof Object&&arguments[1]instanceof oi)for(var s=arguments[0],c=arguments[1],l=arguments[2],d=c.getChildBoundables(),v=0;vn&&(n=s)}}return n+1}};Ci.prototype.createParentBoundables=function(t,e){var n=this;hn.isTrue(!t.isEmpty());var r=new yt;r.add(this.createNode(e));var i=new yt(t);Ws.sort(i,this.getComparator());for(var s=i.iterator();s.hasNext();){var c=s.next();n.lastNode(r).getChildBoundables().size()===n.getNodeCapacity()&&r.add(n.createNode(e)),n.lastNode(r).addChildBoundable(c)}return r};Ci.prototype.isEmpty=function(){return this._built?this._root.isEmpty():this._itemBoundables.isEmpty()};Ci.prototype.interfaces_=function(){return[Is]};Ci.prototype.getClass=function(){return Ci};Ci.compareDoubles=function(t,e){return t>e?1:t0);for(var c=new yt,l=0;l0;){var A=M.poll(),R=A.getDistance();if(R>=E)break;A.isLeaves()?(E=R,C=A):A.expandToQueue(M,E)}return[C.getBoundable(0).getItem(),C.getBoundable(1).getItem()]}}else if(arguments.length===3){var z=arguments[0],U=arguments[1],F=arguments[2],G=new qs(z,U),H=new Xr(this.getRoot(),G,F);return this.nearestNeighbour(H)[0]}},e.prototype.interfaces_=function(){return[Kc,Is]},e.prototype.getClass=function(){return e},e.centreX=function(r){return e.avg(r.getMinX(),r.getMaxX())},e.avg=function(r,i){return(r+i)/2},e.centreY=function(r){return e.avg(r.getMinY(),r.getMaxY())},n.STRtreeNode.get=function(){return lS},n.serialVersionUID.get=function(){return 0x39920f7d5f261e0},n.xComparator.get=function(){return{interfaces_:function(){return[Of]},compare:function(r,i){return t.compareDoubles(e.centreX(r.getBounds()),e.centreX(i.getBounds()))}}},n.yComparator.get=function(){return{interfaces_:function(){return[Of]},compare:function(r,i){return t.compareDoubles(e.centreY(r.getBounds()),e.centreY(i.getBounds()))}}},n.intersectsOp.get=function(){return{interfaces_:function(){return[t.IntersectsOp]},intersects:function(r,i){return r.intersects(i)}}},n.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(e,n),e}(Ci),lS=function(t){function e(){var n=arguments[0];t.call(this,n)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.computeBounds=function(){for(var n=null,r=this.getChildBoundables().iterator();r.hasNext();){var i=r.next();n===null?n=new Bt(i.getBounds()):n.expandToInclude(i.getBounds())}return n},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(oi),_o=function(){};_o.prototype.interfaces_=function(){return[]};_o.prototype.getClass=function(){return _o};_o.relativeSign=function(t,e){return te?1:0};_o.compare=function(t,e,n){if(e.equals2D(n))return 0;var r=_o.relativeSign(e.x,n.x),i=_o.relativeSign(e.y,n.y);switch(t){case 0:return _o.compareValue(r,i);case 1:return _o.compareValue(i,r);case 2:return _o.compareValue(i,-r);case 3:return _o.compareValue(-r,i);case 4:return _o.compareValue(-r,-i);case 5:return _o.compareValue(-i,-r);case 6:return _o.compareValue(-i,r);case 7:return _o.compareValue(r,-i)}return hn.shouldNeverReachHere("invalid octant value"),0};_o.compareValue=function(t,e){return t<0?-1:t>0?1:e<0?-1:e>0?1:0};var fu=function(){this._segString=null,this.coord=null,this.segmentIndex=null,this._segmentOctant=null,this._isInterior=null;var t=arguments[0],e=arguments[1],n=arguments[2],r=arguments[3];this._segString=t,this.coord=new ze(e),this.segmentIndex=n,this._segmentOctant=r,this._isInterior=!e.equals2D(t.getCoordinate(n))};fu.prototype.getCoordinate=function(){return this.coord};fu.prototype.print=function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex)};fu.prototype.compareTo=function(t){var e=t;return this.segmentIndexe.segmentIndex?1:this.coord.equals2D(e.coord)?0:_o.compare(this._segmentOctant,this.coord,e.coord)};fu.prototype.isEndPoint=function(t){return this.segmentIndex===0&&!this._isInterior||this.segmentIndex===t};fu.prototype.isInterior=function(){return this._isInterior};fu.prototype.interfaces_=function(){return[Es]};fu.prototype.getClass=function(){return fu};var so=function(){this._nodeMap=new Gi,this._edge=null;var t=arguments[0];this._edge=t};so.prototype.getSplitCoordinates=function(){var t=this,e=new Im;this.addEndpoints();for(var n=this.iterator(),r=n.next();n.hasNext();){var i=n.next();t.addEdgeCoordinates(r,i,e),r=i}return e.toCoordinateArray()};so.prototype.addCollapsedNodes=function(){var t=this,e=new yt;this.findCollapsesFromInsertedNodes(e),this.findCollapsesFromExistingVertices(e);for(var n=e.iterator();n.hasNext();){var r=n.next().intValue();t.add(t._edge.getCoordinate(r),r)}};so.prototype.print=function(t){t.println("Intersections:");for(var e=this.iterator();e.hasNext();){var n=e.next();n.print(t)}};so.prototype.findCollapsesFromExistingVertices=function(t){for(var e=this,n=0;n=0?e>=0?n>=r?0:1:n>=r?7:6:e>=0?n>=r?3:2:n>=r?4:5}else if(arguments[0]instanceof ze&&arguments[1]instanceof ze){var i=arguments[0],s=arguments[1],c=s.x-i.x,l=s.y-i.y;if(c===0&&l===0)throw new yr("Cannot compute the octant for two identical points "+i);return Jc.octant(c,l)}};var Xa=function(){};Xa.prototype.getCoordinates=function(){};Xa.prototype.size=function(){};Xa.prototype.getCoordinate=function(t){};Xa.prototype.isClosed=function(){};Xa.prototype.setData=function(t){};Xa.prototype.getData=function(){};Xa.prototype.interfaces_=function(){return[]};Xa.prototype.getClass=function(){return Xa};var um=function(){};um.prototype.addIntersection=function(t,e){};um.prototype.interfaces_=function(){return[Xa]};um.prototype.getClass=function(){return um};var Wr=function(){this._nodeList=new so(this),this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};Wr.prototype.getCoordinates=function(){return this._pts};Wr.prototype.size=function(){return this._pts.length};Wr.prototype.getCoordinate=function(t){return this._pts[t]};Wr.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])};Wr.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:this.safeOctant(this.getCoordinate(t),this.getCoordinate(t+1))};Wr.prototype.setData=function(t){this._data=t};Wr.prototype.safeOctant=function(t,e){return t.equals2D(e)?0:Jc.octant(t,e)};Wr.prototype.getData=function(){return this._data};Wr.prototype.addIntersection=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];this.addIntersectionNode(t,e)}else if(arguments.length===4){var n=arguments[0],r=arguments[1],i=arguments[3],s=new ze(n.getIntersection(i));this.addIntersection(s,r)}};Wr.prototype.toString=function(){return js.toLineString(new jr(this._pts))};Wr.prototype.getNodeList=function(){return this._nodeList};Wr.prototype.addIntersectionNode=function(t,e){var n=e,r=n+1;if(r=0&&n>=0||e<=0&&n<=0?Math.max(e,n):0}else if(arguments[0]instanceof ze){var r=arguments[0];return Et.orientationIndex(this.p0,this.p1,r)}};Vt.prototype.toGeometry=function(t){return t.createLineString([this.p0,this.p1])};Vt.prototype.isVertical=function(){return this.p0.x===this.p1.x};Vt.prototype.equals=function(t){if(!(t instanceof Vt))return!1;var e=t;return this.p0.equals(e.p0)&&this.p1.equals(e.p1)};Vt.prototype.intersection=function(t){var e=new fc;return e.computeIntersection(this.p0,this.p1,t.p0,t.p1),e.hasIntersection()?e.getIntersection(0):null};Vt.prototype.project=function(){if(arguments[0]instanceof ze){var t=arguments[0];if(t.equals(this.p0)||t.equals(this.p1))return new ze(t);var e=this.projectionFactor(t),n=new ze;return n.x=this.p0.x+e*(this.p1.x-this.p0.x),n.y=this.p0.y+e*(this.p1.y-this.p0.y),n}else if(arguments[0]instanceof Vt){var r=arguments[0],i=this.projectionFactor(r.p0),s=this.projectionFactor(r.p1);if(i>=1&&s>=1||i<=0&&s<=0)return null;var c=this.project(r.p0);i<0&&(c=this.p0),i>1&&(c=this.p1);var l=this.project(r.p1);return s<0&&(l=this.p0),s>1&&(l=this.p1),new Vt(c,l)}};Vt.prototype.normalize=function(){this.p1.compareTo(this.p0)<0&&this.reverse()};Vt.prototype.angle=function(){return Math.atan2(this.p1.y-this.p0.y,this.p1.x-this.p0.x)};Vt.prototype.getCoordinate=function(t){return t===0?this.p0:this.p1};Vt.prototype.distancePerpendicular=function(t){return Et.distancePointLinePerpendicular(t,this.p0,this.p1)};Vt.prototype.minY=function(){return Math.min(this.p0.y,this.p1.y)};Vt.prototype.midPoint=function(){return Vt.midPoint(this.p0,this.p1)};Vt.prototype.projectionFactor=function(t){if(t.equals(this.p0))return 0;if(t.equals(this.p1))return 1;var e=this.p1.x-this.p0.x,n=this.p1.y-this.p0.y,r=e*e+n*n;if(r<=0)return nn.NaN;var i=((t.x-this.p0.x)*e+(t.y-this.p0.y)*n)/r;return i};Vt.prototype.closestPoints=function(t){var e=this.intersection(t);if(e!==null)return[e,e];var n=new Array(2).fill(null),r=nn.MAX_VALUE,i=null,s=this.closestPoint(t.p0);r=s.distance(t.p0),n[0]=s,n[1]=t.p0;var c=this.closestPoint(t.p1);i=c.distance(t.p1),i0&&e<1)return this.project(t);var n=this.p0.distance(t),r=this.p1.distance(t);return n1||nn.isNaN(e))&&(e=1),e};Vt.prototype.toString=function(){return"LINESTRING( "+this.p0.x+" "+this.p0.y+", "+this.p1.x+" "+this.p1.y+")"};Vt.prototype.isHorizontal=function(){return this.p0.y===this.p1.y};Vt.prototype.distance=function(){if(arguments[0]instanceof Vt){var t=arguments[0];return Et.distanceLineLine(this.p0,this.p1,t.p0,t.p1)}else if(arguments[0]instanceof ze){var e=arguments[0];return Et.distancePointLine(e,this.p0,this.p1)}};Vt.prototype.pointAlong=function(t){var e=new ze;return e.x=this.p0.x+t*(this.p1.x-this.p0.x),e.y=this.p0.y+t*(this.p1.y-this.p0.y),e};Vt.prototype.hashCode=function(){var t=nn.doubleToLongBits(this.p0.x);t^=nn.doubleToLongBits(this.p0.y)*31;var e=Math.trunc(t)^Math.trunc(t>>32),n=nn.doubleToLongBits(this.p1.x);n^=nn.doubleToLongBits(this.p1.y)*31;var r=Math.trunc(n)^Math.trunc(n>>32);return e^r};Vt.prototype.interfaces_=function(){return[Es,Is]};Vt.prototype.getClass=function(){return Vt};Vt.midPoint=function(t,e){return new ze((t.x+e.x)/2,(t.y+e.y)/2)};WC.serialVersionUID.get=function(){return 0x2d2172135f411c00};Object.defineProperties(Vt,WC);var cm=function(){this.tempEnv1=new Bt,this.tempEnv2=new Bt,this._overlapSeg1=new Vt,this._overlapSeg2=new Vt};cm.prototype.overlap=function(){if(arguments.length!==2&&arguments.length===4){var t=arguments[0],e=arguments[1],n=arguments[2],r=arguments[3];t.getLineSegment(e,this._overlapSeg1),n.getLineSegment(r,this._overlapSeg2),this.overlap(this._overlapSeg1,this._overlapSeg2)}};cm.prototype.interfaces_=function(){return[]};cm.prototype.getClass=function(){return cm};var Bo=function(){this._pts=null,this._start=null,this._end=null,this._env=null,this._context=null,this._id=null;var t=arguments[0],e=arguments[1],n=arguments[2],r=arguments[3];this._pts=t,this._start=e,this._end=n,this._context=r};Bo.prototype.getLineSegment=function(t,e){e.p0=this._pts[t],e.p1=this._pts[t+1]};Bo.prototype.computeSelect=function(t,e,n,r){var i=this._pts[e],s=this._pts[n];if(r.tempEnv1.init(i,s),n-e===1)return r.select(this,e),null;if(!t.intersects(r.tempEnv1))return null;var c=Math.trunc((e+n)/2);e=t.length-1)return t.length-1;for(var r=Xn.quadrant(t[n],t[n+1]),i=e+1;ic.getId()&&(c.computeOverlaps(v,i),r._nOverlaps++),r._segInt.isDone())return null}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},n.SegmentOverlapAction.get=function(){return uS},Object.defineProperties(e,n),e}(hm),uS=function(t){function e(){t.call(this),this._si=null;var n=arguments[0];this._si=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.overlap=function(){if(arguments.length===4){var n=arguments[0],r=arguments[1],i=arguments[2],s=arguments[3],c=n.getContext(),l=i.getContext();this._si.processIntersections(c,r,l,s)}else return t.prototype.overlap.apply(this,arguments)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(cm),Fn=function t(){if(this._quadrantSegments=t.DEFAULT_QUADRANT_SEGMENTS,this._endCapStyle=t.CAP_ROUND,this._joinStyle=t.JOIN_ROUND,this._mitreLimit=t.DEFAULT_MITRE_LIMIT,this._isSingleSided=!1,this._simplifyFactor=t.DEFAULT_SIMPLIFY_FACTOR,arguments.length!==0){if(arguments.length===1){var e=arguments[0];this.setQuadrantSegments(e)}else if(arguments.length===2){var n=arguments[0],r=arguments[1];this.setQuadrantSegments(n),this.setEndCapStyle(r)}else if(arguments.length===4){var i=arguments[0],s=arguments[1],c=arguments[2],l=arguments[3];this.setQuadrantSegments(i),this.setEndCapStyle(s),this.setJoinStyle(c),this.setMitreLimit(l)}}},Ol={CAP_ROUND:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},JOIN_ROUND:{configurable:!0},JOIN_MITRE:{configurable:!0},JOIN_BEVEL:{configurable:!0},DEFAULT_QUADRANT_SEGMENTS:{configurable:!0},DEFAULT_MITRE_LIMIT:{configurable:!0},DEFAULT_SIMPLIFY_FACTOR:{configurable:!0}};Fn.prototype.getEndCapStyle=function(){return this._endCapStyle};Fn.prototype.isSingleSided=function(){return this._isSingleSided};Fn.prototype.setQuadrantSegments=function(t){this._quadrantSegments=t,this._quadrantSegments===0&&(this._joinStyle=Fn.JOIN_BEVEL),this._quadrantSegments<0&&(this._joinStyle=Fn.JOIN_MITRE,this._mitreLimit=Math.abs(this._quadrantSegments)),t<=0&&(this._quadrantSegments=1),this._joinStyle!==Fn.JOIN_ROUND&&(this._quadrantSegments=Fn.DEFAULT_QUADRANT_SEGMENTS)};Fn.prototype.getJoinStyle=function(){return this._joinStyle};Fn.prototype.setJoinStyle=function(t){this._joinStyle=t};Fn.prototype.setSimplifyFactor=function(t){this._simplifyFactor=t<0?0:t};Fn.prototype.getSimplifyFactor=function(){return this._simplifyFactor};Fn.prototype.getQuadrantSegments=function(){return this._quadrantSegments};Fn.prototype.setEndCapStyle=function(t){this._endCapStyle=t};Fn.prototype.getMitreLimit=function(){return this._mitreLimit};Fn.prototype.setMitreLimit=function(t){this._mitreLimit=t};Fn.prototype.setSingleSided=function(t){this._isSingleSided=t};Fn.prototype.interfaces_=function(){return[]};Fn.prototype.getClass=function(){return Fn};Fn.bufferDistanceError=function(t){var e=Math.PI/2/t;return 1-Math.cos(e/2)};Ol.CAP_ROUND.get=function(){return 1};Ol.CAP_FLAT.get=function(){return 2};Ol.CAP_SQUARE.get=function(){return 3};Ol.JOIN_ROUND.get=function(){return 1};Ol.JOIN_MITRE.get=function(){return 2};Ol.JOIN_BEVEL.get=function(){return 3};Ol.DEFAULT_QUADRANT_SEGMENTS.get=function(){return 8};Ol.DEFAULT_MITRE_LIMIT.get=function(){return 5};Ol.DEFAULT_SIMPLIFY_FACTOR.get=function(){return .01};Object.defineProperties(Fn,Ol);var Or=function(t){this._distanceTol=null,this._isDeleted=null,this._angleOrientation=Et.COUNTERCLOCKWISE,this._inputLine=t||null},Lm={INIT:{configurable:!0},DELETE:{configurable:!0},KEEP:{configurable:!0},NUM_PTS_TO_CHECK:{configurable:!0}};Or.prototype.isDeletable=function(t,e,n,r){var i=this._inputLine[t],s=this._inputLine[e],c=this._inputLine[n];return!this.isConcave(i,s,c)||!this.isShallow(i,s,c,r)?!1:this.isShallowSampled(i,s,t,n,r)};Or.prototype.deleteShallowConcavities=function(){for(var t=this,e=1,n=this.findNextNonDeletedIndex(e),r=this.findNextNonDeletedIndex(n),i=!1;r=0;i--)n.addPt(t[i])};os.prototype.isRedundant=function(t){if(this._ptList.size()<1)return!1;var e=this._ptList.get(this._ptList.size()-1),n=t.distance(e);return nMath.PI;)t-=Ln.PI_TIMES_2;for(;t<=-Math.PI;)t+=Ln.PI_TIMES_2;return t};Ln.angle=function(){if(arguments.length===1){var t=arguments[0];return Math.atan2(t.y,t.x)}else if(arguments.length===2){var e=arguments[0],n=arguments[1],r=n.x-e.x,i=n.y-e.y;return Math.atan2(i,r)}};Ln.isAcute=function(t,e,n){var r=t.x-e.x,i=t.y-e.y,s=n.x-e.x,c=n.y-e.y,l=r*s+i*c;return l>0};Ln.isObtuse=function(t,e,n){var r=t.x-e.x,i=t.y-e.y,s=n.x-e.x,c=n.y-e.y,l=r*s+i*c;return l<0};Ln.interiorAngle=function(t,e,n){var r=Ln.angle(e,t),i=Ln.angle(e,n);return Math.abs(i-r)};Ln.normalizePositive=function(t){if(t<0){for(;t<0;)t+=Ln.PI_TIMES_2;t>=Ln.PI_TIMES_2&&(t=0)}else{for(;t>=Ln.PI_TIMES_2;)t-=Ln.PI_TIMES_2;t<0&&(t=0)}return t};Ln.angleBetween=function(t,e,n){var r=Ln.angle(e,t),i=Ln.angle(e,n);return Ln.diff(r,i)};Ln.diff=function(t,e){var n=null;return tMath.PI&&(n=2*Math.PI-n),n};Ln.toRadians=function(t){return t*Math.PI/180};Ln.getTurn=function(t,e){var n=Math.sin(e-t);return n>0?Ln.COUNTERCLOCKWISE:n<0?Ln.CLOCKWISE:Ln.NONE};Ln.angleBetweenOriented=function(t,e,n){var r=Ln.angle(e,t),i=Ln.angle(e,n),s=i-r;return s<=-Math.PI?s+Ln.PI_TIMES_2:s>Math.PI?s-Ln.PI_TIMES_2:s};dh.PI_TIMES_2.get=function(){return 2*Math.PI};dh.PI_OVER_2.get=function(){return Math.PI/2};dh.PI_OVER_4.get=function(){return Math.PI/4};dh.COUNTERCLOCKWISE.get=function(){return Et.COUNTERCLOCKWISE};dh.CLOCKWISE.get=function(){return Et.CLOCKWISE};dh.NONE.get=function(){return Et.COLLINEAR};Object.defineProperties(Ln,dh);var fr=function t(){this._maxCurveSegmentError=0,this._filletAngleQuantum=null,this._closingSegLengthFactor=1,this._segList=null,this._distance=0,this._precisionModel=null,this._bufParams=null,this._li=null,this._s0=null,this._s1=null,this._s2=null,this._seg0=new Vt,this._seg1=new Vt,this._offset0=new Vt,this._offset1=new Vt,this._side=0,this._hasNarrowConcaveAngle=!1;var e=arguments[0],n=arguments[1],r=arguments[2];this._precisionModel=e,this._bufParams=n,this._li=new fc,this._filletAngleQuantum=Math.PI/2/n.getQuadrantSegments(),n.getQuadrantSegments()>=8&&n.getJoinStyle()===Fn.JOIN_ROUND&&(this._closingSegLengthFactor=t.MAX_CLOSING_SEG_LEN_FACTOR),this.init(r)},Pm={OFFSET_SEGMENT_SEPARATION_FACTOR:{configurable:!0},INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},CURVE_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},MAX_CLOSING_SEG_LEN_FACTOR:{configurable:!0}};fr.prototype.addNextSegment=function(t,e){if(this._s0=this._s1,this._s1=this._s2,this._s2=t,this._seg0.setCoordinates(this._s0,this._s1),this.computeOffsetSegment(this._seg0,this._side,this._distance,this._offset0),this._seg1.setCoordinates(this._s1,this._s2),this.computeOffsetSegment(this._seg1,this._side,this._distance,this._offset1),this._s1.equals(this._s2))return null;var n=Et.computeOrientation(this._s0,this._s1,this._s2),r=n===Et.CLOCKWISE&&this._side===lt.LEFT||n===Et.COUNTERCLOCKWISE&&this._side===lt.RIGHT;n===0?this.addCollinear(e):r?this.addOutsideTurn(n,e):this.addInsideTurn(n,e)};fr.prototype.addLineEndCap=function(t,e){var n=new Vt(t,e),r=new Vt;this.computeOffsetSegment(n,lt.LEFT,this._distance,r);var i=new Vt;this.computeOffsetSegment(n,lt.RIGHT,this._distance,i);var s=e.x-t.x,c=e.y-t.y,l=Math.atan2(c,s);switch(this._bufParams.getEndCapStyle()){case Fn.CAP_ROUND:this._segList.addPt(r.p1),this.addFilletArc(e,l+Math.PI/2,l-Math.PI/2,Et.CLOCKWISE,this._distance),this._segList.addPt(i.p1);break;case Fn.CAP_FLAT:this._segList.addPt(r.p1),this._segList.addPt(i.p1);break;case Fn.CAP_SQUARE:var d=new ze;d.x=Math.abs(this._distance)*Math.cos(l),d.y=Math.abs(this._distance)*Math.sin(l);var v=new ze(r.p1.x+d.x,r.p1.y+d.y),S=new ze(i.p1.x+d.x,i.p1.y+d.y);this._segList.addPt(v),this._segList.addPt(S);break}};fr.prototype.getCoordinates=function(){var t=this._segList.getCoordinates();return t};fr.prototype.addMitreJoin=function(t,e,n,r){var i=!0,s=null;try{s=Vs.intersection(e.p0,e.p1,n.p0,n.p1);var c=r<=0?1:s.distance(t)/Math.abs(r);c>this._bufParams.getMitreLimit()&&(i=!1)}catch(l){if(l instanceof pp)s=new ze(0,0),i=!1;else throw l}finally{}i?this._segList.addPt(s):this.addLimitedMitreJoin(e,n,r,this._bufParams.getMitreLimit())};fr.prototype.addFilletCorner=function(t,e,n,r,i){var s=e.x-t.x,c=e.y-t.y,l=Math.atan2(c,s),d=n.x-t.x,v=n.y-t.y,S=Math.atan2(v,d);r===Et.CLOCKWISE?l<=S&&(l+=2*Math.PI):l>=S&&(l-=2*Math.PI),this._segList.addPt(e),this.addFilletArc(t,l,S,r,i),this._segList.addPt(n)};fr.prototype.addOutsideTurn=function(t,e){if(this._offset0.p1.distance(this._offset1.p0)0){var n=new ze((this._closingSegLengthFactor*this._offset0.p1.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset0.p1.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(n);var r=new ze((this._closingSegLengthFactor*this._offset1.p0.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset1.p0.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(r)}else this._segList.addPt(this._s1);this._segList.addPt(this._offset1.p0)}};fr.prototype.createCircle=function(t){var e=new ze(t.x+this._distance,t.y);this._segList.addPt(e),this.addFilletArc(t,0,2*Math.PI,-1,this._distance),this._segList.closeRing()};fr.prototype.addBevelJoin=function(t,e){this._segList.addPt(t.p1),this._segList.addPt(e.p0)};fr.prototype.init=function(t){this._distance=t,this._maxCurveSegmentError=t*(1-Math.cos(this._filletAngleQuantum/2)),this._segList=new os,this._segList.setPrecisionModel(this._precisionModel),this._segList.setMinimumVertexDistance(t*fr.CURVE_VERTEX_SNAP_DISTANCE_FACTOR)};fr.prototype.addCollinear=function(t){this._li.computeIntersection(this._s0,this._s1,this._s1,this._s2);var e=this._li.getIntersectionNum();e>=2&&(this._bufParams.getJoinStyle()===Fn.JOIN_BEVEL||this._bufParams.getJoinStyle()===Fn.JOIN_MITRE?(t&&this._segList.addPt(this._offset0.p1),this._segList.addPt(this._offset1.p0)):this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,Et.CLOCKWISE,this._distance))};fr.prototype.closeRing=function(){this._segList.closeRing()};fr.prototype.hasNarrowConcaveAngle=function(){return this._hasNarrowConcaveAngle};fr.prototype.interfaces_=function(){return[]};fr.prototype.getClass=function(){return fr};Pm.OFFSET_SEGMENT_SEPARATION_FACTOR.get=function(){return .001};Pm.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return .001};Pm.CURVE_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return 1e-6};Pm.MAX_CLOSING_SEG_LEN_FACTOR.get=function(){return 80};Object.defineProperties(fr,Pm);var vo=function(){this._distance=0,this._precisionModel=null,this._bufParams=null;var t=arguments[0],e=arguments[1];this._precisionModel=t,this._bufParams=e};vo.prototype.getOffsetCurve=function(t,e){if(this._distance=e,e===0)return null;var n=e<0,r=Math.abs(e),i=this.getSegGen(r);t.length<=1?this.computePointCurve(t[0],i):this.computeOffsetCurve(t,n,i);var s=i.getCoordinates();return n&&In.reverse(s),s};vo.prototype.computeSingleSidedBufferCurve=function(t,e,n){var r=this.simplifyTolerance(this._distance);if(e){n.addSegments(t,!0);var i=Or.simplify(t,-r),s=i.length-1;n.initSideSegments(i[s],i[s-1],lt.LEFT),n.addFirstSegment();for(var c=s-2;c>=0;c--)n.addNextSegment(i[c],!0)}else{n.addSegments(t,!1);var l=Or.simplify(t,r),d=l.length-1;n.initSideSegments(l[0],l[1],lt.LEFT),n.addFirstSegment();for(var v=2;v<=d;v++)n.addNextSegment(l[v],!0)}n.addLastSegment(),n.closeRing()};vo.prototype.computeRingBufferCurve=function(t,e,n){var r=this.simplifyTolerance(this._distance);e===lt.RIGHT&&(r=-r);var i=Or.simplify(t,r),s=i.length-1;n.initSideSegments(i[s-1],i[0],e);for(var c=1;c<=s;c++){var l=c!==1;n.addNextSegment(i[c],l)}n.closeRing()};vo.prototype.computeLineBufferCurve=function(t,e){var n=this.simplifyTolerance(this._distance),r=Or.simplify(t,n),i=r.length-1;e.initSideSegments(r[0],r[1],lt.LEFT);for(var s=2;s<=i;s++)e.addNextSegment(r[s],!0);e.addLastSegment(),e.addLineEndCap(r[i-1],r[i]);var c=Or.simplify(t,-n),l=c.length-1;e.initSideSegments(c[l],c[l-1],lt.LEFT);for(var d=l-2;d>=0;d--)e.addNextSegment(c[d],!0);e.addLastSegment(),e.addLineEndCap(c[1],c[0]),e.closeRing()};vo.prototype.computePointCurve=function(t,e){switch(this._bufParams.getEndCapStyle()){case Fn.CAP_ROUND:e.createCircle(t);break;case Fn.CAP_SQUARE:e.createSquare(t);break}};vo.prototype.getLineCurve=function(t,e){if(this._distance=e,e<0&&!this._bufParams.isSingleSided()||e===0)return null;var n=Math.abs(e),r=this.getSegGen(n);if(t.length<=1)this.computePointCurve(t[0],r);else if(this._bufParams.isSingleSided()){var i=e<0;this.computeSingleSidedBufferCurve(t,i,r)}else this.computeLineBufferCurve(t,r);var s=r.getCoordinates();return s};vo.prototype.getBufferParameters=function(){return this._bufParams};vo.prototype.simplifyTolerance=function(t){return t*this._bufParams.getSimplifyFactor()};vo.prototype.getRingCurve=function(t,e,n){if(this._distance=n,t.length<=2)return this.getLineCurve(t,n);if(n===0)return vo.copyCoordinates(t);var r=this.getSegGen(n);return this.computeRingBufferCurve(t,e,r),r.getCoordinates()};vo.prototype.computeOffsetCurve=function(t,e,n){var r=this.simplifyTolerance(this._distance);if(e){var i=Or.simplify(t,-r),s=i.length-1;n.initSideSegments(i[s],i[s-1],lt.LEFT),n.addFirstSegment();for(var c=s-2;c>=0;c--)n.addNextSegment(i[c],!0)}else{var l=Or.simplify(t,r),d=l.length-1;n.initSideSegments(l[0],l[1],lt.LEFT),n.addFirstSegment();for(var v=2;v<=d;v++)n.addNextSegment(l[v],!0)}n.addLastSegment()};vo.prototype.getSegGen=function(t){return new fr(this._precisionModel,this._bufParams,t)};vo.prototype.interfaces_=function(){return[]};vo.prototype.getClass=function(){return vo};vo.copyCoordinates=function(t){for(var e=new Array(t.length).fill(null),n=0;ns.getMaxY()||t.findStabbedSegments(e,i.getDirectedEdges(),n)}return n}else if(arguments.length===3){if(Kt(arguments[2],Us)&&arguments[0]instanceof ze&&arguments[1]instanceof e1)for(var c=arguments[0],l=arguments[1],d=arguments[2],v=l.getEdge().getCoordinates(),S=0;St._seg.p1.y&&t._seg.reverse();var E=Math.max(t._seg.p0.x,t._seg.p1.x);if(!(Et._seg.p1.y)&&Et.computeOrientation(t._seg.p0,t._seg.p1,c)!==Et.RIGHT){var C=l.getDepth(lt.LEFT);t._seg.p0.equals(v[S])||(C=l.getDepth(lt.RIGHT));var M=new tc(t._seg,C);d.add(M)}}else if(Kt(arguments[2],Us)&&arguments[0]instanceof ze&&Kt(arguments[1],Us))for(var A=arguments[0],R=arguments[1],z=arguments[2],U=R.iterator();U.hasNext();){var F=U.next();F.isForward()&&t.findStabbedSegments(A,F,z)}}};Qc.prototype.getDepth=function(t){var e=this.findStabbedSegments(t);if(e.size()===0)return 0;var n=Ws.min(e);return n._leftDepth};Qc.prototype.interfaces_=function(){return[]};Qc.prototype.getClass=function(){return Qc};ZC.DepthSegment.get=function(){return tc};Object.defineProperties(Qc,ZC);var tc=function(){this._upwardSeg=null,this._leftDepth=null;var t=arguments[0],e=arguments[1];this._upwardSeg=new Vt(t),this._leftDepth=e};tc.prototype.compareTo=function(t){var e=t;if(this._upwardSeg.minX()>=e._upwardSeg.maxX())return 1;if(this._upwardSeg.maxX()<=e._upwardSeg.minX())return-1;var n=this._upwardSeg.orientationIndex(e._upwardSeg);return n!==0||(n=-1*e._upwardSeg.orientationIndex(this._upwardSeg),n!==0)?n:this._upwardSeg.compareTo(e._upwardSeg)};tc.prototype.compareX=function(t,e){var n=t.p0.compareTo(e.p0);return n!==0?n:t.p1.compareTo(e.p1)};tc.prototype.toString=function(){return this._upwardSeg.toString()};tc.prototype.interfaces_=function(){return[Es]};tc.prototype.getClass=function(){return tc};var Vn=function(t,e,n){this.p0=t||null,this.p1=e||null,this.p2=n||null};Vn.prototype.area=function(){return Vn.area(this.p0,this.p1,this.p2)};Vn.prototype.signedArea=function(){return Vn.signedArea(this.p0,this.p1,this.p2)};Vn.prototype.interpolateZ=function(t){if(t===null)throw new yr("Supplied point is null.");return Vn.interpolateZ(t,this.p0,this.p1,this.p2)};Vn.prototype.longestSideLength=function(){return Vn.longestSideLength(this.p0,this.p1,this.p2)};Vn.prototype.isAcute=function(){return Vn.isAcute(this.p0,this.p1,this.p2)};Vn.prototype.circumcentre=function(){return Vn.circumcentre(this.p0,this.p1,this.p2)};Vn.prototype.area3D=function(){return Vn.area3D(this.p0,this.p1,this.p2)};Vn.prototype.centroid=function(){return Vn.centroid(this.p0,this.p1,this.p2)};Vn.prototype.inCentre=function(){return Vn.inCentre(this.p0,this.p1,this.p2)};Vn.prototype.interfaces_=function(){return[]};Vn.prototype.getClass=function(){return Vn};Vn.area=function(t,e,n){return Math.abs(((n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y))/2)};Vn.signedArea=function(t,e,n){return((n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y))/2};Vn.det=function(t,e,n,r){return t*r-e*n};Vn.interpolateZ=function(t,e,n,r){var i=e.x,s=e.y,c=n.x-i,l=r.x-i,d=n.y-s,v=r.y-s,S=c*v-l*d,E=t.x-i,C=t.y-s,M=(v*E-l*C)/S,A=(-d*E+c*C)/S,R=e.z+M*(n.z-e.z)+A*(r.z-e.z);return R};Vn.longestSideLength=function(t,e,n){var r=t.distance(e),i=e.distance(n),s=n.distance(t),c=r;return i>c&&(c=i),s>c&&(c=s),c};Vn.isAcute=function(t,e,n){return!(!Ln.isAcute(t,e,n)||!Ln.isAcute(e,n,t)||!Ln.isAcute(n,t,e))};Vn.circumcentre=function(t,e,n){var r=n.x,i=n.y,s=t.x-r,c=t.y-i,l=e.x-r,d=e.y-i,v=2*Vn.det(s,c,l,d),S=Vn.det(c,s*s+c*c,d,l*l+d*d),E=Vn.det(s,s*s+c*c,l,l*l+d*d),C=r-S/v,M=i+E/v;return new ze(C,M)};Vn.perpendicularBisector=function(t,e){var n=e.x-t.x,r=e.y-t.y,i=new Vs(t.x+n/2,t.y+r/2,1),s=new Vs(t.x-r+n/2,t.y+n+r/2,1);return new Vs(i,s)};Vn.angleBisector=function(t,e,n){var r=e.distance(t),i=e.distance(n),s=r/(r+i),c=n.x-t.x,l=n.y-t.y,d=new ze(t.x+s*c,t.y+s*l);return d};Vn.area3D=function(t,e,n){var r=e.x-t.x,i=e.y-t.y,s=e.z-t.z,c=n.x-t.x,l=n.y-t.y,d=n.z-t.z,v=i*d-s*l,S=s*c-r*d,E=r*l-i*c,C=v*v+S*S+E*E,M=Math.sqrt(C)/2;return M};Vn.centroid=function(t,e,n){var r=(t.x+e.x+n.x)/3,i=(t.y+e.y+n.y)/3;return new ze(r,i)};Vn.inCentre=function(t,e,n){var r=e.distance(n),i=t.distance(n),s=t.distance(e),c=r+i+s,l=(r*t.x+i*e.x+s*n.x)/c,d=(r*t.y+i*e.y+s*n.y)/c;return new ze(l,d)};var Ss=function(){this._inputGeom=null,this._distance=null,this._curveBuilder=null,this._curveList=new yt;var t=arguments[0],e=arguments[1],n=arguments[2];this._inputGeom=t,this._distance=e,this._curveBuilder=n};Ss.prototype.addPoint=function(t){if(this._distance<=0)return null;var e=t.getCoordinates(),n=this._curveBuilder.getLineCurve(e,this._distance);this.addCurve(n,Fe.EXTERIOR,Fe.INTERIOR)};Ss.prototype.addPolygon=function(t){var e=this,n=this._distance,r=lt.LEFT;this._distance<0&&(n=-this._distance,r=lt.RIGHT);var i=t.getExteriorRing(),s=In.removeRepeatedPoints(i.getCoordinates());if(this._distance<0&&this.isErodedCompletely(i,this._distance)||this._distance<=0&&s.length<3)return null;this.addPolygonRing(s,n,r,Fe.EXTERIOR,Fe.INTERIOR);for(var c=0;c0&&e.isErodedCompletely(l,-e._distance)||e.addPolygonRing(d,n,lt.opposite(r),Fe.INTERIOR,Fe.EXTERIOR)}};Ss.prototype.isTriangleErodedCompletely=function(t,e){var n=new Vn(t[0],t[1],t[2]),r=n.inCentre(),i=Et.distancePointLine(r,n.p0,n.p1);return i=Ha.MINIMUM_VALID_SIZE&&Et.isCCW(t)&&(s=i,c=r,n=lt.opposite(n));var l=this._curveBuilder.getRingCurve(t,n,e);this.addCurve(l,s,c)};Ss.prototype.add=function(t){if(t.isEmpty())return null;t instanceof li?this.addPolygon(t):t instanceof Nr?this.addLineString(t):t instanceof zo?this.addPoint(t):t instanceof Gf?this.addCollection(t):t instanceof Qu?this.addCollection(t):t instanceof Ga?this.addCollection(t):t instanceof io&&this.addCollection(t)};Ss.prototype.isErodedCompletely=function(t,e){var n=t.getCoordinates();if(n.length<4)return e<0;if(n.length===4)return this.isTriangleErodedCompletely(n,e);var r=t.getEnvelopeInternal(),i=Math.min(r.getHeight(),r.getWidth());return e<0&&2*Math.abs(e)>i};Ss.prototype.addCollection=function(t){for(var e=this,n=0;n=this._max)throw new mp;var t=this._parent.getGeometryN(this._index++);return t instanceof io?(this._subcollectionIterator=new qa(t),this._subcollectionIterator.next()):t};qa.prototype.remove=function(){throw new Error(this.getClass().getName())};qa.prototype.hasNext=function(){if(this._atStart)return!0;if(this._subcollectionIterator!==null){if(this._subcollectionIterator.hasNext())return!0;this._subcollectionIterator=null}return!(this._index>=this._max)};qa.prototype.interfaces_=function(){return[dp]};qa.prototype.getClass=function(){return qa};qa.isAtomic=function(t){return!(t instanceof io)};var ts=function(){this._geom=null;var t=arguments[0];this._geom=t};ts.prototype.locate=function(t){return ts.locate(t,this._geom)};ts.prototype.interfaces_=function(){return[Zf]};ts.prototype.getClass=function(){return ts};ts.isPointInRing=function(t,e){return e.getEnvelopeInternal().intersects(t)?Et.isPointInRing(t,e.getCoordinates()):!1};ts.containsPointInPolygon=function(t,e){if(e.isEmpty())return!1;var n=e.getExteriorRing();if(!ts.isPointInRing(t,n))return!1;for(var r=0;r0&&s[s.length-1])&&(v[0]===6||v[0]===2)){n=0;continue}if(v[0]===3&&(!s||v[1]>s[0]&&v[1]e?1:t0){if(e.right===null)break;if(n(t,e.right.key)>0){var l=e.right;if(e.right=l.left,l.left=e,e=l,e.right===null)break}i.right=e,i=e,e=e.right}else break}return i.right=e.left,s.left=e.right,e.left=r.right,e.right=r.left,e}function lv(t,e,n,r){var i=new Qu(t,e);if(n===null)return i.left=i.right=null,i;n=Hu(t,n,r);var s=r(t,n.key);return s<0?(i.left=n.left,i.right=n,n.left=null):s>=0&&(i.right=n.right,i.left=n,n.right=null),i}function $2(t,e,n){var r=null,i=null;if(e){e=Hu(t,e,n);var s=n(e.key,t);s===0?(r=e.left,i=e.right):s<0?(i=e.right,e.right=null,r=e):(r=e.left,e.left=null,i=e)}return{left:r,right:i}}function pO(t,e,n){return e===null?t:(t===null||(e=Hu(t.key,e,n),e.left=t),e)}function Zv(t,e,n,r,i){if(t){r(""+e+(n?"└── ":"├── ")+i(t)+` +`);var s=e+(n?" ":"│ ");t.left&&Zv(t.left,s,!1,r,i),t.right&&Zv(t.right,s,!0,r,i)}}var $1=function(){function t(e){e===void 0&&(e=fO),this._root=null,this._size=0,this._comparator=e}return t.prototype.insert=function(e,n){return this._size++,this._root=lv(e,n,this._root,this._comparator)},t.prototype.add=function(e,n){var r=new Qu(e,n);this._root===null&&(r.left=r.right=null,this._size++,this._root=r);var i=this._comparator,s=Hu(e,this._root,i),c=i(e,s.key);return c===0?this._root=s:(c<0?(r.left=s.left,r.right=s,s.left=null):c>0&&(r.right=s.right,r.left=s,s.right=null),this._size++,this._root=r),this._root},t.prototype.remove=function(e){this._root=this._remove(e,this._root,this._comparator)},t.prototype._remove=function(e,n,r){var i;if(n===null)return null;n=Hu(e,n,r);var s=r(e,n.key);return s===0?(n.left===null?i=n.right:(i=Hu(e,n.left,r),i.right=n.right),this._size--,i):n},t.prototype.pop=function(){var e=this._root;if(e){for(;e.left;)e=e.left;return this._root=Hu(e.key,this._root,this._comparator),this._root=this._remove(e.key,this._root,this._comparator),{key:e.key,data:e.data}}return null},t.prototype.findStatic=function(e){for(var n=this._root,r=this._comparator;n;){var i=r(e,n.key);if(i===0)return n;i<0?n=n.left:n=n.right}return null},t.prototype.find=function(e){return this._root&&(this._root=Hu(e,this._root,this._comparator),this._comparator(e,this._root.key)!==0)?null:this._root},t.prototype.contains=function(e){for(var n=this._root,r=this._comparator;n;){var i=r(e,n.key);if(i===0)return!0;i<0?n=n.left:n=n.right}return!1},t.prototype.forEach=function(e,n){for(var r=this._root,i=[],s=!1;!s;)r!==null?(i.push(r),r=r.left):i.length!==0?(r=i.pop(),e.call(n,r),r=r.right):s=!0;return this},t.prototype.range=function(e,n,r,i){for(var s=[],c=this._comparator,l=this._root,d;s.length!==0||l;)if(l)s.push(l),l=l.left;else{if(l=s.pop(),d=c(l.key,n),d>0)break;if(c(l.key,e)>=0&&r.call(i,l))return this;l=l.right}return this},t.prototype.keys=function(){var e=[];return this.forEach(function(n){var r=n.key;return e.push(r)}),e},t.prototype.values=function(){var e=[];return this.forEach(function(n){var r=n.data;return e.push(r)}),e},t.prototype.min=function(){return this._root?this.minNode(this._root).key:null},t.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},t.prototype.minNode=function(e){if(e===void 0&&(e=this._root),e)for(;e.left;)e=e.left;return e},t.prototype.maxNode=function(e){if(e===void 0&&(e=this._root),e)for(;e.right;)e=e.right;return e},t.prototype.at=function(e){for(var n=this._root,r=!1,i=0,s=[];!r;)if(n)s.push(n),n=n.left;else if(s.length>0){if(n=s.pop(),i===e)return n;i++,n=n.right}else r=!0;return null},t.prototype.next=function(e){var n=this._root,r=null;if(e.right){for(r=e.right;r.left;)r=r.left;return r}for(var i=this._comparator;n;){var s=i(e.key,n.key);if(s===0)break;s<0?(r=n,n=n.left):n=n.right}return r},t.prototype.prev=function(e){var n=this._root,r=null;if(e.left!==null){for(r=e.left;r.right;)r=r.right;return r}for(var i=this._comparator;n;){var s=i(e.key,n.key);if(s===0)break;s<0?n=n.left:(r=n,n=n.right)}return r},t.prototype.clear=function(){return this._root=null,this._size=0,this},t.prototype.toList=function(){return mO(this._root)},t.prototype.load=function(e,n,r){n===void 0&&(n=[]),r===void 0&&(r=!1);var i=e.length,s=this._comparator;if(r&&$v(e,n,0,i-1,s),this._root===null)this._root=Xv(e,n,0,i),this._size=i;else{var c=gO(this.toList(),dO(e,n),s);i=this._size+i,this._root=Yv({head:c},0,i)}return this},t.prototype.isEmpty=function(){return this._root===null},Object.defineProperty(t.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),t.prototype.toString=function(e){e===void 0&&(e=function(r){return String(r.key)});var n=[];return Zv(this._root,"",!0,function(r){return n.push(r)},e),n.join("")},t.prototype.update=function(e,n,r){var i=this._comparator,s=$2(e,this._root,i),c=s.left,l=s.right;i(e,n)<0?l=lv(n,r,l,i):c=lv(n,r,c,i),this._root=pO(c,l,i)},t.prototype.split=function(e){return $2(e,this._root,this._comparator)},t.prototype[Symbol.iterator]=function(){var e,n,r;return hO(this,function(i){switch(i.label){case 0:e=this._root,n=[],r=!1,i.label=1;case 1:return r?[3,6]:e===null?[3,2]:(n.push(e),e=e.left,[3,5]);case 2:return n.length===0?[3,4]:(e=n.pop(),[4,e]);case 3:return i.sent(),e=e.right,[3,5];case 4:r=!0,i.label=5;case 5:return[3,1];case 6:return[2]}})},t}();function Xv(t,e,n,r){var i=r-n;if(i>0){var s=n+Math.floor(i/2),c=t[s],l=e[s],d=new Qu(c,l);return d.left=Xv(t,e,n,s),d.right=Xv(t,e,s+1,r),d}return null}function dO(t,e){for(var n=new Qu(null,null),r=n,i=0;i0?(e=s=s.next=n.pop(),e=e.right):r=!0;return s.next=null,i.next}function Yv(t,e,n){var r=n-e;if(r>0){var i=e+Math.floor(r/2),s=Yv(t,e,i),c=t.head;return c.left=s,t.head=t.head.next,c.right=Yv(t,i+1,n),c}return null}function gO(t,e,n){for(var r=new Qu(null,null),i=r,s=t,c=e;s!==null&&c!==null;)n(s.key,c.key)<0?(i.next=s,s=s.next):(i.next=c,c=c.next),i=i.next;return s!==null?i.next=s:c!==null&&(i.next=c),r.next}function $v(t,e,n,r,i){if(!(n>=r)){for(var s=t[n+r>>1],c=n-1,l=r+1;;){do c++;while(i(t[c],s)<0);do l--;while(i(t[l],s)>0);if(c>=l)break;var d=t[c];t[c]=t[l],t[l]=d,d=e[c],e[c]=e[l],e[l]=d}$v(t,e,n,l,i),$v(t,e,l+1,r,i)}}function La(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function K2(t,e){for(var n=0;nn.x?1:e.yn.y?1:0}}]);function t(e,n){La(this,t),e.events===void 0?e.events=[this]:e.events.push(this),this.point=e,this.isLeft=n}return ns(t,[{key:"link",value:function(e){if(e.point===this.point)throw new Error("Tried to link already linked events");for(var n=e.point.events,r=0,i=n.length;r=0&&E>=0?vC?-1:0:d<0&&E<0?vC?1:0:Ed?1:0}}}]),t}(),wO=0,N_=function(){ns(t,null,[{key:"compare",value:function(e,n){var r=e.leftSE.point.x,i=n.leftSE.point.x,s=e.rightSE.point.x,c=n.rightSE.point.x;if(cl&&d>v)return-1;var E=e.comparePoint(n.leftSE.point);if(E<0)return 1;if(E>0)return-1;var C=n.comparePoint(e.rightSE.point);return C!==0?C:-1}if(r>i){if(ld&&l>S)return 1;var M=n.comparePoint(e.leftSE.point);if(M!==0)return M;var A=e.comparePoint(n.rightSE.point);return A<0?1:A>0?-1:1}if(ld)return 1;if(sc){var z=e.comparePoint(n.rightSE.point);if(z<0)return 1;if(z>0)return-1}if(s!==c){var U=v-l,F=s-r,G=S-d,H=c-i;if(U>F&&GH)return-1}return s>c?1:sS?1:e.idn.id?1:0}}]);function t(e,n,r,i){La(this,t),this.id=++wO,this.leftSE=e,e.segment=this,e.otherSE=n,this.rightSE=n,n.segment=this,n.otherSE=e,this.rings=r,this.windings=i}return ns(t,[{key:"replaceRightSE",value:function(e){this.rightSE=e,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}},{key:"bbox",value:function(){var e=this.leftSE.point.y,n=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:en?e:n}}}},{key:"vector",value:function(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}},{key:"isAnEndpoint",value:function(e){return e.x===this.leftSE.point.x&&e.y===this.leftSE.point.y||e.x===this.rightSE.point.x&&e.y===this.rightSE.point.y}},{key:"comparePoint",value:function(e){if(this.isAnEndpoint(e))return 0;var n=this.leftSE.point,r=this.rightSE.point,i=this.vector();if(n.x===r.x)return e.x===n.x?0:e.x0&&l.swapEvents(),_l.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),r&&(i.checkForConsuming(),s.checkForConsuming()),n}},{key:"swapEvents",value:function(){var e=this.rightSE;this.rightSE=this.leftSE,this.leftSE=e,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(var n=0,r=this.windings.length;n0){var s=n;n=r,r=s}if(n.prev===r){var c=n;n=r,r=c}for(var l=0,d=r.rings.length;l0)i=n,s=e,c=-1;else throw new Error("Tried to create degenerate segment at [".concat(e.x,", ").concat(e.y,"]"));var d=new _l(i,!0),v=new _l(s,!1);return new t(d,v,[r],[c])}}]),t}(),nS=function(){function t(e,n,r){if(La(this,t),!Array.isArray(e)||e.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=n,this.isExterior=r,this.segments=[],typeof e[0][0]!="number"||typeof e[0][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var i=tm.round(e[0][0],e[0][1]);this.bbox={ll:{x:i.x,y:i.y},ur:{x:i.x,y:i.y}};for(var s=i,c=1,l=e.length;cthis.bbox.ur.x&&(this.bbox.ur.x=d.x),d.y>this.bbox.ur.y&&(this.bbox.ur.y=d.y),s=d)}(i.x!==s.x||i.y!==s.y)&&this.segments.push(N_.fromRing(s,i,this))}return ns(t,[{key:"getSweepEvents",value:function(){for(var e=[],n=0,r=this.segments.length;nthis.bbox.ur.x&&(this.bbox.ur.x=s.bbox.ur.x),s.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=s.bbox.ur.y),this.interiorRings.push(s)}this.multiPoly=n}return ns(t,[{key:"getSweepEvents",value:function(){for(var e=this.exteriorRing.getSweepEvents(),n=0,r=this.interiorRings.length;nthis.bbox.ur.x&&(this.bbox.ur.x=s.bbox.ur.x),s.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=s.bbox.ur.y),this.polys.push(s)}this.isSubject=n}return ns(t,[{key:"getSweepEvents",value:function(){for(var e=[],n=0,r=this.polys.length;n0&&(e=i)}for(var s=e.segment.prevInResult(),c=s?s.prevInResult():null;;){if(!s)return null;if(!c)return s.ringOut;if(c.ringOut!==s.ringOut)return c.ringOut.enclosingRing()!==s.ringOut?s.ringOut:s.ringOut.enclosingRing();s=c.prevInResult(),c=s?s.prevInResult():null}}}]),t}(),iS=function(){function t(e){La(this,t),this.exteriorRing=e,e.poly=this,this.interiorRings=[]}return ns(t,[{key:"addInterior",value:function(e){this.interiorRings.push(e),e.poly=this}},{key:"getGeom",value:function(){var e=[this.exteriorRing.getGeom()];if(e[0]===null)return null;for(var n=0,r=this.interiorRings.length;n1&&arguments[1]!==void 0?arguments[1]:N_.compare;La(this,t),this.queue=e,this.tree=new $1(n),this.segments=[]}return ns(t,[{key:"process",value:function(e){var n=e.segment,r=[];if(e.consumedBy)return e.isLeft?this.queue.remove(e.otherSE):this.tree.remove(n),r;var i=e.isLeft?this.tree.insert(n):this.tree.find(n);if(!i)throw new Error("Unable to find segment #".concat(n.id," ")+"[".concat(n.leftSE.point.x,", ").concat(n.leftSE.point.y,"] -> ")+"[".concat(n.rightSE.point.x,", ").concat(n.rightSE.point.y,"] ")+"in SweepLine tree. Please submit a bug report.");for(var s=i,c=i,l=void 0,d=void 0;l===void 0;)s=this.tree.prev(s),s===null?l=null:s.key.consumedBy===void 0&&(l=s.key);for(;d===void 0;)c=this.tree.next(c),c===null?d=null:c.key.consumedBy===void 0&&(d=c.key);if(e.isLeft){var v=null;if(l){var S=l.getIntersection(n);if(S!==null&&(n.isAnEndpoint(S)||(v=S),!l.isAnEndpoint(S)))for(var E=this._splitSafely(l,S),C=0,M=E.length;C0?(this.tree.remove(n),r.push(e)):(this.segments.push(n),n.prev=l)}else{if(l&&d){var pe=l.getIntersection(d);if(pe!==null){if(!l.isAnEndpoint(pe))for(var se=this._splitSafely(l,pe),Ae=0,Y=se.length;AeoS)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big). Please file a bug report.");for(var H=new CO(A),te=A.size,ee=A.pop();ee;){var fe=ee.key;if(A.size===te){var pe=fe.segment;throw new Error("Unable to pop() ".concat(fe.isLeft?"left":"right"," SweepEvent ")+"[".concat(fe.point.x,", ").concat(fe.point.y,"] from segment #").concat(pe.id," ")+"[".concat(pe.leftSE.point.x,", ").concat(pe.leftSE.point.y,"] -> ")+"[".concat(pe.rightSE.point.x,", ").concat(pe.rightSE.point.y,"] from queue. ")+"Please file a bug report.")}if(A.size>oS)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big). Please file a bug report.");if(H.segments.length>TO)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments). Please file a bug report.");for(var se=H.process(fe),Ae=0,Y=se.length;Ae1?e-1:0),r=1;r1?e-1:0),r=1;r1?e-1:0),r=1;r1?e-1:0),r=1;rn[0]&&(e[0]=n[0]),e[1]>n[1]&&(e[1]=n[1]),e[2]e.x?1:this.ye.y?1:0};ze.prototype.clone=function(){};ze.prototype.copy=function(){return new ze(this)};ze.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"};ze.prototype.distance3D=function(t){var e=this.x-t.x,n=this.y-t.y,r=this.z-t.z;return Math.sqrt(e*e+n*n+r*r)};ze.prototype.distance=function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)};ze.prototype.hashCode=function(){var t=17;return t=37*t+ze.hashCode(this.x),t=37*t+ze.hashCode(this.y),t};ze.prototype.setCoordinate=function(t){this.x=t.x,this.y=t.y,this.z=t.z};ze.prototype.interfaces_=function(){return[Es,dy,Is]};ze.prototype.getClass=function(){return ze};ze.hashCode=function(){if(arguments.length===1){var t=arguments[0],e=nn.doubleToLongBits(t);return Math.trunc((e^e)>>>32)}};ch.DimensionalComparator.get=function(){return ou};ch.serialVersionUID.get=function(){return 6683108902428367e3};ch.NULL_ORDINATE.get=function(){return nn.NaN};ch.X.get=function(){return 0};ch.Y.get=function(){return 1};ch.Z.get=function(){return 2};Object.defineProperties(ze,ch);var ou=function(t){if(this._dimensionsToTest=2,arguments.length!==0&&arguments.length===1){var e=arguments[0];if(e!==2&&e!==3)throw new yr("only 2 or 3 dimensions may be specified");this._dimensionsToTest=e}};ou.prototype.compare=function(t,e){var n=t,r=e,i=ou.compare(n.x,r.x);if(i!==0)return i;var s=ou.compare(n.y,r.y);if(s!==0)return s;if(this._dimensionsToTest<=2)return 0;var c=ou.compare(n.z,r.z);return c};ou.prototype.interfaces_=function(){return[Of]};ou.prototype.getClass=function(){return ou};ou.compare=function(t,e){return te?1:nn.isNaN(t)?nn.isNaN(e)?0:-1:nn.isNaN(e)?1:0};var zf=function(){};zf.prototype.create=function(){};zf.prototype.interfaces_=function(){return[]};zf.prototype.getClass=function(){return zf};var Fe=function(){},Sm={INTERIOR:{configurable:!0},BOUNDARY:{configurable:!0},EXTERIOR:{configurable:!0},NONE:{configurable:!0}};Fe.prototype.interfaces_=function(){return[]};Fe.prototype.getClass=function(){return Fe};Fe.toLocationSymbol=function(t){switch(t){case Fe.EXTERIOR:return"e";case Fe.BOUNDARY:return"b";case Fe.INTERIOR:return"i";case Fe.NONE:return"-"}throw new yr("Unknown location value: "+t)};Sm.INTERIOR.get=function(){return 0};Sm.BOUNDARY.get=function(){return 1};Sm.EXTERIOR.get=function(){return 2};Sm.NONE.get=function(){return-1};Object.defineProperties(Fe,Sm);var Kt=function(t,e){return t.interfaces_&&t.interfaces_().indexOf(e)>-1},rs=function(){},OC={LOG_10:{configurable:!0}};rs.prototype.interfaces_=function(){return[]};rs.prototype.getClass=function(){return rs};rs.log10=function(t){var e=Math.log(t);return nn.isInfinite(e)||nn.isNaN(e)?e:e/rs.LOG_10};rs.min=function(t,e,n,r){var i=t;return en?n:t}else if(Number.isInteger(arguments[2])&&Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var r=arguments[0],i=arguments[1],s=arguments[2];return rs?s:r}};rs.wrap=function(t,e){return t<0?e- -t%e:t%e};rs.max=function(){if(arguments.length===3){var t=arguments[0],e=arguments[1],n=arguments[2],r=t;return e>r&&(r=e),n>r&&(r=n),r}else if(arguments.length===4){var i=arguments[0],s=arguments[1],c=arguments[2],l=arguments[3],d=i;return s>d&&(d=s),c>d&&(d=c),l>d&&(d=l),d}};rs.average=function(t,e){return(t+e)/2};OC.LOG_10.get=function(){return Math.log(10)};Object.defineProperties(rs,OC);var Pa=function(t){this.str=t};Pa.prototype.append=function(t){this.str+=t};Pa.prototype.setCharAt=function(t,e){this.str=this.str.substr(0,t)+e+this.str.substr(t+1)};Pa.prototype.toString=function(t){return this.str};var _a=function(t){this.value=t};_a.prototype.intValue=function(){return this.value};_a.prototype.compareTo=function(t){return this.valuet?1:0};_a.isNaN=function(t){return Number.isNaN(t)};var nm=function(){};nm.isWhitespace=function(t){return t<=32&&t>=0||t===127};nm.toUpperCase=function(t){return t.toUpperCase()};var Xe=function t(){if(this._hi=0,this._lo=0,arguments.length===0)this.init(0);else if(arguments.length===1){if(typeof arguments[0]=="number"){var e=arguments[0];this.init(e)}else if(arguments[0]instanceof t){var n=arguments[0];this.init(n)}else if(typeof arguments[0]=="string"){var r=arguments[0];t.call(this,t.parse(r))}}else if(arguments.length===2){var i=arguments[0],s=arguments[1];this.init(i,s)}},Ys={PI:{configurable:!0},TWO_PI:{configurable:!0},PI_2:{configurable:!0},E:{configurable:!0},NaN:{configurable:!0},EPS:{configurable:!0},SPLIT:{configurable:!0},MAX_PRINT_DIGITS:{configurable:!0},TEN:{configurable:!0},ONE:{configurable:!0},SCI_NOT_EXPONENT_CHAR:{configurable:!0},SCI_NOT_ZERO:{configurable:!0}};Xe.prototype.le=function(t){return(this._hi9?(S=!0,E="9"):E="0"+v,c.append(E),n=n.subtract(Xe.valueOf(v)).multiply(Xe.TEN),S&&n.selfAdd(Xe.TEN);var C=!0,M=Xe.magnitude(n._hi);if(M<0&&Math.abs(M)>=l-d&&(C=!1),!C)break}return e[0]=r,c.toString()};Xe.prototype.sqr=function(){return this.multiply(this)};Xe.prototype.doubleValue=function(){return this._hi+this._lo};Xe.prototype.subtract=function(){if(arguments[0]instanceof Xe){var t=arguments[0];return this.add(t.negate())}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.add(-e)}};Xe.prototype.equals=function(){if(arguments.length===1){var t=arguments[0];return this._hi===t._hi&&this._lo===t._lo}};Xe.prototype.isZero=function(){return this._hi===0&&this._lo===0};Xe.prototype.selfSubtract=function(){if(arguments[0]instanceof Xe){var t=arguments[0];return this.isNaN()?this:this.selfAdd(-t._hi,-t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.isNaN()?this:this.selfAdd(-e,0)}};Xe.prototype.getSpecialNumberString=function(){return this.isZero()?"0.0":this.isNaN()?"NaN ":null};Xe.prototype.min=function(t){return this.le(t)?this:t};Xe.prototype.selfDivide=function(){if(arguments.length===1){if(arguments[0]instanceof Xe){var t=arguments[0];return this.selfDivide(t._hi,t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.selfDivide(e,0)}}else if(arguments.length===2){var n=arguments[0],r=arguments[1],i=null,s=null,c=null,l=null,d=null,v=null,S=null,E=null;return d=this._hi/n,v=Xe.SPLIT*d,i=v-d,E=Xe.SPLIT*n,i=v-i,s=d-i,c=E-n,S=d*n,c=E-c,l=n-c,E=i*c-S+i*l+s*c+s*l,v=(this._hi-S-E+this._lo-d*r)/n,E=d+v,this._hi=E,this._lo=d-E+v,this}};Xe.prototype.dump=function(){return"DD<"+this._hi+", "+this._lo+">"};Xe.prototype.divide=function(){if(arguments[0]instanceof Xe){var t=arguments[0],e=null,n=null,r=null,i=null,s=null,c=null,l=null,d=null;s=this._hi/t._hi,c=Xe.SPLIT*s,e=c-s,d=Xe.SPLIT*t._hi,e=c-e,n=s-e,r=d-t._hi,l=s*t._hi,r=d-r,i=t._hi-r,d=e*r-l+e*i+n*r+n*i,c=(this._hi-l-d+this._lo-s*t._lo)/t._hi,d=s+c;var v=d,S=s-d+c;return new Xe(v,S)}else if(typeof arguments[0]=="number"){var E=arguments[0];return nn.isNaN(E)?Xe.createNaN():Xe.copy(this).selfDivide(E,0)}};Xe.prototype.ge=function(t){return(this._hi>t._hi||this._hi===t._hi)&&this._lo>=t._lo};Xe.prototype.pow=function(t){if(t===0)return Xe.valueOf(1);var e=new Xe(this),n=Xe.valueOf(1),r=Math.abs(t);if(r>1)for(;r>0;)r%2===1&&n.selfMultiply(e),r/=2,r>0&&(e=e.sqr());else n=e;return t<0?n.reciprocal():n};Xe.prototype.ceil=function(){if(this.isNaN())return Xe.NaN;var t=Math.ceil(this._hi),e=0;return t===this._hi&&(e=Math.ceil(this._lo)),new Xe(t,e)};Xe.prototype.compareTo=function(t){var e=t;return this._hie._hi?1:this._loe._lo?1:0};Xe.prototype.rint=function(){if(this.isNaN())return this;var t=this.add(.5);return t.floor()};Xe.prototype.setValue=function(){if(arguments[0]instanceof Xe){var t=arguments[0];return this.init(t),this}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.init(e),this}};Xe.prototype.max=function(t){return this.ge(t)?this:t};Xe.prototype.sqrt=function(){if(this.isZero())return Xe.valueOf(0);if(this.isNegative())return Xe.NaN;var t=1/Math.sqrt(this._hi),e=this._hi*t,n=Xe.valueOf(e),r=this.subtract(n.sqr()),i=r._hi*(t*.5);return n.add(i)};Xe.prototype.selfAdd=function(){if(arguments.length===1){if(arguments[0]instanceof Xe){var t=arguments[0];return this.selfAdd(t._hi,t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0],n=null,r=null,i=null,s=null,c=null,l=null;return i=this._hi+e,c=i-this._hi,s=i-c,s=e-c+(this._hi-s),l=s+this._lo,n=i+l,r=l+(i-n),this._hi=n+r,this._lo=r+(n-this._hi),this}}else if(arguments.length===2){var d=arguments[0],v=arguments[1],S=null,E=null,C=null,M=null,A=null,R=null,z=null,U=null;A=this._hi+d,C=this._lo+v,z=A-this._hi,U=C-this._lo,R=A-z,M=C-U,R=d-z+(this._hi-R),M=v-U+(this._lo-M),z=R+C,S=A+z,E=z+(A-S),z=M+E;var F=S+z,G=z+(S-F);return this._hi=F,this._lo=G,this}};Xe.prototype.selfMultiply=function(){if(arguments.length===1){if(arguments[0]instanceof Xe){var t=arguments[0];return this.selfMultiply(t._hi,t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.selfMultiply(e,0)}}else if(arguments.length===2){var n=arguments[0],r=arguments[1],i=null,s=null,c=null,l=null,d=null,v=null;d=Xe.SPLIT*this._hi,i=d-this._hi,v=Xe.SPLIT*n,i=d-i,s=this._hi-i,c=v-n,d=this._hi*n,c=v-c,l=n-c,v=i*c-d+i*l+s*c+s*l+(this._hi*r+this._lo*n);var S=d+v;i=d-S;var E=v+i;return this._hi=S,this._lo=E,this}};Xe.prototype.selfSqr=function(){return this.selfMultiply(this)};Xe.prototype.floor=function(){if(this.isNaN())return Xe.NaN;var t=Math.floor(this._hi),e=0;return t===this._hi&&(e=Math.floor(this._lo)),new Xe(t,e)};Xe.prototype.negate=function(){return this.isNaN()?this:new Xe(-this._hi,-this._lo)};Xe.prototype.clone=function(){};Xe.prototype.multiply=function(){if(arguments[0]instanceof Xe){var t=arguments[0];return t.isNaN()?Xe.createNaN():Xe.copy(this).selfMultiply(t)}else if(typeof arguments[0]=="number"){var e=arguments[0];return nn.isNaN(e)?Xe.createNaN():Xe.copy(this).selfMultiply(e,0)}};Xe.prototype.isNaN=function(){return nn.isNaN(this._hi)};Xe.prototype.intValue=function(){return Math.trunc(this._hi)};Xe.prototype.toString=function(){var t=Xe.magnitude(this._hi);return t>=-3&&t<=20?this.toStandardNotation():this.toSciNotation()};Xe.prototype.toStandardNotation=function(){var t=this.getSpecialNumberString();if(t!==null)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!0,e),r=e[0]+1,i=n;if(n.charAt(0)===".")i="0"+n;else if(r<0)i="0."+Xe.stringOfChar("0",-r)+n;else if(n.indexOf(".")===-1){var s=r-n.length,c=Xe.stringOfChar("0",s);i=n+c+".0"}return this.isNegative()?"-"+i:i};Xe.prototype.reciprocal=function(){var t=null,e=null,n=null,r=null,i=null,s=null,c=null,l=null;i=1/this._hi,s=Xe.SPLIT*i,t=s-i,l=Xe.SPLIT*this._hi,t=s-t,e=i-t,n=l-this._hi,c=i*this._hi,n=l-n,r=this._hi-n,l=t*n-c+t*r+e*n+e*r,s=(1-c-l-i*this._lo)/this._hi;var d=i+s,v=i-d+s;return new Xe(d,v)};Xe.prototype.toSciNotation=function(){if(this.isZero())return Xe.SCI_NOT_ZERO;var t=this.getSpecialNumberString();if(t!==null)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!1,e),r=Xe.SCI_NOT_EXPONENT_CHAR+e[0];if(n.charAt(0)==="0")throw new Error("Found leading zero: "+n);var i="";n.length>1&&(i=n.substring(1));var s=n.charAt(0)+"."+i;return this.isNegative()?"-"+s+r:s+r};Xe.prototype.abs=function(){return this.isNaN()?Xe.NaN:this.isNegative()?this.negate():new Xe(this)};Xe.prototype.isPositive=function(){return(this._hi>0||this._hi===0)&&this._lo>0};Xe.prototype.lt=function(t){return(this._hit._hi||this._hi===t._hi)&&this._lo>t._lo};Xe.prototype.isNegative=function(){return(this._hi<0||this._hi===0)&&this._lo<0};Xe.prototype.trunc=function(){return this.isNaN()?Xe.NaN:this.isPositive()?this.floor():this.ceil()};Xe.prototype.signum=function(){return this._hi>0?1:this._hi<0?-1:this._lo>0?1:this._lo<0?-1:0};Xe.prototype.interfaces_=function(){return[Is,Es,dy]};Xe.prototype.getClass=function(){return Xe};Xe.sqr=function(t){return Xe.valueOf(t).selfMultiply(t)};Xe.valueOf=function(){if(typeof arguments[0]=="string"){var t=arguments[0];return Xe.parse(t)}else if(typeof arguments[0]=="number"){var e=arguments[0];return new Xe(e)}};Xe.sqrt=function(t){return Xe.valueOf(t).sqrt()};Xe.parse=function(t){for(var e=0,n=t.length;nm.isWhitespace(t.charAt(e));)e++;var r=!1;if(e=n);){var v=t.charAt(e);if(e++,nm.isDigit(v)){var S=v-"0";s.selfMultiply(Xe.TEN),s.selfAdd(S),c++;continue}if(v==="."){l=c;continue}if(v==="e"||v==="E"){var E=t.substring(e);try{d=_a.parseInt(E)}catch(z){throw z instanceof Error?new Error("Invalid exponent "+E+" in string "+t):z}finally{}break}throw new Error("Unexpected character '"+v+"' at position "+e+" in string "+t)}var C=s,M=c-l-d;if(M===0)C=s;else if(M>0){var A=Xe.TEN.pow(M);C=s.divide(A)}else if(M<0){var R=Xe.TEN.pow(-M);C=s.multiply(R)}return r?C.negate():C};Xe.createNaN=function(){return new Xe(nn.NaN,nn.NaN)};Xe.copy=function(t){return new Xe(t)};Xe.magnitude=function(t){var e=Math.abs(t),n=Math.log(e)/Math.log(10),r=Math.trunc(Math.floor(n)),i=Math.pow(10,r);return i*10<=e&&(r+=1),r};Xe.stringOfChar=function(t,e){for(var n=new Pa,r=0;r0){if(s<=0)return yo.signum(c);r=i+s}else if(i<0){if(s>=0)return yo.signum(c);r=-i-s}else return yo.signum(c);var l=yo.DP_SAFE_EPSILON*r;return c>=l||-c>=l?yo.signum(c):2};yo.signum=function(t){return t>0?1:t<0?-1:0};zC.DP_SAFE_EPSILON.get=function(){return 1e-15};Object.defineProperties(yo,zC);var Rn=function(){},Em={X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0},M:{configurable:!0}};Em.X.get=function(){return 0};Em.Y.get=function(){return 1};Em.Z.get=function(){return 2};Em.M.get=function(){return 3};Rn.prototype.setOrdinate=function(t,e,n){};Rn.prototype.size=function(){};Rn.prototype.getOrdinate=function(t,e){};Rn.prototype.getCoordinate=function(){};Rn.prototype.getCoordinateCopy=function(t){};Rn.prototype.getDimension=function(){};Rn.prototype.getX=function(t){};Rn.prototype.clone=function(){};Rn.prototype.expandEnvelope=function(t){};Rn.prototype.copy=function(){};Rn.prototype.getY=function(t){};Rn.prototype.toCoordinateArray=function(){};Rn.prototype.interfaces_=function(){return[dy]};Rn.prototype.getClass=function(){return Rn};Object.defineProperties(Rn,Em);var FC=function(){},pp=function(t){function e(){t.call(this,"Projective point not representable on the Cartesian plane.")}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(FC),Ri=function(){};Ri.arraycopy=function(t,e,n,r,i){for(var s=0,c=e;ct._minx?this._minx:t._minx,n=this._miny>t._miny?this._miny:t._miny,r=this._maxx=this._minx&&e.getMaxX()<=this._maxx&&e.getMinY()>=this._miny&&e.getMaxY()<=this._maxy}}else if(arguments.length===2){var n=arguments[0],r=arguments[1];return this.isNull()?!1:n>=this._minx&&n<=this._maxx&&r>=this._miny&&r<=this._maxy}};Bt.prototype.intersects=function(){if(arguments.length===1){if(arguments[0]instanceof Bt){var t=arguments[0];return this.isNull()||t.isNull()?!1:!(t._minx>this._maxx||t._maxxthis._maxy||t._maxythis._maxx||nthis._maxy||rthis._maxx&&(this._maxx=e._maxx),e._minythis._maxy&&(this._maxy=e._maxy))}}else if(arguments.length===2){var n=arguments[0],r=arguments[1];this.isNull()?(this._minx=n,this._maxx=n,this._miny=r,this._maxy=r):(nthis._maxx&&(this._maxx=n),rthis._maxy&&(this._maxy=r))}};Bt.prototype.minExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return te._minx?1:this._minye._miny?1:this._maxxe._maxx?1:this._maxye._maxy?1:0};Bt.prototype.translate=function(t,e){if(this.isNull())return null;this.init(this.getMinX()+t,this.getMaxX()+t,this.getMinY()+e,this.getMaxY()+e)};Bt.prototype.toString=function(){return"Env["+this._minx+" : "+this._maxx+", "+this._miny+" : "+this._maxy+"]"};Bt.prototype.setToNull=function(){this._minx=0,this._maxx=-1,this._miny=0,this._maxy=-1};Bt.prototype.getHeight=function(){return this.isNull()?0:this._maxy-this._miny};Bt.prototype.maxExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t>e?t:e};Bt.prototype.expandBy=function(){if(arguments.length===1){var t=arguments[0];this.expandBy(t,t)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];if(this.isNull())return null;this._minx-=e,this._maxx+=e,this._miny-=n,this._maxy+=n,(this._minx>this._maxx||this._miny>this._maxy)&&this.setToNull()}};Bt.prototype.contains=function(){if(arguments.length===1){if(arguments[0]instanceof Bt){var t=arguments[0];return this.covers(t)}else if(arguments[0]instanceof ze){var e=arguments[0];return this.covers(e)}}else if(arguments.length===2){var n=arguments[0],r=arguments[1];return this.covers(n,r)}};Bt.prototype.centre=function(){return this.isNull()?null:new ze((this.getMinX()+this.getMaxX())/2,(this.getMinY()+this.getMaxY())/2)};Bt.prototype.init=function(){if(arguments.length===0)this.setToNull();else if(arguments.length===1){if(arguments[0]instanceof ze){var t=arguments[0];this.init(t.x,t.x,t.y,t.y)}else if(arguments[0]instanceof Bt){var e=arguments[0];this._minx=e._minx,this._maxx=e._maxx,this._miny=e._miny,this._maxy=e._maxy}}else if(arguments.length===2){var n=arguments[0],r=arguments[1];this.init(n.x,r.x,n.y,r.y)}else if(arguments.length===4){var i=arguments[0],s=arguments[1],c=arguments[2],l=arguments[3];it._maxx&&(e=this._minx-t._maxx);var n=0;return this._maxyt._maxy&&(n=this._miny-t._maxy),e===0?n:n===0?e:Math.sqrt(e*e+n*n)};Bt.prototype.hashCode=function(){var t=17;return t=37*t+ze.hashCode(this._minx),t=37*t+ze.hashCode(this._maxx),t=37*t+ze.hashCode(this._miny),t=37*t+ze.hashCode(this._maxy),t};Bt.prototype.interfaces_=function(){return[Es,Is]};Bt.prototype.getClass=function(){return Bt};Bt.intersects=function(){if(arguments.length===3){var t=arguments[0],e=arguments[1],n=arguments[2];return n.x>=(t.xe.x?t.x:e.x)&&n.y>=(t.ye.y?t.y:e.y)}else if(arguments.length===4){var r=arguments[0],i=arguments[1],s=arguments[2],c=arguments[3],l=Math.min(s.x,c.x),d=Math.max(s.x,c.x),v=Math.min(r.x,i.x),S=Math.max(r.x,i.x);return!(v>d||Sd)||Sn?(this._intLineIndex[t][0]=0,this._intLineIndex[t][1]=1):(this._intLineIndex[t][0]=1,this._intLineIndex[t][1]=0)}};Tr.prototype.isProper=function(){return this.hasIntersection()&&this._isProper};Tr.prototype.setPrecisionModel=function(t){this._precisionModel=t};Tr.prototype.isInteriorIntersection=function(){var t=this;if(arguments.length===0)return!!(this.isInteriorIntersection(0)||this.isInteriorIntersection(1));if(arguments.length===1){for(var e=arguments[0],n=0;ni?s=r:s=i;else{var c=Math.abs(t.x-e.x),l=Math.abs(t.y-e.y);r>i?s=c:s=l,s===0&&!t.equals(e)&&(s=Math.max(c,l))}return hn.isTrue(!(s===0&&!t.equals(e)),"Bad distance calculation"),s};Tr.nonRobustComputeEdgeDistance=function(t,e,n){var r=t.x-e.x,i=t.y-e.y,s=Math.sqrt(r*r+i*i);return hn.isTrue(!(s===0&&!t.equals(e)),"Invalid distance calculation"),s};hh.DONT_INTERSECT.get=function(){return 0};hh.DO_INTERSECT.get=function(){return 1};hh.COLLINEAR.get=function(){return 2};hh.NO_INTERSECTION.get=function(){return 0};hh.POINT_INTERSECTION.get=function(){return 1};hh.COLLINEAR_INTERSECTION.get=function(){return 2};Object.defineProperties(Tr,hh);var pc=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isInSegmentEnvelopes=function(n){var r=new Bt(this._inputLines[0][0],this._inputLines[0][1]),i=new Bt(this._inputLines[1][0],this._inputLines[1][1]);return r.contains(n)&&i.contains(n)},e.prototype.computeIntersection=function(){if(arguments.length===3){var n=arguments[0],r=arguments[1],i=arguments[2];if(this._isProper=!1,Bt.intersects(r,i,n)&&Et.orientationIndex(r,i,n)===0&&Et.orientationIndex(i,r,n)===0)return this._isProper=!0,(n.equals(r)||n.equals(i))&&(this._isProper=!1),this._result=t.POINT_INTERSECTION,null;this._result=t.NO_INTERSECTION}else return t.prototype.computeIntersection.apply(this,arguments)},e.prototype.normalizeToMinimum=function(n,r,i,s,c){c.x=this.smallestInAbsValue(n.x,r.x,i.x,s.x),c.y=this.smallestInAbsValue(n.y,r.y,i.y,s.y),n.x-=c.x,n.y-=c.y,r.x-=c.x,r.y-=c.y,i.x-=c.x,i.y-=c.y,s.x-=c.x,s.y-=c.y},e.prototype.safeHCoordinateIntersection=function(n,r,i,s){var c=null;try{c=Vs.intersection(n,r,i,s)}catch(l){if(l instanceof pp)c=e.nearestEndpoint(n,r,i,s);else throw l}finally{}return c},e.prototype.intersection=function(n,r,i,s){var c=this.intersectionWithNormalization(n,r,i,s);return this.isInSegmentEnvelopes(c)||(c=new ze(e.nearestEndpoint(n,r,i,s))),this._precisionModel!==null&&this._precisionModel.makePrecise(c),c},e.prototype.smallestInAbsValue=function(n,r,i,s){var c=n,l=Math.abs(c);return Math.abs(r)1e-4&&Ri.out.println("Distance = "+c.distance(l))},e.prototype.intersectionWithNormalization=function(n,r,i,s){var c=new ze(n),l=new ze(r),d=new ze(i),v=new ze(s),S=new ze;this.normalizeToEnvCentre(c,l,d,v,S);var E=this.safeHCoordinateIntersection(c,l,d,v);return E.x+=S.x,E.y+=S.y,E},e.prototype.computeCollinearIntersection=function(n,r,i,s){var c=Bt.intersects(n,r,i),l=Bt.intersects(n,r,s),d=Bt.intersects(i,s,n),v=Bt.intersects(i,s,r);return c&&l?(this._intPt[0]=i,this._intPt[1]=s,t.COLLINEAR_INTERSECTION):d&&v?(this._intPt[0]=n,this._intPt[1]=r,t.COLLINEAR_INTERSECTION):c&&d?(this._intPt[0]=i,this._intPt[1]=n,i.equals(n)&&!l&&!v?t.POINT_INTERSECTION:t.COLLINEAR_INTERSECTION):c&&v?(this._intPt[0]=i,this._intPt[1]=r,i.equals(r)&&!l&&!d?t.POINT_INTERSECTION:t.COLLINEAR_INTERSECTION):l&&d?(this._intPt[0]=s,this._intPt[1]=n,s.equals(n)&&!c&&!v?t.POINT_INTERSECTION:t.COLLINEAR_INTERSECTION):l&&v?(this._intPt[0]=s,this._intPt[1]=r,s.equals(r)&&!c&&!d?t.POINT_INTERSECTION:t.COLLINEAR_INTERSECTION):t.NO_INTERSECTION},e.prototype.normalizeToEnvCentre=function(n,r,i,s,c){var l=n.xr.x?n.x:r.x,S=n.y>r.y?n.y:r.y,E=i.xs.x?i.x:s.x,A=i.y>s.y?i.y:s.y,R=l>E?l:E,z=vC?d:C,F=S0&&l>0||c<0&&l<0)return t.NO_INTERSECTION;var d=Et.orientationIndex(i,s,n),v=Et.orientationIndex(i,s,r);if(d>0&&v>0||d<0&&v<0)return t.NO_INTERSECTION;var S=c===0&&l===0&&d===0&&v===0;return S?this.computeCollinearIntersection(n,r,i,s):(c===0||l===0||d===0||v===0?(this._isProper=!1,n.equals2D(i)||n.equals2D(s)?this._intPt[0]=n:r.equals2D(i)||r.equals2D(s)?this._intPt[0]=r:c===0?this._intPt[0]=new ze(i):l===0?this._intPt[0]=new ze(s):d===0?this._intPt[0]=new ze(n):v===0&&(this._intPt[0]=new ze(r))):(this._isProper=!0,this._intPt[0]=this.intersection(n,r,i,s)),t.POINT_INTERSECTION)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.nearestEndpoint=function(n,r,i,s){var c=n,l=Et.distancePointLine(n,i,s),d=Et.distancePointLine(r,i,s);return d0?n>0?-i:i:n>0?i:-i;if(e===0||n===0)return r>0?t>0?i:-i:t>0?-i:i;if(e>0?r>0?e<=r||(i=-i,s=t,t=n,n=s,s=e,e=r,r=s):e<=-r?(i=-i,n=-n,r=-r):(s=t,t=-n,n=s,s=e,e=-r,r=s):r>0?-e<=r?(i=-i,t=-t,e=-e):(s=-t,t=n,n=s,s=-e,e=r,r=s):e>=r?(t=-t,e=-e,n=-n,r=-r):(i=-i,s=-t,t=-n,n=s,s=-e,e=-r,r=s),t>0)if(n>0){if(!(t<=n))return i}else return i;else{if(n>0)return-i;if(t>=n)i=-i,t=-t,n=-n;else return-i}for(;;){if(c=Math.floor(n/t),n=n-c*t,r=r-c*e,r<0)return-i;if(r>e)return i;if(t>n+n){if(er+r)return-i;n=t-n,r=e-r,i=-i}if(r===0)return n===0?0:-i;if(n===0||(c=Math.floor(t/n),t=t-c*n,e=e-c*r,e<0))return i;if(e>r)return-i;if(n>t+t){if(re+e)return i;t=n-t,e=r-e,i=-i}if(e===0)return t===0?0:i;if(t===0)return-i}};var da=function(){this._p=null,this._crossingCount=0,this._isPointOnSegment=!1;var t=arguments[0];this._p=t};da.prototype.countSegment=function(t,e){if(t.xr&&(n=e.x,r=t.x),this._p.x>=n&&this._p.x<=r&&(this._isPointOnSegment=!0),null}if(t.y>this._p.y&&e.y<=this._p.y||e.y>this._p.y&&t.y<=this._p.y){var i=t.x-this._p.x,s=t.y-this._p.y,c=e.x-this._p.x,l=e.y-this._p.y,d=$c.signOfDet2x2(i,s,c,l);if(d===0)return this._isPointOnSegment=!0,null;l0&&this._crossingCount++}};da.prototype.isPointInPolygon=function(){return this.getLocation()!==Fe.EXTERIOR};da.prototype.getLocation=function(){return this._isPointOnSegment?Fe.BOUNDARY:this._crossingCount%2===1?Fe.INTERIOR:Fe.EXTERIOR};da.prototype.isOnSegment=function(){return this._isPointOnSegment};da.prototype.interfaces_=function(){return[]};da.prototype.getClass=function(){return da};da.locatePointInRing=function(){if(arguments[0]instanceof ze&&Kt(arguments[1],Rn)){for(var t=arguments[0],e=arguments[1],n=new da(t),r=new ze,i=new ze,s=1;s1||d<0||d>1)&&(i=!0)}}return i?rs.min(Et.distancePointLine(t,n,r),Et.distancePointLine(e,n,r),Et.distancePointLine(n,t,e),Et.distancePointLine(r,t,e)):0};Et.isPointInRing=function(t,e){return Et.locatePointInRing(t,e)!==Fe.EXTERIOR};Et.computeLength=function(t){var e=t.size();if(e<=1)return 0;var n=0,r=new ze;t.getCoordinate(0,r);for(var i=r.x,s=r.y,c=1;cn.y&&(n=s,r=i)}var c=r;do c=c-1,c<0&&(c=e);while(t[c].equals2D(n)&&c!==r);var l=r;do l=(l+1)%e;while(t[l].equals2D(n)&&l!==r);var d=t[c],v=t[l];if(d.equals2D(n)||v.equals2D(n)||d.equals2D(v))return!1;var S=Et.computeOrientation(d,n,v),E=!1;return S===0?E=d.x>v.x:E=S>0,E};Et.locatePointInRing=function(t,e){return da.locatePointInRing(t,e)};Et.distancePointLinePerpendicular=function(t,e,n){var r=(n.x-e.x)*(n.x-e.x)+(n.y-e.y)*(n.y-e.y),i=((e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y))/r;return Math.abs(i)*Math.sqrt(r)};Et.computeOrientation=function(t,e,n){return Et.orientationIndex(t,e,n)};Et.distancePointLine=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];if(e.length===0)throw new yr("Line array must contain at least one vertex");for(var n=t.distance(e[0]),r=0;r=1)return s.distance(l);var S=((c.y-s.y)*(l.x-c.x)-(c.x-s.x)*(l.y-c.y))/d;return Math.abs(S)*Math.sqrt(d)}};Et.isOnLine=function(t,e){for(var n=new pc,r=1;r0};Bf.prototype.interfaces_=function(){return[xs]};Bf.prototype.getClass=function(){return Bf};var Vf=function(){};Vf.prototype.isInBoundary=function(t){return t>1};Vf.prototype.interfaces_=function(){return[xs]};Vf.prototype.getClass=function(){return Vf};var Uf=function(){};Uf.prototype.isInBoundary=function(t){return t===1};Uf.prototype.interfaces_=function(){return[xs]};Uf.prototype.getClass=function(){return Uf};var ni=function(){};ni.prototype.add=function(){};ni.prototype.addAll=function(){};ni.prototype.isEmpty=function(){};ni.prototype.iterator=function(){};ni.prototype.size=function(){};ni.prototype.toArray=function(){};ni.prototype.remove=function(){};function J1(t){this.message=t||""}J1.prototype=new Error;J1.prototype.name="IndexOutOfBoundsException";var dp=function(){};dp.prototype.hasNext=function(){};dp.prototype.next=function(){};dp.prototype.remove=function(){};var Us=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(){},e.prototype.set=function(){},e.prototype.isEmpty=function(){},e}(ni);function mp(t){this.message=t||""}mp.prototype=new Error;mp.prototype.name="NoSuchElementException";var yt=function(t){function e(){t.call(this),this.array_=[],arguments[0]instanceof ni&&this.addAll(arguments[0])}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.ensureCapacity=function(){},e.prototype.interfaces_=function(){return[t,ni]},e.prototype.add=function(n){return arguments.length===1?this.array_.push(n):this.array_.splice(arguments[0],arguments[1]),!0},e.prototype.clear=function(){this.array_=[]},e.prototype.addAll=function(n){for(var r=this,i=n.iterator();i.hasNext();)r.add(i.next());return!0},e.prototype.set=function(n,r){var i=this.array_[n];return this.array_[n]=r,i},e.prototype.iterator=function(){return new FO(this)},e.prototype.get=function(n){if(n<0||n>=this.size())throw new J1;return this.array_[n]},e.prototype.isEmpty=function(){return this.array_.length===0},e.prototype.size=function(){return this.array_.length},e.prototype.toArray=function(){for(var n=this,r=[],i=0,s=this.array_.length;i=1){var v=this.get(this.size()-1);if(v.equals2D(l))return null}t.prototype.add.call(this,l)}else if(arguments[0]instanceof Object&&typeof arguments[1]=="boolean"){var S=arguments[0],E=arguments[1];return this.add(S,E),!0}}else if(arguments.length===3){if(typeof arguments[2]=="boolean"&&arguments[0]instanceof Array&&typeof arguments[1]=="boolean"){var C=arguments[0],M=arguments[1],A=arguments[2];if(A)for(var R=0;R=0;z--)r.add(C[z],M);return!0}else if(typeof arguments[2]=="boolean"&&Number.isInteger(arguments[0])&&arguments[1]instanceof ze){var U=arguments[0],F=arguments[1],G=arguments[2];if(!G){var H=this.size();if(H>0){if(U>0){var te=this.get(U-1);if(te.equals2D(F))return null}if(UAe&&(Y=-1);for(var ae=se;ae!==Ae;ae+=Y)r.add(fe[ae],pe);return!0}},e.prototype.closeRing=function(){this.size()>0&&this.add(new ze(this.get(0)),!1)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},Object.defineProperties(e,n),e}(yt),In=function(){},gy={ForwardComparator:{configurable:!0},BidirectionalComparator:{configurable:!0},coordArrayType:{configurable:!0}};gy.ForwardComparator.get=function(){return rm};gy.BidirectionalComparator.get=function(){return jf};gy.coordArrayType.get=function(){return new Array(0).fill(null)};In.prototype.interfaces_=function(){return[]};In.prototype.getClass=function(){return In};In.isRing=function(t){return!(t.length<4||!t[0].equals2D(t[t.length-1]))};In.ptNotInList=function(t,e){for(var n=0;n=t?e:[]};In.indexOf=function(t,e){for(var n=0;n0)&&(e=t[n]);return e};In.extract=function(t,e,n){e=rs.clamp(e,0,t.length),n=rs.clamp(n,-1,t.length);var r=n-e+1;n<0&&(r=0),e>=t.length&&(r=0),nr.length)return 1;if(n.length===0)return 0;var i=In.compare(n,r),s=In.isEqualReversed(n,r);return s?0:i};jf.prototype.OLDcompare=function(t,e){var n=t,r=e;if(n.lengthr.length)return 1;if(n.length===0)return 0;for(var i=In.increasingDirection(n),s=In.increasingDirection(r),c=i>0?0:n.length-1,l=s>0?0:n.length-1,d=0;d0)e=e.right;else return e.value}return null};Gi.prototype.put=function(t,e){if(this.root_===null)return this.root_={key:t,value:e,left:null,right:null,parent:null,color:yl,getValue:function(){return this.value},getKey:function(){return this.key}},this.size_=1,null;var n=this.root_,r,i;do if(r=n,i=t.compareTo(n.key),i<0)n=n.left;else if(i>0)n=n.right;else{var s=n.value;return n.value=e,s}while(n!==null);var c={key:t,left:null,right:null,value:e,parent:r,color:yl,getValue:function(){return this.value},getKey:function(){return this.key}};return i<0?r.left=c:r.right=c,this.fixAfterInsertion(c),this.size_++,null};Gi.prototype.fixAfterInsertion=function(t){var e=this;for(t.color=ju;t!=null&&t!==this.root_&&t.parent.color===ju;)if(nr(t)===uv(nr(nr(t)))){var n=uS(nr(nr(t)));lS(n)===ju?(dl(nr(t),yl),dl(n,yl),dl(nr(nr(t)),ju),t=nr(nr(t))):(t===uS(nr(t))&&(t=nr(t),e.rotateLeft(t)),dl(nr(t),yl),dl(nr(nr(t)),ju),e.rotateRight(nr(nr(t))))}else{var r=uv(nr(nr(t)));lS(r)===ju?(dl(nr(t),yl),dl(r,yl),dl(nr(nr(t)),ju),t=nr(nr(t))):(t===uv(nr(t))&&(t=nr(t),e.rotateRight(t)),dl(nr(t),yl),dl(nr(nr(t)),ju),e.rotateLeft(nr(nr(t))))}this.root_.color=yl};Gi.prototype.values=function(){var t=new yt,e=this.getFirstEntry();if(e!==null)for(t.add(e.value);(e=Gi.successor(e))!==null;)t.add(e.value);return t};Gi.prototype.entrySet=function(){var t=new Q1,e=this.getFirstEntry();if(e!==null)for(t.add(e);(e=Gi.successor(e))!==null;)t.add(e);return t};Gi.prototype.rotateLeft=function(t){if(t!=null){var e=t.right;t.right=e.left,e.left!=null&&(e.left.parent=t),e.parent=t.parent,t.parent===null?this.root_=e:t.parent.left===t?t.parent.left=e:t.parent.right=e,e.left=t,t.parent=e}};Gi.prototype.rotateRight=function(t){if(t!=null){var e=t.left;t.left=e.right,e.right!=null&&(e.right.parent=t),e.parent=t.parent,t.parent===null?this.root_=e:t.parent.right===t?t.parent.right=e:t.parent.left=e,e.right=t,t.parent=e}};Gi.prototype.getFirstEntry=function(){var t=this.root_;if(t!=null)for(;t.left!=null;)t=t.left;return t};Gi.successor=function(t){if(t===null)return null;if(t.right!==null){for(var e=t.right;e.left!==null;)e=e.left;return e}else{for(var n=t.parent,r=t;n!==null&&r===n.right;)r=n,n=n.parent;return n}};Gi.prototype.size=function(){return this.size_};var im=function(){};im.prototype.interfaces_=function(){return[]};im.prototype.getClass=function(){return im};function VC(){}VC.prototype=new _y;function ya(){this.array_=[],arguments[0]instanceof ni&&this.addAll(arguments[0])}ya.prototype=new VC;ya.prototype.contains=function(t){for(var e=this,n=0,r=this.array_.length;n=0;){var c=i.substring(0,s);r.add(c),i=i.substring(s+n),s=i.indexOf(e)}i.length>0&&r.add(i);for(var l=new Array(r.size()).fill(null),d=0;d0)for(var s=i;s0&&r.append(" ");for(var s=0;s0&&r.append(","),r.append(ys.toString(t.getOrdinate(i,s)))}return r.append(")"),r.toString()}};qr.ensureValidRing=function(t,e){var n=e.size();if(n===0)return e;if(n<=3)return qr.createClosedRing(t,e,4);var r=e.getOrdinate(0,Rn.X)===e.getOrdinate(n-1,Rn.X)&&e.getOrdinate(0,Rn.Y)===e.getOrdinate(n-1,Rn.Y);return r?e:qr.createClosedRing(t,e,n+1)};qr.createClosedRing=function(t,e,n){var r=t.create(n,e.getDimension()),i=e.size();qr.copy(e,0,r,0,i);for(var s=i;s0&&qr.reverse(r._points),null}},e.prototype.getCoordinate=function(){return this.isEmpty()?null:this._points.getCoordinate(0)},e.prototype.getBoundaryDimension=function(){return this.isClosed()?zn.FALSE:0},e.prototype.isClosed=function(){return this.isEmpty()?!1:this.getCoordinateN(0).equals2D(this.getCoordinateN(this.getNumPoints()-1))},e.prototype.getEndPoint=function(){return this.isEmpty()?null:this.getPointN(this.getNumPoints()-1)},e.prototype.getDimension=function(){return 1},e.prototype.getLength=function(){return Et.computeLength(this._points)},e.prototype.getNumPoints=function(){return this._points.size()},e.prototype.reverse=function(){var r=this._points.copy();qr.reverse(r);var i=this.getFactory().createLineString(r);return i},e.prototype.compareToSameClass=function(){var r=this;if(arguments.length===1){for(var i=arguments[0],s=i,c=0,l=0;c= 2)");this._points=r},e.prototype.isCoordinate=function(r){for(var i=this,s=0;s=1&&this.getCoordinateSequence().size()= 4)")},e.prototype.getGeometryType=function(){return"LinearRing"},e.prototype.copy=function(){return new e(this._points.copy(),this._factory)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},n.MINIMUM_VALID_SIZE.get=function(){return 4},n.serialVersionUID.get=function(){return-0x3b229e262367a600},Object.defineProperties(e,n),e}(Nr),Ga=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return $t.SORTINDEX_MULTIPOLYGON},e.prototype.equalsExact=function(){if(arguments.length===2){var r=arguments[0],i=arguments[1];return this.isEquivalentClass(r)?t.prototype.equalsExact.call(this,r,i):!1}else return t.prototype.equalsExact.apply(this,arguments)},e.prototype.getBoundaryDimension=function(){return 1},e.prototype.getDimension=function(){return 2},e.prototype.reverse=function(){for(var r=this,i=this._geometries.length,s=new Array(i).fill(null),c=0;c0?e.createPoint(n[0]):e.createPoint():t};am.prototype.interfaces_=function(){return[ws.GeometryEditorOperation]};am.prototype.getClass=function(){return am};var lm=function(){};lm.prototype.edit=function(t,e){return t instanceof Ha?e.createLinearRing(this.edit(t.getCoordinateSequence(),t)):t instanceof Nr?e.createLineString(this.edit(t.getCoordinateSequence(),t)):t instanceof Fo?e.createPoint(this.edit(t.getCoordinateSequence(),t)):t};lm.prototype.interfaces_=function(){return[ws.GeometryEditorOperation]};lm.prototype.getClass=function(){return lm};var jr=function(){var t=this;if(this._dimension=3,this._coordinates=null,arguments.length===1){if(arguments[0]instanceof Array)this._coordinates=arguments[0],this._dimension=3;else if(Number.isInteger(arguments[0])){var e=arguments[0];this._coordinates=new Array(e).fill(null);for(var n=0;n0){var e=new Pa(17*this._coordinates.length);e.append("("),e.append(this._coordinates[0]);for(var n=1;n3&&(r=3),r<2?new jr(n):new jr(n,r)}};Za.prototype.interfaces_=function(){return[zf,Is]};Za.prototype.getClass=function(){return Za};Za.instance=function(){return Za.instanceObject};tb.serialVersionUID.get=function(){return-0x38e49fa6cf6f2e00};tb.instanceObject.get=function(){return new Za};Object.defineProperties(Za,tb);var jC=function(t){function e(){t.call(this),this.map_=new Map}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(n){return this.map_.get(n)||null},e.prototype.put=function(n,r){return this.map_.set(n,r),r},e.prototype.values=function(){for(var n=new yt,r=this.map_.values(),i=r.next();!i.done;)n.add(i.value),i=r.next();return n},e.prototype.entrySet=function(){var n=new Q1;return this.map_.entries().forEach(function(r){return n.add(r)}),n},e.prototype.size=function(){return this.map_.size()},e}(ph),Bn=function t(){if(this._modelType=null,this._scale=null,arguments.length===0)this._modelType=t.FLOATING;else if(arguments.length===1){if(arguments[0]instanceof ba){var e=arguments[0];this._modelType=e,e===t.FIXED&&this.setScale(1)}else if(typeof arguments[0]=="number"){var n=arguments[0];this._modelType=t.FIXED,this.setScale(n)}else if(arguments[0]instanceof t){var r=arguments[0];this._modelType=r._modelType,this._scale=r._scale}}},nb={serialVersionUID:{configurable:!0},maximumPreciseValue:{configurable:!0}};Bn.prototype.equals=function(t){if(!(t instanceof Bn))return!1;var e=t;return this._modelType===e._modelType&&this._scale===e._scale};Bn.prototype.compareTo=function(t){var e=t,n=this.getMaximumSignificantDigits(),r=e.getMaximumSignificantDigits();return new _a(n).compareTo(new _a(r))};Bn.prototype.getScale=function(){return this._scale};Bn.prototype.isFloating=function(){return this._modelType===Bn.FLOATING||this._modelType===Bn.FLOATING_SINGLE};Bn.prototype.getType=function(){return this._modelType};Bn.prototype.toString=function(){var t="UNKNOWN";return this._modelType===Bn.FLOATING?t="Floating":this._modelType===Bn.FLOATING_SINGLE?t="Floating-Single":this._modelType===Bn.FIXED&&(t="Fixed (Scale="+this.getScale()+")"),t};Bn.prototype.makePrecise=function(){if(typeof arguments[0]=="number"){var t=arguments[0];if(nn.isNaN(t))return t;if(this._modelType===Bn.FLOATING_SINGLE){var e=t;return e}return this._modelType===Bn.FIXED?Math.round(t*this._scale)/this._scale:t}else if(arguments[0]instanceof ze){var n=arguments[0];if(this._modelType===Bn.FLOATING)return null;n.x=this.makePrecise(n.x),n.y=this.makePrecise(n.y)}};Bn.prototype.getMaximumSignificantDigits=function(){var t=16;return this._modelType===Bn.FLOATING?t=16:this._modelType===Bn.FLOATING_SINGLE?t=6:this._modelType===Bn.FIXED&&(t=1+Math.trunc(Math.ceil(Math.log(this.getScale())/Math.log(10)))),t};Bn.prototype.setScale=function(t){this._scale=Math.abs(t)};Bn.prototype.interfaces_=function(){return[Is,Es]};Bn.prototype.getClass=function(){return Bn};Bn.mostPrecise=function(t,e){return t.compareTo(e)>=0?t:e};nb.serialVersionUID.get=function(){return 7777263578777804e3};nb.maximumPreciseValue.get=function(){return 9007199254740992};Object.defineProperties(Bn,nb);var ba=function t(e){this._name=e||null,t.nameToTypeMap.put(e,this)},rb={serialVersionUID:{configurable:!0},nameToTypeMap:{configurable:!0}};ba.prototype.readResolve=function(){return ba.nameToTypeMap.get(this._name)};ba.prototype.toString=function(){return this._name};ba.prototype.interfaces_=function(){return[Is]};ba.prototype.getClass=function(){return ba};rb.serialVersionUID.get=function(){return-552860263173159e4};rb.nameToTypeMap.get=function(){return new jC};Object.defineProperties(ba,rb);Bn.Type=ba;Bn.FIXED=new ba("FIXED");Bn.FLOATING=new ba("FLOATING");Bn.FLOATING_SINGLE=new ba("FLOATING SINGLE");var En=function t(){this._precisionModel=new Bn,this._SRID=0,this._coordinateSequenceFactory=t.getDefaultCoordinateSequenceFactory(),arguments.length===0||(arguments.length===1?Kt(arguments[0],zf)?this._coordinateSequenceFactory=arguments[0]:arguments[0]instanceof Bn&&(this._precisionModel=arguments[0]):arguments.length===2?(this._precisionModel=arguments[0],this._SRID=arguments[1]):arguments.length===3&&(this._precisionModel=arguments[0],this._SRID=arguments[1],this._coordinateSequenceFactory=arguments[2]))},GC={serialVersionUID:{configurable:!0}};En.prototype.toGeometry=function(t){return t.isNull()?this.createPoint(null):t.getMinX()===t.getMaxX()&&t.getMinY()===t.getMaxY()?this.createPoint(new ze(t.getMinX(),t.getMinY())):t.getMinX()===t.getMaxX()||t.getMinY()===t.getMaxY()?this.createLineString([new ze(t.getMinX(),t.getMinY()),new ze(t.getMaxX(),t.getMaxY())]):this.createPolygon(this.createLinearRing([new ze(t.getMinX(),t.getMinY()),new ze(t.getMinX(),t.getMaxY()),new ze(t.getMaxX(),t.getMaxY()),new ze(t.getMaxX(),t.getMinY()),new ze(t.getMinX(),t.getMinY())]),null)};En.prototype.createLineString=function(t){if(t){if(t instanceof Array)return new Nr(this.getCoordinateSequenceFactory().create(t),this);if(Kt(t,Rn))return new Nr(t,this)}else return new Nr(this.getCoordinateSequenceFactory().create([]),this)};En.prototype.createMultiLineString=function(){if(arguments.length===0)return new ec(null,this);if(arguments.length===1){var t=arguments[0];return new ec(t,this)}};En.prototype.buildGeometry=function(t){for(var e=null,n=!1,r=!1,i=t.iterator();i.hasNext();){var s=i.next(),c=s.getClass();e===null&&(e=c),c!==e&&(n=!0),s.isGeometryCollectionOrDerived()&&(r=!0)}if(e===null)return this.createGeometryCollection();if(n||r)return this.createGeometryCollection(En.toGeometryArray(t));var l=t.iterator().next(),d=t.size()>1;if(d){if(l instanceof li)return this.createMultiPolygon(En.toPolygonArray(t));if(l instanceof Nr)return this.createMultiLineString(En.toLineStringArray(t));if(l instanceof Fo)return this.createMultiPoint(En.toPointArray(t));hn.shouldNeverReachHere("Unhandled class: "+l.getClass().getName())}return l};En.prototype.createMultiPointFromCoords=function(t){return this.createMultiPoint(t!==null?this.getCoordinateSequenceFactory().create(t):null)};En.prototype.createPoint=function(){if(arguments.length===0)return this.createPoint(this.getCoordinateSequenceFactory().create([]));if(arguments.length===1){if(arguments[0]instanceof ze){var t=arguments[0];return this.createPoint(t!==null?this.getCoordinateSequenceFactory().create([t]):null)}else if(Kt(arguments[0],Rn)){var e=arguments[0];return new Fo(e,this)}}};En.prototype.getCoordinateSequenceFactory=function(){return this._coordinateSequenceFactory};En.prototype.createPolygon=function(){if(arguments.length===0)return new li(null,null,this);if(arguments.length===1){if(Kt(arguments[0],Rn)){var t=arguments[0];return this.createPolygon(this.createLinearRing(t))}else if(arguments[0]instanceof Array){var e=arguments[0];return this.createPolygon(this.createLinearRing(e))}else if(arguments[0]instanceof Ha){var n=arguments[0];return this.createPolygon(n,null)}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];return new li(r,i,this)}};En.prototype.getSRID=function(){return this._SRID};En.prototype.createGeometryCollection=function(){if(arguments.length===0)return new io(null,this);if(arguments.length===1){var t=arguments[0];return new io(t,this)}};En.prototype.createGeometry=function(t){var e=new ws(this);return e.edit(t,{edit:function(){if(arguments.length===2){var n=arguments[0];return this._coordinateSequenceFactory.create(n)}}})};En.prototype.getPrecisionModel=function(){return this._precisionModel};En.prototype.createLinearRing=function(){if(arguments.length===0)return this.createLinearRing(this.getCoordinateSequenceFactory().create([]));if(arguments.length===1){if(arguments[0]instanceof Array){var t=arguments[0];return this.createLinearRing(t!==null?this.getCoordinateSequenceFactory().create(t):null)}else if(Kt(arguments[0],Rn)){var e=arguments[0];return new Ha(e,this)}}};En.prototype.createMultiPolygon=function(){if(arguments.length===0)return new Ga(null,this);if(arguments.length===1){var t=arguments[0];return new Ga(t,this)}};En.prototype.createMultiPoint=function(){var t=this;if(arguments.length===0)return new Gf(null,this);if(arguments.length===1){if(arguments[0]instanceof Array){var e=arguments[0];return new Gf(e,this)}else if(arguments[0]instanceof Array){var n=arguments[0];return this.createMultiPoint(n!==null?this.getCoordinateSequenceFactory().create(n):null)}else if(Kt(arguments[0],Rn)){var r=arguments[0];if(r===null)return this.createMultiPoint(new Array(0).fill(null));for(var i=new Array(r.size()).fill(null),s=0;s=this.size())throw new Error;return this.array_[t]};Ma.prototype.push=function(t){return this.array_.push(t),t};Ma.prototype.pop=function(t){if(this.array_.length===0)throw new wy;return this.array_.pop()};Ma.prototype.peek=function(){if(this.array_.length===0)throw new wy;return this.array_[this.array_.length-1]};Ma.prototype.empty=function(){return this.array_.length===0};Ma.prototype.isEmpty=function(){return this.empty()};Ma.prototype.search=function(t){return this.array_.indexOf(t)};Ma.prototype.size=function(){return this.array_.length};Ma.prototype.toArray=function(){for(var t=this,e=[],n=0,r=this.array_.length;n0&&this._minIndexthis._minCoord.y&&n.y>this._minCoord.y&&r===Et.CLOCKWISE)&&(i=!0),i&&(this._minIndex=this._minIndex-1)};xa.prototype.getRightmostSideOfSegment=function(t,e){var n=t.getEdge(),r=n.getCoordinates();if(e<0||e+1>=r.length||r[e].y===r[e+1].y)return-1;var i=lt.LEFT;return r[e].ye._minCoord.x)&&(e._minDe=t,e._minIndex=r,e._minCoord=n[r])};xa.prototype.findRightmostEdgeAtNode=function(){var t=this._minDe.getNode(),e=t.getEdges();this._minDe=e.getRightmostEdge(),this._minDe.isForward()||(this._minDe=this._minDe.getSym(),this._minIndex=this._minDe.getEdge().getCoordinates().length-1)};xa.prototype.findEdge=function(t){for(var e=this,n=t.iterator();n.hasNext();){var r=n.next();r.isForward()&&e.checkForRightmostCoordinate(r)}hn.isTrue(this._minIndex!==0||this._minCoord.equals(this._minDe.getCoordinate()),"inconsistency in rightmost processing"),this._minIndex===0?this.findRightmostEdgeAtNode():this.findRightmostEdgeAtVertex(),this._orientedDe=this._minDe;var i=this.getRightmostSide(this._minDe,this._minIndex);i===lt.LEFT&&(this._orientedDe=this._minDe.getSym())};xa.prototype.interfaces_=function(){return[]};xa.prototype.getClass=function(){return xa};var Pl=function(t){function e(n,r){t.call(this,e.msgWithCoord(n,r)),this.pt=r?new ze(r):null,this.name="TopologyException"}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getCoordinate=function(){return this.pt},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.msgWithCoord=function(n,r){return r?n:n+" [ "+r+" ]"},e}(Tl),Sy=function(){this.array_=[]};Sy.prototype.addLast=function(t){this.array_.push(t)};Sy.prototype.removeFirst=function(){return this.array_.shift()};Sy.prototype.isEmpty=function(){return this.array_.length===0};var oo=function(){this._finder=null,this._dirEdgeList=new yt,this._nodes=new yt,this._rightMostCoord=null,this._env=null,this._finder=new xa};oo.prototype.clearVisitedEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();){var e=t.next();e.setVisited(!1)}};oo.prototype.getRightmostCoordinate=function(){return this._rightMostCoord};oo.prototype.computeNodeDepth=function(t){for(var e=this,n=null,r=t.getEdges().iterator();r.hasNext();){var i=r.next();if(i.isVisited()||i.getSym().isVisited()){n=i;break}}if(n===null)throw new Pl("unable to find edge to compute depths at "+t.getCoordinate());t.getEdges().computeDepths(n);for(var s=t.getEdges().iterator();s.hasNext();){var c=s.next();c.setVisited(!0),e.copySymDepths(c)}};oo.prototype.computeDepth=function(t){this.clearVisitedEdges();var e=this._finder.getEdge();e.setEdgeDepths(lt.RIGHT,t),this.copySymDepths(e),this.computeDepths(e)};oo.prototype.create=function(t){this.addReachable(t),this._finder.findEdge(this._dirEdgeList),this._rightMostCoord=this._finder.getCoordinate()};oo.prototype.findResultEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();){var e=t.next();e.getDepth(lt.RIGHT)>=1&&e.getDepth(lt.LEFT)<=0&&!e.isInteriorAreaEdge()&&e.setInResult(!0)}};oo.prototype.computeDepths=function(t){var e=this,n=new Q1,r=new Sy,i=t.getNode();for(r.addLast(i),n.add(i),t.setVisited(!0);!r.isEmpty();){var s=r.removeFirst();n.add(s),e.computeNodeDepth(s);for(var c=s.getEdges().iterator();c.hasNext();){var l=c.next(),d=l.getSym();if(!d.isVisited()){var v=d.getNode();n.contains(v)||(r.addLast(v),n.add(v))}}}};oo.prototype.compareTo=function(t){var e=t;return this._rightMostCoord.xe._rightMostCoord.x?1:0};oo.prototype.getEnvelope=function(){if(this._env===null){for(var t=new Bt,e=this._dirEdgeList.iterator();e.hasNext();)for(var n=e.next(),r=n.getEdge().getCoordinates(),i=0;ithis.location.length){var n=new Array(3).fill(null);n[lt.ON]=this.location[lt.ON],n[lt.LEFT]=Fe.NONE,n[lt.RIGHT]=Fe.NONE,this.location=n}for(var r=0;r1&&t.append(Fe.toLocationSymbol(this.location[lt.LEFT])),t.append(Fe.toLocationSymbol(this.location[lt.ON])),this.location.length>1&&t.append(Fe.toLocationSymbol(this.location[lt.RIGHT])),t.toString()};rr.prototype.setLocations=function(t,e,n){this.location[lt.ON]=t,this.location[lt.LEFT]=e,this.location[lt.RIGHT]=n};rr.prototype.get=function(t){return t1};rr.prototype.isAnyNull=function(){for(var t=this,e=0;et._maxNodeDegree&&(t._maxNodeDegree=r),e=t.getNext(e)}while(e!==this._startDe);this._maxNodeDegree*=2};Kr.prototype.addPoints=function(t,e,n){var r=this,i=t.getCoordinates();if(e){var s=1;n&&(s=0);for(var c=s;c=0;d--)r._pts.add(i[d])}};Kr.prototype.isHole=function(){return this._isHole};Kr.prototype.setInResult=function(){var t=this._startDe;do t.getEdge().setInResult(!0),t=t.getNext();while(t!==this._startDe)};Kr.prototype.containsPoint=function(t){var e=this.getLinearRing(),n=e.getEnvelopeInternal();if(!n.contains(t)||!Et.isPointInRing(t,e.getCoordinates()))return!1;for(var r=this._holes.iterator();r.hasNext();){var i=r.next();if(i.containsPoint(t))return!1}return!0};Kr.prototype.addHole=function(t){this._holes.add(t)};Kr.prototype.isShell=function(){return this._shell===null};Kr.prototype.getLabel=function(){return this._label};Kr.prototype.getEdges=function(){return this._edges};Kr.prototype.getMaxNodeDegree=function(){return this._maxNodeDegree<0&&this.computeMaxNodeDegree(),this._maxNodeDegree};Kr.prototype.getShell=function(){return this._shell};Kr.prototype.mergeLabel=function(){if(arguments.length===1){var t=arguments[0];this.mergeLabel(t,0),this.mergeLabel(t,1)}else if(arguments.length===2){var e=arguments[0],n=arguments[1],r=e.getLocation(n,lt.RIGHT);if(r===Fe.NONE)return null;if(this._label.getLocation(n)===Fe.NONE)return this._label.setLocation(n,r),null}};Kr.prototype.setShell=function(t){this._shell=t,t!==null&&t.addHole(this)};Kr.prototype.toPolygon=function(t){for(var e=this,n=new Array(this._holes.size()).fill(null),r=0;r=2,"found partial label"),this.computeIM(t)};is.prototype.isInResult=function(){return this._isInResult};is.prototype.isVisited=function(){return this._isVisited};is.prototype.interfaces_=function(){return[]};is.prototype.getClass=function(){return is};var Ey=function(t){function e(){t.call(this),this._coord=null,this._edges=null;var n=arguments[0],r=arguments[1];this._coord=n,this._edges=r,this._label=new Hn(0,Fe.NONE)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isIncidentEdgeInResult=function(){for(var n=this.getEdges().getEdges().iterator();n.hasNext();){var r=n.next();if(r.getEdge().isInResult())return!0}return!1},e.prototype.isIsolated=function(){return this._label.getGeometryCount()===1},e.prototype.getCoordinate=function(){return this._coord},e.prototype.print=function(n){n.println("node "+this._coord+" lbl: "+this._label)},e.prototype.computeIM=function(n){},e.prototype.computeMergedLocation=function(n,r){var i=Fe.NONE;if(i=this._label.getLocation(r),!n.isNull(r)){var s=n.getLocation(r);i!==Fe.BOUNDARY&&(i=s)}return i},e.prototype.setLabel=function(){if(arguments.length===2){var n=arguments[0],r=arguments[1];this._label===null?this._label=new Hn(n,r):this._label.setLocation(n,r)}else return t.prototype.setLabel.apply(this,arguments)},e.prototype.getEdges=function(){return this._edges},e.prototype.mergeLabel=function(){var n=this;if(arguments[0]instanceof e){var r=arguments[0];this.mergeLabel(r._label)}else if(arguments[0]instanceof Hn)for(var i=arguments[0],s=0;s<2;s++){var c=n.computeMergedLocation(i,s),l=n._label.getLocation(s);l===Fe.NONE&&n._label.setLocation(s,c)}},e.prototype.add=function(n){this._edges.insert(n),n.setNode(this)},e.prototype.setLabelBoundary=function(n){if(this._label===null)return null;var r=Fe.NONE;this._label!==null&&(r=this._label.getLocation(n));var i=null;switch(r){case Fe.BOUNDARY:i=Fe.INTERIOR;break;case Fe.INTERIOR:i=Fe.BOUNDARY;break;default:i=Fe.BOUNDARY;break}this._label.setLocation(n,i)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(is),wa=function(){this.nodeMap=new Gi,this.nodeFact=null;var t=arguments[0];this.nodeFact=t};wa.prototype.find=function(t){return this.nodeMap.get(t)};wa.prototype.addNode=function(){if(arguments[0]instanceof ze){var t=arguments[0],e=this.nodeMap.get(t);return e===null&&(e=this.nodeFact.createNode(t),this.nodeMap.put(t,e)),e}else if(arguments[0]instanceof Ey){var n=arguments[0],r=this.nodeMap.get(n.getCoordinate());return r===null?(this.nodeMap.put(n.getCoordinate(),n),n):(r.mergeLabel(n),r)}};wa.prototype.print=function(t){for(var e=this.iterator();e.hasNext();){var n=e.next();n.print(t)}};wa.prototype.iterator=function(){return this.nodeMap.values().iterator()};wa.prototype.values=function(){return this.nodeMap.values()};wa.prototype.getBoundaryNodes=function(t){for(var e=new yt,n=this.iterator();n.hasNext();){var r=n.next();r.getLabel().getLocation(t)===Fe.BOUNDARY&&e.add(r)}return e};wa.prototype.add=function(t){var e=t.getCoordinate(),n=this.addNode(e);n.add(t)};wa.prototype.interfaces_=function(){return[]};wa.prototype.getClass=function(){return wa};var Xn=function(){},Tm={NE:{configurable:!0},NW:{configurable:!0},SW:{configurable:!0},SE:{configurable:!0}};Xn.prototype.interfaces_=function(){return[]};Xn.prototype.getClass=function(){return Xn};Xn.isNorthern=function(t){return t===Xn.NE||t===Xn.NW};Xn.isOpposite=function(t,e){if(t===e)return!1;var n=(t-e+4)%4;return n===2};Xn.commonHalfPlane=function(t,e){if(t===e)return t;var n=(t-e+4)%4;if(n===2)return-1;var r=te?t:e;return r===0&&i===3?3:r};Xn.isInHalfPlane=function(t,e){return e===Xn.SE?t===Xn.SE||t===Xn.SW:t===e||t===e+1};Xn.quadrant=function(){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var t=arguments[0],e=arguments[1];if(t===0&&e===0)throw new yr("Cannot compute the quadrant for point ( "+t+", "+e+" )");return t>=0?e>=0?Xn.NE:Xn.SE:e>=0?Xn.NW:Xn.SW}else if(arguments[0]instanceof ze&&arguments[1]instanceof ze){var n=arguments[0],r=arguments[1];if(r.x===n.x&&r.y===n.y)throw new yr("Cannot compute the quadrant for two identical points "+n);return r.x>=n.x?r.y>=n.y?Xn.NE:Xn.SE:r.y>=n.y?Xn.NW:Xn.SW}};Tm.NE.get=function(){return 0};Tm.NW.get=function(){return 1};Tm.SW.get=function(){return 2};Tm.SE.get=function(){return 3};Object.defineProperties(Xn,Tm);var qi=function(){if(this._edge=null,this._label=null,this._node=null,this._p0=null,this._p1=null,this._dx=null,this._dy=null,this._quadrant=null,arguments.length===1){var t=arguments[0];this._edge=t}else if(arguments.length===3){var e=arguments[0],n=arguments[1],r=arguments[2],i=null;this._edge=e,this.init(n,r),this._label=i}else if(arguments.length===4){var s=arguments[0],c=arguments[1],l=arguments[2],d=arguments[3];this._edge=s,this.init(c,l),this._label=d}};qi.prototype.compareDirection=function(t){return this._dx===t._dx&&this._dy===t._dy?0:this._quadrant>t._quadrant?1:this._quadrant2){c.linkDirectedEdgesForMinimalEdgeRings();var l=c.buildMinimalRings(),d=r.findShell(l);d!==null?(r.placePolygonHoles(d,l),e.add(d)):n.addAll(l)}else i.add(c)}return i};Bo.prototype.containsPoint=function(t){for(var e=this._shellList.iterator();e.hasNext();){var n=e.next();if(n.containsPoint(t))return!0}return!1};Bo.prototype.buildMaximalEdgeRings=function(t){for(var e=this,n=new yt,r=t.iterator();r.hasNext();){var i=r.next();if(i.isInResult()&&i.getLabel().isArea()&&i.getEdgeRing()===null){var s=new YO(i,e._geometryFactory);n.add(s),s.setInResult()}}return n};Bo.prototype.placePolygonHoles=function(t,e){for(var n=e.iterator();n.hasNext();){var r=n.next();r.isHole()&&r.setShell(t)}};Bo.prototype.getPolygons=function(){var t=this.computePolygons(this._shellList);return t};Bo.prototype.findEdgeRingContaining=function(t,e){for(var n=t.getLinearRing(),r=n.getEnvelopeInternal(),i=n.getCoordinateN(0),s=null,c=null,l=e.iterator();l.hasNext();){var d=l.next(),v=d.getLinearRing(),S=v.getEnvelopeInternal();s!==null&&(c=s.getLinearRing().getEnvelopeInternal());var E=!1;S.contains(r)&&Et.isPointInRing(i,v.getCoordinates())&&(E=!0),E&&(s===null||c.contains(S))&&(s=d)}return s};Bo.prototype.findShell=function(t){for(var e=0,n=null,r=t.iterator();r.hasNext();){var i=r.next();i.isHole()||(n=i,e++)}return hn.isTrue(e<=1,"found two shells in MinimalEdgeRing list"),n};Bo.prototype.add=function(){if(arguments.length===1){var t=arguments[0];this.add(t.getEdgeEnds(),t.getNodes())}else if(arguments.length===2){var e=arguments[0],n=arguments[1];Lr.linkResultDirectedEdges(n);var r=this.buildMaximalEdgeRings(e),i=new yt,s=this.buildMinimalEdgeRings(r,this._shellList,i);this.sortShellsAndHoles(s,this._shellList,i),this.placeFreeHoles(this._shellList,i)}};Bo.prototype.interfaces_=function(){return[]};Bo.prototype.getClass=function(){return Bo};var Wf=function(){};Wf.prototype.getBounds=function(){};Wf.prototype.interfaces_=function(){return[]};Wf.prototype.getClass=function(){return Wf};var qs=function(){this._bounds=null,this._item=null;var t=arguments[0],e=arguments[1];this._bounds=t,this._item=e};qs.prototype.getItem=function(){return this._item};qs.prototype.getBounds=function(){return this._bounds};qs.prototype.interfaces_=function(){return[Wf,Is]};qs.prototype.getClass=function(){return qs};var Ml=function(){this._size=null,this._items=null,this._size=0,this._items=new yt,this._items.add(null)};Ml.prototype.poll=function(){if(this.isEmpty())return null;var t=this._items.get(1);return this._items.set(1,this._items.get(this._size)),this._size-=1,this.reorder(1),t};Ml.prototype.size=function(){return this._size};Ml.prototype.reorder=function(t){for(var e=this,n=null,r=this._items.get(t);t*2<=this._size&&(n=t*2,n!==e._size&&e._items.get(n+1).compareTo(e._items.get(n))<0&&n++,e._items.get(n).compareTo(r)<0);t=n)e._items.set(t,e._items.get(n));this._items.set(t,r)};Ml.prototype.clear=function(){this._size=0,this._items.clear()};Ml.prototype.isEmpty=function(){return this._size===0};Ml.prototype.add=function(t){var e=this;this._items.add(null),this._size+=1;var n=this._size;for(this._items.set(0,t);t.compareTo(this._items.get(Math.trunc(n/2)))<0;n/=2)e._items.set(n,e._items.get(Math.trunc(n/2)));this._items.set(n,t)};Ml.prototype.interfaces_=function(){return[]};Ml.prototype.getClass=function(){return Ml};var hu=function(){};hu.prototype.visitItem=function(t){};hu.prototype.interfaces_=function(){return[]};hu.prototype.getClass=function(){return hu};var Kc=function(){};Kc.prototype.insert=function(t,e){};Kc.prototype.remove=function(t,e){};Kc.prototype.query=function(){};Kc.prototype.interfaces_=function(){return[]};Kc.prototype.getClass=function(){return Kc};var oi=function(){if(this._childBoundables=new yt,this._bounds=null,this._level=null,arguments.length!==0&&arguments.length===1){var t=arguments[0];this._level=t}},WC={serialVersionUID:{configurable:!0}};oi.prototype.getLevel=function(){return this._level};oi.prototype.size=function(){return this._childBoundables.size()};oi.prototype.getChildBoundables=function(){return this._childBoundables};oi.prototype.addChildBoundable=function(t){hn.isTrue(this._bounds===null),this._childBoundables.add(t)};oi.prototype.isEmpty=function(){return this._childBoundables.isEmpty()};oi.prototype.getBounds=function(){return this._bounds===null&&(this._bounds=this.computeBounds()),this._bounds};oi.prototype.interfaces_=function(){return[Wf,Is]};oi.prototype.getClass=function(){return oi};WC.serialVersionUID.get=function(){return 6493722185909574e3};Object.defineProperties(oi,WC);var Ws=function(){};Ws.reverseOrder=function(){return{compare:function(t,e){return e.compareTo(t)}}};Ws.min=function(t){return Ws.sort(t),t.get(0)};Ws.sort=function(t,e){var n=t.toArray();e?$u.sort(n,e):$u.sort(n);for(var r=t.iterator(),i=0,s=n.length;iYr.area(this._boundable2)?(this.expand(this._boundable1,this._boundable2,t,e),null):(this.expand(this._boundable2,this._boundable1,t,e),null);if(n)return this.expand(this._boundable1,this._boundable2,t,e),null;if(r)return this.expand(this._boundable2,this._boundable1,t,e),null;throw new yr("neither boundable is composite")};Yr.prototype.isLeaves=function(){return!(Yr.isComposite(this._boundable1)||Yr.isComposite(this._boundable2))};Yr.prototype.compareTo=function(t){var e=t;return this._distancee._distance?1:0};Yr.prototype.expand=function(t,e,n,r){for(var i=this,s=t.getChildBoundables(),c=s.iterator();c.hasNext();){var l=c.next(),d=new Yr(l,e,i._itemDistance);d.getDistance()1,"Node capacity must be greater than 1"),this._nodeCapacity=n}},Iy={IntersectsOp:{configurable:!0},serialVersionUID:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};Ci.prototype.getNodeCapacity=function(){return this._nodeCapacity};Ci.prototype.lastNode=function(t){return t.get(t.size()-1)};Ci.prototype.size=function(){var t=this;if(arguments.length===0)return this.isEmpty()?0:(this.build(),this.size(this._root));if(arguments.length===1){for(var e=arguments[0],n=0,r=e.getChildBoundables().iterator();r.hasNext();){var i=r.next();i instanceof oi?n+=t.size(i):i instanceof qs&&(n+=1)}return n}};Ci.prototype.removeItem=function(t,e){for(var n=null,r=t.getChildBoundables().iterator();r.hasNext();){var i=r.next();i instanceof qs&&i.getItem()===e&&(n=i)}return n!==null?(t.getChildBoundables().remove(n),!0):!1};Ci.prototype.itemsTree=function(){var t=this;if(arguments.length===0){this.build();var e=this.itemsTree(this._root);return e===null?new yt:e}else if(arguments.length===1){for(var n=arguments[0],r=new yt,i=n.getChildBoundables().iterator();i.hasNext();){var s=i.next();if(s instanceof oi){var c=t.itemsTree(s);c!==null&&r.add(c)}else s instanceof qs?r.add(s.getItem()):hn.shouldNeverReachHere()}return r.size()<=0?null:r}};Ci.prototype.insert=function(t,e){hn.isTrue(!this._built,"Cannot insert items into an STR packed R-tree after it has been built."),this._itemBoundables.add(new qs(t,e))};Ci.prototype.boundablesAtLevel=function(){var t=this;if(arguments.length===1){var e=arguments[0],n=new yt;return this.boundablesAtLevel(e,this._root,n),n}else if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2];if(hn.isTrue(r>-2),i.getLevel()===r)return s.add(i),null;for(var c=i.getChildBoundables().iterator();c.hasNext();){var l=c.next();l instanceof oi?t.boundablesAtLevel(r,l,s):(hn.isTrue(l instanceof qs),r===-1&&s.add(l))}return null}};Ci.prototype.query=function(){var t=this;if(arguments.length===1){var e=arguments[0];this.build();var n=new yt;return this.isEmpty()||this.getIntersectsOp().intersects(this._root.getBounds(),e)&&this.query(e,this._root,n),n}else if(arguments.length===2){var r=arguments[0],i=arguments[1];if(this.build(),this.isEmpty())return null;this.getIntersectsOp().intersects(this._root.getBounds(),r)&&this.query(r,this._root,i)}else if(arguments.length===3){if(Kt(arguments[2],hu)&&arguments[0]instanceof Object&&arguments[1]instanceof oi)for(var s=arguments[0],c=arguments[1],l=arguments[2],d=c.getChildBoundables(),v=0;vn&&(n=s)}}return n+1}};Ci.prototype.createParentBoundables=function(t,e){var n=this;hn.isTrue(!t.isEmpty());var r=new yt;r.add(this.createNode(e));var i=new yt(t);Ws.sort(i,this.getComparator());for(var s=i.iterator();s.hasNext();){var c=s.next();n.lastNode(r).getChildBoundables().size()===n.getNodeCapacity()&&r.add(n.createNode(e)),n.lastNode(r).addChildBoundable(c)}return r};Ci.prototype.isEmpty=function(){return this._built?this._root.isEmpty():this._itemBoundables.isEmpty()};Ci.prototype.interfaces_=function(){return[Is]};Ci.prototype.getClass=function(){return Ci};Ci.compareDoubles=function(t,e){return t>e?1:t0);for(var c=new yt,l=0;l0;){var A=M.poll(),R=A.getDistance();if(R>=E)break;A.isLeaves()?(E=R,C=A):A.expandToQueue(M,E)}return[C.getBoundable(0).getItem(),C.getBoundable(1).getItem()]}}else if(arguments.length===3){var z=arguments[0],U=arguments[1],F=arguments[2],G=new qs(z,U),H=new Yr(this.getRoot(),G,F);return this.nearestNeighbour(H)[0]}},e.prototype.interfaces_=function(){return[Kc,Is]},e.prototype.getClass=function(){return e},e.centreX=function(r){return e.avg(r.getMinX(),r.getMaxX())},e.avg=function(r,i){return(r+i)/2},e.centreY=function(r){return e.avg(r.getMinY(),r.getMaxY())},n.STRtreeNode.get=function(){return cS},n.serialVersionUID.get=function(){return 0x39920f7d5f261e0},n.xComparator.get=function(){return{interfaces_:function(){return[Of]},compare:function(r,i){return t.compareDoubles(e.centreX(r.getBounds()),e.centreX(i.getBounds()))}}},n.yComparator.get=function(){return{interfaces_:function(){return[Of]},compare:function(r,i){return t.compareDoubles(e.centreY(r.getBounds()),e.centreY(i.getBounds()))}}},n.intersectsOp.get=function(){return{interfaces_:function(){return[t.IntersectsOp]},intersects:function(r,i){return r.intersects(i)}}},n.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(e,n),e}(Ci),cS=function(t){function e(){var n=arguments[0];t.call(this,n)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.computeBounds=function(){for(var n=null,r=this.getChildBoundables().iterator();r.hasNext();){var i=r.next();n===null?n=new Bt(i.getBounds()):n.expandToInclude(i.getBounds())}return n},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(oi),_o=function(){};_o.prototype.interfaces_=function(){return[]};_o.prototype.getClass=function(){return _o};_o.relativeSign=function(t,e){return te?1:0};_o.compare=function(t,e,n){if(e.equals2D(n))return 0;var r=_o.relativeSign(e.x,n.x),i=_o.relativeSign(e.y,n.y);switch(t){case 0:return _o.compareValue(r,i);case 1:return _o.compareValue(i,r);case 2:return _o.compareValue(i,-r);case 3:return _o.compareValue(-r,i);case 4:return _o.compareValue(-r,-i);case 5:return _o.compareValue(-i,-r);case 6:return _o.compareValue(-i,r);case 7:return _o.compareValue(r,-i)}return hn.shouldNeverReachHere("invalid octant value"),0};_o.compareValue=function(t,e){return t<0?-1:t>0?1:e<0?-1:e>0?1:0};var fu=function(){this._segString=null,this.coord=null,this.segmentIndex=null,this._segmentOctant=null,this._isInterior=null;var t=arguments[0],e=arguments[1],n=arguments[2],r=arguments[3];this._segString=t,this.coord=new ze(e),this.segmentIndex=n,this._segmentOctant=r,this._isInterior=!e.equals2D(t.getCoordinate(n))};fu.prototype.getCoordinate=function(){return this.coord};fu.prototype.print=function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex)};fu.prototype.compareTo=function(t){var e=t;return this.segmentIndexe.segmentIndex?1:this.coord.equals2D(e.coord)?0:_o.compare(this._segmentOctant,this.coord,e.coord)};fu.prototype.isEndPoint=function(t){return this.segmentIndex===0&&!this._isInterior||this.segmentIndex===t};fu.prototype.isInterior=function(){return this._isInterior};fu.prototype.interfaces_=function(){return[Es]};fu.prototype.getClass=function(){return fu};var so=function(){this._nodeMap=new Gi,this._edge=null;var t=arguments[0];this._edge=t};so.prototype.getSplitCoordinates=function(){var t=this,e=new Im;this.addEndpoints();for(var n=this.iterator(),r=n.next();n.hasNext();){var i=n.next();t.addEdgeCoordinates(r,i,e),r=i}return e.toCoordinateArray()};so.prototype.addCollapsedNodes=function(){var t=this,e=new yt;this.findCollapsesFromInsertedNodes(e),this.findCollapsesFromExistingVertices(e);for(var n=e.iterator();n.hasNext();){var r=n.next().intValue();t.add(t._edge.getCoordinate(r),r)}};so.prototype.print=function(t){t.println("Intersections:");for(var e=this.iterator();e.hasNext();){var n=e.next();n.print(t)}};so.prototype.findCollapsesFromExistingVertices=function(t){for(var e=this,n=0;n=0?e>=0?n>=r?0:1:n>=r?7:6:e>=0?n>=r?3:2:n>=r?4:5}else if(arguments[0]instanceof ze&&arguments[1]instanceof ze){var i=arguments[0],s=arguments[1],c=s.x-i.x,l=s.y-i.y;if(c===0&&l===0)throw new yr("Cannot compute the octant for two identical points "+i);return Jc.octant(c,l)}};var Xa=function(){};Xa.prototype.getCoordinates=function(){};Xa.prototype.size=function(){};Xa.prototype.getCoordinate=function(t){};Xa.prototype.isClosed=function(){};Xa.prototype.setData=function(t){};Xa.prototype.getData=function(){};Xa.prototype.interfaces_=function(){return[]};Xa.prototype.getClass=function(){return Xa};var um=function(){};um.prototype.addIntersection=function(t,e){};um.prototype.interfaces_=function(){return[Xa]};um.prototype.getClass=function(){return um};var Wr=function(){this._nodeList=new so(this),this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};Wr.prototype.getCoordinates=function(){return this._pts};Wr.prototype.size=function(){return this._pts.length};Wr.prototype.getCoordinate=function(t){return this._pts[t]};Wr.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])};Wr.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:this.safeOctant(this.getCoordinate(t),this.getCoordinate(t+1))};Wr.prototype.setData=function(t){this._data=t};Wr.prototype.safeOctant=function(t,e){return t.equals2D(e)?0:Jc.octant(t,e)};Wr.prototype.getData=function(){return this._data};Wr.prototype.addIntersection=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];this.addIntersectionNode(t,e)}else if(arguments.length===4){var n=arguments[0],r=arguments[1],i=arguments[3],s=new ze(n.getIntersection(i));this.addIntersection(s,r)}};Wr.prototype.toString=function(){return js.toLineString(new jr(this._pts))};Wr.prototype.getNodeList=function(){return this._nodeList};Wr.prototype.addIntersectionNode=function(t,e){var n=e,r=n+1;if(r=0&&n>=0||e<=0&&n<=0?Math.max(e,n):0}else if(arguments[0]instanceof ze){var r=arguments[0];return Et.orientationIndex(this.p0,this.p1,r)}};Vt.prototype.toGeometry=function(t){return t.createLineString([this.p0,this.p1])};Vt.prototype.isVertical=function(){return this.p0.x===this.p1.x};Vt.prototype.equals=function(t){if(!(t instanceof Vt))return!1;var e=t;return this.p0.equals(e.p0)&&this.p1.equals(e.p1)};Vt.prototype.intersection=function(t){var e=new pc;return e.computeIntersection(this.p0,this.p1,t.p0,t.p1),e.hasIntersection()?e.getIntersection(0):null};Vt.prototype.project=function(){if(arguments[0]instanceof ze){var t=arguments[0];if(t.equals(this.p0)||t.equals(this.p1))return new ze(t);var e=this.projectionFactor(t),n=new ze;return n.x=this.p0.x+e*(this.p1.x-this.p0.x),n.y=this.p0.y+e*(this.p1.y-this.p0.y),n}else if(arguments[0]instanceof Vt){var r=arguments[0],i=this.projectionFactor(r.p0),s=this.projectionFactor(r.p1);if(i>=1&&s>=1||i<=0&&s<=0)return null;var c=this.project(r.p0);i<0&&(c=this.p0),i>1&&(c=this.p1);var l=this.project(r.p1);return s<0&&(l=this.p0),s>1&&(l=this.p1),new Vt(c,l)}};Vt.prototype.normalize=function(){this.p1.compareTo(this.p0)<0&&this.reverse()};Vt.prototype.angle=function(){return Math.atan2(this.p1.y-this.p0.y,this.p1.x-this.p0.x)};Vt.prototype.getCoordinate=function(t){return t===0?this.p0:this.p1};Vt.prototype.distancePerpendicular=function(t){return Et.distancePointLinePerpendicular(t,this.p0,this.p1)};Vt.prototype.minY=function(){return Math.min(this.p0.y,this.p1.y)};Vt.prototype.midPoint=function(){return Vt.midPoint(this.p0,this.p1)};Vt.prototype.projectionFactor=function(t){if(t.equals(this.p0))return 0;if(t.equals(this.p1))return 1;var e=this.p1.x-this.p0.x,n=this.p1.y-this.p0.y,r=e*e+n*n;if(r<=0)return nn.NaN;var i=((t.x-this.p0.x)*e+(t.y-this.p0.y)*n)/r;return i};Vt.prototype.closestPoints=function(t){var e=this.intersection(t);if(e!==null)return[e,e];var n=new Array(2).fill(null),r=nn.MAX_VALUE,i=null,s=this.closestPoint(t.p0);r=s.distance(t.p0),n[0]=s,n[1]=t.p0;var c=this.closestPoint(t.p1);i=c.distance(t.p1),i0&&e<1)return this.project(t);var n=this.p0.distance(t),r=this.p1.distance(t);return n1||nn.isNaN(e))&&(e=1),e};Vt.prototype.toString=function(){return"LINESTRING( "+this.p0.x+" "+this.p0.y+", "+this.p1.x+" "+this.p1.y+")"};Vt.prototype.isHorizontal=function(){return this.p0.y===this.p1.y};Vt.prototype.distance=function(){if(arguments[0]instanceof Vt){var t=arguments[0];return Et.distanceLineLine(this.p0,this.p1,t.p0,t.p1)}else if(arguments[0]instanceof ze){var e=arguments[0];return Et.distancePointLine(e,this.p0,this.p1)}};Vt.prototype.pointAlong=function(t){var e=new ze;return e.x=this.p0.x+t*(this.p1.x-this.p0.x),e.y=this.p0.y+t*(this.p1.y-this.p0.y),e};Vt.prototype.hashCode=function(){var t=nn.doubleToLongBits(this.p0.x);t^=nn.doubleToLongBits(this.p0.y)*31;var e=Math.trunc(t)^Math.trunc(t>>32),n=nn.doubleToLongBits(this.p1.x);n^=nn.doubleToLongBits(this.p1.y)*31;var r=Math.trunc(n)^Math.trunc(n>>32);return e^r};Vt.prototype.interfaces_=function(){return[Es,Is]};Vt.prototype.getClass=function(){return Vt};Vt.midPoint=function(t,e){return new ze((t.x+e.x)/2,(t.y+e.y)/2)};ZC.serialVersionUID.get=function(){return 0x2d2172135f411c00};Object.defineProperties(Vt,ZC);var cm=function(){this.tempEnv1=new Bt,this.tempEnv2=new Bt,this._overlapSeg1=new Vt,this._overlapSeg2=new Vt};cm.prototype.overlap=function(){if(arguments.length!==2&&arguments.length===4){var t=arguments[0],e=arguments[1],n=arguments[2],r=arguments[3];t.getLineSegment(e,this._overlapSeg1),n.getLineSegment(r,this._overlapSeg2),this.overlap(this._overlapSeg1,this._overlapSeg2)}};cm.prototype.interfaces_=function(){return[]};cm.prototype.getClass=function(){return cm};var Vo=function(){this._pts=null,this._start=null,this._end=null,this._env=null,this._context=null,this._id=null;var t=arguments[0],e=arguments[1],n=arguments[2],r=arguments[3];this._pts=t,this._start=e,this._end=n,this._context=r};Vo.prototype.getLineSegment=function(t,e){e.p0=this._pts[t],e.p1=this._pts[t+1]};Vo.prototype.computeSelect=function(t,e,n,r){var i=this._pts[e],s=this._pts[n];if(r.tempEnv1.init(i,s),n-e===1)return r.select(this,e),null;if(!t.intersects(r.tempEnv1))return null;var c=Math.trunc((e+n)/2);e=t.length-1)return t.length-1;for(var r=Xn.quadrant(t[n],t[n+1]),i=e+1;ic.getId()&&(c.computeOverlaps(v,i),r._nOverlaps++),r._segInt.isDone())return null}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},n.SegmentOverlapAction.get=function(){return hS},Object.defineProperties(e,n),e}(hm),hS=function(t){function e(){t.call(this),this._si=null;var n=arguments[0];this._si=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.overlap=function(){if(arguments.length===4){var n=arguments[0],r=arguments[1],i=arguments[2],s=arguments[3],c=n.getContext(),l=i.getContext();this._si.processIntersections(c,r,l,s)}else return t.prototype.overlap.apply(this,arguments)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(cm),Fn=function t(){if(this._quadrantSegments=t.DEFAULT_QUADRANT_SEGMENTS,this._endCapStyle=t.CAP_ROUND,this._joinStyle=t.JOIN_ROUND,this._mitreLimit=t.DEFAULT_MITRE_LIMIT,this._isSingleSided=!1,this._simplifyFactor=t.DEFAULT_SIMPLIFY_FACTOR,arguments.length!==0){if(arguments.length===1){var e=arguments[0];this.setQuadrantSegments(e)}else if(arguments.length===2){var n=arguments[0],r=arguments[1];this.setQuadrantSegments(n),this.setEndCapStyle(r)}else if(arguments.length===4){var i=arguments[0],s=arguments[1],c=arguments[2],l=arguments[3];this.setQuadrantSegments(i),this.setEndCapStyle(s),this.setJoinStyle(c),this.setMitreLimit(l)}}},Ol={CAP_ROUND:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},JOIN_ROUND:{configurable:!0},JOIN_MITRE:{configurable:!0},JOIN_BEVEL:{configurable:!0},DEFAULT_QUADRANT_SEGMENTS:{configurable:!0},DEFAULT_MITRE_LIMIT:{configurable:!0},DEFAULT_SIMPLIFY_FACTOR:{configurable:!0}};Fn.prototype.getEndCapStyle=function(){return this._endCapStyle};Fn.prototype.isSingleSided=function(){return this._isSingleSided};Fn.prototype.setQuadrantSegments=function(t){this._quadrantSegments=t,this._quadrantSegments===0&&(this._joinStyle=Fn.JOIN_BEVEL),this._quadrantSegments<0&&(this._joinStyle=Fn.JOIN_MITRE,this._mitreLimit=Math.abs(this._quadrantSegments)),t<=0&&(this._quadrantSegments=1),this._joinStyle!==Fn.JOIN_ROUND&&(this._quadrantSegments=Fn.DEFAULT_QUADRANT_SEGMENTS)};Fn.prototype.getJoinStyle=function(){return this._joinStyle};Fn.prototype.setJoinStyle=function(t){this._joinStyle=t};Fn.prototype.setSimplifyFactor=function(t){this._simplifyFactor=t<0?0:t};Fn.prototype.getSimplifyFactor=function(){return this._simplifyFactor};Fn.prototype.getQuadrantSegments=function(){return this._quadrantSegments};Fn.prototype.setEndCapStyle=function(t){this._endCapStyle=t};Fn.prototype.getMitreLimit=function(){return this._mitreLimit};Fn.prototype.setMitreLimit=function(t){this._mitreLimit=t};Fn.prototype.setSingleSided=function(t){this._isSingleSided=t};Fn.prototype.interfaces_=function(){return[]};Fn.prototype.getClass=function(){return Fn};Fn.bufferDistanceError=function(t){var e=Math.PI/2/t;return 1-Math.cos(e/2)};Ol.CAP_ROUND.get=function(){return 1};Ol.CAP_FLAT.get=function(){return 2};Ol.CAP_SQUARE.get=function(){return 3};Ol.JOIN_ROUND.get=function(){return 1};Ol.JOIN_MITRE.get=function(){return 2};Ol.JOIN_BEVEL.get=function(){return 3};Ol.DEFAULT_QUADRANT_SEGMENTS.get=function(){return 8};Ol.DEFAULT_MITRE_LIMIT.get=function(){return 5};Ol.DEFAULT_SIMPLIFY_FACTOR.get=function(){return .01};Object.defineProperties(Fn,Ol);var Or=function(t){this._distanceTol=null,this._isDeleted=null,this._angleOrientation=Et.COUNTERCLOCKWISE,this._inputLine=t||null},Lm={INIT:{configurable:!0},DELETE:{configurable:!0},KEEP:{configurable:!0},NUM_PTS_TO_CHECK:{configurable:!0}};Or.prototype.isDeletable=function(t,e,n,r){var i=this._inputLine[t],s=this._inputLine[e],c=this._inputLine[n];return!this.isConcave(i,s,c)||!this.isShallow(i,s,c,r)?!1:this.isShallowSampled(i,s,t,n,r)};Or.prototype.deleteShallowConcavities=function(){for(var t=this,e=1,n=this.findNextNonDeletedIndex(e),r=this.findNextNonDeletedIndex(n),i=!1;r=0;i--)n.addPt(t[i])};os.prototype.isRedundant=function(t){if(this._ptList.size()<1)return!1;var e=this._ptList.get(this._ptList.size()-1),n=t.distance(e);return nMath.PI;)t-=Ln.PI_TIMES_2;for(;t<=-Math.PI;)t+=Ln.PI_TIMES_2;return t};Ln.angle=function(){if(arguments.length===1){var t=arguments[0];return Math.atan2(t.y,t.x)}else if(arguments.length===2){var e=arguments[0],n=arguments[1],r=n.x-e.x,i=n.y-e.y;return Math.atan2(i,r)}};Ln.isAcute=function(t,e,n){var r=t.x-e.x,i=t.y-e.y,s=n.x-e.x,c=n.y-e.y,l=r*s+i*c;return l>0};Ln.isObtuse=function(t,e,n){var r=t.x-e.x,i=t.y-e.y,s=n.x-e.x,c=n.y-e.y,l=r*s+i*c;return l<0};Ln.interiorAngle=function(t,e,n){var r=Ln.angle(e,t),i=Ln.angle(e,n);return Math.abs(i-r)};Ln.normalizePositive=function(t){if(t<0){for(;t<0;)t+=Ln.PI_TIMES_2;t>=Ln.PI_TIMES_2&&(t=0)}else{for(;t>=Ln.PI_TIMES_2;)t-=Ln.PI_TIMES_2;t<0&&(t=0)}return t};Ln.angleBetween=function(t,e,n){var r=Ln.angle(e,t),i=Ln.angle(e,n);return Ln.diff(r,i)};Ln.diff=function(t,e){var n=null;return tMath.PI&&(n=2*Math.PI-n),n};Ln.toRadians=function(t){return t*Math.PI/180};Ln.getTurn=function(t,e){var n=Math.sin(e-t);return n>0?Ln.COUNTERCLOCKWISE:n<0?Ln.CLOCKWISE:Ln.NONE};Ln.angleBetweenOriented=function(t,e,n){var r=Ln.angle(e,t),i=Ln.angle(e,n),s=i-r;return s<=-Math.PI?s+Ln.PI_TIMES_2:s>Math.PI?s-Ln.PI_TIMES_2:s};dh.PI_TIMES_2.get=function(){return 2*Math.PI};dh.PI_OVER_2.get=function(){return Math.PI/2};dh.PI_OVER_4.get=function(){return Math.PI/4};dh.COUNTERCLOCKWISE.get=function(){return Et.COUNTERCLOCKWISE};dh.CLOCKWISE.get=function(){return Et.CLOCKWISE};dh.NONE.get=function(){return Et.COLLINEAR};Object.defineProperties(Ln,dh);var fr=function t(){this._maxCurveSegmentError=0,this._filletAngleQuantum=null,this._closingSegLengthFactor=1,this._segList=null,this._distance=0,this._precisionModel=null,this._bufParams=null,this._li=null,this._s0=null,this._s1=null,this._s2=null,this._seg0=new Vt,this._seg1=new Vt,this._offset0=new Vt,this._offset1=new Vt,this._side=0,this._hasNarrowConcaveAngle=!1;var e=arguments[0],n=arguments[1],r=arguments[2];this._precisionModel=e,this._bufParams=n,this._li=new pc,this._filletAngleQuantum=Math.PI/2/n.getQuadrantSegments(),n.getQuadrantSegments()>=8&&n.getJoinStyle()===Fn.JOIN_ROUND&&(this._closingSegLengthFactor=t.MAX_CLOSING_SEG_LEN_FACTOR),this.init(r)},Pm={OFFSET_SEGMENT_SEPARATION_FACTOR:{configurable:!0},INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},CURVE_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},MAX_CLOSING_SEG_LEN_FACTOR:{configurable:!0}};fr.prototype.addNextSegment=function(t,e){if(this._s0=this._s1,this._s1=this._s2,this._s2=t,this._seg0.setCoordinates(this._s0,this._s1),this.computeOffsetSegment(this._seg0,this._side,this._distance,this._offset0),this._seg1.setCoordinates(this._s1,this._s2),this.computeOffsetSegment(this._seg1,this._side,this._distance,this._offset1),this._s1.equals(this._s2))return null;var n=Et.computeOrientation(this._s0,this._s1,this._s2),r=n===Et.CLOCKWISE&&this._side===lt.LEFT||n===Et.COUNTERCLOCKWISE&&this._side===lt.RIGHT;n===0?this.addCollinear(e):r?this.addOutsideTurn(n,e):this.addInsideTurn(n,e)};fr.prototype.addLineEndCap=function(t,e){var n=new Vt(t,e),r=new Vt;this.computeOffsetSegment(n,lt.LEFT,this._distance,r);var i=new Vt;this.computeOffsetSegment(n,lt.RIGHT,this._distance,i);var s=e.x-t.x,c=e.y-t.y,l=Math.atan2(c,s);switch(this._bufParams.getEndCapStyle()){case Fn.CAP_ROUND:this._segList.addPt(r.p1),this.addFilletArc(e,l+Math.PI/2,l-Math.PI/2,Et.CLOCKWISE,this._distance),this._segList.addPt(i.p1);break;case Fn.CAP_FLAT:this._segList.addPt(r.p1),this._segList.addPt(i.p1);break;case Fn.CAP_SQUARE:var d=new ze;d.x=Math.abs(this._distance)*Math.cos(l),d.y=Math.abs(this._distance)*Math.sin(l);var v=new ze(r.p1.x+d.x,r.p1.y+d.y),S=new ze(i.p1.x+d.x,i.p1.y+d.y);this._segList.addPt(v),this._segList.addPt(S);break}};fr.prototype.getCoordinates=function(){var t=this._segList.getCoordinates();return t};fr.prototype.addMitreJoin=function(t,e,n,r){var i=!0,s=null;try{s=Vs.intersection(e.p0,e.p1,n.p0,n.p1);var c=r<=0?1:s.distance(t)/Math.abs(r);c>this._bufParams.getMitreLimit()&&(i=!1)}catch(l){if(l instanceof pp)s=new ze(0,0),i=!1;else throw l}finally{}i?this._segList.addPt(s):this.addLimitedMitreJoin(e,n,r,this._bufParams.getMitreLimit())};fr.prototype.addFilletCorner=function(t,e,n,r,i){var s=e.x-t.x,c=e.y-t.y,l=Math.atan2(c,s),d=n.x-t.x,v=n.y-t.y,S=Math.atan2(v,d);r===Et.CLOCKWISE?l<=S&&(l+=2*Math.PI):l>=S&&(l-=2*Math.PI),this._segList.addPt(e),this.addFilletArc(t,l,S,r,i),this._segList.addPt(n)};fr.prototype.addOutsideTurn=function(t,e){if(this._offset0.p1.distance(this._offset1.p0)0){var n=new ze((this._closingSegLengthFactor*this._offset0.p1.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset0.p1.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(n);var r=new ze((this._closingSegLengthFactor*this._offset1.p0.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset1.p0.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(r)}else this._segList.addPt(this._s1);this._segList.addPt(this._offset1.p0)}};fr.prototype.createCircle=function(t){var e=new ze(t.x+this._distance,t.y);this._segList.addPt(e),this.addFilletArc(t,0,2*Math.PI,-1,this._distance),this._segList.closeRing()};fr.prototype.addBevelJoin=function(t,e){this._segList.addPt(t.p1),this._segList.addPt(e.p0)};fr.prototype.init=function(t){this._distance=t,this._maxCurveSegmentError=t*(1-Math.cos(this._filletAngleQuantum/2)),this._segList=new os,this._segList.setPrecisionModel(this._precisionModel),this._segList.setMinimumVertexDistance(t*fr.CURVE_VERTEX_SNAP_DISTANCE_FACTOR)};fr.prototype.addCollinear=function(t){this._li.computeIntersection(this._s0,this._s1,this._s1,this._s2);var e=this._li.getIntersectionNum();e>=2&&(this._bufParams.getJoinStyle()===Fn.JOIN_BEVEL||this._bufParams.getJoinStyle()===Fn.JOIN_MITRE?(t&&this._segList.addPt(this._offset0.p1),this._segList.addPt(this._offset1.p0)):this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,Et.CLOCKWISE,this._distance))};fr.prototype.closeRing=function(){this._segList.closeRing()};fr.prototype.hasNarrowConcaveAngle=function(){return this._hasNarrowConcaveAngle};fr.prototype.interfaces_=function(){return[]};fr.prototype.getClass=function(){return fr};Pm.OFFSET_SEGMENT_SEPARATION_FACTOR.get=function(){return .001};Pm.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return .001};Pm.CURVE_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return 1e-6};Pm.MAX_CLOSING_SEG_LEN_FACTOR.get=function(){return 80};Object.defineProperties(fr,Pm);var bo=function(){this._distance=0,this._precisionModel=null,this._bufParams=null;var t=arguments[0],e=arguments[1];this._precisionModel=t,this._bufParams=e};bo.prototype.getOffsetCurve=function(t,e){if(this._distance=e,e===0)return null;var n=e<0,r=Math.abs(e),i=this.getSegGen(r);t.length<=1?this.computePointCurve(t[0],i):this.computeOffsetCurve(t,n,i);var s=i.getCoordinates();return n&&In.reverse(s),s};bo.prototype.computeSingleSidedBufferCurve=function(t,e,n){var r=this.simplifyTolerance(this._distance);if(e){n.addSegments(t,!0);var i=Or.simplify(t,-r),s=i.length-1;n.initSideSegments(i[s],i[s-1],lt.LEFT),n.addFirstSegment();for(var c=s-2;c>=0;c--)n.addNextSegment(i[c],!0)}else{n.addSegments(t,!1);var l=Or.simplify(t,r),d=l.length-1;n.initSideSegments(l[0],l[1],lt.LEFT),n.addFirstSegment();for(var v=2;v<=d;v++)n.addNextSegment(l[v],!0)}n.addLastSegment(),n.closeRing()};bo.prototype.computeRingBufferCurve=function(t,e,n){var r=this.simplifyTolerance(this._distance);e===lt.RIGHT&&(r=-r);var i=Or.simplify(t,r),s=i.length-1;n.initSideSegments(i[s-1],i[0],e);for(var c=1;c<=s;c++){var l=c!==1;n.addNextSegment(i[c],l)}n.closeRing()};bo.prototype.computeLineBufferCurve=function(t,e){var n=this.simplifyTolerance(this._distance),r=Or.simplify(t,n),i=r.length-1;e.initSideSegments(r[0],r[1],lt.LEFT);for(var s=2;s<=i;s++)e.addNextSegment(r[s],!0);e.addLastSegment(),e.addLineEndCap(r[i-1],r[i]);var c=Or.simplify(t,-n),l=c.length-1;e.initSideSegments(c[l],c[l-1],lt.LEFT);for(var d=l-2;d>=0;d--)e.addNextSegment(c[d],!0);e.addLastSegment(),e.addLineEndCap(c[1],c[0]),e.closeRing()};bo.prototype.computePointCurve=function(t,e){switch(this._bufParams.getEndCapStyle()){case Fn.CAP_ROUND:e.createCircle(t);break;case Fn.CAP_SQUARE:e.createSquare(t);break}};bo.prototype.getLineCurve=function(t,e){if(this._distance=e,e<0&&!this._bufParams.isSingleSided()||e===0)return null;var n=Math.abs(e),r=this.getSegGen(n);if(t.length<=1)this.computePointCurve(t[0],r);else if(this._bufParams.isSingleSided()){var i=e<0;this.computeSingleSidedBufferCurve(t,i,r)}else this.computeLineBufferCurve(t,r);var s=r.getCoordinates();return s};bo.prototype.getBufferParameters=function(){return this._bufParams};bo.prototype.simplifyTolerance=function(t){return t*this._bufParams.getSimplifyFactor()};bo.prototype.getRingCurve=function(t,e,n){if(this._distance=n,t.length<=2)return this.getLineCurve(t,n);if(n===0)return bo.copyCoordinates(t);var r=this.getSegGen(n);return this.computeRingBufferCurve(t,e,r),r.getCoordinates()};bo.prototype.computeOffsetCurve=function(t,e,n){var r=this.simplifyTolerance(this._distance);if(e){var i=Or.simplify(t,-r),s=i.length-1;n.initSideSegments(i[s],i[s-1],lt.LEFT),n.addFirstSegment();for(var c=s-2;c>=0;c--)n.addNextSegment(i[c],!0)}else{var l=Or.simplify(t,r),d=l.length-1;n.initSideSegments(l[0],l[1],lt.LEFT),n.addFirstSegment();for(var v=2;v<=d;v++)n.addNextSegment(l[v],!0)}n.addLastSegment()};bo.prototype.getSegGen=function(t){return new fr(this._precisionModel,this._bufParams,t)};bo.prototype.interfaces_=function(){return[]};bo.prototype.getClass=function(){return bo};bo.copyCoordinates=function(t){for(var e=new Array(t.length).fill(null),n=0;ns.getMaxY()||t.findStabbedSegments(e,i.getDirectedEdges(),n)}return n}else if(arguments.length===3){if(Kt(arguments[2],Us)&&arguments[0]instanceof ze&&arguments[1]instanceof t1)for(var c=arguments[0],l=arguments[1],d=arguments[2],v=l.getEdge().getCoordinates(),S=0;St._seg.p1.y&&t._seg.reverse();var E=Math.max(t._seg.p0.x,t._seg.p1.x);if(!(Et._seg.p1.y)&&Et.computeOrientation(t._seg.p0,t._seg.p1,c)!==Et.RIGHT){var C=l.getDepth(lt.LEFT);t._seg.p0.equals(v[S])||(C=l.getDepth(lt.RIGHT));var M=new nc(t._seg,C);d.add(M)}}else if(Kt(arguments[2],Us)&&arguments[0]instanceof ze&&Kt(arguments[1],Us))for(var A=arguments[0],R=arguments[1],z=arguments[2],U=R.iterator();U.hasNext();){var F=U.next();F.isForward()&&t.findStabbedSegments(A,F,z)}}};Qc.prototype.getDepth=function(t){var e=this.findStabbedSegments(t);if(e.size()===0)return 0;var n=Ws.min(e);return n._leftDepth};Qc.prototype.interfaces_=function(){return[]};Qc.prototype.getClass=function(){return Qc};YC.DepthSegment.get=function(){return nc};Object.defineProperties(Qc,YC);var nc=function(){this._upwardSeg=null,this._leftDepth=null;var t=arguments[0],e=arguments[1];this._upwardSeg=new Vt(t),this._leftDepth=e};nc.prototype.compareTo=function(t){var e=t;if(this._upwardSeg.minX()>=e._upwardSeg.maxX())return 1;if(this._upwardSeg.maxX()<=e._upwardSeg.minX())return-1;var n=this._upwardSeg.orientationIndex(e._upwardSeg);return n!==0||(n=-1*e._upwardSeg.orientationIndex(this._upwardSeg),n!==0)?n:this._upwardSeg.compareTo(e._upwardSeg)};nc.prototype.compareX=function(t,e){var n=t.p0.compareTo(e.p0);return n!==0?n:t.p1.compareTo(e.p1)};nc.prototype.toString=function(){return this._upwardSeg.toString()};nc.prototype.interfaces_=function(){return[Es]};nc.prototype.getClass=function(){return nc};var Vn=function(t,e,n){this.p0=t||null,this.p1=e||null,this.p2=n||null};Vn.prototype.area=function(){return Vn.area(this.p0,this.p1,this.p2)};Vn.prototype.signedArea=function(){return Vn.signedArea(this.p0,this.p1,this.p2)};Vn.prototype.interpolateZ=function(t){if(t===null)throw new yr("Supplied point is null.");return Vn.interpolateZ(t,this.p0,this.p1,this.p2)};Vn.prototype.longestSideLength=function(){return Vn.longestSideLength(this.p0,this.p1,this.p2)};Vn.prototype.isAcute=function(){return Vn.isAcute(this.p0,this.p1,this.p2)};Vn.prototype.circumcentre=function(){return Vn.circumcentre(this.p0,this.p1,this.p2)};Vn.prototype.area3D=function(){return Vn.area3D(this.p0,this.p1,this.p2)};Vn.prototype.centroid=function(){return Vn.centroid(this.p0,this.p1,this.p2)};Vn.prototype.inCentre=function(){return Vn.inCentre(this.p0,this.p1,this.p2)};Vn.prototype.interfaces_=function(){return[]};Vn.prototype.getClass=function(){return Vn};Vn.area=function(t,e,n){return Math.abs(((n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y))/2)};Vn.signedArea=function(t,e,n){return((n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y))/2};Vn.det=function(t,e,n,r){return t*r-e*n};Vn.interpolateZ=function(t,e,n,r){var i=e.x,s=e.y,c=n.x-i,l=r.x-i,d=n.y-s,v=r.y-s,S=c*v-l*d,E=t.x-i,C=t.y-s,M=(v*E-l*C)/S,A=(-d*E+c*C)/S,R=e.z+M*(n.z-e.z)+A*(r.z-e.z);return R};Vn.longestSideLength=function(t,e,n){var r=t.distance(e),i=e.distance(n),s=n.distance(t),c=r;return i>c&&(c=i),s>c&&(c=s),c};Vn.isAcute=function(t,e,n){return!(!Ln.isAcute(t,e,n)||!Ln.isAcute(e,n,t)||!Ln.isAcute(n,t,e))};Vn.circumcentre=function(t,e,n){var r=n.x,i=n.y,s=t.x-r,c=t.y-i,l=e.x-r,d=e.y-i,v=2*Vn.det(s,c,l,d),S=Vn.det(c,s*s+c*c,d,l*l+d*d),E=Vn.det(s,s*s+c*c,l,l*l+d*d),C=r-S/v,M=i+E/v;return new ze(C,M)};Vn.perpendicularBisector=function(t,e){var n=e.x-t.x,r=e.y-t.y,i=new Vs(t.x+n/2,t.y+r/2,1),s=new Vs(t.x-r+n/2,t.y+n+r/2,1);return new Vs(i,s)};Vn.angleBisector=function(t,e,n){var r=e.distance(t),i=e.distance(n),s=r/(r+i),c=n.x-t.x,l=n.y-t.y,d=new ze(t.x+s*c,t.y+s*l);return d};Vn.area3D=function(t,e,n){var r=e.x-t.x,i=e.y-t.y,s=e.z-t.z,c=n.x-t.x,l=n.y-t.y,d=n.z-t.z,v=i*d-s*l,S=s*c-r*d,E=r*l-i*c,C=v*v+S*S+E*E,M=Math.sqrt(C)/2;return M};Vn.centroid=function(t,e,n){var r=(t.x+e.x+n.x)/3,i=(t.y+e.y+n.y)/3;return new ze(r,i)};Vn.inCentre=function(t,e,n){var r=e.distance(n),i=t.distance(n),s=t.distance(e),c=r+i+s,l=(r*t.x+i*e.x+s*n.x)/c,d=(r*t.y+i*e.y+s*n.y)/c;return new ze(l,d)};var Ss=function(){this._inputGeom=null,this._distance=null,this._curveBuilder=null,this._curveList=new yt;var t=arguments[0],e=arguments[1],n=arguments[2];this._inputGeom=t,this._distance=e,this._curveBuilder=n};Ss.prototype.addPoint=function(t){if(this._distance<=0)return null;var e=t.getCoordinates(),n=this._curveBuilder.getLineCurve(e,this._distance);this.addCurve(n,Fe.EXTERIOR,Fe.INTERIOR)};Ss.prototype.addPolygon=function(t){var e=this,n=this._distance,r=lt.LEFT;this._distance<0&&(n=-this._distance,r=lt.RIGHT);var i=t.getExteriorRing(),s=In.removeRepeatedPoints(i.getCoordinates());if(this._distance<0&&this.isErodedCompletely(i,this._distance)||this._distance<=0&&s.length<3)return null;this.addPolygonRing(s,n,r,Fe.EXTERIOR,Fe.INTERIOR);for(var c=0;c0&&e.isErodedCompletely(l,-e._distance)||e.addPolygonRing(d,n,lt.opposite(r),Fe.INTERIOR,Fe.EXTERIOR)}};Ss.prototype.isTriangleErodedCompletely=function(t,e){var n=new Vn(t[0],t[1],t[2]),r=n.inCentre(),i=Et.distancePointLine(r,n.p0,n.p1);return i=Ha.MINIMUM_VALID_SIZE&&Et.isCCW(t)&&(s=i,c=r,n=lt.opposite(n));var l=this._curveBuilder.getRingCurve(t,n,e);this.addCurve(l,s,c)};Ss.prototype.add=function(t){if(t.isEmpty())return null;t instanceof li?this.addPolygon(t):t instanceof Nr?this.addLineString(t):t instanceof Fo?this.addPoint(t):t instanceof Gf?this.addCollection(t):t instanceof ec?this.addCollection(t):t instanceof Ga?this.addCollection(t):t instanceof io&&this.addCollection(t)};Ss.prototype.isErodedCompletely=function(t,e){var n=t.getCoordinates();if(n.length<4)return e<0;if(n.length===4)return this.isTriangleErodedCompletely(n,e);var r=t.getEnvelopeInternal(),i=Math.min(r.getHeight(),r.getWidth());return e<0&&2*Math.abs(e)>i};Ss.prototype.addCollection=function(t){for(var e=this,n=0;n=this._max)throw new mp;var t=this._parent.getGeometryN(this._index++);return t instanceof io?(this._subcollectionIterator=new qa(t),this._subcollectionIterator.next()):t};qa.prototype.remove=function(){throw new Error(this.getClass().getName())};qa.prototype.hasNext=function(){if(this._atStart)return!0;if(this._subcollectionIterator!==null){if(this._subcollectionIterator.hasNext())return!0;this._subcollectionIterator=null}return!(this._index>=this._max)};qa.prototype.interfaces_=function(){return[dp]};qa.prototype.getClass=function(){return qa};qa.isAtomic=function(t){return!(t instanceof io)};var ts=function(){this._geom=null;var t=arguments[0];this._geom=t};ts.prototype.locate=function(t){return ts.locate(t,this._geom)};ts.prototype.interfaces_=function(){return[Zf]};ts.prototype.getClass=function(){return ts};ts.isPointInRing=function(t,e){return e.getEnvelopeInternal().intersects(t)?Et.isPointInRing(t,e.getCoordinates()):!1};ts.containsPointInPolygon=function(t,e){if(e.isEmpty())return!1;var n=e.getExteriorRing();if(!ts.isPointInRing(t,n))return!1;for(var r=0;r=0;s--){var c=n._edgeList.get(s),l=c.getSym();i===null&&(i=l),r!==null&&l.setNext(r),r=c}i.setNext(r)},e.prototype.computeDepths=function(){var n=this;if(arguments.length===1){var r=arguments[0],i=this.findIndex(r),s=r.getDepth(lt.LEFT),c=r.getDepth(lt.RIGHT),l=this.computeDepths(i+1,this._edgeList.size(),s),d=this.computeDepths(0,i,l);if(d!==c)throw new Pl("depth mismatch at "+r.getCoordinate())}else if(arguments.length===3){for(var v=arguments[0],S=arguments[1],E=arguments[2],C=E,M=v;M=0;l--){var d=r._resultAreaEdgeList.get(l),v=d.getSym();switch(i===null&&d.getEdgeRing()===n&&(i=d),c){case r._SCANNING_FOR_INCOMING:if(v.getEdgeRing()!==n)continue;s=v,c=r._LINKING_TO_OUTGOING;break;case r._LINKING_TO_OUTGOING:if(d.getEdgeRing()!==n)continue;s.setNextMin(d),c=r._SCANNING_FOR_INCOMING;break}}c===this._LINKING_TO_OUTGOING&&(hn.isTrue(i!==null,"found null for first outgoing dirEdge"),hn.isTrue(i.getEdgeRing()===n,"unable to link last incoming dirEdge"),s.setNextMin(i))},e.prototype.getOutgoingDegree=function(){if(arguments.length===0){for(var n=0,r=this.iterator();r.hasNext();){var i=r.next();i.isInResult()&&n++}return n}else if(arguments.length===1){for(var s=arguments[0],c=0,l=this.iterator();l.hasNext();){var d=l.next();d.getEdgeRing()===s&&c++}return c}},e.prototype.getLabel=function(){return this._label},e.prototype.findCoveredLineEdges=function(){for(var n=Fe.NONE,r=this.iterator();r.hasNext();){var i=r.next(),s=i.getSym();if(!i.isLineEdge()){if(i.isInResult()){n=Fe.INTERIOR;break}if(s.isInResult()){n=Fe.EXTERIOR;break}}}if(n===Fe.NONE)return null;for(var c=n,l=this.iterator();l.hasNext();){var d=l.next(),v=d.getSym();d.isLineEdge()?d.getEdge().setCovered(c===Fe.INTERIOR):(d.isInResult()&&(c=Fe.EXTERIOR),v.isInResult()&&(c=Fe.INTERIOR))}},e.prototype.computeLabelling=function(n){var r=this;t.prototype.computeLabelling.call(this,n),this._label=new Hn(Fe.NONE);for(var i=this.iterator();i.hasNext();)for(var s=i.next(),c=s.getEdge(),l=c.getLabel(),d=0;d<2;d++){var v=l.getLocation(d);(v===Fe.INTERIOR||v===Fe.BOUNDARY)&&r._label.setLocation(d,Fe.INTERIOR)}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Wi),XC=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createNode=function(n){return new Sy(n,new $O)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(qf),pu=function t(){this._pts=null,this._orientation=null;var e=arguments[0];this._pts=e,this._orientation=t.orientation(e)};pu.prototype.compareTo=function(t){var e=t,n=pu.compareOriented(this._pts,this._orientation,e._pts,e._orientation);return n};pu.prototype.interfaces_=function(){return[Es]};pu.prototype.getClass=function(){return pu};pu.orientation=function(t){return In.increasingDirection(t)===1};pu.compareOriented=function(t,e,n,r){for(var i=e?1:-1,s=r?1:-1,c=e?t.length:-1,l=r?n.length:-1,d=e?0:t.length-1,v=r?0:n.length-1;;){var S=t[d].compareTo(n[v]);if(S!==0)return S;d+=i,v+=s;var E=d===c,C=v===l;if(E&&!C)return-1;if(!E&&C)return 1;if(E&&C)return 0}};var Hs=function(){this._edges=new yt,this._ocaMap=new Gi};Hs.prototype.print=function(t){var e=this;t.print("MULTILINESTRING ( ");for(var n=0;n0&&t.print(","),t.print("(");for(var i=r.getCoordinates(),s=0;s0&&t.print(","),t.print(i[s].x+" "+i[s].y);t.println(")")}t.print(") ")};Hs.prototype.addAll=function(t){for(var e=this,n=t.iterator();n.hasNext();)e.add(n.next())};Hs.prototype.findEdgeIndex=function(t){for(var e=this,n=0;n0||!e.coord.equals2D(i);s||r--;var c=new Array(r).fill(null),l=0;c[l++]=new ze(t.coord);for(var d=t.segmentIndex+1;d<=e.segmentIndex;d++)c[l++]=n.edge.pts[d];return s&&(c[l]=e.coord),new B_(c,new Hn(this.edge._label))};Ya.prototype.add=function(t,e,n){var r=new Sa(t,e,n),i=this._nodeMap.get(r);return i!==null?i:(this._nodeMap.put(r,r),r)};Ya.prototype.isIntersection=function(t){for(var e=this.iterator();e.hasNext();){var n=e.next();if(n.coord.equals(t))return!0}return!1};Ya.prototype.interfaces_=function(){return[]};Ya.prototype.getClass=function(){return Ya};var rc=function(){};rc.prototype.getChainStartIndices=function(t){var e=this,n=0,r=new yt;r.add(new _a(n));do{var i=e.findChainEnd(t,n);r.add(new _a(i)),n=i}while(nn?e:n};Al.prototype.getMinX=function(t){var e=this.pts[this.startIndex[t]].x,n=this.pts[this.startIndex[t+1]].x;return en&&(i=1),t._depth[e][r]=i}}};Di.prototype.getDelta=function(t){return this._depth[t][lt.RIGHT]-this._depth[t][lt.LEFT]};Di.prototype.getLocation=function(t,e){return this._depth[t][e]<=0?Fe.EXTERIOR:Fe.INTERIOR};Di.prototype.toString=function(){return"A: "+this._depth[0][1]+","+this._depth[0][2]+" B: "+this._depth[1][1]+","+this._depth[1][2]};Di.prototype.add=function(){var t=this;if(arguments.length===1)for(var e=arguments[0],n=0;n<2;n++)for(var r=1;r<3;r++){var i=e.getLocation(n,r);(i===Fe.EXTERIOR||i===Fe.INTERIOR)&&(t.isNull(n,r)?t._depth[n][r]=Di.depthAtLocation(i):t._depth[n][r]+=Di.depthAtLocation(i))}else if(arguments.length===3){var s=arguments[0],c=arguments[1],l=arguments[2];l===Fe.INTERIOR&&this._depth[s][c]++}};Di.prototype.interfaces_=function(){return[]};Di.prototype.getClass=function(){return Di};Di.depthAtLocation=function(t){return t===Fe.EXTERIOR?0:t===Fe.INTERIOR?1:Di.NULL_VALUE};YC.NULL_VALUE.get=function(){return-1};Object.defineProperties(Di,YC);var B_=function(t){function e(){if(t.call(this),this.pts=null,this._env=null,this.eiList=new Ya(this),this._name=null,this._mce=null,this._isIsolated=!0,this._depth=new Di,this._depthDelta=0,arguments.length===1){var n=arguments[0];e.call(this,n,null)}else if(arguments.length===2){var r=arguments[0],i=arguments[1];this.pts=r,this._label=i}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDepth=function(){return this._depth},e.prototype.getCollapsedEdge=function(){var n=new Array(2).fill(null);n[0]=this.pts[0],n[1]=this.pts[1];var r=new e(n,Hn.toLineLabel(this._label));return r},e.prototype.isIsolated=function(){return this._isIsolated},e.prototype.getCoordinates=function(){return this.pts},e.prototype.setIsolated=function(n){this._isIsolated=n},e.prototype.setName=function(n){this._name=n},e.prototype.equals=function(n){var r=this;if(!(n instanceof e))return!1;var i=n;if(this.pts.length!==i.pts.length)return!1;for(var s=!0,c=!0,l=this.pts.length,d=0;d0?this.pts[0]:null;if(arguments.length===1){var n=arguments[0];return this.pts[n]}},e.prototype.print=function(n){var r=this;n.print("edge "+this._name+": "),n.print("LINESTRING (");for(var i=0;i0&&n.print(","),n.print(r.pts[i].x+" "+r.pts[i].y);n.print(") "+this._label+" "+this._depthDelta)},e.prototype.computeIM=function(n){e.updateIM(this._label,n)},e.prototype.isCollapsed=function(){return!this._label.isArea()||this.pts.length!==3?!1:!!this.pts[0].equals(this.pts[2])},e.prototype.isClosed=function(){return this.pts[0].equals(this.pts[this.pts.length-1])},e.prototype.getMaximumSegmentIndex=function(){return this.pts.length-1},e.prototype.getDepthDelta=function(){return this._depthDelta},e.prototype.getNumPoints=function(){return this.pts.length},e.prototype.printReverse=function(n){var r=this;n.print("edge "+this._name+": ");for(var i=this.pts.length-1;i>=0;i--)n.print(r.pts[i]+" ");n.println("")},e.prototype.getMonotoneChainEdge=function(){return this._mce===null&&(this._mce=new Al(this)),this._mce},e.prototype.getEnvelope=function(){var n=this;if(this._env===null){this._env=new Bt;for(var r=0;r0&&r.append(","),r.append(n.pts[i].x+" "+n.pts[i].y);return r.append(") "+this._label+" "+this._depthDelta),r.toString()},e.prototype.isPointwiseEqual=function(n){var r=this;if(this.pts.length!==n.pts.length)return!1;for(var i=0;ir||this._maxys;if(c)return!1;var l=this.intersectsToleranceSquare(t,e);return hn.isTrue(!(c&&l),"Found bad envelope test"),l};bo.prototype.initCorners=function(t){var e=.5;this._minx=t.x-e,this._maxx=t.x+e,this._miny=t.y-e,this._maxy=t.y+e,this._corner[0]=new ze(this._maxx,this._maxy),this._corner[1]=new ze(this._minx,this._maxy),this._corner[2]=new ze(this._minx,this._miny),this._corner[3]=new ze(this._maxx,this._miny)};bo.prototype.intersects=function(t,e){return this._scaleFactor===1?this.intersectsScaled(t,e):(this.copyScaled(t,this._p0Scaled),this.copyScaled(e,this._p1Scaled),this.intersectsScaled(this._p0Scaled,this._p1Scaled))};bo.prototype.scale=function(t){return Math.round(t*this._scaleFactor)};bo.prototype.getCoordinate=function(){return this._originalPt};bo.prototype.copyScaled=function(t,e){e.x=this.scale(t.x),e.y=this.scale(t.y)};bo.prototype.getSafeEnvelope=function(){if(this._safeEnv===null){var t=bo.SAFE_ENV_EXPANSION_FACTOR/this._scaleFactor;this._safeEnv=new Bt(this._originalPt.x-t,this._originalPt.x+t,this._originalPt.y-t,this._originalPt.y+t)}return this._safeEnv};bo.prototype.intersectsPixelClosure=function(t,e){return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!(this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),this._li.hasIntersection())||(this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),this._li.hasIntersection())||(this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),this._li.hasIntersection()))};bo.prototype.intersectsToleranceSquare=function(t,e){var n=!1,r=!1;return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!(this._li.isProper()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),this._li.isProper())||(this._li.hasIntersection()&&(n=!0),this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),this._li.isProper())||(this._li.hasIntersection()&&(r=!0),this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),this._li.isProper())||n&&r||t.equals(this._pt)||e.equals(this._pt))};bo.prototype.addSnappedNode=function(t,e){var n=t.getCoordinate(e),r=t.getCoordinate(e+1);return this.intersects(n,r)?(t.addIntersection(this.getCoordinate(),e),!0):!1};bo.prototype.interfaces_=function(){return[]};bo.prototype.getClass=function(){return bo};KC.SAFE_ENV_EXPANSION_FACTOR.get=function(){return .75};Object.defineProperties(bo,KC);var fm=function(){this.tempEnv1=new Bt,this.selectedSegment=new Vt};fm.prototype.select=function(){if(arguments.length!==1&&arguments.length===2){var t=arguments[0],e=arguments[1];t.getLineSegment(e,this.selectedSegment),this.select(this.selectedSegment)}};fm.prototype.interfaces_=function(){return[]};fm.prototype.getClass=function(){return fm};var Xf=function(){this._index=null;var t=arguments[0];this._index=t},JC={HotPixelSnapAction:{configurable:!0}};Xf.prototype.snap=function(){if(arguments.length===1){var t=arguments[0];return this.snap(t,null,-1)}else if(arguments.length===3){var e=arguments[0],n=arguments[1],r=arguments[2],i=e.getSafeEnvelope(),s=new QC(e,n,r);return this._index.query(i,{interfaces_:function(){return[hu]},visitItem:function(c){var l=c;l.select(i,s)}}),s.isNodeAdded()}};Xf.prototype.interfaces_=function(){return[]};Xf.prototype.getClass=function(){return Xf};JC.HotPixelSnapAction.get=function(){return QC};Object.defineProperties(Xf,JC);var QC=function(t){function e(){t.call(this),this._hotPixel=null,this._parentEdge=null,this._hotPixelVertexIndex=null,this._isNodeAdded=!1;var n=arguments[0],r=arguments[1],i=arguments[2];this._hotPixel=n,this._parentEdge=r,this._hotPixelVertexIndex=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isNodeAdded=function(){return this._isNodeAdded},e.prototype.select=function(){if(arguments.length===2){var n=arguments[0],r=arguments[1],i=n.getContext();if(this._parentEdge!==null&&i===this._parentEdge&&r===this._hotPixelVertexIndex)return null;this._isNodeAdded=this._hotPixel.addSnappedNode(i,r)}else return t.prototype.select.apply(this,arguments)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(fm),eh=function(){this._li=null,this._interiorIntersections=null;var t=arguments[0];this._li=t,this._interiorIntersections=new yt};eh.prototype.processIntersections=function(t,e,n,r){var i=this;if(t===n&&e===r)return null;var s=t.getCoordinates()[e],c=t.getCoordinates()[e+1],l=n.getCoordinates()[r],d=n.getCoordinates()[r+1];if(this._li.computeIntersection(s,c,l,d),this._li.hasIntersection()&&this._li.isInteriorIntersection()){for(var v=0;v=0;e--){try{t.bufferReducedPrecision(e)}catch(s){if(s instanceof Pl)t._saveException=s;else throw s}finally{}if(t._resultGeometry!==null)return null}throw this._saveException}else if(arguments.length===1){var n=arguments[0],r=ki.precisionScaleFactor(this._argGeom,this._distance,n),i=new Bn(r);this.bufferFixedPrecision(i)}};ki.prototype.computeGeometry=function(){if(this.bufferOriginalPrecision(),this._resultGeometry!==null)return null;var t=this._argGeom.getFactory().getPrecisionModel();t.getType()===Bn.FIXED?this.bufferFixedPrecision(t):this.bufferReducedPrecision()};ki.prototype.setQuadrantSegments=function(t){this._bufParams.setQuadrantSegments(t)};ki.prototype.bufferOriginalPrecision=function(){try{var t=new no(this._bufParams);this._resultGeometry=t.buffer(this._argGeom,this._distance)}catch(e){if(e instanceof Tl)this._saveException=e;else throw e}finally{}};ki.prototype.getResultGeometry=function(t){return this._distance=t,this.computeGeometry(),this._resultGeometry};ki.prototype.setEndCapStyle=function(t){this._bufParams.setEndCapStyle(t)};ki.prototype.interfaces_=function(){return[]};ki.prototype.getClass=function(){return ki};ki.bufferOp=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],n=new ki(t),r=n.getResultGeometry(e);return r}else if(arguments.length===3){if(Number.isInteger(arguments[2])&&arguments[0]instanceof $t&&typeof arguments[1]=="number"){var i=arguments[0],s=arguments[1],c=arguments[2],l=new ki(i);l.setQuadrantSegments(c);var d=l.getResultGeometry(s);return d}else if(arguments[2]instanceof Fn&&arguments[0]instanceof $t&&typeof arguments[1]=="number"){var v=arguments[0],S=arguments[1],E=arguments[2],C=new ki(v,E),M=C.getResultGeometry(S);return M}}else if(arguments.length===4){var A=arguments[0],R=arguments[1],z=arguments[2],U=arguments[3],F=new ki(A);F.setQuadrantSegments(z),F.setEndCapStyle(U);var G=F.getResultGeometry(R);return G}};ki.precisionScaleFactor=function(t,e,n){var r=t.getEnvelopeInternal(),i=rs.max(Math.abs(r.getMaxX()),Math.abs(r.getMaxY()),Math.abs(r.getMinX()),Math.abs(r.getMinY())),s=e>0?e:0,c=i+2*s,l=Math.trunc(Math.log(c)/Math.log(10)+1),d=n-l,v=Math.pow(10,d);return v};gp.CAP_ROUND.get=function(){return Fn.CAP_ROUND};gp.CAP_BUTT.get=function(){return Fn.CAP_FLAT};gp.CAP_FLAT.get=function(){return Fn.CAP_FLAT};gp.CAP_SQUARE.get=function(){return Fn.CAP_SQUARE};gp.MAX_PRECISION_DIGITS.get=function(){return 12};Object.defineProperties(ki,gp);var Qi=function(){this._pt=[new ze,new ze],this._distance=nn.NaN,this._isNull=!0};Qi.prototype.getCoordinates=function(){return this._pt};Qi.prototype.getCoordinate=function(t){return this._pt[t]};Qi.prototype.setMinimum=function(){if(arguments.length===1){var t=arguments[0];this.setMinimum(t._pt[0],t._pt[1])}else if(arguments.length===2){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var r=e.distance(n);rthis._distance&&this.initialize(e,n,r)}};Qi.prototype.interfaces_=function(){return[]};Qi.prototype.getClass=function(){return Qi};var Va=function(){};Va.prototype.interfaces_=function(){return[]};Va.prototype.getClass=function(){return Va};Va.computeDistance=function(){if(arguments[2]instanceof Qi&&arguments[0]instanceof Nr&&arguments[1]instanceof ze)for(var t=arguments[0],e=arguments[1],n=arguments[2],r=t.getCoordinates(),i=new Vt,s=0;s0||this._isIn?Fe.INTERIOR:Fe.EXTERIOR)};Zs.prototype.interfaces_=function(){return[]};Zs.prototype.getClass=function(){return Zs};var eo=function t(){if(this._component=null,this._segIndex=null,this._pt=null,arguments.length===2){var e=arguments[0],n=arguments[1];t.call(this,e,t.INSIDE_AREA,n)}else if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2];this._component=r,this._segIndex=i,this._pt=s}},eT={INSIDE_AREA:{configurable:!0}};eo.prototype.isInsideArea=function(){return this._segIndex===eo.INSIDE_AREA};eo.prototype.getCoordinate=function(){return this._pt};eo.prototype.getGeometryComponent=function(){return this._component};eo.prototype.getSegmentIndex=function(){return this._segIndex};eo.prototype.interfaces_=function(){return[]};eo.prototype.getClass=function(){return eo};eT.INSIDE_AREA.get=function(){return-1};Object.defineProperties(eo,eT);var au=function(t){this._pts=t||null};au.prototype.filter=function(t){t instanceof zo&&this._pts.add(t)};au.prototype.interfaces_=function(){return[va]};au.prototype.getClass=function(){return au};au.getPoints=function(){if(arguments.length===1){var t=arguments[0];return t instanceof zo?Ws.singletonList(t):au.getPoints(t,new yt)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];return e instanceof zo?n.add(e):e instanceof io&&e.apply(new au(n)),n}};var nh=function(){this._locations=null;var t=arguments[0];this._locations=t};nh.prototype.filter=function(t){(t instanceof zo||t instanceof Nr||t instanceof li)&&this._locations.add(new eo(t,0,t.getCoordinate()))};nh.prototype.interfaces_=function(){return[va]};nh.prototype.getClass=function(){return nh};nh.getLocations=function(t){var e=new yt;return t.apply(new nh(e)),e};var Ni=function(){if(this._geom=null,this._terminateDistance=0,this._ptLocator=new Zs,this._minDistanceLocation=null,this._minDistance=nn.MAX_VALUE,arguments.length===2){var t=arguments[0],e=arguments[1];this._geom=[t,e],this._terminateDistance=0}else if(arguments.length===3){var n=arguments[0],r=arguments[1],i=arguments[2];this._geom=new Array(2).fill(null),this._geom[0]=n,this._geom[1]=r,this._terminateDistance=i}};Ni.prototype.computeContainmentDistance=function(){var t=this;if(arguments.length===0){var e=new Array(2).fill(null);if(this.computeContainmentDistance(0,e),this._minDistance<=this._terminateDistance)return null;this.computeContainmentDistance(1,e)}else if(arguments.length===2){var n=arguments[0],r=arguments[1],i=1-n,s=Sl.getPolygons(this._geom[n]);if(s.size()>0){var c=nh.getLocations(this._geom[i]);if(this.computeContainmentDistance(c,s,r),this._minDistance<=this._terminateDistance)return this._minDistanceLocation[i]=r[0],this._minDistanceLocation[n]=r[1],null}}else if(arguments.length===3){if(arguments[2]instanceof Array&&Kt(arguments[0],Us)&&Kt(arguments[1],Us)){for(var l=arguments[0],d=arguments[1],v=arguments[2],S=0;Sthis._minDistance)return null;for(var i=e.getCoordinates(),s=n.getCoordinate(),c=0;cthis._minDistance)return null;for(var M=S.getCoordinates(),A=E.getCoordinates(),R=0;Rthis._distance&&this.initialize(e,n,r)}};Ui.prototype.interfaces_=function(){return[]};Ui.prototype.getClass=function(){return Ui};var ca=function(){};ca.prototype.interfaces_=function(){return[]};ca.prototype.getClass=function(){return ca};ca.computeDistance=function(){if(arguments[2]instanceof Ui&&arguments[0]instanceof Nr&&arguments[1]instanceof ze)for(var t=arguments[0],e=arguments[1],n=arguments[2],r=new Vt,i=t.getCoordinates(),s=0;s1||t<=0)throw new yr("Fraction is not in range (0.0 - 1.0]");this._densifyFrac=t};vs.prototype.compute=function(t,e){this.computeOrientedDistance(t,e,this._ptDist),this.computeOrientedDistance(e,t,this._ptDist)};vs.prototype.distance=function(){return this.compute(this._g0,this._g1),this._ptDist.getDistance()};vs.prototype.computeOrientedDistance=function(t,e,n){var r=new rh(e);if(t.apply(r),n.setMaximum(r.getMaxPointDistance()),this._densifyFrac>0){var i=new gu(e,this._densifyFrac);t.apply(i),n.setMaximum(i.getMaxPointDistance())}};vs.prototype.orientedDistance=function(){return this.computeOrientedDistance(this._g0,this._g1,this._ptDist),this._ptDist.getDistance()};vs.prototype.interfaces_=function(){return[]};vs.prototype.getClass=function(){return vs};vs.distance=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],n=new vs(t,e);return n.distance()}else if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2],c=new vs(r,i);return c.setDensifyFraction(s),c.distance()}};ob.MaxPointDistanceFilter.get=function(){return rh};ob.MaxDensifiedByFractionDistanceFilter.get=function(){return gu};Object.defineProperties(vs,ob);var rh=function(){this._maxPtDist=new Ui,this._minPtDist=new Ui,this._euclideanDist=new ca,this._geom=null;var t=arguments[0];this._geom=t};rh.prototype.filter=function(t){this._minPtDist.initialize(),ca.computeDistance(this._geom,t,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)};rh.prototype.getMaxPointDistance=function(){return this._maxPtDist};rh.prototype.interfaces_=function(){return[Wa]};rh.prototype.getClass=function(){return rh};var gu=function(){this._maxPtDist=new Ui,this._minPtDist=new Ui,this._geom=null,this._numSubSegs=0;var t=arguments[0],e=arguments[1];this._geom=t,this._numSubSegs=Math.trunc(Math.round(1/e))};gu.prototype.filter=function(t,e){var n=this;if(e===0)return null;for(var r=t.getCoordinate(e-1),i=t.getCoordinate(e),s=(i.x-r.x)/this._numSubSegs,c=(i.y-r.y)/this._numSubSegs,l=0;ln){this._isValid=!1;var i=r.getCoordinates();this._errorLocation=i[1],this._errorIndicator=t.getFactory().createLineString(i),this._errMsg="Distance between buffer curve and input is too large ("+this._maxDistanceFound+" at "+js.toLineString(i[0],i[1])+")"}};No.prototype.isValid=function(){var t=Math.abs(this._bufDistance),e=No.MAX_DISTANCE_DIFF_FRAC*t;return this._minValidDistance=t-e,this._maxValidDistance=t+e,this._input.isEmpty()||this._result.isEmpty()?!0:(this._bufDistance>0?this.checkPositiveValid():this.checkNegativeValid(),No.VERBOSE&&Ri.out.println("Min Dist= "+this._minDistanceFound+" err= "+(1-this._minDistanceFound/this._bufDistance)+" Max Dist= "+this._maxDistanceFound+" err= "+(this._maxDistanceFound/this._bufDistance-1)),this._isValid)};No.prototype.checkNegativeValid=function(){if(!(this._input instanceof li||this._input instanceof Ga||this._input instanceof io))return null;var t=this.getPolygonLines(this._input);if(this.checkMinimumDistance(t,this._result,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(t,this._result,this._maxValidDistance)};No.prototype.getErrorIndicator=function(){return this._errorIndicator};No.prototype.checkMinimumDistance=function(t,e,n){var r=new Ni(t,e,n);if(this._minDistanceFound=r.distance(),this._minDistanceFound0&&t>e&&(this._isValid=!1,this._errorMsg="Area of positive buffer is smaller than input",this._errorIndicator=this._result),this._distance<0&&t=2||this._distance>0)return null;this._result.isEmpty()||(this._isValid=!1,this._errorMsg="Result is non-empty",this._errorIndicator=this._result),this.report("ExpectedEmpty")};Oi.prototype.report=function(t){if(!Oi.VERBOSE)return null;Ri.out.println("Check "+t+": "+(this._isValid?"passed":"FAILED"))};Oi.prototype.getErrorMessage=function(){return this._errorMsg};Oi.prototype.interfaces_=function(){return[]};Oi.prototype.getClass=function(){return Oi};Oi.isValidMsg=function(t,e,n){var r=new Oi(t,e,n);return r.isValid()?null:r.getErrorMessage()};Oi.isValid=function(t,e,n){var r=new Oi(t,e,n);return!!r.isValid()};ab.VERBOSE.get=function(){return!1};ab.MAX_ENV_DIFF_FRAC.get=function(){return .012};Object.defineProperties(Oi,ab);var Ia=function(){this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};Ia.prototype.getCoordinates=function(){return this._pts};Ia.prototype.size=function(){return this._pts.length};Ia.prototype.getCoordinate=function(t){return this._pts[t]};Ia.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])};Ia.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:Jc.octant(this.getCoordinate(t),this.getCoordinate(t+1))};Ia.prototype.setData=function(t){this._data=t};Ia.prototype.getData=function(){return this._data};Ia.prototype.toString=function(){return js.toLineString(new jr(this._pts))};Ia.prototype.interfaces_=function(){return[Xa]};Ia.prototype.getClass=function(){return Ia};var Ti=function(){this._findAllIntersections=!1,this._isCheckEndSegmentsOnly=!1,this._li=null,this._interiorIntersection=null,this._intSegments=null,this._intersections=new yt,this._intersectionCount=0,this._keepIntersections=!0;var t=arguments[0];this._li=t,this._interiorIntersection=null};Ti.prototype.getInteriorIntersection=function(){return this._interiorIntersection};Ti.prototype.setCheckEndSegmentsOnly=function(t){this._isCheckEndSegmentsOnly=t};Ti.prototype.getIntersectionSegments=function(){return this._intSegments};Ti.prototype.count=function(){return this._intersectionCount};Ti.prototype.getIntersections=function(){return this._intersections};Ti.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t};Ti.prototype.setKeepIntersections=function(t){this._keepIntersections=t};Ti.prototype.processIntersections=function(t,e,n,r){if(!this._findAllIntersections&&this.hasIntersection()||t===n&&e===r)return null;if(this._isCheckEndSegmentsOnly){var i=this.isEndSegment(t,e)||this.isEndSegment(n,r);if(!i)return null}var s=t.getCoordinates()[e],c=t.getCoordinates()[e+1],l=n.getCoordinates()[r],d=n.getCoordinates()[r+1];this._li.computeIntersection(s,c,l,d),this._li.hasIntersection()&&this._li.isInteriorIntersection()&&(this._intSegments=new Array(4).fill(null),this._intSegments[0]=s,this._intSegments[1]=c,this._intSegments[2]=l,this._intSegments[3]=d,this._interiorIntersection=this._li.getIntersection(0),this._keepIntersections&&this._intersections.add(this._interiorIntersection),this._intersectionCount++)};Ti.prototype.isEndSegment=function(t,e){return e===0||e>=t.size()-2};Ti.prototype.hasIntersection=function(){return this._interiorIntersection!==null};Ti.prototype.isDone=function(){return this._findAllIntersections?!1:this._interiorIntersection!==null};Ti.prototype.interfaces_=function(){return[nc]};Ti.prototype.getClass=function(){return Ti};Ti.createAllIntersectionsFinder=function(t){var e=new Ti(t);return e.setFindAllIntersections(!0),e};Ti.createAnyIntersectionFinder=function(t){return new Ti(t)};Ti.createIntersectionCounter=function(t){var e=new Ti(t);return e.setFindAllIntersections(!0),e.setKeepIntersections(!1),e};var Xs=function(){this._li=new fc,this._segStrings=null,this._findAllIntersections=!1,this._segInt=null,this._isValid=!0;var t=arguments[0];this._segStrings=t};Xs.prototype.execute=function(){if(this._segInt!==null)return null;this.checkInteriorIntersections()};Xs.prototype.getIntersections=function(){return this._segInt.getIntersections()};Xs.prototype.isValid=function(){return this.execute(),this._isValid};Xs.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t};Xs.prototype.checkInteriorIntersections=function(){this._isValid=!0,this._segInt=new Ti(this._li),this._segInt.setFindAllIntersections(this._findAllIntersections);var t=new rb;if(t.setSegmentIntersector(this._segInt),t.computeNodes(this._segStrings),this._segInt.hasIntersection())return this._isValid=!1,null};Xs.prototype.checkValid=function(){if(this.execute(),!this._isValid)throw new Pl(this.getErrorMessage(),this._segInt.getInteriorIntersection())};Xs.prototype.getErrorMessage=function(){if(this._isValid)return"no intersections found";var t=this._segInt.getIntersectionSegments();return"found non-noded intersection between "+js.toLineString(t[0],t[1])+" and "+js.toLineString(t[2],t[3])};Xs.prototype.interfaces_=function(){return[]};Xs.prototype.getClass=function(){return Xs};Xs.computeIntersections=function(t){var e=new Xs(t);return e.setFindAllIntersections(!0),e.isValid(),e.getIntersections()};var oc=function t(){this._nv=null;var e=arguments[0];this._nv=new Xs(t.toSegmentStrings(e))};oc.prototype.checkValid=function(){this._nv.checkValid()};oc.prototype.interfaces_=function(){return[]};oc.prototype.getClass=function(){return oc};oc.toSegmentStrings=function(t){for(var e=new yt,n=t.iterator();n.hasNext();){var r=n.next();e.add(new Ia(r.getCoordinates(),r))}return e};oc.checkValid=function(t){var e=new oc(t);e.checkValid()};var ih=function(t){this._mapOp=t};ih.prototype.map=function(t){for(var e=this,n=new yt,r=0;r0&&r<4&&!this._preserveType?this._factory.createLineString(n):this._factory.createLinearRing(n)};xo.prototype.interfaces_=function(){return[]};xo.prototype.getClass=function(){return xo};var Ka=function t(){if(this._snapTolerance=0,this._srcPts=null,this._seg=new Vt,this._allowSnappingToSourceVertices=!1,this._isClosed=!1,arguments[0]instanceof Nr&&typeof arguments[1]=="number"){var e=arguments[0],n=arguments[1];t.call(this,e.getCoordinates(),n)}else if(arguments[0]instanceof Array&&typeof arguments[1]=="number"){var r=arguments[0],i=arguments[1];this._srcPts=r,this._isClosed=t.isClosed(r),this._snapTolerance=i}};Ka.prototype.snapVertices=function(t,e){for(var n=this,r=this._isClosed?t.size()-1:t.size(),i=0;i=0&&t.add(c+1,new ze(s),!1)}};Ka.prototype.findSegmentIndexToSnap=function(t,e){for(var n=this,r=nn.MAX_VALUE,i=-1,s=0;se&&(e=r)}return e}else if(arguments.length===2){var i=arguments[0],s=arguments[1];return Math.min(Gr.computeOverlaySnapTolerance(i),Gr.computeOverlaySnapTolerance(s))}};Gr.computeSizeBasedSnapTolerance=function(t){var e=t.getEnvelopeInternal(),n=Math.min(e.getHeight(),e.getWidth()),r=n*Gr.SNAP_PRECISION_FACTOR;return r};Gr.snapToSelf=function(t,e,n){var r=new Gr(t);return r.snapToSelf(e,n)};tT.SNAP_PRECISION_FACTOR.get=function(){return 1e-9};Object.defineProperties(Gr,tT);var nT=function(t){function e(n,r,i){t.call(this),this._snapTolerance=n||null,this._snapPts=r||null,this._isSelfSnap=i!==void 0?i:!1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.snapLine=function(n,r){var i=new Ka(n,this._snapTolerance);return i.setAllowSnappingToSourceVertices(this._isSelfSnap),i.snapTo(r)},e.prototype.transformCoordinates=function(n,r){var i=n.toCoordinateArray(),s=this.snapLine(i,this._snapPts);return this._factory.getCoordinateSequenceFactory().create(s)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(xo),Ji=function(){this._isFirst=!0,this._commonMantissaBitsCount=53,this._commonBits=0,this._commonSignExp=null};Ji.prototype.getCommon=function(){return nn.longBitsToDouble(this._commonBits)};Ji.prototype.add=function(t){var e=nn.doubleToLongBits(t);if(this._isFirst)return this._commonBits=e,this._commonSignExp=Ji.signExpBits(this._commonBits),this._isFirst=!1,null;var n=Ji.signExpBits(e);if(n!==this._commonSignExp)return this._commonBits=0,null;this._commonMantissaBitsCount=Ji.numCommonMostSigMantissaBits(this._commonBits,e),this._commonBits=Ji.zeroLowerBits(this._commonBits,64-(12+this._commonMantissaBitsCount))};Ji.prototype.toString=function(){if(arguments.length===1){var t=arguments[0],e=nn.longBitsToDouble(t),n=nn.toBinaryString(t),r="0000000000000000000000000000000000000000000000000000000000000000"+n,i=r.substring(r.length-64),s=i.substring(0,1)+" "+i.substring(1,12)+"(exp) "+i.substring(12)+" [ "+e+" ]";return s}};Ji.prototype.interfaces_=function(){return[]};Ji.prototype.getClass=function(){return Ji};Ji.getBit=function(t,e){var n=1<>52};Ji.zeroLowerBits=function(t,e){var n=(1<=0;r--){if(Ji.getBit(t,r)!==Ji.getBit(e,r))return n;n++}return 52};var _u=function(){this._commonCoord=null,this._ccFilter=new sh},lb={CommonCoordinateFilter:{configurable:!0},Translater:{configurable:!0}};_u.prototype.addCommonBits=function(t){var e=new yu(this._commonCoord);t.apply(e),t.geometryChanged()};_u.prototype.removeCommonBits=function(t){if(this._commonCoord.x===0&&this._commonCoord.y===0)return t;var e=new ze(this._commonCoord);e.x=-e.x,e.y=-e.y;var n=new yu(e);return t.apply(n),t.geometryChanged(),t};_u.prototype.getCommonCoordinate=function(){return this._commonCoord};_u.prototype.add=function(t){t.apply(this._ccFilter),this._commonCoord=this._ccFilter.getCommonCoordinate()};_u.prototype.interfaces_=function(){return[]};_u.prototype.getClass=function(){return _u};lb.CommonCoordinateFilter.get=function(){return sh};lb.Translater.get=function(){return yu};Object.defineProperties(_u,lb);var sh=function(){this._commonBitsX=new Ji,this._commonBitsY=new Ji};sh.prototype.filter=function(t){this._commonBitsX.add(t.x),this._commonBitsY.add(t.y)};sh.prototype.getCommonCoordinate=function(){return new ze(this._commonBitsX.getCommon(),this._commonBitsY.getCommon())};sh.prototype.interfaces_=function(){return[Wa]};sh.prototype.getClass=function(){return sh};var yu=function(){this.trans=null;var t=arguments[0];this.trans=t};yu.prototype.filter=function(t,e){var n=t.getOrdinate(e,0)+this.trans.x,r=t.getOrdinate(e,1)+this.trans.y;t.setOrdinate(e,0,n),t.setOrdinate(e,1,r)};yu.prototype.isDone=function(){return!1};yu.prototype.isGeometryChanged=function(){return!0};yu.prototype.interfaces_=function(){return[Gs]};yu.prototype.getClass=function(){return yu};var Li=function(t,e){this._geom=new Array(2).fill(null),this._snapTolerance=null,this._cbr=null,this._geom[0]=t,this._geom[1]=e,this.computeSnapTolerance()};Li.prototype.selfSnap=function(t){var e=new Gr(t),n=e.snapTo(t,this._snapTolerance);return n};Li.prototype.removeCommonBits=function(t){this._cbr=new _u,this._cbr.add(t[0]),this._cbr.add(t[1]);var e=new Array(2).fill(null);return e[0]=this._cbr.removeCommonBits(t[0].copy()),e[1]=this._cbr.removeCommonBits(t[1].copy()),e};Li.prototype.prepareResult=function(t){return this._cbr.addCommonBits(t),t};Li.prototype.getResultGeometry=function(t){var e=this.snap(this._geom),n=an.overlayOp(e[0],e[1],t);return this.prepareResult(n)};Li.prototype.checkValid=function(t){t.isValid()||Ri.out.println("Snapped geometry is invalid")};Li.prototype.computeSnapTolerance=function(){this._snapTolerance=Gr.computeOverlaySnapTolerance(this._geom[0],this._geom[1])};Li.prototype.snap=function(t){var e=this.removeCommonBits(t),n=Gr.snap(e[0],e[1],this._snapTolerance);return n};Li.prototype.interfaces_=function(){return[]};Li.prototype.getClass=function(){return Li};Li.overlayOp=function(t,e,n){var r=new Li(t,e);return r.getResultGeometry(n)};Li.union=function(t,e){return Li.overlayOp(t,e,an.UNION)};Li.intersection=function(t,e){return Li.overlayOp(t,e,an.INTERSECTION)};Li.symDifference=function(t,e){return Li.overlayOp(t,e,an.SYMDIFFERENCE)};Li.difference=function(t,e){return Li.overlayOp(t,e,an.DIFFERENCE)};var ao=function(t,e){this._geom=new Array(2).fill(null),this._geom[0]=t,this._geom[1]=e};ao.prototype.getResultGeometry=function(t){var e=null,n=!1,r=null;try{e=an.overlayOp(this._geom[0],this._geom[1],t);var i=!0;i&&(n=!0)}catch(s){if(s instanceof Tl)r=s;else throw s}finally{}if(!n)try{e=Li.overlayOp(this._geom[0],this._geom[1],t)}catch(s){throw s instanceof Tl?r:s}finally{}return e};ao.prototype.interfaces_=function(){return[]};ao.prototype.getClass=function(){return ao};ao.overlayOp=function(t,e,n){var r=new ao(t,e);return r.getResultGeometry(n)};ao.union=function(t,e){return ao.overlayOp(t,e,an.UNION)};ao.intersection=function(t,e){return ao.overlayOp(t,e,an.INTERSECTION)};ao.symDifference=function(t,e){return ao.overlayOp(t,e,an.SYMDIFFERENCE)};ao.difference=function(t,e){return ao.overlayOp(t,e,an.DIFFERENCE)};var pm=function(){this.mce=null,this.chainIndex=null;var t=arguments[0],e=arguments[1];this.mce=t,this.chainIndex=e};pm.prototype.computeIntersections=function(t,e){this.mce.computeIntersectsForChain(this.chainIndex,t.mce,t.chainIndex,e)};pm.prototype.interfaces_=function(){return[]};pm.prototype.getClass=function(){return pm};var Vo=function t(){if(this._label=null,this._xValue=null,this._eventType=null,this._insertEvent=null,this._deleteEventIndex=null,this._obj=null,arguments.length===2){var e=arguments[0],n=arguments[1];this._eventType=t.DELETE,this._xValue=e,this._insertEvent=n}else if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2];this._eventType=t.INSERT,this._label=r,this._xValue=i,this._obj=s}},ub={INSERT:{configurable:!0},DELETE:{configurable:!0}};Vo.prototype.isDelete=function(){return this._eventType===Vo.DELETE};Vo.prototype.setDeleteEventIndex=function(t){this._deleteEventIndex=t};Vo.prototype.getObject=function(){return this._obj};Vo.prototype.compareTo=function(t){var e=t;return this._xValuee._xValue?1:this._eventTypee._eventType?1:0};Vo.prototype.getInsertEvent=function(){return this._insertEvent};Vo.prototype.isInsert=function(){return this._eventType===Vo.INSERT};Vo.prototype.isSameLabel=function(t){return this._label===null?!1:this._label===t._label};Vo.prototype.getDeleteEventIndex=function(){return this._deleteEventIndex};Vo.prototype.interfaces_=function(){return[Es]};Vo.prototype.getClass=function(){return Vo};ub.INSERT.get=function(){return 1};ub.DELETE.get=function(){return 2};Object.defineProperties(Vo,ub);var V_=function(){};V_.prototype.interfaces_=function(){return[]};V_.prototype.getClass=function(){return V_};var zi=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._properIntersectionPoint=null,this._li=null,this._includeProper=null,this._recordIsolated=null,this._isSelfIntersection=null,this._numIntersections=0,this.numTests=0,this._bdyNodes=null,this._isDone=!1,this._isDoneWhenProperInt=!1;var t=arguments[0],e=arguments[1],n=arguments[2];this._li=t,this._includeProper=e,this._recordIsolated=n};zi.prototype.isTrivialIntersection=function(t,e,n,r){if(t===n&&this._li.getIntersectionNum()===1){if(zi.isAdjacentSegments(e,r))return!0;if(t.isClosed()){var i=t.getNumPoints()-1;if(e===0&&r===i||r===0&&e===i)return!0}}return!1};zi.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint};zi.prototype.setIsDoneIfProperInt=function(t){this._isDoneWhenProperInt=t};zi.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior};zi.prototype.isBoundaryPointInternal=function(t,e){for(var n=e.iterator();n.hasNext();){var r=n.next(),i=r.getCoordinate();if(t.isIntersection(i))return!0}return!1};zi.prototype.hasProperIntersection=function(){return this._hasProper};zi.prototype.hasIntersection=function(){return this._hasIntersection};zi.prototype.isDone=function(){return this._isDone};zi.prototype.isBoundaryPoint=function(t,e){return e===null?!1:!!(this.isBoundaryPointInternal(t,e[0])||this.isBoundaryPointInternal(t,e[1]))};zi.prototype.setBoundaryNodes=function(t,e){this._bdyNodes=new Array(2).fill(null),this._bdyNodes[0]=t,this._bdyNodes[1]=e};zi.prototype.addIntersections=function(t,e,n,r){if(t===n&&e===r)return null;this.numTests++;var i=t.getCoordinates()[e],s=t.getCoordinates()[e+1],c=n.getCoordinates()[r],l=n.getCoordinates()[r+1];this._li.computeIntersection(i,s,c,l),this._li.hasIntersection()&&(this._recordIsolated&&(t.setIsolated(!1),n.setIsolated(!1)),this._numIntersections++,this.isTrivialIntersection(t,e,n,r)||(this._hasIntersection=!0,(this._includeProper||!this._li.isProper())&&(t.addIntersections(this._li,e,0),n.addIntersections(this._li,r,1)),this._li.isProper()&&(this._properIntersectionPoint=this._li.getIntersection(0).copy(),this._hasProper=!0,this._isDoneWhenProperInt&&(this._isDone=!0),this.isBoundaryPoint(this._li,this._bdyNodes)||(this._hasProperInterior=!0))))};zi.prototype.interfaces_=function(){return[]};zi.prototype.getClass=function(){return zi};zi.isAdjacentSegments=function(t,e){return Math.abs(t-e)===1};var KO=function(t){function e(){t.call(this),this.events=new yt,this.nOverlaps=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.prepareEvents=function(){var n=this;Ws.sort(this.events);for(var r=0;re||this._maxs?1:0};dm.prototype.interfaces_=function(){return[Of]};dm.prototype.getClass=function(){return dm};var JO=function(t){function e(){t.call(this),this._item=null;var n=arguments[0],r=arguments[1],i=arguments[2];this._min=n,this._max=r,this._item=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.query=function(n,r,i){if(!this.intersects(n,r))return null;i.visitItem(this._item)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Ja),QO=function(t){function e(){t.call(this),this._node1=null,this._node2=null;var n=arguments[0],r=arguments[1];this._node1=n,this._node2=r,this.buildExtent(this._node1,this._node2)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.buildExtent=function(n,r){this._min=Math.min(n._min,r._min),this._max=Math.max(n._max,r._max)},e.prototype.query=function(n,r,i){if(!this.intersects(n,r))return null;this._node1!==null&&this._node1.query(n,r,i),this._node2!==null&&this._node2.query(n,r,i)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Ja),Qa=function(){this._leaves=new yt,this._root=null,this._level=0};Qa.prototype.buildTree=function(){var t=this;Ws.sort(this._leaves,new Ja.NodeComparator);for(var e=this._leaves,n=null,r=new yt;;){if(t.buildLevel(e,r),r.size()===1)return r.get(0);n=e,e=r,r=n}};Qa.prototype.insert=function(t,e,n){if(this._root!==null)throw new Error("Index cannot be added to once it has been queried");this._leaves.add(new JO(t,e,n))};Qa.prototype.query=function(t,e,n){this.init(),this._root.query(t,e,n)};Qa.prototype.buildRoot=function(){if(this._root!==null)return null;this._root=this.buildTree()};Qa.prototype.printNode=function(t){Ri.out.println(js.toLineString(new ze(t._min,this._level),new ze(t._max,this._level)))};Qa.prototype.init=function(){if(this._root!==null)return null;this.buildRoot()};Qa.prototype.buildLevel=function(t,e){this._level++,e.clear();for(var n=0;n=2,"found LineString with single point"),this.insertBoundaryPoint(this._argIndex,r[0]),this.insertBoundaryPoint(this._argIndex,r[r.length-1])},e.prototype.getInvalidPoint=function(){return this._invalidPoint},e.prototype.getBoundaryPoints=function(){for(var n=this.getBoundaryNodes(),r=new Array(n.size()).fill(null),i=0,s=n.iterator();s.hasNext();){var c=s.next();r[i++]=c.getCoordinate().copy()}return r},e.prototype.getBoundaryNodes=function(){return this._boundaryNodes===null&&(this._boundaryNodes=this._nodes.getBoundaryNodes(this._argIndex)),this._boundaryNodes},e.prototype.addSelfIntersectionNode=function(n,r,i){if(this.isBoundaryNode(n,r))return null;i===Fe.BOUNDARY&&this._useBoundaryDeterminationRule?this.insertBoundaryPoint(n,r):this.insertPoint(n,r,i)},e.prototype.addPolygonRing=function(n,r,i){if(n.isEmpty())return null;var s=In.removeRepeatedPoints(n.getCoordinates());if(s.length<4)return this._hasTooFewPoints=!0,this._invalidPoint=s[0],null;var c=r,l=i;Et.isCCW(s)&&(c=i,l=r);var d=new B_(s,new Hn(this._argIndex,Fe.BOUNDARY,c,l));this._lineEdgeMap.put(n,d),this.insertEdge(d),this.insertPoint(this._argIndex,s[0],Fe.BOUNDARY)},e.prototype.insertPoint=function(n,r,i){var s=this._nodes.addNode(r),c=s.getLabel();c===null?s._label=new Hn(n,i):c.setLocation(n,i)},e.prototype.createEdgeSetIntersector=function(){return new KO},e.prototype.addSelfIntersectionNodes=function(n){for(var r=this,i=this._edges.iterator();i.hasNext();)for(var s=i.next(),c=s.getLabel().getLocation(n),l=s.eiList.iterator();l.hasNext();){var d=l.next();r.addSelfIntersectionNode(n,d.coord,c)}},e.prototype.add=function(){if(arguments.length===1){var n=arguments[0];if(n.isEmpty())return null;if(n instanceof Ga&&(this._useBoundaryDeterminationRule=!1),n instanceof li)this.addPolygon(n);else if(n instanceof Nr)this.addLineString(n);else if(n instanceof zo)this.addPoint(n);else if(n instanceof Gf)this.addCollection(n);else if(n instanceof Qu)this.addCollection(n);else if(n instanceof Ga)this.addCollection(n);else if(n instanceof io)this.addCollection(n);else throw new Error(n.getClass().getName())}else return t.prototype.add.apply(this,arguments)},e.prototype.addCollection=function(n){for(var r=this,i=0;i50?(this._areaPtLocator===null&&(this._areaPtLocator=new $f(this._parentGeom)),this._areaPtLocator.locate(n)):this._ptLocator.locate(n,this._parentGeom)},e.prototype.findEdge=function(){if(arguments.length===1){var n=arguments[0];return this._lineEdgeMap.get(n)}else return t.prototype.findEdge.apply(this,arguments)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.determineBoundary=function(n,r){return n.isInBoundary(r)?Fe.BOUNDARY:Fe.INTERIOR},e}(Lr),Jf=function(){if(this._li=new fc,this._resultPrecisionModel=null,this._arg=null,arguments.length===1){var t=arguments[0];this.setComputationPrecision(t.getPrecisionModel()),this._arg=new Array(1).fill(null),this._arg[0]=new Sd(0,t)}else if(arguments.length===2){var e=arguments[0],n=arguments[1],r=xs.OGC_SFS_BOUNDARY_RULE;e.getPrecisionModel().compareTo(n.getPrecisionModel())>=0?this.setComputationPrecision(e.getPrecisionModel()):this.setComputationPrecision(n.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new Sd(0,e,r),this._arg[1]=new Sd(1,n,r)}else if(arguments.length===3){var i=arguments[0],s=arguments[1],c=arguments[2];i.getPrecisionModel().compareTo(s.getPrecisionModel())>=0?this.setComputationPrecision(i.getPrecisionModel()):this.setComputationPrecision(s.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new Sd(0,i,c),this._arg[1]=new Sd(1,s,c)}};Jf.prototype.getArgGeometry=function(t){return this._arg[t].getGeometry()};Jf.prototype.setComputationPrecision=function(t){this._resultPrecisionModel=t,this._li.setPrecisionModel(this._resultPrecisionModel)};Jf.prototype.interfaces_=function(){return[]};Jf.prototype.getClass=function(){return Jf};var $u=function(){};$u.prototype.interfaces_=function(){return[]};$u.prototype.getClass=function(){return $u};$u.map=function(){if(arguments[0]instanceof $t&&Kt(arguments[1],$u.MapOp)){for(var t=arguments[0],e=arguments[1],n=new yt,r=0;r=t.size()?null:t.get(e)};Yr.union=function(t){var e=new Yr(t);return e.union()};oT.STRTREE_NODE_CAPACITY.get=function(){return 4};Object.defineProperties(Yr,oT);var U_=function(){};U_.prototype.interfaces_=function(){return[]};U_.prototype.getClass=function(){return U_};U_.union=function(t,e){if(t.isEmpty()||e.isEmpty()){if(t.isEmpty()&&e.isEmpty())return an.createEmptyResult(an.UNION,t,e,t.getFactory());if(t.isEmpty())return e.copy();if(e.isEmpty())return t.copy()}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),ao.overlayOp(t,e,an.UNION)};function pc(){return new j_}function j_(){this.reset()}j_.prototype={constructor:j_,reset:function(){this.s=this.t=0},add:function(t){cS(jg,t,this.t),cS(this,jg.s,this.s),this.s?this.t+=jg.t:this.s=jg.t},valueOf:function(){return this.s}};var jg=new j_;function cS(t,e,n){var r=t.s=e+n,i=r-e,s=r-i;t.t=e-s+(n-i)}var Dr=1e-6,Qn=Math.PI,wl=Qn/2,hS=Qn/4,kl=Qn*2,ju=180/Qn,la=Qn/180,to=Math.abs,e5=Math.atan,ep=Math.atan2,ri=Math.cos,ii=Math.sin,_p=Math.sqrt;function sT(t){return t>1?0:t<-1?Qn:Math.acos(t)}function ah(t){return t>1?wl:t<-1?-wl:Math.asin(t)}function Rd(){}function G_(t,e){t&&pS.hasOwnProperty(t.type)&&pS[t.type](t,e)}var fS={Feature:function(t,e){G_(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++rQn?t-kl:t<-Qn?t+kl:t,e]}i1.invert=i1;function n5(t,e,n){return(t%=kl)?e||n?aT(gS(t),_S(e,n)):gS(t):e||n?_S(e,n):i1}function mS(t){return function(e,n){return e+=t,[e>Qn?e-kl:e<-Qn?e+kl:e,n]}}function gS(t){var e=mS(t);return e.invert=mS(-t),e}function _S(t,e){var n=ri(t),r=ii(t),i=ri(e),s=ii(e);function c(l,d){var v=ri(d),S=ri(l)*v,E=ii(l)*v,C=ii(d),M=C*n+S*r;return[ep(E*i-M*s,S*n-C*r),ah(M*i+E*s)]}return c.invert=function(l,d){var v=ri(d),S=ri(l)*v,E=ii(l)*v,C=ii(d),M=C*i-E*s;return[ep(E*i+C*s,S*n+M*r),ah(M*n-S*r)]},c}function r5(t,e,n,r,i,s){if(n){var c=ri(e),l=ii(e),d=r*n;i==null?(i=e+r*kl,s=e-d/2):(i=yS(c,i),s=yS(c,s),(r>0?is)&&(i+=r*kl));for(var v,S=i;r>0?S>s:S1&&t.push(t.pop().concat(t.shift()))},result:function(){var n=t;return t=[],e=null,n}}}function i5(t,e,n,r,i,s){var c=t[0],l=t[1],d=e[0],v=e[1],S=0,E=1,C=d-c,M=v-l,A;if(A=n-c,!(!C&&A>0)){if(A/=C,C<0){if(A0){if(A>E)return;A>S&&(S=A)}if(A=i-c,!(!C&&A<0)){if(A/=C,C<0){if(A>E)return;A>S&&(S=A)}else if(C>0){if(A0)){if(A/=M,M<0){if(A0){if(A>E)return;A>S&&(S=A)}if(A=s-l,!(!M&&A<0)){if(A/=M,M<0){if(A>E)return;A>S&&(S=A)}else if(M>0){if(A0&&(t[0]=c+S*C,t[1]=l+S*M),E<1&&(e[0]=c+E*C,e[1]=l+E*M),!0}}}}}function l_(t,e){return to(t[0]-e[0])=0;--l)i.point((E=S[l])[0],E[1]);else r(C.x,C.p.x,-1,i);C=C.p}C=C.o,S=C.z,M=!M}while(!C.v);i.lineEnd()}}}function vS(t){if(e=t.length){for(var e,n=0,r=t[0],i;++ne?1:t>=e?0:NaN}function o5(t){return t.length===1&&(t=s5(t)),{left:function(e,n,r,i){for(r==null&&(r=0),i==null&&(i=e.length);r>>1;t(e[s],n)<0?r=s+1:i=s}return r},right:function(e,n,r,i){for(r==null&&(r=0),i==null&&(i=e.length);r>>1;t(e[s],n)>0?i=s:r=s+1}return r}}}function s5(t){return function(e,n){return cT(t(e),n)}}o5(cT);function hT(t){for(var e=t.length,n,r=-1,i=0,s,c;++r=0;)for(c=t[e],n=c.length;--n>=0;)s[--i]=c[n];return s}var Nd=1e9,Hg=-Nd;function a5(t,e,n,r){function i(v,S){return t<=v&&v<=n&&e<=S&&S<=r}function s(v,S,E,C){var M=0,A=0;if(v==null||(M=c(v,E))!==(A=c(S,E))||d(v,S)<0^E>0)do C.point(M===0||M===3?t:n,M>1?r:e);while((M=(M+E+4)%4)!==A);else C.point(S[0],S[1])}function c(v,S){return to(v[0]-t)0?0:3:to(v[0]-n)0?2:1:to(v[1]-e)0?1:0:S>0?3:2}function l(v,S){return d(v.x,S.x)}function d(v,S){var E=c(v,1),C=c(S,1);return E!==C?E-C:E===0?S[1]-v[1]:E===1?v[0]-S[0]:E===2?v[1]-S[1]:S[0]-v[0]}return function(v){var S=v,E=lT(),C,M,A,R,z,U,F,G,H,te,ee,fe={point:pe,lineStart:ae,lineEnd:Ke,polygonStart:Ae,polygonEnd:Y};function pe(tt,ut){i(tt,ut)&&S.point(tt,ut)}function se(){for(var tt=0,ut=0,He=M.length;utr&&(wn-Mt)*(r-rn)>(fn-rn)*(t-Mt)&&++tt:fn<=r&&(wn-Mt)*(r-rn)<(fn-rn)*(t-Mt)&&--tt;return tt}function Ae(){S=E,C=[],M=[],ee=!0}function Y(){var tt=se(),ut=ee&&tt,He=(C=hT(C)).length;(ut||He)&&(v.polygonStart(),ut&&(v.lineStart(),s(null,null,1,v),v.lineEnd()),He&&uT(C,l,tt,s,v),v.polygonEnd()),S=v,C=M=A=null}function ae(){fe.point=Le,M&&M.push(A=[]),te=!0,H=!1,F=G=NaN}function Ke(){C&&(Le(R,z),U&&H&&E.rejoin(),C.push(E.result())),fe.point=pe,H&&S.lineEnd()}function Le(tt,ut){var He=i(tt,ut);if(M&&A.push([tt,ut]),te)R=tt,z=ut,U=He,te=!1,He&&(S.lineStart(),S.point(tt,ut));else if(He&&H)S.point(tt,ut);else{var Ot=[F=Math.max(Hg,Math.min(Nd,F)),G=Math.max(Hg,Math.min(Nd,G))],Gt=[tt=Math.max(Hg,Math.min(Nd,tt)),ut=Math.max(Hg,Math.min(Nd,ut))];i5(Ot,Gt,t,e,n,r)?(H||(S.lineStart(),S.point(Ot[0],Ot[1])),S.point(Gt[0],Gt[1]),He||S.lineEnd(),ee=!1):He&&(S.lineStart(),S.point(tt,ut),ee=!1)}F=tt,G=ut,H=He}return fe}}var cv=pc();function l5(t,e){var n=e[0],r=e[1],i=[ii(n),-ri(n),0],s=0,c=0;cv.reset();for(var l=0,d=t.length;l=0?1:-1,pe=fe*ee,se=pe>Qn,Ae=A*H;if(cv.add(ep(Ae*fe*ii(pe),R*te+Ae*ri(pe))),s+=se?ee+fe*kl:ee,se^C>=n^F>=n){var Y=q_(tp(E),tp(U));r1(Y);var ae=q_(i,Y);r1(ae);var Ke=(se^ee>=0?-1:1)*ah(ae[2]);(r>Ke||r===Ke&&(Y[0]||Y[1]))&&(c+=se^ee>=0?1:-1)}}return(s<-Dr||smm&&(mm=t),eH_&&(H_=e)}pc();function fT(t,e,n,r){return function(i,s){var c=e(s),l=i.invert(r[0],r[1]),d=lT(),v=e(d),S=!1,E,C,M,A={point:R,lineStart:U,lineEnd:F,polygonStart:function(){A.point=G,A.lineStart=H,A.lineEnd=te,C=[],E=[]},polygonEnd:function(){A.point=R,A.lineStart=U,A.lineEnd=F,C=hT(C);var ee=l5(E,l);C.length?(S||(s.polygonStart(),S=!0),uT(C,h5,ee,n,s)):ee&&(S||(s.polygonStart(),S=!0),s.lineStart(),n(null,null,1,s),s.lineEnd()),S&&(s.polygonEnd(),S=!1),C=E=null},sphere:function(){s.polygonStart(),s.lineStart(),n(null,null,1,s),s.lineEnd(),s.polygonEnd()}};function R(ee,fe){var pe=i(ee,fe);t(ee=pe[0],fe=pe[1])&&s.point(ee,fe)}function z(ee,fe){var pe=i(ee,fe);c.point(pe[0],pe[1])}function U(){A.point=z,c.lineStart()}function F(){A.point=R,c.lineEnd()}function G(ee,fe){M.push([ee,fe]);var pe=i(ee,fe);v.point(pe[0],pe[1])}function H(){v.lineStart(),M=[]}function te(){G(M[0][0],M[0][1]),v.lineEnd();var ee=v.clean(),fe=d.result(),pe,se=fe.length,Ae,Y,ae;if(M.pop(),E.push(M),M=null,!!se){if(ee&1){if(Y=fe[0],(Ae=Y.length-1)>0){for(S||(s.polygonStart(),S=!0),s.lineStart(),pe=0;pe1&&ee&2&&fe.push(fe.pop().concat(fe.shift())),C.push(fe.filter(c5))}}return A}}function c5(t){return t.length>1}function h5(t,e){return((t=t.x)[0]<0?t[1]-wl-Dr:wl-t[1])-((e=e.x)[0]<0?e[1]-wl-Dr:wl-e[1])}const wS=fT(function(){return!0},f5,d5,[-Qn,-wl]);function f5(t){var e=NaN,n=NaN,r=NaN,i;return{lineStart:function(){t.lineStart(),i=1},point:function(s,c){var l=s>0?Qn:-Qn,d=to(s-e);to(d-Qn)0?wl:-wl),t.point(r,n),t.lineEnd(),t.lineStart(),t.point(l,n),t.point(s,n),i=0):r!==l&&d>=Qn&&(to(e-r)Dr?e5((ii(e)*(s=ri(r))*ii(n)-ii(r)*(i=ri(e))*ii(t))/(i*s*c)):(e+r)/2}function d5(t,e,n,r){var i;if(t==null)i=n*wl,r.point(-Qn,i),r.point(0,i),r.point(Qn,i),r.point(Qn,0),r.point(Qn,-i),r.point(0,-i),r.point(-Qn,-i),r.point(-Qn,0),r.point(-Qn,i);else if(to(t[0]-e[0])>Dr){var s=t[0]0,i=to(n)>Dr;function s(S,E,C,M){r5(M,t,e,C,S,E)}function c(S,E){return ri(S)*ri(E)>n}function l(S){var E,C,M,A,R;return{lineStart:function(){A=M=!1,R=1},point:function(z,U){var F=[z,U],G,H=c(z,U),te=r?H?0:v(z,U):H?v(z+(z<0?Qn:-Qn),U):0;if(!E&&(A=M=H)&&S.lineStart(),H!==M&&(G=d(E,F),(!G||l_(E,G)||l_(F,G))&&(F[0]+=Dr,F[1]+=Dr,H=c(F[0],F[1]))),H!==M)R=0,H?(S.lineStart(),G=d(F,E),S.point(G[0],G[1])):(G=d(E,F),S.point(G[0],G[1]),S.lineEnd()),E=G;else if(i&&E&&r^H){var ee;!(te&C)&&(ee=d(F,E,!0))&&(R=0,r?(S.lineStart(),S.point(ee[0][0],ee[0][1]),S.point(ee[1][0],ee[1][1]),S.lineEnd()):(S.point(ee[1][0],ee[1][1]),S.lineEnd(),S.lineStart(),S.point(ee[0][0],ee[0][1])))}H&&(!E||!l_(E,F))&&S.point(F[0],F[1]),E=F,M=H,C=te},lineEnd:function(){M&&S.lineEnd(),E=null},clean:function(){return R|(A&&M)<<1}}}function d(S,E,C){var M=tp(S),A=tp(E),R=[1,0,0],z=q_(M,A),U=Gg(z,z),F=z[0],G=U-F*F;if(!G)return!C&&S;var H=n*U/G,te=-n*F/G,ee=q_(R,z),fe=qg(R,H),pe=qg(z,te);uv(fe,pe);var se=ee,Ae=Gg(fe,se),Y=Gg(se,se),ae=Ae*Ae-Y*(Gg(fe,fe)-1);if(!(ae<0)){var Ke=_p(ae),Le=qg(se,(-Ae-Ke)/Y);if(uv(Le,fe),Le=n1(Le),!C)return Le;var tt=S[0],ut=E[0],He=S[1],Ot=E[1],Gt;ut0^Le[1]<(to(Le[0]-tt)Qn^(tt<=Le[0]&&Le[0]<=ut)){var rn=qg(se,(-Ae+Ke)/Y);return uv(rn,fe),[Le,n1(rn)]}}}function v(S,E){var C=r?t:Qn-t,M=0;return S<-C?M|=1:S>C&&(M|=2),E<-C?M|=4:E>C&&(M|=8),M}return fT(c,l,s,r?[0,-t]:[-Qn,t-Qn])}function pT(t){return function(e){var n=new o1;for(var r in t)n[r]=t[r];return n.stream=e,n}}function o1(){}o1.prototype={constructor:o1,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function dT(t,e,n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],s=t.clipExtent&&t.clipExtent();t.scale(150).translate([0,0]),s!=null&&t.clipExtent(null),t5(n,t.stream(xS));var c=xS.result(),l=Math.min(r/(c[1][0]-c[0][0]),i/(c[1][1]-c[0][1])),d=+e[0][0]+(r-l*(c[1][0]+c[0][0]))/2,v=+e[0][1]+(i-l*(c[1][1]+c[0][1]))/2;return s!=null&&t.clipExtent(s),t.scale(l*150).translate([d,v])}function g5(t,e,n){return dT(t,[[0,0],e],n)}var SS=16,_5=ri(30*la);function ES(t,e){return+e?v5(t,e):y5(t)}function y5(t){return pT({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}function v5(t,e){function n(r,i,s,c,l,d,v,S,E,C,M,A,R,z){var U=v-r,F=S-i,G=U*U+F*F;if(G>4*e&&R--){var H=c+C,te=l+M,ee=d+A,fe=_p(H*H+te*te+ee*ee),pe=ah(ee/=fe),se=to(to(ee)-1)e||to((U*Ke+F*Le)/G-.5)>.3||c*C+l*M+d*A<_5)&&(n(r,i,s,c,l,d,Y,ae,se,H/=fe,te/=fe,ee,R,z),z.point(Y,ae),n(Y,ae,se,H,te,ee,v,S,E,C,M,A,R,z))}}return function(r){var i,s,c,l,d,v,S,E,C,M,A,R,z={point:U,lineStart:F,lineEnd:H,polygonStart:function(){r.polygonStart(),z.lineStart=te},polygonEnd:function(){r.polygonEnd(),z.lineStart=F}};function U(pe,se){pe=t(pe,se),r.point(pe[0],pe[1])}function F(){E=NaN,z.point=G,r.lineStart()}function G(pe,se){var Ae=tp([pe,se]),Y=t(pe,se);n(E,C,S,M,A,R,E=Y[0],C=Y[1],S=pe,M=Ae[0],A=Ae[1],R=Ae[2],SS,r),r.point(E,C)}function H(){z.point=U,r.lineEnd()}function te(){F(),z.point=ee,z.lineEnd=fe}function ee(pe,se){G(i=pe,se),s=E,c=C,l=M,d=A,v=R,z.point=G}function fe(){n(E,C,S,M,A,R,s,c,i,l,d,v,SS,r),z.lineEnd=H,H()}return z}}var b5=pT({point:function(t,e){this.stream.point(t*la,e*la)}});function x5(t){return w5(function(){return t})()}function w5(t){var e,n=150,r=480,i=250,s,c,l=0,d=0,v=0,S=0,E=0,C,M,A=null,R=wS,z=null,U,F,G,H=bS,te=.5,ee=ES(Y,te),fe,pe;function se(Le){return Le=M(Le[0]*la,Le[1]*la),[Le[0]*n+s,c-Le[1]*n]}function Ae(Le){return Le=M.invert((Le[0]-s)/n,(c-Le[1])/n),Le&&[Le[0]*ju,Le[1]*ju]}function Y(Le,tt){return Le=e(Le,tt),[Le[0]*n+s,c-Le[1]*n]}se.stream=function(Le){return fe&&pe===Le?fe:fe=b5(R(C,ee(H(pe=Le))))},se.clipAngle=function(Le){return arguments.length?(R=+Le?m5(A=Le*la,6*la):(A=null,wS),Ke()):A*ju},se.clipExtent=function(Le){return arguments.length?(H=Le==null?(z=U=F=G=null,bS):a5(z=+Le[0][0],U=+Le[0][1],F=+Le[1][0],G=+Le[1][1]),Ke()):z==null?null:[[z,U],[F,G]]},se.scale=function(Le){return arguments.length?(n=+Le,ae()):n},se.translate=function(Le){return arguments.length?(r=+Le[0],i=+Le[1],ae()):[r,i]},se.center=function(Le){return arguments.length?(l=Le[0]%360*la,d=Le[1]%360*la,ae()):[l*ju,d*ju]},se.rotate=function(Le){return arguments.length?(v=Le[0]%360*la,S=Le[1]%360*la,E=Le.length>2?Le[2]%360*la:0,ae()):[v*ju,S*ju,E*ju]},se.precision=function(Le){return arguments.length?(ee=ES(Y,te=Le*Le),Ke()):_p(te)},se.fitExtent=function(Le,tt){return dT(se,Le,tt)},se.fitSize=function(Le,tt){return g5(se,Le,tt)};function ae(){M=aT(C=n5(v,S,E),e);var Le=e(l,d);return s=r-Le[0]*n,c=i+Le[1]*n,Ke()}function Ke(){return fe=pe=null,se}return function(){return e=t.apply(this,arguments),se.invert=e.invert&&Ae,ae()}}function mT(t){return function(e,n){var r=ri(e),i=ri(n),s=t(r*i);return[s*i*ii(e),s*ii(n)]}}function gT(t){return function(e,n){var r=_p(e*e+n*n),i=t(r),s=ii(i),c=ri(i);return[ep(e*s,r*c),ah(r&&n*s/r)]}}var S5=mT(function(t){return _p(2/(1+t))});S5.invert=gT(function(t){return 2*ah(t/2)});var _T=mT(function(t){return(t=sT(t))&&t/ii(t)});_T.invert=gT(function(t){return t});function E5(){return x5(_T).scale(79.4188).clipAngle(180-.001)}function IS(t,e){return[t,e]}IS.invert=IS;function I5(t,e,n){n=n||{};var r=n.units||"kilometers",i=n.steps||8;if(!t)throw new Error("geojson is required");if(typeof n!="object")throw new Error("options must be an object");if(typeof i!="number")throw new Error("steps must be an number");if(e===void 0)throw new Error("radius is required");if(i<=0)throw new Error("steps must be greater than 0");var s=[];switch(t.type){case"GeometryCollection":return kC(t,function(c){var l=u_(c,e,r,i);l&&s.push(l)}),Jv(s);case"FeatureCollection":return oS(t,function(c){var l=u_(c,e,r,i);l&&oS(l,function(d){d&&s.push(d)})}),Jv(s)}return u_(t,e,r,i)}function u_(t,e,n,r){var i=t.properties||{},s=t.type==="Feature"?t.geometry:t;if(s.type==="GeometryCollection"){var c=[];return kC(t,function(R){var z=u_(R,e,n,r);z&&c.push(z)}),Jv(c)}var l=C5(s),d={type:s.type,coordinates:vT(s.coordinates,l)},v=new nb,S=v.read(d),E=DO(RO(e,n),"meters"),C=ki.bufferOp(S,E,r),M=new jC;if(C=M.write(C),!yT(C.coordinates)){var A={type:C.type,coordinates:bT(C.coordinates,l)};return fy(A,i)}}function yT(t){return Array.isArray(t[0])?yT(t[0]):isNaN(t[0])}function vT(t,e){return typeof t[0]!="object"?e(t):t.map(function(n){return vT(n,e)})}function bT(t,e){return typeof t[0]!="object"?e.invert(t):t.map(function(n){return bT(n,e)})}function C5(t){var e=OO(t).geometry.coordinates,n=[-e[0],-e[1]];return E5().rotate(n).scale(Ko)}function T5(t,e){var n=O_(t),r=O_(e),i=t.properties||{},s=TC.difference(n.coordinates,r.coordinates);return s.length===0?null:s.length===1?PC(s[0],i):MC(s,i)}function CS(t){let e;for(const n of t)e&&n[0]-e[0]>=180?n[0]-=360:e&&n[0]-e[0]<-180&&(n[0]+=360),e=n}function TS(t,e){const n=T5({type:"Polygon",coordinates:[[[180,90],[-180,90],[-180,-90],[180,-90],[180,90]]]},t);if(!n)return;n.properties={isMask:"y"};const r=I5(t,0);if(r.geometry.type==="Polygon")for(const i of r.geometry.coordinates)CS(i);else for(const i of r.geometry.coordinates)for(const s of i)CS(s);e({type:"FeatureCollection",features:[r,n]})}let LS={type:"FeatureCollection",features:[]};function L5(t,e,n=!0,r=!0,i={},s={},c={fill:{paint:{"fill-color":"#000","fill-opacity":.1},filter:["all",["==",["geometry-type"],"Polygon"],["has","isMask"]]},line:{layout:{"line-cap":"square"},paint:{"line-width":["case",["==",["geometry-type"],"Polygon"],2,3],"line-dasharray":[1,1],"line-color":"#3170fe"},filter:["!",["has","isMask"]]}}){let l,d=[],v,S;function E(){(c!=null&&c.fill||c!=null&&c.line)&&t.addSource("full-geom",{type:"geojson",data:LS}),c!=null&&c.fill&&t.addLayer({...c==null?void 0:c.fill,id:"full-geom-fill",type:"fill",source:"full-geom"}),c!=null&&c.line&&t.addLayer({...c==null?void 0:c.line,id:"full-geom-line",type:"line",source:"full-geom"})}t.loaded()?E():t.once("load",()=>{E()});const C=A=>{l==null||l({type:"mapClick",coordinates:[A.lngLat.lng,A.lngLat.lat]})};function M(A=!1){if(!e)throw new Error;const R=document.createElement("div");return A&&R.classList.add("marker-interactive"),new rO({props:{displayIn:"maplibre"},target:R}),new e.Marker({element:R,offset:[1,-13]})}return{setEventHandler(A){A?(l=A,t.on("click",C)):(l=void 0,t.off("click",C))},flyTo(A,R){t.flyTo({center:A,zoom:R,...i})},fitBounds(A,R,z){t.fitBounds([[A[0],A[1]],[A[2],A[3]]],{padding:R,maxZoom:z,...s})},indicateReverse(A){t.getCanvasContainer().style.cursor=A?"crosshair":""},setReverseMarker(A){!e||!n||(S?A?S.setLngLat(A):(S.remove(),S=void 0):A&&(S=(typeof n=="object"?new e.Marker(n):M()).setLngLat(A).addTo(t),S.getElement().classList.add("marker-reverse")))},setMarkers(A,R){if(!n)return;function z(U){var F;(F=t.getSource("full-geom"))==null||F.setData(U)}for(const U of d)U.remove();if(d.length=0,z(LS),!!e){if(R){let U=!1;if(R.geometry.type==="GeometryCollection"){const F=R.geometry.geometries.filter(G=>G.type==="Polygon"||G.type==="MultiPolygon");if(F.length>0){let G=F.pop();for(const H of F)G=NO(G,H);TS({...R,geometry:G},z),U=!0}else{const G=R.geometry.geometries.filter(H=>H.type==="LineString"||H.type==="MultiLineString");G.length>0&&(z({...R,geometry:{type:"GeometryCollection",geometries:G}}),U=!0)}}if(!U){if(R.geometry.type==="Polygon"||R.geometry.type==="MultiPolygon")TS(R,z);else if(R.geometry.type==="LineString"||R.geometry.type==="MultiLineString"){z(R);return}}n&&d.push((typeof n=="object"?new e.Marker(n):M()).setLngLat(R.center).addTo(t))}if(r)for(const U of A??[]){if(U===R)continue;const F=(typeof r=="object"?new e.Marker(r):M(!0)).setLngLat(U.center).setPopup(new e.Popup({offset:[1,-27],closeButton:!1,closeOnMove:!0,className:"maptiler-gc-popup"}).setText(U.place_type[0]==="reverse"?U.place_name:U.place_name.replace(/,.*/,""))).addTo(t),G=F.getElement();G.addEventListener("click",H=>{H.stopPropagation(),l==null||l({type:"markerClick",id:U.id})}),G.addEventListener("mouseenter",()=>{l==null||l({type:"markerMouseEnter",id:U.id}),F.togglePopup()}),G.addEventListener("mouseleave",()=>{l==null||l({type:"markerMouseLeave",id:U.id}),F.togglePopup()}),d.push(F)}}},setSelectedMarker(A){v&&v.getElement().classList.toggle("marker-selected",!1),v=A>-1?d[A]:void 0,v==null||v.getElement().classList.toggle("marker-selected",!0)},getCenterAndZoom(){const A=t.getCenter();return[t.getZoom(),A.lng,A.lat]}}}function P5(t){let e,n;return{c(){e=su("svg"),n=su("path"),Ie(n,"d","M13.12.706a.982.982 0 0 0-1.391 0L6.907 5.517 2.087.696a.982.982 0 1 0-1.391 1.39l4.821 4.821L.696 11.73a.982.982 0 1 0 1.39 1.39l4.821-4.821 4.822 4.821a.982.982 0 1 0 1.39-1.39L8.298 6.908l4.821-4.822a.988.988 0 0 0 0-1.38Z"),Ie(e,"viewBox","0 0 14 14"),Ie(e,"width","13"),Ie(e,"height","13"),Ie(e,"class","svelte-en2qvf")},m(r,i){xe(r,e,i),oe(e,n)},p:Pt,i:Pt,o:Pt,d(r){r&&be(e)}}}class xT extends Yt{constructor(e){super(),Xt(this,e,null,P5,Ut,{})}}function M5(t){let e,n;return{c(){e=su("svg"),n=su("path"),Ie(n,"d","M15 0C6.705 0 0 6.705 0 15C0 23.295 6.705 30 15 30C23.295 30 30 23.295 30 15C30 6.705 23.295 0 15 0ZM22.5 20.385L20.385 22.5L15 17.115L9.615 22.5L7.5 20.385L12.885 15L7.5 9.615L9.615 7.5L15 12.885L20.385 7.5L22.5 9.615L17.115 15L22.5 20.385Z"),Ie(e,"viewBox","0 0 30 30"),Ie(e,"fill","none"),Ie(e,"xmlns","http://www.w3.org/2000/svg"),Ie(e,"class","svelte-d2loi5")},m(r,i){xe(r,e,i),oe(e,n)},p:Pt,i:Pt,o:Pt,d(r){r&&be(e)}}}class wT extends Yt{constructor(e){super(),Xt(this,e,null,M5,Ut,{})}}function A5(t){let e,n;return{c(){e=_e("img"),Wn(e.src,n=t[3]+"area.svg")||Ie(e,"src",n),Ie(e,"alt",t[6]),Ie(e,"class","svelte-ltkwvy")},m(r,i){xe(r,e,i)},p(r,i){i&8&&!Wn(e.src,n=r[3]+"area.svg")&&Ie(e,"src",n),i&64&&Ie(e,"alt",r[6])},d(r){r&&be(e)}}}function k5(t){let e,n;return{c(){e=_e("img"),Wn(e.src,n=t[3]+"reverse.svg")||Ie(e,"src",n),Ie(e,"alt",t[6]),Ie(e,"class","svelte-ltkwvy")},m(r,i){xe(r,e,i)},p(r,i){i&8&&!Wn(e.src,n=r[3]+"reverse.svg")&&Ie(e,"src",n),i&64&&Ie(e,"alt",r[6])},d(r){r&&be(e)}}}function D5(t){let e,n;return{c(){e=_e("img"),Wn(e.src,n=t[3]+"poi.svg")||Ie(e,"src",n),Ie(e,"alt",t[6]),Ie(e,"class","svelte-ltkwvy")},m(r,i){xe(r,e,i)},p(r,i){i&8&&!Wn(e.src,n=r[3]+"poi.svg")&&Ie(e,"src",n),i&64&&Ie(e,"alt",r[6])},d(r){r&&be(e)}}}function R5(t){let e,n;return{c(){e=_e("img"),Wn(e.src,n=t[3]+"postal_code.svg")||Ie(e,"src",n),Ie(e,"alt",t[6]),Ie(e,"class","svelte-ltkwvy")},m(r,i){xe(r,e,i)},p(r,i){i&8&&!Wn(e.src,n=r[3]+"postal_code.svg")&&Ie(e,"src",n),i&64&&Ie(e,"alt",r[6])},d(r){r&&be(e)}}}function N5(t){let e,n;return{c(){e=_e("img"),Wn(e.src,n=t[3]+"street.svg")||Ie(e,"src",n),Ie(e,"alt",t[6]),Ie(e,"class","svelte-ltkwvy")},m(r,i){xe(r,e,i)},p(r,i){i&8&&!Wn(e.src,n=r[3]+"street.svg")&&Ie(e,"src",n),i&64&&Ie(e,"alt",r[6])},d(r){r&&be(e)}}}function O5(t){let e,n;return{c(){e=_e("img"),Wn(e.src,n=t[3]+"road.svg")||Ie(e,"src",n),Ie(e,"alt",t[6]),Ie(e,"class","svelte-ltkwvy")},m(r,i){xe(r,e,i)},p(r,i){i&8&&!Wn(e.src,n=r[3]+"road.svg")&&Ie(e,"src",n),i&64&&Ie(e,"alt",r[6])},d(r){r&&be(e)}}}function z5(t){let e,n;return{c(){e=_e("img"),Wn(e.src,n=t[3]+"housenumber.svg")||Ie(e,"src",n),Ie(e,"alt",t[6]),Ie(e,"class","svelte-ltkwvy")},m(r,i){xe(r,e,i)},p(r,i){i&8&&!Wn(e.src,n=r[3]+"housenumber.svg")&&Ie(e,"src",n),i&64&&Ie(e,"alt",r[6])},d(r){r&&be(e)}}}function F5(t){let e,n,r,i;return{c(){e=_e("img"),Wn(e.src,n=t[5])||Ie(e,"src",n),Ie(e,"alt",t[4]),Ie(e,"class","svelte-ltkwvy")},m(s,c){xe(s,e,c),r||(i=Lt(e,"error",t[14]),r=!0)},p(s,c){c&32&&!Wn(e.src,n=s[5])&&Ie(e,"src",n),c&16&&Ie(e,"alt",s[4])},d(s){s&&be(e),r=!1,i()}}}function PS(t){let e,n;return{c(){e=_e("span"),n=st(t[6]),Ie(e,"class","secondary svelte-ltkwvy")},m(r,i){xe(r,e,i),oe(e,n)},p(r,i){i&64&&hr(n,r[6])},d(r){r&&be(e)}}}function B5(t){var fe,pe;let e,n,r,i,s,c,l,d,v=(t[7]?t[0].place_name:t[0].place_name.replace(/,.*/,""))+"",S,E,C=t[2]==="always"||t[2]&&!t[0].address&&((fe=t[0].properties)==null?void 0:fe.kind)!=="road"&&((pe=t[0].properties)==null?void 0:pe.kind)!=="road_relation"&&!t[0].id.startsWith("address.")&&!t[0].id.startsWith("postal_code.")&&(!t[0].id.startsWith("poi.")||!t[5])&&!t[7],M,A,R=(t[7]?"":t[0].place_name.replace(/[^,]*,?\s*/,""))+"",z,U,F;function G(se,Ae){var Y,ae;return Ae&1&&(n=null),Ae&1&&(r=null),Ae&1&&(i=null),se[5]?F5:se[0].address?z5:((Y=se[0].properties)==null?void 0:Y.kind)==="road"||((ae=se[0].properties)==null?void 0:ae.kind)==="road_relation"?O5:(n==null&&(n=!!se[0].id.startsWith("address.")),n?N5:(r==null&&(r=!!se[0].id.startsWith("postal_code.")),r?R5:(i==null&&(i=!!se[0].id.startsWith("poi.")),i?D5:se[7]?k5:A5)))}let H=G(t,-1),te=H(t),ee=C&&PS(t);return{c(){e=_e("li"),te.c(),s=We(),c=_e("span"),l=_e("span"),d=_e("span"),S=st(v),E=We(),ee&&ee.c(),M=We(),A=_e("span"),z=st(R),Ie(d,"class","primary svelte-ltkwvy"),Ie(l,"class","svelte-ltkwvy"),Ie(A,"class","line2 svelte-ltkwvy"),Ie(c,"class","texts svelte-ltkwvy"),Ie(e,"tabindex","0"),Ie(e,"data-selected",t[1]),Ie(e,"class","svelte-ltkwvy"),xl(e,"selected",t[1])},m(se,Ae){xe(se,e,Ae),te.m(e,null),oe(e,s),oe(e,c),oe(c,l),oe(l,d),oe(d,S),oe(l,E),ee&&ee.m(l,null),oe(c,M),oe(c,A),oe(A,z),U||(F=[Lt(e,"mouseenter",t[12]),Lt(e,"focus",t[13])],U=!0)},p(se,[Ae]){var Y,ae;H===(H=G(se,Ae))&&te?te.p(se,Ae):(te.d(1),te=H(se),te&&(te.c(),te.m(e,s))),Ae&1&&v!==(v=(se[7]?se[0].place_name:se[0].place_name.replace(/,.*/,""))+"")&&hr(S,v),Ae&37&&(C=se[2]==="always"||se[2]&&!se[0].address&&((Y=se[0].properties)==null?void 0:Y.kind)!=="road"&&((ae=se[0].properties)==null?void 0:ae.kind)!=="road_relation"&&!se[0].id.startsWith("address.")&&!se[0].id.startsWith("postal_code.")&&(!se[0].id.startsWith("poi.")||!se[5])&&!se[7]),C?ee?ee.p(se,Ae):(ee=PS(se),ee.c(),ee.m(l,null)):ee&&(ee.d(1),ee=null),Ae&1&&R!==(R=(se[7]?"":se[0].place_name.replace(/[^,]*,?\s*/,""))+"")&&hr(z,R),Ae&2&&Ie(e,"data-selected",se[1]),Ae&2&&xl(e,"selected",se[1])},i:Pt,o:Pt,d(se){se&&be(e),te.d(),ee&&ee.d(),U=!1,Kr(F)}}}function V5(t,e,n){var G;let r,i,{feature:s}=e,{selected:c=!1}=e,{showPlaceType:l}=e,{missingIconsCache:d}=e,{iconsBaseUrl:v}=e;const S=(G=s.properties)==null?void 0:G.categories;let E,C,M=0,A=s.place_type[0]==="reverse";function R(H){C&&d.add(C),n(10,M++,M)}function z(H){gn.call(this,t,H)}function U(H){gn.call(this,t,H)}const F=H=>R(H.currentTarget);return t.$$set=H=>{"feature"in H&&n(0,s=H.feature),"selected"in H&&n(1,c=H.selected),"showPlaceType"in H&&n(2,l=H.showPlaceType),"missingIconsCache"in H&&n(9,d=H.missingIconsCache),"iconsBaseUrl"in H&&n(3,v=H.iconsBaseUrl)},t.$$.update=()=>{var H,te,ee,fe;if(t.$$.dirty&3640)do n(11,r--,r),n(4,E=S==null?void 0:S[r]),n(5,C=E?v+E.replace(/ /g,"_")+".svg":void 0);while(r>-1&&(!C||d.has(C)));t.$$.dirty&1&&n(6,i=s.id.startsWith("poi.")?(te=(H=s.properties)==null?void 0:H.categories)==null?void 0:te.join(", "):((fe=(ee=s.properties)==null?void 0:ee.place_type_name)==null?void 0:fe[0])??s.place_type[0])},n(11,r=(S==null?void 0:S.length)??0),[s,c,l,v,E,C,i,A,R,d,M,r,z,U,F]}class U5 extends Yt{constructor(e){super(),Xt(this,e,V5,B5,Ut,{feature:0,selected:1,showPlaceType:2,missingIconsCache:9,iconsBaseUrl:3})}}function j5(t){let e;return{c(){e=_e("div"),e.innerHTML='',Ie(e,"class","svelte-7cmwmc")},m(n,r){xe(n,e,r)},p:Pt,i:Pt,o:Pt,d(n){n&&be(e)}}}class G5 extends Yt{constructor(e){super(),Xt(this,e,null,j5,Ut,{})}}function q5(t){let e,n;return{c(){e=su("svg"),n=su("path"),Ie(n,"d","M30.003-26.765C13.46-26.765 0-14.158 0 1.337c0 23.286 24.535 42.952 28.39 46.04.24.192.402.316.471.376.323.282.732.424 1.142.424.41 0 .82-.142 1.142-.424.068-.06.231-.183.471-.376 3.856-3.09 28.39-22.754 28.39-46.04 0-15.495-13.46-28.102-30.003-28.102Zm1.757 12.469c4.38 0 7.858 1.052 10.431 3.158 2.595 2.105 3.89 4.913 3.89 8.422 0 2.34-.53 4.362-1.593 6.063-1.063 1.702-3.086 3.616-6.063 5.742-2.042 1.51-3.337 2.659-3.89 3.446-.532.787-.8 1.82-.8 3.096v1.914h-8.449V15.18c0-2.041.434-3.815 1.306-5.325.872-1.51 2.467-3.118 4.785-4.82 2.233-1.594 3.7-2.89 4.402-3.889a5.582 5.582 0 0 0 1.087-3.35c0-1.382-.51-2.435-1.531-3.158-1.02-.723-2.45-1.087-4.28-1.087-3.19 0-6.826 1.047-10.91 3.131l-3.472-6.986c4.742-2.659 9.77-3.992 15.087-3.992Zm-1.88 37.324c1.765 0 3.124.472 4.08 1.408.98.936 1.47 2.276 1.47 4.02 0 1.68-.49 3.007-1.47 3.985-.977.957-2.336 1.435-4.08 1.435-1.787 0-3.171-.465-4.15-1.4-.978-.958-1.47-2.298-1.47-4.02 0-1.787.48-3.14 1.436-4.054.957-.915 2.355-1.374 4.184-1.374Z"),Ie(e,"viewBox","0 0 60.006 21.412"),Ie(e,"width","14"),Ie(e,"height","20"),Ie(e,"class","svelte-en2qvf")},m(r,i){xe(r,e,i),oe(e,n)},p:Pt,i:Pt,o:Pt,d(r){r&&be(e)}}}class W5 extends Yt{constructor(e){super(),Xt(this,e,null,q5,Ut,{})}}function H5(t){let e,n,r;return{c(){e=su("svg"),n=su("circle"),r=su("path"),Ie(n,"cx","4.789"),Ie(n,"cy","4.787"),Ie(n,"r","3.85"),sr(n,"stroke-width","1.875"),sr(n,"fill","none"),Ie(r,"d","M12.063 12.063 7.635 7.635"),sr(r,"stroke-width","1.875"),sr(r,"stroke-linecap","round"),Ie(e,"xmlns","http://www.w3.org/2000/svg"),Ie(e,"width","13"),Ie(e,"height","13"),Ie(e,"viewBox","0 0 13 13"),Ie(e,"class","svelte-1bpbt60")},m(i,s){xe(i,e,s),oe(e,n),oe(e,r)},p:Pt,i:Pt,o:Pt,d(i){i&&be(e)}}}class Z5 extends Yt{constructor(e){super(),Xt(this,e,null,H5,Ut,{})}}function X5(t,e,n){const r=e[1],i=e[0],s=r-i;return t===r&&n?t:((t-i)%s+s)%s+i}function MS(t){const e=[...t];return e[2]r[0]||i.maxZoom!=null&&i.maxZoomDate.now()){if(!Ed.coords)break e;return Ed.coords}let s;try{return s=await new Promise((c,l)=>{n.signal.addEventListener("abort",()=>{l(Error("aborted"))}),navigator.geolocation.getCurrentPosition(d=>{c([d.coords.longitude,d.coords.latitude].map(v=>v.toFixed(6)).join(","))},d=>{l(d)},i)}),s}catch{}finally{i.cachedLocationExpiry&&(Ed={time:Date.now(),coords:s})}if(n.signal.aborted)return}if(i.type==="server-geolocation")return"ip";if(r&&i.type==="map-center")return r[1].toFixed(6)+","+r[2].toFixed(6)}}const AS=/(NORTH|SOUTH|[NS])?[\s]*([+-]?[0-8]?[0-9](?:[\.,]\d{3,}))[\s]*([•º°]?)[\s]*(NORTH|SOUTH|[NS])?[\s]*[,/;]?[\s]*(EAST|WEST|[EW])?[\s]*([+-]?[0-1]?[0-9]?[0-9](?:[\.,]\d{3,}))[\s]*([•º°]?)[\s]*(EAST|WEST|[EW])?/i,kS=/(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(\.)\s*([0-5]?[0-9])\s*(\.)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(\.)\s*([0-5]?[0-9])\s*(\.)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(EAST|WEST|[EW])?/i,DS=/(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)\s*(EAST|WEST|[EW])?/i,RS=/(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|’’|´´|["″”\.])?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|´´|’’|["″”\.])?\s*(EAST|WEST|[EW])?/i;function $5(t){if(!["DMS","DM","DD"].includes(t))throw new Error("invalid format specified");if(this.decimalCoordinates&&this.decimalCoordinates.trim()){if(t=="DD")return this.decimalCoordinates;const e=this.decimalCoordinates.split(",").map(c=>Number(c.trim()));let n=NS(e[0],t),r=NS(e[1],t);n.endsWith('.0"')&&r.endsWith('.0"')&&(n=n.replace(/\.0"$/,'"'),r=r.replace(/\.0"$/,'"'));const i=e[0]>=0?" N":" S",s=e[1]>=0?" E":" W";return`${n+i}, ${r+s}`}else throw new Error("no decimal coordinates to convert")}function NS(t,e){const n=Math.abs(t),r=Math.floor(n),i=(n-r)*60;if(e=="DM"){let l=K5(i,3).toFixed(3).padStart(6,"0");return`${r}° ${l}'`}let s=Math.floor(i),c=((i-s)*60).toFixed(1).padStart(4,"0");return s=s.toString().padStart(2,"0"),`${r}° ${s}' ${c}"`}function K5(t,e){const n=Math.pow(10,e);return Math.round((t+Number.EPSILON)*n)/n}function hb(t,e){e||(e=5),t=t.replace(/\s+/g," ").trim();let n=null,r=null,i="",s="",c=[],l=!1;if(AS.test(t))if(c=AS.exec(t),l=Zg(c),l){if(n=c[2],r=c[6],n.includes(",")&&(n=n.replace(",",".")),r.includes(",")&&(r=r.replace(",",".")),Number(Math.round(n))==Number(n))throw new Error("integer only coordinate provided");if(Number(Math.round(r))==Number(r))throw new Error("integer only coordinate provided");c[1]?(i=c[1],s=c[5]):c[4]&&(i=c[4],s=c[8])}else throw new Error("invalid decimal coordinate format");else if(kS.test(t))if(c=kS.exec(t),l=Zg(c),l)n=Math.abs(parseInt(c[2])),c[4]&&(n+=c[4]/60),c[6]&&(n+=c[6].replace(",",".")/3600),parseInt(c[2])<0&&(n=-1*n),r=Math.abs(parseInt(c[9])),c[11]&&(r+=c[11]/60),c[13]&&(r+=c[13].replace(",",".")/3600),parseInt(c[9])<0&&(r=-1*r),c[1]?(i=c[1],s=c[8]):c[7]&&(i=c[7],s=c[14]);else throw new Error("invalid DMS coordinates format");else if(DS.test(t))if(c=DS.exec(t),l=Zg(c),l)n=Math.abs(parseInt(c[2])),c[4]&&(n+=c[4]/60),c[6]&&(n+=c[6]/3600),parseInt(c[2])<0&&(n=-1*n),r=Math.abs(parseInt(c[10])),c[12]&&(r+=c[12]/60),c[14]&&(r+=c[14]/3600),parseInt(c[10])<0&&(r=-1*r),c[1]?(i=c[1],s=c[9]):c[8]&&(i=c[8],s=c[16]);else throw new Error("invalid DMS coordinates format");else if(RS.test(t))if(c=RS.exec(t),l=Zg(c),l)n=Math.abs(parseInt(c[2])),c[4]&&(n+=c[4]/60),c[6]&&(n+=c[6]/3600),parseInt(c[2])<0&&(n=-1*n),r=Math.abs(parseInt(c[10])),c[12]&&(r+=c[12]/60),c[14]&&(r+=c[14]/3600),parseInt(c[10])<0&&(r=-1*r),c[1]?(i=c[1],s=c[9]):c[8]&&(i=c[8],s=c[16]);else throw new Error("invalid coordinates format");if(l){if(Math.abs(r)>=180)throw new Error("invalid longitude value");if(Math.abs(n)>=90)throw new Error("invalid latitude value");if((i||s)&&(!i||!s))throw new Error("invalid coordinates format");if(i&&i==s)throw new Error("invalid coordinates format");let d=/S|SOUTH/i;d.test(i)&&n>0&&(n=-1*n),d=/W|WEST/i,d.test(s)&&r>0&&(r=-1*r);const v=c[0].trim();let S,E;const C=/[,/;\u0020]/g,M=v.match(C);if(M==null){const z=Math.floor(t.length/2);S=v.substring(0,z).trim(),E=v.substring(z).trim()}else{let z;M.length%2==1?z=Math.floor(M.length/2):z=M.length/2-1;let U=0;if(z==0)U=v.indexOf(M[0]),S=v.substring(0,U).trim(),E=v.substring(U+1).trim();else{let F=0,G=0;for(;F<=z;)U=v.indexOf(M[F],G),G=U+1,F++;S=v.substring(0,U).trim(),E=v.substring(U+1).trim()}}const A=S.split(".");if(A.length==2&&A[1]==0&&A[1].length!=2)throw new Error("invalid coordinates format");const R=E.split(".");if(R.length==2&&R[1]==0&&R[1].length!=2)throw new Error("invalid coordinates format");if(/^\d+$/.test(S)||/^\d+$/.test(E))throw new Error("degree only coordinate/s provided");return isNaN(n)&&n.includes(",")&&(n=n.replace(",",".")),n=Number(Number(n).toFixed(e)),isNaN(r)&&r.includes(",")&&(r=r.replace(",",".")),r=Number(Number(r).toFixed(e)),Object.freeze({verbatimCoordinates:v,verbatimLatitude:S,verbatimLongitude:E,decimalLatitude:n,decimalLongitude:r,decimalCoordinates:`${n},${r}`,closeEnough:J5,toCoordinateFormat:$5})}else throw new Error("coordinates pattern match failed")}function Zg(t){if(!isNaN(t[0]))return!1;const e=[...t];if(e.shift(),e.length%2>0)return!1;const n=/^[-+]?\d+([\.,]\d+)?$/,r=/[eastsouthnorthwest]+/i,i=e.length/2;for(let s=0;s{e.decimalLatitude?t.push(e):t.push({...e,...tz})}),[...t,...nz,...rz]}const oz=iz();hb.formats=oz.map(t=>t.verbatimCoordinates);const sz=hb;function zS(t,e,n){const r=t.slice();return r[81]=e[n],r[83]=n,r}function FS(t){let e,n;return e=new G5({}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function BS(t){let e,n,r,i,s;return n=new W5({}),{c(){e=_e("button"),Ge(n.$$.fragment),Ie(e,"type","button"),Ie(e,"title",t[9]),Ie(e,"class","svelte-zh3kmv"),xl(e,"active",t[0])},m(c,l){xe(c,e,l),Ue(n,e,null),r=!0,i||(s=Lt(e,"click",t[67]),i=!0)},p(c,l){(!r||l[0]&512)&&Ie(e,"title",c[9]),(!r||l[0]&1)&&xl(e,"active",c[0])},i(c){r||(ue(n.$$.fragment,c),r=!0)},o(c){ye(n.$$.fragment,c),r=!1},d(c){c&&be(e),je(n),i=!1,s()}}}function az(t){let e,n=[],r=new Map,i,s,c,l=bs(t[14]);const d=v=>v[81].id+(v[81].address?","+v[81].address:"");for(let v=0;v{fe=null}),jn()),(!G||tt[0]&2)&&xl(v,"displayable",Le[1]!==""),Le[5]===!0?pe?(pe.p(Le,tt),tt[0]&32&&ue(pe,1)):(pe=BS(Le),pe.c(),ue(pe,1),pe.m(r,A)):pe&&(Un(),ye(pe,1,1,()=>{pe=null}),jn()),Ae&&Ae.p&&(!G||tt[1]&134217728)&&Ir(Ae,se,Le,Le[58],G?Er(se,Le[58],tt,null):Cr(Le[58]),null);let ut=z;z=Ke(Le),z===ut?~z&&ae[z].p(Le,tt):(U&&(Un(),ye(ae[ut],1,1,()=>{ae[ut]=null}),jn()),~z?(U=ae[z],U?U.p(Le,tt):(U=ae[z]=Y[z](Le),U.c()),ue(U,1),U.m(n,null)):U=null),(!G||tt[0]&4&&F!==(F=h_(Le[2])+" svelte-zh3kmv"))&&Ie(n,"class",F),(!G||tt[0]&22)&&xl(n,"can-collapse",Le[4]&&Le[1]==="")},i(Le){G||(ue(ee),ue(s.$$.fragment,Le),ue(E.$$.fragment,Le),ue(fe),ue(pe),ue(Ae,Le),ue(U),G=!0)},o(Le){ye(ee),ye(s.$$.fragment,Le),ye(E.$$.fragment,Le),ye(fe),ye(pe),ye(Ae,Le),ye(U),G=!1},d(Le){Le&&(be(e),be(n)),je(s),t[61](null),je(E),fe&&fe.d(),pe&&pe.d(),Ae&&Ae.d(Le),~z&&ae[z].d(),H=!1,Kr(te)}}}function fz(t,e,n){let r,{$$slots:i={},$$scope:s}=e,{class:c=void 0}=e,{apiKey:l}=e,{bbox:d=void 0}=e,{clearButtonTitle:v="clear"}=e,{clearOnBlur:S=!1}=e,{collapsed:E=!1}=e,{country:C=void 0}=e,{debounceSearch:M=200}=e,{enableReverse:A=!1}=e,{errorMessage:R="Something went wrong…"}=e,{filter:z=()=>!0}=e,{flyTo:U=!0}=e,{fuzzyMatch:F=!0}=e,{language:G=void 0}=e,{limit:H=void 0}=e,{mapController:te=void 0}=e,{minLength:ee=2}=e,{noResultsMessage:fe="Oops! Looks like you're trying to predict something that's not quite right. We can't seem to find what you're looking for. Maybe try double-checking your spelling or try a different search term. Keep on typing - we'll do our best to get you where you need to go!"}=e,{placeholder:pe="Search"}=e,{proximity:se=[{type:"server-geolocation"}]}=e,{reverseActive:Ae=A==="always"}=e,{reverseButtonTitle:Y="toggle reverse geocoding"}=e,{searchValue:ae=""}=e,{showFullGeometry:Ke=!0}=e,{showPlaceType:Le="ifNeeded"}=e,{showResultsWhileTyping:tt=!0}=e,{selectFirst:ut=!0}=e,{flyToSelected:He=!1}=e,{markerOnSelected:Ot=!0}=e,{types:Gt=void 0}=e,{excludeTypes:vt=!1}=e,{zoom:At=16}=e,{maxZoom:Mt=18}=e,{apiUrl:rn="https://api.maptiler.com/geocoding"}=e,{fetchParameters:wn={}}=e,{iconsBaseUrl:fn="https://cdn.maptiler.com/maptiler-geocoding-control/v1.2.2/icons/"}=e,{adjustUrlQuery:_n=Q=>{}}=e;function pn(){Re.focus()}function Yn(){Re.blur()}function zr(Q,Pe=!0){n(1,ae=Q),Pe?(n(15,It=-1),zl()):(ui(),setTimeout(()=>{Re.focus(),Re.select()}))}function Pn(){n(14,ne=void 0),n(55,dt=void 0),n(15,It=-1)}function ar(){n(54,Me=[]),n(55,dt=void 0)}let Zn=!1,ne,Me,dt,en="",Re,It=-1,Cn,yn=[],cr,Uo,Cs,Ks;const tl=new Set,Fi=vu();ro(()=>{te&&(te.setEventHandler(void 0),te.indicateReverse(!1),te.setSelectedMarker(-1),te.setMarkers(void 0,void 0))});function zl(Q){if(Uo&&(clearTimeout(Uo),Uo=void 0),It>-1&&ne)n(55,dt=ne[It]),n(1,ae=dt.place_type[0]==="reverse"?dt.place_name:dt.place_name.replace(/,.*/,"")),n(18,Cn=void 0),n(54,Me=void 0),n(15,It=-1);else if(ae){const Pe=Q||!Ts(ae);at(ae,{exact:!0}).then(()=>{n(54,Me=ne),n(55,dt=void 0),Pe&&ls()}).catch(Se=>n(18,Cn=Se))}}function Ts(Q){try{return sz(Q,6)}catch{return!1}}async function at(Q,{byId:Pe=!1,exact:Se=!1}={}){n(18,Cn=void 0),cr==null||cr.abort();const Ne=new AbortController;n(19,cr=Ne);try{const qe=Ts(Q),Ye=new URLSearchParams;if(G!==void 0&&Ye.set("language",Array.isArray(G)?G.join(","):G??""),Gt&&Ye.set("types",Gt.join(",")),vt&&Ye.set("excludeTypes",String(vt)),d&&Ye.set("bbox",d.map(Qt=>Qt.toFixed(6)).join(",")),C&&Ye.set("country",Array.isArray(C)?C.join(","):C),!Pe&&!qe){const Qt=await Y5(te,se,Ne);Qt&&Ye.set("proximity",Qt),(Se||!tt)&&Ye.set("autocomplete","false"),Ye.set("fuzzyMatch",String(F))}H!==void 0&&(!qe||(Gt==null?void 0:Gt.length)===1)&&Ye.set("limit",String(H)),Ye.set("key",l),_n(Ye);const Je=rn+"/"+encodeURIComponent(qe?qe.decimalLongitude+","+qe.decimalLatitude:Q)+".json?"+Ye.toString();if(Je===en){Pe?(n(14,ne=void 0),n(55,dt=yn[0])):n(14,ne=yn);return}en=Je;const Dt=await fetch(Je,{signal:Ne.signal,...wn});if(!Dt.ok)throw new Error(await Dt.text());const zt=await Dt.json();Fi("response",{url:Je,featureCollection:zt}),Pe?(n(14,ne=void 0),n(55,dt=zt.features[0]),yn=[dt]):(n(14,ne=zt.features.filter(z)),qe&&ne.unshift({type:"Feature",properties:{},id:"reverse_"+qe.decimalLongitude+"_"+qe.decimalLatitude,text:qe.decimalLatitude+", "+qe.decimalLongitude,place_name:qe.decimalLatitude+", "+qe.decimalLongitude,place_type:["reverse"],center:[qe.decimalLongitude,qe.decimalLatitude],bbox:[qe.decimalLongitude,qe.decimalLatitude,qe.decimalLongitude,qe.decimalLatitude],geometry:{type:"Point",coordinates:[qe.decimalLongitude,qe.decimalLatitude]}}),yn=ne,qe&&Re.focus())}catch(qe){if(qe&&typeof qe=="object"&&"name"in qe&&qe.name==="AbortError")return;throw qe}finally{Ne===cr&&n(19,cr=void 0)}}function ls(){var Se;if(!(Me!=null&&Me.length)||!U)return;const Q=[180,90,-180,-90],Pe=!Me.some(Ne=>!Ne.matching_text);for(const Ne of Me)if(Pe||!Ne.matching_text)for(const qe of[0,1,2,3])Q[qe]=Math[qe<2?"min":"max"](Q[qe],((Se=Ne.bbox)==null?void 0:Se[qe])??Ne.center[qe%2]);te&&Me.length>0&&(dt&&Q[0]===Q[2]&&Q[1]===Q[3]?te.flyTo(dt.center,At):te.fitBounds(MS(Q),50,Mt))}function lo(Q){n(0,Ae=A==="always"),n(14,ne=void 0),n(55,dt=void 0),n(15,It=-1),zr(Q[1].toFixed(6)+", "+X5(Q[0],[-180,180],!0).toFixed(6),!1)}function Fl(Q){if(!ne)return;let Pe=Q.key==="ArrowDown"?1:Q.key==="ArrowUp"?-1:0;Pe&&(It===(ut?0:-1)&&Pe===-1&&n(15,It=ne.length),n(15,It+=Pe),It>=ne.length&&n(15,It=-1),It<0&&ut&&n(15,It=0),Q.preventDefault())}function ui(Q=!0){if(n(18,Cn=void 0),tt){if(Uo&&clearTimeout(Uo),ae.length{at(Pe).catch(Se=>n(18,Cn=Se))},Q?M:0)}else n(14,ne=void 0),n(18,Cn=void 0)}function ft(Q){n(55,dt=Q),n(1,ae=Q.place_name),n(15,It=-1)}const ln=()=>Re.focus();function sn(Q){ai[Q?"unshift":"push"](()=>{Re=Q,n(17,Re)})}function Hr(){ae=this.value,n(1,ae),n(13,Zn),n(27,S)}const us=()=>n(13,Zn=!0),on=()=>n(13,Zn=!1),Aa=()=>ui(),Jr=()=>{n(1,ae=""),Re.focus()},me=()=>n(0,Ae=!Ae),q=()=>n(18,Cn=void 0),Z=Q=>n(15,It=Q),J=Q=>ft(Q),le=()=>{ut||n(15,It=-1)},Te=()=>{};return t.$$set=Q=>{"class"in Q&&n(2,c=Q.class),"apiKey"in Q&&n(25,l=Q.apiKey),"bbox"in Q&&n(26,d=Q.bbox),"clearButtonTitle"in Q&&n(3,v=Q.clearButtonTitle),"clearOnBlur"in Q&&n(27,S=Q.clearOnBlur),"collapsed"in Q&&n(4,E=Q.collapsed),"country"in Q&&n(28,C=Q.country),"debounceSearch"in Q&&n(29,M=Q.debounceSearch),"enableReverse"in Q&&n(5,A=Q.enableReverse),"errorMessage"in Q&&n(6,R=Q.errorMessage),"filter"in Q&&n(30,z=Q.filter),"flyTo"in Q&&n(31,U=Q.flyTo),"fuzzyMatch"in Q&&n(32,F=Q.fuzzyMatch),"language"in Q&&n(33,G=Q.language),"limit"in Q&&n(34,H=Q.limit),"mapController"in Q&&n(35,te=Q.mapController),"minLength"in Q&&n(36,ee=Q.minLength),"noResultsMessage"in Q&&n(7,fe=Q.noResultsMessage),"placeholder"in Q&&n(8,pe=Q.placeholder),"proximity"in Q&&n(37,se=Q.proximity),"reverseActive"in Q&&n(0,Ae=Q.reverseActive),"reverseButtonTitle"in Q&&n(9,Y=Q.reverseButtonTitle),"searchValue"in Q&&n(1,ae=Q.searchValue),"showFullGeometry"in Q&&n(38,Ke=Q.showFullGeometry),"showPlaceType"in Q&&n(10,Le=Q.showPlaceType),"showResultsWhileTyping"in Q&&n(39,tt=Q.showResultsWhileTyping),"selectFirst"in Q&&n(11,ut=Q.selectFirst),"flyToSelected"in Q&&n(40,He=Q.flyToSelected),"markerOnSelected"in Q&&n(41,Ot=Q.markerOnSelected),"types"in Q&&n(42,Gt=Q.types),"excludeTypes"in Q&&n(43,vt=Q.excludeTypes),"zoom"in Q&&n(44,At=Q.zoom),"maxZoom"in Q&&n(45,Mt=Q.maxZoom),"apiUrl"in Q&&n(46,rn=Q.apiUrl),"fetchParameters"in Q&&n(47,wn=Q.fetchParameters),"iconsBaseUrl"in Q&&n(12,fn=Q.iconsBaseUrl),"adjustUrlQuery"in Q&&n(48,_n=Q.adjustUrlQuery),"$$scope"in Q&&n(58,s=Q.$$scope)},t.$$.update=()=>{if(t.$$.dirty[0]&134225920&&setTimeout(()=>{n(16,Cs=Zn),S&&!Zn&&n(1,ae="")}),t.$$.dirty[0]&16386|t.$$.dirty[1]&32&&ae.lengthn(18,Cn=Q)),t.$$.dirty[1]&50356241&&(te&&dt&&dt.id!==Ks&&U&&(!dt.bbox||dt.bbox[0]===dt.bbox[2]&&dt.bbox[1]===dt.bbox[3]?te.flyTo(dt.center,dt.id.startsWith("poi.")||dt.id.startsWith("address.")?Mt:At):te.fitBounds(MS(dt.bbox),50,Mt),n(14,ne=void 0),n(54,Me=void 0),n(15,It=-1)),n(56,Ks=dt==null?void 0:dt.id)),t.$$.dirty[0]&18432&&ut&&ne!=null&&ne.length&&n(15,It=0),t.$$.dirty[0]&2050&&(ut||n(15,It=-1)),t.$$.dirty[0]&16384|t.$$.dirty[1]&8388608&&Me!==ne&&n(54,Me=void 0),t.$$.dirty[0]&81921|t.$$.dirty[1]&8388624&&te&&te.setEventHandler(Q=>{switch(Q.type){case"mapClick":Ae&&lo(Q.coordinates);break;case"markerClick":{const Pe=ne==null?void 0:ne.find(Se=>Se.id===Q.id);Pe&&ft(Pe)}break;case"markerMouseEnter":Me&&n(15,It=Cs?(ne==null?void 0:ne.findIndex(Pe=>Pe.id===Q.id))??-1:-1);break;case"markerMouseLeave":Me&&n(15,It=-1);break}}),t.$$.dirty[0]&49152&&n(57,r=ne==null?void 0:ne[It]),t.$$.dirty[1]&67133969&&te&&r&&U&&He&&te.flyTo(r.center,r.id.startsWith("poi.")||r.id.startsWith("address.")?Mt:At),t.$$.dirty[1]&1040&&(Ot||te==null||te.setMarkers(void 0,void 0)),t.$$.dirty[1]&75498512&&te&&Ot&&!Me&&(te.setMarkers(r?[r]:void 0,void 0),te.setSelectedMarker(r?0:-1)),t.$$.dirty[1]&25165840&&te&&te.setMarkers(Me,dt),t.$$.dirty[0]&32768|t.$$.dirty[1]&8388624&&Me&&te&&te.setSelectedMarker(It),t.$$.dirty[0]&2|t.$$.dirty[1]&16&&te){const Q=Ts(ae);te.setReverseMarker(Q?[Q.decimalLongitude,Q.decimalLatitude]:void 0)}t.$$.dirty[1]&67108864&&Fi("select",r),t.$$.dirty[1]&16777216&&Fi("pick",dt),t.$$.dirty[0]&81920&&Fi("optionsVisibilityChange",Cs&&!!ne),t.$$.dirty[0]&16384&&Fi("featuresListed",ne),t.$$.dirty[1]&8388608&&Fi("featuresMarked",Me),t.$$.dirty[0]&1&&Fi("reverseToggle",Ae),t.$$.dirty[0]&2&&Fi("queryChange",ae),t.$$.dirty[0]&1|t.$$.dirty[1]&16&&te&&te.indicateReverse(Ae)},[Ae,ae,c,v,E,A,R,fe,pe,Y,Le,ut,fn,Zn,ne,It,Cs,Re,Cn,cr,tl,zl,Fl,ui,ft,l,d,S,C,M,z,U,F,G,H,te,ee,se,Ke,tt,He,Ot,Gt,vt,At,Mt,rn,wn,_n,pn,Yn,zr,Pn,ar,Me,dt,Ks,r,s,i,ln,sn,Hr,us,on,Aa,Jr,me,q,Z,J,le,Te]}class pz extends Yt{constructor(e){super(),Xt(this,e,fz,hz,Ut,{class:2,apiKey:25,bbox:26,clearButtonTitle:3,clearOnBlur:27,collapsed:4,country:28,debounceSearch:29,enableReverse:5,errorMessage:6,filter:30,flyTo:31,fuzzyMatch:32,language:33,limit:34,mapController:35,minLength:36,noResultsMessage:7,placeholder:8,proximity:37,reverseActive:0,reverseButtonTitle:9,searchValue:1,showFullGeometry:38,showPlaceType:10,showResultsWhileTyping:39,selectFirst:11,flyToSelected:40,markerOnSelected:41,types:42,excludeTypes:43,zoom:44,maxZoom:45,apiUrl:46,fetchParameters:47,iconsBaseUrl:12,adjustUrlQuery:48,focus:49,blur:50,setQuery:51,clearList:52,clearMap:53},null,[-1,-1,-1])}get focus(){return this.$$.ctx[49]}get blur(){return this.$$.ctx[50]}get setQuery(){return this.$$.ctx[51]}get clearList(){return this.$$.ctx[52]}get clearMap(){return this.$$.ctx[53]}}function US(t){let e,n,r;return n=new pz({props:{mapController:t[1],apiKey:t[0]}}),{c(){e=_e("div"),Ge(n.$$.fragment),Ie(e,"class","svelte-ixhnie")},m(i,s){xe(i,e,s),Ue(n,e,null),r=!0},p(i,s){const c={};s&2&&(c.mapController=i[1]),s&1&&(c.apiKey=i[0]),n.$set(c)},i(i){r||(ue(n.$$.fragment,i),r=!0)},o(i){ye(n.$$.fragment,i),r=!1},d(i){i&&be(e),je(n)}}}function dz(t){let e,n,r=t[1]&&US(t);return{c(){r&&r.c(),e=Hi()},m(i,s){r&&r.m(i,s),xe(i,e,s),n=!0},p(i,[s]){i[1]?r?(r.p(i,s),s&2&&ue(r,1)):(r=US(i),r.c(),ue(r,1),r.m(e.parentNode,e)):r&&(Un(),ye(r,1,1,()=>{r=null}),jn())},i(i){n||(ue(r),n=!0)},o(i){ye(r),n=!1},d(i){i&&be(e),r&&r.d(i)}}}function mz(t,e,n){let r,{apiKey:i}=e,{map:s}=e;return t.$$set=c=>{"apiKey"in c&&n(0,i=c.apiKey),"map"in c&&n(2,s=c.map)},t.$$.update=()=>{t.$$.dirty&4&&n(1,r=s?L5(s,Bs):null)},[i,r,s]}class gz extends Yt{constructor(e){super(),Xt(this,e,mz,dz,Ut,{apiKey:0,map:2})}}const _z=["==",["geometry-type"],"Polygon"],ST=["==",["geometry-type"],"LineString"],yz=["==",["geometry-type"],"Point"];function Od(t,e,n){let r=["match",t];for(let[i,s]of Object.entries(e))r.push(i),r.push(s);return r.push(n),r}const vz=t=>({}),jS=t=>({}),bz=t=>({}),GS=t=>({}),xz=t=>({}),qS=t=>({});function wz(t){let e,n,r,i,s,c;const l=t[1].top,d=Sr(l,t,t[0],qS),v=t[1].left,S=Sr(v,t,t[0],GS),E=t[1].main,C=Sr(E,t,t[0],jS);return{c(){e=_e("div"),d&&d.c(),n=We(),r=_e("div"),S&&S.c(),i=We(),s=_e("div"),C&&C.c(),Ie(e,"class","top svelte-mpick2"),Ie(r,"class","left svelte-mpick2"),Ie(s,"class","main svelte-mpick2")},m(M,A){xe(M,e,A),d&&d.m(e,null),xe(M,n,A),xe(M,r,A),S&&S.m(r,null),xe(M,i,A),xe(M,s,A),C&&C.m(s,null),c=!0},p(M,[A]){d&&d.p&&(!c||A&1)&&Ir(d,l,M,M[0],c?Er(l,M[0],A,xz):Cr(M[0]),qS),S&&S.p&&(!c||A&1)&&Ir(S,v,M,M[0],c?Er(v,M[0],A,bz):Cr(M[0]),GS),C&&C.p&&(!c||A&1)&&Ir(C,E,M,M[0],c?Er(E,M[0],A,vz):Cr(M[0]),jS)},i(M){c||(ue(d,M),ue(S,M),ue(C,M),c=!0)},o(M){ye(d,M),ye(S,M),ye(C,M),c=!1},d(M){M&&(be(e),be(n),be(r),be(i),be(s)),d&&d.d(M),S&&S.d(M),C&&C.d(M)}}}function Sz(t,e,n){let{$$slots:r={},$$scope:i}=e;return t.$$set=s=>{"$$scope"in s&&n(0,i=s.$$scope)},[i,r]}class Ez extends Yt{constructor(e){super(),Xt(this,e,Sz,wz,Ut,{})}}const Iz=t=>({}),WS=t=>({}),Cz=t=>({}),HS=t=>({}),Tz=t=>({}),ZS=t=>({});function Lz(t){let e,n,r,i,s,c;const l=t[4].top,d=Sr(l,t,t[3],ZS),v=t[4].sidebar,S=Sr(v,t,t[3],HS),E=t[4].map,C=Sr(E,t,t[3],WS);return{c(){e=_e("div"),d&&d.c(),n=We(),r=_e("div"),S&&S.c(),i=We(),s=_e("div"),C&&C.c()},m(M,A){xe(M,e,A),d&&d.m(e,null),t[5](e),xe(M,n,A),xe(M,r,A),S&&S.m(r,null),t[6](r),xe(M,i,A),xe(M,s,A),C&&C.m(s,null),t[7](s),c=!0},p(M,[A]){d&&d.p&&(!c||A&8)&&Ir(d,l,M,M[3],c?Er(l,M[3],A,Tz):Cr(M[3]),ZS),S&&S.p&&(!c||A&8)&&Ir(S,v,M,M[3],c?Er(v,M[3],A,Cz):Cr(M[3]),HS),C&&C.p&&(!c||A&8)&&Ir(C,E,M,M[3],c?Er(E,M[3],A,Iz):Cr(M[3]),WS)},i(M){c||(ue(d,M),ue(S,M),ue(C,M),c=!0)},o(M){ye(d,M),ye(S,M),ye(C,M),c=!1},d(M){M&&(be(e),be(n),be(r),be(i),be(s)),d&&d.d(M),t[5](null),S&&S.d(M),t[6](null),C&&C.d(M),t[7](null)}}}function Pz(t,e,n){let r,i,s;mt(t,s1,E=>n(0,r=E)),mt(t,a1,E=>n(1,i=E)),mt(t,l1,E=>n(2,s=E));let{$$slots:c={},$$scope:l}=e;function d(E){ai[E?"unshift":"push"](()=>{r=E,s1.set(r)})}function v(E){ai[E?"unshift":"push"](()=>{i=E,a1.set(i)})}function S(E){ai[E?"unshift":"push"](()=>{s=E,l1.set(s)})}return t.$$set=E=>{"$$scope"in E&&n(3,l=E.$$scope)},[r,i,s,l,c,d,v,S]}class bu extends Yt{constructor(e){super(),Xt(this,e,Pz,Lz,Ut,{})}}let s1=Nn(null),a1=Nn(null),l1=Nn(null);function Mz(t){let e,n,r,i,s,c,l,d,v;return{c(){e=_e("label"),n=st(`Basemap: - `),r=_e("select"),i=_e("option"),i.textContent="MapTiler Dataviz",s=_e("option"),s.textContent="MapTiler Streets",c=_e("option"),c.textContent="MapTiler Satellite",l=_e("option"),l.textContent="OS Open Zoomstack",i.__value="dataviz",es(i,i.__value),s.__value="streets",es(s,s.__value),c.__value="hybrid",es(c,c.__value),l.__value="uk-openzoomstack-light",es(l,l.__value),t[0]===void 0&&Xd(()=>t[1].call(r))},m(S,E){xe(S,e,E),oe(e,n),oe(e,r),oe(r,i),oe(r,s),oe(r,c),oe(r,l),f_(r,t[0],!0),d||(v=Lt(r,"change",t[1]),d=!0)},p(S,[E]){E&1&&f_(r,S[0])},i:Pt,o:Pt,d(S){S&&be(e),d=!1,v()}}}function Az(t,e,n){let r;mt(t,Vv,s=>n(0,r=s));function i(){r=OE(this),Vv.set(r)}return[r,i]}class kz extends Yt{constructor(e){super(),Xt(this,e,Az,Mz,Ut,{})}}let c_=Nn(!0);function Dz(t){let e,n;return e=new cc({props:{paint:{"fill-color":"black","fill-opacity":0},layout:{visibility:t[0]?"none":"visible"}}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,i){const s={};i&1&&(s.layout={visibility:r[0]?"none":"visible"}),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function Rz(t){let e,n;return e=new Ro({props:{data:t[1],$$slots:{default:[Dz]},$$scope:{ctx:t}}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,[i]){const s={};i&5&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function Nz(t,e,n){let r;return mt(t,c_,s=>n(0,r=s)),[r,{type:"Feature",properties:{},geometry:{type:"Polygon",coordinates:[[[180,90],[-180,90],[-180,-90],[180,-90],[180,90]]]}}]}class Oz extends Yt{constructor(e){super(),Xt(this,e,Nz,Rz,Ut,{})}}function zz(t){let e,n,r,i;const s=t[1].default,c=Sr(s,t,t[0],null);return{c(){e=_e("a"),c&&c.c(),Ie(e,"href","#")},m(l,d){xe(l,e,d),c&&c.m(e,null),n=!0,r||(i=Lt(e,"click",NE(t[2])),r=!0)},p(l,[d]){c&&c.p&&(!n||d&1)&&Ir(c,s,l,l[0],n?Er(s,l[0],d,null):Cr(l[0]),null)},i(l){n||(ue(c,l),n=!0)},o(l){ye(c,l),n=!1},d(l){l&&be(e),c&&c.d(l),r=!1,i()}}}function Fz(t,e,n){let{$$slots:r={},$$scope:i}=e;function s(c){gn.call(this,t,c)}return t.$$set=c=>{"$$scope"in c&&n(0,i=c.$$scope)},[i,r,s]}class or extends Yt{constructor(e){super(),Xt(this,e,Fz,zz,Ut,{})}}const Bz=t=>({props:t&8}),XS=t=>({props:jz(t[3])});function Vz(t){let e;const n=t[1].default,r=Sr(n,t,t[2],XS);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&12)&&Ir(r,n,i,i[2],e?Er(n,i[2],s,Bz):Cr(i[2]),XS)},i(i){e||(ue(r,i),e=!0)},o(i){ye(r,i),e=!1},d(i){r&&r.d(i)}}}function Uz(t){let e,n;return e=new wN({props:{openOn:t[0],popupClass:"popup",$$slots:{default:[Vz,({features:r})=>({3:r}),({features:r})=>r?8:0]},$$scope:{ctx:t}}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,[i]){const s={};i&1&&(s.openOn=r[0]),i&12&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function jz(t){return t?t[0].properties??{}:(console.log("A Popup with null features should be impossible"),{})}function Gz(t,e,n){let{$$slots:r={},$$scope:i}=e,{openOn:s="hover"}=e;return t.$$set=c=>{"openOn"in c&&n(0,s=c.openOn),"$$scope"in c&&n(2,i=c.$$scope)},[s,r,i]}class dc extends Yt{constructor(e){super(),Xt(this,e,Gz,Uz,Ut,{openOn:0})}}function qz(t,e){let n=new Set(t.getStyle().layers.filter(r=>r.type=="line").map(r=>r.id));if(e=="dataviz")return["Road network","Path"].filter(r=>n.has(r));if(e=="hybrid")return["Path","Road","Tunnel"].filter(r=>n.has(r));if(e=="streets"){let r=[];for(let i of["road","bridge","tunnel"])for(let s of["link","minor","minor_construction","motorway","motorway_construction","motorway_link","path_pedestrian","secondary_tertiary","secondary_tertiary_construction","service_track","service_track_construction","street","trunk_primary","trunk_primary_construction","trunk_primary_link"])r.push(`${i}_${s}`);return r.filter(i=>n.has(i))}return e=="uk-openzoomstack-light"?t.getStyle().layers.filter(r=>r["source-layer"]=="roads"&&r.type=="line").map(r=>r.id):[]}const{window:Wz}=f1;function Hz(t){let e,n,r,i,s,c,l,d,v,S,E,C,M,A,R;return M=BP(t[8][0]),{c(){e=_e("button"),e.textContent="Stop StreetView",n=We(),r=_e("fieldset"),i=_e("legend"),i.textContent="Source:",s=We(),c=_e("label"),l=_e("input"),d=st(` - Google Street View`),v=We(),S=_e("label"),E=_e("input"),C=st(` - Bing Streetside`),Ie(e,"class","secondary"),Ie(l,"type","radio"),l.__value="google",es(l,l.__value),Ie(E,"type","radio"),E.__value="bing",es(E,E.__value),M.p(l,E)},m(z,U){xe(z,e,U),xe(z,n,U),xe(z,r,U),oe(r,i),oe(r,s),oe(r,c),oe(c,l),l.checked=l.__value===t[0],oe(c,d),oe(r,v),oe(r,S),oe(S,E),E.checked=E.__value===t[0],oe(S,C),A||(R=[Lt(e,"click",t[3]),Lt(l,"change",t[7]),Lt(E,"change",t[9])],A=!0)},p(z,U){U&1&&(l.checked=l.__value===z[0]),U&1&&(E.checked=E.__value===z[0])},d(z){z&&(be(e),be(n),be(r)),M.r(),A=!1,Kr(R)}}}function Zz(t){let e,n,r;return{c(){e=_e("button"),e.textContent="StreetView",Ie(e,"class","secondary")},m(i,s){xe(i,e,s),n||(r=Lt(e,"click",t[2]),n=!0)},p:Pt,d(i){i&&be(e),n=!1,r()}}}function Xz(t){let e,n,r;function i(l,d){return l[1]?Zz:Hz}let s=i(t),c=s(t);return{c(){c.c(),e=Hi()},m(l,d){c.m(l,d),xe(l,e,d),n||(r=Lt(Wz,"keydown",t[4]),n=!0)},p(l,[d]){s===(s=i(l))&&c?c.p(l,d):(c.d(1),c=s(l),c&&(c.c(),c.m(e.parentNode,e)))},i:Pt,o:Pt,d(l){l&&be(e),c.d(l),n=!1,r()}}}function Yz(t,e,n){let r;mt(t,c_,R=>n(1,r=R));let{map:i}=e,{maptilerBasemap:s}=e,c="google",l=[];function d(){Ft(c_,r=!1,r),i.on("click",S),i.getCanvas().style.cursor="crosshair";for(let R of qz(i,s))l.push([R,i.getPaintProperty(R,"line-color")]),i.setPaintProperty(R,"line-color","cyan")}function v(){Ft(c_,r=!0,r),i.off("click",S),i.getCanvas().style.cursor="inherit";for(let[R,z]of l)i.setPaintProperty(R,"line-color",z);l=[]}ro(v);function S(R){let z=R.lngLat.lng,U=R.lngLat.lat;c=="google"?window.open(`http://maps.google.com/maps?q=&layer=c&cbll=${U},${z}&cbp=11,0,0,0,0`,"_blank"):c=="bing"&&window.open(`https://www.bing.com/maps?cp=${U}~${z}&style=x`,"_blank")}function E(R){!r&&R.key=="Escape"&&(R.stopPropagation(),v())}const C=[[]];function M(){c=this.__value,n(0,c)}function A(){c=this.__value,n(0,c)}return t.$$set=R=>{"map"in R&&n(5,i=R.map),"maptilerBasemap"in R&&n(6,s=R.maptilerBasemap)},[c,r,d,v,E,i,s,M,C,A]}class $z extends Yt{constructor(e){super(),Xt(this,e,Yz,Xz,Ut,{map:5,maptilerBasemap:6})}}function gi(t){return{id:t,beforeId:Kz(t)}}function Kz(t){let e=Fs(uu);if(!e){console.warn(`getBeforeId(${t}) called before map is ready. Z-ordering may be incorrect.`);return}let n,r=!1;for(let i=YS.length-1;i>=0;i--){let s=YS[i];if(s==t){r=!0;break}e.getLayer(s)&&(n=s)}if(!r)throw new Error(`Layer ID ${t} not defined in layerZorder`);return n}const YS=["Background","neighbourhood-boundaries","Residential","debug-borders","debug-crosses","debug-filters","cells","interior-roads","compare-route","shortcuts","shortcuts-focus","Building","route-debug-nodes","route-points","route-lines","route-polygons","one-ways","Road labels","animate-shortcuts","modal-filters","boundary","neighbourhood-boundary","auto-boundaries-areas","auto-boundaries-severances","freehand-line","edit-polygon-fill","edit-polygon-lines","edit-polygon-vertices"];function Jz(t){let e;return{c(){e=st("Back")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function Qz(t){let e,n,r,i;return e=new or({props:{$$slots:{default:[Jz]},$$scope:{ctx:t}}}),e.$on("click",t[2]),{c(){Ge(e.$$.fragment)},m(s,c){Ue(e,s,c),n=!0,r||(i=Lt(window,"keydown",t[1]),r=!0)},p(s,[c]){const l={};c&8&&(l.$$scope={dirty:c,ctx:s}),e.$set(l)},i(s){n||(ue(e.$$.fragment,s),n=!0)},o(s){ye(e.$$.fragment,s),n=!1},d(s){je(e,s),r=!1,i()}}}function eF(t){let e=vu();function n(i){i.key=="Escape"&&(i.stopPropagation(),e("click"))}return[e,n,()=>e("click")]}class Iy extends Yt{constructor(e){super(),Xt(this,e,eF,Qz,Ut,{})}}function tF(t){let e,n;const r=[gi("one-ways"),{filter:["all",["==",["get","kind"],"interior_road"],["!=",["get","direction"],"both"]]},{layout:{"icon-image":"oneway-arrow","icon-size":1,"symbol-placement":"line","symbol-spacing":50,"icon-allow-overlap":!0,"icon-rotate":["case",["==",["get","direction"],"forwards"],0,180]}},{paint:{"icon-opacity":["case",["get","direction_edited"],1,.5]}}];let i={};for(let s=0;s({}),$S=t=>({}),iF=t=>({}),KS=t=>({});function oF(t){let e,n;const r=[gi("neighbourhood-boundary"),{paint:{"fill-color":"black","fill-opacity":.3}}];let i={};for(let s=0;s{r=null}),jn())},i(i){n||(ue(r),n=!0)},o(i){ye(r),n=!1},d(i){i&&be(e),r&&r.d(i)}}}function aF(t){let e,n,r,i,s,c,l,d,v;e=new Ro({props:{data:QS(t[3]),$$slots:{default:[oF]},$$scope:{ctx:t}}});const S=[gi("cells"),{filter:["==",["get","kind"],"cell"]},{paint:{"fill-color":["get","color"],"fill-opacity":.3}}];let E={};for(let z=0;zn.properties.kind=="boundary");return{type:"Feature",properties:{},geometry:{type:"Polygon",coordinates:[[[180,90],[-180,90],[-180,-90],[180,-90],[180,90]],e.geometry.coordinates[0]]}}}function uF(t,e,n){let r,i,s,{$$slots:c={},$$scope:l}=e,{gjInput:d}=e,{interactive:v=!0}=e,{onClickLine:S=(C,M)=>{}}=e;const E=C=>v&&S(C.detail.features[0],C.detail.event.lngLat);return t.$$set=C=>{"gjInput"in C&&n(4,d=C.gjInput),"interactive"in C&&n(0,v=C.interactive),"onClickLine"in C&&n(1,S=C.onClickLine),"$$scope"in C&&n(8,l=C.$$scope)},t.$$.update=()=>{t.$$.dirty&16&&n(3,r=u1(d)),t.$$.dirty&16&&n(5,i=Math.max(...d.features.map(C=>C.properties.kind=="interior_road"?C.properties.shortcuts:0))),t.$$.dirty&32&&n(2,s=Nf(["interpolate-hcl",["linear"],["get","shortcuts"],0,"white",1,"#F19A93",i,"#A32015"],"blue"))},[v,S,s,r,d,i,c,E,l]}class Cy extends Yt{constructor(e){super(),Xt(this,e,uF,lF,Ut,{gjInput:4,interactive:0,onClickLine:1})}}function cF(t){let e;return{c(){e=st("Choose project")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function hF(t){let e;return{c(){e=st("Pick neighbourhood")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function fF(t){let e;return{c(){e=st("Editing")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function pF(t){let e,n,r,i,s,c,l,d,v,S,E,C,M,A;return s=new or({props:{$$slots:{default:[cF]},$$scope:{ctx:t}}}),s.$on("click",t[4]),d=new or({props:{$$slots:{default:[hF]},$$scope:{ctx:t}}}),d.$on("click",t[5]),E=new or({props:{$$slots:{default:[fF]},$$scope:{ctx:t}}}),E.$on("click",t[6]),{c(){e=_e("div"),n=_e("nav"),r=_e("ul"),i=_e("li"),Ge(s.$$.fragment),c=We(),l=_e("li"),Ge(d.$$.fragment),v=We(),S=_e("li"),Ge(E.$$.fragment),C=We(),M=_e("li"),M.textContent="Debug mode",Ie(n,"aria-label","breadcrumb"),Ie(e,"slot","top")},m(R,z){xe(R,e,z),oe(e,n),oe(n,r),oe(r,i),Ue(s,i,null),oe(r,c),oe(r,l),Ue(d,l,null),oe(r,v),oe(r,S),Ue(E,S,null),oe(r,C),oe(r,M),A=!0},p(R,z){const U={};z&256&&(U.$$scope={dirty:z,ctx:R}),s.$set(U);const F={};z&256&&(F.$$scope={dirty:z,ctx:R}),d.$set(F);const G={};z&256&&(G.$$scope={dirty:z,ctx:R}),E.$set(G)},i(R){A||(ue(s.$$.fragment,R),ue(d.$$.fragment,R),ue(E.$$.fragment,R),A=!0)},o(R){ye(s.$$.fragment,R),ye(d.$$.fragment,R),ye(E.$$.fragment,R),A=!1},d(R){R&&be(e),je(s),je(d),je(E)}}}function dF(t){let e,n,r;return n=new Iy({}),n.$on("click",t[3]),{c(){e=_e("div"),Ge(n.$$.fragment),Ie(e,"slot","sidebar")},m(i,s){xe(i,e,s),Ue(n,e,null),r=!0},p:Pt,i(i){r||(ue(n.$$.fragment,i),r=!0)},o(i){ye(n.$$.fragment,i),r=!1},d(i){i&&be(e),je(n)}}}function mF(t){let e,n;return e=new ty({props:{properties:t[7]}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,i){const s={};i&128&&(s.properties=r[7]),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function gF(t){let e,n,r;return n=new dc({props:{openOn:"hover",$$slots:{default:[mF,({props:i})=>({7:i}),({props:i})=>i?128:0]},$$scope:{ctx:t}}}),{c(){e=_e("div"),Ge(n.$$.fragment),Ie(e,"slot","line-popup")},m(i,s){xe(i,e,s),Ue(n,e,null),r=!0},p(i,s){const c={};s&384&&(c.$$scope={dirty:s,ctx:i}),n.$set(c)},i(i){r||(ue(n.$$.fragment,i),r=!0)},o(i){ye(n.$$.fragment,i),r=!1},d(i){i&&be(e),je(n)}}}function _F(t){let e,n;return e=new ty({props:{properties:t[7]}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,i){const s={};i&128&&(s.properties=r[7]),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function yF(t){let e,n;return e=new dc({props:{openOn:"hover",$$slots:{default:[_F,({props:r})=>({7:r}),({props:r})=>r?128:0]},$$scope:{ctx:t}}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,i){const s={};i&384&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function vF(t){let e,n;return e=new ty({props:{properties:t[7]}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,i){const s={};i&128&&(s.properties=r[7]),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function bF(t){let e,n;return e=new dc({props:{openOn:"hover",$$slots:{default:[vF,({props:r})=>({7:r}),({props:r})=>r?128:0]},$$scope:{ctx:t}}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,i){const s={};i&384&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function xF(t){let e,n,r,i;const s=[gi("debug-borders"),{filter:["==",["get","kind"],"border_intersection"]},{paint:{"circle-radius":15,"circle-color":"green"}}];let c={$$slots:{default:[yF]},$$scope:{ctx:t}};for(let v=0;v({7:r}),({props:r})=>r?128:0]},$$scope:{ctx:t}}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,i){const s={};i&384&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function EF(t){let e,n;const r=[gi("debug-filters"),{paint:{"circle-radius":15,"circle-color":"black"}}];let i={$$slots:{default:[SF]},$$scope:{ctx:t}};for(let s=0;sn(0,r=S)),mt(t,xn,S=>n(1,i=S)),[r,i,(S,E)=>window.open(Rr(S.properties).way,"_blank"),()=>Ft(xn,i={mode:"neighbourhood"},i),()=>Ft(xn,i={mode:"title"},i),()=>Ft(xn,i={mode:"network"},i),()=>Ft(xn,i={mode:"neighbourhood"},i)]}class LF extends Yt{constructor(e){super(),Xt(this,e,TF,CF,Ut,{})}}function eE(t,e,n){const r=t.slice();return r[7]=e[n][0],r[8]=e[n][1],r[9]=e[n][2],r}function tE(t){let e,n,r,i,s,c,l=t[8]+"",d,v,S,E,C;function M(){return t[3](t[7])}return{c(){e=_e("button"),n=_e("img"),i=We(),s=_e("br"),c=We(),d=st(l),v=We(),Wn(n.src,r=`/ltn//filters/${t[7]}_icon.gif`)||Ie(n,"src",r),Ie(n,"width","80"),Ie(n,"alt",t[8]),Ie(e,"class","outline"),sr(e,"width","100%"),e.disabled=S=t[0]==t[7]},m(A,R){xe(A,e,R),oe(e,n),oe(e,i),oe(e,s),oe(e,c),oe(e,d),oe(e,v),E||(C=Lt(e,"click",M),E=!0)},p(A,R){t=A,R&1&&S!==(S=t[0]==t[7])&&(e.disabled=S)},d(A){A&&be(e),E=!1,C()}}}function PF(t){let e,n,r,i,s,c,l,d,v,S,E,C,M=t[1][2]+"",A,R,z,U,F,G,H=bs(t[2]),te=[];for(let fe=0;fe({6:r}),({dialog:r})=>r?64:0]},$$scope:{ctx:t}}}),e.$on("close",t[5]),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,[i]){const s={};i&4163&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function AF(t,e,n){let r,i;mt(t,Gv,v=>n(0,i=v));let s=[["walk_cycle_only","Walking/cycling only","A physical barrier that only allows people walking, cycling, and rolling to pass. Often planters or bollards. Larger vehicles cannot enter."],["no_entry","No entry","An alternative sign to indicate vehicles are not allowed to enter the street. Only people walking, cycling, and rolling may pass through."],["bus_gate","Bus gate","A bus gate sign and traffic cameras are installed to allow buses, pedestrians, and cyclists to pass. There is no physical barrier."],["school_street","School street","A closure during school hours only. The barrier usually allows teachers and staff to access the school."]];const c=v=>Ft(Gv,i=v,i),l=v=>Rr(v).close();function d(v){gn.call(this,t,v)}return t.$$.update=()=>{t.$$.dirty&1&&n(1,r=s.find(v=>v[0]==i))},[i,r,s,c,l,d]}class kF extends Yt{constructor(e){super(),Xt(this,e,AF,MF,Ut,{})}}function nE(t){let e,n;return e=new Ro({props:{data:t[0],$$slots:{default:[DF]},$$scope:{ctx:t}}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,i){const s={};i&1&&(s.data=r[0]),i&64&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function DF(t){let e,n;const r=[gi("freehand-line"),{paint:{"line-width":5,"line-color":"red"}}];let i={};for(let s=0;s{r=null}),jn())},i(i){n||(ue(r),n=!0)},o(i){ye(r),n=!1},d(i){i&&be(e),r&&r.d(i)}}}function NF(t,e,n){let{map:r}=e,i=null;const s=vu();r.on("dragstart",c),r.on("mousemove",l),r.on("mouseup",d),ro(()=>{r.dragPan.enable(),r.off("dragstart",c),r.off("mousemove",l),r.off("mouseup",d)});function c(){r.dragPan.disable(),n(0,i={type:"Feature",properties:{},geometry:{type:"LineString",coordinates:[]}})}function l(v){i&&(i.geometry.coordinates.push(v.lngLat.toArray()),n(0,i))}function d(){i&&(s("done",i),n(0,i=null))}return t.$$set=v=>{"map"in v&&n(1,r=v.map)},[i,r]}class OF extends Yt{constructor(e){super(),Xt(this,e,NF,RF,Ut,{map:1})}}function zF(t){let e;const n=t[3].default,r=Sr(n,t,t[5],null);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&32)&&Ir(r,n,i,i[5],e?Er(n,i[5],s,null):Cr(i[5]),null)},i(i){e||(ue(r,i),e=!0)},o(i){ye(r,i),e=!1},d(i){r&&r.d(i)}}}function FF(t){let e,n;const r=[gi("modal-filters"),{layout:{"icon-image":["get","filter_kind"],"icon-allow-overlap":!0,"icon-size":.1}},{paint:{"icon-opacity":["case",["get","edited"],1,.5]}}];let i={$$slots:{default:[zF]},$$scope:{ctx:t}};for(let s=0;sn(1,i=v)),mt(t,Gu,v=>n(2,s=v));let{$$slots:c={},$$scope:l}=e;function d(v){gn.call(this,t,v)}return t.$$set=v=>{"$$scope"in v&&n(5,l=v.$$scope)},t.$$.update=()=>{t.$$.dirty&6&&n(0,r=s>0?JSON.parse(i.renderModalFilters()):null)},[r,i,s,c,d,l]}class Ty extends Yt{constructor(e){super(),Xt(this,e,VF,BF,Ut,{})}}var UF=Object.defineProperty,dr=(t,e)=>UF(t,"name",{value:e,configurable:!0}),jF=class{constructor(e){this.direction=!1,this.compareProperties=!0;var n,r,i;this.precision=10**-((n=e==null?void 0:e.precision)!=null?n:17),this.direction=(r=e==null?void 0:e.direction)!=null?r:!1,this.compareProperties=(i=e==null?void 0:e.compareProperties)!=null?i:!0}compare(e,n){if(e.type!==n.type||!zd(e,n))return!1;switch(e.type){case"Point":return this.compareCoord(e.coordinates,n.coordinates);case"LineString":return this.compareLine(e.coordinates,n.coordinates);case"Polygon":return this.comparePolygon(e,n);case"GeometryCollection":return this.compareGeometryCollection(e,n);case"Feature":return this.compareFeature(e,n);case"FeatureCollection":return this.compareFeatureCollection(e,n);default:if(e.type.startsWith("Multi")){const r=c1(e),i=c1(n);return r.every(s=>i.some(c=>this.compare(s,c)))}}return!1}compareCoord(e,n){return e.length===n.length&&e.every((r,i)=>Math.abs(r-n[i])=0&&(r=[].concat(e.slice(i,e.length),e.slice(1,i+1))),r}comparePath(e,n){return e.every((r,i)=>this.compareCoord(r,n[i]))}comparePolygon(e,n){if(this.compareLine(e.coordinates[0],n.coordinates[0],1,!0)){const r=e.coordinates.slice(1,e.coordinates.length),i=n.coordinates.slice(1,n.coordinates.length);return r.every(s=>i.some(c=>this.compareLine(s,c,1,!0)))}return!1}compareGeometryCollection(e,n){return zd(e.geometries,n.geometries)&&this.compareBBox(e,n)&&e.geometries.every((r,i)=>this.compare(r,n.geometries[i]))}compareFeature(e,n){return e.id===n.id&&(this.compareProperties?iC(e.properties,n.properties):!0)&&this.compareBBox(e,n)&&this.compare(e.geometry,n.geometry)}compareFeatureCollection(e,n){return zd(e.features,n.features)&&this.compareBBox(e,n)&&e.features.every((r,i)=>this.compare(r,n.features[i]))}compareBBox(e,n){return!e.bbox&&!n.bbox||(e.bbox&&n.bbox?this.compareCoord(e.bbox,n.bbox):!1)}};dr(jF,"GeojsonEquality");function zd(t,e){return t.coordinates?t.coordinates.length===e.coordinates.length:t.length===e.length}dr(zd,"sameLength");function c1(t){return t.coordinates.map(e=>({type:t.type.replace("Multi",""),coordinates:e}))}dr(c1,"explode");var zs=63710088e-1,ET={centimeters:zs*100,centimetres:zs*100,degrees:360/(2*Math.PI),feet:zs*3.28084,inches:zs*39.37,kilometers:zs/1e3,kilometres:zs/1e3,meters:zs,metres:zs,miles:zs/1609.344,millimeters:zs*1e3,millimetres:zs*1e3,nauticalmiles:zs/1852,radians:1,yards:zs*1.0936},rE={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:29155334959812285e-23,millimeters:1e6,millimetres:1e6,yards:1.195990046};function mc(t,e,n={}){const r={type:"Feature"};return(n.id===0||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}dr(mc,"feature");function GF(t,e,n={}){switch(t){case"Point":return rp(e).geometry;case"LineString":return pb(e).geometry;case"Polygon":return fb(e).geometry;case"MultiPoint":return CT(e).geometry;case"MultiLineString":return IT(e).geometry;case"MultiPolygon":return TT(e).geometry;default:throw new Error(t+" is invalid")}}dr(GF,"geometry");function rp(t,e,n={}){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!ip(t[0])||!ip(t[1]))throw new Error("coordinates must contain numbers");return mc({type:"Point",coordinates:t},e,n)}dr(rp,"point");function qF(t,e,n={}){return Ly(t.map(r=>rp(r,e)),n)}dr(qF,"points");function fb(t,e,n={}){for(const i of t){if(i.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(i[i.length-1].length!==i[0].length)throw new Error("First and last Position are not equivalent.");for(let s=0;sfb(r,e)),n)}dr(WF,"polygons");function pb(t,e,n={}){if(t.length<2)throw new Error("coordinates must be an array of two or more positions");return mc({type:"LineString",coordinates:t},e,n)}dr(pb,"lineString");function HF(t,e,n={}){return Ly(t.map(r=>pb(r,e)),n)}dr(HF,"lineStrings");function Ly(t,e={}){const n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}dr(Ly,"featureCollection");function IT(t,e,n={}){return mc({type:"MultiLineString",coordinates:t},e,n)}dr(IT,"multiLineString");function CT(t,e,n={}){return mc({type:"MultiPoint",coordinates:t},e,n)}dr(CT,"multiPoint");function TT(t,e,n={}){return mc({type:"MultiPolygon",coordinates:t},e,n)}dr(TT,"multiPolygon");function ZF(t,e,n={}){return mc({type:"GeometryCollection",geometries:t},e,n)}dr(ZF,"geometryCollection");function XF(t,e=0){if(e&&!(e>=0))throw new Error("precision must be a positive number");const n=Math.pow(10,e||0);return Math.round(t*n)/n}dr(XF,"round");function db(t,e="kilometers"){const n=ET[e];if(!n)throw new Error(e+" units is invalid");return t*n}dr(db,"radiansToLength");function Py(t,e="kilometers"){const n=ET[e];if(!n)throw new Error(e+" units is invalid");return t/n}dr(Py,"lengthToRadians");function YF(t,e){return gm(Py(t,e))}dr(YF,"lengthToDegrees");function $F(t){let e=t%360;return e<0&&(e+=360),e}dr($F,"bearingToAzimuth");function gm(t){return t%(2*Math.PI)*180/Math.PI}dr(gm,"radiansToDegrees");function pa(t){return t%360*Math.PI/180}dr(pa,"degreesToRadians");function KF(t,e="kilometers",n="kilometers"){if(!(t>=0))throw new Error("length must be a positive number");return db(Py(t,e),n)}dr(KF,"convertLength");function JF(t,e="meters",n="kilometers"){if(!(t>=0))throw new Error("area must be a positive number");const r=rE[e];if(!r)throw new Error("invalid original units");const i=rE[n];if(!i)throw new Error("invalid final units");return t/r*i}dr(JF,"convertArea");function ip(t){return!isNaN(t)&&t!==null&&!Array.isArray(t)}dr(ip,"isNumber");function QF(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}dr(QF,"isObject");function e6(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(t.length!==4&&t.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(e=>{if(!ip(e))throw new Error("bbox must only contain numbers")})}dr(e6,"validateBBox");function t6(t){if(!t)throw new Error("id is required");if(["string","number"].indexOf(typeof t)===-1)throw new Error("id must be a number or a string")}dr(t6,"validateId");var n6=Object.defineProperty,gc=(t,e)=>n6(t,"name",{value:e,configurable:!0});function op(t){if(!t)throw new Error("coord is required");if(!Array.isArray(t)){if(t.type==="Feature"&&t.geometry!==null&&t.geometry.type==="Point")return[...t.geometry.coordinates];if(t.type==="Point")return[...t.coordinates]}if(Array.isArray(t)&&t.length>=2&&!Array.isArray(t[0])&&!Array.isArray(t[1]))return[...t];throw new Error("coord must be GeoJSON Point or an Array of numbers")}gc(op,"getCoord");function r6(t){if(Array.isArray(t))return t;if(t.type==="Feature"){if(t.geometry!==null)return t.geometry.coordinates}else if(t.coordinates)return t.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}gc(r6,"getCoords");function LT(t){if(t.length>1&&ip(t[0])&&ip(t[1]))return!0;if(Array.isArray(t[0])&&t[0].length)return LT(t[0]);throw new Error("coordinates must only contain numbers")}gc(LT,"containsNumber");function i6(t,e,n){if(!e||!n)throw new Error("type and name required");if(!t||t.type!==e)throw new Error("Invalid input to "+n+": must be a "+e+", given "+t.type)}gc(i6,"geojsonType");function o6(t,e,n){if(!t)throw new Error("No feature passed");if(!n)throw new Error(".featureOf() requires a name");if(!t||t.type!=="Feature"||!t.geometry)throw new Error("Invalid input to "+n+", Feature with geometry required");if(!t.geometry||t.geometry.type!==e)throw new Error("Invalid input to "+n+": must be a "+e+", given "+t.geometry.type)}gc(o6,"featureOf");function s6(t,e,n){if(!t)throw new Error("No featureCollection passed");if(!n)throw new Error(".collectionOf() requires a name");if(!t||t.type!=="FeatureCollection")throw new Error("Invalid input to "+n+", FeatureCollection required");for(const r of t.features){if(!r||r.type!=="Feature"||!r.geometry)throw new Error("Invalid input to "+n+", Feature with geometry required");if(!r.geometry||r.geometry.type!==e)throw new Error("Invalid input to "+n+": must be a "+e+", given "+r.geometry.type)}}gc(s6,"collectionOf");function PT(t){return t.type==="Feature"?t.geometry:t}gc(PT,"getGeom");function a6(t,e){return t.type==="FeatureCollection"?"FeatureCollection":t.type==="GeometryCollection"?"GeometryCollection":t.type==="Feature"&&t.geometry!==null?t.geometry.type:t.type}gc(a6,"getType");var l6=Object.defineProperty,MT=(t,e)=>l6(t,"name",{value:e,configurable:!0});function mb(t,e,n={}){if(n.final===!0)return AT(t,e);const r=op(t),i=op(e),s=pa(r[0]),c=pa(i[0]),l=pa(r[1]),d=pa(i[1]),v=Math.sin(c-s)*Math.cos(d),S=Math.cos(l)*Math.sin(d)-Math.sin(l)*Math.cos(d)*Math.cos(c-s);return gm(Math.atan2(v,S))}MT(mb,"bearing");function AT(t,e){let n=mb(e,t);return n=(n+180)%360,n}MT(AT,"calculateFinalBearing");var u6=Object.defineProperty,c6=(t,e)=>u6(t,"name",{value:e,configurable:!0});function kT(t,e,n,r={}){const i=op(t),s=pa(i[0]),c=pa(i[1]),l=pa(n),d=Py(e,r.units),v=Math.asin(Math.sin(c)*Math.cos(d)+Math.cos(c)*Math.sin(d)*Math.cos(l)),S=s+Math.atan2(Math.sin(l)*Math.sin(d)*Math.cos(c),Math.cos(d)-Math.sin(c)*Math.sin(v)),E=gm(S),C=gm(v);return rp([E,C],r.properties)}c6(kT,"destination");var h6=Object.defineProperty,f6=(t,e)=>h6(t,"name",{value:e,configurable:!0});function DT(t,e,n={}){var r=op(t),i=op(e),s=pa(i[1]-r[1]),c=pa(i[0]-r[0]),l=pa(r[1]),d=pa(i[1]),v=Math.pow(Math.sin(s/2),2)+Math.pow(Math.sin(c/2),2)*Math.cos(l)*Math.cos(d);return db(2*Math.atan2(Math.sqrt(v),Math.sqrt(1-v)),n.units)}f6(DT,"distance");var p6=Object.defineProperty,d6=(t,e)=>p6(t,"name",{value:e,configurable:!0});function RT(t,e,n={}){const i=PT(t).coordinates;let s=0;for(let c=0;c=s&&c===i.length-1);c++)if(s>=e){const l=e-s;if(l){const d=mb(i[c],i[c-1])-180;return kT(i[c],l,d,n)}else return rp(i[c])}else s+=DT(i[c],i[c+1],n);return rp(i[i.length-1])}d6(RT,"along");var m6=RT;function g6(t){let e,n;const r=[gi("animate-shortcuts"),{paint:{"circle-radius":10,"circle-color":"purple","circle-stroke-color":"black","circle-stroke-width":1}}];let i={};for(let s=0;sclearInterval(l));function d(){return r.features.map(M=>1/M.properties.directness).reduce((M,A)=>M+A,0)}function v(){return r.features.length==0?[]:Array.from({length:y6},S)}function S(){let M=Math.random()*i,A=0;for(let[R,z]of r.features.entries())if(A+=1/z.properties.directness,Mm6(r.features[M],A,{units:"kilometers"}))}}function C(){for(let[M,A]of s.entries())A.distance+=b6,A.distance>=r.features[A.idx].properties.length_meters/1e3&&(s[M]=S());n(0,c=E())}return t.$$set=M=>{"paths"in M&&n(1,r=M.paths)},t.$$.update=()=>{t.$$.dirty&2&&r&&(i=d(),s=v())},[c,r]}class w6 extends Yt{constructor(e){super(),Xt(this,e,x6,_6,Ut,{paths:1})}}function S6(t){let e;return{c(){e=st("Choose project")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function E6(t){let e;return{c(){e=st("Pick neighbourhood")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function I6(t){let e;return{c(){e=st("View shortcuts")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function C6(t){let e;return{c(){e=st("Route")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function T6(t){let e;return{c(){e=st("Change this boundary")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function L6(t){let e;return{c(){e=st("Debug")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function P6(t){let e,n,r,i,s,c,l,d,v,S,E,C,M,A,R,z,U,F,G,H,te,ee,fe,pe,se;return s=new or({props:{$$slots:{default:[S6]},$$scope:{ctx:t}}}),s.$on("click",t[25]),d=new or({props:{$$slots:{default:[E6]},$$scope:{ctx:t}}}),d.$on("click",t[26]),R=new or({props:{$$slots:{default:[I6]},$$scope:{ctx:t}}}),R.$on("click",t[27]),F=new or({props:{$$slots:{default:[C6]},$$scope:{ctx:t}}}),F.$on("click",t[28]),te=new or({props:{$$slots:{default:[T6]},$$scope:{ctx:t}}}),te.$on("click",t[29]),pe=new or({props:{$$slots:{default:[L6]},$$scope:{ctx:t}}}),pe.$on("click",t[30]),{c(){e=_e("div"),n=_e("nav"),r=_e("ul"),i=_e("li"),Ge(s.$$.fragment),c=We(),l=_e("li"),Ge(d.$$.fragment),v=We(),S=_e("li"),S.textContent="Editing",E=We(),C=_e("nav"),M=_e("ul"),A=_e("li"),Ge(R.$$.fragment),z=We(),U=_e("li"),Ge(F.$$.fragment),G=We(),H=_e("li"),Ge(te.$$.fragment),ee=We(),fe=_e("li"),Ge(pe.$$.fragment),Ie(n,"aria-label","breadcrumb"),Ie(e,"slot","top"),sr(e,"display","flex"),sr(e,"justify-content","space-between")},m(Ae,Y){xe(Ae,e,Y),oe(e,n),oe(n,r),oe(r,i),Ue(s,i,null),oe(r,c),oe(r,l),Ue(d,l,null),oe(r,v),oe(r,S),oe(e,E),oe(e,C),oe(C,M),oe(M,A),Ue(R,A,null),oe(M,z),oe(M,U),Ue(F,U,null),oe(M,G),oe(M,H),Ue(te,H,null),oe(M,ee),oe(M,fe),Ue(pe,fe,null),se=!0},p(Ae,Y){const ae={};Y[1]&8&&(ae.$$scope={dirty:Y,ctx:Ae}),s.$set(ae);const Ke={};Y[1]&8&&(Ke.$$scope={dirty:Y,ctx:Ae}),d.$set(Ke);const Le={};Y[1]&8&&(Le.$$scope={dirty:Y,ctx:Ae}),R.$set(Le);const tt={};Y[1]&8&&(tt.$$scope={dirty:Y,ctx:Ae}),F.$set(tt);const ut={};Y[1]&8&&(ut.$$scope={dirty:Y,ctx:Ae}),te.$set(ut);const He={};Y[1]&8&&(He.$$scope={dirty:Y,ctx:Ae}),pe.$set(He)},i(Ae){se||(ue(s.$$.fragment,Ae),ue(d.$$.fragment,Ae),ue(R.$$.fragment,Ae),ue(F.$$.fragment,Ae),ue(te.$$.fragment,Ae),ue(pe.$$.fragment,Ae),se=!0)},o(Ae){ye(s.$$.fragment,Ae),ye(d.$$.fragment,Ae),ye(R.$$.fragment,Ae),ye(F.$$.fragment,Ae),ye(te.$$.fragment,Ae),ye(pe.$$.fragment,Ae),se=!1},d(Ae){Ae&&be(e),je(s),je(d),je(R),je(F),je(te),je(pe)}}}function iE(t){let e;return{c(){e=_e("mark"),e.textContent=`Some parts of the neighbourhood aren't reachable by drivers, shown in - red`},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function M6(t){let e,n,r;return{c(){e=st("Undo ("),n=st(t[4]),r=st(")")},m(i,s){xe(i,e,s),xe(i,n,s),xe(i,r,s)},p(i,s){s[0]&16&&hr(n,i[4])},d(i){i&&(be(e),be(n),be(r))}}}function A6(t){let e;return{c(){e=st("Undo")},m(n,r){xe(n,e,r)},p:Pt,d(n){n&&be(e)}}}function k6(t){let e,n,r;return{c(){e=st("Redo ("),n=st(t[5]),r=st(")")},m(i,s){xe(i,e,s),xe(i,n,s),xe(i,r,s)},p(i,s){s[0]&32&&hr(n,i[5])},d(i){i&&(be(e),be(n),be(r))}}}function D6(t){let e;return{c(){e=st("Redo")},m(n,r){xe(n,e,r)},p:Pt,d(n){n&&be(e)}}}function oE(t){let e,n;return e=new kF({}),e.$on("close",t[24]),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p:Pt,i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function R6(t){let e,n,r,i,s=Rr(t[6]).properties.name+"",c,l,d=t[1].area_km2.toFixed(1)+"",v,S,E,C,M,A,R,z,U,F,G,H,te,ee,fe,pe,se,Ae,Y,ae,Ke,Le,tt,ut,He,Ot,Gt,vt,At,Mt,rn,wn,fn,_n,pn,Yn,zr,Pn=t[8]>0&&iE();function ar(It,Cn){return It[4]==0?A6:M6}let Zn=ar(t),ne=Zn(t);function Me(It,Cn){return It[5]==0?D6:k6}let dt=Me(t),en=dt(t),Re=t[3]&&oE(t);return{c(){e=_e("div"),n=_e("p"),r=st("Editing neighbourhood "),i=_e("u"),c=st(s),l=st(` - , with an area of `),v=st(d),S=st(" km²"),E=We(),C=_e("details"),C.innerHTML=`Help

Now that you've defined a neighbourhood boundary, you can see the +`)}return t.toString()};Wi.prototype.computeEdgeEndLabels=function(t){for(var e=this.iterator();e.hasNext();){var n=e.next();n.computeLabel(t)}};Wi.prototype.computeLabelling=function(t){var e=this;this.computeEdgeEndLabels(t[0].getBoundaryNodeRule()),this.propagateSideLabels(0),this.propagateSideLabels(1);for(var n=[!1,!1],r=this.iterator();r.hasNext();)for(var i=r.next(),s=i.getLabel(),c=0;c<2;c++)s.isLine(c)&&s.getLocation(c)===Fe.BOUNDARY&&(n[c]=!0);for(var l=this.iterator();l.hasNext();)for(var d=l.next(),v=d.getLabel(),S=0;S<2;S++)if(v.isAnyNull(S)){var E=Fe.NONE;if(n[S])E=Fe.EXTERIOR;else{var C=d.getCoordinate();E=e.getLocation(S,C,t)}v.setAllLocationsIfNull(S,E)}};Wi.prototype.getDegree=function(){return this._edgeMap.size()};Wi.prototype.insertEdgeEnd=function(t,e){this._edgeMap.put(t,e),this._edgeList=null};Wi.prototype.interfaces_=function(){return[]};Wi.prototype.getClass=function(){return Wi};var KO=function(t){function e(){t.call(this),this._resultAreaEdgeList=null,this._label=null,this._SCANNING_FOR_INCOMING=1,this._LINKING_TO_OUTGOING=2}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.linkResultDirectedEdges=function(){var n=this;this.getResultAreaEdges();for(var r=null,i=null,s=this._SCANNING_FOR_INCOMING,c=0;c=0;s--){var c=n._edgeList.get(s),l=c.getSym();i===null&&(i=l),r!==null&&l.setNext(r),r=c}i.setNext(r)},e.prototype.computeDepths=function(){var n=this;if(arguments.length===1){var r=arguments[0],i=this.findIndex(r),s=r.getDepth(lt.LEFT),c=r.getDepth(lt.RIGHT),l=this.computeDepths(i+1,this._edgeList.size(),s),d=this.computeDepths(0,i,l);if(d!==c)throw new Pl("depth mismatch at "+r.getCoordinate())}else if(arguments.length===3){for(var v=arguments[0],S=arguments[1],E=arguments[2],C=E,M=v;M=0;l--){var d=r._resultAreaEdgeList.get(l),v=d.getSym();switch(i===null&&d.getEdgeRing()===n&&(i=d),c){case r._SCANNING_FOR_INCOMING:if(v.getEdgeRing()!==n)continue;s=v,c=r._LINKING_TO_OUTGOING;break;case r._LINKING_TO_OUTGOING:if(d.getEdgeRing()!==n)continue;s.setNextMin(d),c=r._SCANNING_FOR_INCOMING;break}}c===this._LINKING_TO_OUTGOING&&(hn.isTrue(i!==null,"found null for first outgoing dirEdge"),hn.isTrue(i.getEdgeRing()===n,"unable to link last incoming dirEdge"),s.setNextMin(i))},e.prototype.getOutgoingDegree=function(){if(arguments.length===0){for(var n=0,r=this.iterator();r.hasNext();){var i=r.next();i.isInResult()&&n++}return n}else if(arguments.length===1){for(var s=arguments[0],c=0,l=this.iterator();l.hasNext();){var d=l.next();d.getEdgeRing()===s&&c++}return c}},e.prototype.getLabel=function(){return this._label},e.prototype.findCoveredLineEdges=function(){for(var n=Fe.NONE,r=this.iterator();r.hasNext();){var i=r.next(),s=i.getSym();if(!i.isLineEdge()){if(i.isInResult()){n=Fe.INTERIOR;break}if(s.isInResult()){n=Fe.EXTERIOR;break}}}if(n===Fe.NONE)return null;for(var c=n,l=this.iterator();l.hasNext();){var d=l.next(),v=d.getSym();d.isLineEdge()?d.getEdge().setCovered(c===Fe.INTERIOR):(d.isInResult()&&(c=Fe.EXTERIOR),v.isInResult()&&(c=Fe.INTERIOR))}},e.prototype.computeLabelling=function(n){var r=this;t.prototype.computeLabelling.call(this,n),this._label=new Hn(Fe.NONE);for(var i=this.iterator();i.hasNext();)for(var s=i.next(),c=s.getEdge(),l=c.getLabel(),d=0;d<2;d++){var v=l.getLocation(d);(v===Fe.INTERIOR||v===Fe.BOUNDARY)&&r._label.setLocation(d,Fe.INTERIOR)}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Wi),$C=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createNode=function(n){return new Ey(n,new KO)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(qf),pu=function t(){this._pts=null,this._orientation=null;var e=arguments[0];this._pts=e,this._orientation=t.orientation(e)};pu.prototype.compareTo=function(t){var e=t,n=pu.compareOriented(this._pts,this._orientation,e._pts,e._orientation);return n};pu.prototype.interfaces_=function(){return[Es]};pu.prototype.getClass=function(){return pu};pu.orientation=function(t){return In.increasingDirection(t)===1};pu.compareOriented=function(t,e,n,r){for(var i=e?1:-1,s=r?1:-1,c=e?t.length:-1,l=r?n.length:-1,d=e?0:t.length-1,v=r?0:n.length-1;;){var S=t[d].compareTo(n[v]);if(S!==0)return S;d+=i,v+=s;var E=d===c,C=v===l;if(E&&!C)return-1;if(!E&&C)return 1;if(E&&C)return 0}};var Hs=function(){this._edges=new yt,this._ocaMap=new Gi};Hs.prototype.print=function(t){var e=this;t.print("MULTILINESTRING ( ");for(var n=0;n0&&t.print(","),t.print("(");for(var i=r.getCoordinates(),s=0;s0&&t.print(","),t.print(i[s].x+" "+i[s].y);t.println(")")}t.print(") ")};Hs.prototype.addAll=function(t){for(var e=this,n=t.iterator();n.hasNext();)e.add(n.next())};Hs.prototype.findEdgeIndex=function(t){for(var e=this,n=0;n0||!e.coord.equals2D(i);s||r--;var c=new Array(r).fill(null),l=0;c[l++]=new ze(t.coord);for(var d=t.segmentIndex+1;d<=e.segmentIndex;d++)c[l++]=n.edge.pts[d];return s&&(c[l]=e.coord),new B_(c,new Hn(this.edge._label))};Ya.prototype.add=function(t,e,n){var r=new Sa(t,e,n),i=this._nodeMap.get(r);return i!==null?i:(this._nodeMap.put(r,r),r)};Ya.prototype.isIntersection=function(t){for(var e=this.iterator();e.hasNext();){var n=e.next();if(n.coord.equals(t))return!0}return!1};Ya.prototype.interfaces_=function(){return[]};Ya.prototype.getClass=function(){return Ya};var ic=function(){};ic.prototype.getChainStartIndices=function(t){var e=this,n=0,r=new yt;r.add(new _a(n));do{var i=e.findChainEnd(t,n);r.add(new _a(i)),n=i}while(nn?e:n};Al.prototype.getMinX=function(t){var e=this.pts[this.startIndex[t]].x,n=this.pts[this.startIndex[t+1]].x;return en&&(i=1),t._depth[e][r]=i}}};Di.prototype.getDelta=function(t){return this._depth[t][lt.RIGHT]-this._depth[t][lt.LEFT]};Di.prototype.getLocation=function(t,e){return this._depth[t][e]<=0?Fe.EXTERIOR:Fe.INTERIOR};Di.prototype.toString=function(){return"A: "+this._depth[0][1]+","+this._depth[0][2]+" B: "+this._depth[1][1]+","+this._depth[1][2]};Di.prototype.add=function(){var t=this;if(arguments.length===1)for(var e=arguments[0],n=0;n<2;n++)for(var r=1;r<3;r++){var i=e.getLocation(n,r);(i===Fe.EXTERIOR||i===Fe.INTERIOR)&&(t.isNull(n,r)?t._depth[n][r]=Di.depthAtLocation(i):t._depth[n][r]+=Di.depthAtLocation(i))}else if(arguments.length===3){var s=arguments[0],c=arguments[1],l=arguments[2];l===Fe.INTERIOR&&this._depth[s][c]++}};Di.prototype.interfaces_=function(){return[]};Di.prototype.getClass=function(){return Di};Di.depthAtLocation=function(t){return t===Fe.EXTERIOR?0:t===Fe.INTERIOR?1:Di.NULL_VALUE};KC.NULL_VALUE.get=function(){return-1};Object.defineProperties(Di,KC);var B_=function(t){function e(){if(t.call(this),this.pts=null,this._env=null,this.eiList=new Ya(this),this._name=null,this._mce=null,this._isIsolated=!0,this._depth=new Di,this._depthDelta=0,arguments.length===1){var n=arguments[0];e.call(this,n,null)}else if(arguments.length===2){var r=arguments[0],i=arguments[1];this.pts=r,this._label=i}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDepth=function(){return this._depth},e.prototype.getCollapsedEdge=function(){var n=new Array(2).fill(null);n[0]=this.pts[0],n[1]=this.pts[1];var r=new e(n,Hn.toLineLabel(this._label));return r},e.prototype.isIsolated=function(){return this._isIsolated},e.prototype.getCoordinates=function(){return this.pts},e.prototype.setIsolated=function(n){this._isIsolated=n},e.prototype.setName=function(n){this._name=n},e.prototype.equals=function(n){var r=this;if(!(n instanceof e))return!1;var i=n;if(this.pts.length!==i.pts.length)return!1;for(var s=!0,c=!0,l=this.pts.length,d=0;d0?this.pts[0]:null;if(arguments.length===1){var n=arguments[0];return this.pts[n]}},e.prototype.print=function(n){var r=this;n.print("edge "+this._name+": "),n.print("LINESTRING (");for(var i=0;i0&&n.print(","),n.print(r.pts[i].x+" "+r.pts[i].y);n.print(") "+this._label+" "+this._depthDelta)},e.prototype.computeIM=function(n){e.updateIM(this._label,n)},e.prototype.isCollapsed=function(){return!this._label.isArea()||this.pts.length!==3?!1:!!this.pts[0].equals(this.pts[2])},e.prototype.isClosed=function(){return this.pts[0].equals(this.pts[this.pts.length-1])},e.prototype.getMaximumSegmentIndex=function(){return this.pts.length-1},e.prototype.getDepthDelta=function(){return this._depthDelta},e.prototype.getNumPoints=function(){return this.pts.length},e.prototype.printReverse=function(n){var r=this;n.print("edge "+this._name+": ");for(var i=this.pts.length-1;i>=0;i--)n.print(r.pts[i]+" ");n.println("")},e.prototype.getMonotoneChainEdge=function(){return this._mce===null&&(this._mce=new Al(this)),this._mce},e.prototype.getEnvelope=function(){var n=this;if(this._env===null){this._env=new Bt;for(var r=0;r0&&r.append(","),r.append(n.pts[i].x+" "+n.pts[i].y);return r.append(") "+this._label+" "+this._depthDelta),r.toString()},e.prototype.isPointwiseEqual=function(n){var r=this;if(this.pts.length!==n.pts.length)return!1;for(var i=0;ir||this._maxys;if(c)return!1;var l=this.intersectsToleranceSquare(t,e);return hn.isTrue(!(c&&l),"Found bad envelope test"),l};xo.prototype.initCorners=function(t){var e=.5;this._minx=t.x-e,this._maxx=t.x+e,this._miny=t.y-e,this._maxy=t.y+e,this._corner[0]=new ze(this._maxx,this._maxy),this._corner[1]=new ze(this._minx,this._maxy),this._corner[2]=new ze(this._minx,this._miny),this._corner[3]=new ze(this._maxx,this._miny)};xo.prototype.intersects=function(t,e){return this._scaleFactor===1?this.intersectsScaled(t,e):(this.copyScaled(t,this._p0Scaled),this.copyScaled(e,this._p1Scaled),this.intersectsScaled(this._p0Scaled,this._p1Scaled))};xo.prototype.scale=function(t){return Math.round(t*this._scaleFactor)};xo.prototype.getCoordinate=function(){return this._originalPt};xo.prototype.copyScaled=function(t,e){e.x=this.scale(t.x),e.y=this.scale(t.y)};xo.prototype.getSafeEnvelope=function(){if(this._safeEnv===null){var t=xo.SAFE_ENV_EXPANSION_FACTOR/this._scaleFactor;this._safeEnv=new Bt(this._originalPt.x-t,this._originalPt.x+t,this._originalPt.y-t,this._originalPt.y+t)}return this._safeEnv};xo.prototype.intersectsPixelClosure=function(t,e){return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!(this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),this._li.hasIntersection())||(this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),this._li.hasIntersection())||(this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),this._li.hasIntersection()))};xo.prototype.intersectsToleranceSquare=function(t,e){var n=!1,r=!1;return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!(this._li.isProper()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),this._li.isProper())||(this._li.hasIntersection()&&(n=!0),this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),this._li.isProper())||(this._li.hasIntersection()&&(r=!0),this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),this._li.isProper())||n&&r||t.equals(this._pt)||e.equals(this._pt))};xo.prototype.addSnappedNode=function(t,e){var n=t.getCoordinate(e),r=t.getCoordinate(e+1);return this.intersects(n,r)?(t.addIntersection(this.getCoordinate(),e),!0):!1};xo.prototype.interfaces_=function(){return[]};xo.prototype.getClass=function(){return xo};QC.SAFE_ENV_EXPANSION_FACTOR.get=function(){return .75};Object.defineProperties(xo,QC);var fm=function(){this.tempEnv1=new Bt,this.selectedSegment=new Vt};fm.prototype.select=function(){if(arguments.length!==1&&arguments.length===2){var t=arguments[0],e=arguments[1];t.getLineSegment(e,this.selectedSegment),this.select(this.selectedSegment)}};fm.prototype.interfaces_=function(){return[]};fm.prototype.getClass=function(){return fm};var Xf=function(){this._index=null;var t=arguments[0];this._index=t},eT={HotPixelSnapAction:{configurable:!0}};Xf.prototype.snap=function(){if(arguments.length===1){var t=arguments[0];return this.snap(t,null,-1)}else if(arguments.length===3){var e=arguments[0],n=arguments[1],r=arguments[2],i=e.getSafeEnvelope(),s=new tT(e,n,r);return this._index.query(i,{interfaces_:function(){return[hu]},visitItem:function(c){var l=c;l.select(i,s)}}),s.isNodeAdded()}};Xf.prototype.interfaces_=function(){return[]};Xf.prototype.getClass=function(){return Xf};eT.HotPixelSnapAction.get=function(){return tT};Object.defineProperties(Xf,eT);var tT=function(t){function e(){t.call(this),this._hotPixel=null,this._parentEdge=null,this._hotPixelVertexIndex=null,this._isNodeAdded=!1;var n=arguments[0],r=arguments[1],i=arguments[2];this._hotPixel=n,this._parentEdge=r,this._hotPixelVertexIndex=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isNodeAdded=function(){return this._isNodeAdded},e.prototype.select=function(){if(arguments.length===2){var n=arguments[0],r=arguments[1],i=n.getContext();if(this._parentEdge!==null&&i===this._parentEdge&&r===this._hotPixelVertexIndex)return null;this._isNodeAdded=this._hotPixel.addSnappedNode(i,r)}else return t.prototype.select.apply(this,arguments)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(fm),eh=function(){this._li=null,this._interiorIntersections=null;var t=arguments[0];this._li=t,this._interiorIntersections=new yt};eh.prototype.processIntersections=function(t,e,n,r){var i=this;if(t===n&&e===r)return null;var s=t.getCoordinates()[e],c=t.getCoordinates()[e+1],l=n.getCoordinates()[r],d=n.getCoordinates()[r+1];if(this._li.computeIntersection(s,c,l,d),this._li.hasIntersection()&&this._li.isInteriorIntersection()){for(var v=0;v=0;e--){try{t.bufferReducedPrecision(e)}catch(s){if(s instanceof Pl)t._saveException=s;else throw s}finally{}if(t._resultGeometry!==null)return null}throw this._saveException}else if(arguments.length===1){var n=arguments[0],r=ki.precisionScaleFactor(this._argGeom,this._distance,n),i=new Bn(r);this.bufferFixedPrecision(i)}};ki.prototype.computeGeometry=function(){if(this.bufferOriginalPrecision(),this._resultGeometry!==null)return null;var t=this._argGeom.getFactory().getPrecisionModel();t.getType()===Bn.FIXED?this.bufferFixedPrecision(t):this.bufferReducedPrecision()};ki.prototype.setQuadrantSegments=function(t){this._bufParams.setQuadrantSegments(t)};ki.prototype.bufferOriginalPrecision=function(){try{var t=new no(this._bufParams);this._resultGeometry=t.buffer(this._argGeom,this._distance)}catch(e){if(e instanceof Tl)this._saveException=e;else throw e}finally{}};ki.prototype.getResultGeometry=function(t){return this._distance=t,this.computeGeometry(),this._resultGeometry};ki.prototype.setEndCapStyle=function(t){this._bufParams.setEndCapStyle(t)};ki.prototype.interfaces_=function(){return[]};ki.prototype.getClass=function(){return ki};ki.bufferOp=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],n=new ki(t),r=n.getResultGeometry(e);return r}else if(arguments.length===3){if(Number.isInteger(arguments[2])&&arguments[0]instanceof $t&&typeof arguments[1]=="number"){var i=arguments[0],s=arguments[1],c=arguments[2],l=new ki(i);l.setQuadrantSegments(c);var d=l.getResultGeometry(s);return d}else if(arguments[2]instanceof Fn&&arguments[0]instanceof $t&&typeof arguments[1]=="number"){var v=arguments[0],S=arguments[1],E=arguments[2],C=new ki(v,E),M=C.getResultGeometry(S);return M}}else if(arguments.length===4){var A=arguments[0],R=arguments[1],z=arguments[2],U=arguments[3],F=new ki(A);F.setQuadrantSegments(z),F.setEndCapStyle(U);var G=F.getResultGeometry(R);return G}};ki.precisionScaleFactor=function(t,e,n){var r=t.getEnvelopeInternal(),i=rs.max(Math.abs(r.getMaxX()),Math.abs(r.getMaxY()),Math.abs(r.getMinX()),Math.abs(r.getMinY())),s=e>0?e:0,c=i+2*s,l=Math.trunc(Math.log(c)/Math.log(10)+1),d=n-l,v=Math.pow(10,d);return v};gp.CAP_ROUND.get=function(){return Fn.CAP_ROUND};gp.CAP_BUTT.get=function(){return Fn.CAP_FLAT};gp.CAP_FLAT.get=function(){return Fn.CAP_FLAT};gp.CAP_SQUARE.get=function(){return Fn.CAP_SQUARE};gp.MAX_PRECISION_DIGITS.get=function(){return 12};Object.defineProperties(ki,gp);var Qi=function(){this._pt=[new ze,new ze],this._distance=nn.NaN,this._isNull=!0};Qi.prototype.getCoordinates=function(){return this._pt};Qi.prototype.getCoordinate=function(t){return this._pt[t]};Qi.prototype.setMinimum=function(){if(arguments.length===1){var t=arguments[0];this.setMinimum(t._pt[0],t._pt[1])}else if(arguments.length===2){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var r=e.distance(n);rthis._distance&&this.initialize(e,n,r)}};Qi.prototype.interfaces_=function(){return[]};Qi.prototype.getClass=function(){return Qi};var Va=function(){};Va.prototype.interfaces_=function(){return[]};Va.prototype.getClass=function(){return Va};Va.computeDistance=function(){if(arguments[2]instanceof Qi&&arguments[0]instanceof Nr&&arguments[1]instanceof ze)for(var t=arguments[0],e=arguments[1],n=arguments[2],r=t.getCoordinates(),i=new Vt,s=0;s0||this._isIn?Fe.INTERIOR:Fe.EXTERIOR)};Zs.prototype.interfaces_=function(){return[]};Zs.prototype.getClass=function(){return Zs};var eo=function t(){if(this._component=null,this._segIndex=null,this._pt=null,arguments.length===2){var e=arguments[0],n=arguments[1];t.call(this,e,t.INSIDE_AREA,n)}else if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2];this._component=r,this._segIndex=i,this._pt=s}},nT={INSIDE_AREA:{configurable:!0}};eo.prototype.isInsideArea=function(){return this._segIndex===eo.INSIDE_AREA};eo.prototype.getCoordinate=function(){return this._pt};eo.prototype.getGeometryComponent=function(){return this._component};eo.prototype.getSegmentIndex=function(){return this._segIndex};eo.prototype.interfaces_=function(){return[]};eo.prototype.getClass=function(){return eo};nT.INSIDE_AREA.get=function(){return-1};Object.defineProperties(eo,nT);var au=function(t){this._pts=t||null};au.prototype.filter=function(t){t instanceof Fo&&this._pts.add(t)};au.prototype.interfaces_=function(){return[va]};au.prototype.getClass=function(){return au};au.getPoints=function(){if(arguments.length===1){var t=arguments[0];return t instanceof Fo?Ws.singletonList(t):au.getPoints(t,new yt)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];return e instanceof Fo?n.add(e):e instanceof io&&e.apply(new au(n)),n}};var nh=function(){this._locations=null;var t=arguments[0];this._locations=t};nh.prototype.filter=function(t){(t instanceof Fo||t instanceof Nr||t instanceof li)&&this._locations.add(new eo(t,0,t.getCoordinate()))};nh.prototype.interfaces_=function(){return[va]};nh.prototype.getClass=function(){return nh};nh.getLocations=function(t){var e=new yt;return t.apply(new nh(e)),e};var Ni=function(){if(this._geom=null,this._terminateDistance=0,this._ptLocator=new Zs,this._minDistanceLocation=null,this._minDistance=nn.MAX_VALUE,arguments.length===2){var t=arguments[0],e=arguments[1];this._geom=[t,e],this._terminateDistance=0}else if(arguments.length===3){var n=arguments[0],r=arguments[1],i=arguments[2];this._geom=new Array(2).fill(null),this._geom[0]=n,this._geom[1]=r,this._terminateDistance=i}};Ni.prototype.computeContainmentDistance=function(){var t=this;if(arguments.length===0){var e=new Array(2).fill(null);if(this.computeContainmentDistance(0,e),this._minDistance<=this._terminateDistance)return null;this.computeContainmentDistance(1,e)}else if(arguments.length===2){var n=arguments[0],r=arguments[1],i=1-n,s=Sl.getPolygons(this._geom[n]);if(s.size()>0){var c=nh.getLocations(this._geom[i]);if(this.computeContainmentDistance(c,s,r),this._minDistance<=this._terminateDistance)return this._minDistanceLocation[i]=r[0],this._minDistanceLocation[n]=r[1],null}}else if(arguments.length===3){if(arguments[2]instanceof Array&&Kt(arguments[0],Us)&&Kt(arguments[1],Us)){for(var l=arguments[0],d=arguments[1],v=arguments[2],S=0;Sthis._minDistance)return null;for(var i=e.getCoordinates(),s=n.getCoordinate(),c=0;cthis._minDistance)return null;for(var M=S.getCoordinates(),A=E.getCoordinates(),R=0;Rthis._distance&&this.initialize(e,n,r)}};Ui.prototype.interfaces_=function(){return[]};Ui.prototype.getClass=function(){return Ui};var ca=function(){};ca.prototype.interfaces_=function(){return[]};ca.prototype.getClass=function(){return ca};ca.computeDistance=function(){if(arguments[2]instanceof Ui&&arguments[0]instanceof Nr&&arguments[1]instanceof ze)for(var t=arguments[0],e=arguments[1],n=arguments[2],r=new Vt,i=t.getCoordinates(),s=0;s1||t<=0)throw new yr("Fraction is not in range (0.0 - 1.0]");this._densifyFrac=t};vs.prototype.compute=function(t,e){this.computeOrientedDistance(t,e,this._ptDist),this.computeOrientedDistance(e,t,this._ptDist)};vs.prototype.distance=function(){return this.compute(this._g0,this._g1),this._ptDist.getDistance()};vs.prototype.computeOrientedDistance=function(t,e,n){var r=new rh(e);if(t.apply(r),n.setMaximum(r.getMaxPointDistance()),this._densifyFrac>0){var i=new gu(e,this._densifyFrac);t.apply(i),n.setMaximum(i.getMaxPointDistance())}};vs.prototype.orientedDistance=function(){return this.computeOrientedDistance(this._g0,this._g1,this._ptDist),this._ptDist.getDistance()};vs.prototype.interfaces_=function(){return[]};vs.prototype.getClass=function(){return vs};vs.distance=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],n=new vs(t,e);return n.distance()}else if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2],c=new vs(r,i);return c.setDensifyFraction(s),c.distance()}};ab.MaxPointDistanceFilter.get=function(){return rh};ab.MaxDensifiedByFractionDistanceFilter.get=function(){return gu};Object.defineProperties(vs,ab);var rh=function(){this._maxPtDist=new Ui,this._minPtDist=new Ui,this._euclideanDist=new ca,this._geom=null;var t=arguments[0];this._geom=t};rh.prototype.filter=function(t){this._minPtDist.initialize(),ca.computeDistance(this._geom,t,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)};rh.prototype.getMaxPointDistance=function(){return this._maxPtDist};rh.prototype.interfaces_=function(){return[Wa]};rh.prototype.getClass=function(){return rh};var gu=function(){this._maxPtDist=new Ui,this._minPtDist=new Ui,this._geom=null,this._numSubSegs=0;var t=arguments[0],e=arguments[1];this._geom=t,this._numSubSegs=Math.trunc(Math.round(1/e))};gu.prototype.filter=function(t,e){var n=this;if(e===0)return null;for(var r=t.getCoordinate(e-1),i=t.getCoordinate(e),s=(i.x-r.x)/this._numSubSegs,c=(i.y-r.y)/this._numSubSegs,l=0;ln){this._isValid=!1;var i=r.getCoordinates();this._errorLocation=i[1],this._errorIndicator=t.getFactory().createLineString(i),this._errMsg="Distance between buffer curve and input is too large ("+this._maxDistanceFound+" at "+js.toLineString(i[0],i[1])+")"}};Oo.prototype.isValid=function(){var t=Math.abs(this._bufDistance),e=Oo.MAX_DISTANCE_DIFF_FRAC*t;return this._minValidDistance=t-e,this._maxValidDistance=t+e,this._input.isEmpty()||this._result.isEmpty()?!0:(this._bufDistance>0?this.checkPositiveValid():this.checkNegativeValid(),Oo.VERBOSE&&Ri.out.println("Min Dist= "+this._minDistanceFound+" err= "+(1-this._minDistanceFound/this._bufDistance)+" Max Dist= "+this._maxDistanceFound+" err= "+(this._maxDistanceFound/this._bufDistance-1)),this._isValid)};Oo.prototype.checkNegativeValid=function(){if(!(this._input instanceof li||this._input instanceof Ga||this._input instanceof io))return null;var t=this.getPolygonLines(this._input);if(this.checkMinimumDistance(t,this._result,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(t,this._result,this._maxValidDistance)};Oo.prototype.getErrorIndicator=function(){return this._errorIndicator};Oo.prototype.checkMinimumDistance=function(t,e,n){var r=new Ni(t,e,n);if(this._minDistanceFound=r.distance(),this._minDistanceFound0&&t>e&&(this._isValid=!1,this._errorMsg="Area of positive buffer is smaller than input",this._errorIndicator=this._result),this._distance<0&&t=2||this._distance>0)return null;this._result.isEmpty()||(this._isValid=!1,this._errorMsg="Result is non-empty",this._errorIndicator=this._result),this.report("ExpectedEmpty")};Oi.prototype.report=function(t){if(!Oi.VERBOSE)return null;Ri.out.println("Check "+t+": "+(this._isValid?"passed":"FAILED"))};Oi.prototype.getErrorMessage=function(){return this._errorMsg};Oi.prototype.interfaces_=function(){return[]};Oi.prototype.getClass=function(){return Oi};Oi.isValidMsg=function(t,e,n){var r=new Oi(t,e,n);return r.isValid()?null:r.getErrorMessage()};Oi.isValid=function(t,e,n){var r=new Oi(t,e,n);return!!r.isValid()};ub.VERBOSE.get=function(){return!1};ub.MAX_ENV_DIFF_FRAC.get=function(){return .012};Object.defineProperties(Oi,ub);var Ia=function(){this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};Ia.prototype.getCoordinates=function(){return this._pts};Ia.prototype.size=function(){return this._pts.length};Ia.prototype.getCoordinate=function(t){return this._pts[t]};Ia.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])};Ia.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:Jc.octant(this.getCoordinate(t),this.getCoordinate(t+1))};Ia.prototype.setData=function(t){this._data=t};Ia.prototype.getData=function(){return this._data};Ia.prototype.toString=function(){return js.toLineString(new jr(this._pts))};Ia.prototype.interfaces_=function(){return[Xa]};Ia.prototype.getClass=function(){return Ia};var Ti=function(){this._findAllIntersections=!1,this._isCheckEndSegmentsOnly=!1,this._li=null,this._interiorIntersection=null,this._intSegments=null,this._intersections=new yt,this._intersectionCount=0,this._keepIntersections=!0;var t=arguments[0];this._li=t,this._interiorIntersection=null};Ti.prototype.getInteriorIntersection=function(){return this._interiorIntersection};Ti.prototype.setCheckEndSegmentsOnly=function(t){this._isCheckEndSegmentsOnly=t};Ti.prototype.getIntersectionSegments=function(){return this._intSegments};Ti.prototype.count=function(){return this._intersectionCount};Ti.prototype.getIntersections=function(){return this._intersections};Ti.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t};Ti.prototype.setKeepIntersections=function(t){this._keepIntersections=t};Ti.prototype.processIntersections=function(t,e,n,r){if(!this._findAllIntersections&&this.hasIntersection()||t===n&&e===r)return null;if(this._isCheckEndSegmentsOnly){var i=this.isEndSegment(t,e)||this.isEndSegment(n,r);if(!i)return null}var s=t.getCoordinates()[e],c=t.getCoordinates()[e+1],l=n.getCoordinates()[r],d=n.getCoordinates()[r+1];this._li.computeIntersection(s,c,l,d),this._li.hasIntersection()&&this._li.isInteriorIntersection()&&(this._intSegments=new Array(4).fill(null),this._intSegments[0]=s,this._intSegments[1]=c,this._intSegments[2]=l,this._intSegments[3]=d,this._interiorIntersection=this._li.getIntersection(0),this._keepIntersections&&this._intersections.add(this._interiorIntersection),this._intersectionCount++)};Ti.prototype.isEndSegment=function(t,e){return e===0||e>=t.size()-2};Ti.prototype.hasIntersection=function(){return this._interiorIntersection!==null};Ti.prototype.isDone=function(){return this._findAllIntersections?!1:this._interiorIntersection!==null};Ti.prototype.interfaces_=function(){return[rc]};Ti.prototype.getClass=function(){return Ti};Ti.createAllIntersectionsFinder=function(t){var e=new Ti(t);return e.setFindAllIntersections(!0),e};Ti.createAnyIntersectionFinder=function(t){return new Ti(t)};Ti.createIntersectionCounter=function(t){var e=new Ti(t);return e.setFindAllIntersections(!0),e.setKeepIntersections(!1),e};var Xs=function(){this._li=new pc,this._segStrings=null,this._findAllIntersections=!1,this._segInt=null,this._isValid=!0;var t=arguments[0];this._segStrings=t};Xs.prototype.execute=function(){if(this._segInt!==null)return null;this.checkInteriorIntersections()};Xs.prototype.getIntersections=function(){return this._segInt.getIntersections()};Xs.prototype.isValid=function(){return this.execute(),this._isValid};Xs.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t};Xs.prototype.checkInteriorIntersections=function(){this._isValid=!0,this._segInt=new Ti(this._li),this._segInt.setFindAllIntersections(this._findAllIntersections);var t=new ob;if(t.setSegmentIntersector(this._segInt),t.computeNodes(this._segStrings),this._segInt.hasIntersection())return this._isValid=!1,null};Xs.prototype.checkValid=function(){if(this.execute(),!this._isValid)throw new Pl(this.getErrorMessage(),this._segInt.getInteriorIntersection())};Xs.prototype.getErrorMessage=function(){if(this._isValid)return"no intersections found";var t=this._segInt.getIntersectionSegments();return"found non-noded intersection between "+js.toLineString(t[0],t[1])+" and "+js.toLineString(t[2],t[3])};Xs.prototype.interfaces_=function(){return[]};Xs.prototype.getClass=function(){return Xs};Xs.computeIntersections=function(t){var e=new Xs(t);return e.setFindAllIntersections(!0),e.isValid(),e.getIntersections()};var sc=function t(){this._nv=null;var e=arguments[0];this._nv=new Xs(t.toSegmentStrings(e))};sc.prototype.checkValid=function(){this._nv.checkValid()};sc.prototype.interfaces_=function(){return[]};sc.prototype.getClass=function(){return sc};sc.toSegmentStrings=function(t){for(var e=new yt,n=t.iterator();n.hasNext();){var r=n.next();e.add(new Ia(r.getCoordinates(),r))}return e};sc.checkValid=function(t){var e=new sc(t);e.checkValid()};var ih=function(t){this._mapOp=t};ih.prototype.map=function(t){for(var e=this,n=new yt,r=0;r0&&r<4&&!this._preserveType?this._factory.createLineString(n):this._factory.createLinearRing(n)};wo.prototype.interfaces_=function(){return[]};wo.prototype.getClass=function(){return wo};var Ka=function t(){if(this._snapTolerance=0,this._srcPts=null,this._seg=new Vt,this._allowSnappingToSourceVertices=!1,this._isClosed=!1,arguments[0]instanceof Nr&&typeof arguments[1]=="number"){var e=arguments[0],n=arguments[1];t.call(this,e.getCoordinates(),n)}else if(arguments[0]instanceof Array&&typeof arguments[1]=="number"){var r=arguments[0],i=arguments[1];this._srcPts=r,this._isClosed=t.isClosed(r),this._snapTolerance=i}};Ka.prototype.snapVertices=function(t,e){for(var n=this,r=this._isClosed?t.size()-1:t.size(),i=0;i=0&&t.add(c+1,new ze(s),!1)}};Ka.prototype.findSegmentIndexToSnap=function(t,e){for(var n=this,r=nn.MAX_VALUE,i=-1,s=0;se&&(e=r)}return e}else if(arguments.length===2){var i=arguments[0],s=arguments[1];return Math.min(Gr.computeOverlaySnapTolerance(i),Gr.computeOverlaySnapTolerance(s))}};Gr.computeSizeBasedSnapTolerance=function(t){var e=t.getEnvelopeInternal(),n=Math.min(e.getHeight(),e.getWidth()),r=n*Gr.SNAP_PRECISION_FACTOR;return r};Gr.snapToSelf=function(t,e,n){var r=new Gr(t);return r.snapToSelf(e,n)};rT.SNAP_PRECISION_FACTOR.get=function(){return 1e-9};Object.defineProperties(Gr,rT);var iT=function(t){function e(n,r,i){t.call(this),this._snapTolerance=n||null,this._snapPts=r||null,this._isSelfSnap=i!==void 0?i:!1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.snapLine=function(n,r){var i=new Ka(n,this._snapTolerance);return i.setAllowSnappingToSourceVertices(this._isSelfSnap),i.snapTo(r)},e.prototype.transformCoordinates=function(n,r){var i=n.toCoordinateArray(),s=this.snapLine(i,this._snapPts);return this._factory.getCoordinateSequenceFactory().create(s)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(wo),Ji=function(){this._isFirst=!0,this._commonMantissaBitsCount=53,this._commonBits=0,this._commonSignExp=null};Ji.prototype.getCommon=function(){return nn.longBitsToDouble(this._commonBits)};Ji.prototype.add=function(t){var e=nn.doubleToLongBits(t);if(this._isFirst)return this._commonBits=e,this._commonSignExp=Ji.signExpBits(this._commonBits),this._isFirst=!1,null;var n=Ji.signExpBits(e);if(n!==this._commonSignExp)return this._commonBits=0,null;this._commonMantissaBitsCount=Ji.numCommonMostSigMantissaBits(this._commonBits,e),this._commonBits=Ji.zeroLowerBits(this._commonBits,64-(12+this._commonMantissaBitsCount))};Ji.prototype.toString=function(){if(arguments.length===1){var t=arguments[0],e=nn.longBitsToDouble(t),n=nn.toBinaryString(t),r="0000000000000000000000000000000000000000000000000000000000000000"+n,i=r.substring(r.length-64),s=i.substring(0,1)+" "+i.substring(1,12)+"(exp) "+i.substring(12)+" [ "+e+" ]";return s}};Ji.prototype.interfaces_=function(){return[]};Ji.prototype.getClass=function(){return Ji};Ji.getBit=function(t,e){var n=1<>52};Ji.zeroLowerBits=function(t,e){var n=(1<=0;r--){if(Ji.getBit(t,r)!==Ji.getBit(e,r))return n;n++}return 52};var _u=function(){this._commonCoord=null,this._ccFilter=new sh},cb={CommonCoordinateFilter:{configurable:!0},Translater:{configurable:!0}};_u.prototype.addCommonBits=function(t){var e=new yu(this._commonCoord);t.apply(e),t.geometryChanged()};_u.prototype.removeCommonBits=function(t){if(this._commonCoord.x===0&&this._commonCoord.y===0)return t;var e=new ze(this._commonCoord);e.x=-e.x,e.y=-e.y;var n=new yu(e);return t.apply(n),t.geometryChanged(),t};_u.prototype.getCommonCoordinate=function(){return this._commonCoord};_u.prototype.add=function(t){t.apply(this._ccFilter),this._commonCoord=this._ccFilter.getCommonCoordinate()};_u.prototype.interfaces_=function(){return[]};_u.prototype.getClass=function(){return _u};cb.CommonCoordinateFilter.get=function(){return sh};cb.Translater.get=function(){return yu};Object.defineProperties(_u,cb);var sh=function(){this._commonBitsX=new Ji,this._commonBitsY=new Ji};sh.prototype.filter=function(t){this._commonBitsX.add(t.x),this._commonBitsY.add(t.y)};sh.prototype.getCommonCoordinate=function(){return new ze(this._commonBitsX.getCommon(),this._commonBitsY.getCommon())};sh.prototype.interfaces_=function(){return[Wa]};sh.prototype.getClass=function(){return sh};var yu=function(){this.trans=null;var t=arguments[0];this.trans=t};yu.prototype.filter=function(t,e){var n=t.getOrdinate(e,0)+this.trans.x,r=t.getOrdinate(e,1)+this.trans.y;t.setOrdinate(e,0,n),t.setOrdinate(e,1,r)};yu.prototype.isDone=function(){return!1};yu.prototype.isGeometryChanged=function(){return!0};yu.prototype.interfaces_=function(){return[Gs]};yu.prototype.getClass=function(){return yu};var Li=function(t,e){this._geom=new Array(2).fill(null),this._snapTolerance=null,this._cbr=null,this._geom[0]=t,this._geom[1]=e,this.computeSnapTolerance()};Li.prototype.selfSnap=function(t){var e=new Gr(t),n=e.snapTo(t,this._snapTolerance);return n};Li.prototype.removeCommonBits=function(t){this._cbr=new _u,this._cbr.add(t[0]),this._cbr.add(t[1]);var e=new Array(2).fill(null);return e[0]=this._cbr.removeCommonBits(t[0].copy()),e[1]=this._cbr.removeCommonBits(t[1].copy()),e};Li.prototype.prepareResult=function(t){return this._cbr.addCommonBits(t),t};Li.prototype.getResultGeometry=function(t){var e=this.snap(this._geom),n=an.overlayOp(e[0],e[1],t);return this.prepareResult(n)};Li.prototype.checkValid=function(t){t.isValid()||Ri.out.println("Snapped geometry is invalid")};Li.prototype.computeSnapTolerance=function(){this._snapTolerance=Gr.computeOverlaySnapTolerance(this._geom[0],this._geom[1])};Li.prototype.snap=function(t){var e=this.removeCommonBits(t),n=Gr.snap(e[0],e[1],this._snapTolerance);return n};Li.prototype.interfaces_=function(){return[]};Li.prototype.getClass=function(){return Li};Li.overlayOp=function(t,e,n){var r=new Li(t,e);return r.getResultGeometry(n)};Li.union=function(t,e){return Li.overlayOp(t,e,an.UNION)};Li.intersection=function(t,e){return Li.overlayOp(t,e,an.INTERSECTION)};Li.symDifference=function(t,e){return Li.overlayOp(t,e,an.SYMDIFFERENCE)};Li.difference=function(t,e){return Li.overlayOp(t,e,an.DIFFERENCE)};var ao=function(t,e){this._geom=new Array(2).fill(null),this._geom[0]=t,this._geom[1]=e};ao.prototype.getResultGeometry=function(t){var e=null,n=!1,r=null;try{e=an.overlayOp(this._geom[0],this._geom[1],t);var i=!0;i&&(n=!0)}catch(s){if(s instanceof Tl)r=s;else throw s}finally{}if(!n)try{e=Li.overlayOp(this._geom[0],this._geom[1],t)}catch(s){throw s instanceof Tl?r:s}finally{}return e};ao.prototype.interfaces_=function(){return[]};ao.prototype.getClass=function(){return ao};ao.overlayOp=function(t,e,n){var r=new ao(t,e);return r.getResultGeometry(n)};ao.union=function(t,e){return ao.overlayOp(t,e,an.UNION)};ao.intersection=function(t,e){return ao.overlayOp(t,e,an.INTERSECTION)};ao.symDifference=function(t,e){return ao.overlayOp(t,e,an.SYMDIFFERENCE)};ao.difference=function(t,e){return ao.overlayOp(t,e,an.DIFFERENCE)};var pm=function(){this.mce=null,this.chainIndex=null;var t=arguments[0],e=arguments[1];this.mce=t,this.chainIndex=e};pm.prototype.computeIntersections=function(t,e){this.mce.computeIntersectsForChain(this.chainIndex,t.mce,t.chainIndex,e)};pm.prototype.interfaces_=function(){return[]};pm.prototype.getClass=function(){return pm};var Uo=function t(){if(this._label=null,this._xValue=null,this._eventType=null,this._insertEvent=null,this._deleteEventIndex=null,this._obj=null,arguments.length===2){var e=arguments[0],n=arguments[1];this._eventType=t.DELETE,this._xValue=e,this._insertEvent=n}else if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2];this._eventType=t.INSERT,this._label=r,this._xValue=i,this._obj=s}},hb={INSERT:{configurable:!0},DELETE:{configurable:!0}};Uo.prototype.isDelete=function(){return this._eventType===Uo.DELETE};Uo.prototype.setDeleteEventIndex=function(t){this._deleteEventIndex=t};Uo.prototype.getObject=function(){return this._obj};Uo.prototype.compareTo=function(t){var e=t;return this._xValuee._xValue?1:this._eventTypee._eventType?1:0};Uo.prototype.getInsertEvent=function(){return this._insertEvent};Uo.prototype.isInsert=function(){return this._eventType===Uo.INSERT};Uo.prototype.isSameLabel=function(t){return this._label===null?!1:this._label===t._label};Uo.prototype.getDeleteEventIndex=function(){return this._deleteEventIndex};Uo.prototype.interfaces_=function(){return[Es]};Uo.prototype.getClass=function(){return Uo};hb.INSERT.get=function(){return 1};hb.DELETE.get=function(){return 2};Object.defineProperties(Uo,hb);var V_=function(){};V_.prototype.interfaces_=function(){return[]};V_.prototype.getClass=function(){return V_};var zi=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._properIntersectionPoint=null,this._li=null,this._includeProper=null,this._recordIsolated=null,this._isSelfIntersection=null,this._numIntersections=0,this.numTests=0,this._bdyNodes=null,this._isDone=!1,this._isDoneWhenProperInt=!1;var t=arguments[0],e=arguments[1],n=arguments[2];this._li=t,this._includeProper=e,this._recordIsolated=n};zi.prototype.isTrivialIntersection=function(t,e,n,r){if(t===n&&this._li.getIntersectionNum()===1){if(zi.isAdjacentSegments(e,r))return!0;if(t.isClosed()){var i=t.getNumPoints()-1;if(e===0&&r===i||r===0&&e===i)return!0}}return!1};zi.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint};zi.prototype.setIsDoneIfProperInt=function(t){this._isDoneWhenProperInt=t};zi.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior};zi.prototype.isBoundaryPointInternal=function(t,e){for(var n=e.iterator();n.hasNext();){var r=n.next(),i=r.getCoordinate();if(t.isIntersection(i))return!0}return!1};zi.prototype.hasProperIntersection=function(){return this._hasProper};zi.prototype.hasIntersection=function(){return this._hasIntersection};zi.prototype.isDone=function(){return this._isDone};zi.prototype.isBoundaryPoint=function(t,e){return e===null?!1:!!(this.isBoundaryPointInternal(t,e[0])||this.isBoundaryPointInternal(t,e[1]))};zi.prototype.setBoundaryNodes=function(t,e){this._bdyNodes=new Array(2).fill(null),this._bdyNodes[0]=t,this._bdyNodes[1]=e};zi.prototype.addIntersections=function(t,e,n,r){if(t===n&&e===r)return null;this.numTests++;var i=t.getCoordinates()[e],s=t.getCoordinates()[e+1],c=n.getCoordinates()[r],l=n.getCoordinates()[r+1];this._li.computeIntersection(i,s,c,l),this._li.hasIntersection()&&(this._recordIsolated&&(t.setIsolated(!1),n.setIsolated(!1)),this._numIntersections++,this.isTrivialIntersection(t,e,n,r)||(this._hasIntersection=!0,(this._includeProper||!this._li.isProper())&&(t.addIntersections(this._li,e,0),n.addIntersections(this._li,r,1)),this._li.isProper()&&(this._properIntersectionPoint=this._li.getIntersection(0).copy(),this._hasProper=!0,this._isDoneWhenProperInt&&(this._isDone=!0),this.isBoundaryPoint(this._li,this._bdyNodes)||(this._hasProperInterior=!0))))};zi.prototype.interfaces_=function(){return[]};zi.prototype.getClass=function(){return zi};zi.isAdjacentSegments=function(t,e){return Math.abs(t-e)===1};var JO=function(t){function e(){t.call(this),this.events=new yt,this.nOverlaps=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.prepareEvents=function(){var n=this;Ws.sort(this.events);for(var r=0;re||this._maxs?1:0};dm.prototype.interfaces_=function(){return[Of]};dm.prototype.getClass=function(){return dm};var QO=function(t){function e(){t.call(this),this._item=null;var n=arguments[0],r=arguments[1],i=arguments[2];this._min=n,this._max=r,this._item=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.query=function(n,r,i){if(!this.intersects(n,r))return null;i.visitItem(this._item)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Ja),e5=function(t){function e(){t.call(this),this._node1=null,this._node2=null;var n=arguments[0],r=arguments[1];this._node1=n,this._node2=r,this.buildExtent(this._node1,this._node2)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.buildExtent=function(n,r){this._min=Math.min(n._min,r._min),this._max=Math.max(n._max,r._max)},e.prototype.query=function(n,r,i){if(!this.intersects(n,r))return null;this._node1!==null&&this._node1.query(n,r,i),this._node2!==null&&this._node2.query(n,r,i)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Ja),Qa=function(){this._leaves=new yt,this._root=null,this._level=0};Qa.prototype.buildTree=function(){var t=this;Ws.sort(this._leaves,new Ja.NodeComparator);for(var e=this._leaves,n=null,r=new yt;;){if(t.buildLevel(e,r),r.size()===1)return r.get(0);n=e,e=r,r=n}};Qa.prototype.insert=function(t,e,n){if(this._root!==null)throw new Error("Index cannot be added to once it has been queried");this._leaves.add(new QO(t,e,n))};Qa.prototype.query=function(t,e,n){this.init(),this._root.query(t,e,n)};Qa.prototype.buildRoot=function(){if(this._root!==null)return null;this._root=this.buildTree()};Qa.prototype.printNode=function(t){Ri.out.println(js.toLineString(new ze(t._min,this._level),new ze(t._max,this._level)))};Qa.prototype.init=function(){if(this._root!==null)return null;this.buildRoot()};Qa.prototype.buildLevel=function(t,e){this._level++,e.clear();for(var n=0;n=2,"found LineString with single point"),this.insertBoundaryPoint(this._argIndex,r[0]),this.insertBoundaryPoint(this._argIndex,r[r.length-1])},e.prototype.getInvalidPoint=function(){return this._invalidPoint},e.prototype.getBoundaryPoints=function(){for(var n=this.getBoundaryNodes(),r=new Array(n.size()).fill(null),i=0,s=n.iterator();s.hasNext();){var c=s.next();r[i++]=c.getCoordinate().copy()}return r},e.prototype.getBoundaryNodes=function(){return this._boundaryNodes===null&&(this._boundaryNodes=this._nodes.getBoundaryNodes(this._argIndex)),this._boundaryNodes},e.prototype.addSelfIntersectionNode=function(n,r,i){if(this.isBoundaryNode(n,r))return null;i===Fe.BOUNDARY&&this._useBoundaryDeterminationRule?this.insertBoundaryPoint(n,r):this.insertPoint(n,r,i)},e.prototype.addPolygonRing=function(n,r,i){if(n.isEmpty())return null;var s=In.removeRepeatedPoints(n.getCoordinates());if(s.length<4)return this._hasTooFewPoints=!0,this._invalidPoint=s[0],null;var c=r,l=i;Et.isCCW(s)&&(c=i,l=r);var d=new B_(s,new Hn(this._argIndex,Fe.BOUNDARY,c,l));this._lineEdgeMap.put(n,d),this.insertEdge(d),this.insertPoint(this._argIndex,s[0],Fe.BOUNDARY)},e.prototype.insertPoint=function(n,r,i){var s=this._nodes.addNode(r),c=s.getLabel();c===null?s._label=new Hn(n,i):c.setLocation(n,i)},e.prototype.createEdgeSetIntersector=function(){return new JO},e.prototype.addSelfIntersectionNodes=function(n){for(var r=this,i=this._edges.iterator();i.hasNext();)for(var s=i.next(),c=s.getLabel().getLocation(n),l=s.eiList.iterator();l.hasNext();){var d=l.next();r.addSelfIntersectionNode(n,d.coord,c)}},e.prototype.add=function(){if(arguments.length===1){var n=arguments[0];if(n.isEmpty())return null;if(n instanceof Ga&&(this._useBoundaryDeterminationRule=!1),n instanceof li)this.addPolygon(n);else if(n instanceof Nr)this.addLineString(n);else if(n instanceof Fo)this.addPoint(n);else if(n instanceof Gf)this.addCollection(n);else if(n instanceof ec)this.addCollection(n);else if(n instanceof Ga)this.addCollection(n);else if(n instanceof io)this.addCollection(n);else throw new Error(n.getClass().getName())}else return t.prototype.add.apply(this,arguments)},e.prototype.addCollection=function(n){for(var r=this,i=0;i50?(this._areaPtLocator===null&&(this._areaPtLocator=new $f(this._parentGeom)),this._areaPtLocator.locate(n)):this._ptLocator.locate(n,this._parentGeom)},e.prototype.findEdge=function(){if(arguments.length===1){var n=arguments[0];return this._lineEdgeMap.get(n)}else return t.prototype.findEdge.apply(this,arguments)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.determineBoundary=function(n,r){return n.isInBoundary(r)?Fe.BOUNDARY:Fe.INTERIOR},e}(Lr),Jf=function(){if(this._li=new pc,this._resultPrecisionModel=null,this._arg=null,arguments.length===1){var t=arguments[0];this.setComputationPrecision(t.getPrecisionModel()),this._arg=new Array(1).fill(null),this._arg[0]=new Sd(0,t)}else if(arguments.length===2){var e=arguments[0],n=arguments[1],r=xs.OGC_SFS_BOUNDARY_RULE;e.getPrecisionModel().compareTo(n.getPrecisionModel())>=0?this.setComputationPrecision(e.getPrecisionModel()):this.setComputationPrecision(n.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new Sd(0,e,r),this._arg[1]=new Sd(1,n,r)}else if(arguments.length===3){var i=arguments[0],s=arguments[1],c=arguments[2];i.getPrecisionModel().compareTo(s.getPrecisionModel())>=0?this.setComputationPrecision(i.getPrecisionModel()):this.setComputationPrecision(s.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new Sd(0,i,c),this._arg[1]=new Sd(1,s,c)}};Jf.prototype.getArgGeometry=function(t){return this._arg[t].getGeometry()};Jf.prototype.setComputationPrecision=function(t){this._resultPrecisionModel=t,this._li.setPrecisionModel(this._resultPrecisionModel)};Jf.prototype.interfaces_=function(){return[]};Jf.prototype.getClass=function(){return Jf};var Ku=function(){};Ku.prototype.interfaces_=function(){return[]};Ku.prototype.getClass=function(){return Ku};Ku.map=function(){if(arguments[0]instanceof $t&&Kt(arguments[1],Ku.MapOp)){for(var t=arguments[0],e=arguments[1],n=new yt,r=0;r=t.size()?null:t.get(e)};$r.union=function(t){var e=new $r(t);return e.union()};aT.STRTREE_NODE_CAPACITY.get=function(){return 4};Object.defineProperties($r,aT);var U_=function(){};U_.prototype.interfaces_=function(){return[]};U_.prototype.getClass=function(){return U_};U_.union=function(t,e){if(t.isEmpty()||e.isEmpty()){if(t.isEmpty()&&e.isEmpty())return an.createEmptyResult(an.UNION,t,e,t.getFactory());if(t.isEmpty())return e.copy();if(e.isEmpty())return t.copy()}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),ao.overlayOp(t,e,an.UNION)};function dc(){return new j_}function j_(){this.reset()}j_.prototype={constructor:j_,reset:function(){this.s=this.t=0},add:function(t){fS(jg,t,this.t),fS(this,jg.s,this.s),this.s?this.t+=jg.t:this.s=jg.t},valueOf:function(){return this.s}};var jg=new j_;function fS(t,e,n){var r=t.s=e+n,i=r-e,s=r-i;t.t=e-s+(n-i)}var Dr=1e-6,Qn=Math.PI,wl=Qn/2,pS=Qn/4,kl=Qn*2,Gu=180/Qn,la=Qn/180,to=Math.abs,t5=Math.atan,ep=Math.atan2,ri=Math.cos,ii=Math.sin,_p=Math.sqrt;function lT(t){return t>1?0:t<-1?Qn:Math.acos(t)}function ah(t){return t>1?wl:t<-1?-wl:Math.asin(t)}function Rd(){}function G_(t,e){t&&mS.hasOwnProperty(t.type)&&mS[t.type](t,e)}var dS={Feature:function(t,e){G_(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++rQn?t-kl:t<-Qn?t+kl:t,e]}o1.invert=o1;function r5(t,e,n){return(t%=kl)?e||n?uT(yS(t),vS(e,n)):yS(t):e||n?vS(e,n):o1}function _S(t){return function(e,n){return e+=t,[e>Qn?e-kl:e<-Qn?e+kl:e,n]}}function yS(t){var e=_S(t);return e.invert=_S(-t),e}function vS(t,e){var n=ri(t),r=ii(t),i=ri(e),s=ii(e);function c(l,d){var v=ri(d),S=ri(l)*v,E=ii(l)*v,C=ii(d),M=C*n+S*r;return[ep(E*i-M*s,S*n-C*r),ah(M*i+E*s)]}return c.invert=function(l,d){var v=ri(d),S=ri(l)*v,E=ii(l)*v,C=ii(d),M=C*i-E*s;return[ep(E*i+C*s,S*n+M*r),ah(M*n-S*r)]},c}function i5(t,e,n,r,i,s){if(n){var c=ri(e),l=ii(e),d=r*n;i==null?(i=e+r*kl,s=e-d/2):(i=bS(c,i),s=bS(c,s),(r>0?is)&&(i+=r*kl));for(var v,S=i;r>0?S>s:S1&&t.push(t.pop().concat(t.shift()))},result:function(){var n=t;return t=[],e=null,n}}}function o5(t,e,n,r,i,s){var c=t[0],l=t[1],d=e[0],v=e[1],S=0,E=1,C=d-c,M=v-l,A;if(A=n-c,!(!C&&A>0)){if(A/=C,C<0){if(A0){if(A>E)return;A>S&&(S=A)}if(A=i-c,!(!C&&A<0)){if(A/=C,C<0){if(A>E)return;A>S&&(S=A)}else if(C>0){if(A0)){if(A/=M,M<0){if(A0){if(A>E)return;A>S&&(S=A)}if(A=s-l,!(!M&&A<0)){if(A/=M,M<0){if(A>E)return;A>S&&(S=A)}else if(M>0){if(A0&&(t[0]=c+S*C,t[1]=l+S*M),E<1&&(e[0]=c+E*C,e[1]=l+E*M),!0}}}}}function l_(t,e){return to(t[0]-e[0])=0;--l)i.point((E=S[l])[0],E[1]);else r(C.x,C.p.x,-1,i);C=C.p}C=C.o,S=C.z,M=!M}while(!C.v);i.lineEnd()}}}function xS(t){if(e=t.length){for(var e,n=0,r=t[0],i;++ne?1:t>=e?0:NaN}function s5(t){return t.length===1&&(t=a5(t)),{left:function(e,n,r,i){for(r==null&&(r=0),i==null&&(i=e.length);r>>1;t(e[s],n)<0?r=s+1:i=s}return r},right:function(e,n,r,i){for(r==null&&(r=0),i==null&&(i=e.length);r>>1;t(e[s],n)>0?i=s:r=s+1}return r}}}function a5(t){return function(e,n){return fT(t(e),n)}}s5(fT);function pT(t){for(var e=t.length,n,r=-1,i=0,s,c;++r=0;)for(c=t[e],n=c.length;--n>=0;)s[--i]=c[n];return s}var Nd=1e9,Hg=-Nd;function l5(t,e,n,r){function i(v,S){return t<=v&&v<=n&&e<=S&&S<=r}function s(v,S,E,C){var M=0,A=0;if(v==null||(M=c(v,E))!==(A=c(S,E))||d(v,S)<0^E>0)do C.point(M===0||M===3?t:n,M>1?r:e);while((M=(M+E+4)%4)!==A);else C.point(S[0],S[1])}function c(v,S){return to(v[0]-t)0?0:3:to(v[0]-n)0?2:1:to(v[1]-e)0?1:0:S>0?3:2}function l(v,S){return d(v.x,S.x)}function d(v,S){var E=c(v,1),C=c(S,1);return E!==C?E-C:E===0?S[1]-v[1]:E===1?v[0]-S[0]:E===2?v[1]-S[1]:S[0]-v[0]}return function(v){var S=v,E=cT(),C,M,A,R,z,U,F,G,H,te,ee,fe={point:pe,lineStart:ae,lineEnd:Ke,polygonStart:Ae,polygonEnd:Y};function pe(tt,ut){i(tt,ut)&&S.point(tt,ut)}function se(){for(var tt=0,ut=0,He=M.length;utr&&(wn-Mt)*(r-rn)>(fn-rn)*(t-Mt)&&++tt:fn<=r&&(wn-Mt)*(r-rn)<(fn-rn)*(t-Mt)&&--tt;return tt}function Ae(){S=E,C=[],M=[],ee=!0}function Y(){var tt=se(),ut=ee&&tt,He=(C=pT(C)).length;(ut||He)&&(v.polygonStart(),ut&&(v.lineStart(),s(null,null,1,v),v.lineEnd()),He&&hT(C,l,tt,s,v),v.polygonEnd()),S=v,C=M=A=null}function ae(){fe.point=Le,M&&M.push(A=[]),te=!0,H=!1,F=G=NaN}function Ke(){C&&(Le(R,z),U&&H&&E.rejoin(),C.push(E.result())),fe.point=pe,H&&S.lineEnd()}function Le(tt,ut){var He=i(tt,ut);if(M&&A.push([tt,ut]),te)R=tt,z=ut,U=He,te=!1,He&&(S.lineStart(),S.point(tt,ut));else if(He&&H)S.point(tt,ut);else{var Ot=[F=Math.max(Hg,Math.min(Nd,F)),G=Math.max(Hg,Math.min(Nd,G))],Gt=[tt=Math.max(Hg,Math.min(Nd,tt)),ut=Math.max(Hg,Math.min(Nd,ut))];o5(Ot,Gt,t,e,n,r)?(H||(S.lineStart(),S.point(Ot[0],Ot[1])),S.point(Gt[0],Gt[1]),He||S.lineEnd(),ee=!1):He&&(S.lineStart(),S.point(tt,ut),ee=!1)}F=tt,G=ut,H=He}return fe}}var hv=dc();function u5(t,e){var n=e[0],r=e[1],i=[ii(n),-ri(n),0],s=0,c=0;hv.reset();for(var l=0,d=t.length;l=0?1:-1,pe=fe*ee,se=pe>Qn,Ae=A*H;if(hv.add(ep(Ae*fe*ii(pe),R*te+Ae*ri(pe))),s+=se?ee+fe*kl:ee,se^C>=n^F>=n){var Y=q_(tp(E),tp(U));i1(Y);var ae=q_(i,Y);i1(ae);var Ke=(se^ee>=0?-1:1)*ah(ae[2]);(r>Ke||r===Ke&&(Y[0]||Y[1]))&&(c+=se^ee>=0?1:-1)}}return(s<-Dr||smm&&(mm=t),eH_&&(H_=e)}dc();function dT(t,e,n,r){return function(i,s){var c=e(s),l=i.invert(r[0],r[1]),d=cT(),v=e(d),S=!1,E,C,M,A={point:R,lineStart:U,lineEnd:F,polygonStart:function(){A.point=G,A.lineStart=H,A.lineEnd=te,C=[],E=[]},polygonEnd:function(){A.point=R,A.lineStart=U,A.lineEnd=F,C=pT(C);var ee=u5(E,l);C.length?(S||(s.polygonStart(),S=!0),hT(C,f5,ee,n,s)):ee&&(S||(s.polygonStart(),S=!0),s.lineStart(),n(null,null,1,s),s.lineEnd()),S&&(s.polygonEnd(),S=!1),C=E=null},sphere:function(){s.polygonStart(),s.lineStart(),n(null,null,1,s),s.lineEnd(),s.polygonEnd()}};function R(ee,fe){var pe=i(ee,fe);t(ee=pe[0],fe=pe[1])&&s.point(ee,fe)}function z(ee,fe){var pe=i(ee,fe);c.point(pe[0],pe[1])}function U(){A.point=z,c.lineStart()}function F(){A.point=R,c.lineEnd()}function G(ee,fe){M.push([ee,fe]);var pe=i(ee,fe);v.point(pe[0],pe[1])}function H(){v.lineStart(),M=[]}function te(){G(M[0][0],M[0][1]),v.lineEnd();var ee=v.clean(),fe=d.result(),pe,se=fe.length,Ae,Y,ae;if(M.pop(),E.push(M),M=null,!!se){if(ee&1){if(Y=fe[0],(Ae=Y.length-1)>0){for(S||(s.polygonStart(),S=!0),s.lineStart(),pe=0;pe1&&ee&2&&fe.push(fe.pop().concat(fe.shift())),C.push(fe.filter(h5))}}return A}}function h5(t){return t.length>1}function f5(t,e){return((t=t.x)[0]<0?t[1]-wl-Dr:wl-t[1])-((e=e.x)[0]<0?e[1]-wl-Dr:wl-e[1])}const ES=dT(function(){return!0},p5,m5,[-Qn,-wl]);function p5(t){var e=NaN,n=NaN,r=NaN,i;return{lineStart:function(){t.lineStart(),i=1},point:function(s,c){var l=s>0?Qn:-Qn,d=to(s-e);to(d-Qn)0?wl:-wl),t.point(r,n),t.lineEnd(),t.lineStart(),t.point(l,n),t.point(s,n),i=0):r!==l&&d>=Qn&&(to(e-r)Dr?t5((ii(e)*(s=ri(r))*ii(n)-ii(r)*(i=ri(e))*ii(t))/(i*s*c)):(e+r)/2}function m5(t,e,n,r){var i;if(t==null)i=n*wl,r.point(-Qn,i),r.point(0,i),r.point(Qn,i),r.point(Qn,0),r.point(Qn,-i),r.point(0,-i),r.point(-Qn,-i),r.point(-Qn,0),r.point(-Qn,i);else if(to(t[0]-e[0])>Dr){var s=t[0]0,i=to(n)>Dr;function s(S,E,C,M){i5(M,t,e,C,S,E)}function c(S,E){return ri(S)*ri(E)>n}function l(S){var E,C,M,A,R;return{lineStart:function(){A=M=!1,R=1},point:function(z,U){var F=[z,U],G,H=c(z,U),te=r?H?0:v(z,U):H?v(z+(z<0?Qn:-Qn),U):0;if(!E&&(A=M=H)&&S.lineStart(),H!==M&&(G=d(E,F),(!G||l_(E,G)||l_(F,G))&&(F[0]+=Dr,F[1]+=Dr,H=c(F[0],F[1]))),H!==M)R=0,H?(S.lineStart(),G=d(F,E),S.point(G[0],G[1])):(G=d(E,F),S.point(G[0],G[1]),S.lineEnd()),E=G;else if(i&&E&&r^H){var ee;!(te&C)&&(ee=d(F,E,!0))&&(R=0,r?(S.lineStart(),S.point(ee[0][0],ee[0][1]),S.point(ee[1][0],ee[1][1]),S.lineEnd()):(S.point(ee[1][0],ee[1][1]),S.lineEnd(),S.lineStart(),S.point(ee[0][0],ee[0][1])))}H&&(!E||!l_(E,F))&&S.point(F[0],F[1]),E=F,M=H,C=te},lineEnd:function(){M&&S.lineEnd(),E=null},clean:function(){return R|(A&&M)<<1}}}function d(S,E,C){var M=tp(S),A=tp(E),R=[1,0,0],z=q_(M,A),U=Gg(z,z),F=z[0],G=U-F*F;if(!G)return!C&&S;var H=n*U/G,te=-n*F/G,ee=q_(R,z),fe=qg(R,H),pe=qg(z,te);cv(fe,pe);var se=ee,Ae=Gg(fe,se),Y=Gg(se,se),ae=Ae*Ae-Y*(Gg(fe,fe)-1);if(!(ae<0)){var Ke=_p(ae),Le=qg(se,(-Ae-Ke)/Y);if(cv(Le,fe),Le=r1(Le),!C)return Le;var tt=S[0],ut=E[0],He=S[1],Ot=E[1],Gt;ut0^Le[1]<(to(Le[0]-tt)Qn^(tt<=Le[0]&&Le[0]<=ut)){var rn=qg(se,(-Ae+Ke)/Y);return cv(rn,fe),[Le,r1(rn)]}}}function v(S,E){var C=r?t:Qn-t,M=0;return S<-C?M|=1:S>C&&(M|=2),E<-C?M|=4:E>C&&(M|=8),M}return dT(c,l,s,r?[0,-t]:[-Qn,t-Qn])}function mT(t){return function(e){var n=new s1;for(var r in t)n[r]=t[r];return n.stream=e,n}}function s1(){}s1.prototype={constructor:s1,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function gT(t,e,n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],s=t.clipExtent&&t.clipExtent();t.scale(150).translate([0,0]),s!=null&&t.clipExtent(null),n5(n,t.stream(SS));var c=SS.result(),l=Math.min(r/(c[1][0]-c[0][0]),i/(c[1][1]-c[0][1])),d=+e[0][0]+(r-l*(c[1][0]+c[0][0]))/2,v=+e[0][1]+(i-l*(c[1][1]+c[0][1]))/2;return s!=null&&t.clipExtent(s),t.scale(l*150).translate([d,v])}function _5(t,e,n){return gT(t,[[0,0],e],n)}var IS=16,y5=ri(30*la);function CS(t,e){return+e?b5(t,e):v5(t)}function v5(t){return mT({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}function b5(t,e){function n(r,i,s,c,l,d,v,S,E,C,M,A,R,z){var U=v-r,F=S-i,G=U*U+F*F;if(G>4*e&&R--){var H=c+C,te=l+M,ee=d+A,fe=_p(H*H+te*te+ee*ee),pe=ah(ee/=fe),se=to(to(ee)-1)e||to((U*Ke+F*Le)/G-.5)>.3||c*C+l*M+d*A2?Le[2]%360*la:0,ae()):[v*Gu,S*Gu,E*Gu]},se.precision=function(Le){return arguments.length?(ee=CS(Y,te=Le*Le),Ke()):_p(te)},se.fitExtent=function(Le,tt){return gT(se,Le,tt)},se.fitSize=function(Le,tt){return _5(se,Le,tt)};function ae(){M=uT(C=r5(v,S,E),e);var Le=e(l,d);return s=r-Le[0]*n,c=i+Le[1]*n,Ke()}function Ke(){return fe=pe=null,se}return function(){return e=t.apply(this,arguments),se.invert=e.invert&&Ae,ae()}}function _T(t){return function(e,n){var r=ri(e),i=ri(n),s=t(r*i);return[s*i*ii(e),s*ii(n)]}}function yT(t){return function(e,n){var r=_p(e*e+n*n),i=t(r),s=ii(i),c=ri(i);return[ep(e*s,r*c),ah(r&&n*s/r)]}}var E5=_T(function(t){return _p(2/(1+t))});E5.invert=yT(function(t){return 2*ah(t/2)});var vT=_T(function(t){return(t=lT(t))&&t/ii(t)});vT.invert=yT(function(t){return t});function I5(){return w5(vT).scale(79.4188).clipAngle(180-.001)}function TS(t,e){return[t,e]}TS.invert=TS;function C5(t,e,n){n=n||{};var r=n.units||"kilometers",i=n.steps||8;if(!t)throw new Error("geojson is required");if(typeof n!="object")throw new Error("options must be an object");if(typeof i!="number")throw new Error("steps must be an number");if(e===void 0)throw new Error("radius is required");if(i<=0)throw new Error("steps must be greater than 0");var s=[];switch(t.type){case"GeometryCollection":return RC(t,function(c){var l=u_(c,e,r,i);l&&s.push(l)}),Qv(s);case"FeatureCollection":return aS(t,function(c){var l=u_(c,e,r,i);l&&aS(l,function(d){d&&s.push(d)})}),Qv(s)}return u_(t,e,r,i)}function u_(t,e,n,r){var i=t.properties||{},s=t.type==="Feature"?t.geometry:t;if(s.type==="GeometryCollection"){var c=[];return RC(t,function(R){var z=u_(R,e,n,r);z&&c.push(z)}),Qv(c)}var l=T5(s),d={type:s.type,coordinates:xT(s.coordinates,l)},v=new ib,S=v.read(d),E=RO(NO(e,n),"meters"),C=ki.bufferOp(S,E,r),M=new qC;if(C=M.write(C),!bT(C.coordinates)){var A={type:C.type,coordinates:wT(C.coordinates,l)};return py(A,i)}}function bT(t){return Array.isArray(t[0])?bT(t[0]):isNaN(t[0])}function xT(t,e){return typeof t[0]!="object"?e(t):t.map(function(n){return xT(n,e)})}function wT(t,e){return typeof t[0]!="object"?e.invert(t):t.map(function(n){return wT(n,e)})}function T5(t){var e=zO(t).geometry.coordinates,n=[-e[0],-e[1]];return I5().rotate(n).scale(Jo)}function L5(t,e){var n=O_(t),r=O_(e),i=t.properties||{},s=PC.difference(n.coordinates,r.coordinates);return s.length===0?null:s.length===1?AC(s[0],i):kC(s,i)}function LS(t){let e;for(const n of t)e&&n[0]-e[0]>=180?n[0]-=360:e&&n[0]-e[0]<-180&&(n[0]+=360),e=n}function PS(t,e){const n=L5({type:"Polygon",coordinates:[[[180,90],[-180,90],[-180,-90],[180,-90],[180,90]]]},t);if(!n)return;n.properties={isMask:"y"};const r=C5(t,0);if(r.geometry.type==="Polygon")for(const i of r.geometry.coordinates)LS(i);else for(const i of r.geometry.coordinates)for(const s of i)LS(s);e({type:"FeatureCollection",features:[r,n]})}let MS={type:"FeatureCollection",features:[]};function P5(t,e,n=!0,r=!0,i={},s={},c={fill:{paint:{"fill-color":"#000","fill-opacity":.1},filter:["all",["==",["geometry-type"],"Polygon"],["has","isMask"]]},line:{layout:{"line-cap":"square"},paint:{"line-width":["case",["==",["geometry-type"],"Polygon"],2,3],"line-dasharray":[1,1],"line-color":"#3170fe"},filter:["!",["has","isMask"]]}}){let l,d=[],v,S;function E(){(c!=null&&c.fill||c!=null&&c.line)&&t.addSource("full-geom",{type:"geojson",data:MS}),c!=null&&c.fill&&t.addLayer({...c==null?void 0:c.fill,id:"full-geom-fill",type:"fill",source:"full-geom"}),c!=null&&c.line&&t.addLayer({...c==null?void 0:c.line,id:"full-geom-line",type:"line",source:"full-geom"})}t.loaded()?E():t.once("load",()=>{E()});const C=A=>{l==null||l({type:"mapClick",coordinates:[A.lngLat.lng,A.lngLat.lat]})};function M(A=!1){if(!e)throw new Error;const R=document.createElement("div");return A&&R.classList.add("marker-interactive"),new iO({props:{displayIn:"maplibre"},target:R}),new e.Marker({element:R,offset:[1,-13]})}return{setEventHandler(A){A?(l=A,t.on("click",C)):(l=void 0,t.off("click",C))},flyTo(A,R){t.flyTo({center:A,zoom:R,...i})},fitBounds(A,R,z){t.fitBounds([[A[0],A[1]],[A[2],A[3]]],{padding:R,maxZoom:z,...s})},indicateReverse(A){t.getCanvasContainer().style.cursor=A?"crosshair":""},setReverseMarker(A){!e||!n||(S?A?S.setLngLat(A):(S.remove(),S=void 0):A&&(S=(typeof n=="object"?new e.Marker(n):M()).setLngLat(A).addTo(t),S.getElement().classList.add("marker-reverse")))},setMarkers(A,R){if(!n)return;function z(U){var F;(F=t.getSource("full-geom"))==null||F.setData(U)}for(const U of d)U.remove();if(d.length=0,z(MS),!!e){if(R){let U=!1;if(R.geometry.type==="GeometryCollection"){const F=R.geometry.geometries.filter(G=>G.type==="Polygon"||G.type==="MultiPolygon");if(F.length>0){let G=F.pop();for(const H of F)G=OO(G,H);PS({...R,geometry:G},z),U=!0}else{const G=R.geometry.geometries.filter(H=>H.type==="LineString"||H.type==="MultiLineString");G.length>0&&(z({...R,geometry:{type:"GeometryCollection",geometries:G}}),U=!0)}}if(!U){if(R.geometry.type==="Polygon"||R.geometry.type==="MultiPolygon")PS(R,z);else if(R.geometry.type==="LineString"||R.geometry.type==="MultiLineString"){z(R);return}}n&&d.push((typeof n=="object"?new e.Marker(n):M()).setLngLat(R.center).addTo(t))}if(r)for(const U of A??[]){if(U===R)continue;const F=(typeof r=="object"?new e.Marker(r):M(!0)).setLngLat(U.center).setPopup(new e.Popup({offset:[1,-27],closeButton:!1,closeOnMove:!0,className:"maptiler-gc-popup"}).setText(U.place_type[0]==="reverse"?U.place_name:U.place_name.replace(/,.*/,""))).addTo(t),G=F.getElement();G.addEventListener("click",H=>{H.stopPropagation(),l==null||l({type:"markerClick",id:U.id})}),G.addEventListener("mouseenter",()=>{l==null||l({type:"markerMouseEnter",id:U.id}),F.togglePopup()}),G.addEventListener("mouseleave",()=>{l==null||l({type:"markerMouseLeave",id:U.id}),F.togglePopup()}),d.push(F)}}},setSelectedMarker(A){v&&v.getElement().classList.toggle("marker-selected",!1),v=A>-1?d[A]:void 0,v==null||v.getElement().classList.toggle("marker-selected",!0)},getCenterAndZoom(){const A=t.getCenter();return[t.getZoom(),A.lng,A.lat]}}}function M5(t){let e,n;return{c(){e=su("svg"),n=su("path"),Ie(n,"d","M13.12.706a.982.982 0 0 0-1.391 0L6.907 5.517 2.087.696a.982.982 0 1 0-1.391 1.39l4.821 4.821L.696 11.73a.982.982 0 1 0 1.39 1.39l4.821-4.821 4.822 4.821a.982.982 0 1 0 1.39-1.39L8.298 6.908l4.821-4.822a.988.988 0 0 0 0-1.38Z"),Ie(e,"viewBox","0 0 14 14"),Ie(e,"width","13"),Ie(e,"height","13"),Ie(e,"class","svelte-en2qvf")},m(r,i){xe(r,e,i),oe(e,n)},p:Pt,i:Pt,o:Pt,d(r){r&&be(e)}}}class ST extends Yt{constructor(e){super(),Xt(this,e,null,M5,Ut,{})}}function A5(t){let e,n;return{c(){e=su("svg"),n=su("path"),Ie(n,"d","M15 0C6.705 0 0 6.705 0 15C0 23.295 6.705 30 15 30C23.295 30 30 23.295 30 15C30 6.705 23.295 0 15 0ZM22.5 20.385L20.385 22.5L15 17.115L9.615 22.5L7.5 20.385L12.885 15L7.5 9.615L9.615 7.5L15 12.885L20.385 7.5L22.5 9.615L17.115 15L22.5 20.385Z"),Ie(e,"viewBox","0 0 30 30"),Ie(e,"fill","none"),Ie(e,"xmlns","http://www.w3.org/2000/svg"),Ie(e,"class","svelte-d2loi5")},m(r,i){xe(r,e,i),oe(e,n)},p:Pt,i:Pt,o:Pt,d(r){r&&be(e)}}}class ET extends Yt{constructor(e){super(),Xt(this,e,null,A5,Ut,{})}}function k5(t){let e,n;return{c(){e=_e("img"),Wn(e.src,n=t[3]+"area.svg")||Ie(e,"src",n),Ie(e,"alt",t[6]),Ie(e,"class","svelte-ltkwvy")},m(r,i){xe(r,e,i)},p(r,i){i&8&&!Wn(e.src,n=r[3]+"area.svg")&&Ie(e,"src",n),i&64&&Ie(e,"alt",r[6])},d(r){r&&be(e)}}}function D5(t){let e,n;return{c(){e=_e("img"),Wn(e.src,n=t[3]+"reverse.svg")||Ie(e,"src",n),Ie(e,"alt",t[6]),Ie(e,"class","svelte-ltkwvy")},m(r,i){xe(r,e,i)},p(r,i){i&8&&!Wn(e.src,n=r[3]+"reverse.svg")&&Ie(e,"src",n),i&64&&Ie(e,"alt",r[6])},d(r){r&&be(e)}}}function R5(t){let e,n;return{c(){e=_e("img"),Wn(e.src,n=t[3]+"poi.svg")||Ie(e,"src",n),Ie(e,"alt",t[6]),Ie(e,"class","svelte-ltkwvy")},m(r,i){xe(r,e,i)},p(r,i){i&8&&!Wn(e.src,n=r[3]+"poi.svg")&&Ie(e,"src",n),i&64&&Ie(e,"alt",r[6])},d(r){r&&be(e)}}}function N5(t){let e,n;return{c(){e=_e("img"),Wn(e.src,n=t[3]+"postal_code.svg")||Ie(e,"src",n),Ie(e,"alt",t[6]),Ie(e,"class","svelte-ltkwvy")},m(r,i){xe(r,e,i)},p(r,i){i&8&&!Wn(e.src,n=r[3]+"postal_code.svg")&&Ie(e,"src",n),i&64&&Ie(e,"alt",r[6])},d(r){r&&be(e)}}}function O5(t){let e,n;return{c(){e=_e("img"),Wn(e.src,n=t[3]+"street.svg")||Ie(e,"src",n),Ie(e,"alt",t[6]),Ie(e,"class","svelte-ltkwvy")},m(r,i){xe(r,e,i)},p(r,i){i&8&&!Wn(e.src,n=r[3]+"street.svg")&&Ie(e,"src",n),i&64&&Ie(e,"alt",r[6])},d(r){r&&be(e)}}}function z5(t){let e,n;return{c(){e=_e("img"),Wn(e.src,n=t[3]+"road.svg")||Ie(e,"src",n),Ie(e,"alt",t[6]),Ie(e,"class","svelte-ltkwvy")},m(r,i){xe(r,e,i)},p(r,i){i&8&&!Wn(e.src,n=r[3]+"road.svg")&&Ie(e,"src",n),i&64&&Ie(e,"alt",r[6])},d(r){r&&be(e)}}}function F5(t){let e,n;return{c(){e=_e("img"),Wn(e.src,n=t[3]+"housenumber.svg")||Ie(e,"src",n),Ie(e,"alt",t[6]),Ie(e,"class","svelte-ltkwvy")},m(r,i){xe(r,e,i)},p(r,i){i&8&&!Wn(e.src,n=r[3]+"housenumber.svg")&&Ie(e,"src",n),i&64&&Ie(e,"alt",r[6])},d(r){r&&be(e)}}}function B5(t){let e,n,r,i;return{c(){e=_e("img"),Wn(e.src,n=t[5])||Ie(e,"src",n),Ie(e,"alt",t[4]),Ie(e,"class","svelte-ltkwvy")},m(s,c){xe(s,e,c),r||(i=Lt(e,"error",t[14]),r=!0)},p(s,c){c&32&&!Wn(e.src,n=s[5])&&Ie(e,"src",n),c&16&&Ie(e,"alt",s[4])},d(s){s&&be(e),r=!1,i()}}}function AS(t){let e,n;return{c(){e=_e("span"),n=ot(t[6]),Ie(e,"class","secondary svelte-ltkwvy")},m(r,i){xe(r,e,i),oe(e,n)},p(r,i){i&64&&cr(n,r[6])},d(r){r&&be(e)}}}function V5(t){var fe,pe;let e,n,r,i,s,c,l,d,v=(t[7]?t[0].place_name:t[0].place_name.replace(/,.*/,""))+"",S,E,C=t[2]==="always"||t[2]&&!t[0].address&&((fe=t[0].properties)==null?void 0:fe.kind)!=="road"&&((pe=t[0].properties)==null?void 0:pe.kind)!=="road_relation"&&!t[0].id.startsWith("address.")&&!t[0].id.startsWith("postal_code.")&&(!t[0].id.startsWith("poi.")||!t[5])&&!t[7],M,A,R=(t[7]?"":t[0].place_name.replace(/[^,]*,?\s*/,""))+"",z,U,F;function G(se,Ae){var Y,ae;return Ae&1&&(n=null),Ae&1&&(r=null),Ae&1&&(i=null),se[5]?B5:se[0].address?F5:((Y=se[0].properties)==null?void 0:Y.kind)==="road"||((ae=se[0].properties)==null?void 0:ae.kind)==="road_relation"?z5:(n==null&&(n=!!se[0].id.startsWith("address.")),n?O5:(r==null&&(r=!!se[0].id.startsWith("postal_code.")),r?N5:(i==null&&(i=!!se[0].id.startsWith("poi.")),i?R5:se[7]?D5:k5)))}let H=G(t,-1),te=H(t),ee=C&&AS(t);return{c(){e=_e("li"),te.c(),s=We(),c=_e("span"),l=_e("span"),d=_e("span"),S=ot(v),E=We(),ee&&ee.c(),M=We(),A=_e("span"),z=ot(R),Ie(d,"class","primary svelte-ltkwvy"),Ie(l,"class","svelte-ltkwvy"),Ie(A,"class","line2 svelte-ltkwvy"),Ie(c,"class","texts svelte-ltkwvy"),Ie(e,"tabindex","0"),Ie(e,"data-selected",t[1]),Ie(e,"class","svelte-ltkwvy"),xl(e,"selected",t[1])},m(se,Ae){xe(se,e,Ae),te.m(e,null),oe(e,s),oe(e,c),oe(c,l),oe(l,d),oe(d,S),oe(l,E),ee&&ee.m(l,null),oe(c,M),oe(c,A),oe(A,z),U||(F=[Lt(e,"mouseenter",t[12]),Lt(e,"focus",t[13])],U=!0)},p(se,[Ae]){var Y,ae;H===(H=G(se,Ae))&&te?te.p(se,Ae):(te.d(1),te=H(se),te&&(te.c(),te.m(e,s))),Ae&1&&v!==(v=(se[7]?se[0].place_name:se[0].place_name.replace(/,.*/,""))+"")&&cr(S,v),Ae&37&&(C=se[2]==="always"||se[2]&&!se[0].address&&((Y=se[0].properties)==null?void 0:Y.kind)!=="road"&&((ae=se[0].properties)==null?void 0:ae.kind)!=="road_relation"&&!se[0].id.startsWith("address.")&&!se[0].id.startsWith("postal_code.")&&(!se[0].id.startsWith("poi.")||!se[5])&&!se[7]),C?ee?ee.p(se,Ae):(ee=AS(se),ee.c(),ee.m(l,null)):ee&&(ee.d(1),ee=null),Ae&1&&R!==(R=(se[7]?"":se[0].place_name.replace(/[^,]*,?\s*/,""))+"")&&cr(z,R),Ae&2&&Ie(e,"data-selected",se[1]),Ae&2&&xl(e,"selected",se[1])},i:Pt,o:Pt,d(se){se&&be(e),te.d(),ee&&ee.d(),U=!1,Hr(F)}}}function U5(t,e,n){var G;let r,i,{feature:s}=e,{selected:c=!1}=e,{showPlaceType:l}=e,{missingIconsCache:d}=e,{iconsBaseUrl:v}=e;const S=(G=s.properties)==null?void 0:G.categories;let E,C,M=0,A=s.place_type[0]==="reverse";function R(H){C&&d.add(C),n(10,M++,M)}function z(H){gn.call(this,t,H)}function U(H){gn.call(this,t,H)}const F=H=>R(H.currentTarget);return t.$$set=H=>{"feature"in H&&n(0,s=H.feature),"selected"in H&&n(1,c=H.selected),"showPlaceType"in H&&n(2,l=H.showPlaceType),"missingIconsCache"in H&&n(9,d=H.missingIconsCache),"iconsBaseUrl"in H&&n(3,v=H.iconsBaseUrl)},t.$$.update=()=>{var H,te,ee,fe;if(t.$$.dirty&3640)do n(11,r--,r),n(4,E=S==null?void 0:S[r]),n(5,C=E?v+E.replace(/ /g,"_")+".svg":void 0);while(r>-1&&(!C||d.has(C)));t.$$.dirty&1&&n(6,i=s.id.startsWith("poi.")?(te=(H=s.properties)==null?void 0:H.categories)==null?void 0:te.join(", "):((fe=(ee=s.properties)==null?void 0:ee.place_type_name)==null?void 0:fe[0])??s.place_type[0])},n(11,r=(S==null?void 0:S.length)??0),[s,c,l,v,E,C,i,A,R,d,M,r,z,U,F]}class j5 extends Yt{constructor(e){super(),Xt(this,e,U5,V5,Ut,{feature:0,selected:1,showPlaceType:2,missingIconsCache:9,iconsBaseUrl:3})}}function G5(t){let e;return{c(){e=_e("div"),e.innerHTML='',Ie(e,"class","svelte-7cmwmc")},m(n,r){xe(n,e,r)},p:Pt,i:Pt,o:Pt,d(n){n&&be(e)}}}class q5 extends Yt{constructor(e){super(),Xt(this,e,null,G5,Ut,{})}}function W5(t){let e,n;return{c(){e=su("svg"),n=su("path"),Ie(n,"d","M30.003-26.765C13.46-26.765 0-14.158 0 1.337c0 23.286 24.535 42.952 28.39 46.04.24.192.402.316.471.376.323.282.732.424 1.142.424.41 0 .82-.142 1.142-.424.068-.06.231-.183.471-.376 3.856-3.09 28.39-22.754 28.39-46.04 0-15.495-13.46-28.102-30.003-28.102Zm1.757 12.469c4.38 0 7.858 1.052 10.431 3.158 2.595 2.105 3.89 4.913 3.89 8.422 0 2.34-.53 4.362-1.593 6.063-1.063 1.702-3.086 3.616-6.063 5.742-2.042 1.51-3.337 2.659-3.89 3.446-.532.787-.8 1.82-.8 3.096v1.914h-8.449V15.18c0-2.041.434-3.815 1.306-5.325.872-1.51 2.467-3.118 4.785-4.82 2.233-1.594 3.7-2.89 4.402-3.889a5.582 5.582 0 0 0 1.087-3.35c0-1.382-.51-2.435-1.531-3.158-1.02-.723-2.45-1.087-4.28-1.087-3.19 0-6.826 1.047-10.91 3.131l-3.472-6.986c4.742-2.659 9.77-3.992 15.087-3.992Zm-1.88 37.324c1.765 0 3.124.472 4.08 1.408.98.936 1.47 2.276 1.47 4.02 0 1.68-.49 3.007-1.47 3.985-.977.957-2.336 1.435-4.08 1.435-1.787 0-3.171-.465-4.15-1.4-.978-.958-1.47-2.298-1.47-4.02 0-1.787.48-3.14 1.436-4.054.957-.915 2.355-1.374 4.184-1.374Z"),Ie(e,"viewBox","0 0 60.006 21.412"),Ie(e,"width","14"),Ie(e,"height","20"),Ie(e,"class","svelte-en2qvf")},m(r,i){xe(r,e,i),oe(e,n)},p:Pt,i:Pt,o:Pt,d(r){r&&be(e)}}}class H5 extends Yt{constructor(e){super(),Xt(this,e,null,W5,Ut,{})}}function Z5(t){let e,n,r;return{c(){e=su("svg"),n=su("circle"),r=su("path"),Ie(n,"cx","4.789"),Ie(n,"cy","4.787"),Ie(n,"r","3.85"),sr(n,"stroke-width","1.875"),sr(n,"fill","none"),Ie(r,"d","M12.063 12.063 7.635 7.635"),sr(r,"stroke-width","1.875"),sr(r,"stroke-linecap","round"),Ie(e,"xmlns","http://www.w3.org/2000/svg"),Ie(e,"width","13"),Ie(e,"height","13"),Ie(e,"viewBox","0 0 13 13"),Ie(e,"class","svelte-1bpbt60")},m(i,s){xe(i,e,s),oe(e,n),oe(e,r)},p:Pt,i:Pt,o:Pt,d(i){i&&be(e)}}}class X5 extends Yt{constructor(e){super(),Xt(this,e,null,Z5,Ut,{})}}function Y5(t,e,n){const r=e[1],i=e[0],s=r-i;return t===r&&n?t:((t-i)%s+s)%s+i}function kS(t){const e=[...t];return e[2]r[0]||i.maxZoom!=null&&i.maxZoomDate.now()){if(!Ed.coords)break e;return Ed.coords}let s;try{return s=await new Promise((c,l)=>{n.signal.addEventListener("abort",()=>{l(Error("aborted"))}),navigator.geolocation.getCurrentPosition(d=>{c([d.coords.longitude,d.coords.latitude].map(v=>v.toFixed(6)).join(","))},d=>{l(d)},i)}),s}catch{}finally{i.cachedLocationExpiry&&(Ed={time:Date.now(),coords:s})}if(n.signal.aborted)return}if(i.type==="server-geolocation")return"ip";if(r&&i.type==="map-center")return r[1].toFixed(6)+","+r[2].toFixed(6)}}const DS=/(NORTH|SOUTH|[NS])?[\s]*([+-]?[0-8]?[0-9](?:[\.,]\d{3,}))[\s]*([•º°]?)[\s]*(NORTH|SOUTH|[NS])?[\s]*[,/;]?[\s]*(EAST|WEST|[EW])?[\s]*([+-]?[0-1]?[0-9]?[0-9](?:[\.,]\d{3,}))[\s]*([•º°]?)[\s]*(EAST|WEST|[EW])?/i,RS=/(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(\.)\s*([0-5]?[0-9])\s*(\.)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(\.)\s*([0-5]?[0-9])\s*(\.)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(EAST|WEST|[EW])?/i,NS=/(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)\s*(EAST|WEST|[EW])?/i,OS=/(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|’’|´´|["″”\.])?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|´´|’’|["″”\.])?\s*(EAST|WEST|[EW])?/i;function K5(t){if(!["DMS","DM","DD"].includes(t))throw new Error("invalid format specified");if(this.decimalCoordinates&&this.decimalCoordinates.trim()){if(t=="DD")return this.decimalCoordinates;const e=this.decimalCoordinates.split(",").map(c=>Number(c.trim()));let n=zS(e[0],t),r=zS(e[1],t);n.endsWith('.0"')&&r.endsWith('.0"')&&(n=n.replace(/\.0"$/,'"'),r=r.replace(/\.0"$/,'"'));const i=e[0]>=0?" N":" S",s=e[1]>=0?" E":" W";return`${n+i}, ${r+s}`}else throw new Error("no decimal coordinates to convert")}function zS(t,e){const n=Math.abs(t),r=Math.floor(n),i=(n-r)*60;if(e=="DM"){let l=J5(i,3).toFixed(3).padStart(6,"0");return`${r}° ${l}'`}let s=Math.floor(i),c=((i-s)*60).toFixed(1).padStart(4,"0");return s=s.toString().padStart(2,"0"),`${r}° ${s}' ${c}"`}function J5(t,e){const n=Math.pow(10,e);return Math.round((t+Number.EPSILON)*n)/n}function pb(t,e){e||(e=5),t=t.replace(/\s+/g," ").trim();let n=null,r=null,i="",s="",c=[],l=!1;if(DS.test(t))if(c=DS.exec(t),l=Zg(c),l){if(n=c[2],r=c[6],n.includes(",")&&(n=n.replace(",",".")),r.includes(",")&&(r=r.replace(",",".")),Number(Math.round(n))==Number(n))throw new Error("integer only coordinate provided");if(Number(Math.round(r))==Number(r))throw new Error("integer only coordinate provided");c[1]?(i=c[1],s=c[5]):c[4]&&(i=c[4],s=c[8])}else throw new Error("invalid decimal coordinate format");else if(RS.test(t))if(c=RS.exec(t),l=Zg(c),l)n=Math.abs(parseInt(c[2])),c[4]&&(n+=c[4]/60),c[6]&&(n+=c[6].replace(",",".")/3600),parseInt(c[2])<0&&(n=-1*n),r=Math.abs(parseInt(c[9])),c[11]&&(r+=c[11]/60),c[13]&&(r+=c[13].replace(",",".")/3600),parseInt(c[9])<0&&(r=-1*r),c[1]?(i=c[1],s=c[8]):c[7]&&(i=c[7],s=c[14]);else throw new Error("invalid DMS coordinates format");else if(NS.test(t))if(c=NS.exec(t),l=Zg(c),l)n=Math.abs(parseInt(c[2])),c[4]&&(n+=c[4]/60),c[6]&&(n+=c[6]/3600),parseInt(c[2])<0&&(n=-1*n),r=Math.abs(parseInt(c[10])),c[12]&&(r+=c[12]/60),c[14]&&(r+=c[14]/3600),parseInt(c[10])<0&&(r=-1*r),c[1]?(i=c[1],s=c[9]):c[8]&&(i=c[8],s=c[16]);else throw new Error("invalid DMS coordinates format");else if(OS.test(t))if(c=OS.exec(t),l=Zg(c),l)n=Math.abs(parseInt(c[2])),c[4]&&(n+=c[4]/60),c[6]&&(n+=c[6]/3600),parseInt(c[2])<0&&(n=-1*n),r=Math.abs(parseInt(c[10])),c[12]&&(r+=c[12]/60),c[14]&&(r+=c[14]/3600),parseInt(c[10])<0&&(r=-1*r),c[1]?(i=c[1],s=c[9]):c[8]&&(i=c[8],s=c[16]);else throw new Error("invalid coordinates format");if(l){if(Math.abs(r)>=180)throw new Error("invalid longitude value");if(Math.abs(n)>=90)throw new Error("invalid latitude value");if((i||s)&&(!i||!s))throw new Error("invalid coordinates format");if(i&&i==s)throw new Error("invalid coordinates format");let d=/S|SOUTH/i;d.test(i)&&n>0&&(n=-1*n),d=/W|WEST/i,d.test(s)&&r>0&&(r=-1*r);const v=c[0].trim();let S,E;const C=/[,/;\u0020]/g,M=v.match(C);if(M==null){const z=Math.floor(t.length/2);S=v.substring(0,z).trim(),E=v.substring(z).trim()}else{let z;M.length%2==1?z=Math.floor(M.length/2):z=M.length/2-1;let U=0;if(z==0)U=v.indexOf(M[0]),S=v.substring(0,U).trim(),E=v.substring(U+1).trim();else{let F=0,G=0;for(;F<=z;)U=v.indexOf(M[F],G),G=U+1,F++;S=v.substring(0,U).trim(),E=v.substring(U+1).trim()}}const A=S.split(".");if(A.length==2&&A[1]==0&&A[1].length!=2)throw new Error("invalid coordinates format");const R=E.split(".");if(R.length==2&&R[1]==0&&R[1].length!=2)throw new Error("invalid coordinates format");if(/^\d+$/.test(S)||/^\d+$/.test(E))throw new Error("degree only coordinate/s provided");return isNaN(n)&&n.includes(",")&&(n=n.replace(",",".")),n=Number(Number(n).toFixed(e)),isNaN(r)&&r.includes(",")&&(r=r.replace(",",".")),r=Number(Number(r).toFixed(e)),Object.freeze({verbatimCoordinates:v,verbatimLatitude:S,verbatimLongitude:E,decimalLatitude:n,decimalLongitude:r,decimalCoordinates:`${n},${r}`,closeEnough:Q5,toCoordinateFormat:K5})}else throw new Error("coordinates pattern match failed")}function Zg(t){if(!isNaN(t[0]))return!1;const e=[...t];if(e.shift(),e.length%2>0)return!1;const n=/^[-+]?\d+([\.,]\d+)?$/,r=/[eastsouthnorthwest]+/i,i=e.length/2;for(let s=0;s{e.decimalLatitude?t.push(e):t.push({...e,...nz})}),[...t,...rz,...iz]}const sz=oz();pb.formats=sz.map(t=>t.verbatimCoordinates);const az=pb;function BS(t,e,n){const r=t.slice();return r[81]=e[n],r[83]=n,r}function VS(t){let e,n;return e=new q5({}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function US(t){let e,n,r,i,s;return n=new H5({}),{c(){e=_e("button"),Ge(n.$$.fragment),Ie(e,"type","button"),Ie(e,"title",t[9]),Ie(e,"class","svelte-zh3kmv"),xl(e,"active",t[0])},m(c,l){xe(c,e,l),Ue(n,e,null),r=!0,i||(s=Lt(e,"click",t[67]),i=!0)},p(c,l){(!r||l[0]&512)&&Ie(e,"title",c[9]),(!r||l[0]&1)&&xl(e,"active",c[0])},i(c){r||(ue(n.$$.fragment,c),r=!0)},o(c){ye(n.$$.fragment,c),r=!1},d(c){c&&be(e),je(n),i=!1,s()}}}function lz(t){let e,n=[],r=new Map,i,s,c,l=bs(t[14]);const d=v=>v[81].id+(v[81].address?","+v[81].address:"");for(let v=0;v{fe=null}),jn()),(!G||tt[0]&2)&&xl(v,"displayable",Le[1]!==""),Le[5]===!0?pe?(pe.p(Le,tt),tt[0]&32&&ue(pe,1)):(pe=US(Le),pe.c(),ue(pe,1),pe.m(r,A)):pe&&(Un(),ye(pe,1,1,()=>{pe=null}),jn()),Ae&&Ae.p&&(!G||tt[1]&134217728)&&Ir(Ae,se,Le,Le[58],G?Er(se,Le[58],tt,null):Cr(Le[58]),null);let ut=z;z=Ke(Le),z===ut?~z&&ae[z].p(Le,tt):(U&&(Un(),ye(ae[ut],1,1,()=>{ae[ut]=null}),jn()),~z?(U=ae[z],U?U.p(Le,tt):(U=ae[z]=Y[z](Le),U.c()),ue(U,1),U.m(n,null)):U=null),(!G||tt[0]&4&&F!==(F=h_(Le[2])+" svelte-zh3kmv"))&&Ie(n,"class",F),(!G||tt[0]&22)&&xl(n,"can-collapse",Le[4]&&Le[1]==="")},i(Le){G||(ue(ee),ue(s.$$.fragment,Le),ue(E.$$.fragment,Le),ue(fe),ue(pe),ue(Ae,Le),ue(U),G=!0)},o(Le){ye(ee),ye(s.$$.fragment,Le),ye(E.$$.fragment,Le),ye(fe),ye(pe),ye(Ae,Le),ye(U),G=!1},d(Le){Le&&(be(e),be(n)),je(s),t[61](null),je(E),fe&&fe.d(),pe&&pe.d(),Ae&&Ae.d(Le),~z&&ae[z].d(),H=!1,Hr(te)}}}function pz(t,e,n){let r,{$$slots:i={},$$scope:s}=e,{class:c=void 0}=e,{apiKey:l}=e,{bbox:d=void 0}=e,{clearButtonTitle:v="clear"}=e,{clearOnBlur:S=!1}=e,{collapsed:E=!1}=e,{country:C=void 0}=e,{debounceSearch:M=200}=e,{enableReverse:A=!1}=e,{errorMessage:R="Something went wrong…"}=e,{filter:z=()=>!0}=e,{flyTo:U=!0}=e,{fuzzyMatch:F=!0}=e,{language:G=void 0}=e,{limit:H=void 0}=e,{mapController:te=void 0}=e,{minLength:ee=2}=e,{noResultsMessage:fe="Oops! Looks like you're trying to predict something that's not quite right. We can't seem to find what you're looking for. Maybe try double-checking your spelling or try a different search term. Keep on typing - we'll do our best to get you where you need to go!"}=e,{placeholder:pe="Search"}=e,{proximity:se=[{type:"server-geolocation"}]}=e,{reverseActive:Ae=A==="always"}=e,{reverseButtonTitle:Y="toggle reverse geocoding"}=e,{searchValue:ae=""}=e,{showFullGeometry:Ke=!0}=e,{showPlaceType:Le="ifNeeded"}=e,{showResultsWhileTyping:tt=!0}=e,{selectFirst:ut=!0}=e,{flyToSelected:He=!1}=e,{markerOnSelected:Ot=!0}=e,{types:Gt=void 0}=e,{excludeTypes:vt=!1}=e,{zoom:At=16}=e,{maxZoom:Mt=18}=e,{apiUrl:rn="https://api.maptiler.com/geocoding"}=e,{fetchParameters:wn={}}=e,{iconsBaseUrl:fn="https://cdn.maptiler.com/maptiler-geocoding-control/v1.2.2/icons/"}=e,{adjustUrlQuery:_n=Q=>{}}=e;function pn(){Re.focus()}function Yn(){Re.blur()}function zr(Q,Pe=!0){n(1,ae=Q),Pe?(n(15,It=-1),zl()):(ui(),setTimeout(()=>{Re.focus(),Re.select()}))}function Pn(){n(14,ne=void 0),n(55,dt=void 0),n(15,It=-1)}function ar(){n(54,Me=[]),n(55,dt=void 0)}let Zn=!1,ne,Me,dt,en="",Re,It=-1,Cn,yn=[],hr,jo,Cs,Ks;const tl=new Set,Fi=vu();ro(()=>{te&&(te.setEventHandler(void 0),te.indicateReverse(!1),te.setSelectedMarker(-1),te.setMarkers(void 0,void 0))});function zl(Q){if(jo&&(clearTimeout(jo),jo=void 0),It>-1&&ne)n(55,dt=ne[It]),n(1,ae=dt.place_type[0]==="reverse"?dt.place_name:dt.place_name.replace(/,.*/,"")),n(18,Cn=void 0),n(54,Me=void 0),n(15,It=-1);else if(ae){const Pe=Q||!Ts(ae);at(ae,{exact:!0}).then(()=>{n(54,Me=ne),n(55,dt=void 0),Pe&&ls()}).catch(Se=>n(18,Cn=Se))}}function Ts(Q){try{return az(Q,6)}catch{return!1}}async function at(Q,{byId:Pe=!1,exact:Se=!1}={}){n(18,Cn=void 0),hr==null||hr.abort();const Ne=new AbortController;n(19,hr=Ne);try{const qe=Ts(Q),Ye=new URLSearchParams;if(G!==void 0&&Ye.set("language",Array.isArray(G)?G.join(","):G??""),Gt&&Ye.set("types",Gt.join(",")),vt&&Ye.set("excludeTypes",String(vt)),d&&Ye.set("bbox",d.map(Qt=>Qt.toFixed(6)).join(",")),C&&Ye.set("country",Array.isArray(C)?C.join(","):C),!Pe&&!qe){const Qt=await $5(te,se,Ne);Qt&&Ye.set("proximity",Qt),(Se||!tt)&&Ye.set("autocomplete","false"),Ye.set("fuzzyMatch",String(F))}H!==void 0&&(!qe||(Gt==null?void 0:Gt.length)===1)&&Ye.set("limit",String(H)),Ye.set("key",l),_n(Ye);const Je=rn+"/"+encodeURIComponent(qe?qe.decimalLongitude+","+qe.decimalLatitude:Q)+".json?"+Ye.toString();if(Je===en){Pe?(n(14,ne=void 0),n(55,dt=yn[0])):n(14,ne=yn);return}en=Je;const Dt=await fetch(Je,{signal:Ne.signal,...wn});if(!Dt.ok)throw new Error(await Dt.text());const zt=await Dt.json();Fi("response",{url:Je,featureCollection:zt}),Pe?(n(14,ne=void 0),n(55,dt=zt.features[0]),yn=[dt]):(n(14,ne=zt.features.filter(z)),qe&&ne.unshift({type:"Feature",properties:{},id:"reverse_"+qe.decimalLongitude+"_"+qe.decimalLatitude,text:qe.decimalLatitude+", "+qe.decimalLongitude,place_name:qe.decimalLatitude+", "+qe.decimalLongitude,place_type:["reverse"],center:[qe.decimalLongitude,qe.decimalLatitude],bbox:[qe.decimalLongitude,qe.decimalLatitude,qe.decimalLongitude,qe.decimalLatitude],geometry:{type:"Point",coordinates:[qe.decimalLongitude,qe.decimalLatitude]}}),yn=ne,qe&&Re.focus())}catch(qe){if(qe&&typeof qe=="object"&&"name"in qe&&qe.name==="AbortError")return;throw qe}finally{Ne===hr&&n(19,hr=void 0)}}function ls(){var Se;if(!(Me!=null&&Me.length)||!U)return;const Q=[180,90,-180,-90],Pe=!Me.some(Ne=>!Ne.matching_text);for(const Ne of Me)if(Pe||!Ne.matching_text)for(const qe of[0,1,2,3])Q[qe]=Math[qe<2?"min":"max"](Q[qe],((Se=Ne.bbox)==null?void 0:Se[qe])??Ne.center[qe%2]);te&&Me.length>0&&(dt&&Q[0]===Q[2]&&Q[1]===Q[3]?te.flyTo(dt.center,At):te.fitBounds(kS(Q),50,Mt))}function lo(Q){n(0,Ae=A==="always"),n(14,ne=void 0),n(55,dt=void 0),n(15,It=-1),zr(Q[1].toFixed(6)+", "+Y5(Q[0],[-180,180],!0).toFixed(6),!1)}function Fl(Q){if(!ne)return;let Pe=Q.key==="ArrowDown"?1:Q.key==="ArrowUp"?-1:0;Pe&&(It===(ut?0:-1)&&Pe===-1&&n(15,It=ne.length),n(15,It+=Pe),It>=ne.length&&n(15,It=-1),It<0&&ut&&n(15,It=0),Q.preventDefault())}function ui(Q=!0){if(n(18,Cn=void 0),tt){if(jo&&clearTimeout(jo),ae.length{at(Pe).catch(Se=>n(18,Cn=Se))},Q?M:0)}else n(14,ne=void 0),n(18,Cn=void 0)}function ft(Q){n(55,dt=Q),n(1,ae=Q.place_name),n(15,It=-1)}const ln=()=>Re.focus();function sn(Q){ai[Q?"unshift":"push"](()=>{Re=Q,n(17,Re)})}function Zr(){ae=this.value,n(1,ae),n(13,Zn),n(27,S)}const us=()=>n(13,Zn=!0),on=()=>n(13,Zn=!1),Aa=()=>ui(),Jr=()=>{n(1,ae=""),Re.focus()},me=()=>n(0,Ae=!Ae),q=()=>n(18,Cn=void 0),Z=Q=>n(15,It=Q),J=Q=>ft(Q),le=()=>{ut||n(15,It=-1)},Te=()=>{};return t.$$set=Q=>{"class"in Q&&n(2,c=Q.class),"apiKey"in Q&&n(25,l=Q.apiKey),"bbox"in Q&&n(26,d=Q.bbox),"clearButtonTitle"in Q&&n(3,v=Q.clearButtonTitle),"clearOnBlur"in Q&&n(27,S=Q.clearOnBlur),"collapsed"in Q&&n(4,E=Q.collapsed),"country"in Q&&n(28,C=Q.country),"debounceSearch"in Q&&n(29,M=Q.debounceSearch),"enableReverse"in Q&&n(5,A=Q.enableReverse),"errorMessage"in Q&&n(6,R=Q.errorMessage),"filter"in Q&&n(30,z=Q.filter),"flyTo"in Q&&n(31,U=Q.flyTo),"fuzzyMatch"in Q&&n(32,F=Q.fuzzyMatch),"language"in Q&&n(33,G=Q.language),"limit"in Q&&n(34,H=Q.limit),"mapController"in Q&&n(35,te=Q.mapController),"minLength"in Q&&n(36,ee=Q.minLength),"noResultsMessage"in Q&&n(7,fe=Q.noResultsMessage),"placeholder"in Q&&n(8,pe=Q.placeholder),"proximity"in Q&&n(37,se=Q.proximity),"reverseActive"in Q&&n(0,Ae=Q.reverseActive),"reverseButtonTitle"in Q&&n(9,Y=Q.reverseButtonTitle),"searchValue"in Q&&n(1,ae=Q.searchValue),"showFullGeometry"in Q&&n(38,Ke=Q.showFullGeometry),"showPlaceType"in Q&&n(10,Le=Q.showPlaceType),"showResultsWhileTyping"in Q&&n(39,tt=Q.showResultsWhileTyping),"selectFirst"in Q&&n(11,ut=Q.selectFirst),"flyToSelected"in Q&&n(40,He=Q.flyToSelected),"markerOnSelected"in Q&&n(41,Ot=Q.markerOnSelected),"types"in Q&&n(42,Gt=Q.types),"excludeTypes"in Q&&n(43,vt=Q.excludeTypes),"zoom"in Q&&n(44,At=Q.zoom),"maxZoom"in Q&&n(45,Mt=Q.maxZoom),"apiUrl"in Q&&n(46,rn=Q.apiUrl),"fetchParameters"in Q&&n(47,wn=Q.fetchParameters),"iconsBaseUrl"in Q&&n(12,fn=Q.iconsBaseUrl),"adjustUrlQuery"in Q&&n(48,_n=Q.adjustUrlQuery),"$$scope"in Q&&n(58,s=Q.$$scope)},t.$$.update=()=>{if(t.$$.dirty[0]&134225920&&setTimeout(()=>{n(16,Cs=Zn),S&&!Zn&&n(1,ae="")}),t.$$.dirty[0]&16386|t.$$.dirty[1]&32&&ae.lengthn(18,Cn=Q)),t.$$.dirty[1]&50356241&&(te&&dt&&dt.id!==Ks&&U&&(!dt.bbox||dt.bbox[0]===dt.bbox[2]&&dt.bbox[1]===dt.bbox[3]?te.flyTo(dt.center,dt.id.startsWith("poi.")||dt.id.startsWith("address.")?Mt:At):te.fitBounds(kS(dt.bbox),50,Mt),n(14,ne=void 0),n(54,Me=void 0),n(15,It=-1)),n(56,Ks=dt==null?void 0:dt.id)),t.$$.dirty[0]&18432&&ut&&ne!=null&&ne.length&&n(15,It=0),t.$$.dirty[0]&2050&&(ut||n(15,It=-1)),t.$$.dirty[0]&16384|t.$$.dirty[1]&8388608&&Me!==ne&&n(54,Me=void 0),t.$$.dirty[0]&81921|t.$$.dirty[1]&8388624&&te&&te.setEventHandler(Q=>{switch(Q.type){case"mapClick":Ae&&lo(Q.coordinates);break;case"markerClick":{const Pe=ne==null?void 0:ne.find(Se=>Se.id===Q.id);Pe&&ft(Pe)}break;case"markerMouseEnter":Me&&n(15,It=Cs?(ne==null?void 0:ne.findIndex(Pe=>Pe.id===Q.id))??-1:-1);break;case"markerMouseLeave":Me&&n(15,It=-1);break}}),t.$$.dirty[0]&49152&&n(57,r=ne==null?void 0:ne[It]),t.$$.dirty[1]&67133969&&te&&r&&U&&He&&te.flyTo(r.center,r.id.startsWith("poi.")||r.id.startsWith("address.")?Mt:At),t.$$.dirty[1]&1040&&(Ot||te==null||te.setMarkers(void 0,void 0)),t.$$.dirty[1]&75498512&&te&&Ot&&!Me&&(te.setMarkers(r?[r]:void 0,void 0),te.setSelectedMarker(r?0:-1)),t.$$.dirty[1]&25165840&&te&&te.setMarkers(Me,dt),t.$$.dirty[0]&32768|t.$$.dirty[1]&8388624&&Me&&te&&te.setSelectedMarker(It),t.$$.dirty[0]&2|t.$$.dirty[1]&16&&te){const Q=Ts(ae);te.setReverseMarker(Q?[Q.decimalLongitude,Q.decimalLatitude]:void 0)}t.$$.dirty[1]&67108864&&Fi("select",r),t.$$.dirty[1]&16777216&&Fi("pick",dt),t.$$.dirty[0]&81920&&Fi("optionsVisibilityChange",Cs&&!!ne),t.$$.dirty[0]&16384&&Fi("featuresListed",ne),t.$$.dirty[1]&8388608&&Fi("featuresMarked",Me),t.$$.dirty[0]&1&&Fi("reverseToggle",Ae),t.$$.dirty[0]&2&&Fi("queryChange",ae),t.$$.dirty[0]&1|t.$$.dirty[1]&16&&te&&te.indicateReverse(Ae)},[Ae,ae,c,v,E,A,R,fe,pe,Y,Le,ut,fn,Zn,ne,It,Cs,Re,Cn,hr,tl,zl,Fl,ui,ft,l,d,S,C,M,z,U,F,G,H,te,ee,se,Ke,tt,He,Ot,Gt,vt,At,Mt,rn,wn,_n,pn,Yn,zr,Pn,ar,Me,dt,Ks,r,s,i,ln,sn,Zr,us,on,Aa,Jr,me,q,Z,J,le,Te]}class dz extends Yt{constructor(e){super(),Xt(this,e,pz,fz,Ut,{class:2,apiKey:25,bbox:26,clearButtonTitle:3,clearOnBlur:27,collapsed:4,country:28,debounceSearch:29,enableReverse:5,errorMessage:6,filter:30,flyTo:31,fuzzyMatch:32,language:33,limit:34,mapController:35,minLength:36,noResultsMessage:7,placeholder:8,proximity:37,reverseActive:0,reverseButtonTitle:9,searchValue:1,showFullGeometry:38,showPlaceType:10,showResultsWhileTyping:39,selectFirst:11,flyToSelected:40,markerOnSelected:41,types:42,excludeTypes:43,zoom:44,maxZoom:45,apiUrl:46,fetchParameters:47,iconsBaseUrl:12,adjustUrlQuery:48,focus:49,blur:50,setQuery:51,clearList:52,clearMap:53},null,[-1,-1,-1])}get focus(){return this.$$.ctx[49]}get blur(){return this.$$.ctx[50]}get setQuery(){return this.$$.ctx[51]}get clearList(){return this.$$.ctx[52]}get clearMap(){return this.$$.ctx[53]}}function GS(t){let e,n,r;return n=new dz({props:{mapController:t[1],apiKey:t[0]}}),{c(){e=_e("div"),Ge(n.$$.fragment),Ie(e,"class","svelte-ixhnie")},m(i,s){xe(i,e,s),Ue(n,e,null),r=!0},p(i,s){const c={};s&2&&(c.mapController=i[1]),s&1&&(c.apiKey=i[0]),n.$set(c)},i(i){r||(ue(n.$$.fragment,i),r=!0)},o(i){ye(n.$$.fragment,i),r=!1},d(i){i&&be(e),je(n)}}}function mz(t){let e,n,r=t[1]&&GS(t);return{c(){r&&r.c(),e=Hi()},m(i,s){r&&r.m(i,s),xe(i,e,s),n=!0},p(i,[s]){i[1]?r?(r.p(i,s),s&2&&ue(r,1)):(r=GS(i),r.c(),ue(r,1),r.m(e.parentNode,e)):r&&(Un(),ye(r,1,1,()=>{r=null}),jn())},i(i){n||(ue(r),n=!0)},o(i){ye(r),n=!1},d(i){i&&be(e),r&&r.d(i)}}}function gz(t,e,n){let r,{apiKey:i}=e,{map:s}=e;return t.$$set=c=>{"apiKey"in c&&n(0,i=c.apiKey),"map"in c&&n(2,s=c.map)},t.$$.update=()=>{t.$$.dirty&4&&n(1,r=s?P5(s,Bs):null)},[i,r,s]}class _z extends Yt{constructor(e){super(),Xt(this,e,gz,mz,Ut,{apiKey:0,map:2})}}const a1=["==",["geometry-type"],"Polygon"],IT=["==",["geometry-type"],"LineString"],yz=["==",["geometry-type"],"Point"];function Od(t,e,n){let r=["match",t];for(let[i,s]of Object.entries(e))r.push(i),r.push(s);return r.push(n),r}const vz=t=>({}),qS=t=>({}),bz=t=>({}),WS=t=>({}),xz=t=>({}),HS=t=>({});function wz(t){let e,n,r,i,s,c;const l=t[1].top,d=Sr(l,t,t[0],HS),v=t[1].left,S=Sr(v,t,t[0],WS),E=t[1].main,C=Sr(E,t,t[0],qS);return{c(){e=_e("div"),d&&d.c(),n=We(),r=_e("div"),S&&S.c(),i=We(),s=_e("div"),C&&C.c(),Ie(e,"class","top svelte-mpick2"),Ie(r,"class","left svelte-mpick2"),Ie(s,"class","main svelte-mpick2")},m(M,A){xe(M,e,A),d&&d.m(e,null),xe(M,n,A),xe(M,r,A),S&&S.m(r,null),xe(M,i,A),xe(M,s,A),C&&C.m(s,null),c=!0},p(M,[A]){d&&d.p&&(!c||A&1)&&Ir(d,l,M,M[0],c?Er(l,M[0],A,xz):Cr(M[0]),HS),S&&S.p&&(!c||A&1)&&Ir(S,v,M,M[0],c?Er(v,M[0],A,bz):Cr(M[0]),WS),C&&C.p&&(!c||A&1)&&Ir(C,E,M,M[0],c?Er(E,M[0],A,vz):Cr(M[0]),qS)},i(M){c||(ue(d,M),ue(S,M),ue(C,M),c=!0)},o(M){ye(d,M),ye(S,M),ye(C,M),c=!1},d(M){M&&(be(e),be(n),be(r),be(i),be(s)),d&&d.d(M),S&&S.d(M),C&&C.d(M)}}}function Sz(t,e,n){let{$$slots:r={},$$scope:i}=e;return t.$$set=s=>{"$$scope"in s&&n(0,i=s.$$scope)},[i,r]}class Ez extends Yt{constructor(e){super(),Xt(this,e,Sz,wz,Ut,{})}}const Iz=t=>({}),ZS=t=>({}),Cz=t=>({}),XS=t=>({}),Tz=t=>({}),YS=t=>({});function Lz(t){let e,n,r,i,s,c;const l=t[4].top,d=Sr(l,t,t[3],YS),v=t[4].sidebar,S=Sr(v,t,t[3],XS),E=t[4].map,C=Sr(E,t,t[3],ZS);return{c(){e=_e("div"),d&&d.c(),n=We(),r=_e("div"),S&&S.c(),i=We(),s=_e("div"),C&&C.c()},m(M,A){xe(M,e,A),d&&d.m(e,null),t[5](e),xe(M,n,A),xe(M,r,A),S&&S.m(r,null),t[6](r),xe(M,i,A),xe(M,s,A),C&&C.m(s,null),t[7](s),c=!0},p(M,[A]){d&&d.p&&(!c||A&8)&&Ir(d,l,M,M[3],c?Er(l,M[3],A,Tz):Cr(M[3]),YS),S&&S.p&&(!c||A&8)&&Ir(S,v,M,M[3],c?Er(v,M[3],A,Cz):Cr(M[3]),XS),C&&C.p&&(!c||A&8)&&Ir(C,E,M,M[3],c?Er(E,M[3],A,Iz):Cr(M[3]),ZS)},i(M){c||(ue(d,M),ue(S,M),ue(C,M),c=!0)},o(M){ye(d,M),ye(S,M),ye(C,M),c=!1},d(M){M&&(be(e),be(n),be(r),be(i),be(s)),d&&d.d(M),t[5](null),S&&S.d(M),t[6](null),C&&C.d(M),t[7](null)}}}function Pz(t,e,n){let r,i,s;mt(t,l1,E=>n(0,r=E)),mt(t,u1,E=>n(1,i=E)),mt(t,c1,E=>n(2,s=E));let{$$slots:c={},$$scope:l}=e;function d(E){ai[E?"unshift":"push"](()=>{r=E,l1.set(r)})}function v(E){ai[E?"unshift":"push"](()=>{i=E,u1.set(i)})}function S(E){ai[E?"unshift":"push"](()=>{s=E,c1.set(s)})}return t.$$set=E=>{"$$scope"in E&&n(3,l=E.$$scope)},[r,i,s,l,c,d,v,S]}class bu extends Yt{constructor(e){super(),Xt(this,e,Pz,Lz,Ut,{})}}let l1=Nn(null),u1=Nn(null),c1=Nn(null);function Mz(t){let e,n,r,i,s,c,l,d,v;return{c(){e=_e("label"),n=ot(`Basemap: + `),r=_e("select"),i=_e("option"),i.textContent="MapTiler Dataviz",s=_e("option"),s.textContent="MapTiler Streets",c=_e("option"),c.textContent="MapTiler Satellite",l=_e("option"),l.textContent="OS Open Zoomstack",i.__value="dataviz",vo(i,i.__value),s.__value="streets",vo(s,s.__value),c.__value="hybrid",vo(c,c.__value),l.__value="uk-openzoomstack-light",vo(l,l.__value),t[0]===void 0&&Xd(()=>t[1].call(r))},m(S,E){xe(S,e,E),oe(e,n),oe(e,r),oe(r,i),oe(r,s),oe(r,c),oe(r,l),f_(r,t[0],!0),d||(v=Lt(r,"change",t[1]),d=!0)},p(S,[E]){E&1&&f_(r,S[0])},i:Pt,o:Pt,d(S){S&&be(e),d=!1,v()}}}function Az(t,e,n){let r;mt(t,Uv,s=>n(0,r=s));function i(){r=FE(this),Uv.set(r)}return[r,i]}class kz extends Yt{constructor(e){super(),Xt(this,e,Az,Mz,Ut,{})}}let c_=Nn(!0);function Dz(t){let e,n;return e=new hc({props:{paint:{"fill-color":"black","fill-opacity":0},layout:{visibility:t[0]?"none":"visible"}}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,i){const s={};i&1&&(s.layout={visibility:r[0]?"none":"visible"}),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function Rz(t){let e,n;return e=new No({props:{data:t[1],$$slots:{default:[Dz]},$$scope:{ctx:t}}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,[i]){const s={};i&5&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function Nz(t,e,n){let r;return mt(t,c_,s=>n(0,r=s)),[r,{type:"Feature",properties:{},geometry:{type:"Polygon",coordinates:[[[180,90],[-180,90],[-180,-90],[180,-90],[180,90]]]}}]}class Oz extends Yt{constructor(e){super(),Xt(this,e,Nz,Rz,Ut,{})}}function zz(t){let e,n,r,i;const s=t[1].default,c=Sr(s,t,t[0],null);return{c(){e=_e("a"),c&&c.c(),Ie(e,"href","#")},m(l,d){xe(l,e,d),c&&c.m(e,null),n=!0,r||(i=Lt(e,"click",zE(t[2])),r=!0)},p(l,[d]){c&&c.p&&(!n||d&1)&&Ir(c,s,l,l[0],n?Er(s,l[0],d,null):Cr(l[0]),null)},i(l){n||(ue(c,l),n=!0)},o(l){ye(c,l),n=!1},d(l){l&&be(e),c&&c.d(l),r=!1,i()}}}function Fz(t,e,n){let{$$slots:r={},$$scope:i}=e;function s(c){gn.call(this,t,c)}return t.$$set=c=>{"$$scope"in c&&n(0,i=c.$$scope)},[i,r,s]}class or extends Yt{constructor(e){super(),Xt(this,e,Fz,zz,Ut,{})}}const Bz=t=>({props:t&8}),$S=t=>({props:jz(t[3])});function Vz(t){let e;const n=t[1].default,r=Sr(n,t,t[2],$S);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&12)&&Ir(r,n,i,i[2],e?Er(n,i[2],s,Bz):Cr(i[2]),$S)},i(i){e||(ue(r,i),e=!0)},o(i){ye(r,i),e=!1},d(i){r&&r.d(i)}}}function Uz(t){let e,n;return e=new SN({props:{openOn:t[0],popupClass:"popup",$$slots:{default:[Vz,({features:r})=>({3:r}),({features:r})=>r?8:0]},$$scope:{ctx:t}}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,[i]){const s={};i&1&&(s.openOn=r[0]),i&12&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function jz(t){return t?t[0].properties??{}:(console.log("A Popup with null features should be impossible"),{})}function Gz(t,e,n){let{$$slots:r={},$$scope:i}=e,{openOn:s="hover"}=e;return t.$$set=c=>{"openOn"in c&&n(0,s=c.openOn),"$$scope"in c&&n(2,i=c.$$scope)},[s,r,i]}class xu extends Yt{constructor(e){super(),Xt(this,e,Gz,Uz,Ut,{openOn:0})}}function qz(t,e){let n=new Set(t.getStyle().layers.filter(r=>r.type=="line").map(r=>r.id));if(e=="dataviz")return["Road network","Path"].filter(r=>n.has(r));if(e=="hybrid")return["Path","Road","Tunnel"].filter(r=>n.has(r));if(e=="streets"){let r=[];for(let i of["road","bridge","tunnel"])for(let s of["link","minor","minor_construction","motorway","motorway_construction","motorway_link","path_pedestrian","secondary_tertiary","secondary_tertiary_construction","service_track","service_track_construction","street","trunk_primary","trunk_primary_construction","trunk_primary_link"])r.push(`${i}_${s}`);return r.filter(i=>n.has(i))}return e=="uk-openzoomstack-light"?t.getStyle().layers.filter(r=>r["source-layer"]=="roads"&&r.type=="line").map(r=>r.id):[]}const{window:Wz}=d1;function Hz(t){let e,n,r,i,s,c,l,d,v,S,E,C,M,A,R;return M=UP(t[8][0]),{c(){e=_e("button"),e.textContent="Stop StreetView",n=We(),r=_e("fieldset"),i=_e("legend"),i.textContent="Source:",s=We(),c=_e("label"),l=_e("input"),d=ot(` + Google Street View`),v=We(),S=_e("label"),E=_e("input"),C=ot(` + Bing Streetside`),Ie(e,"class","secondary"),Ie(l,"type","radio"),l.__value="google",vo(l,l.__value),Ie(E,"type","radio"),E.__value="bing",vo(E,E.__value),M.p(l,E)},m(z,U){xe(z,e,U),xe(z,n,U),xe(z,r,U),oe(r,i),oe(r,s),oe(r,c),oe(c,l),l.checked=l.__value===t[0],oe(c,d),oe(r,v),oe(r,S),oe(S,E),E.checked=E.__value===t[0],oe(S,C),A||(R=[Lt(e,"click",t[3]),Lt(l,"change",t[7]),Lt(E,"change",t[9])],A=!0)},p(z,U){U&1&&(l.checked=l.__value===z[0]),U&1&&(E.checked=E.__value===z[0])},d(z){z&&(be(e),be(n),be(r)),M.r(),A=!1,Hr(R)}}}function Zz(t){let e,n,r;return{c(){e=_e("button"),e.textContent="StreetView",Ie(e,"class","secondary")},m(i,s){xe(i,e,s),n||(r=Lt(e,"click",t[2]),n=!0)},p:Pt,d(i){i&&be(e),n=!1,r()}}}function Xz(t){let e,n,r;function i(l,d){return l[1]?Zz:Hz}let s=i(t),c=s(t);return{c(){c.c(),e=Hi()},m(l,d){c.m(l,d),xe(l,e,d),n||(r=Lt(Wz,"keydown",t[4]),n=!0)},p(l,[d]){s===(s=i(l))&&c?c.p(l,d):(c.d(1),c=s(l),c&&(c.c(),c.m(e.parentNode,e)))},i:Pt,o:Pt,d(l){l&&be(e),c.d(l),n=!1,r()}}}function Yz(t,e,n){let r;mt(t,c_,R=>n(1,r=R));let{map:i}=e,{maptilerBasemap:s}=e,c="google",l=[];function d(){Ft(c_,r=!1,r),i.on("click",S),i.getCanvas().style.cursor="crosshair";for(let R of qz(i,s))l.push([R,i.getPaintProperty(R,"line-color")]),i.setPaintProperty(R,"line-color","cyan")}function v(){Ft(c_,r=!0,r),i.off("click",S),i.getCanvas().style.cursor="inherit";for(let[R,z]of l)i.setPaintProperty(R,"line-color",z);l=[]}ro(v);function S(R){let z=R.lngLat.lng,U=R.lngLat.lat;c=="google"?window.open(`http://maps.google.com/maps?q=&layer=c&cbll=${U},${z}&cbp=11,0,0,0,0`,"_blank"):c=="bing"&&window.open(`https://www.bing.com/maps?cp=${U}~${z}&style=x`,"_blank")}function E(R){!r&&R.key=="Escape"&&(R.stopPropagation(),v())}const C=[[]];function M(){c=this.__value,n(0,c)}function A(){c=this.__value,n(0,c)}return t.$$set=R=>{"map"in R&&n(5,i=R.map),"maptilerBasemap"in R&&n(6,s=R.maptilerBasemap)},[c,r,d,v,E,i,s,M,C,A]}class $z extends Yt{constructor(e){super(),Xt(this,e,Yz,Xz,Ut,{map:5,maptilerBasemap:6})}}function gi(t){return{id:t,beforeId:Kz(t)}}function Kz(t){let e=Fs(uu);if(!e){console.warn(`getBeforeId(${t}) called before map is ready. Z-ordering may be incorrect.`);return}let n,r=!1;for(let i=KS.length-1;i>=0;i--){let s=KS[i];if(s==t){r=!0;break}e.getLayer(s)&&(n=s)}if(!r)throw new Error(`Layer ID ${t} not defined in layerZorder`);return n}const KS=["Background","neighbourhood-boundaries","Residential","debug-borders","debug-crosses","debug-filters","cells","interior-roads","compare-route","shortcuts","shortcuts-focus","Building","route-debug-nodes","route-points","route-lines","route-polygons","one-ways","Road labels","animate-shortcuts","modal-filters","boundary","neighbourhood-boundary","auto-boundaries-areas","auto-boundaries-severances","freehand-line","edit-polygon-fill","edit-polygon-lines","edit-polygon-vertices"];function Jz(t){let e;return{c(){e=ot("Back")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function Qz(t){let e,n,r,i;return e=new or({props:{$$slots:{default:[Jz]},$$scope:{ctx:t}}}),e.$on("click",t[2]),{c(){Ge(e.$$.fragment)},m(s,c){Ue(e,s,c),n=!0,r||(i=Lt(window,"keydown",t[1]),r=!0)},p(s,[c]){const l={};c&8&&(l.$$scope={dirty:c,ctx:s}),e.$set(l)},i(s){n||(ue(e.$$.fragment,s),n=!0)},o(s){ye(e.$$.fragment,s),n=!1},d(s){je(e,s),r=!1,i()}}}function eF(t){let e=vu();function n(i){i.key=="Escape"&&(i.stopPropagation(),e("click"))}return[e,n,()=>e("click")]}class Cy extends Yt{constructor(e){super(),Xt(this,e,eF,Qz,Ut,{})}}function tF(t){let e,n;const r=[gi("one-ways"),{filter:["all",["==",["get","kind"],"interior_road"],["!=",["get","direction"],"both"]]},{layout:{"icon-image":"oneway-arrow","icon-size":1,"symbol-placement":"line","symbol-spacing":50,"icon-allow-overlap":!0,"icon-rotate":["case",["==",["get","direction"],"forwards"],0,180]}},{paint:{"icon-opacity":["case",["get","direction_edited"],1,.5]}}];let i={};for(let s=0;s({}),JS=t=>({}),iF=t=>({}),QS=t=>({});function oF(t){let e,n;const r=[gi("neighbourhood-boundary"),{paint:{"fill-color":"black","fill-opacity":.3}}];let i={};for(let s=0;s{r=null}),jn())},i(i){n||(ue(r),n=!0)},o(i){ye(r),n=!1},d(i){i&&be(e),r&&r.d(i)}}}function aF(t){let e,n,r,i,s,c,l,d,v;e=new No({props:{data:tE(t[3]),$$slots:{default:[oF]},$$scope:{ctx:t}}});const S=[gi("cells"),{filter:["==",["get","kind"],"cell"]},{paint:{"fill-color":["get","color"],"fill-opacity":.3}}];let E={};for(let z=0;zn.properties.kind=="boundary");return{type:"Feature",properties:{},geometry:{type:"Polygon",coordinates:[[[180,90],[-180,90],[-180,-90],[180,-90],[180,90]],e.geometry.coordinates[0]]}}}function uF(t,e,n){let r,i,s,{$$slots:c={},$$scope:l}=e,{gjInput:d}=e,{interactive:v=!0}=e,{onClickLine:S=(C,M)=>{}}=e;const E=C=>v&&S(C.detail.features[0],C.detail.event.lngLat);return t.$$set=C=>{"gjInput"in C&&n(4,d=C.gjInput),"interactive"in C&&n(0,v=C.interactive),"onClickLine"in C&&n(1,S=C.onClickLine),"$$scope"in C&&n(8,l=C.$$scope)},t.$$.update=()=>{t.$$.dirty&16&&n(3,r=h1(d)),t.$$.dirty&16&&n(5,i=Math.max(...d.features.map(C=>C.properties.kind=="interior_road"?C.properties.shortcuts:0))),t.$$.dirty&32&&n(2,s=Nf(["interpolate-hcl",["linear"],["get","shortcuts"],0,"white",1,"#F19A93",i,"#A32015"],"blue"))},[v,S,s,r,d,i,c,E,l]}class Ty extends Yt{constructor(e){super(),Xt(this,e,uF,lF,Ut,{gjInput:4,interactive:0,onClickLine:1})}}function cF(t){let e;return{c(){e=ot("Choose project")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function hF(t){let e;return{c(){e=ot("Pick neighbourhood")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function fF(t){let e;return{c(){e=ot("Editing")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function pF(t){let e,n,r,i,s,c,l,d,v,S,E,C,M,A;return s=new or({props:{$$slots:{default:[cF]},$$scope:{ctx:t}}}),s.$on("click",t[4]),d=new or({props:{$$slots:{default:[hF]},$$scope:{ctx:t}}}),d.$on("click",t[5]),E=new or({props:{$$slots:{default:[fF]},$$scope:{ctx:t}}}),E.$on("click",t[6]),{c(){e=_e("div"),n=_e("nav"),r=_e("ul"),i=_e("li"),Ge(s.$$.fragment),c=We(),l=_e("li"),Ge(d.$$.fragment),v=We(),S=_e("li"),Ge(E.$$.fragment),C=We(),M=_e("li"),M.textContent="Debug mode",Ie(n,"aria-label","breadcrumb"),Ie(e,"slot","top")},m(R,z){xe(R,e,z),oe(e,n),oe(n,r),oe(r,i),Ue(s,i,null),oe(r,c),oe(r,l),Ue(d,l,null),oe(r,v),oe(r,S),Ue(E,S,null),oe(r,C),oe(r,M),A=!0},p(R,z){const U={};z&256&&(U.$$scope={dirty:z,ctx:R}),s.$set(U);const F={};z&256&&(F.$$scope={dirty:z,ctx:R}),d.$set(F);const G={};z&256&&(G.$$scope={dirty:z,ctx:R}),E.$set(G)},i(R){A||(ue(s.$$.fragment,R),ue(d.$$.fragment,R),ue(E.$$.fragment,R),A=!0)},o(R){ye(s.$$.fragment,R),ye(d.$$.fragment,R),ye(E.$$.fragment,R),A=!1},d(R){R&&be(e),je(s),je(d),je(E)}}}function dF(t){let e,n,r;return n=new Cy({}),n.$on("click",t[3]),{c(){e=_e("div"),Ge(n.$$.fragment),Ie(e,"slot","sidebar")},m(i,s){xe(i,e,s),Ue(n,e,null),r=!0},p:Pt,i(i){r||(ue(n.$$.fragment,i),r=!0)},o(i){ye(n.$$.fragment,i),r=!1},d(i){i&&be(e),je(n)}}}function mF(t){let e,n;return e=new ny({props:{properties:t[7]}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,i){const s={};i&128&&(s.properties=r[7]),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function gF(t){let e,n,r;return n=new xu({props:{openOn:"hover",$$slots:{default:[mF,({props:i})=>({7:i}),({props:i})=>i?128:0]},$$scope:{ctx:t}}}),{c(){e=_e("div"),Ge(n.$$.fragment),Ie(e,"slot","line-popup")},m(i,s){xe(i,e,s),Ue(n,e,null),r=!0},p(i,s){const c={};s&384&&(c.$$scope={dirty:s,ctx:i}),n.$set(c)},i(i){r||(ue(n.$$.fragment,i),r=!0)},o(i){ye(n.$$.fragment,i),r=!1},d(i){i&&be(e),je(n)}}}function _F(t){let e,n;return e=new ny({props:{properties:t[7]}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,i){const s={};i&128&&(s.properties=r[7]),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function yF(t){let e,n;return e=new xu({props:{openOn:"hover",$$slots:{default:[_F,({props:r})=>({7:r}),({props:r})=>r?128:0]},$$scope:{ctx:t}}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,i){const s={};i&384&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function vF(t){let e,n;return e=new ny({props:{properties:t[7]}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,i){const s={};i&128&&(s.properties=r[7]),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function bF(t){let e,n;return e=new xu({props:{openOn:"hover",$$slots:{default:[vF,({props:r})=>({7:r}),({props:r})=>r?128:0]},$$scope:{ctx:t}}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,i){const s={};i&384&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function xF(t){let e,n,r,i;const s=[gi("debug-borders"),{filter:["==",["get","kind"],"border_intersection"]},{paint:{"circle-radius":15,"circle-color":"green"}}];let c={$$slots:{default:[yF]},$$scope:{ctx:t}};for(let v=0;v({7:r}),({props:r})=>r?128:0]},$$scope:{ctx:t}}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,i){const s={};i&384&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function EF(t){let e,n;const r=[gi("debug-filters"),{paint:{"circle-radius":15,"circle-color":"black"}}];let i={$$slots:{default:[SF]},$$scope:{ctx:t}};for(let s=0;sn(0,r=S)),mt(t,xn,S=>n(1,i=S)),[r,i,(S,E)=>window.open(Rr(S.properties).way,"_blank"),()=>Ft(xn,i={mode:"neighbourhood"},i),()=>Ft(xn,i={mode:"title"},i),()=>Ft(xn,i={mode:"network"},i),()=>Ft(xn,i={mode:"neighbourhood"},i)]}class LF extends Yt{constructor(e){super(),Xt(this,e,TF,CF,Ut,{})}}function nE(t,e,n){const r=t.slice();return r[7]=e[n][0],r[8]=e[n][1],r[9]=e[n][2],r}function rE(t){let e,n,r,i,s,c,l=t[8]+"",d,v,S,E,C;function M(){return t[3](t[7])}return{c(){e=_e("button"),n=_e("img"),i=We(),s=_e("br"),c=We(),d=ot(l),v=We(),Wn(n.src,r=`/ltn//filters/${t[7]}_icon.gif`)||Ie(n,"src",r),Ie(n,"width","80"),Ie(n,"alt",t[8]),Ie(e,"class","outline"),sr(e,"width","100%"),e.disabled=S=t[0]==t[7]},m(A,R){xe(A,e,R),oe(e,n),oe(e,i),oe(e,s),oe(e,c),oe(e,d),oe(e,v),E||(C=Lt(e,"click",M),E=!0)},p(A,R){t=A,R&1&&S!==(S=t[0]==t[7])&&(e.disabled=S)},d(A){A&&be(e),E=!1,C()}}}function PF(t){let e,n,r,i,s,c,l,d,v,S,E,C,M=t[1][2]+"",A,R,z,U,F,G,H=bs(t[2]),te=[];for(let fe=0;fe({6:r}),({dialog:r})=>r?64:0]},$$scope:{ctx:t}}}),e.$on("close",t[5]),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,[i]){const s={};i&4163&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function AF(t,e,n){let r,i;mt(t,qv,v=>n(0,i=v));let s=[["walk_cycle_only","Walking/cycling only","A physical barrier that only allows people walking, cycling, and rolling to pass. Often planters or bollards. Larger vehicles cannot enter."],["no_entry","No entry","An alternative sign to indicate vehicles are not allowed to enter the street. Only people walking, cycling, and rolling may pass through."],["bus_gate","Bus gate","A bus gate sign and traffic cameras are installed to allow buses, pedestrians, and cyclists to pass. There is no physical barrier."],["school_street","School street","A closure during school hours only. The barrier usually allows teachers and staff to access the school."]];const c=v=>Ft(qv,i=v,i),l=v=>Rr(v).close();function d(v){gn.call(this,t,v)}return t.$$.update=()=>{t.$$.dirty&1&&n(1,r=s.find(v=>v[0]==i))},[i,r,s,c,l,d]}class kF extends Yt{constructor(e){super(),Xt(this,e,AF,MF,Ut,{})}}function iE(t){let e,n;return e=new No({props:{data:t[0],$$slots:{default:[DF]},$$scope:{ctx:t}}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,i){const s={};i&1&&(s.data=r[0]),i&64&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function DF(t){let e,n;const r=[gi("freehand-line"),{paint:{"line-width":5,"line-color":"red"}}];let i={};for(let s=0;s{r=null}),jn())},i(i){n||(ue(r),n=!0)},o(i){ye(r),n=!1},d(i){i&&be(e),r&&r.d(i)}}}function NF(t,e,n){let{map:r}=e,i=null;const s=vu();r.on("dragstart",c),r.on("mousemove",l),r.on("mouseup",d),ro(()=>{r.dragPan.enable(),r.off("dragstart",c),r.off("mousemove",l),r.off("mouseup",d)});function c(){r.dragPan.disable(),n(0,i={type:"Feature",properties:{},geometry:{type:"LineString",coordinates:[]}})}function l(v){i&&(i.geometry.coordinates.push(v.lngLat.toArray()),n(0,i))}function d(){i&&(s("done",i),n(0,i=null))}return t.$$set=v=>{"map"in v&&n(1,r=v.map)},[i,r]}class OF extends Yt{constructor(e){super(),Xt(this,e,NF,RF,Ut,{map:1})}}function zF(t){let e;const n=t[3].default,r=Sr(n,t,t[5],null);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&32)&&Ir(r,n,i,i[5],e?Er(n,i[5],s,null):Cr(i[5]),null)},i(i){e||(ue(r,i),e=!0)},o(i){ye(r,i),e=!1},d(i){r&&r.d(i)}}}function FF(t){let e,n;const r=[gi("modal-filters"),{layout:{"icon-image":["get","filter_kind"],"icon-allow-overlap":!0,"icon-size":.1}},{paint:{"icon-opacity":["case",["get","edited"],1,.5]}}];let i={$$slots:{default:[zF]},$$scope:{ctx:t}};for(let s=0;sn(1,i=v)),mt(t,qu,v=>n(2,s=v));let{$$slots:c={},$$scope:l}=e;function d(v){gn.call(this,t,v)}return t.$$set=v=>{"$$scope"in v&&n(5,l=v.$$scope)},t.$$.update=()=>{t.$$.dirty&6&&n(0,r=s>0?JSON.parse(i.renderModalFilters()):null)},[r,i,s,c,d,l]}class Ly extends Yt{constructor(e){super(),Xt(this,e,VF,BF,Ut,{})}}var UF=Object.defineProperty,dr=(t,e)=>UF(t,"name",{value:e,configurable:!0}),jF=class{constructor(e){this.direction=!1,this.compareProperties=!0;var n,r,i;this.precision=10**-((n=e==null?void 0:e.precision)!=null?n:17),this.direction=(r=e==null?void 0:e.direction)!=null?r:!1,this.compareProperties=(i=e==null?void 0:e.compareProperties)!=null?i:!0}compare(e,n){if(e.type!==n.type||!zd(e,n))return!1;switch(e.type){case"Point":return this.compareCoord(e.coordinates,n.coordinates);case"LineString":return this.compareLine(e.coordinates,n.coordinates);case"Polygon":return this.comparePolygon(e,n);case"GeometryCollection":return this.compareGeometryCollection(e,n);case"Feature":return this.compareFeature(e,n);case"FeatureCollection":return this.compareFeatureCollection(e,n);default:if(e.type.startsWith("Multi")){const r=f1(e),i=f1(n);return r.every(s=>i.some(c=>this.compare(s,c)))}}return!1}compareCoord(e,n){return e.length===n.length&&e.every((r,i)=>Math.abs(r-n[i])=0&&(r=[].concat(e.slice(i,e.length),e.slice(1,i+1))),r}comparePath(e,n){return e.every((r,i)=>this.compareCoord(r,n[i]))}comparePolygon(e,n){if(this.compareLine(e.coordinates[0],n.coordinates[0],1,!0)){const r=e.coordinates.slice(1,e.coordinates.length),i=n.coordinates.slice(1,n.coordinates.length);return r.every(s=>i.some(c=>this.compareLine(s,c,1,!0)))}return!1}compareGeometryCollection(e,n){return zd(e.geometries,n.geometries)&&this.compareBBox(e,n)&&e.geometries.every((r,i)=>this.compare(r,n.geometries[i]))}compareFeature(e,n){return e.id===n.id&&(this.compareProperties?sC(e.properties,n.properties):!0)&&this.compareBBox(e,n)&&this.compare(e.geometry,n.geometry)}compareFeatureCollection(e,n){return zd(e.features,n.features)&&this.compareBBox(e,n)&&e.features.every((r,i)=>this.compare(r,n.features[i]))}compareBBox(e,n){return!e.bbox&&!n.bbox||(e.bbox&&n.bbox?this.compareCoord(e.bbox,n.bbox):!1)}};dr(jF,"GeojsonEquality");function zd(t,e){return t.coordinates?t.coordinates.length===e.coordinates.length:t.length===e.length}dr(zd,"sameLength");function f1(t){return t.coordinates.map(e=>({type:t.type.replace("Multi",""),coordinates:e}))}dr(f1,"explode");var zs=63710088e-1,CT={centimeters:zs*100,centimetres:zs*100,degrees:360/(2*Math.PI),feet:zs*3.28084,inches:zs*39.37,kilometers:zs/1e3,kilometres:zs/1e3,meters:zs,metres:zs,miles:zs/1609.344,millimeters:zs*1e3,millimetres:zs*1e3,nauticalmiles:zs/1852,radians:1,yards:zs*1.0936},oE={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:29155334959812285e-23,millimeters:1e6,millimetres:1e6,yards:1.195990046};function mc(t,e,n={}){const r={type:"Feature"};return(n.id===0||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}dr(mc,"feature");function GF(t,e,n={}){switch(t){case"Point":return rp(e).geometry;case"LineString":return mb(e).geometry;case"Polygon":return db(e).geometry;case"MultiPoint":return LT(e).geometry;case"MultiLineString":return TT(e).geometry;case"MultiPolygon":return PT(e).geometry;default:throw new Error(t+" is invalid")}}dr(GF,"geometry");function rp(t,e,n={}){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!ip(t[0])||!ip(t[1]))throw new Error("coordinates must contain numbers");return mc({type:"Point",coordinates:t},e,n)}dr(rp,"point");function qF(t,e,n={}){return Py(t.map(r=>rp(r,e)),n)}dr(qF,"points");function db(t,e,n={}){for(const i of t){if(i.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(i[i.length-1].length!==i[0].length)throw new Error("First and last Position are not equivalent.");for(let s=0;sdb(r,e)),n)}dr(WF,"polygons");function mb(t,e,n={}){if(t.length<2)throw new Error("coordinates must be an array of two or more positions");return mc({type:"LineString",coordinates:t},e,n)}dr(mb,"lineString");function HF(t,e,n={}){return Py(t.map(r=>mb(r,e)),n)}dr(HF,"lineStrings");function Py(t,e={}){const n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}dr(Py,"featureCollection");function TT(t,e,n={}){return mc({type:"MultiLineString",coordinates:t},e,n)}dr(TT,"multiLineString");function LT(t,e,n={}){return mc({type:"MultiPoint",coordinates:t},e,n)}dr(LT,"multiPoint");function PT(t,e,n={}){return mc({type:"MultiPolygon",coordinates:t},e,n)}dr(PT,"multiPolygon");function ZF(t,e,n={}){return mc({type:"GeometryCollection",geometries:t},e,n)}dr(ZF,"geometryCollection");function XF(t,e=0){if(e&&!(e>=0))throw new Error("precision must be a positive number");const n=Math.pow(10,e||0);return Math.round(t*n)/n}dr(XF,"round");function gb(t,e="kilometers"){const n=CT[e];if(!n)throw new Error(e+" units is invalid");return t*n}dr(gb,"radiansToLength");function My(t,e="kilometers"){const n=CT[e];if(!n)throw new Error(e+" units is invalid");return t/n}dr(My,"lengthToRadians");function YF(t,e){return gm(My(t,e))}dr(YF,"lengthToDegrees");function $F(t){let e=t%360;return e<0&&(e+=360),e}dr($F,"bearingToAzimuth");function gm(t){return t%(2*Math.PI)*180/Math.PI}dr(gm,"radiansToDegrees");function pa(t){return t%360*Math.PI/180}dr(pa,"degreesToRadians");function KF(t,e="kilometers",n="kilometers"){if(!(t>=0))throw new Error("length must be a positive number");return gb(My(t,e),n)}dr(KF,"convertLength");function JF(t,e="meters",n="kilometers"){if(!(t>=0))throw new Error("area must be a positive number");const r=oE[e];if(!r)throw new Error("invalid original units");const i=oE[n];if(!i)throw new Error("invalid final units");return t/r*i}dr(JF,"convertArea");function ip(t){return!isNaN(t)&&t!==null&&!Array.isArray(t)}dr(ip,"isNumber");function QF(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}dr(QF,"isObject");function e6(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(t.length!==4&&t.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(e=>{if(!ip(e))throw new Error("bbox must only contain numbers")})}dr(e6,"validateBBox");function t6(t){if(!t)throw new Error("id is required");if(["string","number"].indexOf(typeof t)===-1)throw new Error("id must be a number or a string")}dr(t6,"validateId");var n6=Object.defineProperty,gc=(t,e)=>n6(t,"name",{value:e,configurable:!0});function op(t){if(!t)throw new Error("coord is required");if(!Array.isArray(t)){if(t.type==="Feature"&&t.geometry!==null&&t.geometry.type==="Point")return[...t.geometry.coordinates];if(t.type==="Point")return[...t.coordinates]}if(Array.isArray(t)&&t.length>=2&&!Array.isArray(t[0])&&!Array.isArray(t[1]))return[...t];throw new Error("coord must be GeoJSON Point or an Array of numbers")}gc(op,"getCoord");function r6(t){if(Array.isArray(t))return t;if(t.type==="Feature"){if(t.geometry!==null)return t.geometry.coordinates}else if(t.coordinates)return t.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}gc(r6,"getCoords");function MT(t){if(t.length>1&&ip(t[0])&&ip(t[1]))return!0;if(Array.isArray(t[0])&&t[0].length)return MT(t[0]);throw new Error("coordinates must only contain numbers")}gc(MT,"containsNumber");function i6(t,e,n){if(!e||!n)throw new Error("type and name required");if(!t||t.type!==e)throw new Error("Invalid input to "+n+": must be a "+e+", given "+t.type)}gc(i6,"geojsonType");function o6(t,e,n){if(!t)throw new Error("No feature passed");if(!n)throw new Error(".featureOf() requires a name");if(!t||t.type!=="Feature"||!t.geometry)throw new Error("Invalid input to "+n+", Feature with geometry required");if(!t.geometry||t.geometry.type!==e)throw new Error("Invalid input to "+n+": must be a "+e+", given "+t.geometry.type)}gc(o6,"featureOf");function s6(t,e,n){if(!t)throw new Error("No featureCollection passed");if(!n)throw new Error(".collectionOf() requires a name");if(!t||t.type!=="FeatureCollection")throw new Error("Invalid input to "+n+", FeatureCollection required");for(const r of t.features){if(!r||r.type!=="Feature"||!r.geometry)throw new Error("Invalid input to "+n+", Feature with geometry required");if(!r.geometry||r.geometry.type!==e)throw new Error("Invalid input to "+n+": must be a "+e+", given "+r.geometry.type)}}gc(s6,"collectionOf");function AT(t){return t.type==="Feature"?t.geometry:t}gc(AT,"getGeom");function a6(t,e){return t.type==="FeatureCollection"?"FeatureCollection":t.type==="GeometryCollection"?"GeometryCollection":t.type==="Feature"&&t.geometry!==null?t.geometry.type:t.type}gc(a6,"getType");var l6=Object.defineProperty,kT=(t,e)=>l6(t,"name",{value:e,configurable:!0});function _b(t,e,n={}){if(n.final===!0)return DT(t,e);const r=op(t),i=op(e),s=pa(r[0]),c=pa(i[0]),l=pa(r[1]),d=pa(i[1]),v=Math.sin(c-s)*Math.cos(d),S=Math.cos(l)*Math.sin(d)-Math.sin(l)*Math.cos(d)*Math.cos(c-s);return gm(Math.atan2(v,S))}kT(_b,"bearing");function DT(t,e){let n=_b(e,t);return n=(n+180)%360,n}kT(DT,"calculateFinalBearing");var u6=Object.defineProperty,c6=(t,e)=>u6(t,"name",{value:e,configurable:!0});function RT(t,e,n,r={}){const i=op(t),s=pa(i[0]),c=pa(i[1]),l=pa(n),d=My(e,r.units),v=Math.asin(Math.sin(c)*Math.cos(d)+Math.cos(c)*Math.sin(d)*Math.cos(l)),S=s+Math.atan2(Math.sin(l)*Math.sin(d)*Math.cos(c),Math.cos(d)-Math.sin(c)*Math.sin(v)),E=gm(S),C=gm(v);return rp([E,C],r.properties)}c6(RT,"destination");var h6=Object.defineProperty,f6=(t,e)=>h6(t,"name",{value:e,configurable:!0});function NT(t,e,n={}){var r=op(t),i=op(e),s=pa(i[1]-r[1]),c=pa(i[0]-r[0]),l=pa(r[1]),d=pa(i[1]),v=Math.pow(Math.sin(s/2),2)+Math.pow(Math.sin(c/2),2)*Math.cos(l)*Math.cos(d);return gb(2*Math.atan2(Math.sqrt(v),Math.sqrt(1-v)),n.units)}f6(NT,"distance");var p6=Object.defineProperty,d6=(t,e)=>p6(t,"name",{value:e,configurable:!0});function OT(t,e,n={}){const i=AT(t).coordinates;let s=0;for(let c=0;c=s&&c===i.length-1);c++)if(s>=e){const l=e-s;if(l){const d=_b(i[c],i[c-1])-180;return RT(i[c],l,d,n)}else return rp(i[c])}else s+=NT(i[c],i[c+1],n);return rp(i[i.length-1])}d6(OT,"along");var m6=OT;function g6(t){let e,n;const r=[gi("animate-shortcuts"),{paint:{"circle-radius":10,"circle-color":"purple","circle-stroke-color":"black","circle-stroke-width":1}}];let i={};for(let s=0;sclearInterval(l));function d(){return r.features.map(M=>1/M.properties.directness).reduce((M,A)=>M+A,0)}function v(){return r.features.length==0?[]:Array.from({length:y6},S)}function S(){let M=Math.random()*i,A=0;for(let[R,z]of r.features.entries())if(A+=1/z.properties.directness,Mm6(r.features[M],A,{units:"kilometers"}))}}function C(){for(let[M,A]of s.entries())A.distance+=b6,A.distance>=r.features[A.idx].properties.length_meters/1e3&&(s[M]=S());n(0,c=E())}return t.$$set=M=>{"paths"in M&&n(1,r=M.paths)},t.$$.update=()=>{t.$$.dirty&2&&r&&(i=d(),s=v())},[c,r]}class w6 extends Yt{constructor(e){super(),Xt(this,e,x6,_6,Ut,{paths:1})}}function S6(t){let e;return{c(){e=ot("Choose project")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function E6(t){let e;return{c(){e=ot("Pick neighbourhood")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function I6(t){let e;return{c(){e=ot("View shortcuts")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function C6(t){let e;return{c(){e=ot("Route")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function T6(t){let e;return{c(){e=ot("Change this boundary")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function L6(t){let e;return{c(){e=ot("Debug")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function P6(t){let e,n,r,i,s,c,l,d,v,S,E,C,M,A,R,z,U,F,G,H,te,ee,fe,pe,se;return s=new or({props:{$$slots:{default:[S6]},$$scope:{ctx:t}}}),s.$on("click",t[25]),d=new or({props:{$$slots:{default:[E6]},$$scope:{ctx:t}}}),d.$on("click",t[26]),R=new or({props:{$$slots:{default:[I6]},$$scope:{ctx:t}}}),R.$on("click",t[27]),F=new or({props:{$$slots:{default:[C6]},$$scope:{ctx:t}}}),F.$on("click",t[28]),te=new or({props:{$$slots:{default:[T6]},$$scope:{ctx:t}}}),te.$on("click",t[29]),pe=new or({props:{$$slots:{default:[L6]},$$scope:{ctx:t}}}),pe.$on("click",t[30]),{c(){e=_e("div"),n=_e("nav"),r=_e("ul"),i=_e("li"),Ge(s.$$.fragment),c=We(),l=_e("li"),Ge(d.$$.fragment),v=We(),S=_e("li"),S.textContent="Editing",E=We(),C=_e("nav"),M=_e("ul"),A=_e("li"),Ge(R.$$.fragment),z=We(),U=_e("li"),Ge(F.$$.fragment),G=We(),H=_e("li"),Ge(te.$$.fragment),ee=We(),fe=_e("li"),Ge(pe.$$.fragment),Ie(n,"aria-label","breadcrumb"),Ie(e,"slot","top"),sr(e,"display","flex"),sr(e,"justify-content","space-between")},m(Ae,Y){xe(Ae,e,Y),oe(e,n),oe(n,r),oe(r,i),Ue(s,i,null),oe(r,c),oe(r,l),Ue(d,l,null),oe(r,v),oe(r,S),oe(e,E),oe(e,C),oe(C,M),oe(M,A),Ue(R,A,null),oe(M,z),oe(M,U),Ue(F,U,null),oe(M,G),oe(M,H),Ue(te,H,null),oe(M,ee),oe(M,fe),Ue(pe,fe,null),se=!0},p(Ae,Y){const ae={};Y[1]&8&&(ae.$$scope={dirty:Y,ctx:Ae}),s.$set(ae);const Ke={};Y[1]&8&&(Ke.$$scope={dirty:Y,ctx:Ae}),d.$set(Ke);const Le={};Y[1]&8&&(Le.$$scope={dirty:Y,ctx:Ae}),R.$set(Le);const tt={};Y[1]&8&&(tt.$$scope={dirty:Y,ctx:Ae}),F.$set(tt);const ut={};Y[1]&8&&(ut.$$scope={dirty:Y,ctx:Ae}),te.$set(ut);const He={};Y[1]&8&&(He.$$scope={dirty:Y,ctx:Ae}),pe.$set(He)},i(Ae){se||(ue(s.$$.fragment,Ae),ue(d.$$.fragment,Ae),ue(R.$$.fragment,Ae),ue(F.$$.fragment,Ae),ue(te.$$.fragment,Ae),ue(pe.$$.fragment,Ae),se=!0)},o(Ae){ye(s.$$.fragment,Ae),ye(d.$$.fragment,Ae),ye(R.$$.fragment,Ae),ye(F.$$.fragment,Ae),ye(te.$$.fragment,Ae),ye(pe.$$.fragment,Ae),se=!1},d(Ae){Ae&&be(e),je(s),je(d),je(R),je(F),je(te),je(pe)}}}function sE(t){let e;return{c(){e=_e("mark"),e.textContent=`Some parts of the neighbourhood aren't reachable by drivers, shown in + red`},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function M6(t){let e,n,r;return{c(){e=ot("Undo ("),n=ot(t[4]),r=ot(")")},m(i,s){xe(i,e,s),xe(i,n,s),xe(i,r,s)},p(i,s){s[0]&16&&cr(n,i[4])},d(i){i&&(be(e),be(n),be(r))}}}function A6(t){let e;return{c(){e=ot("Undo")},m(n,r){xe(n,e,r)},p:Pt,d(n){n&&be(e)}}}function k6(t){let e,n,r;return{c(){e=ot("Redo ("),n=ot(t[5]),r=ot(")")},m(i,s){xe(i,e,s),xe(i,n,s),xe(i,r,s)},p(i,s){s[0]&32&&cr(n,i[5])},d(i){i&&(be(e),be(n),be(r))}}}function D6(t){let e;return{c(){e=ot("Redo")},m(n,r){xe(n,e,r)},p:Pt,d(n){n&&be(e)}}}function aE(t){let e,n;return e=new kF({}),e.$on("close",t[24]),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p:Pt,i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function R6(t){let e,n,r,i,s=Rr(t[6]).properties.name+"",c,l,d=t[1].area_km2.toFixed(1)+"",v,S,E,C,M,A,R,z,U,F,G,H,te,ee,fe,pe,se,Ae,Y,ae,Ke,Le,tt,ut,He,Ot,Gt,vt,At,Mt,rn,wn,fn,_n,pn,Yn,zr,Pn=t[8]>0&&sE();function ar(It,Cn){return It[4]==0?A6:M6}let Zn=ar(t),ne=Zn(t);function Me(It,Cn){return It[5]==0?D6:k6}let dt=Me(t),en=dt(t),Re=t[3]&&aE(t);return{c(){e=_e("div"),n=_e("p"),r=ot("Editing neighbourhood "),i=_e("u"),c=ot(s),l=ot(` + , with an area of `),v=ot(d),S=ot(" km²"),E=We(),C=_e("details"),C.innerHTML=`

Help

Now that you've defined a neighbourhood boundary, you can see the possible shortcuts that vehicles are currently able to take through it. You can add a new modal filter to try and solve this. The colored "cell" areas show what's reachable for drivers without leaving the boundary - you've drawn.

`,M=We(),Pn&&Pn.c(),A=We(),R=_e("div"),z=_e("button"),U=_e("img"),G=st(` - Add a modal filter`),te=We(),ee=_e("button"),fe=st("Add many modal filters along line"),se=We(),Ae=_e("button"),Y=st("Reverse directions"),Ke=We(),Le=_e("button"),Le.textContent="Change modal filter type",tt=We(),ut=_e("label"),He=_e("input"),Ot=st(` - Animate shortcuts`),Gt=We(),vt=_e("div"),At=_e("button"),ne.c(),rn=We(),wn=_e("button"),en.c(),_n=We(),Re&&Re.c(),Wn(U.src,F=`/ltn//filters/${t[9]}_icon.gif`)||Ie(U,"src",F),Ie(U,"width","30"),Ie(U,"alt","Add a modal filter"),z.disabled=H=t[0]=="filter",Ie(z,"data-tooltip","hotkey 1"),ee.disabled=pe=t[0]=="freehand-filters",Ie(ee,"data-tooltip","hotkey 2"),Ae.disabled=ae=t[0]=="oneway",Ie(Ae,"data-tooltip","hotkey 3"),sr(R,"display","flex"),sr(R,"justify-content","space-between"),Ie(He,"type","checkbox"),At.disabled=Mt=t[4]==0,Ie(At,"data-tooltip","Ctrl+Z"),wn.disabled=fn=t[5]==0,Ie(wn,"data-tooltip","Ctrl+Y"),sr(vt,"display","flex"),sr(vt,"justify-content","space-between"),Ie(e,"slot","sidebar")},m(It,Cn){xe(It,e,Cn),oe(e,n),oe(n,r),oe(n,i),oe(i,c),oe(n,l),oe(n,v),oe(n,S),oe(e,E),oe(e,C),oe(e,M),Pn&&Pn.m(e,null),oe(e,A),oe(e,R),oe(R,z),oe(z,U),oe(z,G),oe(R,te),oe(R,ee),oe(ee,fe),oe(R,se),oe(R,Ae),oe(Ae,Y),oe(e,Ke),oe(e,Le),oe(e,tt),oe(e,ut),oe(ut,He),He.checked=t[10],oe(ut,Ot),oe(e,Gt),oe(e,vt),oe(vt,At),ne.m(At,null),oe(vt,rn),oe(vt,wn),en.m(wn,null),oe(e,_n),Re&&Re.m(e,null),pn=!0,Yn||(zr=[Lt(z,"click",t[19]),Lt(ee,"click",t[20]),Lt(Ae,"click",t[21]),Lt(Le,"click",t[22]),Lt(He,"change",t[23]),Lt(At,"click",t[15]),Lt(wn,"click",t[16])],Yn=!0)},p(It,Cn){(!pn||Cn[0]&64)&&s!==(s=Rr(It[6]).properties.name+"")&&hr(c,s),(!pn||Cn[0]&2)&&d!==(d=It[1].area_km2.toFixed(1)+"")&&hr(v,d),It[8]>0?Pn||(Pn=iE(),Pn.c(),Pn.m(e,A)):Pn&&(Pn.d(1),Pn=null),(!pn||Cn[0]&512&&!Wn(U.src,F=`/ltn//filters/${It[9]}_icon.gif`))&&Ie(U,"src",F),(!pn||Cn[0]&1&&H!==(H=It[0]=="filter"))&&(z.disabled=H),(!pn||Cn[0]&1&&pe!==(pe=It[0]=="freehand-filters"))&&(ee.disabled=pe),(!pn||Cn[0]&1&&ae!==(ae=It[0]=="oneway"))&&(Ae.disabled=ae),Cn[0]&1024&&(He.checked=It[10]),Zn===(Zn=ar(It))&&ne?ne.p(It,Cn):(ne.d(1),ne=Zn(It),ne&&(ne.c(),ne.m(At,null))),(!pn||Cn[0]&16&&Mt!==(Mt=It[4]==0))&&(At.disabled=Mt),dt===(dt=Me(It))&&en?en.p(It,Cn):(en.d(1),en=dt(It),en&&(en.c(),en.m(wn,null))),(!pn||Cn[0]&32&&fn!==(fn=It[5]==0))&&(wn.disabled=fn),It[3]?Re?(Re.p(It,Cn),Cn[0]&8&&ue(Re,1)):(Re=oE(It),Re.c(),ue(Re,1),Re.m(e,null)):Re&&(Un(),ye(Re,1,1,()=>{Re=null}),jn())},i(It){pn||(ue(Re),pn=!0)},o(It){ye(Re),pn=!1},d(It){It&&be(e),Pn&&Pn.d(),ne.d(),en.d(),Re&&Re.d(),Yn=!1,Kr(zr)}}}function N6(t){let e;return{c(){e=_e("p"),e.textContent="Click to change direction"},m(n,r){xe(n,e,r)},p:Pt,d(n){n&&be(e)}}}function O6(t){let e,n,r,i;return{c(){e=_e("div"),n=_e("img"),i=st(` - Click to add modal filter`),Wn(n.src,r=`/ltn//filters/${t[9]}_icon.gif`)||Ie(n,"src",r),Ie(n,"width","20"),Ie(n,"alt","Add modal filter")},m(s,c){xe(s,e,c),oe(e,n),oe(e,i)},p(s,c){c[0]&512&&!Wn(n.src,r=`/ltn//filters/${s[9]}_icon.gif`)&&Ie(n,"src",r)},d(s){s&&be(e)}}}function z6(t){let e,n=t[33].shortcuts+"",r,i,s=(t[33].name??"unnamed road")+"",c,l,d;function v(C,M){return C[0]=="filter"?O6:N6}let S=v(t),E=S(t);return{c(){e=_e("p"),r=st(n),i=st(" shortcuts through "),c=st(s),l=We(),E.c(),d=Hi()},m(C,M){xe(C,e,M),oe(e,r),oe(e,i),oe(e,c),xe(C,l,M),E.m(C,M),xe(C,d,M)},p(C,M){M[1]&4&&n!==(n=C[33].shortcuts+"")&&hr(r,n),M[1]&4&&s!==(s=(C[33].name??"unnamed road")+"")&&hr(c,s),S===(S=v(C))&&E?E.p(C,M):(E.d(1),E=S(C),E&&(E.c(),E.m(d.parentNode,d)))},d(C){C&&(be(e),be(l),be(d)),E.d(C)}}}function F6(t){let e,n,r;return n=new dc({props:{openOn:"hover",$$slots:{default:[z6,({props:i})=>({33:i}),({props:i})=>[0,i?4:0]]},$$scope:{ctx:t}}}),{c(){e=_e("div"),Ge(n.$$.fragment),Ie(e,"slot","line-popup")},m(i,s){xe(i,e,s),Ue(n,e,null),r=!0},p(i,s){const c={};s[0]&513|s[1]&12&&(c.$$scope={dirty:s,ctx:i}),n.$set(c)},i(i){r||(ue(n.$$.fragment,i),r=!0)},o(i){ye(n.$$.fragment,i),r=!1},d(i){i&&be(e),je(n)}}}function sE(t){let e,n;return e=new w6({props:{paths:t[7]}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,i){const s={};i[0]&128&&(s.paths=r[7]),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function B6(t){let e;return{c(){e=st("Click to delete")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function V6(t){let e,n;return e=new dc({props:{openOn:"hover",$$slots:{default:[B6]},$$scope:{ctx:t}}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,i){const s={};i[1]&8&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function aE(t){let e,n;return e=new OF({props:{map:Rr(t[2])}}),e.$on("done",t[17]),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,i){const s={};i[0]&4&&(s.map=Rr(r[2])),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function U6(t){let e,n,r,i,s,c,l;n=new Cy({props:{gjInput:t[1],interactive:t[0]=="filter"||t[0]=="oneway",onClickLine:t[12],$$slots:{"line-popup":[F6]},$$scope:{ctx:t}}});let d=t[10]&&sE(t);s=new Ty({props:{$$slots:{default:[V6]},$$scope:{ctx:t}}}),s.$on("click",t[13]);let v=t[0]=="freehand-filters"&&aE(t);return{c(){e=_e("div"),Ge(n.$$.fragment),r=We(),d&&d.c(),i=We(),Ge(s.$$.fragment),c=We(),v&&v.c(),Ie(e,"slot","map")},m(S,E){xe(S,e,E),Ue(n,e,null),oe(e,r),d&&d.m(e,null),oe(e,i),Ue(s,e,null),oe(e,c),v&&v.m(e,null),l=!0},p(S,E){const C={};E[0]&2&&(C.gjInput=S[1]),E[0]&1&&(C.interactive=S[0]=="filter"||S[0]=="oneway"),E[0]&513|E[1]&8&&(C.$$scope={dirty:E,ctx:S}),n.$set(C),S[10]?d?(d.p(S,E),E[0]&1024&&ue(d,1)):(d=sE(S),d.c(),ue(d,1),d.m(e,i)):d&&(Un(),ye(d,1,1,()=>{d=null}),jn());const M={};E[1]&8&&(M.$$scope={dirty:E,ctx:S}),s.$set(M),S[0]=="freehand-filters"?v?(v.p(S,E),E[0]&1&&ue(v,1)):(v=aE(S),v.c(),ue(v,1),v.m(e,null)):v&&(Un(),ye(v,1,1,()=>{v=null}),jn())},i(S){l||(ue(n.$$.fragment,S),ue(d),ue(s.$$.fragment,S),ue(v),l=!0)},o(S){ye(n.$$.fragment,S),ye(d),ye(s.$$.fragment,S),ye(v),l=!1},d(S){S&&be(e),je(n),d&&d.d(),je(s),v&&v.d()}}}function j6(t){let e,n,r,i;return e=new bu({props:{$$slots:{map:[U6],sidebar:[R6],top:[P6]},$$scope:{ctx:t}}}),{c(){Ge(e.$$.fragment)},m(s,c){Ue(e,s,c),n=!0,r||(i=Lt(window,"keydown",t[14]),r=!0)},p(s,c){const l={};c[0]&4095|c[1]&8&&(l.$$scope={dirty:c,ctx:s}),e.$set(l)},i(s){n||(ue(e.$$.fragment,s),n=!0)},o(s){ye(e.$$.fragment,s),n=!1},d(s){je(e,s),r=!1,i()}}}function G6(t,e,n){let r,i,s,c,l,d,v;mt(t,Gu,vt=>n(18,i=vt)),mt(t,Gv,vt=>n(9,s=vt)),mt(t,ji,vt=>n(31,c=vt)),mt(t,uu,vt=>n(2,l=vt)),mt(t,E2,vt=>n(10,d=vt)),mt(t,xn,vt=>n(11,v=vt));let S="filter",E=!1,C=0,M=0,A,R,z=JSON.parse(c.getAllShortcuts());ro(()=>{l.doubleClickZoom.enable()});function U(vt){n(1,R=JSON.parse(c.renderNeighbourhood())),n(6,A=R.features.find(At=>At.properties.kind=="boundary")),n(4,C=R.undo_length),n(5,M=R.redo_length),n(7,z=JSON.parse(c.getAllShortcuts())),Rf()}function F(vt,At){S=="filter"?(c.addModalFilter(At,s),Ft(Gu,i++,i)):S=="oneway"&&(c.toggleDirection(vt.properties.road),Ft(Gu,i++,i))}function G(vt){let At=vt.detail.features[0];c.deleteModalFilter(At.properties.road),Ft(Gu,i++,i)}function H(vt){vt.target.tagName!="INPUT"&&(vt.ctrlKey&&vt.key=="z"&&te(),vt.ctrlKey&&vt.key=="y"&&ee(),vt.key=="1"&&n(0,S="filter"),vt.key=="2"&&n(0,S="freehand-filters"),vt.key=="3"&&n(0,S="oneway"))}function te(){c.undo(),Ft(Gu,i++,i)}function ee(){c.redo(),Ft(Gu,i++,i)}function fe(vt){let At=vt.detail;At&&(c.addManyModalFilters(At,s),Ft(Gu,i++,i)),n(0,S="filter")}const pe=()=>n(0,S="filter"),se=()=>n(0,S="freehand-filters"),Ae=()=>n(0,S="oneway"),Y=()=>n(3,E=!0);function ae(){d=this.checked,E2.set(d)}const Ke=()=>n(3,E=!1),Le=()=>Ft(xn,v={mode:"title"},v),tt=()=>Ft(xn,v={mode:"network"},v),ut=()=>Ft(xn,v={mode:"view-shortcuts"},v),He=()=>Ft(xn,v={mode:"route",prevMode:"neighbourhood"},v),Ot=()=>Ft(xn,v={mode:"set-boundary",name:Rr(A).properties.name,existing:A},v),Gt=()=>Ft(xn,v={mode:"debug"},v);return t.$$.update=()=>{t.$$.dirty[0]&5&&(S=="oneway"?l.doubleClickZoom.disable():l.doubleClickZoom.enable()),t.$$.dirty[0]&262144&&U(),t.$$.dirty[0]&2&&n(8,r=R.features.filter(vt=>vt.properties.kind=="cell"&&vt.properties.cell_color=="disconnected").length)},[S,R,l,E,C,M,A,z,r,s,d,v,F,G,H,te,ee,fe,i,pe,se,Ae,Y,ae,Ke,Le,tt,ut,He,Ot,Gt]}class q6 extends Yt{constructor(e){super(),Xt(this,e,G6,j6,Ut,{},null,[-1,-1])}}const Z_="/ltn/assets/delete_light-ec75e756.svg",X_="/ltn/assets/delete_dark-953cd893.svg",Y_="/ltn/assets/edit_light-f3f51206.svg",$_="/ltn/assets/edit_dark-97c94d36.svg";function lE(t,e,n){const r=t.slice();return r[20]=e[n],r}function W6(t){let e;return{c(){e=st("Choose project")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function H6(t){let e;return{c(){e=st("Route")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function Z6(t){let e,n,r,i,s,c,l,d,v,S,E,C,M;return s=new or({props:{$$slots:{default:[W6]},$$scope:{ctx:t}}}),s.$on("click",t[17]),C=new or({props:{$$slots:{default:[H6]},$$scope:{ctx:t}}}),C.$on("click",t[18]),{c(){e=_e("div"),n=_e("nav"),r=_e("ul"),i=_e("li"),Ge(s.$$.fragment),c=We(),l=_e("li"),l.textContent="Pick neighbourhood",d=We(),v=_e("nav"),S=_e("ul"),E=_e("li"),Ge(C.$$.fragment),Ie(n,"aria-label","breadcrumb"),Ie(e,"slot","top"),sr(e,"display","flex"),sr(e,"justify-content","space-between")},m(A,R){xe(A,e,R),oe(e,n),oe(n,r),oe(r,i),Ue(s,i,null),oe(r,c),oe(r,l),oe(e,d),oe(e,v),oe(v,S),oe(S,E),Ue(C,E,null),M=!0},p(A,R){const z={};R&8388608&&(z.$$scope={dirty:R,ctx:A}),s.$set(z);const U={};R&8388608&&(U.$$scope={dirty:R,ctx:A}),C.$set(U)},i(A){M||(ue(s.$$.fragment,A),ue(C.$$.fragment,A),M=!0)},o(A){ye(s.$$.fragment,A),ye(C.$$.fragment,A),M=!1},d(A){A&&be(e),je(s),je(C)}}}function X6(t){let e;return{c(){e=st("Draw a new boundary")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function Y6(t){let e;return{c(){e=st("Use an auto-generated boundary")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function $6(t){let e=t[20]+"",n;return{c(){n=st(e)},m(r,i){xe(r,n,i)},p(r,i){i&2&&e!==(e=r[20]+"")&&hr(n,e)},d(r){r&&be(n)}}}function uE(t){let e,n,r,i,s,c,l,d,v,S,E,C,M,A,R;function z(){return t[14](t[20])}r=new or({props:{$$slots:{default:[$6]},$$scope:{ctx:t}}}),r.$on("click",z);function U(){return t[15](t[20])}function F(){return t[16](t[20])}return{c(){e=_e("li"),n=_e("span"),Ge(r.$$.fragment),i=We(),s=_e("button"),c=_e("img"),d=We(),v=_e("button"),S=_e("img"),C=We(),Wn(c.src,l=t[4]?Y_:$_)||Ie(c,"src",l),Ie(c,"alt","Rename neighbourhood"),Ie(s,"class","secondary"),Wn(S.src,E=t[4]?Z_:X_)||Ie(S,"src",E),Ie(S,"alt","Delete neighbourhood"),Ie(v,"class","secondary"),sr(n,"display","flex"),sr(n,"justify-content","space-between")},m(G,H){xe(G,e,H),oe(e,n),Ue(r,n,null),oe(n,i),oe(n,s),oe(s,c),oe(n,d),oe(n,v),oe(v,S),oe(e,C),M=!0,A||(R=[Lt(s,"click",U),Lt(v,"click",F)],A=!0)},p(G,H){t=G;const te={};H&8388610&&(te.$$scope={dirty:H,ctx:t}),r.$set(te),(!M||H&16&&!Wn(c.src,l=t[4]?Y_:$_))&&Ie(c,"src",l),(!M||H&16&&!Wn(S.src,E=t[4]?Z_:X_))&&Ie(S,"src",E)},i(G){M||(ue(r.$$.fragment,G),M=!0)},o(G){ye(r.$$.fragment,G),M=!1},d(G){G&&be(e),je(r),A=!1,Kr(R)}}}function K6(t){let e,n,r,i,s,c,l,d,v,S,E,C,M,A,R,z,U,F,G,H,te,ee,fe;s=new or({props:{$$slots:{default:[X6]},$$scope:{ctx:t}}}),s.$on("click",t[8]),d=new or({props:{$$slots:{default:[Y6]},$$scope:{ctx:t}}}),d.$on("click",t[13]);let pe=bs(t[1]),se=[];for(let Y=0;Yye(se[Y],1,1,()=>{se[Y]=null});return{c(){e=_e("div"),n=_e("details"),n.innerHTML=`Help

Inside the neighbourhood you define, the goal is to eliminate (or + you've drawn.

`,M=We(),Pn&&Pn.c(),A=We(),R=_e("div"),z=_e("button"),U=_e("img"),G=ot(` + Add a modal filter`),te=We(),ee=_e("button"),fe=ot("Add many modal filters along line"),se=We(),Ae=_e("button"),Y=ot("Reverse directions"),Ke=We(),Le=_e("button"),Le.textContent="Change modal filter type",tt=We(),ut=_e("label"),He=_e("input"),Ot=ot(` + Animate shortcuts`),Gt=We(),vt=_e("div"),At=_e("button"),ne.c(),rn=We(),wn=_e("button"),en.c(),_n=We(),Re&&Re.c(),Wn(U.src,F=`/ltn//filters/${t[9]}_icon.gif`)||Ie(U,"src",F),Ie(U,"width","30"),Ie(U,"alt","Add a modal filter"),z.disabled=H=t[0]=="filter",Ie(z,"data-tooltip","hotkey 1"),ee.disabled=pe=t[0]=="freehand-filters",Ie(ee,"data-tooltip","hotkey 2"),Ae.disabled=ae=t[0]=="oneway",Ie(Ae,"data-tooltip","hotkey 3"),sr(R,"display","flex"),sr(R,"justify-content","space-between"),Ie(He,"type","checkbox"),At.disabled=Mt=t[4]==0,Ie(At,"data-tooltip","Ctrl+Z"),wn.disabled=fn=t[5]==0,Ie(wn,"data-tooltip","Ctrl+Y"),sr(vt,"display","flex"),sr(vt,"justify-content","space-between"),Ie(e,"slot","sidebar")},m(It,Cn){xe(It,e,Cn),oe(e,n),oe(n,r),oe(n,i),oe(i,c),oe(n,l),oe(n,v),oe(n,S),oe(e,E),oe(e,C),oe(e,M),Pn&&Pn.m(e,null),oe(e,A),oe(e,R),oe(R,z),oe(z,U),oe(z,G),oe(R,te),oe(R,ee),oe(ee,fe),oe(R,se),oe(R,Ae),oe(Ae,Y),oe(e,Ke),oe(e,Le),oe(e,tt),oe(e,ut),oe(ut,He),He.checked=t[10],oe(ut,Ot),oe(e,Gt),oe(e,vt),oe(vt,At),ne.m(At,null),oe(vt,rn),oe(vt,wn),en.m(wn,null),oe(e,_n),Re&&Re.m(e,null),pn=!0,Yn||(zr=[Lt(z,"click",t[19]),Lt(ee,"click",t[20]),Lt(Ae,"click",t[21]),Lt(Le,"click",t[22]),Lt(He,"change",t[23]),Lt(At,"click",t[15]),Lt(wn,"click",t[16])],Yn=!0)},p(It,Cn){(!pn||Cn[0]&64)&&s!==(s=Rr(It[6]).properties.name+"")&&cr(c,s),(!pn||Cn[0]&2)&&d!==(d=It[1].area_km2.toFixed(1)+"")&&cr(v,d),It[8]>0?Pn||(Pn=sE(),Pn.c(),Pn.m(e,A)):Pn&&(Pn.d(1),Pn=null),(!pn||Cn[0]&512&&!Wn(U.src,F=`/ltn//filters/${It[9]}_icon.gif`))&&Ie(U,"src",F),(!pn||Cn[0]&1&&H!==(H=It[0]=="filter"))&&(z.disabled=H),(!pn||Cn[0]&1&&pe!==(pe=It[0]=="freehand-filters"))&&(ee.disabled=pe),(!pn||Cn[0]&1&&ae!==(ae=It[0]=="oneway"))&&(Ae.disabled=ae),Cn[0]&1024&&(He.checked=It[10]),Zn===(Zn=ar(It))&&ne?ne.p(It,Cn):(ne.d(1),ne=Zn(It),ne&&(ne.c(),ne.m(At,null))),(!pn||Cn[0]&16&&Mt!==(Mt=It[4]==0))&&(At.disabled=Mt),dt===(dt=Me(It))&&en?en.p(It,Cn):(en.d(1),en=dt(It),en&&(en.c(),en.m(wn,null))),(!pn||Cn[0]&32&&fn!==(fn=It[5]==0))&&(wn.disabled=fn),It[3]?Re?(Re.p(It,Cn),Cn[0]&8&&ue(Re,1)):(Re=aE(It),Re.c(),ue(Re,1),Re.m(e,null)):Re&&(Un(),ye(Re,1,1,()=>{Re=null}),jn())},i(It){pn||(ue(Re),pn=!0)},o(It){ye(Re),pn=!1},d(It){It&&be(e),Pn&&Pn.d(),ne.d(),en.d(),Re&&Re.d(),Yn=!1,Hr(zr)}}}function N6(t){let e;return{c(){e=_e("p"),e.textContent="Click to change direction"},m(n,r){xe(n,e,r)},p:Pt,d(n){n&&be(e)}}}function O6(t){let e,n,r,i;return{c(){e=_e("div"),n=_e("img"),i=ot(` + Click to add modal filter`),Wn(n.src,r=`/ltn//filters/${t[9]}_icon.gif`)||Ie(n,"src",r),Ie(n,"width","20"),Ie(n,"alt","Add modal filter")},m(s,c){xe(s,e,c),oe(e,n),oe(e,i)},p(s,c){c[0]&512&&!Wn(n.src,r=`/ltn//filters/${s[9]}_icon.gif`)&&Ie(n,"src",r)},d(s){s&&be(e)}}}function z6(t){let e,n=t[33].shortcuts+"",r,i,s=(t[33].name??"unnamed road")+"",c,l,d;function v(C,M){return C[0]=="filter"?O6:N6}let S=v(t),E=S(t);return{c(){e=_e("p"),r=ot(n),i=ot(" shortcuts through "),c=ot(s),l=We(),E.c(),d=Hi()},m(C,M){xe(C,e,M),oe(e,r),oe(e,i),oe(e,c),xe(C,l,M),E.m(C,M),xe(C,d,M)},p(C,M){M[1]&4&&n!==(n=C[33].shortcuts+"")&&cr(r,n),M[1]&4&&s!==(s=(C[33].name??"unnamed road")+"")&&cr(c,s),S===(S=v(C))&&E?E.p(C,M):(E.d(1),E=S(C),E&&(E.c(),E.m(d.parentNode,d)))},d(C){C&&(be(e),be(l),be(d)),E.d(C)}}}function F6(t){let e,n,r;return n=new xu({props:{openOn:"hover",$$slots:{default:[z6,({props:i})=>({33:i}),({props:i})=>[0,i?4:0]]},$$scope:{ctx:t}}}),{c(){e=_e("div"),Ge(n.$$.fragment),Ie(e,"slot","line-popup")},m(i,s){xe(i,e,s),Ue(n,e,null),r=!0},p(i,s){const c={};s[0]&513|s[1]&12&&(c.$$scope={dirty:s,ctx:i}),n.$set(c)},i(i){r||(ue(n.$$.fragment,i),r=!0)},o(i){ye(n.$$.fragment,i),r=!1},d(i){i&&be(e),je(n)}}}function lE(t){let e,n;return e=new w6({props:{paths:t[7]}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,i){const s={};i[0]&128&&(s.paths=r[7]),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function B6(t){let e;return{c(){e=ot("Click to delete")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function V6(t){let e,n;return e=new xu({props:{openOn:"hover",$$slots:{default:[B6]},$$scope:{ctx:t}}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,i){const s={};i[1]&8&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function uE(t){let e,n;return e=new OF({props:{map:Rr(t[2])}}),e.$on("done",t[17]),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,i){const s={};i[0]&4&&(s.map=Rr(r[2])),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function U6(t){let e,n,r,i,s,c,l;n=new Ty({props:{gjInput:t[1],interactive:t[0]=="filter"||t[0]=="oneway",onClickLine:t[12],$$slots:{"line-popup":[F6]},$$scope:{ctx:t}}});let d=t[10]&&lE(t);s=new Ly({props:{$$slots:{default:[V6]},$$scope:{ctx:t}}}),s.$on("click",t[13]);let v=t[0]=="freehand-filters"&&uE(t);return{c(){e=_e("div"),Ge(n.$$.fragment),r=We(),d&&d.c(),i=We(),Ge(s.$$.fragment),c=We(),v&&v.c(),Ie(e,"slot","map")},m(S,E){xe(S,e,E),Ue(n,e,null),oe(e,r),d&&d.m(e,null),oe(e,i),Ue(s,e,null),oe(e,c),v&&v.m(e,null),l=!0},p(S,E){const C={};E[0]&2&&(C.gjInput=S[1]),E[0]&1&&(C.interactive=S[0]=="filter"||S[0]=="oneway"),E[0]&513|E[1]&8&&(C.$$scope={dirty:E,ctx:S}),n.$set(C),S[10]?d?(d.p(S,E),E[0]&1024&&ue(d,1)):(d=lE(S),d.c(),ue(d,1),d.m(e,i)):d&&(Un(),ye(d,1,1,()=>{d=null}),jn());const M={};E[1]&8&&(M.$$scope={dirty:E,ctx:S}),s.$set(M),S[0]=="freehand-filters"?v?(v.p(S,E),E[0]&1&&ue(v,1)):(v=uE(S),v.c(),ue(v,1),v.m(e,null)):v&&(Un(),ye(v,1,1,()=>{v=null}),jn())},i(S){l||(ue(n.$$.fragment,S),ue(d),ue(s.$$.fragment,S),ue(v),l=!0)},o(S){ye(n.$$.fragment,S),ye(d),ye(s.$$.fragment,S),ye(v),l=!1},d(S){S&&be(e),je(n),d&&d.d(),je(s),v&&v.d()}}}function j6(t){let e,n,r,i;return e=new bu({props:{$$slots:{map:[U6],sidebar:[R6],top:[P6]},$$scope:{ctx:t}}}),{c(){Ge(e.$$.fragment)},m(s,c){Ue(e,s,c),n=!0,r||(i=Lt(window,"keydown",t[14]),r=!0)},p(s,c){const l={};c[0]&4095|c[1]&8&&(l.$$scope={dirty:c,ctx:s}),e.$set(l)},i(s){n||(ue(e.$$.fragment,s),n=!0)},o(s){ye(e.$$.fragment,s),n=!1},d(s){je(e,s),r=!1,i()}}}function G6(t,e,n){let r,i,s,c,l,d,v;mt(t,qu,vt=>n(18,i=vt)),mt(t,qv,vt=>n(9,s=vt)),mt(t,ji,vt=>n(31,c=vt)),mt(t,uu,vt=>n(2,l=vt)),mt(t,C2,vt=>n(10,d=vt)),mt(t,xn,vt=>n(11,v=vt));let S="filter",E=!1,C=0,M=0,A,R,z=JSON.parse(c.getAllShortcuts());ro(()=>{l.doubleClickZoom.enable()});function U(vt){n(1,R=JSON.parse(c.renderNeighbourhood())),n(6,A=R.features.find(At=>At.properties.kind=="boundary")),n(4,C=R.undo_length),n(5,M=R.redo_length),n(7,z=JSON.parse(c.getAllShortcuts())),Rf()}function F(vt,At){S=="filter"?(c.addModalFilter(At,s),Ft(qu,i++,i)):S=="oneway"&&(c.toggleDirection(vt.properties.road),Ft(qu,i++,i))}function G(vt){let At=vt.detail.features[0];c.deleteModalFilter(At.properties.road),Ft(qu,i++,i)}function H(vt){vt.target.tagName!="INPUT"&&(vt.ctrlKey&&vt.key=="z"&&te(),vt.ctrlKey&&vt.key=="y"&&ee(),vt.key=="1"&&n(0,S="filter"),vt.key=="2"&&n(0,S="freehand-filters"),vt.key=="3"&&n(0,S="oneway"))}function te(){c.undo(),Ft(qu,i++,i)}function ee(){c.redo(),Ft(qu,i++,i)}function fe(vt){let At=vt.detail;At&&(c.addManyModalFilters(At,s),Ft(qu,i++,i)),n(0,S="filter")}const pe=()=>n(0,S="filter"),se=()=>n(0,S="freehand-filters"),Ae=()=>n(0,S="oneway"),Y=()=>n(3,E=!0);function ae(){d=this.checked,C2.set(d)}const Ke=()=>n(3,E=!1),Le=()=>Ft(xn,v={mode:"title"},v),tt=()=>Ft(xn,v={mode:"network"},v),ut=()=>Ft(xn,v={mode:"view-shortcuts"},v),He=()=>Ft(xn,v={mode:"route",prevMode:"neighbourhood"},v),Ot=()=>Ft(xn,v={mode:"set-boundary",name:Rr(A).properties.name,existing:A},v),Gt=()=>Ft(xn,v={mode:"debug"},v);return t.$$.update=()=>{t.$$.dirty[0]&5&&(S=="oneway"?l.doubleClickZoom.disable():l.doubleClickZoom.enable()),t.$$.dirty[0]&262144&&U(),t.$$.dirty[0]&2&&n(8,r=R.features.filter(vt=>vt.properties.kind=="cell"&&vt.properties.cell_color=="disconnected").length)},[S,R,l,E,C,M,A,z,r,s,d,v,F,G,H,te,ee,fe,i,pe,se,Ae,Y,ae,Ke,Le,tt,ut,He,Ot,Gt]}class q6 extends Yt{constructor(e){super(),Xt(this,e,G6,j6,Ut,{},null,[-1,-1])}}const Z_="/ltn/assets/delete_light-ec75e756.svg",X_="/ltn/assets/delete_dark-953cd893.svg",Y_="/ltn/assets/edit_light-f3f51206.svg",$_="/ltn/assets/edit_dark-97c94d36.svg";function cE(t,e,n){const r=t.slice();return r[20]=e[n],r}function W6(t){let e;return{c(){e=ot("Choose project")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function H6(t){let e;return{c(){e=ot("Route")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function Z6(t){let e,n,r,i,s,c,l,d,v,S,E,C,M;return s=new or({props:{$$slots:{default:[W6]},$$scope:{ctx:t}}}),s.$on("click",t[17]),C=new or({props:{$$slots:{default:[H6]},$$scope:{ctx:t}}}),C.$on("click",t[18]),{c(){e=_e("div"),n=_e("nav"),r=_e("ul"),i=_e("li"),Ge(s.$$.fragment),c=We(),l=_e("li"),l.textContent="Pick neighbourhood",d=We(),v=_e("nav"),S=_e("ul"),E=_e("li"),Ge(C.$$.fragment),Ie(n,"aria-label","breadcrumb"),Ie(e,"slot","top"),sr(e,"display","flex"),sr(e,"justify-content","space-between")},m(A,R){xe(A,e,R),oe(e,n),oe(n,r),oe(r,i),Ue(s,i,null),oe(r,c),oe(r,l),oe(e,d),oe(e,v),oe(v,S),oe(S,E),Ue(C,E,null),M=!0},p(A,R){const z={};R&8388608&&(z.$$scope={dirty:R,ctx:A}),s.$set(z);const U={};R&8388608&&(U.$$scope={dirty:R,ctx:A}),C.$set(U)},i(A){M||(ue(s.$$.fragment,A),ue(C.$$.fragment,A),M=!0)},o(A){ye(s.$$.fragment,A),ye(C.$$.fragment,A),M=!1},d(A){A&&be(e),je(s),je(C)}}}function X6(t){let e;return{c(){e=ot("Draw a new boundary")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function Y6(t){let e;return{c(){e=ot("Use an auto-generated boundary")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function $6(t){let e=t[20]+"",n;return{c(){n=ot(e)},m(r,i){xe(r,n,i)},p(r,i){i&2&&e!==(e=r[20]+"")&&cr(n,e)},d(r){r&&be(n)}}}function hE(t){let e,n,r,i,s,c,l,d,v,S,E,C,M,A,R;function z(){return t[14](t[20])}r=new or({props:{$$slots:{default:[$6]},$$scope:{ctx:t}}}),r.$on("click",z);function U(){return t[15](t[20])}function F(){return t[16](t[20])}return{c(){e=_e("li"),n=_e("span"),Ge(r.$$.fragment),i=We(),s=_e("button"),c=_e("img"),d=We(),v=_e("button"),S=_e("img"),C=We(),Wn(c.src,l=t[4]?Y_:$_)||Ie(c,"src",l),Ie(c,"alt","Rename neighbourhood"),Ie(s,"class","secondary"),Wn(S.src,E=t[4]?Z_:X_)||Ie(S,"src",E),Ie(S,"alt","Delete neighbourhood"),Ie(v,"class","secondary"),sr(n,"display","flex"),sr(n,"justify-content","space-between")},m(G,H){xe(G,e,H),oe(e,n),Ue(r,n,null),oe(n,i),oe(n,s),oe(s,c),oe(n,d),oe(n,v),oe(v,S),oe(e,C),M=!0,A||(R=[Lt(s,"click",U),Lt(v,"click",F)],A=!0)},p(G,H){t=G;const te={};H&8388610&&(te.$$scope={dirty:H,ctx:t}),r.$set(te),(!M||H&16&&!Wn(c.src,l=t[4]?Y_:$_))&&Ie(c,"src",l),(!M||H&16&&!Wn(S.src,E=t[4]?Z_:X_))&&Ie(S,"src",E)},i(G){M||(ue(r.$$.fragment,G),M=!0)},o(G){ye(r.$$.fragment,G),M=!1},d(G){G&&be(e),je(r),A=!1,Hr(R)}}}function K6(t){let e,n,r,i,s,c,l,d,v,S,E,C,M,A,R,z,U,F,G,H,te,ee,fe;s=new or({props:{$$slots:{default:[X6]},$$scope:{ctx:t}}}),s.$on("click",t[8]),d=new or({props:{$$slots:{default:[Y6]},$$scope:{ctx:t}}}),d.$on("click",t[13]);let pe=bs(t[1]),se=[];for(let Y=0;Yye(se[Y],1,1,()=>{se[Y]=null});return{c(){e=_e("div"),n=_e("details"),n.innerHTML=`Help

Inside the neighbourhood you define, the goal is to eliminate (or deliberately permit) through-traffic. An appropriate neighbourhood boundary depends on many factors. The simplest approach is to find the area bounded on all sides by "main" roads, which are designed for higher traffic volumes. There are many other considerations, though -- maybe severances like rivers or rail should be part of a boundary. Bridges and tunnels near a boundary may be confusing as well. And note that your - boundary may not match the conventional definition of "neighbourhood."

`,r=We(),i=_e("div"),Ge(s.$$.fragment),c=We(),l=_e("div"),Ge(d.$$.fragment),v=We(),S=_e("ul");for(let Y=0;Y({19:r}),({props:r})=>r?524288:0]},$$scope:{ctx:t}}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,i){const s={};i&8912896&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function eB(t){let e,n;const r=[gi("neighbourhood-boundaries"),{filter:["==",["get","kind"],"boundary"]},{paint:{"fill-color":"red","fill-opacity":Nf(.3,.5)}},{eventsIfTopMost:!0},{manageHoverState:!0},{hoverCursor:"pointer"}];let i={$$slots:{default:[Q6]},$$scope:{ctx:t}};for(let s=0;sn(11,s=ee)),mt(t,Ku,ee=>n(2,c=ee)),mt(t,xn,ee=>n(3,l=ee)),mt(t,Jd,ee=>n(4,d=ee));function v(ee){s.setCurrentNeighbourhood(ee),Ft(xn,l={mode:"neighbourhood"},l)}function S(ee){window.confirm(`Really delete neighbourhood ${ee}? You can't undo this.`)&&(s.deleteNeighbourhoodBoundary(ee),Rf(),n(0,r=JSON.parse(s.toSavefile())))}function E(ee){let fe=window.prompt(`Rename neighbourhood ${ee} to what?`,ee);fe&&(s.renameNeighbourhoodBoundary(ee,fe),Rf(),n(0,r=JSON.parse(s.toSavefile())))}function C(){let ee=window.prompt("What do you want to name the neighbourhood?");ee&&Ft(xn,l={mode:"set-boundary",name:ee,existing:null},l)}function M(){p_(c+".geojson",s.toSavefile())}function A(){p_("debug_route_snapper.geojson",s.toRouteSnapperGj())}const R=ee=>v(Rr(ee.detail.features[0].properties).name),z=()=>Ft(xn,l={mode:"auto-boundaries"},l),U=ee=>v(ee),F=ee=>E(ee),G=ee=>S(ee),H=()=>Ft(xn,l={mode:"title"},l),te=()=>Ft(xn,l={mode:"route",prevMode:"network"},l);return t.$$.update=()=>{t.$$.dirty&2048&&n(0,r=JSON.parse(s.toSavefile())),t.$$.dirty&1&&n(1,i=r.features.filter(ee=>ee.properties.kind=="boundary").map(ee=>ee.properties.name))},[r,i,c,l,d,v,S,E,C,M,A,s,R,z,U,F,G,H,te]}class iB extends Yt{constructor(e){super(),Xt(this,e,rB,nB,Ut,{})}}function oB(t){let e;return{c(){e=st("Choose project")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function sB(t){let e;return{c(){e=st("Pick neighbourhood")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function cE(t){let e,n,r;return n=new or({props:{$$slots:{default:[aB]},$$scope:{ctx:t}}}),n.$on("click",t[13]),{c(){e=_e("li"),Ge(n.$$.fragment)},m(i,s){xe(i,e,s),Ue(n,e,null),r=!0},p(i,s){const c={};s&16384&&(c.$$scope={dirty:s,ctx:i}),n.$set(c)},i(i){r||(ue(n.$$.fragment,i),r=!0)},o(i){ye(n.$$.fragment,i),r=!1},d(i){i&&be(e),je(n)}}}function aB(t){let e;return{c(){e=st("Editing")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function lB(t){let e,n,r,i,s,c,l,d,v,S,E,C;s=new or({props:{$$slots:{default:[oB]},$$scope:{ctx:t}}}),s.$on("click",t[11]),d=new or({props:{$$slots:{default:[sB]},$$scope:{ctx:t}}}),d.$on("click",t[12]);let M=t[0]=="neighbourhood"&&cE(t);return{c(){e=_e("div"),n=_e("nav"),r=_e("ul"),i=_e("li"),Ge(s.$$.fragment),c=We(),l=_e("li"),Ge(d.$$.fragment),v=We(),M&&M.c(),S=We(),E=_e("li"),E.textContent="Routing",Ie(n,"aria-label","breadcrumb"),Ie(e,"slot","top")},m(A,R){xe(A,e,R),oe(e,n),oe(n,r),oe(r,i),Ue(s,i,null),oe(r,c),oe(r,l),Ue(d,l,null),oe(r,v),M&&M.m(r,null),oe(r,S),oe(r,E),C=!0},p(A,R){const z={};R&16384&&(z.$$scope={dirty:R,ctx:A}),s.$set(z);const U={};R&16384&&(U.$$scope={dirty:R,ctx:A}),d.$set(U),A[0]=="neighbourhood"?M?(M.p(A,R),R&1&&ue(M,1)):(M=cE(A),M.c(),ue(M,1),M.m(r,S)):M&&(Un(),ye(M,1,1,()=>{M=null}),jn())},i(A){C||(ue(s.$$.fragment,A),ue(d.$$.fragment,A),ue(M),C=!0)},o(A){ye(s.$$.fragment,A),ye(d.$$.fragment,A),ye(M),C=!1},d(A){A&&be(e),je(s),je(d),M&&M.d()}}}function uB(t){let e,n,r,i,s,c,l,d,v,S,E,C,M,A,R,z,U;return n=new Iy({}),n.$on("click",t[7]),{c(){e=_e("div"),Ge(n.$$.fragment),r=We(),i=_e("p"),i.textContent="Drag markers for a route",s=We(),c=_e("p"),c.innerHTML=`Route before + boundary may not match the conventional definition of "neighbourhood."

`,r=We(),i=_e("div"),Ge(s.$$.fragment),c=We(),l=_e("div"),Ge(d.$$.fragment),v=We(),S=_e("ul");for(let Y=0;Y({19:r}),({props:r})=>r?524288:0]},$$scope:{ctx:t}}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,i){const s={};i&8912896&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function eB(t){let e,n;const r=[gi("neighbourhood-boundaries"),{filter:["==",["get","kind"],"boundary"]},{paint:{"fill-color":"red","fill-opacity":Nf(.3,.5)}},{eventsIfTopMost:!0},{manageHoverState:!0},{hoverCursor:"pointer"}];let i={$$slots:{default:[Q6]},$$scope:{ctx:t}};for(let s=0;sn(11,s=ee)),mt(t,Ju,ee=>n(2,c=ee)),mt(t,xn,ee=>n(3,l=ee)),mt(t,Jd,ee=>n(4,d=ee));function v(ee){s.setCurrentNeighbourhood(ee),Ft(xn,l={mode:"neighbourhood"},l)}function S(ee){window.confirm(`Really delete neighbourhood ${ee}? You can't undo this.`)&&(s.deleteNeighbourhoodBoundary(ee),Rf(),n(0,r=JSON.parse(s.toSavefile())))}function E(ee){let fe=window.prompt(`Rename neighbourhood ${ee} to what?`,ee);fe&&(s.renameNeighbourhoodBoundary(ee,fe),Rf(),n(0,r=JSON.parse(s.toSavefile())))}function C(){let ee=window.prompt("What do you want to name the neighbourhood?");ee&&Ft(xn,l={mode:"set-boundary",name:ee,existing:null},l)}function M(){p_(c+".geojson",s.toSavefile())}function A(){p_("debug_route_snapper.geojson",s.toRouteSnapperGj())}const R=ee=>v(Rr(ee.detail.features[0].properties).name),z=()=>Ft(xn,l={mode:"auto-boundaries"},l),U=ee=>v(ee),F=ee=>E(ee),G=ee=>S(ee),H=()=>Ft(xn,l={mode:"title"},l),te=()=>Ft(xn,l={mode:"route",prevMode:"network"},l);return t.$$.update=()=>{t.$$.dirty&2048&&n(0,r=JSON.parse(s.toSavefile())),t.$$.dirty&1&&n(1,i=r.features.filter(ee=>ee.properties.kind=="boundary").map(ee=>ee.properties.name))},[r,i,c,l,d,v,S,E,C,M,A,s,R,z,U,F,G,H,te]}class iB extends Yt{constructor(e){super(),Xt(this,e,rB,nB,Ut,{})}}function oB(t){let e;return{c(){e=ot("Choose project")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function sB(t){let e;return{c(){e=ot("Pick neighbourhood")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function fE(t){let e,n,r;return n=new or({props:{$$slots:{default:[aB]},$$scope:{ctx:t}}}),n.$on("click",t[13]),{c(){e=_e("li"),Ge(n.$$.fragment)},m(i,s){xe(i,e,s),Ue(n,e,null),r=!0},p(i,s){const c={};s&16384&&(c.$$scope={dirty:s,ctx:i}),n.$set(c)},i(i){r||(ue(n.$$.fragment,i),r=!0)},o(i){ye(n.$$.fragment,i),r=!1},d(i){i&&be(e),je(n)}}}function aB(t){let e;return{c(){e=ot("Editing")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function lB(t){let e,n,r,i,s,c,l,d,v,S,E,C;s=new or({props:{$$slots:{default:[oB]},$$scope:{ctx:t}}}),s.$on("click",t[11]),d=new or({props:{$$slots:{default:[sB]},$$scope:{ctx:t}}}),d.$on("click",t[12]);let M=t[0]=="neighbourhood"&&fE(t);return{c(){e=_e("div"),n=_e("nav"),r=_e("ul"),i=_e("li"),Ge(s.$$.fragment),c=We(),l=_e("li"),Ge(d.$$.fragment),v=We(),M&&M.c(),S=We(),E=_e("li"),E.textContent="Routing",Ie(n,"aria-label","breadcrumb"),Ie(e,"slot","top")},m(A,R){xe(A,e,R),oe(e,n),oe(n,r),oe(r,i),Ue(s,i,null),oe(r,c),oe(r,l),Ue(d,l,null),oe(r,v),M&&M.m(r,null),oe(r,S),oe(r,E),C=!0},p(A,R){const z={};R&16384&&(z.$$scope={dirty:R,ctx:A}),s.$set(z);const U={};R&16384&&(U.$$scope={dirty:R,ctx:A}),d.$set(U),A[0]=="neighbourhood"?M?(M.p(A,R),R&1&&ue(M,1)):(M=fE(A),M.c(),ue(M,1),M.m(r,S)):M&&(Un(),ye(M,1,1,()=>{M=null}),jn())},i(A){C||(ue(s.$$.fragment,A),ue(d.$$.fragment,A),ue(M),C=!0)},o(A){ye(s.$$.fragment,A),ye(d.$$.fragment,A),ye(M),C=!1},d(A){A&&be(e),je(s),je(d),M&&M.d()}}}function uB(t){let e,n,r,i,s,c,l,d,v,S,E,C,M,A,R,z,U;return n=new Cy({}),n.$on("click",t[7]),{c(){e=_e("div"),Ge(n.$$.fragment),r=We(),i=_e("p"),i.textContent="Drag markers for a route",s=We(),c=_e("p"),c.innerHTML=`Route before , - route after`,l=We(),d=_e("label"),v=st("Slow-down factor for main roads: "),S=st(t[1]),E=We(),C=_e("input"),M=We(),A=_e("i"),A.textContent=`Increase to see how drivers may detour in heavy traffic. 1 means - free-flow.`,Ie(C,"type","range"),Ie(C,"min","1.0"),Ie(C,"max","5.0"),Ie(C,"step","0.1"),Ie(e,"slot","sidebar")},m(F,G){xe(F,e,G),Ue(n,e,null),oe(e,r),oe(e,i),oe(e,s),oe(e,c),oe(e,l),oe(e,d),oe(d,v),oe(d,S),oe(d,E),oe(d,C),es(C,t[1]),oe(e,M),oe(e,A),R=!0,z||(U=[Lt(C,"change",t[10]),Lt(C,"input",t[10])],z=!0)},p(F,G){(!R||G&2)&&hr(S,F[1]),G&2&&es(C,F[1])},i(F){R||(ue(n.$$.fragment,F),R=!0)},o(F){ye(n.$$.fragment,F),R=!1},d(F){F&&be(e),je(n),z=!1,Kr(U)}}}function hE(t){let e,n;return e=new Cy({props:{gjInput:JSON.parse(Rr(t[4]).renderNeighbourhood()),interactive:!1}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,i){const s={};i&16&&(s.gjInput=JSON.parse(Rr(r[4]).renderNeighbourhood())),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function cB(t){let e,n;const r=[gi("compare-route"),{paint:{"line-width":10,"line-color":Od(["get","kind"],{before:"red",after:"blue"},"red")}}];let i={};for(let s=0;sIl(l,"lngLat",A));function z(F){t[9](F)}let U={draggable:!0,$$slots:{default:[fB]},$$scope:{ctx:t}};return t[2]!==void 0&&(U.lngLat=t[2]),S=new B2({props:U}),ai.push(()=>Il(S,"lngLat",z)),{c(){e=_e("div"),M&&M.c(),n=We(),Ge(r.$$.fragment),i=We(),Ge(s.$$.fragment),c=We(),Ge(l.$$.fragment),v=We(),Ge(S.$$.fragment),Ie(e,"slot","map")},m(F,G){xe(F,e,G),M&&M.m(e,null),oe(e,n),Ue(r,e,null),oe(e,i),Ue(s,e,null),oe(e,c),Ue(l,e,null),oe(e,v),Ue(S,e,null),C=!0},p(F,G){F[0]=="neighbourhood"?M?(M.p(F,G),G&1&&ue(M,1)):(M=hE(F),M.c(),ue(M,1),M.m(e,n)):M&&(Un(),ye(M,1,1,()=>{M=null}),jn());const H={};G&32&&(H.data=F[5]),G&16384&&(H.$$scope={dirty:G,ctx:F}),s.$set(H);const te={};G&16384&&(te.$$scope={dirty:G,ctx:F}),!d&&G&8&&(d=!0,te.lngLat=F[3],El(()=>d=!1)),l.$set(te);const ee={};G&16384&&(ee.$$scope={dirty:G,ctx:F}),!E&&G&4&&(E=!0,ee.lngLat=F[2],El(()=>E=!1)),S.$set(ee)},i(F){C||(ue(M),ue(r.$$.fragment,F),ue(s.$$.fragment,F),ue(l.$$.fragment,F),ue(S.$$.fragment,F),C=!0)},o(F){ye(M),ye(r.$$.fragment,F),ye(s.$$.fragment,F),ye(l.$$.fragment,F),ye(S.$$.fragment,F),C=!1},d(F){F&&be(e),M&&M.d(),je(r),je(s),je(l),je(S)}}}function dB(t){let e,n;return e=new bu({props:{$$slots:{map:[pB],sidebar:[uB],top:[lB]},$$scope:{ctx:t}}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,[i]){const s={};i&16511&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function mB(t,e,n){let r,i,s,c,l,d;mt(t,xn,U=>n(6,i=U)),mt(t,S2,U=>n(1,s=U)),mt(t,jv,U=>n(2,c=U)),mt(t,Uv,U=>n(3,l=U)),mt(t,ji,U=>n(4,d=U));let{prevMode:v}=e;function S(){Ft(xn,i={mode:v},i)}function E(U){l=U,Uv.set(l)}function C(U){c=U,jv.set(c)}function M(){s=VP(this.value),S2.set(s)}const A=()=>Ft(xn,i={mode:"title"},i),R=()=>Ft(xn,i={mode:"network"},i),z=()=>Ft(xn,i={mode:"neighbourhood"},i);return t.$$set=U=>{"prevMode"in U&&n(0,v=U.prevMode)},t.$$.update=()=>{t.$$.dirty&30&&n(5,r=JSON.parse(d.compareRoute(l.lng,l.lat,c.lng,c.lat,s)))},[v,s,c,l,d,r,i,S,E,C,M,A,R,z]}class gB extends Yt{constructor(e){super(),Xt(this,e,mB,dB,Ut,{prevMode:0})}}const fE="/ltn/assets/settings_light-342fb430.svg",pE="/ltn/assets/settings_dark-088e95f1.svg";function dE(t){let e,n;return e=new m1({props:{$$slots:{default:[_B]},$$scope:{ctx:t}}}),e.$on("close",t[5]),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,i){const s={};i&67&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function _B(t){let e,n,r,i,s,c,l,d,v,S,E,C,M;return r=new kz({}),{c(){e=_e("h1"),e.textContent="Settings",n=We(),Ge(r.$$.fragment),i=We(),s=_e("label"),c=_e("input"),l=st(` - Light mode`),d=We(),v=_e("center"),S=_e("button"),S.textContent="Confirm",Ie(c,"type","checkbox"),Ie(c,"role","switch")},m(A,R){xe(A,e,R),xe(A,n,R),Ue(r,A,R),xe(A,i,R),xe(A,s,R),oe(s,c),c.checked=t[0],oe(s,l),xe(A,d,R),xe(A,v,R),oe(v,S),E=!0,C||(M=[Lt(c,"change",t[3]),Lt(S,"click",t[4])],C=!0)},p(A,R){R&1&&(c.checked=A[0])},i(A){E||(ue(r.$$.fragment,A),E=!0)},o(A){ye(r.$$.fragment,A),E=!1},d(A){A&&(be(e),be(n),be(i),be(s),be(d),be(v)),je(r,A),C=!1,Kr(M)}}}function yB(t){let e,n,r,i,s,c,l,d,v=t[1]&&dE(t);return{c(){e=_e("button"),n=_e("img"),i=We(),v&&v.c(),s=Hi(),Wn(n.src,r=t[0]?fE:pE)||Ie(n,"src",r),Ie(n,"alt","Settings"),Ie(e,"class","outline")},m(S,E){xe(S,e,E),oe(e,n),xe(S,i,E),v&&v.m(S,E),xe(S,s,E),c=!0,l||(d=Lt(e,"click",t[2]),l=!0)},p(S,[E]){(!c||E&1&&!Wn(n.src,r=S[0]?fE:pE))&&Ie(n,"src",r),S[1]?v?(v.p(S,E),E&2&&ue(v,1)):(v=dE(S),v.c(),ue(v,1),v.m(s.parentNode,s)):v&&(Un(),ye(v,1,1,()=>{v=null}),jn())},i(S){c||(ue(v),c=!0)},o(S){ye(v),c=!1},d(S){S&&(be(e),be(i),be(s)),v&&v.d(S),l=!1,d()}}}function vB(t,e,n){let r;mt(t,Jd,v=>n(0,r=v));let i=!1;const s=()=>n(1,i=!0);function c(){r=this.checked,Jd.set(r)}const l=()=>n(1,i=!1),d=()=>n(1,i=!1);return t.$$.update=()=>{t.$$.dirty&1&&document.documentElement.setAttribute("data-theme",r?"light":"dark")},[r,i,s,c,l,d]}class bB extends Yt{constructor(e){super(),Xt(this,e,vB,yB,Ut,{})}}const NT=Nn({type:"FeatureCollection",features:[]}),xB=Nn(!0),OT=Nn(0),K_=Nn(!1),J_=Nn({type:"FeatureCollection",features:[]});function wB(t){let e,n,r,i,s,c;const l=[gi("route-points"),{filter:yz},{paint:{"circle-color":Od(["get","type"],{"snapped-waypoint":"red","free-waypoint":"blue"},"black"),"circle-opacity":["case",["has","hovered"],.5,1],"circle-radius":Od(["get","type"],{node:Xg/2},Xg)}}];let d={};for(let M=0;Mn(0,r=c)),mt(t,J_,c=>n(1,i=c)),mt(t,K_,c=>n(2,s=c)),[r,i,s]}class CB extends Yt{constructor(e){super(),Xt(this,e,IB,EB,Ut,{})}}function TB(t){let e,n,r;return{c(){e=st("Undo ("),n=st(t[2]),r=st(")")},m(i,s){xe(i,e,s),xe(i,n,s),xe(i,r,s)},p(i,s){s&4&&hr(n,i[2])},d(i){i&&(be(e),be(n),be(r))}}}function LB(t){let e;return{c(){e=st("Undo")},m(n,r){xe(n,e,r)},p:Pt,d(n){n&&be(e)}}}function PB(t){let e,n,r,i,s,c,l,d,v,S;function E(A,R){return A[2]==0?LB:TB}let C=E(t),M=C(t);return{c(){e=_e("button"),M.c(),r=We(),i=_e("label"),s=_e("input"),c=st(` + route after`,l=We(),d=_e("label"),v=ot("Slow-down factor for main roads: "),S=ot(t[1]),E=We(),C=_e("input"),M=We(),A=_e("i"),A.textContent=`Increase to see how drivers may detour in heavy traffic. 1 means + free-flow.`,Ie(C,"type","range"),Ie(C,"min","1.0"),Ie(C,"max","5.0"),Ie(C,"step","0.1"),Ie(e,"slot","sidebar")},m(F,G){xe(F,e,G),Ue(n,e,null),oe(e,r),oe(e,i),oe(e,s),oe(e,c),oe(e,l),oe(e,d),oe(d,v),oe(d,S),oe(d,E),oe(d,C),vo(C,t[1]),oe(e,M),oe(e,A),R=!0,z||(U=[Lt(C,"change",t[10]),Lt(C,"input",t[10])],z=!0)},p(F,G){(!R||G&2)&&cr(S,F[1]),G&2&&vo(C,F[1])},i(F){R||(ue(n.$$.fragment,F),R=!0)},o(F){ye(n.$$.fragment,F),R=!1},d(F){F&&be(e),je(n),z=!1,Hr(U)}}}function pE(t){let e,n;return e=new Ty({props:{gjInput:JSON.parse(Rr(t[4]).renderNeighbourhood()),interactive:!1}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,i){const s={};i&16&&(s.gjInput=JSON.parse(Rr(r[4]).renderNeighbourhood())),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function cB(t){let e,n;const r=[gi("compare-route"),{paint:{"line-width":10,"line-color":Od(["get","kind"],{before:"red",after:"blue"},"red")}}];let i={};for(let s=0;sIl(l,"lngLat",A));function z(F){t[9](F)}let U={draggable:!0,$$slots:{default:[fB]},$$scope:{ctx:t}};return t[2]!==void 0&&(U.lngLat=t[2]),S=new U2({props:U}),ai.push(()=>Il(S,"lngLat",z)),{c(){e=_e("div"),M&&M.c(),n=We(),Ge(r.$$.fragment),i=We(),Ge(s.$$.fragment),c=We(),Ge(l.$$.fragment),v=We(),Ge(S.$$.fragment),Ie(e,"slot","map")},m(F,G){xe(F,e,G),M&&M.m(e,null),oe(e,n),Ue(r,e,null),oe(e,i),Ue(s,e,null),oe(e,c),Ue(l,e,null),oe(e,v),Ue(S,e,null),C=!0},p(F,G){F[0]=="neighbourhood"?M?(M.p(F,G),G&1&&ue(M,1)):(M=pE(F),M.c(),ue(M,1),M.m(e,n)):M&&(Un(),ye(M,1,1,()=>{M=null}),jn());const H={};G&32&&(H.data=F[5]),G&16384&&(H.$$scope={dirty:G,ctx:F}),s.$set(H);const te={};G&16384&&(te.$$scope={dirty:G,ctx:F}),!d&&G&8&&(d=!0,te.lngLat=F[3],El(()=>d=!1)),l.$set(te);const ee={};G&16384&&(ee.$$scope={dirty:G,ctx:F}),!E&&G&4&&(E=!0,ee.lngLat=F[2],El(()=>E=!1)),S.$set(ee)},i(F){C||(ue(M),ue(r.$$.fragment,F),ue(s.$$.fragment,F),ue(l.$$.fragment,F),ue(S.$$.fragment,F),C=!0)},o(F){ye(M),ye(r.$$.fragment,F),ye(s.$$.fragment,F),ye(l.$$.fragment,F),ye(S.$$.fragment,F),C=!1},d(F){F&&be(e),M&&M.d(),je(r),je(s),je(l),je(S)}}}function dB(t){let e,n;return e=new bu({props:{$$slots:{map:[pB],sidebar:[uB],top:[lB]},$$scope:{ctx:t}}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,[i]){const s={};i&16511&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function mB(t,e,n){let r,i,s,c,l,d;mt(t,xn,U=>n(6,i=U)),mt(t,I2,U=>n(1,s=U)),mt(t,Gv,U=>n(2,c=U)),mt(t,jv,U=>n(3,l=U)),mt(t,ji,U=>n(4,d=U));let{prevMode:v}=e;function S(){Ft(xn,i={mode:v},i)}function E(U){l=U,jv.set(l)}function C(U){c=U,Gv.set(c)}function M(){s=m1(this.value),I2.set(s)}const A=()=>Ft(xn,i={mode:"title"},i),R=()=>Ft(xn,i={mode:"network"},i),z=()=>Ft(xn,i={mode:"neighbourhood"},i);return t.$$set=U=>{"prevMode"in U&&n(0,v=U.prevMode)},t.$$.update=()=>{t.$$.dirty&30&&n(5,r=JSON.parse(d.compareRoute(l.lng,l.lat,c.lng,c.lat,s)))},[v,s,c,l,d,r,i,S,E,C,M,A,R,z]}class gB extends Yt{constructor(e){super(),Xt(this,e,mB,dB,Ut,{prevMode:0})}}const dE="/ltn/assets/settings_light-342fb430.svg",mE="/ltn/assets/settings_dark-088e95f1.svg";function gE(t){let e,n;return e=new _1({props:{$$slots:{default:[_B]},$$scope:{ctx:t}}}),e.$on("close",t[5]),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,i){const s={};i&67&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function _B(t){let e,n,r,i,s,c,l,d,v,S,E,C,M;return r=new kz({}),{c(){e=_e("h1"),e.textContent="Settings",n=We(),Ge(r.$$.fragment),i=We(),s=_e("label"),c=_e("input"),l=ot(` + Light mode`),d=We(),v=_e("center"),S=_e("button"),S.textContent="Confirm",Ie(c,"type","checkbox"),Ie(c,"role","switch")},m(A,R){xe(A,e,R),xe(A,n,R),Ue(r,A,R),xe(A,i,R),xe(A,s,R),oe(s,c),c.checked=t[0],oe(s,l),xe(A,d,R),xe(A,v,R),oe(v,S),E=!0,C||(M=[Lt(c,"change",t[3]),Lt(S,"click",t[4])],C=!0)},p(A,R){R&1&&(c.checked=A[0])},i(A){E||(ue(r.$$.fragment,A),E=!0)},o(A){ye(r.$$.fragment,A),E=!1},d(A){A&&(be(e),be(n),be(i),be(s),be(d),be(v)),je(r,A),C=!1,Hr(M)}}}function yB(t){let e,n,r,i,s,c,l,d,v=t[1]&&gE(t);return{c(){e=_e("button"),n=_e("img"),i=We(),v&&v.c(),s=Hi(),Wn(n.src,r=t[0]?dE:mE)||Ie(n,"src",r),Ie(n,"alt","Settings"),Ie(e,"class","outline")},m(S,E){xe(S,e,E),oe(e,n),xe(S,i,E),v&&v.m(S,E),xe(S,s,E),c=!0,l||(d=Lt(e,"click",t[2]),l=!0)},p(S,[E]){(!c||E&1&&!Wn(n.src,r=S[0]?dE:mE))&&Ie(n,"src",r),S[1]?v?(v.p(S,E),E&2&&ue(v,1)):(v=gE(S),v.c(),ue(v,1),v.m(s.parentNode,s)):v&&(Un(),ye(v,1,1,()=>{v=null}),jn())},i(S){c||(ue(v),c=!0)},o(S){ye(v),c=!1},d(S){S&&(be(e),be(i),be(s)),v&&v.d(S),l=!1,d()}}}function vB(t,e,n){let r;mt(t,Jd,v=>n(0,r=v));let i=!1;const s=()=>n(1,i=!0);function c(){r=this.checked,Jd.set(r)}const l=()=>n(1,i=!1),d=()=>n(1,i=!1);return t.$$.update=()=>{t.$$.dirty&1&&document.documentElement.setAttribute("data-theme",r?"light":"dark")},[r,i,s,c,l,d]}class bB extends Yt{constructor(e){super(),Xt(this,e,vB,yB,Ut,{})}}const zT=Nn({type:"FeatureCollection",features:[]}),xB=Nn(!0),FT=Nn(0),K_=Nn(!1),J_=Nn({type:"FeatureCollection",features:[]});function wB(t){let e,n,r,i,s,c;const l=[gi("route-points"),{filter:yz},{paint:{"circle-color":Od(["get","type"],{"snapped-waypoint":"red","free-waypoint":"blue"},"black"),"circle-opacity":["case",["has","hovered"],.5,1],"circle-radius":Od(["get","type"],{node:Xg/2},Xg)}}];let d={};for(let M=0;Mn(0,r=c)),mt(t,J_,c=>n(1,i=c)),mt(t,K_,c=>n(2,s=c)),[r,i,s]}class CB extends Yt{constructor(e){super(),Xt(this,e,IB,EB,Ut,{})}}function TB(t){let e,n,r;return{c(){e=ot("Undo ("),n=ot(t[2]),r=ot(")")},m(i,s){xe(i,e,s),xe(i,n,s),xe(i,r,s)},p(i,s){s&4&&cr(n,i[2])},d(i){i&&(be(e),be(n),be(r))}}}function LB(t){let e;return{c(){e=ot("Undo")},m(n,r){xe(n,e,r)},p:Pt,d(n){n&&be(e)}}}function PB(t){let e,n,r,i,s,c,l,d,v,S;function E(A,R){return A[2]==0?LB:TB}let C=E(t),M=C(t);return{c(){e=_e("button"),M.c(),r=We(),i=_e("label"),s=_e("input"),c=ot(` Show all snappable points`),l=We(),d=_e("ul"),d.innerHTML=`
  • Click the map to add points
  • Click and drag any point to move it
  • Click @@ -647,9 +647,10 @@ and limitations under the License. or double click to finish
  • Press Escape - to cancel
  • `,e.disabled=n=t[2]==0,Ie(e,"data-tooltip","Ctrl+Z"),Ie(s,"type","checkbox")},m(A,R){xe(A,e,R),M.m(e,null),xe(A,r,R),xe(A,i,R),oe(i,s),s.checked=t[1],oe(i,c),xe(A,l,R),xe(A,d,R),v||(S=[Lt(e,"click",t[3]),Lt(s,"change",t[4])],v=!0)},p(A,[R]){C===(C=E(A))&&M?M.p(A,R):(M.d(1),M=C(A),M&&(M.c(),M.m(e,null))),R&4&&n!==(n=A[2]==0)&&(e.disabled=n),R&2&&(s.checked=A[1])},i:Pt,o:Pt,d(A){A&&(be(e),be(r),be(i),be(l),be(d)),M.d(),v=!1,Kr(S)}}}function MB(t,e,n){let r,i,s;mt(t,K_,S=>n(1,r=S)),mt(t,J_,S=>n(5,i=S)),mt(t,OT,S=>n(2,s=S));let{route_tool:c}=e;function l(S){S&&i.features.length==0&&Ft(J_,i=JSON.parse(c.inner.debugSnappableNodes()),i)}const d=()=>c.undo();function v(){r=this.checked,K_.set(r)}return t.$$set=S=>{"route_tool"in S&&n(0,c=S.route_tool)},t.$$.update=()=>{t.$$.dirty&2&&l(r)},[c,r,s,d,v]}class AB extends Yt{constructor(e){super(),Xt(this,e,MB,PB,Ut,{route_tool:0})}}function kB(t){let e;return{c(){e=st("Choose project")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function DB(t){let e;return{c(){e=st("Pick neighbourhood")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function RB(t){let e;return{c(){e=_e("li"),e.textContent="Creating new neighbourhood boundary"},m(n,r){xe(n,e,r)},p:Pt,i:Pt,o:Pt,d(n){n&&be(e)}}}function NB(t){let e,n,r,i,s;return n=new or({props:{$$slots:{default:[OB]},$$scope:{ctx:t}}}),n.$on("click",t[8]),{c(){e=_e("li"),Ge(n.$$.fragment),r=We(),i=_e("li"),i.textContent="Changing neighbourhood boundary"},m(c,l){xe(c,e,l),Ue(n,e,null),xe(c,r,l),xe(c,i,l),s=!0},p(c,l){const d={};l&1024&&(d.$$scope={dirty:l,ctx:c}),n.$set(d)},i(c){s||(ue(n.$$.fragment,c),s=!0)},o(c){ye(n.$$.fragment,c),s=!1},d(c){c&&(be(e),be(r),be(i)),je(n)}}}function OB(t){let e;return{c(){e=st("Editing")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function zB(t){let e,n,r,i,s,c,l,d,v,S,E,C;s=new or({props:{$$slots:{default:[kB]},$$scope:{ctx:t}}}),s.$on("click",t[6]),d=new or({props:{$$slots:{default:[DB]},$$scope:{ctx:t}}}),d.$on("click",t[7]);const M=[NB,RB],A=[];function R(z,U){return z[1]?0:1}return S=R(t),E=A[S]=M[S](t),{c(){e=_e("div"),n=_e("nav"),r=_e("ul"),i=_e("li"),Ge(s.$$.fragment),c=We(),l=_e("li"),Ge(d.$$.fragment),v=We(),E.c(),Ie(n,"aria-label","breadcrumb"),Ie(e,"slot","top")},m(z,U){xe(z,e,U),oe(e,n),oe(n,r),oe(r,i),Ue(s,i,null),oe(r,c),oe(r,l),Ue(d,l,null),oe(r,v),A[S].m(r,null),C=!0},p(z,U){const F={};U&1024&&(F.$$scope={dirty:U,ctx:z}),s.$set(F);const G={};U&1024&&(G.$$scope={dirty:U,ctx:z}),d.$set(G);let H=S;S=R(z),S===H?A[S].p(z,U):(Un(),ye(A[H],1,1,()=>{A[H]=null}),jn(),E=A[S],E?E.p(z,U):(E=A[S]=M[S](z),E.c()),ue(E,1),E.m(r,null))},i(z){C||(ue(s.$$.fragment,z),ue(d.$$.fragment,z),ue(E),C=!0)},o(z){ye(s.$$.fragment,z),ye(d.$$.fragment,z),ye(E),C=!1},d(z){z&&be(e),je(s),je(d),A[S].d()}}}function FB(t){let e;return{c(){e=st("Finish")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function BB(t){let e;return{c(){e=st("Cancel")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function VB(t){let e,n,r,i,s,c,l,d,v,S,E,C,M,A;return l=new or({props:{$$slots:{default:[FB]},$$scope:{ctx:t}}}),l.$on("click",t[5]),v=new or({props:{$$slots:{default:[BB]},$$scope:{ctx:t}}}),v.$on("click",t[4]),M=new AB({props:{route_tool:Rr(t[2])}}),{c(){e=_e("div"),n=_e("h1"),r=st("Draw your neighbourhood boundary for "),i=st(t[0]),s=We(),c=_e("div"),Ge(l.$$.fragment),d=We(),Ge(v.$$.fragment),S=We(),E=_e("p"),E.textContent="TODO: maybe move the instructions from the previous screen to here...",C=We(),Ge(M.$$.fragment),sr(c,"display","flex"),sr(c,"justify-content","space-between"),Ie(e,"slot","sidebar")},m(R,z){xe(R,e,z),oe(e,n),oe(n,r),oe(n,i),oe(e,s),oe(e,c),Ue(l,c,null),oe(c,d),Ue(v,c,null),oe(e,S),oe(e,E),oe(e,C),Ue(M,e,null),A=!0},p(R,z){(!A||z&1)&&hr(i,R[0]);const U={};z&1024&&(U.$$scope={dirty:z,ctx:R}),l.$set(U);const F={};z&1024&&(F.$$scope={dirty:z,ctx:R}),v.$set(F);const G={};z&4&&(G.route_tool=Rr(R[2])),M.$set(G)},i(R){A||(ue(l.$$.fragment,R),ue(v.$$.fragment,R),ue(M.$$.fragment,R),A=!0)},o(R){ye(l.$$.fragment,R),ye(v.$$.fragment,R),ye(M.$$.fragment,R),A=!1},d(R){R&&be(e),je(l),je(v),je(M)}}}function UB(t){let e,n,r;return n=new CB({}),{c(){e=_e("div"),Ge(n.$$.fragment),Ie(e,"slot","map")},m(i,s){xe(i,e,s),Ue(n,e,null),r=!0},p:Pt,i(i){r||(ue(n.$$.fragment,i),r=!0)},o(i){ye(n.$$.fragment,i),r=!1},d(i){i&&be(e),je(n)}}}function jB(t){let e,n;return e=new bu({props:{$$slots:{map:[UB],sidebar:[VB],top:[zB]},$$scope:{ctx:t}}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,[i]){const s={};i&1039&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function GB(t,e,n){let r,i,s;mt(t,D_,M=>n(2,r=M)),mt(t,xn,M=>n(3,i=M)),mt(t,ji,M=>n(9,s=M));let{name:c}=e,{existing:l}=e;l?r.editExistingArea(l):r.startArea(),ro(()=>{r==null||r.clearEventListeners(),r==null||r.stop()});function d(){l?Ft(xn,i={mode:"neighbourhood"},i):Ft(xn,i={mode:"network"},i)}r.addEventListenerSuccess(M=>{try{s.setNeighbourhoodBoundary(c,M),Rf(),s.setCurrentNeighbourhood(c),Ft(xn,i={mode:"neighbourhood"},i)}catch{window.alert("Known georust bug hit, sorry. You may need to just refresh the page now."),d()}}),r.addEventListenerFailure(d);const v=()=>Rr(r).finish(),S=()=>Ft(xn,i={mode:"title"},i),E=()=>Ft(xn,i={mode:"network"},i),C=()=>Ft(xn,i={mode:"neighbourhood"},i);return t.$$set=M=>{"name"in M&&n(0,c=M.name),"existing"in M&&n(1,l=M.existing)},[c,l,r,i,d,v,S,E,C]}class qB extends Yt{constructor(e){super(),Xt(this,e,GB,jB,Ut,{name:0,existing:1})}}function WB(t){let e;return{c(){e=st("Choose project")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function HB(t){let e;return{c(){e=st("Pick neighbourhood")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function ZB(t){let e,n,r,i,s,c,l,d,v,S,E;return s=new or({props:{$$slots:{default:[WB]},$$scope:{ctx:t}}}),s.$on("click",t[5]),d=new or({props:{$$slots:{default:[HB]},$$scope:{ctx:t}}}),d.$on("click",t[6]),{c(){e=_e("div"),n=_e("nav"),r=_e("ul"),i=_e("li"),Ge(s.$$.fragment),c=We(),l=_e("li"),Ge(d.$$.fragment),v=We(),S=_e("li"),S.textContent="Use an auto-generated boundary",Ie(n,"aria-label","breadcrumb"),Ie(e,"slot","top")},m(C,M){xe(C,e,M),oe(e,n),oe(n,r),oe(r,i),Ue(s,i,null),oe(r,c),oe(r,l),Ue(d,l,null),oe(r,v),oe(r,S),E=!0},p(C,M){const A={};M&256&&(A.$$scope={dirty:M,ctx:C}),s.$set(A);const R={};M&256&&(R.$$scope={dirty:M,ctx:C}),d.$set(R)},i(C){E||(ue(s.$$.fragment,C),ue(d.$$.fragment,C),E=!0)},o(C){ye(s.$$.fragment,C),ye(d.$$.fragment,C),E=!1},d(C){C&&be(e),je(s),je(d)}}}function XB(t){let e,n,r,i,s,c,l,d,v;return n=new Iy({}),n.$on("click",t[4]),{c(){e=_e("div"),Ge(n.$$.fragment),r=We(),i=_e("p"),i.textContent=`Click an area to use it as a neighbourhood. These are generated by finding - roads, railways, and water thatform severances. There are many bugs; this - is experimental.`,s=We(),c=_e("button"),c.textContent="Export to GeoJSON",Ie(c,"class","secondary"),Ie(e,"slot","sidebar")},m(S,E){xe(S,e,E),Ue(n,e,null),oe(e,r),oe(e,i),oe(e,s),oe(e,c),l=!0,d||(v=Lt(c,"click",t[3]),d=!0)},p:Pt,i(S){l||(ue(n.$$.fragment,S),l=!0)},o(S){ye(n.$$.fragment,S),l=!1},d(S){S&&be(e),je(n),d=!1,v()}}}function YB(t){let e,n,r,i;const s=[gi("auto-boundaries-areas"),{manageHoverState:!0},{paint:{"fill-color":Nf("cyan","red"),"fill-opacity":.3}},{hoverCursor:"pointer"}];let c={};for(let v=0;vn(0,r=E)),mt(t,ji,E=>n(7,i=E));let s=JSON.parse(i.renderAutoBoundaries());function c(E){let C=window.prompt("What do you want to name the neighbourhood?");if(C)try{let M={type:"Feature",properties:{},geometry:s.features[E.detail.features[0].id].geometry};i.setNeighbourhoodBoundary(C,M),Rf(),i.setCurrentNeighbourhood(C),Ft(xn,r={mode:"neighbourhood"},r)}catch(M){console.log(M),window.alert("Known georust bug hit, sorry. You may need to just refresh the page now.")}}function l(){p_("auto_boundaries.geojson",JSON.stringify(s,null," "))}return[r,s,c,l,()=>Ft(xn,r={mode:"network"},r),()=>Ft(xn,r={mode:"title"},r),()=>Ft(xn,r={mode:"network"},r)]}class QB extends Yt{constructor(e){super(),Xt(this,e,JB,KB,Ut,{})}}const e8=["==",["geometry-type"],"Polygon"],t8=["==",["geometry-type"],"LineString"],n8=["==",["geometry-type"],"Point"];function zT(){return{type:"FeatureCollection",features:[]}}function hv(t){return{type:"Feature",properties:{},geometry:{type:"Point",coordinates:FT(t)}}}function FT(t){return[Math.round(t[0]*1e7)/1e7,Math.round(t[1]*1e7)/1e7]}const BT=Nn(zT()),VT=Nn(0),r8=100;class i8{constructor(e){Mi(this,"map");Mi(this,"active");Mi(this,"eventListenersSuccess");Mi(this,"eventListenersUpdated");Mi(this,"eventListenersFailure");Mi(this,"points");Mi(this,"cursor");Mi(this,"hover");Mi(this,"dragFrom");Mi(this,"previousStates");Mi(this,"onMouseMove",e=>{if(this.active&&!this.dragFrom)this.recalculateHovering(e);else if(this.active&&this.dragFrom){if(this.hover=="polygon"){let n=this.dragFrom[0]-e.lngLat.lng,r=this.dragFrom[1]-e.lngLat.lat;for(let i of this.points)i[0]-=n,i[1]-=r}else this.points[this.hover]=e.lngLat.toArray();this.dragFrom=e.lngLat.toArray(),this.redraw()}});Mi(this,"onClick",e=>{if(this.beforeUpdate(),this.active&&this.cursor){let n=[];if(mE(this.points).forEach((r,i)=>{n.push([i+1,vR(r,this.cursor).properties.dist])}),n.sort((r,i)=>r[1]-i[1]),n.length>0){let r=n[0][0];this.points.splice(r,0,this.cursor.geometry.coordinates),this.hover=r}else this.points.push(this.cursor.geometry.coordinates),this.hover=this.points.length-1;this.redraw(),this.pointsUpdated()}else this.active&&typeof this.hover=="number"&&(this.points.splice(this.hover,1),this.hover=null,this.redraw(),this.pointsUpdated(),this.recalculateHovering(e))});Mi(this,"onDoubleClick",e=>{this.active&&(e.preventDefault(),this.cursor=hv(e.lngLat.toArray()),this.onClick(e),this.finish())});Mi(this,"onMouseDown",e=>{this.active&&!this.dragFrom&&this.hover!=null&&(e.preventDefault(),this.cursor=null,this.dragFrom=e.lngLat.toArray(),this.beforeUpdate(),this.redraw())});Mi(this,"onMouseUp",()=>{this.active&&this.dragFrom&&(this.dragFrom=null,this.redraw(),this.pointsUpdated())});Mi(this,"onKeypress",e=>{this.active&&(e.key=="Enter"?(e.stopPropagation(),this.finish()):e.key=="z"&&e.ctrlKey&&this.undo())});Mi(this,"onKeyDown",e=>{this.active&&e.key=="Escape"&&(e.stopPropagation(),this.cancel())});this.map=e,this.active=!1,this.eventListenersSuccess=[],this.eventListenersUpdated=[],this.eventListenersFailure=[],this.points=[],this.cursor=null,this.hover=null,this.dragFrom=null,this.previousStates=[],this.map.on("mousemove",this.onMouseMove),this.map.on("click",this.onClick),this.map.on("dblclick",this.onDoubleClick),this.map.on("mousedown",this.onMouseDown),this.map.on("mouseup",this.onMouseUp),document.addEventListener("keypress",this.onKeypress),document.addEventListener("keydown",this.onKeyDown)}tearDown(){this.map.off("mousemove",this.onMouseMove),this.map.off("click",this.onClick),this.map.off("dblclick",this.onDoubleClick),this.map.off("mousedown",this.onMouseDown),this.map.off("mouseup",this.onMouseUp),document.removeEventListener("keypress",this.onKeypress),document.removeEventListener("keydown",this.onKeyDown)}finish(){let e=this.polygonFeature();if(e)for(let n of this.eventListenersSuccess)n(e);else for(let n of this.eventListenersFailure)n();this.stop()}cancel(){for(let e of this.eventListenersFailure)e();this.stop()}addEventListenerSuccess(e){this.eventListenersSuccess.push(e)}addEventListenerUpdated(e){this.eventListenersUpdated.push(e)}addEventListenerFailure(e){this.eventListenersFailure.push(e)}clearEventListeners(){this.eventListenersSuccess=[],this.eventListenersUpdated=[],this.eventListenersFailure=[]}startNew(){this.active=!0,this.map.doubleClickZoom.disable()}editExisting(e){this.active=!0,this.map.doubleClickZoom.disable(),this.points=JSON.parse(JSON.stringify(e.geometry.coordinates[0])),this.points.pop(),this.redraw()}stop(){this.map.doubleClickZoom.enable(),this.points=[],this.cursor=null,this.active=!1,this.hover=null,this.dragFrom=null,this.previousStates=[],this.redraw(),this.map.getCanvas().style.cursor="inherit"}undo(){this.dragFrom!=null||this.previousStates.length==0||(this.points=this.previousStates.pop(),this.hover=null,this.redraw())}redraw(){let e=zT();this.points.forEach((i,s)=>{let c=hv(i);c.properties.hover=this.hover==s,c.properties.idx=s,e.features.push(c)}),e.features=e.features.concat(mE(this.points));let n=this.polygonFeature();n&&(n.properties.hover=this.hover=="polygon",e.features.push(n)),BT.set(e);let r="crosshair";this.hover!=null&&(r=this.dragFrom?"grabbing":"pointer"),this.map.getCanvas().style.cursor=r,VT.set(this.previousStates.length)}pointsUpdated(){let e=this.polygonFeature();if(e)for(let n of this.eventListenersUpdated)n(e)}recalculateHovering(e){this.cursor=null,this.hover=null;for(let n of this.map.queryRenderedFeatures(e.point,{layers:["edit-polygon-fill","edit-polygon-vertices"]}))if(n.geometry.type=="Polygon"){this.hover="polygon";break}else if(n.geometry.type=="Point"&&Object.hasOwn(n.properties,"idx")){this.hover=n.properties.idx;break}this.hover==null&&(this.cursor=hv(e.lngLat.toArray())),this.redraw()}polygonFeature(){if(this.points.length<3)return null;let e=this.points.map(FT),n=[JSON.parse(JSON.stringify(e))];return n[0].push(JSON.parse(JSON.stringify(n[0][0]))),{type:"Feature",geometry:{type:"Polygon",coordinates:n},properties:{}}}beforeUpdate(){this.previousStates.push(JSON.parse(JSON.stringify(this.points))),this.previousStates.length>r8&&this.previousStates.shift()}}function mE(t){let e=[];for(let n=0;n=3&&e.push({type:"Feature",geometry:{type:"LineString",coordinates:[t[t.length-1],t[0]]},properties:{}}),e}function o8(t){let e,n,r;return{c(){e=st("Undo ("),n=st(t[1]),r=st(")")},m(i,s){xe(i,e,s),xe(i,n,s),xe(i,r,s)},p(i,s){s&2&&hr(n,i[1])},d(i){i&&(be(e),be(n),be(r))}}}function s8(t){let e;return{c(){e=st("Undo")},m(n,r){xe(n,e,r)},p:Pt,d(n){n&&be(e)}}}function a8(t){let e,n,r,i,s,c,l,d,v,S,E;function C(R,z){return R[1]==0?s8:o8}let M=C(t),A=M(t);return{c(){e=_e("div"),n=_e("button"),n.textContent="Finish",r=We(),i=_e("button"),i.textContent="Cancel",s=We(),c=_e("button"),A.c(),d=We(),v=_e("ul"),v.innerHTML=`
  • Click + to cancel
  • `,e.disabled=n=t[2]==0,Ie(e,"data-tooltip","Ctrl+Z"),Ie(s,"type","checkbox")},m(A,R){xe(A,e,R),M.m(e,null),xe(A,r,R),xe(A,i,R),oe(i,s),s.checked=t[1],oe(i,c),xe(A,l,R),xe(A,d,R),v||(S=[Lt(e,"click",t[3]),Lt(s,"change",t[4])],v=!0)},p(A,[R]){C===(C=E(A))&&M?M.p(A,R):(M.d(1),M=C(A),M&&(M.c(),M.m(e,null))),R&4&&n!==(n=A[2]==0)&&(e.disabled=n),R&2&&(s.checked=A[1])},i:Pt,o:Pt,d(A){A&&(be(e),be(r),be(i),be(l),be(d)),M.d(),v=!1,Hr(S)}}}function MB(t,e,n){let r,i,s;mt(t,K_,S=>n(1,r=S)),mt(t,J_,S=>n(5,i=S)),mt(t,FT,S=>n(2,s=S));let{route_tool:c}=e;function l(S){S&&i.features.length==0&&Ft(J_,i=JSON.parse(c.inner.debugSnappableNodes()),i)}const d=()=>c.undo();function v(){r=this.checked,K_.set(r)}return t.$$set=S=>{"route_tool"in S&&n(0,c=S.route_tool)},t.$$.update=()=>{t.$$.dirty&2&&l(r)},[c,r,s,d,v]}class AB extends Yt{constructor(e){super(),Xt(this,e,MB,PB,Ut,{route_tool:0})}}function kB(t){let e;return{c(){e=ot("Choose project")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function DB(t){let e;return{c(){e=ot("Pick neighbourhood")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function RB(t){let e;return{c(){e=_e("li"),e.textContent="Creating new neighbourhood boundary"},m(n,r){xe(n,e,r)},p:Pt,i:Pt,o:Pt,d(n){n&&be(e)}}}function NB(t){let e,n,r,i,s;return n=new or({props:{$$slots:{default:[OB]},$$scope:{ctx:t}}}),n.$on("click",t[8]),{c(){e=_e("li"),Ge(n.$$.fragment),r=We(),i=_e("li"),i.textContent="Changing neighbourhood boundary"},m(c,l){xe(c,e,l),Ue(n,e,null),xe(c,r,l),xe(c,i,l),s=!0},p(c,l){const d={};l&1024&&(d.$$scope={dirty:l,ctx:c}),n.$set(d)},i(c){s||(ue(n.$$.fragment,c),s=!0)},o(c){ye(n.$$.fragment,c),s=!1},d(c){c&&(be(e),be(r),be(i)),je(n)}}}function OB(t){let e;return{c(){e=ot("Editing")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function zB(t){let e,n,r,i,s,c,l,d,v,S,E,C;s=new or({props:{$$slots:{default:[kB]},$$scope:{ctx:t}}}),s.$on("click",t[6]),d=new or({props:{$$slots:{default:[DB]},$$scope:{ctx:t}}}),d.$on("click",t[7]);const M=[NB,RB],A=[];function R(z,U){return z[1]?0:1}return S=R(t),E=A[S]=M[S](t),{c(){e=_e("div"),n=_e("nav"),r=_e("ul"),i=_e("li"),Ge(s.$$.fragment),c=We(),l=_e("li"),Ge(d.$$.fragment),v=We(),E.c(),Ie(n,"aria-label","breadcrumb"),Ie(e,"slot","top")},m(z,U){xe(z,e,U),oe(e,n),oe(n,r),oe(r,i),Ue(s,i,null),oe(r,c),oe(r,l),Ue(d,l,null),oe(r,v),A[S].m(r,null),C=!0},p(z,U){const F={};U&1024&&(F.$$scope={dirty:U,ctx:z}),s.$set(F);const G={};U&1024&&(G.$$scope={dirty:U,ctx:z}),d.$set(G);let H=S;S=R(z),S===H?A[S].p(z,U):(Un(),ye(A[H],1,1,()=>{A[H]=null}),jn(),E=A[S],E?E.p(z,U):(E=A[S]=M[S](z),E.c()),ue(E,1),E.m(r,null))},i(z){C||(ue(s.$$.fragment,z),ue(d.$$.fragment,z),ue(E),C=!0)},o(z){ye(s.$$.fragment,z),ye(d.$$.fragment,z),ye(E),C=!1},d(z){z&&be(e),je(s),je(d),A[S].d()}}}function FB(t){let e;return{c(){e=ot("Finish")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function BB(t){let e;return{c(){e=ot("Cancel")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function VB(t){let e,n,r,i,s,c,l,d,v,S,E,C,M,A;return l=new or({props:{$$slots:{default:[FB]},$$scope:{ctx:t}}}),l.$on("click",t[5]),v=new or({props:{$$slots:{default:[BB]},$$scope:{ctx:t}}}),v.$on("click",t[4]),M=new AB({props:{route_tool:Rr(t[2])}}),{c(){e=_e("div"),n=_e("h1"),r=ot("Draw your neighbourhood boundary for "),i=ot(t[0]),s=We(),c=_e("div"),Ge(l.$$.fragment),d=We(),Ge(v.$$.fragment),S=We(),E=_e("p"),E.textContent="TODO: maybe move the instructions from the previous screen to here...",C=We(),Ge(M.$$.fragment),sr(c,"display","flex"),sr(c,"justify-content","space-between"),Ie(e,"slot","sidebar")},m(R,z){xe(R,e,z),oe(e,n),oe(n,r),oe(n,i),oe(e,s),oe(e,c),Ue(l,c,null),oe(c,d),Ue(v,c,null),oe(e,S),oe(e,E),oe(e,C),Ue(M,e,null),A=!0},p(R,z){(!A||z&1)&&cr(i,R[0]);const U={};z&1024&&(U.$$scope={dirty:z,ctx:R}),l.$set(U);const F={};z&1024&&(F.$$scope={dirty:z,ctx:R}),v.$set(F);const G={};z&4&&(G.route_tool=Rr(R[2])),M.$set(G)},i(R){A||(ue(l.$$.fragment,R),ue(v.$$.fragment,R),ue(M.$$.fragment,R),A=!0)},o(R){ye(l.$$.fragment,R),ye(v.$$.fragment,R),ye(M.$$.fragment,R),A=!1},d(R){R&&be(e),je(l),je(v),je(M)}}}function UB(t){let e,n,r;return n=new CB({}),{c(){e=_e("div"),Ge(n.$$.fragment),Ie(e,"slot","map")},m(i,s){xe(i,e,s),Ue(n,e,null),r=!0},p:Pt,i(i){r||(ue(n.$$.fragment,i),r=!0)},o(i){ye(n.$$.fragment,i),r=!1},d(i){i&&be(e),je(n)}}}function jB(t){let e,n;return e=new bu({props:{$$slots:{map:[UB],sidebar:[VB],top:[zB]},$$scope:{ctx:t}}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,[i]){const s={};i&1039&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function GB(t,e,n){let r,i,s;mt(t,D_,M=>n(2,r=M)),mt(t,xn,M=>n(3,i=M)),mt(t,ji,M=>n(9,s=M));let{name:c}=e,{existing:l}=e;l?r.editExistingArea(l):r.startArea(),ro(()=>{r==null||r.clearEventListeners(),r==null||r.stop()});function d(){l?Ft(xn,i={mode:"neighbourhood"},i):Ft(xn,i={mode:"network"},i)}r.addEventListenerSuccess(M=>{try{s.setNeighbourhoodBoundary(c,M),Rf(),s.setCurrentNeighbourhood(c),Ft(xn,i={mode:"neighbourhood"},i)}catch{window.alert("Known georust bug hit, sorry. You may need to just refresh the page now."),d()}}),r.addEventListenerFailure(d);const v=()=>Rr(r).finish(),S=()=>Ft(xn,i={mode:"title"},i),E=()=>Ft(xn,i={mode:"network"},i),C=()=>Ft(xn,i={mode:"neighbourhood"},i);return t.$$set=M=>{"name"in M&&n(0,c=M.name),"existing"in M&&n(1,l=M.existing)},[c,l,r,i,d,v,S,E,C]}class qB extends Yt{constructor(e){super(),Xt(this,e,GB,jB,Ut,{name:0,existing:1})}}function WB(t){let e;return{c(){e=ot("Choose project")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function HB(t){let e;return{c(){e=ot("Pick neighbourhood")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function ZB(t){let e,n,r,i,s,c,l,d,v,S,E;return s=new or({props:{$$slots:{default:[WB]},$$scope:{ctx:t}}}),s.$on("click",t[7]),d=new or({props:{$$slots:{default:[HB]},$$scope:{ctx:t}}}),d.$on("click",t[8]),{c(){e=_e("div"),n=_e("nav"),r=_e("ul"),i=_e("li"),Ge(s.$$.fragment),c=We(),l=_e("li"),Ge(d.$$.fragment),v=We(),S=_e("li"),S.textContent="Use an auto-generated boundary",Ie(n,"aria-label","breadcrumb"),Ie(e,"slot","top")},m(C,M){xe(C,e,M),oe(e,n),oe(n,r),oe(r,i),Ue(s,i,null),oe(r,c),oe(r,l),Ue(d,l,null),oe(r,v),oe(r,S),E=!0},p(C,M){const A={};M&2048&&(A.$$scope={dirty:M,ctx:C}),s.$set(A);const R={};M&2048&&(R.$$scope={dirty:M,ctx:C}),d.$set(R)},i(C){E||(ue(s.$$.fragment,C),ue(d.$$.fragment,C),E=!0)},o(C){ye(s.$$.fragment,C),ye(d.$$.fragment,C),E=!1},d(C){C&&be(e),je(s),je(d)}}}function XB(t){let e,n,r,i,s,c,l,d,v,S,E,C,M;return n=new Cy({}),n.$on("click",t[5]),{c(){e=_e("div"),Ge(n.$$.fragment),r=We(),i=_e("p"),i.textContent=`Click an area to use it as a neighbourhood. These are generated by finding + roads, railways, and water that form severances. There are many bugs; this + is experimental. The colors are arbitrary, just to distinguish better.`,s=We(),c=_e("button"),c.textContent="Export to GeoJSON",l=We(),d=_e("label"),v=ot(`Minimum area (km²) + `),S=_e("input"),Ie(c,"class","secondary"),Ie(S,"type","number"),Ie(S,"min","0"),Ie(S,"max","1"),Ie(S,"step","0.01"),Ie(e,"slot","sidebar")},m(A,R){xe(A,e,R),Ue(n,e,null),oe(e,r),oe(e,i),oe(e,s),oe(e,c),oe(e,l),oe(e,d),oe(d,v),oe(d,S),vo(S,t[0]),E=!0,C||(M=[Lt(c,"click",t[4]),Lt(S,"input",t[6])],C=!0)},p(A,R){R&1&&m1(S.value)!==A[0]&&vo(S,A[0])},i(A){E||(ue(n.$$.fragment,A),E=!0)},o(A){ye(n.$$.fragment,A),E=!1},d(A){A&&be(e),je(n),C=!1,Hr(M)}}}function YB(t){let e,n=t[10].area_km2.toFixed(5)+"",r,i;return{c(){e=ot("Area: "),r=ot(n),i=ot(" km²")},m(s,c){xe(s,e,c),xe(s,r,c),xe(s,i,c)},p(s,c){c&1024&&n!==(n=s[10].area_km2.toFixed(5)+"")&&cr(r,n)},d(s){s&&(be(e),be(r),be(i))}}}function $B(t){let e,n;return e=new xu({props:{openOn:"hover",$$slots:{default:[YB,({props:r})=>({10:r}),({props:r})=>r?1024:0]},$$scope:{ctx:t}}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,i){const s={};i&3072&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function KB(t){let e,n,r,i;const s=[gi("auto-boundaries-areas"),{filter:["all",a1,[">=",["get","area_km2"],t[0]]]},{manageHoverState:!0},{paint:{"fill-color":["match",["%",["id"],5],0,"blue",1,"yellow",2,"green",3,"purple",4,"orange","black"],"fill-opacity":Nf(.3,.7)}},{hoverCursor:"pointer"}];let c={$$slots:{default:[$B]},$$scope:{ctx:t}};for(let v=0;v=",["get","area_km2"],v[0]]]},s[2],s[3],s[4]]):{};S&2048&&(E.$$scope={dirty:S,ctx:v}),e.$set(E);const C={};r.$set(C)},i(v){i||(ue(e.$$.fragment,v),ue(r.$$.fragment,v),i=!0)},o(v){ye(e.$$.fragment,v),ye(r.$$.fragment,v),i=!1},d(v){v&&be(n),je(e,v),je(r,v)}}}function JB(t){let e,n,r;return n=new No({props:{data:t[2],generateId:!0,$$slots:{default:[KB]},$$scope:{ctx:t}}}),{c(){e=_e("div"),Ge(n.$$.fragment),Ie(e,"slot","map")},m(i,s){xe(i,e,s),Ue(n,e,null),r=!0},p(i,s){const c={};s&2049&&(c.$$scope={dirty:s,ctx:i}),n.$set(c)},i(i){r||(ue(n.$$.fragment,i),r=!0)},o(i){ye(n.$$.fragment,i),r=!1},d(i){i&&be(e),je(n)}}}function QB(t){let e,n;return e=new bu({props:{$$slots:{map:[JB],sidebar:[XB],top:[ZB]},$$scope:{ctx:t}}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,[i]){const s={};i&2051&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function e8(t,e,n){let r,i;mt(t,xn,M=>n(1,r=M)),mt(t,ji,M=>n(9,i=M));let s=JSON.parse(i.renderAutoBoundaries()),c=0;function l(M){let A=window.prompt("What do you want to name the neighbourhood?");if(A)try{let R={type:"Feature",properties:{},geometry:s.features[M.detail.features[0].id].geometry};i.setNeighbourhoodBoundary(A,R),Rf(),i.setCurrentNeighbourhood(A),Ft(xn,r={mode:"neighbourhood"},r)}catch(R){console.log(R),window.alert("Known georust bug hit, sorry. You may need to just refresh the page now.")}}function d(){p_("auto_boundaries.geojson",JSON.stringify(s,null," "))}const v=()=>Ft(xn,r={mode:"network"},r);function S(){c=m1(this.value),n(0,c)}return[c,r,s,l,d,v,S,()=>Ft(xn,r={mode:"title"},r),()=>Ft(xn,r={mode:"network"},r)]}class t8 extends Yt{constructor(e){super(),Xt(this,e,e8,QB,Ut,{})}}const n8=["==",["geometry-type"],"Polygon"],r8=["==",["geometry-type"],"LineString"],i8=["==",["geometry-type"],"Point"];function BT(){return{type:"FeatureCollection",features:[]}}function fv(t){return{type:"Feature",properties:{},geometry:{type:"Point",coordinates:VT(t)}}}function VT(t){return[Math.round(t[0]*1e7)/1e7,Math.round(t[1]*1e7)/1e7]}const UT=Nn(BT()),jT=Nn(0),o8=100;class s8{constructor(e){Mi(this,"map");Mi(this,"active");Mi(this,"eventListenersSuccess");Mi(this,"eventListenersUpdated");Mi(this,"eventListenersFailure");Mi(this,"points");Mi(this,"cursor");Mi(this,"hover");Mi(this,"dragFrom");Mi(this,"previousStates");Mi(this,"onMouseMove",e=>{if(this.active&&!this.dragFrom)this.recalculateHovering(e);else if(this.active&&this.dragFrom){if(this.hover=="polygon"){let n=this.dragFrom[0]-e.lngLat.lng,r=this.dragFrom[1]-e.lngLat.lat;for(let i of this.points)i[0]-=n,i[1]-=r}else this.points[this.hover]=e.lngLat.toArray();this.dragFrom=e.lngLat.toArray(),this.redraw()}});Mi(this,"onClick",e=>{if(this.beforeUpdate(),this.active&&this.cursor){let n=[];if(_E(this.points).forEach((r,i)=>{n.push([i+1,bR(r,this.cursor).properties.dist])}),n.sort((r,i)=>r[1]-i[1]),n.length>0){let r=n[0][0];this.points.splice(r,0,this.cursor.geometry.coordinates),this.hover=r}else this.points.push(this.cursor.geometry.coordinates),this.hover=this.points.length-1;this.redraw(),this.pointsUpdated()}else this.active&&typeof this.hover=="number"&&(this.points.splice(this.hover,1),this.hover=null,this.redraw(),this.pointsUpdated(),this.recalculateHovering(e))});Mi(this,"onDoubleClick",e=>{this.active&&(e.preventDefault(),this.cursor=fv(e.lngLat.toArray()),this.onClick(e),this.finish())});Mi(this,"onMouseDown",e=>{this.active&&!this.dragFrom&&this.hover!=null&&(e.preventDefault(),this.cursor=null,this.dragFrom=e.lngLat.toArray(),this.beforeUpdate(),this.redraw())});Mi(this,"onMouseUp",()=>{this.active&&this.dragFrom&&(this.dragFrom=null,this.redraw(),this.pointsUpdated())});Mi(this,"onKeypress",e=>{this.active&&(e.key=="Enter"?(e.stopPropagation(),this.finish()):e.key=="z"&&e.ctrlKey&&this.undo())});Mi(this,"onKeyDown",e=>{this.active&&e.key=="Escape"&&(e.stopPropagation(),this.cancel())});this.map=e,this.active=!1,this.eventListenersSuccess=[],this.eventListenersUpdated=[],this.eventListenersFailure=[],this.points=[],this.cursor=null,this.hover=null,this.dragFrom=null,this.previousStates=[],this.map.on("mousemove",this.onMouseMove),this.map.on("click",this.onClick),this.map.on("dblclick",this.onDoubleClick),this.map.on("mousedown",this.onMouseDown),this.map.on("mouseup",this.onMouseUp),document.addEventListener("keypress",this.onKeypress),document.addEventListener("keydown",this.onKeyDown)}tearDown(){this.map.off("mousemove",this.onMouseMove),this.map.off("click",this.onClick),this.map.off("dblclick",this.onDoubleClick),this.map.off("mousedown",this.onMouseDown),this.map.off("mouseup",this.onMouseUp),document.removeEventListener("keypress",this.onKeypress),document.removeEventListener("keydown",this.onKeyDown)}finish(){let e=this.polygonFeature();if(e)for(let n of this.eventListenersSuccess)n(e);else for(let n of this.eventListenersFailure)n();this.stop()}cancel(){for(let e of this.eventListenersFailure)e();this.stop()}addEventListenerSuccess(e){this.eventListenersSuccess.push(e)}addEventListenerUpdated(e){this.eventListenersUpdated.push(e)}addEventListenerFailure(e){this.eventListenersFailure.push(e)}clearEventListeners(){this.eventListenersSuccess=[],this.eventListenersUpdated=[],this.eventListenersFailure=[]}startNew(){this.active=!0,this.map.doubleClickZoom.disable()}editExisting(e){this.active=!0,this.map.doubleClickZoom.disable(),this.points=JSON.parse(JSON.stringify(e.geometry.coordinates[0])),this.points.pop(),this.redraw()}stop(){this.map.doubleClickZoom.enable(),this.points=[],this.cursor=null,this.active=!1,this.hover=null,this.dragFrom=null,this.previousStates=[],this.redraw(),this.map.getCanvas().style.cursor="inherit"}undo(){this.dragFrom!=null||this.previousStates.length==0||(this.points=this.previousStates.pop(),this.hover=null,this.redraw())}redraw(){let e=BT();this.points.forEach((i,s)=>{let c=fv(i);c.properties.hover=this.hover==s,c.properties.idx=s,e.features.push(c)}),e.features=e.features.concat(_E(this.points));let n=this.polygonFeature();n&&(n.properties.hover=this.hover=="polygon",e.features.push(n)),UT.set(e);let r="crosshair";this.hover!=null&&(r=this.dragFrom?"grabbing":"pointer"),this.map.getCanvas().style.cursor=r,jT.set(this.previousStates.length)}pointsUpdated(){let e=this.polygonFeature();if(e)for(let n of this.eventListenersUpdated)n(e)}recalculateHovering(e){this.cursor=null,this.hover=null;for(let n of this.map.queryRenderedFeatures(e.point,{layers:["edit-polygon-fill","edit-polygon-vertices"]}))if(n.geometry.type=="Polygon"){this.hover="polygon";break}else if(n.geometry.type=="Point"&&Object.hasOwn(n.properties,"idx")){this.hover=n.properties.idx;break}this.hover==null&&(this.cursor=fv(e.lngLat.toArray())),this.redraw()}polygonFeature(){if(this.points.length<3)return null;let e=this.points.map(VT),n=[JSON.parse(JSON.stringify(e))];return n[0].push(JSON.parse(JSON.stringify(n[0][0]))),{type:"Feature",geometry:{type:"Polygon",coordinates:n},properties:{}}}beforeUpdate(){this.previousStates.push(JSON.parse(JSON.stringify(this.points))),this.previousStates.length>o8&&this.previousStates.shift()}}function _E(t){let e=[];for(let n=0;n=3&&e.push({type:"Feature",geometry:{type:"LineString",coordinates:[t[t.length-1],t[0]]},properties:{}}),e}function a8(t){let e,n,r;return{c(){e=ot("Undo ("),n=ot(t[1]),r=ot(")")},m(i,s){xe(i,e,s),xe(i,n,s),xe(i,r,s)},p(i,s){s&2&&cr(n,i[1])},d(i){i&&(be(e),be(n),be(r))}}}function l8(t){let e;return{c(){e=ot("Undo")},m(n,r){xe(n,e,r)},p:Pt,d(n){n&&be(e)}}}function u8(t){let e,n,r,i,s,c,l,d,v,S,E;function C(R,z){return R[1]==0?l8:a8}let M=C(t),A=M(t);return{c(){e=_e("div"),n=_e("button"),n.textContent="Finish",r=We(),i=_e("button"),i.textContent="Cancel",s=We(),c=_e("button"),A.c(),d=We(),v=_e("ul"),v.innerHTML=`
  • Click the map to add a vertex
  • Click a vertex to delete it
  • Drag a vertex or the polygon to move it
  • Press Control+Z @@ -657,14 +658,14 @@ and limitations under the License. or double click to finish
  • Press Escape - to cancel
  • `,c.disabled=l=t[1]==0,sr(e,"display","flex"),sr(e,"justify-content","space-between")},m(R,z){xe(R,e,z),oe(e,n),oe(e,r),oe(e,i),oe(e,s),oe(e,c),A.m(c,null),xe(R,d,z),xe(R,v,z),S||(E=[Lt(n,"click",t[2]),Lt(i,"click",t[3]),Lt(c,"click",t[4])],S=!0)},p(R,[z]){M===(M=C(R))&&A?A.p(R,z):(A.d(1),A=M(R),A&&(A.c(),A.m(c,null))),z&2&&l!==(l=R[1]==0)&&(c.disabled=l)},i:Pt,o:Pt,d(R){R&&(be(e),be(d),be(v)),A.d(),S=!1,Kr(E)}}}function l8(t,e,n){let r;mt(t,VT,d=>n(1,r=d));let{polygonTool:i}=e;const s=()=>i.finish(),c=()=>i.cancel(),l=()=>i.undo();return t.$$set=d=>{"polygonTool"in d&&n(0,i=d.polygonTool)},[i,r,s,c,l]}class u8 extends Yt{constructor(e){super(),Xt(this,e,l8,a8,Ut,{polygonTool:0})}}let c8=Date.now();function Mm(t){return`${t}-${c8++}`}const UT=Symbol.for("svelte-maplibre");function h8(){return zE(UT)}function gE(t){return{subscribe:t.subscribe}}function jT({key:t,setPopupTarget:e=!1,setCluster:n=!1,setMouseEvent:r=!1}){let i=h8(),s=Nn(null),c=gE(s),l={...i,[t]:gE(s)};if(e&&(l.popupTarget=c),r){let d=Nn(null);l.layerEvent=d,i.layerEvent=d}return n&&(l.cluster=Nn()),p1(UT,l),{...i,self:s}}function f8(){return jT({key:"source",setCluster:!0})}function p8(t=!0){return jT({key:"layer",setPopupTarget:t,setMouseEvent:t})}function _E(t){let e;return n=>{if(n)for(let r in n){let i=e==null?void 0:e[r],s=n[r];i!==s&&t(r,s,i)}else if(e)for(let r in e)t(r,void 0,e[r]);e=n}}function d8(t,...e){let n=[t];for(let r of e)if(r)Array.isArray(r)&&r[0]===t?n.push(...r.slice(1)):n.push(r);else continue;if(n.length!==1)return n.length===2?n[1]:n}function m8(t){return t===!0?["has","point_count"]:t===!1?["!",["has","point_count"]]:void 0}function yE(t){let e=t[0],n,r,i=vE(t);return{c(){i.c(),n=Hi()},m(s,c){i.m(s,c),xe(s,n,c),r=!0},p(s,c){c[0]&1&&Ut(e,e=s[0])?(Un(),ye(i,1,1,Pt),jn(),i=vE(s),i.c(),ue(i,1),i.m(n.parentNode,n)):i.p(s,c)},i(s){r||(ue(i),r=!0)},o(s){ye(i),r=!1},d(s){s&&be(n),i.d(s)}}}function vE(t){let e;const n=t[36].default,r=Sr(n,t,t[35],null);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s[1]&16)&&Ir(r,n,i,i[35],e?Er(n,i[35],s,null):Cr(i[35]),null)},i(i){e||(ue(r,i),e=!0)},o(i){ye(r,i),e=!1},d(i){r&&r.d(i)}}}function g8(t){let e,n,r=t[0]&&yE(t);return{c(){r&&r.c(),e=Hi()},m(i,s){r&&r.m(i,s),xe(i,e,s),n=!0},p(i,s){i[0]?r?(r.p(i,s),s[0]&1&&ue(r,1)):(r=yE(i),r.c(),ue(r,1),r.m(e.parentNode,e)):r&&(Un(),ye(r,1,1,()=>{r=null}),jn())},i(i){n||(ue(r),n=!0)},o(i){ye(r),n=!1},d(i){i&&be(e),r&&r.d(i)}}}function _8(t,e,n){let r,i,s,c,l,d,v,S,E,C,M,A,{$$slots:R={},$$scope:z}=e,{id:U=Mm("layer")}=e,{source:F=void 0}=e,{sourceLayer:G=void 0}=e,{beforeId:H=void 0}=e,{beforeLayerType:te=void 0}=e,{type:ee}=e,{paint:fe=void 0}=e,{layout:pe=void 0}=e,{filter:se=void 0}=e,{applyToClusters:Ae=void 0}=e,{minzoom:Y=void 0}=e,{maxzoom:ae=void 0}=e,{manageHoverState:Ke=!1}=e,{hovered:Le=null}=e,{interactive:tt=!0}=e,{hoverCursor:ut=void 0}=e,{eventsIfTopMost:He=!1}=e;const Ot=vu(),{map:Gt,source:vt,self:At,minzoom:Mt,maxzoom:rn,eventTopMost:wn,layerInfo:fn}=p8();mt(t,Gt,ne=>n(31,E=ne)),mt(t,vt,ne=>n(32,C=ne)),mt(t,At,ne=>n(0,S=ne)),mt(t,Mt,ne=>n(34,A=ne)),mt(t,rn,ne=>n(33,M=ne)),ro(()=>{S&&E&&(fn.delete(S),E==null||E.removeLayer(S))});let _n;function pn(ne){var Re,It;if(!tt||!S||!E||He&&wn(ne)!==S)return;let Me=ne.features??[],dt=(It=(Re=Me[0])==null?void 0:Re.properties)==null?void 0:It.cluster_id,en={event:ne,map:E,clusterId:dt,layer:S,source:l,features:Me};Ot(ne.type,en)}function Yn(ne){var Re,It;if(!tt||!S||!E||He&&wn(ne)!==S)return;ut&&(E.getCanvas().style.cursor=ut);let Me=ne.features??[];n(6,Le=Me[0]??null);let dt=(It=(Re=Me[0])==null?void 0:Re.properties)==null?void 0:It.cluster_id;Ot("mouseenter",{event:ne,map:E,clusterId:dt,layer:S,source:l,features:Me})}function zr(ne){var Re,It,Cn;if(!tt||!E)return;if(He&&wn(ne)!==S){n(6,Le=null),Ke&&_n!==void 0&&(E==null||E.setFeatureState({source:l,sourceLayer:G,id:_n},{hover:!1}),_n=void 0);return}E.getCanvas().style.cursor=ut;let Me=ne.features??[],dt=(It=(Re=Me[0])==null?void 0:Re.properties)==null?void 0:It.cluster_id,en=(Cn=Me[0])==null?void 0:Cn.id;en!==_n&&(Ke&&(_n!==void 0&&(E==null||E.setFeatureState({source:l,id:_n,sourceLayer:G},{hover:!1})),E==null||E.setFeatureState({source:l,id:en,sourceLayer:G},{hover:!0})),_n=en,n(6,Le=Me[0]??null)),Ot("mousemove",{event:ne,map:E,clusterId:dt,layer:S,source:l,features:Me})}function Pn(ne){if(!(!tt||!S||!E)){if(ut&&(E.getCanvas().style.cursor=""),n(6,Le=null),Ke&&_n!==void 0){const Me={source:l,id:_n,sourceLayer:G};E==null||E.setFeatureState(Me,{hover:!1}),_n=void 0}Ot("mouseleave",{map:E,layer:S,source:l})}}let ar=!0;function Zn(ne){E&&(E.off("click",ne,pn),E.off("dblclick",ne,pn),E.off("contextmenu",ne,pn),E.off("mouseenter",ne,Yn),E.off("mousemove",ne,zr),E.off("mouseleave",ne,Pn))}return ro(()=>{E&&S&&Zn(S)}),t.$$set=ne=>{"id"in ne&&n(7,U=ne.id),"source"in ne&&n(8,F=ne.source),"sourceLayer"in ne&&n(9,G=ne.sourceLayer),"beforeId"in ne&&n(10,H=ne.beforeId),"beforeLayerType"in ne&&n(11,te=ne.beforeLayerType),"type"in ne&&n(12,ee=ne.type),"paint"in ne&&n(13,fe=ne.paint),"layout"in ne&&n(14,pe=ne.layout),"filter"in ne&&n(15,se=ne.filter),"applyToClusters"in ne&&n(16,Ae=ne.applyToClusters),"minzoom"in ne&&n(17,Y=ne.minzoom),"maxzoom"in ne&&n(18,ae=ne.maxzoom),"manageHoverState"in ne&&n(19,Ke=ne.manageHoverState),"hovered"in ne&&n(6,Le=ne.hovered),"interactive"in ne&&n(20,tt=ne.interactive),"hoverCursor"in ne&&n(21,ut=ne.hoverCursor),"eventsIfTopMost"in ne&&n(22,He=ne.eventsIfTopMost),"$$scope"in ne&&n(35,z=ne.$$scope)},t.$$.update=()=>{if(t.$$.dirty[0]&65536&&n(30,r=m8(Ae)),t.$$.dirty[0]&1073774592&&n(24,i=d8("all",r,se)),t.$$.dirty[0]&131072|t.$$.dirty[1]&8&&n(26,s=Y??A),t.$$.dirty[0]&262144|t.$$.dirty[1]&4&&n(25,c=ae??M),t.$$.dirty[0]&256|t.$$.dirty[1]&2&&n(29,l=F||C),t.$$.dirty[0]&654343809|t.$$.dirty[1]&1&&E&&S!==U&&l){S&&(Zn(S),fn.delete(S));let ne=H;if(!H&&te){let Me=E.getStyle().layers,dt=typeof te=="function"?te:Re=>Re.type===te,en=Me==null?void 0:Me.find(dt);en&&(ne=en.id)}Ft(At,S=U,S),E.addLayer(Xc({id:S,type:ee,source:l,"source-layer":G,filter:i,paint:fe,layout:pe,minzoom:s,maxzoom:c}),ne),n(23,ar=!0),E.on("click",S,pn),E.on("dblclick",S,pn),E.on("contextmenu",S,pn),E.on("mouseenter",S,Yn),E.on("mousemove",S,zr),E.on("mouseleave",S,Pn)}t.$$.dirty[0]&1048577&&S&&fn.set(S,{interactive:tt}),t.$$.dirty[0]&1|t.$$.dirty[1]&1&&n(28,d=S?_E((ne,Me)=>E==null?void 0:E.setPaintProperty(S,ne,Me)):void 0),t.$$.dirty[0]&1|t.$$.dirty[1]&1&&n(27,v=S?_E((ne,Me)=>E==null?void 0:E.setLayoutProperty(S,ne,Me)):void 0),t.$$.dirty[0]&268443648&&(d==null||d(fe)),t.$$.dirty[0]&134234112&&(v==null||v(pe)),t.$$.dirty[0]&100663297|t.$$.dirty[1]&1&&S&&(E==null||E.setLayerZoomRange(S,s,c)),t.$$.dirty[0]&25165825|t.$$.dirty[1]&1&&S&&(ar?n(23,ar=!1):E==null||E.setFilter(S,i))},[S,Gt,vt,At,Mt,rn,Le,U,F,G,H,te,ee,fe,pe,se,Ae,Y,ae,Ke,tt,ut,He,ar,i,c,s,v,d,l,r,E,C,M,A,z,R]}class gb extends Yt{constructor(e){super(),Xt(this,e,_8,g8,Ut,{id:7,source:8,sourceLayer:9,beforeId:10,beforeLayerType:11,type:12,paint:13,layout:14,filter:15,applyToClusters:16,minzoom:17,maxzoom:18,manageHoverState:19,hovered:6,interactive:20,hoverCursor:21,eventsIfTopMost:22},null,[-1,-1])}}function y8(t){let e;const n=t[16].default,r=Sr(n,t,t[24],null);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&16777216)&&Ir(r,n,i,i[24],e?Er(n,i[24],s,null):Cr(i[24]),null)},i(i){e||(ue(r,i),e=!0)},o(i){ye(r,i),e=!1},d(i){r&&r.d(i)}}}function v8(t){let e,n,r;function i(c){t[17](c)}let s={id:t[1],type:"circle",source:t[2],sourceLayer:t[3],beforeId:t[4],beforeLayerType:t[5],paint:t[6],layout:t[7],filter:t[8],applyToClusters:t[9],minzoom:t[10],maxzoom:t[11],hoverCursor:t[12],manageHoverState:t[13],eventsIfTopMost:t[14],interactive:t[15],$$slots:{default:[y8]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.hovered=t[0]),e=new gb({props:s}),ai.push(()=>Il(e,"hovered",i)),e.$on("click",t[18]),e.$on("dblclick",t[19]),e.$on("contextmenu",t[20]),e.$on("mouseenter",t[21]),e.$on("mousemove",t[22]),e.$on("mouseleave",t[23]),{c(){Ge(e.$$.fragment)},m(c,l){Ue(e,c,l),r=!0},p(c,[l]){const d={};l&2&&(d.id=c[1]),l&4&&(d.source=c[2]),l&8&&(d.sourceLayer=c[3]),l&16&&(d.beforeId=c[4]),l&32&&(d.beforeLayerType=c[5]),l&64&&(d.paint=c[6]),l&128&&(d.layout=c[7]),l&256&&(d.filter=c[8]),l&512&&(d.applyToClusters=c[9]),l&1024&&(d.minzoom=c[10]),l&2048&&(d.maxzoom=c[11]),l&4096&&(d.hoverCursor=c[12]),l&8192&&(d.manageHoverState=c[13]),l&16384&&(d.eventsIfTopMost=c[14]),l&32768&&(d.interactive=c[15]),l&16777216&&(d.$$scope={dirty:l,ctx:c}),!n&&l&1&&(n=!0,d.hovered=c[0],El(()=>n=!1)),e.$set(d)},i(c){r||(ue(e.$$.fragment,c),r=!0)},o(c){ye(e.$$.fragment,c),r=!1},d(c){je(e,c)}}}function b8(t,e,n){let{$$slots:r={},$$scope:i}=e,{id:s=Mm("circle")}=e,{source:c=void 0}=e,{sourceLayer:l=void 0}=e,{beforeId:d=void 0}=e,{beforeLayerType:v=void 0}=e,{paint:S}=e,{layout:E=void 0}=e,{filter:C=void 0}=e,{applyToClusters:M=void 0}=e,{minzoom:A=void 0}=e,{maxzoom:R=void 0}=e,{hoverCursor:z=void 0}=e,{manageHoverState:U=!1}=e,{hovered:F=null}=e,{eventsIfTopMost:G=!1}=e,{interactive:H=!0}=e;function te(ae){F=ae,n(0,F)}function ee(ae){gn.call(this,t,ae)}function fe(ae){gn.call(this,t,ae)}function pe(ae){gn.call(this,t,ae)}function se(ae){gn.call(this,t,ae)}function Ae(ae){gn.call(this,t,ae)}function Y(ae){gn.call(this,t,ae)}return t.$$set=ae=>{"id"in ae&&n(1,s=ae.id),"source"in ae&&n(2,c=ae.source),"sourceLayer"in ae&&n(3,l=ae.sourceLayer),"beforeId"in ae&&n(4,d=ae.beforeId),"beforeLayerType"in ae&&n(5,v=ae.beforeLayerType),"paint"in ae&&n(6,S=ae.paint),"layout"in ae&&n(7,E=ae.layout),"filter"in ae&&n(8,C=ae.filter),"applyToClusters"in ae&&n(9,M=ae.applyToClusters),"minzoom"in ae&&n(10,A=ae.minzoom),"maxzoom"in ae&&n(11,R=ae.maxzoom),"hoverCursor"in ae&&n(12,z=ae.hoverCursor),"manageHoverState"in ae&&n(13,U=ae.manageHoverState),"hovered"in ae&&n(0,F=ae.hovered),"eventsIfTopMost"in ae&&n(14,G=ae.eventsIfTopMost),"interactive"in ae&&n(15,H=ae.interactive),"$$scope"in ae&&n(24,i=ae.$$scope)},[F,s,c,l,d,v,S,E,C,M,A,R,z,U,G,H,r,te,ee,fe,pe,se,Ae,Y,i]}class x8 extends Yt{constructor(e){super(),Xt(this,e,b8,v8,Ut,{id:1,source:2,sourceLayer:3,beforeId:4,beforeLayerType:5,paint:6,layout:7,filter:8,applyToClusters:9,minzoom:10,maxzoom:11,hoverCursor:12,manageHoverState:13,hovered:0,eventsIfTopMost:14,interactive:15})}}function w8(t){let e;const n=t[15].default,r=Sr(n,t,t[23],null);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&8388608)&&Ir(r,n,i,i[23],e?Er(n,i[23],s,null):Cr(i[23]),null)},i(i){e||(ue(r,i),e=!0)},o(i){ye(r,i),e=!1},d(i){r&&r.d(i)}}}function S8(t){let e,n,r;function i(c){t[16](c)}let s={id:t[1],type:"fill",source:t[2],sourceLayer:t[3],beforeId:t[4],beforeLayerType:t[5],paint:t[6],layout:t[7],filter:t[8],minzoom:t[9],maxzoom:t[10],hoverCursor:t[11],manageHoverState:t[12],eventsIfTopMost:t[13],interactive:t[14],$$slots:{default:[w8]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.hovered=t[0]),e=new gb({props:s}),ai.push(()=>Il(e,"hovered",i)),e.$on("click",t[17]),e.$on("dblclick",t[18]),e.$on("contextmenu",t[19]),e.$on("mouseenter",t[20]),e.$on("mousemove",t[21]),e.$on("mouseleave",t[22]),{c(){Ge(e.$$.fragment)},m(c,l){Ue(e,c,l),r=!0},p(c,[l]){const d={};l&2&&(d.id=c[1]),l&4&&(d.source=c[2]),l&8&&(d.sourceLayer=c[3]),l&16&&(d.beforeId=c[4]),l&32&&(d.beforeLayerType=c[5]),l&64&&(d.paint=c[6]),l&128&&(d.layout=c[7]),l&256&&(d.filter=c[8]),l&512&&(d.minzoom=c[9]),l&1024&&(d.maxzoom=c[10]),l&2048&&(d.hoverCursor=c[11]),l&4096&&(d.manageHoverState=c[12]),l&8192&&(d.eventsIfTopMost=c[13]),l&16384&&(d.interactive=c[14]),l&8388608&&(d.$$scope={dirty:l,ctx:c}),!n&&l&1&&(n=!0,d.hovered=c[0],El(()=>n=!1)),e.$set(d)},i(c){r||(ue(e.$$.fragment,c),r=!0)},o(c){ye(e.$$.fragment,c),r=!1},d(c){je(e,c)}}}function E8(t,e,n){let{$$slots:r={},$$scope:i}=e,{id:s=Mm("fill")}=e,{source:c=void 0}=e,{sourceLayer:l=void 0}=e,{beforeId:d=void 0}=e,{beforeLayerType:v=void 0}=e,{paint:S}=e,{layout:E=void 0}=e,{filter:C=void 0}=e,{minzoom:M=void 0}=e,{maxzoom:A=void 0}=e,{hoverCursor:R=void 0}=e,{manageHoverState:z=!1}=e,{hovered:U=null}=e,{eventsIfTopMost:F=!1}=e,{interactive:G=!0}=e;function H(Y){U=Y,n(0,U)}function te(Y){gn.call(this,t,Y)}function ee(Y){gn.call(this,t,Y)}function fe(Y){gn.call(this,t,Y)}function pe(Y){gn.call(this,t,Y)}function se(Y){gn.call(this,t,Y)}function Ae(Y){gn.call(this,t,Y)}return t.$$set=Y=>{"id"in Y&&n(1,s=Y.id),"source"in Y&&n(2,c=Y.source),"sourceLayer"in Y&&n(3,l=Y.sourceLayer),"beforeId"in Y&&n(4,d=Y.beforeId),"beforeLayerType"in Y&&n(5,v=Y.beforeLayerType),"paint"in Y&&n(6,S=Y.paint),"layout"in Y&&n(7,E=Y.layout),"filter"in Y&&n(8,C=Y.filter),"minzoom"in Y&&n(9,M=Y.minzoom),"maxzoom"in Y&&n(10,A=Y.maxzoom),"hoverCursor"in Y&&n(11,R=Y.hoverCursor),"manageHoverState"in Y&&n(12,z=Y.manageHoverState),"hovered"in Y&&n(0,U=Y.hovered),"eventsIfTopMost"in Y&&n(13,F=Y.eventsIfTopMost),"interactive"in Y&&n(14,G=Y.interactive),"$$scope"in Y&&n(23,i=Y.$$scope)},[U,s,c,l,d,v,S,E,C,M,A,R,z,F,G,r,H,te,ee,fe,pe,se,Ae,i]}class I8 extends Yt{constructor(e){super(),Xt(this,e,E8,S8,Ut,{id:1,source:2,sourceLayer:3,beforeId:4,beforeLayerType:5,paint:6,layout:7,filter:8,minzoom:9,maxzoom:10,hoverCursor:11,manageHoverState:12,hovered:0,eventsIfTopMost:13,interactive:14})}}function C8(t,e,n,r,i){let s=!1;t.getSource(e)&&(s=!0,t.removeSource(e));const c=()=>{r(e)&&(t.addSource(e,n),i())};if(s){const l=()=>{e&&(t.getSource(e)?setTimeout(l,1):c())};l()}else c()}function T8(t,e,n){VE().then(()=>{let r=Fs(t);if(!r)return;r.getSource(e)===n&&r.removeSource(e)})}function bE(t){let e=t[0],n,r,i=xE(t);return{c(){i.c(),n=Hi()},m(s,c){i.m(s,c),xe(s,n,c),r=!0},p(s,c){c&1&&Ut(e,e=s[0])?(Un(),ye(i,1,1,Pt),jn(),i=xE(s),i.c(),ue(i,1),i.m(n.parentNode,n)):i.p(s,c)},i(s){r||(ue(i),r=!0)},o(s){ye(i),r=!1},d(s){s&&be(n),i.d(s)}}}function xE(t){let e;const n=t[15].default,r=Sr(n,t,t[14],null);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&16384)&&Ir(r,n,i,i[14],e?Er(n,i[14],s,null):Cr(i[14]),null)},i(i){e||(ue(r,i),e=!0)},o(i){ye(r,i),e=!1},d(i){r&&r.d(i)}}}function L8(t){let e,n,r=t[0]&&bE(t);return{c(){r&&r.c(),e=Hi()},m(i,s){r&&r.m(i,s),xe(i,e,s),n=!0},p(i,[s]){i[0]?r?(r.p(i,s),s&1&&ue(r,1)):(r=bE(i),r.c(),ue(r,1),r.m(e.parentNode,e)):r&&(Un(),ye(r,1,1,()=>{r=null}),jn())},i(i){n||(ue(r),n=!0)},o(i){ye(r),n=!1},d(i){i&&be(e),r&&r.d(i)}}}function P8(t,e,n){let r,i,s,{$$slots:c={},$$scope:l}=e,{id:d=Mm("geojson")}=e,{data:v}=e,{generateId:S=!1}=e,{promoteId:E=void 0}=e,{filter:C=void 0}=e,{lineMetrics:M=void 0}=e,{cluster:A=void 0}=e;const{map:R,cluster:z,self:U}=f8();mt(t,R,H=>n(13,i=H)),mt(t,z,H=>n(16,s=H)),mt(t,U,H=>n(0,r=H));let F,G=!0;return ro(()=>{r&&F&&i&&(T8(R,r,F),Ft(U,r=null,r),n(11,F=void 0))}),t.$$set=H=>{"id"in H&&n(4,d=H.id),"data"in H&&n(5,v=H.data),"generateId"in H&&n(6,S=H.generateId),"promoteId"in H&&n(7,E=H.promoteId),"filter"in H&&n(8,C=H.filter),"lineMetrics"in H&&n(9,M=H.lineMetrics),"cluster"in H&&n(10,A=H.cluster),"$$scope"in H&&n(14,l=H.$$scope)},t.$$.update=()=>{t.$$.dirty&1024&&Ft(z,s=A,s),t.$$.dirty&12273&&i&&r!==d&&(Ft(U,r=d,r),C8(i,r,Xc({type:"geojson",data:v,filter:C,lineMetrics:M,generateId:S,promoteId:E,cluster:!!A,clusterMinPoints:A==null?void 0:A.minPoints,clusterMaxZoom:A==null?void 0:A.maxZoom,clusterRadius:A==null?void 0:A.radius,clusterProperties:A==null?void 0:A.properties}),H=>i&&H===r,()=>{r&&(n(11,F=i==null?void 0:i.getSource(r)),n(12,G=!0))})),t.$$.dirty&8208&&(i==null||i.on("style.load",()=>{n(11,F=i==null?void 0:i.getSource(d))})),t.$$.dirty&6176&&F&&(G?n(12,G=!1):F.setData(v)),t.$$.dirty&3072&&(F==null||F.setClusterOptions(Xc({cluster:!!A,clusterMaxZoom:A==null?void 0:A.maxZoom,clusterRadius:A==null?void 0:A.radius})))},[r,R,z,U,d,v,S,E,C,M,A,F,G,i,l,c]}class M8 extends Yt{constructor(e){super(),Xt(this,e,P8,L8,Ut,{id:4,data:5,generateId:6,promoteId:7,filter:8,lineMetrics:9,cluster:10})}}function A8(t){let e;const n=t[15].default,r=Sr(n,t,t[23],null);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&8388608)&&Ir(r,n,i,i[23],e?Er(n,i[23],s,null):Cr(i[23]),null)},i(i){e||(ue(r,i),e=!0)},o(i){ye(r,i),e=!1},d(i){r&&r.d(i)}}}function k8(t){let e,n,r;function i(c){t[16](c)}let s={id:t[1],type:"line",source:t[2],sourceLayer:t[3],beforeId:t[4],beforeLayerType:t[5],paint:t[6],layout:t[7],filter:t[8],minzoom:t[9],maxzoom:t[10],hoverCursor:t[11],manageHoverState:t[12],eventsIfTopMost:t[13],interactive:t[14],$$slots:{default:[A8]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.hovered=t[0]),e=new gb({props:s}),ai.push(()=>Il(e,"hovered",i)),e.$on("click",t[17]),e.$on("dblclick",t[18]),e.$on("contextmenu",t[19]),e.$on("mouseenter",t[20]),e.$on("mousemove",t[21]),e.$on("mouseleave",t[22]),{c(){Ge(e.$$.fragment)},m(c,l){Ue(e,c,l),r=!0},p(c,[l]){const d={};l&2&&(d.id=c[1]),l&4&&(d.source=c[2]),l&8&&(d.sourceLayer=c[3]),l&16&&(d.beforeId=c[4]),l&32&&(d.beforeLayerType=c[5]),l&64&&(d.paint=c[6]),l&128&&(d.layout=c[7]),l&256&&(d.filter=c[8]),l&512&&(d.minzoom=c[9]),l&1024&&(d.maxzoom=c[10]),l&2048&&(d.hoverCursor=c[11]),l&4096&&(d.manageHoverState=c[12]),l&8192&&(d.eventsIfTopMost=c[13]),l&16384&&(d.interactive=c[14]),l&8388608&&(d.$$scope={dirty:l,ctx:c}),!n&&l&1&&(n=!0,d.hovered=c[0],El(()=>n=!1)),e.$set(d)},i(c){r||(ue(e.$$.fragment,c),r=!0)},o(c){ye(e.$$.fragment,c),r=!1},d(c){je(e,c)}}}function D8(t,e,n){let{$$slots:r={},$$scope:i}=e,{id:s=Mm("line")}=e,{source:c=void 0}=e,{sourceLayer:l=void 0}=e,{beforeId:d=void 0}=e,{beforeLayerType:v=void 0}=e,{paint:S}=e,{layout:E=void 0}=e,{filter:C=void 0}=e,{minzoom:M=void 0}=e,{maxzoom:A=void 0}=e,{hoverCursor:R=void 0}=e,{manageHoverState:z=!1}=e,{hovered:U=null}=e,{eventsIfTopMost:F=!1}=e,{interactive:G=!0}=e;function H(Y){U=Y,n(0,U)}function te(Y){gn.call(this,t,Y)}function ee(Y){gn.call(this,t,Y)}function fe(Y){gn.call(this,t,Y)}function pe(Y){gn.call(this,t,Y)}function se(Y){gn.call(this,t,Y)}function Ae(Y){gn.call(this,t,Y)}return t.$$set=Y=>{"id"in Y&&n(1,s=Y.id),"source"in Y&&n(2,c=Y.source),"sourceLayer"in Y&&n(3,l=Y.sourceLayer),"beforeId"in Y&&n(4,d=Y.beforeId),"beforeLayerType"in Y&&n(5,v=Y.beforeLayerType),"paint"in Y&&n(6,S=Y.paint),"layout"in Y&&n(7,E=Y.layout),"filter"in Y&&n(8,C=Y.filter),"minzoom"in Y&&n(9,M=Y.minzoom),"maxzoom"in Y&&n(10,A=Y.maxzoom),"hoverCursor"in Y&&n(11,R=Y.hoverCursor),"manageHoverState"in Y&&n(12,z=Y.manageHoverState),"hovered"in Y&&n(0,U=Y.hovered),"eventsIfTopMost"in Y&&n(13,F=Y.eventsIfTopMost),"interactive"in Y&&n(14,G=Y.interactive),"$$scope"in Y&&n(23,i=Y.$$scope)},[U,s,c,l,d,v,S,E,C,M,A,R,z,F,G,r,H,te,ee,fe,pe,se,Ae,i]}class R8 extends Yt{constructor(e){super(),Xt(this,e,D8,k8,Ut,{id:1,source:2,sourceLayer:3,beforeId:4,beforeLayerType:5,paint:6,layout:7,filter:8,minzoom:9,maxzoom:10,hoverCursor:11,manageHoverState:12,hovered:0,eventsIfTopMost:13,interactive:14})}}function N8(t){let e,n,r,i,s,c;return e=new I8({props:{id:"edit-polygon-fill",filter:e8,paint:{"fill-color":"red","fill-opacity":["case",["boolean",["get","hover"],"false"],1,.5]}}}),r=new R8({props:{id:"edit-polygon-lines",filter:t8,paint:{"line-color":"black","line-width":8,"line-opacity":.5}}}),s=new x8({props:{id:"edit-polygon-vertices",filter:n8,paint:{"circle-color":"black","circle-opacity":["case",["has","hovered"],1,.5],"circle-radius":10}}}),{c(){Ge(e.$$.fragment),n=We(),Ge(r.$$.fragment),i=We(),Ge(s.$$.fragment)},m(l,d){Ue(e,l,d),xe(l,n,d),Ue(r,l,d),xe(l,i,d),Ue(s,l,d),c=!0},p:Pt,i(l){c||(ue(e.$$.fragment,l),ue(r.$$.fragment,l),ue(s.$$.fragment,l),c=!0)},o(l){ye(e.$$.fragment,l),ye(r.$$.fragment,l),ye(s.$$.fragment,l),c=!1},d(l){l&&(be(n),be(i)),je(e,l),je(r,l),je(s,l)}}}function O8(t){let e,n;return e=new M8({props:{data:t[0],$$slots:{default:[N8]},$$scope:{ctx:t}}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,[i]){const s={};i&1&&(s.data=r[0]),i&2&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function z8(t,e,n){let r;return mt(t,BT,i=>n(0,r=i)),[r]}class F8 extends Yt{constructor(e){super(),Xt(this,e,z8,O8,Ut,{})}}function B8(t){let e,n,r,i,s,c,l;return{c(){e=_e("button"),e.textContent="Import current view",n=We(),r=_e("i"),r.textContent="or...",i=We(),s=_e("button"),s.textContent="Draw an area to import on the map",Ie(e,"type","button"),Ie(s,"type","button")},m(d,v){xe(d,e,v),xe(d,n,v),xe(d,r,v),xe(d,i,v),xe(d,s,v),c||(l=[Lt(e,"click",t[2]),Lt(s,"click",t[3])],c=!0)},p:Pt,i:Pt,o:Pt,d(d){d&&(be(e),be(n),be(r),be(i),be(s)),c=!1,Kr(l)}}}function V8(t){let e,n;return e=new u8({props:{polygonTool:t[0]}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,i){const s={};i&1&&(s.polygonTool=r[0]),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function U8(t){let e,n,r,i,s,c,l,d,v;const S=[V8,B8],E=[];function C(M,A){return M[0]?0:1}return e=C(t),n=E[e]=S[e](t),{c(){n.c(),r=We(),i=_e("label"),s=_e("input"),c=st(`Save a copy of the osm.xml - after importing`),Ie(s,"type","checkbox")},m(M,A){E[e].m(M,A),xe(M,r,A),xe(M,i,A),oe(i,s),s.checked=t[1],oe(i,c),l=!0,d||(v=Lt(s,"change",t[5]),d=!0)},p(M,[A]){let R=e;e=C(M),e===R?E[e].p(M,A):(Un(),ye(E[R],1,1,()=>{E[R]=null}),jn(),n=E[e],n?n.p(M,A):(n=E[e]=S[e](M),n.c()),ue(n,1),n.m(r.parentNode,r)),A&2&&(s.checked=M[1])},i(M){l||(ue(n),l=!0)},o(M){ye(n),l=!1},d(M){M&&(be(r),be(i)),E[e].d(M),d=!1,v()}}}function Id(t){return[t.lng,t.lat]}function j8(t,e,n){let{map:r}=e;const i=vu();let s=null,c=!1;async function l(C){try{i("loading","Loading from Overpass");let A=await(await fetch(GT(C))).text();c&&p_("osm.xml",A),i("gotXml",{xml:A,boundary:C})}catch(M){i("error",M.toString())}}function d(){let C=r.getBounds();return{type:"Feature",properties:{},geometry:{coordinates:[[Id(C.getSouthWest()),Id(C.getNorthWest()),Id(C.getNorthEast()),Id(C.getSouthEast()),Id(C.getSouthWest())]],type:"Polygon"}}}async function v(){if(r){if(r.getZoom()<13){i("error","Zoom in more to import");return}await l(d())}}function S(){r&&(n(0,s=new i8(r)),s.startNew(),s.addEventListenerSuccess(async C=>{n(0,s=null),await l(C)}),s.addEventListenerFailure(()=>{n(0,s=null)}))}function E(){c=this.checked,n(1,c)}return t.$$set=C=>{"map"in C&&n(4,r=C.map)},[s,c,v,S,r,E]}class G8 extends Yt{constructor(e){super(),Xt(this,e,j8,U8,Ut,{map:4})}}function GT(t){let e='poly:"';for(let[r,i]of t.geometry.coordinates[0])e+=`${i} ${r} `;return e=e.slice(0,-1)+'"',`https://overpass-api.de/api/interpreter?data=${`(nwr(${e}); node(w)->.x; <;); out meta;`}`}async function h1(t){Ku.set(t);try{let e=JSON.parse(window.localStorage.getItem(t));console.time("get OSM input");let[n,r]=await q8(e);console.timeEnd("get OSM input"),console.time("load"),ji.set(new WE(new Uint8Array(n),r,e.study_area_name||void 0)),Fs(ji).loadSavefile(e),console.timeEnd("load"),qT()}catch(e){window.alert(`Couldn't open project: ${e}`),Ku.set("")}}async function q8(t){if(t.study_area_name){let e=Fs(Qd)?`/osm/${t.study_area_name}.pbf`:`https://assets.od2net.org/severance_pbfs/${t.study_area_name}.pbf`;console.log(`Grabbing ${e}`);let r=await(await fetch(e)).arrayBuffer(),i=Fs(Qd)?`/boundaries/${t.study_area_name}.geojson`:`https://assets.od2net.org/boundaries/${t.study_area_name}.geojson`,c=await(await fetch(i)).json();return[r,c]}else{console.log("Grabbing from Overpass");let e=t.features.find(i=>i.properties.kind=="study_area_boundary");return[await(await fetch(GT(e))).arrayBuffer(),e]}}function qT(){xn.set({mode:"network"}),D_.set(new xR(Fs(uu),Fs(ji).toRouteSnapper(),NT,xB,OT)),K_.set(!1),J_.set({type:"FeatureCollection",features:[]}),Fs(uu).fitBounds(Array.from(Fs(ji).getBounds()),{animate:!1}),Uv.set(wE()),jv.set(wE())}function wE(){let t=Fs(ji).getBounds(),e=t[0]+Math.random()*(t[2]-t[0]),n=t[1]+Math.random()*(t[3]-t[1]);return new ry.LngLat(e,n)}function SE(t,e,n){const r=t.slice();return r[19]=e[n],r}function W8(t){let e;return{c(){e=_e("div"),e.innerHTML='',Ie(e,"slot","top")},m(n,r){xe(n,e,r)},p:Pt,d(n){n&&be(e)}}}function H8(t){let e;return{c(){e=_e("p"),e.textContent="Waiting for MapLibre and WASM to load..."},m(n,r){xe(n,e,r)},p:Pt,i:Pt,o:Pt,d(n){n&&be(e)}}}function Z8(t){let e,n,r,i,s,c,l,d,v,S,E,C,M;n=new or({props:{$$slots:{default:[X8]},$$scope:{ctx:t}}}),n.$on("click",t[11]);let A=bs(t[2]),R=[];for(let U=0;Uye(R[U],1,1,()=>{R[U]=null});return{c(){e=_e("div"),Ge(n.$$.fragment),r=We(),i=_e("p"),i.textContent="Load a saved project:",s=We(),c=_e("ul");for(let U=0;U{c[S]=null}),jn(),r=c[n],r?r.p(d,v):(r=c[n]=s[n](d),r.c()),ue(r,1),r.m(e,null))},i(d){i||(ue(r),i=!0)},o(d){ye(r),i=!1},d(d){d&&be(e),c[n].d()}}}function K8(t){let e,n,r,i;return e=new jE({props:{loading:t[1]}}),r=new bu({props:{$$slots:{sidebar:[$8],top:[W8]},$$scope:{ctx:t}}}),{c(){Ge(e.$$.fragment),n=We(),Ge(r.$$.fragment)},m(s,c){Ue(e,s,c),xe(s,n,c),Ue(r,s,c),i=!0},p(s,[c]){const l={};c&2&&(l.loading=s[1]),e.$set(l);const d={};c&4194429&&(d.$$scope={dirty:c,ctx:s}),r.$set(d)},i(s){i||(ue(e.$$.fragment,s),ue(r.$$.fragment,s),i=!0)},o(s){ye(e.$$.fragment,s),ye(r.$$.fragment,s),i=!1},d(s){s&&be(n),je(e,s),je(r,s)}}}function Yg(){let t=[];for(let e=0;en(16,r=ee)),mt(t,D_,ee=>n(17,i=ee)),mt(t,ji,ee=>n(18,s=ee)),mt(t,uu,ee=>n(4,c=ee)),mt(t,xn,ee=>n(5,l=ee)),mt(t,Jd,ee=>n(6,d=ee));let{wasmReady:v}=e,S="";Ft(ji,s=null,s),Ft(D_,i=null,i),Ft(Ku,r="",r);let E=Yg(),C;async function M(ee){let fe="ltn_"+C.files[0].name;n(1,S=`Loading from file ${fe}`),window.localStorage.setItem(fe,await C.files[0].text()),n(2,E=Yg()),await h1(fe),n(1,S="")}function A(ee){window.confirm(`Really delete project ${ee}? You can't undo this.`)&&(window.localStorage.removeItem(ee),n(2,E=Yg()))}function R(ee){let fe=window.prompt(`Rename project ${ee} to what?`,ee);if(fe){fe.startsWith("ltn_")||(fe=`ltn_${fe}`);let pe=window.localStorage.getItem(ee);window.localStorage.setItem(fe,pe),window.localStorage.removeItem(ee),n(2,E=Yg())}}async function z(ee){n(1,S=`Loading project ${ee}`),await h1(ee),n(1,S="")}const U=()=>Ft(xn,l={mode:"new-project"},l),F=ee=>z(ee),G=ee=>R(ee),H=ee=>A(ee);function te(ee){ai[ee?"unshift":"push"](()=>{C=ee,n(3,C)})}return t.$$set=ee=>{"wasmReady"in ee&&n(0,v=ee.wasmReady)},[v,S,E,C,c,l,d,M,A,R,z,U,F,G,H,te]}class Q8 extends Yt{constructor(e){super(),Xt(this,e,J8,K8,Ut,{wasmReady:0})}}function IE(t,e,n){const r=t.slice();return r[17]=e[n][0],r[18]=e[n][1],r}function CE(t,e,n){const r=t.slice();return r[21]=e[n][0],r[22]=e[n][1],r}function e7(t){let e;return{c(){e=st("Choose project")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function t7(t){let e,n,r,i,s,c,l,d;return s=new or({props:{$$slots:{default:[e7]},$$scope:{ctx:t}}}),s.$on("click",t[13]),{c(){e=_e("div"),n=_e("nav"),r=_e("ul"),i=_e("li"),Ge(s.$$.fragment),c=We(),l=_e("li"),l.textContent="New project",Ie(n,"aria-label","breadcrumb"),Ie(e,"slot","top")},m(v,S){xe(v,e,S),oe(e,n),oe(n,r),oe(r,i),Ue(s,i,null),oe(r,c),oe(r,l),d=!0},p(v,S){const E={};S&33554432&&(E.$$scope={dirty:S,ctx:v}),s.$set(E)},i(v){d||(ue(s.$$.fragment,v),d=!0)},o(v){ye(s.$$.fragment,v),d=!1},d(v){v&&be(e),je(s)}}}function TE(t){let e,n,r,i,s,c,l,d,v,S,E,C,M,A;e=new jE({props:{loading:t[4]}});let R=bs(t[3]),z=[];for(let U=0;Ut[9].call(s))},m(U,F){Ue(e,U,F),xe(U,n,F),xe(U,r,F),oe(r,i),oe(r,s),oe(s,c);for(let G=0;G{S=null}),jn())},i(E){l||(ue(S),l=!0)},o(E){ye(S),l=!1},d(E){E&&be(e),S&&S.d(),d=!1,v()}}}function r7(t){let e,n,r;return n=new F8({}),{c(){e=_e("div"),Ge(n.$$.fragment),Ie(e,"slot","map")},m(i,s){xe(i,e,s),Ue(n,e,null),r=!0},p:Pt,i(i){r||(ue(n.$$.fragment,i),r=!0)},o(i){ye(n.$$.fragment,i),r=!1},d(i){i&&be(e),je(n)}}}function i7(t){let e,n;return e=new bu({props:{$$slots:{map:[r7],sidebar:[n7],top:[t7]},$$scope:{ctx:t}}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,[i]){const s={};i&33554558&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function o7(t,e,n){let r,i,s,c,l;mt(t,Ku,H=>n(14,r=H)),mt(t,ji,H=>n(15,i=H)),mt(t,Qd,H=>n(16,s=H)),mt(t,uu,H=>n(5,c=H)),mt(t,xn,H=>n(6,l=H));let d="",v="",S=[],E="";ey(async()=>{let H=await fetch(s?"/osm/areas.json":"https://assets.od2net.org/severance_pbfs/areas.json");n(3,S=await H.json())});function C(H){n(4,E="Loading OSM");try{Ft(ji,i=new WE(new TextEncoder().encode(H.detail.xml),H.detail.boundary,void 0),i),Ft(Ku,r=`ltn_${d}`,r),qT(),Rf()}catch(te){window.alert(`Couldn't import from Overpass: ${te}`)}n(4,E="")}async function M(){if(v=="")return;let H=`ltn_${d}`;window.localStorage.setItem(H,JSON.stringify({type:"FeatureCollection",features:[],study_area_name:v})),n(4,E=`Loading pre-clipped OSM area ${v}`),await h1(H),n(4,E="")}function A(){d=this.value,n(1,d)}function R(){v=OE(this),n(2,v),n(3,S)}return[M,d,v,S,E,c,l,C,A,R,()=>M(),H=>n(4,E=H.detail),H=>window.alert(H.detail),()=>Ft(xn,l={mode:"title"},l)]}class s7 extends Yt{constructor(e){super(),Xt(this,e,o7,i7,Ut,{loadExample:0})}get loadExample(){return this.$$.ctx[0]}}const{window:a7}=f1;function l7(t){let e;return{c(){e=st("Choose project")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function u7(t){let e;return{c(){e=st("Pick neighbourhood")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function c7(t){let e;return{c(){e=st("Editing")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function h7(t){let e,n,r,i,s,c,l,d,v,S,E,C,M,A;return s=new or({props:{$$slots:{default:[l7]},$$scope:{ctx:t}}}),s.$on("click",t[9]),d=new or({props:{$$slots:{default:[u7]},$$scope:{ctx:t}}}),d.$on("click",t[10]),E=new or({props:{$$slots:{default:[c7]},$$scope:{ctx:t}}}),E.$on("click",t[5]),{c(){e=_e("div"),n=_e("nav"),r=_e("ul"),i=_e("li"),Ge(s.$$.fragment),c=We(),l=_e("li"),Ge(d.$$.fragment),v=We(),S=_e("li"),Ge(E.$$.fragment),C=We(),M=_e("li"),M.textContent="Viewing shortcuts",Ie(n,"aria-label","breadcrumb"),Ie(e,"slot","top")},m(R,z){xe(R,e,z),oe(e,n),oe(n,r),oe(r,i),Ue(s,i,null),oe(r,c),oe(r,l),Ue(d,l,null),oe(r,v),oe(r,S),Ue(E,S,null),oe(r,C),oe(r,M),A=!0},p(R,z){const U={};z&8192&&(U.$$scope={dirty:z,ctx:R}),s.$set(U);const F={};z&8192&&(F.$$scope={dirty:z,ctx:R}),d.$set(F);const G={};z&8192&&(G.$$scope={dirty:z,ctx:R}),E.$set(G)},i(R){A||(ue(s.$$.fragment,R),ue(d.$$.fragment,R),ue(E.$$.fragment,R),A=!0)},o(R){ye(s.$$.fragment,R),ye(d.$$.fragment,R),ye(E.$$.fragment,R),A=!1},d(R){R&&be(e),je(s),je(d),je(E)}}}function f7(t){let e,n,r,i,s,c,l,d,v,S=t[0].shortcutIndex+1+"",E,C,M=t[0].gj.features.length+"",A,R,z,U,F,G,H,te,ee,fe=Rr(t[0].gj.features[t[0].shortcutIndex].properties).directness.toFixed(1)+"",pe,se,Ae,Y,ae;return{c(){e=_e("p"),e.textContent=`This shows all possible shortcuts crossing the blue road you've chosen. + to cancel`,c.disabled=l=t[1]==0,sr(e,"display","flex"),sr(e,"justify-content","space-between")},m(R,z){xe(R,e,z),oe(e,n),oe(e,r),oe(e,i),oe(e,s),oe(e,c),A.m(c,null),xe(R,d,z),xe(R,v,z),S||(E=[Lt(n,"click",t[2]),Lt(i,"click",t[3]),Lt(c,"click",t[4])],S=!0)},p(R,[z]){M===(M=C(R))&&A?A.p(R,z):(A.d(1),A=M(R),A&&(A.c(),A.m(c,null))),z&2&&l!==(l=R[1]==0)&&(c.disabled=l)},i:Pt,o:Pt,d(R){R&&(be(e),be(d),be(v)),A.d(),S=!1,Hr(E)}}}function c8(t,e,n){let r;mt(t,jT,d=>n(1,r=d));let{polygonTool:i}=e;const s=()=>i.finish(),c=()=>i.cancel(),l=()=>i.undo();return t.$$set=d=>{"polygonTool"in d&&n(0,i=d.polygonTool)},[i,r,s,c,l]}class h8 extends Yt{constructor(e){super(),Xt(this,e,c8,u8,Ut,{polygonTool:0})}}let f8=Date.now();function Mm(t){return`${t}-${f8++}`}const GT=Symbol.for("svelte-maplibre");function p8(){return BE(GT)}function yE(t){return{subscribe:t.subscribe}}function qT({key:t,setPopupTarget:e=!1,setCluster:n=!1,setMouseEvent:r=!1}){let i=p8(),s=Nn(null),c=yE(s),l={...i,[t]:yE(s)};if(e&&(l.popupTarget=c),r){let d=Nn(null);l.layerEvent=d,i.layerEvent=d}return n&&(l.cluster=Nn()),g1(GT,l),{...i,self:s}}function d8(){return qT({key:"source",setCluster:!0})}function m8(t=!0){return qT({key:"layer",setPopupTarget:t,setMouseEvent:t})}function vE(t){let e;return n=>{if(n)for(let r in n){let i=e==null?void 0:e[r],s=n[r];i!==s&&t(r,s,i)}else if(e)for(let r in e)t(r,void 0,e[r]);e=n}}function g8(t,...e){let n=[t];for(let r of e)if(r)Array.isArray(r)&&r[0]===t?n.push(...r.slice(1)):n.push(r);else continue;if(n.length!==1)return n.length===2?n[1]:n}function _8(t){return t===!0?["has","point_count"]:t===!1?["!",["has","point_count"]]:void 0}function bE(t){let e=t[0],n,r,i=xE(t);return{c(){i.c(),n=Hi()},m(s,c){i.m(s,c),xe(s,n,c),r=!0},p(s,c){c[0]&1&&Ut(e,e=s[0])?(Un(),ye(i,1,1,Pt),jn(),i=xE(s),i.c(),ue(i,1),i.m(n.parentNode,n)):i.p(s,c)},i(s){r||(ue(i),r=!0)},o(s){ye(i),r=!1},d(s){s&&be(n),i.d(s)}}}function xE(t){let e;const n=t[36].default,r=Sr(n,t,t[35],null);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s[1]&16)&&Ir(r,n,i,i[35],e?Er(n,i[35],s,null):Cr(i[35]),null)},i(i){e||(ue(r,i),e=!0)},o(i){ye(r,i),e=!1},d(i){r&&r.d(i)}}}function y8(t){let e,n,r=t[0]&&bE(t);return{c(){r&&r.c(),e=Hi()},m(i,s){r&&r.m(i,s),xe(i,e,s),n=!0},p(i,s){i[0]?r?(r.p(i,s),s[0]&1&&ue(r,1)):(r=bE(i),r.c(),ue(r,1),r.m(e.parentNode,e)):r&&(Un(),ye(r,1,1,()=>{r=null}),jn())},i(i){n||(ue(r),n=!0)},o(i){ye(r),n=!1},d(i){i&&be(e),r&&r.d(i)}}}function v8(t,e,n){let r,i,s,c,l,d,v,S,E,C,M,A,{$$slots:R={},$$scope:z}=e,{id:U=Mm("layer")}=e,{source:F=void 0}=e,{sourceLayer:G=void 0}=e,{beforeId:H=void 0}=e,{beforeLayerType:te=void 0}=e,{type:ee}=e,{paint:fe=void 0}=e,{layout:pe=void 0}=e,{filter:se=void 0}=e,{applyToClusters:Ae=void 0}=e,{minzoom:Y=void 0}=e,{maxzoom:ae=void 0}=e,{manageHoverState:Ke=!1}=e,{hovered:Le=null}=e,{interactive:tt=!0}=e,{hoverCursor:ut=void 0}=e,{eventsIfTopMost:He=!1}=e;const Ot=vu(),{map:Gt,source:vt,self:At,minzoom:Mt,maxzoom:rn,eventTopMost:wn,layerInfo:fn}=m8();mt(t,Gt,ne=>n(31,E=ne)),mt(t,vt,ne=>n(32,C=ne)),mt(t,At,ne=>n(0,S=ne)),mt(t,Mt,ne=>n(34,A=ne)),mt(t,rn,ne=>n(33,M=ne)),ro(()=>{S&&E&&(fn.delete(S),E==null||E.removeLayer(S))});let _n;function pn(ne){var Re,It;if(!tt||!S||!E||He&&wn(ne)!==S)return;let Me=ne.features??[],dt=(It=(Re=Me[0])==null?void 0:Re.properties)==null?void 0:It.cluster_id,en={event:ne,map:E,clusterId:dt,layer:S,source:l,features:Me};Ot(ne.type,en)}function Yn(ne){var Re,It;if(!tt||!S||!E||He&&wn(ne)!==S)return;ut&&(E.getCanvas().style.cursor=ut);let Me=ne.features??[];n(6,Le=Me[0]??null);let dt=(It=(Re=Me[0])==null?void 0:Re.properties)==null?void 0:It.cluster_id;Ot("mouseenter",{event:ne,map:E,clusterId:dt,layer:S,source:l,features:Me})}function zr(ne){var Re,It,Cn;if(!tt||!E)return;if(He&&wn(ne)!==S){n(6,Le=null),Ke&&_n!==void 0&&(E==null||E.setFeatureState({source:l,sourceLayer:G,id:_n},{hover:!1}),_n=void 0);return}E.getCanvas().style.cursor=ut;let Me=ne.features??[],dt=(It=(Re=Me[0])==null?void 0:Re.properties)==null?void 0:It.cluster_id,en=(Cn=Me[0])==null?void 0:Cn.id;en!==_n&&(Ke&&(_n!==void 0&&(E==null||E.setFeatureState({source:l,id:_n,sourceLayer:G},{hover:!1})),E==null||E.setFeatureState({source:l,id:en,sourceLayer:G},{hover:!0})),_n=en,n(6,Le=Me[0]??null)),Ot("mousemove",{event:ne,map:E,clusterId:dt,layer:S,source:l,features:Me})}function Pn(ne){if(!(!tt||!S||!E)){if(ut&&(E.getCanvas().style.cursor=""),n(6,Le=null),Ke&&_n!==void 0){const Me={source:l,id:_n,sourceLayer:G};E==null||E.setFeatureState(Me,{hover:!1}),_n=void 0}Ot("mouseleave",{map:E,layer:S,source:l})}}let ar=!0;function Zn(ne){E&&(E.off("click",ne,pn),E.off("dblclick",ne,pn),E.off("contextmenu",ne,pn),E.off("mouseenter",ne,Yn),E.off("mousemove",ne,zr),E.off("mouseleave",ne,Pn))}return ro(()=>{E&&S&&Zn(S)}),t.$$set=ne=>{"id"in ne&&n(7,U=ne.id),"source"in ne&&n(8,F=ne.source),"sourceLayer"in ne&&n(9,G=ne.sourceLayer),"beforeId"in ne&&n(10,H=ne.beforeId),"beforeLayerType"in ne&&n(11,te=ne.beforeLayerType),"type"in ne&&n(12,ee=ne.type),"paint"in ne&&n(13,fe=ne.paint),"layout"in ne&&n(14,pe=ne.layout),"filter"in ne&&n(15,se=ne.filter),"applyToClusters"in ne&&n(16,Ae=ne.applyToClusters),"minzoom"in ne&&n(17,Y=ne.minzoom),"maxzoom"in ne&&n(18,ae=ne.maxzoom),"manageHoverState"in ne&&n(19,Ke=ne.manageHoverState),"hovered"in ne&&n(6,Le=ne.hovered),"interactive"in ne&&n(20,tt=ne.interactive),"hoverCursor"in ne&&n(21,ut=ne.hoverCursor),"eventsIfTopMost"in ne&&n(22,He=ne.eventsIfTopMost),"$$scope"in ne&&n(35,z=ne.$$scope)},t.$$.update=()=>{if(t.$$.dirty[0]&65536&&n(30,r=_8(Ae)),t.$$.dirty[0]&1073774592&&n(24,i=g8("all",r,se)),t.$$.dirty[0]&131072|t.$$.dirty[1]&8&&n(26,s=Y??A),t.$$.dirty[0]&262144|t.$$.dirty[1]&4&&n(25,c=ae??M),t.$$.dirty[0]&256|t.$$.dirty[1]&2&&n(29,l=F||C),t.$$.dirty[0]&654343809|t.$$.dirty[1]&1&&E&&S!==U&&l){S&&(Zn(S),fn.delete(S));let ne=H;if(!H&&te){let Me=E.getStyle().layers,dt=typeof te=="function"?te:Re=>Re.type===te,en=Me==null?void 0:Me.find(dt);en&&(ne=en.id)}Ft(At,S=U,S),E.addLayer(Xc({id:S,type:ee,source:l,"source-layer":G,filter:i,paint:fe,layout:pe,minzoom:s,maxzoom:c}),ne),n(23,ar=!0),E.on("click",S,pn),E.on("dblclick",S,pn),E.on("contextmenu",S,pn),E.on("mouseenter",S,Yn),E.on("mousemove",S,zr),E.on("mouseleave",S,Pn)}t.$$.dirty[0]&1048577&&S&&fn.set(S,{interactive:tt}),t.$$.dirty[0]&1|t.$$.dirty[1]&1&&n(28,d=S?vE((ne,Me)=>E==null?void 0:E.setPaintProperty(S,ne,Me)):void 0),t.$$.dirty[0]&1|t.$$.dirty[1]&1&&n(27,v=S?vE((ne,Me)=>E==null?void 0:E.setLayoutProperty(S,ne,Me)):void 0),t.$$.dirty[0]&268443648&&(d==null||d(fe)),t.$$.dirty[0]&134234112&&(v==null||v(pe)),t.$$.dirty[0]&100663297|t.$$.dirty[1]&1&&S&&(E==null||E.setLayerZoomRange(S,s,c)),t.$$.dirty[0]&25165825|t.$$.dirty[1]&1&&S&&(ar?n(23,ar=!1):E==null||E.setFilter(S,i))},[S,Gt,vt,At,Mt,rn,Le,U,F,G,H,te,ee,fe,pe,se,Ae,Y,ae,Ke,tt,ut,He,ar,i,c,s,v,d,l,r,E,C,M,A,z,R]}class yb extends Yt{constructor(e){super(),Xt(this,e,v8,y8,Ut,{id:7,source:8,sourceLayer:9,beforeId:10,beforeLayerType:11,type:12,paint:13,layout:14,filter:15,applyToClusters:16,minzoom:17,maxzoom:18,manageHoverState:19,hovered:6,interactive:20,hoverCursor:21,eventsIfTopMost:22},null,[-1,-1])}}function b8(t){let e;const n=t[16].default,r=Sr(n,t,t[24],null);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&16777216)&&Ir(r,n,i,i[24],e?Er(n,i[24],s,null):Cr(i[24]),null)},i(i){e||(ue(r,i),e=!0)},o(i){ye(r,i),e=!1},d(i){r&&r.d(i)}}}function x8(t){let e,n,r;function i(c){t[17](c)}let s={id:t[1],type:"circle",source:t[2],sourceLayer:t[3],beforeId:t[4],beforeLayerType:t[5],paint:t[6],layout:t[7],filter:t[8],applyToClusters:t[9],minzoom:t[10],maxzoom:t[11],hoverCursor:t[12],manageHoverState:t[13],eventsIfTopMost:t[14],interactive:t[15],$$slots:{default:[b8]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.hovered=t[0]),e=new yb({props:s}),ai.push(()=>Il(e,"hovered",i)),e.$on("click",t[18]),e.$on("dblclick",t[19]),e.$on("contextmenu",t[20]),e.$on("mouseenter",t[21]),e.$on("mousemove",t[22]),e.$on("mouseleave",t[23]),{c(){Ge(e.$$.fragment)},m(c,l){Ue(e,c,l),r=!0},p(c,[l]){const d={};l&2&&(d.id=c[1]),l&4&&(d.source=c[2]),l&8&&(d.sourceLayer=c[3]),l&16&&(d.beforeId=c[4]),l&32&&(d.beforeLayerType=c[5]),l&64&&(d.paint=c[6]),l&128&&(d.layout=c[7]),l&256&&(d.filter=c[8]),l&512&&(d.applyToClusters=c[9]),l&1024&&(d.minzoom=c[10]),l&2048&&(d.maxzoom=c[11]),l&4096&&(d.hoverCursor=c[12]),l&8192&&(d.manageHoverState=c[13]),l&16384&&(d.eventsIfTopMost=c[14]),l&32768&&(d.interactive=c[15]),l&16777216&&(d.$$scope={dirty:l,ctx:c}),!n&&l&1&&(n=!0,d.hovered=c[0],El(()=>n=!1)),e.$set(d)},i(c){r||(ue(e.$$.fragment,c),r=!0)},o(c){ye(e.$$.fragment,c),r=!1},d(c){je(e,c)}}}function w8(t,e,n){let{$$slots:r={},$$scope:i}=e,{id:s=Mm("circle")}=e,{source:c=void 0}=e,{sourceLayer:l=void 0}=e,{beforeId:d=void 0}=e,{beforeLayerType:v=void 0}=e,{paint:S}=e,{layout:E=void 0}=e,{filter:C=void 0}=e,{applyToClusters:M=void 0}=e,{minzoom:A=void 0}=e,{maxzoom:R=void 0}=e,{hoverCursor:z=void 0}=e,{manageHoverState:U=!1}=e,{hovered:F=null}=e,{eventsIfTopMost:G=!1}=e,{interactive:H=!0}=e;function te(ae){F=ae,n(0,F)}function ee(ae){gn.call(this,t,ae)}function fe(ae){gn.call(this,t,ae)}function pe(ae){gn.call(this,t,ae)}function se(ae){gn.call(this,t,ae)}function Ae(ae){gn.call(this,t,ae)}function Y(ae){gn.call(this,t,ae)}return t.$$set=ae=>{"id"in ae&&n(1,s=ae.id),"source"in ae&&n(2,c=ae.source),"sourceLayer"in ae&&n(3,l=ae.sourceLayer),"beforeId"in ae&&n(4,d=ae.beforeId),"beforeLayerType"in ae&&n(5,v=ae.beforeLayerType),"paint"in ae&&n(6,S=ae.paint),"layout"in ae&&n(7,E=ae.layout),"filter"in ae&&n(8,C=ae.filter),"applyToClusters"in ae&&n(9,M=ae.applyToClusters),"minzoom"in ae&&n(10,A=ae.minzoom),"maxzoom"in ae&&n(11,R=ae.maxzoom),"hoverCursor"in ae&&n(12,z=ae.hoverCursor),"manageHoverState"in ae&&n(13,U=ae.manageHoverState),"hovered"in ae&&n(0,F=ae.hovered),"eventsIfTopMost"in ae&&n(14,G=ae.eventsIfTopMost),"interactive"in ae&&n(15,H=ae.interactive),"$$scope"in ae&&n(24,i=ae.$$scope)},[F,s,c,l,d,v,S,E,C,M,A,R,z,U,G,H,r,te,ee,fe,pe,se,Ae,Y,i]}class S8 extends Yt{constructor(e){super(),Xt(this,e,w8,x8,Ut,{id:1,source:2,sourceLayer:3,beforeId:4,beforeLayerType:5,paint:6,layout:7,filter:8,applyToClusters:9,minzoom:10,maxzoom:11,hoverCursor:12,manageHoverState:13,hovered:0,eventsIfTopMost:14,interactive:15})}}function E8(t){let e;const n=t[15].default,r=Sr(n,t,t[23],null);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&8388608)&&Ir(r,n,i,i[23],e?Er(n,i[23],s,null):Cr(i[23]),null)},i(i){e||(ue(r,i),e=!0)},o(i){ye(r,i),e=!1},d(i){r&&r.d(i)}}}function I8(t){let e,n,r;function i(c){t[16](c)}let s={id:t[1],type:"fill",source:t[2],sourceLayer:t[3],beforeId:t[4],beforeLayerType:t[5],paint:t[6],layout:t[7],filter:t[8],minzoom:t[9],maxzoom:t[10],hoverCursor:t[11],manageHoverState:t[12],eventsIfTopMost:t[13],interactive:t[14],$$slots:{default:[E8]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.hovered=t[0]),e=new yb({props:s}),ai.push(()=>Il(e,"hovered",i)),e.$on("click",t[17]),e.$on("dblclick",t[18]),e.$on("contextmenu",t[19]),e.$on("mouseenter",t[20]),e.$on("mousemove",t[21]),e.$on("mouseleave",t[22]),{c(){Ge(e.$$.fragment)},m(c,l){Ue(e,c,l),r=!0},p(c,[l]){const d={};l&2&&(d.id=c[1]),l&4&&(d.source=c[2]),l&8&&(d.sourceLayer=c[3]),l&16&&(d.beforeId=c[4]),l&32&&(d.beforeLayerType=c[5]),l&64&&(d.paint=c[6]),l&128&&(d.layout=c[7]),l&256&&(d.filter=c[8]),l&512&&(d.minzoom=c[9]),l&1024&&(d.maxzoom=c[10]),l&2048&&(d.hoverCursor=c[11]),l&4096&&(d.manageHoverState=c[12]),l&8192&&(d.eventsIfTopMost=c[13]),l&16384&&(d.interactive=c[14]),l&8388608&&(d.$$scope={dirty:l,ctx:c}),!n&&l&1&&(n=!0,d.hovered=c[0],El(()=>n=!1)),e.$set(d)},i(c){r||(ue(e.$$.fragment,c),r=!0)},o(c){ye(e.$$.fragment,c),r=!1},d(c){je(e,c)}}}function C8(t,e,n){let{$$slots:r={},$$scope:i}=e,{id:s=Mm("fill")}=e,{source:c=void 0}=e,{sourceLayer:l=void 0}=e,{beforeId:d=void 0}=e,{beforeLayerType:v=void 0}=e,{paint:S}=e,{layout:E=void 0}=e,{filter:C=void 0}=e,{minzoom:M=void 0}=e,{maxzoom:A=void 0}=e,{hoverCursor:R=void 0}=e,{manageHoverState:z=!1}=e,{hovered:U=null}=e,{eventsIfTopMost:F=!1}=e,{interactive:G=!0}=e;function H(Y){U=Y,n(0,U)}function te(Y){gn.call(this,t,Y)}function ee(Y){gn.call(this,t,Y)}function fe(Y){gn.call(this,t,Y)}function pe(Y){gn.call(this,t,Y)}function se(Y){gn.call(this,t,Y)}function Ae(Y){gn.call(this,t,Y)}return t.$$set=Y=>{"id"in Y&&n(1,s=Y.id),"source"in Y&&n(2,c=Y.source),"sourceLayer"in Y&&n(3,l=Y.sourceLayer),"beforeId"in Y&&n(4,d=Y.beforeId),"beforeLayerType"in Y&&n(5,v=Y.beforeLayerType),"paint"in Y&&n(6,S=Y.paint),"layout"in Y&&n(7,E=Y.layout),"filter"in Y&&n(8,C=Y.filter),"minzoom"in Y&&n(9,M=Y.minzoom),"maxzoom"in Y&&n(10,A=Y.maxzoom),"hoverCursor"in Y&&n(11,R=Y.hoverCursor),"manageHoverState"in Y&&n(12,z=Y.manageHoverState),"hovered"in Y&&n(0,U=Y.hovered),"eventsIfTopMost"in Y&&n(13,F=Y.eventsIfTopMost),"interactive"in Y&&n(14,G=Y.interactive),"$$scope"in Y&&n(23,i=Y.$$scope)},[U,s,c,l,d,v,S,E,C,M,A,R,z,F,G,r,H,te,ee,fe,pe,se,Ae,i]}class T8 extends Yt{constructor(e){super(),Xt(this,e,C8,I8,Ut,{id:1,source:2,sourceLayer:3,beforeId:4,beforeLayerType:5,paint:6,layout:7,filter:8,minzoom:9,maxzoom:10,hoverCursor:11,manageHoverState:12,hovered:0,eventsIfTopMost:13,interactive:14})}}function L8(t,e,n,r,i){let s=!1;t.getSource(e)&&(s=!0,t.removeSource(e));const c=()=>{r(e)&&(t.addSource(e,n),i())};if(s){const l=()=>{e&&(t.getSource(e)?setTimeout(l,1):c())};l()}else c()}function P8(t,e,n){jE().then(()=>{let r=Fs(t);if(!r)return;r.getSource(e)===n&&r.removeSource(e)})}function wE(t){let e=t[0],n,r,i=SE(t);return{c(){i.c(),n=Hi()},m(s,c){i.m(s,c),xe(s,n,c),r=!0},p(s,c){c&1&&Ut(e,e=s[0])?(Un(),ye(i,1,1,Pt),jn(),i=SE(s),i.c(),ue(i,1),i.m(n.parentNode,n)):i.p(s,c)},i(s){r||(ue(i),r=!0)},o(s){ye(i),r=!1},d(s){s&&be(n),i.d(s)}}}function SE(t){let e;const n=t[15].default,r=Sr(n,t,t[14],null);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&16384)&&Ir(r,n,i,i[14],e?Er(n,i[14],s,null):Cr(i[14]),null)},i(i){e||(ue(r,i),e=!0)},o(i){ye(r,i),e=!1},d(i){r&&r.d(i)}}}function M8(t){let e,n,r=t[0]&&wE(t);return{c(){r&&r.c(),e=Hi()},m(i,s){r&&r.m(i,s),xe(i,e,s),n=!0},p(i,[s]){i[0]?r?(r.p(i,s),s&1&&ue(r,1)):(r=wE(i),r.c(),ue(r,1),r.m(e.parentNode,e)):r&&(Un(),ye(r,1,1,()=>{r=null}),jn())},i(i){n||(ue(r),n=!0)},o(i){ye(r),n=!1},d(i){i&&be(e),r&&r.d(i)}}}function A8(t,e,n){let r,i,s,{$$slots:c={},$$scope:l}=e,{id:d=Mm("geojson")}=e,{data:v}=e,{generateId:S=!1}=e,{promoteId:E=void 0}=e,{filter:C=void 0}=e,{lineMetrics:M=void 0}=e,{cluster:A=void 0}=e;const{map:R,cluster:z,self:U}=d8();mt(t,R,H=>n(13,i=H)),mt(t,z,H=>n(16,s=H)),mt(t,U,H=>n(0,r=H));let F,G=!0;return ro(()=>{r&&F&&i&&(P8(R,r,F),Ft(U,r=null,r),n(11,F=void 0))}),t.$$set=H=>{"id"in H&&n(4,d=H.id),"data"in H&&n(5,v=H.data),"generateId"in H&&n(6,S=H.generateId),"promoteId"in H&&n(7,E=H.promoteId),"filter"in H&&n(8,C=H.filter),"lineMetrics"in H&&n(9,M=H.lineMetrics),"cluster"in H&&n(10,A=H.cluster),"$$scope"in H&&n(14,l=H.$$scope)},t.$$.update=()=>{t.$$.dirty&1024&&Ft(z,s=A,s),t.$$.dirty&12273&&i&&r!==d&&(Ft(U,r=d,r),L8(i,r,Xc({type:"geojson",data:v,filter:C,lineMetrics:M,generateId:S,promoteId:E,cluster:!!A,clusterMinPoints:A==null?void 0:A.minPoints,clusterMaxZoom:A==null?void 0:A.maxZoom,clusterRadius:A==null?void 0:A.radius,clusterProperties:A==null?void 0:A.properties}),H=>i&&H===r,()=>{r&&(n(11,F=i==null?void 0:i.getSource(r)),n(12,G=!0))})),t.$$.dirty&8208&&(i==null||i.on("style.load",()=>{n(11,F=i==null?void 0:i.getSource(d))})),t.$$.dirty&6176&&F&&(G?n(12,G=!1):F.setData(v)),t.$$.dirty&3072&&(F==null||F.setClusterOptions(Xc({cluster:!!A,clusterMaxZoom:A==null?void 0:A.maxZoom,clusterRadius:A==null?void 0:A.radius})))},[r,R,z,U,d,v,S,E,C,M,A,F,G,i,l,c]}class k8 extends Yt{constructor(e){super(),Xt(this,e,A8,M8,Ut,{id:4,data:5,generateId:6,promoteId:7,filter:8,lineMetrics:9,cluster:10})}}function D8(t){let e;const n=t[15].default,r=Sr(n,t,t[23],null);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&8388608)&&Ir(r,n,i,i[23],e?Er(n,i[23],s,null):Cr(i[23]),null)},i(i){e||(ue(r,i),e=!0)},o(i){ye(r,i),e=!1},d(i){r&&r.d(i)}}}function R8(t){let e,n,r;function i(c){t[16](c)}let s={id:t[1],type:"line",source:t[2],sourceLayer:t[3],beforeId:t[4],beforeLayerType:t[5],paint:t[6],layout:t[7],filter:t[8],minzoom:t[9],maxzoom:t[10],hoverCursor:t[11],manageHoverState:t[12],eventsIfTopMost:t[13],interactive:t[14],$$slots:{default:[D8]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.hovered=t[0]),e=new yb({props:s}),ai.push(()=>Il(e,"hovered",i)),e.$on("click",t[17]),e.$on("dblclick",t[18]),e.$on("contextmenu",t[19]),e.$on("mouseenter",t[20]),e.$on("mousemove",t[21]),e.$on("mouseleave",t[22]),{c(){Ge(e.$$.fragment)},m(c,l){Ue(e,c,l),r=!0},p(c,[l]){const d={};l&2&&(d.id=c[1]),l&4&&(d.source=c[2]),l&8&&(d.sourceLayer=c[3]),l&16&&(d.beforeId=c[4]),l&32&&(d.beforeLayerType=c[5]),l&64&&(d.paint=c[6]),l&128&&(d.layout=c[7]),l&256&&(d.filter=c[8]),l&512&&(d.minzoom=c[9]),l&1024&&(d.maxzoom=c[10]),l&2048&&(d.hoverCursor=c[11]),l&4096&&(d.manageHoverState=c[12]),l&8192&&(d.eventsIfTopMost=c[13]),l&16384&&(d.interactive=c[14]),l&8388608&&(d.$$scope={dirty:l,ctx:c}),!n&&l&1&&(n=!0,d.hovered=c[0],El(()=>n=!1)),e.$set(d)},i(c){r||(ue(e.$$.fragment,c),r=!0)},o(c){ye(e.$$.fragment,c),r=!1},d(c){je(e,c)}}}function N8(t,e,n){let{$$slots:r={},$$scope:i}=e,{id:s=Mm("line")}=e,{source:c=void 0}=e,{sourceLayer:l=void 0}=e,{beforeId:d=void 0}=e,{beforeLayerType:v=void 0}=e,{paint:S}=e,{layout:E=void 0}=e,{filter:C=void 0}=e,{minzoom:M=void 0}=e,{maxzoom:A=void 0}=e,{hoverCursor:R=void 0}=e,{manageHoverState:z=!1}=e,{hovered:U=null}=e,{eventsIfTopMost:F=!1}=e,{interactive:G=!0}=e;function H(Y){U=Y,n(0,U)}function te(Y){gn.call(this,t,Y)}function ee(Y){gn.call(this,t,Y)}function fe(Y){gn.call(this,t,Y)}function pe(Y){gn.call(this,t,Y)}function se(Y){gn.call(this,t,Y)}function Ae(Y){gn.call(this,t,Y)}return t.$$set=Y=>{"id"in Y&&n(1,s=Y.id),"source"in Y&&n(2,c=Y.source),"sourceLayer"in Y&&n(3,l=Y.sourceLayer),"beforeId"in Y&&n(4,d=Y.beforeId),"beforeLayerType"in Y&&n(5,v=Y.beforeLayerType),"paint"in Y&&n(6,S=Y.paint),"layout"in Y&&n(7,E=Y.layout),"filter"in Y&&n(8,C=Y.filter),"minzoom"in Y&&n(9,M=Y.minzoom),"maxzoom"in Y&&n(10,A=Y.maxzoom),"hoverCursor"in Y&&n(11,R=Y.hoverCursor),"manageHoverState"in Y&&n(12,z=Y.manageHoverState),"hovered"in Y&&n(0,U=Y.hovered),"eventsIfTopMost"in Y&&n(13,F=Y.eventsIfTopMost),"interactive"in Y&&n(14,G=Y.interactive),"$$scope"in Y&&n(23,i=Y.$$scope)},[U,s,c,l,d,v,S,E,C,M,A,R,z,F,G,r,H,te,ee,fe,pe,se,Ae,i]}class O8 extends Yt{constructor(e){super(),Xt(this,e,N8,R8,Ut,{id:1,source:2,sourceLayer:3,beforeId:4,beforeLayerType:5,paint:6,layout:7,filter:8,minzoom:9,maxzoom:10,hoverCursor:11,manageHoverState:12,hovered:0,eventsIfTopMost:13,interactive:14})}}function z8(t){let e,n,r,i,s,c;return e=new T8({props:{id:"edit-polygon-fill",filter:n8,paint:{"fill-color":"red","fill-opacity":["case",["boolean",["get","hover"],"false"],1,.5]}}}),r=new O8({props:{id:"edit-polygon-lines",filter:r8,paint:{"line-color":"black","line-width":8,"line-opacity":.5}}}),s=new S8({props:{id:"edit-polygon-vertices",filter:i8,paint:{"circle-color":"black","circle-opacity":["case",["has","hovered"],1,.5],"circle-radius":10}}}),{c(){Ge(e.$$.fragment),n=We(),Ge(r.$$.fragment),i=We(),Ge(s.$$.fragment)},m(l,d){Ue(e,l,d),xe(l,n,d),Ue(r,l,d),xe(l,i,d),Ue(s,l,d),c=!0},p:Pt,i(l){c||(ue(e.$$.fragment,l),ue(r.$$.fragment,l),ue(s.$$.fragment,l),c=!0)},o(l){ye(e.$$.fragment,l),ye(r.$$.fragment,l),ye(s.$$.fragment,l),c=!1},d(l){l&&(be(n),be(i)),je(e,l),je(r,l),je(s,l)}}}function F8(t){let e,n;return e=new k8({props:{data:t[0],$$slots:{default:[z8]},$$scope:{ctx:t}}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,[i]){const s={};i&1&&(s.data=r[0]),i&2&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function B8(t,e,n){let r;return mt(t,UT,i=>n(0,r=i)),[r]}class V8 extends Yt{constructor(e){super(),Xt(this,e,B8,F8,Ut,{})}}function U8(t){let e,n,r,i,s,c,l;return{c(){e=_e("button"),e.textContent="Import current view",n=We(),r=_e("i"),r.textContent="or...",i=We(),s=_e("button"),s.textContent="Draw an area to import on the map",Ie(e,"type","button"),Ie(s,"type","button")},m(d,v){xe(d,e,v),xe(d,n,v),xe(d,r,v),xe(d,i,v),xe(d,s,v),c||(l=[Lt(e,"click",t[2]),Lt(s,"click",t[3])],c=!0)},p:Pt,i:Pt,o:Pt,d(d){d&&(be(e),be(n),be(r),be(i),be(s)),c=!1,Hr(l)}}}function j8(t){let e,n;return e=new h8({props:{polygonTool:t[0]}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,i){const s={};i&1&&(s.polygonTool=r[0]),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function G8(t){let e,n,r,i,s,c,l,d,v;const S=[j8,U8],E=[];function C(M,A){return M[0]?0:1}return e=C(t),n=E[e]=S[e](t),{c(){n.c(),r=We(),i=_e("label"),s=_e("input"),c=ot(`Save a copy of the osm.xml + after importing`),Ie(s,"type","checkbox")},m(M,A){E[e].m(M,A),xe(M,r,A),xe(M,i,A),oe(i,s),s.checked=t[1],oe(i,c),l=!0,d||(v=Lt(s,"change",t[5]),d=!0)},p(M,[A]){let R=e;e=C(M),e===R?E[e].p(M,A):(Un(),ye(E[R],1,1,()=>{E[R]=null}),jn(),n=E[e],n?n.p(M,A):(n=E[e]=S[e](M),n.c()),ue(n,1),n.m(r.parentNode,r)),A&2&&(s.checked=M[1])},i(M){l||(ue(n),l=!0)},o(M){ye(n),l=!1},d(M){M&&(be(r),be(i)),E[e].d(M),d=!1,v()}}}function Id(t){return[t.lng,t.lat]}function q8(t,e,n){let{map:r}=e;const i=vu();let s=null,c=!1;async function l(C){try{i("loading","Loading from Overpass");let A=await(await fetch(WT(C))).text();c&&p_("osm.xml",A),i("gotXml",{xml:A,boundary:C})}catch(M){i("error",M.toString())}}function d(){let C=r.getBounds();return{type:"Feature",properties:{},geometry:{coordinates:[[Id(C.getSouthWest()),Id(C.getNorthWest()),Id(C.getNorthEast()),Id(C.getSouthEast()),Id(C.getSouthWest())]],type:"Polygon"}}}async function v(){if(r){if(r.getZoom()<13){i("error","Zoom in more to import");return}await l(d())}}function S(){r&&(n(0,s=new s8(r)),s.startNew(),s.addEventListenerSuccess(async C=>{n(0,s=null),await l(C)}),s.addEventListenerFailure(()=>{n(0,s=null)}))}function E(){c=this.checked,n(1,c)}return t.$$set=C=>{"map"in C&&n(4,r=C.map)},[s,c,v,S,r,E]}class W8 extends Yt{constructor(e){super(),Xt(this,e,q8,G8,Ut,{map:4})}}function WT(t){let e='poly:"';for(let[r,i]of t.geometry.coordinates[0])e+=`${i} ${r} `;return e=e.slice(0,-1)+'"',`https://overpass-api.de/api/interpreter?data=${`(nwr(${e}); node(w)->.x; <;); out meta;`}`}async function p1(t){Ju.set(t);try{let e=JSON.parse(window.localStorage.getItem(t));console.time("get OSM input");let[n,r]=await H8(e);console.timeEnd("get OSM input"),console.time("load"),ji.set(new ZE(new Uint8Array(n),r,e.study_area_name||void 0)),Fs(ji).loadSavefile(e),console.timeEnd("load"),HT()}catch(e){window.alert(`Couldn't open project: ${e}`),Ju.set("")}}async function H8(t){if(t.study_area_name){let e=Fs(Qd)?`/osm/${t.study_area_name}.pbf`:`https://assets.od2net.org/severance_pbfs/${t.study_area_name}.pbf`;console.log(`Grabbing ${e}`);let r=await(await fetch(e)).arrayBuffer(),i=Fs(Qd)?`/boundaries/${t.study_area_name}.geojson`:`https://assets.od2net.org/boundaries/${t.study_area_name}.geojson`,c=await(await fetch(i)).json();return[r,c]}else{console.log("Grabbing from Overpass");let e=t.features.find(i=>i.properties.kind=="study_area_boundary");return[await(await fetch(WT(e))).arrayBuffer(),e]}}function HT(){xn.set({mode:"network"}),D_.set(new wR(Fs(uu),Fs(ji).toRouteSnapper(),zT,xB,FT)),K_.set(!1),J_.set({type:"FeatureCollection",features:[]}),Fs(uu).fitBounds(Array.from(Fs(ji).getBounds()),{animate:!1}),jv.set(EE()),Gv.set(EE())}function EE(){let t=Fs(ji).getBounds(),e=t[0]+Math.random()*(t[2]-t[0]),n=t[1]+Math.random()*(t[3]-t[1]);return new iy.LngLat(e,n)}function IE(t,e,n){const r=t.slice();return r[19]=e[n],r}function Z8(t){let e;return{c(){e=_e("div"),e.innerHTML='',Ie(e,"slot","top")},m(n,r){xe(n,e,r)},p:Pt,d(n){n&&be(e)}}}function X8(t){let e;return{c(){e=_e("p"),e.textContent="Waiting for MapLibre and WASM to load..."},m(n,r){xe(n,e,r)},p:Pt,i:Pt,o:Pt,d(n){n&&be(e)}}}function Y8(t){let e,n,r,i,s,c,l,d,v,S,E,C,M;n=new or({props:{$$slots:{default:[$8]},$$scope:{ctx:t}}}),n.$on("click",t[11]);let A=bs(t[2]),R=[];for(let U=0;Uye(R[U],1,1,()=>{R[U]=null});return{c(){e=_e("div"),Ge(n.$$.fragment),r=We(),i=_e("p"),i.textContent="Load a saved project:",s=We(),c=_e("ul");for(let U=0;U{c[S]=null}),jn(),r=c[n],r?r.p(d,v):(r=c[n]=s[n](d),r.c()),ue(r,1),r.m(e,null))},i(d){i||(ue(r),i=!0)},o(d){ye(r),i=!1},d(d){d&&be(e),c[n].d()}}}function Q8(t){let e,n,r,i;return e=new qE({props:{loading:t[1]}}),r=new bu({props:{$$slots:{sidebar:[J8],top:[Z8]},$$scope:{ctx:t}}}),{c(){Ge(e.$$.fragment),n=We(),Ge(r.$$.fragment)},m(s,c){Ue(e,s,c),xe(s,n,c),Ue(r,s,c),i=!0},p(s,[c]){const l={};c&2&&(l.loading=s[1]),e.$set(l);const d={};c&4194429&&(d.$$scope={dirty:c,ctx:s}),r.$set(d)},i(s){i||(ue(e.$$.fragment,s),ue(r.$$.fragment,s),i=!0)},o(s){ye(e.$$.fragment,s),ye(r.$$.fragment,s),i=!1},d(s){s&&be(n),je(e,s),je(r,s)}}}function Yg(){let t=[];for(let e=0;en(16,r=ee)),mt(t,D_,ee=>n(17,i=ee)),mt(t,ji,ee=>n(18,s=ee)),mt(t,uu,ee=>n(4,c=ee)),mt(t,xn,ee=>n(5,l=ee)),mt(t,Jd,ee=>n(6,d=ee));let{wasmReady:v}=e,S="";Ft(ji,s=null,s),Ft(D_,i=null,i),Ft(Ju,r="",r);let E=Yg(),C;async function M(ee){let fe="ltn_"+C.files[0].name;n(1,S=`Loading from file ${fe}`),window.localStorage.setItem(fe,await C.files[0].text()),n(2,E=Yg()),await p1(fe),n(1,S="")}function A(ee){window.confirm(`Really delete project ${ee}? You can't undo this.`)&&(window.localStorage.removeItem(ee),n(2,E=Yg()))}function R(ee){let fe=window.prompt(`Rename project ${ee} to what?`,ee);if(fe){fe.startsWith("ltn_")||(fe=`ltn_${fe}`);let pe=window.localStorage.getItem(ee);window.localStorage.setItem(fe,pe),window.localStorage.removeItem(ee),n(2,E=Yg())}}async function z(ee){n(1,S=`Loading project ${ee}`),await p1(ee),n(1,S="")}const U=()=>Ft(xn,l={mode:"new-project"},l),F=ee=>z(ee),G=ee=>R(ee),H=ee=>A(ee);function te(ee){ai[ee?"unshift":"push"](()=>{C=ee,n(3,C)})}return t.$$set=ee=>{"wasmReady"in ee&&n(0,v=ee.wasmReady)},[v,S,E,C,c,l,d,M,A,R,z,U,F,G,H,te]}class t7 extends Yt{constructor(e){super(),Xt(this,e,e7,Q8,Ut,{wasmReady:0})}}function TE(t,e,n){const r=t.slice();return r[17]=e[n][0],r[18]=e[n][1],r}function LE(t,e,n){const r=t.slice();return r[21]=e[n][0],r[22]=e[n][1],r}function n7(t){let e;return{c(){e=ot("Choose project")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function r7(t){let e,n,r,i,s,c,l,d;return s=new or({props:{$$slots:{default:[n7]},$$scope:{ctx:t}}}),s.$on("click",t[13]),{c(){e=_e("div"),n=_e("nav"),r=_e("ul"),i=_e("li"),Ge(s.$$.fragment),c=We(),l=_e("li"),l.textContent="New project",Ie(n,"aria-label","breadcrumb"),Ie(e,"slot","top")},m(v,S){xe(v,e,S),oe(e,n),oe(n,r),oe(r,i),Ue(s,i,null),oe(r,c),oe(r,l),d=!0},p(v,S){const E={};S&33554432&&(E.$$scope={dirty:S,ctx:v}),s.$set(E)},i(v){d||(ue(s.$$.fragment,v),d=!0)},o(v){ye(s.$$.fragment,v),d=!1},d(v){v&&be(e),je(s)}}}function PE(t){let e,n,r,i,s,c,l,d,v,S,E,C,M,A;e=new qE({props:{loading:t[4]}});let R=bs(t[3]),z=[];for(let U=0;Ut[9].call(s))},m(U,F){Ue(e,U,F),xe(U,n,F),xe(U,r,F),oe(r,i),oe(r,s),oe(s,c);for(let G=0;G{S=null}),jn())},i(E){l||(ue(S),l=!0)},o(E){ye(S),l=!1},d(E){E&&be(e),S&&S.d(),d=!1,v()}}}function o7(t){let e,n,r;return n=new V8({}),{c(){e=_e("div"),Ge(n.$$.fragment),Ie(e,"slot","map")},m(i,s){xe(i,e,s),Ue(n,e,null),r=!0},p:Pt,i(i){r||(ue(n.$$.fragment,i),r=!0)},o(i){ye(n.$$.fragment,i),r=!1},d(i){i&&be(e),je(n)}}}function s7(t){let e,n;return e=new bu({props:{$$slots:{map:[o7],sidebar:[i7],top:[r7]},$$scope:{ctx:t}}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,[i]){const s={};i&33554558&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function a7(t,e,n){let r,i,s,c,l;mt(t,Ju,H=>n(14,r=H)),mt(t,ji,H=>n(15,i=H)),mt(t,Qd,H=>n(16,s=H)),mt(t,uu,H=>n(5,c=H)),mt(t,xn,H=>n(6,l=H));let d="",v="",S=[],E="";ey(async()=>{let H=await fetch(s?"/osm/areas.json":"https://assets.od2net.org/severance_pbfs/areas.json");n(3,S=await H.json())});function C(H){n(4,E="Loading OSM");try{Ft(ji,i=new ZE(new TextEncoder().encode(H.detail.xml),H.detail.boundary,void 0),i),Ft(Ju,r=`ltn_${d}`,r),HT(),Rf()}catch(te){window.alert(`Couldn't import from Overpass: ${te}`)}n(4,E="")}async function M(){if(v=="")return;let H=`ltn_${d}`;window.localStorage.setItem(H,JSON.stringify({type:"FeatureCollection",features:[],study_area_name:v})),n(4,E=`Loading pre-clipped OSM area ${v}`),await p1(H),n(4,E="")}function A(){d=this.value,n(1,d)}function R(){v=FE(this),n(2,v),n(3,S)}return[M,d,v,S,E,c,l,C,A,R,()=>M(),H=>n(4,E=H.detail),H=>window.alert(H.detail),()=>Ft(xn,l={mode:"title"},l)]}class l7 extends Yt{constructor(e){super(),Xt(this,e,a7,s7,Ut,{loadExample:0})}get loadExample(){return this.$$.ctx[0]}}const{window:u7}=d1;function c7(t){let e;return{c(){e=ot("Choose project")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function h7(t){let e;return{c(){e=ot("Pick neighbourhood")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function f7(t){let e;return{c(){e=ot("Editing")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function p7(t){let e,n,r,i,s,c,l,d,v,S,E,C,M,A;return s=new or({props:{$$slots:{default:[c7]},$$scope:{ctx:t}}}),s.$on("click",t[9]),d=new or({props:{$$slots:{default:[h7]},$$scope:{ctx:t}}}),d.$on("click",t[10]),E=new or({props:{$$slots:{default:[f7]},$$scope:{ctx:t}}}),E.$on("click",t[5]),{c(){e=_e("div"),n=_e("nav"),r=_e("ul"),i=_e("li"),Ge(s.$$.fragment),c=We(),l=_e("li"),Ge(d.$$.fragment),v=We(),S=_e("li"),Ge(E.$$.fragment),C=We(),M=_e("li"),M.textContent="Viewing shortcuts",Ie(n,"aria-label","breadcrumb"),Ie(e,"slot","top")},m(R,z){xe(R,e,z),oe(e,n),oe(n,r),oe(r,i),Ue(s,i,null),oe(r,c),oe(r,l),Ue(d,l,null),oe(r,v),oe(r,S),Ue(E,S,null),oe(r,C),oe(r,M),A=!0},p(R,z){const U={};z&8192&&(U.$$scope={dirty:z,ctx:R}),s.$set(U);const F={};z&8192&&(F.$$scope={dirty:z,ctx:R}),d.$set(F);const G={};z&8192&&(G.$$scope={dirty:z,ctx:R}),E.$set(G)},i(R){A||(ue(s.$$.fragment,R),ue(d.$$.fragment,R),ue(E.$$.fragment,R),A=!0)},o(R){ye(s.$$.fragment,R),ye(d.$$.fragment,R),ye(E.$$.fragment,R),A=!1},d(R){R&&be(e),je(s),je(d),je(E)}}}function d7(t){let e,n,r,i,s,c,l,d,v,S=t[0].shortcutIndex+1+"",E,C,M=t[0].gj.features.length+"",A,R,z,U,F,G,H,te,ee,fe=Rr(t[0].gj.features[t[0].shortcutIndex].properties).directness.toFixed(1)+"",pe,se,Ae,Y,ae;return{c(){e=_e("p"),e.textContent=`This shows all possible shortcuts crossing the blue road you've chosen. A shortcut is defined as a route starting and ending outside the neighbourhood, but cutting through it. It might not actually be considered a "good shortcut" in practice -- this tool doesn't know any real traffic patterns; it's just looking for any possible path. This - view lets you understand the limits of this assumption.`,n=We(),r=_e("button"),r.textContent="Pick a different road",i=We(),s=_e("div"),c=_e("button"),l=st("Previous"),v=We(),E=st(S),C=st(" / "),A=st(M),R=We(),z=_e("button"),U=st("Next"),G=We(),H=_e("p"),te=st("This shortcut is "),ee=_e("b"),pe=st(fe),se=st("x"),Ae=st(` - the length of the shortest route using all roads, not just this neighbourhood`),c.disabled=d=t[0].shortcutIndex==0,Ie(c,"data-tooltip","Left"),z.disabled=F=t[0].shortcutIndex==t[0].gj.features.length-1,Ie(z,"data-tooltip","Right"),sr(s,"display","flex"),sr(s,"justify-content","space-between")},m(Ke,Le){xe(Ke,e,Le),xe(Ke,n,Le),xe(Ke,r,Le),xe(Ke,i,Le),xe(Ke,s,Le),oe(s,c),oe(c,l),oe(s,v),oe(s,E),oe(s,C),oe(s,A),oe(s,R),oe(s,z),oe(z,U),xe(Ke,G,Le),xe(Ke,H,Le),oe(H,te),oe(H,ee),oe(ee,pe),oe(ee,se),oe(H,Ae),Y||(ae=[Lt(r,"click",t[8]),Lt(c,"click",t[6]),Lt(z,"click",t[7])],Y=!0)},p(Ke,Le){Le&1&&d!==(d=Ke[0].shortcutIndex==0)&&(c.disabled=d),Le&1&&S!==(S=Ke[0].shortcutIndex+1+"")&&hr(E,S),Le&1&&M!==(M=Ke[0].gj.features.length+"")&&hr(A,M),Le&1&&F!==(F=Ke[0].shortcutIndex==Ke[0].gj.features.length-1)&&(z.disabled=F),Le&1&&fe!==(fe=Rr(Ke[0].gj.features[Ke[0].shortcutIndex].properties).directness.toFixed(1)+"")&&hr(pe,fe)},d(Ke){Ke&&(be(e),be(n),be(r),be(i),be(s),be(G),be(H)),Y=!1,Kr(ae)}}}function p7(t){let e;return{c(){e=_e("p"),e.textContent="Click a road to see shortcuts"},m(n,r){xe(n,e,r)},p:Pt,d(n){n&&be(e)}}}function d7(t){let e,n,r,i;n=new Iy({}),n.$on("click",t[5]);function s(d,v){if(d[0].state=="neutral")return p7;if(d[0].state=="chose-road")return f7}let c=s(t),l=c&&c(t);return{c(){e=_e("div"),Ge(n.$$.fragment),r=We(),l&&l.c(),Ie(e,"slot","sidebar")},m(d,v){xe(d,e,v),Ue(n,e,null),oe(e,r),l&&l.m(e,null),i=!0},p(d,v){c===(c=s(d))&&l?l.p(d,v):(l&&l.d(1),l=c&&c(d),l&&(l.c(),l.m(e,null)))},i(d){i||(ue(n.$$.fragment,d),i=!0)},o(d){ye(n.$$.fragment,d),i=!1},d(d){d&&be(e),je(n),l&&l.d()}}}function m7(t){let e,n,r,i,s,c;return e=new Ro({props:{data:u1(JSON.parse(Rr(t[2]).renderNeighbourhood())),$$slots:{default:[_7]},$$scope:{ctx:t}}}),r=new Ro({props:{data:t[0].gj.features[t[0].shortcutIndex],$$slots:{default:[y7]},$$scope:{ctx:t}}}),s=new Ro({props:{data:t[0].roadGj,$$slots:{default:[v7]},$$scope:{ctx:t}}}),{c(){Ge(e.$$.fragment),n=We(),Ge(r.$$.fragment),i=We(),Ge(s.$$.fragment)},m(l,d){Ue(e,l,d),xe(l,n,d),Ue(r,l,d),xe(l,i,d),Ue(s,l,d),c=!0},p(l,d){const v={};d&4&&(v.data=u1(JSON.parse(Rr(l[2]).renderNeighbourhood()))),d&8192&&(v.$$scope={dirty:d,ctx:l}),e.$set(v);const S={};d&1&&(S.data=l[0].gj.features[l[0].shortcutIndex]),d&8192&&(S.$$scope={dirty:d,ctx:l}),r.$set(S);const E={};d&1&&(E.data=l[0].roadGj),d&8192&&(E.$$scope={dirty:d,ctx:l}),s.$set(E)},i(l){c||(ue(e.$$.fragment,l),ue(r.$$.fragment,l),ue(s.$$.fragment,l),c=!0)},o(l){ye(e.$$.fragment,l),ye(r.$$.fragment,l),ye(s.$$.fragment,l),c=!1},d(l){l&&(be(n),be(i)),je(e,l),je(r,l),je(s,l)}}}function g7(t){let e,n;return e=new Cy({props:{gjInput:JSON.parse(Rr(t[2]).renderNeighbourhood()),onClickLine:t[3],$$slots:{"line-popup":[x7]},$$scope:{ctx:t}}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,i){const s={};i&4&&(s.gjInput=JSON.parse(Rr(r[2]).renderNeighbourhood())),i&8192&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function _7(t){let e,n;const r=[gi("cells"),{filter:["==",["get","kind"],"cell"]},{paint:{"fill-color":["get","color"],"fill-opacity":.3}}];let i={};for(let s=0;s({12:i}),({props:i})=>i?4096:0]},$$scope:{ctx:t}}}),{c(){e=_e("div"),Ge(n.$$.fragment),Ie(e,"slot","line-popup")},m(i,s){xe(i,e,s),Ue(n,e,null),r=!0},p(i,s){const c={};s&12288&&(c.$$scope={dirty:s,ctx:i}),n.$set(c)},i(i){r||(ue(n.$$.fragment,i),r=!0)},o(i){ye(n.$$.fragment,i),r=!1},d(i){i&&be(e),je(n)}}}function w7(t){let e,n,r,i,s,c;const l=[g7,m7],d=[];function v(S,E){return S[0].state=="neutral"?0:S[0].state=="chose-road"?1:-1}return~(n=v(t))&&(r=d[n]=l[n](t)),s=new Ty({}),{c(){e=_e("div"),r&&r.c(),i=We(),Ge(s.$$.fragment),Ie(e,"slot","map")},m(S,E){xe(S,e,E),~n&&d[n].m(e,null),oe(e,i),Ue(s,e,null),c=!0},p(S,E){let C=n;n=v(S),n===C?~n&&d[n].p(S,E):(r&&(Un(),ye(d[C],1,1,()=>{d[C]=null}),jn()),~n?(r=d[n],r?r.p(S,E):(r=d[n]=l[n](S),r.c()),ue(r,1),r.m(e,i)):r=null)},i(S){c||(ue(r),ue(s.$$.fragment,S),c=!0)},o(S){ye(r),ye(s.$$.fragment,S),c=!1},d(S){S&&be(e),~n&&d[n].d(),je(s)}}}function S7(t){let e,n,r,i;return e=new bu({props:{$$slots:{map:[w7],sidebar:[d7],top:[h7]},$$scope:{ctx:t}}}),{c(){Ge(e.$$.fragment)},m(s,c){Ue(e,s,c),n=!0,r||(i=Lt(a7,"keydown",t[4]),r=!0)},p(s,[c]){const l={};c&8199&&(l.$$scope={dirty:c,ctx:s}),e.$set(l)},i(s){n||(ue(e.$$.fragment,s),n=!0)},o(s){ye(e.$$.fragment,s),n=!1},d(s){je(e,s),r=!1,i()}}}function E7(t,e,n){let r,i,s;mt(t,xn,R=>n(1,r=R)),mt(t,uu,R=>n(11,i=R)),mt(t,ji,R=>n(2,s=R));let c={state:"neutral"};function l(R,z){let U=JSON.parse(s.getShortcutsCrossingRoad(R.properties.id));if(U.features.length==0){window.alert("No shortcuts here");return}n(0,c={state:"chose-road",roadGj:R,gj:U,shortcutIndex:0})}ey(()=>{i==null||i.keyboard.disable()}),ro(()=>{i==null||i.keyboard.enable()});function d(R){c.state=="chose-road"&&(R.key=="ArrowLeft"&&c.shortcutIndex>0&&(R.stopPropagation(),n(0,c.shortcutIndex--,c)),R.key=="ArrowRight"&&(R.stopPropagation(),c.shortcutIndex!=c.gj.features.length-1&&n(0,c.shortcutIndex++,c)))}function v(){Ft(xn,r={mode:"neighbourhood"},r)}function S(){c.state=="chose-road"&&n(0,c.shortcutIndex--,c)}function E(){c.state=="chose-road"&&n(0,c.shortcutIndex++,c)}return[c,r,s,l,d,v,S,E,()=>n(0,c={state:"neutral"}),()=>Ft(xn,r={mode:"title"},r),()=>Ft(xn,r={mode:"network"},r)]}class I7 extends Yt{constructor(e){super(),Xt(this,e,E7,S7,Ut,{})}}function C7(t){let e,n,r,i,s,c,l,d,v,S,E;return c=new bB({}),{c(){e=_e("div"),n=_e("button"),r=_e("img"),s=We(),Ge(c.$$.fragment),l=We(),d=_e("span"),Wn(r.src,i=t[10]?C2:T2)||Ie(r,"src",i),sr(r,"height","6vh"),Ie(r,"alt","A/B Street logo"),Ie(n,"class","outline"),sr(d,"width","100%"),Ie(e,"slot","top"),sr(e,"display","flex")},m(C,M){xe(C,e,M),oe(e,n),oe(n,r),oe(e,s),Ue(c,e,null),oe(e,l),oe(e,d),t[20](d),v=!0,S||(E=Lt(n,"click",t[19]),S=!0)},p(C,M){(!v||M&1024&&!Wn(r.src,i=C[10]?C2:T2))&&Ie(r,"src",i)},i(C){v||(ue(c.$$.fragment,C),v=!0)},o(C){ye(c.$$.fragment,C),v=!1},d(C){C&&be(e),je(c),t[20](null),S=!1,E()}}}function ME(t){let e,n,r,i,s,c;return r=new $z({props:{map:Rr(t[6]),maptilerBasemap:t[7]}}),{c(){e=_e("button"),e.textContent="Zoom to fit study area",n=We(),Ge(r.$$.fragment),Ie(e,"class","secondary")},m(l,d){xe(l,e,d),xe(l,n,d),Ue(r,l,d),i=!0,s||(c=Lt(e,"click",t[11]),s=!0)},p(l,d){const v={};d&64&&(v.map=Rr(l[6])),d&128&&(v.maptilerBasemap=l[7]),r.$set(v)},i(l){i||(ue(r.$$.fragment,l),i=!0)},o(l){ye(r.$$.fragment,l),i=!1},d(l){l&&(be(e),be(n)),je(r,l),s=!1,c()}}}function T7(t){let e,n,r,i,s,c,l=t[5]&&ME(t);return{c(){e=_e("div"),n=_e("div"),r=We(),i=_e("hr"),s=We(),l&&l.c(),Ie(e,"slot","left")},m(d,v){xe(d,e,v),oe(e,n),t[18](n),oe(e,r),oe(e,i),oe(e,s),l&&l.m(e,null),c=!0},p(d,v){d[5]?l?(l.p(d,v),v&32&&ue(l,1)):(l=ME(d),l.c(),ue(l,1),l.m(e,null)):l&&(Un(),ye(l,1,1,()=>{l=null}),jn())},i(d){c||(ue(l),c=!0)},o(d){ye(l),c=!1},d(d){d&&be(e),t[18](null),l&&l.d()}}}function L7(t){let e,n;return e=new s7({}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p:Pt,i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function P7(t){let e,n;return e=new Q8({props:{wasmReady:t[4]}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,i){const s={};i&16&&(s.wasmReady=r[4]),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function AE(t){let e,n,r,i,s,c;e=new Ro({props:{data:JSON.parse(t[5].getInvertedBoundary()),$$slots:{default:[M7]},$$scope:{ctx:t}}});const l=[z7,O7,N7,R7,D7,k7,A7],d=[];function v(S,E){return S[8].mode=="network"?0:S[8].mode=="set-boundary"?1:S[8].mode=="auto-boundaries"?2:S[8].mode=="neighbourhood"?3:S[8].mode=="view-shortcuts"?4:S[8].mode=="route"?5:S[8].mode=="debug"?6:-1}return~(r=v(t))&&(i=d[r]=l[r](t)),{c(){Ge(e.$$.fragment),n=We(),i&&i.c(),s=Hi()},m(S,E){Ue(e,S,E),xe(S,n,E),~r&&d[r].m(S,E),xe(S,s,E),c=!0},p(S,E){const C={};E&32&&(C.data=JSON.parse(S[5].getInvertedBoundary())),E&4194304&&(C.$$scope={dirty:E,ctx:S}),e.$set(C);let M=r;r=v(S),r===M?~r&&d[r].p(S,E):(i&&(Un(),ye(d[M],1,1,()=>{d[M]=null}),jn()),~r?(i=d[r],i?i.p(S,E):(i=d[r]=l[r](S),i.c()),ue(i,1),i.m(s.parentNode,s)):i=null)},i(S){c||(ue(e.$$.fragment,S),ue(i),c=!0)},o(S){ye(e.$$.fragment,S),ye(i),c=!1},d(S){S&&(be(n),be(s)),je(e,S),~r&&d[r].d(S)}}}function M7(t){let e,n;const r=[gi("boundary"),{paint:{"fill-color":"black","fill-opacity":.3}}];let i={};for(let s=0;s{C[F]=null}),jn()),~s?(c=C[s],c?c.p(R,z):(c=C[s]=E[s](R),c.c()),ue(c,1),c.m(l.parentNode,l)):c=null),R[5]?A?(A.p(R,z),z&32&&ue(A,1)):(A=AE(R),A.c(),ue(A,1),A.m(d.parentNode,d)):A&&(Un(),ye(A,1,1,()=>{A=null}),jn())},i(R){S||(ue(e.$$.fragment,R),ue(c),ue(A),ue(v.$$.fragment,R),S=!0)},o(R){ye(e.$$.fragment,R),ye(c),ye(A),ye(v.$$.fragment,R),S=!1},d(R){R&&(be(n),be(r),be(i),be(l),be(d)),je(e,R),t[15](null),~s&&C[s].d(R),A&&A.d(R),je(v,R)}}}function B7(t){let e,n,r,i;function s(l){t[16](l)}let c={style:`https://api.maptiler.com/maps/${t[7]}/style.json?key=${Bv}`,standardControls:!0,hash:!0,images:[{id:"walk_cycle_only",url:"/ltn//filters/walk_cycle_only_icon.gif"},{id:"no_entry",url:"/ltn//filters/no_entry_icon.gif"},{id:"bus_gate",url:"/ltn//filters/bus_gate_icon.gif"},{id:"school_street",url:"/ltn//filters/school_street_icon.gif"},{id:"oneway-arrow",url:CR}],$$slots:{default:[F7]},$$scope:{ctx:t}};return t[0]!==void 0&&(c.map=t[0]),n=new dN({props:c}),ai.push(()=>Il(n,"map",s)),n.$on("error",t[17]),{c(){e=_e("div"),Ge(n.$$.fragment),Ie(e,"slot","main"),sr(e,"position","relative"),sr(e,"width","100%"),sr(e,"height","100%")},m(l,d){xe(l,e,d),Ue(n,e,null),i=!0},p(l,d){const v={};d&128&&(v.style=`https://api.maptiler.com/maps/${l[7]}/style.json?key=${Bv}`),d&4194617&&(v.$$scope={dirty:d,ctx:l}),!r&&d&1&&(r=!0,v.map=l[0],El(()=>r=!1)),n.$set(v)},i(l){i||(ue(n.$$.fragment,l),i=!0)},o(l){ye(n.$$.fragment,l),i=!1},d(l){l&&be(e),je(n)}}}function V7(t){let e,n,r,i;return e=new IR({}),r=new Ez({props:{$$slots:{main:[B7],left:[T7],top:[C7]},$$scope:{ctx:t}}}),{c(){Ge(e.$$.fragment),n=We(),Ge(r.$$.fragment)},m(s,c){Ue(e,s,c),xe(s,n,c),Ue(r,s,c),i=!0},p(s,[c]){const l={};c&4196351&&(l.$$scope={dirty:c,ctx:s}),r.$set(l)},i(s){i||(ue(e.$$.fragment,s),ue(r.$$.fragment,s),i=!0)},o(s){ye(e.$$.fragment,s),ye(r.$$.fragment,s),i=!1},d(s){s&&be(n),je(e,s),je(r,s)}}}function U7(t,e,n){let r,i,s,c,l,d,v,S,E,C;mt(t,l1,se=>n(12,r=se)),mt(t,a1,se=>n(13,i=se)),mt(t,s1,se=>n(14,s=se)),mt(t,ji,se=>n(5,c=se)),mt(t,uu,se=>n(6,l=se)),mt(t,Qd,se=>n(21,d=se)),mt(t,Vv,se=>n(7,v=se)),mt(t,xn,se=>n(8,S=se)),mt(t,k_,se=>n(9,E=se)),mt(t,Jd,se=>n(10,C=se));let M=!1;ey(async()=>{await HE(),await $E(),n(4,M=!0);try{(await fetch("/osm/areas.json")).ok&&(Ft(Qd,d=!0,d),console.log("Using local cache, not od2net.org"))}catch{}});let A;function R(){l.fitBounds(Array.from(c.getBounds()),{animate:!1})}let z,U,F;function G(se){ai[se?"unshift":"push"](()=>{F=se,n(3,F),n(12,r)})}function H(se){A=se,n(0,A)}const te=se=>{console.log(se.detail.error)};function ee(se){ai[se?"unshift":"push"](()=>{U=se,n(2,U),n(13,i)})}const fe=()=>Ft(k_,E=!0,E);function pe(se){ai[se?"unshift":"push"](()=>{z=se,n(1,z),n(14,s)})}return t.$$.update=()=>{t.$$.dirty&1&&A&&uu.set(A),t.$$.dirty&16386&&z&&s&&(n(1,z.innerHTML="",z),z.appendChild(s)),t.$$.dirty&8196&&U&&i&&(n(2,U.innerHTML="",U),U.appendChild(i)),t.$$.dirty&4104&&F&&r&&(n(3,F.innerHTML="",F),F.appendChild(r))},[A,z,U,F,M,c,l,v,S,E,C,R,r,i,s,G,H,te,ee,fe,pe]}class j7 extends Yt{constructor(e){super(),Xt(this,e,U7,V7,Ut,{})}}new j7({target:document.getElementById("app")}); + view lets you understand the limits of this assumption.`,n=We(),r=_e("button"),r.textContent="Pick a different road",i=We(),s=_e("div"),c=_e("button"),l=ot("Previous"),v=We(),E=ot(S),C=ot(" / "),A=ot(M),R=We(),z=_e("button"),U=ot("Next"),G=We(),H=_e("p"),te=ot("This shortcut is "),ee=_e("b"),pe=ot(fe),se=ot("x"),Ae=ot(` + the length of the shortest route using all roads, not just this neighbourhood`),c.disabled=d=t[0].shortcutIndex==0,Ie(c,"data-tooltip","Left"),z.disabled=F=t[0].shortcutIndex==t[0].gj.features.length-1,Ie(z,"data-tooltip","Right"),sr(s,"display","flex"),sr(s,"justify-content","space-between")},m(Ke,Le){xe(Ke,e,Le),xe(Ke,n,Le),xe(Ke,r,Le),xe(Ke,i,Le),xe(Ke,s,Le),oe(s,c),oe(c,l),oe(s,v),oe(s,E),oe(s,C),oe(s,A),oe(s,R),oe(s,z),oe(z,U),xe(Ke,G,Le),xe(Ke,H,Le),oe(H,te),oe(H,ee),oe(ee,pe),oe(ee,se),oe(H,Ae),Y||(ae=[Lt(r,"click",t[8]),Lt(c,"click",t[6]),Lt(z,"click",t[7])],Y=!0)},p(Ke,Le){Le&1&&d!==(d=Ke[0].shortcutIndex==0)&&(c.disabled=d),Le&1&&S!==(S=Ke[0].shortcutIndex+1+"")&&cr(E,S),Le&1&&M!==(M=Ke[0].gj.features.length+"")&&cr(A,M),Le&1&&F!==(F=Ke[0].shortcutIndex==Ke[0].gj.features.length-1)&&(z.disabled=F),Le&1&&fe!==(fe=Rr(Ke[0].gj.features[Ke[0].shortcutIndex].properties).directness.toFixed(1)+"")&&cr(pe,fe)},d(Ke){Ke&&(be(e),be(n),be(r),be(i),be(s),be(G),be(H)),Y=!1,Hr(ae)}}}function m7(t){let e;return{c(){e=_e("p"),e.textContent="Click a road to see shortcuts"},m(n,r){xe(n,e,r)},p:Pt,d(n){n&&be(e)}}}function g7(t){let e,n,r,i;n=new Cy({}),n.$on("click",t[5]);function s(d,v){if(d[0].state=="neutral")return m7;if(d[0].state=="chose-road")return d7}let c=s(t),l=c&&c(t);return{c(){e=_e("div"),Ge(n.$$.fragment),r=We(),l&&l.c(),Ie(e,"slot","sidebar")},m(d,v){xe(d,e,v),Ue(n,e,null),oe(e,r),l&&l.m(e,null),i=!0},p(d,v){c===(c=s(d))&&l?l.p(d,v):(l&&l.d(1),l=c&&c(d),l&&(l.c(),l.m(e,null)))},i(d){i||(ue(n.$$.fragment,d),i=!0)},o(d){ye(n.$$.fragment,d),i=!1},d(d){d&&be(e),je(n),l&&l.d()}}}function _7(t){let e,n,r,i,s,c;return e=new No({props:{data:h1(JSON.parse(Rr(t[2]).renderNeighbourhood())),$$slots:{default:[v7]},$$scope:{ctx:t}}}),r=new No({props:{data:t[0].gj.features[t[0].shortcutIndex],$$slots:{default:[b7]},$$scope:{ctx:t}}}),s=new No({props:{data:t[0].roadGj,$$slots:{default:[x7]},$$scope:{ctx:t}}}),{c(){Ge(e.$$.fragment),n=We(),Ge(r.$$.fragment),i=We(),Ge(s.$$.fragment)},m(l,d){Ue(e,l,d),xe(l,n,d),Ue(r,l,d),xe(l,i,d),Ue(s,l,d),c=!0},p(l,d){const v={};d&4&&(v.data=h1(JSON.parse(Rr(l[2]).renderNeighbourhood()))),d&8192&&(v.$$scope={dirty:d,ctx:l}),e.$set(v);const S={};d&1&&(S.data=l[0].gj.features[l[0].shortcutIndex]),d&8192&&(S.$$scope={dirty:d,ctx:l}),r.$set(S);const E={};d&1&&(E.data=l[0].roadGj),d&8192&&(E.$$scope={dirty:d,ctx:l}),s.$set(E)},i(l){c||(ue(e.$$.fragment,l),ue(r.$$.fragment,l),ue(s.$$.fragment,l),c=!0)},o(l){ye(e.$$.fragment,l),ye(r.$$.fragment,l),ye(s.$$.fragment,l),c=!1},d(l){l&&(be(n),be(i)),je(e,l),je(r,l),je(s,l)}}}function y7(t){let e,n;return e=new Ty({props:{gjInput:JSON.parse(Rr(t[2]).renderNeighbourhood()),onClickLine:t[3],$$slots:{"line-popup":[S7]},$$scope:{ctx:t}}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,i){const s={};i&4&&(s.gjInput=JSON.parse(Rr(r[2]).renderNeighbourhood())),i&8192&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function v7(t){let e,n;const r=[gi("cells"),{filter:["==",["get","kind"],"cell"]},{paint:{"fill-color":["get","color"],"fill-opacity":.3}}];let i={};for(let s=0;s({12:i}),({props:i})=>i?4096:0]},$$scope:{ctx:t}}}),{c(){e=_e("div"),Ge(n.$$.fragment),Ie(e,"slot","line-popup")},m(i,s){xe(i,e,s),Ue(n,e,null),r=!0},p(i,s){const c={};s&12288&&(c.$$scope={dirty:s,ctx:i}),n.$set(c)},i(i){r||(ue(n.$$.fragment,i),r=!0)},o(i){ye(n.$$.fragment,i),r=!1},d(i){i&&be(e),je(n)}}}function E7(t){let e,n,r,i,s,c;const l=[y7,_7],d=[];function v(S,E){return S[0].state=="neutral"?0:S[0].state=="chose-road"?1:-1}return~(n=v(t))&&(r=d[n]=l[n](t)),s=new Ly({}),{c(){e=_e("div"),r&&r.c(),i=We(),Ge(s.$$.fragment),Ie(e,"slot","map")},m(S,E){xe(S,e,E),~n&&d[n].m(e,null),oe(e,i),Ue(s,e,null),c=!0},p(S,E){let C=n;n=v(S),n===C?~n&&d[n].p(S,E):(r&&(Un(),ye(d[C],1,1,()=>{d[C]=null}),jn()),~n?(r=d[n],r?r.p(S,E):(r=d[n]=l[n](S),r.c()),ue(r,1),r.m(e,i)):r=null)},i(S){c||(ue(r),ue(s.$$.fragment,S),c=!0)},o(S){ye(r),ye(s.$$.fragment,S),c=!1},d(S){S&&be(e),~n&&d[n].d(),je(s)}}}function I7(t){let e,n,r,i;return e=new bu({props:{$$slots:{map:[E7],sidebar:[g7],top:[p7]},$$scope:{ctx:t}}}),{c(){Ge(e.$$.fragment)},m(s,c){Ue(e,s,c),n=!0,r||(i=Lt(u7,"keydown",t[4]),r=!0)},p(s,[c]){const l={};c&8199&&(l.$$scope={dirty:c,ctx:s}),e.$set(l)},i(s){n||(ue(e.$$.fragment,s),n=!0)},o(s){ye(e.$$.fragment,s),n=!1},d(s){je(e,s),r=!1,i()}}}function C7(t,e,n){let r,i,s;mt(t,xn,R=>n(1,r=R)),mt(t,uu,R=>n(11,i=R)),mt(t,ji,R=>n(2,s=R));let c={state:"neutral"};function l(R,z){let U=JSON.parse(s.getShortcutsCrossingRoad(R.properties.id));if(U.features.length==0){window.alert("No shortcuts here");return}n(0,c={state:"chose-road",roadGj:R,gj:U,shortcutIndex:0})}ey(()=>{i==null||i.keyboard.disable()}),ro(()=>{i==null||i.keyboard.enable()});function d(R){c.state=="chose-road"&&(R.key=="ArrowLeft"&&c.shortcutIndex>0&&(R.stopPropagation(),n(0,c.shortcutIndex--,c)),R.key=="ArrowRight"&&(R.stopPropagation(),c.shortcutIndex!=c.gj.features.length-1&&n(0,c.shortcutIndex++,c)))}function v(){Ft(xn,r={mode:"neighbourhood"},r)}function S(){c.state=="chose-road"&&n(0,c.shortcutIndex--,c)}function E(){c.state=="chose-road"&&n(0,c.shortcutIndex++,c)}return[c,r,s,l,d,v,S,E,()=>n(0,c={state:"neutral"}),()=>Ft(xn,r={mode:"title"},r),()=>Ft(xn,r={mode:"network"},r)]}class T7 extends Yt{constructor(e){super(),Xt(this,e,C7,I7,Ut,{})}}function L7(t){let e,n,r,i,s,c,l,d,v,S,E;return c=new bB({}),{c(){e=_e("div"),n=_e("button"),r=_e("img"),s=We(),Ge(c.$$.fragment),l=We(),d=_e("span"),Wn(r.src,i=t[10]?L2:P2)||Ie(r,"src",i),sr(r,"height","6vh"),Ie(r,"alt","A/B Street logo"),Ie(n,"class","outline"),sr(d,"width","100%"),Ie(e,"slot","top"),sr(e,"display","flex")},m(C,M){xe(C,e,M),oe(e,n),oe(n,r),oe(e,s),Ue(c,e,null),oe(e,l),oe(e,d),t[20](d),v=!0,S||(E=Lt(n,"click",t[19]),S=!0)},p(C,M){(!v||M&1024&&!Wn(r.src,i=C[10]?L2:P2))&&Ie(r,"src",i)},i(C){v||(ue(c.$$.fragment,C),v=!0)},o(C){ye(c.$$.fragment,C),v=!1},d(C){C&&be(e),je(c),t[20](null),S=!1,E()}}}function kE(t){let e,n,r,i,s,c;return r=new $z({props:{map:Rr(t[6]),maptilerBasemap:t[7]}}),{c(){e=_e("button"),e.textContent="Zoom to fit study area",n=We(),Ge(r.$$.fragment),Ie(e,"class","secondary")},m(l,d){xe(l,e,d),xe(l,n,d),Ue(r,l,d),i=!0,s||(c=Lt(e,"click",t[11]),s=!0)},p(l,d){const v={};d&64&&(v.map=Rr(l[6])),d&128&&(v.maptilerBasemap=l[7]),r.$set(v)},i(l){i||(ue(r.$$.fragment,l),i=!0)},o(l){ye(r.$$.fragment,l),i=!1},d(l){l&&(be(e),be(n)),je(r,l),s=!1,c()}}}function P7(t){let e,n,r,i,s,c,l=t[5]&&kE(t);return{c(){e=_e("div"),n=_e("div"),r=We(),i=_e("hr"),s=We(),l&&l.c(),Ie(e,"slot","left")},m(d,v){xe(d,e,v),oe(e,n),t[18](n),oe(e,r),oe(e,i),oe(e,s),l&&l.m(e,null),c=!0},p(d,v){d[5]?l?(l.p(d,v),v&32&&ue(l,1)):(l=kE(d),l.c(),ue(l,1),l.m(e,null)):l&&(Un(),ye(l,1,1,()=>{l=null}),jn())},i(d){c||(ue(l),c=!0)},o(d){ye(l),c=!1},d(d){d&&be(e),t[18](null),l&&l.d()}}}function M7(t){let e,n;return e=new l7({}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p:Pt,i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function A7(t){let e,n;return e=new t7({props:{wasmReady:t[4]}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,i){const s={};i&16&&(s.wasmReady=r[4]),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function DE(t){let e,n,r,i,s,c;e=new No({props:{data:JSON.parse(t[5].getInvertedBoundary()),$$slots:{default:[k7]},$$scope:{ctx:t}}});const l=[B7,F7,z7,O7,N7,R7,D7],d=[];function v(S,E){return S[8].mode=="network"?0:S[8].mode=="set-boundary"?1:S[8].mode=="auto-boundaries"?2:S[8].mode=="neighbourhood"?3:S[8].mode=="view-shortcuts"?4:S[8].mode=="route"?5:S[8].mode=="debug"?6:-1}return~(r=v(t))&&(i=d[r]=l[r](t)),{c(){Ge(e.$$.fragment),n=We(),i&&i.c(),s=Hi()},m(S,E){Ue(e,S,E),xe(S,n,E),~r&&d[r].m(S,E),xe(S,s,E),c=!0},p(S,E){const C={};E&32&&(C.data=JSON.parse(S[5].getInvertedBoundary())),E&4194304&&(C.$$scope={dirty:E,ctx:S}),e.$set(C);let M=r;r=v(S),r===M?~r&&d[r].p(S,E):(i&&(Un(),ye(d[M],1,1,()=>{d[M]=null}),jn()),~r?(i=d[r],i?i.p(S,E):(i=d[r]=l[r](S),i.c()),ue(i,1),i.m(s.parentNode,s)):i=null)},i(S){c||(ue(e.$$.fragment,S),ue(i),c=!0)},o(S){ye(e.$$.fragment,S),ye(i),c=!1},d(S){S&&(be(n),be(s)),je(e,S),~r&&d[r].d(S)}}}function k7(t){let e,n;const r=[gi("boundary"),{paint:{"fill-color":"black","fill-opacity":.3}}];let i={};for(let s=0;s{C[F]=null}),jn()),~s?(c=C[s],c?c.p(R,z):(c=C[s]=E[s](R),c.c()),ue(c,1),c.m(l.parentNode,l)):c=null),R[5]?A?(A.p(R,z),z&32&&ue(A,1)):(A=DE(R),A.c(),ue(A,1),A.m(d.parentNode,d)):A&&(Un(),ye(A,1,1,()=>{A=null}),jn())},i(R){S||(ue(e.$$.fragment,R),ue(c),ue(A),ue(v.$$.fragment,R),S=!0)},o(R){ye(e.$$.fragment,R),ye(c),ye(A),ye(v.$$.fragment,R),S=!1},d(R){R&&(be(n),be(r),be(i),be(l),be(d)),je(e,R),t[15](null),~s&&C[s].d(R),A&&A.d(R),je(v,R)}}}function U7(t){let e,n,r,i;function s(l){t[16](l)}let c={style:`https://api.maptiler.com/maps/${t[7]}/style.json?key=${Vv}`,standardControls:!0,hash:!0,images:[{id:"walk_cycle_only",url:"/ltn//filters/walk_cycle_only_icon.gif"},{id:"no_entry",url:"/ltn//filters/no_entry_icon.gif"},{id:"bus_gate",url:"/ltn//filters/bus_gate_icon.gif"},{id:"school_street",url:"/ltn//filters/school_street_icon.gif"},{id:"oneway-arrow",url:TR}],$$slots:{default:[V7]},$$scope:{ctx:t}};return t[0]!==void 0&&(c.map=t[0]),n=new mN({props:c}),ai.push(()=>Il(n,"map",s)),n.$on("error",t[17]),{c(){e=_e("div"),Ge(n.$$.fragment),Ie(e,"slot","main"),sr(e,"position","relative"),sr(e,"width","100%"),sr(e,"height","100%")},m(l,d){xe(l,e,d),Ue(n,e,null),i=!0},p(l,d){const v={};d&128&&(v.style=`https://api.maptiler.com/maps/${l[7]}/style.json?key=${Vv}`),d&4194617&&(v.$$scope={dirty:d,ctx:l}),!r&&d&1&&(r=!0,v.map=l[0],El(()=>r=!1)),n.$set(v)},i(l){i||(ue(n.$$.fragment,l),i=!0)},o(l){ye(n.$$.fragment,l),i=!1},d(l){l&&be(e),je(n)}}}function j7(t){let e,n,r,i;return e=new CR({}),r=new Ez({props:{$$slots:{main:[U7],left:[P7],top:[L7]},$$scope:{ctx:t}}}),{c(){Ge(e.$$.fragment),n=We(),Ge(r.$$.fragment)},m(s,c){Ue(e,s,c),xe(s,n,c),Ue(r,s,c),i=!0},p(s,[c]){const l={};c&4196351&&(l.$$scope={dirty:c,ctx:s}),r.$set(l)},i(s){i||(ue(e.$$.fragment,s),ue(r.$$.fragment,s),i=!0)},o(s){ye(e.$$.fragment,s),ye(r.$$.fragment,s),i=!1},d(s){s&&be(n),je(e,s),je(r,s)}}}function G7(t,e,n){let r,i,s,c,l,d,v,S,E,C;mt(t,c1,se=>n(12,r=se)),mt(t,u1,se=>n(13,i=se)),mt(t,l1,se=>n(14,s=se)),mt(t,ji,se=>n(5,c=se)),mt(t,uu,se=>n(6,l=se)),mt(t,Qd,se=>n(21,d=se)),mt(t,Uv,se=>n(7,v=se)),mt(t,xn,se=>n(8,S=se)),mt(t,k_,se=>n(9,E=se)),mt(t,Jd,se=>n(10,C=se));let M=!1;ey(async()=>{await XE(),await JE(),n(4,M=!0);try{(await fetch("/osm/areas.json")).ok&&(Ft(Qd,d=!0,d),console.log("Using local cache, not od2net.org"))}catch{}});let A;function R(){l.fitBounds(Array.from(c.getBounds()),{animate:!1})}let z,U,F;function G(se){ai[se?"unshift":"push"](()=>{F=se,n(3,F),n(12,r)})}function H(se){A=se,n(0,A)}const te=se=>{console.log(se.detail.error)};function ee(se){ai[se?"unshift":"push"](()=>{U=se,n(2,U),n(13,i)})}const fe=()=>Ft(k_,E=!0,E);function pe(se){ai[se?"unshift":"push"](()=>{z=se,n(1,z),n(14,s)})}return t.$$.update=()=>{t.$$.dirty&1&&A&&uu.set(A),t.$$.dirty&16386&&z&&s&&(n(1,z.innerHTML="",z),z.appendChild(s)),t.$$.dirty&8196&&U&&i&&(n(2,U.innerHTML="",U),U.appendChild(i)),t.$$.dirty&4104&&F&&r&&(n(3,F.innerHTML="",F),F.appendChild(r))},[A,z,U,F,M,c,l,v,S,E,C,R,r,i,s,G,H,te,ee,fe,pe]}class q7 extends Yt{constructor(e){super(),Xt(this,e,G7,j7,Ut,{})}}new q7({target:document.getElementById("app")}); diff --git a/index.html b/index.html index 7fdf57f..065e020 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ The low-traffic neighbourhood (LTN) tool, v2 - +